Journal

The big idea: blending a guess with a measurement

Imagine a rover driving down a straight corridor. You know roughly how fast it is going, so you can predict where it will be one second from now. You also have a noisy position sensor that measures where it is. Which do you believe?

The Kalman filter’s answer: both, weighted by how much you trust each one.

  • If your prediction is very uncertain and the sensor is good, lean towards the sensor.
  • If the sensor is noisy and your model is good, lean towards the prediction.

That weight is called the Kalman gain, written \(K\). It is a number between 0 and 1 (a matrix in the general case):

\[\text{new estimate} = \text{prediction} + K\,(\text{measurement} – \text{prediction})\]

The bracket is the innovation: how surprised you are by the measurement.

Two noisy guesses, one better answer

Suppose the prediction says the rover is at 10.0 m with variance \(4\ \text{m}^2\), and the sensor says 12.0 m with variance \(1\ \text{m}^2\). The best combined estimate is

\[K = \frac{4}{4+1} = 0.8,\qquad \hat x = 10 + 0.8\,(12-10) = 11.6\ \text{m}\]

and the new variance is \((1-K)\cdot 4 = 0.8\ \text{m}^2\), smaller than either input. Combining information always reduces uncertainty. That is the whole filter in one line; the rest of the course makes it work for many variables at once and for things that move.

The loop

A Kalman filter runs forever in a two-step loop:

  1. Predict: push the estimate forward with the motion model, and grow the uncertainty.
  2. Update: when a measurement arrives, pull the estimate towards it and shrink the uncertainty.

Keep this picture in mind. Every equation in Lesson 4 belongs to one of those two steps.

Log in or create a free account to save your progress.

Enjoyed the preview? Unlock the full course.

₹199 ₹599 67% off
Create free account to enrollLog in

Lifetime access to every lesson, the equations and the downloadable Python simulation. Your progress is saved to your account.

All lessons
  1. The big idea: blending a guess with a measurementFree preview
  2. How it was invented and its first usesLocked
  3. Where it is used todayLocked
  4. The equationsLocked
  5. Worked demo and tuningLocked
  6. Build your own, step by stepLocked
  7. Python simulation labLocked
  8. Practice problems and quizLocked

We’ll drive a rover into your seminar hall. The demo is free.

A 45-minute session with a live rover drive and a drone flight in a netted cage, for any engineering college in Kerala or Tamil Nadu.