Inferential Control of High-Purity Multicomponent Batch Distillation

May 11, 2001 - Carlos Fernandez , Jesus Alvarez , Roberto Baratti , Andrea Frau. Journal of Process ... Rosendo Monroy-Loperena , Jose Alvarez-Ramirez...
0 downloads 0 Views 143KB Size
2628

Ind. Eng. Chem. Res. 2001, 40, 2628-2639

Inferential Control of High-Purity Multicomponent Batch Distillation Columns Using an Extended Kalman Filter Ronia M. Oisiovici* and Sandra L. Cruz Dept Engenharia de Sistemas Quı´micos, FEQ/UNICAMP, 13083-970 Campinas, SP, Brasil

To control the sequencing of the batch distillation steps and to guarantee that all products will meet their purity specifications, this work has proposed an inferential control system for highpurity multicomponent batch distillation columns, that is able to cope with difficulties commonly encountered in practice, including lack of on-line composition analyzers, plant/model mismatch, uncertainty in the initial system state, and measurement noise. An extended Kalman filter has been implemented to provide updated composition estimates from temperature measurements, and globally linearizing controllers have been designed to control the distillate composition. The choice of the number and location of temperature sensors, as well as the sensitivity of the controller settings to changes in the operating conditions, has also been discussed. Tight composition control was achieved, and the proposed inferential control scheme was shown to be robust and suitable for practical implementation. 1. Introduction Batch processing has been widely used in the production of fine chemicals, biochemicals, polymers, and pharmaceuticals. The use of batch and semibatch configurations is expected to grow because such configurations present features that are desirable in the so-called “future plants”, including flexibility of operation, rapid response to changing market demands, suitability for manufacturing high-quality and highvalue-added products. Pronounced nonlinearities and unsteady behavior are some of the challenges to be faced in the automation of batch plants. On the other hand, the benefits to be gained from automation, such as reproducibility and increased productivity, motivate the development of techniques for the modeling, estimation, monitoring, optimization, and control of batch processes. Batch distillation, in particular, is the most frequent separation method used in batch plants.1 It provides flexibility and involves less capital investment than continuous distillation. One single batch distillation unit can separate multicomponent mixtures with a wide range of feed compositions, yielding products with varying specifications. A commercial batch distillation column normally follows a process involving charging the still with a multicomponent mixture, bringing the column to equilibrium under total reflux conditions, and withdrawing a number of products in sequence. Intermediate offspecification materials (slop cuts) might also be collected between the product fractions. The reflux ratio is used to control the product quality, which is determined by market demands or downstream process requirements. On the basis of discussions with industrial practitioners, Bosley and Edgar2 have presented the difficulties faced in the optimization and control of batch distillation columns, which include the following: poor agreement of model thermodynamic VLE correlations with actual plant data; time-varying process gains and time “con* Author to whom correspondence should be addressed. Fax: 55-19-788 3946. E-mail: Ronia-Marques.Oisiovici@ BRA.Dupont.com.

stants”; large open-loop interactions; poor agreement between model and plant data; low process signal-tonoise ratios; lack of on-line sensors or inability of such sensors to provide prompt results; and difficulty and computational expense of state estimation. The lack of reliable, fast, and on-line measurements of compositions is also a frequent problem in the control of batch distillations units. Therefore, for practical implementation of batch distillation control strategies, a state estimation technique must be employed to provide the required composition estimates from readily available measurements. Most of the work on the application of state estimation methods to distillation systems is devoted to continuous distillation columns.3-6 Relatively few papers address the issue of state estimation of batch columns. QuinteroMarmol et al.7 applied extended Luenberger observers (ELO) to predict compositions in multicomponent batch distillation systems from temperature measurements. The constant reflux ratio policy was considered, and the matrix of gains of the observer were obtained off-line. Barolo and Berto8 proposed a control strategy for the constant distillate composition operation of batch distillation columns. The proposed control law was derived in the framework of nonlinear internal model control (NIMC), and state estimation was provided by the extended Luenberger observer (ELO) previously proposed by Quintero-Marmol et al.7 Good results were obtained for a binary mixture of ethanol and water (xP1,SP ) 0.84) and for a constant relative volatility ternary mixture (xP1,SP/xP2,SP ) 0.95/0.95 and xP1,SP/xP2,SP ) 0.93/0.97). In the ternary example, a pseudo-binary system was assumed at the top of the column during each of the two production phases. The composition control of only the distillate products was considered. However, in batch distillation separations, there is normally a purity constraint on the bottom (heavy) product, and the batch is finished when the average composition of the heavy product meets the specified purity. The heavy product is what is left in the still and on the trays (the liquid holdup on the trays collapses to the bottom when the column is shut down). Whereas

10.1021/ie0003943 CCC: $20.00 © 2001 American Chemical Society Published on Web 05/11/2001

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001 2629

the average compositions of the distillate products can be determined from top-stage composition data, composition estimates of all stages (trays and still) are required to calculate the average composition of the heaviest product. The heavy product composition was predicted by an ELO in the work of Quintero-Marmol et al.7 A disadvantage of the Luenberger observer is that it is a deterministic estimator and might not work properly in the presence of plant/model mismatch and process and/or measurement noise. Quintero-Marmol et al.7 reported that it was necessary to “turn off” the gains of the ELO by the end of the batch when tests with measurement errors were made. Barolo and Berto8 recommended the use of a stochastic estimator (such as a Kalman filter) when a large degree of noise is expected. The authors also found that increasing the number of trays makes the ELO harder to tune. Maybeck9 presented three basic reasons for the failure of deterministic approaches to provide appropriate descriptions of actual systems. First, no mathematical model is perfect. A second shortcoming is that dynamic systems are driven not only by control inputs, but also by disturbances, which can be neither controlled nor modeled deterministically. Furthermore, sensors do not provide perfect data about a system, and any measurement will be corrupted by some degree of noise, biases, and device inaccuracies. The presence of measurement noise can be even more detrimental in the inferential control of high-purity batch distillation systems because it is difficult to distinguish real small temperature variations at the top stages of high-purity distillation columns from measurement noise. Recently, an extended Kalman filter (EKF) for binary and multicomponent distillation columns was developed and tested by Oisiovici and Cruz.10 The EKF for batch distillation is an on-line stochastic estimator that infers instantaneous column composition profiles from a few temperature measurements and readily available information. Unlike the time-consuming off-line design of the ELO, the gain of the EKF is calculated and updated on-line. Accurate composition estimates and fast convergence are obtained, and the EKF has confirmed its ability to incorporate the effects of noise (from both measurement and modeling). In this work, a control strategy based on the globally linearizing control structure proposed by Kravaris and Chung11 is combined with the EKF for batch distillation, resulting in an inferential control system for constant distillate operation of high-purity batch distillation columns that is able to cope with implementation difficulties encountered in practice, including the presence of plant/model mismatch and measurement noise. To maintain product quality at the set point, the GLC controller updates the reflux ratio using the composition estimates provided by the EKF. Estimated instantaneous composition values are also used to control the whole batch distillation operation (beginning of distillate withdrawal, switching from a product withdrawal phase to a slop cut withdrawal phase and vice versa). Important issues not commonly addressed in the batch distillation literature are also discussed, including the influence of the number and location of temperature sensors on the control performance and the sensitivity of the controller settings to changes in the operating conditions.

