On Interfacing Model Predictive Controllers with Low-Level Loops

Two options that arise in the implementation of a model-based control system on a process with low-level proportional−integral−derivative control ...
0 downloads 0 Views 274KB Size
92

Ind. Eng. Chem. Res. 2000, 39, 92-102

On Interfacing Model Predictive Controllers with Low-Level Loops Yongho Lee and Suwon Park Department of Chemical Engineering, KAIST, Taejon 305-701, Korea

Jay H. Lee* School of Chemical Engineering, Purdue University, West Lafayette, Indiana 47906

Two options that arise in the implementation of a model-based control system on a process with low-level proportional-integral-derivative control loops are discussed. Strengths and drawbacks of the two options are examined and modifications are proposed. Simulation results for a continuous stirred tank reactor and a distillation column are presented to demonstrate the performance improvements resulting from the modifications. 1. Introduction Traditionally industrial processes have relied strictly on regulatory loops (e.g., flow loops, pressure loops, temperature loops, level loops, etc.) that are designed to maintain a stable operation. These days, however, advanced control systems like model predictive controllers are introduced to move the process variables dynamically for productivity improvement, utility cost reduction, and quality control. In implementing an advanced control system on a process with regulatory proportional-integral-derivative (PID) loops, one is faced with the following two options: Option A. Break the loops and have the model-based controller manipulate the control valves directly. Option B. Leave the loops and have the model-based controller manipulate the setpoints to these loops, resulting in a cascade control structure. There are pros and cons associated with the two options. In option A, because the manipulated variables for the model-based controller are the control valves, valve limits can be entered directly into the model predictive control (MPC) algorithm as input constraints. Without a special provision, however, one may lose the efficient rejection of local disturbances afforded by the low-level loops. Without the low-level loops, the disturbances would have to propagate through the process and affect the feedback variables for the model predictive controller before any control action is taken. Furthermore, identification can be an unsafe and time-consuming task with these loops taken out, especially when the process dynamics are unstable or excessively slow.1 Examples are integrating dynamics found in many level loops. In option B, because the PID loops are retained, disturbances that occur inside these loops are rejected before they ever affect other parts of the process. In addition, system identification is easier because unstable or excessively slow dynamics can be stabilized or made faster by these loops. This arrangement also endows the process with some integrity in the case that the advanced control system shuts down. A drawback of the approach is that valve limits cannot be handled * To whom all correspondence should be addressed. Phone: (765)494-4088. Fax: (765)494-0805. E-mail: jhl@ ecn.purdue.edu.

as input constraints within the MPC algorithm. Translating the valve constraints into constraints on the lowlevel loops’ setpoints presents some difficulties, as their relationships are usually nonlinear, dynamic, and timevarying (for example, see Ricker and Lee,2 who discuss the problem in the context of the Tennessee-Eastman problem). Other drawbacks of this approach include (1) valve movements becoming sensitive to local disturbances that may not have much impact on the ultimate controlled variables, (2) inability to fully exploit dynamic correlations among the outputs of different loops, and (3) changing process dynamics due to the operator’s retuning of the low-level loops. In this paper, recognizing that both options have merits and a sensible choice depends on many practical considerations, we study them with the aim of removing their deficiencies without losing their attractive features. We use the state-estimation-based MPC algorithm (see Lee and Yu3) as the main vehicle for our development. Model development and identification issues are considered in detail. Numerical examples [involving a continuous stirred tank reactor (CSTR) and a distillation column] are provided to demonstrate the performance improvements. 2. Problem Description A candidate process for model-based control can be represented through the block diagram shown in Figure 1. In the diagram, we refer to the controlled variables for the intended model-based control, like the production rate and product compositions, as the primary variables, which will be denoted by yc. The process variables that are controlled by the low-level loops will be referred to as the secondary variables and will be denoted by ys. In terms of how the primary variables and the secondary variables are connected to each other, two arrangements are possible. In the series connection arrangement, the secondary variables are inputs to the process. Examples of such include temperatures of heating/cooling media. Implementing a model-based controller on top of these loops results in the conventional cascade control structure (see Ogunnaike and Ray4). In the parallel connection arrangement, the secondary variables as well as the primary variables are outputs of the same process. Their variations may exhibit strong correlations, even without any input manipulation, as the process dynam-

10.1021/ie990372k CCC: $19.00 © 2000 American Chemical Society Published on Web 11/24/1999

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000 93

a

a

b Figure 1. Block diagram of processes with low-level PID loops: (a) series-connected system; (b) parallel-connected system.

b Figure 3. Block diagram representation of option B: (a) seriesconnected system; (b) parallel-connected system.

a

b Figure 2. Block diagram representation of option A: (a) seriesconnected system; (b) parallel-connected system.

