# Block 7 Flashcards

Click a question to reveal the answer.

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

<details>
<summary><strong>1. Distinguish loose-coupling and tight-coupling GPS/filter integration.</strong></summary>
<div class="card-answer"><p>Loose coupling: the GPS NLLS solver runs first and outputs a solved position, which feeds the filter as a linear position measurement. Standard linear KF applies. Tight coupling: raw pseudoranges go straight into the filter, which estimates position, velocity, and clock bias jointly. Tight coupling requires an Extended Kalman Filter because the pseudorange equation is nonlinear in user position.</p></div>
</details>

<details>
<summary><strong>2. Why is tight coupling preferred in operational navigation?</strong></summary>
<div class="card-answer"><p>Three reasons. (1) Graceful degradation: an EKF can update on whatever satellites it sees; a loose-coupling solver needs at least four. (2) Clock bias becomes part of the navigation state, so the filter learns the clock dynamics over time. (3) Honest error model: the filter uses the real pseudorange uncertainty rather than the post-solve smoothed position uncertainty.</p></div>
</details>

<details>
<summary><strong>3. Write the loose-coupling measurement model and observation matrix for the 4-state filter from Block 5.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\mathbf{z}_k = \hat{\mathbf{p}}_k + \mathbf{v}_k\)</span> with <span class="math notranslate nohighlight">\(\mathbf{H} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{bmatrix}\)</span>. Same <span class="math notranslate nohighlight">\(\mathbf{H}\)</span> as the position-only sensor in Block 5. <span class="math notranslate nohighlight">\(\mathbf{R} \approx (\mathrm{HDOP}\times\sigma_\rho)^2\,\mathbf{I}\)</span>.</p></div>
</details>

<details>
<summary><strong>4. Why can't the standard linear Kalman filter ingest pseudoranges directly?</strong></summary>
<div class="card-answer"><p>The pseudorange equation contains <span class="math notranslate nohighlight">\(\lVert\mathbf{p} - \mathbf{s}^{(i)}\rVert\)</span>, a Euclidean norm. There is no constant matrix <span class="math notranslate nohighlight">\(\mathbf{H}\)</span> that exactly represents a range measurement, so the standard KF assumption <span class="math notranslate nohighlight">\(\mathbf{z} = \mathbf{H}\mathbf{x} + \mathbf{v}\)</span> does not hold. The fix is to linearize <span class="math notranslate nohighlight">\(h_i(\mathbf{x})\)</span> around the current best estimate at every step.</p></div>
</details>

<details>
<summary><strong>5. Write the EKF linearization of <span class="math notranslate nohighlight">\(h(\mathbf{x})\)</span> around <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}^-\)</span>.</strong></summary>
<div class="card-answer"><p>First-order Taylor expansion: <span class="math notranslate nohighlight">\(h(\mathbf{x}) \approx h(\hat{\mathbf{x}}^-) + \mathbf{H}(\mathbf{x} - \hat{\mathbf{x}}^-)\)</span> where <span class="math notranslate nohighlight">\(\mathbf{H} = \partial h / \partial \mathbf{x}\)</span> evaluated at <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}^-\)</span>. The Jacobian is recomputed every cycle as <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}^-\)</span> changes; that re-linearization is the EKF's defining feature.</p></div>
</details>

<details>
<summary><strong>6. In the EKF, what does the innovation use — the linearized model or the nonlinear function?</strong></summary>
<div class="card-answer"><p>The innovation uses the <strong>nonlinear</strong> function: <span class="math notranslate nohighlight">\(\boldsymbol{\nu}_k = \mathbf{z}_k - h(\hat{\mathbf{x}}_k^-)\)</span>. The gain and covariance updates use the linearized <span class="math notranslate nohighlight">\(\mathbf{H}\)</span>. This split is what keeps the EKF accurate; computing the innovation against the linearized model would discard valuable information about the nonlinearity.</p></div>
</details>

