Kalman Filter¶
and their extensions
Extended Kalman Filter¶
State and transition model may be non-linear and differentiable functions.
Linearization via the Jacobian¶
The EKF linearizes the nonlinear functions \(f\) and \(h\) around the current estimate using a first-order Taylor expansion. The Jacobian matrices are the partial derivatives of each function with respect to the state, evaluated at the current estimate:
where \(F_t\) is the state-transition Jacobian and \(H_t\) is the observation Jacobian. This gives the linearized model
Predict step¶
Update step¶
Note the mean propagation uses the original nonlinear functions \(f\) and \(h\), while the covariance propagation uses the linearized Jacobians \(F_t\) and \(H_t\). The Jacobians are recomputed at every time step, which is what distinguishes the EKF from a fixed-point linearized Kalman filter.
Wikipedia - Extended Kalman Filter
Unscented Kalman Filter¶
The UKF avoids linearizing the nonlinear functions. Instead, it propagates a set of carefully chosen sigma points through the true nonlinear functions and reconstructs the mean and covariance from the transformed points. This captures the nonlinearity more accurately than the EKF's first-order Taylor expansion, without needing to compute Jacobians.
Sigma points¶
Given the state mean \(\hat{x}\) and covariance \(P\), we form \(2n+1\) sigma points (for an \(n\)-dimensional state) with spread parameter \(\lambda\):
with weights \(W^{(0)}_m = \frac{\lambda}{n+\lambda}\), \(W^{(0)}_c = \frac{\lambda}{n+\lambda} + (1-\alpha^2+\beta)\), and \(W^{(i)}_m = W^{(i)}_c = \frac{1}{2(n+\lambda)}\).
Predict step¶
Propagate each sigma point through the nonlinear dynamics, then recombine:
Update step¶
Propagate the sigma points through the nonlinear observation, then compute the cross-covariance and Kalman gain:
The UKF propagates the true nonlinear functions (no Jacobians), so it is accurate to second order and avoids the derivative computations the EKF requires.
Wikipedia - Kalman Filter / Unscented Kalman Filter