ics correlate disturbance signals d2 and d3. Examples are the end-point compositions and mid-tray temperatures in a distillation column. Implementing a modelbased controller on top of these low-level loops leads to the so-called parallel cascade control structure.5 When an advanced model-based controller is implemented, one has the option of breaking the low-level loops (Figure 2) or leaving them in (Figure 3). Let us examine the two options more closely and discuss the advantages and disadvantages. Option A: Direct Control. Option A is represented in Figure 2. In the implementation of a model-based controller, the following procedure is to be followed: 1. Break the low-level loops. 2. Identify a process model. Inputs are the valve positions, and outputs are the primary variables. Secondary variables that have constraints are called associated variables and must also be included in the model output.

3. Using the identified model, design a conventional model predictive controller which controls the primary variables and keeps the associated variables within their respective limits. Because the inputs of the model are the valve positions, valve limits can be entered into the algorithm as input constraints. Hence, handling of actuator constraints, which is critical in many multivariable control problems, can be done straightforwardly using the existing MPC algorithms. However, because the lowlevel loops are taken out and the secondary measurements not utilized, one may lose the efficiency in disturbance rejection. Figure 2 shows that both disturbances d1 and d2 must propagate through the process to affect yc before any control action can be taken. This causes problems in processes with large dead times. The same observation holds true even when some of the secondary variables are fed back to the MPC controller as associated variables for constraint handling. Secondary measurements do not contribute to the control of primary variables without a special provision for using these measurements in the prediction of the primary variables. Option B: Supervisory Control. Option B is depicted in Figure 3. The following procedure applies to this option: 1. Identify a process model of which the inputs are the setpoints to the low-level loops and the outputs are the primary variables and the associated variables. 2. Using the identified model, design a model predictive controller of which function is to control the primary variables (and to keep the associated variables within the respective limits). The resulting cascade control structure helps eliminate the disturbances that occur inside the loop efficiently. In the case of a series-connected system, both d1 and d2 are eliminated effectively by the low-level loops. In addition, when the dynamics for G1 are uncertain or time-varying, the inner loop helps suppress the effect of these uncertainties. In the case of a parallel-

94

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000

model is written in terms of the incremental input change ∆uk instead of uk to force the integral action. As mentioned, the above model must contain information on the dynamic correlation between ys and yc. Without such information embedded in the model, the secondary measurements cannot be used to improve the long-range prediction of the primary variables. 2. Build a state estimator on the basis of the above model. A linear estimator takes the form of

Figure 4. Block diagram of a state-estimation-based MPC.

connected system, however, elimination of the effect of d2 on the secondary variables may not help reduce or eliminate the effect of d3 on the primary variables. In fact, it can make the valves over-react and introduce additional perturbations to the primary variables. Such is the case when d2 has no correlation with d3. Elimination of d2 in the inner loop implies elimination of d3 in the outer loop only when there exists an explicit relationship between the secondary and primary variables, such as the temperature and composition of a binary mixture. Because the valves are not directly manipulated, the handling of valve constraints becomes more complicated. To handle them as input constraints, one must translate the valve constraints into limits on the setpoint changes. This is a difficult task because the relationship between the setpoints and the valve positions is usually not static. In addition, these relationships depend on the inner-loop controller, disturbances, and operating condition, all of which can change with time. A better option is to model the relationship between the setpoints and the valves explicitly and express the valve limits as output constraints.1 We will examine this approach later in terms of the modeling requirement and implementation issues. 3. Removing Deficiencies for Option A 3.1. Improving Disturbance Rejection. If process G2 contains significant delays or other nonminimumphase characteristics, elimination of the low-level loops can significantly worsen the disturbance rejection. To improve the disturbance rejection in these cases, one must utilize the measurements of secondary variables in the prediction of the primary variables (as in inferential control). Hence, the model developed for MPC should include both the primary and secondary variables as outputs and contain information on their correlations (i.e., cross-correlations). With such a model, one can build a state estimator that uses the secondary measurements to improve the long-range prediction of the controlled variables. The end results are quicker actions taken by the model predictive controller in response to disturbances. The idea is similar to feedforward control, but measurements do not have to be made directly at the disturbance source. The overall approach is illustrated in Figure 4. The procedure for designing the controller can be summarized as follows: 1. Obtain a model in the form of

[]

A Kalman filter can be used if the covariances of wk and νk are specified. 3. Compute the valve movements at each sample time by solving p

min

m

c c |(yk+i|k - rk+i|k )|Q + ∑|∆uk+i-1|k|R ∑ i)1 i)1

∆uk,...,∆uk+m-1

[ ][ ] [

(3)

with the prediction equation constraint c HcΦ yk+1|k c HcΦ2 yk+2|k ) xk|k + · · · · · c · HcΦp yk+p|k

HcΓu

HcΦΓu · · · HcΦp-1Γu

0 HcΓu · · · HcΦp-2Γu

· · · 0

][ ]

∆uk · · · 0 ∆uk+1 · · · · · · · · · ∆uk+m-1 p-m Γu · · · H cΦ (4)

