Iterative Learning Control for Final Batch Product Quality Using Partial

Oct 26, 2005 - Subspace identification for data-driven modeling and quality control of batch processes. Brandon Corbett , Prashant Mhaskar. AIChE Jour...
3 downloads 10 Views 223KB Size
9146

Ind. Eng. Chem. Res. 2005, 44, 9146-9155

Iterative Learning Control for Final Batch Product Quality Using Partial Least Squares Models Jesus Flores-Cerrillo and John F. MacGregor* Department of Chemical Engineering, McMaster University, Hamilton, Ontario L8S 4L7, Canada

A terminal iterative learning control (ILC) strategy for batch-to-batch and within-batch control of final product properties, based on empirical partial least squares (PLS) models, is presented. The strategy rejects persistent process disturbances and achieves new final product quality targets using an iterative procedure that works in the reduced space of a latent variable model rather than in the high dimensional space of the manipulated variable trajectories. Complete manipulated variable trajectory reconstruction is then achieved by exploiting the PLS model of the process. The approach is illustrated with a condensation polymerization example for the production of nylon. 1. Introduction Batch/semibatch processes are commonly used because of their flexibility in managing many different grades and types of products. In these processes, two control problems frequently arise: (1) the designing of new product grades and/or product types to satisfy customer demands and (2) the rejection of persistent batch-to-batch and within-batch disturbances to achieve consistent end-quality specifications. These control problems are not easily solved because of the nonlinear behavior of the chemical reactors, the presence of changing process conditions and disturbances, and the difficulty in obtaining inexpensive but accurate representations of the batch systems. The design of new grades/products requires the search for unknown optimal operating trajectories that will optimize some economic or final product quality objective. A considerable amount of the literature has been devoted to the so-called open-loop optimal control. In this approach, the computation is performed only one time, off-line using a detailed mechanistic model. Wu et al.1 and Thomas and Kiparissides2 designed manipulated variable trajectories (MVTs) to obtain a desired averaged molecular weight (MW) and conversion in the minimum amount of time for several polymerization processes. Louie and Soong3,4 designed optimal temperature, monomer and solvent injections to obtain narrow MW distribution polymers. Similar approaches were taken by Vaid and Gupta5 and Crowley et al.6 The design of optimal trajectories subject to process constraints has been addressed by Chen and Lee7 and Choi and Butala8 among others. Despite the large amount of work devoted to this approach, it has not had a large impact in the industry because it usually requires detailed theoretical models, it is computationally intensive, and the results are highly dependent on the accuracy of the models. To use simpler theoretical models while overcoming model error, several approaches have been proposed. The concept of tendency models9,10 uses simplified reaction mechanism models, updates the estimates of * To whom correspondence should be addressed. Telephone: (905) 525-9140 (x24951). Fax: (905) 521-1350. Email: [email protected].

the model parameters at the end of each batch, and then reoptimizes the trajectories for the next batch. ClarkePringle and MacGregor11 used batch-to-batch MVT adjustments to control MW distributions in linear polymers. Crowley et al.12 used a combined first principles-empirical modeling approach to design particle size distributions (PSDs) in an emulsion polymerization system. The prediction was performed using the theoretical model, but a partial least squares (PLS) model was then used to correct the predictions. Recently, Bonvin and co-workers13-15 introduced a novel strategy in which the structure of an optimal solution for the manipulated variable trajectories is determined from a mechanistic model. To account for the presence of uncertainties, measurements from each prior batch are used to update the parametrized solutions for the MVTs for the next batch. Model-based empirical control/design has the advantage of ease in model building. Dong and McAvoy,16 and Dong et al.,17 used PLS-neural networks to obtain input profiles to achieve a target conversion and molecular weight in a minimum amount of time. Flores-Cerrillo and MacGregor18 used a batch-to-batch PLS approach to achieve new PSD targets. In this approach, model error was overcome using batch-to-batch model parameter updating. Iterative learning control (ILC) was originally proposed by Arimoto et al.19 and used in robotics. Since then, many applications have been presented and several modifications to the original algorithm have been introduced: the proportional, integral, and derivative (PID) type algorithm;20 the high order algorithm;21 model-based algorithms;22,23 etc. In most of these approaches, however, the objective is to perform output trajectory tracking in a given time interval rather than to perform end product quality control. Moreover, the potential input-output dimensionality problem is not addressed (nonsquare multi-input multi-output (MIMO) systems). When the objective is to satisfy a final end specification, as in the case of batch end-quality control and product design, ILC is usually called terminal ILC, and much less work has been presented on this topic. Terminal ILC has two main characteristics: (1) the terminal output measurements (end-quality) are only available at the end of the process and (2) the main

10.1021/ie048811p CCC: $30.25 © 2005 American Chemical Society Published on Web 10/26/2005

Ind. Eng. Chem. Res., Vol. 44, No. 24, 2005 9147

