Second-Order EKF White Noise Estimator Design for Hybrid Systems

: The extended Kalman ﬁlter (EKF) has a wide range of applications (especially in power battery management systems) with a rapidly increasing market share. It aims to minimize the symmetric loss function (mean square error) and it has high accuracy and efﬁciency in battery state estimation. This study deals with the second-order extended Kalman ﬁlter-based process and the measurement white noise estimation problem for nonlinear continuous-discrete systems. The design of the white noise ﬁlter and smoother were, ﬁrstly, converted into a linear estimation problem by the second-order Taylor series expansion approximation and the function that makes the second-order term approximately equivalent to the estimation error variance. Secondly, based on the projection formula of the Kalman ﬁltering (KF) theory and the Lemma of expectation for quadratic and quartic product traces of random vectors, the second-order EKF was derived. Then, to generate white noise estimators in the forms of ﬁltering and smoothing, we derived a recursive solution, using an innovation method. Finally, a numerical example is given to show the effectiveness of the proposed method.


Introduction
Process and measurement noise estimation is a task worthy of attention, and it has wide applications in many fields, such as battery condition estimation, multifrequency signal estimation, oil seismic exploration, and image processing [1][2][3][4][5]. Based on error covariance-matrix information, the process white noise estimator was proposed by theKF approach [4]. G. Z. Dai and J. Mendel pioneered the study of white noise estimation with application in oil exploration [6]. For the linear discrete time-varying stochastic system (multi-model and multi-sensor), the optimal weight fusion Kalman estimator and white noise deconvolution were given, respectively [7]. A unified white noise estimate theory based on a modern time series analysis approach was presented, which included a process and measurement white noise estimator design, and proposed a new approach for steady-state optimal state estimation [8]. For linear discrete-time non-Gaussian systems, according to the polynomial filtering theory, a solution to the quadratic estimation problem of non-Gaussian noise was given in [9]. H. Zhao and Z. Li presented a novel Kalman-like nonlinear non-Gaussian noise estimation method based on the packet dropout probability distribution and polynomial filtering technique [10]. W. Liu and Z. Deng solved the design problem of robust white noise deconvolution estimators for a class of uncertain systems with missing measurements, uncertain noise variances, and linearly correlated white noises [11]. The innovation method for the linear least squares estimation problem was extended by T. Kailath to deal with nonstationary continuous time processes on the finite time domain [12]. The nonlinear system is approximated to the linear system by real-time linear Taylor approximation; EKF is designed based on KF. This is the idea of the EKF, which was originally proposed by Stanley Schmidt, so that the Kalman filter could be applied to nonlinear spacecraft navigation problems [13]. It can be seen from the above discussion that the research on white noise estimation of linear systems has been relatively mature, but there are few studies on the white noise estimation of nonlinear systems; reports on the white noise estimation of continuous discrete hybrid nonlinear systems are even less.
In recent years, state estimator designs for nonlinear system have been actively researched [14,15], and the second-order EKF was better than the first-order EKF in this area [16,17]. D. Simon presented the continuous-discrete system EKF (also called hybrid system EKF) [18]. M. De la Sen and N. Luo dealt with the design of linear observers for a class of linear hybrid systems. Moreover, such systems were composed of continuous-time and digital substates [19]. In order to solve the estimation problem of continuous-discrete linear systems with parametric uncertainties, V. Shin, D. Y. Kim et al. proposed a novel suboptimal filter by summing the local KF with weights, depending only on time instants [20]. For nonlinear hybrid stochastic systems, G.Y. Kulikov and M.V. Kulikova Gennady proposed a novel square root algorithm in order to solve the lack of square root implementation within the high-degree cubature KF [21]. In [22], the authors presented the derivation of the dynamical equations of a second-order filter, which estimated the states of the nonlinear system on the base of discrete noisy measurements. For the state of charge estimation of the lithium-ion battery in the linear hybrid systems, the authors of [23] proved that the second-order EKF could improve the estimation effect compared with the first-order EKF. Y. Wang and H. Zhang proposed the accurate Gaussian sum-smoothing method, which was derived by extended-cubature Kalman filters to approximate the non-Gaussian estimation densities as a finite number of weighted sums of Gaussian densities [24].
To the authors' knowledge, the study of white noise estimation based on second-order EKF for hybrid systems has not been reported. Thus, we discuss the second-order EKFbased white noise estimation problem for a nonlinear hybrid system in this paper. The estimation problem is aimed to minimize a symmetric loss function (mean square error). By the second-order Taylor series expansion approximation, the function that makes the second-order term approximately equivalent to the estimation error variance and projection formula, and the second-order EKF formula, are derived. The Lemmas of expectation for quadratic and quartic product traces of random vectors are proved in detail by using the knowledge of probabilistic property analysis. Then, the continuous process white noise estimator and the discrete measurement white noise estimator are calculated by the Riccati equation, respectively. The main contributions of this paper are as follows: (i) to the best of our knowledge, the process and measurement white noise estimators of second-order EKF for continuous-discrete systems are presented, for the first time. (ii) The results of this paper enrich the traditional theory of white noise estimation and could directly extend to discrete nonlinear systems or continuous nonlinear systems. (iii) The white noise estimation algorithm for hybrid systems, proposed in this paper, is actually a symmetric solution to the fault estimation problem of such systems, under the assumption that the fault signal is white noise. Therefore, the proposed algorithm can be used for fault estimation of hybrid systems under the assumption that the fault signal is white noise.
The rest of this paper is organized as follows. Section 2 introduces some preparations of the second order Taylor expansion approximate for nonlinear hybrid systems, and presents the problem description. Section 3 presents the state estimation of the second-order EKF for systems, with continuous-time system dynamics and discrete-time measurements, and proposes the process and measurement white noise estimator by projection formula. Section 4 compares the performances of white noise estimations for first-order and secondorder EKFs, using an example. Finally, we summarize the research results. Notation 1. The superscripts '−1' and 'T' stand for the inverse and transpose of a matrix, respectively. E[·] denotes the expectation operator. δ ij is the Kronecker delta function, δ ij = 0 for i = j and δ ii = 1. R n denotes the n-dimensional Euclidean space. For a real matrix, P > 0(P < 0, respectively) means that P is symmetric and positive (negative, respectively) definite.
[t] is an integer ceiling function, which is the largest integer not exceeding t. f , g denotes the covariance of f and g T .