2. System Operation The separation of a ternary mixture in a conventional batch distillation column is considered in this study. All products, including the residue in the still, should be at the specified purity. For each product, these specifications are expressed in terms of the mole fraction of a key component meeting or exceeding a specified value. For ternary systems, there can be two slop cuts. The progress of batch distillation can be controlled in several ways. The constant reflux ratio and constant distillate purity policies are often referred to as common operating procedures. When the reflux ratio is kept constant, the distillate composition varies with time; in the constant quality operating mode, the reflux ratio is varied to keep the distillate composition constant at a desired value. The determination of optimal reflux ratio policies for batch distillation has received considerable attention, but such policies are not common in industry. Betlem et al.12 provided a review of work in this field. The batch distillation optimization problem is usually addressed considering open-loop operation. Optimization results obtained by Bosley and Edgar2 have proven to be quite sensitive to model parametric and product specification changes. The authors pointed out that work is still needed to ensure reliable and robust practical implementation of optimal reflux ratio trajectories. Betlem et al.12 compared the relative performance of dynamic optimal control with constant reflux ratio and constant quality control policies. Two independent measures were used to characterize a single batch distillation run: the degree of separation difficulty, which indicates the difficulty at the start of a distillation cut, and the degree of exhaustion, which describes the bottom exhaustion at the end of production. The authors concluded that, if one or both measures remains within bounds, then constant quality control is almost as good as dynamic optimal control. Because the degree of separation difficulty is usually low in the case of high-purity batch distillation columns with relatively large numbers of trays, the constant distillate composition control policy was chosen. An upper bound and a lower bound for the reflux ratio (Rmax and Rmin, respectively) were adopted. The following operating mode was considered in this study: A batch of liquid with composition x1,So/x2,So/x3,So is charged to the still, and the column is brought to equilibrium under total reflux. The reflux ratio is then set to a previously chosen minimum value (Rmin). The withdrawal of the light component product P1 begins, and the composition controller is switched on to keep the product quality at specification by adjusting the reflux ratio. When the reflux ratio reaches the maximum allowable value (Rmax), the controller is switched off, and the reflux ratio is set equal to Rmin. The composition of the light component in the distillate falls, and the distillate stream is withdrawn into the P1 tank until the average composition in this tank meets the specified purity level xP1,SP. The distillate stream is then diverted to a different tank, and the first slop cut is collected. When the composition of the intermediate component in the distillate (x2,0) reaches the specified purity (xP2,SP), the distillate stream is diverted to another tank, and product P2 begins to be collected. The composition controller is switched on again to keep x2,0 at the set point. When R ) Rmax, the controller is switched off, and the reflux ratio is reduced to Rmin.

2630

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001

Product P2 is collected until the average composition in the P2 tank meets the specification xP2,SP. Finally, the distillate stream is diverted into the S2 tank, and the second slop cut is collected until the average composition of the bottom product (P3) meets the specified purity (xP3,SP), assuming that all material in the column will drain down into the still pot at the end of the batch. The minimum reflux ratio value should be chosen large enough to guarantee that the distillate composition will reach the specified purity during each production cut. In the examples presented here, the Rmin value was such that the distillate composition reached a value slightly greater than the set point. An important point to be considered in the choice of the minimum reflux ratio is that the lower the Rmin value, the faster the changes in the distillate composition. It was observed that an Rmin value that is too low can cause the distillate composition to drop quickly below the set point, requiring larger control moves to keep the product quality at the set point. In this work, a maximum reflux ratio value was arbitrarily chosen. However, an optimal Rmax value can be determined by considering the maximization of a profit function. Increasing the Rmax value increases the amount of distillate meeting the product purity specification. On the other hand, the productivity (amount of distillate per unit of time) might be reduced because the larger the reflux ratio, the smaller the distillate flow rate.

The relative degree represents the number of times that the output Y must be differentiated with respect to time to recover the input U. The control strategy developed for constant distillate composition operation of batch distillation columns was based on the globally linearizing control (GLC) structure proposed by Kravaris and Chung.11 Henson and Seborg13 have shown that the GLC is an input-output linearization technique for processes of arbitrary relative degree. The GLC control law is described by the equation

3. Controller Design

Details about the application of the GLC control algorithm to batch distillation systems are presented in the Appendix.

Feedback linearization is a nonlinear control technique that can produce a linear model that is an exact representation of the original nonlinear model over a large set of operating conditions. It is based on two operations: nonlinear change of coordinates and nonlinear state feedback.13 In the input-output linearization approach, the objective is to linearize the map between a transformed input (ν) and the actual output (Y). A linear controller is then designed for the linearized input-output model. Nonlinear SISO systems described by the following state-space model were considered

x3 ) f(x) + g(x)U Y ) q(x)

(1)

where f and g are n-dimensional vectors of nonlinear functions, U is the manipulated input variable, and q is a nonlinear function. The Lie derivative is defined as n

Lfq(x) )

∑ m)1

∂q(x) fm(x) ∂xm

(2)

which is the directional derivative of the function q(x) in the direction of the vector f(x). Using the previous definition n