control objective is to achieve the specified end point quality instead of a specified trajectory. Contributions using this type of algorithms include those of Oriolo24 for the finite time steering control problem of carlike systems and Xu et al.25 for the control of end-quality properties for rapid thermal processing vapor decomposition systems. In these approaches, however, neither the problem of input-output dimensionality reduction nor explicit constraint handling is addressed. More recently, the problem of ill-conditioned inversion (that can be seen as a form of a nonsquare system) has been studied.26 In this work, single value decomposition (SVD) was used to reduce the dimensionality of the system. By doing so, much better trajectory tracking performance was obtained. However, no constraint handling was performed and within-batch control was not possible. Lee et al.27-30 combined the advantages of iterative learning control (ILC) and model predictive control (MPC) into a single framework. ILC was used to overcome model error, while MPC was employed to control the process in real time. The contributions in this area include those of Lee et al.30 for the minimization of reaction time, Bonne and Jørgensen31 for the trajectory tracking of a fed-batch fermentation reactor, and Welz et al.32 for the trajectory control of a batch distillation system. However, in most of these approaches (including previous terminal ILC algorithms and nonsquare systems), a trajectory segmentation or vector parametrization approach was needed to characterize the MVTs. In the trajectory segmentation approach, the MVTs are coarsely discretized into a small number of intervals and the behavior of the MVTs over the duration of each interval is forced to follow a zero- or first-order hold. MVT design/adjustment is accomplished by determining the slope or the level at the start of each interval. In many batch processes, however, such parametrization of the MVTs may not be acceptable. The operation of the batch may require, or historically be based on, smooth MVTs, and converting them to staircase approximations might not be acceptable. A solution to this problem comes from recognizing that all process trajectories (both MVTs and measured variables) are very highly correlated. This implies that their behavior can be represented in a much lower dimensional space using latent variable models based on principal component analysis (PCA) or PLS methods. Flores-Cerrillo and MacGregor33 developed a control approach that takes into account such process correlations. However, the validity of the solutions from such an approach is restricted to the validity region of the model. In the design of new products or grades, it is usually necessary to perform extrapolations and to obtain MVTs that are outside the validity region of the model. A way to overcome this limitation is by using a terminal ILC algorithm based on PLS models. Using an ILC procedure will also allow one to overcome slowly varying process conditions and persistent batch-to-batch disturbances. The purpose of this paper is to present a simple reduced dimension iterative end-quality control strategy (i.e., latent variable iterative learning control (LV-ILC)) for the design of new grades/products and for the rejection of persistent disturbances in batch processes. The algorithm is based on PLS models and iterative learning control principles to search for manipulated

Figure 1. Database used for model building.

variable trajectories (MVTs) that can achieve these goals. The control strategy exploits the fact that, by projecting all the highly correlated process variable trajectory data into low dimensional latent variable spaces, the search for (or learning of) the unknown conditions of the MVTs can be performed in the reduced space of a PLS model using only a few latent variables instead of the original high dimensional MVTs. (This makes the search for the unknown conditions much simpler.) The original MVTs can then be reconstructed from the latent variable model. The problems of nonsquare MIMO systems and the explicit handling of constraints are also addressed. 2. Control Methodology 2.1. Model Building. The data set used for model building consists of normal operating data plus additional data in which some small changes in the manipulated variable trajectories are performed. The latter is required to provide causal information between these MVT changes and the final product qualities. The data requirements are further discussed in the examples. The database consists of a response matrix Y and an originally three-dimensional array which after unfolding34 would yield a regressor matrix X (Figure 1). Each row vector of Y, yT, contains the end-quality properties measured at the end of each batch. Each row vector of X, denoted as xT, is composed of measured on-line process variable trajectories and off-line measurements (xm) and manipulated variable trajectories (uc), all of which are sampled at some finely segmented intervals.

xT ) [xTm uTc ] Linear PLS regression can then be performed by projecting the scaled and centered data onto lower dimensional subspaces:

X ) TPT + C Y ) TQT + F

(1)

where the columns of T are values of the new latent variables (T ) XW/); P, Q, and W/are the loading matrixes for X, Y, and T, respectively; and C and F are residual matrixes. Notice that X and Y are expressed as deviations from their means (according to the training data) or reference values. Unit variance scaling (σ2) h )/σx2 ) X and (Yr - Y h )/σy2 is usually performed: (Xr - X ) Y (the subscript r denotes raw values). The process of obtaining the MVTs that would achieve the new desired product grade consists of two stages: (1) determination of the desired latent variable scores t using an iterative learning algorithm, followed by (2) inversion of the PLS model to obtain the real MVTs. These two stages are explained in the following sections. 2.2. ILC in the Score Space. These relations express eq 1 for a batch k:

9148

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

xTk ) tTk PT + cTk yTk ) tTk QT + fTk

(2)

where vectors c and f contain the effect of model mismatch and measurement noise. For batch k, the value of the scores, tk, needed to produce a desired grade, yd, can be obtained by using the following reduced space ILC algorithm (LV-ILC): T T + λkek-1 H tTk ) tk-1 T T ) (yTd - yk-1 ) ek-1

(3)

where ek-1 is the error vector obtained from batch k 1, y is the achieved product grade, λ is a learning weighting factor, and H is a projection matrix to transform the error from the end-quality space to an error into the score space. The projection matrix H can be obtained from the PLS model as follows: from eq 1 T T T ) yTd - tk-1 QT - fk-1 ek-1

