State Variable Estimation of Nonisothermal Continuous Stirred Tank Reactor Using Fuzzy Kalman Filter

Increasing safety and product quality, reducing manufacturing cost, minimizing the impact of environment in fault detection system for Nonisothermal Continuous Stirred Tank Reactor (CSTR) are the reason why accurate state estimation is needed. Kalman filter is an estimation algorithm of the stochastic linear dynamical system. Through this work, a modification of Kalman Filter that combines with fuzzy theory, namely Fuzzy Kalman Filter (FKF) is presented to estimate the state variable of Non-Isothermal CSTR. First, we approximate the nonlinear system of CSTR as piecewise linear functions and then change the crisp variable into the fuzzy form. The estimation results are simulated using Matlab. The simulation shows the comparison results, i.e computational time and accuracy, between FKF and Ensemble Kalman Filter (EnKF). The final result of these case shows that FKF is better than EnKF to estimate the state variable of Nonisothermal CSTR. The error estimation of FKF is 72.9% smaller for estimation of reactans concentration, 39.9% smaller for tank temperature, 76.47% smaller for cooling jacket temperature and the computational time of FKF is 76.47% faster than the computational time of EnKF.


State Variable Estimation of Nonisothermal Continuous Stirred Tank Reactor Using Fuzzy Kalman Filter
Risa Fitria and Didik Khusnul Arif Abstract-Increasing safety and product quality, reducing manufacturing cost, minimizing the impact of environment in fault detection system for Nonisothermal Continuous Stirred Tank Reactor (CSTR) are the reason why accurate state estimation is needed.Kalman filter is an estimation algorithm of the stochastic linear dynamical system.Through this work, a modification of Kalman Filter that combines with fuzzy theory, namely Fuzzy Kalman Filter (FKF) is presented to estimate the state variable of Non-Isothermal CSTR.First, we approximate the nonlinear system of CSTR as piecewise linear functions and then change the crisp variable into the fuzzy form.The estimation results are simulated using Matlab.The simulation shows the comparison results, i.e computational time and accuracy, between FKF and Ensemble Kalman Filter (EnKF).The final result of these case shows that FKF is better than EnKF to estimate the state variable of Nonisothermal CSTR.The error estimation of FKF is 72.9% smaller for estimation of reactans concentration, 39.9% smaller for tank temperature, 76.47% smaller for cooling jacket temperature and the computational time of FKF is 76.47% faster than the computational time of EnKF.
Index Terms-Continuous stirred tank reactor, estimation, fuzzy Kalman filter.

I. INTRODUCTION
C ONTINUOUS Stirred Tank Reactor (CSTR) is one of the most important tools in chemical manufacturing.In general, the reaction in the CSTR takes place in short time and only the stable components that could be observed.So that the estimation of the state variable in CSTR model is needed.Kalman filter is an algorithm to estimate the state variable of the stochastic linear dynamical system.This algorithm combines the mathematical model with the measurement data [1].The Kalman Filter has become a very useful tool to reduce the effect of Gaussian white noise and fuse together measurements within a linear system [2].Several works have used this filter to nonlinear system, such as the Nonisothermal CSTR models, so that it is required to modify the Kalman Filter algorithm.There are many modification of Kalman Filter algorithm, such as the Ensemble Kalman Filter (EnKF) [3], the Reduced Rank Square Root Covariance filter [4], the Square Root Ensemble Kalman Filter [5], Extended Kalman Filter, Unscented Kalman Filter and others.The modifications of Kalman Filter have been made to get a more accurate estimate and the shorter computing time.
The famous modification of Kalman Filter for nonlinear system is EnKF, it generates an ensemble value as initial estimation of state variable and an ensemble measurement data based on real measurement data [5].In previous research, the Reduce Rank of Ensemble Kalman Filter had been applied in the Nonisothermal CSTR [6], the result is the Reduced Rank Ensemble Kalman Filter can not be applied in this problem because the dimension of state variable is too less.
Other modification of Kalman Filter is Fuzzy Kalman Filter (FKF), that is an estimation method that combines the Fuzzy set with the Kalman Filtering [7].At the previous research, FKF method had been applied to estimate the Longitudinal Motion of Aircraft [8], the result is the FKF has better accuracy than conventional Kalman Filter, but the FKF needs more computational time than Kalman Filter.Other research also applied FKF to estimate the position of an Autonomous Underwater Vehicle (AUV) based on dynamical system of AUV motion.The FKF can be used as a controller of AUV based on the determined trajectories [9].
In this paper we study the efficiency of Fuzzy Kalman Filter to estimate the state variable of nonlinear dynamic stochastic system such as the Nonisothermal CSTR.The estimation results will be compared with the EnKF method in terms of error estimation and computational time.