Materials and Methods
Let us consider the hybrid system with continuous-time system dynamics and discretetime measurements: .
where f (·) and h k (·) are nonlinear functions, is a finite interval on the real line. x ∈ R n is the unknown system state, y k ∈ R m is the system measurement, the process noise w(t) ∈ R n is continuous-time white noise, and the measurements noise v k ∈ R m is discrete-time white noise. Assumption 1. The variables w(t) ∈ R n and v k ∈ R m are sequences of Gaussian random vectors with zero-means and covariance matrices, as follows it is assumed that Q and R are positive definite, and that w and v are uncorrelated.

Assumption 2.
The initial state x + 0 is unknown and uncorrelated to w(t) and v k that satisfies Then, we consider only the expansion around a nominal x. The second-order Taylor expansion around x =x versus f (x, u, t) is: where n is the dimension of the state vector, f i is the ith element of f (x, u, t) , and the ϕ i vector is defined as an n × 1 vector with all zeros, except for a one in the ith element. The quadratic term in Education (2) can be written as where P is the variance of the estimation error as E Evaluate Equation (2) at x =x, and substitute Equations (4) and (2) into (1), the time-update equation ofx is obtained as the time-update equation of P remains the same as in the standard hybrid EKF as shown the following: where F and L are the first partial of x and w at x =x. Problem 1. In this paper, the problem is to find the linear minimum variance estimation of the process and measurement noise of a class of continuous-discrete systems. Throughout this paper, we denoteŵ(t|t + l) andv( k|k + N ) as a linear function based on measurement sequence L{ y(τ)| 0≤τ≤t+l } and L{ y i | 0≤i≤k+N } that minimize the mean-squared estimation error.

Remark 1.
Similar to the KF case, the second-order EKF-based process white noise estimator w(t|t + l) is a filter when l = 0 and a smoother when l > 0. In the same way, the second-order EKF based measurement white noise estimatorv( k|k + N ) is a filter when N = 0 and a smoother when N > 0.

Numerical Analysis Results
In this section, we design the white noise estimator based on the second-order approximation of the hybrid nonlinear system.
Suppose that the filtering update equation for the state estimate is given aŝ where K k is the filtering gain, which is chose to minimize the trace estimation of variance. Moreover, π k is a correction term, so that the estimatex + k unbiased. We define the state estimation errors as follows We can see from Equations (1) and (7) that Now, the second-order Taylor series expansion of h(x k , t k ) around the nominal point where H k is defined as ∂h , and ϕ i is defined as an n × 1 matrix, whose elements are all zero, except for a one in the ith element. Substituting Equation (9) into (8), then we have the filtering estimate error e + k as where H k,i is defined as Taking the expected value of both sides of Equation (10), and assuming that E(e − k ) = 0, we can see that, in order to satisfy E(e + k ) = 0, we must let Define the filtering variance matrix P + k as and using the Equation (8), it can be derived by using the following Lemma 1.
where the matrix Λ k is defined as Let us give a useful probability Lemma.