(4)

eTk ) yTd - tTk QT - fTk

(5)

Subtracting eq 4 from eq 5: T ) eTk - ek-1 T T )QT - fTk + fk-1 ) -∆tTk QT - ∆fTk -(tTk - tk-1 T T and ∆fTk ) fTk - fk-1 . where ∆tTk ) tTk - tk-1 For the case of no errors:

T eTk ) ek-1 - ∆tTk QT

(6)

To obtain ∆t, the following quadratic optimization is proposed:

min eTk Wek + ∆tTk R∆tk ∆tk

T s.t. eTk ) ek-1 - ∆tTk QT

(7)

For the unconstrained case, two situations arise in finding a solution to eq 7 depending on the statistical dimensions of e and ∆t: (1) when dim[∆t] e dim[e], T WQ(QTWQ + R)-1 ∆tTk ) ek-1

where H ) WQ(QTWQ + R)-1

(8)

and (2) when the dim[∆t] > dim[e], a projection from a lower to a higher space is required. In this situation, eq 7 has an infinite number of solutions. Therefore, a natural choice is to select the ∆t having the minimum norms2.

min ∆tTk Ω∆tk ∆tk

T s.t. 0 ) ek-1 - ∆tTk QT T

(9)

whose solution can be obtained as T (QΩ-1QT)-1QΩ-1 ∆tTk ) ek-1

where H ) (QΩ-1QT)-1QΩ-1

(10)

Convergence proofs of these ILC algorithms (eqs 8 and 10) are given in Appendix I. The controllers in eqs 8 and 9 are integral feedback controllers on the projected error eTH. In the case of dim[∆t] g dim[e], H has rank M (equals the rank of e) and so driving eTH to zero implies driving e to zero. But in the case of dim[∆t] < dim[e], the rank of H is less than M, and the controller will only drive eTH to zero. However, any residual error in e should not be large as long as the process continues to operate in the reduced space of the PLS model. As can be seen from eq 3, the novelty of the proposed ILC strategy is that the learning is performed in the reduced dimensional space (latent variable or score space) of a PLS model rather than in the real space of the MVTs. This ILC approach is in principle similar to the low order ILC algorithm presented by Kim et al.26 However, with the LV-ILC proposed in this paper, it is possible to include not only the MVTs (uc) but also any other available process measurement (or inferential variable) xm. Inclusion of xm incorporates information on disturbances and slow process condition changes, which allows performing disturbance compensation within a batch (detailed discussion on the similarities and differences of the LV-ILC algorithm with the one presented by Kim et al.26 is given in section 3.7). The use of PLS modeling is necessary due to the high correlation among the measurements in the process variable and the manipulated variable trajectories. As a result of these extreme correlations, the true dimensionality of the process, determined by the score variable space (ta, a ) 1, 2, ..., A), is generally much smaller than the number of manipulated variable segments obtained from a fine MVT segmentation (uc). However, since the covariance structure among all the variables is captured in the PLS model, the reconstruction of the MVTs will be consistent with the shapes of the trajectories obtained from previous batch operations and will not depend on the number of segments or the discretization approach used to characterize the trajectories of the MVs and the process variables. This MVT reconstruction is addressed in the following section. 2.3. Inversion of the PLS Model To Obtain the MVTs. Once the low dimensional (A × 1) vector ∆tk for the new batch (k) is computed from eq 7, the task remains to reconstruct estimates for the high dimensional trajectories for the process and manipulated variables for this batch. These trajectories can be computed from the PLS model (eq 1) of the input space. Two situations arise. If there are no restrictions on the trajectories, as might be the case for a control computation at time θ ) 0, then the model for the X space can be used directly to compute the x vector trajectory (xT ) [xTm uTc ]) for the entire batch35 as

xTk ) tTk PT

(11)

However, if the reconstruction is desired at a time θi > 0 during the batch, the x vector trajectory T T T uc,implemented(0:θ xm,future(θ (xT ) [xm,measured(0:θ i) i) i:θf) T uc,future(θi:θf)]) would be composed of measured process T ) and of the already implevariables (xm,measured(0:θ i) T ) for the mented manipulated variables (uc,implemented(0:θ i) interval 0 e θ < θi that must be respected when computing the trajectories for the remainder of the k T T and uc,future(θ ) (θi e θ < θf). The batch (xm,future(θ i:θf) i:θf) solution to this problem is given in ref 33 as

Ind. Eng. Chem. Res., Vol. 44, No. 24, 2005 9149 T T x2,k ) (tTk - x1,k W/1)(PT2 W/2)-1PT2

(12)