plus other inequality constraints expressing the valve limits and output limits. xk|k is the state estimate from c c the observer (2). rk+i|k is the setpoint for yk+i as projected at the kth sample time. Change the valve positions by ∆u/k, which denotes the optimal value for ∆uk in the above optimization. The most important and demanding step in the above procedure is the model identification step. There are several ways to obtain a model of form (1) that captures dynamic correlations among the outputs. We discuss a few options below. 1. One can obtain the required model by constructing models for the individual blocks and then putting them together as one model. For instance, suppose that, in the case of a series-connected system, the models for G1 and G2 are identified as

ˆ xˆ k + B ˆ uk xˆ k+1 ) A ysk ) C ˆ xˆ k

(5)

and

xk+1 ) Φxk + Γu∆uk + wk yc ys

xk|k ) Φxk-1|k-1 + Γu∆uk-1 + K(yk - H(Φxk-1|k-1 + Γu∆uk-1)) (2)

h xjk + B h ysk xjk+1 ) A ) Hxk + νk

(1)

k

In the above ∆uk ()uk - uk-1) is the change in the valve position and wk and νk are white noise sequences. The

yck ) C h xjk

(6)

The models in eqs 5 and 6 can be rewritten in terms of the incremental changes in the input and output

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000 95

variables:

the noise vector.

∆xˆ k+1 ) A ˆ ∆xˆ k + B ˆ ∆uk ∆ysk ) C ˆ ∆xˆ k

(7)

and

h ∆xjk + B h ∆ysk ∆xjk+1 ) A ∆yck ) C h ∆xjk

(8)

Assume that disturbances d1, d2, and d3 are described as

zˆ k+1 ) A ˆ dzˆ k + B ˆ dϑˆ k ∆(d1)k ) C ˆ dzˆ k + D ˆ dϑˆ k

(9)

h dzjk + B h dϑ hk zjk+1 ) A ∆(d2)k ) C h dzjk + D h dϑ hk

(10)

and

z˜ k+1 ) A ˜ dz˜ k + B ˜ dϑ˜ k ∆(d3)k ) C ˜ dz˜ k + D ˜ dϑ˜ k

(11)

respectively, where ϑˆ k, ϑ h k, and ϑ˜ k are white noise sequences. Note that, by modeling the incremental changes in the disturbance variables, we implicitly assume that d1, d2, and d3 are all “persistent” (type 1) disturbances. Note that it is not necessary to include the disturbance states, zˆ k, zjk, and z˜ k, in the models if the disturbance is just a superposition of randomly occurring step changes, which is the assumption made in most MPC designs. We can combine (7)-(11) to obtain the following overall model:

[ ][

∆xˆ k+1 A ˆ ∆xjk+1 B hC ˆ zˆ k+1 ) 0 zjk+1 0 z˜ k+1 0

[ ] [

0 A h 0 0 0

B ˆC ˆd 0 A ˆd 0 0

][ ] [ ] [ ][ ] ][ ] [ ][ ]

0 B hC hd 0 A hd 0

˜d ∆yck 0 C h 0 0 C s ) C h C ˆ 0 0 0 ∆yk d

0 0 0 0 A ˜d

∆xˆ k ∆xjk zˆ k zjk z˜ k B ˆD ˆd 0 B ˆd 0 0

B ˆ 0 + 0 ∆µk + 0 0 0 0 B hD hd 0 ϑˆ k ϑ hk 0 0 B hd 0 ϑ˜ k B ˜d 0

∆xˆ k ∆xjk ϑˆ k D ˜d 0 0 zˆ k ϑ hk + hd 0 0 D zjk ϑ˜ k z˜ k (12)

yk ) A1yk-1 + ... + Anyk-n + B1uk-1 + ... + Bnuk-n + k + C1k-1 + ... + Cnk-n (15) One can transform the model in eq 15 into a state-space model of form (1) by performing a state-space realization. Note that a true MIMO model [instead of a collection of single-input single-output (SISO) models] is needed here in order to capture the dynamic correlation among the outputs. However, MIMO time series model identification is notoriously difficult for a couple of reasons. First, it requires a special parametrization to ensure identifiability. This requires prior knowledge such as the observability index for each output. Second, the required optimization for prediction error minimization is nonconvex and has many local minima. 3. An alternative to the MIMO ARMAX model identification is subspace identification. A subspace identification method called N4SID,6 for instance, enables one to construct from input-output data a state-space model of the form

xˆ k+1 ) Axˆ k + Buk + Kk

Denoting the augmented model in eq 12 as

x˜ k+1 ) Ax˜ k + B∆uk + Lϑk ∆yk ) Cx˜ k + Dϑk

The model in eq 14 includes an integrator for each output, reflecting the persisting effect of disturbances as well as the integrating effect of ∆u(k) on the output. The above system is detectable if the original process h d, and A ˜ d does not include model is detectable, and A ˆ d, A any unstable pole. One can also put the integrators in the process model and each disturbance model separately, but this could result in an undetectable system for which the optimal estimator design becomes complicated. Models for the parallel-connected case can be constructed in a similar manner. However, in this case, it is desirable to capture correlations between d2 and d3 so that their effects on yc can be predicted and rejected on the basis of ys. Such a correlated disturbance model, however, will be difficult to construct on the basis of intuition alone. If d3 is significant and is strongly correlated with d2, the subsequently introduced databased methods will be more appropriate. 2. One can derive the state-space model from a multiple-input multiple-output (MIMO) time series model. For instance, the MIMO ARMAX model takes the form

