Tracking Control for Batch Processes through Integrating Batch-to

Available methods for identifying the perturbation model include simple static linear ..... u = T/Trefis the control variable, T is the absolute tempe...
0 downloads 0 Views 217KB Size
Ind. Eng. Chem. Res. 2005, 44, 3983-3992

3983

Tracking Control for Batch Processes through Integrating Batch-to-Batch Iterative Learning Control and within-Batch On-Line Control Zhihua Xiong,† Jie Zhang,*,‡ Xiong Wang,† and Yongmao Xu† Department of Automation, Tsinghua University, Beijing 100084, People’s Republic of China, and Centre for Process Analytics and Control Technology, School of Chemical Engineering and Advanced Materials, University of Newcastle, Newcastle upon Tyne NE1 7RU, U.K.

An integrated strategy for product quality trajectory tracking control in batch processes is proposed by combing batch-to-batch iterative learning control (ILC) with on-line shrinking horizon model predictive control (SHMPC) within a batch. Under batch-to-batch ILC based on a linear time varying perturbation model, the performance of future batch runs can be enhanced, and the convergence of batch-wise tracking error is guaranteed. But ILC cannot affect the performance of current batch run, and the correction to control policy is not made until the next batch run. On the other hand, on-line SHMPC within a batch can reduce the effects of disturbances and improve the performance of the current batch run. By combing two methods for tracking trajectories, the integrated control strategy can complement both methods to obtain good performance because on-line SHMPC can respond to disturbances immediately and batch-tobatch ILC can correct bias left uncorrected by the on-line controller. The proposed strategy is illustrated on a simulated batch polymerization process. The results demonstrate that the performance of tracking product qualities can be improved quite well under the integrated control strategy than under the simple batch-to-batch ILC, especially when disturbances exist. 1. Introduction Batch-to-batch control strategy exploits the repetitive nature of batch processes to refine the operating policy and has been widely used to improve the performance of tracking control for product quality in batch processes. The general idea of batch-to-batch control is to use information obtained from previous batch runs to update the operating strategy of the current batch run.1 Various batch-to-batch control strategies for the product quality have been proposed. The direct way is to optimize the operating policy after each run by batchto-batch optimization for the final product quality, which can also address the problems of model-plant mismatches and/or unmeasured disturbances in batch processes.2-5 The optimization-based batch-to-batch control uses nonlinear programming techniques on batch processes with the evaluation of the objective function. Therefore, finding the optimum solution relies on iterative search methods.5 Recently, iterative learning control (ILC) has been used in the batch-to-batch control of batch processes to directly update the control trajectory.6-10 The basic idea of ILC is to update the control trajectory for a new batch run using the information from previous batch runs so that the output trajectory converges asymptotically to the desired reference trajectory. Refinement of control signals based on ILC can significantly enhance the performance of tracking control systems. Campbell et al.11 presents a brief survey of batch-to-batch control algorithms based on linear models for batch processes. * Corresponding author. Telephone: +44-191-2227240, Fax: +44-191-2225292, E-mail: [email protected]. † Tsinghua University. ‡ University of Newcastle.

Amann et al.12 propose an optimal iterative learning algorithm based on optimization principle by combining the Riccati feedback control with the typical ILC feedforward control. The scheme has the advantage of automatic determination of step-size and hence guarantees exponential convergence. Gao et al.13 extend the optimal ILC algorithm for applications to general batch processes with uncertain disturbances where exact initial resetting is not available. Lee and co-workers in several related articles7-9,14,15 propose the Quadratic criterion-based ILC (Q-ILC) approach for tracking control for temperature of batch processes based on a linear time-varying (LTV) tracking error transition model. Xiong and Zhang16,17 also use ILC for the tracking control of product quality in batch processes based on an LTV perturbation model, and the convergence of tracking error is guaranteed. To address the problem of model-plant mismatches, the model prediction errors in the previous batch run are added directly to the model predictions for the current batch run. However, batch-to-batch control is an open-loop control over a single batch since the entire control trajectory is decided before the start of a batch and implemented without further refinement until the end of the batch. Feedback adjustments occur only between batches. So batch-to-batch control can only improve the performance of future batch runs and cannot improve the performance of the current batch run. The product quality of the current batch run will depend completely on the recipe decided off-line. In the face of disturbances that persist over a number of batches, the product quality can be controlled by using the result from the previous batch to modify the recipe of a new batch under batchto-batch control strategy. But batch-wise control cannot handle those disturbances that change from batch to

10.1021/ie049000o CCC: $30.25 © 2005 American Chemical Society Published on Web 04/16/2005

3984

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005

