Kalman Filter, Live
Chapter 2 · Lesson 2 · Predict · correct · tuning

The 1D Kalman filter

By the end of this lesson you can
  • Build a 1D Kalman filter that fuses an encoder and a GPS
  • Explain why dead reckoning drifts and raw GPS jumps
  • Tune Q and R, and predict how the filter will react

A robot on a line with an encoder and a GPS: why each one fails alone, and how predict and correct combine them into the Kalman filter. 6 short slides, then worked examples and problems. Each slide has an everyday picture, a worked example and Python you can run right on the page.

Start the lesson →

Slides

Lesson 2Dead reckoningDead reckoning: adding up moves makes the estimate driftOpen slide →01 · Lesson 2 · Dead reckoning

Dead Reckoning: Why Encoder-Only Position Drifts

Add up noisy encoder velocities and the position drifts. See why the variance grows by Q every step, with worked examples and Python you can run.

Lesson 2GPS onlyGPS only: no drift, but every reading is noisyOpen slide →02 · Lesson 2 · GPS only

GPS Only: No Drift, but Noisy Position Readings

A GPS measures position directly, so it never drifts, but every reading jumps around the truth. See the measurement model, RMS error and Python to run.

Lesson 2PredictThe predict step: move the estimate, grow the varianceOpen slide →03 · Lesson 2 · Predict

Kalman Filter Predict Step, Explained

The predict step moves the estimate with the encoder and grows its variance by Q: x̂⁻ = x̂ + u, P⁻ = P + Q. Worked examples and live Python.

Lesson 2CorrectThe correct step: fuse the prediction with the GPSOpen slide →04 · Lesson 2 · Correct

Kalman Filter Correct (Update) Step and the Kalman Gain

The correct step fuses the prediction with the GPS using the gain K = P⁻/(P⁻ + R). The 35 → 38 worked example, practice problems and live Python.

Lesson 2The 1D filterThe 1D Kalman filter: predict, correct, repeatOpen slide →05 · Lesson 2 · The 1D Kalman filter

1D Kalman Filter Example: Predict, Correct, Tune Q and R

Run the full 1D Kalman filter on a robot with an encoder and a GPS. See the steady state, and how tuning Q and R trades smoothness for lag. Live Python.

Lesson 2RecapLesson 2 recap: the 1D Kalman filterOpen slide →06 · Recap · Reading

Lesson 2 Recap: The 1D Kalman Filter

The 1D Kalman filter in one page: dead reckoning drift, noisy GPS, the predict step, the correct step with the gain K, the steady state and tuning Q and R.

The full course

From noisy sensors to the EKF, by running it

Lessons 1 and 2 are free. Finish all four and you will be able to:

You get: all 4 lessons with Python labs · every worked example and solution · 5 extra problems per lesson · your progress tracked · Steppe, your AI tutor inside every lesson, day or night · every future update.

$20 once · lifetime access · 14-day money-back guarantee
Continue to checkout →

Already a member? Log in to the course