(13)

we can put the model in the standard form of (1) by further augmenting the state with the output vector and

[] yc ys

) Cxˆ k + k

(16)

k

where k is a white noise sequence. The method involves only linear algebra operations and has proven properties

96

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000

(e.g., the asymptotic unbiasedness). A noteworthy point is that the standard N4SID algorithm requires the stochastic part of the system to be stationary, while disturbances in many processes have integrating characteristics (i.e., their means change with time) and are better described using nonstationary processes such as the integrated white noises. Differencing, or more preferably differencing followed by low-pass filtering, can be performed on the input-output data before applying the identification algorithm, to remove trends in the output data. If plain differencing is used, the resulting model will be in the form of

∆xˆ k+1 ) A∆xˆ k + B∆uk + Kk

[ ] ∆yc ∆ys

(17)

) C∆xˆ k + k

(18)

k

As before, through simple algebraic manipulations, the above can be put into the standard form

yk ) [0 0 I]xk where

yk )

[] yc ys

(19)

namics to be identified are unstable or excessively slow. In such systems, one must take extreme care in moving the valves, in order not to drive the process significantly away from the current operating condition. In addition, popular tests such as a step test is not feasible. For safety-sensitive processes with such dynamic characteristics, one can introduce a feedback signal to the identification signal. Figure 5 depicts an identification experiment with a digital feedback loop in place. Closedloop identification has received much attention lately within the system identification research community, and there are some good survey papers (see Forssell and Ljung,9 for example). The closed-loop identification procedure can be summarized as follows: 1. Introduce perturbations to u according to

uk ) Kc(rsk - ysk)

k

4. In the case that G1 and G2 are stable and have finite settling times, a step-response model of the following form may be identified:

Yk+1 ) MYk + S∆uk + Kk

(20)

yk ) NYk + k

(21)

In the eqs 20 and 21, M represents a forward-shift operator (with an integrator on the last element), and N is the matrix that extracts the first ny elements of Yk (see Lee et al.7 for details). The unknown parameters are S, which contains the step response coefficients, and K, which can be interpreted as the Kalman filter gain matrix for the underlying FIR system

[ ]

∆d1 Yk+1 ) MYk + S∆uk + S ∆d2 ∆d3 d

yk ) NYk + νk

Figure 5. Block diagram of the closed-loop identification strategy for option A.

(22)

k

(23)

S can be identified using standard techniques (e.g., a step test or a pseudo-random binary sequence (PRBS) test followed by least-squares fitting). K is related to the autocorrelation and cross-correlation functions of the residual sequence and can be found by performing a spectral factorization on the residual spectrum or a state-space realization on the residual sequence (see Lee et al.8 for details). 3.2. Safer Identification. Conducting identification experiments without low-level PID loops can be unsafe and time-consuming, especially when the process dy-

(24)

2. Find the model using (a) the indirect approach, in which one identifies a model between rs and ys/yc (say H), and extracts G1 and G2 from H on the basis of the relations

G1(z) ) H(z) (I - H(z))-1Kc-1 G2(z) ) H(z) (Kc-1 + G1(z))

(25)

or (b) the direct approach, in which one identifies a model between u and ys/yc directly using one of the identification methods discussed previously. rs can be designed to be any signal, but active signals like PRBS are preferred. Relying on disturbances alone for system perturbation can lead to the problem of loss of identifiability (see p 82 of A° stro¨m and Wittenmark10). Between the direct method and the indirect method, the direct method is clearly simpler, more straightforward, and therefore preferable. It also does not require a linear expression of the controller; many industrial PID controllers have additional features, which make them behave in a nonlinear fashion. On the other hand, in application of the direct method, it is important to include a proper noise model. Note that u becomes correlated with d2 through feedback. Any nonwhite residual will be correlated with the regressor vector resulting in a parameter bias.11 Hence, the conventional deterministic finite impulse response (FIR) model is not a good structure to use for the direct method. Even an ARX model is not a good choice in most situations, because a large number of terms are usually needed to make the residual white. This problem does not exist for the indirect method.

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000 97

a

Figure 6. Open-loop step responses of the models obtained by various methods (compared against that of the real model).

Finally, if one knows that the system has an integrator, the model can be forced to contain an integrator. For instance, in the indirect method, the steady-state gain between rs and ys can be constrained to be I during the parameter estimation. In the direct method, a popular practice is to difference the output data and fit a model between u and ∆ys. Example. Let us consider identification of the integral process represented by

yk )

0.0952z-1 1 ek uk + (1 - z )(1 - 0.9048z-1) 1 - z-1 -1

b Figure 7. Option B with a valve constraint handling feature (shown here for a series-connected system): (a) block diagram; (b) model used for MPC design.