batch in a completely random fashion and may actually amplify their effects.18 Real-time feedback control should be integrated into ILC in some appropriate manner to combine the batchwise convergence behavior of ILC with an ability to respond to control errors in real time.19,20 If product quality variables can be measured or inferred accurately on-line, it is possible to implement on-line control that adjusts the control policy for the remaining batch period while the batch is going on.18 Shrinking horizon model predictive control (SHMPC)21-23 formulation can be utilized for on-line control of batch processes within the current batch. In contrast to conventional model predictive control, which is geared more toward continuous processes, both control horizon and prediction horizon in SHMPC for batch processes shrink as the process progresses. The shrinking horizon terminology stems from the fact that the number of control moves remaining to be chosen decreases as a batch progresses. The SHMPC approach has been implemeted by Liotta et al.24 for control of the particle size in a semibatch emulsion polymerization reactor and by Thomas et al.25 for quality control of composite laminates. Because on-line SHMPC can respond to disturbances immediately and batch-to-batch ILC can correct any bias left uncorrected by the on-line controller, it is natural to explore the possibility of combining both methods to obtain good control performance. The integrated control strategy can combine information from past error tracking signals with information from the current batch and then adjust the manipulated variable trajectories in real time to regulate product quality effectively. It combines the goals of batch-to-batch and within-batch on-line control.19,20 If disturbances occur, the integrated control method is expected to diminish more rapidly the effect of disturbances than batch-tobatch ILC only. However, one must be careful in integrating the two schemes. A simple-minded combination of the two strategies such as ILC updating the nominal control trajectory for SHMPC before each run does not work.18,20 SHMPC will “undo” the ILC corrections due to inconsistent predictions between the two. To solve this problem, the idea of ILC needs to be integrated into SHMPC at the level of model preparation. By incorporating the estimated error calculated from the batchto-batch controller, the prediction for the on-line control can be enhanced. Lee et al.20 combine the advantages of ILC and MPC into a single framework. A batch MPC (BMPC) technique and its extension QBMPC for tracking control are proposed by incorporating the capability of real-time feedback control into Q-ILC.15,18,20 Unlike a continuous process, a batch process is timevarying and the error does not remain at a constant value until the end. Hence, adding the current feedback error directly to the prediction of the product qualities does not give the correct result. A better strategy is to model the possible disturbances as stochastic states and employ state estimation using techniques such as extended Kalman filter (EKF).20 Some variations are possible in terms of how information gets transferred from batch to batch. One can reset the nominal recipe, initial parameter values, and covariance matrices all back to some fixed values at the start of each batch. One can also transfer the updated recipe from the previous batch to the new batch as the nominal recipe. Then, successive batches will be linked to each other.

On the basis of a batch-wise LTV perturbation model, the ILC method can be implemented from batch to batch for tracking trajectories, and the convergence of tracking error is guaranteed.16 But in order to implement SHMPC on-line, a more accurate predictive model has to be proposed based on the current output values and remaining control moves. Furthermore, to implement the integrated control strategy, a predictive LTV perturbation model would be utilized in a manner similar to the batch-to-batch control formulation. The rest of this paper is organized as follows: Section 2 presents batch-to-batch ILC based on a batch-wise LTV perturbation model. Section 3 proposes the integrated batch-to-batch control and within-batch predictive models. Application of this strategy to a simulated batch polymerization process is given in Section 4. Finally Section 5 draws some concluding remarks. 2. Batch-to-Batch Control The batchwise LTV model-based ILC developed by Xiong and Zhang16 is reviewed in this section. Batch processes where the batch run length (tf) is fixed and consists of N sampling intervals (i.e. N ) tf/h, where h is the sampling time) are considered. 2.1. Batchwise LTV Perturbation Model. Since ILC theory is well-developed for linear time-invariant (LTI) and LTV systems,9,26-29 linearized models should be developed. Subtracting the time-varying nominal trajectories from the process operation trajectories removes the majority of the process nonlinearity and allows linear modeling methods to perform well on the resulting perturbation variables.23 Let the nominal control trajectory and its corresponding product quality trajectory be, respectively, defined as Us ) [us(0), us(1), ..., us(N - 1)]T and Ys ) [ysT(1), ysT(2), ..., ysT(N)]T with ys(0) ) y0. The perturbation variables of the control and product quality variables are defined, respectively, as U h k ) Uk - Us and Y h k ) Yk - Ys, where the subscript k denotes the batch index; Uk and Yk are trajectories of the control and product quality at the kth batch run; and yjk(0) ) 0. A batch-wise LTV perturbation model can be obtained as

Y h k ) G sU h k + dk

(1)

where Gs is the linearized model and dk is a disturbance sequence.16 Gs is batch-wise linear time varying in the sense that it varies with Us, which usually varies from batch to batch. Due to the causality (i.e., the product quality variables at time t is a function of only all control actions up to time t), the structure of Gs is restricted to the following lower block triangular form:

[

g10

0 g20 g21 Gs ) · · · · · · gN0 gN1

· · ·

0

· · · 0 · ·· · · · · · · gNN-1

]

(2)

where gij ∈ Rn. The batchwise LTV model Gs can be found by linearizing a nonlinear model along the nominal trajectories or through direct identification from process operational data. If the fundamental mechanistic model of a batch process is available, one can linearize the model around the nominal batch operation trajectories to build the

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005 3985

perturbation model.29 However, in many cases, developing detailed mechanistic models of batch processes is very difficult and time-consuming. Empirical models based on process operation data can provide useful alternatives. Available methods for identifying the perturbation model include simple static linear regression, such as the least squares.5 To count for the possible existence of collinearity problems, the ordinary inverse in the least-squares method can be replaced by a generalized inverse, e.g. partial least squares (PLS). Chin et al.7 presents using PLS to build a linear correlation model to predict the final product quality. More elaborate optimal dynamic estimation methods, like the Kalman filtering,20 can also be used to identify the model. 2.2. Batch-to-Batch Iterative Learning Control. The prediction of perturbation model in the batch-tobatch control is defined as