T where xT1 ) [xm,measured(0:θ uT ] denotes the i) c,implemented(0:θi) known trajectories over the time interval (0:θi) that T T uc,future(θ ] demust be respected, xT2 ) [xm,future(θ i:θf) i:θf) notes the remaining portion of the trajectories, and PT1 and PT2 are their corresponding loading matrixes. It is easily shown that eq 12 reduces to eq 11 when θi ) 0, where there are not yet any existing trajectory measurements or manipulated variable changes. This control algorithm is computed one time, which is either at the beginning of the process (θi ) 0, eq 11) or at a predetermined instant during the k batch (θi > 0, eq 12). Computing the control at θi > 0 allows for within-batch control as well as batch-to-batch control. 2.4. Constraint Handling. In designing new product grades, both manipulated variable constraints and process variable constraints (state constraints) need to be addressed to guarantee safe operation. Both types of constraints can be easily incorporated into the control algorithm since the vector x (or x2) contains both manipulated variable trajectories and process measurements (or measured state variables). Two formulations are presented. Alternative 1. Assume that, for batch k, a new score vector tk has been obtained using eq 3 and, from it, the new MV and process variable trajectories (x or x2) to be implemented are reconstructed using either eq 11 or 12. If the computed MVTs and/or measured state variables violate a process constraint xc, then they cannot be implemented and an optimization approach with constraints is necessary. New trajectories xˆ can be computed such that the scores tk are as close as possible to those obtained from the unconstrained ILC algorithm (eq 3) and the new trajectories respect both the correlation structure of the PLS model and the process constraints. This can be obtained by solving the following:

min (tk - tˆ)TW(tk - tˆ) + (xˆ T - tˆTPT)Q1(xˆ - Ptˆ) xˆ

s.t. tˆT ) xˆ TW xc,min e xˆ e xc,max

(13)

for time θ ) 0. For times θi > 0 the following constraint needs to be added to eq 13 to respect the already known process measurement and the already implemented control actions:

x1 - xˆ 1 e  where E is the allowed reconstruction error. The second term in eq 13 is intended to force the computed control action to maintain as close as possible the correlation structure in the PLS model. Evidently, this formulation has the drawback that a high dimensional solution for the reconstruction of the MVTs and process variables is required. Nevertheless, as long as the dimension of x is not too excessive, it should not be a significant effort to solve this quadratic programming (QP) problem. Alternative 2. In case of a very large dimension of the MVTs and process variables, the following approach can be used (control taken at θ > 0). From eq 12, the optimal unconstrained adjustments to the MVT are obtained (xT2 ). In the case of input saturation, x2will be

Figure 2. Data set used for model building. (a) The (O) represents the original product, (/), the training data, and (3), the desired new product. (b and c) The solid lines show the nominal conditions, and the dotted lines, the MVTs for model building.

composed of xT2 ) [x/2xc]T, where x/2 are the parts of the trajectories, computed from eq 12, that can be implemented, while xc are those that would hit a constraint. Despite hitting a constraint, we still wish to achieve the

9150

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

Figure 3. New product design. (a) The (0) represents the endquality properties achieved using LV-ILC, (/), the initial batch (eq 22, no LV-ILC), and (g), the desired end-qualities. (b) The (/) respresents the initial error, and (0), the error reduction using LV-ILC.

computed value tk from the ILC algorithm (eq 3) while satisfying the overall PLS model. Therefore,

tTk

)

[x1 x/2

[]

W1 / T xc] W/2 ) xT1 W1 + x/T 2 W2 + xc Wc Wc T

(14)

(15)

To maintain the correlation in the PLS model,33 the solution is constrained to have the following structure: T /T T x/T 2 ) (tk + r )P2

By substituting eq 17 in eq 16, the new MVTs that can be implemented and that compensate for those variables that hit constraints are obtained. T T T / /T / -1 /T x/T 2 ) (tk - x1 W1 - xc Wc )(P2 W2) P2

(18)

In the case of control action taken at θ ) 0, eq 18 reduces to

then / T T T x/T 2 W2 ) tk - x1 W1 - xc Wc

Figure 4. Manipulated variable trajectories for the achievement of a new product grade. The dotted lines show the nominal conditions, and the solid lines, the MVTs computed from the LVILC algorithm. The number indicates the batch run.

(16)

where r is an adjustment to the value of tk calculated by the controller (eq 8 or 10) arising from the fact that constraints (xc) will be encountered. Substituting eq 16 in eq 15 gives / T T T / (tTk + RT)P/T 2 W2 ) tk - x1 W1 - xc Wc

Therefore, / -1 (tTk + rT) ) (tTk - xT1 W1 - xTc W/c)(P/T (17) 2 W2)

T T / /T / -1 /T x/T 2 ) (tk - xc Wc)(P2 W2) P2

(19)

This approach, however, is suboptimal, since x/2 is just the recomputed part of the trajectories conditioned on that part (xc) that hits constraints in the solution of the unconstrained algorithm. Nevertheless, this approach is simpler and easier to implement than the one based on solving the QP problem (alternative 1). Moreover, it can be less sensitive to measurement noise and outliers. 2.5. Initialization. The LV-ILC algorithm can be initialized at batch k ) 1 by using the initial error between the desired target and the current product (eT0 ) yTd - yT0 ) with t0 ) 0. Alternatively, it can be initialized at batch k ) 2 by first applying control action to batch k ) 1 using the control scheme described in section 2.3 with the already identified PLS model. In this approach, a value of t1 needs to be estimated for

Ind. Eng. Chem. Res., Vol. 44, No. 24, 2005 9151

