KomuraSoft LLC
Chapter 5

Feel it with sliders and hand calculations

Go back and forth between what the simulator shows and the numbers you get from one or two hand-calculated steps to connect behavior to the formulas.

Here you play with the simulator while also following one or two steps by hand calculation. Going back and forth between "watching the motion" and "tracing the formula" locks the understanding in place. The chapter follows this flow: (1) check the simulator controls → (2) move the sliders to feel the behavior → (3) follow the first one or two steps by hand calculation → (4) describe the behavior you felt in words.

Interactive simulator

Truth, observation, estimate, and the uncertainty band are shown at the same time. After moving a slider, click Reset so you can compare against the same series again.

Four things to watch

  1. How scattered the gray observation dots are.
  2. How closely the blue estimate line tracks the observations.
  3. How wide the light-blue band (±σ) is.
  4. Whether K is close to 0 or close to 1.

Things to try

  • Raise Q to distrust the model.
  • Raise R to distrust the observations.
  • Raise P₀ and watch the first few steps.
  • Fix the seed, change only one setting at a time, and compare the differences in behavior.

Check 1 — Follow the first step by hand

With initial values x̂₀ = 10, P₀ = 1, Q = 1, R = 4, and first observation z₁ = 12, work through the first step in order.

Q1. What is the predicted variance P₁⁻ = P₀ + Q?

Q2. What is the Kalman gain K₁ = P₁⁻ / (P₁⁻ + R)?

Q3. What is the updated estimate x̂₁?

Q4. What is the updated variance P₁ = (1 − K₁)P₁⁻?

Tie the simulator to your hand calculations

The simulator's readout panel shows the current x̂⁻, P⁻, K, innovation, and the post-update and P. Advance one step at a time and confirm that the formulas match what is on the screen.

Check 2 — Carry over to the second step

Starting from the first-step results x̂₁ ≈ 10.667 and P₁ ≈ 1.333, process the second observation z₂ = 11.

Q1. What is the predicted variance P₂⁻ = P₁ + Q?

Q2. What is the Kalman gain K₂?

Q3. What is the updated estimate x̂₂?

Q4. What is the updated variance P₂?

Check 3 — Describe the behavior in words

Describe in words what happens when you move the sliders in the simulator.

Q1. When you drop R sharply in the simulator, what is the most likely change?

Q2. If you want the blue estimate line to be in a "smooth but slightly delayed" state, which setting is closest?