runs, the algorithm has an integral action with respect to the batch index k.9 The weighting matrixes Qs and Rs affect the contributions of the tracking errors and control changes in eq 10 and should be selected carefully. A relatviely large weight on the control change (Rs) will lead to more conservative adjustments of control actions and slower convergence. A relatviely small Rs will lead to large adjustments of control actions, but this could lead to unconvergence as large change of control actions may result the linearized model being invalid. It is possbile to weight tracking errors and control actions at different time stage differently. For the sake of simplicity, Qs and Rs are selected in this study as Qs ) λqInN and Rs ) λrIN. By finding the partial derivative of the quadratic objective function eq 10 with respect to the control ILC and through straightforward manipulachange ∆U h k+1 tion, the following ILC law can be obtained:

ILC ILC Y hˆ k+1 )G ˆ sU h k+1

ILC ∆U h k+1 )K ˆ ILCeILC k

(3)

where the superscript ILC represents batch-to-batch iterative learning control. After completion of the kth batch run, prediction error between off-line measured or analyzed product qualities and their model predictions can be calculated as

)Y hk - Y hˆ ILC ˆ ILC k k

(4)

Model errors of the immediate previous batch run are used to modify predictions of the perturbation model as follows: ILC ILC )Y hˆ k+1 + ˆ ILC Y h˜ k+1 k

(5)

e˜ ILC )Y hd - Y h˜ ILC k k

(6)

where Y h d ) Yd - Ys, and Yd is specified reference trajectory. From eqs 3-6, an iterative relationship for e˜ ILC k along the batch index k can be obtained as16 ILC ILC ) eILC -G ˆ s∆U h k+1 e˜k+1 k

(7)

where eILC is defined as k

eILC )Y hd - Y h ILC k k

(8)

ILC and ∆U h k+1 represents the input change between two adjacent batch runs and is defined as

ILC ILC )U h k+1 -U h ILC ∆U h k+1 k

(9)

By the certainty-equivalence principle,30 we consider solving the following quadratic objective function based on the modified prediction errors upon the completion of the kth batch run to update the control trajectory for the (k+1)th batch run:

1 ILCT ILC ILC ILCT ILC ) [e˜ k+1 Qse˜ k+1 + ∆U h k+1 Rs∆U h k+1 ] min Jk+1 2

ILC ∆U h k+1

where K ˆ ILC is defined as the learning rate and is given as

ˆ sTQsG ˆ s + Rs]-1G ˆ Ts Qs K ˆ ILC ) [G

(10)

where Qs and Rs are positive definitive matrices. Note that the above objective function has a penalty term on the control change ∆U h k+1 between two adjacent batch

(12)

From eqs 9 and 11, the ILC law for the control trajectory can be written as ILC )U h ILC +K ˆ ILCeILC U h k+1 k k

(13)

will nominally converge as k f ∞ It is shown that eILC k ˆ ILC has all its eigenvalues inside the unit if I - G ˆ sK circle,16 i.e.

|I - G ˆ sK ˆ ILC| < 1

The tracking error can be calculated as

(11)

(14)

3. Integrated Batch-to-Batch Control and within Batch On-Line Control Under batch-to-batch control, the product quality of the current batch run will depend completely on the recipe decided off-line. The entire recipe is calculated before the start of a batch, and feedback adjustments occur only between batches. So batch-to-batch ILC strategy can only improve the performance of future batch runs and cannot improve the performance of the current batch run. Hence, at least one batch will yield significant error if a large disturbance occurs. In addition, it cannot handle disturbances that change from batch to batch in a completely random fashion and may actually amplify their effect.18 However, if on-line measurement of output variables can be made on a reliable basis, one can explore the possibility of implementing on-line control that adjusts the future input policy while the batch is going on.20 SHMPC21-23 is the most suitable for on-line control of batch processes within the current batch. In SHMPC, the optimization problem is constantly changing during the batch because of the arrival of additional measurements and because of the decreasing length of the control vector. It means that as time progresses fewer control moves can be changed to affect the quality outcome of the batch, and prediction horizon also shrinks with time as the batch progresses.22 Thus, the horizon of model prediction p is equal to the control horizon m and they both decrease while time t passes within the current batch (i.e., m ) p ) N - t). While all

3986

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005

of the remaining input moves are calculated at each time, only the first of these is implemented, and the rest are recalculated at the next time. An integrated batch-to-batch ILC and SHMPC approach is proposed in this paper. During on-line SHMPC, it is quite useful to update the remaining future control moves based on the calculated batch-to-batch ILC profile ILC , instead of directly calculating the future control U h k+1 actions. If the future control actions are calculated directly, then SHMPC could “undo” the ILC corrections, and this could lead to divergence.18,20 During on-line SHMPC, the remaining future control moves can be represented as the ILC control action plus a correction term: OLC ILC OLC U h k+1 (t + m) ) U h k+1 (t + m) + δU h k+1 (t + m)

(15)

