Top Banner
An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor. Giuseppe Leu I and Roberto Baratti * Dip. Ingegneria Chimica e Materiali Universita' degli Studi di Cagliari Piazza D' Armi I-09123 Cagliari Italy Email: [email protected] Keywords Observer, EKF, Covariance Matrices, Catalytic Reactor (I) Present address: EniChem S.p.A. C.P. 281, I-09100 Cagliari, Italy (*) Correspondence should be addressed to R. Baratti
28

An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

May 16, 2023

Download

Documents

Maurizio Virdis
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

An Extended Kalman Filtering Approachwith a Criterion to set its Tuning

Parameters. Application to a CatalyticReactor.

Giuseppe LeuI and Roberto Baratti*Dip. Ingegneria Chimica e Materiali

Universita' degli Studi di CagliariPiazza D' Armi

I-09123 CagliariItaly

Email: [email protected]

Keywords

Observer, EKF, Covariance Matrices, Catalytic Reactor

(I) Present address: EniChem S.p.A. C.P. 281, I-09100 Cagliari, Italy

(*) Correspondence should be addressed to R. Baratti

Page 2: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

Abstract

In this work, the problem of tuning Kalman filters is addressed. Such tuning usually

consists of finding the values of the model and measurements covariance matrices by trial

and error methods till satisfactory results have been obtained. Here, we propose a new

method to endow the model covariance matrix with physical meaning, enabling a more

systematic gain tuning procedure. Simulation examples for a simulated non isothermal

continuous reactor and for an experimental reactor where carbon monoxide oxidation takes

place are presented.

Page 3: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

1

1. Introduction

In most industrial processes the complete state vector can seldom be measured and the

number of outputs is much lower than the number of states. In addition, the process

measurements are often corrupted by significant experimental errors, and the process itself is

subject to random, unmodelled upsets. Thus, without some consideration of these problems in

the total control system design, the measurements used for feedback control will often be

inadequate for acceptable control system performance. At present, on-line measurements are

only feasible for certain simple fundamental properties, while more sophisticated analyses are

not available on-line because of lack of instrument robustness and the need for special sample

propagation. Moreover, time-delayed analysis is in some cases the most important obstacle to

on-line implementation.

A way to overcome this difficulty is to infer the states from secondary measurements

(typically, temperature) by means of a dynamic on-line estimator. In chemical engineering, the

Extended Kalman Filter (EKF) is by far the most widely used estimation technique (c.f.,

Dochain and Pauss, 1988; Dimitratos et al., 1989, 1991; Ellis et al., 1994; Baratti et al., 1993,

1995; Yang and Lee, 1997; Crowley and Choi, 1998). Once the observability of the linear

approximation of the plant has been established, the construction of the estimator is a

straightforward task. However, the implementation of the EKF is still a procedure which

requires a significant amount of testing and tuning, as the EKF technique lacks convergence

criteria and systematic gain tuning procedures. Specifically, the tuning of the entries of the filter

covariance matrices relies heavily on trial-and error to achieve maximum likelihood state

estimation in control and optimization.

Several studies, mainly aimed at improving estimation algorithms, have been reported in the

literature. A Kalman filter modified to follow the changes in input forcing functions and noise

statistics for target tracking where the acceleration inputs and the noise statistics are unknown

was proposed by Moghaddamjoo and Kirlin (1989). The application of an adaptive EKF, which

employs continuous-time process models for dynamics, observation and covariance propagation

in combination with discrete-time equations for measurement update and gain computation, to

estimate the time evolution of the reacting mixture composition in a polymerisation reactor was

discussed by Dimitratos et al. (1989, 1991). Viel et al. (1992) proposed an exponentially

converging observer for a distillation column based on the structural properties of the

observability. To account for deviation of the model from the ideal condition of orthogonality

between the innovations process and past observations to state the target position, a modified

Kalman filtering algorithm with mismatch function was reported by Haykin and Li (1994).

Ahmed and Radaideh (1994) proposed a modified extended Kalman filter in terms of the actual

state and estimated state as a function of time and the integral-squared error as a function of

noise intensity both for dynamics and measurement noise. Zhou and Luecke (1995) presented a

procedure using observations with linear process to develop estimates for the effective values of

the covariance matrices of the process model and of the measurement errors. Finally, it is worth

Page 4: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

2

mentioning the square-root algorithm which allows reliable computation of the state estimates

using, as far as possible, quantities obtained via orthogonal operations, discussed by Park and

Kailath (1995).

From the first papers on the EKF to the aforementioned studies, the EKF to be applied has

needed a significant set of experimental data and a time-consuming numerical minimization

procedure to tune the covariance matrices and to forewarn the divergence of the estimator. In

Baratti et al. (1993) it was shown that the implementation procedure is facilitated if the estimator

