Application of an Extended Luenberger Observer to the Control of

11 I Research Drive, Lehigh University, Bethlehem, Pennsylvania 18015 ... application of observers, but very few applications to complex, nonlinear, h...
1 downloads 0 Views 1MB Size
1870

Ind. Eng. Chem. Res. 1991, 30, 1870-1880

Application of an Extended Luenberger Observer to the Control of Multicomponent Batch Distillation Enrique Quintero-Marmol, William L. Luyben,* and Christos Georgakis Process Modeling and Control Center, Department of Chemical Engineering, Mountaintop Campus, 11I Research Drive, Lehigh University, Bethlehem, Pennsylvania 18015

State estimators are used to predict the values of those variables that cannot be measured directly, using the state variables that are accessible for measurement. There is considerable interest in the application of observers, but very few applications to complex, nonlinear, high-order 'chemical engineering systems such as distillation columns have been reported. This paper explores the use of observers to predict compositions in multicomponent batch distillation through the use of temperature measurements. It is important in batch distillation to know the instantaneous composition of the distillate withdrawn in order to apply the optimum distillate policy, but usually perfect c o m p i t i o n measurements are not available and we need to rely in some kind of inferential estimation of these compositions. Simulation results demonstrate the feasibility of applying extended Luenberger observers to multicomponent batch distillation. A design methodology is developed that addresses the important issues of the number and location of temperature sensors, the placement of the closed-loop poles of the observer, and the sensitivity of initial condition estimates. Introduction An observer is a dynamic model that estimates the state variables of a process. Observers are used because some systems have state variables that are not accessible for measurement or that can be measured only as a combination of some state variables. An example of the latter is multicomponent distillation columns where we measure temperature on a tray, but this temperature is the result of the mole fraction of all the components on that particular tray and the pressure. The term observer was introduced by Luenberger (1964, 1966,1971). He showed how the state vector of a linear system can be reconstructed from observations of the system's inputs and outputs (if the system is observable). The design technique is similar to that used in feedback control. The gains are obtained by placing the poles of the closed loop observer in the left half of the complex plane, in order to make the error (difference between the measured process output and the output of the model used in the observer) go to zero exponentially (for linear systems). For a detailed coverage of observers see the book by Friedland (1986). Though there are some advances in the mathematical treatment of nonlinear observers, a comprehensive theory does not yet exist. The approach used here is the same as in feedback control. We use the linearized model of the system to obtain the observer gains that give us the desired closed loop eigenvalues of the observer. Then those gains are used with the nonlinear model of the system, along with the estimation error (difference between actual and estimated temperatures) to predict the state variables. In a batch distillation column our state variables are the compositions in every stage (reboiler, trays, and reflux drum). It is assumed that flows, pressure, and some tray temperatures in the column are known. For a binary system only one state variable is considered in every stage; the mole fraction of the second component is just obtained by difference. For a ternary system two state variables are considered in every stage. Observer Structure The usual state-space representation of a linear dynamic system is x = Ax + Bu (1) z = cx (2)

where x is the state variable vector, u the known input vector, z the measured variable vector, and A, B, and C are matrices. Usually there are more states than outputs and vector z is smaller than vector x. Matrix A is always a square matrix. The expression for the observer of this system (see Friedland 1986) is f = (A - KC)? + K Z + BU (3) or

i

= Af

+ K ( z - Cf)+ BU

(4)

where x is the estimated state variable vector and K is a matrix of gains of the observer. The differential equation of the error is

e=x-x

(5)

e = (A - KC)e

(6)

Therefore if K is selected so that the eigenvalues of A KC are in the left side of the complex plane, the error will exponentially go to zero, i.e., the estimated state will approach the actual state. If n is the order of the system and m is the number of measurements, A is an n X n matrix, K an n X m matrix, and C an m X n matrix. If a nonlinear model is used in the observer to estimate the state variables, the observer is called an "extended observer". The equations for the nonlinear model are x = f(x,u)

h(x) where f and h are nonlinear functions. The equations for the observer are i = f(%,u)+ K[z - h(ii)] z =

2 = h(l)

(7)

(8)

(9) (10)

A and C are matrices whose ijth elements are given by a,, =

af,/ax,

c,, = ahi/ax,

(11) (12)

Equations 11 and 12 are evaluated at x = 2. The entries of matrices A and C for binary and ternary batch distillation columns are given in the appendix.

0888-5885191/ 2630- 1870$02.50/0 0 1991 American Chemical Society

Ind. Eng. Chem. Res., Vol. 30,No. 8, 1991 1871 Table I. Constants b~for Eq 22 syst a = 91311 b~j -7200.8 bz1 12.4233 b22 11.3247 b23 10.2261

r a = 2.2511.511

U

I 4

-7200.8 11.7301 11.3247 10.9192

I

Mathematical Model The assumptions made in the model are the following: constant tray and reflux drum holdup; equimolal overflow; constant relative volatilities; constant vapor boilup rate. On the basis of these assumptions the equations describing the system are as follows: reboiler m B / d t 3 -( v - R) (13) d [ H ~ ~ ~ j ]=/ dRx1j t - V y ~ j j = 1, 2,

..., N c - 1 (14)