OLC OLC OLC (t + m) ) [u j k+1 (t), ..., u j k+1 (t + m - 1)]T is a where U h k+1 vector of remaining m (m ) N - t) control actions to be ILC ILC ILC (t + m) ) [u j k+1 (t), ..., u j k+1 (t + m - 1)]T is obtained, U h k+1 a vector of control values in the same m horizons that OLC is the on-line have been calculated by ILC, δU h k+1 control action correction, and the superscript OLC represents on-line control. 3.1. Within Batch Predictive LTV Perturbation Model. To implement SHMPC on-line, a more accurate predictive model has to be proposed based on the current output values and remaining control moves. In the batch-wise LTV perturbation model, it can be seen that ILC (j) at time j (j ) 1, 2, ..., N) is related to all output yjk+1 ILC ILC ILC (j) ) [u j k+1 (0), ..., u j k+1 (j input values up to time j, U h k+1 ILC T h k+1(j)]). Considering the 1)] (i.e., yjk+1(j) ) fj[yjk(0), U causality in eqs 2 and 3 and due to yjk(0) ) 0, the prediction of the batch-wise LTV perturbation model of the product quality variables at time j (j ) 1, 2, ..., N) ILC ILC (j) ) gTj U h k+1 (j), where gj is can be represented by yjˆ k+1 the jth row vector of Gs in eq 2. However, to utilize on-line SHMPC within the current batch run, the future values yjk+1(t + i) (i)1, 2, ..., m) have to be predicted using the remaining future control OLC (t + m) and the current values of the moves U h k+1 product quality yjk+1(t), which can be represented as follows:

OLC h k+1 (t + i)) + wk(t + i) (16) yjk+1(t + i) ) fi(yjk+1(t), U

where i ) 1, 2, ..., m, fi(‚) represents a nonlinear static function, and wk is measurement noise. Therefore, we cannot directly use the batch-wise LTV perturbation model eq 3 to predict the future values yjk+1(t + i) at time t within the (k+1)th batch. In this study, a new predictive LTV perturbation model within a batch is proposed as follows: OLC OLC (t + i|t) ) gj t0yjk+1(t) + gj tiU h k+1 (t + i) yjˆ k+1

(17)

where gj t0 ) diag{gt,01, ..., gt,0n}, gj ti ) [gt,i0, gt,i1, ..., OLC OLC OLC (t+i) ) [u j k+1 (t), ..., u j k+1 (t + i - 1)]T (i ) 1, 2, and U h k+1 ..., m). Equation 17 can be written in the following matrix form:

OLC OLC OLC (t + m|t))[yjˆ k+1 (t + 1|t), ..., yjˆ k+1 (t + m|t)]T, where Y hˆ k+1 Gt ) [Gt0, Gtm] is defined as the predictive LTV perturbation model, and

To identify the parameters, Gtm is partitioned according to the time index of output trajectory as a block column matrix Gtm ) [gt1T, gt2T, ..., gtmT]T, where

(i ) 1, 2, ..., m). Then model parameters to be estimated are reformed as a vector Θti ) [gt,01, gt,02, ..., gt,0n; gt,i0, gt,i1, ..., gt,ii-1]T and can also be identified by the leastsquares regression method based on the historical process operation data set as presented in Xiong and Zhang.16 3.2. Within Batch On-Line Control Policy Correction. To improve the accuracy of the predictive model, predictive errors of the immediate previous batch run are utilized to modify predictions of the predictive model in the current batch run, which is defined as OLC OLC Y hˆ k+1 (t + m|t) ) Y hˆ k+1 (t + m|t) + ˆ OLC (t + m|t) (20) k

where

(t + m|t) ) Y h k(t + m) - Y hˆ OLC (t + m|t) (21) ˆ OLC k k The tracking error of the modified predictive model for the remain trajectory is defined as OLC OLC (t + m|t) ) Y h d(t + m) - Y h˜ k+1 (t + m|t) (22) e˜ k+1

where Y h d(t + m) ) [yjd(t + 1), ..., yjd(t + m)]T. The objective function of the SHMPC is defined as

1 OLCT OLC OLC (t + m|t)Qte˜ k+1 (t + m|t) + Jk+1 (t) ) [e˜ k+1 2 + m)

min

OLC(t δU h k+1

T

OLC OLC δU h k+1 (t + m)RtδU h k+1 (t + m)] (23)

where Qt and Rt are positive definitive weighting matrixes with appropriate dimensions. OLC (t + Substitute eqs 15 and 18 into eq 20, then Y h˜ k+1 m|t) can be rewritten further as OLC ILC (t + m|t) ) G ˆ t0yjk+1(t) + G ˆ tmU h k+1 (t + m) + Y h˜ k+1 OLC h k+1 (t + m) + ˆ OLC (t + m|t) (24) G ˆ tmδU k

We define tracking error

h d(t + m) - G ˆ t0yjk+1(t) ηk+1(t + m) ) Y ILC h k+1 (t + m) - ˆ OLC (t + m|t) (25) G ˆ tmU k

gt,ii-1]T,

[

OLC (t + m|t) ) Gt Y hˆ k+1

yj k+1(t) OLC U h k+1 (t + m)

]

) Gt0yjk+1(t) +

OLC h k+1 (t + m) (18) GtmU

Then we have OLC OLC e˜k+1 (t + m|t) ) ηk+1(t + m) - G ˆ tmδU h k+1 (t + m) (26)

By finding the partial derivative of the quadratic objective function eq 23 with respect to the deviation of OLC (t + m) and through remaining input moves δU h k+1 straightforward manipulation, the following on-line

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005 3987

SHMPC law within batch can be obtained: OLC δU h k+1 (t + m) ) K ˆ OLC ηk+1(t + m) t

(27)

K ˆ OLC ) [G ˆ TtmQtG ˆ tm + Rt]-1G ˆ TtmQt t

(28)

where

