You are on page 1of 10

SENDA’08 Monastir, Tunisia, October 24-26, 2008

STOCHASTIC STATE ESTIMATION OF A MULTIVARIABLE


PROCESS USING UNSCENTED KALMAN FILTERS
A. Gaaloul and F. M’Sahli
Abderraouf.gaaloul@enim.rnu.tn
National Engineering School of Monastir, Department of Electrical Engineering,
street Ibn Eljazzar, 5019, Monastir, Tunisia

Abstract
This paper deals with the problem of stochastic state estimation of a MIMO nonlinear process
represented by a quadruple tank process. Such problem is resolved using a relatively recent
filtering technique named the Scaled Unscented Kalman Filter (SUKF) under the two
standard and augmented versions. Our main target here is to estimate the water levels in the
two upper tanks using the discrete-time noisy measurement of the two bottom levels. To
achieve practical conditions, the process state and output are assumed immerged in Gaussian
white noise. Compared to the Extended Kalman Filter, the SUKF is easier to design and
implement since no computation of Jacobian matrices is needed. Computer simulations are
developed for showing the effectiveness of the augmented version of the SUKF compared to
the standard one.

Index Terms-- State estimation, Unscented Kalman filter, SUKF, Quadruple tank process.

I. Introduction
Over the past four decades, the state estimation of dynamical systems has captured the
attention of several researchers. This is due to the importance of the knowledge of the system
states in many fields as process monitoring [1]-[3] and fault detection [4], [5]. Since the
development of the two well known Luenberger observer [6] and the Kalman filter [7], [8] to
estimate the state of linear systems operating, respectively, in deterministic and stochastic
environments, the synthesis of nonlinear estimators still provides an open research area, in
particular to deal with noisy disturbances often encountered in industrial applications.
The Kalman filter, established firstly for linear systems, may be extended to deal with
systems nonlinearity. Known as the Extended Kalman Filter (EKF), such technique is the
most estimation technique used in real time applications since it can be applied for both
deterministic and stochastic processes [9]-[11]. The EKF consists of using the classical
Kalman filter equations to the first (or even second) order Taylor approximation of state and
output equations about the last estimated state trajectory [12], [13]. Stability results of the
EKF for continuous and discrete-time deterministic nonlinear systems can be found,
respectively, in [14] and [15]. For stochastic systems, authors in [16] proved that the
estimation error remains bounded if the system satisfies the nonlinear observability rank
condition and the initial estimation errors as well as the disturbing noise terms are small
enough.
Indeed the EKF has been widely used in numerous industrial applications, it admits some
serious drawbacks. In fact, in many cases, the first order linearization provides an
insufficiently accurate leading to biased estimates or even their divergence. Moreover, the
EKF implementation necessitates the existence and the computation of the Jacobian matrices.
Oftentimes, the determination of these matrices is a difficult task, especially for sophisticated
high order systems.
To overcome the limitations of the EKF, a new interesting estimation technique known as
the Unscented Kalman Filter (UKF) were established [17], [18]. Such method is based on the
unscented transform, a mechanism for propagating mean and covariance through a nonlinear
transformation. Unlike the EKF, such technique does not approximate the nonlinear state and
observation models, but uses true nonlinear models and, by means of a minimal set of
deterministically chosen sample points, called sigma points, capture the mean and covariance
estimates. When the points are propagated through the true nonlinear system, they capture the
posterior mean and covariance accurately to the second order for any nonlinearity.
Recently, the performances of the modified UKF were evaluated in [19] where authors
introduced an extra positive definite matrix in the process noise covariance matrix to improve
stability. They proved that, under certain mild conditions, the estimation error is bounded in
mean square. An improvement version of the standard UKF can be found in literature [20],
[21]. In particular, for a proper choice of the sigma points, a similar approach was carried out
by introducing a scale parameter leading to the formulation of the Scaled UKF (SUKF) [22].
The standard SUKF algorithm was reformulated by forming an augmented state variable
which concatenates the state and noise components together, so that the effect of process and
measurement noises can be used to better capture the odd-order moment information [22].
This requires that the sigma points generated during the predict step are also used in the
update step, so that the effect of noise terms are truly propagated through the nonlinearity
[23]. The Augmented Unscented Kalman Filter (AUKF) is used in [24] with the particle filter
to estimate the overflow losses in hopper dredger.
In this paper, we are interesting to estimate the two upper immeasurable water levels of a
four tank process from the discrete-time measurement of the two bottom levels. To become
reconciled with practical conditions, we assume that the process state and outputs are
corrupted with a Gaussian white noise with zero mean. To deal with this problem, we adopt
the augmented and nonaugmented UKF. Estimation accuracy is significantly improved with
the AUKF compared to the UKF.
The rest of this paper is organized as follows. The system under consideration is described
in the next section where we introduce the corresponding MIMO nonlinear model. While the
UKF is presented in section 3, the AUKF is treated in section 4. The application of the two
estimation techniques to a quadruple tank process is done in section 5. Finally, conclusions
are presented in section 6.

