Ind. Eng. Chem. Res. 1994,33, 1493-1500
1493
Time Delay Compensation for Nonlinear Processes Michael A. Henson' and Dale E. Seborg Department of Chemical and Nuclear Engineering, University of California, Santa Barbara, California 93106
A new time delay compensation strategy for nonlinear processes is developed and evaluated. Simulation results for a continuous stirred tank reactor demonstrate that the globally linearizing control (GLC)compensation technique can yield poor performance in the presence of unmeasured disturbances and/or plant/model mismatch. A theoretical analysis of a discrete-time version of the GLC predictor indicates that the poor regulatory performance is attributable to ineffective use of the process state variables, which are assumed to be measured. A new discrete-time prediction strategy is developed which provides improved predictions, yet maintains the desirable characteristics of the GLC approach. A continuous-time version of the predictor is combined with an input-output linearizing controller to yield the new time delay compensation strategy. The proposed scheme is computationally efficient and not restricted to open-loop stable processes. Simulation results for the reactor example demonstrate the superior performance and robustness of the proposed compensation strategy as compared to the GLC approach. 1. Introduction
The dynamic behavior of many processes is significantly affected by time delays attributable to transportation lags and measurement delays. I t is well-knownthat time delays can place severe limitations on achievable control performance (Holt and Morari, 1985; Morari and Zafiriou, 1989). A variety of time delay compensation techniques have been presented for linear dynamic models. The Smith predictor (Smith, 1957) was originally developed for continuous-time models, while the analytical predictor (Moore et al., 1970) was proposed for digital control applications. Both techniques remove the time delay from the characteristic equation if the model is perfect, but they generally yield different closed-loop responses in the presence of plant/model mismatch (Wong and Seborg, 1986). Because these compensation schemes may yield poor regulatory performance (Meyer and Seborg, 19761, several modifications for unmeasured disturbances have been proposed (Watanabe et al., 1983;Wellons andEdgar, 1987). Extensions for multiple-input, multiple-output (MIMO) systems have also been reported (Alevisakis and Seborg, 1973; Jerome and Ray, 1986). For strongly nonlinear processes, time delay compensation techniques which employ nonlinear models can be expected to yield significantly improved performance. However,few nonlinear time delay compensation strategies are currently available. Several nonlinear extensions of the Smith predictor have been proposed (Bartee et al., 1989; Lee et al., 1990; Wong and Seborg, 1988), but most of these techniques are based on input-output models and therefore are not applicable to general state-space models. As discussed in section 2.1, Kravaris and Wright (1989)have developed a more general nonlinear extension of the Smith predictor. It is important to note that nonlinear model predictive control (Bequette, 1991;Biegler and Rawlings, 1991; Meadows and Rawlings, 1993) can provide implicit time delay compensation if the difference between the prediction and control horizons is sufficiently large (Henson and Seborg, 1993). In this paper, a new time delay compensation strategy for nonlinear state-space models is proposed. The paper is organized as follows. In section 2, the globally linearizing
* Author
to whom correspondence should be addressed.
Present address: Department of ChemicalEngineering,Louisiana State University, Baton Rouge, LA 70803-7303.
control (GLC) compensation technique is introduced and applied to a continuous stirred tank reactor example. In section 3, a discrete-time analysis of the GLC prediction scheme is presented and an improved prediction strategy for discrete-time nonlinear systems is developed. A continuous-time formulation of the new time delay compensation strategy is presented in section 4. In section 5, the two compensation techniques are applied to the reactor example. Finally, a summary and conclusions are presented in section 6. 2. The Globally Linearizing Control Technique
2.1. Predictor Design. Kravaris and Wright (1989) have developed a nonlinear extension of the Smith predictor based on input-output linearization theory (Isidori, 1989; Henson and Seborg, 1991). Their globally linearizing control (GLC) approach is depicted in Figure 1 where P is the plant, C is a nonlinear controller, L is a linear controller, and Mp is a prediction model. The technique is based on a continuous-time, state-space model of the form
k ( t ) = 7 ( 2 ( t ) )+ 8 ( 2 ( t ) )u(t-8)
(1)
Y(t) = K(Z(t,)
(2)
where 3i. is a R-dimensional state vector, u is a-scalar manipulated input, Y is a scalar controlled output, 0 is the and estimated time delay in the manipulated input, g(2) are E-dimensional nonlinear vector functions, h(2)is a scalar nonlinear output function, and the tilde (-1 represents model variables. The GLC compensation strategy is based on three important assumptions: (i) the process is open-loop stable; (ii) the process has stable zero dynamics (Isidori, 1989; Henson and Seborg, 1991); and (iii) the process-state variables are available for feedback. The prediction model Mpis constructed as follows. First, the time delay is removed from the model in (1) to yield
f(z)
k*(t) = ?(x*(t)) + g(x*(t))u(t)
(3)
Thenacorrectiontermisadded tox*(t)inordertoimprove the state prediction in the presence of modeling errors and unmeasured disturbances a(t+e)t) = x * ( t )
+ x ( t ) - Ht)
0SSS-5SS5/9~/2633-1~93$04.50/0 0 1994 American Chemical Society
(4)
1494 Ind. Eng. Chem. Res., Vol. 33, No. 6, 1994 Y,&U
-+n
U(t)
0.14
-
0.12
-
-5'C
2p
0.10
u'
L - L + & L Figure 1. Time delay compensation based on state feedback.
rime (rm")
Figure 2. Open-loop response for step changes in the coolant temperature.
Table 1. Nominal Conditions for the CSTR q = 100 L/min -AH = 5 X 104 J/mol C A=~1mol/L p = 1000 g/L Tf 350 K C, = 0.239 J/(gK) 100L 0 = 0.2 min UA = 5 X lo4 J/(min.K) T,= 309.9 K ko = 7.2 X 1Olo min-' T = 383.7 K E / R = 8750 K CA = 0.1 mol/L
0.14-
I
I
I
v=
where x ( t ) is theplant state and R ( t + @ ) is the predicted state at time t 6 based on information available at tiEe t. By comparing (1)and (31, it follows that x*(t)-= Z(t+6) if the predictor is initialized as x * ( O ) = Z(0). This initialization can be achieved at steady state because in this case Z(6) = Z(0). Hence, in the absence of plant/ model mismatch Mpyields the plant state one time delay ahead: R(t+elt) = x(t+6). Note that M,, is an open-loop predictor and therefore is restricted to stable processes. The design of the nonlinear controller C and the design of the linear controller L are discussed in section 4.2. 2.2. Illustrative Example. Consider a continuous stirred tank reactor (CSTR) in which the first-order reaction A B occurs. The CSTR is modeled as (Uppal et al.,1974)
+
a-P . .,
.
::
I
I
I
I
2
3
4
5
Time (nun)
-
(5) I
I
I
,
1
2
3
4
5
Time (nun)
Figure 3. Nonlinear control without time delay compensation for a +25% disturbance in the feed flow rate.
where CA is the reactor concentration, T is the reactor temperature, T, is the coolant temperature, q is the feed flow rate, CAf is the feed concentration, and 6 is the time delay associated with T,. The remaining variables in (5) and (6) are defined in the Nomenclature section, and nominal operating conditions are presented in Table 1. The time delay 0 may be present, for example, because the desired coolant temperature is obtained by mixing two streams with different temperatures. Open-loop concentration responses for *5 O C step changes in the coolant temperature are shown in Figure 2. The reactor exhibits severe static and dynamic nonlinear behavior for these small input changes. The control objective is to maintain the reactor concentration CAat its setpoint (0.1 mol/L) by manipulating the coolant temperature T,, which is constrained to be between 275 and 375 K. Measurements of both CAand T are available. Figure 3 shows the performance of an input-output linearizing controller without time delay compensation for a +25% unmeasured disturbance in the feed flow rate. The design and tuning of the linearizing controller are discussed in section 5. As expected, excellent
performance is obtained when a time delay is not present (6 = 0). However, an oscillatory response occurs when 6 = 6 s and the closed-loop system is unstable when 6 = 1 2 s. These results demonstrate that the CSTR requires a nonlinear control strategy which provides time delay compensation. Although the setpoint tracking capabilities of the GLC time delay compensation technique has been investigated (Kravaris and Wright, 1989), results for unmeasured disturbances have not been presented. Figure 4 shows the performance of the GLC controller with time delay compensation for the nominal time delay (0 = 12 s) and +25 % unmeasured disturbance in the feed flow rate. The design and tuning of the GLC controller are presented in section 5. The GLC controller actually performs worse than the feedback linearizing controller without compensation shown in Figure 3. As discussed in section 5, the GLC controller also yields poor responses for other unmeasured disturbances. These results motivate a theoretical analysis and redesign of the GLC compensation technique.
Ind. Eng. Chem. Res., Vol. 33, No. 6,1994 1495 Although (9) and (10) can be considered directly, a recursive formulation of the predictor is more convenient for analysis. It is easy to show that the following recursive scheme is equivalent to (9) and (10)
i(k+ilk) = E[ack+i-lJk),u(k+i-8-1)1 R(k+8lk) = E[a(k+8-llk),u(k-l)]
1I i I8 - 1 (11)
+ x ( k ) - R(klk-1) (12)
where the predictor is initialized as R(klk) = Z(k) and 0
I
2
3
4
5
R(klk-1) = I’[Z(k-l),~(k-8-1)] = Z(k)
Time (min)
(13)
Using (11)-(13), it can be shown that the GLC predictor possesses two desirable properties: (i) if Z(0) = x(0) and there are no modeling errors, then 32(k+Olk) = x(k+O) for all k I0. ($-If the process is globally asymptotically stable, then R(k+Olk) = x(k+O) in the limit ask m even in the presence of modeling errors. However, note that the plant state x ( k ) is not utilized in the prediction steps in (11)and (13). The recursive formulation in (11)-(13) can be used to investigate potential deficiencies of the GLC predictor which may result in the unsatisfactory disturbance rejection performance discussed in section 2.2. Consider a nonlinear process with an unmeasured, additive disturbance d ( k ) :
-
1 270
1
Y
I
U
I
I
I
I
I
2
3
4
I
5
Time (min)
Figure 4. GLC control for a +25 9% disturbance in the feed flow rate.
3. GLC Predictor Analysis and Redesign 3.1. Discrete-Time Analysis of the GLC Predictor. The GLC time delay compensation scheme presented in section 2 is based on a continuous-time process model. In this section, a discrete-time version of the GLC predictor is developed and analyzed. This approach is utilized because (i) analysis of the discrete-time predictor is considerably more transparent; (ii) similar conclusions appear to hold for the continuous-time case, as discussed in section 4.1; and (iii) the control scheme is ultimately implemented using a digital computer. The discrete-time predictor is based on the following state-space model
f ( k + l ) = E[Z(k),u(k-8)1
(7)
j q k ) = K[Z(k)l
(8)
where 2 , u,9, and h(-)are defined as in the continuoustime case, and F(.) is an %dimensional nonlinear vector function which is usually obtained by discretizing a contin-uous-time model. In this case, the estimated time delay 0 is assumed to be expressed as an integral number of the sampling periods. As in the continuous-time case (Kravaris and Wright, 1989), a prediction model can be constructed by first eliminating the time delay from (7): x*(k+l) = E[x*(k),u(k)l
(9)
A correction term is then added to x* (k)in order to account for plant/model mismatch and unmeasured disturbances
R(k+Blk) = x * ( k ) + x ( k ) - Z(k)
(10)
Assuming the process is initially at tteady state, it follows from (7)and (9) that x * ( k ) = Z(k+O) if x * ( O ) = Z(0). As a result, the predictor produces an exact one-time-delayahead estima_teof the plant state in the absence of modeling errors: R(t+Olt) = x(t+O).
~(k+l= ) F[x(k),u(k-O)] + d(k)
(14)
Assume that the nonlinear vector function F and the time delay 0 are known exactly but the disturbance is unmodeled. In this case, the process model has the form Z(k+l) = F[Z(k),u(k-O)]
(15)
Because the plant state is measured, the model is initialized as Z(0) = x ( 0 ) . Now consider a step change of magnitude a in the disturbance at time T
d(k)= 0
d(k)= a # 0
for all k