batch k ) 1. Three situations arise corresponding to the statistical dimensions of t and yd:33 1. dim(t) ) dim(yd)

tT1 ) yTd (QT)-1

(20)

tT1 ) yTd Q(QTQ)-1

(21)

2. dim(t) < dim(yd)

3. dim(t) > dim(yd)

tT1 ) yTd (QQT)-1Q + tˆTp (I - QT(QQT)-1Q)

(22)

where tˆTp ) [xT1 zˆ T]W/, and zˆ is estimated by a missing data algorithm (see ref 33 for details). Notice also that, at θ ) 0, eq 22 reduces to tT1 ) yTd (QQT)-1Q. Once t1 is obtained, uc can be estimated for batch k ) 1 using eq 11 or 12 and implemented in the plant. Then, the value of eT1 ) yTd - yT1 can be obtained. The LV-ILC algorithm (eq 3) is then applied until convergence. Both initialization alternatives were tested and have similar performance. The simulation results shown in section 3 were obtained using the latter alternative.

Figure 6. Manipulated variable trajectories for the achievement of a new product grade. The dotted lines show nominal conditions, and the solid lines, the MVTs computed from the constrained LVILC algorithm (alternative 1). The number indicates the batch run.

3. Case Studies

Figure 5. New product design. (a) The (0) represents the endquality properties achieved using constrained LV-ILC (alternative 1), (/), the initial batch (no LV-ILC, eq 22), and (g), the desired end-qualities. (b) The (/) represents initial error, and (0), the error reduction using constrained LV-ILC (alternative 1).

3.1. Condensation Polymerization. The nonlinear batch mechanistic model of nylon 6,6 used in this work for data generation and controller performance evaluation was developed by Russell et al.36 For the complete description of the model and model parameters, please refer to the original publication. 3.2. Control Objectives and Trajectory Segmentation. The control objective is to produce nylon 6,6 with a desired end-amine concentration (NH2) and number average molecular weight (MWN). The MVTs used to control the end-quality are the jacket and reactor pressure trajectories. These manipulated variable trajectories are finely segmented every 5 min starting at 35 min after the beginning of the reaction and ending at 30 min before the completion of the batch (the total reaction time is 200 min). This discretization gives trajectories defined at 40 time points in the interval (35 e θ e 170). The trajectories for the first 35 min and the last 30 min are constant for all batches. Control computation is performed at θ ) 35 min from the start of the reaction, but if desired, another time can be selected (including θ ) 0 min). On-line measurements of the reactor temperature (Tr) and the venting (v) are considered available every 2 min. Such process measurements are included in this study to illustrate how external information can be easily incorporated into the

9152

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

Figure 7. New product design. (a) The (0) represents the endquality properties achieved using constrained LV-ILC (alternative 2), (/), the initial batch (no LV-ILC, eq 22), and (g), the desired end-qualities. (b) The (/) represents the initial error, and (0), the error reduction using constrained LV-ILC (alternative 2).

LV-ILC method, and if desired, process constraints can be added to the states. Using θ > 0 and incorporating such process measurements allows the LV-ILC algorithm to provide regulation for within-batch disturbances as well as the traditional batch-to-batch ILC. 3.3. Data Generation. A PLS model with three latent variables (determined by cross-validation) was built from a data set consisting of seven batches in which the initial water content (W) was randomly varied (considered in further studies to be the main source of disturbance). In four of these batches, some small movement in the MVT was performed at θ ) 35 min. Measurements of the process variables and quality properties were corrupted by normally distributed random noise with the following standard deviations: σTr ) 2.3 K, σv ) 52 g/s, σNH2 ) 0.2 equiv/g, σMWN ) 50 g/mol. The data set used for model building is shown in Figure 2. 3.4. ILC To Achieve New Product Quality Targets. In this example, the objective is to design a new product with NH2 ) 60 and MWN ) 12600 when the process is affected by a persistent batch-to-batch disturbance in the initial water (W) content of +10% (in mass with respect to the nominal value). (As shown in Figure 2a, the desired grade is quite different from that used to obtain an initial model and such a grade is orthogonal to the main direction of variation of the process.) Figure 3a shows the progressive achievement

Figure 8. Manipulated variable trajectories for the achievement of a new product grade. The dotted lines show nominal conditions, and the solid lines, the MVTs computed from the constrained LVILC algorithm (alternative 2). The number indicates the batch run.

of the desired grade using reduced space LV-ILC (eqs 3, 10, and 12 with Ω ) I and the control action taking place at θ ) 35 min). The value of λ is initially selected as 1, and then, after three iterations, if ||ek-3|| < ||ek-2|| < ||ek-1||, λk ) 1.25; otherwise, λk ) 0.5. In Figure 3a, it can be seen that although the desired grade lies far beyond the validity region of the training data used for model building, the desired grade is achieved in a few iterations. Figure 3b shows the error reduction (Ξ ) 2 wj((yd,j - yk,j)/yd,j)2) at each ILC iteration (w is ∑j)1 used to account for the difference in the range spanned by y). Figure 4 shows the evolution of the manipulated variables in order to achieve the desired grade. In this figure, the solid lines represent the MVTs computed from the ILC algorithm, while their nominal conditions are indicated with the dotted line. 3.5. ILC To Achieve New Product Quality Targets When Process Constraints Are Active. Process constraint handling is illustrated in this section. Both of the alternatives given in section 2.4 are evaluated and compared. In the following examples, it is assumed that the maximum allowable reactor pressure is 300 psi. The performance of alternative 1 (eq 13; W ) I, Q1 ) 0.01I, and  ) 0.01) is shown in Figures 5 and 6 when it is desired to produce a grade with NH2 ) 60 and MWN ) 12600 with a persistent batch-to-batch distur-