Then according to eq 15, the following SHMPC law can be obtained: OLC ILC (t + m) ) U h k+1 (t + m) + K ˆ OLC ηk+1(t + m) (29) U h k+1 t OLC Only the first element of U h k+1 (t + m) is applied to the process, and the same procedure is repeated with t increased by 1 but control horizon m shrunk by 1. The above SHMPC law is similar to the one in Lee et al.8,14,20 except for the term ηk+1(t + m) instead of ek(t|t). In the batch MPC (BMPC) technique and its extension QBMPC for tracking control proposed by Lee et al.,20 they presented a predictor:

ek(t + m|t) ) ek(t|t) - Gm(t)∆um k (t)

(30)

where ek(t|t) is an estimate of ek(t) by time-varying Kalman filter based on information available at time t of the kth run. By also employing the conventional quadratic objective function similar to eq 23, the control moves of remaining m horizons were given in an analytical form as

∆um k (t) ) (GmT(t)Q(t)Gm(t) + R(t))-1GmT(t)Q(t)ek(t|t) (31) More details can be found in the literatures.8,14,20 From eqs 29 and 31, the control actions of remaining m horizons are updated in a similar way. But we use the different predictive perturbation model Gtm and the tracking error ηk+1(t + m) in the error transition model eq 26, whereas the tracking error ek(t|t) estimated by time-varying Kalman filter is utilized in eq 30. 3.3. Summary of the Integrated Control Algorithm. The proposed integrated control strategy combining batch-to-batch ILC and within batch on-line SHMPC is shown in Figure 1, and the procedure of integrated control is outlined as follows: Step 1. Based on the historical process operation data set, select the nominal input and output trajectories (Us,Ys) and build the LTV perturbation model Gs and predictive model Gt. Initially set k ) 0, U h ILC )U h OLC ) k k Us, and complete the batch run. Step 2. The model prediction errors ˆ ILC are calcuk lated and used to correct the batch-wise model predicILC and the modified predictions Y h˜ k+1 , tions. Based on U h ILC k ILC a new control policy U h k+1 for the next batch is calculated by using the ILC law (eq 13). Step 3. During the (k + 1)th batch, based on the calculated control policy, use SHMPC to update the future control policy for the remaining batch period. Set time t ) 1. (i) Set m ) N - t. Using model Gt, and based on the ILC (t + m) and errors ˆ OLC (t + m|t) calculated control U h k+1 k calculated in the previous batch, the future control OLC (t + m) is obtained by using SHMPC law policy U h k+1 (eq 29).

Figure 1. Integrated control strategy combing batch-to-batch ILC with on-line control within a batch. OLC OLC (t), the first element of U h k+1 (t + m), is (ii) u j k+1 applied to the process. (iii) Set t ) t + 1 and return to step (i) until t ) N. (iv) After the (k + 1)th batch run, the output profile OLC Y h k+1 and the whole on-line control policy U h k+1 are recorded. ILC OLC Step 4. Set U h k+1 ) U h k+1 and k ) k + 1, return to step 2.

4. Application to a Simulated Batch Polymerization Reactor This example involves a thermally initiated bulk polymerization of styrene in a batch reactor. The differential equations describing the polymerization process are given by Kwon and Evans31 through reaction mechanism analysis and laboratory testing. Gattu and Zafiriou32 report the parameter values of the first principle model. Dong et al.3 also use it to demonstrate batch-to-batch optimization. The differential equations for this process are given below:

dx1 ) f1 ) dt Em F02F (1 - x1)2 exp(2x1 + 2χx12)Am exp (32) Mm uTref

(

( (

f1x2 C1x2 dx2 ) f2 ) 1dt 1 + x1 Aw exp(B/uTref)

)

) )

f1 Aw exp(B/uTref) dx3 ) f3 ) - x3 dt 1 + x1 C2 with

(33)

(34)

3988

F)

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005

1 - x1 x1 + F ) r1 + r2Tc r1 + r2Tc r3 + r4Tc 0 Tc ) uTref - T0 (35)

where x1 is the conversion, x2 ) xn/xnf and x3 ) xw/xwf are, respectively, the dimensionless number-average and weight-average chain lengths (NACL and WACL), u ) T/Tref is the control variable, T is the absolute temperature of the reactor, and Tc is the temperature in degree Celsius, Aw and B are coefficients in the relation between WACL and temperature obtained from experiments, Am and Em are, respectively, the frequency factor and activation energy of the overall monomer reaction, the constants r1 to r4 are density-temperature corrections, and Mm and χ are the monomer molecular weight and polymer-monomer interaction parameter. Table 1 gives the reference values used to obtain the dimensionless variables as well as the values of reactor parameters. The final time tf is fixed to be 313 min.32 The initial values of the states are x1(0) ) 0, x2(0) ) 1, and x3(0) ) 1. In this study, the above mechanistic model (eqs 3235), is assumed to be not available, and LTV perturbation models are utilized to build the relationship between u and y ) [x1, x2, x3]T. Here the batch length is divided into N equal stages and two values of N are studied, N ) 10 and N ) 5. The desired product reference trajectory, Yd, was taken from the literature.32 Thirteen batches of process operations under different temperature profiles were simulated from the mechanistic model and used as the historical process data sets for building relationship between u and y. A batch-wise LTV perturbation model Gs is utilized to build the relationship between u and y over an entire batch, a within-batch predictive LTV perturbation model Gt is built to represent the dynamic model between u and y within a batch, and the model parameters are estimated by using the least-squares regression method. In this case study, the least-squares method is used because the collinearity problem does not present. To investigate the performance of the proposed integrated control strategy, it is compared with the batchto-batch ILC scheme. The parameters in ILC were set as Qs ) IN and Rs ) 0.05IN, while the parameters in integrated control were set as Qt ) Im and Rt ) 0.05Im, where m e N and it is shrinking with time t during a batch. The results under two control strategies are shown in Figures 2 and 3. Although the number of parameters to be estimated when N ) 10 is more than those for N ) 5, the models are more accurate than those for N ) 5, and the results for N ) 10 are slightly better than those for N ) 5 under two strategies. Figure 2 shows the root-mean-square-error (RMSE) of tracking error of product quality ek under two strategies at different batches. Since the final product quality is of the main Table 1. Parameter Values of the Batch Polymerization Process Am Aw B Em Mm r1 r3 r2 r4

