Integrated Batch-to-Batch Control and within-Batch Online Control for

Oct 24, 2008 - The control design of batch process has both dynamic and static ...... Figure 9 shows the evolution of the control variable xc of these...
1 downloads 0 Views 2MB Size
Ind. Eng. Chem. Res. 2008, 47, 8693–8703

8693

Integrated Batch-to-Batch Control and within-Batch Online Control for Batch Processes Using Two-Step MPLS-Based Model Structures Junghui Chen* and Kuen-Chi Lin R&D Center for Membrane Technology and Department of Chemical Engineering, Chung-Yuan Christian UniVersity, Chung-Li, Taiwan 320, Republic of China

A feedback profile tracking scheme is proposed for batch-to-batch and within-batch control of the end-point quality in batch processes. This new method is based on two-step multiway partial least squares (MPLS) models. The first-step MPLS model, called the quality MPLS, is used to relate the final qualities with the online measurements; the second one, called the measurement MPLS, can relate the online measurements with both the manipulated variables and the prior measured variables. Because the standard MPLS model embeds all process variables into a single input data block, the input variables can be adjusted only on the basis of target qualities at the end point. With the proposed method, the desired online measured variables along the time axis can be computed using the quality MPLS; then the operating input variables can be appropriately adjusted using the measurement MPLS to match the desired online measured variables at each time point and finally get the target qualities at the end-time point. Under these two-step MPLS model structures, the integrated control strategy is sequentially developed by combining batch-to-batch control with withinbatch control. Also, the conventional double exponentially weighted moving average control method can be separately and directly applied to each input-output variable in the reduced space of the latent variables. It can gradually reduce the model errors for the model-plant mismatches between batches. The applications are discussed through a typical batch reactor to demonstrate the advantages of the proposed method in comparison with the conventional methods. I. Introduction Batch processes, such as polymer reaction systems, pharmaceutical manufactures, and biochemical and semiconductor processes, have the flexibility to meet the needs of the fluctuating market requirements, so they have received increasing attention in recent years. The operation of the batch process is quite different from that of the continuous process, because the former, as the name indicates, is characterized by prescribed processing of raw materials as a discrete entity for finite amount of time when producing a finished product. It is transient in nature with its state changed with time so that the operating trajectories of the manipulated variables can have significant effects on the final product characteristics. Good quality in the batch processes usually means that the same thing is consistently produced in each batch run. Unfortunately, these quality variables are difficult to measure online; they are usually examined off-line in a laboratory. Inspecting a finished product does not improve its quality; it only indicates the performance of the produced product. If the off-specification product can be fixed farther upstream of the point where inspection takes place, the problem of the batch run can be exposed. The appropriate procedures can be worked out to remove the disturbances just in time to maintain the specification product without waiting for completion of this batch. Therefore, to operate batch processes safely and profitably, the control design of optimal trajectories is strongly required. The control design of batch process has both dynamic and static constraints, so it falls into the class of dynamic optimization problem.1 When the parameters are associated with the model that are accurate and truly representative of the original batch process, the mathematical model is used in the optimization methods.2,3 However, such accurate models are seldom * To whom correspondence should be addressed. E-mail: jason@ wavenet.cycu.edu.tw. Fax: +886-3-2654199.

available in reality, especially for batch processes. Parameters involved with modeling, kinetics, and thermodynamics of a reaction, for instance, are not completely established for most of the batch processes. Their dynamic nature is also not very well understood. For this reason, the operations of many industrial batch processes are still currently based on the heuristic process understanding gained by experience rather than by mathematical models and optimization techniques even though the heuristic methods do not always guarantee optimal solutions. Some model-based techniques have been developed based on system inversion4 and model predictive control.5,6 Zhao, et al. (2000) used a multilayer feedforward neural network to model the batch polypropylene reactor and controlled it by an intelligent compound system consisting of bang-bang control, fuzzy control, and traditional PID control.7 Shahrokhi and Pishvaie (1998) proposed a trained feedforward artificial neural network to estimate the heat generation term and control the temperature by the feedforward/feedback control algorithm.8 The batch-to-batch iterative control strategy based on the neural network model was also proposed.9-11 Their trained neural network model was refined using the data from the previous batch run. However, the nonlinear predictive control design based on neural network models was computationally demanding. The implementation of this strategy might have been realistic only for control of slow dynamic systems when it came to online control. Recently, data-driven multivariable statistical techniques, such as multiway principal component analysis and multiway partial least-squares (MPLS), have been widely used to handle high dimensional and coupled data. They attracted lots of interest in profile tracking control in batch processes.12,13 Because MPLS used the process variables over the entire batch course as inputs, the batch operation data with the three-way matrix was first unfolded into a two-way matrix. Then the unfolded matrix and the output matrix were modeled using the standard PLS. The

10.1021/ie070803w CCC: $40.75  2008 American Chemical Society Published on Web 10/22/2008

8694 Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008 Table 1. Percentage of Variance Captured by Each PLS Component of the Quality MPLS Model and of the Measurement MPLS Model X-block LV no. (R)

this

LV

Y-block total

this

LV

total

Percent Variance Captured by Quality MPLS Model 1 2 3 4 5

63.96 5.40 11.30 2.46 4.26

63.96 69.36 80.65 83.11 87.37

92.91 2.62 1.03 1.24 0.32

92.91 95.53 96.56 97.80 98.12

Percent Variance Captured by Measurement MPLS Model 1 2 3 4 5

60.03 16.05 6.41 8.74 2.80

60.03 76.08 82.49 91.23 94.04