LgLfq(x) )

∑ m)1

∂(Lfq(x)) gm(x) ∂xm

(3)

The relative degree of a system is the least positive r-2 integer r for which LgLr-1 f q(x) * 0 and LgLf q(x) ) 0.

U)

ν - βrLrf q(x) - βr-1Lr-1 f q(x) - ... - βoq(x) βrLgLr-1 f q(x)

(4)

where the βm (0 e m e r) are controller tuning parameters. A PI controller is designed for the feedbacklinearized system

[

ν ) Kc (YSP - Y) +

1 τI

]

∫0t(YSP - Y) dτ

(5)

The closed-loop system will be BIBO stable if and only if the roots of the characteristic equation below have negative real parts.

βrsr + βr-1sr-1 + ... + β1s + (βo + Kc) +

Kc ) 0 (6) τIs

4. The State Estimator The extended Kalman filter (EKF) for batch distillation columns developed by Oisiovici and Cruz10 has been used to provide the instantaneous composition estimates required in the high-purity batch distillation control loop. Kalman filtering is a method for recursively estimating the state of a system by optimally combining9 knowledge of the system and the sensor dynamics; the statistical description of system noises, measurement errors, and uncertainty in the dynamic models; and any available information about initial conditions of the variables of interest. The Kalman filter operates on the measurements in a sequential manner, requiring minimal data storage. As new measurements become available, the filter generates new state estimates and an error covariance matrix, which represents the uncertainty in the estimate. The extended Kalman filter is based on linearization of the system nonlinear equations about the current state estimate. The process noise and the measurement noise are assumed to be Gaussian-distributed zero-mean variables with covariances Q and R, respectively. The EKF algorithm was applied to the batch distillation model presented in the Appendix. In the prediction step of the algorithm proposed by Oisiovici and Cruz,10 the integration interval (∆t) was equal to the sampling period (Ta). It was observed that numerical integration errors could be reduced by propagating the system state and the error covariance matrix in nkal steps, where nkal is a positive integer number and Ta ) nkal × ∆t. Because this procedure can considerably

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001 2631

increase the computational effort, large values of nkal should be avoided. If p is a stage where a sensor is placed, the following sensor model was considered

Tp )

the intermediate product (P2) finishes, the average composition of P3 starts to be computed at every sampling instant, assuming that all material in the column drains into the still at the end of the batch NP+1

B3

-

A3 - ln{P/[1 + x2,p(R2,p - 1) + x1,p(R1,p - 1)]} C3 (7)

Very good references discuss the Kalman filter techniques in detail.9,14 A detailed discussion of the design and implementation of the EKF for batch distillation columns can be found in Oisiovici and Cruz.10 The EKF is initialized with xˆ 0|0 and P0. During the total reflux period, a steady-state temperature profile is established and the prediction of the filter tends to xˆ k+1|k ) xˆ k|k. Then, the withdrawal of the overhead product starts (t is set equal to zero at this moment). At each sampling period, a set of process temperatures is available, and the updated state estimate is obtained. During the production periods, the estimated compositions of trays 1 and 2 are used in the GLC control laws (eqs 27 and 31 in the Appendix) to calculate the manipulated input value (reflux ratio). The average compositions of the products, which are important in determining the beginning and end of an operating step, can also be computed from the available inferred composition data. The molar liquid and vapor flow rates were assumed to be constant along the column. If V ˆ (t) and L ˆ (t) are, respectively, the estimates of the molar vapor and liquid flow rates at time t, the instantaneous distillate flow rate D ˆ (t) is given by

D ˆ (t) ) V ˆ (t) - L ˆ (t)

∫tt

o,Pi

D ˆ (t) dt )

∫tt

o,Pi

[V ˆ (t) - L ˆ (t)] dt

∫tt

[xˆ i,0(t) D ˆ (t)] dt )

o,Pi

∫tt

o,Pi

{xˆ i,0(t)[V ˆ (t) - L ˆ (t)]} dt (10)

where xjPi is the average composition of component i in tank Pi. If Ta is the sampling period, t ) kTa, where k is an integer number. Isolating xjPi(t) in eq 10 and substituting P ˆ i(t) by eq 9, the average composition of component i in tank Pi after discretization is given by m)k



(xjPi)k )

, i ) 1, 2 (11)

m)k



where k is the kth sampling instant. For 1 e j e NP, S ˆj is the liquid hold-up on tray j, and xˆ 3,j is the heavy component composition estimate for tray j; S ˆ NP+1 is the amount of liquid in the still, and xˆ 3,NP+1 is the heavy component composition in the still. The amount of liquid that remains in the still at a time t ) kTa, (S ˆ NP+1)k, was obtained by subtracting from the initial charge the total hold-up on the trays and the amount of liquid that was withdrawn from the column NP

(S ˆ NP+1)k ) S ˆo -

∑ j)1

m)k

(S ˆ j )k -

∑ (Vˆ - Lˆ )mTa

(13)

m)0

Equation 12 indicates that, to predict the end of the batch, accurate estimated concentration profiles along the column are needed. In the algorithm of the inferential control system, the molar liquid and vapor flow rates were assumed to be constant along the column. At each sampling instant, the vapor flow rate was estimated using the heating power and the latent heat of vaporization of the still content

(V ˆ )k ) Pot/(∆Hvap)k

(14)

where (∆Hvap)k is a function of the still temperature and composition. If Rk is the current reflux ratio value, then the liquid flow rate was given by

(L ˆ )k )

Rk (V ˆ) Rk + 1 k

(15)

If to,Pi and to,Si are, respectively, the time instants when the withdrawal of the product i and the slop cut i begin and tF,Pi and tF,Si are, respectively, the time instants when the withdrawal of product i and the slop cut i finish, then estimates of the final amounts of product and slop cuts are given by m)(tF,Pi/Ta)

P ˆi )



(V ˆ -L ˆ )mTa, i ) 1, 2

(16)

(V ˆ -L ˆ )mTa, i ) 1, 2

(17)

m)(to,Pi/Ta) m)(tF,Si/Ta)

S ˆi )



m)(to,Si/Ta)

[xˆ i,0(V ˆ -L ˆ )]mTa