4.266 × 105 m3/kmol s 0.033454 4364 K 10103.5 K 104 kg/kmol 0.9328 × 103 kg/m3 1.0902 × 103 kg/m3 -0.87902 kg/m3 °C -0.59 kg/m3 °C

Tref tf xnf xwf C1 C2 T0 χ

399.15 K 313 min 700 1500 1400 1500 273.15 0.33

Figure 2. Convergence of RMSE under two strategies in different time stages: (a) N ) 5; (b) N ) 10.

interest in batch process operation, the tracking errors ek(tf) ) Yd(tf) - Yk(tf) at the batch end-point from these two strategies are also compared, as shown in Figure 3. Figures 2 and 3 also show that ek(tf) is improved gradually while the whole trajectory converges asymptotically to the desired trajectory. It can also be seen that when N ) 10, both the RMSE of ek and ek(tf) have almost converged after about three batch runs under the integrated control strategy, but they converge after eight batch runs under the batch-to-batch ILC scheme. In Figure 3, under the batch-to-batch ILC, all the three ek(tf) exhibit overshoot before they gradually approach to zero. Figure 4 shows the product quality profiles Yk of the 1st, 5th, and 15th batch runs when N ) 10 under the batch-to-batch ILC, which are also compared with the desired profile Yd and nominal trajectory Ys. The product quality profiles Yk of the 1st, 5th, and 15th runs under the integrated control strategy are shown in Figure 5. In Figure 5, it can be seen that all product quality profiles Yk have already converged to the desired reference Yd after five batch runs under the integrated control strategy, while there are still some errors between Yk of the 5th run and Yd under the batch-tobatch ILC. As can be seen, the integrated control strategy has the advantage of combined error correction within a batch and the gradual reduction to the minimum error afforded by the batch-to-batch control. Figures 6 and 7 show, respectively, the corresponding control profiles Uk of the 1st, 5th, and 15th batch runs under the batch-to-batch ILC and under the integrated control strategy, in which the nominal trajectory Us is also presented.

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005 3989

Figure 3. Convergence of ek(tf) under two strategies (N ) 10): (a) x1; (b) x2; (c) x3.

Table 2 shows the performance of batch-to-batch control and the integrated control stretagy in the first batch. It should be noted in Table 2 that the values of final product qualities at time t ) 2, 5, and 7 are the predictions Y ˆ k(tf)of the final product qualities, not the actual values Yk(tf). As shown in Table 2, at time t ) 2, 5, and 7 in the first batch run under the integrated control, the predictions of final product qualities are gradually improved under SHMPC strategy, which are better than the values under ILC only. Figure 8 also shows that during the first batch run under the intewas calculated by the ILC law grated control, U h ILC 1 before the batch run began, but the control action at each time stage was slightly updated by SHMPC and then implemented to the process, finally the control profile was changed to U h OLC . It can be seen that, under 1 the integrated control scheme, its advantage of error correction within a batch offered by SHMPC is combined

Figure 4. Trajectories of quality variables under batch-to-batch ILC (N ) 10): (a) x1; (b) x2 ; (c) x3.

with the benefit of gradual reduction to the minimum error offered by the batch-to-batch control. We also consider how disturbances that occur just for a single batch affect the batch-to-batch behavior of the product qualities under two control strategies. The scenario here is that the kinetic parameter Am (the frequency factor of the overall monomer reaction) changes from its nominal value Am0 to 1.2Am0 in the 10th batch and switches back to the original value at the 11th batch. Figure 9 shows the RMSE of tracking error of product quality ek under the two strategies in the disturbance case, and Figure 10 compares the performance of endpoint tracking error ek(tf) under two strategies. As can be seen, in the case of the batch-to-batch ILC, the

3990

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005

Figure 6. Convergence of Uk under batch-to-batch ILC (N ) 10).

Figure 7. Convergence of Uk under integrated control compared with Us (N ) 10). Table 2. Performance in the First Batch Run of Two Strategies (N ) 10) integrated control (t + m) U h OLC 1 Yk(tf)a

x1 x2 x3

t)2

t)5

t)7

t ) 10

batch-tobatch ILC U h ILC 1

0.7767 1.0148 1.0064

0.7781 1.0117 1.0054

0.7827 1.0072 1.0030

0.7877 1.0047 1.0021 0.00339

0.7758 1.0193 1.0106 0.00682

RMSE of ek a

Figure 5. Trajectories of quality variables under integrated control (N ) 10): (a) x1; (b) x2 ; (c) x3.

