Extended Kalman Filter

The Extended Kalman Filter (EKF) is a nonlinear version of the Kalman filter used when the system state evolves or is observed nonlinearly.

A discrete-time nonlinear system comprising state evolution and observation can be written in generalized form as

\begin{displaymath}
\left\{
\begin{array}{rl}
\mathbf{x}_{k+1} & = f (\mathbf{x}...
..._k & = h (\mathbf{x}_{k}, \mathbf{v}_k) \\
\end{array}\right.
\end{displaymath} (3.30)

where, in addition to the state $\mathbf{x}_{k}$ and inputs $\mathbf{u}_{k}$, the process noise $\mathbf{w}_{k}$ and observation noise $\mathbf{v}_k$ can also affect the evolution of the state $f$ and the observation $h$ nonlinearly, thereby generalizing the concept of additive noise used earlier.

Applying the EKF requires computing the Jacobians of both $f$ and $h$. By applying the theory presented in Section 2.6 on uncertainty propagation through nonlinear functions, the derivative matrices allow us to apply the same mathematical formulations used for the linear Kalman filter to nonlinear functions, using the matrices

\begin{displaymath}
\begin{array}{ll}
\mathbf{A}_k = \left. \frac{\partial f(\ma...
...\partial \mathbf{v}}\right\vert _{\bar{\mathbf{x}}}
\end{array}\end{displaymath} (3.31)

and the update equation
\begin{displaymath}
\hat{\mathbf{x}}_{k} = \hat{\mathbf{x}}^{-}_{k} + \mathbf{K}_k( \mathbf{z}_k - h(\hat{\mathbf{x}}^{-}_{k}) )
\end{displaymath} (3.32)

Note, however, that the residual $\mathbf{z}_k - h(\hat{\mathbf{x}}^{-}_{k})$ may itself be a nonlinear function (for example, when comparing angles, where the error is periodic).

Compared with the linear Kalman filter, the EKF is a suboptimal estimator, but it is nevertheless widely accepted and used in practical applications. By construction, the extended Kalman filter is only first-order accurate, but it can still achieve near-optimal results when the filter operates at points where the second derivatives are zero.

Paolo medici
2026-10-19