Take control of PID tuning
By Wendell S. Rice, Parsons Technical Services -- Plant Engineering, 9/1/2005
Process control can be open or closed loop. An open loop is one in which there is no feedback to the controlling unit. Actuating a switch and setting a potentiometer are simplified examples of open loop control. Open loop control is essentially a manual operation.
Control of a process, such as temperature of an industrial furnace or level in a tank, typically requires closed loop control. The components of closed loop control are the control unit, output device and feedback, which is actually the input to the controller. The process to be controlled is called the process variable (PV). The parameter to which you wish the PV to conform is the setpoint (SP). The difference between the PV and the SP is the error (Er).
The nature of the process must be taken into consideration when control concepts are applied. Many processes would be extremely unstable using on/off control. Those processes benefit from a type of control that is neither on nor off, but somewhere in between — namely, PID control.
Fig 1What is PID?
PID stands for Proportional, Integral and Derivative. It is a method by which closed-loop process controllers can more closely match the PV with the SP, while maintaining process stability.
Closed loop control uses feedback, or an Er signal, to correct a PV and, hopefully, keep it within an acceptable range of the SP. Unfortunately, feedback implies that a change has already taken place — like steering a car by looking out the back window.
With no control, a process is free to go wherever it pleases, like driving across the salt flats. PID control keeps the process within bounds, like driving on a paved road. Unfortunately, the tighter the control is, the narrower the road. This is good in that it keeps the process in tight control, but like the road, it is easier to go into the ditch. The bottom line? Use the least amount of control possible. Lower PID values that still keep the process in control are inherently more stable.
ProportionalThe Proportional function (short for Proportional Gain) is a multiplier applied to the Er signal. The higher the Gain, the more correction is applied.
Some controllers use a value called the Proportional Band, which is the inverse of the Gain, expressed as a percentage. In this case, the smaller the Proportional Band is, the more correction. Unfortunately, some controllers use Proportional Band, but refer to the value as the Gain. If you see the phrase "50% Gain," watch out!
Proportional Band is defined as the percent of the actual change in the Er we would have needed to produce the actual amount of change in the output as there was in the Er. Let's say the Er in a process changes by 2 V. If the output changes by 2 V, the Proportional Band is 100%. If the Proportional Band is 200%, the output would change by only 1 V (it would take an Er change of 200% of the actual change to increase the output the same amount, or 2 V). A Proportional Band of 50% would change the output by 4 V, because it would take only a 50% change in the Er to change the output the same as the Er.
IntegralIn some cases where the load increases and the PV decreases, the controller gain alone cannot make up the difference. A controller can react to changes in the PV or SP directly, as those parameters are fed into it.
The controller, however, has no direct information on changes in the load. As load changes in a process are much more common than SP changes, this is a significant problem. As the Er increases, the output increases due to the Gain of the controller, which increases the PV. As the PV increases, the Er decreases, which decreases the output, which increases the Er, which increases the PV, which decreases the Er, which …
Before the PV gets high enough to satisfy the increase in load, an equilibrium is reached where no more correction is applied, but the SP and the load have not been satisfied.
Fig 2
The amount of time the Er has been present determines the amount of correction. If the Er has been present for a long time, the controller requires more correction than it is getting.
We need to reset the output of the controller to satisfy the change in the load. The Integral is normally called "Reset" for that reason. If it is called Integral Time or Reset Time it is specified in seconds-per-repeat. This means the amount of time, in seconds, for the Integral function to increase the output signal by an amount equal to the Er amount (or to repeat the Er in the output). The larger the reset time is, the longer the time required to change the output, and the smaller the effect of the Integral function.
Some controllers use the inverse, called either "Integral Gain" or "Reset Rate," specified in repeats-per-minute. This function determines how many times the Er amount will be added to the output in one minute. In this case a larger value means a larger effect.
Obviously, the units must be known to tune the loop, and like with the Proportional function, some controllers use one method but call it by the other name. The best thing is to look at the mathematics for the controller in question.
DerivativeThe Derivative function compensates for the rate of change of the Er. For this reason, it is often called "Rate." Derivative is expressed in seconds (or minutes), and has only one interpretation: the higher the number, the greater the effect. In many applications it is set to zero.
Derivative or Rate control can be thought of as anticipatory. A value of 5 seconds adds an amount of correction to the output immediately that the Proportional function would have added had it started 5 seconds earlier. Put another way, a 5-second Derivative adds immediately the amount of correction that the Proportional function would have contributed 5 seconds later. In other words, Derivative is correction based on how fast the Er is increasing or decreasing.
Even if the amount of Er is small, if it is changing rapidly, the controller might need to start applying correction sooner to prevent extreme overshoot. Derivative works when the PV is returning to the SP as well as when it is moving away from the SP.
In some applications, such as heating, Gain can be quite high without causing oscillations, but some overshoot is often experienced. If overshoot hinders the process, the Rate function can dampen it out, and allow the SP to be reached quickly. Without Rate, the Gain would have to be reduced to eliminate the overshoot, and the overall response would be slower. Typical values might be between ¼ to 2-times the process lag.
Applying PIDErrorThe "Error" is the difference between the PV or Controlled Variable (CV) and the SP of the controller. The Er can be SP–PV, or it can be PV–SP. When Er=SP–PV, an increase in the PV causes the Er, and subsequently the output, to decrease. Thus are the characteristics of a Reverse Acting controller. In a Direct Acting controller, Er=PV–SP, and when the PV goes up, the Er goes up, and the output is increased (Fig. 1).
SP changes and PV variations affect the Er function the same way. Because the Derivative function is related to rate of change, a bump or step change of the SP could cause an undesirable spike in the Derivative. For this reason, the Derivative is usually applied only to the PV, and not the Er as the Proportional and Integral functions are. This eliminates the SP change from the equation. The rate of change of the Er is the same as the PV from which it is derived. Also, the maximum Gain of the Derivative is usually limited, so that step changes in the PV don't cause near-infinite reactions.
Fig 3Process lags
Process lags are inherent in the process. There is lag in a heating element from the time when current flows in the element until the element reaches temperature. There is also a lag from that point until the material being heated starts to increase in temperature (Fig. 2).
A much more difficult lag to tune out is "Dead Time," or the delay in the feedback signal reaching the controller. One way this can occur is when the temperature-sensing element is placed too far downstream from the heater.
Anti-reset windupMost controllers have a method to prevent the Integral function from continuing to grow increasingly larger when the output cannot bring the PV into control. "Anti-Reset Windup" prevents the Reset function from getting too large. This can occur when the output is saturated, or at its maximum value for an extended period of time. This saturation condition could be due to a large SP change, external control being applied to the PV or a physical blockage in the flow. If the Integral function were allowed to continue to build during this time, it could grow so large that when the process returns to normal, the PV would overshoot the SP before the Reset would be totally used. Implementing Anti-Reset Windup usually involves disabling the integration of the Er signal in some way during periods of saturation.
Tuning the control loopSome tuning guidelines suggest finding the Natural Period and Ultimate Gain, then using these numbers to determine starting points for the PID parameters.
To determine the Natural Period of a process, increase the loop Gain to the point where overshoot causes the loop to go into oscillation with constant amplitude and frequency. Natural Period is the time between peaks of this oscillation. Ultimate Gain is the amount of Gain that caused these oscillations (Fig. 3).
Seldom can this actually be done in the real world. But a small step-change in the SP can usually produce enough overshoot to remain safe, yet give enough information to make a reasonable approximation of the starting PID values.
A starting point for tuning might be a Gain of about ½ of the Ultimate Gain, and an Integral time of somewhat less that the Natural Period. This varies widely depending on the type of process, the type and degree of process lag, the algorithm of the controller, amount of Dead Time, phase of the moon, etc.
If the PID algorithm is executed more often than necessary, the loop can try to respond to excessive system noise (such as waves in a tank in which we are controlling level). To prevent this, set the execution rate to a value which results in running the algorithm about 10 times during the predominate time period of the loop (usually the Natural Period).
TheBottomLine...- Simple processes require simple control.
- Lower PID values that still keep the process in control are inherently more stable.
- Some tuning guidelines suggest finding the Natural Period and Ultimate Gain to determine starting points for the PID parameters.
- Wendell Rice, Controls Engineer, Parsons Technical Services, has been a controls engineer for more than 25 years. He can be reached at (765) 245-5357 or wendell.rice@parsons.com. Mr. Rice currently is assigned to a project in Newport, IN that provides support for the U. S. Army's chemical weapon neutralization program. Article edited by Jack Smith, Senior Editor, 630-288-8783, jsmith@reedbusiness.com.
| For more information on control theory and PID tuning, visit: | ||
| www.isa.org | www.controleng.com | www.plantengineering.com |
|





