period. Second is the issue of sample time. The large computational time associated with the MPC algorithm can limit the choice of sample time. Hence, even though regulation based on secondary variables can be done, the control frequency may be limited. This means that option A is not appropriate for getting rid of fast loops such as the flow loops.

(26)

We installed a proportional controller of gain 0.05. Integrated white noise is added to the process output. The variance of the white noise before the integration is 1 × 10-4. First, the direct approach was used to identify ARX, FIR, and ARMAX models. The output data were differenced, and models between ∆y and u were identified. Then, an integrator was added afterward. We identified the relation between ∆y and u with a first-order model. The orders chosen for the ARX model structure were na ) 1 and nb ) 1. The order of the FIR model was 15, which was determined by Rissanen’s minimum description length criterion (see p 416 of Ljung11). The orders chosen for the ARMAX structure were na ) 1, nb ) 1, and nc ) 1. As shown in Figure 6, with the ARX model, a large bias resulted because the noise structure was not appropriate. The FIR model was also not an appropriate structure. Next we applied the indirect approach. Here we identified a second-order ARMAX model between rs and ys. The model was constrained to have to steady-state gain of 1. The orders in the ARMAX model structure are na ) 2, nb ) 1, and nc ) 1. Clearly, using the gain constraint helped. 3.3. Other Considerations. Even though some of the drawbacks of option A can be removed through the aforementioned modification, other factors may not warrant the removal of the low-level loops. First is the issue of reliability. In the case that the model predictive controller goes down, one would probably like to maintain some integrity through the basic regulatory loops. This problem can, in principle, be handled by having a backup PID control system, which switches on whenever a problem with the model predictive controller develops. However, controller switching is generally undesirable because it is inconvenient and results in a transient

4. Removing Deficiencies for Option B 4.1. Improved Handling of the Valve Constraints. A difficulty for option B (shown in Figure 7) is the handling of valve constraints. A conceptually simple way to incorporate the valve limits directly into the MPC algorithm is to include the valve positions in the output of the model. Then the valve limits can be entered into the algorithm as output constraints. The net result is a dynamic, time-varying constraint on setpoint rs. Because disturbances and the nonlinear and timevarying nature of valve characteristics change the relation between the setpoint rs and the valve position u, the valve position needs to be monitored continuously and the information fed back to the MPC algorithm. For this, the model used by MPC should allow an updating of the valve position based on its measurements. The procedure for controller design is as follows: 1. Identify a model relating the setpoint signal rs to the valve position u and the primary variable yc (and associated variables). The form of the model needed is displayed in Figure 7b. Note that du is needed to account for the errors due to the nonlinear and time-varying characteristics of the valve. Without such a disturbance signal included in the model, the valve position will not be updated correctly on the basis of the valve position feedback. Put the model in the form of

xk+1 ) Φxk + Γr∆rsk + wk

[] yc u

k

) Hxk + νk

(27)

where wk and νk are white noise sequences. Again, the model should be written in terms of the incremental setpoint change ∆rsk to force the integral action.

98

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000

Figure 8. Creating a tuning-invariant inner-loop system.

2. Build a state estimator (e.g., the Kalman filter) on the basis of the model: s xk|k ) Φxk-1|k-1 + Γ∆rk-1 +

([ ]

c K y u

k

)

s - H(Φxk-1|k-1 + Γ∆rk-1 ) (28)

3. Optimal setpoint movements at t ) k can be computed by solving the optimization p

min



s ∆rsk,...,∆rk+m-1 i)1

m

c |(yk+i|k

[ ][ ]

-

s rk+i|k )|Q

+

∑ i)1

s |∆rk+i-1 |R

(29)

[

HΓr HΦΓr l HΦp-1Γr

0 HΓr l HΦp-2Γr

... ... ... ...

0 0 l HΦp-mΓr

the extra block, the closed-loop relationship between rs and u or ys remains the same irrespective of the choice ˆ 1, of C1. For instance, if G1 ) G

ˆ 1C1 ˆ 1C1) u 1+G ys G1(1+ G ) ) 1; ) ) G1 s s 1 + G C 1 + G r r 1 1 1C1

with the prediction equation constraint c yk+1|k uk+1|k HΦ c yk+2|k HΦ2 Xk|k + uk+2|k ) l l HΦp c yk+p|k uk+p|k

Figure 9. Schematic diagram of the CSTR.

][ ] ∆rsk s ∆rk+1 l s ∆rk+m-1

(30)

and the valve constraints

umin e uk+i|k e umax ∆umin e uk+i|k - uk+i-1|k e ∆umax

(31)

