Invariant extended Kalman filter

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), then generalized and recast as an adaptation to Lie groups of the linear Kalman filtering theory. 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.

Discrete-time framework
Consider a system whose state is encoded at time step $$ n $$ by an element $$ x_n $$ of a Lie group $$ G $$ and dynamics has the following shape:
 * $$ x_n = \phi_n(x_{n-1}) \cdot u_n $$

where $$ \phi_n $$ is a group automorphism of $$ G $$, $$ \cdot $$ is the group operation and $$ u_n $$ an element of  $$ G $$. The system is supposed to be observed through a measurement $$ y_n $$ having the following shape:
 * $$ y_n = x_n \cdot b_n $$

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

Filter equations
The invariant extended Kalman filter is an observer $$ \hat{x}_n $$ defined by the following equations if the measurement function is a left action:
 * $$ \hat{x}_{n|n-1} = \phi_n(\hat{x}_{n-1|n-1}) \cdot u_n $$
 * $$ \hat{x}_{n|n} = \hat{x}_{n|n-1} \cdot \exp(K_n (\hat{x}_{n|n-1}^{-1} \cdot y_n-b_n)) $$

where $$ \exp $$ is the exponential map of $$ G $$ and $$ K_n $$ 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:
 * $$ \hat{x}_{n|n} = \exp(K_n (y_n \cdot \hat{x}_{n|n-1}^{-1}-b_n)) \cdot \hat{x}_{n|n-1} $$

Continuous-time framework
The discrete-time framework above was first introduced for continuous-time dynamics of the shape:
 * $$ \frac{d}{dt} x_t = f_t(x_t), $$

where the vector field $$ f_t $$ verifies at any time $$ t $$ the relation:
 * $$ \forall a,b \in G, f_t(a \cdot b) = f_t(a) b + a f_t(b) - a f(Id)b $$

where the identity element of the group is denoted by $$ Id $$ and is used the short-hand notation $$ g u = L_g(u) $$ (resp. $$ u g = R_g(u) $$) for the left translation $$ L_g: TG_x \rightarrow TG_{gx} $$ (resp. the right translation $$ R_g: TG_x  \rightarrow TG_{xg} $$) where $$ TG_x $$ denots the tangent space to $$ G $$ at $$ x $$. 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:
 * $$ e^L_{n|n-1} = \hat{x}_{n|n-1}^{-1} x_n $$,
 * $$ e^L_{n|n} = \hat{x}_{n|n}^{-1} x_n $$,

while for right actions we define a right-invariant error variable as:
 * $$ e^R_{n|n-1} = x_n \hat{x}_{n|n-1}^{-1} $$,
 * $$ e^R_{n|n} = x_n \hat{x}_{n|n}^{-1} $$,

Indeed, replacing $$ x_n $$, $$ \hat{x}_{n|n-1} $$, $$ \hat{x}_{n|n} $$ by their values we obtain for left actions, after some algebra:
 * $$ e^L_{n|n-1} = u_n^{-1} \cdot \phi_n(e^L_{n|n-1}) \cdot u_n $$,
 * $$ e^L_{n|n} = \exp(-K_n(e^L_{n|n-1} \cdot b_n-b_n)) \cdot e^L_{n|n-1} $$,

and for right actions:
 * $$ e^R_{n|n-1} = \phi_n(e^R_{n|n-1}) $$,
 * $$ e^R_{n|n} = e^R_{n|n-1} \exp(-K_n(b_n \cdot e^R_{n|n-1}-b_n)) $$,

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 $$ \xi_{n|n-1}, \xi_{n|n} $$ be a linear version of the error variable defined by the identity:
 * $$ e_{n|n-1} = \exp(\xi_{n|n-1}),$$
 * $$ e_{n|n} = \exp(\xi_{n|n}). $$

Then, with $$ F_n $$ defined by the Taylor expansion $$ \xi_{n|n} = F_n \xi_{n|n-1} + \circ(||\xi_{n|n-1}||) $$ we actually have:
 * $$ \xi_{n|n} = F_n\xi_{n|n-1}. $$

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

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


 * $$ \dot{x}{=}f(x,u)+M(x) w $$
 * $$     y {=}h(x,u) +N(x)v $$

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


 * $$ \dot X{=}f(X,U)+M(X) w $$.
 * $$     Y{=}h(X,U) +N(X)v $$

Filter equations and main result
Since it is a symmetry-preserving filter, the general form of an IEKF reads


 * $$\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)$$

where


 * $$E(\hat x,u,y)$$ is an invariant output error, which is different from the usual output error $$\hat y-y$$
 * $$W(\hat x)=\bigl(w_1(\hat x),..,w_n(\hat x)\bigr)$$ is an invariant frame
 * $$I(\hat x,u)$$ is an invariant vector
 * $$L(I,E)$$ is a freely chosen gain matrix.

To analyze the error convergence, an invariant state error $$ \eta(\hat x,x)$$ is defined, which is different from the standard output error $$ \hat x-x $$, 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 $$ E(\hat x,u,y),W(\hat x),I(\hat x,u),\eta(\hat x,x)$$, based on the moving frame method.

Similarly to the EKF, the gain matrix $$L(I,E)$$ is determined from the equations


 * $$ L{=}PC^T\bigl(N(e)N^T(e)\bigr)^{-1}$$,
 * $$ \dot P{=}AP+PA^T+M(e)M^T(e)-PC^T\bigl(N(e)N^T(e)\bigr)^{-1}CP$$,

where the matrices $$A,C$$ depend here only on the known invariant vector $$I(\hat x,u)$$, rather than on $$(\hat x,u)$$ as in the standard EKF. This much simpler dependence and its consequences are the main interests of the IEKF. Indeed, the matrices $$A,C$$ 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.

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 to consider the quaternion error $$\hat qq^{-1}$$, 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.

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 $$ R $$, velocity vector $$ v $$ and position vector $$ x $$) into the Lie group $$ SE_2(3) $$ defined by the group operation:
 * $$(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) $$

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 $$ R $$, position vector $$ x $$ and a sequence of static feature points $$ p^1, \dots, p^K $$) into the Lie group $$ SE_{K+1}(3) $$ (or $$ SE_{K+1}(2) $$ for planar systems) defined by the group operation:
 * $$(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) $$

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