Kalman filter

Level AdvancedDifficulty ★★★★★Application⌖ Open in the map

What is it?

Optimal state estimation for linear systems with Gaussian noise: predict with the model, correct with the measurement, weighting each by its uncertainty. The extended version linearizes with Jacobians. Used in every GPS receiver, phone, drone and spacecraft (Apollo).

Formulas

K=P−H𝖳(HP−H𝖳+R)−1,x^=x^−+K(z−Hx^−)K = P^-H^{\mathsf T}\big(HP^-H^{\mathsf T} + R\big)^{-1}, \qquad \hat x = \hat x^- + K\big(z - H\hat x^-\big)
x^=σ22σ12+σ22x1+σ12σ12+σ22x2\hat x = \frac{\sigma_2^2}{\sigma_1^2 + \sigma_2^2}x_1 + \frac{\sigma_1^2}{\sigma_1^2 + \sigma_2^2}x_2
the 1D intuition: average two estimates, trusting the less noisy one more

The mathematics behind it

  • Variance★★★★★fundamental

    The Kalman gain weighs prediction and measurement by their variances.

  • Continuous distributions★★★★★fundamental

    Gaussian noise assumptions make the Kalman filter optimal and closed-form.

  • Matrices and linear maps★★★★★frequent

    State transition, observation and covariance updates are all matrix products.

  • The extended Kalman filter linearizes nonlinear dynamics and sensors at the current estimate.

  • Jacobian matrix★★★★★frequent

    The extended Kalman filter propagates covariances with the Jacobians of the dynamics and measurement models.

  • Probability density function★★★★★frequent

    The Kalman filter propagates Gaussian densities of the state through predictions and measurements.

This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.

↑ ↓ to navigate · ↵ · Esc