On the Relation Between Smooth Variable Structure and Adaptive Kalman Filter

This article is addressed to the topic of robust state estimation of uncertain nonlinear systems. In particular, the smooth variable structure filter (SVSF) and its relation to the Kalman filter is studied. An adaptive Kalman filter is obtained from the SVSF approach by replacing the gain of the original filter. Boundedness of the estimation error of the adaptive filter is proven. The SVSF approach and the adaptive Kalman filter achieve improved robustness against model uncertainties if filter parameters are suitably optimized. Therefore, a parameter optimization process is developed and the estimation performance is studied.


INTRODUCTION
State estimation plays an important role in the field of control. System states are required for the calculation of state feedback controllers, exact input-/output linearizations, equivalent control, backstepping control, etc. Noise reduction of signals is desirable to improve performance of sliding mode approaches under real conditions. Combined input-state estimation is useful for the estimation and rejection of unknown exogenuous inputs. Additionally, robust model-based fault detection and localization approaches can be designed based on filters.
Related to linear systems minimum variance unbiased [1,2] and augmented state filters [3,4] can be used for combined input-state estimation. In case of known uncertainty bounds robust Kalman filters [5] can improve state estimation of uncertain linear systems. In the field of H ∞ filtering robustness of the state estimation may be improved by minimizing the effect of worst possible energy-bounded disturbances on the estimation error [6]. Multiple-model approaches [7] are a powerful tool for state estimation of uncertain systems. Combining them with the particle filter allows state estimation of nonlinear systems [8].
The smooth variable structure filter (SVSF) introduced in Ref. 9 is an approach for state estimation of uncertain nonlinear systems. Several applications of SVSF can be found in the literature. The filter has been applied to estimate the states and parameters of an uncertain linear hydraulic system in Ref. 9. A multiple-model approach has been formulated for fault detection e.g., leakage of the hydraulic system [10]. The state of charge and state of health of batteries is estimated in Refs. 11 and 12. A multiple-model approach has been applied for target tracking in Ref. 13 and a SVSF based probabilistic data association (PDA) approach has been proposed for tracking in cluttered environment [14]. For multiple object tracking a SVSF based joint-PDA approach has been developed [15]. Online multiple vehicle tracking on real road scenarios has been investigated in Ref. 16. Several SVSF based simultaneous localization and mapping algorithms have been proposed e.g., Refs. 17-19. Training of neural networks based on SVSF and classification of engine faults has been studied in Ref. 20. Dual estimation of states and model parameters has been considered in Ref. 21. The estimation strategy works as follows. The bi-section method, the shooting method, and SVSF are combined. The bi-section and shooting method are applied to determine best-fitting model parameter combinations. The obtained model is used by SVSF to estimate the system states. To apply the bi-section method the measurement signals are divided into segments in which the model parameters remain nearly constant. In comparison to the Kalman filter the SVSF approach facilitates detection of these segments based on an evaluation of chattering process.
As described in Ref. 9 the SVSF approach uses a switching gain to drive the estimated state trajectory into a region around the true state trajectory called existence subspace. Due to measurement noise chattering occurs in the existence subspace. By introducing a boundary layer, similar to the saturation function approach of sliding mode control, the high frequency switching in the existence subspace can be attenuated. The claimed advantage of SVSF approach is that if the boundary layer is not used, the filter guarantees to reach the existence subspace for sure although an imprecise system model may be used. It is shown in Ref. 22 that in case of not using the boundary layer the estimations of the filter converge to the measurements, which guarantees the estimation error to be bounded. However, this is a trivial result because if the estimations are equal to the measurements and every state is measured, than the filter is not required. If the boundary layer is used, the estimations diverge from the noisy measurements and estimation performance improves. Unfortunately, it has never been proven that the SVSF with boundary layer has bounded estimation error in case of using an imprecise model.
As already mentioned a serious limitation of the SVSF approach is that all system states have to be measured. Additionally, the measurement model is required to be linear. However, related to tracking a linear measurement model may be achievd by applying a measurement conversion [23] and measurements of the vehicle velocities could also be derived from measured positions.
Another problem of SVSF results from the dependency of the estimation performance on the width of the introduced smoothing boundary layer. In Ref. 24 an estimation error model for the SVSF is proposed and in Ref. 25 the estimation error is minimized according to the smoothing boundary layer width. A maximum a posteriori estimation of the noise statistics of the error model is discused in Ref. 26. However, the derived estimation error model and the related approaches require the system to be linear and precisely known which contradicts the idea of robustness.
In our previous publication [22] a new tuning parameter for the SVSF approach was introduced to achieve online optimization of the estimation performance. In this paper the relation between the SVSF approach and the Kalman filter is studied. An adaptive Kalman filter is obtained from the SVSF approach by replacing the original filter gain. The estimation performance of SVSF and the adaptive filter variant is compared with one another. Therefore, a parameter optimization scheme is proposed. In the simulation results the adaptive Kalman filter shows superior performance compared to the original SVSF approach.
The paper is organized as follows. In Section 2 the preliminaries and the original SVSF approach are discussed. In Section 3 the relation of SVSF and Kalman filter is studied. Parameter optimization of the Kalman filter leading to an adaptive filtering approach is considered in Section 4. The stability of the adaptive filter is studied in Section 5. A performance evaluation of SVSF and adaptive Kalman filter is provided in Section 6.
Notations. An overview of the notations used within the paper is given in Table 1.

