This article presents a new nonlinear joint (state and parameter) estimation algorithm based on fusion of Kalman filter and randomized unscented Kalman filter (UKF), called Kalman randomized joint UKF (KRJUKF). It is assumed that the measurement equation is linear. The KRJUKF is suitable for time varying and severe nonlinear dynamics and does not have any systematic error. Finally, jointEKF, dualEKF, jointUKF and KRJUKF are applied to a CSTR with cooling jacket, in which production of propylene glycol happens and performance of KRJUKF is evaluated.
1. Introduction
Recently, control of the operation of chemical reactors has been studied enormously
[1

3]
. There are many process control strategies, in which information about the state of the process is essential for calculating the control input. Since getting an accurate model for a nonlinear chemical process is difficult or probably impossible, it is necessary to obtain an approximate model. Therefore, a technique which provides the best estimation and compensates for the lack of knowledge of uncertainties in the process is required.
The most popular nonlinear estimator is the extended Kalman filter (EKF). The problems associated with EKF are attributed to the approximation introduced by the linearization [4].This is the idea of the extended Kalman filter (EKF), which was originally proposed by Stanley Schmidt
[4]
, so that the Kalman filter can be applied to nonlinear problems
[6]
. Since EKF estimates mean and covariance using firstorder approximation of the system dynamics, it can be hard to tune and implement when dealing with significant nonlinearities and then exhibits divergence in extreme cases.
Unscented Kalman filter (UKF) overcomes this theoretical deficiency. The core of UKF is unscented transformation (UT). It uses a minimal set of determinate sample points (Sigma points) to completely assess the true mean and covariance of the states via UT. Studies show that UT is more accurate than linearization for propagating mean and covariance
[7

12]
.
Although UKF is more accurate than EKF, it suffers from systematic error. To remove this systematic error, randomized unscented Kalman filter (RUKF) was suggested
[13]
. The idea of RUKF is based on Bayesian recursive relation (BRR). BRR is a general solution for estimation problems and is used to compute probability density functions (pdfs) of states conditioned by the measurements. To propagate mean and covariance matrix, multidimensional Gaussian integral should be computed. An improved UT was proposed to randomly generate points for calculating this Gaussian integral. Studies have demonstrated that utilizing the improved UT enables RUKF to provide estimates of higher quality than UKF and CKF
[13]
.
In addition, most processes have timevarying dynamics or unknown parameters, and since both the EKF and UKF are modeldependent approaches, their estimations may leave the optimal region or even diverge in the case of large amplitude variations. Thus, a dual estimation algorithm which estimates both the states and parameters simultaneously is very practical for handling time varying systems.
One of the first usages of dual estimation is combining both the state vectors and unknown parameters in a jointbilinear statespace representation
[14]
, which is mentioned for linear dual Kalman. Another approach suggests two independent KFs
[15]
. These works have considered problem of state estimation in linear systems. JointEKF was suggested to model unknown parameters in a model reference adaptive control framework
[16]
. DualEKF
[17]
was a nonlinear extension of the linear dual Kalman approach. Although these filtering techniques have shown to perform better than the EKF
[18]
, they do not perform as well as joint UKF in severe nonlinearity systems. Joint UKF provides a more accurate approximation, but suffers from containing a systematic error.
Nonlinear, time varying behaviour is common in chemical processes. CSTR (continuous stirredtank reactor) is one of the significantly investigated benchmarks for nonlinear estimation
[19]
. Nonlinear functions describing a CSTR are generally of exponential form due to the Arrhenius dependence of reaction rate on temperature
[20]
.
In this paper, a new algorithm called KRJUKF is presented. The KRJUKF is derived from the combination of KF and RUKF and the concept of joint estimation. KRJUKF propagates mean and covariance of a nonlinear dynamic system using linear measurement equations. The proposed approach is suitable for time varying systems due to utilizing the concept of joint estimation. Also the combination of the KF and RUKF makes the proposed approach proper for online estimation. The advantage of KRJUKF is to reduce the estimation error compared to existing algorithms. To show the merits of the proposed approach, dual estimation algorithms are utilized to estimate the state and unknown parameters of a highly nonlinear dynamic system. Joint EKF, dual EKF, joint UKF and KRJUKF are applied to a jacketed CSTR and their performances are compared.
This paper is organized as follows: In section 2, concepts of parameter estimation and JointEKF and JointUKF are presented. The next section represents the algorithm of dualEKF. In section 4, KRJUKF is presented. The dynamic of CSTR is studied in section 5 and simulation results are presented in section 6. Finally, section 7 concludes the paper.
2. Parameter Estimation
The idea of state estimation can be extended to unknown parameter estimation, which is due to uncertainties in system dynamics
[4]
. Parameter estimation was presented by Kopp and Orford
[21]
. In this approach, unknown parameters are transformed into a new state by combining the states with parameters. Suppose that we have continuoustime nonlinear dynamic and nonlinear measurement equation with additive noise:
Where
X
(
t
) is the state vector,
P
is an unknown parameter vector,
U
(
t
) is the input and
V
and
W
are the measurement and system noises, respectively.
V
and
W
are assumed to be independent, white and Gaussian with zero mean and finite covariance matrix. If we artificially combine the unknown parameters and states into a new state vector as follows:
a new state space is resulted with the augmented state vector:
If the unknown parameters are assumed to be constant, then
ṗ
= 0 . Therefore, state space can be modified as:
Nonlinear filters such as EKF and UKF can be used to estimate the new state vector. This approach is called joint estimation. JointEKF, jointUKF and KRJUKF are obtained by using the joint estimation concept.
3. Dual EKF Algorithm
In this approach, two separate EKFs are used. One EKF estimates the states while the other estimates the unknown parameters, although two EKFs operate simultaneously.
Fig. 1
shows how this algorithm works.
Schematic of DualEKF.
Possibility of convergence of dualEKF is less than jointEKF. In addition, lowering rank of used matrices can decrease burden of matrix's computational time, especially computation of inverse matrix. Suppose we have a discrete nonlinear dynamic system as follows:
Where Xk is the state vector,
U_{k} U_{k}
is the input,
P_{k}
is unknown parameter vector and
V_{k}
and
W_{k}
are the measurement and system independent white Gaussian noises, respectively. The initial condition for both filters will be set as follows:

Fork=1,2,…,the following are performed:

• Parameter measurement update

• State measurement update

Computation ofneeds recursive derivation calculations[22]:

If we suppose that the termis constant with respect to unknown parameters (P), then. This assumption is not really true, but is very accurate. So, we have a simple DualEKF[23]. If there is a sever nonlinearity, then EKF techniques which are based on linearization may lead to inaccurate estimation. JointUKF algorithm estimates more accurate estimations than others.
4. KRJUKF Algorithm
UKF is still only an approximate nonlinear estimator, in which mean and covariance matrix propagate with thirdorder accuracy. So, it contains systematic error due to higher orders
[13]
. To remove this error, BRR is used. At the heart of BRR, it is necessary to compute multidimensional integrals which are in the form of Equation (28). The stochastic integration rule (SIR) is suitable for calculation of integrals with the following form
[24]
:
where g
_{(⋅)}
is an arbitrary nonlinear function and
X
∈ ℝ
^{n}
is a random vector variable with Gaussian pdf, zero mean and finite covariance matrix
. In the following two forms of SIR are presented. After that, based on each of the SIR formulations, the corresponding KRJUKF algorithm is proposed.
 4.1 First form of SIR
In the first form, the number of iterations (
N_{max}
) is a predefined value:

1. Set initial value of the integral

2. ForN=1,2,…, Nmax perform the following:

• Generate a uniformly random orthogonal matrix.The random orthogonal matrix can be produced by using a product of appropriately chosen random reflections[24].

• Generate a random numberρ(N)from the chi distributionρ(N)=chi(n+ 2) (The matrix Ψ(N)and scalarρ(N)are regenerated in each iteration[24].)

