Interval Extended Kalman Filter - Application to Underwater Localization and Control

: The extended Kalman ﬁlter has been shown to be a precise method for nonlinear state estimation and is the facto standard in navigation systems. However, if the initial estimated state is far from the true one, the ﬁlter may diverge, mainly due to an inconsistent linearization. Moreover, interval ﬁlters guarantee a robust and reliable, yet unprecise and discontinuous localization. This paper proposes to choose a point estimated by an interval method, as a linearization point of the extended Kalman ﬁlter. We will show that this combination allows us to get a higher level of integrity of the extended Kalman ﬁlter.


Introduction
The dynamic of a mobile robot is generally described by the following discrete time nonlinear state equation where k ∈ N is the time, x k ∈ R n is the state vector, u k is the input vector, n k is the state noise, ν k is the measurement noise, and y k is the measured output vector.Two approaches are generally considered to solve the corresponding state estimation problem: • The probabilistic approach [1,2] is over-optimistic and might converge to some fake states.In most of the cases , the implementation relies on an extended Kalman filter (EKF) [3], which is efficient and accurate.

•
The set membership approach [4] is over-pessimistic.Its principle is to discard states [5] that are inconsistent with the collected data.Since no consistent state is rejected, these approaches have a high level of integrity [6,7], even if they are considered are not precise.Usually , the implementation uses interval analysis and leads to what we can call an interval filter (IF) [8].
The main reason why an EKF may converge toward a fake state is that the linearization point that is chosen can be far from the true state [1].Moreover, this linearization point, taken from the Kalman filter itself, can be totally inconsistent and would thus have been rejected by the interval filter.The idea we want to develop here is to select a linearization point inside the feasible set generated by an interval filter.Of course, this consistent point could still be far from the true one, but we understand that this choice reduces the possibility of bad behavior of the observer.The resulting controller would not be a hybrid between an IF and an EKF, but rather an EKF helped by the IF for the linearization.
The idea of combining probabilities with interval-based methods to have a method which is both safe and accurate is not new.It is the objective of the box particle filter [9,10] and other filters such as [11,12], which combines particle filters with set-membership methods.It is also the objective of the interval Kalman filter [13], which add interval analysis to bound uncertainties in the Kalman Filter.Using a better Kalman filter such as the unscented Kalman filter (UKF) [2] would give better performances than the EKF, but could still converge toward a fake state because of the linearization point.Moreover, it is possible to use a particle filter (PF) [1] instead of the interval filter since it is also a global method.We decided to use the IF because this method has more integrity and generally requires less computations.
The paper is organized as follows.Section 2 gives a 2D overview of the different filters and the linearization problem.Section 3 provides the three filters to be used: the Extended Kalman filter (EKF) , the Interval Filter (IF), and the Interval Extended Kalman Filter (IEKF).Sections 4 and 5 compare the three approaches (EKF, IF, IEKF) on the localization problem of an underwater robot for different scenarios.Section 6 concludes the paper.

Introductory Problem
To introduce the linearization problem and the interest of different filters, here is an example of a static 2D localization problem of an AUV: This AUV is on the surface of a rectangle lake.It is not moving, and it can measure its distance to two seamarks with some noise.Figure 1 shows the estimation of different filters with one measurement.Since the IF and the PF are global methods, they reveal the two zones that are coherent with the measurements.Moreover , the EKF give an estimation with a better precision if the initial estimation-which is also the linearization point-is close to the right zone.However, if the initial estimation was close to the left zone , the EKF would have converged toward that latter.

Extended Kalman Filter
The extended Kalman filter (EKF) is the nonlinear version of the Kalman filter, which linearizes the observed system through an estimate of the current mean and covariance.It obeys the following equations: The covariance matrices of the noises are written Γ α k and Γ β k .These covariance matrices are used to estimate the covariance of the estimated state regarding the uncertainty given by the process and the measurement noises.However, they do not take into account model uncertainty, and linearization errors.They are set empirically.The EKF is initialized with the initial state guess x0 and the initial state covariance matrix Γ 0 .At every iteration, it takes as inputs xk , Γ k , y k and u k and returns xk+1 , and Γ k+1 .
In the classical EKF , the linearization point xk is taken as xk , the state estimation computed by the EKF at the previous step.During the initialization, x0 can be far from the true state x 0 , and the linearization errors might be huge [3,14].Since this linearization cannot be taken into account by the EKF , the filter can be attracted by a fake state away from the true one.

