Adaptive cascade control with an adjustable identification interval

Adaptive cascade control with an adjustable identification interval. Wei Hsiung Ou, and Wen Teng Wu. Ind. Eng. Chem. Res. , 1989, 28 (12), pp 1823–1...
0 downloads 0 Views 585KB Size
Ind. Eng. Chem. Res. 1989,28, 1823-1828

1823

Adaptive Cascade Control with an Adjustable Identification Interval Wei-Hsiung Ou and Wen-Teng Wu* Department of Chemical Engineering, National Tsing Hua University, Hsinchu, Taiwan, ROC Adaptive PID control for cascade control systems has been developed. Controller tuning is based on adaptive models. Parameters of the models are identified by using weighted least-squares estimation via recursive formulas. The identification interval, which is different from the sampling interval, is automatically adjusted. The difficulties of choosing the identification interval and tuning controllers for cascade control systems are avoided. Both simulation and experimental results show satisfactory results. Cascade control systems are still widely used in process industries. A cascade control system consists of a primary (or master) controller and a secondary (or slave) controller. There are two types of cascade control. One is in series and the other is in parallel (Luyben, 1973). Both types give better performances for load changes (Chiu et al., 1974). Many investigations about cascade control have been done. Seraji (1975) proposed a design method for constant cascade controllers. Brantley and Leffew (1981) presented applications of dynamic simulation to a cascade system and proved its usefulness in design and analysis. Yu and Luyben (1986) provided a criterion of conditional stability for both series and parallel cascade control systems. Most of the analysis and design methods for cascade control belong to off-line approaches. Adaptive control has attracted considerable interest in recent years (Astrom and Wittenmark, 1973; Clarke and Gawthrop, 1975). In the present study, adaptive cascade control with an adjustable identification interval is developed. The identification interval is different from the sampling interval. On-line identification is then carried out with a computation algorithm which can automatically select the identification interval. An identification model via weighted least-squares estimation is obtained in a continuous form. For control system design, the identified model and the actual system should have the same number of unstable poles. The cascade control system in series is investigated. Both stimulation and experimental studies give satisfactory results. Extension of the proposed method to the cascade control system in parallel is straightforward.

Parameter Estimation Consider a cascade control system. The block diagram is shown in Figure 1. Let the governing equations of the processes be expressed as a1,yi2)(t)+ alzYp(t) + a101(t) = Y2W a,,yP(t)

+ azghl'(t) + a202W

=Udt)

(1) (2)

where the superscripts (1) and (2) respectively denote the first and second derivatives with respect to time. Integration of (1) and (2) twice from ti to ti+lyields

allbl(ti+l) - ~ l ( t 1 )+) alg\-')(t;ti,ti+,) + a10i-2)(t;ti,ti+l)- allYil)(ti)(ti+l- t i ) alOl(ti)(ti+l- ti) = Yh-2)(t;ti,ti+J(3) and

a21b2(ti+l)- ~ 2 ( t i ) )+ a2gk1)(t;ti,ti+1)+ a2&-2)(t;ti,ti+l) - a21yL1)(ti)( t i + l - ti) a202(ti)(ti+l - ti) = Uk2)(t;ti,ti+l)(4) where ti denotes the identification time at the ith step. 0888-5885/89/2628-1823$01.50/0

y(-l)(t;ti,ti+Jand ~ ( - ~ ) ( t ; t & + respectively J represent the first and second integrations with limits of integration from ti to ti+l. The integration interval is equal to the sampling interval. Since the interval is very small, integration is carried out by using the trapezoidal rule. To eliminate the initial values especially for the derivatives of y l ( t ) and y2(t) at each identification step, integration of (1)and (2) from ti to ti+2is also carried out. We have the following two equations: allbl(ti+2) - yl(ti)) + a1~j-')(t;ti,ti+2)+ a10$-2)(t;ti,ti+J- a11y\')(ti)(ti+2 - ti) algl(ti)(ti+2- ti) = ~h-~)(t;ti,ti+z) (5) and

a21b2(ti+2)- Y2(ti)) + azgh-')(t;ti,ti+2)+ a20h-2)(t;ti,ti+2)- a21yi1)(ti)( t i + 2 - ti) a2gz(ti)(ti+z- ti) = ~L-~)(t;ti,ti+,) (6) Let ti+l be written as (7) ti+l= ti + nih where ni is the number of sampling times between ti and ti+l;h is the sampling interval. ti+2can be expressed as ti+z - ti + (ni + ni+& = ti + n;*h (8) where ni* is ni + ni+l. The differences between (5) and (6) multiplied by ni and (3) and (4)multiplied by ni* respectively give