• Compute 2npointsχi(N)and their weights:

whereSXis squareroot of the covariance matrix,PX=SXSTXand (ρ(N)SXΨ(N))iare the ith row of the matrixρ(N)SXΨ(N)

3. The value of integralμisComputation ofμusing the above algorithm can be shown as. Assume that we have a discrete nonlinear dynamic with equations (6) and (7) and linear measurement equation with measurement noise of equation (9):
 4.2 KRJUKF (Algorithm 1)
KRJUKF (Algorithm 1) which is based on the first form of SIR can be summarized as follows:

1. Primarily assumption will be as follows:

2. Fork=1,2,…, perform the following:
In Algorithm 1, the number
N_{max}
is assumed large enough without any optimization. So, the value of Gaussian integrals can be calculated with maximum accuracy. But, it is possible for the value of Gaussian integral which is calculated by SIR to diverge from its real value and too large value assumption for
N_{max}
increases computational time. The notations used in the first form of SIR and Algorithm 1 are defined in
Table 1
.
SIR algorithm and KRJUKF notation.
SIR algorithm and KRJUKF notation.
 4.3 Second form of SIR
In this algorithm, instead of using
N_{max}
, convergence error vector
specifies the number of iterations. Norm2 of convergence error vector is compared to a threshold convergence error (
ε
) . The iterations continue until norm2 of convergence error vector becomes greater than the threshold convergence error. Using this approach leads to consuming less computational time, but decreases the accuracy of estimation. The second form of SIR which is regarded as time optimized SIR is as follows:

1. Set initial value of the integral

2. Perform the following:

• Generate a uniformly random orthogonal matrix Ψ(N)

• Generate a random numberρ(N)from the chi distributionρ(N)=chi(n+ 2)

• Compute a set of points, their weights,J(N)andWhile

3. The value of integralμiswhereεis the threshold convergence error. A flowchart for the SIR algorithm is given inFig. 2. Computation ofμusing the above algorithm can be shown as:
Flowchart of first and second form of SIR.
 4.4 KRJUKF (Algorithm 2)
KRJUKF (Algorithm 2) can be represented based on the time optimized SIR:

1. Use Equation (36) for primary assumption.

2. Fork= 1,2,…, perform the following:

• Time update

• For measurement updating, use Eqs. (3941)
In several literatures, results demonstrate that the dual estimators can more effectively compute the system states in the case of unknown system parameters, compared to conventional ones
[25

29]
. Also, it is proved that the original UKF has a systematic error
[13
,
30]
. In order to relax this defect, the RUKF is presented. Therefore, one can conclude that the RUKF estimates the system states more accurately compared to original UKF. However, RUKF needs more computational burden due to its iterative algorithms. Therefore, it can be concluded that our proposed KRJUKF can estimate more accurately and more slowly than the original UKF.
5. System Dynamics
The chemical process employed in this paper is production process of propylene glycol in CSTR (Continuous Stirred Tank Reactor) with cooling jacket. In this CSTR, propylene oxide and water react in atmosphere pressure. The product of this reaction is propylene glycol. Since the reaction is exothermic, a coolant fluid circulates within the reactor jacket to maintain its temperature.
Fig. 3
shows a simple flowsheet diagram.
Flow sheet diagram of CSTR.
Mathematical model of the CSTR is given by four nonlinear differential equations as follows
[20]
:
The control input consists of the cooling water flowrate, feed flow and product flow. Unknown vector and state vector can be defined as
P
= [
x
_{5}
x
_{6}
]
^{T}
= [
UA_{j} E
]
^{T}
and
X
= [
x
_{1}
x
_{2}
x
_{3}
x
_{4}
]
^{T}
= [
C_{a} T_{r} T_{j} V_{r}
]
^{T}
. Therefore, state space equations can be written as:
where
W
_{1}
,
W
_{2}
,
W
_{3}
,
W
_{4}
and
R
are system and measurement noises. Definition of parameters is presented in
Table 2
. Values of covariance of measurement noises are also presented in
Table 3
.
CSTR Parameters.
Variance of measurement noises.
Variance of measurement noises.
6. Simulation Results
In this section, two simulations are presented to show the superiority of the proposed algorithms. The first experiment deals with a comparison of the proposed approach with other existing algorithms. The second example investigates and compares results of the two type of KRJUKF.
 6.1 Experiment 1