m)[to(Pi)/Ta]

(12)

(S ˆ j )k ∑ j)1

(9)

Using the estimate of the instantaneous composition of component i in the distillate stream (xˆ i,0), the amount of component i in tank Pi is

ˆ i(t) ) xjPi(t) P

NP+1

(8)

If to,Pi is the time instant when the withdrawal of the product i begins, then the total amount of distillate that is collected in tank Pi from to,Pi to a time instant t is obtained from

P ˆ i(t) )

(xjP3)k )

(xˆ 3,jS ˆ j)k ∑ j)1

(V ˆ -L ˆ )mTa

m)[to(Pi)/Ta]

The end of the batch depends on the average composition of the heavy product (P3). When the withdrawal of

5. Results and Discussion To simulate the column behavior, a rigorous batch distillation simulator was employed. The operating conditions of the example column adopted in the runs are shown in Table 1. The first step in the design of an inferential control system for the batch distillation column was to tune the

2632

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001

Figure 1. Batch distillation control if perfect composition measurements were available (ideal case): (a) still composition profile and (b) reflux ratio and distillate composition profiles. Table 1. Operating Conditions and Controller Settings for the Example Column system P (kPa) stages Pot (W) x1,So/x2,So/x3,So So (mol) xP1,SP/xP2,SP/xP3,SP Ta (s) Rmin - Rmax withdrawal of P1 withdrawal of P2

ethanol (1)/1-propanol (2)/1-butanol (3) 101.325 26 (25 trays + still) 2000 0.30/0.50/0.20 300.0 g0.99/0.99/0.99 10 2.0-20.0 controller settings Kc ) 1 × 10-2 s-1, τI ) 50 s Kc ) 1 × 10-2 s-1, τI ) 50 s

Table 2. Ideal Casea Results ideal case (ttot ) 5.96 h) P1 (mol) P2 (mol) P3 (mol) S1 (mol) S2 (mol) xjP1 xjP2 xjP3 x1,S1 x2,S1 x3,S1 x1,S2 x2,S2 x3,S2 a

82.11 52.61 49.34 102.91 13.41 0.9903 0.9902 0.9901 0.0812 0.9188 0.0000 0.0000 0.1723 0.8277

All compositions exactly known.

GLC controllers for each overhead product cut, assuming that all required composition values were known readily and exactly. The results thus obtained are referred to as the ideal case results. For the tuning parameters and operating conditions in Table 1, Figure 1 and Table 2 present the performance of the GLC controllers. As shown in Figure 1b, tight distillate composition control was obtained during the withdrawal of the overhead products. Furthermore, the controller settings (Table 1) were the same for both production periods. One of the most outstanding feature of batch distillation is its flexibility. The material to be distilled can frequently vary in quality, quantity, and/or composition.

The product specification can also vary and is usually determined by changing market demands or downstream process requirements. In addition, the deadline for the delivery of products is becoming increasingly strict. Considering these features of batch distillation units, it would be a practical advantage if there were no need to retune the controllers in the presence of variations in process operating conditions. Therefore, the sensitivity of the previously tuned controllers to changes in process conditions has been analyzed. With the same tuning parameters as in Table 1, the results obtained for a different feed composition and for different product specifications are depicted in Figure 2a and b, respectively. The composition control was very good in both cases, confirming the ability of the GLC controllers to cope with a certain degree of batch-to-batch variation. After the composition controllers were tuned, the next step in the implementation of the inferential control system was the design of an EKF to estimate instantaneous composition values from temperature measurements. The EKF parameters adopted in this work for Gauss-distributed white noise with standard deviation of (0.1 K are shown in Table 3. Details on the tuning of EKF estimators for batch distillation columns can be found in Oisiovici and Cruz.10 An important point to consider in the design of a state estimator is the choice of the sensor locations. The selection of sensor locations for the control of batch distillation columns is still an open issue. QuinteroMarmol et al.7 suggested the use of singular value decomposition (SVD) to identify the most sensitive tray locations. The application of the SVD analysis for selecting the sensor locations consists of performing the singular value decomposition on a steady-state gain matrix that describes the temperature sensitivity on each tray with respect to changes in load variables.15 The locations that correspond to the most sensitive element in each of the left singular vectors are then chosen. One difficulty with applying the SVD analysis in selecting the best sensor locations for inferential control of batch columns is that, because of the unsteady behavior of batch distillation systems, the matrix of gains is time-varying and the most sensitive tray

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001 2633

Figure 2. Robustness of the GLC controller settings to changes in operating conditions: (a) variations in the product specifications and (b) variations in the feed composition. Table 3. EKF Parameters for the Runs Performed with the Inferential Control Systema Q P0 xˆ 0|0 R (K)2 nkal a

diag(1 × 10-4, ..., 1 × 10-4) diag(1 × 10-1, ..., 1 × 10-1) 0.30 diag(σ2, ..., σ2) 3

σ ) (0.1 K.

Figure 3. Using SVD analysis to determine the stage most sensitive to disturbances in the distillate composition (ethanol/1propanol system, xP1,SP ) 0.99, Rmin ) 0.5, NP ) 29, So ) 50.0 mol, x1,So ) 0.6, Pot ) 1250 W, P ) 101.325 kPa, Kc ) 1 × 10-2 s-1, τI ) 500 s).

locations vary along the batch cycle, as illustrated in Figure 3. As will be shown later in this work, when the presence of measurement noise is relevant in the inferential control loop, the choice of the best sensor locations should not be based only on the most sensitive stage criterion.

