PID: Still the One
More than 60 years after the introduction of proportional-integral-derivative controllers, they remain the workhorse of industrial process control.
Vance J. VanDoren -- Control Engineering, 10/1/2003
|
Negative feedback has been used to control continuous processes since the late 18th century. James Watt used a flyball governor to automatically apply more steam to his famous engine when its speed dropped too low and to throttle back the steam when the engine's speed rose too high.
This simple balancing act remains the fundamental function of process controllers today: Measure the process variable. Subtract it from the setpoint to find the error. Apply a control effort to drive the process variable upwards if the error is positive or downwards if the error is negative. Repeat until the error is eliminated.
The tricky part of controller design is to figure out just how much of a corrective effort the controller should apply to the process in each case. A proportional controller simply multiplies the error by a constant to compute its next output. Watt's flyball governor did so mechanically according to a constant determined by the geometry of the device and the position of an adjustable setscrew.
Unfortunately, a proportional controller tends to quit working once it has succeeded in driving the process variable close enough to the setpoint. It will settle on a fixed output that leaves the error at a small but nonzero value. For a more detailed explanation of this steady-state error phenomenon, see "Understanding PID Control," Control Engineering, June 2000.
Integral actionControl engineers in the 1930s discovered that the error could be eliminated altogether by automatically resetting the setpoint to an artificially high value. The idea was to let the proportional controller pursue the artificial setpoint so that the actual error would be zero by the time the controller quit working. This they accomplished by slowly raising (or lowering) the artificial setpoint as long as the actual error remained nonzero.
As it happens, this automatic reset operation is mathematically identical to integrating the error and adding that total to the output of the controller's proportional term. The result is a proportional-integral (PI) controller that will continue to generate an ever-increasing output until the error has been eliminated.
Unfortunately, integral action does not guarantee perfect feedback control. A PI controller can cause closed-loop instability if the integral action is too aggressive (see "Controllers Must Balance Performance with Closed-Loop Stability," Control Engineering, May 2000). The controller may over-correct for an error and create a new one of even greater magnitude in the opposite direction. When that happens, the controller will eventually start driving its output back and forth between fully on and fully off, a phenomenon known as hunting.
Derivative actionHunting can sometimes be remedied by adding derivative action to the mix. The derivative term in a full proportional-integral-derivative (PID) controller is active only when the error is changing. And if the setpoint happens to be constant, the error changes only when the process variable starts moving away from or towards the setpoint. This is particularly helpful if the controller's previous efforts have caused the process variable to approach the setpoint too rapidly. The deceleration provided by the derivative action reduces the likelihood of overshoot and hunting.
Unfortunately, if the derivative action is particularly aggressive, it can put on the brakes so hard that it causes hunting all by itself. This effect is particularly pronounced in processes that react quickly to the controller's efforts, such as motors and robots.
Derivative action also tends to add a dramatic spike or "kick" to the controller's output in the case of an abrupt change in the error due to a new setpoint. This forces the controller to start taking corrective action immediately without waiting for the integral or proportional action to take effect. Compared to a two-term PI controller, a full PID controller can even appear to anticipate the level of effort that will ultimately be required to maintain the process variable at the new setpoint. In fact, when Taylor's famous Fulscope was first introduced with all three terms, the derivative term was labeled "pre-act."
Derivative drawbacks![]() |
| The traditional PID formula calculates the derivative term by differentiating the error signal e(t) = SP(t) - PV(t), where PV(t) is the process variable at time t and SP(t) is the setpoint. CO(t) is the controller’s overall output and P, TI, and TD are “tuning constants” that define the relative strengths of the proportional, integral, and derivative terms. |
![]() |
| Computing the derivative term from the error signal causes spikes in the derivative action whenever the setpoint changes abruptly. |
On the other hand, dramatic swings in the control effort can be troublesome in applications (such as room temperature control) that require slow and steady changes in the controller's output. A blast of hot air following every adjustment to the thermostat would not only be uncomfortable for the occupants of the room but hard on the furnace as well.
![]() |
| If the setpoint changes only in a stepwise manner as in this example, its derivative is almost always zero anyway, so the derivative action can be computed more-or-less correctly by differentiating just the negative of the process variable. |
For such applications it is advantageous to forego derivative action altogether or calculate the derivative from the negative of the process variable rather than directly from the error. If the setpoint is constant, the two calculations will be identical. If the setpoint only changes in a stepwise manner, the two will still remain identical except at the instant when each step change is initiated. The negative derivative of the process variable will lack the spike present in the derivative of the error. See the "Smoother derivative action" graphics. Most modern controllers offer this option for applications that cannot withstand "kicking."
![]() |
| Using the modified derivative term eliminates the spikes that would otherwise appear in the derivative action when the setpoint changes. However, if the setpoint fluctuates at all between step changes, the modified derivative term will produce erroneous results. |
Derivative action is also a problem for applications that involve noisy measurements. The derivative term will contribute to the controller's output every time the process variable appears to change. The controller could end up taking corrective actions even if the actual process variable has already reached the setpoint. Virtually all modern controllers offer a filtering option to present a much smoother input to the derivative term.
In all, derivative action is considered by many control engineers to be more trouble than it's worth. Nonetheless, the complete proportional-integral-derivative (PID) controller had become the state-of-the-art by the mid-1950s and remains predominant to this day. It works well enough for most process control applications (with or without derivative action), it is relatively easy to implement, and its basic operating principles are easily understood.
PID in actionConsider the room temperature control example again. If the room is large and the furnace is small, the process will tend to respond slowly to the controller's efforts. If the process variable should suddenly begin to differ from the setpoint because someone opened a door or turned up the setpoint on a cold day, a PID controller's immediate reaction would be determined primarily by the actions of the derivative term. This will cause the controller to initiate a burst of corrective efforts the instant the error changes from zero. The error between the setpoint and the process variable would also initiate the thermostat's proportional action.
After a while, the integral term will also begin to contribute to the controller's output as the error accumulates over time. In fact, the integral action will eventually come to dominate the output signal since the error decreases so slowly in a sluggish process. Even after the error has been eliminated, the controller will continue to generate an output based on the history of errors that have been accumulating in the controller's integrator. The process variable may then overshoot the setpoint, causing an error in the opposite direction.
If the integral action is not too aggressive, this subsequent error will be smaller than the original, and the integral action will begin to diminish as negative errors are added to the history of positive ones. This whole operation may then repeat several times until both the error and the accumulated error are eliminated. Meanwhile, the derivative term will continue to add its share to the controller output based on the derivative of the oscillating error signal. The proportional action, too, will come and go as the error waxes and wanes.
Now suppose the process is a small room heated by a large furnace. This process would tend to respond quickly to the controller's efforts. The integral action will not play as dominant a role in the controller's output since errors will be so short lived. On the other hand, the derivative action will tend to be larger since the error changes rapidly when the process is highly responsive.
Clearly the possible effects of a PID controller are as varied as the processes to which they are applied. A PID controller can fulfill its mission to eliminate errors, but only if properly configured for each application.
|






















View All Blogs