In Experiment 1, unknown parameters and states are estimated using jointEKF, dualEKF, jointUKF and KRJUKF (Algorithm 1). Measurement noise characteristics are given in
Table 3
. The number of repetitions was chosen as
N_{max}
=
40
. Values of MSE (Mean Square Error) of each state and also unknown parameters are presented in
Table 4
.
MSE of states.
Table 4
illustrates that KRJUKF can estimate the unknown states and parameters more accurately than the others.
Fig. 4
presents the time that each algorithm consumes per one stage for different initial values.
Fig. 4
shows that jointEKF is the fastest algorithm. The computational time of DualEKF is relatively the same as jointEKF. But KRJUKF needs more computational time than the other algorithms. The KRJUKF algorithm estimates are significantly more accurate compared to the other ones. Although it needs more computational time, but the time of the states and parameters estimation is of the order of 10
^{3}
seconds which makes the proposed algorithm suitable for online estimation.
Time of each algorithm.
Fig. 5

8
present the estimation error of each algorithm for each of states.
Error of state C_{a}.
Error of state T_{r}.
Error of state T_{j}.
Error of state V_{r}.
Figs. 5

8
show that the proposed approach greatly decreases the estimation error of the states compared to other algorithms. This is due to the usage of SIR to calculate the multidimensional Gaussian integrals appeared in the BRR algorithm.
Figs. 9

12
show the real and the approximate value of each state for KRJUKF (Algorithm 1).
Approximation of state C_{a} (KRJUKF Algorithm 1).
Approximation of state Tr (KRJUKF Algorithm 1).
Approximation of state Tj (KRJUKF Algorithm 1).
Approximation of state Vr (KRJUKF Algorithm 1).
Figs. 9

12
indicate that the proposed approach can effectively handle the state estimation issue of CSTR system with unknown system parameters.
 6.2 Experiment 2
In this experiment, the variance of measurement noise is given in
Table 5
. Unknown parameters and states were estimated by using two algorithms of KRJUKF. The number of repetitions is chosen as
N_{max}
=40 and let the convergence error vector
. Values of MSE of each state and unknown parameter and average time of each algorithm are given in
Table 6
.
Variance of measurement noise.
Variance of measurement noise.
MSE of states and average time per stage.
MSE of states and average time per stage.
Table 6
shows that the estimation accuracy of KRJUKF Algorithms 1 and 2 are relatively similar. Algorithm 2 needs less computational time than Algorithm 1. This is due to the usage of the threshold convergence error instead of using preknown number of repetitions.
Figs. 13