design is appropriately combined with knowledge, modeling, and experimental notions and

tools of the specific field of the plant. Along this line of thought, in this work we propose to

endow the model covariance matrix with physical meaning, enabling a more systematic gain

tuning procedure. The measurements covariance matrix is assessed either from the information

of the measurement instruments or from a standard test on the measured signals. As regards

modeling errors, it is assumed that: (I) the uncertainty arises from imprecision in a set of model

parameters, as determined from the physical knowledge of the particular plant; (II) the

erroneous model of the plant consists of the nominal model with a first-order Taylor series

expansion about the nominal parameters; and (III) the parameter errors are white noises with

zero mean, normal distribution with a constant covariance matrix that can be determined, and

possibly updated, from on-line data. From the perspective of the standard EKF technique, we

obtain a state-dependent varying covariance matrix with two parts, one state-dependent made of

the Jacobian of the plant model with respect to the model parameter errors, and one constant

related to the statistics of the parameter errors. While in the standard EKF approach estimator

tuning amounts to the "black-box" tuning of the entries of the error covariance, in the proposed

EKF approach the tuning amounts to the physically meaningful determination of the error

covariance of the modeling errors. As a by product, one also obtains an on-line modeling

assessment procedure, whose information can be used to verify or correct the plant modeling, a

possibility which is consistent with our unified framework for modeling and on-line estimation

problems.

The proposed method to estimate the process model and measurements covariances in an

EKF based observer was tested against a detailed model of a CSTR with by-pass, first and then

experimentally using the same experimental data obtained previously by Baratti et al. (1993).

2. Theory

For nonlinear systems described by ordinary differential equations the process model may

be formally described by:

x(t) = f(x ,u) + w (t) (1)

x(0) = x0 + w0 (2)

y(t) = h(x ,u) + v(t) (3)

Page 5: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

3

where eqs (1) and (2) represent the nonlinear system state equations, and eq. (3) the nonlinear

measuring device. The process noises w(t), v(t) as well as the initial error w0 are assumed to

have zero mean and unspecified distributions.

Unfortunately, for nonlinear systems the conditional probability distributions for the states

evolving in time are not Gaussian even when w(t), v(t) and w0 are assumed to have Gaussian

distributions. This means that an infinite number of moments are required to determine the

distribution and that the moments are coupled in increasing order; i.e. the first moment depends

on the second, the second on the third, etc. This structure of the statistics means that

approximations must be made in order to obtain a computationally feasible filter.

In order to obtain the EKF, two approximations are made: an approximate second-order

statistic (mean and covariance) and an error propagation built on a Taylor first-order expansion

about the current estimates. For the first approximation the process noises, w(t) and v(t), are

Gaussian and uncorrelated in time as well as uncorrelated with the initial states.

The equations governing the continuous-discrete Extended Kalman Filter are reported in the

following (c.f., Ray, 1981; Gelb, 1988).

Propagation

x = f x ,u (4)

P(t) = Fx(x ,u) P(t) + P(t) FxT(x ,u) + Q(t) (5)

with I.Cs

x 0 = x 0 and P 0 = P0

Update

x + = x - + K y t - h x - (6)

P + = I - K t H x - P - (7)

where (-) and (+) indicate the estimation just before and just after the update, and with gain

matrix K defined as:

K = P(-) HxT(x - ) Hx(x - ) P(t) Hx

T(x - ) + R- 1 (8)

where x is the estimated state vector, Q(t) is the covariance matrix of the process noise and R is

the covariance matrix of the measurement errors. The matrices Fx and Hx are the Jacobians

with respect to the state vector, evaluated in the estimated values:

Fx(x(t), u) = ∂f(x(t), u)

∂x(t) x(t) = x(-)

Page 6: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

4

Hx(x(-)) = ∂h(x(t))

∂x(t) x(t) = x(-)

As can be seen in eq. (6), the gain matrix K(t) corrects the model-based prediction using

the innovation error difference between the actual and the predicted measurements. It is worth

noting that the relative importance given to the model prediction and the actual measurement is

weighted by the error covariances Q and R, which are attributed to the model predictions and

measurements respectively.

Usually the error covariance matrices, Q and R, are regarded as tuning parameters, which

are evaluated through a trial-and-error procedure. We will call this procedure: standard EKF.

If we suppose that the errors in the hypothesis of perfect structural model are due only to

the experimental estimate of the parameters, the model-error description becomes:

x = f(x ,u,p) + Fp(x ,u) (p - p) + o(x ,u,p - p) (9)

where p is the experimental value of the parameters, p is the real unknown value of the

parameters, Fp is the Jacobian with respect to the parameters and o(x ,u,p - p) is the quadratic

and higher order terms in (p - p ), which we neglect. Thus the new additive error is given by:

w (x ,u,p - p) = Fp(x ,u) (p - p) (10)

The covariance matrix of the process noise, with these assumptions, becomes state and input-

dependent:

Q(x ,u,Qp) = Fp(x ,u) Qp F pT(x ,u) (11)

with Qp the experimental covariance matrix of the estimated parameters.

It is now necessary to evaluate Qp. The parameters are the solution of an unconstrained

minimum of some objective function φ(p, w) that depends on the data, in particular on the

measured values w of the random variables . At the minimum we have: ∂φ(p*,w)/∂p = 0, and

varying the data slightly ∂φ(p*+ δp*,w + δw )/∂p = 0. Expanding this equation in Taylor

series and retaining only terms up to first order:

∂2φ∂p2

δp*+ ∂2φ

∂p ∂w δw ≅ 0 (12)

so that approximately:

δp* = - H *- 1⋅∂2φ

∂p⋅ ∂w⋅δ w (13)

where H*= (∂2φ/∂p2)p = p * is the Hessian of the objective function with respect to the

parameters at the minimum.

Page 7: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

5

The covariance matrix is defined by Qp ≡ E(δp*⋅δ p*T) and inserting the eq. (13) :

Qp ≈ E H*- 1 ∂2φ

∂p⋅∂ w ∂w ∂w

T

∂2φ

∂p⋅∂ w

T

H*- 1(14)

The second order derivatives are evaluated at the minimum; hence they are constant and can be

taken outside the expectation sign and the covariance matrix of the data is Qw ≡ E δw ⋅ δwT

. If

we have many experiments and we assume that the covariance matrix of the data is independent

experiment by experiment, the covariance matrix of the parameters becomes:

Qp ≈ H*- 1⋅

∂2φ

∂p⋅∂ w µ Qwµ

∂2φ

∂p⋅∂ w µ

T

∑µ=1

N

H*- 1(15)

This formula applies to any objective function, whether or not it has a basis in statistics. For

objective functions like sums of squares and log-likelihood for normal distributions, we can

write:

H ≈ 2 BµT Bµ∑

µ=1

N(16)

where Bµ ≡ ∂fµ/∂p, M p ≡ φ p , ≡ ∂ /∂M, with M moment matrix of the residuals

µ = pµ - pµ . Inserting eq. (16) and ∂2φ/∂p ∂w µ ≈ -2 BµT in eq. (15) we have:

Qp ≈ BmT B m∑

m=1

N - 1 B m

T Qm B m∑m=1

N B m

T B m∑m=1

N - 1(17)

For single equation least-squares, assuming observations with standard deviation σ, we have

Bµ = ∂fµ/∂p , = 1 and Qµ = σ2 , so that eq. (17) reduces to:

Qp ≈ σ2⋅∂fµ

∂p⋅

∂fµ

∂p

T

∑µ=1

N - 1

. (18)

The covariance matrix R (1x1) of the measurement errors is evaluated from the

experiments carried out to characterize the process by this equation (c.f., Bard, 1974;

Moghaddamjoo and Kirlin, 1989) :

R = (ϕi - ϕ)⋅(ϕi - ϕ)T∑

i =1

N

N-1 (19)

where is the vector of the measured states and N is the number of the experiments performed

and ϕ = ϕi∑µ=1

N/N .

Page 8: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

6

Once the covariance matrix of the model parameters is computed, it is possible to derive the

covariance matrix of the model by using eq. (11), which, substituted in eq. (5), gives the

resulting Riccati equation:

P(t) = Fx (x ,u) P(t) + P(t) FxT(x ,u) + Fp(x ,u) Qp Fp

T(x ,u) (20)

The EKF so performed will be called a priori EKF.

3. Study Case

The a priori EKF was compared with the standard EKF, and their performances were

checked by comparison with the dynamic behavior of a reactor where a non isothermal reaction

takes place. In particular, two sets of experiments were carried out, the first simulated and the

second experimental.

3.1 Simulated case

In the first test case, the reactor was assumed to consist of a CSTR with 5% of by-pass on

the volumetric flow rate fed, see Figure 1, where a non isothermal reaction, described through

the Langmuir-Hinshelwood kinetic model, takes place, and assuming that the by-pass influences

only the concentration dynamics and not those of temperature.

The material and energy balances in dimensionless variables are:

dx1dt

= d1 d2 - x1 x2τc

- α x1 exp γ 1 - 1

x2

1 + σ x1 2(21)

dx2dt

= d3 bw + d2 bi - x2τT

+ β x1 exp γ 1 - 1

x2

1 + σ x12

(22)

where x1 = C / Cr is the dimensionless outlet reagent concentration, x2 = T / Tr is the