PROBLEM FORMULATION AND PREVIOUS WORK
Consider the dynamics of a nonlinear system to be exactly described by the discrete-time model with states x k ∈ R n , inputs u k ∈ R m , and outputs y k ∈ R n . The process r k ∈ R n is assumed to be a white noise process with independent samples described by the covariances E(r k r T k ) R_0, and E(r i r T j ) 0, for i ≠ j, and the mean E(r k ) 0. The measurement model Eq. 2 can be obtained from any model of the formỹ k H k x k +r k as the considered SVSF approach requires H k to be invertible [9]. Consider f k to be a nominal description of system (1, 2), which may differ from the true behavior. According to Ref. 9 an estimation x of the system states x can be obtained using the SVSF algorithm M k+1 e y k+1|k +Φ e y k|k +sat e y k+1|k , Ψ , x k+1|k+1 x k+1|k + M k+1 , where the operator "+" denotes the Schur product, Φ and Ψ are diagonal matrices with Φ ii , Ψ ii denoting the ith diagonal element, and the ith element of vector sat(e y k+1|k , Ψ) is defined as where i ∈ {1, 2, . . . , n}. According to Ref. 22 the SVSF algorithm (Eqs 3-7) reduces to in case of Φ 0 n×n . Theorem 1 of Ref. 9 proves that the output estimation error e y k|k of algorithm (Eqs 3-7) approaches zero if instead of the gain M k+1 the gain M + k+1 ( e y k+1|k +Φ e y k|k )+sgn(e y k+1|k ) is used. As a consequence the estimations of the filter equal the measurements, i.e., e y k|k y k − x k|k 0. This is a trivial result as all states are required to be measured. So one might just use the measurements instead of the filter estimates. The estimations of the filter diverge from the measurements and estimation performance improves if a boundary layer is introduced and gain M + k+1 is replaced by M k+1 . However, it has neither been proven that algorithm (Eqs 3-7) with gain M k+1 has a bounded estimation error, nor it has been shown that the introduced boundary layer minimizes the squared estimation error or some other performance criterion.