For the operating conditions of Table 1, the inferential control system was initially tested considering that eight measuring elements were available and the first sensor (from top to bottom) was placed at stage 2. Composition estimates were provided by the EKF, and the amounts of products and slop cuts were directly obtained from eqs 16 and 17. The EKF estimates were used to control the batch distillation cycle. The results are presented in Figure 4 and Table 4, where actual values are those obtained in the simulation. Figure 4 shows that the inferred compositions agreed with the actual ones, but the estimated distillate profile was very corrupted by noise. The GLC controller was not able to keep the distillate composition at the set point during the withdrawal of P2, and the actual values of xjP1 and xjP2 did not meet the specifications. Because composition estimates at trays 1 and 2 are input variables in the GLC control laws, the noise was transmitted to the manipulated variable, leading to spikes in the reflux ratio profile. The results in Table 4 indicate that the composition inference error (difference between the actual compositions and the estimated ones) was small. However, by comparing Table 4 with Table 2, one can see that the actual amounts of products were smaller than the amounts that could have been potentially obtained. The unstable behavior of the manipulated variable was such that the duration of each production phase was shortened because the maximum reflux ratio value was reached sooner. Digital filters (such as exponential and moving average filters) can attenuate the detrimental effect of noise on the control performance, but they tend to introduce a time delay in the control loop, as has been discussed by Oisiovici et al.16 An alternative to reduce noise in the inferred top composition profile is to place the sensors away from the top stages of the column, as presented in Figure 5. In this case, smoother manipulated and controlled variable profiles were obtained when the first sensors (from top to bottom) were further removed from the top stages, and the total batch time in Table 5 was close to the total batch time of the ideal case run. Table 5 also shows that the product compositions were accurately estimated by the EKF (dactual < 0.25%) and that all products met the specification.

2634

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001

Figure 4. Inferential control using eight sensors at stages 2, 5, 9, 13, 16, 20, 23, and 26: (a) still composition profile and (b) reflux ratio and distillate composition profiles. Table 4. Run with Eight Sensors at Stages 2, 5, 9, 13, 16, 20, 23, and 26a

Table 5. Run with Eight Sensors at Stages 7, 10, 13, 16, 19, 22, 24, and 26a

amount

actual

estimateb

dactual (%)c

amount

actual

estimateb

dactual (%)c

P1 (mol) P2 (mol) P3 (mol) S1 (mol) S2 (mol)

78.35 49.28 39.53 104.54 28.76

73.83 48.61 36.69 103.35 29.12

5.77 1.36 7.18 1.14 -1.25

P1 (mol) P2 (mol) P3 (mol) S1 (mol) S2 (mol)

82.40 51.77 47.06 102.71 16.48

77.60 51.10 44.63 101.56 16.72

5.83 1.29 5.16 1.12 -1.46

composition

actual

estimate (EKF)

dactual (%)c

composition

actual

estimate (EKF)

dactual (%)c

xjP1 xjP2 xjP3 x1,S1 x2,S1 x3,S1 x1,S2 x2,S2 x3,S2

0.9897 0.9885 0.9902 0.1158 0.8829 0.0000 0.0000 0.2779 0.7222

0.9902 0.9903 0.9905 0.1168 0.8829 0.0003 0.0000 0.2777 0.7223

-0.05 -0.18 -0.03 -0.86 0.00 0.07 -0.01

xjP1 xjP2 xjP3 x1,S1 x2,S1 x3,S1 x1,S2 x2,S2 x3,S2

0.9902 0.9914 0.9900 0.0792 0.9197 0.0000 0.0000 0.1910 0.8089

0.9901 0.9902 0.9923 0.0850 0.9147 0.0002 0.0000 0.1876 0.8124

0.01 0.12 -0.23 -7.32 0.54 1.78 -0.43

a t b c tot ) 5.45 h. Equations 16 and 17. dactual ) [(actual value - estimate)/actual value] × 100.

a t b c tot ) 5.94 h. Equations 16 and 17. dactual ) [(actual value - estimate)/actual value] × 100.

The effect of reducing the number of sensors has also been analyzed. Figure 6 and Table 6 present the results of a run carried out with four sensors (the first sensor was kept at stage 7). The manipulated and controlled variable profiles in the run with four sensors (Figure 6b) seem similar to the profiles in Figure 5b (eight sensors). However, the numerical results in Table 6 show that, when fewer sensors were used, the two distillate products (P1 and P2) met the specified purities, but the heavy product P3 was off-specification at the end of the batch. The estimation accuracy of the average composition of the heavy product was more affected by the reduction in the number of sensors than was the estimation accuracy of the two overhead products. As has been discussed previously, instantaneous composition values at all stages are necessary to estimate the average composition of the heavy product. When the number of sensors is reduced, the estimation error of the column composition profile increases, and a less accurate estimate of xjP3 is obtained. In the model used in the EKF design, the vapor and liquid molar flow rates were assumed to be constant

along the column stages (equimolal overflow). Figure 7 presents the actual molar flow rates at the top and bottom of the column for the batch cycle previously considered in this work. According to Figure 7, the molar flow rates were not constant along the column, and the equimolal overflow assumption was not valid, especially during the withdrawal of the first product. This fact explains why the estimation error in the amount of P1 was always greater than the estimation error in the amount of P2. In the examples, the estimation errors in the amounts of products and slop cuts were within the range 1.0-6.0%. However, if a higher accuracy is required, the estimation accuracy in the amounts of products and slop cuts can be improved by considering the molar flow rates at each stage as state variables in the design of the EKF estimator. In this case, energy balances for all stages would also be required, and the problem dimension, as well as the computational effort, would considerably increase. When the reflux ratio reaches the maximum allowable value (Rmax), the controller is switched off, the reflux ratio is set equal to Rmin, and the molar liquid flow rate

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001 2635

Figure 5. Inferential control using eight sensors at stages 7, 10, 13, 16, 19, 22, 24, and 26: (a) still composition profile and (b) reflux ratio and distillate composition profiles.

Figure 6. Inferential control using four sensors at stages 7, 13, 19, and 26: (a) still composition profile and (b) reflux ratio and distillate composition profiles.

as well as the composition of the light component in the distillate fall quickly, as shown in the reflux ratio and distillate composition profiles in Figures 1, 2, and 4-6 and in the liquid flow rate profile in Figure 7. From the above discussion, some general comments about the proposed inferential control system are then made. The EKF for batch distillation columns has confirmed its ability to infer accurate and real-time composition values in the presence of measurement noise and plant/ model mismatch. Another important feature of this state estimator is that a well-tuned EKF is able to converge rapidly to the actual state, even when it is initialized only with guessed initial conditions. When there are purity constraints on only the distillate products, relatively few sensors can be used in the inferential control system. If, however, the bottom