A. Model of Nonisothermal Continuous Stirred Tank Reactor
Figure 1 is the Nonisothermal CSTR.The mathematical model of Nonisothermal CSTR by using coolant jacket dynamics, where the following reaction between Sodium Thiosulfate (Na 2 S 2 O 3 ) and Hydrogen Peroxide ( where U is the overall heat transfer coefficient, and A is area over which the heat is transferred.
In this paper we estimate the concentration of Sodium Thiosulfate, C A , temperature of tank reactor, T , and the temperature of cooling jacket, T j , if we can measure the concentration of reactance, C A , and temperature of tank reactor, T .

B. State Variable of Nonisothermal Continuous Stirred Tank Reactor
The estimation methods for state variable of Nonisothermal CSTR are FKF and EnKF.Explanation of each method is in the section C and D. Before we applied the FKF and EnKF to estimate the state variable of Non-Isothermal CSTR, we discretize (1) with respect to time t, by using the Forward Finite Difference Method.
T k and we obtain a discrete time nonlinear model dynamic system as follows: or we can rewrite (2) as, The model of Nonisothermal CSTR is not exactly same with the real system, there is a noise system that cannot be written in the model.So that (3) can be written as where w k is a noise system, which is a random vector drawn from Gaussian distribution with mean = 0 and covariance Q k [12].An observation equation is defined to make correlation between the state which we estimate and the observation model.The equation is as follows: with z k is the observation, H is a matrix representing the observation model, and v k is the observation noise, which is a random vector drawn from Gaussian distribution with mean = 0 and covariance R k [12].

C. Fuzzy Kalman Filter
Let S be a nonempty set and µ S be its associate confidence function, called membership function below.Denote the corresponding fuzzy set by [7].
S f = {s ∈ S|s has membership function µ S (.)} Fuzzy Kalman Filter (FKF) is an estimation method that combines the fuzzy set with the Kalman Filter.We generate the state variable of Nonisothermal CSTR using the Fuzzy set, and then the Kalman Filter is applied to estimate that state variable.The variables are concentration reactance, C A and temperature of tank, T .Each characteristic of these variables has value within a certain range (e.g., the concentration may be described as low or high) and these variables have many variability at different points in time.Fuzzy logics can help the researcher to write control statements to accommodate this variability [13].
Suppose, we have a dynamic stochastic system (4) and an observation (5).By using Fuzzy Kalman Filter method we estimate the state variables of (1) using the observation data (5).We apply the system model ( 2) into the form of fuzzy.The Fuzzy Kalman Filter steps are as follows: • Fuzzification Fuzzification is a process of changing the input of crisp variable form into fuzzy form (linguistic variable).It is generated by the fuzzy linear membership function.With the fuzzification process, the variable determined at each interval is as follows superscript minus means minimum interval and superscript plus means maximum interval.Thus, if x minimum then the membership function is, In general, the basic rule IFTHEN Fuzzy logic is given as follows: The general form of the equation system on the Kalman Filter algorithm is Matrix A and B are model of the system.In the FKF algorithm, the matrix A on the system is changed to be matrix A i .Matrix A i is derived from the basic rules of Fuzzy logic that has 4 rules namely i = 1, 2, 3, 4. The algorithm of FKF is as follows: a. System and measurement model c.The prediction step Error covariance : Kalman Gain : Error covariance : Estimation : • Deffuzification Defuzzification is a process of changing the form of the fuzzy sets as output fuzzy membership function to regain the crisp form.The final result of Fuzzy Kalman Filter estimation is calculated by using the formula of average weight [7], The weight ρ i is calculated as follows:

D. Ensemble Kalman Filter
The Ensemble Kalman filter is an estimation method for the nonlinear dynamic stochastic system.It generates an ensemble value as initial estimation of state variable and an ensemble measurement data based on real measurement data [5].By using EnKF method, the state variables (1) will be estimated using the observation data (5).The algorithm of the EnKF is [5] : • Initial estimation Generate the n-ensemble of the initial estimation with x 0,i ∼ N( x0 , P 0 ) and mean of the initial estimation is given by x 0,i • The prediction step Generate the n-ensemble for the state variable in the prediction step as follows: is the ensemble noise system.Mean of prediction step estimation is : Error covariance of prediction step estimation : • The correction step Generate the ensemble of measurement data, Kalman Gain : Estimation of correction step : Mean of correction step estimation : with the error covariance : Repeat and continue the algorithm until we get mean of correction step estimation as the result estimation.

III. RESULTS AND DISCUSSIONS
This section shows the estimation result of the FKF and EnKF algorithm.Here, we make a simulation using Matlab program.In this case, we use the initial value C A0 = 1 mol/L, T 0 = 275 K, and T j0 = 250 K.The process parameters are assumed to be known and given in Table I.
The model of Nonisothermal CSTR is the nonlinear model.We derive the state space based on that model.For the Ensemble Kalman Filter method, we use the nonlinear model system but for the Fuzzy Kalman Filter method, we approximated the nonlinear model as piecewise linear functions with modeling error of fuzzy variable, defined to be 5% as follows: Here we take measurement The root mean square error of C A is 0.000231, T is 0.003338, T j is 0.001589 for the Fuzzy Kalman Filter, whereas C A is 0.000853, T is 0.005566, T j is 0.006761 for the Ensemble Kalman Filter.The computational time for FKF is 0.424 sec and for EnKF is 1.706 sec.The other results of simulation are represented in Table II.
Table II shows the FKF needs less computational time than the EnKF and the FKF is more accurate than EnKF with taking ensemble 50 and 100.However, for ensemble 200, the estimation of tank temperature using EnKF is more accurate than estimation result using FKF although EnKF needs more computational time than FKF.

IV. CONCLUSIONS
From the simulation result and the analysis we conclude that both of the FKF method and EnKF method can applied to estimate the state variable of Nonisothermal CSTR, that is reactans concentration (C A ), tank temperature (T ), and cooling jacket temperature (T j ).The performance of each method is compared based on the accuracy and computational time of estimation.The error estimation of FKF is 72.9% smaller for C A estimation, 39.9% smaller for T , 76.47% smaller for T j and the computational time is 76.47% faster than the estimation results of EnKF.RMSE of FKF is smaller than RMSE of EnKF and computational time of FKF is less than EnKF.Hence, the Fuzzy Kalman Filter is better than the Ensemble Kalman Filter to estimate state variable of Nonisothermal CSTR for the reaction between Sodium Thiosulfate (Na 2 S 2 O 3 ) and Hydrogen Peroxide (H 2 O 2 ) in this case.

Rule 1 :
IF C − A and T − THEN A 1 Rule 2 : IF C − A and T + THEN A 2 Rule 3 : IF C + A and T − THEN A 3 Rule 4 : IF C + A and T + THEN A 4 • Fuzzy Kalman Filter Algorithm EnKF method, that means, based on the data of concentration, C A and the tank temperature, T we estimate the concentration, tank temperature, and cooling jacket temperature.Fig. 2−4 represent the Fuzzy Kalman Filter (FKF) and Fig. 5−7 represent the Ensemble Kalman Filter (EnKF) by taking ensemble 50.

TABLE I VALUES
OF PROCESS PARAMETER