62.84 14.44 5.18 2.13 1.58

62.84 77.28 82.46 84.59 86.17

batch-to-batch and online control strategies were designed by incorporating the information of the previous batches. They explored the repetitive nature of the batches and the batch-tobatch correlation of the disturbances,12,13 but the MPLS control design was based on the fixed model. To have good control performance, a lot of effort is devoted to obtaining a good model of the operation process without knowing a prior if the model covers all the useful features for the control design. Furthermore, with the model-plant mismatches or aging of the process, the control design could not compensate for such process drifts or ramp disturbances and, as a result, offset in the process outputs occurred. To address this problem, work on the iterative identification and control design scheme has been developed.14-16 The iterative learning design is different from the previous adaptive control schemes, because in the former, the model and the controller are kept constant in between model and controller iterations. This does not have the instability problem of the adaptive control schemes.17 The iterative learning control assumes a known initial condition for the system at the beginning of each batch run. The new designed condition at

Figure 1. Data structure for modeling a batch process.

the next batch run is implemented only after the current batch is completely finished. Thus, even though the system is run in a closed-loop environment at each single batch run and the succession of model updates and controller updates are intertwined, iterative identification and control are still carried out in a batchwise mode. In our past work, the batch-to-batch iterative control strategy using the model prediction error from the previous batch run was constructed.18 However, the standard MPLS model embeds the entire batch data in a single data block; the adjusted input variables in the latent space cannot be changed during each batch run. This will hinder the system’s quick response from rejecting the disturbance at each time point. In this paper, the two-step MPLS models are developed to reflect the direct correlation between manipulated variables and measured variables and to improve the performance of the batch process monitoring and quality control. The scheme first divides the process data into two parts. In the first part, a quality MPLS model is constructed to describe the relationship between final qualities and online measurements; a measurement MPLS model is then used in the second part for the relationship between online measurements and both manipulated and prior measured variables. With the quality MPLS, the desired online measured variables at each time point can be estimated from the end-point target qualities. The measurement MPLS can then appropriately adjust the manipulated variable profiles to reach the desired online measured variables at each time point along the time axis. Like the features of the standard MPLS method, the twostep MPLS can condense the variance of the process into a very low-dimensional latent subspace. Only a few principal components can capture most of the pattern characteristics in the multivariable process system. The optimal tuning manipulated variable trajectories in the score space can be directly and separately applied to each loop pair under the MPLS modeling structure. Owing to the model-plant mismatches and unmeasured disturbances, the calculated optimal

Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008 8695

trajectories may not be optimal when they are implemented onto the actual batch unit. Like the conventional iterative learning control,19,20 MPLS-based iterative learning control is designed to calculate and adjust a recipe. The dEWMA (double exponentially weighted moving average) control algorithm based on model prediction errors of the previous batch run is embedded into a MPLS-based model structure. It can gradually reduce the model errors from batch-to-batch information and improve the control performance when there are model uncertainty and batchwise repeated disturbances. The remainder of this paper is organized as follows: The second section defines the design problem of the end-point quality control. The two-step MPLS models are developed in section 3. In section 4, batch-to-batch (BtB) control and within batch (WB) control are derived on the basis of the two-step MPLS models. With the MPLS decomposition structure, the dEWMA control design can be directly applied to the two MPLS models in the reduced space. For the next batch run, the manipulated profiles can be adjusted using the measured variables and the desired measured variables; the desired measured variables can be computed from the quality MPLS model. In the online control design, using online measurements from the current batch, WB is also developed to allow rapid rejection or reduction of the disturbances. The effectiveness of the proposed method is demonstrated through a simulation benchmark of a batch reactor in section 5. This example investigates the performance of the proposed method. A comparison with the conventional algorithms is also made. Finally, concluding remarks are made.

matrices are Xm(I × Jm × K) and Xc (I × Jc × K), while the two two-way data matrices are Xf(I × Jf) and Y(I × M). 3. Two-Step MPLS Modeling The given process data are divided into three blocks, a quality block (Y), an online measured block (Xm), and a manipulated block (X). Y block with a two-way array (I × M) summarizes the I runs and the M final properties (or responses). Xm(I × N1) block is constructed by unfolding Xm(I × Jm × K) shown in Figure 1, where xm(1 × Jm) at each time point are separately filled in the rest of columns of the Xm block along the time axis and N1 ) JmK. X block with a two-way array (I × N2) organizes Xf(I × Jf) and Xc(I × Jc × K), where N2 ) Jf + JcK. In Figure 1, the first Jf columns of the X block are the off-line measured data. xc(1 × Jc) at each time point are separately filled in the rest of the columns of the X block along the time axis. After Xm, X,and Y are scaled and mean centered, similar to the standard MPLS, the MPLS algorithm is separately applied to {X, Xm} and {Xm, Y}. The two outer models are quality MPLS Xm ) Tq(Wq)T + Eq Y ) Uq(Qq)T + Fq and measurement MPLS

where

2. End-Point Quality Control In batch process operation, the process variables undergo significant changes during the duration of the batch. The batch operation does not aim at keeping the process variables of the operating system at constant set points. Rather, its major objective is to find the profiles of the manipulated variables that can match the desired end-point quality when one batch is finished. It can be formulated mathematically as follows: 1 J ) min |ysp - y(T)|2 2 xc

(1)

subject to x˙m ) g(xm, xf, xc) y ) h(xm, xf, xc) L e xc(t) e U

0eteT and (2)

sp

