Invariant extended Kalman filter

From HandWiki

The invariant extended Kalman filter (IEKF) (not to be confused with the iterated extended Kalman filter) was first introduced as a version of the extended Kalman filter (EKF) for nonlinear systems possessing symmetries (or invariances),[1] then generalized and recast as an adaptation to Lie groups of the linear Kalman filtering theory.[2] Instead of using a linear correction term based on a linear output error, the IEKF uses a geometrically adapted correction term based on an invariant output error; in the same way the gain matrix is not updated from a linear state error, but from an invariant state error. The main benefit is that the gain and covariance equations have reduced dependence on the estimated value of the state. In some cases they converge to constant values on a much bigger set of trajectories than is the case for the EKF, which results in a better convergence of the estimation.

Filter derivation

Discrete-time framework

Consider a system whose state is encoded at time step [math]\displaystyle{ n }[/math] by an element [math]\displaystyle{ x_n }[/math] of a Lie group [math]\displaystyle{ G }[/math] and dynamics has the following shape:[3]

[math]\displaystyle{ x_n = \phi_n(x_{n-1}) \cdot u_n }[/math]

where [math]\displaystyle{ \phi_n }[/math] is a group automorphism of [math]\displaystyle{ G }[/math], [math]\displaystyle{ \cdot }[/math] is the group operation and [math]\displaystyle{ u_n }[/math] an element of [math]\displaystyle{ G }[/math]. The system is supposed to be observed through a measurement [math]\displaystyle{ y_n }[/math] having the following shape:

[math]\displaystyle{ y_n = x_n \cdot b_n }[/math]

where [math]\displaystyle{ b_n }[/math] belongs to a vector space [math]\displaystyle{ \mathcal{Y} }[/math] endowed with a left action of the elements of [math]\displaystyle{ G }[/math] denoted again by [math]\displaystyle{ \cdot }[/math] (which cannot create confusion with the group operation as the second member of the operation is an element of [math]\displaystyle{ \mathcal{Y} }[/math], not [math]\displaystyle{ G }[/math]). Alternatively, the same theory applies to a measurement defined by a right action:

[math]\displaystyle{ y_n = b_n \cdot x_n }[/math]

Filter equations

The invariant extended Kalman filter is an observer [math]\displaystyle{ \hat{x}_n }[/math] defined by the following equations if the measurement function is a left action:

[math]\displaystyle{ \hat{x}_{n|n-1} = \phi_n(\hat{x}_{n-1|n-1}) \cdot u_n }[/math]
[math]\displaystyle{ \hat{x}_{n|n} = \hat{x}_{n|n-1} \cdot \exp(K_n (\hat{x}_{n|n-1}^{-1} \cdot y_n-b_n)) }[/math]

where [math]\displaystyle{ \exp() }[/math] is the exponential map of [math]\displaystyle{ G }[/math] and [math]\displaystyle{ K_n }[/math] is a gain matrix to be tuned through a Riccati equation.

If measurement function is a right action then the update state is defined as:

[math]\displaystyle{ \hat{x}_{n|n} = \exp(K_n (y_n \cdot \hat{x}_{n|n-1}^{-1}-b_n)) \cdot \hat{x}_{n|n-1} }[/math]

Continuous-time framework

The discrete-time framework above was first introduced for continuous-time dynamics of the shape:

[math]\displaystyle{ \frac{d}{dt} x_t = f_t(x_t), }[/math]

where the vector field [math]\displaystyle{ f_t }[/math] verifies at any time [math]\displaystyle{ t }[/math] the relation:[2]

[math]\displaystyle{ \forall a,b \in G, f_t(a \cdot b) = f_t(a) b + a f_t(b) - a f(Id)b }[/math]

where the identity element of the group is denoted by [math]\displaystyle{ Id }[/math] and is used the short-hand notation [math]\displaystyle{ g u = L_g(u) }[/math] (resp. [math]\displaystyle{ u g = R_g(u) }[/math]) for the left translation [math]\displaystyle{ L_g: TG_x \rightarrow TG_{gx} }[/math] (resp. the right translation [math]\displaystyle{ R_g: TG_x \rightarrow TG_{xg} }[/math]) where [math]\displaystyle{ TG_x }[/math] denots the tangent space to [math]\displaystyle{ G }[/math] at [math]\displaystyle{ x }[/math]. It leads to more involved computations than the discrete-time framework, but properties are similar.

Main properties

The main benefit of invariant extended Kalman filtering is the behavior of the invariant error variable, whose definition depends on the type of measurement. For left actions we define a left-invariant error variable as:

[math]\displaystyle{ e^L_{n|n-1} = \hat{x}_{n|n-1}^{-1} x_n }[/math],
[math]\displaystyle{ e^L_{n|n} = \hat{x}_{n|n}^{-1} x_n }[/math],

while for right actions we define a right-invariant error variable as:

[math]\displaystyle{ e^R_{n|n-1} = x_n \hat{x}_{n|n-1}^{-1} }[/math],
[math]\displaystyle{ e^R_{n|n} = x_n \hat{x}_{n|n}^{-1} }[/math],

Indeed, replacing [math]\displaystyle{ x_n }[/math], [math]\displaystyle{ \hat{x}_{n|n-1} }[/math], [math]\displaystyle{ \hat{x}_{n|n} }[/math] by their values we obtain for left actions, after some algebra:

[math]\displaystyle{ e^L_{n|n-1} = u_n^{-1} \cdot \phi_n(e^L_{n|n-1}) \cdot u_n }[/math],
[math]\displaystyle{ e^L_{n|n} = \exp(-K_n(e^L_{n|n-1} \cdot b_n-b_n)) \cdot e^L_{n|n-1} }[/math],

and for right actions:

[math]\displaystyle{ e^R_{n|n-1} = \phi_n(e^R_{n|n-1}) }[/math],
[math]\displaystyle{ e^R_{n|n} = e^R_{n|n-1} \exp(-K_n(b_n \cdot e^R_{n|n-1}-b_n)) }[/math],

We see the estimated value of the state is not involved in the equation followed by the error variable, a property of linear Kalman filtering the classical extended Kalman filter does not share, but the similarity with the linear case actually goes much further. Let [math]\displaystyle{ \xi_{n|n-1}, \xi_{n|n} }[/math] be a linear version of the error variable defined by the identity:

[math]\displaystyle{ e_{n|n-1} = \exp(\xi_{n|n-1}), }[/math]
[math]\displaystyle{ e_{n|n} = \exp(\xi_{n|n}). }[/math]

Then, with [math]\displaystyle{ F_n }[/math] defined by the Taylor expansion [math]\displaystyle{ \xi_{n|n} = F_n \xi_{n|n-1} + \circ(||\xi_{n|n-1}||) }[/math] we actually have:[2]

[math]\displaystyle{ \xi_{n|n} = F_n\xi_{n|n-1}. }[/math]

In other words, there are no higher-order terms: the dynamics is linear for the error variable [math]\displaystyle{ \xi_{n|n}, \xi_{n|n-1} }[/math]. This result and error dynamics independence are at the core of theoretical properties and practical performance of IEKF.[2]

Relation to symmetry-preserving observers

Most physical systems possess natural symmetries (or invariance), i.e. there exist transformations (e.g. rotations, translations, scalings) that leave the system unchanged. From mathematical and engineering viewpoint, it makes sense that a filter well-designed for the considered system should preserve the same invariance properties. The idea for the IEKF is a modification of the EKF equations to take advantage of the symmetries of the system.

Definition

Consider the system

[math]\displaystyle{ \dot{x}{=}f(x,u)+M(x) w }[/math]
[math]\displaystyle{ y {=}h(x,u) +N(x)v }[/math]

where [math]\displaystyle{ w,v }[/math] are independent white Gaussian noises. Consider [math]\displaystyle{ G }[/math] a Lie group with identity [math]\displaystyle{ e }[/math], and (local) transformation groups [math]\displaystyle{ \varphi_g, \psi_g, \rho_g }[/math] ([math]\displaystyle{ g \in G }[/math]) such that [math]\displaystyle{ (X,U,Y)=(\varphi_g(x),\psi_g(u),\rho_g(y)) }[/math]. The previous system with noise is said to be invariant if it is left unchanged by the action the transformations groups [math]\displaystyle{ \varphi_g, \psi_g, \rho_g }[/math]; that is, if

[math]\displaystyle{ \dot X{=}f(X,U)+M(X) w }[/math].
[math]\displaystyle{ Y{=}h(X,U) +N(X)v }[/math]

Filter equations and main result

Since it is a symmetry-preserving filter, the general form of an IEKF reads[4]

[math]\displaystyle{ \dot{\hat x}=f(\hat x,u) +W(\hat x)L\Bigl(I(\hat x,u),E(\hat x,u,y)\Bigr)E(\hat x,u,y) }[/math]

where

  • [math]\displaystyle{ E(\hat x,u,y) }[/math] is an invariant output error, which is different from the usual output error [math]\displaystyle{ \hat y-y }[/math]
  • [math]\displaystyle{ W(\hat x)=\bigl(w_1(\hat x),..,w_n(\hat x)\bigr) }[/math] is an invariant frame
  • [math]\displaystyle{ I(\hat x,u) }[/math] is an invariant vector
  • [math]\displaystyle{ L(I,E) }[/math] is a freely chosen gain matrix.

To analyze the error convergence, an invariant state error [math]\displaystyle{ \eta(\hat x,x) }[/math] is defined, which is different from the standard output error [math]\displaystyle{ \hat x-x }[/math], since the standard output error usually does not preserve the symmetries of the system.

