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
Embed
An Extended Kalman Filtering Approach with a Criterion to set its Tuning Parameters. Application to a Catalytic Reactor
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
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
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:
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,
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:
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
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
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
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.
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