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 yIf 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?
y = 14 − 10 = 4. When the difference is positive, the observation is above the prediction.
Q2. Continuing with K = 0.25, what is the updated estimate x̂?
x̂ = x̂⁻ + K y = 10 + 0.25 × 4 = 11. The filter moves 25 % of the way toward the observation.
Q3. With predicted value x̂⁻ = 18 and observation z = 10, what is the difference between observation and prediction (innovation) y?
y = 10 − 18 = −8. When the observation is smaller than the prediction, this difference is negative.
Q4. Continuing with K = 0.75, what is the updated estimate x̂?
x̂ = 18 + 0.75 × (−8) = 12. When the difference is negative, the estimate is pulled back downward.
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⁻?
P = 0.75 × 8 = 6. After taking in the observation, the uncertainty of the estimate gets smaller.
Q2. Which statement correctly describes the update when K = 0?
With K = 0 we get x̂ = x̂⁻, and the observation is ignored — the extreme case of trusting only the prediction.
Q3. Which statement correctly describes the update when K = 1?
With K = 1 we get x̂ = z. The observation is fully adopted, and the updated variance also becomes 0.
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.