where y is the desired product quality vector, T is the duration of each batch run, y(T)(1 × M) is the end-point of M quality variables. It can only be measured after the batch run is finished. xm(1 × Jm) is a vector with Jm online measured variables at each sampling point; xf(1 × Jf) is a vector with Jf off-line collected measurements before running the batch. xc(1 × Jc) is Jc profiles of the manipulated variables at each sampling point. U and L are the lower and the upper bounds of the manipulated trajectory, respectively; g and h give the description of the dynamic model of the batch process. As it is difficult to get the optimization of a reliable process model, a black-box model based on the operational data is a practical way. When there is more than one manipulated variable (Jc > 1) and quality variable (M > 1), a set of I numbers of historical batch data over K time intervals can be constructed into three-way arrays and twoway arrays as shown in Figure 1. The two three-way data

(3)

and

[ [ [ [

X ) Tm(Wm)T + Em Xm ) Um(Qm)T + Fm

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

(4)

q q uq1,1 · · · u1,r · · · u1,Rq (uq1)T l l l l q q · · · ui,Rq ) (uqi )T Uq ) uqi,1 · · · ui,r l l l l q q q (uIq)T uI,1 · · · uI,r · · · uI,Rq

(5)

q q tq1,1 · · · t1,r · · · t1,Rq (tq1)T l l l l q q q q T ) ti,1 · · · ti,r · · · ti,Rq ) (tqi )T l l l l q T q q q (t tI,1 · · · tI,r · · · tI,Rq I)

(6)

m m um1,1 · · · u1,r · · · u1,Rm (um1 )T l l l l m m · · · ui,Rm ) (umi )T Um ) umi,1 · · · ui,r l l l l m m m (uIm)T uI,1 · · · uI,r · · · uI,Rm

(7)

m m tm1,1 · · · t1,r · · · t1,Rm (tm1 )T l l l l m m Tm ) tmi,1 · · · ti,r · · · ti,Rm ) (tmi )T l l l l m m m (tIm)T tI,1 · · · tI,r · · · tI,Rm

(8)

Wq ) [w1q · · · wRq q ] and Qq ) [q1q · · · qRq q] are the loading matrices which show the influence of Xm and Y. Eq and Fq are the residual matrices that are not useful for describing Xm and Y, respectively. For the measurement MPLS model, similar definitions can be used to explain the relationship between X and Xm. Rq and Rm are the number of latent variables which

8696 Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008

Figure 2. The structure BtB control design using the integration of two-step MPLS models.

Figure 3. The structure of within-batch control design.

can be selected by some heuristic and other statistical methods.21,22 Equation 3 explains that the end point of the product quality (Y) can be inferred from the online measurements (Xm). Equation 4 shows the process measurements (Xm) can be manipulated by the operating variables (X). The inner relationships between Xm and Y and between X and Xm are separately given as quality MPLS, U q ) B qT q

(9)

where Bq ) diag(b1q · · · bRq q) is diagonal matrices containing the regression coefficients (brq) of the score model, and as measurement MPLS (10) Um ) BmTm where B ) diag(b1 · · · bRmm) is diagonal matrices containing the regression coefficients (brm) of the score model. From eq 9 and eq 10, the data blocks ({X,Xm} and {Xm,Y}) are broken into a series of univariate regression processes. As a result, the m

m

Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008 8697 q

q

m

m

transformed inputs and outputs for ti and ui and for ti and ui are completely decoupled. 4. Two-Step MPLS-Based dEWMA BtB Control Design

The goal of the BtB control design is to seek appropriate control input profiles xic that yield the product quality yi at the next batch run i to match the desired targets ysp. On the basis of the quality MPLS model, the desired online measured variables (xm,sp) can be estimated from the target (ysp). Then using the measurement MPLS, the optimal manipulated input profiles (xc) can be computed from the desired online measured variables (xm,sp). The block diagram of the BtB control system based on two-step MPLS dEWMA is shown in Figure 2. A. Computing the Desired Online Measured Variables using Quality MPLS-Based dEWMA. First, ysp and yi are sp decomposed into the lower dimensional space ysp ) yPLS + q,sp q f and yi ) yPLS,i + fi . The end point of the control objective (eq 1) can be represented as 1 1 sp |ysp - yi |2 ) min |(yPLS + fq,sp) - (yPLS,i + fqi )|2 Jq ) 2 min 2 xim xim 1 sp |yPLS - yPLS,i |2 = min 2 xim (11) Assume that the difference of the projection errors from the random noise or the insignificant disturbance variations can be sp Rq neglected. Substituting yPLS ) ∑r)1 urq,sp(qrq)T and yPLS,i Rq q q T ) ∑r ) 1 ui,r(qr ) into eq 11, Rq

Jq =



1 q min | (uq,sp - ui,r )(qrq)T|2 2 xim r)1 r

[∑ Rq

]

1 min 2 xim

)

min Jq1 + min Jq2 + · · · + min JRq q

[

r)1

q ti,1

q ti,2

q ti,R q

(12)

]

where Jr ≡1/2(ur - ui,r) |(qr ) | . The objective function is decomposed into Rq subobjective functions in the lower Rq dimensional subspace, JqJq ) ∑r)1 Jrq. Only Rq score variables q (ti,r,r ) 1, 2, · · · , Rq) are required to be separately designed compared with M responses to be lumped together without the decomposition. Each subobjective (Jrq) is rearranged into q

q,sp

q 2

q T 2

Figure 4. Modeling batch operation system with external inputs.

(13)