Ind. Eng. Chem. Res., Vol. 44, No. 24, 2005 9153

Figure 9. New product design. (a) The (0) represents the endquality properties achieved using LV-ILC, (/), the initial batch (eq 22, no LV-ILC), and (g), the desired end-qualities. (b) The (/) represents the initial error, and (0), the error reduction using LVILC.

bance in W (10% mass) (see Figures 3 and 4 for the unconstrained case). From Figures 5 and 6, it can be seen that by using the constrained LV-ILC formulation it is possible to produce the desired grade while respecting the hard process constraints. The performance of alternative 2 (eq 18) is shown in Figures 7 and 8 for the same situation. From Figures 7 and 8, it can be seen that this formulation, though suboptimal, can also yield adequate results with much less computational effort. 3.6. ILC Compensation for Persistent Batch-toBatch Disturbances. The LV-ILC algorithm can also be used to reject significantly large batch-to-batch persistent disturbances. This is shown in Figure 9a, where it can be seen that the desired end-quality properties (MWN ) 13533, NH2 ) 49.3) are gradually achieved by using the LV-ILC algorithm (eqs 3, 10, and 12 with Ω ) I and the control action taking place at θ ) 35 min) when the system is affected by a disturbance (35% lower) in the initial water content. Figure 9b shows the error reduction at each ILC iteration. Figure 10 shows the evolution of the manipulated variables in order to reject the persistent disturbance. 3.7. Discussion. The LV-ILC algorithm proposed in this paper is similar to the “low-order ILC” algorithm

Figure 10. Manipulated variable trajectories for the achievement of a new product grade. The dotted lines show nominal conditions, and the solids lines, the MVTs computed from the LV-ILC algorithm. The number indicates the batch run.

proposed by Kim et al.26 However, there are several important differences: (1) In the LV-ILC algorithm, the controlled output is a vector of quality properties (yk) at the end of the batch (terminal ILC), while in ref 26 yk is the controlled variable trajectory throughout the batch. (2) In the LV-ILC algorithm, the identification performed using PLS is easier and requires less information. In ref 26, the process of obtaining the information needed for identification of a full order gain model (G) is more demanding. This model is then reduced by performing SVD on G ) UΣVTc . (3) The LV-ILC algorithm includes information on all other measured process variable trajectories (xm; that is, xT ) [xTm uTc ]), which brings information on new disturbances within each batch, while Kim et al.26 uses only the control variable (uc) which does not contain this disturbance information. (4) In LV-ILC, inclusion of xm and implementation of the algorithm at θ > 0 allows for simultaneous disturbance rejection and batch-to-batch tracking of yd (in this sense, it is similar to the Q-ILC algorithms proposed by Lee et al.30). In ref 26, the ILC updates only at the start of the batch and no withinbatch disturbance compensation is possible. (5) The proposed LV-ILC algorithm also incorporates constraint handling. The proposed LV-ILC method has the advantage of having a very simple model building step that requires

9154

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

very limited information for identification. It can easily handle process and state constraints, and the solutions are independent of the degree of precision required for the discretization of the MVTs (in LV-ILC, a very fine trajectory segmentation is used, while other ILC algorithms involve a coarse segmentation of the MVTs or a vector parametrization approach). It incorporates disturbance information by using all available process measurements, and by implementing the algorithm at time θ > 0, it allows for disturbance rejection within a batch (midcourse corrections) as well as batch-to-batch adjustments. This feature allows the LV-ILC algorithm to take into account the errors arising from within-batch disturbances and those arising from imperfect batchto-batch adjustments from the ILC algorithm. For the above reasons, the LV-ILC algorithm presented here provides significant advantages over other existing ILC algorithms. However, the proposed LV-ILC algorithm, as it stands now, performs only a single correction during the batch to achieve the ILC batch-to-batch correction, to obtain the new set point, and to compensate for within-batch disturbances. If the major disturbances occur in the batch initialization or early in the batch, a single correction for disturbance rejection has often been found to be adequate.37-39 Further study is currently being carried on to address the issue of multiple time corrections within a batch, as are performed in other dual ILC algorithms.30

If R * 0, adequate values of R need to be chosen to guarantee convergence. (2) For dim[∆t] > dim[e] T ∆tTk ) ek-1 (QΩ-1QT)-1QΩ-1

where H ) (QΩ-1QT)-1QΩ-1 For simplicity, assume that Ω ) I, and then, the previous equation becomes T ∆tTk ) ek-1 (QQT)-1Q

