Understand the Kalman Filter with Diagrams and Hand Calculations
An introductory course that focuses on the 1-dimensional scalar version and progresses in the order diagram → intuition → hand calculation → code. Short numeric exercises are placed in the middle of every chapter, and grading and progress saving all happen inside the browser.
What makes this course different
You only need five formulas
This course assumes a steady-state model in which the target does not move (its position does not change). That is why the prediction formula collapses to the minimal form x̂⁻ = x̂.
x̂⁻ = x̂P⁻ = P + QK = P⁻ / (P⁻ + R)x̂ = x̂⁻ + K(z − x̂⁻)P = (1 − K)P⁻Symbols: Q is the uncertainty of the model (e.g., the variance of the gap between the real motion and a model that assumes a stationary target), R is the uncertainty of the observation (e.g., if a GPS jitter is ±5 m, then R ≈ 25), and P is the uncertainty of the estimate.
Chapter overview
x̂⁻ = x̂ and the uncertainty update P⁻ = P + Q.
3 Update step — correcting the prediction with the observation
7 questions. You follow the difference between observation and prediction (innovation) y = z − x̂⁻ and the update formula x̂ = x̂⁻ + K y with concrete numbers.
4 Kalman gain — how much to trust prediction vs. observation
7 questions. Starting from K = P⁻ / (P⁻ + R), you work out how the ratio of Q and R shapes the behavior.
5 Feel it with sliders and hand calculations
10 questions. You move Q, R, and P₀ with the simulator and also follow one or two steps by hand calculation.
6 Reading the implementation — a minimal 1-D version
9 questions. You tie the minimal Python / C implementation to the formulas and variable names and follow a single loop.
7 Comprehensive review and comprehension check
12 questions. Comprehensive problems that let you wrap up and revisit whichever chapter turned out to be your weak point.
Tips for studying
- Read the body text first, then immediately solve the comprehension checks right below
- When you get stuck, restate the meaning of the formula in plain words before peeking at the hint
- The Chapter 5 simulator (to feel the behavior) and the Chapter 7 comprehensive review (to confirm that it stuck) serve different purposes — be sure to do both
Prerequisites
- A high-school-level feel for mean and variance is enough.
- We do not use matrices — everything is the 1-dimensional scalar version.
- No external libraries are needed; everything is static HTML / CSS / JavaScript.