Lemma 1.
Suppose we have the n-element random vector x ∼ N(0, P), then The proof is given in Appendix A. Further, we define a cost function J k that minimize as a weighted sum of estimation errors: The K k that minimizes this cost function can be computed as From the projection theorem and Equation (7), we derive the following formulas: By substituting (17) into (11), we have We rewrite Λ k as the double summation where the element in the ith row and jth column of Λ k is given by To calculate (19), we introduce the following Lemma.
The proof is given in Appendix B. According to Lemma 2 and Equation (19), we have

The Process White Noise Estimator of Hybrid Nonlinear System
Theorem 1. Given system (1) with Assumptions 1-3, and Problem 1, the process white noise estimatorŵ(t|t + l) r is calculated bŷ where [t] is the integer ceiling function of t, and S 1 (t, τ, k), 0 < τ ≤ l is given as Proof of Theorem 1. Letŵ( t|t + l ) is the projection of w(t) onto set L{ y(τ)| 0≤τ≤t+l } that minimizes the mean-square error is the measurement. If we consider the discrete-time measurements, we can replace y(τ), k − 1 < τ ≤ k, k = 1, 2, · · · , N by y k−1 (τ) = y k−1 . In order to calculateŵ( t|t + l ) using the projection formula, an innovation sequence is introduced and y k (τ) is given as whereŷ k (t + τ) is the projection of y k (t + τ) onto the linear space L{ y i (s)| t≤s,i<t+τ, i∈N }. Further, in view of Equations (1) and (9), it follows from (23) that Note thatŵ( t|t + l ) is the projection of w(t) onto the linear space L{ ε i (τ)| t≤τ,i<t+l, i∈N } by using projection formula,ŵ( t|t + l ) is given bŷ Let us think about the first part to the right of the equal sign of Equation (25), using Equation (24), we obtain where by considering (2), (5), and (10), it follows that Noting w(t) is uncorrelated with v k , the term w(t), ∑ m i=1 ϕ i (e − (τ)) T H k,i (e − (τ)) = 0 can be derived from Equation (13) in Lemma 1 and taking differential on both sides of (22) with τ, Equation (22) follows directly from the definition of S 1 (t, τ, k) and (27). That is all the proof.

The Measurement White Noise Estimator of Hybrid Nonlinear System
Theorem 2. Given system (1) with Assumption 1, Assumption 2, Assumption 3, and Problem 1, the measurement white noise estimatorv( k|k + N ) is given by the following formula.
where Λ i is the difference of white noise estimation by EKF, and S 2 (k, i) is given as Proof of Theorem 2.v( k|k + N ) is the projection of v(k) onto the linear space L{ y i | 0≤i≤k+N }, where y i is the measurement. In order to calculatev( k|k + N ) using the projection formula, let us calculate v k , ε k+N first. since v k is uncorrelated with the innovation v k+N for N ≥ 1, and combining Equation (13) in Lemma 1, we obtain Note thatv( k|k + N ) is the projection of v(k) onto the linear space L{ ε k+N | 0≤N, } by using projection formula and Equation (30) Further, the recurrence formula for S 2 (k, k + N) is derived That is all the proof.
According to the theoretical derivation of Theorem 1 and Theorem 2, we can use a flowchart to represent the white noise estimation algorithm in the following Figure 1, where k, l, N, and t f represent time, smoothing step of process noise, smoothing step of measurement noise, and end time, respectively.
That is all the proof. □ According to the theoretical derivation of Theorem 1 and Theorem 2, we can use a flowchart to represent the white noise estimation algorithm in the following Figure 1, where , , , represent time, smoothing step of process noise, smoothing step of measurement noise, and end time, respectively.
Integrate the state estimate and its covariance from time (k-1) + to time kas follows:   Figure 1 can be described as follows:

Remark 2. The algorithm flow in
Step 1: Step 2: If k ≤ t f , go to Step 3; If k > t f , exit.

