How to Avoid a Common PID Tuning Mistake Tips

The process variable has slow decaying oscillations. Control theory text books indicate decreasing the PID gain should make the loop more stable. You decrease the PID gain. The oscillation gets worse. You decrease the gain again. The amplitude and the period get bigger. You repeatedly decrease the PID gain. The process variable appears to be very slowly approaching or diverging from setpoint. What is going on?

I found from test results this week what I had suspected about the problem being more extensive. Whether you are talking about a liquid level, composition, pH, or temperature or a gas pressure, decreasing the gain can cause slow oscillations. These are important loops. Thinking reducing gain will always reduce oscillations, a person seeing the oscillations decreases the gain making the matter worse.

I first learned this lesson on a Flow-Level-Instrument-Trainer (FLIT) about 40 years ago when I tried to tune a level loop. I started with a gain of 1 and a reset time of 1 minute per repeat. The level had slow decaying oscillations. In my control theory courses I learned increasing the controller gain would cause the oscillations to grow in amplitude and the loop would eventually become unstable. I decreased the gain. The oscillation amplitude and period got worse. Thinking this was just an anomaly, I kept decreasing the gain.  I thought the oscillations went away but the level was always very slowly moving. If I ended the lab with the level approaching setpoint, I thought I had solved the problem.

What I needed to do was the opposite of what I learned. I needed to persistently increase the gain. Like most level loops, the PID controller gain could be 100 before you would have a PID gain high enough to cause instability. The solution was to increase the PID gain by two orders of magnitude. Alternately, we will see that I could have increased the reset time by two or more orders of magnitude but this would have led to incredibly slow level control. In the time frame of a lab exercise, you would not see anything happening for this case, a terrible situation for a young person even back in the 1970s.

This misunderstanding was repeated on a much greater scale at a plant about 20 years ago when the electronic analog control system was replaced with a distributed control system (DCS). The configuration engineers did not know the difference between proportional band and controller gain. An analog distillate level controller on a key column manipulating reflux flow had a proportional band of 100%. The DCS level controller gain was set at 100 and the whole column lined out giving the best performance ever seen. The DCS was credited with making the astounding improvement. Tight distillate level control provided tight material balance control and inherent internal reflux control to compensate for cold rain storms.

I have worked through the process dynamics for typical level loops and found the upper gain limit was usually well above 100. For batch temperature loops the range of gains is much larger but in many cases the upper gain limit approached 100.

A question submitted to Liptak cited a batch temperature controller gain of more than 50. Some thought that such a gain was ridiculous. Slide 123 of ISA-New-Orleans-2012-Effective-Use-of PID-Controllers.pdf, shows the best controller gain for bioreactor temperature controller was close to 80.

Because people can't imagine gains this high, they reduce the gain even if it is computed by an auto tuner. The high gain is uncomfortable. When the operator makes a tiny setpoint change, the controller output jumps to an output limit. If there is some noise, the output is bouncing around. Fortunately, a well-designed temperature measurement has little noise. Also a setpoint filter or rate limit can be easily added so the output change due to a setpoint change is less dramatic.

Some level loops need to absorb variability and make a small a change in manipulated flow to avoid upsetting downstream users. This is the case for surge tank and a distillate level controller that is manipulating distillate flow rather than reflux flow as discussed in the January 2013 Control Talk column "Tuning to Meet Process Objectives" and as detailed in the March Control Talk Blog "Processes with No Steady State in PID Time Frame Tips (Conclusion)".

Nearly all of the important process variable loops are vulnerable. It has been known for decades that level could develop slow oscillations from a low PID. More recently it was realized this could happen for other integrating processes such as batch composition, pH, and temperature. My test confirmed even self-regulating processes and especially runaway processes would suffer as well. The tests used a process whose ramp rate of 0.005% per sec per % change in controller output was about 100 times faster than what would be observed in a real batch or level loop to keep the test time reasonable. Consequently, the PID gains in the test cases are much lower than what would be seen in a plant.

A self-regulating process with a process time constant much greater than the process dead time, behaves like an integrating process. This is the situation for continuous control of composition, temperature, and pH control on well mixed liquid volumes.  In slide 1 of the "Consequences-of-Low-PID-Gain.ppt" the purple PV response is great (nearly optimal) for a PID gain of 15 as computed by Lambda tuning rules for integrating processes. The green PV response for a PID gain of 6 shows the start of an oscillation. Decreasing the PID gain to 3 (red plot) and 1.5 (brown plot) makes the oscillation worse. The period is getting much longer and at some point is beyond the time frame of the trend plot.

Slide 2 for integrating processes and slide 3 for runaway processes with the same ramp rate in the PID time frame as the self-regulating process shows  a low PID gain becomes more detrimental as we lose process self-regulation. Slide 4 quantifies the relationship in terms of a product of the process gain and reset time. To prevent the start of oscillations this product must be greater than twice the inverse of the integrating process gain. To prevent the very slowly decaying oscillations seen as the brown PV, the product must be greater than ¼ the inverse of the integrating process gain.

Good tuning methods such as lambda tuning for integrating processes will automatically keep the product of the gain and reset time above the limit. The danger arises from a person not liking the high PID gain and consequently decreasing the gain. If the gain must be decreased, the reset time should be increased to keep the product of the gain and reset time above the limit per slide 4. If the retuning is done by putting in a larger arrest time, the limit to prevent the start of oscillations will automatically be enforced by lambda tuning for the given process dynamics.

What makes this problem even more insidious is that if the gain is much lower than needed, the oscillation may only be apparent on a trend chart that spans several days. In the short time frame of most trend charts, the process variable just seems to be slowly moving with no apparent pattern. The inevitable upsets and limit cycles from backlash and stiction make the problem even more unrecognizable.

Why is there a low limit to the PID gain? What helps me to conceptually understand what is going on is to realize that a feedback controller gain adds self-regulation needed for these processes that don't exhibit self-regulation in the PID time frame. Furthermore, proportional action must balance out the effect of integral action, which has no sense of direction of the movement of the PV since the direction of the change in the integral mode contribution is based on the sign rather than the magnitude of the error.  If you reduce the amount of integral action, you can reduce the amount of proportional action keeping the integral action in check.

The exception is dead time dominant processes. Here lambda tuning for self-regulating processes is used resulting in a very low reset time and low controller gain achieving an integral-only type of control that provides a fast gradual response with inherent suppression of the reaction to noise. These processes tend to be noisy due to a lack of a process time constant acting as a filter.

A quick thing you can do for many slow processes is to look on a trend chart spanning a day or more. If there are slow decaying oscillations, increase the reset time by one or two orders of magnitude. If the oscillation period and decay are faster, the PID gain is too low.  If the dynamics indicate the PID gain can be higher, check if there is a legitimate reason for the low PID gain or whether the low PID gain is just the result of some person's misconception or comfort zone.

What are your comments?

Join the discussion today. Login Here.

Comments

No one has commented on this page yet.

RSS feed for comments on this page | RSS feed for all comments