product must also be obtained at a specified purity, more sensors should be added to increase the estimation accuracy of the column composition profile. Nevertheless, Oisiovici and Cruz10 have reported that, above a certain number of sensors, the improvements in terms of estimation accuracy can be negligible. In this work, the constant quality control policy was considered during the production phases. However, because the EKF estimator serves simply as a soft sensor and is independent of the control law, the proposed inferential control system is flexible and can be used in the implementation of other batch distillation control policies (the GLC controllers can be replaced by any other control algorithm that relies on composition data). Because of its robustness properties with regard to plant/model mismatch, uncertainty in the initial system state, and measurement errors, inferential

2636

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001

Table 6. Run with Four Sensors at Stages 7, 13, 19, and 26a amount

actual

estimateb

dactual (%)c

P1 (mol) P2 (mol) P3 (mol) S1 (mol) S2 (mol)

82.05 60.17 51.06 94.94 12.18

77.25 59.35 48.73 93.91 12.39

5.85 1.36 4.56 1.08 -1.72

composition

actual

estimate (EKF)

dactual (%)c

xjP1 xjP2 xjP3 x1,S1 x2,S1 x3,S1 x1,S2 x2,S2 x3,S2

0.9908 0.9902 0.9853 0.0881 0.9110 0.0000 0.0000 0.2143 0.7857

0.9903 0.9901 0.9907 0.0888 0.9111 0.0000 0.0000 0.2091 0.7909

0.05 0.01 -0.55 -0.79 -0.01 2.43 -0.66

a t b c tot ) 5.85 h. Equations 16 and 17. dactual ) [(actual value - estimate)/actual value] × 100.

Figure 7. Molar liquid and vapor flow rate profiles at the top and bottom of the distillation column during the batch cycle.

control systems based on the Kalman filter algorithm might be suitable for the development and practical implementation of closed-loop optimal control policies. 6. Experimental Results The GLC controller was tested in a pilot-scale batch distillation column in our lab. The equipment consists of a glass tube 40 mm in diameter and 29 sieve trays. The mixture to be separated fills the still, whose maximum capacity is 10 L. The column works under atmospheric pressure, and a jacketed kettle is used. A condenser is placed on the top, and the resulting liquid is split into distillate product and reflux by a magnetic valve. A PC is used to acquire the temperature data, infer the required compositions, and implement the reflux ratio determined from the GLC control law by controlling the position of the magnetic valve. The EKF is initialized with initial composition estimates (xˆ 0|0) and an initial estimate of the error covariance matrix (P0). The EKF has been shown to be able

Table 7. Operating Conditions, Controller Settings, and EKF Parameters for the Runs Performed in the Pilot-scale Column system P (kPa) stages Pot (W) x1,So So (mol) xP1,SP Ta (s) Rmin - Rmax Kc (s-1) τI (s) Q P0 xˆ 0|0 R (K)2 (σ ) (0.5 K) nkal

ethanol (1)/1-propanol (2) 101.325 30 (29 trays + still) 850 0.21 90.0 g0.99 20 1.5-20.0 1 × 10-2 50 s qmm ) 1 × 10-4, 1 e m e NP qmm ) 1 × 10-6, m ) NP+1 qmr ) 0, m * r diag(1 × 10-2, ..., 1 × 10-2) 0.80 diag(σ2, ..., σ2) 8

to converge to the actual column state even when it is initialized with roughly guessed initial values of xˆ 0|0 and P0. The measurement noise covariance R can be obtained from measurement data and knowledge of sensor characteristics. The process noise covariance Q is usually selected through a trial-and-error procedure using computer simulation or experimental data. In many cases, a well-tuned Kalman filter can be designed by assuming a diagonal and time-invariant process noise matrix. The nkal parameter represents the number of integration steps per sampling period (Ta ) nkal × ∆t), where ∆t is the model integration interval. The nkal value must be carefully chosen to avoid numerical integration errors. As nkal increases, numerical integration errors are reduced and the computational burden increases. However, above a certain nkal value, the gain in the integration accuracy is negligible. Using the operating conditions and parameters of Table 7, batch distillation runs were carried out for varying sensor locations. After each batch cycle, the distillate average composition was measured with a refractometer. The results are presented in Figure 8 and Table 8, where the actual values are the compositions measured with the refractometer. When the sensors were located next to the top (Figure 8a), the reflux ratio behavior was unstable, and the controller failed to keep the product purity at the set point. As the sensors were placed further from the top stages (Figure 8b and c), smoother manipulated and controlled variable profiles were obtained, and the distillate product met the specified purity. The experimental results are in accordance with the simulation results previously presented. 7. Conclusions This work has presented an inferential control system to control the sequencing of multicomponent batch distillation operations and to guarantee that all products, including the residue in the still, meet high-purity specifications. Two GLC controllers were designed to control the distillate composition during each production period by manipulating the reflux ratio. The GLC controllers have been shown to be able to cope with a certain degree of batch-to-batch variations.

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001 2637 Table 8. Experimental Results for the Pilot-Scale Column sensor locations

xjP1 (actual)

xjP1 (estimate)

dactual (%)a

1, 4 4, 9 9, 14

0.9546 0.9907 0.9917

0.9584 0.9928 0.9909

-0.4 -0.2 0.1

a

dactual ) [(actual value - estimate)/actual value] × 100.