Numerical Simulation
In this section, the first-order EKF and second-order EKF white noise estimators are compared by a numerical simulation; the advantages of the proposed algorithm is verified. Suppose the nonlinear continuous-discrete system (1) is as follows: . x = cos (x(t)) + w(t), where the process noise vector w(t) and measurement noise v k are uncorrelated zero-mean Gaussian white noises with variances Q = 0.0019, and R = 0.0088. In this numerical simulation, we compare our algorithm with first-order EKF white noise estimators by setting that x(0) = 0.92, P(0) = 0.08 and the sampling period is 0.01s. We take 50 sampling periods to draw Figures 2-5. According to Theorem 1, the filtering algorithm cannot achieve the process noise estimate. Therefore, in Figure 2, we use one-step smoothing algorithm to estimate the process noise. Figure 2 shows the true value of process white noise w(t) and its one-step smoothing of two methods. Figure 3 shows the true value of process white noise w(t) and its three-step smoothing of two methods. Figure 4 shows the true value of measurement white noise v k and its filtering of two methods. Figure 5 shows the true value of measurement white noise v k and its three-step smoothing of two methods. From Figure 2 to Figure 5, it is shown that the white noise estimators based on the first-order EKF fluctuates greatly, while the estimator based on second-order EKF have higher estimation accuracy. In other words, the second-order EKF white noise estimators are better than the first-order EKF white noise estimators. Moreover, it can be seen that the process noise estimation is affected by the discrete observation equation, and loses some information. Therefore, the estimation effect is not as good as the measurement noise estimation. The measurement noise estimation will gradually approach the real curve with the update of time. Moreover, we take 50 sampling periods to calculate the error loss value of two different methods. Taking the mean square error (MSE) as the evaluation index, the loss value is shown in Table 1. Figure 1 can be described as follows:

Numerical Simulation
In this section, the first-order EKF and second-order EKF white noise estimators are compared by a numerical simulation; the advantages of the proposed algorithm is verified. Suppose the nonlinear continuous-discrete system (1) is as follows: where the process noise vector ( ) and measurement noise are uncorrelated zeromean Gaussian white noises with variances = 0.0019, and = 0.0088.
In this numerical simulation, we compare our algorithm with first-order EKF white noise estimators by setting that (0) = 0.92, (0) = 0.08 and the sampling period is 0.01s. We take 50 sampling periods to draw  According to Theorem 1, the filtering algorithm cannot achieve the process noise estimate. Therefore, in Figure 2, we use one-step smoothing algorithm to estimate the process noise. Figure 2 shows the true value of process white noise ( ) and its one-step smoothing of two methods. Figure 3 shows the true value of process white noise ( ) and its three-step smoothing of two methods. Figure 4 shows the true value of measurement white noise and its filtering of two methods. Figure 5 shows the true value of measurement white noise and its three-step smoothing of two methods. From Figures 2 to 5, it is shown that the white noise estimators based on the first-order EKF fluctuates greatly, while the estimator based on second-order EKF have higher estimation accuracy. In other words, the second-order EKF white noise estimators are better than the first-order EKF white noise estimators. Moreover, it can be seen that the process noise estimation is affected by the discrete observation equation, and loses some information. Therefore, the estimation effect is not as good as the measurement noise estimation. The measurement noise estimation will gradually approach the real curve with the update of time. Moreover, we take 50 sampling periods to calculate the error loss value of two different methods. Taking the mean square error (MSE) as the evaluation index, the loss value is shown in Table 1.

MSE of Noise Estimated
First-Order EKF Second-Order EKF One-step smoothing of process noise 0.01011 0.00733 Three-step smoothing of process noise 0.01079 0.00884

Discussion and Conclusions
For the nonlinear hybrid systems with continuous-time dynamic and discrete-time measurements, white noise estimators for process and measurement noises were designed in this paper. Firstly, the nonlinear second-order EKF was derived by using the projection formula after the second-order Taylor expansion approximation and the variance approximation. Moreover, the continuous process noise estimation was processed in segments, and the white noise estimation of the nonlinear hybrid system was performed by combining the innovation of the previous observation point with the second-order EKF theory. The observed white noise estimator was calculated by a difference equation solution of the Riccati equation. Finally, an example was presented to verify the effectiveness of the proposed algorithm.
This paper enriches the second-order EKF theory; the optimal white noise estimation theory is extended to the nonlinear hybrid systems. In the future, we will investigate the color noise estimation of nonlinear hybrid systems.  [(Ax + a)(Bx + b) T (Cx + c)] = AR xx B T (Cm x + c) + AR xx C T (Bm x + b) +Tr(BR xx C T )(Am x + a) where m x is the expectation of x, and R xx is the covariance of x.
Equation (8)  = E(x T Axx T Bx). (A4) Moreover, we have combining (A4) and (A5), E(x T Axx T Bx) can be given by Furthermore, the associative law of the addition of variance is as follows when we consider the x ∼ N(0, P), there exists a nonsingular matrix C, such that P = CC T . We can see that y = C −1 x ∼ N(0, I).
Then we can obtain At this point, the Lemma 2 is proved.