Change the setpoint rs by (∆rsk)*, which denotes the optimal value for ∆rsk in the above optimization. The model (27) can be obtained using any of the methods we discussed in the previous section. In this case, however, it is not critical to capture the correlation between du and dc. Hence, it is simplest to identify G1 and G2 separately and put them together with some reasonable stochastic descriptions (e.g., integrated white noises) for du and dc. Capturing the correlations through MIMO identification can, in principle, improve the performance, however. 4.2. Creating an Inner-Loop Invariant Model. Another potential problem is that changing tuning parameters of the inner-loop controllers, as is often done by operators, can alter the dynamics of the process and cause problems for a model predictive controller. This problem may be handled by adding an extra block to the PID loop as shown in Figure 8.12 Note that, with

(32)

The scheme requires the inner-loop process model G1 to be known, however. 4.3. Other Problems. Although modeling requirements are less than those of option A, there are some additional problems one may face with option B: (a) Performance of the MPC controller is affected by that of the inner-loop controller. When the inner-loop process is a SISO process, the PID loop can be tuned straightforwardly13 Tuning for a strongly interactive MIMO system can be a problem, however. Poorly tuned inner loops make the identification and control more difficult and hence adversely affect the overall system’s performance. (b) Note that valve constraints are not guaranteed to be met because they are handled on the basis of model prediction. In addition, they must be implemented as soft constraints to avoid infeasibility problems. These mean that the model predictive controller can still attempt to make setpoint changes that violate the valve constraints and make the inner loop behave nonlinearly, which implies the potential need for an additional constraint-handling scheme. (c) In the case of a parallel-connected system, the inner loop may actually introduce additional perturbations to yc. Whether the presence of the inner loop will help or hurt depends on the degree and nature of the correlation between ys and yc. This may limit the choice of the secondary variables. 5. Numerical Examples In this section, we test the previously discussed approaches on a CSTR and a distillation column. 5.1. CSTR. A schematic diagram of the CSTR we considered is shown in Figure 9. The following model

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000 99 Table 1. Model Parameter Values for the CSTR model parameter

value

model parameter

value

V F Cp A Fc k0 R F Tci

5 m3 5 kgmol/m3 1 × 104 J/kgmol‚°C 5.4 m2 1200 kg/m3 0.0744 m3/s‚kgmol 50 0.005 m3/s 20 °C

∆HR h Vc Cpc E FCmax Ti Cai τ

-2.85 × 108 J/kgmol 3550 J/s‚m2‚°C 0.7 m3 6000 J/kg‚°C 1.182 × 106 J/kgmol 0.6 m3/s 66 °C 2.88 kgmol/m3 30 s

obtained from a book by Smith and Corripio14 was used.

Mass Balance on Reactant A dCA F ) (CAi - CA) - kCA2 dt V

(33)

Energy Balance on the Reactor Contents ∆HR dT F hA ) (Ti - T) kC 2 (T - Tfc) (34) dt V FCp A VFCp Energy Balance on the Jacket Fc dTc hA (T - Tfc) - (Tc - Tci) dt VcFcCpc Vc

(35)

Reaction Rate Coefficient k ) koe-E/R(T+273.16)

(36)

Effect of Wall Dynamics on the Heat Transfer between the Reactor and the Jacket dTfc + Tfc ) Tc + 3τ + 3τ τ 3 2 dt dt dt 3

d3Tfc

2

d2Tfc

(37)

Valve Equation FC ) FCmaxR-u, 0 e u e 1

(38)

To include the often-significant effect of wall dynamics without resorting to a separate detailed energy balance on the wall, we added a simple third-order low-pass filter to the heat-transfer relation between the cooling jacket and the reactor. The valve was assumed to be an equal percentage valve. The model parameter values used in the simulation are given in Table 1. The main control objective for the problem is to maintain the reactor temperature at its setpoint. The problem is represented as a series-connected system, where u is the valve position, ys the jacket temperature Tc, and yc the reactor temperature T. A conventional approach to this problem is to close a loop on the jacket temperature first and then manipulate the setpoint of this loop to control the reactor temperature. Before the MPC design, a well-tuned PI loop on the jacket temperature was assumed to be in place. We considered the four different types of MPC implementations for this system: (a) option A; (b) modified option A with a secondary measurement of Tc; (c) option B; (d) modified option B with the valve position as an extra output. The models were obtained by running plant tests and then applying the N4SID method.6 During the plant test, the manipulated input (the valve position or the setpoint to the PI loop of the jacket temperature) was varied as a random binary signal. In addition, random disturbances in the valve position adjustment, heat-

Figure 10. Closed-loop responses of the temperature of the CSTR for various MPC implementations (with disturbances sufficiently small not to cause input saturation).

