A New Constrained State Estimation Method Based on Unscented H ∞ Filtering

Featured Application: This work can be applied to online estimation of state of charge for Li-ion batteries and other state estimation applications with constraints. Abstract: The unscented Kalman ﬁlter (UKF) is widely used in many ﬁelds. When the unscented Kalman ﬁlter is combined with the H ∞ ﬁlter (HF), the obtained unscented H ∞ ﬁltering (UHF) is very suitable for state estimation of nonlinear non-Gaussian systems. However, the application of state estimation is often limited by physical laws and mathematical models on some occasions. The standard unscented H ∞ ﬁltering always performs poorly under this situation. To solve this problem, this paper improves the UHF algorithm based on state constraints and studies the UHF algorithm based on the projection method. The standard UHF sigma points that violate the state constraints are projected onto the constraint boundary. Firstly, the paper gives a broad overview of H ∞ ﬁltering and unscented H ∞ ﬁltering, then addresses the issue of how to add constraints using the UHF approach, and ﬁnally, the new method is tested and evaluated by the gas-phase reversible reaction and the State of Charge (SOC) estimation examples. Simulation results show the validity and feasibility of the state-constrained UHF algorithm.


Introduction
The Kalman filter (KF) was proposed by Rudolph E. Kalman in the 1960s to solve discrete-time linear filtering problems [1], which is a recursive filter based on the minimum mean-square-error (MMSE) criterion. The Kalman filter has been widely used in navigation systems [2], robot motion planning [3], target tracking [4], state of charge (SOC) estimation [5], etc. The Kalman filtering method is described by the state transition model and measurement model. The state transition model is responsible for projecting the current state estimate ahead in time [6]. The measurement model adjusts the projected estimate by an actual measurement at that time. The models are listed as follows [7]: where k is the index, x k is the unobserved state of the system, y k is the measurement, w k is the process noise and v k is the measurement noise. A k , B k , C k are the state transition matrix, the control input matrix, and the measurement matrix, respectively. However, traditional KF can only deal with linear systems [8]. In practical applications, nonlinear systems often appear. In order to apply Kalman filtering to nonlinear systems, some improved methods have been proposed. Bucy et al. [9] proposed the extended Kalman filter (EKF) to deal with nonlinear cases. S.J. Julier and J.K. Uhlmann et al. [6] proposed the Unscented Kalman Filter (UKF). The EKF is uncomplicated and widely used in various fields. However, the EKF has limitations when it is applied to nonlinear systems. It first needs to linearize the system using a 1st-order truncation of the multi-dimensional Taylor series expansion, which introduces significant errors. In contrast to the EKF, true nonlinear models are used in UKF, and they are similar to the distribution of the random state variables. The UKF approximates the parameter distribution with discrete sigma points by the Unscented Transform (UT) and propagates them through the original nonlinear system [10].
The UKF method needs an accurate system model and perfect knowledge of the noise statistics [6]. Different from the UKF, H∞ filtering (HF) requires no a priori knowledge of the noise statistics but instead requires knowledge of finite bounded energies [11]. H∞ filtering aims to minimize the effect of the worst possible disturbances on the estimation errors [12]. However, H∞ filtering is used for linear systems. It can be applied to nonlinear systems when it is combined with the EKF and UKF, which forms the Extended H∞ filtering (EHF) and the Unscented H∞ filtering (UHF). The authors of [13] propose an H∞ extended Kalman filtering (HEKF) based on the robust control theory, and numerical results on the IEEE 39-bus system demonstrate the effectiveness of the HEKF. Zhao, Junbo et al. [14] combined H∞ filtering with the UKF to process the state estimator of the power system by integrating robust statistics and robust control theory. It is more robust against model uncertainty. The performance of the new filter is better.
In some applications, state variables are often accompanied with many constraints, such as the route limitation and the mass conservation law in electronic navigation. Adding these constraints to the Kalman filter can effectively improve the estimation accuracy. This paper focuses on the state estimation problems with constraints. A new constrained state estimation method based on unscented H∞ filtering is proposed.

The Principle of the H-Infinity Filter
H∞ filtering, whose another name is the minimax filter, does not make any assumptions about the noise, and it minimizes the worst-case estimation error (hence the term minimax) [15]. The mathematical model of H∞ filtering is as follows: where x k and y k are the state vector and the measurement vector at time k, respectively. f and h are the system dynamics and observation functions, respectively. w h,k and v h,k are noise terms, which are assumed to be independent and identically distributed with zero mean and covariance matrices Q h,k and R h,k , respectively. z k is a linear combination of various components of the system state, which is to be estimated. L k is a custom matrix and is usually assumed to be fully-ranked. The H∞ filter must ensure that the upper bound of its estimation error is limited, and at the same time minimizes the upper bound. The cost function is as follows: where x 0 and P 0 are the initial state vector and its covariance matrix, respectively. γ is a positive scalar parameter that bounds the uncertainties [13]. J is a threshold value used to evaluate the performance index of the H∞ filtering. H∞ filtering aims to minimize the maximum value of J as follows [12]: The steps of H∞ filtering are as follows [16]: where F k−1 and H k are the Jacobian matrices of the nonlinear functions f and h. The matrix R e,k is given by

