Learning Objectives
- Know the three level controller tuning objectives and how each is tuned and understand that too much controller gain, integral, or derivative will cause a controller to swing regardless of how the other two tuning constants are set (similar to self-limiting processes).
- Understand that too little gain will also cause a controller will swing (unlike self-limiting processes) and that setting the integral too slow is only a problem for disturbance rejection.
- Know the visual cues that can be used to identify a tuning problem and thus suggest a possible correction.
PID level controller tuning insights
- Level controllers are tuned to meet one of three possible objectives; surge control, disturbance rejection or following setpoint.
- Too much controller gain, integral or derivative causes the controller to swing regardless of how the other two tuning constants are set.
- Too little gain will cause the controller to swing slowly (a slow roll).
- Integral set too slow does not affect response to setpoint changes but allows disturbances to persist.
- When a tuning constant is set improperly there is a unique visual signature that you can use to identify the incorrect tuning constant.
We’ve already seen in PID spotlight, part 11 that a PID controller mated to an integrating process does not respond to controller gain or integral the same way as a self-limiting process (see PID spotlight, part 4). Also, because integrating processes don’t settle after being disturbed, we do not measure controller performance against open loop settling time; there is no such thing. Instead, we are concerned with (in order of frequency encountered):
- Keeping the process variable (PV) within limits while minimizing output (OP) movement (surge control).
- Keeping the process variable (PV) on setpoint (SP) whenever disturbances occur (disturbance rejection).
- Have the PV track SP changes (following setpoint).
We are going to look at examples of well-tuned PID controllers for each type of tuning, and then examine how poorly tuned controllers respond when one of the tuning parameters are set too big/fast or too small/slow (similar to PID spotlight, part 5).
What good looks like – surge control tuning
Surge control tuning is used for feed and intermediate product storage tanks and occasionally for in-process storage. The goal is to dampen any rapid changes of the inlet flow using the volume of the vessel. This is done because the best way to control upsets in the downstream process is to not upset the process to begin with; a smooth feed rate means a smooth process.
You would think that intentionally slowing down the tuning of a controller would be easy, and with self-limiting processes it is. However, an integrating process absolutely must be controlled (see PID spotlight, part 3), which means we have to balance keeping the level in the vessel regardless of what the feed flow does while at the same time not causing the controller output to oscillate. This is not as easy as you might think. You need to gather some information about how much the input might change, vessel size, and you need to decide how much you want the level to deviate from setpoint and how fast it needs to return to setpoint.
Figure 1 shows surge tuning for a small vessel (process gain Kp = 0.5 %/minute). Another way to think about process gain is if you opened the input flow 100% it would only take 2 minutes to fill the vessel. This is too small for practical purposes. At the 10-minute mark the input flow jumps 50%, from 25% to 75%. The controller is tuned to keep the process variable (PV) from exceeding 90% from an initial value of 50% (a 40% change) and to restore the PV to setpoint (SP) in approximately 2 hours. If you were tuning this controller, you would set the allowable deviation (40%) and restoration time (~2 hours) before tuning the controller. Tuning for a 50% input flow change would be based on process knowledge (you have to do some research).
The purpose of surge control is to smooth out rapid changes in input flow by using the vessel’s volume to temporarily hold liquid when a change occurs. The best we can do with this small vessel is hold excess volume for a little longer than 3 minutes (OP reaches 75% at 13:07). Peak outlet flow (max OP) occurs about 6 minutes after the input flow changes, after which the tuning slowly releases the excess volume.
The important thing to note here is when the controller holds volume it eventually must release that volume; the outlet flow must overshoot the inlet flow. There is a tradeoff here; the longer you set the restoration time the lower the overshoot can be. For this example, a two-hour restoration allowance results in a 3.8% overshoot, however a one-hour restoration window would result in a 7.1% overshoot.
One thing that should be clear here is a vessel this small isn’t useful for surge control.
Figure 2 shows surge tuning for a still smallish vessel (process gain = 0.1 %/minute, or 10 minutes to fill from empty at 100% input flow.) As before at the 10-minute mark the input flow jumps 50%, from 25% to 75%. The controller is tuned to keep the process variable (PV) from exceeding 90% from an initial value of 50% (a 40% change) and to restore the PV to setpoint (SP) in approximately 2 hours.
This vessel is five times larger than our first vessel, and obviously bigger is better for surge control. In this case we can stretch out the accumulation of excess volume to about 14 minutes. Our relative restoration time is shorter than figure 1 so our peak output is higher at 83.6%, an 8.6% overshoot.
Tuning for surge control is highly constrained by vessel size. Small vessels like figure 1 offer little buffering even if we select very relaxed performance parameters. (I would never let a vessel go to 90% intentionally.) The best place to manage surge control is during design; ask for the biggest surge vessels you can reasonably get. (Refineries are constantly increasing throughputs. If your industry works the same way building bigger than minimum will make your future job easier.)
Tuning for surge control results in the smallest controller gain possible given the size of the vessel and the slowest integral rate possible given how long the PV is allowed to remain off SP.
What good looks like – disturbance rejection tuning
Figure 3 shows near optimal PI tuning for disturbance rejection. Despite the 15% change in inlet flow at the 10-minute mark the PV deviation was limited to about 3.4%. Controller OP did peak well above the input flow as required to eliminate accumulated excess. The speed of tuning is limited by stability limits; adding more controller gain or integral will result in oscillations. Gain and integral here is limited by the presence of deadtime caused by the multiple lags. (The lags affect the outlet flow from the vessel.)
Figure 4 shows near optimal PID tuning for disturbance rejection. The addition of derivative increased the speed of the initial response to the disturbance and suppressed oscillation enough to permit an 80% increase in controller gain and a modest increase in integral speed. This reduced the PV deviation to just a shade over 2%.
You may have been told to never use derivative on a level controller, and I do not recall ever having used derivative on one. Derivative works on this example because there is no process noise and there are multiple lags (Figure 6 in PID spotlight, part 6) explains how derivative is used to look around the corner in a process response that is created by multiple lags). Most level measurements are noisy, rarely have multiple lags, and are rarely tuned for straight disturbance rejection. All that said, derivative is a tool to keep in your back pocket should you ever run across a situation where noise is not an issue, there are multiple lags and quick response is required. (Not all integrating processes are levels.)
Disturbance rejection tuning is the opposite of surge tuning. Controller gain is set as high as possible and integral is set as fast as possible within the stability limits of the process. Note that if you tune a level for disturbance rejection the high gain and (relatively) fast integral will result in very large OP swings when the setpoint (SP) is changed. It is strongly recommended that if controller gain exceeds 3 or 4, you should use some form of advanced SP management to mitigate these wild swings.
What good looks like – setpoint tracking
Figure 5 shows proposed “best” tuning to track setpoint changes. It is assumed that external disturbances are rare, small or that they are managed by feedforward control. Controller gain is set as high as possible without overshoot. In PID spotlight part 11, we saw that integral is not required for SP changes; indeed, if integral exists it will always cause the PV to overshoot the SP following SP changes. Ideally, therefore, we could dispense with integral in the interest of avoiding overshoot. However, some integral is included here to slowly return the PV to SP should an unexpected disturbance occur.
Tuning for purpose: What is this controller supposed to do?
From the above examples we can see that controller tuning constants can change considerably based on the purpose of the controller. Surge control minimizes controller gain and slows integral as much as the system can tolerate to minimize changes to downstream processes. Disturbance rejection does the opposite, maximizing controller gain and integral, and if possible, adding derivative to keep the PV on SP. How this may affect downstream processes is not considered. Finally, setpoint tracking tuning places the controller gain somewhere between surge control and disturbance rejection tuning, but sets integral very slow.
This discussion highlights something that is rarely discussed – tuning for purpose. When you sit down to tune a control loop, the first question you should ask is what is this controller supposed to do? For self-limiting processes, the choices are usually limited to setpoint tracking (critically damped) and disturbance rejection. Slow optimization tuning was discussed but no examples were given. With integrating processes, particularly levels, our decision-making process is more difficult. The nature of integrating processes precludes “universal” tuning; once you make a decision that the controller will be used for (for example) surge control the tuning will not be useful for any other purpose.
This points back to my concern about the use of rote tuning methods; the performance assumptions inherent in the method may not be appropriate for the controller you are currently working on. Open- and closed-loop tuning methods are very powerful tools, but please be aware of their limitations.
What bad looks like – too much controller gain
Figure 6 shows an overaggressive attempt at disturbance rejection tuning. It is very effective at limiting how far the PV moves from SP, which we would expect because of the very high controller gain. However, the OP oscillates quite a bit before finally settling. The PV and OP peaks nearly line up, which indicates that the controller is tuned with too much controller gain (the presence of integral will cause some offset between PV and OP.) This response is similar to self-limiting processes.
Note that a SP filter has been used to slowly apply a SP change. This was done to limit how much the OP jumps when the SP is changed. Setpoint processing – a filter, ramp or other – can make it difficult to draw clear conclusions from an auto mode (SP) step test as is done for heuristic tuning.
What bad looks like – integral set too fast
Figure 7 is another overaggressive attempt at disturbance rejection tuning. In this case the OP peaks trail the PV peaks; this looks like we have too much integral. In this case the oscillations are clear even during the SP change. (Yes, it’s that badly tuned.) This response is similar to self-limiting processes.
What bad looks like – too much derivative
In Figure 8, I’ve accidentally entered the desired integral constant in the derivative constant location. (It happens.) Too much derivative often shows up as the OP swinging wildly in response to small changes in the direction of the PV. In this case the instability is easily seen as the controller responds to the input flow change at the 60-minute mark. The controller response to the SP change looks like it might have some incipient instability, but this might not draw anyone’s attention. This response is similar to self-limiting processes. (The only way I can imagine someone adding this much derivative to a controller is by mistake. Perhaps I missed the decimal point? I have made these kinds of mistakes, sometimes with very public and very embarrassing results. In the real world always look twice before hitting the enter key.)
What bad looks like – too little controller gain
In PID spotlight part 11, we saw that an integrating process matched to an integral only controller is unstable, undergoing a slow steadily increasing oscillation. Controller gain is required to achieve stable control. However, if not enough controller gain is applied the process will undergo a slow continuous oscillation. This is very different from how a self-limiting process responds.
If you are not aware that this can be a problem the two standard fixes for oscillation, reducing controller gain (if you are not familiar with heuristic methods) or slowing down the integral (if you are familiar with heuristic methods) will not solve the problem. In the first case you will cause a marginally stable controller to go unstable. In the second case, you will likely create tuning that will not keep the level inside the vessel.
It is counterintuitive to increase controller gain to solve an oscillation problem. As a general rule, I don’t like to see a controller gain below 1.0 on an integrating process, and I much prefer 2.0. Controller gain is what keeps the level inside the vessel when a disturbance occurs, and during startups and shutdowns you can expect very large flow rate disturbances. Therefore, if you see a level controller with this sort of behavior and the controller gain is less than 1.0 raise controller gain first.
What bad looks like – integral set too slow
Figure 10 shows the response of a controller tuned with firm but not overly aggressive controller gain and very slow integral. Whether this is too little integral depends on the purpose of the controller. If our goal is having the PV track SP changes, this could be considered very good tuning. The PV comes to SP without overshoot, which we know is not possible if there is very much integral. A SP filter has been applied (the working SP) to avoid overly aggressive OP movement when the SP is changed.
However, if the goal is to keep the PV on SP after a disturbance, then we can see that the initial response to the disturbance looks good, indicating the controller gain is reasonably well tuned, but then the disturbance persists.
Unlike self-limiting processes, we cannot rely on the response to a setpoint change to tell us that integral is too slow. Gain alone can get the PV back to SP after a SP change. We need to see how well the controller responds to disturbances.
Help for real-world tuning of level controllers
Integrating processes, primarily levels, can be tuned to achieve one of a few possible goals. In the examples above depending on the goal the controller gain could range from 0.88 to 9.0, integral could range from 5.0 to 33 (or more) minutes/repeat, and even derivative could be used. This wide range of possibilities requires that we decide what the purpose of the controller is before we start tuning; we are tuning for purpose.
Real world tuning of level controllers is difficult. Not because integrating processes are inherently difficult, but because the tuning is often trying to balance competing goals. Rarely is a level controller tuned strictly for (for example) surge control. Because of this it is not unusual to see an extensive loop tuning log where the tuning is constantly adjusted in the search for settings that address mutually incompatible goals (keeping the level on setpoint without moving the controller output).
We have learned that integrating processes under control behave differently than self-limiting processes do in two important ways:
- PV will always overshoot the SP on a SP change. Integrating processes cannot be tuned for critically damped response on a SP change.
- OP will always overshoot the final steady state OP value on a setpoint change or load disturbance. This can be mitigated by slowing down integral action, but cannot be eliminated.
With regard to poor controller tuning the visual cues for too much controller gain, integral set too fast, and too much derivative are identical to self-limiting processes. However, the visual cues for spotting too little controller gain and integral set too slow are very different.
- Too little controller gain will look like integral set too fast; the process will oscillate and the OP peak will trail the PV peak. Slowing down integral will not fix the tuning problem. It will likely make control worse. As a general rule if the controller gain is less than 1.0 raise it to 1.0 (I prefer 2.0).
- Integral set too slow will not show up in a setpoint step test. Integrating processes will follow SP changes very well on gain only control. The only way to identify slow integral is if the controller does not eliminate PV-SP deviation (error) after a disturbance.
Ed Bullerdiek is a retired control engineer with 37 years of process control experience in petroleum refining and oil production. Edited by Mark T. Hoske, editor in chief, Control Engineering, WTWH Media, [email protected].
CONSIDER THIS
Level controller (and other integrating processes) can be tuned for one of three possible operating objectives. What are the objectives and how does this affect tuning? What if I have competing objectives?
[WEB]ONLINE
PID series from Ed Bullerdiek, retired control engineer
Part 1: Three reasons to tune control loops: Safety, profit, energy efficiency
PID spotlight, part 2: Know these 13 terms, interactions
PID spotlight, part 3: How to select one of four process responses
PID spotlight, part 4: How to balance PID control for a self-limiting process
PID spotlight, part 5: What does good and bad controller tuning look like?
PID spotlight, part 6: Deadtime? How to boost controller performance anyway
PID spotlight, part 7: Open-loop tuning of a self-limiting process
PID spotlight, part 8: Closed-loop tuning for self-limiting processes
PID spotlight, part 9: Heuristic tuning for a self-limiting process (part A on heuristic tuning)
PID spotlight, part 10: Heuristic tuning in a self-limiting process
PID spotlight, part 11: How a PID controller works with an integrating process
Aug. 1 RCEP webcast available for one year: How to automate series: The mechanics of loop tuning
More on PID and advanced process control from Control Engineering.