^{*}

Edited by: Hamid Reza Karimi, Politecnico di Milano, Italy

Reviewed by: Eleni N. Chatzi, ETH Zürich, Switzerland; Mingyang Xie, Nanjing University of Aeronautics and Astronautics, China; Yueying Wang, Shanghai University of Engineering Sciences, China; Baoping Jiang, Suzhou University of Science and Technology, China

This article was submitted to Mechatronics, a section of the journal Frontiers in Mechanical Engineering

This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

This paper presents a novel (Extended/Unscented) Kalman Filter by augmenting the event handling procedure of Ordinary Differential Equation (ODE) solvers with the predictor-corrector scheme of Extended/Unscented discrete Kalman Filter (EKF/UKF) introducing a variable step size Kalman Filter. This innovation allows a new quality of precision while operating Kalman Filters. The original Kalman Filter is based on a time-discrete predictor-corrector scheme considering fixed step size. The main new idea is to introduce and control step size handling not introduced before. Step size control of EKF/UKF will increase the performance when applied to switching/stiff systems. The step size is controlled based on the current performance (EKF/UKF innovation) and is adapted during the estimation procedure based on an event handling algorithm. The proposed event handling algorithm consists of two parts: relaxing sample time and restricting sample time (ST). Relaxing procedure is used to avoid high computational time when no rapid change exists in system dynamics. Restricting procedure is considered to improve the estimation performance by decreasing the EKF/UKF step size in the case of fast dynamical behavior (switching/stiff behavior). Effectiveness of the proposed approach is verified considering the well-known Van der Pol oscillator as a common example of stiff systems.