The Principle of the Unscented H∞ Filter
The UKF is a recursive MMSE estimator based on the optimal Gaussian approximation Kalman filter framework [17]. The UKF does not require model linearization, but performs a direct estimate of the state propagation using a set of deterministically selected sample points. A set of 2L+1 sigma points are chosen to capture the true mean and covariance of the prior random variable x k . The nonlinear filtering problem is depicted in a discrete-time state-space form as follows.
where f and h are the nonlinear functions that describe the process and measurement models; x k is the system state vector, y k is the measurement vector, u k is the system input vector; w k and v k are the system process and measurement noise, respectively, which are assumed to be independent and identically distributed with zero mean and covariance matrices Q k and R k , respectively. Since the statistical characteristics of the system noises are usually unknown or inaccurate in practical applications, the traditional UKF faces uncertain interference, which always performs poorly. Unscented H∞ filtering (UHF) is an improvement to the UKF. The UHF updates the estimation error covariance through auto adjustment of the measurement error covariance by selecting a proper scalar parameter γ, as shown in Equation (32). The UHF includes two steps of time update and measurement update. The time update equation will get 2L+1 sigma points. The current state and the estimated value of the covariance are obtained by the unscented transform (UT), which constitutes the prior state of the next moment. The idea of a linear combination of the Kalman filter combines the measured value with the preceding value. The error covariance is corrected by H∞ filtering to obtain the best estimate of the state. The specific UKF algorithm steps are as follows: where the Q k and R k are the system process noise and measurement noise covariance. In the UKF, the effective vector of this augmented state is x a k = [x k w k v k ] T , the superscript "a" here means the new state is an "augmented" state. It consists of a target state vector, process noise and observation noise.
To calculate the sigma points and weights: Generate 2L+1 Sigma points: The weights are determined as follows: where ( (L + λ)P k−1 ) i denotes the i-th column of the square root of the matrix [18]. λ is a compound scaling parameter,λ = α 2 (L + κ) − L; L is the dimension of the state variable; α is a scale parameter, which is generally a small positive value and determines the distribution of the sigma points [19]; β is a non-negative weighting term that affects the weight of the sigma points used for covariance calculations and can be set to 2; κ is a scale parameter, which is usually greater than or equal to 0 to ensure the positive definiteness of i are the weights of the state and covariance, respectively. (2) Time updating: (3) Measurement updating: The UHF can be regarded as applying the unscented transform to the EHF structure [12]. The measurement covariance and cross-correlation covariance can be approximated as: We then haveŷ where and where ρ is a scalar larger than one, and it is a tuning parameter to balance the tradeoff between the H-infinity performance and the minimum variance performance. If ρ tends to infinity, the UHF reduces to the standard UKF. On the contrary, as long as ρ is not very large, the UHF always achieves an excellent performance.