transfer coefficient, and cooling water temperature were introduced during the simulated identification experiment. These disturbance signals were generated by integrating white noise signals. The orders of the state space models for strategies a-d were 5, 20, 5, and 13, respectively. They were chosen based on the trend of the singular values of a relevant projection matrix.6 In general, we found the choice of system order to be more important for strategy b than the other three strategies. This is because strategy b requires the model to capture correlations between yc and ys. The disturbance rejection capabilities of different MPC structures are shown in Figure 10. The disturbances were introduced in the closed-loop simulation by adding integrated white noise signals to the temperature of the cooling water that enters the jacket. The variance of the white noise was 0.65. Responses for strategies c and d were the same because, for this particular simulation run, the disturbances were such that the valves did not saturate. Clearly, the performance of strategy a suffered in comparison to strategies b and c/d because the jacket temperature information was not utilized. In the second simulation, we increased the disturbance magnitudes by 20% so that performances of strategies c and d could be compared when the valve saturated. For this, the variance of the white noise for the disturbance was increased to 0.935. Figure 11 shows the closed-loop responses. When the valve saturated, the performance of strategy c deteriorated significantly. Figure 12 shows the plots of the manipulative variable and the valve position for strategies c and d. Even though the valve saturates in both cases, strategy c keeps it saturated unnecessarily long, leading to the poor closed-loop performance. This is an effect similar to classical windup, but the problem cannot be addressed using a conventional antiwindup technique as it occurs within a cascade control structure. 5.2. Distillation Column. Next we considered a distillation column that separates a binary feed into streams of 90% purity at each end. The schematic diagram is shown in Figure 13. It has a total condenser and a thermosiphon reboiler. The column model we used is derived from the column A that appeared in several papers by Skogestad and Morari.15 This particular model includes liquid flow dynamics and makes the following assumptions: (1) constant molar overflow; (2) equilibrium in all stages; (3) negligible vapor holdup;

100

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000

Table 2. Model Parameter Values for the Distillation Column model parameter

value

model parameter

value

number of stages, NT relative volatility, R time constant for liquid dynamics, τl nominal vapor flow, V0 liquid fraction in feed, q boiling temperature in bottom, Tbottom

10 1.8 0.063 min 4.69 kmol/min 1 355.4 K

location of feed stage, NF nominal liquid holdup, M0 nominal refulx flow, L0 nominal feed rate, F0 boiling temperature in top, Ttop

6 0.5 kmol 4.2 kmol/min 1 kmol/min 341.9 K

Figure 11. Closed-loop responses of the temperature of the CSTR for various MPC implementations (with disturbances large enough to cause input saturation). Figure 13. Schematic diagram of the distillation column.

only 10 theoretical stages and separates a binary mixture of relative volatility 1.8. The model equations for the column are standard and can be found elsewhere.15 We modeled the relationship between the valve position and the reflux rate as a firstorder lag shown in eq 39

τ

dL + L ) L0 + c1u1 + d1, -0.5 e u1 e 0.5 dt

(39)

where L0 is the nominal reflux flow rate and u1 denotes the deviation from the nominal valve position of 0.5. In addition, the relationship between the boilup flow rate and the steam valve position was modeled using a thirdorder system of

τ3

Figure 12. Closed-loop plots of the manipulative variable and the valve position for strategies c and d: (a) manipulative variable; (b) valve position.

(4) constant relative volatility; (5) constant pressure; and (6) linearized liquid dynamics. The column we used is based on the same equations as the column A but has

d3V d2V dV + V ) V0 + c2u2 + d2, + 3τ2 2 + 3τ 3 dt dt dt - 0.5 e u2 e 0.5 (40)

V0 is the nominal boilup rate, and u2 is the deviation from the nominal valve position of 0.5. The third-order lag was judged to be more appropriate in this case, considering the significant wall effect on the heat transfer. d1 and d2 can be considered as valve position errors or the effect of heat-transfer coefficient changes. The model parameter values used in the simulation are given in Table 2. We assumed that PI control loops for T2 and T9 were already in place. The PI controllers in the inner loops were tuned by the BLT method.16 We considered the same four MPC implementation structures as before: (a) option A; (b) modified option A with secondary measurements of T2 and T9 (the temperatures of the second and ninth trays); (c) option B; (d) modified option B with valve positions as extra outputs. The control objective is to maintain the top and bottom compositions at their setpoints. The problem is represented as a

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000 101

Figure 14. Closed-loop responses of the top composition for various MPC implementations (with disturbances sufficiently small not to cause input saturation).

Figure 16. Closed-loop responses of the top composition for various MPC implementations (with disturbances large enough to cause input saturation).

Figure 15. Closed-loop responses of the bottom composition for various MPC implementations (with disturbances sufficiently small not to cause input saturation).

Figure 17. Closed-loop responses of the bottom composition for various MPC implementations (with disturbances large enough to cause input saturation).

parallel-connected system where u consists of the valve positions for the steam input to the reboiler and the reflux flow. ys are T2 and T9. yc are the top and bottom compositions. Again, the models were identified from plant data using the N4SID method. During the plant test, binary perturbations were introduced to the valve positions for option A and to the setpoints for option B. Because the column dynamics are very ill-conditioned and nonlinear, the special technique of iterative identification was adopted.17 During the identification, integrated white noise disturbances were introduced to the valve position adjustments, valve constant c2 (to cover for heat-transfer coefficient changes, etc.), and feed compositions. Because the composition analysis takes time, time delays (3 min) were added to the model. Note that the inner-loop PI controllers were simulated as continuous controllers and the sampling time for MPC was 0.5 min. The orders of the state space models for strategies a-d were 9, 40, 10, and 15, respectively. A model of much higher order was needed for strategy b, because of the requirement that correlations among different outputs be captured. Figures 14 and 15 show the closed-loop performances we obtained using the four MPC implementations when disturbances (in the valve adjustment or heat-transfer coefficient) were introduced to the distillation process. The variances of the white noises before the integration