dimensionless reactor temperature and d1 = CiTi / CrTr, d2 = Ti / Tr and d3 = Tw / Tr are the

exogenous feed reagent concentration, inlet temperature and wall temperature, respectively.

The others variables are defined as follow:

α = K exp - ER Tr

, γ = ER Tr

, σ = Ka Cr , β = ω Cr αTr

, ω = -∆Hρ Cp

,

(23)

τc = Vq , τT = 1U S

ρ Cp V +

ρg Cpg qρ Cp V

, bw =

U Sρ Cp V

U Sρ Cp V

+ ρg Cpg qρ Cp V

, bi =

ρg Cpg qρ Cp V

U Sρ Cp V

+ ρg Cpg qρ Cp V

The dimensionless outlet concentration is given by:

Page 9: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

7

x1,u = ε x1,i + 1 - ε x1 (24)

The parameters of the detailed model used to simulate reality are reported in Table 1, first

column.

The proposed model to be used to develop the EKF is a CSTR and its material and energy

balances in dimensionless variables are:

dx1,u

dt =

d1 d2 - x1,u x2

τc -

α x1,u exp γ 1 - 1x2

1 + σ x1,u 2 (25)

dx2dt

= d3 bw + d2 bi - x2τT

+ β x1,u exp γ 1 - 1

x2

1 + σ x1,u2

(26)

The dynamic parameters in both models have the same expression but, in this case, the apparent

volume, Va, replaces the geometric volume, V.

The dynamic and kinetic parameters were evaluated following the same procedure used in

the previous work by Baratti et al. (1993). The concentration and temperature dynamic

parameters of the reactor were evaluated with a standard step response analysis, in the absence

of reaction, and the results obtained are reported in Table 1, second column. It is worth noting

that the dynamic parameters of the temperature are the same as reality; this is due to the fact that

the by-pass does not influence the temperature dynamics, as already mentioned, and for this

reason the global heat exchanger coefficient US is unchanged. The kinetic parameters, reported

in Table 1, second column, are evaluated through a fitting procedure of the experimental reaction

rates, obtained under isothermal (453, 463, 473 K), steady-state conditions for various values of

the reagent inlet concentration (0.008, 0.016, 0.04, 0.06, 0.08 mole fraction). It can be seen that

the activation energy, γ, and the absorption factor, σ, are about the same as those of reality , and

only the specific reaction rate, α, is different. This is because the residence time in the model is

shorter than in reality, so to achieve the same reaction rate a higher specific reaction rate is

necessary.

From the experiments carried out to characterize the reactor model, we can compute the

covariance matrices of the kinetic and concentration dynamic parameters. It is worth noting that,

in this case, the covariance matrix of the temperature dynamics is useless because of the lack of

influence of the by-pass.

3.2 Experimental case

The experimental data sets and the model are the same as those used in a previous work

(Baratti et al., 1993) where a detailed description of the equipment, schematized in Figure 2, and

how the model was derived can be found. Here, it is enough to say that the reactor was a

cylindrical chamber of 63 10-6 m3 within which a complex flow pattern was realized. About 14

catalyst pellets, 1.6 10-3 m in diameter and with porosity of 0.37 (commercial platinum catalyst,

Page 10: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

8

supported on alumina with a platinum load of 0.375 % on weight basis), were placed in a small

basket hanging at about half-way through.

The reactor was also equipped with an external cooling-heating jacket that allowed quite

accurate control of the reactor wall temperature. This was used as forcing function to track a

prescribed reference trajectory.

The carbon monoxide and oxygen flowrates were kept constant in time within a ± 2%

error; all the reaction experiments were carried out in excess of oxygen. The reactor was

supplied with a continuous nondispersive infrared (IR) carbon dioxide analyzer that provided

the on-line CO outlet concentration measurements to be used as comparison for the nonlinear

observers.

The parameter values of the model used, eqs (25) and (26), are reported in Table 2.

4. Results and Discussion

As mentioned in the above Section different experiments was used to derive the model

parameters in the two cases studied. In particular, step response analysis in absence of reaction

was used to estimate the concentration dynamic parameter (τc) and temperature dynamic

parameters (be, bw, τT), while isothermal steady state experiments at different inlet compositions

were used to estimate the kinetic parameters (α, σ, γ). Because of the method used to

characterize the model, the covariance matrix of the parameters has this structure:

Qp = Qk 0 00 QCd 00 0 QTd

(27)

where Qk, QCd and QTd are respectively the covariance matrices of the kinetic, concentration

dynamic and temperature dynamic parameters computed by means of eq. (18). The matrices Qk

and QTd are square with 3 rows and 3 columns; the matrix QCd is a scalar. The dependence of

the material and energy balances on the kinetic and dynamic parameters is shown by:

Fp =

∂f1

∂α∂f1