II. Quadruple tank process


The experimental setup considered in this work is a real quadruple tank process available
in our laboratory, and consists of four interconnected tanks as shown in Fig. 1.
The quadruple-tank admits two independent pumps P1 and P2, equipped, respectively, by
a flow meter D1 and D2, are used to convey water from a basin below into, respectively, tank
3 and tank 4. While every one of the upper two tanks admits two outlet pipes, every bottom
tank is equipped by one outlet pipe. Tank 3 and tank 4 drain, respectively, freely into tank 2
and tank 1. Also, they pour away through valves into tank 1 and tank 2, respectively. The
liquid levels in the bottom two tanks are measured using two ultra sonic sensors. Additional
flow disturbances can be introduced into the upper tanks. These external unmeasured
disturbance flows can either drain or fill the top tanks. The process variations include
uncertainties in the actuators, valve settings, and head losses in the tanks.
Figure 1. Schematic diagram of the quadruple tank process.

The differential equations that describe the system dynamics are based on mass balances
and Bernoulli’s law. The simplified continuous dynamics look like [25]:

⎧ x&1 = −c1 x1 + c 2 x3 + c3 x 4

⎪ x& 2 = −c 4 x 2 + c 5 x3 + c 6 x 4

⎪ x& 3 = −c7 x3 + c8 u1
⎨ (1)
⎪ x& 4 = −c9 x 4 + c10 u 2

⎪ y1 = x1
⎪y = x
⎩ 2 2

where the state vector x(t ) ∈ ℜ 4 , x i = hi , i = 1, K ,4 , represent the water level in every tank,
the input vector u (t ) ∈ ℜ 2 , u i = Qi , i = 1, 2 , represent the water flow and
y (t ) = (h1 h2 ) ∈ ℜ 2 designate the output vector, and c k , k = 1, K ,10 , are the constants of
T

the system obtained from the cross section of the tanks and the outlet hole, and the gravity
constant.
Using forward Euler discretisation, a nonlinear discrete-time model for the process is then
given by:
(
⎧ x1,k +1 = x1,k + Te − c1 x1,k + c 2 x 3,k + c 3 x 4,k

)
(
⎪ x 2,k +1 = x 2,k + Te − c 4 x 2,k + c 5 x 3,k + c 6 x 4,k
⎪ )

( )
(2)
⎪ x3,k +1 = x 3,k + Te − c 7 x 3,k + c8 u1, k

(
⎪⎩ x 4,k +1 = x 4,k + Te − c 9 x 4,k + c10 u 2,k )
where Te is the sample time and k denotes the discrete time step.
To achieve practical conditions, we assume that the system (2) and the measurements
given by:
⎧⎪ y1,k = x1,k
⎨ (3)
⎪⎩ y 2, k = x 2,k

are immerged in a Gaussian white zero mean noise. Under such condition, we present in what
follows a brief description of a new and simple procedure to estimate the states x3 and x 4 .

III. Scaled unscented Kalman filter


Using the intuition that it is easier to approximate a probability distribution than it is to
approximate an arbitrary nonlinear function or transformation, Julier et al. [17], [18]
established the UKF algorithm. The principle of such technique consists of generating a set of
deterministically chosen points so-called sigma points which completely capture the true
mean and covariance of the distribution. The nonlinear function is applied to each of these
points in turn to yield a transformed sample, and the predicted mean and covariance are
calculated from the transformed sample.
In what follows, the principle of classical UKF is summarized. Consider the general
discrete-time nonlinear system given by:

x k +1 = f ( x k , u k , wk )
(4)
y k = h( x k , v k )