disturbance of the 10th batch resulted in a large error in that batch. The error of the 10th batch causes incorrect control profile in subsequent batches. The errors of subsequent batches decreased by the batchto-batch ILC action, but the error has more effect on the subsequent batches. In the case of integrated control, the errors in the 10th batch were reduced significantly through the on-line SHMPC method. The effect of the disturbance does carry over to the next batch due to the batch-to-batch control but the effect is diminished more rapidly compared with the batch-tobatch ILC. 5. Conclusions An integrated batch-to-batch iterative learning control and on-line shrinking horizon model predictive

Yd(tf) ) [0.792, 1.003, 1.001]T.

control strategy for the tracking control of product quality in batch processes is proposed. Under the batchto-batch ILC strategy, the performance of future batch runs can be improved and the convergence of batch-wise tracking error is guaranteed based on a linear time varying perturbation model. But the entire recipe is calculated before the start of batch and feedback adjustments occur only between batches, so ILC only improves the performance of future batch runs and cannot improve the performance of the current batch run. On the other hand, on-line SHMPC within a batch can reduce the effects of disturbances and improve the performance of the current batch run. Based on the current output values and remaining input moves, a more accurate predictive model has been proposed and the model prediction is also modified by adding the estimated error calculated from the batch-to-batch controller. Because on-line SHMPC can respond to disturbances immediately and batch-to-batch ILC can

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005 3991

effect of disturbances than the results for only implementing ILC from batch to batch. The proposed strategy is illustrated on a simulated batch polymerization process. The results demonstrate that the performance of tracking control for product qualities can be improved quite well under the integrated control strategy than under the batch-to-batch ILC, especially when disturbances exist. Acknowledgment The authors gratefully acknowledge the support from National Science Foundation of China (NSFC 60404012) and UK EPSRC (GR/N13319 and GR/R10875). Nomenclature Figure 8. Comparison of U h ILC and U h OLC in the first batch run 1 1 under integrated control strategy (N ) 10).

Figure 9. Comparison of RMSE under two strategies in the disturbance case (N ) 10).

Figure 10. Comparison of ek(tf) under two strategies in the disturbance case (N ) 10).

correct any bias left uncorrected by the on-line controller, it is very useful to integrate both methods to obtain good control performance of tracking trajectories. The integrated control strategy can combine the advantages of both methods. If disturbances occur, the integrated control method is expected to diminish more rapidly the

dk ) disturbance sequence in LTV perturbation model ek ) tracking error of measured product qualities at the kth batch run eILC ) tracking error of LTV perturbation model under k ILC method e˜ ILC ) tracking error of modified prediction of perturbak tion model e˜ OLC ) tracking error of the modified predictive model k under OLC method Gs ) batch-wise LTV perturbation model Gt ) within-batch predictive LTV perturbation model ILC ) iterative learning control k ) batch index K ˆ ILC ) learning rate of ILC method ) gain matrix of SHMPC law at time t under OLC K ˆ OLC t method m ) control horizon in SHMPC N ) sampling intervals of each batch run OLC ) on-line control p ) prediction horizon in SHMPC Qs ) weighting matrix for tracking error in ILC method Qt ) weighting matrix for tracking error in OLC method Rs ) weighting matrix for control change in ILC method Rt ) weighting matrix for control change in OLC method tf ) batch run length Uk ) measured control trajectory at the kth batch run U h k ) perturbation of control trajectory U h ILC ) perturbation of control trajectory under ILC k method U h OLC ) perturbation of control trajectory under OLC k method δU h OLC ) on-line control action correction k ∆U h ILC ) control change between two adjacent batch runs k under ILC method Us ) nominal control trajectory wk ) measurement noise in the predictive LTV perturbation model within a batch Yd ) specified reference trajectory Y h d ) perturbation of reference trajectory Yk ) measured product quality trajectory at the kth batch run Y h k ) perturbation of product quality trajectory Y h ILC ) perturbation of product quality trajectory under k ILC method Y hˆ ILC ) prediction of LTV perturbation model under ILC k method Y h˜ ILC ) modified prediction of LTV perturbation model k under ILC method Y h˜ OLC ) modified prediction of within-batch predictive k LTV perturbation model under OLC method Ys ) nominal product quality trajectory

3992

Ind. Eng. Chem. Res., Vol. 44, No. 11, 2005

Greek Letters ˆ ILC k

) prediction error of perturbation model under ILC method ˆ OLC ) prediction error of predictive model under OLC k method ηk ) tracking error of modified predictive model under OLC method