-

niyh-2)(t;ti,ti+2)ni*yL-2)(t;ti,ti+1)= all[nibl(ti+2)yl(ti)) - ni*bl(ti+l)- ~ 1 ( t i ) ) I+ a12(niy~-')(t;ti,ti+,)-

ni*y(%;ti,ti+,))

+ ~,,(niy\-~)(t;ti,ti+z) - ni*Y\-2)(t;ti,ti+J) (9)

and

niuL-2)(t;ti,ti+2)- ni*uh-2)(t;ti,ti+,)= a21[ni(u2(ti+2) Yz(ti))- ni*(yz(ti+i)- ~ 2 ( t i ) ) I+ ~22(niyh-')(t;ti,ti+z) ni*yh-')(t;ti,ti+l))+ ~z,(niyh-~)(t;ti,ti+z) - ni*yh-2)(t;ti,ti+l)) (10)

Equations 9 and 10 are the model for system identification. Since the initial values, yl(ti),y2(ti), Y\')(ti), and y f ) ( t i ) , have been eliminated, it is convenient for step-by-step identification. The initial parameters of the model are estimated as shown in the following paragraph. The first m equations of (9) and (10) from t = to up to time t = tm+lin vector form are expressed as = *1(1)4

(11)

and

B2W =

@2(1)e,

0 1989 American Chemical Society

(12)

1824 Ind. Eng. Chem. Res., Vol. 28, No. 12, 1989

where

r

noy;-2)(t;to,tz)- no*Yp)(t;to,tl) n1y$-')(t;tl,t3) - nl*y&-2)(t;tl,t2)

1 Figure 1. Block diagram

The second step is to add new data. The weighting factor, wb,,(i), is in the form of exponential data weighting (Goodwin and Sin, 1984). The desired parameter vector 8(i+l) is obtained as

$jT(i+m)8j*(i)], j = 1 or 2 (17) The term Pj(i+l) is given by Pj(i+l) =

A[Pj*(i) wb, j ( 2 )

n,*y/-')(t;t,,tz),n1yj-2)(t;t1,tJ - n,*yj-2)(t;t1,tz)

1

Pj*(i)+j(i+m)$jT(i+m)Pj*(i) wb, j(i)

+ $jT(i+m)Pj*(i)$j(i+m)

j = 1 or 2 (18) nm-Ib,(tm+l) - ~,(tm-l)) - nm-l*b,(tm) nm-lYj-')(t;tm-l,tm+1)

-

The parameter vector aj(i) at each identification step is obtained by using the recursive formulas, (15)-(18). An identified model used for control system design is obtained as

- y,(tm-1)),

nm-l*y(-')(t;tm-l,tm),

nm-*yj-2)(t;tm-l,tm+1) - n,-,*y(-2'(t;tm-1,t,j [*:(I),

*.,T(2),

. , *',T(m)lT, hT =

j

= 1 or 2

[all, a12, ala]

(13~)

cill(i)y!2'(t)+ ci12(i)y!1)(t)+ ci13(i)Yl(t) = y2(t) (19)

(13d)

fi21(i)Yb2)(t)