where x k ∈ ℜ n is the state vector; u (k ) ∈ ℜ m and y k ∈ ℜ p are, respectively, the input and the
output vectors at time instant k ; f and h are, respectively, the state transition model and the
measurement model; and w and v are random noise sequences uncorrelated with each other
and the rest of the system, such that the expected values E[ . ] of their mean and variance are:

[
E [w(.)] = E [v(.)] = E v(.) w(.) T = 0, ]
[
E w( j ) w(k ) T = ⎨ ]
⎧0, j ≠ k,
j = k,
(5)
⎩Q(k ),

[ ] ⎧0,
E v ( j )v ( k ) T = ⎨
j ≠ k,
j = k,
⎩ R(k ),

where Q(k ) and R (k ) are, respectively, noise process and noise measurement covariance
matrices.
The UKF algorithm can be briefly accomplished in three main steps given below.
1) Computation of the sigma-points
The n-dimensional Gaussian distribution x k with mean xˆ k / k and covariance Pk / k is
approximated by 2n + 1 weighted samples named sigma points selected using the following
algorithm:
χ k0 / k = xˆ k / k , W0 = λ /(n + λ )
χ ki / k = xˆ k / k + ( )
(n + λ ) Pk / k i , Wi = 1 / 2(n + λ ) (6)
χ ki +/ nk = xˆ k / k −( (n + λ ) Pk / k ),
i
W i + n = 1 / 2( n + λ )
where the parameter λ ∈ ℜ allows the finite tuning of higher order moments of the
( )
approximation, (n + λ ) Pk / k i , i = 1, L , n , is the ith row or column of the matrix square root
of (n + λ ) Pk / k , and Wi is the weight associated with the ith point.
The choice of the sigma points as given by (6) presents some drawbacks. In fact, if λ < 0 ,
it may lead to estimates of the covariance that are not positive semi-definite and, on the other
hand, if λ > 0 , the radius of the sphere bounding the sigma points increases with n and non-
local effects are included in the approximations. These deficiencies led to the development of
the Scaled Unscented Kalman Filter (SUKF) [22]. Using such technique, the resulting sigma
points are the same as in (6), while the associated weights to calculate mean and covariance
Wi m and Wi c , respectively, are given by:

W0m = λ /(n + λ )
W0c = W0m + (1 − α 2 + β ) (7)
Wi m = Wi c = 1 / 2(n + λ ), i = 1, L ,2n

where λ is a scale parameter defined as λ = α 2 (n + κ ) − n , and the positive constants α , β


and κ are tuning parameters of the filter.
The constant α determines the spread of the sigma points around xˆ k / k , and usually set to
a small value, e.g. be α = 10 −3 . The coefficient β is used to incorporate part of the
distribution of x , and for Gaussian distributions, β = 2 is optimal. The parameter κ is a
secondary scaling parameter that is usually set to zero. The square root of the matrix
(n + λ ) Pk / k is usually realized by Cholesky decomposition [22].
2) Propagation step
Propagate the sigma points through the process model to yield a set of transformed
samples to obtain the mean and the covariance of the estimate state as follows:

χ ki +1 / k = f ( χ ki / k , u k , k ) (8)

The predicted (propagated) mean and covariance are, respectively, computed as:

2n
xˆ k +1 / k = ∑W χ
i =0
i
i
k +1 / k

(9)
∑ W (χ )( )
2n
T
Pk +1 / k = Qk + i
i
k +1 / k − xˆ k +1 / k χ ki +1 / k − xˆ k +1 / k
i =0

3) Update step
Calculate the measurement sigma points and update the mean and the covariance of the
estimate state as described by the following relations:
Yki+1 / k = h( χ ki +1 ) (10)
2n
yˆ k +1 / k = ∑W Y
i =0
i
i k +1 / k (11)

xˆ k +1 / k +1 = xˆ k +1 / k + K k +1 ( y k +1 / k +1 − yˆ k +1 / k ) (12)
Pk +1 / k +1 = Pk +1 / k − K k +1 Pkvv+1 / k K kT+1 (13)
where

Wi (Yki+1 / k − yˆ k +1 / k )(Yki+1 / k − yˆ k +1 / k )
2n


T
Pkvv+1 / k = + R k +1 (14)
i =0