<details>
<summary><strong>7. Write the tight-coupling state vector for a 2D navigation filter using GPS pseudoranges.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\mathbf{x} = [p_x, p_y, v_x, v_y, b]^\top\)</span>. Five states: 2D position, 2D velocity, plus the receiver clock bias <span class="math notranslate nohighlight">\(b\)</span> in meters of range-equivalent timing error. The full 3D version adds <span class="math notranslate nohighlight">\(p_z\)</span> and <span class="math notranslate nohighlight">\(v_z\)</span> for a 7-state filter.</p></div>
</details>

<details>
<summary><strong>8. Why is the receiver clock bias added as a state in a tight-coupling EKF?</strong></summary>
<div class="card-answer"><p>Every pseudorange contains the same clock-bias term <span class="math notranslate nohighlight">\(b\)</span>, so the bias is a shared unknown that has to be estimated alongside position. Modeling it as a state — typically a random walk or slow Gauss-Markov — lets the EKF estimate the bias automatically and gracefully handle clock drift between updates.</p></div>
</details>

<details>
<summary><strong>9. Write the pseudorange Jacobian <span class="math notranslate nohighlight">\(\mathbf{H}_i\)</span> for the 5-state 2D filter.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\mathbf{H}_i = [\hat{e}_x,\ \hat{e}_y,\ 0,\ 0,\ 1]\)</span>, a <span class="math notranslate nohighlight">\(1 \times 5\)</span> row vector. <span class="math notranslate nohighlight">\(\hat{e}_x = (\hat{p}_x - s_x^{(i)})/\rho_i\)</span> and <span class="math notranslate nohighlight">\(\hat{e}_y = (\hat{p}_y - s_y^{(i)})/\rho_i\)</span> are the components of the unit line-of-sight from receiver to satellite. Velocity entries are zero; the clock-bias entry is exactly 1.</p></div>
</details>

<details>
<summary><strong>10. What does each entry of the pseudorange Jacobian mean, physically?</strong></summary>
<div class="card-answer"><p>The first two entries (<span class="math notranslate nohighlight">\(\hat{e}_x, \hat{e}_y\)</span>) are the unit line-of-sight: how a small move in user position changes the predicted pseudorange. Velocity entries are zero because pseudoranges depend instantaneously on position, not velocity (range-rate / Doppler measurements would have non-zero velocity entries). The clock-bias entry is 1 because <span class="math notranslate nohighlight">\(b\)</span> adds linearly to every pseudorange.</p></div>
</details>

<details>
<summary><strong>11. State the EKF predict step.</strong></summary>
<div class="card-answer"><p>Identical to the linear KF: <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}^- = \mathbf{F}\,\hat{\mathbf{x}}^+\)</span> and <span class="math notranslate nohighlight">\(\mathbf{P}^- = \mathbf{F}\,\mathbf{P}^+\,\mathbf{F}^\top + \mathbf{Q}\)</span>. The state-transition <span class="math notranslate nohighlight">\(\mathbf{F}\)</span> can also be a Jacobian if the dynamics are nonlinear, but for the constant-velocity + random-walk clock model used in this block, <span class="math notranslate nohighlight">\(\mathbf{F}\)</span> is constant.</p></div>
</details>

<details>
<summary><strong>12. Write the per-satellite EKF measurement update.</strong></summary>
<div class="card-answer"><p>For each satellite <span class="math notranslate nohighlight">\(i\)</span>: nonlinear innovation <span class="math notranslate nohighlight">\(\nu_i = \tilde{\rho}_i - h_i(\hat{\mathbf{x}}^-)\)</span>; gain <span class="math notranslate nohighlight">\(\mathbf{K}_i = \mathbf{P}^-\mathbf{H}_i^\top(\mathbf{H}_i\mathbf{P}^-\mathbf{H}_i^\top + \sigma_\rho^2)^{-1}\)</span>; state update <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}^+ = \hat{\mathbf{x}}^- + \mathbf{K}_i\,\nu_i\)</span>; covariance update <span class="math notranslate nohighlight">\(\mathbf{P}^+ = \mathbf{P}^- - \mathbf{K}_i\,\mathbf{H}_i\,\mathbf{P}^-\)</span>. The posterior of one satellite becomes the prior for the next.</p></div>
</details>

