Kalman / EKF / UKF
Optimal recursive estimation for (nearly) linear-Gaussian systems.
Prerequisites
Why it matters in robotics
The Kalman filter is the workhorse of robotic state estimation — localization, IMU fusion, and tracking. For a linear system with Gaussian noise it is the optimal estimator, fusing a motion-model prediction with noisy measurements into a single mean-and-covariance belief, automatically weighing how much to trust the prediction versus the new measurement. Its extensions carry the same idea to the nonlinear systems that dominate real robots, handling the curved, non-straight-line relationships that linear methods can't capture directly.
What to study
- ✓Linear KF: predict/update equations & the Kalman gain
- ✓Why it's the optimal linear-Gaussian estimator (MMSE)
- ✓EKF: linearization via Jacobians, and its failure modes
- ✓UKF: the unscented transform vs. EKF
- ✓Tuning Q and R; observability & filter divergence
- ✓IMM (Interacting Multiple Model): switching motion models for maneuvering targets
Where to study
Cheatsheet
Symbols used below
Predict
Update
Kalman gain limits
As : — trust the prediction.
As : — trust the measurement.
Q vs R, at a glance
Q (process noise) — small ⇒ tight, model-trusting. Large ⇒ wide, agile, noisier.
R (measurement noise) — shrinks or grows the gain the same way.
| KF | EKF | UKF | |
|---|---|---|---|
| Assumption | Linear, Gaussian | Nonlinear, locally linearized | Nonlinear, no linearization |
| How it handles nonlinearity | N/A — exact | 1st-order Taylor (Jacobians) | Sigma points through the true |
| Optimality | Optimal (MMSE) | Approximate | Approximate, usually tighter than EKF |
| Cost | Lowest | Low (Jacobians) | Higher ( sigma points) |
Application focus
Practice questions (17)
- Why is the Kalman filter optimal — and when does it stop being optimal?hard
- Behavior of the Kalman gainmedium
- EKF prediction covariance dimensioneasy
- Time complexity of a Kalman filterInterviewmedium
- Explain the Kalman-filter update stepInterviewmedium
- Assumptions behind the Kalman filterInterviewmedium
- KF vs EKF vs UKFInterviewmedium
- Process noise: meaning and effect of low vs high QInterviewmedium
- Estimating bias and scale inside the filterInterviewhard
- Transforming a state's covariance by a rotation and translationInterviewmedium
- Covariance under a pure rotation — and is rotation affine?Intervieweasy
- Where does the fused estimate lie between prediction and measurement?Intervieweasy
- Initializing the state and covarianceInterviewmedium
- Tracking an object that switches motion modelsInterviewhard
- Bringing machine learning into a state estimator (learning the Kalman gain)Interviewhard
- System design: tracking an object dropped from a drone under a parachuteInterviewhard
- System design: design a state estimation system (state, sensors, rotation)Interviewhard