RELATION BETWEEN SMOOTH VARIABLE STRUCTURE AND KALMAN FILTER
In this section the stochastic gainM k+1 of SVSF approach is replaced by a deterministic but yet undefined gain K k+1 . Using the deterministic gain the estimation error covariance matrix of the filter is determined. By minimizing the mean squared estimation error (MSE) the deterministic gain K k+1 becomes the specific optimal one K opt k+1 . Replacing the original gainM k+1 of SVSF by the optimal one K opt k+1 gives a direct link to the Kalman filter. From Eqs 1, 2, and 9-12 it follows that the state estimation error and the output estimation error can be determined as and e y k+1|k y k+1 − x k+1|k e x k+1|k + r k+1 , where K k+1 is a deterministic but yet undefined gain. To derive the optimal gain that minimizes the MSE an expression of the a posteriori error covariance dependent on K k+1 is required to be derived. However, first of all the calculation of the output error covariance is considered. Inserting Eq. 14 into the definition of the output error covariance S k+1 E(e y k+1|k e T y k+1|k ) gives Expanding Eq. 15 and considering the definition of the a priori estimation error covariance P k+1|k E(e x k+1|k e T x k+1|k ) and the stationary measurement noise covariance R E(r k+1 r T k+1 ) yields The value of the remaining expectations in Eq. 16 is studied as follows. First of all the a priori estimation error e x k+1|k is known to directly depend on the noise realizations r j with j ∈ {0, 1, . . . , k} but not on the realization r k+1 . In addition r j with j ∈ {0, 1, . . . , k} and r k+1 are independent of each other due to the independent white noise assumption. Finally, r k+1 can not have any effect on e x k+1|k and both random variables are stochastically independent.
. From the zero-mean assumption of the noise i.e., E(r k ) 0 it follows Next the expression for the a posteriori estimation error covariance is considered. Inserting Eq. 13 into the definition of the a posteriori estimation error covariance P k+1|k+1 E(e x k+1|k+1 e T x k+1|k+1 ) leads to Expanding Eq. 18 and considering the definition of the output error covariance S k+1 yields Based on Eq. 14 the two remaining expectations in Eq. 19 can be written as where E(r k+1 e T x k+1|k ) and E(e x k+1|k r T k+1 ) again vanish due to the stochastic independency of r k+1 and e x k+1|k . Finally, the a posteriori error covariance is achieved as In the following minimization of MSE is considered. Based on Eq. 21 the error covariance can also be written as

Symbol Description
Estimated quantity f (·) Real system model f (·) Nominal system model (imprecise) Positive By adding RS −1 k+1 R − RS −1 k+1 R expression Eq. 22 can be rewritten as The trace of P k+1|k+1 gives the MSE of the a posteriori estimation. The last term in Eq. 23 is at least a positive semidefinite matrix with a trace greaterequal zero as S k+1 _0. All other terms do not depend on K k+1 . Consequently, the minimum of MSE is achieved by as the trace of the last term is zero for K opt k+1 . The connection between algorithm (Eqs 3-7) and the Kalman filter is studied as follows. THEOREM 1. The state prediction and correction of algorithm (Eqs 9-12) equals the one of the extended Kalman filter ifM k+1 is replaced by K opt k+1 as stated in Eq. 24.
PROOF. 1 The state prediction (Eq. 9) obviously equals the one of the extended Kalman filter. Regarding the correct step (Eq. 11) it follows that holds true ifM k+1 is replaced by K opt k+1 of (Eq. 24). As the introduced K Kal k+1 of (Eq. 26) equals the Kalman filter gain step (Eq. 26) and thus (Eq. 11) is identical to the correction step of the Kalman filter. ∎