where H ) (QQT)-1Q Proof. T T ) yTd - tk-1 QT ek-1

(A.1)

eTk ) yTd - tTk QT

(A.2)

T T + ek-1 H tTk ) tk-1

(A.3)

T T + ek-1 H)QT) (A.3) in (A.2) eTk ) yTd - (tk-1 T T QT - ek-1 HQT (A.4) yTd - tk-1 T T (A.1) in (A.4) eTk ) ek-1 - ek-1 HQT )

4. Conclusions An iterative learning control strategy to achieve new final product quality targets is proposed. The algorithm involves the learning for only a small number of latent variables in the reduced dimensional space of a PLS model instead of the original high dimensional manipulated variable trajectory (MVT) space. The high dimensional MVTs can then be obtained by inverting the PLS model of the input space. By incorporating trajectories on all measured variables into the algorithm, information on disturbances is also available and the ILC algorithm, if performed at time θ > 0, includes both trajectory optimization to achieve new product targets and within-batch disturbance compensation (in the form of midcourse corrections). Approaches for handling constraints on the MVTs are also incorporated. The algorithm is illustrated using a simulated condensation polymerization process for the unconstrained and constrained cases.

T (I - HQT) (A.5) ek-1

Equation A.5 will converge if the following condition is satisfied:

|I - HQT| < 1 Choosing H ) (QQT)-1Q will satisfy the convergence condition, since |I - (QQT)-1QQT| ) |I - I| < 1. As W/ and P are invariant, limkf∞ xk ) x∞ (eq 11) and limkf∞ x2,k ) x2,∞ (eq 12) when limkf∞ ∆tk ) ∆t∞. Acknowledgment The authors thank the Natural Science and Engineering Research Council of Canada and the McMaster Advanced Control Consortium for financial support, Dr. S. A. Russell for his condensation polymerization simulator, and Dr. H. Yu for useful comments during the preparation of the manuscript.

5. Appendix 5.1. Convergence. Here, convergence proofs for the ILC algorithms are given. (1) For dim[∆t] e dim[e], eq 8 is T ∆tTk ) ek-1 WQ(QTWQ + R)-1

where H ) WQ(QTWQ + R)-1 Proof. It is well-known23 that the ILC algorithm will converge to limkf∞ ek ) e∞ and limkf∞ ∆tk ) ∆t∞ if the following condition norm is satisfied:

|A - GH| < 1 For the reduced space ILC, A ) I, H ) WQ(QTWQ + R)-1, and G ) QT. Therefore, |I - QTWQ(QTWQ + R)-1| < 1. When R ) 0, |I - I| < 1, satisfying the condition.

Literature Cited (1) Wu, G. Z. A.; Denton, L. A.; Laurence, R. L. Batch polymerization of styrene. Optimal temperature histories. Polym. Eng. Sci. 1982, 22 (1), 1. (2) Thomas, I. M.; Kiparissides, C. Computation of the nearoptimal temperature and initiator policies for a batch polymerization reactor. Can. J. Chem. Eng. 1984, 62, 284. (3) Louie, B. M.; Soong, D. S. Optimization of batch polymerization proceses, narrowing the MWD. I. Model simulation. J. Appl. Polym. Sci. 1985, 30, 3707. (4) Louie, B. M.; Soong, D. S. Optimization of batch polymerization proceses, narrowing the MWD. II. Experimental Study. J. Appl. Polym. Sci. 1985, 30, 3825. (5) Vaid, N. R.; Gupta, S. K. Optimal Temperature Profiles for Methyl Methacrylate Polymerization in the Presence of End Point Constraints. Polym. Eng. Sci. 1991, 31, 1708. (6) Crowley, T. J.; Choi, K. Y. Discrete optimal control of molecular weight distribution in a batch free radical polymerization process. Ind. Eng. Chem. Res. 1997, 36, 3676.