∑ W (χ )( )
2n
T
Pkxv+1 / k = i
i
k +1 / k − xˆ k +1 / k Yki+1 / k − yˆ k +1 / k (15)
i =0
and
K k +1 = Pkxv+1 / k ( Pkvv+1 / k ) −1 (16)
Remarks:
1/ Compared to the EKF, the SUKF design and implementation are extremely convenient
since it is not necessary to evaluate the Jacobian matrices of the system.
2/ The stability of the UKF was treated in [19]. It is proved that the estimation error is
bounded in mean square.

IV. Augmented SUKF


The augmented version of the SUKF is introduced in order to take the effect of process
and measurement noises into account. This can be used to better capture the odd-order
moment information. So, the state variables are augmented with the state transition and
measurement noises, and the state covariance with the state transition and measurement
covariances [24]. The original state and covariance can be augmented as follows:

[
x ka = x kT wkT v kT ]
T
(17)
Pka = diag ( [ Pk Qk Rk ] ) (18)

All the procedure presented in the previous section can be reformulated using the
augmented variables as follows:
* Select the sigma points:
[
χ ia, k = χ k χ kw χ kv i , i = 0, L ,2n a ] (19)
where χ k , χ kw and χ kv denote the part of the sigma points that corresponds, respectively, to
the state, the process noise and the measurement noise, and n a = dim( x ka ) .
The augmented sigma points and the associated weights are computed as follows:

⎧ χ 0a, k / k = xˆ ka / k ,

( )

⎪ a
⎨ χ i , k / k = xˆ k / k + (n a + λ ) Pk / k i , i = 0, L , n a
a a
(20)

( )
⎪⎩ χ ia+ n,k / k = xˆ ka / k − (n a + λ ) Pka/ k i , i = 0, L , n a
λ = α 2 (n a + κ ) − n a (21)
⎧W0m = λ /(n a + λ )
⎪⎪ c
⎨W0 = W0 + (1 − α + β )
m 2
(22)
⎪ m
⎪⎩Wi = Wi = 1 / 2(n a + λ ), i = 1, L ,2n a
c
* Propagate the sigma points corresponding to the state and state transition noise through
the state transition model:
χ i , k +1 / k = f ( χ i , k / k , χ iw,k / k , u k , k ) , i = 0, L ,2n a (23)
* Predict the next state and covariance as follows:
2 na
xˆ k +1 / k = ∑W χ
i =0
i i , k +1 / k
(24)
∑ W (χ )( )
2 na
T
Pk +1 / k = i i , k +1 / k − xˆ k +1 / k χ i , k +1 / k − xˆ k +1 / k
i =0

* Propagate the transformed sigma points χ i , k +1 / k and the part corresponding to the
measurement noise χ kv through the measurement model:
Yi , k +1 / k = h( χ i , k +1 , χ iv, k +1 , k ) , i = 0, L ,2n a (25)
* Predict the measurement and its covariance:
2 na
yˆ k +1 / k = ∑W Y
i =0
i i , k +1 / k (26)

∑ W (Y )( )
2 na
T
Pkvv+1 / k = i i , k +1 / k − yˆ k +1 / k Yi , k +1 / k − yˆ k +1 / k (27)
i =0
* Compute the cross-correlation matrix:

∑ W (χ )( )
2 na
T
Pkxv+1 / k = i i , k +1 / k − xˆ k +1 / k Yi ,k +1 / k − yˆ k +1 / k (28)
i =0
* Compute the Kalman gain given by (16)
* Correct the predicted state and the covariance according to (12) and (13), respectively.

V. Application
In this section, we apply and compare the performance of the two versions of the
nonlinear estimator presented in the previous sections. We use the augmented and the
nonaugmented Scaled UKF to estimate the state of a real multivariable quadruple tank
process available in our laboratory. To achieve practical conditions, the process state and
measurements which are available at discrete-time, was treated noisy together. The values of
the process constants, c k , k = 1, K ,10 , appearing in the process model (2) are given in Table 1
below.
Table 1. Numeric values of the process constants.
Constants Values
c1 , c 4 0.005
c2 , c6 0.014
c3 , c5 0.020
c 7 , c9 0.020
c8 , c10 43