Literature Cited (1) Bonvin, D. Optimal operation of batch reactorssA personal view. J. Process Control 1998, 8, 355-368. (2) Clarke-Pringle, T. L.; MacGregor, J. F. Optimization of molecular-weight distribution using batch-to-batch adjustments. Ind. Eng. Chem. Res. 1998, 37, 3660-3669. (3) Dong, D.; McAvoy, T. J.; Zafiriou, E. Batch-to-batch optimization using neural network models. Ind. Eng. Chem. Res. 1996, 35, 2269-2276. (4) Doyle, F. J., III; Harrison, C. A.; Crowley. T. J. Hybrid model-based approach to batch-to-batch control of particle size distribution in emulsion polymerisation. Comput. Chem. Eng. 2003, 27, 1153-1163. (5) Srinivasan, B.; Bonvin, D.; Visser, E.; Palanke, S. Dynamic optimization of batch processes. II. Role of measurements in handling uncertainty. Comput. Chem. Eng. 2003, 27, 27-44. (6) Bonne, D.; Jorgensen, S. B. Development of learning control for reproducible and high quality operation of batch processes. In Proceedings of the 6th IFAC Symposium on Dynamics and Control of Process Systems (DYCOPS-6), Cheju Island, Korea, June 4-6, 2001; pp 449-454. (7) Chin, I. S.; Lee, K. S.; Lee, J. H. A technique for integrated quality control, profile control, and constraint handling for batch processes. Ind. Eng. Chem. Res. 2000, 39, 693-705. (8) Lee, K. S.; Lee, J. H. Convergence of constrained modelbased predictive control for batch processes. IEEE Trans. Automatic Control 2000, 45, 1928-1932. (9) Lee, J. H.; Lee, K. S.; Kim, W. C. Model-based iterative learning control with a quadratic criterion for time-varying linear systems. Automatica 2000, 36, 641-657. (10) Xu, J. X.; Hu, Q.; Lee, T. H.; Yamamoto, S. Iterative learning control with smith time delay compensator for batch process. J. Process Control 2001, 11, 321-328. (11) Campbell, W. J.; Firth, S. K.; Toprac, A. J.; Edgar T. F. A comparison of run-to-run control algorithms. In Proceedings of the 2002 American Control Conference; IEEE: Piscataway, NJ, 2002; pp 2150-2155. (12) Amann, N.; Owens, D. H.; Rogers, E. Iterative learning control for discrete-time system with exponential rate of convergence. IEE Proc.sD: Control Theory Appl. 1996, 143, 217-224. (13) Gao, F.; Yang, Y.; Shao, C. Robust iterative learning control with applications to injection molding process. Chem. Eng. Sci. 2001, 56, 7025-7034. (14) Lee, K. S.; Chin, I. S.; Lee, H. J.; Lee, J. H. Model predictive control technique combined with iterative learning control for batch processes. AIChE J. 1999, 45, 2175-2187. (15) Chae, C. D.; Chin, S. I.; Lee, S. K.; Rho, H.; Rhee, H.; Lee, J. H. Integrated quality tracking control of a batch PMMA reactor using QBMPC technique. Comput. Chem. Eng. 2000, 24, 953958.

(16) Xiong, Z. H.; Zhang, J. Product quality trajectory tracking in batch processes using iterative learning control based on timevarying perturbation models. Ind. Eng. Chem. Res. 2003, 42, 6802-6814. (17) Xiong, Z.; Zhang, J. Batch-to-batch optimal control of nonlinear batch processes based on incrementally updated models. IEE Proc.sD: Control Theory and Appl. 2004, 151, 158-165. (18) Lee, K.; Lee, J. H.; Yang, D. R.; Mahoney, A. W. Integrated run-to-run and on-line model-based control of particle size distribution for a semi-batch precipitation reactor. Comput. Chem. Eng. 2002, 26, 1117-1131. (19) Flores-Cerrillo, J.; MacGregor, J. F. Within batch and batch-to-batch inferential adaptive control of semibatch reactors: A partial least squares approach. Ind. Eng. Chem. Res. 2003, 42, 3334-3345. (20) Lee, K. S.; Lee, J. H. Iterative learning control-based batch process control technique for integrated control of end product properties and transient profiles of process variables. J. Process Control 2003, 13, 607-621. (21) Soni, A. S.; Parker, R. S. Closed-loop control of fed-batch bioreactors: A shrinking-horizon approach. Ind. Eng. Chem. Res. 2004, 43, 3381-3393. (22) Joseph, B.; Hanratty F. W. Predictive control of quality in a batch manufacturing process using artificial neural network models. Ind. Eng. Chem. Res. 1993, 32, 1951-1961. (23) Russell, S. A.; Kesavan, P.; Lee, J. H. Recursive data-based prediction and control of batch product quality. AIChE J. 1998, 44, 2442-2458. (24) Liotta, V.; Georgakis, C.; El-Aasser, M. S. Real-time estimation and control of particle size in semi-batch emulsion polymerization. In Proceedings of the American Control Conference; IEEE: Piscataway, NJ, 1997; pp 1172-1176. (25) Thomas, M. M.; Joseph, B.; Kardos, J. L. Batch chemical process quality control applied to curing of composite materials. AIChE J. 1997, 43(10), 2532-2545. (26) Moore, K. L. Iterative Learning Control for Deterministic SystemssAdvances in Industrial Control; Springer-Verlag: London, 1993. (27) Owens, D. H.; Munde, G. Error convergence in an adaptive iterative learning controller. Int. J. Control 2000, 73, 851-857. (28) Saab, S. A Discrete-time learning control algorithm for a class of linear time-invariant systems. IEEE Trans. Automatic Control 1995, 40, 1138-1142. (29) Penlidis, A.; Ponnuswarmy, S. R.; Kiparissides, C.; O’Driscoll, K. F. Polymer reaction engineering: Modeling considerations for control studies. Chem. Eng. J. 1992, 50, 95-107. (30) Lee, K. S.; Lee, J. H. Model predictive control for nonlinear batch processes with asymptotically perfect tracking. Comput. Chem. Eng. 1997, 21, s873-s879. (31) Kwon, Y. D.; Evans, L. B. A coordinate transformation method for the numerical solution of nonlinear minimum-time control problems. AIChE J. 1975, 21, 1158-1164. (32) Gattu, G.; Zafiriou, E. A methodology for on-line setpoint modification for batch reactor control in the presence of modeling error. Chem. Eng. J. 1999, 75, 21-29.

Received for review October 14, 2004 Revised manuscript received March 22, 2005 Accepted March 24, 2005 IE049000O