∂γ∂f1

∂σ∂f1

∂τC0 0 0

∂f2

∂α∂f2

∂γ∂f2

∂σ0

∂f2

∂τT

∂f2

∂bw

∂f2

∂bw

(28)

where f1 is the material and f2 is the energy balance.

4.1 Simulated case.

In the first case study, simulated reactor, since the covariance matrix of the temperature

dynamics parameters, QTd, is useless because of the lack of influence of the by-pass on the

reactor temperature, eqs (27) and (28) become respectively:

Page 11: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

9

Qp = Qk 00 QCd

(29)

Fp =

∂f1

∂α

∂f1

∂γ

∂f2

∂α

∂f2

∂γ

∂f1

∂σ

∂f1

∂τc

∂f2

∂σ0

(30)

The values for the experimental covariance matrix of the estimate parameters, QP, are reported in

Table 3. Moreover, we assumed that the errors in the temperature measurements are evaluated as

a pseudo-random number varying in the range ± 0.05K. The covariance matrix of the error

measurements for only one measured variable becomes a variance and its value is R = 3.91 10-9

for the dimensionless temperature.

The covariance matrices of the standard EKF were evaluated from the minimum least-

squares criterion (c.f., Baratti et al., 1993) where the minimization function is given by the

square of the error between the reagent outlet concentration values estimated by the EKF

algorithm and the experimental ones. In order to mimic real industrial situations, where

dynamics experiments are expensive, only a simple dynamic experiment was performed, whose

results are not reported here for sake of brevity. In particular, a step change in the wall

temperature (from 455 K to 470 K) was applied while the inlet reactant concentration was set

equal to 0.03 and kept constant throughout the entire simulations. The obtained values of the

covariance matrices, Q, reported in Table 4, first column, were kept constant for all the

experimental runs illustrated below.

In the first experiment, the reactor wall temperature (dashed line) was changed as shown in

Figure 3a, where the reactor temperature (continuous line) exceeds the range of values explored

in the steady-state experimental analysis (i.e. 453 < T < 473K), while the inlet reagent molar

fraction was set at 0.013 and kept constant through the entire simulation.

In order to illustrate the advantages of using an estimator, it is a good idea first to

investigate the performance of the model alone in the absence of measurements, which means

considering the model prediction as obtained by directly integrating the model equations, eqs

(25) and (26). The results obtained (continuous curve) are compared, in Figure 3b, with the real

ones (dotted curve) in terms of the ratio between the reactant mole fractions in the outlet and

inlet streams. It can be seen that the quantitative agreement is rather poor and justifies the need

for an estimator. In Figures 3c and 3d the performance of the standard and the a priori EKF

estimator is shown as a comparison between the predicted (continuous line) and real (dotted

line) outlet reactant mole fraction values respectively. From these Figures it is possible to note

that the agreement is quite good for both the EKFs developed. Moreover, the results obtained

with the two EKFs are almost identical, thus indicating the possibility that the structure of the

Page 12: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

10

model describes reality very well and that the errors are due only to the kinetic and dynamic

parameters.

In the second experiment, the inlet reagent mole fraction was set at 0.060 and, again, kept

constant throughout the entire simulation, while the reactor wall temperature (dashed line), see

Figure 4a, follows the same path described in the first experiment. Again the performance of the

model, Figure 4b, standard EKF, Figure 4c, and a priori EKF, Figure 4d, is examined. As

expected, only the two EKF estimators are able to follow quantitatively the behavior of the

simulated outlet reactant concentration, while the agreement of the model is rather poor.

It is worth stressing that the good results obtained with the a priori EKF are limited to the

case where the model errors are due only to the experimental estimate of the parameters.

4.2 Experimental case.

In the second case studied, a comparison between the standard EKF and the a priori EKF

was performed on the same experimental data sets used by Baratti et al. (1993). In this case the

model parameters covariance matrix is defined by eq. (27), since the covariance matrices of the

kinetic, concentration dynamic and temperature dynamic parameters are different from zero, i.e.

all the model parameters are not perfectly known. The values of the model covariance matrix,

QP, are reported in Table 5, while the values of the model covariance matrix, Q, the same as

those used by Baratti et al. (1993), are reported in Table 4.

In the first experiment the reactor wall temperature (dashed line) was changed as shown in

Figure 5a for an inlet CO mole fraction of 0.031. The results obtained (continuous line) for the

standard EKF, Figure 5b, and for the a priori EKF, Figure 5c, are compared with the

experimental values (dotted line) in terms of the ratio between the CO mole fractions in the

outlet and inlet streams. It can be seen that the a priori EKF behavior, although less accurate

then the standard EKF, is satisfactory.

The difference between the two observer behaviors occurs because the standard EKF can

