# Block 4 Flashcards

Click a question to reveal the answer.

<div data-flashcards data-deck="block-4"></div>

<details>
<summary><strong>1. What two pieces of information does a Kalman filter combine at every time step?</strong></summary>
<div class="card-answer"><p>A prior <span class="math notranslate nohighlight">\((\hat{x}_k^-,\,P_k^-)\)</span> propagated forward from the previous step, and a new measurement <span class="math notranslate nohighlight">\((z_k,\,R_k)\)</span>. The filter fuses them optimally to produce a posterior <span class="math notranslate nohighlight">\((\hat{x}_k^+,\,P_k^+)\)</span>.</p></div>
</details>

<details>
<summary><strong>2. Define the innovation and explain what it represents.</strong></summary>
<div class="card-answer"><p>Innovation: <span class="math notranslate nohighlight">\(\nu_k = z_k - \hat{x}_k^-\)</span>. It is the new information the measurement carries: the difference between what the prediction expected to see and what the sensor actually reported. Small innovation means prediction was already close; large innovation means the measurement strongly corrects the estimate.</p></div>
</details>

<details>
<summary><strong>3. What is the innovation variance?</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(S_k = P_k^- + R_k\)</span>: the prediction uncertainty plus the measurement uncertainty. <span class="math notranslate nohighlight">\(S_k\)</span> appears in the Kalman gain denominator and is also the test statistic in the Mahalanobis-distance fault detection rule we will see in Block 8.</p></div>
</details>

<details>
<summary><strong>4. Write the scalar Kalman gain.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(K_k = \dfrac{P_k^-}{P_k^- + R_k}\)</span>. This is exactly the inverse-variance weight from Block 3 with the prior playing the role of one sensor and the measurement playing the role of the other.</p></div>
</details>

<details>
<summary><strong>5. What does the Kalman gain look like when the prediction is much more uncertain than the measurement?</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(P_k^- \gg R_k \Rightarrow K_k \to 1\)</span>. The filter pulls the posterior estimate strongly toward the measurement, because the prior is unreliable and the new information dominates.</p></div>
</details>

<details>
<summary><strong>6. What does the Kalman gain look like when the measurement is much noisier than the prediction?</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(R_k \gg P_k^- \Rightarrow K_k \to 0\)</span>. The filter mostly ignores the measurement and trusts the prediction, because the measurement carries little information relative to what the filter already knows.</p></div>
</details>

<details>
<summary><strong>7. Write the scalar Kalman state update.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\hat{x}_k^+ = \hat{x}_k^- + K_k\,(z_k - \hat{x}_k^-) = \hat{x}_k^- + K_k\,\nu_k\)</span>. The posterior is the prior plus a fraction <span class="math notranslate nohighlight">\(K_k\)</span> of the innovation.</p></div>
</details>

<details>
<summary><strong>8. Write the scalar Kalman covariance update.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(P_k^+ = (1 - K_k)\,P_k^-\)</span>. Because <span class="math notranslate nohighlight">\(0 \le K_k \le 1\)</span>, the posterior covariance is always smaller than the prior. A measurement update never increases uncertainty.</p></div>
</details>

<details>
<summary><strong>9. Write the scalar Kalman prediction equations.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\hat{x}_{k+1}^- = F\,\hat{x}_k^+\)</span> and <span class="math notranslate nohighlight">\(P_{k+1}^- = F\,P_k^+\,F^\top + Q_k\)</span>. The state transitions deterministically; the covariance grows by the process-noise variance <span class="math notranslate nohighlight">\(Q_k\)</span>.</p></div>
</details>

