PLC 기초 해설
'제어 및 operation' 카테고리의 다른 글
전기기초 이론정리 (0) | 2016.10.24 |
---|---|
통신 이야기 (0) | 2016.09.22 |
PID Intro (0) | 2016.07.13 |
PID Controller (0) | 2016.07.13 |
PID control design (0) | 2016.07.13 |
PID Intro
PID Intro
From ControlsWiki
Jump to: navigation, search
<analytics uacct="UA-11196190-1" ></analytics> Title: P, I, D, PI, PD, PID Control
Note:
Video lecture available for this section!
Authors: Ardemis Boghossian, James Brown, Sara Zak
Date Presented: October 19, 2006
Stewards: Ji Sun Sunny Choi, Sang Lee, Jennifer Gehle, Brian Murray, Razili Stanke-Koch, Kelly Martin, Lance Dehne, Sean Gant, Jay Lee, Alex Efta
Date Revised: October 6, 2007
- First round reviews for this page
-
Contents
[hide]
Introduction
Process controls are necessary for designing safe and productive plants. A variety of process controls are used to manipulate processes, however the most simple and often most effective is the PID controller.
Much more practical than the typical on/off controller, PID controllers allow for much better adjustments to be made in the system. While this is true, there are some advantages to using an on/off controller:
-relatively simple to design and execute
-binary sensors and actuators (such as an on/off controller) are generally more reliable and less expensive
Although there are some advantages, there are large disadvantages to using an on/off controller scheme:
-inefficient (using this control is like driving with full gas and full breaks)
-can generate noise when seeking stability (can dramatically overshoot or undershoot a set-point)
-physically wearing on valves and switches (continuously turning valves/switches fully on and fully off causes them to become worn out much quicker)
To allow for much better control and fine-tuning adjustments, most industrial processes use a PID controller scheme.
The controller attempts to correct the error between a measured process variable and desired setpoint by calculating the difference and then performing a corrective action to adjust the process accordingly. A PID controller controls a process through three parameters: Proportional (P), Integral (I), and Derivative (D). These parameters can be weighted, or tuned, to adjust their effect on the process. The following section will provide a brief introduction on PID controllers as well as methods to model a controlled system in Excel.
The Process Gain(K) is the ratio of change of the output variable(responding variable) to the change of the input variable(forcing function). It specifically defines the sensitivity of the output variable to a given change in the input variable.
Gain can only be described as a steady state parameter and give no knowledge about the dynamics of the process and is independent of the design and operating variables. A gain has three components that include the sign, the value, the units. The sign indicates how the output responds to the process input. A positive sign shows that the output variable increases with an increase in the input variable and a negative sign shows that the output variable decreases with an increase in the input variable. The units depend on the process considered that depend on the variables mentioned.
Example:
The pressure was increased from 21psi to 29psi. This change increased the valve position from 30%vp to 22%vp.
K = (29-21)psi / ((22-30)%vp) = -1.0psi/(%vp)
Dead Time(t0) is the between the change in an input variable and when the output variable begins. Dead time is important because it effects the controllability of the control system. A change in set point is not immediate because of this parameter. Dead time must be considered in tuning and modeling processes.
Types of Control
Process controls are instruments used to control a parameter, such as temperature, level, and pressure. PID controllers are a type of continuous controller because they continually adjust the output vs. an on/off controller, when looking at feed forward or feed backward conditions. An example of a temperature controller is shown in Figure 1.
Figure 1. Temperature controller in a CSTR
As shown in Figure 1, the temperature controller controls the temperature of a fluid within a CSTR (Continuous Stirred Tank Reactor). A temperature sensor first measures the temperature of the fluid. This measurement produces a measurement signal. The measurement signal is then compared to the set point, or desired temperature setting, of the controller. The difference between the measured signal and set point is the error. Based on this error, the controller sends an actuating signal to the heating coil, which adjusts the temperature accordingly. This type of process control is known as error-based control because the actuating signal is determined from the error between the actual and desired setting. The different types of error-based controls vary in the mathematical way they translate the error into an actuating signal, the most common of which are the PID controllers. Additionally, it is critical to understand feed-forward and feed-back control before exploring P, I, and D controls. Feed Forward Control Feedback Control
P, I, D, PI, PD, PID Control
As previously mentioned, controllers vary in the way they correlate the controller input (error) to the controller output (actuating signal). The most commonly used controllers are the proportional- integral-derivative (PID) controllers. PID controllers relate the error to the actuating signal either in a proportional (P), integral (I), or derivative (D) manner. PID controllers can also relate the error to the actuating signal using a combination of these controls.
Proportional (P) Control
One type of action used in PID controllers is the proportional control. Proportional control is a form of feedback control. It is the simplest form of continuous control that can be used in a closed-looped system. P-only control minimizes the fluctuation in the process variable, but it does not always bring the system to the desired set point. It provides a faster response than most other controllers, initially allowing the P-only controller to respond a few seconds faster. However, as the system becomes more complex (i.e. more complex algorithm) the response time difference could accumulate, allowing the P-controller to possibly respond even a few minutes faster. Athough the P-only controller does offer the advantage of faster response time, it produces deviation from the set point. This deviation is known as the offset, and it is usually not desired in a process. The existence of an offset implies that the system could not be maintained at the desired set point at steady state. It is analogous to the systematic error in a calibration curve, where there is always a set, constant error that prevents the line from crossing the origin. The offset can be minimized by combining P-only control with another form of control, such as I- or D- control. It is important to note, however, that it is impossible to completely eliminate the offset, which is implicitly included within each equation.
Mathematical Equations
P-control linearly correlates the controller output (actuating signal) to the error (diference between measured signal and set point). This P-control behavior is mathematically illustrated in Equation 1 (Scrcek, et. al).
c(t) = Kce(t) + b
(1)
c(t) = controller output
Kc = controller gain
e(t) = error
b = bias
In this equation, the bias and controller gain are constants specific to each controller. The bias is simply the controller output when the error is zero. The controller gain is the change in the output of the controller per change in the input to the controller. In PID controllers, where signals are usually electronically transmitted, controller gain relates the change in output voltage to the change in input voltage. These voltage changes are then directly related to the property being changed (i.e. temperature, pressure, level, etc.). Therefore, the gain ultimately relates the change in the input and output properties. If the output changes more than the input, Kc will be greater than 1. If the change in the input is greater than the change in the output, Kc will be less than 1. Ideally, if Kc is equal to infinity, the error can be reduced to zero. However, this infinitesimal nature of Kc increases the instability of the loop because zero error would imply that the the measured signal is exactly equal to the set point. As mentioned in lecture, exact equality is never achieved in control logic; instead, in control logic, error is allowed to vary within a certain range. Therefore, there are limits to the size of Kc, and these limits are defined by the system. Graphical representations of the effects of these variables on the system is shown in PID Tuning via Classical Methods.
As can be seen from the above equation, P-only control provides a linear relationship between the error of a system and the controller output of the system. This type of control provides a response, based on the signal that adjusts the system so that any oscillations are removed, and the system returns to steady-state. The inputs to the controller are the set point, the signal, and the bias. The controller calculates the difference between the set point and the signal, which is the error, and sends this value to an algorithm. Combined with the bias, this algorithm determines the action that the controller should take. A graphical representation of the P-controller output for a step increase in input at time t0 is shown below in Figure 2. This graph is exactly similar to the step input graph itself.
Figure 2. P-controller output for step input.
To illustrate this linear P-control relationship, consider the P-only control that controls the level of a fluid in a tank. Initially, the flow into the tank is equal to the flow out of the tank. However, if the flow out of the tank decreases, the level in the tank will increase because more fluid is entering than is leaving. The P-only control system will adjust the flow out of the tank so that it is again equal to the flow into the tank, and the level will once again be constant. However, this level is no longer equal to the initial level in the tank. The system is at steady-state, but there is a difference between the initial set point and the current position in the tank. This difference is the P-control offset.
Integral (I) Control
Another type of action used in PID controllers is the integral control. Integral control is a second form of feedback control. It is often used because it is able to remove any deviations that may exist. Thus, the system returns to both steady state and its original setting. A negative error will cause the signal to the system to decrease, while a positive error will cause the signal to increase. However, I-only controllers are much slower in their response time than P-only controllers because they are dependent on more parameters. If it is essential to have no offset in the system, then an I-only controller should be used, but it will require a slower response time. This slower response time can be reduced by combining I-only control with another form, such as P or PD control. I-only controls are often used when measured variables need to remain within a very narrow range and require fine-tuning control. I controls affect the system by responding to accumulated past error. The philosophy behind the integral control is that deviations will be affected in proportion to the cumulative sum of their magnitude. The key advantage of adding a I-control to your controller is that it will eliminate the offset. The disadvantages are that it can destabilize the controller, and there is an integrator windup, which increases the time it takes for the controller to make changes.
Mathematical Equations
I-control correlates the controller output to the integral of the error. The integral of the error is taken with respect to time. It is the total error associated over a specified amount of time. This I-control behavior is mathematically illustrated in Equation 2 (Scrcek, et. al).
(2)
c(t) = controller output
Ti = integral time
e(t) = error
c(t0) = controller output before integration
In this equation, the integral time is the amount of time that it takes for the controller to change its output by a value equal to the error. The controller output before integration is equal to either the initial output at time t=0, or the controller output at the time one step before the measurement. Graphical representations of the effects of these variables on the system is shown in PID Tuning via Classical Methods.
The rate of change in controller output for I-only control is determined by a number of parameters. While the P-only controller was determined by e, the rate of change for I-only depends on both e and Ti. Because of the inverse relationship between c(t) and Ti, this decreases the rate of change for an I-only controller.
The I-only controller operates in essentially the same way as a P-only controller. The inputs are again the set point, the signal, and the bias. Once again, the error is calculated, and this value is sent to the algorithm. However, instead of just using a linear relationship to calculate the response, the algorithm now uses an integral to determine the response that should be taken. Once the integral is evaluated, the response is sent and the system adjusts accordingly. Because of the dependence on Ti, it takes longer for the algorithm to determine the proper response. A graphical representation of the I-controller output for a step increase in input at time t0 is shown below in Figure 3. As expected, this graph represents the area under the step input graph.
Figure 3. I-controller output for step input.
Derivative (D) Control
Another type of action used in PID controllers is the derivative control. Unlike P-only and I-only controls, D-control is a form of feed forward control. D-control anticipates the process conditions by analyzing the change in error. It functions to minimize the change of error, thus keeping the system at a consistent setting. The primary benefit of D controllers is to resist change in the system, the most important of these being oscillations. The control output is calculated based on the rate of change of the error with time. The larger the rate of the change in error, the more pronounced the controller response will be.
Unlike proportional and integral controllers, derivative controllers do not guide the system to a steady state. Because of this property, D controllers must be coupled with P, I or PI controllers to properly control the system.
Mathematical Equations
D-control correlates the controller output to the derivative of the error. The derivative of the error is taken with respect to time. It is the change in error associated with change in time. This D-control behavior is mathematically illustrated in Equation 3 (Scrcek, et. al).
(3)
c(t) = controller output
Td = derivative time constant
de = change in error
dt = change in time
Graphical representations of the effects of these variables on the system is shown in PID Tuning via Classical Methods.
Mathematically, derivative control is the opposite of integral control. Although I-only controls exist, D-only controls do not exist. D-controls measure only the change in error. D-controls do not know where the setpoint is, so it is usually used in conjunction with another method of control, such as P-only or a PI combination control. D-control is usually used for processes with rapidly changing process outputs. However, like the I-control, the D control is mathematically more complex than the P-control. Since it will take a computer algorithm longer to calculate a derivative or an integral than to simply linearly relate the input and output variables, adding a D-control slows down the controller's response time. A graphical representation of the D-controller output for a step increase in input at time t0 is shown below in Figure 4. As expected, this graph represents the derivative of the step input graph.
Figure 4. D-controller output for step input.
Controller Effects on a System
The following images are intended to give a visual representation of how P, I, and D controllers will affect a system.
Description
Figure 5. Stable data sample.
Figure 6. Data disturbance.
Figure 7. P-controller effect on data.
Figure 8. I-controller effect on data.
Figure 9. D-controller effect on data.
Continue reading to see the results of combining controllers.
Proportional-Integral (PI) Control
One combination is the PI-control, which lacks the D-control of the PID system. PI control is a form of feedback control. It provides a faster response time than I-only control due to the addition of the proportional action. PI control stops the system from fluctuating, and it is also able to return the system to its set point. Although the response time for PI-control is faster than I-only control, it is still up to 50% slower than P-only control. Therefore, in order to increase response time, PI control is often combined with D-only control.
Mathematical Equations
PI-control correlates the controller output to the error and the integral of the error. This PI-control behavior is mathematically illustrated in Equation 4 (Scrcek, et. al).
(4)
c(t) = controller output
Kc = controller gain
Ti = integral time
e(t) = error
C = initial value of controller
In this equation, the integral time is the time required for the I-only portion of the controller to match the control provided by the P-only part of the controller.
The equation indicates that the PI-controller operates like a simplified PID-controller with a zero derivative term. Alternatively, the PI-controller can also be seen as a combination of the P-only and I-only control equations. The bias term in the P-only control is equal to the integral action of the I-only control. The P-only control is only in action when the system is not at the set point. When the system is at the set point, the error is equal to zero, and the first term drops out of the equation. The system is then being controlled only by the I-only portion of the controller. Should the system deviate from the set point again, P-only control will be enacted. A graphical representation of the PI-controller output for a step increase in input at time t0 is shown below in Figure 5. As expected, this graph resembles the qualitatitive combination of the P-only and I-only graphs.
Figure 10. PI-controller output for step input.
Effects of Kc and Ti
With a PI control system, controller activity (aggressiveness) increases as Kc and Ti decreases, however they can act individually on the aggressiveness of a controller's response. Consider Figure 11 below with the center graph being a linear second order system base case.
Figure 11. Effects of Kc and Ti [2]
The plot depicts how Ti and Kc both affect the performance of a system, whether they are both affecting it or each one is independently doing so. Regardless of integral time, increasing controller gain (moving form bottom to top on the plot) will increase controller activity. Similarly, decreasing integral time (moving right to left on the plot) will increase controller activity independent of controller gain. As expected, increasing Kc and decreasing Ti would compound sensitivity and create the most aggressive controller scenario.
With only two interacting parameters in PI control systems, similar performance plots can still cause confusion. For example, plots A and B from the figure both look very similar despite different parameters being affected in each of them. This could cause further problems and create a wildly aggressive system if the wrong parameter is being corrected. While trial and error may be feasible for a PI system, it becomes cumbersome in PID where a third parameter is introduced and plots become increasingly similar.
Another noteworthy observation is the plot with a normal Kc and double Ti. The plot depicts how the proportional term is practical but the integral is not receiving enough weight initially, causing the slight oscillation before the integral term can finally catch up and help the system towards the set point.
Proportional-Derivative (PD) Control
Another combination of controls is the PD-control, which lacks the I-control of the PID system. PD-control is combination of feedforward and feedback control, because it operates on both the current process conditions and predicted process conditions. In PD-control, the control output is a linear combination of the error signal and its derivative. PD-control contains the proportional control's damping of the fluctuation and the derivative control's prediction of process error.
Mathematical Equations
As mentioned, PD-control correlates the controller output to the error and the derivative of the error. This PD-control behavior is mathematically illustrated in Equation 5 (Scrcek, et. al).
(5)
c(t) = controller output
Kc = proportional gain
e = error
C = initial value of controller
The equation indicates that the PD-controller operates like a simplified PID-controller with a zero integral term. Alternatively, the PD-controller can also be seen as a combination of the P-only and D-only control equations. In this control, the purpose of the D-only control is to predict the error in order to increase stability of the closed loop system. P-D control is not commonly used because of the lack of the integral term. Without the integral term, the error in steady state operation is not minimized. P-D control is usually used in batch pH control loops, where error in steady state operation does not need to be minimized. In this application, the error is related to the actuating signal both through the proportional and derivative term. A graphical representation of the PD-controller output for a step increase in input at time t0 is shown below in Figure 6. Again, this graph is a combination of the P-only and D-only graphs, as expected.
Figure 12. PD-controller output for step input.
Proportional-Integral-Derivative (PID) Control
Proportional-integral-derivative control is a combination of all three types of control methods. PID-control is most commonly used because it combines the advantages of each type of control. This includes a quicker response time because of the P-only control, along with the decreased/zero offset from the combined derivative and integral controllers. This offset was removed by additionally using the I-control. The addition of D-control greatly increases the controller's response when used in combination because it predicts disturbances to the system by measuring the change in error. On the contrary, as mentioned previously, when used individually, it has a slower response time compared to the quicker P-only control. However, although the PID controller seems to be the most adequate controller, it is also the most expensive controller. Therefore, it is not used unless the process requires the accuracy and stability provided by the PID controller.
Mathematical Equations
PID-control correlates the controller output to the error, integral of the error, and derivative of the error. This PID-control behavior is mathematically illustrated in Equation 6 (Scrcek, et. al).
(6)
c(t) = controller output
Kc = controller gain
e(t) = error
Ti = integral time
Td = derivative time constant
C = intitial value of controller
As shown in the above equation, PID control is the combination of all three types of control. In this equation, the gain is multiplied with the integral and derivative terms, along with the proportional term, because in PID combination control, the gain affects the I and D actions as well. Because of the use of derivative control, PID control cannot be used in processes where there is a lot of noise, since the noise would interfere with the predictive, feedforward aspect. However, PID control is used when the process requires no offset and a fast response time. A graphical representation of the PID-controller output for a step increase in input at time t0 is shown below in Figure 7. This graph resembles the qualitative combination of the P-only, I-only, and D-only graphs.
Figure 7. PID-controller output for step input.
In addition to PID-control, the P-, I-, and D- controls can be combined in other ways. These alternative combinations are simplifications of the PID-control.
Note: Order of e(t)
The order of the elements in the e(t) can vary depending on the situation. It could be the fixed element minus the varying element or the other way around. To better illustrate the concept let's go to an example. Let's say you are creating a PID control to control the fluid level in a tank by manipulating the outlet valve. When the fluid level in the tank exceeds your set value, you will want the valve to open up more to allow more flow out of the tank. You are looking for a positive response. Therefore your e(t) should give a positive value when the fluid level is higher than the set. In this case your e(t) will be (V-Vset). The same logic can be used for other systems to determine what the e(t) should be in the PID controls.
Modeling PID Controllers With Euler in Excel
As with many engineering systems, PID controllers can be modeled in Excel via numerical methods such as Euler's Method. First begin with the initial value for a given parameter. Determine the change in that parameter at a certain time-step by summing the three controllers P, I, and D at that step, which are found using the equations listed in the P, I, D, PI, PD, PID Control section above. Take this change, multiply it by the chosen time-step and add that to the previous value of the parameter of interest. For more detailed information see Numerical ODE Solving in Excel. An example of a chemical engineering problem that uses this method can be seen in Example 4 below.
Troubleshooting PID Modeling in Excel
When setting up an Excel spreadsheet to model a PID controller, you may receive an error message saying that you have created a circular reference. Say you are controlling the flow rate of one reactant (B) to a reactor which is dependent upon the concentration of another reactant (A) already inside the reactor. Your PID equations look as follows:
After you have set up your columns for A - Aset, d(A - Aset)/dt, xi, and the cells for your parameters like Kc, taui and taud, you will need to set up your PID column with your PID equation in it. After entering your equation into the first cell of the PID column, you may receive the Circular Reference error message when trying to drag the equation down to the other cells in your column.
There are two things you can do:
- It is likely that you need to start your PID equation in the second or third cell of your PID column. Enter reasonable values into the first couple of cells before you start the PID equation, and you will find that these values shouldn't affect the end result of your controller.
- You can also try decreasing the step size (Δt).
Summary Tables
A summary of the advantages and disadvantages of the three controls is shown below is shown in Table 1.
Table 1. Advantages and disadvantages of controls
A guide for the typical uses of the various controllers is shown below in Table 2.
Table 2. Typical uses of P, I, D, PI, and PID controllers
A summary of definitions of the terms and symbols are shown below in Table 3.
Table 3. Definitions of terms and symbols.
Example 1
Hypothetical Industries has just put you in charge of one of their batch reactors. Your task is to figure out a way to maintain a setpoint level inside of the reactor. Your boss wants to use some type regulator controller, but he is not quite sure which to use. Help your boss find the right type of controller. It is extremely important that the level inside the reactor is at the setpoint. Large fluctuation and error cannot be tolerated.
SOLUTION:
You would want to use a PID controller. Because of the action of P control, the system will respond to a change very quickly. Due to the action of I control, the system is able to be returned to the setpoint value. Finally, because it is so critical for the system to remain at a constant setpoint, D control will measure the change in the error, and help to adjust the system accordingly.
Example 2
You go back to your high school and you notice an oven in your old chemistry class. The oven is used to remove water from solutions. Using your knowledge from ChE 466, you begin to wonder what type of controller the oven uses to maintain its set temperature. You notice some high school students eager to learn, and you decide to share your knowledge with them in hopes of inspiring them to become Chemical Engineers. Explain to them the type of controller that is most likely located within the oven, and how that controller works.
SOLUTION:
Since the oven is only used to remove water from a solution, fluctuation, error, and lag between the set point and the actual temperature are all acceptable. Therefore, the easiest and simplest controller to use would be the On-Off controller.
The On-Off controller turns on the heating mechanism when the temperature in the oven is below the setpoint temperature. If the temperature of the oven increases above the set temperature, the controller will turn the heating mechanism off.
Example 3
Having taken your advice, your boss at Hypothetical Industries decides to install a PID controller to control the level in the batch reactor. When you first start up the reactor, the controller initially received a step input. As the reactor achieves steady state, the level in the reactor tends to fluctuate, sending pulse inputs into the controller. For a pulse input, provide a grahical representation of the PID controller output.
Figure 8. Pulse input.
SOLUTION:
The PID-controller output will be a combination of the P-only, I-only and D-only controller outputs. Analogous to the P-controller output for the step input, the P-controller output for the pulse input will exactly resemble the input.
Figure 9. P-controller output for pulse input.
The I-controller output represents the area under the input graph. Unlike the step input, the area under the pulse input graph dropped back down to zero once the pulse has passed. Therefore, rather than continually increase, the I-controller output graph will level off in the end.
Figure 10. I-controller output for pulse input.
The D-controller output represents the derivative of the input graph. The derivative at the first discontinuity of the graph would be positive infinity. The derivative of the second downward discontinuity is negative infinity.
Figure 11. D-controller output for pulse input.
Combining the qualitative characteristics of all three graphs we can determine the PID-controller output for a pulse input.
Figure 12. PID-controller output for pulse input.
Example 4
Different kinds of disturbances are possible when determining the PID controller robustness. These different disturbances are used to simulate changes that might occur within your system. For a CSTR reactor, you decide to heat up your system to account for the cold outside weather. The disturbance in the input temperature is a ramp disturbance, as shown in figure #. If the controller responds to the input temperature, what will be the PID controller output?
Figure 13. Ramp input.
SOLUTION: Using a controller with a p-only controller only, we will see a proportional change in the controller output corresponding to the input variable change. See figure 14 below
Figure 14. P-controller output for ramp input.
Using an I-only controller, we will see the controller corresponding to the area under the graph, which in this case, seem to increase exponentially with the ramp geometry.
Figure 15. I-controller output for ramp input.
Using a D-only controller, we will see a step response to the ramp disturbance. This is because the D-component corresponds to the derivative, and a ramp input shows a constant slope (positive in this case) which is different than the starting condition slope (zero usually). See figure 16.
Figure 16. D-controller output for ramp input.
Using a PID controller, the three components all come to play in the controller output. As we would expect, the result will be just a simple addition of the three separate component graphs.
Figure 17. D-controller output for ramp input.
Example 5
Following is a P&ID of the process A+B-->C.
Figure 18. P&ID for a reaction process.
What is the PID controller expression on V3 controlling the volume in TK001 to a setpoint of 50 liters? Note: The PID controller uses LC1 to measure the volume.
SOLUTION: The general equation for a PID controller is:
c(t) = controller output
Kc = controller gain
e(t) = error
Ti = integral time
Td = derivative time constant
C = intitial value of controller
Therefore, for this example, the solution is:
Example 6
In this problem, the differential equations describing a particular first-order system with a PID controller will be determined. This is designed to show how well-defined systems can be modeled or explained mathematically. As a supplement to this problem, visit Constructing Block Diagrams. Note that this is an example of solution using integro-differential operators rather than Laplace transforms. Here we have set Kp = 1.
Consider a general first-order process:
τpY'(t) + Y(t) = X(t)
Where Y(t) is the output of the system and X(t) is the input. Add a PID controller to the system and solve for a single, simple differential equation. The operator or equation for a PID controller is below. Assume there is no dead time in the measurement.
Solution: Use Constructing Block Diagrams as a reference when solving this problem.
Equations defining system,
Process: τpY'(t) + Y(t) = X(t)
Controller: X(t) = Gε(t)
Comparator: ε(t) = R(t) − M(t)
Measurement: M(t) = Y(t)
When these equations are combined into one equation, the following equation results. This is achieved by adding the measurement to the comparator to the controller to the process equation.
τpY'(t) + Y(t) = G(R(t) − Y(t))
Substituting the controller operator and then evaluating yields:
Because there is an integral in the differential equation, it is necessary to take the derivative with respect to time.
To put this in standard notation for solving a second order differential equation, the Y(t) need to be on one side, and the R(t) terms need to be on the opposite side. Also, the coefficient of the Y(t) term needs to be one.
The above equation can then be solved by hand or using a program such as Mathematica. If using a computer program, different values for the control parameters Kc, τI, τD can be chosen, and the response to a change in the system can be evaluated graphically.
Multiple Choice Question 1
What type of controller is displayed by the equation below?
a.) Feedforward
b.) PID
c.) Derivative
d.) Proportional Integral
Answer: d
Multiple Choice Question 2
Which type of controller increases the stability of the system by keeping it at a consistent setting?
a.) Derivative
b.) Proportional
c.) On-Off
d.) Integral
Answer: a
Multiple Choice Question 3
Which type of controller increases the speed of response to reach the desired set point the fastest while eliminating offset?
a.) On-Off
b.) Proportional
c.) Integral
d.) Proportional-Integral
Answer: d
Example 4
- Note that the problem and values used in it are fictional!*
A microbiology laboratory discovered a deadly new strain of bacteria, named P. Woolfi, in the city's water supply. In order to sterilize the water, the bacteria has to be heat killed at a temperature of 105 degrees Celsius. However, this is above the boiling point of water at 1 atm and the bacteria is only susceptible to heat when in liquid due to spore formation when in gas or vapor. To accomplish this sterilization it was suggested that an auto-clave be used to keep the water in the liquid state by keeping it at a pressure of 5 atm while heated for 30 seconds. The auto-clave can only handle up to 7 atm of pressure before exploding, so to ensure that the process is running at the desired specifications, a PID Controller Model must be created in Excel. See figure 18 for a visual of the system.
Figure 18.Auto-clave with PID Controls for Temperature and Pressure
Click on this link for the worked out Excel Solution
Explanation:
To simulate the real situation of pressure varying in the system, column B calls an equation to generate a random fluctuation in pressure. Pset is simply the desired specification. Error is the difference between the set pressure and measured signal. du/dt is the sum of the P, I, and D terms. The equations used to calculate each of these can be found in the article, these take into account the error associated with each time-step. dU/dt is the parameter that is varied in order to correct for the difference between the measured pressure and desired pressure.
Sage's Corner
Super PID Brothers
Multiple Choice
Glucose Level
Glucose Level Slides without narration
References
[1] Astrom, Karl J., Hagglund, Tore., "Advanced PID Control", The Instrumentation, Systems and Automation Society. [2] Cooper, Douglas J. "Practical Process Control E-Textbook " http://www.controlguru.com [3] Scrcek, William Y., Mahoney, Donald P., Young, Brent R. "A Real Time Approach to Process Control", 2nd Edition. John Wiley & Sons, Ltd. [4] www.wikipedia.org
출처: <https://controls.engin.umich.edu/wiki/index.php/PIDIntro>
'제어 및 operation' 카테고리의 다른 글
통신 이야기 (0) | 2016.09.22 |
---|---|
PLC 기초 해설 (0) | 2016.09.22 |
PID Controller (0) | 2016.07.13 |
PID control design (0) | 2016.07.13 |
모터의 PID 제어 (0) | 2016.07.13 |
PID Controller
PID controller
From Wikipedia, the free encyclopedia
(Redirected from PID control)
Jump to: navigation, search
A block diagram of a PID controller in a feedback loop
A proportional-integral-derivative controller (PID controller) is a control loop feedback mechanism (controller) widely used in industrial control systems. A PID controller calculates an error value as the difference between a measured process variable and a desired setpoint. The controller attempts to minimize the error by adjusting the process through use of a manipulated variable.
The PID controller algorithm involves three separate constant parameters, and is accordingly sometimes called three-term control: the proportional, the integral and derivative values, denoted P, I, and D. Simply put, these values can be interpreted in terms of time: P depends on the present error, I on the accumulation of past errors, and D is a prediction of future errors, based on current rate of change.[1] The weighted sum of these three actions is used to adjust the process via a control element such as the position of a control valve, a damper, or the power supplied to a heating element.
In the absence of knowledge of the underlying process, a PID controller has historically been considered to be the most useful controller.[2] By tuning the three parameters in the PID controller algorithm, the controller can provide control action designed for specific process requirements. The response of the controller can be described in terms of the responsiveness of the controller to an error, the degree to which the controller overshoots the setpoint, and the degree of system oscillation. Note that the use of the PID algorithm for control does not guarantee optimal control of the system or system stability.
Some applications may require using only one or two actions to provide the appropriate system control. This is achieved by setting the other parameters to zero. A PID controller will be called a PI, PD, P or I controller in the absence of the respective control actions. PI controllers are fairly common, since derivative action is sensitive to measurement noise, whereas the absence of an integral term may prevent the system from reaching its target value due to the control action.
Contents
[hide]
- 1 History and applications
- 2 Control loop basics
- 7 Cascade control
- 9 Pseudocode
- 10 Notes
- 11 See also
- 12 References
History and applications[edit]
PID theory developed by observing the action of helmsmen.
PID controllers date to 1890s governor design.[2][3] PID controllers were subsequently developed in automatic ship steering. One of the earliest examples of a PID-type controller was developed by Elmer Sperry in 1911,[4] while the first published theoretical analysis of a PID controller was by Russian American engineer Nicolas Minorsky, (Minorsky 1922). Minorsky was designing automatic steering systems for the US Navy, and based his analysis on observations of a helmsman, noting the helmsman controlled the ship based not only on the current error, but also on past error as well as the current rate of change;[5] this was then made mathematical by Minorsky.[6] His goal was stability, not general control, which simplified the problem significantly. While proportional control provides stability against small disturbances, it was insufficient for dealing with a steady disturbance, notably a stiff gale (due to droop), which required adding the integral term. Finally, the derivative term was added to improve control.
Trials were carried out on the USS New Mexico, with the controller controlling the angular velocity (not angle) of the rudder. PI control yielded sustained yaw (angular error) of ±2°. Adding the D element yielded a yaw error of ±1/6°, better than most helmsmen could achieve.[7]
The Navy ultimately did not adopt the system, due to resistance by personnel. Similar work was carried out and published by several others in the 1930s.
In the early history of automatic process control the PID controller was implemented as a mechanical device. These mechanical controllers used a lever, spring and a mass and were often energized by compressed air. These pneumatic controllers were once the industry standard.
Electronic analog controllers can be made from a solid-state or tube amplifier, a capacitor and a resistor. Electronic analog PID control loops were often found within more complex electronic systems, for example, the head positioning of a disk drive, the power conditioning of a power supply, or even the movement-detection circuit of a modern seismometer. Nowadays, electronic controllers have largely been replaced by digital controllers implemented with microcontrollers or FPGAs.
Most modern PID controllers in industry are implemented in programmable logic controllers (PLCs) or as a panel-mounted digital controller. Software implementations have the advantages that they are relatively cheap and are flexible with respect to the implementation of the PID algorithm. PID temperature controllers are applied in industrial ovens, plastics injection machinery, hot stamping machines and packing industry.
Variable voltages may be applied by the time proportioning form of pulse-width modulation (PWM)—a cycle time is fixed, and variation is achieved by varying the proportion of the time during this cycle that the controller outputs +1 (or −1) instead of 0. On a digital system the possible proportions are discrete—e.g., increments of 0.1 second within a 2 second cycle time yields 20 possible steps: percentage increments of 5%; so there is a discretization error, but for high enough time resolution this yields satisfactory performance.
Control loop basics[edit]
Further information: Control system
A familiar example of a control loop is the action taken when adjusting hot and cold faucets to fill a container with water at a desired temperature by mixing hot and cold water. The person touches the water in the container as it fills to sense its temperature. Based on this feedback they perform a control action by adjusting the hot and cold faucets until the temperature stabilizes as desired.
The sensed water temperature is the process variable (PV). The desired temperature is called the setpoint (SP). The input to the process (the water valve position), and the output of the PID controller, is called the manipulated variable (MV) or the control variable (CV). The difference between the temperature measurement and the setpoint is the error (e) and quantifies whether the water in the container is too hot or too cold and by how much.
After measuring the temperature (PV), and then calculating the error, the controller decides how to set the tap position (MV). The obvious method is proportional control: the tap position is set in proportion to the current error. A more complex control may include derivative action. This considers the rate of temperature change also: adding extra hot water if the temperature is falling, and less on rising temperature. Finally integral action uses the average temperature in the past to detect whether the temperature of the container is settling out too low or too high and set the tap proportional to the past errors. An alternative formulation of integral action is to change the current tap position in steps proportional to the current error. Over time the steps add up (which is the discrete time equivalent to integration) the past errors.
Making a change that is too large when the error is small will lead to overshoot. If the controller were to repeatedly make changes that were too large and repeatedly overshoot the target, the output would oscillate around the setpoint in either a constant, growing, or decaying sinusoid. If the amplitude of the oscillations increase with time, the system is unstable. If they decrease, the system is stable. If the oscillations remain at a constant magnitude, the system is marginally stable.
In the interest of achieving a gradual convergence to the desired temperature (SP), the controller may damp the anticipated future oscillations by tempering its adjustments, or reducing the loop gain.
If a controller starts from a stable state with zero error (PV = SP), then further changes by the controller will be in response to changes in other measured or unmeasured inputs to the process that affect the process, and hence the PV. Variables that affect the process other than the MV are known as disturbances. Generally controllers are used to reject disturbances and to implement setpoint changes. Changes in feedwater temperature constitute a disturbance to the faucet temperature control process.
In theory, a controller can be used to control any process which has a measurable output (PV), a known ideal value for that output (SP) and an input to the process (MV) that will affect the relevant PV. Controllers are used in industry to regulate temperature, pressure, force, feed,[8] flow rate, chemical composition, weight, position, speed and practically every other variable for which a measurement exists.
PID controller theory[edit]
This section describes the parallel or non-interacting form of the PID controller. For other forms please see the section Alternative nomenclature and PID forms.
The PID control scheme is named after its three correcting terms, whose sum constitutes the manipulated variable (MV). The proportional, integral, and derivative terms are summed to calculate the output of the PID controller. Defining
as the controller output, the final form of the PID algorithm is:
where
: Proportional gain, a tuning parameter
: Integral gain, a tuning parameter
: Derivative gain, a tuning parameter
: Error
: Time or instantaneous time (the present)
: Variable of integration; takes on values from time 0 to the present
.
Proportional term[edit]
Plot of PV vs time, for three values of Kp (Ki and Kd held constant)
The proportional term produces an output value that is proportional to the current error value. The proportional response can be adjusted by multiplying the error by a constant Kp, called the proportional gain constant.
The proportional term is given by:
A high proportional gain results in a large change in the output for a given change in the error. If the proportional gain is too high, the system can become unstable (see the section on loop tuning). In contrast, a small gain results in a small output response to a large input error, and a less responsive or less sensitive controller. If the proportional gain is too low, the control action may be too small when responding to system disturbances. Tuning theory and industrial practice indicate that the proportional term should contribute the bulk of the output change.[citation needed]
Droop[edit]
Because a non-zero error is required to drive it, a proportional controller generally operates with a steady-state error, referred to as droop or offset.[a] Droop is proportional to the process gain and inversely proportional to proportional gain. Droop may be mitigated by adding a compensating bias term to the setpoint or output, or corrected dynamically by adding an integral term.
Integral term[edit]
Plot of PV vs time, for three values of Ki (Kp and Kd held constant)
The contribution from the integral term is proportional to both the magnitude of the error and the duration of the error. The integral in a PID controller is the sum of the instantaneous error over time and gives the accumulated offset that should have been corrected previously. The accumulated error is then multiplied by the integral gain (
) and added to the controller output.
The integral term is given by:
The integral term accelerates the movement of the process towards setpoint and eliminates the residual steady-state error that occurs with a pure proportional controller. However, since the integral term responds to accumulated errors from the past, it can cause the present value to overshoot the setpoint value (see the section on loop tuning).
Derivative term[edit]
Plot of PV vs time, for three values of Kd (Kp and Ki held constant)
The derivative of the process error is calculated by determining the slope of the error over time and multiplying this rate of change by the derivative gain Kd. The magnitude of the contribution of the derivative term to the overall control action is termed the derivative gain, Kd.
The derivative term is given by:
Derivative action predicts system behavior and thus improves settling time and stability of the system.[9][10] An ideal derivative is not causal, so that implementations of PID controllers include an additional low pass filtering for the derivative term, to limit the high frequency gain and noise.[11] Derivative action is seldom used in practice though - by one estimate in only 20% of deployed controllers[11] - because of its variable impact on system stability in real-world applications.[11]
Loop tuning[edit]
Tuning a control loop is the adjustment of its control parameters (proportional band/gain, integral gain/reset, derivative gain/rate) to the optimum values for the desired control response. Stability (no unbounded oscillation) is a basic requirement, but beyond that, different systems have different behavior, different applications have different requirements, and requirements may conflict with one another.
PID tuning is a difficult problem, even though there are only three parameters and in principle is simple to describe, because it must satisfy complex criteria within the limitations of PID control. There are accordingly various methods for loop tuning, and more sophisticated techniques are the subject of patents; this section describes some traditional manual methods for loop tuning.
Designing and tuning a PID controller appears to be conceptually intuitive, but can be hard in practice, if multiple (and often conflicting) objectives such as short transient and high stability are to be achieved. PID controllers often provide acceptable control using default tunings, but performance can generally be improved by careful tuning, and performance may be unacceptable with poor tuning. Usually, initial designs need to be adjusted repeatedly through computer simulations until the closed-loop system performs or compromises as desired.
Some processes have a degree of nonlinearity and so parameters that work well at full-load conditions don't work when the process is starting up from no-load; this can be corrected by gain scheduling (using different parameters in different operating regions).
Stability[edit]
If the PID controller parameters (the gains of the proportional, integral and derivative terms) are chosen incorrectly, the controlled process input can be unstable, i.e., its output diverges, with or without oscillation, and is limited only by saturation or mechanical breakage. Instability is caused by excess gain, particularly in the presence of significant lag.
Generally, stabilization of response is required and the process must not oscillate for any combination of process conditions and setpoints, though sometimes marginal stability (bounded oscillation) is acceptable or desired.[citation needed]
Optimum behavior[edit]
The optimum behavior on a process change or setpoint change varies depending on the application.
Two basic requirements are regulation (disturbance rejection – staying at a given setpoint) and command tracking (implementing setpoint changes) – these refer to how well the controlled variable tracks the desired value. Specific criteria for command tracking include rise time and settling time. Some processes must not allow an overshoot of the process variable beyond the setpoint if, for example, this would be unsafe. Other processes must minimize the energy expended in reaching a new setpoint.
Overview of methods[edit]
There are several methods for tuning a PID loop. The most effective methods generally involve the development of some form of process model, then choosing P, I, and D based on the dynamic model parameters. Manual tuning methods can be relatively inefficient, particularly if the loops have response times on the order of minutes or longer.[citation needed]
The choice of method will depend largely on whether or not the loop can be taken "offline" for tuning, and on the response time of the system. If the system can be taken offline, the best tuning method often involves subjecting the system to a step change in input, measuring the output as a function of time, and using this response to determine the control parameters.[citation needed]
Method |
Advantages |
Disadvantages |
Manual tuning |
No math required; online. |
Requires experienced personnel.[citation needed] |
Proven method; online. |
Process upset, some trial-and-error, very aggressive tuning.[citation needed] | |
Software tools |
Consistent tuning; online or offline - can employ computer-automated control system design (CAutoD) techniques; may include valve and sensor analysis; allows simulation before downloading; can support non-steady-state (NSS) tuning. |
Some cost or training involved.[13] |
Cohen–Coon |
Good process models. |
Some math; offline; only good for first-order processes.[citation needed] |
Choosing a tuning method
Manual tuning[edit]
If the system must remain online, one tuning method is to first set
and
values to zero. Increase the
until the output of the loop oscillates, then the
should be set to approximately half of that value for a "quarter amplitude decay" type response. Then increase
until any offset is corrected in sufficient time for the process. However, too much
will cause instability. Finally, increase
, if required, until the loop is acceptably quick to reach its reference after a load disturbance. However, too much
will cause excessive response and overshoot. A fast PID loop tuning usually overshoots slightly to reach the setpoint more quickly; however, some systems cannot accept overshoot, in which case an over-damped closed-loop system is required, which will require a
setting significantly less than half that of the
setting that was causing oscillation.[citation needed]
Parameter |
Rise time |
Overshoot |
Settling time |
Steady-state error |
|
Decrease |
Increase |
Small change |
Decrease |
Degrade | |
Decrease |
Increase |
Increase |
Eliminate |
Degrade | |
Minor change |
Decrease |
Decrease |
No effect in theory |
Improve if
small |
Effects of increasing a parameter independently[14]
Ziegler–Nichols method[edit]
For more details on this topic, see Ziegler–Nichols method.
Another heuristic tuning method is formally known as the Ziegler–Nichols method, introduced by John G. Ziegler and Nathaniel B. Nichols in the 1940s. As in the method above, the
and
gains are first set to zero. The proportional gain is increased until it reaches the ultimate gain,
, at which the output of the loop starts to oscillate.
and the oscillation period
are used to set the gains as shown:
Control Type |
|||
P |
- |
- | |
PI |
- | ||
PID |
Ziegler–Nichols method
These gains apply to the ideal, parallel form of the PID controller. When applied to the standard PID form, the integral and derivative time parameters
and
are only dependent on the oscillation period
. Please see the section "Alternative nomenclature and PID forms".
PID tuning software[edit]
Most modern industrial facilities no longer tune loops using the manual calculation methods shown above. Instead, PID tuning and loop optimization software are used to ensure consistent results. These software packages will gather the data, develop process models, and suggest optimal tuning. Some software packages can even develop tuning by gathering data from reference changes.
Mathematical PID loop tuning induces an impulse in the system, and then uses the controlled system's frequency response to design the PID loop values. In loops with response times of several minutes, mathematical loop tuning is recommended, because trial and error can take days just to find a stable set of loop values. Optimal values are harder to find. Some digital loop controllers offer a self-tuning feature in which very small setpoint changes are sent to the process, allowing the controller itself to calculate optimal tuning values.
Other formulas are available to tune the loop according to different performance criteria. Many patented formulas are now embedded within PID tuning software and hardware modules.[15]
Advances in automated PID Loop Tuning software also deliver algorithms for tuning PID Loops in a dynamic or Non-Steady State (NSS) scenario. The software will model the dynamics of a process, through a disturbance, and calculate PID control parameters in response.
Limitations of PID control[edit]
While PID controllers are applicable to many control problems, and often perform satisfactorily without any improvements or only coarse tuning, they can perform poorly in some applications, and do not in general provide optimal control. The fundamental difficulty with PID control is that it is a feedback system, with constant parameters, and no direct knowledge of the process, and thus overall performance is reactive and a compromise. While PID control is the best controller in an observer without a model of the process,[2] better performance can be obtained by overtly modeling the actor of the process without resorting to an observer.
PID controllers, when used alone, can give poor performance when the PID loop gains must be reduced so that the control system does not overshoot, oscillate or hunt about the control setpoint value. They also have difficulties in the presence of non-linearities, may trade-off regulation versus response time, do not react to changing process behavior (say, the process changes after it has warmed up), and have lag in responding to large disturbances.
The most significant improvement is to incorporate feed-forward control with knowledge about the system, and using the PID only to control error. Alternatively, PIDs can be modified in more minor ways, such as by changing the parameters (either gain scheduling in different use cases or adaptively modifying them based on performance), improving measurement (higher sampling rate, precision, and accuracy, and low-pass filtering if necessary), or cascading multiple PID controllers.
Linearity[edit]
Another problem faced with PID controllers is that they are linear, and in particular symmetric. Thus, performance of PID controllers in non-linear systems (such as HVAC systems) is variable. For example, in temperature control, a common use case is active heating (via a heating element) but passive cooling (heating off, but no cooling), so overshoot can only be corrected slowly – it cannot be forced downward. In this case the PID should be tuned to be overdamped, to prevent or reduce overshoot, though this reduces performance (it increases settling time).
Noise in derivative[edit]
A problem with the derivative term is that it amplifies higher frequency measurement or process noise that can cause large amounts of change in the output. It does this so much, that a physical controller cannot have a true derivative term, but only an approximation with limited bandwidth. It is often helpful to filter the measurements with a low-pass filter in order to remove higher-frequency noise components. As low-pass filtering and derivative control can cancel each other out, the amount of filtering is limited. So low noise instrumentation can be important. A nonlinear median filter may be used, which improves the filtering efficiency and practical performance.[16] In some cases, the differential band can be turned off with little loss of control. This is equivalent to using the PID controller as a PI controller.
Modifications to the PID algorithm[edit]
The basic PID algorithm presents some challenges in control applications that have been addressed by minor modifications to the PID form.
Integral windup[edit]
For more details on this topic, see Integral windup.
One common problem resulting from the ideal PID implementations is integral windup. Following a large change in setpoint the integral term can accumulate an error larger than the maximal value for the regulation variable (windup), thus the system overshoots and continues to increase until this accumulated error is unwound. This problem can be addressed by:
- Disabling the integration until the PV has entered the controllable region
- Preventing the integral term from accumulating above or below pre-determined bounds
- Back-calculating the integral term to constrain the regulator output within feasible bounds.[17]
Overshooting from known disturbances[edit]
For example, a PID loop is used to control the temperature of an electric resistance furnace where the system has stabilized. Now when the door is opened and something cold is put into the furnace the temperature drops below the setpoint. The integral function of the controller tends to compensate this error by introducing another error in the positive direction. This overshoot can be avoided by freezing of the integral function after the opening of the door for the time the control loop typically needs to reheat the furnace.
PI controller[edit]
Basic block of a PI controller
A PI Controller (proportional-integral controller) is a special case of the PID controller in which the derivative (D) of the error is not used.
The controller output is given by
where
is the error or deviation of actual measured value (PV) from the setpoint (SP).
.
A PI controller can be modelled easily in software such as Simulink or Xcos using a "flow chart" box involving Laplace operators:
where
= proportional gain
= integral gain
Setting a value for
is often a trade off between decreasing overshoot and increasing settling time.
The lack of derivative action may make the system more steady in the steady state in the case of noisy data. This is because derivative action is more sensitive to higher-frequency terms in the inputs.
Without derivative action, a PI-controlled system is less responsive to real (non-noise) and relatively fast alterations in state and so the system will be slower to reach setpoint and slower to respond to perturbations than a well-tuned PID system may be.
Deadband[edit]
Many PID loops control a mechanical device (for example, a valve). Mechanical maintenance can be a major cost and wear leads to control degradation in the form of either stiction or a deadband in the mechanical response to an input signal. The rate of mechanical wear is mainly a function of how often a device is activated to make a change. Where wear is a significant concern, the PID loop may have an output deadband to reduce the frequency of activation of the output (valve). This is accomplished by modifying the controller to hold its output steady if the change would be small (within the defined deadband range). The calculated output must leave the deadband before the actual output will change.
Set Point step change[edit]
The proportional and derivative terms can produce excessive movement in the output when a system is subjected to an instantaneous step increase in the error, such as a large setpoint change. In the case of the derivative term, this is due to taking the derivative of the error, which is very large in the case of an instantaneous step change. As a result, some PID algorithms incorporate some of the following modifications:
Set point ramping
In this modification, the setpoint is gradually moved from its old value to a newly specified value using a linear or first order differential ramp function. This avoids the discontinuity present in a simple step change.
Derivative of the process variable
In this case the PID controller measures the derivative of the measured process variable (PV), rather than the derivative of the error. This quantity is always continuous (i.e., never has a step change as a result of changed setpoint). This modification is a simple case of set point weighting.
Set point weighting
Set point weighting adds adjustable factors (usually between 0 and 1) to the setpoint in the error in the proportional and derivative element of the controller. The error in the integral term must be the true control error to avoid steady-state control errors. These two extra parameters do not affect the response to load disturbances and measurement noise and can be tuned to improve the controller's set point response.
Feed-forward[edit]
The control system performance can be improved by combining the feedback (or closed-loop) control of a PID controller with feed-forward (or open-loop) control. Knowledge about the system (such as the desired acceleration and inertia) can be fed forward and combined with the PID output to improve the overall system performance. The feed-forward value alone can often provide the major portion of the controller output. The PID controller primarily has to compensate whatever difference or error remains between the setpoint (SP) and the system response to the open loop control. Since the feed-forward output is not affected by the process feedback, it can never cause the control system to oscillate, thus improving the system response without affecting stability. Feed forward can be based on the setpoint and on extra measured disturbances. Set point weighting is a simple form of feed forward.
For example, in most motion control systems, in order to accelerate a mechanical load under control, more force is required from the actuator. If a velocity loop PID controller is being used to control the speed of the load and command the force being applied by the actuator, then it is beneficial to take the desired instantaneous acceleration, scale that value appropriately and add it to the output of the PID velocity loop controller. This means that whenever the load is being accelerated or decelerated, a proportional amount of force is commanded from the actuator regardless of the feedback value. The PID loop in this situation uses the feedback information to change the combined output to reduce the remaining difference between the process setpoint and the feedback value. Working together, the combined open-loop feed-forward controller and closed-loop PID controller can provide a more responsive control system.
Bumpless Operation[edit]
PID controllers are often implemented with a "bumpless" initialization feature that recalculates an appropriate integral accumulator term to maintain a consistent process output through parameter changes,[18] for example by storing the integral of the integral gain times the error rather than storing the integral of the error and postmultiplying by the integral gain.
Other improvements[edit]
In addition to feed-forward, PID controllers are often enhanced through methods such as PID gain scheduling (changing parameters in different operating conditions), fuzzy logic or computational verb logic. [19] [20] Further practical application issues can arise from instrumentation connected to the controller. A high enough sampling rate, measurement precision, and measurement accuracy are required to achieve adequate control performance. Another new method for improvement of PID controller is to increase the degree of freedom by using fractional order. The order of the integrator and differentiator add increased flexibility to the controller.[clarification needed]
Cascade control[edit]
One distinctive advantage of PID controllers is that two PID controllers can be used together to yield better dynamic performance. This is called cascaded PID control. In cascade control there are two PIDs arranged with one PID controlling the setpoint of another. A PID controller acts as outer loop controller, which controls the primary physical parameter, such as fluid level or velocity. The other controller acts as inner loop controller, which reads the output of outer loop controller as setpoint, usually controlling a more rapid changing parameter, flowrate or acceleration. It can be mathematically proven[citation needed] that the working frequency of the controller is increased and the time constant of the object is reduced by using cascaded PID controllers.[vague].
For example, a temperature-controlled circulating bath has two PID controllers in cascade, each with its own thermocouple temperature sensor. The outer controller controls the temperature of the water using a thermocouple located far from the heater where it accurately reads the temperature of the bulk of the water. The error term of this PID controller is the difference between the desired bath temperature and measured temperature. Instead of controlling the heater directly, the outer PID controller sets a heater temperature goal for the inner PID controller. The inner PID controller controls the temperature of the heater using a thermocouple attached to the heater. The inner controller's error term is the difference between this heater temperature setpoint and the measured temperature of the heater. Its output controls the actual heater to stay near this setpoint.
The proportional, integral and differential terms of the two controllers will be very different. The outer PID controller has a long time constant – all the water in the tank needs to heat up or cool down. The inner loop responds much more quickly. Each controller can be tuned to match the physics of the system it controls – heat transfer and thermal mass of the whole tank or of just the heater – giving better total response.
Alternative nomenclature and PID forms[edit]
This section does not cite any references or sources. Please help improve this section by adding citations to reliable sources. Unsourced material may be challenged and removed. (December 2012) |
Ideal versus standard PID form[edit]
The form of the PID controller most often encountered in industry, and the one most relevant to tuning algorithms is the standard form. In this form the
gain is applied to the
, and
terms, yielding:
where
is the integral time
is the derivative time
In this standard form, the parameters have a clear physical meaning. In particular, the inner summation produces a new single error value which is compensated for future and past errors. The addition of the proportional and derivative components effectively predicts the error value at
seconds (or samples) in the future, assuming that the loop control remains unchanged. The integral component adjusts the error value to compensate for the sum of all past errors, with the intention of completely eliminating them in
seconds (or samples). The resulting compensated single error value is scaled by the single gain
.
In the ideal parallel form, shown in the controller theory section
the gain parameters are related to the parameters of the standard form through
and
. This parallel form, where the parameters are treated as simple gains, is the most general and flexible form. However, it is also the form where the parameters have the least physical interpretation and is generally reserved for theoretical treatment of the PID controller. The standard form, despite being slightly more complex mathematically, is more common in industry.
Reciprocal gain[edit]
In many cases, the manipulated variable output by the PID controller is a dimensionless fraction between 0 and 100% of some maximum possible value, and the translation into real units (such as pumping rate or watts of heater power) is outside the PID controller. The process variable, however, is in dimensioned units such as temperature. It is common in this case to express the gain
not as "output per degree", but rather in the form of a temperature
which is "degrees per full output". This is the range over which the output changes from 0 to 1 (0% to 100%).
Basing derivative action on PV[edit]
In most commercial control systems, derivative action is based on PV rather than error. This is because the digitized version of the algorithm produces a large unwanted spike when the SP is changed. If the SP is constant then changes in PV will be the same as changes in error. Therefore this modification makes no difference to the way the controller responds to process disturbances.
Basing proportional action on PV[edit]
Most commercial control systems offer the option of also basing the proportional action on PV. This means that only the integral action responds to changes in SP. The modification to the algorithm does not affect the way the controller responds to process disturbances. The change to proportional action on PV eliminates the instant and possibly very large change in output on a fast change in SP. Depending on the process and tuning this may be beneficial to the response to a SP step.
King[21] describes an effective chart-based method.
Laplace form of the PID controller[edit]
Sometimes it is useful to write the PID regulator in Laplace transform form:
Having the PID controller written in Laplace form and having the transfer function of the controlled system makes it easy to determine the closed-loop transfer function of the system.
PID Pole Zero Cancellation[edit]
The PID equation can be written in this form:
When this form is used it is easy to determine the closed loop transfer function.
If
Then
While this appears to be very useful to remove unstable poles, it is in reality not the case. The closed loop transfer function from disturbance to output still contains the unstable poles.
Series/interacting form[edit]
Another representation of the PID controller is the series, or interacting form
where the parameters are related to the parameters of the standard form through
,
, and
with
.
This form essentially consists of a PD and PI controller in series, and it made early (analog) controllers easier to build. When the controllers later became digital, many kept using the interacting form.
Discrete implementation[edit]
The analysis for designing a digital implementation of a PID controller in a microcontroller (MCU) or FPGA device requires the standard form of the PID controller to be discretized.[22] Approximations for first-order derivatives are made by backward finite differences. The integral term is discretised, with a sampling time
,as follows,
The derivative term is approximated as,
Thus, a velocity algorithm for implementation of the discretized PID controller in a MCU is obtained by differentiating
, using the numerical definitions of the first and second derivative and solving for
and finally obtaining:
s.t.
Pseudocode[edit]
Here is a simple software loop that implements a PID algorithm:[23]
previous_error = 0
integral = 0
start:
error = setpoint - measured_value
integral = integral + error*dt
derivative = (error - previous_error)/dt
output = Kp*error + Ki*integral + Kd*derivative
previous_error = error
wait(dt)
goto start
In this example, two variables that will be maintained within the loop are initialized to zero, then the loop begins. The current error is calculated by subtracting the measured_value (the process variable or PV) from the current setpoint (SP). Then, integral and derivative values are calculated and these and the error are combined with three preset gain terms – the proportional gain, the integral gain and the derivative gain – to derive an output value. In the real world, this is D to A converted and passed into the process under control as the manipulated variable (or MV). The current error is stored elsewhere for re-use in the next differentiation, the program then waits until dt seconds have passed since start, and the loop begins again, reading in new values for the PV and the setpoint and calculating a new value for the error.[23]
Notes[edit]
- Jump up ^ The only exception is where the target value is the same as the value obtained when the proportional gain is equal to zero.
- Jump up ^ A common assumption often made for Proportional-Integral-Derivative (PID) control design, as done by Ziegler and Nichols, is to take the integral time constant to be four times the derivative time constant. Although this choice is reasonable, selecting the integral time constant to have this value may have had something to do with the fact that, for the ideal case with a derivative term with no filter, the PID transfer function consists of two real and equal zeros in the numerator.[12]
See also[edit]
'제어 및 operation' 카테고리의 다른 글
PLC 기초 해설 (0) | 2016.09.22 |
---|---|
PID Intro (0) | 2016.07.13 |
PID control design (0) | 2016.07.13 |
모터의 PID 제어 (0) | 2016.07.13 |
PID 제어기 (0) | 2016.07.13 |
PID control design
DC Motor Speed: PID Controller Design
Key MATLAB commands used in this tutorial are: tf , step , feedback
Contents
- Proportional control
- PID control
-
From the main problem, the dynamic equations in the Laplace domain and the open-loop transfer function of the DC Motor are the following.
(1)
(2)
(3)
The structure of the control system has the form shown in the figure below.
For the original problem setup and the derivation of the above equations, please refer to the DC Motor Speed: System Modeling page.
For a 1-rad/sec step reference, the design criteria are the following.
- Settling time less than 2 seconds
- Overshoot less than 5%
-
Steady-state error less than 1%
Now let's design a controller using the methods introduced in the Introduction: PID Controller Design page. Create a new m-file and type in the following commands.
J = 0.01;
b = 0.1;
K = 0.01;
R = 1;
L = 0.5;
s = tf('s');
P_motor = K/((J*s+b)*(L*s+R)+K^2);Recall that the transfer function for a PID controller is:
(4)
Proportional control
Let's first try employing a proportional controller with a gain of 100, that is, C(s) = 100. To determine the closed-loop transfer function, we use the feedback command. Add the following code to the end of your m-file.
Kp = 100;
C = pid(Kp);
sys_cl = feedback(C*P_motor,1);Now let's examine the closed-loop step response. Add the following commands to the end of your m-file and run it in the command window. You should generate the plot shown below. You can view some of the system's characteristics by right-clicking on the figure and choosing Characteristics from the resulting menu. In the figure below, annotations have specifically been added for Settling Time, Peak Response, and Steady State.
t = 0:0.01:5;
step(sys_cl,t)
grid
title('Step Response with Proportional Control')From the plot above we see that both the steady-state error and the overshoot are too large. Recall from the Introduction: PID Controller Design page that increasing the proportional gain Kp will reduce the steady-state error. However, also recall that increasing Kp often results in increased overshoot, therefore, it appears that not all of the design requirements can be met with a simple proportional controller.
This fact can be verified by experimenting with different values of Kp. Specifically, you can employ the SISO Design Tool by entering the command sisotool(P_motor) then opening a closed-loop step response plot from the Analysis Plots tab of the Control and Estimation Tools Manager window. With the Real-Time Update box checked, you can then vary the control gain in the Compensator Editor tab and see the resulting effect on the closed-loop step response. A little experimentation verifies what we anticipated, a proportional controller is insufficient for meeting the given design requirements; derivative and/or integral terms must be added to the controller.
PID control
Recall from the Introduction: PID Controller Design page adding an integral term will eliminate the steady-state error to a step reference and a derivative term will often reduce the overshoot. Let's try a PID controller with small Ki and Kd. Modify your m-file so that the lines defining your control are as follows. Running this new m-file gives you the plot shown below.
Kp = 75;
Ki = 1;
Kd = 1;
C = pid(Kp,Ki,Kd);
sys_cl = feedback(C*P_motor,1);
step(sys_cl,[0:1:200])
title('PID Control with Small Ki and Small Kd')
Inspection of the above indicates that the steady-state error does indeed go to zero for a step input. However, the time it takes to reach steady-state is far larger than the required settling time of 2 seconds.
Tuning the gains
In this case, the long tail on the step response graph is due to the fact that the integral gain is small and, therefore, it takes a long time for the integral action to build up and eliminate the steady-state error. This process can be sped up by increasing the value of Ki. Go back to your m-file and change Ki to 200 as in the following. Rerun the file and you should get the plot shown below. Again the annotations are added by right-clicking on the figure and choosing Characteristics from the resulting menu.
Kp = 100;
Ki = 200;
Kd = 1;
C = pid(Kp,Ki,Kd);
sys_cl = feedback(C*P_motor,1);
step(sys_cl, 0:0.01:4)
grid
title('PID Control with Large Ki and Small Kd')As expected, the steady-state error is now eliminated much more quickly than before. However, the large Ki has greatly increased the overshoot. Let's increase Kd in an attempt to reduce the overshoot. Go back to the m-file and change Kd to 10 as shown in the following. Rerun your m-file and the plot shown below should be generated.
Kp = 100;
Ki = 200;
Kd = 10;
C = pid(Kp,Ki,Kd);
sys_cl = feedback(C*P_motor,1);
step(sys_cl, 0:0.01:4)
grid
title('PID Control with Large Ki and Large Kd')As we had hoped, the increased Kd reduced the resulting overshoot. Now we know that if we use a PID controller with
Kp = 100, Ki = 200, and Kd = 10,
all of our design requirements will be satisfied.
출처: <http://ctms.engin.umich.edu/CTMS/index.php?example=MotorSpeed§ion=ControlPID>
'제어 및 operation' 카테고리의 다른 글
PID Intro (0) | 2016.07.13 |
---|---|
PID Controller (0) | 2016.07.13 |
모터의 PID 제어 (0) | 2016.07.13 |
PID 제어기 (0) | 2016.07.13 |
Noise (0) | 2016.07.13 |
모터의 PID 제어
모터의 PID 제어법
1. PID 제어란?
자동제어 방식 가운데서 가장 흔히 이용되는 제어방식으로 PID 제어라는 방식이 있다.
이 PID란,
P: Proportinal(비례)
I: Integral(적분)
D: Differential(미분)
의 3가지 조합으로 제어하는 것으로 유연한 제어가 가능해진다.
2. 단순 On/Off 제어
단순한 On/Off 제어의 경우에는 제어 조작량은 0%와 100% 사이를 왕래하므로 조작량의 변화가 너무 크고, 실제 목표값에 대해 지나치게 반복하기 때문에, 목표값의 부근에서 凸凹를 반복하는 제어로 되고 만다.
이 모양을 그림으로 나타내면 아랫 그림과 같이 된다.
3. 비례 제어
이에 대해 조작량을 목표값과 현재 위치와의 차에 비례한 크기가 되도록 하며, 서서히 조절하는 제어 방법이 비례 제어라고 하는 방식이다.
이렇게 하면 목표값에 접근하면 미묘한 제어를 가할 수 있기 때문에 미세하게 목표값에 가까이 할 수 있다.
이 모양은 아랫 그림과 같이 나타낼 수 있다.
4. PI 제어
비례 제어로 잘 제어할 수 있을 것으로 생각하겠지만, 실제로는 제어량이 목표값에 접근하면 문제가 발생한다.
그것은 조작량이 너무 작아지고, 그 이상 미세하게 제어할 수 없는 상태가 발생한다. 결과는 목표값에 아주 가까운 제어량의 상태에서 안정한 상태로 되고 만다.
이렇게 되면 목표값에 가까워지지만, 아무리 시간이 지나도 제어량과 완전히 일치하지 않는 상태로 되고 만다.
이 미소한 오차를 "잔류편차"라고 한다. 이 잔류편차를 없애기 위해 사용되는 것이 적분 제어이다.
즉, 미소한 잔류편차를 시간적으로 누적하여, 어떤 크기로 된 곳에서 조작량을 증가하여 편차를 없애는 식으로 동작시킨다.
이와 같이, 비례 동작에 적분 동작을 추가한 제어를 "PI 제어"라 부른다.
이것을 그림으로 나타내면 아랫 그림과 같이 된다.
5. 미분 제어와 PID 제어
PI 제어로 실제 목표값에 가깝게 하는 제어는 완벽하게 할 수 있다. 그러나 또 하나 개선의 여지가 있다.
그것은 제어 응답의 속도이다. PI 제어에서는 확실히 목표값으로 제어할 수 있지만, 일정한 시간(시정수)이 필요하다.
이때 정수가 크면 외란이 있을 때의 응답 성능이 나빠진다.
즉, 외란에 대하여 신속하게 반응할 수 없고, 즉시 원래의 목표값으로는 돌아갈 수 없다는 것이다.
그래서, 필요하게 된 것이 미분 동작이다.
이것은 급격히 일어나는 외란에 대해 편차를 보고, 전회 편차와의 차가 큰 경우에는 조작량을 많이 하여 기민하게 반응하도록 한다.
이 전회와의 편차에 대한 변화차를 보는 것이 "미분"에 상당한다.
이 미분동작을 추가한 PID 제어의 경우, 제어 특성은 아랫 그림과 같이 된다.
이것으로 알 수 있듯이 처음에는 상당히 over drive하는 듯이 제어하여, 신속히 목표값이 되도록 적극적으로 제어해 간다.
6. 컴퓨터에 의한 PID 제어 알고리즘
원래 PID 제어는 연속한 아날로그량을 제어하는 것이 기본으로 되어 있다. 그러나, 컴퓨터의 프로그램으로 PID 제어를 실현하려고 하는 경우에는 연속적인 양을 취급할 수 없다. 왜냐하면, 컴퓨터 데이터의 입출력은 일정시간 간격으로밖에 할 수 없기 때문이다.
게다가 미적분 연산을 착실히 하고 있는 것에서는 연산에 요하는 능력으로 인해 고성능의 컴퓨터가 필요하게 되고 만다.
그래서 생각된 것이 샘플링 방식(이산값)에 적합한 PID 연산 방식이다.
우선, 샘플링 방식의 PID 제어의 기본식은 다음과 같이 표현된다.
조작량=Kp×편차+Ki×편차의 누적값+Kd×전회 편차와의 차
(비례항) (적분항) (미분항)
기호로 나타내면
MVn=MVn-1+ΔMVn
ΔMVn=Kp(en-en-1)+Ki en+Kd((en-en-1)-(en-1-en-2))
MVn, MVn-1: 금회, 전회 조작량
ΔMVn: 금회 조작량 미분
en, en-1, en-2: 금회, 전회, 전전회의 편차
이것을 프로그램으로 실현하기 위해서는 이번과 전회의 편차값만 측정할 수 있으면 조작량을 구할 수 있다.
7. 파라미터를 구하는 방법
PID 제어 방식에 있어서의 과제는 각 항에 붙는 정수, Kp, Ki, Kd를 정하는 방법이다.
이것의 최적값을 구하는 방법은 몇 가지 있지만, 어느 것이나 난해하며, 소형의 마이크로컴퓨터로 실현하기 위해서는 번거로운 것이다(tuning이라 부른다).
그래서, 이 파라미터는 cut and try로 실제 제어한 결과에서 최적한 값을 구하고, 그 값을 설정하도록 한다.
참고로 튜닝의 수법을 소개하면 스텝 응답법과 한계 감도법이 유명한 수법이다.
또, 프로세스 제어 분야에서는 이 튜닝을 자동적으로 실행하는 Auto tuning 기능을 갖는 자동제어 유닛도 있다. 이것에는 제어 결과를 학습하고, 그 결과로부터 항상 최적한 파라미터값을 구하여 다음 제어 사이클에 반영하는 기능도 실장되어 있다.
여기서 스텝 응답법에 있어서 파라미터를 구하는 방법을 소개한다.
우선, 제어계의 입력에 스텝 신호를 가하고, 그 출력 결과가 아랫 그림이라고 하자(파라미터는 적당히 설정해 둔다).
윗 그림과 같이 상승의 곡선에 접선을 긋고, 그것과 축과의 교점, 정상값의 63%에 해당하는 값으로 된 곳의 2점에서,
L: 낭비시간 T: 시정수 K: 정상값의 3가지 값을 구한다.
이 값으로부터, 각 파라미터는 아래 표와 같이 구할 수 있다.
제어 동작 종별 |
Kp의 값 |
Ki의 값 |
Kd의 값 |
비례 제어 |
0.3~0.7T/KL |
0 |
0 |
PI 제어 |
0.35~0.6T/KL |
0.3~0.6/KL |
0 |
PID 제어 |
0.6~0.95T/KL |
0.6~0.7/KL |
0.3~0.45T/K |
이 파라미터에 범위가 있지만, 이 크기에 의한 차이는 특성의 차이로 나타나며, 아랫 그림과 같이, 파라미터가 많은 경우에는 미분, 적분 효과가 빨리 효력이 나타나므로 아랫 그림의 적색선의 특성과 같이 overshoot이 크게 눈에 띈다. 파라미터가 작은 쪽의 경우는 하측 황색선의 특성과 같이 된다.
'제어 및 operation' 카테고리의 다른 글
PID Controller (0) | 2016.07.13 |
---|---|
PID control design (0) | 2016.07.13 |
PID 제어기 (0) | 2016.07.13 |
Noise (0) | 2016.07.13 |
PID control (0) | 2016.07.13 |
PID 제어기
PID 제어기의 일반적인 구조
비례-적분-미분 제어기(PID 제어기)는 실제 응용분야에서 가장 많이 사용되는 대표적인 형태의 제어기법이다. PID 제어기는 기본적으로 피드백(feedback)제어기의 형태를 가지고 있으며, 제어하고자 하는 대상의 출력값(output)을 측정하여 이를 원하고자 하는 참조값(reference value) 혹은 설정값(setpoint)과 비교하여 오차(error)를 계산하고, 이 오차값을 이용하여 제어에 필요한 제어값을 계산하는 구조로 되어 있다.
표준적인 형태의 PID 제어기는 아래의 식과 같이 세개의 항을 더하여 제어값(MV:manipulated variable)을 계산하도록 구성이 되어 있다.
이 항들은 각각 오차값, 오차값의 적분(integral), 오차값의 미분(derivative)에 비례하기 때문에 비례-적분-미분 제어기 (Proportional–Integral–Derivative controller)라는 명칭을 가진다. 이 세개의 항들의 직관적인 의미는 다음과 같다.
- 비례항 : 현재 상태에서의 오차값의 크기에 비례한 제어작용을 한다.
- 적분항 : 정상상태(steady-state) 오차를 없애는 작용을 한다.
-
미분항 : 출력값의 급격한 변화에 제동을 걸어 오버슛(overshoot)을 줄이고 안정성(stability)을 향상시킨다.
PID 제어기는 위와 같은 표준식의 형태로 사용하기도 하지만, 경우에 따라서는 약간 변형된 형태로 사용하는 경우도 많다. 예를 들어, 비례항만을 가지거나, 혹은 비례-적분, 비례-미분항만을 가진 제어기의 형태로 단순화하여 사용하기도 하는데, 이때는 각각 P, PI, PD 제어기라 불린다.
한편, 계산된 제어값이 실제 구동기(actuator)가 작용할 수 있는 값의 한계보다 커서 구동기의 포화(saturation)가 발생하게 되는 경우, 오차의 적분값이 큰 값으로 누적되게 되어서, 정작 출력값이 설정값에 가까워지게 되었을 때, 제어값이 작아져야 함에도 불구하고 계속 큰 값을 출력하게 되어 시스템이 설정값에 도달하는 데 오랜 시간이 걸리게 되는 경우가 있는데, 이를 적분기의 와인드업이라고 한다. 이를 방지하기 위해서는 적절한 안티 와인드업(Anti-windup) 기법을 이용하여 PID 제어기를 보완해야 한다.
위의 식에서 제어 파라메터
를 이득값 혹은 게인(gain)이라고 하고, 적절한 이득값을 수학적 혹은 실험적/경험적 방법을 통해 계산하는 과정을 튜닝(tuning)이라고 한다. PID 제어기의 튜닝에는 여러 가지 방법들이 있는데, 그중 가장 널리 알려진 것으로는 지글러-니콜스 방법이 있다.
원본 위치 <http://ko.wikipedia.org/wiki/PID_%EC%A0%9C%EC%96%B4>
'제어 및 operation' 카테고리의 다른 글
PID control design (0) | 2016.07.13 |
---|---|
모터의 PID 제어 (0) | 2016.07.13 |
Noise (0) | 2016.07.13 |
PID control (0) | 2016.07.13 |
전달함수 (0) | 2016.06.27 |
Noise
노이즈(Noise)의 영향 |
|
내 용 : |
온도계측System의 전체에 미치는 광범위한 Noise의 의미로서는 계측행위 자체를 포함하여 측정대상에 대한 열적인 외란, 요인등 대하여서도 생각을 해볼 필요가 있다. 여기에서는 온도Sensor의 출력에서부터 후단의 신호에 대하여 살펴본다. 배선이나 수신계기에 대하여 전기적인 Noise에 한하여 분류, 요인 및 대처방법의 예를 열거하고 설명한다. 특히 전자기적 Noise에 대하여서는 현재의 전자기기 증가에 비례하여 사회 적으로도 문제화가 되고 있지만 Noise문제는 발생측과 수신측의 상대적 관계가 있고 [ 전자적 양립성 ] E M C ( Electro Magnetic Compatibility ) 라고 하는 개념이 중요하다. * E M I ( Electro Magnetic Interference ) : 전자방해 (電子妨害) * Immunity : Noise내성(耐性) |
Noise의 분류 : |
1. Noise의 분류 ( 실 System에서 문제가 되는 중요점만 열거 한다 )
|
|
* 회로에 가해지는 방법에 따라 Normal Mode / Common Mode의 2종류가 있다. * 근접한 신호선 사이에 전자적(電磁的), 정전적(靜電的) 결합에 의한 영향을 누화(漏話)(Cross-Talk)라고 한다. |
발생 요인 : |
|
대책 방법 : |
기본적으로 아래의 3가지의 Approach가있다. (1) Noise의 발생원을 찾아 재거한다. (2) Noise의 발생원에서 Noise를 받는 쪽으로의 결합을 차단한다. (3) Noise를 수신측에 영향을 받기 어렵게 한다. 어떻게 하든 Noise문제가 발생을 하게 되면 그에 대한 대책은 비용이나 많은 시간이 걸리기 때문에 먼저 대책이 더더욱 중요하다. 수신계기에 있어서는 취급설명서등에 기제되어 있는 설치조건을 꼭 준수 할 필요성이 있다.
|
'제어 및 operation' 카테고리의 다른 글
모터의 PID 제어 (0) | 2016.07.13 |
---|---|
PID 제어기 (0) | 2016.07.13 |
PID control (0) | 2016.07.13 |
전달함수 (0) | 2016.06.27 |
오차 (0) | 2016.06.27 |
PID control
Tuning a PID (Three-Mode) Controller
Controller Operation
There are three common types of Temperature/process controllers: ON/OFF, PROPORTIONAL, and PID (PROPORTIONAL INTEGRAL DERIVATIVE).
On/Off CONTROL
An on-off controller is the simplest form of temperature control device. The output from the device is either on or off, with no middle state. An on/off controller will switch the output only when the temperature crosses the setpoint. For heating control, the output is on when the temperature is below the setpoint, and off above the setpoint.
Although capable of more complex control functions, the NEWPORT microprocessor based MICRO-INFINITY ® AUTOTUNE PID 1/16 DIN Controller can be operated as a simple On/Off Controller. The NEWPORT INFINITY ® series and INFINITY C ® series of highly accurate microprocessor based digital panel meters can all function as simple On/Off controllers.
With simple On/Off control, since the temperature crosses the setpoint to change the output state, the process temperature will be cycling continually, going from below setpoint to above, and back below. In cases where this cycling occurs rapidly, and to prevent damage to contactors and valves, an on-off differential, or "hysteresis," is added to the controller operations. This differential requires that the temperature exceed setpoint by a certain amount before the output will turn off or on again. On-off differential prevents the output from "chattering" or fast, continual switching if the temperature cycling above and below setpoint occur very rapidly.
"On-Off" is the most commonly used form of control, and for most applications it is perfectly adequate. It's used where a precise control is not necessary, in systems which cannot handle the energy being turned on and off frequently, and where the mass of the system is so great that temperatures change extremely slowly.
Backup alarms are typically controlled with "On-Off" relays. One special type of on-off control used for alarm is a limit controller. This controller uses a latching relay, which must be manually reset, and is used to shut down a process when a certain temperature is reached.
Proportional Control
Proportional control is designed to eliminate the cycling above and below the setpoints associated with On-Off control. A proportional controller decreases the average power being supplied to a heater for example, as the temperature approaches setpoint. This has the effect of slowing down the heater, so that it will not overshoot the setpoint, but will approach the setpoint and maintain a stable temperature.
This proportioning action can be accomplished by different methods. One method is with an analog control output such as a 4-20 mA output controlling a valve or motor for example. With this system, with a 4 mA signal from the controller, the valve would be fully closed, with 12 mA open halfway, and with 20 mA fully open.
Another method is "time proportioning" i.e. turning the output on and off for short intervals to vary the ratio of "on" time to "off" time to control the temperature or process.
With the analog output option, the NEWPORT INFINITY ® series and INFINITY C ® series of 1/8 DIN digital panel meters can function as proportional controllers. In addition, NEWPORT offers models of "INFINITY C" for thermocouple and RTD inputs featuring Time-Proportioning Control with its built in mechanical relays.
With proportional control, the proportioning action occurs within a "proportional band" around the setpoint temperature. Outside this band, the controller functions as an on-off unit, with the output either fully on (below the band) or fully off (above the band). However, within the band, the output is turned on and off in the ratio of the measurement difference from the setpoint. At the setpoint (the midpoint of the proportional band), the output on:off ratio is 1:1; that is, the on-time and off-time are equal. If the temperature is further from the setpoint, the on- and off-times vary in proportion to the temperature difference. If the temperature is below setpoint, the output will be on longer; if the temperature is too high, the output will be off longer.
The proportional band is usually expressed as a percent of full scale, or degrees. It may also be referred to as gain, which is the reciprocal of the band. Note, that in time proportioning control, full power is applied to the heater, but cycled on and off, so the average time is varied. In most units, the cycle time and/or proportional band are adjustable, so that the controller may be better matched to a particular process.
One of the advantages of proportional control is the simplicity of operation. However, the proportional controller will generally require the operator to manually "tune" the process, i.e. to make a small adjustment (manual reset) to bring the temperature to setpoint on initial startup, or if the process conditions change significantly.
Systems that are subject to wide temperature cycling need proportional control. Depending on the precision required, some processes may require full "PID" control.
PID (Proportional Integral Derivative)
Processes with long time lags and large maximum rate of rise (e.g., a heat exchanger), require wide proportional bands to eliminate oscillation. The wide band can result in large offsets with changes in the load. To eliminate these offsets, automatic reset (integral) can be used. Derivative (rate) action can be used on processes with long time delays, to speed recovery after a process disturbance.
The most sophisticated form of discrete control available today combines PROPORTIONAL with INTEGRAL and DERIVATIVE or PID .
The NEWPORT MICRO-INFINITY® is a full function "Autotune" (or self-tuning) PID controller which combines proportional control with two additional adjustments, which help the unit automatically compensate to changes in the system. These adjustments, integral and derivative, are expressed in time-based units; they are also referred to by their reciprocals, RESET and RATE, respectively.
The proportional, integral and derivative terms must be individually adjusted or "tuned" to a particular system.
It provides the most accurate and stable control of the three controller types, and is best used in systems which have a relatively small mass, those which react quickly to changes in energy added to the process. It is recommended in systems where the load changes often, and the controller is expected to compensate automatically due to frequent changes in setpoint, the amount of energy available, or the mass to be controlled.
The "autotune" or self-tuning function means that the MICRO-INFINITY will automatically calculate the proper proportional band, rate and reset values for precise control.
Temperature Control
Tuning a PID (Three-Mode) Controller
Tuning a temperature controller involves setting the proportional, integral, and derivative values to get the best possible control for a particular process. If the controller does not include an autotune algorithm or the autotune algorithm does not provide adequate control for the particular application, the unit must then be tuned using a trial and error method.
The following is a tuning procedure for the NEWPORT® MICRO-INFINITY ® controller. It can be applied to other controllers as well. There are other tuning procedures which can also be used, but they all use a similar trial and error method. Note that if the controller uses a mechanical relay (rather than a solid state relay) a longer cycle time (10 seconds) is recommended when starting out.
The following definitions may be needed:
- Cycle time — Also known as duty cycle; the total length of time for the controller to complete one on/off cycle. Example: with a 20 second cycle time, an on time of 10 seconds and an off time of 10 seconds represents a 50 percent power output. The controller will cycle on and off while within the proportional band.
- Proportional band — A temperature band expressed in degrees (if the input is temperature), or counts (if the input is process) from the set point in which the controllers' proportioning action takes place. The wider the proportional band the greater the area around the setpoint in which the proportional action takes place. It is sometimes referred to as gain, which is the reciprocal of proportional band.
- Integral, also known as reset, is a function which adjusts the proportional bandwidth with respect to the setpoint, to compensate for offset (droop) from setpoint, that is, it adjusts the controlled temperature to setpoint after the system stabilizes.
-
Derivative, also known as rate, senses the rate of rise or fall of system temperature and automatically adjusts the proportional band to minimize overshoot or undershoot.
A PID (three-mode) controller is capable of exceptional control stability when properly tuned and used. The operator can achieve the fastest response time and smallest overshoot by following these instructions carefully. The information for tuning this three mode controller may be different from other controller tuning procedures. Normally an AUTO PID tuning feature will eliminate the necessity to use this manual tuning procedure for the primary output, however, adjustments to the AUTO PID values may be made if desired.
After the controller is installed and wired:
1. Apply power to the controller.
2. Disable the control outputs. (Push enter twice)
3. Program the controller for the correct input type (See Quick Start Manual).
4. Enter desired value for setpoint 1
5. For time proportional relay output, set the cycle time to 10 seconds or greater.
- Press MENU until OUT1 is displayed.
- Press ENTER to access control output 1 submenu.
- Press MENU until cycle time is displayed.
- Press ENTER to access cycle time setting.
- Use MAX and MIN to set new cycle time value.
-
Press ENTER when finished.
6. Set prop band in degrees to 5% of setpoint 1. (If setpoint 1 = 100, enter 0005. Prop band = 95 to 110). Note: Micro-Infinity takes degrees ( if input is temperature) / counts (if input is process) as Proportional Band value.
- If ID is disabled: - Press MENU 1 time from run mode to get to setpoint 1; confirm SP1 LED is flashing. - Use MAX and MIN to set new setpoint value.
- If ID is enabled: - Press MENU until Set Point is displayed. - Press ENTER to access setpoint 1 setting. - Use MAX and MIN to set new setpoint value.
-
Press ENTER to stored setting when finished.
7. Set reset and rate to 0.
- Press MENU until OUT1 is displayed.
- Press ENTER to access control output 1 submenu.
- Press MENU until autopid is displayed.
- Press ENTER to access autopid setting.
- Press MAX to disable autopid; press ENTER when done.
- Press MENU until Reset Setup is displayed.
- Press ENTER to access Reset setting.
- Use MAX and MIN to set Reset to 0; press ENTER to store the new setting.
- Display advances to Rate Setup.
- Press ENTER to access Rate setting.
- Use MAX and MIN to set Rate to 0; press ENTER to store the new setting.
-
Press MIN 2 times to return to run-mode. Should the unit reset, press ENTER twice to put it into stand-by mode.
NOTE: On units with dual three-mode outputs, the primary and secondary proportional parameter is independently set and may be tuned separately. The procedure used in this section is for a HEATING primary output. A similar procedure may be used for a primary COOLING output or a secondary COOLING output.
A. TUNING OUTPUTS FOR HEATING CONTROL
- Enable the OUTPUT (Press Enter) and start the process.
- The process should be run at a setpoint that will allow the temperature to stabilize with heat input required.
- With RATE and RESET turned OFF, the temperature will stabilize with a steady state deviation, or droop, between the setpoint and the actual temperature. Carefully note whether or not there are regular cycles or oscillations in this temperature by observing the measurement on the display. (An oscillation may be as long as 30 minutes). 3. The tuning procedure is easier to follow if you use a recorder to monitor the process temperature.
- If there are no regular oscillations in the temperature, divide the PB by 2 (see Figure 1). Allow the process to stabilize and check for temperature oscillations. If there are still no oscillations, divide the PB by 2 again. Repeat until cycles or oscillations are obtained. Proceed to Step 5.
- If oscillations are observed immediately, multiply the PB by 2. Observe the resulting temperature for several minutes. If the oscillations continue, increase the PB by factors of 2 until the oscillations stop.
- The PB is now very near its critical setting. Carefully increase or decrease the PB setting until cycles or oscillations just appear in the temperature recording.
- If no oscillations occur in the process temperature even at the minimum PB setting skip Steps 6 through 15 below and proceed to paragraph B.
- Read the steady-state deviation, or droop, between setpoint and actual temperature with the "critical" PB setting you have achieved. (Because the temperature is cycling a bit, use the average temperature.)
-
Measure the oscillation time, in minutes, between neighboring peaks or valleys (see Figure 2). This is most easily accomplished with a chart recorder, but a measurement can be read at one minute intervals to obtain the timing.
- Now, increase the PB setting until the temperature deviation, or droop, increases 65%. The desired final temperature deviation can be calculated by multiplying the initial temperature deviation achieved with the CRITICAL PB setting by 1.65 (see Figure 3). Try several trial-and-error settings of the PB control until the desired final temperature deviation is achieved.
- You have now completed all the necessary measurements to obtain optimum performance from the Controller. Only two more adjustments are required — RATE and RESET.
- Using the oscillation time measured in Step 7, calculate the value for RESET in repeats per minutes as follows:
RESET = (5/8 ) x To
Where To = Oscillation Time in Seconds. Enter the value for RESET in OUT 1 (follow the same procedure as outlined in preparation section, step 7 to set RESET). - Again using the oscillation time measured in Step 7, calculate the value for RATE in minutes as follows:
RATE = To 10
Where T = Oscillation Time in Seconds. Enter this value for RATE in OUT 1 (follow the same procedure as outline in preparation section, step 7 to set RATE). - If overshoot occurred, it can be reduced by increasing the proportional band and the RESET time. When changes are made in the RESET value, a corresponding change should also be made in the RATE adjustment so that the RATE value is equal to:
RATE = (4/25) x RESET - Several setpoint changes and consequent Prop Band, RESET and RATE time adjustments may be required to obtain the proper balance between "RESPONSE TIME" to a system upset and "SETTLING TIME". In general, fast response is accompanied by larger overshoot and consequently shorter time for the process to "SETTLE OUT". Conversely, if the response is slower, the process tends to slide into the final value with little or no overshoot. The requirements of the system dictate which action is desired.
- When satisfactory tuning has been achieved, the cycle time should be increased to save contactor life (applies to units with time proportioning outputs only. Increase the cycle time as much as possible without causing oscillations in the measurement due to load cycling.
- Proceed to Section C.
B. TUNING PROCEDURE WHEN NO OSCILLATIONS ARE OBSERVED
- Measure the steady-state deviation, or droop, between setpoint and actual temperature with minimum PB setting.
- Increase the PB setting until the temperature deviation (droop) increases 65%.
- Set the RESET in OUT1 to a low value (50 secs). Set the RATE to zero (0 secs). At this point, the measurement should stabilize at the setpoint temperature due to reset action.
- Since we were not able to determine a critical oscillation time, the optimum settings of the reset and rate adjustments must be determined by trial and error. After the temperature has stabilized at setpoint, increase the setpoint temperature setting by 10 degrees. Observe the overshoot associated with the rise in actual temperature. Then return the setpoint setting to its original value and again observe the overshoot associated with the actual temperature change.
-
Excessive overshoot implies that the Prop Band and/or RESET are set too low, and/or RATE value is set too high. Overdamped response (no overshoot) implies that the Prop Band and/or RESET is set too high, and/or RATE value is set too low. Refer to Figure 4. Where improved performance is required, change one tuning parameter at a time and observe its effect on performance when the setpoint is changed. Make incremental changes in the parameters until the performance is optimized. Figure 4 Setting RESET and/or RATE PV
- When satisfactory tuning has been achieved, the cycle time should be increased to save contactor life (applies to units with time proportioning outputs only.). Increase the cycle time as much as possible without causing oscillations in the measurement due to load cycling.
C. TUNING THE PRIMARY OUTPUT FOR COOLING CONTROL
The same procedure is used as defined for heating. The process should be run at a setpoint that requires cooling control before the temperature will stabilize.
D. SIMPLIFIED TUNING PROCEDURE FOR PID CONTROLLERS
The following procedure is a graphical technique of analyzing a process response curve to a step input. It is much easier with a strip chart recorder reading the process variable (PV).
- Starting from a cold start (PV at ambient), apply full power to the process without the controller in the loop, i.e., open loop. Record this starting time.
- After some delay (for heat to reach the sensor), the PV will start to rise. After more of a delay, the PV will reach a maximum rate of change (slope). Record the time that this maximum slope occurs, and the PV at which it occurs. Record the maximum slope in degrees per minute. Turn off system power.
- Draw a line from the point of maximum slope back to the ambient temperature axis to obtain the lumped system time delay Td (see Figure 5) . The time delay may also be obtained by the equation: Td = time to max. slope – (PV at max. slope – Ambient)/max. slope
- Apply the following equations to yield the PID parameters: Pr. Band = Td x max. slope Reset = Td/0.4 secs. Rate = 0.4 x Td minutes
- Restart the system and bring the process to setpoint with the controller in the loop and observe response. If the response has too much overshoot, or is oscillating, then the PID parameters can be changed (slightly, one at a time, and observing process response) in the following directions: 5. Refer to figure 4, vary the proportional band, the Reset value, and the Rate value to achieve best performance.
Example: The chart recording in Figure 5 was obtained by applying full power to an oven. The chart scales are 10°F/cm, and 5 min/cm. The controller range is -200 - 900°F, or a span of 1100°F. Maximum slope = 18°F/5 minutes = 3.6°F/minutes. Time delay = Td = approximately 7 minutes.
Proportional Band = 7 minutes x 3.6°F / minutes = 25.2°F.
Note: Prop Band in Micro-Infinity is set in degrees/ counts. Reset = 7/.04 minutes = 17.5 min. or 1050 secs. Note: Reset in Micro-Infinity is specified in seconds Rate = 0.4 x 7 minutes = 2.8 min. or 168 secs.
Set Prop Band to: 025.0; Set Reset to: 1050 Set Rate to: 168 Follow step 6 and 7 of the preparation section to set new values for Prop Band, Reset, and Rate.
원본 위치 <http://www.newportus.com/products/techncal/techncal.htm>
'제어 및 operation' 카테고리의 다른 글
PID 제어기 (0) | 2016.07.13 |
---|---|
Noise (0) | 2016.07.13 |
전달함수 (0) | 2016.06.27 |
오차 (0) | 2016.06.27 |
PID control (0) | 2016.06.27 |
전달함수
라플라스 변환의 의미는 대충 주파수 도메인에서의 계산이라고도 하고, 미적분의 선형계산으로 보기도 하고 그렇다. 주파수에서의 해석이 되는 이유가 코사인과 사인이 서로 미적분의 관계에 얽여 있어서이다. 하나를 사인으로 놓으면 이걸 미분하면 코사인되고 그런 관계라서 미적분식을 주파수가 있는 사인으로 보고 이걸 또 코사인과 사인의 조합으로 보고 그런듯. |
출처: <http://blog.naver.com/PostView.nhn?blogId=redpkzo&logNo=220574751812&redirect=Dlog>
'제어 및 operation' 카테고리의 다른 글
Noise (0) | 2016.07.13 |
---|---|
PID control (0) | 2016.07.13 |
오차 (0) | 2016.06.27 |
PID control (0) | 2016.06.27 |
PID (0) | 2016.06.27 |
오차
오차론의 중요성
1. 오차의 종류와 정의
과학에서 오차는 반드시 발생한다. 따라서 오차를 최대한 줄이려면 측정을 정확하게 하거나 측정 횟수를 매우 크게 해야 한다. 물리량을 측정 할 때는 측정기구가 필요하다. 측정자가 측정 기구를 이용하여 어떤 물리량을 잰다고 하자. 세심한 주의를 기울여 측정자의 과실이 없도록 측정하더라도 측정결과는 참값에 가까울 뿐 참값은 아니다. 다시 말하면 참값이 t 인 양을 측정하여 z라는 측정치를 얻었다면 일반적으로 t와 z은 일치하지 않는데, 이 때 측정값-참값이 바로 오차이다. (오차 = 측정값 - 참값) 참값은 정확히 알 수 없는 양이므로 오차도 정확히 알 수는 없고 단지 추측할 수 있는 수치일 뿐이다. 오차는 우리에게 여러 가지를 알려준다. 그중 하나로 오차를 통해 우리가 한 실험이 잘 된 것인지 잘 안된 것인지 판단할 수 있다. 예를 들어 보자. 만약 휴대폰의 무게를 철수와 영희가 측정했다고 해보자. 철수는 '5.5kg이상 6.5kg이하' 라고 측정하였고, 영희는 '4.95kg이상 5.15kg이하'라고 측정하였다. 이 측정은 둘다 잘못한 것이다. 둘의 오차범위가 일치하지 않기 때문이다.
오차에는 그림에서 보듯이 여러 가지 종류가 있다. 이제 각 오차의 특징을 살펴보자.
먼저 계통오차는 측정계기의 미비한 점에 기인되는 오차로서 그 크기와 부호를 추정할 수 있고 보정할 수 있는 오차이다. 이런 계통오차는 실험자가 주의를 하면 제거할 수 있는 오차이다. 두 번째로 우발오차는 한 가지 실험측정을 반복할 때 측정값들의 변동으로 인한 오차를 말하며 계통오차와 달리 제거할 수 없고 보정할 수도 없는 것이다. 하지만 측정의 회수를 될 수 있는 대로 많이 하여 오차의 분포를 살펴 가장 확실성 있는 값, 즉 최확치를 추정할 수 있는 것이다. 일반적으로 계통오차가 없을 때는 측정결과가 정확하다고 말하고, 우발오차가 작을 때는 정밀하다고 말한다.
2.유효숫자
오차를 얘기할 때 빼놓을 수 없는 것들 중 하나가 바로 유효숫자이다. 유효숫자란 수의 정확도를 얘기할 수 있는 것으로, 유효숫자가 많을수록 더욱 정확도가 높아진다. 예를 하나 들어보자. 만약 철수가 연필의 길이를 6cm라고 측정했다고 해보자. 그럼 이 물체 길이의 유효 숫자는 1개가 되고, 참값의 범위는 5.5cm<참값<6.5cm가된다. 이제 영희는 6.0cm라고 측정했다고 해보자. 그럼 이 물체 길이의 유효 숫자는 2개가 되고, 참값의 범위는 5.95cm<참값<6.05cm가 되어 더욱 정확도가 높아지게 된다. 이 때 규칙은 이렇다.
가장 작은 눈금의 1/10(또는 0.1)을 읽는다.
읽는 값의 오차(판독오차)를 의미하는데 측정기에 표시된 최소눈금의 1/10을 의미한다.
만약 확신이 서지 않으면 최소눈금의 1/5을 읽어도 좋다.
이제 유효 숫자를 썼을 때 장점과 단점을 알아보자.
장점 |
단점 |
불확실성의 존재를 쉽게 알려준다. |
불확실성을 어림셈만을 준다. |
곱셈과 나눗셈을 통해 생기는 불확실성을 있는 그대로 평가하기 쉬운 기초를 마련해 준다. |
데이터가 결합될 때 불확실성의 축적에 관한 관계를 생략한다. |
|
곱셈에서조차도 유효숫자의 보통 규칙들은 불확실성을 잘못 지시할 수 있다.
|
위에서 보듯이 유효숫자는 측정하는데 있어 없어서는 안되는 정밀한 측정을 위하여 꼭 필요한 도구이다.
3.대푯값
측정을 여러 번 되풀이하면 여러 가지 다른 값을 얻게 되는데, 이 때 많은 측정값으로부터 하나의 대푯값을 결정하는 데는 몇 가지 방법이 있을 수 있다. 첫 번째로 중앙값(Median)을 들 수 있다. 중앙값이란 측정값을 모두 나열했을 때, 중앙에 위치하는 측정값을 말하고, 보통 Me로 나타낸다. 두 번째로 최빈값(Mode) 이 있다. 최빈값은 측정값의 빈도가 가장 많이 나타나는 측정치를 말하며, 보통 Mo로 표시한다. 셋째로 산술평균(Arithmetical Mean)이 있다. 산술평균이란 만약 측정값들이 x1 x2 x3 x4 … , xN 일때 [ S*xi ]/N으로 정의되는 값이다. 네 번째로 가중평균(Weight Mean)이 있다. 가중평균은 위의 세값에 비해 들어본 적이 적을 것이다. 가중평균이란 측정값이 경우에 따라서는 같은 측정값이 여러 번 반복되어 나타날 수 있는데, 이 때에는 빈도를 가중치로 택하여 평균값을 계산한다. 측정값들이 x1, x2, x3, … 고 빈도가 각각 f1, f2, f3 … 이라면 평균값은 아래와 같이 계산할 수 있다.
4.편차
먼저 상대오차라는 것을 알아보자. 상대오차는 오차의 절댓값을 참값으로 나눈 것이다. 큰 값과 작은 값이 같은 오차로 측정되었을 때 큰 쪽이 상대적으로 높은 정밀도를 가진다. 이와 같은 측정의 정밀도를 나타내기 위해서는 상대오차로 표시하는 것이 편리하다.
이제 편차를 알아보자. 측정을 할 때 참값을 알 수 없는 경우가 대부분이므로 평균값을 많이 쓴다. 따라서 편차란 측정값-평균값으로 정의된다. 이제 편차의 종류와 계산법을 찾아보자.
(1)평균편차
평균편차란 통계에서 자료의 평균과 각 변량 편차의 절댓값을 평균한 값으로, 정량적인 성질에 관한 집단의 불균일성을 나타내는 특성 값 중 하나이다.
(2)표준편차와 정밀도
측정값의 표준편차는 측정기구의 정밀도와 직접 관계가 있는 것으로 다음과 같다.
그러나 참값을 모르므로 오차를 계산할 수가 없다. 따라서 측정값으로부터 직접 표준편차를 구할 수 없으므로 오차와 편차 사이의 관계식을 이용해야한다. 이 때 관계식은 다음과 같다
N번 측정에 의한 표준편차의 최적어림은 위의 식에 제곱근을 한 것이다. 이것은 N번 측정할 때 임의의 한 측정값의 감도로 표준편차 또는 측정기구의 정밀도라고 한다.
◉여기서 궁금한 점이 있다. 왜 N으로 나누지 않고 N-1로 나누는 것일까? 그 이유는 통계학에서는 어떤 대푯값을 구할 때 그 불편성을 고려하는데, 이 때 불편성이란 표본통계량의 기대값이 모집단의 통계량과 일치하는 성질을 말한다. 자료수 그대로 N으로 나누어주게 되면 표본표준편차의 기대값이 모집단의 표준편차와 달라지게 된다. 그래서 자료의 수에서 1을 뺀 N-1로 나누어주는데 이렇게 하게 되면 표본표준편차의 기대값이 표준모집단의 표준편차와 같아지게 된다.
수식의 증명은 다음을 참고하면 된다.
표준오차
우리는 여러 번 측정한 값으로부터 하나의 대푯값을 세울 때 단일량의 경우 평균값을 최확치로 한다. 그러나 그 평균값이 얼마나 신뢰할 수 있는 정확한 값인가 어떻게 알 수 있을까? 우선 평균값의 표준편차 또는 표준오차의 정의로부터는 어려운 것인데, 우선 현 단계에서는 표준오차의 최적어림으로 다음과 같이 제시된 조정된 오차(sa)로 구할 수 있다는 것이다.
보통 일반통계에서 " 평균값 ± 조정된 표준오차 "로 써 놓은 것의 의미는 참값이 으로부터
사이에 존재할 확률이 68.3%라는 뜻이지만 물리학 실험에서는 다음과 같은 확률오차의 표현을 하는 것이 보통이다.
5.확률오차
확률오차란 어떤 값 보다 큰 오차와 작은 오차가 일어나는 확률이 같을 때 이 값을 확률오차(sp)라 정의하며 측정값의 신뢰도를 표시하는데 흔히 물리학 실험에서 쓴다. 이것은
이 되는 sp의 값인데 +sp와 -sp에서 y축, 즉 f(e)에 평행한 직선을 그으면 오차곡선과 x축 사이의 면적은 이등분되고 확률오차는 결과적으로 다음과 같이 된다.
6.오차의 전파
직육면체의 가로, 세로 및 높이를 각각 열 번씩 측정하여 그 부피를 구하는 실험을 생각해 보자. 이들 데이터를 이용하면 1,000개의 부피에 관한 데이터를 얻을 수 있고 이로부터 평균값과 표준편차를 구할 수 있다. 그러나 보다 합리적인 방법은 가로, 세로, 높이에 대한 각각의 평균값들을 먼저 구하고 이 평균값들을 곱하여 부피를 구하는 것이다.
이 경우에 문제점은 부피의 오차를 추정하는 것이다. 한 가지 분명한 점은 각 변의 길이의 오차 때문에 부피의 오차가 생긴다는 것이다. 따라서, 실제 측정상의 개별적 오차가 계산하고자 하는 물리량에 어느 정도 전파되는가를 알 필요가 있다.
구체적으로 어떤 물리량 z가 다른 물리량 x, y, … 의 z = f ( x, y, … ) 의 관계로 주어졌다고 하자, 그리고 x, y, … 의 측정으로부터
의 평균값과 σx ,~ σy , …의 표준편차들을 얻었다고 하자. 그러면 z의 평균값은
로 주어지며 z의 표준편차는 다음과 같다.
위의 식을 오차의 전파공식이라고 한다. 실제로 다음과 같은 경우들은 간단한 실험에서 자주 나타나므로 익숙해 두는 것이 좋다.
측정오차가 작을수록 더욱 정확한 값이라는 것은 분명하다. 그러나 제한된 시간에 주어진 측정 도구로 최대한의 좋은 결과를 얻으려면 결과적인 최종오차
가 최소가 되도록 x , y 등의 오차들을 상대적으로 최적화 되도록 실험을 계획하는 것이 중요하다. 유효숫자를 다룰 때 숫자의 가감승제에서 이러한 오차전파의 공식이 반영되어 있음을 알 수 있다. 그리고 공식 (4)와 (5)에서 보듯이 멱함수의 경우에는 지수가 클수록 전파되는 오차량도 커지는 것을 알 수 있으므로 특히 정밀하게 측정해야한다.
참조 : 포항공대 게시판 - http://sol.postech.ac.kr/Edulab/gen-phy/exp1/erroran.html
<실험 보고서>
▶버니어 캘리퍼스로 정육면체의 밀도구하기
정육면체의 질량 데이터(단위 kg)
회수 |
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
질량 |
10.5 |
10.4 |
10.3 |
10.2 |
10.2 |
10.7 |
10.5 |
10.1 |
10.4 |
10.3 |
10.4 |
가로의 길이 데이터(단위 cm)
회수 |
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
길이 |
5.31 |
5.24 |
5.33 |
5.27 |
5.28 |
5.30 |
5.31 |
5.25 |
5.26 |
5.26 |
5.28 |
표준편차 : 0.00899
세로의 길이 데이터(단위 cm)
회수 |
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
길이 |
5.322 |
5.265 |
5.352 |
5.273 |
5.288 |
5.301 |
5.298 |
5.256 |
5.268 |
5.311 |
5.293 |
표준편차 : 0.00890
높이의 길이 데이터(단위 cm)
회수 |
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
길이 |
5.31 |
5.26 |
5.31 |
5.29 |
5.27 |
5.30 |
5.31 |
5.25 |
5.27 |
5.29 |
5.29 |
표준편차 : 0.00666
이제 이 데이터들을 이용하여 부피를 구하여 보자. 부피를 구하면 질량이 있으므로 밀도를 구할 수 있게 된다.
부피 구하기
각각 1회 측정량씩 곱한다. (유효숫자는 3자리, 단위
)
회수 |
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
부피 |
150 |
145 |
151 |
147 |
147 |
148 |
149 |
144 |
146 |
147 |
147 |
이제 각 회수별 밀도를 구해보자.
밀도 구하기
각각 1회 측정량씩 나눈다. (유효숫자는 3개, E는 10의 제곱)
회수 |
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
밀도 |
7.00*E-08 |
7.17*E-08 |
6.82*E-08 |
6.94*E-08 |
6.94*E-08 |
7.23*E-08 |
7.05*E-08 |
7.01*E-08 |
7.12*E-08 |
7.01*E-08 |
7.03*E-08 |
편차^2 |
8.52*E-20 |
2.05*E-18 |
4.33*E-18 |
8.17*E-19 |
8.17*E-19 |
4.02*E-18 |
3.17*E-20 |
2.34*E-20 |
8.86*E-19 |
5.01*E-20 |
1.31*E-18 |
따라서 밀도는
(
)이 된다.
오차의 전파를 이용하여 구해보자.
위에서 말한
이 식에 의하면,
밀도는
이 나오게 된다.
이제 원기둥의 밀도를 구해보자. (위와 같은 방법으로)
질량의 데이터 (단위 g)
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
110.2 |
120.3 |
124.3 |
152.3 |
123.3 |
111.2 |
103.5 |
102.2 |
103.5 |
109.9 |
116.0 |
표준 편차 : 15.11
반지름의 길이 데이터1 (단위cm)
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
10.33 |
11.40 |
9.98 |
11.23 |
10.36 |
9.99 |
11.01 |
10.36 |
10.68 |
10.98 |
10.63 |
표준 편차 : 0.5044
반지름의 길이 데이터2 (단위cm)
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
10.25 |
10.36 |
10.28 |
10.98 |
11.99 |
12.34 |
9.97 |
10.24 |
12.34 |
10.55 |
10.93 |
표준 편차 : 0.9342
높이의 길이 데이터(단위cm)
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
15.65 |
16.57 |
17.77 |
18.95 |
14.22 |
15.26 |
15.34 |
16.22 |
17.25 |
18.39 |
16.56 |
표준 편차 : 1.513
부피의 데이터(단위cm3)
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
5203 |
6144 |
5724 |
7337 |
5546 |
5906 |
5287 |
5403 |
7138 |
6689 |
6038 |
이제 밀도를 구하여 보자.
밀도의 데이터 (단위 g/cm )
1회 |
2회 |
3회 |
4회 |
5회 |
6회 |
7회 |
8회 |
9회 |
10회 |
평균 |
0.02118 |
0.01958 |
0.02357 |
0.02076 |
0.02223 |
0.01883 |
0.019578 |
0.01892 |
0.01450 |
0.01643 |
0.01956 |
따라서 원기둥의 밀도는
(
) 이 된다.
'제어 및 operation' 카테고리의 다른 글
PID control (0) | 2016.07.13 |
---|---|
전달함수 (0) | 2016.06.27 |
PID control (0) | 2016.06.27 |
PID (0) | 2016.06.27 |
자동제어 용어(일반)/ KS A 3008 (0) | 2016.06.27 |