eliminate not only the errors of the parameters but also those of the model structure and the

unmodelled ones, because the covariance matrices, R and Q, are seen as tuning parameters to

achieve the best performance of the filter. In contrast, the a priori EKF, developed under the

hypothesis of perfect structural model, only takes into account the model errors owing to the

imperfect knowledge of the model parameters. This indicates that the developed model does not

describe the dynamic behavior of the reactor perfectly because of the simplifications assumed. It

is worth noting that the model structure influences these modeling errors through the derivativeof the material and energy balance in the calculation of the covariance matrices, Q and Qp, see

eq. (28).

In the second experiment the reactor wall temperature (dashed line) was changed as shown

in Figure 6a for an inlet CO mole fraction of 0.056. In this case the reactor temperature

(continuous line) exceeds the range of the explored values in the steady state experimental

analysis (453-473 K). The performance of the two estimators is again examined. The results

Page 13: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

11

obtained show that both the standard EKF, Figure 6b, and the a priori EKF, Figure 6c, behave

similarly and that the larger deviations from the experimental behavior are attained where the

maximum temperature value is reached.

4.3 Robustness of the proposed method

One of the problems that could arise when implementing an estimator on-line is the

selection of the initial conditions to be assigned to the estimator algorithm. In fact, while the

actual concentration in the reactor could only be roughly estimated, the temperature is well

known since temperature measurements are available in real time.

In order to test the robustness of the proposed method, when errors in the estimate of the

initial reactor conditions are present, several runs were performed by changing the values of the

initial states, reactor temperature and concentration, for the simulated case. For all the tested

cases, both the estimators were able to recover the initial errors in a few minutes.

Here, for sake of brevity, the performance of the standard and a priori EKF is reported for

the case of no initial temperature errors and with an error equal to +/- 50% in the estimation of

the initial reactor concentration. In this experiment, the inlet reagent mole fraction was set at

0.060 and, again, kept constant throughout the entire simulation, while the reactor wall follows

the same path described in the first experiment (see Fig. 3a). The results obtained show that

both the a priori EKF, Figure 7a, and the standard EKF, Figure 7b, behave similarly and after 5

minutes are able to recover the initial errors.

5. Conclusions.

A procedure to estimate the process model and measurements covariance matrices in an

EKF based observer was developed and its performance evaluated through simulated and

experimental test cases. This procedure is based on the two following hypotheses: perfect

model structure, which means that the model errors are only due to the evaluation of the model

parameters, and Gaussian distributions of the errors.

In the standard EKF the covariance matrices, R and Q, are seen as tuning parameters to

achieve the best performance of the filter. To achieve this target it is necessary to carry out

dynamic experiments and a trial-and-error procedure has to be implemented. This method may

be time-consuming and expensive in industrial situations because of the dynamics experiments

necessary.

The improvement in the a priori EKF is that the covariance matrices, R and Q, are linked

to the knowledge, modeling and experimental skills of the specific process. In this proposed

method to develop an EKF, the tuning of the covariance matrices amounts to the physically

meaningful determination of the errors through the constant covariance matrices, determined by

the few experiments necessary to characterize the plant model, and through the Jacobian of the

plant model with respect to the parameters. The Jacobian represents the physically meaningful

Page 14: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

12

influence of the errors and the constant covariance matrices represent the probabilistic nature of

the tests. The experimental probabilistic part of the filter forces the theoretical plant modeling to

reproduce the real plant behavior step by step. In this way we obtain an on-line modeling

assessment procedure whose information can be used to verify or correct the plant modeling

during runs.

From the reported results it can be stated that with a simplified plant model, but based on

the description of the physicochemical phenomena involved and, therefore, representing the

functional dependence among the various physical variables concerned, the a priori EKF can

infer usefully the states of the process from the available measurements. In the case of an

imperfect model, as in the experimental case shown, the performance of the a priori EKF is

satisfactory, especially if we consider that it is achieved without dynamics experiments.

Finally, the proposed method presents an advantage with respect to the standard method

when applied in industrial life. This is because, the a priori EKF does not need any further

dynamic experiments, which are time consuming and expensive, to tune the covariance matrix.

Acknowledgement

We would like to thank Prof. Jesus Alvarez for his helpful discussion and suggestions.

Page 15: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

13

Notation.

bi inlet temperature gain constant

bw wall temperature gain constant

C concentration, mol m-3

Cr reference concentration (=1.053 mol m-3)

Cp specific heat capacity, kJ kg-1 K-1

E activation energy, kJ mol-1

f state transition vector

F Jacobian matrix of the state transition vector

h measurement function vector

H Jacobian matrix of the measurement function vector

k pre-exponential factor of the reaction rate constant, s-1

Ka adsorption constant, m3 mol-1

K Kalman filter gain matrix

