[Computer Aided Chemical Engineering] 21st European Symposium on Computer Aided Process Engineering...

5
21 st European Symposium on Computer Aided Process Engineering – ESCAPE 21 E.N. Pistikopoulos, M.C. Georgiadis and A. Kokossis (Editors) © 2011 Elsevier B.V. All rights reserved. Receding Nonlinear Kalman (RNK) Filter for Nonlinear Constrained State Estimation Raghunathan Rengaswamy, a Shankar Narasimhan, b Vidyashankar Kuppuraj, a a Department of Chemical Engineering, Texas Tech University, 6 th street and canton, Lubbock , TX 79409, USA b Department of Chemical Engineering, Indian Institute of Technology Madras, Chennai 600036, India Abstract State estimation is an important problem in process operations. For linear dynamical systems, Kalman Filter (KF) results in optimal estimates. Chemical engineering problems are characterized by nonlinear models and constraints on the states. Nonlinearities in these models are handled effectively by the Extended Kalman Filter (EKF), whereas constraints pose more serious problems. Several constrained estimation problems where the EKF approach fails have been reported in the literature. To address this issue, receding horizon approaches such as the Moving Horizon Estimation (MHE) have been proposed. The MHE approach has been shown to provide the most reliable estimates in several example problems; albeit at a high computational price. Unlike the KF, the MHE formulation does not use an explicit predictor-corrector approach. In this paper, we study the following questions in nonlinear constrained state estimation: (i) can the EKF be extended to include a receding horizon in a simple intuitive fashion? (ii) are there any performance gains over an EKF due to a receding horizon? and, (iii) are there any computational gains over the standard MHE through such an extension? A Receding Nonlinear Kalman (RNK) Filter formulation is proposed to answer these questions. The RNK formulation follows a predictor-corrector approach and uses linearization of the state space model for covariance calculation much like the EKF approach. We demonstrate through examples that inclusion of a receding horizon improves performance over the standard EKF approach. We also discuss the computational properties of RNK in comparison with MHE. Keywords: State estimation; Constrained nonlinear estimation; Nonlinear optimization; 1. Introduction State estimation is an important problem in process operations. The Kalman Filter (KF) provides optimal estimates for linear systems. Most realistic chemical engineering systems are nonlinear. The Extended Kalman Filter (EKF) handles nonlinear process and measurement models by resorting to linearization for the propagation of error covariance matrix and Kalman gain computation. In addition to nonlinearity, constraints on state variables such as concentration pose serious problems. Ad-hoc modifications to the EKF to handle these constraints can lead to poor estimation results [1]. The nonlinearity and constraints on states can be effectively handled by posing the state estimation problem in an optimization framework. The Recursive Nonlinear Dynamic Data Reconciliation (RNDDR) [5] solves an optimization problem to yield estimates that obey constraints. The KF, EKF and RNDDR are recursive estimators. For nonlinear constrained problems, receding horizon approaches such as Moving Horizon Estimator

Transcript of [Computer Aided Chemical Engineering] 21st European Symposium on Computer Aided Process Engineering...

21st European Symposium on Computer Aided Process Engineering – ESCAPE 21 E.N. Pistikopoulos, M.C. Georgiadis and A. Kokossis (Editors) © 2011 Elsevier B.V. All rights reserved.

Receding Nonlinear Kalman (RNK) Filter for Nonlinear Constrained State Estimation

Raghunathan Rengaswamy,a Shankar Narasimhan,b Vidyashankar Kuppuraj,a aDepartment of Chemical Engineering, Texas Tech University, 6th street and canton, Lubbock , TX 79409, USA bDepartment of Chemical Engineering, Indian Institute of Technology Madras, Chennai 600036, India

Abstract State estimation is an important problem in process operations. For linear dynamical systems, Kalman Filter (KF) results in optimal estimates. Chemical engineering problems are characterized by nonlinear models and constraints on the states. Nonlinearities in these models are handled effectively by the Extended Kalman Filter (EKF), whereas constraints pose more serious problems. Several constrained estimation problems where the EKF approach fails have been reported in the literature. To address this issue, receding horizon approaches such as the Moving Horizon Estimation (MHE) have been proposed. The MHE approach has been shown to provide the most reliable estimates in several example problems; albeit at a high computational price. Unlike the KF, the MHE formulation does not use an explicit predictor-corrector approach. In this paper, we study the following questions in nonlinear constrained state estimation: (i) can the EKF be extended to include a receding horizon in a simple intuitive fashion? (ii) are there any performance gains over an EKF due to a receding horizon? and, (iii) are there any computational gains over the standard MHE through such an extension? A Receding Nonlinear Kalman (RNK) Filter formulation is proposed to answer these questions. The RNK formulation follows a predictor-corrector approach and uses linearization of the state space model for covariance calculation much like the EKF approach. We demonstrate through examples that inclusion of a receding horizon improves performance over the standard EKF approach. We also discuss the computational properties of RNK in comparison with MHE. Keywords: State estimation; Constrained nonlinear estimation; Nonlinear optimization;