q q The quality MPLS model (ui,r ) brqti,r ) can be implemented for the above design problem. However, when the operation condition is not covered by the original collected data due to the disturbances in the process, the developed quality MPLS model may not have accurate correlation. If the model used for the control design is fixed, rich data is needed to build the model. In reality, it is timeconsuming to collect abundant data before one designs the control system. To solve the problem, the model should be able to learn iteratively using the current operation. The observer assumes that each output score (ûqi ) is the linear combination of the corresponding input score (tiq), a deterministic offset (aiq), and a deterministic trend disturbance (diq),

uˆqi )

[ ] [ ] [ ][ ] [ ] uˆqi,1 aqi,1 bq1 0 0 tqi,1 dqi,1 l + l l ) l + 0 l 0 q q q q q t di,R uˆi,R a b 0 0 i,Rq Rq i,Rq q q

) aqi + Bqtqi + dqi

(14)

This equation represents the model M ) {Mr }r)1, · · · ,Rq shown in Figure 2. Like the conventional dEWMA control design, the bias term aiq and the trend estimation filter diq are recursively updated in the following way q

q

q q q - Bqti-1 ) + (I - λq1)ai-1 aqi ) λq1(ui-1

(15)

and q q q q dqi ) λq2(ui-1 - Bqti-1 - ai-1 ) + (I - λq2)di-1

(16)

where λ1 ) diag(λ1,1 · · · λ1,Rq) and λ2 ) diag(λ2,1 · · · λ2,Rq). If the parameters aiq and diq from batch i - 1 to i do not change and the model (eq 14) is known to be the true system description, the minimum mean square error control strategy for achieving T the target value uq,sp ) [u1q,sp · · · uRq,sp is simple to get by q ] adjusting the input score factor at the value q

e

(urq,sp - ui,rq)2|(qrq)T|2

1 q 2 min Jrq ) min(urq,sp - ui,r ) |(qrq)T|2 q 2 ti,rq ti,r

q

[]

q

q

q

tqi,1 tqi ) l ) (Bq)-1(uq,sp - aqi - dqi ) q ti,R q

q

(17)

This equation represents the controller Cq ) {Crq}r)1, · · · ,Rq shown in Figure 2. Thus, the desired online measured variables (xim,sp) for the i batch run are

8698 Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008 Rq

xm,sp ) i

∑t

q q T i,r(wr )

(18)

r)1

B. Computing the Desired Manipulated Variables Using Measurement MPLS-Based dEWMA. On the basis of the desired xim,sp, the new control objective is defined as 1 - xmi |2 Jm ) min |xm,sp i 2 xic

MPLS models. It extracts disturbance information gathered from the process on which the most recent controller is acting. WB model updating compensates for the disturbance within a particular batch run, but it cannot be independent without the BtB model because the BtB model is used to compensate for the system decay among batch runs. Equation 21 represents the

(19)

Like the previous procedure, the desired xim,sp and xim are decomposed into the lower dimensional space, and the subobjective can be obtained in a similar manner as 1 m,sp m 2 - ui,r ) |(qrm)T |2 min Jrm ) min(ui,r m 2 ti,rm ti,r

(20)

Again, the process is updated in a way similar to the previous section, which gives the controllable factor,

[]

tmi,1 tmi ) l ) (Bm)-1(um,sp - ami - dmi ) i m ti,Rm

(21)

where aim is the deterministic offset and dim is the deterministic trend disturbance for the linear regression between each output m m score (ûm i ) and the corresponding input score (ti ). Also, ai and m di are recursively updated using the dEWMA method. Here the dEWMA model is applied separately to BtB MPLS and WB

Figure 6. Designed temperature trajectories for the setpoint change using two strategies: (a) MPLS-based BtB control; (b) MPLS-based integrated control.

Figure 5. Convergence of CA and CB for the setpoint change using two strategies: (a) MPLS-based BtB control; (b) MPLS-based integrated control.

Figure 7. Projection of the input variables in Figure 8 onto the latent space. The input scores of WB at K ) 10 are presented.

Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008 8699

controller C ) {Cr }r)1, · · · ,Rm shown in Figure 2. Thus, the desired input profile variables (xic) for the i batch run are m

m

Rm



xˆi )

m ti,r (wrm)T

(22)

r)1

where xˆi ) [xˆi x1,i · · · xK,i] c C. BtB Control Design. The input profiles xic ) [xi,1 ··· c xi,K] computed from eq 22 for the current batch run cannot be directly implemented, because the computed xˆfi will not be equal to the actual off-line measured variables xif. The error (δif) of xˆif and xif in the score space is defined as f

c

c

δfi ≡ xˆfi - xfi

(23)

To achieve the desired target qualities, the computed score value m m T tim ) [ti,1 · · · ti,R m] still should be applied. Substituting eq 23 into eq 22, (tmi )T ) xˆiWm

[ ]

) [xˆfi xˆci ]

Wm1,f

Wm2,f

(24)

) xfiWm1,f + δfiWm1,f + (tmi )T(Pm2,f)TWm2,f

where P )

[ ] Pm1,f

Pm2,f

is the loading matrix for X and

xˆi ) [xˆfi xci ] ) [(tmi )T(Pm1,f)T (tmi )T(Pm2,f)T ]

m T m Assume the adjusted error term (δfiWm 1,f) in the (P2,f) W2,f space is defined as

δfiWm1,f ≡ Rmi (Pm2,f)TWm2,f

(26) c

