# Symmetry-preserving filter

In mathematics, Symmetry-preserving observers, also known as invariant filters, are estimation techniques whose structure and design take advantage of the natural symmetries (or invariances) of the considered nonlinear model. As such, the main benefit is an expected much larger domain of convergence than standard filtering methods, e.g. Extended Kalman Filter (EKF) or Unscented Kalman Filter (UKF).

## Motivation

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 viewpoints, it makes sense that a filter well-designed for the system being considered should preserve the same invariance properties.

## Definition

Consider $G$ a Lie group, and (local) transformation groups $\varphi _{g},\psi _{g},\rho _{g}$, where $g\in G$.
The nonlinear system
    ${\begin{aligned}{\dot {x}}&=f(x,u)\\y&=h(x,u)\end{aligned}}$
is said to be invariant if it is left unchanged by the action of $\varphi _{g},\psi _{g},\rho _{g}$, i.e.
    ${\begin{aligned}{\dot {X}}&=f(X,U)\\Y&=h(X,U),\end{aligned}}$
where $(X,U,Y)=(\varphi _{g}(x),\psi _{g}(u),\rho _{g}(y))$.
The system ${\dot {\hat {x}}}=F({\hat {x}},u,y)$ is then an invariant filter if
* $F(x,u,h(x,u))=f(x,u)$, i.e. that it can be written ${\dot {\hat {x}}}=f({\hat {x}},u)+C$, where the correction term $C$ is equal to $0$ when ${\hat {y}}=y$
* ${\dot {\hat {X}}}=F({\hat {X}},U,Y)$, i.e. it is left unchanged by the transformation group.

## General equation and main result

It has been proved that every invariant observer reads
    ${\dot {\hat {x}}}=f({\hat {x}},u)+W({\hat {x}})L{\BiglI({\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}})={\biglw_{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.
Given the system and the associated transformation group being considered, there exists a constructive method to determine $E({\hat {x}},u,y),W({\hat {x}}),I({\hat {x}},u)$, based on the moving frame method.
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. One of the main benefits of symmetry-preserving filters is that the error system is "autonomous", but for the free known invariant vector $I({\hat {x}},u)$, i.e. ${\dot {\eta }}=\Upsilon {\bigl\eta ,I({\hat {x}},u){\bigr )}$. This important property allows the estimator to have a very large domain of convergence, and to be easy to tune.
To choose the gain matrix $L(I,E)$, there are two possibilities:
* a deterministic approach, that leads to the construction of truly nonlinear symmetry-preserving filters (similar to Luenberger-like observers)
* a stochastic approach, that leads to Invariant Extended Kalman Filters (similar to Kalman-like observers).

## Applications

There has been numerous applications that use such invariant observers to estimate the state of the considered system. The application areas include
* attitude and heading reference systems with or without position/velocity sensor (e.g. GPS)
* ground vehicle localization systems
* chemical reactors
* oceanography