1. Introduction State estimation is an important problem in process operations. The Kalman Filter (KF) provides optimal estimates for linear systems. Most realistic chemical engineering systems are nonlinear. The Extended Kalman Filter (EKF) handles nonlinear process and measurement models by resorting to linearization for the propagation of error covariance matrix and Kalman gain computation. In addition to nonlinearity, constraints on state variables such as concentration pose serious problems. Ad-hoc modifications to the EKF to handle these constraints can lead to poor estimation results [1]. The nonlinearity and constraints on states can be effectively handled by posing the state estimation problem in an optimization framework. The Recursive Nonlinear Dynamic Data Reconciliation (RNDDR) [5] solves an optimization problem to yield estimates that obey constraints. The KF, EKF and RNDDR are recursive estimators. For nonlinear constrained problems, receding horizon approaches such as Moving Horizon Estimator

(MHE) [1,3] generate robust estimates, albeit at a high computational cost. Since MHE solves an optimization problem, nonlinear process and measurement models and constraints are directly handled. The performance of MHE also depends considerably on the approach that is used to approximate the arrival cost [1]. The arrival cost summarizes the uncertainty in the state estimate at the first time instant of the time window under consideration. The decision variables of the optimization problem are the state estimate at the first instant, and the process and measurement noise variables. The use of process noise terms in the decision variables requires the inclusion of the state propagation model in the constraints. The nonlinear state propagation model inside an optimizer loop results in a tremendous computational burden since in most cases the integration of the process model has to be performed numerically. Unlike MHE, our proposed Receding Nonlinear Kalman (RNK) Filter [2] follows a predictor-corrector formulation and the decision variables of the optimization formulation in the correction step are the state variables in the horizon. In the prediction step, an open loop prediction of the state variables is performed and the covariance matrix of errors for the entire horizon is calculated through linearization of the nonlinear process model. In the correction step, an optimization problem is solved to update the predicted state estimates using measurements. As a result, the proposed approach does not require the nonlinear state propagation model within the optimization step. This results in a computationally efficient estimation approach. The proposed RNK estimator is described in section 2 and the efficacy of the proposed estimator is demonstrated through a challenging problem in Section 3. Conclusions are provided in section 4.

2. Receding Nonlinear Kalman Filter (RNK Filter) 2.1. Preliminaries The nonlinear state space and measurement models where kw and 1kv are the process and measurement noises respectively are

(1) 2.2. Receding Nonlinear Kalman (RNK) Filter The proposed RNK Filter follows the predictor-corrector framework. The filtered state estimate at k+mth where m is the horizon size is obtained by predicting the state estimates for instants from k+1 to k+mth instant. An optimization problem is solved in the correction step to correct for the predicted instants. Propagation step: Let | |,k k k kx P be the filtered state and error covariance matrix at kth instant respectively. Starting from kth instant, an open loop prediction of state estimates from k+1 to k+m are obtained by the state space model given in Equation 1. The predicted state estimates are denoted as 1| 2| |ˆ ˆ ˆ, , ,k k k k k m kx x x . The augmented state vector at k+mth instant is

( 1)

1

1 1 1

1 1

( ) ( )

( )

(0, )(0, )

k t

k k k k kk t

k k k

LB k UB

k k

k k

x x f x dt w F x w

y g x vx x x kw N Q

v N R

Receding Nonlinear Kalman (RNK) Filter for Nonlinear Constrained State Estimation

845

represented as 1 2, , ,k m k k k mX x x x . The predicted state estimates are

augmented as | 1| 2| |ˆ ˆ ˆ ˆ, , ,k m k k k k k k m kX x x x . The block error covariance

matrix of the augmented state vector is |aug

k m kP at k+mth instant is given by (2) Correction step: The predicted state estimates are corrected using measurements from k+1 to k+m instants. Let the augmented vectors be The augmented covariance matrix for measurement noise is

The optimization problem for state correction is

If , are Gaussian, the optimal estimates obtained are MLE. The optimal solution results in filtered estimate for k+mth instant and smoothed estimates (same as RTS smoother equations) for the other instants.

Covariance correction step:

The covariance correction is similar to EKF and involves linearization of the measurement model g(x). The linearized measurement matrix at k+jth instant is denoted as |k j k mC and the augmented linearized measurement matrix is denoted by augC . The covariance correction is given by

For unconstrained linear state and measurement model, the RNK solution is the same as the KF solution for any choice of window size.

( )expm |kk x

f xA tx

| | |

| 1 | 1

| | 1

ˆ ˆ( , ) ( )( )

( , ) ( 1, 1)

( , ) ( , 1)

aug Tk m k i i k j j k

aug aug Tk m k i k m k i

aug aug Tk m k k m k j

P i j E x x x x

P i i A P i i A Q

P i j P i j A

1 1| |

1 1

ˆ ˆ

( ) ( )

TT T

k k k k m k m k

TT Tk k k m k m

x x x x

y g x y g x

0 00 0

0 0

p p p p p p

p p p p p paug

p p p p p p

RR

R

R

1 1

, 1:|min

. .k i i m

T aug T augk m kx

P R

s t , 1:LB k i UBx x x i m

1

| |

| |

T Taug aug aug aug aug aug augk m k k m k

aug aug aug augk m k m k m k

K P C C P C R

P I K C P

Raghunathan Rengaswamy et al.846

Linear measurement model:

When the measurement model is linear, it can be shown that the RNK filter correction step is a Quadratic Programming (QP) problem.

3. Example We demonstrate the performance of the proposed estimator on a nonlinear polystyrene reactor example that is representative of systems that are commonly encountered in chemical engineering [4]. In the original problem there are eight states

0 1 2, , , , , , ,i s m jX C C C T T and two measurements 2 1, /T . The state

space model is severely nonlinear and one of the measurements is also nonlinear. The detailed model equations and parameter values can be found in [4]. The nominal values of the state variables are different by orders of magnitude. This leads to scaling issues and makes this problem even more challenging. While we performed several simulation studies, in this section, we present one representative simulation example that demonstrates the robustness of the proposed estimator. In this example, the system is perturbed from steady-state through a pulse disturbance of magnitude 55 10 from 300 to 450 seconds in the input variables and i cQ Q . The states were scaled using the difference between the upper and lower bounds. The output variables were scaled using their nominal values. The other estimator parameters are chosen as

4 4 602min, 1 (8,8), 1 (8,8), 1 (2,2)t P e I Q e I R e I where I(m;m) represents

an identity matrix of dimension m m . In the RNK filter the disturbance variables are augmented to the state vector. This leads to a ten state variables problem. The aim of the estimator is to reconstruct the ten states using two measurements. The estimates for all the states and disturbances are shown in this Figure 1. It can be seen that all the states are estimated quite well. When the window size was increased from one to three it is seen that the estimation results improve. The simulations were also run for a window size of 10 (computational time of 43.2s/sampling instant), but the performance gains over window size three were marginal. The MHE with integration within the optimizer would be computationally much worse for these types of nonlinear problems. Further, the standard recommendation of window sizes twice the order of the system would require that a problem with window size 20 be solved. This will become even more computationally intractable.

4. Conclusions A new receding horizon RNK filter for constrained nonlinear estimation problems is proposed. The predictor-corrector formulation decouples the numerical integration from optimization loop thereby reducing computational burden. For linear measurement models (with the state propagation model being nonlinear) the proposed estimator results in a QP problem, whereas MHE will be a NLP problem. The efficacy of the proposed approach was demonstrated using a challenging nonlinear chemical engineering example. References:

1. Haseltine, E.L., and Rawlings, J.B. (2005), Critical Evaluation of Extended Kalman Filtering and Moving Horizon Estimation, Industrial and Engineering Chemistry Research, 44, 2451-2460.

Receding Nonlinear Kalman (RNK) Filter for Nonlinear Constrained State Estimation

847

2. Rengaswamy, R., Narasimhan, S., Kuppuraj, V., (2010), Receding-Horizon Nonlinear Kalman Filter for State Estimation, under review, 2011

3. Robertson, D.G., Lee, J.H., and Rawlings, J.B. (1996), A Moving horizon based approach for least squares estimation, AIChE Journal, 42, 2209-2224.

4. Tatiraju, S., Soroush, M., and Ogunnaike, B.A. (1999), Multirate Nonlinear State Estimation with Application to Polymerization Reactor, AIChE Journal, 45, 769-780.

5. Vachhani, P., Rengaswamy, R., Gangawal, V., and Narasimhan, S. (2005), Recursive estimation in constrained nonlinear dynamic systems, AIChE Journal, 51, 946-959.

Figure 1: Results for polystryrene reactor

Raghunathan Rengaswamy et al.848