Computer simulations were carried out to compare the performances of the two filtering
techniques. Fig. 2 shows the simulated states and their estimates obtained with the SUKF and
the Augmented SUKF (ASUKF). The sample time of the process was chosen as Te = 1s . The
initial conditions were chosen as: x1 (0) = x 2 (0) = 3 , x3 (0) = x 4 (0) = 10 , xˆ1 (0) = xˆ 2 (0) = 3 ,
xˆ 3 (0) = xˆ 4 (0) = 9 and P (0) = I 4 . The process and measurement noise covariance matrices
were done, respectively, by: Q = 10 −4 I 4 and R = 10 −4 I 2 . The design parameters of the
SUKF, were chosen as α = 0.5 , β = 2 and κ = 1 . From the results presented in Fig. 2, we
deduce that the ASUKF provides better estimates than the SUKF.
10 10

8 8

6 6
level 3 (cm)

level 4 (cm)
4 4

2 2

0 0

-2 -2
0 100 200 300 400 0 100 200 300 400
Time (s) Time (s)
Figure 2. Simulated states (dashed line) and estimated states using SUKF (solid line) and ASUKF (grass line)
for small noises and small initial estimation error.

To study the effect of initial conditions on the accuracy of the estimation, another set of
simulations was carried out with higher initial estimation error. So, we keep the same design
parameters and noise covariance matrices, and we change the initial condition of states x̂3
and x̂ 4 as xˆ 3 (0) = xˆ 4 (0) = 5 . Results depicted in Fig. 3, shows that an important initial
conditions lead to a biased estimation or even divergence of the estimator as the case of the
SUKF.
10 10

8
5
6
level 3 (cm)

level 4 (cm)

4 0

2
-5
0

-2 -10
0 100 200 300 400 0 100 200 300 400
Time (s) Time (s)
Figure 3. Simulated states (dashed line) and estimated states using SUKF (solid line) and ASUKF (grass line)
for small noises and high initial estimation error.

In Fig. 4, we plotted the results of estimation with small initial estimation error and
higher noise measurement. In fact, for R = 10 −2 I 2 and xˆ 3 (0) = xˆ 4 (0) = 9 , one can deduce that
an important measurement noise had a bad effect on the estimation. Unlike the SUKF which
diverge under such condition, the augmented version of the SUKF presents good results.
However, we can not forget that the ASUKF is computationally more demanding than the
SUKF [23].
10 50

5
level 3 (cm)

level 4 (cm)
-50

-100
0

-150

-5 -200
0 100 200 300 400 0 100 200 300 400
Time (s) Time (s)
Figure 4. Simulated states (dashed line) and estimated states using SUKF (solid line) and ASUKF (grass line)
for high noise measurement and small initial estimation error.

VI. Conclusion
In the present work, we addressed the problem of estimating the immeasurable states of a
stochastic nonlinear discrete-time process. In particular, our interest has been focused on the
estimation of the two unknown levels of a quadruple tank process assuming that the process
states and outputs are immerged in Gaussian white zero mean noise. Such problem was
treated using two versions of a relatively new technique called the Unscented Kalman Filter
(UKF). While the first one is named the Scaled UKF (SUKF), the second version is the
Augmented SUKF where the state and the noise components are concatenated together.
Compared to the SUKF, the ASUKF performed better the estimation even for important
measurement noise and large initial estimation error.