By rewriting eq 24, the readjusted variables xi become xci ) ((tmi )T + Rmi )(Pm2,f)T ) ((tmi )T - xfiWm1,f)((Pm2,f)TWm2,f)-1(Pm2,f)T (27) The updated input profiles can be implemented for the current batch run. D. WB Control Design of Batch System. As the batch for tracking control is performed within a batch, the online measured m m variables xm(k) ) [xpast (k) xfuture (k)] are partly available at time m point k. The first part (xpast(k)) is the data measured online until m the current time point (x1m, · · · , xm k ); the other part (xfuture(k)) is m the data (xm , · · · , x ) measured online from the next time point k+1 K to the end of the batch run. Similar expression can be used to represent the input variable x(k) ) [xpast(k) · · · xfuture(k)]. Because the current batch is our focus in this section, the subscript of the batch index (i) is removed for clear expression. The input profile computed from eq 27 cannot be directly implemented m because the measured variables xpast (k) already occurred will m,sp m,sp m,sp m,sp not be equal to xpast (k), where x (k) ) [xpast (k) xfuture (k)]. m To correct the mismatch between the measured (xpast (k)) and m the desired (xm,sp past (k)) variables, the bias (a (k)) should be updated

(25)

Figure 8. Convergence of CA and CB for disturbance change within batch 8 using two strategies: (a) MPLS-based BtB control; (b) MPLS-based integrated control.

Figure 9. Designed temperature trajectories for disturbance change within batch 8 using two strategies: (a) MPLS-based BtB control; (b) MPLS-based integrated control.

8700 Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008

Thus, with the updated score value tm(k) ) [t1m · · · tRmm]Tk at time point k, the variables xˆfuture should be refined as m T ) xˆ future(k) ) ((tm(k))T + Rm(k))(P2,m m m T m -1 m T ) ((tm(k))T - xpast(k)W1,m )((P2,m ) W2,m) (P2,m) (31)

where P )

[ ] m P1,m

m is the loading matrix for X. The sizes of P1,m m P2,m m and P2,m are (Jf + kJc) × Rm and ((K - k - 1)Jc) × Rm, respectively. The updated remaining variables contain the future c input profiles (xk+1 , · · · , xKc ), but only the input variable at the c next time step (xk+1) is actually implemented. The WB control design is shown in Figure 3. [Note] The stability of the controlled process is the key to successful design of the control strategy. If the relationship between the final qualities and the online measurements of the batch system in the reduced space of latent variables is known a priori,

uqi ) aq,p + Bqtqi + δq,pi

(32)

where aq,p is the bias term. The score output is drifting away T by a size of δq,p ) [δ1q,p · · · δRq,p q ] per batch run. The process output and the setpoint at the ith batch are

Figure 10. Convergence of CA and CB for the disturbance changes at BtB using two strategies: (a) MPLS-based BtB control; (b) MPLS-based integrated control. m based on the measured variables (xpast (k)) and the implemented input profiles until the current time points (x1c, · · · , xck),

m m (k) - Bmtpast (k)) + (I - λm3 )am(k) (28) am(k + 1) ) λm3 (upast m m m where λ3m ) diag(λ3,1 · · · λ3,R m). The trend parameter term (d ) has no change at the current batch and it is updated only from m m batch to batch. The input and output scores, tpast (k) and upast (k), can be computed using the previous measurements until the time m point k (xpast(k) and xpast (k)),

and

Figure 11. Convergence of CA and CB for the disturbance change at BtB using two strategies without updating the model: (a) MPLS-based BtB control; (b) MPLS-based integrated control.

Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008 8701

yi ) (xmi WqBq + (aq,p)T + (δq,p)Ti)(Qq)T

(33)

WqBq + (aq,p)T + (δq,p)Ti)T(Qq)T ysp ) (xm,sp i

(34)

To see how the batch asymptotic behavior converges, let ei ≡ ysp - yi, eim ≡ xm,sp - xim ) eim,u(Qm)T and eim,u ) (um,sp uim)T. Then the BtB transition model of the tracking error can be derived m T q q q T ei ) em,u i (Q ) W B (Q )

(35)

Likewise, if the relationship between the online measurements and the manipulated variables of the batch system in the reduced space of latent variables is known a priori, umi ) am,p + Bmtmi + δm,pi

(36)

m,p

where a is the bias term. The score output is drifting away T by a size of δm,p ) [δ1m,p · · · δRm,p m ] per batch run. The online m measurement error (ei ) can be represented by emi ) xm,sp - (Bmtmi + am,p + δm,pi)T(Qm)T i

(37)

The measurement errors of the adjacent two batch runs in the subspace are represented by m,u m m,sp m,sp m m,p T ei+1 ) em,u i - (B ∆ti+1 + δ ) + ui+1 - ui

(38)

where ∆ti+1 ) ti+1 - ti . Substituting eq 21 into eq 38 yields m

m

m

m,u m m m m m,p T ei+1 ) em,u i (I - λ1 - λ2 ) - (λ1 di - δ )

(39)

m

where di can be represented by dmi ) λm2 ((I - λm1 )i(am,p + δm,p - am0 ) + (I + (I - λm1 ) + · · · (I m λm1 )i-1)δm,p) + (I - λm2 )di-1 (40)

As the batch approaches infinity, dim is (λ1m)-1δm,p; eq 39 can be further rewritten as m,u m m ei+1 ) em,u i (I - λ1 - λ2 )

(41)

The steady-state e can be zero because E(ei ) ) E(ei )(Qm)T ) 0. The steady-state e can also approach zero, E(ei) ) E(eim)(Qm)TWqBq(Qq)T ) 0. This explains that, with a linear drift disturbance, a MPLS BtB controlled by dEWMA is a stable system, and the process outputs can definitely converge to the desired targets. It can be derived in a similar way for the measurement error sequence between the adjacent two batch runs under withinbatch control, m