<details>
<summary><strong>10. What does the process-noise variance <span class="math notranslate nohighlight">\(Q\)</span> represent?</strong></summary>
<div class="card-answer"><p>Everything the deterministic motion model fails to capture: unmodeled dynamics, model mismatch, neglected sensor noise. <span class="math notranslate nohighlight">\(Q\)</span> too small makes the filter over-confident and slow to react to real measurements; <span class="math notranslate nohighlight">\(Q\)</span> too large makes the filter chase measurement noise. Tuning <span class="math notranslate nohighlight">\(Q\)</span> against truth data is part of every real deployment.</p></div>
</details>

<details>
<summary><strong>11. Walk through the full scalar KF cycle in five equations.</strong></summary>
<div class="card-answer"><p>Predict: <span class="math notranslate nohighlight">\(\hat{x}^- = F \hat{x}^+_\text{prev}\)</span>, <span class="math notranslate nohighlight">\(P^- = F P^+_\text{prev} F^\top + Q\)</span>. Update: <span class="math notranslate nohighlight">\(K = P^- / (P^- + R)\)</span>, <span class="math notranslate nohighlight">\(\hat{x}^+ = \hat{x}^- + K(z - \hat{x}^-)\)</span>, <span class="math notranslate nohighlight">\(P^+ = (1 - K) P^-\)</span>. Run this loop once per time step; if no measurement is available, skip the update.</p></div>
</details>

<details>
<summary><strong>12. Quick numeric: <span class="math notranslate nohighlight">\(\hat{x}^- = 1000\)</span>, <span class="math notranslate nohighlight">\(P^- = 25\)</span>, <span class="math notranslate nohighlight">\(z = 1010\)</span>, <span class="math notranslate nohighlight">\(R = 9\)</span>. Compute <span class="math notranslate nohighlight">\(K\)</span>.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(K = 25/(25 + 9) = 25/34 \approx 0.735\)</span>. The measurement is twice as trustworthy as the prediction by variance ratio, so the gain is well above 0.5.</p></div>
</details>

<details>
<summary><strong>13. Same numbers: compute <span class="math notranslate nohighlight">\(\hat{x}^+\)</span> and <span class="math notranslate nohighlight">\(P^+\)</span>.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\hat{x}^+ = 1000 + 0.735\cdot 10 = 1007.35\)</span>. <span class="math notranslate nohighlight">\(P^+ = (1 - 0.735)\cdot 25 \approx 6.62\)</span>, so <span class="math notranslate nohighlight">\(\sigma^+ \approx 2.57\)</span>. The posterior std is smaller than either the prior std (5) or the measurement std (3) — the standard inverse-variance fusion result.</p></div>
</details>

<details>
<summary><strong>14. Why does the Kalman gain typically settle to a steady-state value?</strong></summary>
<div class="card-answer"><p>Because <span class="math notranslate nohighlight">\(Q\)</span> grows the covariance between updates and the measurement update shrinks it. Those two forces balance at a steady-state <span class="math notranslate nohighlight">\(P^-\)</span>, which gives a steady-state <span class="math notranslate nohighlight">\(K = P^-/(P^- + R)\)</span>. After a few cycles the filter "warms up" to that steady state and the gain stops changing.</p></div>
</details>

<details>
<summary><strong>15. What happens during a step where no measurement arrives?</strong></summary>
<div class="card-answer"><p>You skip the update equations. The state propagates forward by the prediction equation, and the covariance grows by <span class="math notranslate nohighlight">\(Q\)</span>: <span class="math notranslate nohighlight">\(P^+_k = P^-_k\)</span> for that step. The next time a measurement arrives, the gain is a little larger because the prior covariance built up while the filter was waiting.</p></div>
</details>

<details>
<summary><strong>16. How is the scalar Kalman update different from the static fusion of Block 3?</strong></summary>
<div class="card-answer"><p>Mathematically it is identical: it is inverse-variance weighting of two sources. The difference is operational. Static fusion combines two sensors that fired simultaneously. Recursive fusion (Kalman) combines a single new measurement with the prior summary of all past measurements, propagated forward in time. Recursion lets the filter run with constant memory regardless of how many measurements have come in.</p></div>
</details>