VII. References
[1] Z. Wan and M. V. Kothare, “Efficient scheduled stabilizing output feedback model
predictive control for constrained nonlinear systems,” IEEE Trans. on Automatic Control,
Vol. 49, No. 7, pp. 1172-1177, July 2004.
[2] Y. Xudong, “Adaptive output feedback control of nonlinear systems with unknown
nonlinearities,” Automatica, Vol. 41, pp. 1367 – 1374, 2005.
[3] L. Hsu, F. Lizarralde and A. D. de Araújo, “New results on output feedback variable
structure model reference adaptive control: Design and stability analysis,” IEEE Trans. on
Automatic Control, Vol. 42, No. 3, pp. 386-393, March 1997.
[4] C. Edwards, S. K. Supergeon, and R. J. Patton, “Sliding mode observers for fault
detection and isolation,” Automatica, Vol. 36, pp. 541-553, 2000.
[5] C. Edwards and C. P. Tan, “Sensor fault tolerant control using sliding mode observers,”
Control Engineering Practice, Vol. 14, pp. 897-908, 2006.
[6] D. G. Luenberger, “Observers for multi-variable linear systems,” IEEE Trans. on
Automatic Control, 2, 190-197, 1966.
[7] R. E. Kalman, “A new approach to linear filtering and prediction problems,” Trans. ASME
Ser. D., J. Basic Eng., Vol. 82, pp. 35-45, 1960.
[8] R. E. Kalman and R. S. Bucy, “New results in linear filtering and prediction theory,”
Trans. ASME Ser. D., J. Basic Eng., Vol. 83, pp. 95-108, 1961.
[9] N. Daouas and M. S. Radhouani, “Version étendue du Filtre de Kalman discret appliquée
à un problème inverse de conduction de Chaleur non linéaire, ” International Journal of
Thermal Sciences, Vol. 39, pp.191–212, 2000.
[10] R. M. Oisiovici and S. L. Cruz, “State estimation of batch distillation columns using an
extended Kalman filter,” Chemical Engineering Science, Vol. 55, pp. 4667-4680, 2000.
[11] L. Rujun, A. B. Corripio, M. A. Henson, and M. J. Kurtz, “On-line state and parameter
estimation of EPDM polymerization reactors using a hierarchical extended Kalman filter,”
Journal of process control, Vol. 14, pp. 837-852, 2004.
[12] A. Jaswinski, Stochastic proceses and filtering theory, New York: Academic Press, 1970.
[13] G. C. Goodwin and K. S. Sin, adaptive filtering, prediction and control, Englewood Cliffs,
NJ: Prentice-Hall, 1984.
[14] K. Reif, F. Sonneman, and R. Unbehauen, “An EKF-based nonlinear observer with
prescribed degree of stability,” Automatica, Vol. 34, No. 9, pp. 1119-1123, 1998.
[15] M. Boutayeb, H. Rafaralahy, and M. Darouach, “Convergence analysis of the extended
Kalman filter used as an observer for nonlinear discrete-time systems,” IEEE Trans. on
Automatic Control, Vol. 42, No. 4, pp. 581-586, April 1997.
[16] K. Reif, S. Günther, E. Yaz, and R. Unbehauen, “Stochastic stability of the discrete-time
extended Kalman filter,” IEEE Trans. on Automatic Control, Vol. 44, No. 4, pp. 714-728,
April 1999.
[17] S. J. Julier, J. K. Uhlmann, and H. F. Durrant-Whyte, “A new approach for filtering
nonlinear systems,” in Proceedings of the American Control Conference, pp. 1628-1632,
Seattle, USA, 1995.
[18] S. J. Julier, J. K. Uhlmann, and H. F. Durrant-Whyte, “A New method for the nonlinear
transformation of means and covariances in filters and estimators,” IEEE Trans. on
AutomaticControl, , Vol. 45, No. 3, pp. 477-482, March 2000.
[19] K. Xiong, H. Y. Zhang, and C. W. Chan, “Performance evaluation of UKF-based
nonlinear filtering,” Automatica, Vol. 42, pp. 261-270, 2006.
[20] Q. Song and J. D. Han, “An adaptive UKF algorithm for the state and parameter
estimations of a mobile robot,” Acta Automatica Sinica, Vol. 34, No. 1, pp. 72-79, 2008.
[21] R. Kandepu, B. Foss, and L. Imsland, “Applying the unscented Kalman filter for
nonlinear state estimation,” Control Engineering Practice, 2008. To appear.
[22] A. H. Carazo and J. L.Pérez, “Different approaches for state filtering in nonlinear systems
with uncertain observations,” Applied Mathematics and Computation, Vol. 187, pp. 708–
724, 2007.
[23] S. Särkkä, Recursive Bayesian Inference on Stochastic Differential Equations, Ph.D
dissertation, Helsinki University of Technology, Finland, 2006.
[24] Z. Lendek, R. Babuska, J. Braaksma, and C. de Keizer, “Decentralized estimation of
overflow losses in a hopper dredger,” Control Engineering Practice, 2008. To appear.
[25] N. Ben Nasr, Contribution à l’étude de la commande prédictive non linéaire à horizon
glissant: ouverture sur la commande prédictive non linéaire rapide, Ph.D. Dissertation,
University of Sfax, Tunisia, 2007. (in french)

You might also like