Ind. Eng. Chem. Res., Vol. 44, No. 24, 2005 9155 (7) Chen, S. A.; Lee, S. T. Minimum end time policies for batchwise radical chain polymerization, VI. The initiator addition policies for copolymerization with constant copolymer composition control. Polym. Eng. Sci. 1987, 25, 573. (8) Choi, K. Y.; Butala, D. N. An experimental study of multiobjective dynamic optimization of a semibatch copolymerization process. Polym. Eng. Sci. 1991, 31, 353. (9) Filippi-Bossy, C.; Bordet, J.; Villermaux, J.; MarchalBrassely, S.; Georgakis, C. Batch Reactor Optimization by Use of Tendency Models. Comput. Chem. Eng. 1989, 13 (1/2), 35. (10) Rastogi, A.; Fotopoulos, J.; Georgakis, C.; Stenger, H. The identification of kinetic expressions and the evolutionary optimization of speciality chemical batch reactors using tendency models. Chem. Eng. Sci. 1992, 47, 2487. (11) Clarke-Pringle, T. L.; MacGregor, J. F. Optimization of Molecular Weight Distribution Using Batch-to-Batch Adjustments. Ind. Eng. Chem. Res. 1998, 37, 3660. (12) Crowley, T. J.; Harrison, C. A.; Doyle, F. J., III Hybrid model-based approach to batch-to-batch control of particle size distribution in emulsion polymerization. Comput. Chem. Eng. 2003, 27, 1153. (13) Bonvin, D.; Srinivasan, B.; Ruppen, D. Dynamic Optimization in the Batch Chemical Industry. AIChE Symp. Ser. 326 2002, 98, 255. (14) Srinivasan, B.; Palanki, S.; Bonvin, D. Dynamic optimization of batch processes: I. Characterization of the nominal solution. Comput. Chem. Eng. 2003, 27 (1), 1. (15) Srinivasan, B.; Bonvin, D.; Visser, E.; Palanki, S. Dynamic optimization of batch processes: II. Role of measurements in handling uncertainty. Comput. Chem. Eng. 2003, 27 (1), 27. (16) Dong, D.; McAvoy, T. J. Batch Tracking Via Nonlinear Principal Component Analysis. AIChE J. 1996, 42, 2199. (17) Dong, D.; McAvoy, T. J.; Zafiriou, E. Batch-to-Batch Optimisation Using Neural Network Models. Ind. Eng. Chem. Res. 1996, 35, 2269. (18) 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. (19) Arimoto, S.; Kawamura, S.; Miyazaki, F. Bettering operation of robots by learning. J. Rob. Syst. 1984, 1 (2), 123. (20) Bondi, P.; Casalino, G.; Gambradella, L. On the iterative learning control theory for robotic manipulators. IEEE J. Rob. Autom. 1988, 4 (1), 14. (21) Bien, Z.; Huh, K. M. High-order iterative learning control algorithm. IEE Proc.sD: Control Theory Appl. 1989, 136, 105112. (22) Lucibello, P. State steering by learning for a class of nonlinear control systems. Automatica 1994, 30 (9), 1463. (23) Moore K. L. Iterative Learning Control for Deterministic Systems; Advances in Industrial Control; Springer-Verlag: London, 1993. (24) Oriolo, G.; Panzieri, S.; Ulivi, G. Cyclic learning control of chained-form systems with applications to car-like robots. Proceedings of the 13th IFAC World Congress, San Francisco, CA, June 30-July 5, 1996; A, p 187.

(25) Xu, J.-X.; Chen, Y.; Lee, T. H.; Yamamoto, S. Terminal iterative learning control with an application to RTPCVD thickness control. Automatica 1999, 35, 1535. (26) Kim, W. C.; Chin I. S.; Lee K. S.; Choi J. Analysis and reduced-order design of quadratic criterion-based iterative learning control using singular value decomposition. Comput. Chem. Eng. 2000, 24, 1815. (27) Lee, K. S.; Chin, S. I.; Lee, J. H. Model Predictive Control Technique Combined with Iterative Learning for Batch Processes. AIChE J. 1999, 45, 2175. (28) Lee, K. S.; Lee, J. H. Convergence of Constrained ModelBased Predictive Control for Batch Processes. IEEE Trans. Autom. Control 2000, 45 (10), 1928. (29) 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. (30) Lee, J.; Lee, K. S.; Lee, J. H.; Park S. An on-line batch span minimization and quality control strategy for batch and semibatch processes. Control Eng. Pract. 2001, 9, 901. (31) Bonne, D.; Jørgensen, S. B. Development of Learning Control For Reproducible and High Quality Operation of Batch Processes. Proceedings of the IFAC DYCOPS′6 Symposium, Korea, June 4-6, 2001; p 449. (32) Welz, C.; Srinivasan, B.; Bonvin, D. Iterative Learning Control with input Shift. Proceedings of the IFAC Dycops-7 Symposium, U.S.A., July 5-7, 2004. (33) Flores-Cerrillo J.; MacGregor, J. F. Control of Batch Product Quality by Trajectory Manipulation using Latent Variable Models. J. Process Control 2004, 14 (5), 539. (34) Nomikos, P.; MacGregor, J. F. Multi-way Partial Least Squares in Monitoring Batch Processes. Chemom. Intell. Lab. Syst. 1995, 30, 97. (35) Jaeckle J. M.; MacGregor, J. F. Product Design Through Multivariate Statistical Analysis of Process Data. AIChE J. 1998, 44, 1105. (36) Russell, S. A.; Robertson, D. G.; Lee, J. H.; Ogunnaike, B. A. Control of product quality for batch nylon 6,6 autoclaves. Chem. Eng. Sci. 1998, 53, 3685. (37) Yabuki, Y.; MacGregor, J. F. Product Quality Control in Semibatch Reactors Using Midcourse Correction Policies. Ind. Eng. Chem. Res. 1997, 36, 1268. (38) Yabuki, Y.; Nagasawa, T.; MacGregor, J. F. An Industrial experience with product quality control in semi-batch processes. Comput. Chem. Eng. 2000, 24, 585. (39) Flores-Cerrillo J.; MacGregor, J. F. Control of Particle Size Distributions in Emulsion Semibatch Polymerization Using Midcourse Correction Policies. Ind. Eng. Chem. Res. 2002, 41, 1805.

Received for review December 8, 2004 Revised manuscript received September 15, 2005 Accepted September 16, 2005 IE048811P