<details>
<summary><strong>13. What is the innovation variance <span class="math notranslate nohighlight">\(S\)</span> for a single pseudorange update?</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(S = \mathbf{H}_i\,\mathbf{P}^-\,\mathbf{H}_i^\top + \sigma_\rho^2\)</span>. This scalar plays two roles: it appears in the gain denominator, and it is the Mahalanobis test statistic against which the innovation magnitude is compared in fault detection (Block 8).</p></div>
</details>

<details>
<summary><strong>14. Quick numeric: <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}^- = [0, 0, 10, -5, 20]^\top\)</span>, <span class="math notranslate nohighlight">\(\mathbf{s} = [3000, 4000]^\top\)</span>. Compute <span class="math notranslate nohighlight">\(\rho\)</span>, the predicted pseudorange, and the unit line-of-sight.</strong></summary>
<div class="card-answer"><p><span class="math notranslate nohighlight">\(\rho = \sqrt{3000^2 + 4000^2} = 5000\)</span> m. Predicted pseudorange <span class="math notranslate nohighlight">\(h(\hat{\mathbf{x}}^-) = \rho + b = 5000 + 20 = 5020\)</span> m. Unit line-of-sight: <span class="math notranslate nohighlight">\(\hat{e}_x = -3000/5000 = -0.6\)</span>, <span class="math notranslate nohighlight">\(\hat{e}_y = -4000/5000 = -0.8\)</span>. So <span class="math notranslate nohighlight">\(\mathbf{H} = [-0.6, -0.8, 0, 0, 1]\)</span>.</p></div>
</details>

<details>
<summary><strong>15. With the same numbers and <span class="math notranslate nohighlight">\(\tilde{\rho} = 5035\)</span>, <span class="math notranslate nohighlight">\(\mathbf{P}^- = 100\,\mathbf{I}_5\)</span>, <span class="math notranslate nohighlight">\(\sigma_\rho^2 = 100\)</span>, which states change after one update?</strong></summary>
<div class="card-answer"><p>Innovation <span class="math notranslate nohighlight">\(\nu = +15\)</span> m. <span class="math notranslate nohighlight">\(S = 200 + 100 = 300\)</span>. Gain <span class="math notranslate nohighlight">\(\mathbf{K} = (100/300)[-0.6, -0.8, 0, 0, 1]^\top\)</span>. State update <span class="math notranslate nohighlight">\(\hat{\mathbf{x}}^+ = [-3, -4, 10, -5, 25]^\top\)</span>. Position moves along the negative line-of-sight (the measurement was longer than expected, so push the receiver away from the satellite or increase clock bias). Velocity does not change because the pseudorange Jacobian has zero velocity entries. The clock bias moves up because the same longer-than-expected pseudorange could equivalently be explained by a larger <span class="math notranslate nohighlight">\(b\)</span>.</p></div>
</details>

<details>
<summary><strong>16. Why does an EKF process satellites one at a time rather than stacking them into a single matrix update?</strong></summary>
<div class="card-answer"><p>Three practical reasons. (1) Each satellite can be on a different cadence (some at 1 Hz, others at 5 Hz), and sequential processing handles that naturally. (2) The matrix to invert at each update is scalar (<span class="math notranslate nohighlight">\(S\)</span>), so the whole update is cheap. (3) The Jacobian for satellite <span class="math notranslate nohighlight">\(i+1\)</span> is re-evaluated at the posterior from satellite <span class="math notranslate nohighlight">\(i\)</span>, which is in fact a tighter linearization than evaluating all Jacobians at the same prior. Mathematically the two approaches are equivalent in expectation; the sequential one is operationally cleaner.</p></div>
</details>
