Copyright © IFAC PRP 4 Automation, Ghent, Belgium 1980
ESTIMATION OF STATES IN A POLYMERIZATION REACTOR H. Schuler Institut fur Systemdynamik und Regelungstechnik, Unz"versz"tiit Stuttgart, Stuttgart, Federal Republz"c of Germany
Abstract. LUENBERGER observers and KALMAN-BUCY filters have been applied to estimate non-measurable states in a styrene polymerization reactor. The states of the nonlinear reactor model are: the temperature; the concentrations of the monomer and the initiator; and some characteristic numbers representing the chain length distribution of the produced polymer. The temperature and the refractive index of the reaction medium are used as measuring variables. Applying non-linear estimation techniques, it is possible to reconstruct the unknown state vector from these measurements. Simulation results are given for different cases. It is described how one may consider the Gel-Permeation-Chromatographic measurement of the distribution in the estimation. Keywords. Chemical variables control, Kalman filters, Nonlinear filtering, Observers, Polymerization reactors, State estimation. INTRODUCTION In order to supervise and control the of reaction products, one must know the important states of the production plant. In the case of polymerization reactors, these states are the temperature, the concentrations of species in the reactor and the chain length distribution (CLD) of the produced polymer. In spite of progress in polymer analytics, a measurement of the CLD cannot jet be performed continuously in time. Using a Gel-Permeation-Chromatograph (GPC) the analysis of a sample takes at least ten to twenty minutes. On the other hand the temperature and the refractive index are easily to measure; hence they are treated as continuous measuring variables. ~uality
The idea of state estimation is to reconstruct the states which are difficult to measure from measurements which are easily to obtain. State estimation technique are based on appropriate mathematical models of the process. Modelling of polymerization reactors have been done by a large number of researchers; for example, by Liu and Amundson (1961), Zeeman and Amundson (1965), Kenat, Kermode and Rosen (1967), Gilles and Knopp (1967),
Duerksen, Hamielec and Hodkins (1967), Ray (1972), Hui and Hamielec (1972), Gerrens (1976), and Jainsinghani and Ray (1977). These models can be used for the state estimation. Hyun, Grassley and Bankoff (1978) applied filtering techniques at a polymerization reactor in order to estimate the process drift. Jo and Bankoff (1976) estimated the states of an isothermal reactor from the viscosity and the refractive index. In this paper, the CLD in a non-isothermal reactor will be estimated from temperature and refractive index measurements. GPC-measurements will additionally be used to update the estimated CLD in discrete points of time. MODELLING Models of the non-isothermal CSTR in which a homogeneous free racical polymerization takes place are based on the assumption that: i) the radical species react very fast (quasi-steady-state-assumption); ii) the reaction constants are independent of the chain length n (Bodenstein's hypothe-
I.A.A.-AA
369
H. Schuler
370
sis); and iii) the reaction medium is perfectly mixed in the constant volume V. Then the enthalpy balance yields dT pCpV dt
(2) (3)
The CLD is described by the infinite set of balance equations of the inactive polymer chains (e.g. polystyrene) q(M ne -M) n
=
(10)
1,2,3,...
(4)
The reaction mechanism is expressed in terms of the reaction rates Rp, RMn, and RI. Assuming that: the monomer is consumed primarily in the propagation step; the gel-effect is disregarded; there is no important influence of the solvent on the mechanism; there are no mixing effects; and the density of the reaction medium and all other parameters are constant and independent of the states; then the following rate expressions are obtained: (5) (6)
P
i.e. the polymerization can be started thermally or by an initiator. The CLD can be calculated from the infinite number of equations (4). This infinite set is usually approximated by an expansion of Laguerre's orthogonal polynomials: -r J+oo Ll.. (r) ~ \ ( 11 ) a L c i ( t) ~ i=o with
r = n/a .
(12 )
A small number J
+ RMnV n
R
2 ksexp{-Es/RT} M
(1)
dM V dt
=
I;
+ 2f kdexp{-Ed/RT} I (-~hR)RpV
The material balances of the monomer M (e.g. styrene) and of the initiator I (e.g. AIBN) are
V ~ dt
dP 1
dt PCpq(Te-T) + kwFk(Tk-T) +
dM
The production rate of radical species P is 1
in the summation is often sufficient for a good approximation. Gilles and Knopp (1967) gave a range of order for the normalization parameter a. The Laguerre polynomials Li and the expansion coefficients ci are given by: (-r) II
Li(r)
(13)
liT
and i.
L (l.) 11--0 II
A (-1) II
(t) II
-----1l-1
(1 4)
lJ! a
..
Therein AlJ{t) are the time-dependent moments of distribution: A
(t)
=
II
L
n=1
n
lJ M (t)i n
II
= 0,1,2, •• (15)
The following equations can be derived for these moments: dA (t) lJ V -~d~f-
In these equations P denotes the total concentration of growing polymer and a the chain propagation probability: P = (RR/ktexp{-Et/RT})
o 5 ,
a
lJ = 0,1,2, •.
(16)
The moments of the distribution in the inlet are:
(8)
ex)
A
and
;';
q(Alle-A ll )+ ~ll V;
lJe
=
L n lJ
n=1
M
ne
(t)
(17 )
= k exp{-E /RT} M / p
p
The production terms
{kpexp{-Ep/RT} M + kfexp{-Ef/RT} M
~IJ =n~1nlJ
+ kfsexp{-Efs/RT} S
+ ktexp{-Et/RT} P
ex)
(9)
RMn
(18 )
can be calculated applying generating function techniques (Ray, 1972). The equations (16) are used alternatively
Estimation of States in a Polymerization Reactor
in the model instead of the equations (4). In most cases the interest ist not directed towards the entire CLO, but towards certain mean values which allow for a good judgement of the product quality. The following averages are commonly used: The number average chain length
mn = A1 /A 0
(19)
of the first SUbsystem are locally observable from the measurements (25) and (26), but not the states A~, u = 0,1,2 of the second subsystem. The equations (16) of the second system are asymptotically stable. The moments are therefore detectable from the measurements Y1 and Y2i that means that they tend towards their steady state values With the mean residence time V/q as the time constant.
the weight average chain length
mw = and
u
A /A
2
~he_polydispersity
= mw/mn -1
•
(21)
These mean values can be deduced from the first three moments Ao ' A1 and A2 • The mathematical model of the reactor is given by the equations (1) to (3), ( 5) to (1 0) and (1 6 ) to (1 8) for n = 0,1,2. Combining the states to a state vector ~ of dimension 6: ~
=
(T,M,I,A
o ,A 1 ,A 2 )
T
(22)
,
the model equations can be condensed in the state space form
.
x =
!
(~)
ESTIMATORS
(20)
1
+ v
x(t )
-
0
=
x
-0
( 23)
~
is the vector of the process noise. is the initial condition of the state ~, which cannot completely be measured. The measurement equations can be written formally as
371
The state vector x can be estimated from the measurements Y1' Y2 with the help of nonlinear estimation techniques. All estimators used have the same structure:
dx
dt = i(~) + K{~-~{~»
; !(O)= ~ (27)
Because of the non-observability of the states in the second subsystem from the measurements (Y1' Y2)' the estimator must be designed only for the observable first subsystem with the states T, M, I. The structure of the estimator is shown in Fig. 2. The estimators differ in the calculation of K. Nonlinear observers have been presented by Thau (1973) and Zeitz (1977, 1979). Zeitz determines K by a pole placement method:
~
~
= £(~)
+
W
;
~
=
T
(Y1'Y2)
(24)
where Y1 is the temperature and y the refractive index. The refractfve index is a function of the conversion; i.e., of the monomer concentration M; and of the temperature T. The temperature dependency of the refractive index can be compensated by the temperature measurement. Thus we can write instead of (24): (25)
In the design of Kalman Bucy filters K is determined such that the estimation converges with minimal variance to x.-If the statistical data of the noise processes y and ~ are given:
x
E{Yt}
Q; E {~t w
E{~t}
-T
T}
=
Q(t) <5 (t-T)
(29)
R ( t) <5 (t-
(
T )
30)
i.e. if v and ware white noise processes, the filter gain K then becomes:
(26) (31 )
K
w1 and w
2
are measurement noises.
The structure of the whole system is shown in the block diagram in Fig. 1. The entire system is divided into two sUbsystems. The states of the first sUbsystem are T, M and Ii the states of the other are the moments A~, u = 0,1,2. It can be seen from the block diagram that only the states
The covariance matrix P is determined by the Riccati-equation: dP dt
_ P
=
ai
a!.
i:J~ ~
oX X
--~ lA P + P(--~ \A)
ah
ah -I R- 1 (-=IA)T ax x ax x
P
T
+ Q
P(O) = P
o
(32)
372
H. Schuler
This design procedure is straightforward for observable systems independet of the dimension of ~. Q and Rare usually used as design variables. SIMULATION RESULTS The system equations have been simulated together with the estimator equations on a digital computer with a Runge-Kutta-method. The data of the free radical polymerization of styrene in a CSTR have been used. Interest has been focused upon the following cases: Polymerization Initiated Thermally; Temperature Measured; Conversion Estimated. For this case the model of Wittmer and collegues (1965) has been used. There is no initiator in the system, and the CLD is not considered. The conversion x is estimated only from temperature measurement with a nonlinear observer due to Zeitz (1977). Fig. 3 shows the convergence of the observer states to the simulated states of the plant. The system is capable of having limit cycle behaviour. In this case the estimator converges also to the values of the plant as is shown in Fig. 4. If modelling errors occur, the estimation becomes inexact. Fig. 5 shows the behaviour caused by an increase of the heat transfer coefficient of the plant. The estimator retains the original value of kw. Because of the increase of heat transfer in the plant, the limit cycle turns into a stable stationary state. The estimator follows the plant, but generates an incorrect estimation of the conversion x. Polymerization Initiated by an Initiator; Temperature Measured; M, I, A~ Estimated with an Observer. The thermal polymerization has been disregarded. From temperature measurements only,the concentrations of monomer and initiator are estimated, and additionally the moments AO ' A1' A2 of the distribution. These moments have been used to calculate the mean values mn, mw' u, as well as the orthogonal expansion of the CLD. In Fig. 6 one sees the convergence of the estimated states to those of the simulated plant states. The convergence of the CLD is plotted in Fig. 7 for different points of time.
state-dependent calculation derived from equ. (28) gave no satisfying results (Schuler, 1978). Polymerization Initiated by an Initiator; Temperature Measured; M, I, A~ Estimated with an Extended KalmanFilter. Fig. 8 shows the behaviour of the estimation obtained from an Extended Kalman filter of equations (27), (31) and (32). The figures show the responses of the states on a stepwise in.crease of the cooling temperature TK. All the figures show that the convergence of M is relatively slow. The speed of convergence can be influenced by choosing the eigenvalues s1, s2, s3 of equation (28), or by changing Q, R in equ. (32). However the estimation is then very sensitive to measurement noise (Guse, 1979). It is better to measure the refractive index, and from this measurement determine the monomer concentration M. Polymerization Initiated by an Initiator; Temperature and Refractive Index Measured; I, A~, ~=0,1,2 Estimated by an Extended Kalman Filter. Fig. 9 shows the behaviour of the states in this case. As M is measured, the estimation is therefore better than in the previous cases. Polymerization Initiated by an Initiator; Temperature Measured; Estimation with an Extended Kalman Filter; Consideration of GPC-Measurements. The second subsystem with its states A~, ~ = 0,1,2 is not observable from the measurement of the temperature, nor from the refractive index, nor from a combination of these . As the equations are stable, the states A~ are detectible. But the speed of convergence in this subsystem is determined by the mean residence time and cannot be influenced by the choise of K. Modelling errors in the second subsystem lead tQ divergence of the estimated values A . ~
The CLD is measurable in discrete points tK of time with GPC-measurement. This measurement is obtained after a time delay l A at the time tk = t K + lA. The block diagram of this measurement is shown in Fig. 10. In the estimation, this measurement YA can be considered via a second estimator of the following structure: A._.
The gains K in equation (27) have been held constant in this simulation. The
A #~ (t ') ~ K
=
A
~
( t ') K
+
Estimation of States in a Polymerization Reactor
A* ~ is the estimated moment after upd~ting
with the CLD-measurement y~; the optimal filter gain in the sampling time tK and ~ is the state transition matrix of the second (linear) subsystem. Fig. 11 shows the structure of the whole estimator. If the measurement is ideal; i.e., if there is no measurement noise in the GPC and if the whole CLD is measured, then the estimated ~~ is precisely the real ~ in the sampling times tK. In Fig. 1~ one sees the convergence of the weight average chain length row for this case, when both estimators are working. One can see that the consideration of the GPC-measurement improves the estimation of the CLD. If there are modelling errors in the second subsystem, the estimation (33) will help correct the diverging estimation. A good estimation of the CLD is produced between the sampling times by means of equ. (16). The more accurate the reactor model is the longer the time intervall between two successive GPC-analysis may be.
K is
CONCLUSIONS It has been shown that non-linear observer- and filter-algorithms can be used to reconstruct the unknown states in a polymerization reactor. A relatively simple reactor model was used in the simulations. The estimation has been inproved as more accurate the reactor model has been and as more measurements have been obtained from the process. The CLD is observable only from the direct measurement with the GPC. When considering the GPC measurement in the estimation one must use two independent filters due to the nature of the system structure. The estimation algorithms will be tested at a laboratory plant. During these tests more exact models will be used, in addition to estimation algorithms which require less realization effort. REFERENCES Duerksen, J.H., A.E. Hamielec, and J.W. Hodgins (1967). Polymer Reactors and ~blecular Weight Distribution-I Free Radical Polymerization in a Continuous Stirred Tank Reactor. AIChe J., 13, 1081-1086. Gerrens, H. (1976). Polymerization Reactors and Polyreactions. A
373
Review. Chemical Reaction Engineering. 4 th ISCRE, Heidelberg 1977 Survey Papers. Gilles, E.D., and K. Knopp (1967). Die Dynamik von RUhrkesselreaktoren bei Polymerisationsreaktionen, Teil 1 und 2. Regelungstechnik, 15, 199-203, 262-269. Guse-,-G. (1979). Studienarbeit Universitat Stuttgart (not published). Hui, A.W., and A.E. Hamielec (1972). Thermal Polymerization of Styrene at High conversions and Temperatures - An Experimental Study. J.Appl. Polymer Sci., ~, 749-769. Hyun, J.C., W.W. Graessley, and S.G. Bankoff (1976). Continuous Polymerization of Vinyl Acetate I Kinetic Modelling - II One-Line Estimation of Process Drift. Chem.Eng.Sci., ll, 945-952, 953958. Jainsinghani, R., and W.H. Ray (1977). On the Dynamic Behaviour of a Class of Homogeneous Continuous Stirred Tank Polymerization Reactors. Chem.Eng.Sci., ~, 811-825. Jo, J.H., and S.G. Bankoff (1976). Digital Monitoring and Estimation of Polymerization Reactors. AIChE-J., 22, 361-369. Kenat, T.A., R:J. Kermode, and S.L. Rosen (1967). Dynamics of a Continuous Stirred Tank Polymerization Reactor. I & EC Process Des. Developm., ~, 363-370. Liu, S.L., and N.R. Amundson (1961). Polymerization Reactor St~bility. Berichte Bunsenges. (Z.Elektrochemie), 65, 276-282. Ray, W.H. (1972). On the Mathematical Modelling of Polymerization Reactors. J.Macromol.Sci.-Revs. Macromol.Chem., C 8(1), 1-56. Schuler, H. (1978). An Observer for the Chain Length Distribution in Polymerization Reactors. 6 th International Congress of Chemical Equipment Design and Automation (CHISA'78), Praha, August 21-25, 1978, Paper K 4.3. Thau, F.E. (1973). Observing the State of Non-linear Dynamic Systems. Int.J.Control, 17, 471-479. Wittmer, P., T. Ankel, H.~errens, and H. Romeis (1965). Zurn dynamischen Verhalten von Polymerisationsreaktoren. Chem.lng.Techn., 37, 392-399. Zeeman, R.J., and N.R. Amundson (1965). Continuous Polymerization-Models - Polymeri~ation in Continuous Stirred Tank Reactors. Chem.Eng. Sci., 20, 331-661. Zeit~ (1977). Nichtlineare Beobachter fUr chemische Reaktoren. Fortschrittsberichte VDI-Zeitung Reihe 8, Nr. 27, DUsseldorf.
H. Schuler
374
Zeitz, M. (1979). Nichtlineare Beobachter. Regelungstechnik, ~, 241-272. NOTATION E F I J
K L M P Q
R
S T V a c f h i k m n
q
r s t u
v w x y
expectation activation energy surface area initiator concentration identity matrix number of expansion coefficients ( 11 ) estimator gain Laguerre's polynomial (13) monomer concentration concentration of inactive polymer chains covariance matrix (32) concentration of active polymer chains covariance matrix of process noise (29) universal gas constant covariance matrix of measurement noise (30) overall reaction rate solvent concentration temperature volume normalization parameter (12) specific heat expansion coefficient (14) efficiency factor of initiator nonlinear state equation (23) nonlinear measurement equation (24) reaction enthalpy index in the expansion (11) coefficient elementary reaction rate mean value chain length volumetric flow rate normalized chain length (12) complex frequency eigenvalue time polydispersLty (21) process noise (29) measurement noise (30) state vector (22) conversion measurement (24)
Subscript A d e f fs I i
analysis dissociation of initiator inlet transfer to monomer transfer to solvent initiator consumption summation index for the expansion
k
cooling number of eigenvalue polymer production chain length initial condition chain propagation monomer consumption constant pressure reaction production of radicals P1 thermal initiation transposition termination time weight heat transfer summation index for the moments
( 11 )
M n o p R s T t w ~
(1 5)
estimated value vektor ACKNOWLEDGEMENT This work was supported by the Deutsche Forschungsgemeinschaft. The author would like to thank Prof. E.D. Gilles for his constant interest. FIGURES
'"2''"1
)(0)
v1
T
V2
H
v3
Y, +
Y2
:J
t-------A,.a a A p T
chain propagation probability (9) moment (15) density time
I I
I
Fig. 1.
Structure of the reactor model
Estimation of States in a Polymerization Reactor
375
1.00
0.75
G A INK
...----+-...--f
I----+--M
0.50 T 0.25- -r-----.r---+----.------r-'--4~ tls
~ 100
kw
500:
1000
i
lS 0
I
I
:~o :-~----~-~ I
~ig.
2.
~J,(O)
100
Structure of the estimator.
5.
~ig.
.500
1500
1000
lis
Estimation error caused by a wrong heat transfer coefficient kw in the observer.
M,M
1.00
9
80
8
40
7
0
250 500 750 1000
0.25
M
o
t/s
J, j'10 3
T
M
250
soo
600
5.0
400
2.5
200 0 250 500 750
750
1000
lea 0
Mn mn
Estimation of the conversion x from the measurement of the temperature T; thermal polymerization.
600
u
1.0
Mw
r---'--====---
0.5
o
t Is
250 500 750 1000
Fig. 6.
250
SOO 7SO 1000
t/s
Estimation of M, I and m , n u from temperature T with an observer; initiated polymerization.
row,
Mn'1O s
M,.·10 S
',= 80 s
~.O
1.0
s.o
t2=120
5
1000
n
1.0
0
0.25
Us
1.5
mw
o
T
250 500 750 1000
u,u
900
300
o
t Is
tl s mw,ffiw
rig. 3.
t/s
ftfn.ffi n
7.5
0.10 100
250 500 7SO 1000
n
0
500
0.10 t, =640 s
t3=360s
100
250
500
750
1000 t Is 1.0
Fig. 4.
Estimation of limit cycle behaviour.
1.0 0
Fig. 7.
5CO
1000
n
0
500
1000
Estimation of the CLD.
n
H. Schuler
376
M,MA 7.5
M
7.0
T.f
M
6.5
~
'0
,
,
\000
, 2000
, 3000
. 6°1 5.5
1000
0
t/s
2000
3000
..
t
tls
'Mn,M n
),;·10)
3-
Fig. 10.
2-
Model of the GPC-measurement
350
1-
0
0
' 1060
, , , 2000
3'0 .. 300 0 3000 t/s
GAl N K
u,Q
--r-;ooo
450 0
2060' 30'00
:is0.50 0
10 0
2000
3000
tls
d)..
.Fig. 8.
q
,.
•
¥=y(?.~ e- A)l )+RM;I·M,J)+K)JYl-~~-r---4-- ~}4
Kalman filtering with temperature measurement; stepwise increase in cooling temperature T k .
A
A
A
-
~(O)
T,T
GA INK
T,T
120
Fig. 11. '10
Structure of the estimator with the consideration of the GPC-measurement.
100 ~
90
o
10 0
2000
3000
5.5 L.-..--r-~-~---' tls 0 1000 2000 3000 t Is
",.
~n,mn
,,i',0)
I
3
/'"
without the
~__mw measurement ---.
y"f\
-- -- -- ---- --- ---
350
55 O.
o
310
o
300L....-~-~-_-~
1000
2000
3000
0
t Is
\000
2000
3000
t/s
Mw·fflw 600
550 0.5 500
450
o
1000
2000
3000
t/s
1000
o.sO ' - - - - - - , . - _ - _ - - - . 0 ,COO 2000 3000 t/s
Fig. 12. fig. 9.
Kalman filtering; measurement of the temperature and the refractive index.
t/s
Estimation of the mean value mwwith and without the GPC-measurement YA.