Professional Documents
Culture Documents
a r t i c l e i n f o a b s t r a c t
Article history: Nonlinear estimation techniques play an important role in process monitoring since some states and
Received 7 May 2008 most of the parameters cannot be directly measured. This paper investigates the use of several esti-
Received in revised form mation algorithms such as linearized Kalman lter (LKF), extended Kalman lter (EKF), unscented Kal-
18 July 2008
man lter (UKF) and moving horizon estimation (MHE) for nonlinear systems with special emphasis on
Accepted 29 July 2008
UKF as it is a relatively new technique. Detailed case studies show that UKF has advantages over EKF for
highly nonlinear unconstrained estimation problems while MHE performs better for systems with
Keywords:
constraints.
Nonlinear estimation
Unscented Kalman lter 2008 Elsevier Ltd. All rights reserved.
1. Introduction mildly nonlinear systems and UKF outperforms EKF for strongly
nonlinear systems when measurement noise levels are relatively
One important aspect of process safety is detection of abnormal high. However, both EKF and UKF may have limitations for con-
operating conditions. A common process monitoring approach is to strained problems and MHE may prove to be a better suited alter-
keep track of important states and parameters of a process and native for these cases.
compare them against their upper and lower bounds. However, This paper is organized as follows: In Section 2, a brief review of
some of these states and most of the parameters cannot be directly nonlinear state and parameter estimation is presented along with
measured and instead have to be inferred from plant data. the most widely-used EKF algorithm and the optimization-based
Extended Kalman lters have found widespread use for MHE strategy. The UKF algorithm for nonlinear estimation is then
nonlinear state and parameter estimation. Unscented Kalman presented in Section 3. Section 4 compares the performance of each
lters, as recently proposed by Julier and Uhlman (2004), could in lter for state and parameter estimation and concluding remarks
theory improve upon EKF for state and parameter estimation since are given in Section 5.
linearization is avoided by an unscented transformation and at least
second order accuracy is provided. This last point is achieved by 2. Overview of commonly used techniques
carefully choosing a set of sigma points, which captures the true
mean and covariance of a given distribution and then passing the This section provides background information for state and
means and covariances of estimated states through a nonlinear parameter estimation and briey reviews existing algorithms, i.e.,
transformation. As a result UKF is capable of estimating the LKF, EKF and MHE.
posterior mean and covariances accurately to a high order. Despite
2.1. State estimation
UKFs potential for good performance for state and parameter
estimation, only few applications in chemical engineering have
A class of nonlinear systems of interest in state estimation is
been reported so far (Rawlings & Bakshi, 2006; Romanenko &
given by:
Castro, 2004; Romanenko, Santos, & Afonso, 2004).
This paper investigates the performance of UKF in several case xk f xk1 ; uk1 ; wk1
studies. A detailed comparison is made between several state (1)
yk hxk ; uk ; vk
estimation methodologies with a specic emphasis on UKF as it is
a relatively new technique. The question as to what degree the lter where xk Rn is a vector of the state variables, the functions f and h
design affects the estimation results is addressed. Detailed case are differentiable functions of the state vector x, wk Rn is a vector
studies show that UKF and EKF have a similar performance for of plant noise, with E[wk] 0 and E[wkwTk ] Qk; yk Rm is a vector of
the measured variables, the function h is a differentiable function of
the state vector x and vk Rm is a vector of measurement noise, with
* Corresponding author. Tel.: 1 979 845 3568; fax: 1 979 845 6446. E[vk] 0 and E[vkvTk] Rk; n is the number of states, m refers to the
E-mail address: hahn@tamu.edu (J. Hahn). number of measurement variables. The distributions of w and v are
0950-4230/$ see front matter 2008 Elsevier Ltd. All rights reserved.
doi:10.1016/j.jlp.2008.07.012
704 C.C. Qu, J. Hahn / Journal of Loss Prevention in the Process Industries 22 (2009) 703709
not necessarily Gaussian. The initial value x0 may be assumed to be Extended Kalman lters address this problem by linearizing the
a Gaussian random variable with known mean and known n n system model along its trajectory. The equations dening the
covariance matrix P0. discrete-time form of the EKF are summarized in the following:
The objective is to nd an estimate b x k of xk to minimize the Prediction equations
weighted mean-squared error Exk b x k Mxk bx k T, where M is
any symmetric nonnegative denite weighting matrix. If all esti- b
x kjk1 f bx k1jk1 ; uk1
mates weigh equally, the objective becomes to minimize the error (6)
b
yk h bx kjk1 ; uk
covariance matrix for an unbiased estimator, given by
P Exk b x k xk b x k T . More specically, the trace of P is chosen
Update equations
to be minimized resulting in the performance index
J 12TrExk b x k xk b x k T . Pkjk1 Ak1 Pk1jk1 ATk1 Gk1 QGTk1
1
2.2. Parameter estimation Kk Pkjk1 CkT Ck Pkjk1 CkT Hk RHkT
(7)
Pkjk I Kk Ck Pkjk1
Parameter estimation involves a nonlinear mapping of the form:
b
x kjk b
x kjk1 Kk yk b yk
xk f xk1 ; uk1 ; wk1 ; qk
(2) vf vf
yk hxk ; uk ; vk ; qk where Ak1 zvx jbx , Ck zvh
vx jb
x
, Gk1 zvw jwk1 and Hk zvh
vvjvk are the
k1 kjk1
where qk is a vector parameterizing the nonlinear function f. The matrices of the linearized system model and evaluated at the
description of qk corresponds to a stationary process with identity estimated state values.
state transition matrix, driven by process noise wk1.
One technique for estimating parameters is to augment the state 2.5. Moving horizon estimation
vector with the parameters to be estimated: zk [xTk qTk ]T. The esti-
mation of both states and parameters can be done recursively by In contrast to EKF which is intended for unconstrained prob-
writing the state-space representation as: lems, moving horizon estimation is an optimization-based
approach. From a perspective of Bayesian theory, the state esti-
f xk1 ; uk1 ; wk1 ; qk1 mation problem can be formulated as the solution of the following
zk (3)
qk1 wk1 optimization problem:
T
X 1
2.3. Linearized Kalman lter minx T1 fT x0 ; fwk g minz;fw T1 v0k R1 vk
0 ;fwk gk0 k gkTN
k TN
A linearized Kalman lter is the local solution for nonlinear w0k Q 1 wk qTN z: (8)
estimation problems based on linearization about a nominal state
subject to
value. The following equations dene the discrete-time form of the
LKF:
xk f xk1 ; uk1 ; wk1
Prediction equations yk hxk ; uk vk (9)
xk X; wk W; vk V
b
x kjk1 A b x k1jk1 x0 x0 Buk1
(4) where the sets X, W and V can be constrained,
b
yk C bx kjk1 Duk
xk : xk; z; fwj gk1
jTN denotes the solution of system (9) at time k
Update equations when the initial state is z,fwj gk1
jTN is the process noise sequence
from time T N to k 1 and vk : yk h(xk, uk). qTN(z) is referred to
Pkjk1 APk1jk1 AT GQGT as the arrival cost, which summarizes the effect of the data
1 TN1
fyk gk0 on the state xT N and makes it possible to transform the
Kk Pkjk1 C T CPkjk1 C T HRHT optimization problem into one of lower dimension.
(5)
Pkjk I Kk CPkjk1 For unconstrained, linear systems, the arrival cost can be
b
x kjk b
x kjk1 Kk yk b yk expressed explicitly since the MHE optimization simplies to the
Kalman lter and its covariance update formula can be used (Rao &
vf vf vf
where Azvx jx0 , Bzvu ju0 , Czvh vh vh
vx jx0 , Dzvuju0 , Gzvwjw0 and Hzvvjv0 are Rawlings, 2002). Subject to the initial condition P0 and assuming
the matrices of the linearized system model around the nominal the matrix PT N is invertible, the arrival cost can then be
value of the states x0. The matrices Q and R are the tuning param- expressed as
eters of the Kalman lter. Q is used as a measure of condence in the 0
process model while R represents a measure of condence for the qTN z z bx TN P1 b *
TN z x TN fTN (10)
sensor readings. If the process noise or uncertainties are relatively
large compared to the observation noise, then Q has large values where bx TN denotes the optimal estimate at time T N given all of
compared to R, and vice versa. The matrix P0 provides a measure of the measurements yk from time 0 to T N 1, fT* N represents the
condence in the knowledge of the initial states x0. The notation optimal cost at time T N and PT N is computed from the Kalman
involving Q, R, and P0 also applies to other estimation methods such lter covariance update
as EKF, UKF or MHE mentioned throughout this work.
PT APT1 AT GQGT APT1 C T C PT1 C T
2.4. Extended Kalman lter 1
HRHT C PT1 AT (11)
Linear Kalman lters assume that a process stays close to the
nominal operation point. However, the values of the states can be The solution to the problem described by Eqs. (8) and (10) is the
quite different from the nominal values due to input changes. b *k gT1
unique optimal pair z* ; f w kTN which can be integrated to
C.C. Qu, J. Hahn / Journal of Loss Prevention in the Process Industries 22 (2009) 703709 705
x k gTkTN1 , where
*
yield the optimal state estimate fb distribution. The more the higher order moments are taken into
*
b *j gk1
x k : xk; z* ; f w
b jTN denotes the optimal estimate of the account, the less the overall prediction error will be (Julier & Uhl-
system at time k when the initial state is z* and the estimated mann, 1997). Lerner and Tenne provide results for capturing higher
process noise sequence is f w b *j gk1
jTN . order moments (Lerner, 2002; Tenne & Singh, 2003).
For constrained, linear systems, general analytical expressions After a set of sigma points is selected, each of them is propa-
for the arrival cost are not available. One strategy is to approximate gated through the nonlinear model functions f(.) and h(.).
the arrival cost with the one for the unconstrained problem. The Weighted means and covariances are then computed from the
approximation is exact when the inequality constraints are inac- transformed set of points. In the nal step, the Kalman lter gain
tive. For nonlinear systems, Tenny and Rawlings (2002) estimate is calculated from the covariances and the predicted states are
the arrival cost by approximating a constrained, nonlinear system updated based on the available measurements. This procedure
as an unconstrained, linear time-varying system. In their work the results in the equations dening the unscented Kalman lter as
model functions f(.) and h(.) in Eq. (9) are assumed to be sufciently follows:
smooth so that a rst-order Taylor series approximation of the Prediction equations
vf
model can then be applied, i.e., Ak : vx jbx , Ck : vh
vx jb
x kjk1
,
vf kjk1
Gk : vw jwk and Hk : vh j
vv vk can be obtained. The arrival cost qTN(z) cxk f cxk1 ; cw ;u
k1 k1
in Eq. (10) can be computed by solving the matrix Riccati equation P2na 1
b
x kjk1 Wi cxi;k
(11) subject to the initial condition P0. Another approach is to use i 1 (14)
UKF to compute the arrival cost (Qu & Hahn, in press). gk h cxk ; cvk1 ; uk
P2na 1
b
yk i 1 Wi gi;k
3. Process monitoring via unscented Kalman ltering
Update equations
An unscented Kalman lter is the application of the unscented 2na
h ih iT
X 1
transformation to recursive estimation. The main idea behind UKF Pkjk1 Wi cxi;k b
x kjk1 cxi;k b
x kjk1 (15)
is to use an unscented transformation to address the deciencies of i1
linearization by providing a mechanism for transforming means
and covariances information. In the unscented transformation
procedure, a set of weighed sigma points is deterministically 2n a
h ih iT
X 1
chosen such that certain properties of these points (e.g., a given Py;k Wi gi;k b
y k gi;k b
yk (16)
mean and covariance) match those of the prior distribution. These i1
sigma points are propagated through a nonlinear mapping and
then weighted means and covariances are computed. One approach
to determine a set of sigma points that have the same rst two 2n
X a
1 h ih iT
moments and all higher odd-ordered central moments as the given Pxy;k Wi cxi;k b
x kjk1 gi;k b
yk (17)
distribution is given by the following: i1
(1). Augment the system state vector to an na n q r
dimensional vector xa [xT wT vT]T to obtain its augmented mean
and covariance, 1
Kk Pxy;k Py;k (18)
0 1
b
x k1jk1
b a B C
x k1jk1 @ 0q1 A
0 r1 Pkjk Pkjk1 Kk Py;k KkT (19)
0 1 (12)
Pk1jk1 0nq 0nr
B wv C
a
Pk1jk1 @ 0qn Qk1 Pk1 A
0rn vw
Pk1 Rk1 x kjk b
b x kjk1 Kk yk b
yk (20)
where n is the dimension of original state vector, q and r are the where xa xx T1n xw T1q xv T1r T and Wi are weights as given by
dimensions of the original system and measurement noise vectors, Eq. (21)
vw and P wv are the correlations between the
respectively and Pk1 k1 (
system and measurement noise. For ease of computation, Pk1vw and k
2na k; if i 1
wv
Pk1 are usually set to zero. Wi (21)
1 otherwise
(2). Generate a set of 2na 1 symmetric sigma points 2na k;
EKF
dCA F 1 UKF
C CA 2kTCA2
dt V Ain 0.9
F DHR UA 0 20 40 60 80 100
dT
dt
Tin T 2 kTCA2 T Tj (23)
V rcp V rcp 1.005
dTj Fw UA
T Tj T Tj
dt Vw jin Vw rw cpw 1
T
where F is the feed ow rate, V is the volume of the reactor, CAin is 0.995
the inlet feed concentration, Tin is the inlet feed temperature, Fw is 0.99
the feed ow rate of the cooling jacket, Vw is the volume of the 0 20 40 60 80 100
cooling jacket, Tjin is the inlet coolant temperature, cp is the heat 1.005
capacity of the reacting mixture, cpw is the heat capacity of the
coolant, r is the density of the reaction mixture, rw is the density of
Tj
1
the coolant, U is the overall heat-transfer coefcient, and A is the
area over which the heat is transferred. The process parameter
0.995
values are given in the work by Rajaraman, Hahn, and Mannan 0 20 40 60 80 100
(2004). t
The nonlinear model without process noise exhibits multiple
steady states, of which the upper steady state (CAss 0.019 mol/L; Fig. 1. Performance comparison for mildly nonlinear CSTR.
C.C. Qu, J. Hahn / Journal of Loss Prevention in the Process Industries 22 (2009) 703709 707
sufciently correct its predictions from the measurements. Addi- dicylopentadiene. The nonlinear system model is given by the
tionally, the kurtosis and higher order moments are negligible since following three differential equations:
the magnitudes of the covariance estimates are signicantly
smaller than unity. Therefore, UKF may not fully utilize its potential dCA u
CAin CA k1 eE1 =RT CA k3 eE3 =RT CA2 (27)
for a mildly nonlinear scenario. Computation costwise, both algo- dt V
rithms are acceptable, even though UKF requires approximately an
order of magnitude more computation time than EKF because
a transformation of 15 sigma points is required at each time step dCB u
compared to one integration performed for EKF.
CB k1 eE1 =RT CA k2 eE2 =RT CB (28)
dt V
A simulation evaluating UKFs implementation for parameter
estimation is also performed. The product of the heat-transfer
coefcient and the heat-transfer area UA 4.8 106 J/s K is dT 1 h
considered as the parameter to be estimated. The lter param- k eE1 =RT CA DH1 k2 eE2 =RT CB DH2
dt rcp 1
eters are the same as shown in Eq. (25). At time 150 there is i u Q
a sudden change in the heat-transfer coefcient UA. Fig. 2 illus- k3 eE3 =RT CA2 DH3 Tin T (29)
trates the performance of LKF, EKF and UKF for estimating the V V rcp
heat-transfer coefcient. Both UKF and EKF perform comparably where the feed ow rate u is the only controlled variable. The
well. The difference in the results achieved by these two esti- values of the parameters can be found in the work by Hahn and
mators is again minor because the system does not exhibit Edgar (2001).
a strong degree of nonlinearity. However, there is a signicant The nonlinear model exhibits multiple steady states, of which
difference between the results computed from EKF, UKF and the upper steady state (CAss 2.4946 mol/L; CBss 1.1004 mol/L;
those returned by LKF. Tss 411.08 K; u 800 L/h) is chosen as the point of operation.
In this case study, the system and measurement noise are
4.2. Production of cyclopentanol in a CSTR with van de Vusse again assumed to appear linearly. Discretization of continuous
reaction differential equations is implemented using nite differences
with Dt 0.002. The measurable variables are assumed to be the
In this section, performance of UKF and EKF is evaluated for concentration of B and the reactor temperature T. Initial condi-
a highly nonlinear system. An isothermal nonlinear CSTR is tions bx 0 2:5 1:09 411:2T . All process variables were scaled to
considered with a competing side reaction governed by van de be dimensionless using the upper steady state as the nominal
Vusse reaction kinetics (Stack & Doyle, 1997): point.
The remaining lter parameters after scaling are given by
k1 k2 k3 n o n o
A /B/C 2A / D (26) b diag 104 ; 104 ; 104 ; Q diag 104 ; 104 ; 104
P 0
Component A is the reactant cyclopentadiene, B is the product n o
R diag 106 ; 106 ; k 4
cyclopentanol, C and D are the side products cyclopentandiol and
LKF
1 shows the performance of EKF and UKF when the measurement
UKF
noise level is set to R 102. Similar performance is found when
0.8
0 50 100 150 200 250 300 350 400 R 104. UKF outperforms EKF when the measurement noise
level is comparable to or larger than the process noise, because
1.02 the lters put more emphasis on the model as the measurement
noise increases.
T
10 Table 2
MSE/computation time average over 50 Monte Carlo simulations for varying
5 measurement noise levels
UA
1.2
1.5
Simulation data
1.1 EKF EKF updated C
CA
Concentrations
Actual C
1.1
0.5
1.05
Actual B
CB
1
Actual A
0.95 0 UKF updated A
EKF updated A
0.9
0 10 20 30 40 50 60 70 80 90 100
UKF updated B
1.01
T
1 0 5 10 15 20 25 30
time
0.99
0 10 20 30 40 50 60 70 80 90 100 Fig. 4. Performance comparison of UKF and EKF for batch reactor.
t
Fig. 3. Performance comparison for Reactor with Van de Vusse reaction.
correct state estimates due to their inability to handle constraints.
The results using MHE are shown in Fig. 5. MHE converges to the
reactions are taking place in a batch reactor (Haseltine & Rawlings,
correct state values since the state constraints prevent estimation
2005):
of negative concentrations. It can be concluded that both UKF and
EKF may have limitations for computing reasonably good estimates
A !kk1 B C when constraints exist.
2
(30)
2B !kk3 C
4
time step, k. Scaling is not performed given that all the states are Actual C
concentrations, whose values have the same order of magnitude. 0.5
The initial values and lter parameters for state estimation are
Concentrations
0.4
Dt tk1 tk 0:25; x0 0:5 0:05 0T ;
x 0 0 0 4T ;
b b
P diag 0:52 ; 0:52 ; 0:52 ; Actual B
0 0.3
MHE updated B
0.2
2 2 2
Q0 diag 0:001 ; 0:001 ; 0:001 ;
0.1
R0 0:252 ; k 4; N 3 MHE updated A
Actual A
MHE may be a better option for constrained problems; however, Qu, C., & Hahn, J. Computation of arrival cost for moving horizon estimation via
unscented Kalman ltering, Journal of Process Control, in press, doi:10.1016/
MHE results in a higher computational burden.
j.jprocont.2008.04.005.
Rajaraman, S., Hahn, J., & Mannan, M. S. (2004). A methodology for fault
Acknowledgement
detection, isolation and identication for nonlinear processes with para-
metric uncertainties. Industrial Engineering Chemistry Research, 43(21),
The authors appreciate nancial support from the MKOCPSC and 67746786.
express their gratitude to Dr. Sam Mannan for his feedback. Rao, C. V., & Rawlings, J. B. (2002). Constrained process monitoring: moving horizon
approach. AIChE Journal, 48(1), 97109.
Rawlings, J. B., & Bakshi, B. R. (2006). Particle ltering and moving horizon esti-
References mation. Computers Chemical Engineering, 30, 15291541.
Romanenko, A., & Castro, J. A. A. M. (2004). The unscented lter as an alternative to
Hahn, J., & Edgar, T. F. (2001). A gramian based approach to nonlinearity quantication the EKF for nonlinear state estimation: a simulation case study. Computers
and model classication. Industrial Engineering Chemistry Research, 40, 57245731. Chemical Engineering, 28, 347355.
Haseltine, E. L., & Rawlings, J. B. (2005). Critical evaluation of extended kalman Romanenko, A., Santos, L. O., & Afonso, P. (2004). Unscented Kalman ltering of
ltering and moving horizon estimation. Industrial Engineering Chemistry a simulated ph system. Industrial Engineering Chemistry Research, 43,
Research, vol. 44, 24512460. 75317538.
Julier, S. J., & Uhlmann, J. K. (2004). Unscented ltering and nonlinear estimation. Stack, A. J., & Doyle, F. J. (1997). Application of a control-law nonlinearity measure to
Proceedings of The IEEE, 92(3), 401422. the chemical reactor analysis. AIChE Journal, 43(2), 425439.
Julier, S. J. & Uhlmann, J. K. A new extension of the Kalman lter to nonlinear D. Tenne and T. Singh, The higher order unscented lterProceedings of American
systems. International symposium on aerospace/defense sensing, simulation Control Conference, 3, pp. 24412446, 2003.
and controls, Orlando, FL, 1997. M.J. Tenny and J.B. Rawlings, Efcient moving horizon estimation and nonlinear
U.N. Lerner, Hybrid bayesian networks for reasoning about complex systemsPh. D. model predictive controlProceedings of the American Control Confer-
dissertation, Stanford University, Stanford, CA, 2002. enceAnchorage, Alaska, 2002.
R. Merwe and E.A. Wan, The square-root unscented Kalman lter for state and Vejtasa, S. A., & Schmitz, R. A. (1970). An experimental study of steady-state
parameter estimation, Proceedings of IEEE International Conference on multiplicity and stability in an adiabatic stirred reactor. AIChE Journal, 16(3),
Acoustics, Speech, and Signal Processing, 6, pp. 34613464, 2001. 410419.