KomuraSoft LLC
Chapter 3

Update step — correcting the prediction with the observation

Trace by hand how the difference between observation and prediction (innovation) is blended into the prediction in proportion to the Kalman gain.

Once we have a prediction, the next move is to look at the observation and correct ourselves. What decides the correction is the difference between observation and prediction (the innovation).

The difference between observation and prediction (innovation)

We set the difference between observation and prediction as y = z − x̂⁻. A positive value means the observation is above the prediction; a negative value means below. Because this difference represents "the new information that the prediction failed to account for," it is called the innovation in English. From here on, this course keeps using the bilingual phrasing the difference between observation and prediction (innovation).

y = z − x̂⁻

How much do we correct the prediction with the observation?

Instead of using the whole difference between observation and prediction, we correct only by the amount given by multiplying with the Kalman gain K. The contents of K (the formula determined by P⁻ and R) are covered in the next chapter.

x̂ = x̂⁻ + K y

If K is close to 0 we stay near the prediction; if it is close to 1 we move close to the observation.

Check 1 — Fold the observation in via the difference between observation and prediction (innovation)

Use the difference between observation and prediction (innovation) y = z − x̂⁻ and the Kalman gain K to move the estimate forward one step. The contents of K are covered in the next chapter, so for now treat its value as given.

Q1. With predicted value x̂⁻ = 10 and observation z = 14, what is the difference between observation and prediction (innovation) y?

Q2. Continuing with K = 0.25, what is the updated estimate ?

Q3. With predicted value x̂⁻ = 18 and observation z = 10, what is the difference between observation and prediction (innovation) y?

Q4. Continuing with K = 0.75, what is the updated estimate ?

After taking in the observation, uncertainty falls

After taking in the observation, we also update the uncertainty of the estimate. This is the second important formula of the update step, and it is always computed alongside the estimate update.

P = (1 − K)P⁻

Thanks to a reliable observation, the post-update variance P always gets smaller (when R > 0 we have 0 < K < 1, so P = (1 − K)P⁻ < P⁻).

Check 2 — Updated variance and the extremes of K

Compute the updated variance P, then think about the cases where K takes extreme values.

Q1. With predicted variance P⁻ = 8 and K = 0.25, what is the updated variance P = (1 − K)P⁻?

Q2. Which statement correctly describes the update when K = 0?

Q3. Which statement correctly describes the update when K = 1?

Takeaway of this chapter

The update is "mix in the gap with the observation according to how much you trust it." In the next chapter we look inside that "how much you trust it" — the content of K.