State Estimation under Constraints
The classical Kalman filter (KF) provides optimal state estimates under Gaussian disturbances and linear model assumptions [20]. In practice, however, the system state vector may need to satisfy an inequality or an equality constraint [21]. For example, the liquid height limitation, the mass of conservation and the state of charge of lithium-ion batteries should be in the range of 0 and 1, the species concentrations are nonnegative in a chemical reaction, etc. Constraint handling has become an integral part of any practical state estimation.
The process model and measurement model of the system are shown in Equations (14) and (15). The state may need to satisfy some equality constraints D k x k = d k , or some inequality constraints D k x k ≤ d k , where D k is a known constraint matrix and d k is a known constraint vector. For any k ≥ 0, this paper assumes that the D k matrix is fully-ranked, and d k is a constraint vector. The constrained state estimation problem is to estimate the state in Equations (14) and (15) under the condition that the constraints are satisfied. We utilize the UHF for the constrained state estimation problem to improve the state estimation accuracy by minimizing the error function according to an additional constraint, e.g., D k x k = d k .
The solution to the estimation of the constrained state x k can be formulized by [11] min J( where W is a positive definite weighting matrix, x k is the state without the constraint,x k is the estimated state with the constraint. The constrained optimization problems can be solved using the Lagrange multiplier method as follows: Equation (35) is the most general approach to the problem. This method of embedding the constraints into the Kalman filtering framework to correct the state estimation is usually called the projection algorithm, which is applied to project the current state estimation to the constraint subspace in order to satisfy the equality constraints in the system. The projected value will be closer to the true value, as shown in Figure 1. The shading surface denotes the state constraint region. The UHF algorithm generates sigma points according to the unscented transform, and each sigma point corresponds to a possible state trajectory. If the constraint condition is not met, it can be brought into the most probable position in the constraint region according to the projection algorithm [11]. Points that are already within the constraints remain unchanged. In summary, the flow chart of the UHF algorithm under constraints is shown in Figure 2.

A Reversible Reaction Example
Consider the gas-phase, reversible reaction [22][23][24] and reaction rate r = k r P 2 It is assumed that the ideal gas law holds (high temperature, low pressure) and that the reaction occurs in a well-mixed, isothermal batch reactor [24]. From first principles, the model of the system can be discretized as follows: The state vector is defined as: where P A , P B are the partial pressures. k r represents the rate constant for reaction. The measurement vector is defined as: The UHF algorithm is estimated under the constraint state, and the initial values are set as follows [23]: The lower bound of the state is set to 0 0 T , the upper bound of the state is set to ∞ ∞ T , and the initial state is set tox 0 = 0.1 4.5 T . Note that the partial pressures P A , P B may allow negative concentration mathematically, whilst this is not physically possible, so we set the lower bounds of [0, 0] T for them. On the other hand, the partial pressures can be as large as possible in real applications, so we just set the upper bounds of [∞, ∞] T for them, which presents no problems because they can converge to their true values quickly if a proper algorithm is utilized. The state of the update is evaluated at each iteration to satisfy the above constraints.
The estimation results for the unconstrained UHF and the constrained UHF are shown in Figure 3a,b, respectively. It can be seen from Figure 3a that the unconstrained UHF estimates become negative (meaning negative concentrations), which is physically impossible. The UHF with a constrained projection method can obtain more accurate estimation results. All the constrained UHF estimated values are positive. From Figure 3b, it clear that it takes a longer time for the unconstrained estimate to converge. The constrained UHF converges faster than the unconstrained UHF, and it can converge to the real state at t = 1 s. A summarization of the unconstrained UHF and the constrained UHF are given in Table 1. The results from this example confirm that the proposed constraint handling method in this paper is effective.

State of Charge Estimation for LITHIUM-Ion Batteries
The proposed methods are applied to the SOC estimation for a lithium battery. The models are listed as follows [25]: State model: Measurement model: where x k is the SOC at iteration k. When x k = 1 represents the battery being fully charged, and x k = 0 represents the battery being fully discharged, the state variable x k should be limited between 0 and 1. i k is the battery current. ∆t is the sampling interval and usually equals one. η is the proportion coefficient, which describes the significant influence of the discharging rate to the SOC. Q n is the nominal capacity of the battery. y k is the measured value of the battery terminal voltage. R is the battery internal resistance, P = [K 0 , R, K 1 , K 2 , K 3 , K 4 ] T represents the model parameters which can be determined by the least square method [7,26]. Once the model parameters are obtained, they are fixed and used for all batteries of this type.
The proposed algorithm is tested on a Lithium battery with a nominal capacity of 15 Ah and a nominal voltage of 3.2 V, manufactured by Wanxiang Group. The model parameters in Equation (49) were obtained as in Table 2. In order to simulate the real working states of the battery, two driving cycles, Highway Fuel Economy Driving Schedule (HWFET) and United States Advanced Battery Consortium (USABC), are applied to the Lithium battery. The test temperature is 25 • C and the sampling time is 1 s. The battery current measured in the HWFET is shown in Figure 4a, and the battery current measured in the USABC is shown in Figure 4b.
The proposed method is applied to the SOC estimation in the HWFET and USABC. The initial state covariance is set to 0.01. The process noise covariance is set to 0.01 and the measurement noise covariance is set to 1.0 × 10 −6 . The initial value of the battery SOC is set to 0.8. The initial value of the real SOC is 1. In the SOC estimation example, the generated sigma points which are greater than 1 will be projected onto the constraint boundary. The SOC estimation results and errors of different methods under the same conditions are shown in Figures 5 and 6, respectively. Tables 3 and 4 show the data of the mean square errors (MSE), the maximum errors, and the convergence time of different methods. The following conclusions can be obtained from the results: (1) the constrained UHF has better SOC estimation accuracy than the unconstrained UHF and the UKF; (2) the SOC estimation error of the constrained UHF distributes in a small region near zero, which shows the excellent stability of the proposed algorithm; (3) the constrained UHF has a faster convergence rate.
By comparing the state estimation errors in Tables 3 and 4, we may also conclude that the factor most influencing the performance of the constrained and unconstrained state estimation methods is the system dynamics. For the system with less dynamic changes, the proposed constrained method can obtain more performance improvement than the unconstrained method (please note that the HWFET driving cycle in Figure 4a has more stationary current than the USABC driving cycle in Figure 4b, and the maximum SOC estimation error of the two methods decreases from 2.46% to 1.60% for the HWFET cycle, while it decreases from 3.61% to 3.55% for the USABC cycle, which is much less).

Conclusions
In this paper, a constraint handing method is proposed for Unscented H∞ filtering (UHF). The method applies the projection to the sigma points. The points that do not satisfy the condition are projected into the feasible domain. It can arbitrarily constrain the state in the estimation process. Compared with the unconstrained UHF algorithm, the UHF algorithm in the constrained state performs better, which significantly improves the estimation accuracy of the filter.