Given the considered system and associated transformation group, there exists a constructive method to determine [math]\displaystyle{ E(\hat x,u,y),W(\hat x),I(\hat x,u),\eta(\hat x,x) }[/math], based on the moving frame method.

Similarly to the EKF, the gain matrix [math]\displaystyle{ L(I,E) }[/math] is determined from the equations[5]

[math]\displaystyle{ L{=}PC^T\bigl(N(e)N^T(e)\bigr)^{-1} }[/math],
[math]\displaystyle{ \dot P{=}AP+PA^T+M(e)M^T(e)-PC^T\bigl(N(e)N^T(e)\bigr)^{-1}CP }[/math],

where the matrices [math]\displaystyle{ A,C }[/math] depend here only on the known invariant vector [math]\displaystyle{ I(\hat x,u) }[/math], rather than on [math]\displaystyle{ (\hat x,u) }[/math] as in the standard EKF. This much simpler dependence and its consequences are the main interests of the IEKF. Indeed, the matrices [math]\displaystyle{ A,C }[/math] are then constant on a much bigger set of trajectories (so-called permanent trajectories) than equilibrium points as it is the case for the EKF. Near such trajectories, we are back to the "true", i.e. linear, Kalman filter where convergence is guaranteed. Informally, this means the IEKF converges in general at least around any slowly varying permanent trajectory, rather than just around any slowly varying equilibrium point for the EKF.

Application examples

Attitude and heading reference systems

Invariant extended Kalman filters are for instance used in attitude and heading reference systems. In such systems the orientation, velocity and/or position of a moving rigid body, e.g. an aircraft, are estimated from different embedded sensors, such as inertial sensors, magnetometers, GPS or sonars. The use of an IEKF naturally leads[5] to consider the quaternion error [math]\displaystyle{ \hat qq^{-1} }[/math], which is often used as an ad hoc trick to preserve the constraints of the quaternion group. The benefits of the IEKF compared to the EKF are experimentally shown for a large set of trajectories.[6]

Inertial navigation

A major application of the Invariant extended Kalman filter is inertial navigation, which fits the framework after embedding of the state (consisting of attitude matrix [math]\displaystyle{ R }[/math], velocity vector [math]\displaystyle{ v }[/math] and position vector [math]\displaystyle{ x }[/math]) into the Lie group [math]\displaystyle{ SE_2(3) }[/math][7] defined by the group operation:

[math]\displaystyle{ (R_1, v_1, x_1) \cdot (R_2, v_2, x_2) = (R_1 R_2, x_1 + R_1 x_2, v_1 + R_1 v_2) }[/math]

Simultaneous localization and mapping

The problem of simultaneous localization and mapping also fits the framework of invariant extended Kalman filtering after embedding of the state (consisting of attitude matrix [math]\displaystyle{ R }[/math], position vector [math]\displaystyle{ x }[/math] and a sequence of static feature points [math]\displaystyle{ p^1, \dots, p^K }[/math]) into the Lie group [math]\displaystyle{ SE_{K+1}(3) }[/math] (or [math]\displaystyle{ SE_{K+1}(2) }[/math] for planar systems)[7] defined by the group operation:

[math]\displaystyle{ (R_1, x_1, p_1^1, \dots, p_1^K) \cdot (R_2, x_2, p_2^2, \dots, p_2^K) = (R_1 R_2, x_1 + R_1 x_2, p_1^1 + R_1 p_2^1, \dots, p_1^K + R_1 p_2^K) }[/math]

The main benefit of the Invariant extended Kalman filter in this case is solving the problem of false observability.[7]

References

  1. Bonnabel, S. (2007, December). Left-invariant extended Kalman filter and attitude estimation. In 2007 46th IEEE Conference on Decision and Control (pp. 1027-1032). IEEE.
  2. 2.0 2.1 2.2 2.3 Barrau, A., & Bonnabel, S. (2016). The invariant extended Kalman filter as a stable observer. IEEE Transactions on Automatic Control, 62(4), 1797-1812.
  3. Barrau, A., & Bonnabel, S. (2019). Linear observed systems on groups. Systems & Control Letters, 129, 36-42.
  4. S. Bonnabel, Ph. Martin, and P. Rouchon, “Symmetry-preserving observers,” IEEE Transactions on Automatic and Control, vol. 53, no. 11, pp. 2514–2526, 2008.
  5. 5.0 5.1 S. Bonnabel, Ph. Martin and E. Salaün, "Invariant Extended Kalman Filter: theory and application to a velocity-aided attitude estimation problem", 48th IEEE Conference on Decision and Control, pp. 1297–1304, 2009.
  6. Ph. Martin and E. Salaün, "Generalized Multiplicative Extended Kalman Filter for Aided Attitude and Heading Reference System", AIAA Guidance, Navigation and Control Conference, 2010
  7. 7.0 7.1 7.2 Barrau, A., & Bonnabel, S. (2015). An EKF-SLAM algorithm with consistency properties. arXiv preprint arXiv:1510.06263.