Making the differentiation in (14) and using (131, we obtain HBdXBj/dt = R [ x l j - X B ~ ]- v [ y ~ -j XB~] j = 1, 2, ..., NC - 1 (15) tray i Hi dxij/dt = R[xi+lj - xij]

+ V[yi-lj - yij] j = 1, 2,

..., NC - 1 (16)

reflux drum

HDdx,/dt

j = 1, 2,

= V(ynr,j- xDj)

...,NC - 1 (17)

R=V-D

(18)

equilibrium NC

yij = ajxij/

j = 1, 2, ..., NC - 1

X akxik

&=I

(19)

mole fraction NC- 1

xiJqc = 1 -

k=l

Xi&

(20)

where NC is number of components in the mixture and Nt is the number of trays in the column. Luyben's (1988) capacity factor (total on-specification products divided by the total time of the batch) is used to compare results of different observers: NC

CAP = XPi/(tF ill

+ 0.5)

(21)

Temperature on tray m:

m is the stage where the thermocouple is placed. Equation 22 is obtained assuming Raoult's law and a vapor pressure of pure component j of the following form:

hj

In Pio = ?; + b,

(23)

(see Quintero-Marmol and Luyben, 1990). The constants bij are given in Table I. To keep track of the nomenclature, we notice that nonlinear eqs 15-17 correspond to eq 7, and eq 22 corresponds to eq 8.

y.

$=A$+K(z-c$)+Bu Figure 1. Block diagram of a linear observer for a binary batch distillation column.

Before presenting the observer design procedure, there are several practical questions that need to be answered. Issues such as observability, number of measurements needed, placement of closed-loop poles, stability, etc., will be discussed in the following sections.

Observability To be able to place the eigenvalues of the closed loop matrix A, = A - KC at arbitrary locations, the system has to be observable. A linear system is observable if the matrix E = [C CA CA2 ... CAk-*IT (24) is of rank k. Yu and Luyben (1987) used a degree-of-freedom argument to show that a distillation column is observable as long as the number of measurements is a t least NC - 1, where NC is the number of components in the mixture. In our calculations the condition number (ratio between the maximum and the minimum singular values) of the observability matrix was always very big, 1030 for a ternary 20-tray column. We could not find guidelines about reasonable values for this number in the literature, maybe due to the fact that singular values depend on scaling. In our case those conditions numbers were found in the observability matrix by using mole fractions, temperatures in degrees Rankine, and pressure in atmospheres. Adding more measurements to the system always reduced the condition number of the observability matrix. Figure 1 illustrates a block diagram of a linear observer for a binary batch distillation column with four state variables, one thermocouple located at state three and one input. In this case K is a vector (one measurement), z and C i are scalars.

1872 Ind. Eng. Chem. Res., Vol. 30, No. 8, 1991 PROCESS

O B F E R L FK

Figure 2. Block diagram of a nonlinear observer for a multicomponent batch distillation column.

Figure 2 shows a block diagram of the nonlinear observer in vector notation. Even though the linear observer in theory needs only NC - 1 temperature measurements to be observable, it was found that the nonlinear observer needed a t least NC thermocouples to be effective. For robust convergence, as we will see later, the number of measurements needed appears to be NC + 2. It should also be noted that the number of required measurements does not appear to depend on the number of trays. This finding has very important practical significance because most industrial columns have a large number of trays. Pole Placement If the system is observable and linear, it is theoretically possible to place the eigenvalues of the closed-loop matrix A, = A - KC at any desired locations. In a batch distillation column the system is observable if we have NC 1 thermocouples, but if we have more, then the extra degrees of freedom can be used to minimize the sensitivity of the closed-loop matrix A,. In our case the pole placement was made with the commercial software package MATLAB,which uses the algorithm of Kautsky et al. (1985), and for multioutput systems optimizes the choice of the gains for a robust solution. This software package performs all the computations in double precision, which appears to be needed due to the large matrices and small compositions we are handling. One question that arises a t this point is where to place the poles of the closed-loop matrix. We could not find guidelines in the literature. The eigenvalues of a typical batch distillation column range from -lo3 to -10-15 (sometimes maybe due to numerical errors we obtained a small positive eigenvalue of +10-l6).It is clear that the observer has to be faster than the actual open-loop system, and therefore its closed-loop eigenvalues have to be located to the left of the open-loop ones in the complex plane. But we do not know how many eigenvalues need to be relocated or how far to the left they need to be moved. It is important to remember that a distillation column is a complex system whose state variables interact dynamically between themselves, as shown in Figure 1. After numerous tests we found that the best way to place the closed-loop eigenvalues was to move only the slower ones. For example, suppose we have a sixth-order system whose open-loop eigenvalues of process matrix A are [-250, -190, -105, -38.5, -5.3, -2 X 10-14]. Then we change some of the smaller eigenvalues (slower dynamics) and leave the bigger ones the same (faster dynamics), resulting in a closed loop matrix with eigenvalues like [-250, -190, -105, -38.5, -38, -37.51. This ensures that our system will not go out of bounds and that it is fast enough to converge to the true compositions in a short time, during the startup period, before we begin to withdraw distillate in the batch distillation column. One of the problems we found in

trying to make all the eigenvalues faster was that the resulting gains were very large, making the observer unstable. Location of Measurements From the results obtained at the beginning of exploring where to locate the measurements, it was clear that one thermocouple should be placed in the reboiler. The results always improved when we did this because the reboiler has the largest inertia of the system. The question of how to locate the other measurements was answered by using the practical heuristic of spacing them evenly up and down the column. This approach seems intuitively reasonable since it makes the measurements more independent. However, we make no claim that these locations are optimal. The use of singular value decomposition may yield the most sensitive tray locations. We leave a thorough study of this question to future work. Number of Measurements a n d Guessed Initial Conditions The key problem in applying an estimator to batch distillation is that the initial conditions in the column and still pot (compositions)are usually not known. In addition, they vary significantly from batch to batch. If we knew the initial compositions exactly and had a perfect model of the column, the predictions of the model would be perfect. But if the initial guesses of compositions that we give the model are not exactly equal to the real ones, the predictions of even a perfect model will be incorrect. Therefore the estimator must be able to start with only approximate guesses of the initial conditions and converge to close to the actual conditions in the column. The convergence must be achieved during the startup period while the column is on total reflux and no product is being withdrawn. Figure 3 illustrates how the convergence region changes with the number of measurements. We obtained these convergence regions in the following way A single guessed initial condition is selected for the observer Then the actual initial conditions of the column are specified (xinit). As long as the estimated distillate compositions of the observer match the actual distillate compositions during the startup period, xinitis within the convergence region. We then change xinitover a range of values until we find the limit where the observer does not converge in this period. The example shown in Figure 3 is for a 20-tray ternary system and guessed initial conditions &it = 0.3333/0.3333/0.3334. Convergence is obtained while the actual initial conditions of the batch are within the region corresponding to the number of measurements used. These results show that using more measurements makes the observer less sensitive to the mismatch between assumed and actual initial conditions. Figure 4 shows some peculiar results for the stability region of a ternary 20-tray column. Guessed initial conditions are ?init = 0.1/0.1/0.8, and two sets of gains are tested in the observer, one obtained at 2init= 0.1/0.1/0.8 and the other at = 0.3333/0.3333/0.3334. The results show that the gains obtained with the latter initial conditions give the bigger stability region, even though they are farther away from the region we are interested in. We think this is because during the startup period the batch column rearranges the compositions always in the same way, most volatile component on top and heavy component on bottom, despite the initial conditions. And this situation suits the observer better if the gains are obtained with finit the same for every component, Le., Rinit = 1/NC. The number of measurements needed definitely depends on the number of components and initial conditions. I t

Ind. Eng. Chem. Res., Vol. 30, No. 8, 1991 1873 1 .o

0.2

\

;

\

:

\ : \ :

0.8

-

x2

\ :

x2 0.6

0.1

-

0.4

0.2

0

0.2

0.4

0.6

0.i

1.o

0.B

0.2 X1

X1

l'O

n

A Convergence obtained

_____ K

5 measurements obtained with ;=.3333/.3333/.3334

- -.- - - - - -.4 measurements

K obtained with "x=.3333/.3333/.3334

x No convergence

x2

c-

X

0.6

5 measurements K obtained with

X

=.

U.8

Figure 4. Convergence region for a ternary system with gains obtained with different initial conditions ( a = 91311,Nt = 20,D = 35, HBo = 300).

0.4

appears to be independent of the number of trays because for the runs made with binary and ternary batch columns using 4 and 20 trays the convergence and responses always were alike for the same number of measurements utilized.

conditions for the next batch change drastically. The question is, can we use the same gains? The answer is yes, as long as the initialization for the observer is close to that of the new batch. It is important to emphasize the meaning of eq 9. For every measurements we have one gain for every state variable. For example, a binary batch distillation column with 20 trays (22 stages) and 4 measurements will have in total 88 gains (4 for every state variable). A ternary system with the same number of stages and measurements will have 176 gains, again 4 for every state variable. In the cases tested, using degrees Rankine for temperatures and mole fraction for compositions,the gains ranged from to 30. We began to get poor estimates when bigger gains were obtained.

Gain Updating During the startup period of a batch distillation column, when the column is operating at total reflux, it was found that the eigenvalues of the linearized system do not change much despite the changes in compositions. That makes the gains obtained with the initial conditions valid for the whole startup period. After estimated values match the actual ones, no gains are needed because the temperature error is zero (if no model error has been introduced in the observer and no unknown disturbances occur). For batches with different initial conditions or relative volatilites, as long as the open-loop eigenvalues are similar, the same set of gains obtained with one can be used in the others. As can be seen in the section of results, when we changed the relative volatility of our ternary system from a = 9/3/1to a = 2.25/1.5/1, using the same gains gave us excellent results in both cases. How about initial conditions? As long as estimated initial conditions are not too far from the actual (20% is reasonable), the observer converges, independent of the initial conditions selected for the entries in the linear matrices used to obtain the gains. For example, suppose were are running our batch column with some initial conditions and our observer is giving us adequate responses, and suddenly the initial

Design Procedure After numerous trials the best algorithm found for designing an observer for a batch distillation column is summarized as follows: (1) Pick M (NC+ 2 measurements give a reasonable convergence region). (2) Linearize the model of the system. (3) Use the average value of compositions to obtain the A and C matrices. Example for a ternary system: x1 = x2 = x3 = I/* (4) Obtain the eigenvalues of A (open-loopeigenvalues). ( 5 ) Select the closed-loop eigenvalues changing the smaller open-loop eigenvalues (slower ones) making them bigger (faster). As a rule of thumb you can change NC 1eigenvalues for every measurement in excess of NC - 2. For example, in a ternary system with three measurements, the four smaller eigenvalues can be made faster. (6) Obtain the gains K that place the eigenvalues of A - KC a t the desired locations (closed-loop eigenvalues). (7) Use the gains of step 6 with the nonlinear equations of the model (eq 9). (8) If convergence is obtained before the withdrawal of distillate and the observer response is not too underdamped, the design is complete.

0.2 X

I

0

0.2

0.4

0.6

1 .o

0.b X1

Figure 3. Convergence region for a ternary system with different number of measurements (&nit = 0.3333J0.3333J0.3334, a = 91311, Nt 20,D 45,Hm 300).

1874 Ind. Eng. Chem. Res., Vol. 30, No. 8, 1991 Table 11. Numerical Valuee of Matrices A and C for the Example Given in A Matrix -0.79891 1.oooO 0.OOO 0.OOO 0.OOO 0.OOO 0.31954 0.OOO -31.954 0.OOO -179.89 100.00 0.OOO 79.891 0.OOO 0.OOO 0.OOO -179.89 100.00 0.OOO 79.891 0.OOO 79.891 -179.89 100.00 0.OOO 0.OOO 0.OOO 0.OOO 79.891 -179.89 100.00 0.OOO 0.OOO 0.OOO -1O.OOO 0.OOO 0.OOO 7.9891 0.OOO 0.OOO 0.OOO 0.OOO -0.58585 0.OOO 0.OOO 0.42606 0.OOO 0.OOO 58.585 0.OOO 0.OOO 0.OOO -42.606 42.606 0.OOO 0.OOO 0.OOO O.OO0 0.OOO 0.OOO -42.606 42.606 0.OOO 0.OOO 0.OOO -42.606 42.606 0.OOO 0.OOO 0.OOO 0.OOO -42.606 42.606 0.OOO 0.OOO 0.OOO 0.OOO -4.2606 0.OOO 0.OOO 0.OOO 0.OOO 0.OOO C Matrix -24.312 0.OOO 0.OOO 0.OOO -97.248 0.OOO 0.OOO 0.OOO 0.OOO 0.OOO 0.OOO -97.248 0.OOO 0.OOO 0.OOO 0.OOO -97.248 0.OOO 0.OOO 0.OOO O.Oo0

the Design Procedure Section 0.OOO 0.OOO

0.OOO

31.954 -31.954

31.954 -31.954

0.OOO 0.OOO 0.OOO

0.OOO 0.OOO 0.000

1.oooO -158.58 100.00 58.585 -158.58 58.585 0.OOO 0.OOO 0.OOO

0.OOO 0.OOO

0.OOO 0.OOO 0.OOO

0.OOO 0.OOO 0.OOO

31.954 -31.954 0.OOO 0.OOO 0.OOO

100.00 -158.58 58.585 0.OOO

0.OOO

-24.312 0.OOO

0.OOO 0.OOO 0.OOO 0.OOO

0.OOO 0.OOO

O.Oo0

31.954 -3.1954 0.OOO 0.OOO 0.OOO

O.OO0

100.00 -158.58 5.8585 0.OOO 0.OOO

0.OOO 0.OOO 0.OOO

0.OOO O.OO0 0.OOO 0.OOO

-24.312

0.OOO 0.OOO

100.00 -1O.OOO 0.OOO 0.OOO 0.OOO

............... __.,

...... .....

n

.....

..................... 1.

2 0

__.__.. __.'

05

1

.r4

2L

T4

15

2

25

3

35

i

, 1 .

4

45

5

0

05

1

I5

2

sugc

25

3

35

4

45

5

stage

5,

5

T4 0 -........

................................... T2

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

T4

4-

I 4

-

3:

._1

N

N

9

2r

T B -

.li

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

.>. .3 .?O

0

05

1

15

2

25

3

35

4

45

5

stage

.-_.

4.

0

1

'._

1

............... 05

1

15

2

25

3

35

4

.._..... 45

1 5

sugc

Figure 5. Gains obtained for every state variable and stage (example in the Design Procedure section): (a) with iMt = 0.3333/0.3333/0.3334; (b) with iMt = 0.1/0.1/0.8.

(9) If convergence is not obtained quickly enough, increase the number of closed loop eigenvalues that are changed. Go to step 6. If the response of the observer becomes too underdamped (or unstable) increase the number of measurements and go to step 2. In the runs made, step 5 appears to be independent of number of trays, Le., with the same number of measurements the number of eigenvalues changed cannot be increased as the number of stages is increased. As an example of the design procedure let us take a ternary 4-tray column with thermocouples located on tray 4, tray 2, and the reboiler. We linearize the model of the system and use Zinit = 0.3333f 0.333310.3334 to obtain the A and C matrices given in Table 11. The eigenvalues of the A matrix are [-375.97, -273.40, -220.90, -165.94, -146.59, -97.882, -43.883, -42.297, -6.6203, -1.8038, -9.9 X 10-l6,-5.6 X 10-16]. The closed-loop eigenvalues chosen

to obtain the gains are [-375.97, -273.40, -220.90, -165.94, -146.59, -97.882, -43.883, -42.297, -41, -40, -39, -381. Figure 5a shows the gains obtained. For comparison Figure 5b illustrates the gains for the same example but obtained with XIinit = 0.1/0.1/0.8 and closed-loop eigenvalues [-662.80, -494.88, -393.04, -286.93, -285.96, -153.56, -117.02, -46.271, -45, -44, -43, -421. I t can be seen that the range of numerical values of the gains are similar for both guessed initial conditions. This is the reason sometimes the gains obtained with some initial conditions can be used to simulate the process with other very different actual initial conditions. Finally we simulate the process with the gains obtained with 32init = 0.3333/0.3333/0.3334, and the results are plotted in Figure 6. As the figure shows, at the beginning the prediction is very poor but convergence to actual compositions is obtained before the end of the startup

Ind. Eng. Chem. Res., Vol. 30,No. 8,1991 1875 used in the previous section. The advantages of using the reduced-order model can be illustrated by some examples. For a ternary 20-tray column the process matrix A is of size 44 X 44 for the full-order model. For the quasi-dynamic model using the upper 10 trays, the matrix A is 22 X 22. If the ternary batch distillation column has 40 trays the matrix A is 84 X 84 for the full-order model, but it is still 22 X 22 for the quasi-dynamic model (using the upper 10 trays). The disadvantage is that all the thermocouples needed for the observer have to be placed in that part of the column modeled. Results Time (hours)

“Q ‘

~ i m (hours) e

Figure 6. Distillate compositions actual and predicted for the example of the Design Procedure section (a= 9/3/1, Nt = 4,D = 40, HBo = 100, product purity = 95%, xhit = 0.45/0.25/0.30, .& = 0.3333/0.3333/0.3334).

period. In this run only products 1 and 3 are obtained. The separation is not good because the column has only four trays. Reduced-Order Model Usually the observer estimates all the state variables of the actual system. One disadvantage of the full-order observer is the increasing computational time needed and complexity as we increase the number of stages or components. One way to avoid this load is to use a reducedorder model. A reduced-order observer estimates only those state variables that are not measured. This is not always easily done, since sometimes the outputs are a combination of some state variables, in which m e we need to define a nonsingular transformation of the system (not unique) and solve for the unmeasurable states (Gelb, 1974). We studied both a full-order observer and an observer of reduced order but not in the sense previously mentioned. Here the model itself is replaced by using the quasi-dynamic model of Quintero-Marmol and Luyben (1990),in which only the upper part of the column is modeled. This model is based on the fact that after the startup period the composition profiles in the upper part of a batch distillation column behave as if the system were essentially binary. Therefore, knowing pressure and temperature on a tray allows us to determine its composition. Assuming equilibrium on that tray, we find the binary vapor that ‘feeds” the modeled part of the column above that thermocouple. Though the feed is binary the model is multicomponent with as many components as the actual mixture. The design procedure to obtain the gains of the observer in this reduced-order model is the same as that

All runs were made with constant tray and reflux drum holdup of 1 and 10 mol, respectively. The boilup rate was V = 100 mol/h. We assume that the process temperatures are available every 0.01 h (36s). The Euler method with a step size of 3.6 s (0.001h) was used to integrate the differential equations of the system. The parameters explored were the following: effect of initial conditions on convergence, relative volatilities, number of measurements, temperature measurements errors, number of components, product purities, number of trays, and initial charge to the reboiler. Figure 7a gives the reflux drum and reboiler compositions, actual and predicted for a ternary 20-tray column. Five temperature measurements were used, one in the and 20. The reboiler and the other four on trays 5,10,15, actual initial conditions were xinit= 0.25/0.65/0.15, and guessed initial conditions were = 0.3333f 0.3333/0.3334. We note that after 15 min the observer converges to the actual compositions. This is well before the withdrawal of the first product (Pl)starts. Figure 7b gives the same test as before but using three temperatures measurements (reboiler, tray 10,and tray 20). The response is slower, and the range of the oscillation bigger. In the reboiler the oscillations last almost 2 h. It is important not to limit the range of the oscillation in the observer. When we did, we could not converge to the actual solutions. Therefore, sometimes during the startup, for small periods of time, the estimated compositions can be negative or bigger than 1. Figure 7c shows compositionsin the reflux drum for the same test with the observer obtained using the reducedorder model (upper nine trays). The actual and guessed initial conditions were the same as before. Thermocouples were located on trays 14,17,and 20. The results are acceptable but not as good as the full-order model observer. Table I11 shows results for the run presented in Figure 7. Ideal results are those obtained when we know exactly and instantaneously compositions in the reflux drum. Estimated compositions are those predicted by the observer obtained by using the full-order model (OBS)or by the observer obtained using the quasi-dynamic model (OBS-QD).These estimated compositions are used to control the batch distillation, Le., start product and slop cut withdrawals. Actual compositions are those really obtained in the simulations. The amounts and compositions obtained with the estimators completely agree with those of the ideal model, even though our guessed initial compositionsare far from the true ones. From now on the results presented for the full-order observer were obtained by using the five-measurement model. Figure 8 illustrates the reflux drum compositions, actual and predicted, with (a) OBS model and (b) OBS-QD model, when xinit = 0.1/0.1/0.8 and = 0.05/0.05/0.90, but the gains were obtained at .finit= 0.3333f 0.3333f 0.3334. This test is very tough for the estimators since our state

1876 Ind. Eng. Chem. Res., Vol. 30, No. 8, 1991 a

9

0

I

2

3

4

5

6

Tunc (hours)

Tmc (hours) 08, 09r 0 8b

m

Time (hours)

Tme (hours)

Time (hours) . .

Figure 7. Compositions actual and predicted for (a) OBS model, five measurements;(b)OBS model, three measurements;(c) O B S g D model.

variables x1 and x p account for only 20% of the initial charge. As can be seen in Figure 8, the OBS-QD model is not quite suitable, though as the results presented in Table IV show, the major problem is only the longer duration of the batch (2.047 vs 1.668 h for the ideal model). Figure 9 shows the reflux drum compositions, actual and predicted, with (a) OBS model and (b) OBS-QD model, when the batch has very different relative volatilities and an initial amount charged to the reboiler from the ones for which the gains were calculated ( a = 9/3/1 and HBo= 300 versus a = 2.2511.511 and H B O = 120). The predictions are quite good. This is not always the case and cannot be generalized. It depends on the particular case, but as long as the range of eigenvalues in the linearized process matrix remains similar, it is possible to use the same set of gains. Table V presents the results obtained for this test. Table VI gives the actual amounts and compositions obtained when we have some thermocouple errors. For

the OBS model, temperature errors were located on trays 5 and 10; for the OBS-QD model, on trays 14 and 17. Table VI also shows results when assumed relative volatilities are in error, i.e., actual relative volatilities ( a = 91311)are different from those assumed in the observer (& = 8.1/2.85/1). The OBS model is better for both tests, though predictions of xpll for errors in a are not so good (0.91 versus 0.95). This illustrates the necessity of being careful in evaluating & in real situations (if & = 8.712.9511, ~ p l= l

0.935).

When these tests with measurement or relative volatility errors were made, we had to "turn off" the gains of the observer near the end of the batch because of stability problems. We think this is due to the fact that a t the end of the batch compositions on almost all the trays consist of only the heaviest component. Therefore there is no room to modify this flat profile to accommodate the temperature or relative volatility errors.

Ind. Eng. Chem. Res., Vol. 30,No. 8,1991 1877 50, He0 = 300, xut

Table 111. Results for the System a = 9/3/1, Nt = 20, Product Purity = 95%, xmt = 0.25/0.60/0.15, D 0.3333/0.3333/0.3334° OBS-5 0b5-3 ideal 31.250 0.9499 0.0498 0.0004 130.25 0.3404 0.6596 O.oo00 92.500 0.0106 0.9755 0.0139 0 46.000

P1

actual 31.900 0.9488 0.0508 0.0003 129.75 0.3373 0.6627 O.oo00 92.450 0.0104 0.9750 0.0146 0 45.900 O.oo00 0.0491 0.9509 5.411 28.802

O.oo00 0.0499 0.9501 5.404 28.752

actual 30.900 0.9475 0.0521 0.0004 131.10 0.3414 0.6586

est 30.900 0.9499 0.0491 0.0010 131.10 0.3428 0.6572

actual 33.700 0.9503 0.0494 0.0002 125.60 0.3336 0.6664

est 33.700 0.9499 0.0524

O.oo00

O.oo00

O.oo00

O.oo00

O.oo00

92.450 0.0106 0.9755 0.0139 0 45.900

92.050 0.0104 0.9753 0.0142 0 45.950

92.050 0.0106 0.9756 0.0137 0 45.950

96.350 0.0072 0.9701 0.0228 0 44.350

O.oo00

O.oo00

O.oo00

0.0497 0.9503

0.0495 0.9505 5.395 28.651

0.0499 0.9501

96.350 0.0111 0.9643 0.0246 0 44.350 O.oo00 0.0389 0.9611 5.469 29.218

Table IV. Results for the System a = 9/3/1, Nt = 20, Product Purity = 95%, xint= 0.1/0.1/0.8, D = 35, H g O = 300, x4-1. = 0.05/0.05/0.90 ~~

P2

ideal 17.045 0.9499 0.0457 0.0044 34.220 0.3840 0.5103 0.1057 0

s2

0

P3

248.735 0.0027 0.0473 0.9500 1.668 122.59

P1 XPll XPlZ xPl3

s1

XSll xs12 xs13

XPSl XPSZ

xm tF CAP

OBS-5 actual 17.430 0.9484 0.0475 0.0041 33.065 0.3860 0.5200 0.0940 0 0 249.505 0.0028 0.0480 0.9492 1.651 124.10

OBS-QD

est 31.900 0.9498 0.0498 0.0004 129.75 0.3386 0.6614

OBS-QD actual 21.245 0.9574 0.0422 0.0004 34.465 0.2732 0.5511 0.1757

0 0 244.290 0.0010 0.0414 0.9576 2.047 104.25

a

O.oo00 125.60 0.3347 0.6659

O.oo00 0.0499 0.9501

'V-TF-

0.8

;, ; ,'

,

-0.2

0

I

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Time OlOUrs)

Table V. Results for the System a = 2.25/1.5/1, Nt = 20, Product Purity = 95%. xIdt= 0.25/0.45/0.30, D = 20, Hgo = 120, Ximi, = 0.50/0.05/0.90 P1

ideal 8.100 0.9500 0.0499 0.0001 84.340 0.2644 0.6193 0.1163 0 0 27.560 0.0003 0.0496 0.9501 5.822 5.641

OBS-5 actual 8.520 0.9493 0.0506 0.0001 84.100 0.2604 0.6212 0.1184

0 0 27.380 0.0003 0.0487 0.9511 5.835 5.667

OBS-QD actual 7.640 0.9532 0.0467 0.0001 86.460 0.2627 0.6080 0.1293 0 0 25.900 0.0003 0.0414 0.9584 5.933 5.214

Comparing the estimators presented in this paper (OBS, OBS-QD) with those previously developed (QuinteroMarmol and Luyben, 1990), the following comments can be made: (a) the full-order observer (OBS)is the best estimator though it is the most complex to obtain, (b) the quasi-dynamic model (QD) is almost as good as the OBS model and the easiest to implement, (c) the observer obtained by using the quasi-dynamicmodel (OBS-QD) is not better than the QD model itself and is more complex, (d)

Time (hours)

Figure 8. Distillate compositions actual and predicted for (a) OBS model and (b) OBS-QD model.

the steady-state estimator (SS) is the least reliable. We recommend use of the QD model first and, if the predictions obtained are not satisfactory, the full-order observer (OBS) second. Conclusions A general methodology for the design of extended Luenberger observers to predict compositions in multicomponent batch distillation was developed. Two different observers were presented: one using the full-order model (OBS), the other taking the advantage of a reduced-order

1878 Ind. Eng. Chem. Res., Vol. 30, No. 8, 1991 Table VI. Effect of Temwrature and Model Errors in Estimated Compositions temp meast error - 1 O C temp meast error + 1 "C ideal OBS-5 actual OBS-QDactual OBS-5 actual OBS-QD actual 30.800 42.900 31.100 32.850 31.250 0.9545 0.9679 0.9360 0.9428 0.9499 0.0321 0.0452 0.0635 0.0569 0.0498 o.oo00 0.0003 0.0005 0.0003 0.0004 119.85 91.650 194.75 143.55 130.25 0.3667 0.3362 0.2356 0.3037 0.3404 0.6333 0.7644 0.6638 0.6963 0.6596 0.0000 0.000 0.0000 O.oo00 O.oo00 121.10 19.800 103.40 77.900 92.500 0.0220 0.0159 0.0004 0.0055 0.0106 0.9584 0.9774 0.9714 0.9757 0.9755 0.0196 0.0127 0.0222 0.0187 0.0139 0.000 0.000 10.000 0.000 0.000 o.oo00 0.0000 0.o00 0.0001 0.000 0.000 0.8080 0.0000 0.000 o.oo00 0.0000 0.1919 0.0000 0.0000 O.oo00 44.350 45.950 44.350 45.700 46.000 0.0000 0.0000 0.0000 0.0000 O.oo00 0.0389 0.0495 0.0390 0.0475 0.0499 0.9611 0.9505 0.9610 0.9525 0.9501 5.764 5.412 5.402 5.411 5.404 33.262 16.139 30.472 26.468 28.752 a

f:

Time (hours)

b

B

T i m (hours)

Figure 9. Distillate compositions with a = 2.25/1.5/1; (a) OBS model; (b) OBS+D model.

model (OBS-QD). Both appeared to be suitable for composition estimation. The OBS model performed consistently better than the OBS-QD model. When we had measurement or parameter errors, it was necessary to "turn off" the gains of the observer by the end of the batch. Although a batch distillation is an extremely dynamic process, one set of gains was shown to be enough for the entire process. Sometimes that set was good even if the relative volatilities and the initial charge to the reboiler were changed.

a error, ir = 8.1/2.85/1 OBS-5 actual OBS-QDactual 25.300 28.750 0.9097 0.9029 0.0960 0.0889 0.0011 0.0014 134.00 138.350 0.3584 0.3687 0.6313 0.6416 O.oo00 O.oo00 90.600 89.700 0.0113 0.0108 0.9825 0.9736 0.0156 0.0062 0.000 0.o00

O.oo00 O.oo00 O.oo00

O.oo00 O.oo00 O.oo00

45.750

47.550

O.oo00

O.oo00

0.0481 0.9519 5.276 27.987

0.0660 0.9340 5.252 28.860

Nomenclature A = matrix of the linearized process a, = elements of matrix A B = matrix of inputs of the linearized process b,, = vapor pressure constant i for component j ; elements of matrix B C = matrix of outputs of the linearized process c,, = elements of matrix C CAP = capacity factor (mol/h) D = distillate flow rate (mol/h) e = error between actual and estimated variables HB = still pot holdup (moles) HBo= initial charge to still pot (moles) HD = reflux drum holdup (moles) HI = tray liquid holdup (moles) K = matrix of gains k = order of the system k = elements of matrix K lhIJ= partial derivatives defined in Appendix B M = total number of measurements m, = stages where the thermocouples are placed N = number of stages (reboiler + trays + reflux drum) NC = number of components Nt = total number of trays OBS = observer obtained by using the full-order model OBS-QD = observer obtained by using the quasi-dynamic model P = pressure (atm) P, = amount of product i (moles) R = reflux flow rate (mol/h) Si = amount of slop cut i (moles) T = transpose T , = temperature on stage m (OF) tF = duration of batch cycle (h) u = vector of inputs V = vapor boilup (mol/h) x = state vector 2 = estimated state vector x = derivative vector of state variables x = derivative vector of estimated state variables xBJ= liquid mole fraction component j in still pot xD, = liquid mole fraction component j in reflux drum x I J = liquid mole fraction component j in tray i x,,,~ = initial state vector (all stages) f,,,, = initial estimated state vector (all stages) xp,, = composition of product i (mole fraction component j ) x,,, = composition of slop cut i (mole fraction component j )

yij = vapor mole fraction component j in tray i z = vector of outpub (measurements) a, = relative volatilities of component j (with respect to heavy component) S = observability matrix

Appendix A. Entries of Matrices A and C for a Linearized Binary Batch Distillation Column State vector: =

[xB,lxllx21~~~xN~l~Dl~T

where the first subindex is the stage number and the second is the component number. The trays are numbered from bottom to top. The reboiler is the stage B and the reflux drum the stage D. Note that the state variables include only the first component; the second is obtained from the requirement that mole fractions have to add up to one in every stage. The entries aij of process matrix A are defined as follows: stage 1 (reboiler): -R + v(1- KUB) a11 = HB

= R/HB

tray i:

(V/Hi)Kui-l ai+l,i+i= -(R + VKui)/Hi ai+l,i =

ai+l,i+2 =

R/Hi

stage N (reflux drum): a ~ j - 1=

(V / H D ) K U N ~

u N = ~

-V/ HD

The entries cij of matrix C are given by from i = 1 to i = M

xx = 1 + ( a - l)xm,l

&=I

where mi is the stage where the thermocouple is placed and

M = total number of measurements:

Appendix B. Entries of Matrices A and C for a Linearized Ternary Batch Distillation Column State vector: =

The entries cij of matrix C are from i = 1 to i = M

SUM[ In

(&)

- bz1] 2

[~B,l~llX21~~~XN,1XDl~B,~12~~~xNt,2~~21T

The entries ai, of matrix A are given by stage 1 (reboiler): -R V ( l - KUB,J1)

+

011

=

=

SUM[ In

HB

-R aN+l,N+l

Ci,mi+N

=

+ V ( l - KuB,22) HB

= R/HB aN+1,N+2 = R / H B = -(V/HB)KUB,~Z O12

SUM =

(&)

2

- b21]

NC

C~rkxi& k=l

Literature Cited Friedland, B. Control System Design. An Introduction to StateSpace Methods; McGraw-Hill: New York, 1986. Gelb, A. Applied Optimal Estimation, The M.I.T. Press: Cambridge, MA, 1974.

Ind. Eng. Chem. Res. 1991, 30,1880-1886

1880

Kautsky, J.; Nichols, N. K.; Van Dooren, P. Robust Pole Assignment in Linear State Feedback. Int. J . Control 1985, 41 (No. 5), 1129-1155. Luenberger, D. G. Observing the State of a Linear System. ZEEE Trans. Mil. Electron. 1964, MIL-8, 74-80. Luenberger, D. G. Observers for Multivariable Systems. IEEE Transactions Autom. Control 1966, AC-11 (No. 2), 190-197. Luenberger, D. G. An Introduction to Observers. ZEEE Trans. Autom. Control 1971, AC-IG(No. 6), 596-602. Luyben, W. L. Multicomponent Batch Distillation: Part I-Ternary Systems with Slop Recycle. Ind. Eng. Chem. Res. 1988, 27. 642-647.

Quintero-Marmol, E.; Luyben, W. L. Inferential Model-Based Control of Multicomponent Batch Distillation. Chem. Eng. Sci., in press. Yu, C. C., Luyben, W. L. Control of Multicomponent Distillation Columns Using Rigorous Composition Estimators. Distillation and Absorption 1987; Institute of Chemical Engineers Symposium Series No. 104; Institute of Chemical Engineers: London, 1987; A29. Heceiued f o r review August 17, 1990 Reuised manuscript received February 13, 1991 Accepted March 19, 1991

SEPARATIONS Recovery of Heterocyclic Amines from Dilute Aqueous Waste Streams Pradip K.Pahari and Man Mohan Sharma* Department of Chemical Technology, University of Bombay, Matunga, Bombay, 400 019, India

The adsorption of heterocyclic amines, such as morpholine, pyridine, picolines, quinoline, and isoquinoline from dilute aqueous streams, with or without electrolytes and a t different pH, on activated carbons and polymeric adsorbent (XAD-4, Rohm and Haas), was successfully accomplished using fixed bed systems. A mathematical model, based on external mass transfer and pore diffusion, is used for forecasting theoretical breakthrough profiles, which have been compared with experimental results and “by-best fit” comparison effective pore diffusion coefficient, has been found out for each adsorbate-adsorbent system. The loaded adsorbents were regenerated with an organic solvent (e.g., methanol) efficiently. The amines can be recovered by distillation from the eluted solution. Introduction The recovery of heterocyclic amines from dilute aqueous solutions has received some attention. Heterocyclic amines are harmful pollutants that are present in effluents of several major industries, e.g., coking plants, rubber and agrochemical industries, petrochemical plants, dye and resin industries, as well as many organochemical industries. Various treatment processes such as activated sludge process (Ceh and Chudoba, 1987; Cech and Chudoba, 1987; Gyunter et al., 1983) for morpholine, pyridine, and quinoline; activated carbon (Radeke, 1985; Nikolenko et al., 1986; Martin and Iwugo, 1982; Fox et al., 1988) for pyridine, picolines, and quinoline; cation-exchange resins (Kaczvinskyet al., 1983; Isaeva et al., 1977) and polymeric adsorbents (Deshmukh and Pangarkar, 1984; Stuber and Leenheer, 1983) for various amines have been reported in the literature. Activated sludge process is a widely used and inexpensive process, and it is particularly suited to wastewaters containing small amounts of organic solutes, typically below a few ppm. Cation exchange resins have a high capacity for amines (Isaeva et al., 1977), but in the presence of electrolytes (e.g., NaC1, Na2S04)they do not work well. It is reported in the literature that activated carbon loaded with pyridines, pyrazines, etc., is difficult to regenerate with organic solvents (Martin, 1980). Therefore, the choice of an adsorbent for a particular adsorbate is an important problem. The main object of this work was to recover heterocyclic amines (morpholine, pyridine, picolines, quinoline, and

isoquinoline) from dilute aqueous streams by adsorption with suitable adsorbents. It is known that different types of activated carbon can adsorb these amines from dilute aqueous streams. However, it is important to find whether activated carbons can reduce the concentration of dissolved amines to the acceptable levels specified by the statutory regulations. Further it is not known whether these activated carbons can be regenerated efficiently for reuse. In the present work an attempt has been made to find suitably activated carbons that not only have a high capacity for amines but also can be regenerated efficiently with inexpensive organic solvents for reuse. Although polymeric adsorbent is costly, the use of smaller diameter particles with high mass-transfer rates can significantly reduce the adsorbent volume (Wankat, 1987; Rota and Wankat, 1990). The results of activated carbons have been compared with a commercial polymeric adsorbent, and a systematic study of the recovery of heterocyclic amines (morpholine, pyridine, picolines, quinoline, and isoquinoline) from dilute aqueous streams has been done. The breakthrough profiles for the adsorption of heterocyclic amines on to activated carbons and polymeric adsorbent are predicted by a mass-transfer model based on external mass transfer and pore diffusion. The effect of certain variables, such as bed height, initial pollutant concentration, and pollutant solution flow rate was also studied for a number of pollutants. The effective pore diffusion coefficient for each adsorption system was predicted by means of a “best fit” comparison between experimental and theoretical results.

0888-588519112630- 1880$02.50/0 Q 1991 American

Chemical Society