m

m,u m m m K-2 ei+1 ) em,u i (I - λ1 - λ2 )(I - λ1 )

m,u

(42)

With the comparison of BtB control (eq 41) and WB control (eq 42), it is obvious that the convergence of WB between the adjacent two batch runs is faster. E. Summary of the Integrated dEWMA BtB and WB Control Design. In the proposed integrated strategy combining BtB control and WB control, each control mode is used to eliminate different types of disturbances. The WB controller allows rapid rejection or reduction of the disturbances within the batch run. The BtB controller is used to reject the off-line measured disturbances as the upstream condition often changes before the disturbances affect the system. Both control loops eliminate the disturbance effect at the right time in order to avoid the disturbances effects from spilling over to the control design, resulting in little effect on the final output quality. To sum up, the proposed BtB and WB control

are integrated using MPLS-based EWMA control, and it consists of modeling and control design as listed below: Modeling Procedures. 1. Collect the historical batch data sets Xf(I × Jf), Xc(I × Jc × K), Xm(I × Jm × K), and Y(I × M) indicative of normal operations that yield desired product quality. The valid data for building healthy models can be usually gotten by adding a sequence of stationary external inputs to xic, as shown in Figure 4. When the batch process is excited by the external inputs, measurements (yi(tf) and xm i ) collected from the process are used to build the initial quality and the initial measurement MPLS models. 2. Unfold Xc(I × Jc × K) to Xc(I × JcK)in the batchwise manner and combine the unfolded data with Xf(I × Jf) to form X(I × N2). Also, unfold data Xm(I × Jm × K) to Xm(I × N1). Normalize X(I × N2), Xm(I × N1), and Y(I × M) using the mean and the standard deviation of each variable at each time in the batch cycle for all batches. 3. Carry out the MPLS modeling procedure to obtain the quality MPLS and the measurement MPLS based on the data set of Y(I × M) and Xm(I × N1) and the data set of Xm(I × N1) and X(I × N2), respectively. Control Design Procedures. 1. BtB Control Design i Project the desired qualities onto the quality MPLS model spaces to compute the desired input score values. Set i ) 1. ii On the basis of the previous batch operation data set (xm i-1 and yi-1), compute the score value (tiq and uiq). Use the dEWMA method to update the quality MPLS model of the inner relationship between the input score variables and the output score variables (eqs 15 and 16). The desired online measurement at each time point can be computed using eq 18. iii Project the desired online measurement onto the reduced space of the measurement MPLS model to get the desired score value of measurement variables (uim,sp). iv On the basis of the previous batch operation data set (xi-1 m and xi-1 ), compute the score value (tim and uim). Use the dEWMA method to update the measurement MPLS model of the inner relationship between the input score variables and the output score variables. The estimated input value for the current batch can be computed using eq 22. v On the basis of the actual and the estimated off-line measurements, the estimated input variable is adjusted to match the estimated input score (eq 27). If tracking control is not conducted within a batch, go to step vii; otherwise, go to step vi. 2. WB Control Design vi The new input profile policy for the current batch is conducted. Set k ) 1. (1) Collect the all measurements (xpast(k)) until the time point k. (2) Update the dEWMA control parameters (eq 28) using the projection of the measured data onto the measurement MPLS space. (3) Adjust the future control policy using the control law (eq 31). c (4) The elements xk+1 of xˆfuture(k) is applied to the process for the next time step. (5) Set k ) k + 1 and return to vi (1) until k ) K. vii After the current batch is finished. Set i ) i + 1 and return to step ii.

8702 Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008

5. Illustrative Examples A jacketed batch reactor is considered. An exothermic series first-order reaction is involved. AfBfC

(43)

The differential equations and the simulation condition describing the reaction process are given by Luyben (1990).23 Two stages are run in the system. In the first (start-up) stage, the steam in the jacket initially heats up the reactor content until the desired operating level. In the second (maintenance) stage, the cooling water in the jacket is used to remove the exothermic heats of reaction. The control structure of the system consists of two levels. In the lower level, the reactor temperature is controlled by two split-ranged control valves, a steam valve, and a water valve. The higher level of control is needed to ensure the quality of the product of interest at the end of each batch run. Because of a lack of in situ measurements of the product qualities, the products must be moved from the reactor to a laboratory before an accurate measurement of the control concentration can be taken. Alternatively, other more easily measured variables, such as the reactor temperature, may be used as an indicator for the compositions of the product. At this level, xf (initial concentration of CA), xm (the jacket and the reactor temperatures) and xc (the designed temperature of the reactor) are collected during each batch run. The designed temperature of the reactor is computed by the design controller for the desired qualities at the end of the batch run. The duration of each batch is 150 min. The sampling time of each batch is 15 min (K ) 10). The control objective is to maintain two quality variables (y), concentrations of CA and CB, at their desired levels after the batch run is finished. The process is affected by a persistent disturbance (NID(0, 1.02)) in the two control valves of nominal upstream pressures. The measured jacket and the reactor temperatures with noise (NID(0, 0.12)) are included. Also, the initial concentration CA with noise (NID(0, 0.0032)) is introduced. A total of 50 batches based on the normal operation whose design quality is set to be CA ) 0.344 lb · mol/ft3 and CB ) 0.426 lb · mol/ft3 is used as the base analysis. The initial conditions around the base case are perturbed; consequently, the measurements collected from these processes are used to build the initial quality MPLS model and the initial measurement one. However, it is important to have a proper number of principal components in MPLS models to obtain a good prediction, since too many principal components will cause a magnification of noise and poor control performance. The standard way to determine the number of principal components is to apply cross-validation using the prediction residual sum of square (PRESS). The order of the components is set to be the order at which PRESS is minimum.24 Although this method is lengthy, it is effective in practical use. By this cross validation, both MPLS models with one principal component can capture the variance in the relationships of the system. To demonstrate the performance of the proposed method, three cases, including setpoint changes, disturbance changes within a batch run, and disturbance changes occurring at batch-to-batch, are separately tested. A. Setpoint Change. First, with Figure 5, the desired qualities are changed from CA ) 0.344 and CB ) 0.426 to CA ) 0.265 and CB ) 0.470 lb · mol/ft3. The results of the MPLS based BtB only and the MPLS based integrated BtB and WB control strategies are plotted in Figure 5a and 5b. Both panels indicate that the control objectives of both control strategies are improved gradually and they converge to the desired levels. The performance of MPLS-based integrated control will be