An extended Kalman filter was implemented to serve as a soft sensor, providing accurate instantaneous composition values from temperature measurements. The EKF estimates were used to calculate control actions and to determine the beginning and end of the batch distillation operating steps. The influence of the sensor locations on the control performance has also been analyzed. In the presence of measurement noise, spiky reflux ratio profiles were obtained when sensors were placed next to the top stages. At the top stages of high-purity columns, the temperature variations were so small that it was difficult to distinguish real variations from measurement noise. In such cases, noise reduction can be accomplished by placing the sensors away from the top of the column. When the bottom product must also be obtained at a specified purity, relatively more sensors should be used because, whereas average compositions of the distillate products can be determined from top-stage composition data, composition estimates of all stages are required to calculate the average composition of the bottom product. The inferential control system achieved tight composition control and was able to control the entire batch distillation cycle. Because of its robustness with regard to plant/model mismatch, uncertainty in the initial system state, and measurement errors, the proposed inferential control scheme has been demonstrated to be feasible for practical on-line applications. Acknowledgment R.M.O. thanks FAPESP (Fundac¸ a˜o de Amparo a` Pesquisa do Estado de Sa˜o Paulo) for financial support. Appendix The nonlinear model of the batch distillation column used in the EKF algorithm and in the design of the GLC controllers is presented here. The trays were numbered from top to bottom (0 is the condenser, 1 is the top stage, and NP + 1 is the still). The following assumptions were made: equimolal overflow, theoretical stages, negligible vapor hold-up, constant pressure, negligible reflux drum hold-up, and total condenser (xi,0 ) yi,1). The amount of holdup on a tray for a given liquid rate was determined from the Francis weir formula. The state variables were the liquid compositions at all stages (still and trays)

x ) [x1,1 ‚‚‚ x1,j ‚‚‚ x1,NP+1 ‚‚‚ xi,1 ‚‚‚ xi,j ‚‚‚ xi,NP+1 ‚‚‚ xNC-1,1 ‚‚‚ xNC-1,j ‚‚‚ xNC-1,NP+1]T 1 e i e NC-1, 1 e j e NP + 1 (18) Figure 8. Experimental runs in a pilot-scale batch distillation column.

The composition of the NCth component can be obtained from the difference

2638

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001 NC-1

xNC,j ) 1.0 -

[] [

xi,j, ∑ i)1

1 e j e NP + 1

If L is the liquid flow rate and V is the vapor flow rate, then the nonlinear model of the batch distillation column in the state-space representation is given by x˘ 1,1 l x˘ i,1 l x˘ i,j ) l x˘ i,NP+1 l x˘ NC-1,NP+1

1 e i e NC - 1, 1 e j e NP + 1

]

(20)

[ ][ ][ ]

If R is the reflux ratio, then L ) [R/(R + 1)]V. Choosing U ) R/(R + 1), it is convenient for the GLC controller design to rewrite eq 20 as

x˘ 1,1 f1,1 g1,1 l l l x˘ i,1 fi,1 gi,1 l l l x˘ i,j ) fi,j + gi,j U, l l l x˘ i,NP+1 fi,NP+1 gi,NP+1 l l l x˘ NC-1,NP+1 fNC-1,NP+1 gNC-1,NP+1 1 e i e NC - 1, 1 e j e NP + 1 (21)

where

V V (y - yi,j) and gi,j ) (xi,j-1 - xi,j), Sj i,j+1 Sj 1 e i e NC - 1, 1 e j e NP (22) V (xi,NP+1 - yi,NP+1) and fi,NP+1 ) SNP+1 V gi,NP+1 ) (x -xi,NP+1), 1 e i e NC - 1 SNP+1 i,NP fi,j )

The equilibrium relationship is given by

Ri,jxi,j NC

sat Pi,j (Tj)

, 1 e i e NC, 1 e j e NP + 1 (23)

∑ Rm,jxm,j m)1 For ideal systems, the relative volatilities are functions of temperature alone. If NC represents the heaviest component, then

(24)

sat PNC,j (Tj)

The vapor pressure of pure component i can be calculated using the Antoine equation

(

sat (Tj) ) exp Ai Pi,j

(Lx1,0 - Lx1,1 + Vy1,2 - Vy1,1)/S1 l (Lxi,0 - Lxi,1 + Vyi,2 - Vyi,1)/S1 l (Lxi,j-1 - Lxi,j + Vyi,j+1 - Vyi,j)/Sj l (Lxi,NP - Lxi,NP+1 + Vxi,NP+1 - Vyi,NP+1)/SNP+1 l (LxNC-1,NP - LxNC-1,NP+1 + VxNC-1,NP+1 - VyNC-1,NP+1)/SNP+1

yi,j )

Ri,j )

(19)

Bi Tj + C i

)

(25)

During the withdrawal of the lightest product (P1), Y ) x1,0 ) y1,1 and YSP ) xP1,SP. For the batch distillation model considered in this work, r ) 1. If β1 ) 1 and βo ) 0, the GLC control law that keeps the distillate composition at the specification during the first production period is given by

∂y1,1 ∂y1,1 f1,1 f ∂x1,1 ∂x2,1 2,1 Rcontrol ) U) ∂y1,1 Rcontrol + 1 ∂y1,1 g + g ∂x1,1 1,1 ∂x2,1 2,1 ν-

(26)

Using eqs 21 and 22, the control law becomes

Rcontrol ) Rcontrol + 1 ∂y1,1 V ∂y1,1 V (y1,2 - y1,1) (y - y2,1) ν∂x1,1 S1 ∂x2,1 S1 2,2 (27) ∂y1,1 V ∂y1,1 V (y - x1,1) + (y - x2,1) ∂x1,1 S1 1,1 ∂x2,1 S1 2,1

U)

[

[

]

]

[

[

]

]

For ideal ternary systems, eq 23 gives

R1,1[x2,1(R2,1 - 1) + 1] ∂y1,1 ) (28) ∂x1,1 [1 + x (R - 1) + x (R - 1)]2 2,1 2,1 1,1 1,1 -R1,1x1,1(R2,1 - 1) ∂y1,1 (29) ) ∂x2,1 [1 + x (R - 1) + x (R - 1)]2 2,1 2,1 1,1 1,1 When the withdrawal of the intermediate product (P2) begins, Y ) x2,0 ) y2,1 and YSP ) xP2,SP are considered in eq 5. If β1 ) 1 and βo ) 0, the following GLC control law is obtained for the second production period

∂y2,1 ∂y2,1 f f νRcontrol ∂x2,1 2,1 ∂x1,1 1,1 U) ) ∂y2,1 Rcontrol + 1 ∂y2,1 g2,1 + g ∂x2,1 ∂x1,1 1,1

(30)

Using eqs 21 and 22 again

Rcontrol ) Rcontrol + 1 ∂y2,1 V ∂y2,1 V (y - y2,1) (y - y1,1) ν∂x2,1 S1 2,2 ∂x1,1 S1 1,2 (31) ∂y2,1 V ∂y2,1 V (y - x2,1) + (y - x1,1) ∂x2,1 S1 2,1 ∂x1,1 S1 1,1

U)

[

where

[

]

]

[

[

]

]

Ind. Eng. Chem. Res., Vol. 40, No. 12, 2001 2639

∂y2,1 R2,1[x1,1(R1,1 - 1) + 1] ) (32) ∂x2,1 [1 + x (R - 1) + x (R - 1)]2 2,1

2,1

1,1

1,1

-R2,1x2,1(R1,1 - 1) ∂y2,1 ) (33) ∂x1,1 [1 + x (R - 1) + x (R - 1)]2 2,1 2,1 1,1 1,1 Nomenclature Ai, Bi, Ci ) Antoine constants for component i D ) distillate flow rate, mol s-1 dactual ) deviation of the estimate from the actual value f, g ) vectors of nonlinear functions ∆Hvap ) latent heat of vaporization, J mol-1 Kc ) controller gain, s-1 L ) liquid flow rate, mol s-1 n ) system order NC ) number of components nkal ) parameter (nkal ) Ta/∆t) NP ) number of trays P0 ) initial estimate of the error covariance matrix P ) system pressure, Pa Pi ) amount of product i, mol sat Pi,j ) vapor pressure of component i in stage j, Pa Pot ) heating power, W Q ) process noise covariance matrix q ) nonlinear function R ) measurement noise covariance matrix R ) reflux ratio r ) relative degree Rmax ) upper bound for the reflux ratio Rmin ) lower bound for the reflux ratio Si ) amount of slop cut i, mol Sj ) liquid tray hold-up, mol So ) initial charge, mol T ) temperature, K t ) time, s ∆t ) integration interval, s Ta ) sampling period, s to,Ci ) sample time when the withdrawal of the cut Ci (product or slop cut) begins tF,Ci ) sample time when the withdrawal of the cut Ci (product or slop cut) finishes ttot ) total batch time, s U ) manipulated input variable V ) vapor flow rate, mol s-1 x ) state vector xˆ m|k ) estimate of the state at sample time m given output measurements up to sample time k xi,j ) liquid composition of component i in stage j, mole fraction xi,So ) composition of component i in the initial charge, mole fraction xk,Si ) mole fraction of component k in the slop cut i xjPi ) average composition of product i, mole fraction of component i xPi,SP ) specified purity of product Pi, mole fraction of component i Y ) controlled output variable yi,j ) vapor composition of component i in stage j, mole fraction Greek Letters R ) relative volatility β ) controller tuning parameter ν ) transformed input variable σ ) temperature measurement standard deviation, K τI ) integral time, s

Subscripts i ) component j ) stage NP + 1 ) still 0 ) condenser Superscripts ∧ ) estimate Acronyms BIBO ) bounded-input-bounded-output EKF ) extended Kalman filter ELO ) extended Luenberger observer GLC ) globally linearizing control NIMC ) nonlinear internal model control PI ) proportional-integral SISO ) single-input-single-output SVD ) singular value decomposition

Literature Cited (1) Lucet, M.; Charamel, A.; Chapuis, A.; Guido, G.; Loreau, J. Role of Batch Processing in the Chemical Process Industry. In Batch Processing Systems Engineering; Reklaitis, G. V., Sunol, A. K., Rippin, D. W. T., Hortac¸ su, O., Eds.; Springer-Verlag: Berlin, 1996. (2) Bosley, J. R.; Edgar, T. F. Application of Nonlinear Model Predictive Control to Optimal Batch Distillation. In DYCORD+′92; Balchen, J. C., Ed.; Pergamon Press: Amsterdam, 1993. (3) Joseph, B.; Brosilow, C. B. Inferential Control of Processes: Parts I, II and III. AIChE J. 1978, 24, 485. (4) Mejdell, T.; Skogestad, S. Output Estimation Using Multiple Secondary Measurements: High-Purity Distillation. AIChE J. 1993, 39, 1641. (5) Barattti, R.; Bertucco, A.; Da Rold, A.; Morbidelli, M. A Composition Estimator for Multicomponent Distillation Columnss Development and Experimental Test on Ternary Mixtures. Chem. Eng. Sci. 1998, 53, 3601. (6) Kano, M.; Miyazaki, K.; Hasebe, S.; Hashimoto, I. Inferential Control System of Distillation Compositions Using Dynamic Partial Least Squares Regression. J. Process Control 2000, 10, 157. (7) Quintero-Marmol, E.; Luyben, W. L.; Georgakis, C. Application of an Extended Luenberger Observer to the Control of Multicomponent Batch Distillation. Ind. Eng. Chem. Res. 1991, 30, 1870. (8) Barolo, M.; Berto, F. Composition Control in Batch Distillation: Binary and Multicomponent Mixtures. Ind. Eng. Chem. Res. 1998, 37, 4689. (9) Maybeck, P. S. Stochastic Models, Estimation and Control; Academic Press: London, 1979; Vol. 1-3. (10) Oisiovici, R. M.; Cruz, S. L. State Estimation of Batch Distillation Columns Using an Extended Kalman Filter. Chem. Eng. Sci. 2000, 55, 4667. (11) Kravaris, C.; Chung, C. B. Nonlinear State Feedback Synthesis by Global Input/Output Linearization. AIChE J. 1987, 33, 592. (12) Betlem, B. H. L.; Krijnsen, H. C.; Huijnen, H. Optimal Batch Distillation Control Based on Specific Measures. Chem. Eng. J. 1998, 71, 111. (13) Henson, M. A.; Seborg, D. E. Nonlinear Process Control; Prentice Hall: New York, 1997. (14) Brown, R. G.; Hwang, P. Y. C. Introduction to Random Signals and Applied Kalman Filtering, 2nd ed.; John Wiley & Sons: New York, 1992. (15) Yu, C. C.; Luyben, W. L. Control of Multicomponent Distillation Columns Using Rigorous Composition Estimators. AIChE Symp. Ser. 1987, 104, A29-A69. (16) Oisiovici, R. M.; Cruz, S.L.; Pereira, J. A. F. R. Digital Filtering in the Control of a Batch Distillation Column. ISA Trans. 1999, 38 (3), 217.

Received for review April 7, 2000 Revised manuscript received February 7, 2001 Accepted March 16, 2001 IE0003943