Copyright © IFAC Intelligent Tuning and Adaptive Control, Singapore 1991
PRACTICAL ADAPTIVE LEVEL CONTROL OF A THERMAL HYDRAULIC PROCESS J. Z. Liu*, B. W. Surgenor** and J. K. Pieper** *Dept of Thermal Power Engineering, Nonh China Institute of Electric Power, Baoding, Hebei. PRC *-Dept. of Mechanical Engineering, Queen's University. Kingston, Ontario. Canada, K7L 3N6
Abstract. Presented is an extension to Clarke and Gawthrop's design for a SelfTuning Controller (STC) to enable application to a practical process. Additions include a process monitor to oversee operation of an estimator switch, an intelligent integrator, feedforward action, nonlinear valve compensation, anti-windup reset protection, and provision for bumpless transfer . The augmented rule-based design is referred to as a Practical Self-Thning Controller (PSTC) to differentiate it from the original design. The PSTC design is successfully applied to level control of a thermal hydraulic process. The new design demonstrates a 43 % improvement in performance when compared to a conventional well-tuned constant gain controller. J( eywords: Adaptive control; Control applications; Conventional control; Level control; Recursive least squares; Self-tuning regulators
INTRODUCTION
system. It was observed that optimum performance was achieved with the addition of i) an estimator switch, ii) an "intelligent" integrator iii) feedforward action, iv) nonlinear valve compensation and v) a start-up procedure with bumpless transfer from constant gain to adaptive control modes. The term Practical Self-Tuning Controller (PSTC) was adopted to highlight the new features of the STC design.
Adaptive control methods can provide a systematic yet flexible approach to the regulation of processes which are not well understood, are slowly time varying, or which have significant nonlinearities (Chien et ai, 1985). It is expected that the adaptive system can achieve effecti ve control and good system performance with respect to energy savings and product quality. However, even though there is much effort leading to significant advancements in theory (A.strom and Wittenmark, 1989, and Seborg et ai, 1986), in practical situations, adaptive controllers tend to fall short of expectation (Fernandes et ai, 1989, and Astrom, 1987). A good practical adaptive control scheme will require not only a robust design method, but also a robust process parameter estimation scheme integrated together (Wittenmark and A.strom, 1984, and Song et ai , 1986). In this way, control can be achieved of processes with the above mentioned characteristics and also unmodelled high frequency dynamics and disturbances which commonly affect industrial processes. A study was conducted to examine and improve the performance and robustness properties of Clark~ and Gawthrop's (1975) design for a direct adaptive Self-Thni,ng Controller (STC) as applied to level control in a thermal hydraulic
PROCESS DESCRIPTION The thermal hydraulic process under study is illustrated in Figure 1. The apparatus is a direct contact heater similar to a power plant deaerator , The process has three control loops: level, temperature, and flow. Level is measured as the height of the column of water in a standoff tube connected to the main tank. This gives a lagging response of the measured to actual level. A pneumatically operated globe valve between a constant head source and the tank governs the inlet flow rate , The outlet delivery flow is controlled by a motor driven ball valve with the flow rate measured by a paddle wheel flowmeter, The temperat.ure loop is not used in this study and consequently the steam supply is shut-off, The important process characteristics are: • There are nonlinearities in the dynamics over the range of operating conditions. 313
discrete time domain by:
• There is significant pure dead time.
= q-d
A(q-l) y(k)
• Random input disturbances exist . • The process is marginally stable in that the outflow is not a function of tank level.
+ C(q-l) ~(k)
The last point implies that the system operates with a free integrator in the forward path.
+ ... + bn
(1)
u(k)
= Yr(k + d + 1) -
£PT(k) O(k)
The process to be controlled, with input u(k), output y(k) and disturbing noise ~(k) (with a white gaussian distribution) , is described in the
O(k)
= ( -y(k)
- y(k - 1) . .. - y(k - n
1
j
COLD WATER
...-___1····-··········-··
0'1
...
O'n-l
=n + d -
T
+ 1) (7)
/31 /32 .. . /3p ) T (8)
1
Note that £P( k) and O( k) are the measurement and control parameter estimate vectors, respectively. The 0' and /3 parameters of equation (8) are obtained from the solution of equation (9), which provides the transformation from the a and b parameters of equations (3) and (4) . This STC design will minimize the following cost function:
I
1
STEAM ....~h,..-!-+
= ( 0'0
where p
_--------------------------------------_._-------_.-, ..._-_.. _----_._----.-.--."..-----------_. __ ._-----------,
DIRECT CONTACT HEATER
(6)
where d is the estimated system dead time and Yr(k) is the reference input or setpoint . The coefficient /30 requires an estimate of b1 , the steady-state gain for the process . In this application /30 = 0.012 and p = 0.01. The other components of the control law given by equation (6) are found from:
u(k - 1) u(k - 2) ... u(k - p) )
I
(5)
/30 + pi /30
PSTC DESIGN
1
(4)
q-n
where the order of the process is n. In general, the B(q-l) and C(q-l) polynomials will be of degree less than n. In this case, the trailing coefficients should be set to zero ·with no loss of generality in the process description . If it is assumed that only uncolored or un correlated noise enters the process (C(q-l) = 1) then, Clarke and Gawthrop (1975) have developed the Self-Tuning Controller (STC) which, when servo action is included, gives the control law :
£P(k)
LT
00
J( r)
STANDO"
= I: ([y(k) -
yr(k)f
+ pu 2 (k))
(9)
k=O
given exact knowledge of the process . If p = 0 then the STC control objective of equation (9) equates to that for the Self-Tuning-Regulator (STR) design of Astrom and Wittenmark (1973) .
DElIVERY LINE
Figure 1.
q-l
(2)
C(q-l)=l+clq-l+ . .. +cnq-n
As has become the practise, q-l is used to denote the backwards-shift operator . From the model it is seen that the process has open loop poles at +1 and +0.478 . That is, the process has an integrator plus first order lag structure . Based upon this identification result, it was decided to use an adaptive scheme based on a process model order of n = 2, number of transmission zeroes m = 2 and a process delay of d = 5 samples .
HOT WATE R
= bl
B(q-l)
To give an indication of the dynamics of the process considered in this study, a closed loop recursive least squares parameter estimation scheme of the level control loop was implemented to yield the following nominal discrete time model (sample time, T. = 2.5 s) :
0.0243 q-6 (1 + 0.872 q-l) - 1 - 1.477 q-l + 0.478 q-2
B(q-l) u(k)
The thermal hydraulic process.
314
measurement vector,
A recursive least squares (RLS) method is used to estimate the parameters vector 8(k) as given by the following:
= diag2n[1000] 8(k + 1) = 8(k) +. o-(k) f(k) f(k) = y(k) -
[A P(k)
=
+
P(k - 1) cp(kW1
An Intelligent Integrator
(10)
Integral action is used to: 1) eliminate steady state error, 2) provide a static value for controller output, and 3) correct for nonlinearities and inaccurate process models. Disadvantages include windup and inertia problems resulting in large oversh;ot, oscillation and lagging effects, especially in processes with inherently long time delays or unstable open loop poles. To reduce these difficulties, "intelligent" integral action was used in this study according to:
(11) (12)
(13)
(hn - o-(k) cpT(k) ) P(k - 1)/ A
(14) ei
where 0- is the adaptive gain . One can note that unbiased parameter estimates using this method result if C(q-1) = 1 (no coloration of the input disturbance).
RU LE #3
= Yr(k) -
IF
for j RULE #4
To avoid unnecessary computational load on the controller, and to ensure that the covariance matrix, P(k), does not "windup" or experience numerical instabilities, an estimator switch is employed. The two rules given below add hysteresis to the estimation. scheme, and t urn off the update mechanism in steady state conditions.
IF
ly(k)-y(k-hdl>8 1
OR
I u(k) -
IF
(17)
yr(k - 1)
+ j) = 0 1, ... , N.
(18)
IF I ei(k) 1<83 T;=2Tio
ELSE
T;
= T;o
(19)
With the integral action given by:
I(k)
= I(k) + ei(k)/Ti
uc(k) =. u(k)
+ I(k)
(20) (21)
Again, experience has proven the best indicator for the value of the constants in the above mentioned rules . Choosing 83 as 1 or 2 times the inverse of the signal to noise ratio and N. as approximately the process settling time gives good performance . T io should be taken as the reset time for a well tuned constant gain PI controller. For completeness, the actual experimental values were 83 = 0.01, N. = 10 samples and Tio = 60 .
THEN y(k) and u(k) are
RULE #2
= 0,
THEN
u(k - h 2) I > 82
used to update B(k)
-#
yr(k)
TH EN ei(k
The Estimator Switch
RULE #1
y(k)
(15)
estimator switch is ON
TH EN N samples are used for parameter updating (16) The variables 81 , 82 , h 1 , h 2 , and N are user specified constants. Critical values for 81 and 82 are related to the inverse of the signal to noise ratio times a sensitivity factor. Experience has shown good results if this sensitivity factor is in the range 2 to 20. In this case 81 = 82 = 0.15 was used . For the comparison delays, h1 and h 2 , a value of 2 or 3 samples reduces high frequency noise efi"ects while keeping the comparison between current data. A reasonable nominai value for the number of covariance updates is N = 10. Note that when the estimator is switched off, the control law of equation (6) gives a constant gain model based proportional control. The
Feedforward Action Feedforward action can be used to reduce the effects of measurable disturbances. In the case of the thermal hydraulic system considered here, changes in the delivery flow rate will be propogated upstream and appear as a disturbances in the level. Knowledge of the flow rate can be used to compensate:
uJ(k)
= uc(k) + KJ
Q(k)
(22)
with Q( k) as the measured delivery flow and KJ 0.085 as a gain.
=
315
Nonlinear Valve Compensation
There is a significant non linearity in the inlet water valve. A plot of the control signal versus inlet flow gives a nearly quadratic response. This behaviour can be compensated for by a type of inverting prefilter. Such a filter is accomplished by dividing the operating region into two linear parts and adjusting the control as:
IF
RU LE #5
uj(k) > 2.5
TH EN un(k)
= 2.5
+0.75 (uj(k) - 2.5) ELSE
un(k)
= uj(k)
(23)
This rule is applied as the final control action. Anti-Reset Wind-Up
Another add-on feature of many practical industrial controllers is anti-reset wind-up. The integrator term, I(k), may continue to increase in magnitude, either positive or negative, due to a large process error even though the actuator is at its limit. Various anti-reset wind-up protection mechanisms are available. An inelegant but effective method is to simply stop the integrator, by setting Ti large, when the control is near the saturation limit for the actuator. Other techniques can be found in Wittenmark (1989) . A simplified method was incorporated in the design considered here. First the calculated control output was sent through a software saturation limiter according to Rule #6 in parallel to the actual process.
RU LE #6
IF
THEN
ELSE IF TH EN
ELSE
un(k) >
U max
=
U max
uv(k)
Figure 2.
Bumpless Transfer and Start-up
Bumpless transfer avoids disruptions of the system when switching between control algorithms or structures. One method of achieving bumpless transfer is to set:
as the initial value for the STC integrator. For the PSTC algorithm to work effectively, good estimates of the process model parameters are needed. The reasonable initial estimates allow for performance to be maintained within acceptable bounds at all times, even in the initial transients. In order for the RLS scheme to detect good process parameter estimates, the following start-up procedure was adopted:
un(k) < Umin
= Umin uv(k) = un(k) uv(k)
(24)
The integrator of equation (20) is updated by :
I(k)
= I(k -
1. Implement feedback control of the process through an appropriately simple strategy such as PI control.
1) + ei(k)/Ii
+ Ka
Control algorithm flow chart.
(uv(k - 1) - un(k - 1)) (25)
2. Run the process in identification mode for 100 samples, or until proper control law parameters can be found using a PRBS excitation signal (amplitUde = 0.4 v) . At this point the first estimates for /30 and p are obtained .
Again, for completeness , I{a = 2, and for the specific actuators employed, U max = 4.5 volts and Umin = 0.5 volts. It can be seen that if the control is not saturated, the final term of equation (25) is zero and the wind up protection has no effect.
3. If initial parameter estimates are available, Steps 1 and Step 2 can be run using the 316
constant gain minimum variance control law of equation (6) with B(k) = Bo , the initial estimates .
~
~ .~----------------~---------------,
1
4 . Implement bumpless transfer. At this point, fine tuning can be done on-line for f30 and p.
" 60 L ~ 50 ! o
I
·-- .
]:h,_
-I-~ ~ ,-- ---I 1 MP1 .. - - sc= tpoint
10 Ti me (min)
Finally, the full PSTC algorithm is turned on. The PSTC algorithm is summarized in Figure 2 in flow chart form .
MPICONTROL Multi-function PI control (MPI) is essentially classic proportional plus integral control with the addition of practical features developed for the PSTC design. Thus, the MPI design begins with a constant gain proportional controller . To this, intelligent integral action, a feedforward term and nonlinearity compensation are all incorporated for a "multi-function" design. All of these terms require proper tuning. In this study, this procedure was done by hand using a trial and error approach . The control law for MPI is:
u(k)
= Kp(Yr(k) -
y(k))
(27)
followed by the application of Rules #3 to #6 . The MPI control structure was tuned off line following the Ziegler-Nichols (1942). On-line tuning identified Kp = 0.95 and Tio = 100 as providing the best performance .
EXPERIMENTAL RESULTS A set of disturbance rejection and set point change tests were conducted at three operating points: low, mid and high flow rates . To obtain quantitative measures of performance, the Integrated Time Absolute Error (ITAE) and Maximum Percentage Overshoot (MPO) were calculated . The ITAE criterion addresses the need
Figure 4.
Response at mid flow.
to return the process to the set point as soon as possible, yet recognizes that early errors are unavoidable due to the process dead time _ Figure 3 compares the performance of MPI versus PSTC at low flow (15 l/min) in response to step changes in the level setpoint. Figure 4 compares the performance of MPI versus PSTC at mid range flow (20 l/min). The MPI controller was tuned at this mid range condition. The nonlinearities in the process dynamics are evident, given that the tank filling and emptying responses are seen to be quite different. The difference between the filling and emptying responses is even more pronounced at the high flow (30 l/min) condition , as illustrated in Figure SIn comparing the performance of MPI versus PSTC, one observes that PSTC in general shows smaller overshoots and excellent overall tracking performance. Also, the system nonlinearities are removed from the controlled variable, especially at low and mid-range flow . Comparison of the control signal and water level responses indicates a relatiively small amount of lagging effect even though the process dead time is quite long. Table 1 summarizes the ITAE and MPO scores together with the ITAE ratio for PSTC over MP!. In all cases, PSTC matches or exceeds the performance measures for MP!. On average
!~b -t~~",g o
1
3
4
7
B
9
10
Time (min)
Time (min)
;:[ .... . . J\c~.. ....=~i .... 11 ~
E
I
F\
.
1\
1 :rL~""~
-·~~t/
o
51
} 4r
1
~~~f'~~1
I
o
10
o
10
Time (alln)
Figure 3.
Time (roin)
Response at low flow.
Figure 5.
317
Response at rugh flow.
ing parameters are, for the most part, intuitive and easy to select. The performance improvement is judged to be significant, with approximately a 43 % ITAE reduction over an industry accepted constant gain control scheme. Time (min)
i:~
~
~
l
~
11
This work was supported under contract to the Manufacturing Research Corporation of Ontario (MRCO) . One of the authors (JKP) wishes to acknowledge scholarship support from the Natural Sciences and Engineering Research Council of Canada (NSERC).
i
j
0'
o
ACKNOWLEDGEMENTS
~~""'~i ,
1
2
3
4
1
10
Time (min)
Figure 6.
Response to a disturbance.
there is a reduction in ITAE of 43 %. The MPO of the PSTC is considerably smaller, indeed less than half, than that for MPI. This is primarily due to the quickness of the control action and its predictive abilities. This also indicates that the system dead time was accurately estimated in the preliminary commissioning of the control s~heme. As a test of disturbance rejection performance, the drain flow was stepped from 20 to 15 to 20 to 30 IJmin at 2 min intervals. The result is given in Figure 6. In the case of both MPI and PSTC, performance is quite good even though the disturbance 'is quite vigorous. This is likely due to the addition of feedforward action. The IAE scores (no weighting for time) given in Table 1 show a 10 % improvement in PSTC over MPI for the disturbance .
REFERENCES ASTROM , K.J. (1987): "Adaptive Feedback Con-
trol," Proceedings IEEE, Vol. 75, No. 2" pp. 185-217. ASTROM, K.J. AND WITTENMARK , B. (1973):
"On Self-Tuning Regulators ," A utomatica, Vol. 9, pp . 185-199. ASTROM, K .J., AND WITTENMARK , B . (1989):
Adaptive Control, Addison-Wesley, New York .. CHIEN, I.L., SEBORG, D.E . AND MELLICHAMP , D.A. (1985): "A Self-Tuning Controller for Sys-
tems with Unknown or Varying Time Delays ," Int. Jrnl. Control , Vol. 42, No. 4, pp. 949-964. CLARK, D.W. AND GJ\WTHROP, P.J. (1975): "A
Self-Tuning Controller," Proceedings lEE, Vol. 122, No. 9, pp. 929-934. FERNANDES, J.M ., DE SOUZA , C.E. AND GOODWIN, G.c. (1989): "An Application of
CONCLUSIONS
Adaptive Scheme to Fluid Level Control ," Proceedings ACC, Vol. 3 , Pittsburgh, June 21-23 , pp. 1886-1891.
This paper highlights several of the practical problems associated with direct self-tuning control schemes. The additions to the classic design combine for a new algorithm designated as PSTC . The scheme is successfully applied to level control in a thermal hydraulic process. The rules introduced into the design and detailed in this paper are simple in nature and introduce negligible computational expense. Tun-
SEBORG, D.E., EDGAR, T.F . AND SHAH, S . L. (1986): "Adaptive Control Strategies for Process
Control: A Survey," AIChE Journal, Vol. 32 , No. 6, pp. 881-912. SONG, H.K., SHAH , S.L. AND FISHER, D.G. (1986): "A Self-Tuning Robust Controller," Automatica, Vol. 22, No. 5, pp. 521-531. VVITTENMARK, B . AND ASTROM, K.J. (1984):
Table 1.
"Practical Issues in the Implementation of Self-Tuning Control," Automatica, Vol. 20, No. 5, pp. 595-605.
Swnmary of performance results
MPI
PSTC
ITAE
\NITTENMARK, B . (1989): "Integrators, Nonlinear-
Test Flow ITAE MPO ITAE MPO Ratio Setpoint low 14.2 8.8 % 7.89 3.4 % 0.56 mid 11.7 5.2 % 7.37 1.9 % 0.63 high
ities and Anti-Windup Reset for Different Control Structures," Proceedings ACC, Vol. 2 , Pittsburgh, June 21-23, pp. 1679-1683.
13.8 12.6 % 8.61 6.1 % 0.51
Disturb (IAE) 5.22
4.78
ZIEGLER,
J .G. AND NICHOLS, N .B . (1942) .
"Optimum Settings for Automatic Controllers ," Transactions ASAIE, Vol. 64, No. 11, pp.
0.91
759-768. 318