PARAMETER OPTIMIZATION OF THE KALMAN FILTER
The robustness of SVSF against model uncertainties is achieved by tuning the parameters of the smoothing boundary layer width [25]. However, also the Kalman filter gain can be made adaptive to achieve improved robustness [27]. In this section an adaptation law for the unknown a priori estimation error covariance P k+1|k of the optimal gain (Eq. 24) is derived. The error covariance P k+1|k should not be propagated based on the system model (like it is done usually in the field of Kalman filtering) as this would lead to prediction errors due to the imprecize model description. Instead P k+1|k itself is required to be estimated.
As according to Eq. 17 the state error covariance P k+1|k is related to the output error covariance S k+1 the expression might be considered to gain information about P k+1|k . Estimating S k+1 based on the innovation process e y k+1|k is common in the field of adaptive Kalman filtering, e.g., Refs. 27 and 28. From Eq. 31 it can be seen that if e x k+1|k is constant over N time steps, and r k+1 is ergodic in the sense of gives the error covariance P sub k+1|k+1 R of the suboptimal filter. As the filter with the optimal gain minimizes the MSE the upper bound can be established. If it is assumed that P k+1|k+1 ≈ P k+1|k , which is the case for sufficient small sampling time then might be considered to gain information about P k+1|k . Due to the recursive nature of the filtering approach the relation of P k+1|k to the previous value P k|k−1 might be considered. For small sampling time this can be roughly described by In order to find an estimation P + k+1|k that fits best to the established Eqs 29, 33, and 34 a weighted least squares (WLS) estimation problem is formulated. The importance of the individual equations is expressed by the scalar weights α, β, c > 0, which will be determined in a parameter optimization process. Using the vector operator "vec" the WLS problem is considered. The solution of this WLS problem is 1 The authors thank the anonymous reviewers of European Control Conference 2020 for the insightful comments and suggestions related to the proof of the theorem.
Frontiers in Applied Mathematics and Statistics | www.frontiersin.org November 2020 | Volume 6 | Article 585439 which is a weighted sum of the solutions of the individual equations. The obtained solution (Eq. 36) is not guaranteed to be positive semidefinite. However, as P k+1|k is a covariance matrix it must be at least positive semidefinite. In practice it will even be positive definite as otherwise the MSE would be zero. Incorporating the constraint P k+1 _0 into the WLS problem (Eq. 35) would lead to a nonlinear optimization problem. In order to keep the problem simple it is suggested to replace P + k+1|k by some P k+1|k _0 if P + k+1|k has non-positive eigenvalues. The modified error covariance P k+1|k _0 is where L k+1 diagonalizes P + k+1|k as and matrix D k+1 is a diagonal matrix with the ith diagonal element (D k+1 ) ii defined by The scaling factor η ∈ (0, 1] will be part of the parameter optimization process. The diagonalization (Eq. 38) can always be achieved as P + k+1|k is symmetric if a symmetric initial matrix P 0 is chosen. Finally, estimating the optimal Kalman filter gain K opt k+1 based on P k+1|k leads to the adaptive Kalman filtering (A-KF) approach with where L k+1 diagonalizes P + k+1|k so that diagonalization D + k+1 is achieved as and the diagonal matrix D k+1 is obtained from with i ∈ {1, 2, . . . , n} and factor η ∈ (0, 1]. The adaptive filtering approach (Eqs 39-46) depends on the set of tuning parameters. In order to optimize these parameters a training model is introduced. The filter is applied to the training model instead of the real system. The training model simulates the effects of model uncertainty occurring from the real unknown system by varying the system parameters of the known nominal model f . Let N p be the number of system parameters and let p (0) i be the nominal value of parameter i. Assume that a priori knowledge about the amount of model uncertainty is available meaning that parameter p (0) i is required to be varied by 9 i percent to account for the severity of model uncertainty. It is suggested to obtain the ith parameter of the training model p (t) i by drawing a sample p (t) i ∼ U((1 − 9 i /100)p (0) i , (1 + 9 i /100)p (0) i ) from an uniform distribution. Repeating the procedure for all N p system parameters forms one set of training parameters denoted as a training model. The optimization of the filter parameters based on the training model can be achieved as follows. Let x k be the states and y k be the measurements of the training model and let x k|k Y k be the estimations of the filter using the nominal model but receiving the measurements from the training model Y k {y 0 , y 1 , . . . , y k } then the optimized parameters P + are given as where J denotes the costfunction. The optimization is a mixed integer optimization problem which can be solved by e.g., genetic approaches. In order to make the optimization process more reliable it is recommended to build several training models and optimize the filter parameters for each of them separately. The final optimized filter parameters can be obtained by taking the mean or median of the optimized parameters of the individual training models. The process of filter parameter optimization is illustrated in Figure 1.