corrected within the batch run. The controlled outputs of MPLSbased integrated control can approach the new stepoint much faster than those of MPLS-based BtB control. The means and standard deviations of CA and CB of MPLS-based BtB control are [0.267, 0.001] and [0.470, 0.002], respectively. Meanwhile, using MPLS-based integrated control, the means and standard deviations of CA and CB are [0.266, 0.001] and [0.470, 0.001], respectively. The above estimated statistic is computed by the measurements after batch 10, whose controlled variables are around their mean values. Figure 6 shows the evolution of the control variable xc under the MPLS-based BtB and the MPLSbased integrated control structures that approach the new setpoint. The control variables of both control structures are the same at the first batch run, but they become significantly different at the final period of the operation time (from k ) 5 to k ) 10) after the first batch. Even though the difference of the profiles of the control variable of both control structures occurs owing to the measured variables in WB, both controlled score variables are still very close to each other (Figure 7). B. Disturbance Change within a Single Batch Run. In this case study, the disturbance occurs just at batch 8, where the water valve is stuck at the initial 30 min and its maximum opening is 15% only. However, the water valve is back to the normal operable condition after 30 min. Figure 8 depicts the results of the product qualities of each batch run using the two proposed strategies. It shows whether the disturbance can be rejected or not. Figure 9 shows the evolution of the control variable xc of these two control strategies. It indicates that MPLS-based integrated control can quickly change the designed control variables after 30 min during batch run 8 to reject the disturbance instead of the fixed control variables of MPLS-based BtB control. As shown in Figure 8a, in the case of MPLS-based BtB control, the disturbances of the eighth batch result in larger errors of the product qualities. The bad performance will be corrected in the next batch runs. In the case of MPLS based integrated control (Figure 8b), the disturbances of the eighth batch have been significantly reduced in that batch, because the errors of the product qualities are reduced without waiting for finishing that batch run. C. Disturbance Change at BtB. In this case, the rate constants are gradually deactivated after each batch run. The proposed methods are used to reject the BtB deactivated disturbance. Figure 10 shows the results of the two control strategies. The desired end quality is gradually achieved using two control strategies. The means and standard deviations of CA and CB of MPLS-based BtB control are [0.267, 0.004] and [0.471, 0.0002], respectively. Meanwhile, under the MPLSbased integrated control structure, the means and standard deviations of CA and CB are [0.267, 0.003] and [0.470, 0.002], respectively. Like the previous discussion in case A, the performance outcomes of both control strategies are similar because the models of both control strategies are updated by the same process information during each batch run. The MPLSbased BtB and the MPLS-based integrated control designs with the fixed process model12,13 are tested here to make a comparison. Figure 11 shows the rejected disturbance results. The means and standard deviations of CA and CB of MPLS-based BtB control are [0.288, 0.011] and [0.456, 0.006], respectively. The means and standard deviations of CA and CB of MPLS-based integrated control are [0.290, 0.012] and [0.455, 0.006], respectively. Because the plant-model errors still exist, it is obvious that the values of the controlled qualities drift away no matter if the BtB or the integrated iterative control strategies are applied.

Ind. Eng. Chem. Res., Vol. 47, No. 22, 2008 8703

6. Conclusion In the conventional batch operation, a sample of the final product qualities is often required by the plant analytical laboratory from time to time. Because of the lack of in situ measurements, the measurements of the controlled variable may not be available quickly enough to be used for feedback control in the current batch run. Thus, by the time when the batch run is finished, the poor quality product has been made. In this paper, MPLS-based iterative learning control is developed to overcome this problem. It tracks control of product quality in the batch operation process. The major advantages of the proposed method are (1) Rather than using detailed knowledge of the operation process model, the proposed strategy depends only on information contained in the historical database of the past batches and online data of the current batch. (2) The concept of inferential control is employed. The online process measurements can be obtained more rapidly using a data-based model to infer the value of the final product qualities. Two MPLS models are built. One is for the final qualities and the online measurements (called the quality MPLS), and the other is for the relation of online measurements between the manipulated variables and the prior measured variables (called the measurement MPLS). The quality MPLS can be used to calculate the desired online measured variables along the time axis. And then using the measurement MPLS, the desired online measured variables at each time point can be used to calculate the operating input variables to reach the end-point target qualities when the batch is finished. (3) The proposed integrated BtB iterative learning control and online WB predictive control strategies can not only reduce the model error and batch-wise repeated disturbance at BtB but also quickly adjust the real-time disturbance by incorporating real-time feedback control. (4) The proposed method, unlike the traditional MIMO control design with the lump structure, explores the benefits of the decomposition MPLS framework in the reduced subspace and the optimal control design of the MIMO system. The MPLS model structure can decompose the MIMO control system into several independent pairs of inputs and outputs. Rather than relying on the whole system variables, the conventional SISO RtR design strategy can be directly and separately used to determine each SISO system. The potential of the proposed techniques for prediction and process control are demonstrated through a simulation study of a batch reactor. Further study for the actual implementation, such as the addition of the disturbance estimation and the extension of the algorithm to improvement of the convergence rate, will be conducted in our next research. Acknowledgment This work is supported by National Science Council, R.O.C. and the Center-of-Excellence Program on Membrane Technology, the Ministry of Education, Taiwan, R.O.C. Literature Cited (1) Srinivasan, B.; Palanki, S.; Bonvin, D. Dynamic Optimization of Batch Process, I. Characterization of Nominal Solution. Comput. Chem. Eng. 2003, 27, 1.

