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 .This is the idea of the extended Kalman filter (EKF), which was originally proposed by Stanley Schmidt , so that the Kalman filter can be applied to nonlinear problems . Since EKF estimates mean and covariance using first-order 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 . 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 .
In addition, most processes have time-varying dynamics or unknown parameters, and since both the EKF and UKF are model-dependent 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 state-space representation , which is mentioned for linear dual Kalman. Another approach suggests two independent KFs . These works have considered problem of state estimation in linear systems. Joint-EKF was suggested to model unknown parameters in a model reference adaptive control framework . Dual-EKF  was a nonlinear extension of the linear dual Kalman approach. Although these filtering techniques have shown to perform better than the EKF , 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 stirred-tank reactor) is one of the significantly investigated benchmarks for nonlinear estimation . Nonlinear functions describing a CSTR are generally of exponential form due to the Arrhenius dependence of reaction rate on temperature .
In this paper, a new algorithm called KR-JUKF is presented. The KR-JUKF 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 KR-JUKF 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 KR-JUKF 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 Joint-EKF and Joint-UKF are presented. The next section represents the algorithm of dual-EKF. In section 4, KR-JUKF 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 . Parameter estimation was presented by Kopp and Orford . In this approach, unknown parameters are transformed into a new state by combining the states with parameters. Suppose that we have continuous-time 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. Joint-EKF, joint-UKF and KR-JUKF 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.
Fig. 1.Schematic of Dual-EKF.
Possibility of convergence of dual-EKF is less than joint-EKF. 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, Uk Uk is the input, Pk is unknown parameter vector and Vk and Wk are the measurement and system independent white Gaussian noises, respectively. The initial condition for both filters will be set as follows:
For k = 1,2,…, the following are performed:
• Parameter time update
• State time update
• Parameter measurement update
• State measurement update
Computation of needs recursive derivation calculations :
If we suppose that the term is constant with respect to unknown parameters (P), then . This assumption is not really true, but is very accurate. So, we have a simple Dual-EKF . If there is a sever nonlinearity, then EKF techniques which are based on linearization may lead to inaccurate estimation. Joint-UKF algorithm estimates more accurate estimations than others.
4. KR-JUKF 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 . 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 :
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 (Nmax) is a predefined value:
1. Set initial value of the integral 2. For N=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 . • Generate a random number ρ(N) from the chi distribution ρ(N) = chi(n + 2) (The matrix Ψ(N) and scalar ρ(N) are regenerated in each iteration .) • Compute 2n points χi(N) and their weights:
where SX is square-root of the covariance matrix, PX = SXSTX and (ρ(N)SXΨ(N))i are the ith row of the matrix ρ(N)SXΨ(N)
• Compute J(N) and
3. The value of integral μ is Computation 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 KR-JUKF (Algorithm 1)
KR-JUKF (Algorithm 1) which is based on the first form of SIR can be summarized as follows:
1. Primarily assumption will be as follows:
2. For k= 1,2,…, perform the following:
• Time update
• Measurement update
In Algorithm 1, the number Nmax 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 Nmax increases computational time. The notations used in the first form of SIR and Algorithm 1 are defined in Table 1.
Table 1.SIR algorithm and KR-JUKF notation.
4.3 Second form of SIR
In this algorithm, instead of using Nmax, convergence error vector specifies the number of iterations. Norm-2 of convergence error vector is compared to a threshold convergence error (ε) . The iterations continue until norm-2 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) and While 3. The value of integral μ is where ε is the threshold convergence error. A flowchart for the SIR algorithm is given in Fig. 2. Computation of μ using the above algorithm can be shown as:
Fig. 2.Flowchart of first and second form of SIR.
4.4 KR-JUKF (Algorithm 2)
KR-JUKF (Algorithm 2) can be represented based on the time optimized SIR:
1. Use Equation (36) for primary assumption. 2. For k = 1,2,…, perform the following: • Time update
• For measurement updating, use Eqs. (39-41)
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 KR-JUKF 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 flow-sheet diagram.
Fig. 3.Flow sheet diagram of CSTR.
Mathematical model of the CSTR is given by four nonlinear differential equations as follows :
The control input consists of the cooling water flowrate, feed flow and product flow. Unknown vector and state vector can be defined as P = [x5 x6]T = [UAj E]T and X = [x1 x2 x3 x4]T = [Ca Tr Tj Vr]T . Therefore, state space equations can be written as:
where W1, W2, W3, W4 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.
Table 2.CSTR Parameters.
Table 3.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 KR-JUKF.
6.1 Experiment 1
In Experiment 1, unknown parameters and states are estimated using joint-EKF, dual-EKF, joint-UKF and KRJUKF (Algorithm 1). Measurement noise characteristics are given in Table 3. The number of repetitions was chosen as Nmax=40. Values of MSE (Mean Square Error) of each state and also unknown parameters are presented in Table 4.
Table 4.MSE of states.
Table 4 illustrates that KR-JUKF 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 joint-EKF is the fastest algorithm. The computational time of Dual-EKF is relatively the same as joint-EKF. But KR-JUKF needs more computational time than the other algorithms. The KR-JUKF 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.
Fig. 4.Time of each algorithm.
Fig. 5-8 present the estimation error of each algorithm for each of states.
Fig. 5.Error of state Ca.
Fig. 6.Error of state Tr.
Fig. 7.Error of state Tj.
Fig. 8.Error of state Vr.
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 multi-dimensional Gaussian integrals appeared in the BRR algorithm. Figs. 9-12 show the real and the approximate value of each state for KR-JUKF (Algorithm 1).
Fig. 9.Approximation of state Ca (KR-JUKF Algorithm 1).
Fig. 10.Approximation of state Tr (KR-JUKF Algorithm 1).
Fig. 11.Approximation of state Tj (KR-JUKF Algorithm 1).
Fig. 12.Approximation of state Vr (KR-JUKF 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 KR-JUKF. The number of repetitions is chosen as Nmax=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.
Table 5.Variance of measurement noise.
Table 6.MSE of states and average time per stage.
Table 6 shows that the estimation accuracy of KR-JUKF 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 pre-known 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.
Fig. 13.Error of state Ca (KR-JUKF Algorithm 1 and 2).
Fig. 14.Error of state Tr (KR-JUKF Algorithm 1 and 2).
Fig. 15.Error of state Tj (KR-JUKF Algorithm 1 and 2).
Fig. 16.Error of state Vr (KR-JUKF Algorithm 1 and 2).
In this paper, a novel nonlinear dual-estimation 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 Joint-EKF, Dual-EKF, Joint-UKF 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 KR-JUKF (Algorithm 1). The accuracy of Algorithm 2 is relatively equal to Algorithm 1 but needs less computational time.