Journal of Process Control 86 (2020) 1–8
Contents lists available at ScienceDirect
Journal of Process Control journal homepage: www.elsevier.com/locate/jprocont
Review
Liquid level control: Simplicity and complexity William L. Luyben Department of Chemical Engineering, Lehigh University, Bethlehem, PA 18015, United States
a r t i c l e
i n f o
Article history: Received 10 October 2019 Revised 10 December 2019 Accepted 12 December 2019
Keywords: Level control PI controllers Offset Steady-state error
a b s t r a c t From a superficial perspective, the control of liquid level in a vessel is a “non-problem.” Well-known process control heuristics advise using a proportional-only controller with a gain Kc = 2. However many plant operators are uncomfortable with the resulting “offset” (“steady-state error” or “droop”) between the process variable and the controller setpoint that is inherent in a proportional controller because of the lack of integral action to drive the error to zero. Therefore level controllers with proportional-integral (PI) action are often found in process units. The purpose of this paper is to illustrate that PI control does not provide effective attenuation of flow disturbances and that it actually amplifies them. We also show that PI level controllers can give confusing tuning results. In most closedloop systems, increasing controller gain makes the system more oscillatory (smaller closedloop damping coefficient). When PI controllers are used to control liquid level, the exact opposite occurs (increasing controller gain makes the system less oscillatory). © 2019 Elsevier Ltd. All rights reserved.
1. Introduction There are probably more liquid level control loops in most chemical and petroleum plants than any other type. With a century of control history, one would expect that process control engineers would have developed effective methods for tuning level controllers. And indeed such methods were recommended six decades ago by some of the pioneers in process control, notably Page Buckley [1] and Greg Shinskey [2]. The use of easy-totune proportional-only controllers has been demonstrated in many books and papers to provide level control that attenuates flowrate disturbances passing through a series of units. However proportional-only control has been difficult to sell in many plants because operators like to see the displayed process variable running at the controller setpoint. When only proportional action is used, the controller output signal to the valve can only change if the error signal (setpoint minus process variable signal) changes. When a load disturbance occurs, the loop will come to a new steady state with a different error and different valve position. But there is nothing to drive the error to zero. Many level loops still use PI controllers. The purpose of this paper is to refresh the memories of process control engineers about the problems with performance and tuning when PI level controllers are used. Nothing is presented that has not been published in the literature many years ago. In this modern era of elegant, sophisticated and complex control al-
E-mail address:
[email protected] https://doi.org/10.1016/j.jprocont.2019.12.008 0959-1524/© 2019 Elsevier Ltd. All rights reserved.
gorithms and with the lofty claims of artificial intelligence to solve all our problems, the author feels that it might be useful to remind engineers that simple solutions are often more effective, less fragile and much more reliable. In the following sections we hope to achieve the following: 1. Illustrate the degradation of control in a series of tanks when PI level controllers are used 2. Analyze the complexity of tuning a PI controller to control liquid level 3. Demonstrate that P controllers in liquid level loops do not have offset for changes in controller setpoint but do have offset for load changes. It should be emphasized this study is not limited to “surge” tanks or to cylindrical vessels. It applies to any unit in which there is a liquid level to be controlled. Probably the most important example is a distillation column in which the liquid levels in both the base of the column and in the reflux drum must be controlled. Other important examples are vaporizers and evaporators. Even in liquid phase reactors where level affects conversion, proportional level control with a higher value of gain (Kc = 10) can be used to avoid flowrate amplification with only minor kinetic effects. 2. Process studied In our simulation studies, a series of tanks are explored with a feed flowrate of 0.3786 m3 /min of water at ambient conditions as shown in Fig. 1. Feed flowrate is flow controlled and is the load
2
W.L. Luyben / Journal of Process Control 86 (2020) 1–8
Fig. 2. Closedloop block diagram. Fig. 1. Two tanks in series.
disturbance. The level in each tank is controlled by a valve in the exit line downstream of a pump. Sizing the tank for 10 min of holdup when completely full and assuming an aspect ratio L/D = 2 give a tank diameter of 1.34 m and length of 2.68 m. The crosssectional area of the vertical cylindrical tank is A = 1.42 m2 . The steady-state level at design conditions is 2 m. The dynamic volume balance for a single tank is a linear ordinary differential equation with variables liquid height (H), flowrate of liquid entering the tank (Fin ) and flowrate of liquid leaving the tank (Fout ).
A
dH = Fin − Fout dt
The openloop system has a process transfer function gP(s) relating the controlled variable H and the manipulated variable Fout . The transfer function gL(s) relates the output variable H and the load disturbance Fin . Both transfer functions have an “s” in the denominator, indicating a pure integrator. The units of these transfer functions are “min/m2 ”.
H(s ) = gL(s ) Fin(s ) + gP (s ) Fout (s )
H(s ) =
1/A Fin(s ) + s
− 1/A Fout (s ) s
Note that gP(s) has a negative gain. The other transfer function elements in the level loop are a level transmitter gT(s) = 100%/2.4 m and a valve transfer function gV(s) = 0.8 m3 /min/100%. The control valve manipulating Fout is assumed to be “air-toopen” (direct action). Therefore the level controller must have “direct action” with an increase in the level increasing Fout . From a mathematical perspective, the product of the process gain and the controller gain must always be positive for negative feedback. Since the process transfer function gP(s) has a negative gain, the level controller gain must be negative. Fig. 2 gives the closedloop block diagram of the system. When the controller is proportional-only, the controller transfer function gC(s) is a simple gain.
gC (s ) = Kc
F2
Feed
H1
H2
F1
Feed
H1
F1 F2
Fig. 3. Two tanks; P and PI; flows and levels.
H2
W.L. Luyben / Journal of Process Control 86 (2020) 1–8
3
F2 with PI
F2 with P
Fig. 4. Comparison of P and PI control for flows from second tank.
When the controller is proportional-integral, the controller transfer function is a gain, a lead and an integrator.
gC (s ) = Kc
( τI s + 1 ) τI s
When PI control is used, the product of the controller transfer and the process transfer has two integrators in series (s2 in the denominator), which is the source of the tuning complexity. From a frequency-domain perspective, the Nyquist plot with two integrators in series starts at infinity on the negative real axis, so it is difficult to avoid encircling the critical (−1,0) point on a Nyquist plot.
F2
3. Dynamic simulations We start with Aspen Dynamic simulations of two and three tanks in series and compare the dynamic performances of P and PI controllers. The load disturbance is a 20% increase in the setpoint of the feed flow controller at 0.1 h. The valve in the feed line is air-to-open, so the flow controller is reverse acting with tuning Kc = 0.5 and τ I = 0.3 min. Fig. 3 gives the dynamic responses of flowrates and tank levels with two tanks in series for P control (KC = 2) and PI control (Kc = 5 and τ I = 5 min). The level in the first tank H1 increases
F3
F1
Feed
Fig. 5. (A) Three tanks; PI control; Kc = 5, τ I = 5. (B) Three tanks; PI control; Kc = 5, τ I = 2.
4
W.L. Luyben / Journal of Process Control 86 (2020) 1–8
F1
F2
F3
Feed
Fig. 5. Continued
Fig. 6. Root locus plot; third-order process.
first, and the first level controller increases the flowrate F1 leaving the tank. This increases the level in the second tank H2 , and the second level controller increases F2 . As expected, the P controller does not bring the level back down to the setpoint, so there is a steady-state offset. The PI con-
troller does bring the level back down to the setpoint. However this requires that for some period of time the flowrate leaving the tank must be greater than the flowrate entering the tank. The result is a peak flowrate leaving the second tank that is more than the eventual 20% increase. There is a 29% overshoot.
W.L. Luyben / Journal of Process Control 86 (2020) 1–8
Fig. 7. Typical effect of controller gain on damping coefficient.
Fig. 8. Root locus plot; level control; P controller.
5
6
W.L. Luyben / Journal of Process Control 86 (2020) 1–8
Fig. 9. Root locus plot; level control; PI controller.
Fig. 4 gives a direct comparison of flowrates leaving the second tank for P and PI control. Fig. 5A illustrates that things get worse if there are three tanks in series. Now there is a 37% amplification of the flow leaving the third tank. The effect of PI controller is illustrated in Fig. 5B where the tuning is Kc = 2 and τ I = 5 min. The response is slower as expected, but the overshoot has increased to 52%. These simulations clearly demonstrate the poor performance that results from using PI control of liquid levels when the process has units running in series, which is a very common configuration in separation and reaction processes.
end at infinity as KC goes to infinity. The ultimate gain KU = 8 occurs where the two complex conjugate roots cross the imaginary axis at s = i ωu (ωu = 1.73 radians per time). Considering just the two complex conjugate roots, Fig. 7 shows how the closedloop damping coefficient decreases in this thirdorder system as increasing controller gain moves the loci closer to the imaginary axis. To calculate the damping coefficient of the two dominant loci closest to the imaginary axis, the values of the three roots were calculated at each value of controller gain using Matlab rlocus function. Then the real and imaginary parts of the two complex roots were used to calculate an equivalent closedloop damping coefficient. An underdamped second-order system has a characteristic equation
4. Controller tuning
τ 2 s2 + 2τ ζ s + 1 = 0
3.1. PI controllers magnify flowrate disturbances
Many controller tuning methods have been developed over the years for linear systems. Root locus methods are very instructive because they provide a clear picture of what happens as the controller gain changes. A root locus plot shows how the roots of the closedloop characteristic equation vary as a function of controller gain. Fig. 6 gives results for a typical third-order process with a proportional-only controller. The openloop transfer function has three repeated poles at s = −1.
gP ( s ) =
1
(s + 1 )
The complex conjugate roots are
s = Re(s ) ± i Im(s ) =
There are three loci starting when KC = 0 at s = −1 where the closedloop damping coefficient ζ CL is equal to unity and the loci
τ
±i
1 − ζ2
τ
Knowing the real and imaginary parts, the damping coefficient ζ can be calculated.
ζ=
1
Im 2 Re
3
−ζ
+1
Almost all typical control loops display this trade-off shown in Fig. 7 between performance and robustness. Increasing controller gain gives a faster response (smaller closedloop time constant) but
W.L. Luyben / Journal of Process Control 86 (2020) 1–8
gives a smaller damping coefficient. However this is not true for a liquid level loop when a PI controller is used. First let’s see what the root locus plot looks like when a proportional-only controller is used. The total openloop transfer function for the tank in our simulation is
gtotal (s ) = gP (s ) gT (s ) gV (s ) =
−1/1.41 100% 0.8 m3 /min s
2.4 m
100%
−0.2364 gTotal (s ) = s Fig. 8 gives the root locus plot showing that the closedloop process is always stable and is never underdamped. A simulation note might be useful about using the Matlab rlocus function. It always uses positive controller gains, so the process gain of gTotal(s) should be made positive to give realistic results. Now let’s see how a PI controller affects the root locus plot for level control. The transfer function for a PI controller must be used in gTotal(s) .
gTotal (s ) =
−0.2364 τ s + 1 I
s
5. Load and setpoint responses of P controllers An interesting feature of proportional-only controllers when used to control level is the absence of offset when the disturbance is a change in setpoint. Of course, as expected, offset does result when load changes occur. To illustrate this feature let us consider a single tank with the process, load, transmitter and valve transfer functions discussed above with the block diagram shown in Fig. 2. There are two closedloop transfer functions. The “servo” transfer function relates the response of the controlled process variable to a change in the controller setpoint. Using Aspen Dynamics labeling, the signals into the controller are the process variable signal (PV) from the transmitter and, the setpoint signal (SP). The controller output signal (OP) goes to the valve in the exit line.
PV(s ) gP (s ) gC (s ) gT (s ) gV (s ) = SP(s ) 1 + gP (s ) gC (s ) gT (s ) gV (s ) =
τI s
Using an integral time of τ I = 2 min gives the root locus plot shown in Fig. 9. The two loci start at the original when Kc = 0. One root ends at minus infinity and the other ends at the zero of the total transfer function (s = −1/τ I = −1/2) as controller gain goes to infinity. The damping coefficient ζ is zero when the gain is zero but increases as gain increases as shown in Fig. 10. When the roots come together on the negative real axis the damping coefficient is unity. The controller gain at this point is Kc = 5.7. These root locus plots provide a clear picture of why the tuning of PI controllers in level loops is more complex and much more confusing that the recommended P controllers.
7
1
0.2364 Kc s Kc + 0.2364 s
0.2364 Kc s + 0.2364 Kc
=
Using the final value theorem, the value of the transfer function as time goes to infinity is found by setting “s” equal to zero. So the transfer function goes to unity, which means that the level will go to value of the setpoint even if the controller is proportional-only. This occurs because the process transfer function is an integrator. In contrast, the closedloop “load” transfer function is
PV(s ) gL ( s ) = Fin(s ) 1 + gP (s ) gC (s ) gT (s ) gV (s ) =
1+
1/A s 0.2364 Kc s
=
0.704 s + 0.2364 Kc
Fig. 10. Effect of controller gain on damping coefficient; PI controller.
8
W.L. Luyben / Journal of Process Control 86 (2020) 1–8
The value of this transfer function as “s” goes to zero is clearly not unity. As expected, the magnitude of the offset depends inversely on the controller gain. 6. IMC-Based tuning for level control One of the reviewers of this paper made the suggestion to “study the IMC-based PI procedure for an integrator. For the process transfer function, k/s, and a desired closed-loop response of (2∗ lambda∗ s + 1)/(lambda∗ s + 1)^2, the PI parameters are kc = 2/(k∗ lambda) and tauI = 2∗ lambda. Now, you can construct a root locus plot where lambda is varied, rather than arbitrarily selecting tauI = 2 min and varying kc.” The process openloop transfer function is gp(s) = Kp /s and the transfer function of a PI controller is gc(s ) = KC loop characteristic equation is
1 + gP (s ) gC (s ) = 1 +
K P
s
KC
(τI s+1 ) τI s . The closed-
( τI s + 1 ) =0 τI s
τI s + KP KC τI s + KP KC = 0 2
Now substituting the IMC-based tuning parameters in which
τ I = 2λ and KC = 2/(λ KP ) gives
(2λ )s2 + KP
2 2 =0 (2λ ) s + KP λ KP λ KP 2
(2λ )s2 + 4 s +
λ
=0
λ2 s2 + 2λ s + 1 = 0 The standard form of an underdamped second-order closedloop system is
(τCL )2 s2 + 2τCL ζCL s + 1 = 0 where τ CL = closedloop time constant
ζCL = closedloop damping coefficient Thus, as expected, IMC tuning gives a closedloop time constant equal to the specified λ. Note that IMC tuning gives a closedloop
damping coefficient of unity so the response is not oscillatory.
2τCL ζCL = 2λ 2λζCL = 2λ ζCL = 1 Note also that two roots of the closedloop characteristic equation are repeated and real.
s1 = s2 = −1/λ So the plot suggested by the reviewer (closedloop roots versus
λ) is simply a line on the negative real axis starting at negative infinity when λ = 0 and going to the origin as λ goes to infinity. Another point worth mentioning is that if a conventional root locus plot is made (closedloop roots versus controller gain) using the IMC-based integral time, the plot looks like Fig. 9 and the location of the two roots when the controller gain is equal to the IMC-based gain is where they hit the negative real axis. 7. Conclusion The control of liquid level in a vessel is characterized by simplicity (if proportional control is used) and complexity (if proportional-integral control is used). This brief tutorial has attempted to point out the problems that can be encountered if the plant culture requires PI level control. Tuning is counter-intuitive, but most importantly, plantwide control of units in series is drastically degraded because of the inherent amplification of flowrate disturbances. Declaration of Competing Interest None References [1] P.S. Buckley, Techniques of Process Control, Wiley, 1964. [2] F.G. Shinskey, Process-Control Systems, McGraw-Hill, 1967.