Step size control normally contains event handling procedure to detect the moment in time of specific event. Event handling and zero crossing detection are well-known and well established approaches to handle numerical simulation (Watts,

In Bernal (

In reality the system dynamics is modeled by linear or non-linear ordinary differential equations. For example in Bakhshande and Söffker (

Kalman Filter and its extensions (EKF and UKF) has the same functionality as observers for discontinuous systems and measurements containing statistical noise and other inaccuracies. Different approaches have been introduced to improve the performance of KF and EKF/UKF. For example iterated extended Kalman filter (IEKF) (Bell and Cathey,

In Wang and Li (

An event triggered continuous discrete Kalman Filter is introduced in Niu et al. (

In all aforementioned approaches the sample time of estimation results is defined constant (based on the measurements) or is just reduced at the current step and is reinitialized for the next time step. The goal is to achieve a suitable estimation performance (in the case of event). None of the mentioned approaches focus of sample time control considering event detection by increasing and reducing the sample time during the estimation procedure (like ODE solvers). In this contribution the sample time is controlled based on the estimation performance. It decreases in the case that estimation error increases to achieve the desired performance. Correspondingly it increases when the performance is suitable enough to reduce the computational effort.

Event handling and zero crossing procedures have been used and improved over the previous years for solving stiff ODEs. The main objective of this paper is to integrate the benefits of event handling and zero crossing procedures into the discrete predictor-corrector scheme of Extended/Unscented Kalman Filter to adaptively control the step size. Procedure of KF starts from an initial set of Kalman parameters and system states. The next estimation step is realized based on the current step information (same concept as IVP). Generally the predictor-corrector approaches are based on a pre-specified tolerance. To use the KF for switching/stiff problems the algorithm should be able to look back, execute the solution with smaller step size (stiff problems), execute the solution at precisely defined moments in time (switching problems), and reach the predefined tolerance. Therefore, in this contribution a novel Extended/Unscented Kalman filter is proposed by augmenting the variable step size control in the predictor-corrector scheme for the stiff/switching systems. The proposed variable step size Extended/Unscented Kalman Filter is able to solve the state estimation of stiff problems in discrete time to avoid unnecessary high computational load if required and to increase estimation performance. Using the proposed variable step size Extended/Unscented Kalman Filter allows step size control inside the predictor-corrector procedure. Sample time is adapted based on current estimation performance (EKF/UKF innovation) of system states.

This contribution is based on the previously published initial research paper (Bakhshande and Söffker,

Unscented Kalman Filter is used here as a non-linear discrete filter which can be replaced by any other discrete filter for linear or non-linear systems. The main contributions of this paper can be summarized as follows:

Introducing a novel event-triggered discrete EKF/UKF for stiff/switching non-linear systems based on the event handling procedure in ODE solvers.

Adaptation of time step in EKF/UKF (discrete world) based on the Kalman innovation as key contribution of this paper (step size control in discrete world).

Controlling the innovation of estimation error for EKF/UKF and computational effort under designable thresholds (α and β).

The paper is organized as follows: First a general definition of stiff/switching systems is provided besides the common solutions to solve stiff ODEs. In the second part main aspects of (Matlab-based) ODE solvers are introduced e.g., zero crossing and event handling procedures with the purpose of integration into the structure of Extended/Unscented Kalman Filter. Subsequently, the proposed variable step size Extended/Unscented Kalman Filter is detailed considering the structure and procedure of well-known discrete EKF/UKF. Furthermore, the proposed method is evaluated using simulation results of the Van der Pol oscillator (common example of switching/stiff system). The last section finalizes the paper with a summary and conclusions.

Ordinary Differential Equation (ODE) contains derivative(s) of a dependent variable (usually denoting as _{0}) = _{0} and the time period of interest _{0}, _{f}]. At each step the solver uses the results of previous step considering a particular algorithm (Euler's method, RungeKutta methods, etc.). The final result is given as a vector of time steps _{0}, _{1}, …, _{f}] and corresponding sequence of values for the dependent variable _{0}, _{1}, …, _{f}]. Higher-order differential equations can be reformulated at each step of iterative solving procedure of IVP as a system of first-order equations:

with step size:

and corresponding solution:

Generally even if function

In Atkinson et al. (

with _{x}(_{0}, _{0}) as _{0}, _{0}).

_{0}, _{0}) _{1}, λ_{2}, …, λ_{k}

_{1}, λ_{2}, …, λ_{k}

Stiff/switching system equations contain some terms that produce a fast variation in the solution. According to Hairer and Wanner (

Considering non-linear systems the complexity increases because in this case stiffness becomes a global property and therefore cannot be reduced to a local problem by using a solution in the neighborhood of single points. The non-linear problem may start with non-stiff behavior and become stiff, or vice versa. It may contain stiff and non-stiff intervals. In Ashino et al. (

To solve the numerical integration of stiff ordinary differential (Equation 1) a suitable small step size _{n} is required in the case of fast variation in the solution and correspondingly the step size has to be relatively large (relaxed) when the solution is smooth. Consequently a perfect numerical solution is able to solve the stiff and non-stiff ODEs denoted as step size control (Watts,

In this section the main ideas of zero crossing and event handling are repeated to be used later introducing the proposed algorithm. Here they are briefly repeated because exactly these ideas will be transferred to the finite difference scheme of calculation digital filters like Kalman Filter.

As discussed in section 1, variable step size solvers increases or decreases the step size to achieve error tolerances and required or given performance. Selection of fixed or variable step size depends on the dynamical model and implementation issues. The fixed step size solver uses one step size for the whole simulation time and consequently the step size has to be small enough to achieve the accuracy requirements.

Implicit variable step size solvers (stiff solvers) can be used to solve stiff problems. The non-stiff solvers are ineffective on intervals where the solution changes slowly because they use time steps small enough to resolve the fastest possible change for the whole estimation time. Furthermore, the step size of non-stiff solvers has to be defined at the initialization level and can not be changed during the solving procedure.

Event handling and zero crossing procedures are usually considered in ODE solvers. Detecting the moment in time of specific events in ODEs is referred to event handling procedure. For example the exact time a ball hits the ground or the time that the ODE solutions reaches a specific value is a very specific moment. The event is detected from time step _{n} to _{n+1} if the conditional statement (event) becomes true. The zero crossing detection algorithm is a procedure to capture and locate events accurately. In the case of zero crossing for a predefined event, the ODE solver can be terminated or continued with different conditions according to demand. Event detection of ODE solvers contains two functions _{0}, _{0}). Using event handling procedure in the structure of ODE solver means to numerically define the moment in time ^{*} so that:

Here

Filtering is an important and fundamental problem in the discrete-time control field. For example in Wang et al. (

The main goal of this filter is to achieve final estimation with zero bias and minimum variance compared to the real value and considering noisy measurements. Kalman filter is the optimal linear filter in sense of minimizing the variance estimate of states with the assumptions that the system model perfectly matches the real system, the entering noise is white (uncorrelated), and the covariances of the noise are exactly known (Anderson and Moore,

Extended Kalman Filter (EKF) has been introduced for non-linear systems by linearizing the estimation around the current estimation and using partial derivatives of the system/measurement equation (Sorenson,

The Extended Kalman Filter assumes that the state at time step _{k−1} according to:

In a general system either the state transition function _{k} and _{k}) enter the system linearly but there may be systems for which the noise can not be assumed as additive. They are assumed to be zero mean Gaussian noises with covariance

At each time step the linearization is performed locally and the resulting Jacobian matrices _{F} and _{H} are then used in the prediction and correction steps of the KF algorithm. The system and measurement noise respectively _{k} and _{k} are assumed to be independent, white, and with normal probability distributions as:

In practice, the noise covariance matrices might change during the time, however they are often assumed to be constant. There are two sets of equations for prediction and correction process. The time update projects the current state estimation ahead in time while the measurement update adjusts the projected estimation by an actual measurement at that time. The procedure of Extended Kalman Filter can be summarized as follows:

(1) Project the state ahead

(2) Project the error covariance ahead

(1) Compute the Kalman gain

(2) Update the estimation with measurement

(3) Update the error covariance

When the system is non-linear and can be well approximated by linearization then the EKF is a good option for state estimation. However it has the following drawbacks:

It may be difficult to calculate the Jacobians if they need to be calculated numerically.

There are high computational costs when the Jacobians are calculated numerically.

The EKF only works on systems that have a differentiable model.

The EKF is not optimal if the system is highly non-linear (linearization does not provide a good approximation for highly non-linear systems).

Unscented Kalman Filter (UKF) can be used to overcome the last disadvantage of the EKF by approximating the probability distribution instead of approximating the non-linear function. A brief comparison of KF, EKF, and UKF is presented in

Comparison of KF, EKF, and UKF considering the main principles of filtering.

KF | Linear | Gaussian | Low |

EKF | Locally linear | Gaussian | Low (if the Jacobians be computed analytically) |

Medium (if the Jacobians be computed numerically) | |||

UKF | Non-linear | Gaussian | Medium |

In section 4 the procedure of standard Extended/Unscented Kalman Filter and correspondingly predictor-corrector scheme has been briefly explained. In the following section variable step size (Extended/Unscented) Kalman Filter is proposed and discussed in detail to enhance the performance of (Extended/Unscented) Kalman Filter for stiff/switching problems. The proposed approach consists of event handling and zero crossing concepts according to ODE solvers with variable step size integration. The main flowchart of variable step size Kalman Filter is graphically and mathematically defined in

Event handling procedure of variable step size Kalman Filter.

1: |

2: Initialization of estimated state vector |

3: |

4: Compute the sample time |

5: Compute the sample numbers |

6: Compute the time vector |

7: Interpolation to find the artificial measurement vector |

8: Solve the EKF from beginning to the current time ( |

9: to find the current initial value (_{0}, _{0}) |

10: |

11: |

12: Project the state ahead |

13: Update the Jacobians _{F} and _{H} |

14: Project the error covariance ahead |

15: |

16: Compute the Extended Kalman gain |

17: Update the estimation via measurement |

18: Update the error covariance |

19: Calculate the EKF innovation |

20: _{k}| ≤ α |

21: Stock the estimation results for the current sample |

22: Go to the next step |

23: _{k}| > α |

24: |

25: Increase the value of |

26: Save the draft data in the final data |

27: |

28: |

29: Stock the estimation results for the current sample |

30: Go to the next step |

31: |

32: _{k}| < β |

33: |

34: Decrease the value of |

35: Save the draft data in the final data |

36: |

37: |

38: Stock the estimation results for the current sample |

39: Go to the next step |

40: |

41: |

42: |

43: |

44: |

45: |

The algorithm starts by initialization of Kalman Filter prerequisites e.g., initial states, covariance matrices, and initial sample time (ST). At the first step (initialization level) or in the case that an event is occurred and detected during the solving procedure (ST is decreased or increased) the state space model of the system is discretized based on the new ST. Since the measurement vector is constant, interpolation is required to define the measurement vector according to new sample time. The Kalman Filter procedure is solved from the zero moment up to the current time to find a suitable initial value for the upcoming time. At each step of predictor-corrector scheme the Kalman Filter innovation is used for event handling procedure (shown in detail in

When ST changes the predictor-corrector scheme is stopped. According to

To verify the proposed approach, namely variable step size EKF/UKF, the Van der Pol oscillator example is considered. The Van der Pol oscillator is a highly non-linear system/oscillator with non-linear damping. It can be considered as non-stiff or stiff example considering the strength of damping. This system is used in literature as a switching example to show the advantages of event handling and variable step size ODE solvers (Khan et al.,

where

with state vector

with,

where

The Van der Pol oscillator is driven by the system and measurement noise according to Equation (8) with zero mean white Gaussian noise for system and measurement with covariances ^{2×2} and

To investigate the performance of proposed improved EKF/UKF using the variable step size algorithm, introduced in this paper, simulation results were carried out using the Van der Pol oscillator system. The system parameters used in this simulation study, the KF covariances, and the noise parameters are considered identical for all simulations. Simulation results are illustrated as estimation of _{1} in _{2} in

Estimation of Van der Pol oscillator first state _{1} using fixed and variable step size Extended Kalman Filter.

Estimation of Van der Pol oscillator second state _{2} using fixed and variable step size Extended Kalman Filter.

Phase portrait illustration of Van der Pol oscillator using fixed and variable step size Extended Kalman Filter.

In

Estimation error of Van der Pol oscillator state _{1} using fixed and variable step size Extended/Unscented Kalman Filter.

Performance comparison.

RMSE | 0.1532 | 0.0140 | 0.1531 | 0.0132 |

Mean absolute error | 0.0856 | 0.0070 | 0.0859 | 0.0067 |

Maximum error | 0.8026 | 0.0795 | 0.8027 | 0.0794 |

In the next simulation part the measurement and system noise variance is changed and the RMSE is calculated for all filters. The results are illustrated in

Root mean square error (RMSE) of EKF/UKF and VSEKF/VSUKF considering different level of system and measurement noise.

As mentioned in section 5 the design parameters α and β are defined as upper and lower thresholds to control the innovation of estimation error and the computational effort correspondingly. In

Root mean square error (RMSE) of VSEKF considering different parameters α and β,

Next analysis is related to the influence of restricting/relaxing parameter

Root mean square error (RMSE) of VSEKF considering variation of parameters

In

Root mean square error (RMSE) of VSEKF considering variation of system and measurement noise covariances.

Variable step size (Extended/Unscented) Kalman Filter algorithm (VSEKF/VSUKF) proposed in this paper is based on event handling and zero crossing concepts involved in the structure of ordinary differential equation solvers. At each step of predictor-corrector scheme the Extended/Unscented Kalman Filter innovation is used to detect the events considering the predefined low and upper boundaries (α and β). In the case that an event is occurred and detected, the sample time is increased (relaxing procedure) or decreased (restricting procedure), the predictor-corrector scheme is stopped, and the procedure is continued by new discretization of system model and new initialization using interpolated measurement vector. In the case that no event is detected, the predictor-corrector scheme can be continued with the current considered ST. The design parameters α and β are considered to control and influence the performance and computational time.

The Van der Pol example is used as a common example for stiff systems to illustrate advantages of the proposed approach compared to standard discrete Exteneded/Unscented Kalman Filter. Simulation results clearly demonstrate the effectiveness of proposed estimation approach especially close to the rapid changes in the system dynamics (stiff behavior). In other words, the proposed solution improves the estimation performance by decreasing the step size in the procedure of predictor-corrector scheme according to current estimation accuracy and in the case of fast dynamical behavior. From the simulation results it can also be concluded that the proposed variable step EKF/UKF is more robust in the presence of high level of system/measurement noise compared to the standard EKF/UKF.

What is not covered and can be possibly detected as limitation of this work is the computational effort. Investigation of the computational effort related to the proposed step size control and its consequences are not considered in this contribution. The computational time needs for the proposed approach is more than standard EKF/UKF by reducing the step size. On the other side, in the relaxing procedure, computational time decreases. Therefore, investigation of parameter and thresholds definition regarding real-time implementation seems to be useful and can be considered as future work.

The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation, to any qualified researcher.

FB and DS conceived of the presented idea developed the theory, performed the computations, and verified the analytical methods. All authors discussed the results and contributed to the final manuscript.

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

We acknowledge support by the Open Access Publication Fund of the University of Duisburg-Essen.