STABILITY ANALYSIS OF THE ADAPTIVE KALMAN FILTER
As mentioned previously boundedness of the estimation error of SVSF approach (Eqs 3-7) using smoothing boundary layer has never been proven. However, if the adaptive Kalman filter is used instead (M k+1 is replaced by K opt k+1 ) the boundedness of the estimation error can be proven as follows. THEOREM 2. The estimation error of the a posteriori estimation of the adaptive Kalman filtering approach (Eqs 39-46) is bounded by if the measurement noise is bounded by r k < a 1 and the following conditions are fulfilled Ω k P k+1|k − ϵ 1 e y k+1|k e T y k+1|k X 0, Frontiers in Applied Mathematics and Statistics | www.frontiersin.org November 2020 | Volume 6 | Article 585439 where ε 1 , ε 2 are sufficient small positive constants, a 1 , a 2 are sufficient large positive constants. PROOF. From Eq. 51 it can be concluded that P k+1|k can be written as with Ω k d0. As known from Eq. 13 the a posteriori estimation error is With the definitionR k R + Ω k _0 the estimated optimal filter gain can be written as Applying the Sherman-Morrison-Woodbury formular (Fact 2.16.3 [29]) in combination with assumption (Eq. 52) gives (58) Using the submultiplicative Frobenius norm (Proposition 9.3.5 [29]) and Eq. 58, Eq. 57 can be written as Based on the minimum eigenvalue ofR −1 k the inequality can be established (Lemma 8.4.1 [29]). Using Eq. 60 and assumption Eq. 53 an upper bound of Eq. 59 is obtained as Unfortunately,R −1 k implicitly depends on e y k+1|k so that assumption Eq. 54 has to be taken into consideration leading to K opt k+1 e y k+1|k ≤ a 2 R e y k+1|k 1 + ϵ 1 ϵ 2 e y k+1|k 2 .
Based on the derivative of Eq. 62 with respect to e y k+1|k it can be shown that the maximum of the upper bound is achieved for e y k+1|k 1 ϵ1 ϵ2 which leads to Then (Eq. 50) is proven by applying the triangle inequality on Eq. 56.

NUMERICAL EXAMPLE
with measurements y, and control variable z defined as The parameters of the system are shown in Table 2. The input of the system is the change of the coolant stream temperature u ΔT c related to the nominal value T eq c . An input saturation of |u| ≤ 50 K is considered. The system is simulated based on Euler method using a sampling time of 0.1 s. The resulting discrete-time measurement model is where the zero-mean, white noise r k is Gaussian with covariance For the initial state values x 1 (t 0 ) 0.875 mol/l, and x 2 (t 0 ) 325 K are considered.

Filter Training Process
In the following the optimization of the tuning parameters of A-KF and SVSF approach is considered. As explained in Section 4 variation of the nominal system parameters is required to build the training model. To account for the model uncertainty a variation of 20% of the nominal parameters is considered which is assumed as a priori known. Consequently, the ith parameter of the training model p (t) i is obtained from the uniform distribution Repeating the step for all parameters i ∈ {1, 2, . . . , 10} forms one training model. The parameter T eq c is not varied as it is required to be precisely known for control. In Table 3 an overview of the true and nominal system parameters and the parameters used to build the training model is given. In order to account for the different combination and variation of the system parameters three training models are build denoted as Training I, Training II, and Training III.
For each set the tuning parameters of the filters are optimized separately. The parameters of A-KF approach required to be optimized are given by Eq. 47. For the SVSF approach the boundary layer widths Ψ 11 , Ψ 22 and convergence rates Φ 11 , Φ 22 of the first and second state are optimized. The optimization is achieved using "genetic algorithm" of MATLAB with default settings. During optimization only one realization of measurement noise is considered so that the costfunction does not vary due to the noise.
The results of optimization are shown in Table 4. The A-KF approach requires at least 60 times more computational time for the optimization than SVSF. The SVSF algorithm is computationally more efficient and in addition it requires less parameters to be optimized. However, the achieved minimal value of the costfunction is always lower in case of A-KF.