I identity matrix

p parameters vector

P covariance matrix

q volumetric flow rate, m3 s-1

Q model error covariance matrix

R measurement error covariance matrix

R gas constant, J mol-1 K-1

S heat exchange surface area, m2

t time, s

T temperature, K

Tr reference temperature (=463 K)

U heat transfer coefficient, J m-2 s-1 K-1

u input vector

v measurement error vector

V reactor volume, m3

Va apparent reactor volume, m3

x state vector

y measurement vector

w process noises vector

Greek letters

α = k exp[ - E / (R Tr)], s-1

β = ω Cr α / Tr , s-1

γ dimensionless activation energy [ = E / (R Tr)]

Page 16: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

14

ε by-pass fraction

∆H reaction heat, J mol-1

ρ density, kg m-3

σ dimensionless adsorption constant, ( = Ka Cr)

τc concentration time constant, s

τT temperature time constant, s

ω = - ∆H / ρ Cp, K m3 mol-1

Subscripts

i reactor inlet

g gas state

p parameters vector

u reactor outlet

x states vector

w reactor wall

0 initial conditions

Page 17: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

15

References.

Ahmed, N.U. and Radaideh, S.M., 1994, Modified extended Kalman filtering, IEEE Trans.

Autom. Control, 39, pp 1322-1326.

Baratti, R., Alvarez, J. and Morbidelli, M., 1993, Design and experimental verification of a

nonlinear catalytic reactor estimator, Chem. Engng. Sci., 48, pp 2573-2585.

Baratti, R., Bertucco, A., Da Rold, A. and Morbidelli M., 1995, Development of a Composition

Estimator for Binary Distillation Columns. Application to a Pilot Plant, Chem. Engng. Sci., 50,

pp 1541-1550.

Bard, Y., 1974, Nonlinear Parameter Estimation, Academic Press, New York.

Crowley, T. J. and Choi, K. Y., 1998, Experimental Studies on Optimal Molecular Weight

Distribution Control in a Batch-free Radical Polymerization Process, Chem Engng. Sci., 53, pp

2769-2790.

Dimitratos, J., Georgakis, C., El-Aasser, M.S. and Klein, A., 1989, Dynamic modeling and state

estimation for emulsion copolymerization reactor, Comp. Chem. Engng., 13, pp 21-33.

Dimitratos, J., Georgakis, C., El-Aasser, M.S. and Klein, A., 1991, An experimental study of

adaptive Kalman filtering in emulsion copolymerization, Chem. Engng. Sci., 46, pp 3203-3218.

Dochain, D. and Pauss, A., 1988, On-line Estimation of a Microbial Specific Growth-rates: an

Illustrative Case Study, Can. J. Chem. Engng, 66, pp 626-631.

Ellis, M.,Taylot, T.W., and Jensem, K., 1994, On-line Molecular Weight Distribution

estimation and Control in a Batch polymerization, Am. Inst. Chem Engng. J., 40, pp 445.

Gelb, A., 1988, Applied Optimal Estimation, The M.I.T. Press, Cambridge.

Haykin, S. and Li, L., 1994, Modified Kalman filtering, IEEE Trans. Signal Process., 42, pp

1239-1242.

Moghaddamjoo, A. and Kirlin, R.L., 1989, Robust adaptive Kalman filtering with unknown

inputs, IEEE Trans. Acoust. Speech Signal Process, 37, pp 1166-1175.

Page 18: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

16

Park, P. and Kailath, T., 1995, New square-root algorithms for Kalman filtering, IEEE Trans.

Autom. Control, 40, pp 895-899.

Ray, W.H., 1981, Advanced Process Control, McGraw-Hill, New York.

Viel, F., Bossanne, D., Busvelle, E., Deza, F. and Gauthier, J.P., 1992, A new methodology to

design extended Kalman filters: application to distillation columns, Proceedings of the 31st

IEEE Conference on Decision and Control, Tucson, AZ, USA, 16-18 Dec., 3, pp 2594-2592.

Yang, D. R and Lee K. S., 1997, Monitoring of a Distillation Column Using Modified

Extended Kalman Filter and a Reduced Order Model, Comp. Chem. Engng., 21, pp S565-

S570.

Zhou, J. and Luecke, R.H., 1995, Estimation of the covariances of the process noise and

measurement noise for a linear discrete dynamic system, Comp. Chem. Engng., 19, pp 187-195.

Page 19: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

Tables

Table 1: Model parameter values for the simulated case.

Reality Simulated

τc, s 42.1 41.44

τT, s 187.5 187.5

bw 0.9375 0.9375

bi 0.0625 0.0625

ρ Cp, J K-1 m-3 60000 57915.06

US, J K-1 s-1 0.024 0.024