Interval Filter
The interval filter [15,16] (IF) we propose to consider here is based on interval analysis [17,18].The observer provides a set represented by a union of non-overlapping boxes.This union is guaranteed to contain the true state.The principle of the IF is to remove zones of the state space that contain only inconsistent values.It is known to be over-pessimistic.However, it has a high level of integrity, since it allows us to take into account many types of errors such as the linearization errors [19][20][21] , the discretization errors of the differential state Equation [22][23][24][25], and the measurement noise [4,[26][27][28].
At each iteration of Equation ( 1) , the noises are assumed to be in the boxes [n k ] and [ν k ], and the state is known to be in the box [x k ].Moreover , the input u k and output y k are known to belong to the boxes [u k ] and [y k ].Therefore a Forward-Backward contraction C y is designed for the measurement equation and has the Algorithm 1 given by[29]: To enhance the estimation of [x k ] , the box is contracted and sub-paved several times.This results in a list of N non-overlapping boxes L x,k = {[ xk ]|i ∈ 1 : N }, with one box containing the real value of x k .Then, for the next iteration, [x k+1 ] can be initially estimated as the box containing all the boxes obtained from L x,k by dead reckoning: This localization is robust, since the state is guaranteed to be in one of the box of the list L x,k .Then in a closed loop system relying on state estimation , the controller is expecting an estimated vector xk and not a box.Thus, we have to select one point in the set L x,k .Since the sub-paving can be scattered in different groups, this choice can be difficult and will probably yield time discontinuities of the estimation.For example , the estimated state can be chosen as the center of the biggest box.For all types of choices , the trajectory estimated by the IF is discontinuous and less precise than the one given by the EKF, in case of good behavior.

Interval Extended Kalman Filter
Since the EKF can diverge if the linearization point is far from the real state, we propose a new observer called IEKF (Interval EKF).This filter consists of an interval filter and an extended Kalman filter.The interval filter helps the second filter by taking as a linearization point xk , a point inside the list of boxes L x,k .This point can be, for instance , the center of one of the boxes in L x,k , which maximizes the consistency with respect to the observations.Now, xk may also be the estimate given by the IEKF when the latter is consistent enough.
Here , the IEKF corresponds to a classical EKF helped by an IF: it uses a consistency approach to select the linearization point.As a result, it will behave as a classical EKF as soon as we are close to the true solution, and the trajectory will be smooth and precise as shown in the following section.Now, when the estimated trajectory is far from the true solution , the IEKF will benefit from the global view provided by set-membership approach.The resulting observer will inherit both from the accuracy of EKF near to the solution and also to the high level of integrity provided by the IF.

Test-Cases
In this section, we propose to compare the three localization methods presented in Section 3.
For this, we consider an autonomous underwater vehicle (AUV), the Riptide, represented by Figure 2.For its locomotion, this robot uses three fins and one propeller.The inputs are u 0 , the rotation speed of the propeller and the angles u 1 , u 2 , u 3 of the fins.We assume that we have no side slip effect.This means that the velocity vector v r has always the direction of the robot, or equivalently , the robot has no lateral speed.The state space equation of the robot is given by [30] with an adaptation in the orientation variables: The Euler angles have been replaced by a rotation matrix to remove the Gimbal lock for the controller.In this model: • q 1 and q 2 are known parameters.q 1 represents the effect of the propeller's speed on the acceleration while q 2 represents the water friction.• B is the known repartition matrix.• p = (p x , p y , p z ) T is the position of the robot.• R is the orientation matrix.• v r is its longitudinal speed (lateral speed are supposed to be null).• w r is its angular speed vector.
This robot is controlled in speed and orientation with the following controller: where Log is the capitalized log map used in Lie groups theory [31].In this controller, v d is the desired speed , the matrix R d is the desired orientation, and vr is the estimated speed.While v d is constant, a planner computes R d to make the robot follow a series of connected lines.When the drone follows the line from the point a j to the point a j+1 with the unit vector x j and is on the line, it should have the specified orientation R d = R j .Then, when the robot is at a distance e from the line , the desired orientation is rotated towards the line with the angle: Moreover , the distance between the robot and the line e and the projection point p l are calculated from the estimation of the position p: with the scalar product < •|• > associated with the euclidean norm || • || 2 .Then , the desired orientation matrix is set to: The planner needs an estimation of the position of the drone p.Therefore, an observer is designed to solve the following continuous localization problem.It is based on the following evolution model: which corresponds to a selection of the equations of the complete model ( 4) that are needed for the localization.In this model , the state vector is x = (p x , p y , v r ) T , the input is the propeller speed u 0 .R 11 and R 21 are the two first elements of the first column of R.
The observation equation given by corresponds to a situation where the robot measures its depth p z and the Euclidean distances to two fixed markers m 1 , m 2 .The measurement noise is denoted by β.We assume that the orientation matrix R is measured with a high accuracy.
Let us discretize the state equations with an Euler method: with the sampling time dt = 0.1s which has the same form than Equation ( 1) without process noise.That discretization will be used by the extended Kalman filters.The three localization methods have been implemented for this problem.Figure 3 shows the block diagram of the closed loop system.The IEKF provides the estimates p and vr .The three localization methods are then compared with a closed loop simulation where the system is simulated with the same Euler discretization (the Runge-Kutta methods have shown similar results).Two scenarios are simulated with two different initial positions for the robot:

•
In the first one , the initial estimation of the position of the robot has an error of 1 m.

•
In the second one , the initial position is chosen to make the Extended Kalman Filter diverge.The initial error is large, approximately 23 m (see Figure 7).

Simulation Results
Figures 4-9 show the results of these simulations in the context of line following of an AUV.These Figures are screenshots of the trajectories from above.The objective of the AUV is to follow the green path.The yellow path is the real path of the robot.The magenta is the localization by interval analysis.The red is the localization with the Kalman filter.The two red circles are the markers and are 20 m away from each other.
In addition, an animation of the second scenario with the modified extended Kalman filter is available (https://youtu.be/tdkt9DJLPo8,accessed on 12 March 2021).In this video , the magenta boxes represent the estimation boxes from interval analysis, and the red ellipse is the ellipse of confidence of the Kalman filter.In the transition phase where the speed estimation is not accurate yet , the dead reckoning may put the drone out of the box.Yet, after the transition phase , the drone is always in the confidence box from interval analysis.Moreover, after the convergence of the Kalman filter , the robot is also in the ellipse of confidence.

Interval Analysis Observer
Regarding the Interval Analysis Observer, its performances are similar in both scenarios (see Figures 4 and 7).At the beginning of the simulation , the Interval Filter estimates two coherent sets (see the sets a and b in Figure 7).Figure 10 details this behavior.The robot is in position p 1 , and then moves to position p 2 .While the robot is in p 1 , the contraction and sub-paving result in two sets of solutions , the magenta boxes.As a consequence, the estimated position can jump from one to the other set.However when the robot reaches p 2 , the bottom magenta box move to the black box by dead reckoning and then contracts to an empty box.Meanwhile , the top magenta box moves and contract into the yellow box, giving a better estimation of the robot's position.Then, in Figures 4 and 7 , the estimated position (magenta) follows the true position (yellow) with a precision of about 1m and with small jumps.Therefore, this localization is not optimal, but robust in the two scenarios.

Extended Kalman Filter
Figure 5 shows that in the right scenario , the localization with the Extended Kalman Filter is more precise than interval analysis.Indeed , the estimated position is visually close to the real position.However, in the second scenario (see Figure 8), the Kalman filter diverges because there is another local minimum for the covariance.Furthermore, this local minimum is closer to the estimated position than the real position.So this filter is more precise, but not robust.

Extended Kalman Filter with Interval Analysis
Figure 6 shows a localization similar to Figure 5. Indeed, in this case , the localization points of the two Kalman filters are close to each other.However, in Figure 6, the localization jumps of the interval analysis has an impact on the Kalman filter in the initial transition phase.Nevertheless, in the second scenario Figure 9, instead of diverging , the interval extended Kalman filter converge towards the real position of the drone after the transition phase.

Conclusions
The probabilistic and the set membership approaches in the localization problems are often seen as different and in competition.In this paper, we have shown that they may collaborate to keep both the integrity of the interval filter and the accuracy of the Kalman filter.
While in practice , the robots often rely on a probabilistic localization with a Kalman Filter for their online autonomous navigation , the set membership method is mainly used in post-process analysis.This paper proposes a new filter IEKF which benefits from the advantages of the EKF and the IF.By linearizing the EKF at a point given by the IF, the IEKF is more likely to converge.Moreover , the IF can be used to verify the consistency of the observer, and validate that the robot did not enter inside a forbidden zone.
Of course, our filter requires more computation with two observers instead of one, but it is the prize to pay if we want both the integrity needed to a safe navigation and the accuracy, needed to have smooth trajectories that do not overload the actuators too much.

Figure 1 .
Figure 1.Top view of the localization in the static scenario.

Figure 2 .
Figure 2. The Riptide robot has one propeller and three finsFor each vector w = (w x , w y , w z ), we may associate the skew-symmetric matrix:

Figure 3 .
Figure 3. Block diagram of the closed loop system.

Figure 10 .
Figure 10.Situation where several sets are solution to the interval analysis.