Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Guess, then check
You’re walking in fog with a map and a shaky compass. You guess where you are from how far you’ve walked (your model), then check against the compass (your measurement). If your step count is reliable, you mostly trust it. If the compass is good, you lean on it. The Kalman filter does exactly this, with numbers, many times a second, and it also keeps track of how unsure it is.
The Kalman filter was used to navigate Apollo to the Moon. Today it fuses GNSS and IMU data in every aircraft, drone and phone, estimates spacecraft attitude and orbits, tracks targets in radar, and runs inside robot localization and SLAM. Its EKF and UKF variants handle nonlinear dynamics and sensors.
- 1. A Kalman filter combines…
- 2. If the measurement is very noisy, the filter trusts…
- 3. Which mission famously used a Kalman filter for navigation?
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Model
The two steps
Predict:
Update:
Scalar intuition
With prior variance P and measurement variance R, . The posterior variance is smaller than both P and R. Fusing information always helps.
- 1. Scalar gain with P = 4, R = 4:
- 2. After the update the variance is…
- 3. The prediction step makes uncertainty…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.Optimality and the steady state
For linear Gaussian systems, the KF gives the exact posterior , the minimum-mean-square-error estimate. Without Gaussianity it’s still the best linear estimator. For time-invariant (F, H, Q, R), P converges to the solution of the discrete algebraic Riccati equation and K to a constant steady-state gain.
Tuning and consistency
- R comes from sensor specs. Q encodes model error (manoeuvres, unmodelled forces) and is usually the tuning knob.
- NEES should average the state dimension (in simulation, where truth is known).
- Innovations should be white with covariance S (testable in flight).
- Use the Joseph form for numerical robustness.
Nonlinear systems
- EKF: linearize and with Jacobians at the current estimate. It’s simple, but it can be biased and overconfident when nonlinearity is strong relative to the uncertainty.
- UKF: propagate deterministically chosen sigma points through the true nonlinear functions, and recompute mean and covariance from them. It’s accurate to second order, needs no Jacobians, and costs about the same as an EKF (Julier and Uhlmann, 1997).
- 1. A consistent filter's average NEES equals…
- 2. The UKF needs…
- 3. For time-invariant systems, the KF gain converges to…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Deriving the update (scalar, then general)
Prior and likelihood are Gaussian. Their product is Gaussian with precision . The matrix inversion lemma rewrites this as with , and the mean as . ∎
Minimum variance
For any gain K, . Differentiating the trace with respect to K and setting it to zero gives . ∎ (The Joseph form is valid for any K, which is why it’s numerically safer.)
Unscented transform
Choose and , with weights and . The weighted sample mean and covariance match those of x exactly, and after a nonlinear map they’re correct to second order in the Taylor expansion (Julier and Uhlmann, 2004). ∎
Exercise 3.1: one scalar update with prior 0 ± 2 (P = 4), measurement z = 2 with R = 4
, , . The posterior sits halfway, with half the variance.
- 1. The KF update can be derived as…
- 2. The Joseph-form covariance is valid for…
- 3. Number of sigma points for n = 6:
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.When linearization fails: EKF vs UKF
A sensor measures range accurately (±0.3 m) but bearing poorly (±25°) to a target passing within a few metres. The true posterior is a curved, banana-shaped region. The EKF linearizes the bearing at a wrong point and collapses its covariance: its median NEES is about 31 instead of about 3.4, so it’s badly overconfident, and its median final error is 9.9 m. The UKF’s sigma points see the curvature: median NEES about 5.6 and error 6.9 m. When the same tracker is used far from the sensor with modest noise, the two are nearly identical. Linearization error matters only when uncertainty is large relative to the curvature of the measurement model.
Kalman filtering in AI, robotics and aerospace
- Spaceflight: Apollo guidance computer navigation (Schmidt’s EKF at NASA Ames), multiplicative EKF for spacecraft attitude (Lefferts, Markley and Shuster, 1982), orbit determination.
- Aircraft, drones and phones: GNSS/INS fusion (PX4 EKF2, ArduPilot EKF3); visual-inertial odometry (MSCKF).
- Robotics: EKF-SLAM, UKF localization; factor-graph smoothers generalize the KF to whole trajectories.
- Learning: KalmanNet and learned noise models; Kalman filtering of neural network weights (extended KF training).
References
- R. Kalman (1960). “A new approach to linear filtering and prediction problems.” J. Basic Engineering, 82(1).
- L. McGee, S. Schmidt (1985). “Discovery of the Kalman filter as a practical tool for aerospace and industry.” NASA TM-86847.
- S. Julier, J. Uhlmann (1997). “A new extension of the Kalman filter to nonlinear systems.” Proc. SPIE AeroSense.
- S. Julier, J. Uhlmann (2004). “Unscented filtering and nonlinear estimation.” Proceedings of the IEEE, 92(3).
- E. Lefferts, F. Markley, M. Shuster (1982). “Kalman filtering for spacecraft attitude estimation.” J. Guidance, Control, and Dynamics, 5(5).
- Y. Bar-Shalom, X. R. Li, T. Kirubarajan (2001). Estimation with Applications to Tracking and Navigation. Wiley.
- D. Simon (2006). Optimal State Estimation: Kalman, H∞, and Nonlinear Approaches. Wiley.
- S. Thrun, W. Burgard, D. Fox (2005). Probabilistic Robotics. MIT Press. Ch. 3.