(2) Luus, R.; Rosen, O. Application of Dynamic Programming to Final State Constrained Optimal Control Problems. Ind. Eng. Chem. Res. 1991, 30, 1525. (3) Eaton, J. W.; Rawlings, J. B. Feedback Control of Chemical Processes Using On-Line Optimization Techniques. Comput. Chem. Eng. 1990, 14, 469. (4) Moore, K. L. IteratiVe Learning Control for Deterministic System; Springer-Verlag: New York, 1993. (5) 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. (6) Lee, J. H.; Natarajan, S.; Lee, K. S. A Model-Based Predictive Control Approach to Repetitive Control of Continuous Processes with Periodic Operations. J. Process Control 2001, 11, 195–207. (7) Zhao, Q.; Yang, B.; Sun, Z.; Sun, F. Intelligent Control Scheme of a Batch Process, Proc. World Congress Intell. Control Autom., 3rd 2000, 439. (8) Shahrokhi, M.; Pishvaie, M. R. Artificial Neural Network Feedforward/Feedback Control of a Batch Polymerization Reactor, Proc. Am. Control Conf. 1998, 3391 (9) Xiong, Z.; Zhang, J. A Batch-to-Batch Iterative Optimal Control Strategy based on Recurrent Neural Network Models. J. Process Control 2005, 15, 11. (10) Card, J. P.; Naimo, M.; Ziminsky, W. Run-to-Run Process Control of a Plasma Etch Process with Neural Network Modeling. Qual. Reliab. Eng. Int. 1998, 14, 247. (11) Dong, D.; McAvoy, T. J.; Zafiriou, E. Batch-to-Batch Optimization Using Neural Network Models. Ind. Eng. Chem. Res. 1996, 35, 2269. (12) Flores-Cerrillo, J.; MacGregor, J. F. Iterative Learning Control for Final Batch Product Quality Using Partial Least Squares Models. Ind. Eng. Chem. Res. 2005, 44, 9146. (13) Flores-Cerrillo, J.; MacGregor, J. F. Control of Batch Product Quality by Trajectory Manipulation Using Latent Variable Models. J. Process Control 2004, 14, 539. (14) Zang, Z.; Bitmead, R. R.; Gevers, M. IteratiVe Model Refinement and Control Robustness Enhancement; Proceedings of the 30th IEEE Conference on Decision and Control, Brighton, U.K. Dec. 1991; IEEE: U.K.,1991. (15) Bukkems, B.; Kostic, D.; de Janger, B.; Steinbuch, M. LearningBased Identification and Iterative Learning Control of Direct-Drive Robots. IEEE Trans. Control Syst. Technol. 2005, 13, 537. (16) Albertos, P.; Esparza, A.; Sala, A. Iterative Identification and Control Design: Methodology and Applications. In Identification and Control: The Gap between Theory and Practice; Sa´nchez-Pen˜a, R. S., Ed.; Springer: Verlag, Germany, 2007. (17) Anderson, B. D. O.; Gevers, M. Fundamental Problem in Adaptive Control. In PerspectiVes in Control Theory and Applications; NormandCyrot, D., Ed.; Springer-Verlag: Berlin, 1998. (18) Chen, J.; Wang, F. PLS Based dEWMA Run-to-Run Controller for MIMO Non-Squared Semiconductor Processes. J. Process Control 2007, 17, 309. (19) Mezghani, M.; Roux, G. ; Cabassud, M.; Le Lann, M. V.; Dahhou, B.; Casamatta, G. Application of Iterative Learning Control to an Exothermic Semibatch Chemical Reactor. IEEE Trans. Control Syst. Technol. 2002, 10, 822. (20) Boning, D. S.; Moyne, W. P.; Smith, T. H.; Moyne, J.; Telfeyan, R.; Hurwitz, A.; Shellamn, S.; Taylor, J. Run by Run Control of Chemical-Mechanical Polishing. IEEE Trans. CPMT, C 1996, 19, 307. (21) Zwick, W. R.; Velicer, W. F. Comparison of Five Rules for Determining the Number of Components to Retain. Psychol. Bull. 1986, 99, 432. (22) Eastment, H. T.; Krzanowski, W. Cross-Validatory Choice of the Number of Components from a Principal Component Analysis. Technometrics 1982, 24, 73. (23) Luyben, W. L. Process Modeling, Simulation and Control for Chemical Engineers; McGraw-Hill: New York, 1990. (24) Geladi, P.; Kowalski, B. R. Partial least-squares regression: a tutorial. Anal. Chim. Acta 1986, 185, 1.

ReceiVed for reView June 11, 2007 ReVised manuscript receiVed June 29, 2008 Accepted July 21, 2008 IE070803W