V, m3 80 10-6 82.88 10-6

α, s-1 0.01484 0.02241

γ 20.0 19.97

σ 3.0 2.977

Table 2: Model parameter values for the experimental case.

τc, s 26

τT, s 125

bw 0.934

bi 0.066

ρ Cp, J K-1 m-3 59200

US, J K-1 s-1 0.0238

Va, m3 54 10-6

α, s-1 1.2 106

γ 16.72

σ 2.993

Table 3: Simulated case: covariance matrix, Qp.

0.0876 -21.0738 8.597 0.0

-21.0738 80505.54 -222.8 0.0

8.597 -222.8 995.36 0.0

0.0 0.0 0.0 0.29

Page 20: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

Table 4: Covariance matrices

Simulated Experimental

q11 6.76 10-2 0.115

q12 -7.96 10-4 0

q22 8.5 10-6 0.91 10-5

Table 5: Experimental case: parameters covariance matrix, Qp.

0.171 5.997 5.326 0.0 0.0 0.0 0.0

5.997 1775.571 197.41 0.0 0.0 0.0 0.0

5.326 197.41 168.473 0.0 0.0 0.0 0.0

0.0 0.0 0.0 1.147 0.0 0.0 0.0

0.0 0.0 0.0 0.0 72736.88 18.028 -23.474

0.0 0.0 0.0 0.0 18.028 1.028 -1.689

0.0 0.0 0.0 0.0 -23.474 -1.689 2.778

Page 21: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

Captions for Figures

Figure 1.

CSTR reactor for the simulated case: (a) reality; (b) modeled.

Figure 2.

Sketch of the experimental apparatus.

Figure 3.

Analysis of the observer performance, simulated case (inlet CO mole fraction equal to 0.013):

(a) enforced wall temperature (dashed line) and reactor temperature (continuous line) as a

function of time; (b) comparison between experimental (dotted line) and (b) model process; (c)

standard EKF; (d) a priori EKF estimated values of the reactor outlet reagent concentration.

Figure 4.

Analysis of the observer performance, simulated case (inlet CO mole fraction equal to 0.060):

caption as Figure 2.

Figure 5.

Analysis of the observer performance, experimental case (inlet CO mole fraction equal to

0.031): (a) enforced wall temperature (dashed line) and reactor temperature (continuous line) as

a function of time; comparison between experimental (dotted line) and (b) standard EKF; (c) a

priori EKF estimated values of the reactor outlet reagent concentration.

Figure 6.

Analysis of the observer performance, experimental case (inlet CO mole fraction equal to

0.056): caption as Figure 4.

Figure 7.

Analysis of the observer performance, error in the initial reactor concentration (experimental

conditions as in Figure 3): a) a priori EKF; b) standard EKF.

Page 22: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

YT

Yi

Ti

Yi

T

Yu

T

V VaYi

Ti

Yu

T

(a) (b)

Roberto Baratti
Fig 1
Page 23: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

63 45

1 - 2 THERMOCOUPLES3 COOLANT INLET4 GAS INLET5 GAS OUTLET6 COOLANT OUTLET

1

2

REACTOR

N2

CO

O2

IRANALYZER

Roberto Baratti
Fig 2
Page 24: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

450

460

470

480

490

500

Tem

pera

ture

, K

(a)

0.5

0.6

0.7

0.8

0.9

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(b)

0 50 100 150 200

Time, min

0.5

0.6

0.7

0.8

0.9

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(c)

0 50 100 150 200

Time, min

0.5

0.6

0.7

0.8

0.9

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(d)

Roberto Baratti
Fig 3
Page 25: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

450

460

470

480

490

500

Tem

pera

ture

, K

(a)

0.9

0.92

0.94

0.96

0.98

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(b)

0 50 100 150 200

Time, min

0.9

0.92

0.94

0.96

0.98

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(c)

0 50 100 150 200

Time, min

0.9

0.92

0.94

0.96

0.98

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(d)

Roberto Baratti
Fig 4
Page 26: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

0 2 4 6 8 10 12 14

Time, min

0.7

0.8

0.9

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(c)

0.7

0.8

0.9

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(b)

440

460

480

Tem

pera

ture

, K

(a)

Roberto Baratti
Fig 5
Page 27: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

0 5 10 15 20 25 30

Time, min

0.7

0.8

0.9

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(c)

0.7

0.8

0.9

1.0

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(b)

460

480

500

Tem

pera

ture

, K (a)

Roberto Baratti
Fig 6
Page 28: An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor

0.0 0.5 1.0 1.5 2.0 2.5 3.0

Time, min

0.5

1.0

1.5

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(b)

0.5

1.0

1.5

Mol

e Fr

actio

n R

atio

, Yu/Y

i

(a)

Roberto Baratti
Fig 7