and (134 0ZT = [%!I, a22, a231 By using a least-squares estimation, the estimated parameter vectors of el and t$ are determined by

8, =

[ @J1)a, (1)1 - 1 q 1,a, (1) P1(1)@,W,(1),J = 1 or 2

+ ci22(i)yh1'(t)+ fi23(i)yZ(t) = u2(t) (20)

where i denotes the ith identification step. Selection of weighting factors, w,,j(i) and wb, j(i), is similar to that proposed by Wu et al. (1987) for single-inputsingle-output discrete-time systems. For simplicity, we define the following variables: e j ( i ) = uj(i+m)- qjT(i+m)aj(i)

(21)

em,j(i) = uj(i)- ~;T(i)8~(i)

(22)

(14)

where 8, is the estimated value of 0,. P (1)is [@?(l)@,(l)]-l, where the inverse of the matrix exists.

@y(l)@,(l)

Weighted Moving Identification Weighted moving identification is a method of successive parameter estimation by using weighted least-squares estimation. The initial values of the parameters are obtained from (14). The estimation method consists of two steps. One is for the step of discarding old data. The other is for the step of adding new data. Two weighting factors are chosen to ensure that the identified model has a good tracking property and that estimated parameters are convergent. For the first step, the recursive formula is given by

aj(i) = +jT(i+m)Pj(i)+j(i+m) am,j(i) = am,

$jT(i+m)Pj(i)+j(i)

j(i) = +jT(i)Pj(i)$j(i)

(23)

(24) (25)

Under the convergent property condition, tub,&) can be chosen to be between zero and one or a variable forgetting factor. ~ ~ , is ~ determined ( i ) as follows (Wu et al., 1987):

i

cj(i),

ua,,(i)=

if e$,j(i) + e!(i)# 0 and cj(i) < w g ( i )

wg;l(i), if eL,j(i)+

# 0

and cj(i) 2 tug$)

(26)

0 , if e$,j(i)+ e?(i)= 0

where [Uj - +jT(i)8j(i)], j = 1 or 2 (15) where 8j*(i) is an intermediate parameter vetor; wa, .(i) is a weighting factor in the form of selective data weighting (Goodwin and Sin, 1984). The term Pj*(i), which will be used in the next step, is determined by using the following equation:

cj(i) = [o.99ei2(i)]/[wb,j(i)ek,j(i) + aj(i)ek,j(i)2am,j(i)ej(ikm,j(i) + a m m ,j(i)ej(i)I

The reason for using weighted identification is that it is a general method. When w,(i) = 0 and wb(i) = 1,it is the conventional least-squaresestimation. For the case of w,(i) = wb(i) = 1,it becomes the finite data window estimation. For wa(i) = 0 and wb(i) = wb(i), the method is the leastsquares estimation with exponential data weighting. Another important step for system identification is identification interval selection. The interval is determined

Ind. Eng. Chem. Res., Vol. 28, No. 12,1989 1825 4'00

7 6.00

p 1 -

l.00

0.00

200

0

400

600

t

t 20.00

1

15.00

a(2,j)

a l l , jl

10.00

5.00

0.00 200

400

JL

10.00

6.00

600

t

t

15.00 Kcl 10.00

6.00 p, 1 ,D

P,I,O 4.00

Til

1

5.00

2.00

0.00 0

200

400

600

0.00 0

200

400

600

t

t

Figure 2. (a, top left) Output response of example 1. (b, top right) Control variable of example 1. (c, middle left) Parameters all, a12,and alSof example 1. (d, middle right) Parameters aZ1,a=, and aB of example 1. (e, bottom left) Controller parameters Kcl, Til,and Tdl of example 1. (f, bottom right) Controller parameters Kcz,Ti2,and Td2of example 1.

by three requirements. They are based on measurement noise, adaptation gain, and model error. The measurement noise requirement is to test the error between the present output y j ( t )and the last identification output yj(ti!. If the error, bj(t) - yj(ti)l,is larger than a given value, identification is required. It then goes to the next step for other tests. The second step is to test the adaptation gain. The determinant, det [P,(i+l)], is used. P,(i+l) is the P*(i) plus the information of the test output yj(t). If the determinant is very small, the set of equations for parameter estimation may be ill-conditioned (Reddy and Rasmussen, 1982). The requirement of adaptation gain test ensures the determinant to be larger than a given value. The last step is to test the model error. The error is defined as the difference between the process output yl(t) and the calculated output g,(t). If the error, (yl(t) - Y1(t)l, is larger than a given value, an identification step is carried out. y(t) becomes ~ ( t ~ + The ~ )identification . interval (ti+l - ti) is then determined. When the system approaches a steady state, ti+l- ti may

Figure 3. Cascade control system.

become a very large number. Hence, it is necessary to restrict ti+l- ti to a finite value. We set the maximum value of ti+l- ti to be equal to the estimated time constant. In this case, the parameters are not estimated.

Adaptive PID Controller Tuning Controller tuning is based on the first-order plus dead

1826 Ind. Eng. Chem. Res., Vol. 28, No. 12, 1989 100.00

10.00

80.00

1

60.00

t

Temp.

~

/

L^

-_--

--i

,I

1102

--/-------

u,iti

ioc1

( V a l ts

A

20.00

'

0.00

2.001

I

0

300

600

900

'

1 I

0.00

1200

0

300

K I10 secl

t 110

al1,j)

900

600

1200

sec)

al2,jl

'

-2.00

0

I 1 300

603

900

-2.00

1200

0

300

t 110 s e c ~

600

900

1200

t I10 sec)

16.00

I

-2.00

1

0

300

600

900

-5.00

' 200

'

0

I 300

t 110 see)

600

900

1200

t I10 secl

Figure 4. (a, top left) Temperature responses of the stirred tank and its jacket with respect to time in sampling periods. (b, top right) Control variable with respect to time in sampling periods. (c, middle left) Parameters all, a12,and a13with respect to time in sampling periods. (d, middle right) Parameters aZ1,aZ2,and aZ3with respect to time in sampling periods. (e, bottom left) Control parameters Kel, Til, and Tdlwith respect to time in sampling periods. (f, bottom right) Control parameters Kcz, Ti,, and Td2 with respect to time in sampling periods.

determined by using the following equations (Smith and Corripio, 1985):

and l.ll6~~~(i) (33) ~ ~ ~ ( i~ ) ~ ~+ (l.20€h12(i) i ) -TdZ(i) - - 1.11 6 ~ ~ 2 ( i ) (34) ~ ~ ~ ( iT Z)l ( i ) + l . 2 0 8 ~ ~ ~ ( i ) (29) and (30)are the desired model for controller design.

-Tdl(i) - -

Ind. Eng. Chem. Res., Vol. 28, No. 12, 1989 1827 The design criterion is based on the ITAE (integral of time weighted absolute error). The formulas of parameter setting for PID controller are given by (Smith and Corripio, 1985) (a) for set-point change (35)

(36)

T*(i) = C37pj(i)[T*(i) /7pj(i)Ib3

(37)

where c1 = 0.965, cp = 0.796, c3 = 0.308, bl = -0.855, bz = -0.147, and b3 = 0.9292 and (b) for disturbance input

(39)

where c1 = 1.357, c2 = 0.842, c3 = 0.381, bl = -0.947, b2 = -0.738, and b3 = 0.995. At each identification step, ~ ~ ~7 (z(i), i )7dl(i), , T&), Kl(i) and Kz(i)are determined. Hence, t i e controller parameters, K&), Ti($,and Td(i) are obtained by using (35)-(40).

Illustrative Examples Two examples are given to illustrate the proposed algorithm. Example one is a simulation study. A higher order cascade system is considered. Example two is on-line control of a heating tank. Experimental investigation is carried out. Example 1. Consider a higher order cascade system with the governing equations as 1

yi3'(t)+ 6yiZ)(t)+ 11yi1)(t)+ yl(t) = jYz(t) and

+

+

yb4)(t)+ 19yb3)(t) 126y(L2)(t)+ 324yb1)(t) 216yp(t) = 216uz(t) The initial condition is at a zero state. It is desired to control yl(t) at yl(t) = 1. The operational variables are given as follows: sampling interval, h = 0.05; number of equations for initial estimation, m = 8; weighting factors, wbl(i) = wb2(i) = 0.9. The output and input data are shown in parts a and b of Figure 2. The identified parameters, all(t),a12(t),a13(t),azl(t), apz(t),and ~ ~ ~are ( tshown ) , in parts c and d of Figure 2. The controller parameters, KCl(t),Kc2(t),Til(t),Ti2(t), Tdl(t), and T&(t),are shown in parts e and f of Figure 2. Example 2. An experimental study is considered (Ou, 1989). The schematic diagram is shown in Figure 3. The liquid volume in the stirred tank (R-101) is 5 L. The output of the primary controller is set for the set point of the secondary controller, which is used for manipulating the flow rate of the heating medium from the tank (H-101). The temperature of the tank (H-101) is held at 70 "C