16
show the errors of Algorithms 1 and 2 for each of states. These figures indicate that the Algorithm 1 provides more accurate estimations compared to the Algorithm 2. This is due to the fact that the Algorithm 1 involves higher number of iterations in measurement and time update.
Error of state Ca (KRJUKF Algorithm 1 and 2).
Error of state Tr (KRJUKF Algorithm 1 and 2).
Error of state Tj (KRJUKF Algorithm 1 and 2).
Error of state Vr (KRJUKF Algorithm 1 and 2).
7. Conclusion
In this paper, a novel nonlinear dualestimation algorithm based on the fusion of the Kalman filter, randomized Unscented Kalman filter and dual estimation is proposed. The proposed algorithm is proper for time varying and severe nonlinear dynamics. Moreover, the computational time decreases in this approach compared to RUKF, which makes it suitable for online estimation. To show the estimation accuracy of the proposed approach, its performance is compared to the other existing dual estimators by applying the algorithms to a severe nonlinear exothermic CSTR with cooling jacket. The applied estimators are JointEKF, DualEKF, JointUKF and KRJUKF (Algorithms 1 and 2). Simulations show that KRJUKF (Algorithm 1) estimates more accurately than the others. This is due to the propagation of the mean and covariance through a nonlinear function using SIR algorithm; however, it needs more computational time. KRJUKF (Algorithm 2) is an optimized method of KRJUKF (Algorithm 1). The accuracy of Algorithm 2 is relatively equal to Algorithm 1 but needs less computational time.
BIO
Behrooz Safarinejadian He received his BS and MS degrees from the Electrical Engineering Department, Shiraz University, Shiraz, Iran, in 2002 and 2005, respectively. He received his Ph.D. degree from the Electrical Engineering Department, Amirkabir University of Technology, Tehran, Iran, in 2009. Since 2009, he has been with the Department of Control Engineering, Shiraz University of Technology, Shiraz, Iran. His research interests include computational intelligence, control systems theory, estimation theory, statistical signal processing, sensor networks and fault detection.
Navid Vafamand He received his BS and MS degrees from the Electrical Engineering Department, Shiraz University of Technology, Shiraz, Iran, in 2012 and 2014, respectively. His research interests include fuzzy model based control, linear matrix inequality (LMI) and adaptive control.
Tahersima Hanif
,
Saleh Mohammadjafar
,
Mesgarisohani Akram
,
Tahersima Mohammadhossein
2013
“Design of stable model reference adaptive system via Lyapunov rule for control of chemical reactor,”
3rd Australian Control Conference (AUCC)
Fremantle, WA
348 
353
Mansouri Majdi
,
Nounou Hazem
,
Nounou Mohamed
2013
“State estimation of a chemical reactor process model  A comparative study,”
10th Int. Multi Conf. Syst., Signals & Devices
1 
6
Nouou Hazem N.
,
Nounou Mohamed N.
2013
“Application of delaydependent adaptive control to a continuous stirred tank reactor,”
IEEE Symp. Comput. Intel. Cont. Auto. (CICA)
Singapore
140 
147
Simon Don
2006
“Optimal state estimation,”
John Wiley & Sons
New Jersey
Bellantoni J.
,
Dodge K.
1967
“A square root formulation of the KalmanSchmidt filter,”
AIAA Journal
5
1309 
1314
DOI : 10.2514/3.4189
Kalman Rudolph E.
1960
“A new approach to linear filtering and prediction problems,”
Trans. ASMEJ. Basic Eng.
35 
45
Romanenko Andrey
,
Castro Jose A.
2004
“The unscented filter as an alternative to the EKF for nonlinear state estimation: a simulation case study,”
Comput. Chem. Eng.
28
(3)
347 
355
DOI : 10.1016/S00981354(03)001935
Romanenko Andrey
,
Santos Lino O.
,
Afonso Paulo AFNA
2004
“Unscented Kalman filtering of a simulated pH system,”
Ind. Eng. Chem. Res.
43
7531 
7538
DOI : 10.1021/ie049899+
Merwe Rudolph Van der
,
Wan Eric A.
,
Julier Simon
2004
“Sigmapoint Kalman filters for nonlinear estimation and sensorfusionapplications to integrated navigation,”
AIAA
2004 
5120
Wan Eric A.
,
Merwe Rudolph Van der
2006
“The unscented Kalman filter for nonlinear estimation,”
Center for Spoken Language and Understanding, OGI School of Science and Engineering
http://cslu.cse.ogi.edu/nsel/ukf/
Wan Eric A.
,
Merwe Rudolph Van der
,
Nelson Alex T.
2000
“Dual estimation and the unscented transformation,”
Neural Inf. Proc. Syst.
MIT Press
Massachusetts, USA
12
666 
672
Mariani Stefano
,
Ghisi Aldo
2007
“Unscented Kalman filtering for nonlinear structural dynamics,”
Nonlinear Dyn.
49
131 
150
DOI : 10.1007/s1107100691189
Dunik Jindrich
,
Straka Ondrej
,
Simandl Miroslav
2011
“The Development of a Randomised Unscented Kalman Filter,”
Milano, Italy
18th IFAC World Congress
8 
13
Cox Henry
1964
“On the estimation of state variables and parameters for noisy dynamic systems,”
IEEE Trans. Auto. Cont.
9
5 
12
DOI : 10.1109/TAC.1964.1105635
Nelson Lawrence
,
Stear Edwin
1967
“The simultaneous online estimation of parameters and states in linear systems,”
IEEE Trans. Auto. Cont.
438 
442
Stubberud S. C.
,
Owen M.
1996
“Artificial neural network feedback loop with online training,”
Proc. IEEE. Int. Symp. Intell. Cont. Dearborn, August
514 
519
Wan Eric A.
,
Nelson Alex T.
1997
“Dual Kalman filtering methods for nonlinear prediction, estimation, and smoothing,”
Adv. in Neural Inf. Proc. Syst.
MIT Press
Cambridge, MA
9
Mariani Stefano
,
Corigliano Alberto
2005
“Impact induced composite delamination: state a parameter identification via joint and dual extended Kalman filters,”
Comput. Methods Appl. Mech. Eng.
194
5242 
5272
DOI : 10.1016/j.cma.2005.01.007
Czeczot Jacek
2006
“Balancebased adaptive control methodology and its application to the nonisothermal CSTR,”
Chem. Eng. Proc.
359 
371
Luyben William L.
2007
“Chemical reactor design and control,”
John Wiley & Sons
New Jersey
Kopp Richard E.
,
Orford Richard J.
1963
“Linear regression applied to system identification for adaptive control systems,”
AIAA Journal
1
(10)
2300 
2306
DOI : 10.2514/3.2056
Wan Eric A.
,
Nelson Alex T.
2001
Kalman filtering and neural networks
“Dual extended Kalman filter methods,”
123 
173
Khodadadi Hossein
,
JazayeriRad Hooshang
2011
“Applying a dual extended Kalman filter for the nonlinear state and parameter estimations of a continuous stirred tank reactor,”
Comput. Chem. Eng.
35
(11)
2426 
2436
DOI : 10.1016/j.compchemeng.2010.12.010
Genz Alan
,
Monahan John
1999
“A Stochastic Algorithm for High Dimensional Integrals over Unbounded Regions with Gaussian Weight,”
J. Comput. Appl. Math
112
(1)
71 
81
DOI : 10.1016/S03770427(99)002149
Bavdekar Vinary A.
,
Gopaluni R. Bhushan
,
Shah Sirish L.
2013
“Evaluation of Adaptive Extended Kalman Filter Algorithms for State Estimation in Presence of ModelPlant Mismatch”
10th IFAC Int. Symp. Dyn. Cont. Proc. Syst.
Mumbai, India
Samadi M.F.
,
Alavi S.M.
,
Saif M.
2013
“Online state and parameter estimation of the Liion battery in a Bayesian framework,”
American Control Conference (ACC)
Washington, DC
4693 
4698
Meskin Nader
,
Nounou Hazem
,
Nounou Mohamed
,
Datta A.
2013
“Parameter Estimation of Biological Phenomena: An Unscented Kalman Filter Approach,”
IEEE/ACM Trans. Comput. Biol. Bioinforma.
10
(2)
Meng Li
,
Li Liu
,
Veres S.M.
2010
“Aerodynamic Parameter Estimation of an Unmanned Aerial Vehicle Based on Extended Kalman Filter and Its Higher Order Approach,”
Adv. Comput. Cont. (ICACC), 2nd Int. Conf.
Shenyang, China
5
526 
531
Seung JiHoon
,
Lee DeokJin
,
Chong KilTo
2013
“Parameter Estimation Method for Coupled Tank System using Dual Extended Kalman Filter,”
13th Int. Conf. Cont., Auto. Syst.
Gwangju, Korea
1223 
1228
Straka Ondrej
,
Dunik Jindrich
,
Simandl Mioslav
2012
“Randomized unscented Kalman filter in target tracking,”
15th Int. Conf. Inf. Fusion (FUSION)
Singapore
503 
510