Introduction to PID control
Page 2 of 3
Controllers: How they work
How a PID controller works is a pretty easy concept to understand. The PID controller looks at the current value of an error ε, the integral of the error over a time interval ∫ε and the rate of change of the error Δε to determine how much of a correction to apply. The controller continues to apply the correction until change is seen on the feedback. Depending on the error calculation update rate (which in turn may depend on how often the loop feedback is read) the corrective action can be adjusted at a fast rate — for instance, the analog feedback on some variable frequency drives is updated every 10 msec.
The job of a PID controller is to force feedback to match a setpoint. Sometimes error between feedback and setpoint is caused by a setpoint change, but in most applications the setpoint is not adjusted much. More often, error in a loop is caused by disturbances in measured feedback.
In our beginning example, the disturbance of cruise-control regulation was a hill encountered on a road over which a car travels. Other examples of disturbances are double doors opening in a building where pressure is regulated, or people showering while a control loop works to regulate the connected water-tank level.
Techniques for fine tuning
Tuning a control loop is the adjustment of its control parameters (gain/proportional band, integral gain/reset, derivative gain/rate) to optimum values for a target response. Tuning is part of loop design, usually required if the system oscillates too much, responds too slowly, has steady-state error, or is unstable.
One must be careful when determining whether a PID needs tuning or not: Always check hardware first, as it could be the problem and not the controller that needs tuning. A PID most likely needs tuning if:
• The operator thinks that the controller can perform better • process dynamics weren't well understood when gains were first set • dynamics were changed • some control-system characteristics are direction dependent, or • careful consideration wasn't given to the units of gains and other parameters. On the other hand, problems may have nothing to do with the PID loop tuning if a control valve sticks, measurement taps are plugged, sensors are disconnected, or if a control valve is stripped out from high-pressure flow.
Some systems have interactions of widely varied strengths — and there is no single definition of “best tuned” that applies to all loops, so no single method optimizes all loops.
The optimum behavior in a process or setpoint change depends on the application. Some processes must not allow overshoot of a process variable, while others must minimize energy expended in reaching a new setpoint. Generally, response must be stable and systems must not oscillate for any combination of conditions and setpoints. Tuning of loops is further complicated by process response time, as it may take minutes or hours for a setpoint change to produce a stable effect. Some processes also exhibit nonlinearity, so parameters that work well at full-load conditions don't work when starting from no-load.
Several methods are available for tuning a PID loop; the choice of method largely depends on whether or not the loop can be taken offline for tuning, and the system response speed. If the system can be taken offline, the best tuning method often involves subjecting the system to a step change in input, measuring output as a function of time, and using this response to determine control parameters.
If the system must remain online, one tuning method is to first set I and D values to zero and increase P until loop output oscillates — then increase I until oscillation stops, and increase D until the loop is acceptably quick in reaching its reference. A fast PID loop tuning usually overshoots slightly to reach the setpoint more quickly.
Another is known as the Ziegler-Nichols method, introduced by John G. Ziegler and Nathaniel B. Nichols of Taylor Instruments in 1942. This technique also involves setting I and D gains to zero and then increasing P gain until the loop output starts to oscillate. Document critical gain K
In fact, most industrial facilities no longer tune loops with manual calculation, but use tuning and loop optimization software. These software packages gather data, develop process models, suggest optimal tuning, and even develop tuning by gathering data from reference changes. This can be done both on and offline. It may also include valve and sensor analysis, and simulation before downloading. The only drawbacks: Software is somewhat costly and involves some training.
The analytical approach involves mathematics. PID loop tuning induces an impulse in the system, and then uses the controlled system's frequency response to design PID loop values. In loops with response times of several minutes, mathematical loop tuning is recommended because trial and error can literally take days just to find a stable set of loop values. Optimal values are harder to find, but can save a company huge amounts of money. Commercial software is available from several sources, and can easily pay for itself if a PID loop runs large or expensive processes. Some digital controllers even feature self tuning, in which small setpoint changes are sent to the process, allowing the controller itself to calculate optimal values.
One can also tune by feel, which is an online method that doesn't require math. The main problem with this method is that it is erratic, not repeatable, and can be inefficient.
The final method of tuning is a quality process model called the Cohen-Coon, which is a modified version of the Ziegler-Nichols approach. This offline method involves some math, but is only good for the first-order process. Under manual mode, wait until the process is at a steady state before introducing a step change in the input. From the measurements based on the step test, evaluate the process parameters. Based on these, formulas should prescribe controller settings.
For more information, call (800) 927-5292 or visityaskawa.com.
Sidebar: PID benefits almost anything measurable and regulable
The main benefit of any PID loop is that a designer can “set it and forget it” while still maintaining a well-regulated system. PID control is so universal that PI and PID loops can be small and fast like a current-regulating loop inside a servo drive or vector controller, or a slower loop regulating the liquid level in a giant tank holding thousands of gallons. PID loops are one of the simplest yet most effective means to achieve that control on almost anything measurable and regulable. Frankly, if PID didn't already exist, we would be forced to invent it or factory automation would be very limited.
PID loops provide technicians and engineers with a customizable way to control a variety of conditions, from temperature to speed and everything in between. The loop's control is used to modify application behavior to keep output at stable and improve response rates. What's particularly exciting is that special software and computers can perform calculations to make PID design easier.
Sidebar: PID loop applications
A PID controller can be used to control any measurable variable, including those affected by manipulating other process variables. In other words, anything that can be measured and manipulated is eligible for PID loop control. Think of the air pressure in a length of ductwork. A simple pressure sensor can be used to measure duct pressure and anything that can increase that pressure, such a variable-speed fan or solenoid-controlled dampers. Voila — these are all the ingredients needed for PID control. Other typical PID loop targets are temperature, flow rate, chemical composition, speed, and level.
Note that most PID loops are single-loop setups, though some control systems arrange PID controllers in cascades or networks. Here, a master control produces signals used by slave controllers. Coupled and cascaded controls are common in chemical process control, heating, ventilation, and air conditioning systems, and other systems where many parts cooperate.
| Control type | K |
K |
K |
|---|---|---|---|
| P only | 0.5·K |
- | - |
| PI | 0.45·K |
1.2K |
- |
| PID | 0.6·K |
2K |
K |
Mathematical gyrations occur during Ziegler-Nichols tuning. With this technique, I and D gains are set to zero and then P gain is increased until the loop output starts to oscillate.
Related Articles:
We've been writing about PID control for more than 20 years. For more on the topic, here are some of our most popular articles:
All about torque feedforward
How to perk up servo performance
Harmonic cancellation algorithms enable precision motion control
Sliding mode control
Motion control meets adaptive control
Want to use this article? Click here for options!
© 2012 Penton Media Inc.
Acceptable Use Policy blog comments powered by Disqus