throughout the operation. The temperature of the tank (F-101) is 28 "C. The feed rate from F-101 is held constant at 395 mL/min. Initially, the temperature of the stirred tank (R-101)and its jacket are at 28 "C. The set point is 45 "C. At the step of 600 sampling periods, the feed rate is changed from 395 to 495 mL/min, where the sampling period is 10 s. Figure 4a shows the temperature responses of the stirred tank and the jacket, respectively. Figure 4b shows the control variable from the computer output. The output range is from 0 to 10 V. The parameters, all, a12,and ~ 1 3 of , the primary process model are shown in Figure 4c. aZ1,aZ2, and a23 of the secondary one are shown in Figure 4d. Parts e and f of Figure 4 show the controller parameters. It is shown that cascade control based on our proposed method has satisfactory results both for the start-up and the load change.

Conclusions Adaptive cascade control with PID controllers has been developed. Controller tuning is based on an identified model at each identification step. A computation algorithm for selecting identification interval is used. The difficulties of choosing the identification interval and tuning controllers for cascade control systems are avoided. Control loops with a large dead time are not considered in the present study. Basically, it is not suitable to control the system by using simple PID controllers. Nomenclature a,, = parameters of (1)and (2) e,, em,]= scalar defined by (21) and (22), respectively K,, K2 = process gain K , = proportional gain of PID controller h = sampling interval n, = number of sampling times between t, and t,+l P, = adaptation gain matrix defined by (14) t = time t, = identification time at the ith step T, = reset time Td = derivative time constant u = control variable U, = scalar defined by (13a) and (13b) wa,,, wb,= weighting factors y = output variable

,