were 5 × 10-4and 5 × 10-4 for d1 and d2, respectively. Results for strategies c and d were similar because the valve limits did not come into play in this particular simulation run. It is clear that the performance of strategy a suffered greatly because of the lack of feedback from the temperatures. In addition, we see that the performance of strategy b was somewhat better than that of strategy c/d. We attribute this to the difficulty of tuning the inner PI loops. Figures 16 and 17 show how the closed-loop performances changed when the variances of the white noises before the integration were increased by 0.02 and 0.02. Now the valve limits do come into play, and the valves become saturated. When the valves saturate, “windup” can be a serious problem. For prevention of windup, the PI loops had been equipped with conventional antiwindup schemes. Despite this, the performance of strategy c deteriorated greatly, while strategy d maintained the same performance level as before. 6. Conclusion In this paper, we discussed the two options that arise when one implements a model predictive controller on a process that already has low-level PID loops in place. The deficiencies for the two options were brought out, and some modifications to remove these deficiencies were suggested. Subspace identification and stateestimation-based MPC were used as the main vehicles.

102

Ind. Eng. Chem. Res., Vol. 39, No. 1, 2000

Different situations call for different options to be exercised and a right choice between the two options depends on practical considerations such as the size of the problem, computational time, and location of the secondary variables. In many cases, opening a subset of the loops makes the most sense. Fast loops such as flow loops, level loops, and pressure loops are best left in because it is difficult to implement a model predictive controller operating at a fast sample rate, but slower temperature and concentration loops may be taken out and their controls relegated to the model predictive controller. Suggested improvements and design guidelines can still be useful in this context. Acknowledgment J.H.L. gratefully acknowledges the financial support from the NSF NYI Program (CTS 9357827) and Aspen Technology. We also thank Mark Darby at Aspen Technology for valuable comments and advice. This work was also supported in part by the Korea Science and Engineering Foundation (KOSEF) through the Automation Research Center at POSTECH. Literature Cited (1) Darby, M. Personal communication, 1996. (2) Ricker, N. L.; Lee, J. H. Nonlinear model predictive control of the Tennessee Eastman challenge process. Comput. Chem. Eng. 1995, 19, 961-981. (3) Lee, J. H.; Yu, Z. Tuning of Model Predictive Controllers for Robust Performance. Comput. Chem. Eng. 1994, 18, 15-37. (4) Ogunnaike, T.; Ray, H. W. Process Dynamics, Modeling, and Control; Oxford University Press: New York, 1994.

(5) Luyben, W. L. Parallel cascade control. Ind. Eng. Chem. Fundam. 1973, 12, 463-467. (6) Van Overschee, P.; Moor, B. D. N4SID: Subspace algorithms for the identification of combined deterministic-stochastic Systems. Automatica 1994, 30 (1), 75-93. (7) Lee, J. H.; Morari, M.; Garcia, C. E. State space interpretation of model predictive control. Automatica 1994, 30, 707-717. (8) Lee, J. H.; Amirthalingam, R.; Lee, Y.; Lee, K. S. Improved disturbance estimation for dynamic matrix control. Proceedings of the American Control Conference, Philadelphia, PA, 1998. (9) Forssell, U.; Ljung, L. Closed-loop identification revisited. Automatica 1999, 35, 1215-1241. (10) A° stro¨m, K. J.; Wittenmark, B. Adaptive Control; AddisonWesley: Reading, MA, 1989. (11) Ljung, L. System Identification: Theory for the User; Prentice-Hall: Englewood Cliffs, NJ, 1987. (12) Tadeo, F.; Alvarez, T.; de Prada, C. Implementation of predictive controllers as outer-loop controllers. Proceedings of Dycops-5 conference, Corfu, Greece, 1998. (13) Lee, Y.; Lee, M.; Park, S.; Brosilow, C. PID controller tuning for desired closed-loop responses for si/so systems. AIChE J. 1998, 44 (1), 106-115. (14) Smith, C. A.; Corripio, A. B. Principles and Practice of Automatic Process Control; Wiley: New York, 1985. (15) Skogestad, S.; Morari, M. Understanding the dynamic behavior of distillation columns. Ind. Eng. Chem. Res. 1988, 27 (10), 1848-1862. (16) Luyben, W. L. A simple method for tuning siso controllers in multivariable system. Ind. Eng. Chem. Process Des. Dev. 1986, 25, 456-460. (17) Cooley, B. L.; Lee, J. H. Integrated Identification and Robust Control. J. Process Control 1998, 8, 431-440.

Received for review May 28, 1999 Revised manuscript received September 29, 1999 Accepted October 12, 1999 IE990372K