16th European Symposium on Computer Aided Process Engineering and 9th International Symposium on Process Systems Engineering W. Marquardt, C. Pantelides (Editors) © 2006 Published by Elsevier B.V.
Methods of State Estimation for Particulate Processes M. Mangold,^ C. Steyer,^ B. Niemann,^ A. Voigt,^ K. Sundmacher ^'^ ^Max-Planck-Institutfur Dynamik komplexer technischer Systeme, Sandtorstr. 1, 39106 Magdeburg, Germany ^Otto-von-Guericke- Universitdt, Lehrstuhlfur Systemverfahrenstechnik, Universitdtsplatz 2, 39106 Magdeburg, Germany Abstract Determining property distributions of particles online by measurement is difficult in many cases, especially if the particles are in the nanometre range. An alternative may be state estimation techniques, which use information from process simulations in addition to the measurement signals. Two examples of state estimators for particulate processes are presented in this contribution. The first one is an extended Kalman filter based on a population balance model. The second one is a bootstrap filter based on a Monte Carlo simulation. Keywords: particulate processes; state estimation; population balance; extended Kalman filter; bootstrap filter 1. Introduction A large amount of chemical products are generated in the form of particles. Very often, property distributions have a strong influence on the product quality. Therefore, online information on a property distribution like the particle size is desirable. However, it may be difficult to obtain such information directly from measurements, especially if the particles are very small, i.e. in the nanometre range. State estimator techniques may be a solution to this problem. A state estimator consists of a simulator part containing a process model and of a corrector part, which uses the measurement information to let the estimated state converge towards the actual state. As an example, a state estimator using a population balance model of a bulk precipitation process is presented in Section 2. After discussing the question of observability for this system, an extended Kalman filter is designed based on the population balance model. As an alternative to population balance models, Monte Carlo simulations are gaining increasing attention in the field of particulate processes. In order to incorporate a Monte Carlo simulation model into a state estimation framework, suitable correction techniques are required. Such techniques have been developed over the last years (Doucet et al., 2001). An example is the state estimator for a micro emulsion process discussed in Section 3. 2. Population Balance Model of a Bulk Precipitation Process The precipitation of nanoparticles in a batch process is considered in the following. Only the key features of the model are presented here. For details on the derivation of a population balance model, see e.g. (Oncul et al., 2006) and references therein. In the liquid phase, two components A and B react to a component C that forms solid particles. In the model, the liquid phase is assumed to be perfectly mixed. The
1191
M Mangold et al
1192
nucleation and growth of the particles is described by a one-dimensional population balance model, where the particle size is used as the property coordinate. Further model assumptions are isothermal conditions and negligible agglomeration and breakage. 2.1. Model Equations The mass balances of the liquid phase read dc
-
k^C^Cg
(1)
dt dCr dt
= ^VCACB - CG
\(^IG{CC,dp
)fddp - C^^^c^,
(2)
dp=dp.
where C/ denotes the molar concentration of component /, r{cA,CB) is the rate of the liquid phase reaction; / is the number density function of the particles; dpo and dp^rnax are the minimum and the maximum particle size, respectively; G is the particle growth rate, and CG , Cnuc J K are constant factors. A population balance for the particles of component C leads to the following equation for the number density function/
f =- ^ ^ ^ ^ ^ ^ ;
G{c,,dpMd..,t)
= B{c^
(3)
The following expressions are used for the growth rate G and the nucleation rate B: ( G{cc,dp) = k^ ^c-^^expl -11 (4) ydp J
B{cc) = k„
f r ^^ ^C
^C,c
exp
\^dpQ J J
(5)
(^G, l^nuc, b, C2, and c^^^ are constant parameters). It is assumed that the total number of particles is measurable, i.e. the following relation holds for the measurement variable y: **r,max
y =
\fddp
(6)
dp=dp
2.2. Investigation of Observability A system is observable, if it is possible to reconstruct its complete initial state from measurements taken over a finite time interval; see e.g. (Levine, 1996). Observability is a necessary condition for successful state estimation. A strict proof of observability is very difficult for a nonlinear distributed system. In the following, some preliminary results on the observability of the bulk precipitation model Eq. (l)-(6) will be given. If the system is observable, it must be possible to solve the equations for y, dy/dt, (fy/d^,... uniquely for the system states (Zeitz, 1977; RothfuB and Zeitz, 1995). From Eq. (6) and(3) one obtains for f\dp^^^ J)=0:
f=.fc)
(7)
Methods of State Estimation for Particulate
1193
Processes
Eq. (7) can be solved uniquely for cc, i.e. CQ is observable. Assuming for the moment that the integral in Eq. (2), which is denoted as I(t) in the following, is known, algebraic equations for CA and CB can be derived from Eq. (1) and (2):
do c, = Cgk^
dt
- + I + C^
(8)
f^^C n
dcc + I + C„^c, - c , dt
( A^
d'cr
dl
dr
dt
+ C„
dt (9)
Jdc, V dt
+ J + C„^^c^ = 0
Eq. (8) and (9) can be solved at least locally for Q and CB . This means that CA and CB are observable if it is possible to reconstruct / and / from measurements. In order to prove observability of the number density function / one has to show that / can be determined uniquely from the equations for j^, cfy/dt^, (fy/dt^,..., which have not been used yet in the observability analysis. By deriving Eq. (6) with respect to time, inserting the balance equations (l)-(3), and dissmmng f\dp ^^^j)=
0 , one obtains expressions
of the form \Pifddp =F.{y,dy/dt,...,dy/dt\c^,Cs,Cc\
with PQ =l;P2 = d^Gip.
i = 0,2,3,...
(10)
= 3p._i IddpG (/ > 3).
In order to be able to reconstruct/from the projections Eq. (10), the functions/>/ should form a complete set of basis functions. By developing G into a Taylor polynomial in dp and evaluating the expressions for pi, it is possible to see that the left-hand side of (10) contains arbitrary powers of dp, if G depends at least quadratically on dp, as it is the case for the model used here. This is a necessary condition that the model of the bulk precipitation process is observable. A further hint that the system is observable is the (numerically evaluated) full rank of the observability matrix of the linearised version of the discretised system. 2.3. Extended Kalman Filter For the numerical solution of the bulk precipitation model, the population balance (3) is discretised along the property coordinate dp, using a finite volume method. Based on the discretised model, a continuous-discrete extended Kalman filter with a continuous simulator part and time discrete filter update part is developed. The design equations for such a filter are well-known, see e.g. (Gelb, 1974), and are not listed here. The spectral density matrix of the process noise Q and the covariance matrix of the measurement noise R are chosen as diagonal matrices with entries on the main diagonal only. The filter is tested in simulations. Virtual measurement data are used, which are generated by adding normal distributed artificial noise to the simulation results of the bulk precipitation model. A time interval of 1 s between two measurements is assumed. A simulation result is shown in Fig. 1. The initial concentrations of ^ and B are chosen intentionally 5 % too high in the filter model. If the filter update is deactivated
1194
M Mangold et al.
(diagrams in the left column), then this small error in the initial conditions causes the estimated number density function to deviate considerably from the number density ftmction of the real system. If the filter update is active (diagrams in the right column), then the estimated particle size distribution converges rapidly towards the particle size distribution of the real system.
without filter correction •
with Kalman filter
estimate L measurement |.
^ 0.8
0)
E 3 c o ^
E 0.6 ^0.4
CO
_cg o
20
40 timet/s
60
^0
20
40 timet/s
60
with Kalman filter
without filter correction
— —
o 4
real value estimate |.
^-—__18s
a 2 F. 1- E
10"" 10" particle size d / m
10
So E10
_-36s 54s K Nv/\rs70s 18s^ 10"° 10"' particle size d / m
10"'
Figure 1. Test of the extended Kalman filter for the bulk precipitation process in simulations; lefthand side column: comparison of reference states and estimated states, if no filter update is used (pure simulation); right-hand side column: estimates of the extended Kalman filter and comparison with reference states; top row: estimated and reference measurement value; bottom row: estimated and reference particle size distribution.
3. Monte Carlo Simulation of a Micro Emulsion Process Models of particulate processes become computationally expensive, if several property coordinates have to be taken into account. In such a case, the use of stochastic Monte Carlo simulation approaches may be advantageous. Therefore, it seems worthwhile studying the application of Monte Carlo simulations to state estimation problems. As an example, the BaS04 precipitation in micro emulsion is considered in the following, where two reactants BaCb and K2SO4 dissolved in aqueous droplets react to BaS04. A Monte Carlo model of the process was presented in (Adityawarman et al. 2005). Its main features are summarized in Section 3.1. In order to use such a model in a state estimation framework, suitable filter correction techniques are required. Various
Methods of State Estimation for Particulate Processes
1195
recursive Bayesian state estimation techniques have been developed over the last decade (Doucet et al., 2001), but -with few exceptions (Goffaux and Vande Wouver, 2005)have hardly been used in chemical engineering applications. The concept of these methods is illustrated by a bootstrap filter for the micro emulsion process in Section 3.2. 3.L Model Description The Monte Carlo simulation is initialised with a given number of droplets. The droplets are filled with one of the two reactants BaCl2 (component A) or K2SO4 (component E). The droplet coalescence and redispersion are the basic steps of the Monte Carlo simulation. For a coalescence event, a pair of droplets is randomly chosen and mixed. A and B in the droplets are assumed to react instantaneously to BaS04. The number of BaS04 molecules present in the droplet is compared to critical value X^uci related to supersaturation. If the number of BaS04 molecules exceeds Xnuch a particle nucleation can occur, depending on a rate coefficient for such an event. In the redispersion step, the remaining liquid reactants are distributed randomly back into two identical droplets. The particle is put randomly into just one of the droplets. If a particle is already present in one of the droplets then all dissolved BaS04 will be used to let that particle grow. As in the previous example, it is assumed that only the total number of particles is measurable. 3.2. Bootstrap Filter The basic idea of recursive Bayesian estimation is as follows (Doucet et al. 2001, Gordon et al., 1993). One starts from the model description X, = f ( x , _ l , ^ , _ l )
(11)
y = h(x,,vj,
(12)
where x is the state vector, y is the measurement vector, co is the process noise, and v is the measurement noise (in the example of the micro emulsion process, f is given implicitly and evaluated by Monte Carlo simulation). The initial probability density distribution (PDF) of the state vector /?(xo) is assumed to be known. The PDF at a later time t can then be predicted from the previous estimate of the state vector Xt.i and past measurements according to:
p{^, I y,-i) = \p{^, I \-x )p{^,-i I y 1.-1 )^r-i
(13)
When a new measurement j ^ becomes available, the predicted PDF can be updated using the Bayes rule:
/
p\^t
.
N
p{yt\\)p{^t\yv,-x)
I y 1:^) - T ^ — \ — ^ 7 — ]
r ^
(14)
lp{yt\^t)p{^t\yi.t-i)d^t The evaluation of the high-dimensional integrals in Eq. (8) and (9) is very difficult in practice. However, Gordon et al. (1993) proposed a simple sequential Monte Carlo algorithm for an approximate solution, the so-called bootstrap filter. To test the bootstrap filter for the micro emulsion example, it is assumed that the initial ratio between the amount of ^ and the amount of B is non-stoichiometric and unknown. The filter is tested with virtual measurement data obtained by adding noise to the result of a previous Monte Carlo simulation. The initial conditions of the N samples used by the filter differ in the A/B ratio that goes from 0 to 0.5. Figure 2 shows the state of the filter after 10 measurement intervals and update step. From Figure 2 (a) it can be seen that after a few time steps most of the samples group rapidly around the reference A-to-B
1196
M Mangold et al
ratio of 0.4. Figure 2 (b) shows the estimated particle size distribution at time step 20 which agrees well with the reference size distribution. S 0.2 40 estimate reference
.-^0.15
30 Q. CD
(D •D
S20 E
n
0
E
!^B
10
I 0.05 "co E
^0
0.1 0.2 0.3 0.4 initial A-to-B ratio in droplets
0.1
0.5
A
L
1 2 particle diameter / nm
Figure 2. Bootstrap filter for a microemulsion process; (a) distribution of the samples at different time steps; (b) comparison between reference size distribution and estimate at time step 20.
4. Conclusions State estimation techniques or model based measurements may be a useful tool for the process operation of particulate processes. They can serve as software sensors in cases where a direct measurement of property distributions is difficult or not possible, e.g. due to a small particle size. If population balance models of moderate complexity are available, classical observer design methods can be used to set up a state estimator, as was illustrated in Section 2. However, the solution of population balance models in real time may be difficult, especially for models with several property coordinates. In such a case, Monte Carlo simulations may be used as a viable alternative. The use of Monte Carlo simulations for state estimation requires appropriate filter correction techniques. The results of Section 3 indicate that recursive Bayesian filter techniques are a promising approach to this problem.
References D. Adityawarman, A. Voigt, P. Veit, K. Sundmacher, 2005, Precipitation of BaS04 nanoparticles in a non-ionic microemulsion: Identification of suitable control parameters, Chem. Engng. Sci., 60, 3371-3383. A. Doucet et al. (eds.), 2001, Sequential Monte Carlo Methods in Practice, Springer. A. Gelb (ed.), 1974, Applied Optimal Estimation, MIT Press, Cambridge. G. Goffaux, A. Vande Wouver, 2005, Bioprocess State Estimation: Some Classical and Less Classical Approaches, In: T. Meurer, K. Graichen, E.D. Gilles (eds.). Control and Observer Design for Finite and Infinite Dimensional Systems, Springer, Berlin, 111-130. N.J. Gordon, D. J. Salmon, A.F.M. Smith, 1993, Novel approach to nonlinear / non-Gaussian Bayesian state estimation, lEE Proceedings-F, 140:107-113. W.S. Levine (ed.), 1996, The Control Handbook, CRC Press, Boca Raton. A. Onciil, K. Sundmacher, A. Seidel-Morgenstem, D. Thevenin, 2006, Numerical and analytical investigation of barium sulphate crystallization, Chem. Eng. Sci., 61, 652-664. R. RothfuB and M. Zeitz, 1995, Einfuhnmg in die Analyse nichtlinearer Systeme, In: S. Engell (ed.), Entwurf nichtlinearer Regelungen, Oldenbourg, 3-22. M. Zeitz, 1977, Nichtlineare Beobachter fur chemische Reaktoren, VDI-Verlag, Dtisseldorf