Greek Symbols a],a,,,,, CY,,,^ = scalar defined by (23), (241, and (25) S, = vector defined by (13a) and (13b) CP = matrix defined by (13c) = element of matrix CPl 0 = parameter vector T,, = time constant Td = delay time 7p = time constant

+,

Literature Cited Astrom, K. J.; Wittenmark, T. On Self-Tuning Regulators. Automatica 1973,9, 185. Brantley, R. 0.; Leffew, K. W. Do You Need Cascade Control. Hydrocarbon Process. 1981,March, 139. Chiu, K. C.; Corripio, A. B.; Smith, C. L. Tuning Cascade Control Systems. Znstrum. Control. Syst. 1974,Jan, 65. Clarke, D. W.; Gawthrop, P. J. Self-Tuning Controller. Proc. ZEE 1975,122,929. Goodwin, G . C.; Sin, K. S. Adaptive Filtering Prediction and Control; Information and System Science Series; Prentice-Hall: Englewood Cliffs, NJ, 1984. Luyben, W.L. Parallel Cascade Control. Znd. Eng. Chem. Fundam. 1973,12, 463.

1828

Ind. Eng. Chem. Res. 1989,28, 1828-1834

Ou, W. H. System Identification And Control With An Adjustable Identification Interval. Ph.D. Thesis, National Tsing Hua University, Hsinchu, Taiwan, R.O.C., 1989. Reddy, J. N.; Rasmussen, M. L. Advanced Engineering Analysis; Wiley: New York, 1982. Seraji, H. Design of Cascade Controllers for Zero Assignment in Multivariable Systems. Int. J. Control 1975,21, 485. Smith, C. A.; Corripio, A. B. Automatic Process Control. Wiley: New York, 1985; Chapter 6.

Wu, W. T.; Chu, Y. T.; Chen, K. C. Moving Identification via Weighted Least-squares Estimation. Int. J. System Sei. 1987,18, 477. Yu, C. C.; Luyben, W. L. Conditional Stability in Cascade Controller. Ind. Eng. Chem. Fundam. 1986,25, 171.

Received for review September 16, 1988 Revised manuscript received May 1, 1989 Accepted August 31, 1989

Adaptive Optimizing Control of Multivariable Constrained Chemical Processes. 1. Theoretical Development Randall C. McFarlanet and David W. Bacon* Department of Chemical Engineering, Queen’s University, Kingston, Ontario, Canada K7L 3N6

An adaptive optimizing control system has been developed for multivariable constrained chemical processes. Previous optimizing control methods have had one or more drawbacks, for example, the need for mechanistic process models for steady-state optimization or the use of nonadaptive control systems. The optimizing control method proposed in this paper is based solely on an empirical dynamic process model, which is identified adaptively on-line. Dynamic information from the identified models is used for on-line updating of a multivariable Internal Model Controller. Constrained steady-state optimization is accomplished using steady-state information from the identified model in an on-line application of sectional linear programming. In the accompanying paper (part 2), the optimizing control strategy is tested on simulations of two nonlinear constrained processes which are multivariable and interacting: a CSTR system supporting a multiple reaction and a fluid catalytic cracker. Economic optimum performance of most industrial processes occurs at an intersection of constraint boundaries. Disturbances acting on a constrained process limit its economic potential in that steady-state operating points must be moved away from constraint boundaries in order to minimize the risk of constraint violations. A regulatory controller reduces the effect of these disturbances on a constrained output variable, permitting its setpoint to be placed closer t o the constrained optimum, thereby improving the economic return of the process. The effects of disturbances on a process, including those which are nonstationary, are often considered only in the context of this regulatory control problem. However, nonstationary disturbances may have additional impact on a constrained process; they are capable of shifting the positions of constraint boundaries sufficiently to relocate a constrained optimum to different intersections of constraint boundaries. In these situations, an optimizing control system can achieve significant gains in process profitability over that possible from simple regulatory controllers acting alone. In optimizing control, frequent steady-state reoptimization is performed on-line to track the constrained optimum as it shifts in response to nonstationary disturbance(s) acting on the process. Regulatory controllers counter the effects of any additional disturbances, allowing the setpoints of controlled variables to be placed closer to the current constrained optimum. Chemical processes that are candidates for optimizing control often involve complex reaction and separation systems and as such are typically multivariable, interacting, and nonlinear. For such processes, the design of an optimizing control strategy can be a complex undertaking

* Author to whom correspondence should be addressed. Current affiliation: Amoco Corp., Amoco Research Center, Naperville, IL 60566.

0888-588s189/2628-1828$0l.50J O

which may not be economically justified, particularly if the strategy requires prior development of mechanistic process models. The emphasis in this paper is on the development of a general approach to optimizing control using empirical rather than mechanistic process models. Due to the potentially complex nature of the process characteristics mentioned above, the design problem for servo and regulatory control in an optimizing control application can be a difficult one. Controller designs typically utilize process models that are approximate linear representations of local dynamic process behavior. These designs perform well if operation is restricted to a sufficiently small region around the operating point at which the model was identified, but a fixed-parameter controller cannot be expected to maintain satisfactory performance for a nonlinear process as steady-state optimization moves are made across a potentially large feasible operating region. An alternate approach, and the one adopted in this study, is to use an adaptive controller in which on-line updating of controller parameters is triggered by steady-state optimization moves. Interaction between process variables is particularly detrimental in an application where optimizing control is beneficial. During a period of on-line steady-state optimization, it can be expected that the constraints on some controlled outputs will be active while others will be inactive and that the status of any particular constraint might change as the optimization proceeds. To avoid constraint violations, setpoint changes to controlled outputs with inactive constraints must be accomplished with minimal disruption to the controlled outputs which are being held close to their constraint boundaries. A control system based on multiple single-input/single-output(SISO) control loops does not achieve decoupling of interacting variables and therefore in general will not be suitable for an optimizing control application. To avoid this 0 1989 American Chemical Society