Open Loop Case
In the open loop case the step functions u 5 K and u −5 K are applied to the system and the resulting step responses are  considered for state estimation. The system behavior is simulated over a time horizon of 6 min.
The performance values of A-KF and SVSF approach are shown in Table 5. The filters are applied based on four sets of optimized parameters. Three sets result from Training I, Training II, and Training III. The fourth set denoted as Training I-III considers the mean values of the optimized parameters of the other three sets. As all states are measured the MSE of the measurements is considered also. In order to account for the effect of different noise realizations the results are obtained by simulating the step response 100 times and taking the mean value and variance of the squared estimation error. The filters are applied to the same measurements with same noise realizations. From the results it can be seen that both A-KF and SVSF estimations are more precise than the measurements. In comparison to SVSF the A-KF approach achieves better estimation performance for all considered sets of optimized parameters and both step responses. For one specific run the step responses and the corresponding state estimations are visualized in Figures 2 and 3. The computational time required to generate Table 5 (to simulate both step responses 100 times and apply 8 filters each time) is 18.90 min on a 4xCPU@3.7Ghz with 8 GB memory. The computational time required to apply only one filter on one specific step response is 0.11 s in case of SVSF and 1.49 s in case of A-KF. Both values are far less than the 6 min of simulated system behavior.

Closed Loop Case
In the closed loop case the effluent flow concentration C A of the chemical plant is controlled. The controller relies on the filter estimates. Consequently, the estimation performance as well as the control performance dependent on the filters is studied.
In order to achieve reference tracking of the control variable C A the super-twisting sliding mode approach [32] is applied. By introducing the estimated tracking error e r z r − z, with reference value z r the sliding variable can be calculated as Then reference tracking can be achieved by applying the supertwisting approach [32] u −k 1 s The controller parameters are chosen as k 1 0.001 and k 2 25 based on trial and error. For the sliding dynamics λ 0.08 is considered. The simulated time horizon is 20 min with reference values defined by Meas., Measurements, μ ex : Mean of e T x ex (squared estimation error), σ 2 ex : Variance of e T x ex (squared estimation error).
where t ∈ [0 min, 20 min]. Related to the control performance the following four cases are studied. The sliding variable (Eq. 68) is calculated using the estimations of A-KF approach or the estimations of SVSF approach or the measurements denoted as "W/O filters" or the true states denoted as "Optimum". For the filters the optimized filter parameters of the different training models are considered. The control of the plant over the time horizon of 20 min is simulated 100 times to account for the noise realizations. The measurements used by the filters have same noise realizations. The performance values are shown in Table 6. The best control performance can be achieved based on the true states which are noise-free. Control based on estimations of A-KF or SVSF achieves better performance than applying the controller directly on the noisy measurements. In comparison to SVSF approach A-KF method achieves better reference tracking and more precise state estimation Opt., Optimum; μ er : Mean of e 2 r (squared tracking error), σ 2 er : Variance of e 2 r (squared tracking error), μ ex : Mean of e T x ex (squared estimation error), σ 2 ex : Variance of e T x ex (squared estimation error), μ u : Mean of u 2 (input energy), σ 2 u : Variance of u 2 (input energy).

CONCLUSION
In this paper the relation of smooth variable structure filter (SVSF) and Kalman filter has been studied. An adaptive Kalman filter (A-KF) was derived from the SVSF approach. Sufficient conditions for the boundedness of the estimation error of A-KF approach have been formulated. The simulation results show that beside the SVSF approach also an adaptive Kalman filter can be used to achieve robust estimation performance.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

AUTHOR CONTRIBUTIONS
The development and theoretical description of the adaptive Kalman filter approach was undertaken by MS and DS. The numerical simulation was designed and realized by MS. The manuscript was drafted by MS and reviewed by DS. Frontiers in Applied Mathematics and Statistics | www.frontiersin.org November 2020 | Volume 6 | Article 585439