Block 8: Fault Detection, Integrity, and HMI#

By the end of this block you should be able to:

  1. Define a sensor fault and explain why it causes the Kalman filter innovation to grow.

  2. Apply the Mahalanobis distance test (one sample, stacked satellites, or a time window) to determine when innovations are statistically suspicious.

  3. Distinguish between filter error bounds (from \(\mathbf{P}\)) and integrity bounds (protection levels).

  4. Define Hazardous Misleading Information (HMI) and identify it from position-error and protection-level time histories.

What Is a Sensor Fault?#

A fault is any condition where a measurement no longer behaves according to the assumed model:

\[ \mathbf{z}_k = h(\mathbf{x}_k) + \mathbf{v}_k, \qquad \mathbf{v}_k \sim \mathcal{N}(\mathbf{0}, \mathbf{R}_k). \]

When the assumption fails, the filter has no way to know the measurement is no longer trustworthy. It folds the corrupted measurement into the state estimate just like any other, and the resulting state slowly drifts away from truth. Common fault sources in GPS and inertial navigation:

  • Spoofing. An adversary broadcasts counterfeit signals that inject a deliberate range bias into one or more pseudoranges.

  • Jamming. Interference denies or degrades the signal: lost lock or noisier pseudoranges rather than a bias.

  • Unmodeled bias. Satellite-clock anomalies, thermal drift, multipath.

  • Wrong model parameters. Incorrect lever-arm calibration, timing offset, scale factor.

  • Geometry collapse. Satellite dropout, sudden PDOP spike that the filter’s \(\mathbf{R}\) does not capture.

Key Concept

A fault is not “extra noise”. A fault violates the distributional assumptions of the estimator. The filter ingests it silently and corrupts its state estimate without raising any internal flag.

The Innovation Under a Fault#

Under healthy conditions the innovation \(\boldsymbol{\nu}_k = \mathbf{z}_k - h(\hat{\mathbf{x}}_k^-)\) is zero-mean Gaussian with covariance \(\mathbf{S}_k\). Under a slowly-growing ramp fault \(b_f(t_k)\) on one pseudorange, the measurement becomes \(z_k = h(\mathbf{x}_k) + v_k + b_f(t_k)\) and the innovation picks up a steadily growing bias:

\[\begin{split} \nu_k \approx \underbrace{v_k}_{\text{noise}} + \underbrace{b_f(t_k)}_{\substack{\text{growing} \\ \text{bias}}}. \end{split}\]

The crucial point is that the innovation variance \(S_k = \mathbf{H}\mathbf{P}^-\mathbf{H}^{\top} + \sigma_\rho^2\) does not change. It is computed from the filter’s internal model of itself, and the model has no idea anything is wrong. So the innovation grows steadily while \(S_k\) stays small, and the ratio \(\nu_k / \sqrt{S_k}\), which is the “sigma count” the filter considers normal, blows up.

That ratio is exactly what fault detection tests against. (Here \(b_f\) is the fault bias in meters, not the receiver clock bias \(b\) of Block 7.)

How Big Is Too Big? The Detection Ladder#

Every fault test in this block asks the same question: how many sigmas is this innovation? Each rung of the ladder below answers it by summing more squared, normalized innovations:

Rung

Statistic

Healthy distribution

What is summed

1

\(\lvert\nu\rvert/\sigma\)

“number of sigmas”

one scalar residual (intuition)

2

\(D^2 = \nu^2/S\)

\(\chi^2(1)\)

one pseudorange, one epoch (our demo’s per-update test)

3

\(D^2 = \boldsymbol{\nu}^{\top}\mathbf{S}^{-1}\boldsymbol{\nu}\)

\(\chi^2(m)\)

\(m\) satellites stacked at one epoch (spatial stacking)

4

\(\Lambda_k = \sum_{j=k-M+1}^{k} D_j^2\)

\(\chi^2(M)\)

one satellite over \(M\) samples (temporal accumulation)

The degrees of freedom are always the number of independent squared, normalized innovations in the sum. Our pseudorange demo lives on rungs 2 and 4, with rung 3 as an optional panel.

Rung 1: count sigmas#

In one dimension, deciding whether a residual is suspicious is straightforward: count sigmas. \(|\nu|/\sigma > 3\) is a 3-sigma event, expected to happen with probability about \(0.27\%\) under the null hypothesis.

Rung 2: one pseudorange#

For a single pseudorange the “sigma” is \(\sqrt{S}\), where \(S\) is the innovation variance from Block 7, \(S_i = \mathbf{H}_i\mathbf{P}^-\mathbf{H}_i^{\top} + \sigma_\rho^2\). Squaring the sigma count gives the scalar Mahalanobis distance

\[ D_i^2 = \frac{\nu_i^2}{S_i} \ \sim\ \chi^2(1) \quad \text{when healthy,} \]

because a zero-mean Gaussian divided by its own standard deviation is a standard normal, and its square is \(\chi^2(1)\). This is the statistic the Fault Detection demo computes at every pseudorange update.

Rung 3: a vector of innovations at one epoch#

Stack the innovations of \(m\) satellites processed at the same epoch into \(\boldsymbol{\nu} = [\nu_1, \ldots, \nu_m]^{\top}\) with its \(m \times m\) covariance \(\mathbf{S} = \mathbf{H}\mathbf{P}^-\mathbf{H}^{\top} + \mathbf{R}\). Counting sigmas component by component would ignore the correlations in \(\mathbf{S}\); the Mahalanobis distance is the natural generalization:

\[ D^2 = \boldsymbol{\nu}^{\top}\, \mathbf{S}^{-1}\, \boldsymbol{\nu}. \]

This single scalar weights each component of the innovation by its uncertainty, accounts for correlations between components, and reduces to rung 2’s \(\nu^2/S\) when \(m = 1\). Its level sets are ellipses (ellipsoids for \(m > 2\)): the threshold \(D^2 = \gamma\) is the tilted ellipse that the filter’s own \(\mathbf{S}\) predicts. A value \(D = 2\) means the innovation sits two “whitened sigmas” from zero; how surprising that is depends on \(m\), which is why the threshold comes from \(\chi^2(m)\). The Mahalanobis Distance Explorer demo in this block lets you drag a two-component innovation around and compare this test against a plain Euclidean radius.

General form vs. our 1×1 pseudorange case

General (\(m\) stacked measurements)

One pseudorange (\(m = 1\))

Innovation

\(\boldsymbol{\nu} = \mathbf{z} - h(\hat{\mathbf{x}}^-)\), \(m \times 1\)

\(\nu_i = \tilde{\rho}_i - h_i(\hat{\mathbf{x}}^-)\), scalar

Innovation covariance

\(\mathbf{S} = \mathbf{H}\mathbf{P}^-\mathbf{H}^{\top} + \mathbf{R}\), \(m \times m\)

\(S_i = \mathbf{H}_i\mathbf{P}^-\mathbf{H}_i^{\top} + \sigma_\rho^2\), \(1 \times 1\)

Test statistic

\(D^2 = \boldsymbol{\nu}^{\top}\mathbf{S}^{-1}\boldsymbol{\nu} \sim \chi^2(m)\)

\(D_i^2 = \nu_i^2/S_i \sim \chi^2(1)\)

Every formula in this block reduces from the left column to the right by setting \(m = 1\). Because the EKF of Block 7 processes satellites one at a time, each of its innovations is the \(1 \times 1\) case.

Key Concept

Mahalanobis distance is the “how many sigmas” question for vector innovations. It accounts for both the variance scale and the correlation structure of \(\mathbf{S}\).

Detection as a Hypothesis Test#

Under healthy conditions, the Mahalanobis distance follows a chi-squared distribution:

\[ D^2 = \boldsymbol{\nu}^{\top}\, \mathbf{S}^{-1}\, \boldsymbol{\nu}\ \sim\ \chi^2(m), \]

where \(m\) is the number of measurement components stacked into \(\boldsymbol{\nu}\) (and, on rung 4, the window statistic \(\Lambda_k \sim \chi^2(M)\)). The decision rule is

\[ D^2 \quad \underset{\text{healthy}}{\overset{\text{fault}}{\gtrless}} \quad \gamma, \qquad \gamma = \chi^2_{\mathrm{DOF},\, 1 - P_{\text{FA}}}, \]

with DOF \(= m\) for rungs 2–3 and \(M\) for rung 4. The threshold \(\gamma\) is set by the desired false-alarm probability \(P_{\text{FA}}\):

Degrees of freedom

What is summed

\(P_{\text{FA}} = 5\%\)

\(P_{\text{FA}} = 1\%\)

\(P_{\text{FA}} = 0.3\%\)

\(m = 1\)

one pseudorange (rung 2)

3.84

6.63

8.81

\(m = 4\)

4 satellites at one epoch (rung 3)

9.49

13.28

16.01

\(M = 30\)

one satellite over a 30-s window at 1 Hz (rung 4)

43.77

50.89

55.64

The Fault Detection demo uses the 5% column for detection (\(\gamma_1 = 3.84\), \(\gamma_M = 43.77\)) and a stricter \(P_{\text{FA}} = 0.1\%\) for sub-filter isolation (\(\gamma_{\text{iso}} = \chi^2_{30,\,0.999} = 59.70\)).

A tighter threshold (smaller \(\gamma\)) catches faults faster but raises the false-alarm rate. A looser threshold reduces false alarms but increases time-to-detect on slow faults. The whole game in fault detection is choosing where to sit on this curve.

Quick Exercise: Is This Residual Suspicious?

Satellite 1 has a ramp fault with rate \(\dot{b}_f = 3\) m/s injected at \(t_0 = 10\) s. The innovation variance is \(S = 25\) m\(^2\), an illustrative value of \(\mathbf{H}\mathbf{P}^-\mathbf{H}^{\top} + \sigma_\rho^2\) (so \(\sqrt{S} = 5\) m).

This is rung 2: one pseudorange, \(m = 1\).

(a) At \(t = 15\) s the pseudorange innovation is \(\nu = 15\) m. Compute \(D^2 = \nu^2 / S\). Is this suspicious at \(P_{\text{FA}} = 0.3\%\) (\(m = 1\), \(\gamma = 8.81\))?

(b) The bias grows linearly from zero. Ignore the noise, and assume the filter has not yet absorbed any of the fault. At what time does \(D^2\) first exceed \(\gamma = 8.81\)? What is the time-to-detect \(T_D = t_D - t_0\)?

(c) If you tighten the threshold to \(\gamma = 4.0\), what happens to \(T_D\)? What is the cost?

Rung 4: Spatial Stacking vs. Temporal Accumulation#

Rung 3 and rung 4 both sum squared, normalized innovations, but along different axes:

Spatial stacking (rung 3)

Temporal accumulation (rung 4)

What is stacked

\(m\) satellites at one epoch

one satellite over \(M\) samples

Statistic

\(D^2 = \boldsymbol{\nu}^{\top}\mathbf{S}^{-1}\boldsymbol{\nu}\)

\(\Lambda_k = \sum_{j=k-M+1}^{k} D_j^2\)

Healthy distribution

\(\chi^2(m)\)

\(\chi^2(M)\)

Question it asks

Is this epoch’s set of pseudoranges consistent?

Has this satellite been a little off for \(M\) samples?

Cost

none (answers instantly)

latency (the window has to fill)

Example threshold

\(m = 4\): \(\gamma = 16.01\) (\(P_{\text{FA}} = 0.3\%\))

\(M = 30\): \(\gamma_M = 43.77\) (\(P_{\text{FA}} = 5\%\), the demo’s Fig. 3)

The window statistic is \(\chi^2(M)\) because a consistent filter’s innovations are white: successive \(D_j^2\) for the same satellite are independent \(\chi^2(1)\) variables, and a sum of \(M\) of them is \(\chi^2(M)\). The \(m = 4\) row and the \(M = 30\) row of the threshold table are therefore the same test pointed along two different axes: across satellites or across time. The Fault Detection demo’s second view (MATLAB Fig. 3) plots exactly \(\Lambda_k\) for each satellite with \(M = 30\).

Why accumulate? A slow fault barely moves any single sample. Idealize the fault as a constant shift \(b_f\) in one satellite’s innovation mean. (A constant pseudorange bias is not quite that: the filter partly absorbs it, and the faulted innovations are no longer white.) Then each sample’s expected value is \(\mathrm{E}[D_j^2] = 1 + b_f^2/S\) instead of 1. At the same \(P_{\text{FA}} = 0.3\%\):

Single sample (rung 2)

30-sample window (rung 4)

Threshold

\(\gamma_1 = 8.81\)

\(\gamma_M = 55.64\)

Mean statistic crosses the threshold when

\(b_f > 2.8\sqrt{S}\)

\(b_f > 0.92\sqrt{S}\)

Detection probability for \(b_f = 1\sqrt{S}\)

2.5%

60%

The middle row sets the mean of the statistic equal to the threshold, \(\mathrm{E}[D^2] = \gamma_1\) or \(\mathrm{E}[\Lambda_k] = \gamma_M\), so it counts the noise’s contribution of 1 per sample. The Quick Exercise above asked a different question: when does the squared mean innovation alone, \((\mathrm{E}[\nu])^2/S\), reach \(\gamma\)? For \(\gamma_1 = 8.81\) that is \(b_f = \sqrt{8.81}\,\sqrt{S} = 2.97\sqrt{S}\), not \(2.8\sqrt{S}\).

The window buys sensitivity without raising the false-alarm rate; the price is latency, up to \(M\) samples before a step fault fills the window. Real monitors run both tests and OR the alarms: rung 2 for large steps, rung 4 for slow ramps. Slow ramps are exactly what the project’s spoof events are.

What Happens After Detection?#

Detection alone does not solve the problem; the system has to respond. Common patterns:

  • Fault exclusion. Drop the offending satellite and continue with the remaining ones. A snapshot (RAIM-style) solution needs at least four others visible in 3D; the Block 7 EKF can keep running on fewer, because its prior carries the missing directions forward.

  • Fault accommodation. Inflate the offending sensor’s \(\mathbf{R}\) entry so the filter de-weights it, or augment the state with an explicit bias for that sensor that the filter can estimate out.

  • Fault recovery. Re-introduce the sensor once its innovations return to nominal levels for some confirmation period.

  • Multi-filter / parallel hypothesis. Run \(N\) sub-filters in parallel, each excluding one satellite. The sub-filter that stays statistically consistent identifies the culprit, because excluding the bad satellite removes the source of the bias.

The F-47 ANS in the Block 9 capstone uses a multi-filter architecture: one main filter plus sub-filters each excluding one sensor. The output that drives the integrity decision is separate from the main filter’s covariance \(\mathbf{P}\).

Filter Error Bounds vs. Integrity Bounds#

The filter covariance \(\mathbf{P}\) produces an error ellipse: “if the model is correct, the true error lies inside this ellipse with high probability.” The trouble is that an undetected fault corrupts \(\hat{\mathbf{x}}\) but does not grow \(\mathbf{P}\). The filter has no idea anything is wrong, so its \(\mathbf{P}\) stays small and the ellipse becomes inconsistent: the actual error no longer lives inside it.

The integrity bound is a separate, more conservative bound, computed from the multi-filter architecture rather than from the main filter’s covariance. It is designed to remain valid even when one sensor is faulty, because the sub-filter that excludes the faulted sensor still has good information.

In a healthy system, the truth sits inside both the filter’s \(\mathbf{P}\) ellipse and the integrity bound. In a faulty-but-undetected system, the truth has drifted outside the filter’s \(\mathbf{P}\) ellipse (the filter is “confidently wrong”) but is still inside the integrity bound. That is the safe outcome.

Protection Levels#

The integrity bound is reported as usable spatial thresholds called protection levels.

Horizontal Protection Level:

\[ \text{HPL} = n_\alpha \sqrt{P_{\text{int},N} + P_{\text{int},E}}. \]

Vertical Protection Level:

\[ \text{VPL} = n_\alpha \sqrt{P_{\text{int},D}}. \]

Here \(P_{\text{int}}\) is the diagonal of the integrity covariance (from the multi-filter architecture, not the main filter’s \(\mathbf{P}\)), and \(n_\alpha\) is the multiplier for the desired containment probability, for example \(n_\alpha = 2.576\) for a 99% bound. That value is exact for VPL, a one-dimensional two-sided bound. For HPL the true containment of \(n_\alpha\sqrt{P_{\text{int},N} + P_{\text{int},E}}\) lies between 99% (all the variance on one axis) and 99.87% (equal north and east variance), so the 99% label is conservative.

HPL and VPL are not confidence ellipses from the EKF. They are guaranteed performance zones from the multi-filter architecture, valid under a single-sensor fault. That distinction is what makes them suitable for safety-of-life applications like aviation precision approach.

Hazardous Misleading Information (HMI)#

HMI is the most important failure mode in any safety-critical navigation system. It is defined as the condition where the true position error exceeds the protection level while the fault is still undetected:

\[ \text{HMI}_H:\ e_H > \text{HPL}, \qquad \text{HMI}_V:\ |e_D| > \text{VPL}. \]

In words: the system is actively misleading the operator. It is reporting a position with a tight protection-level guarantee, the operator believes that guarantee, but truth is actually outside the bound. This is the scenario any integrity-monitoring system must prevent or at least detect quickly.

A horizontal-error-vs-time plot with a constant HPL line. The error ramps up after a fault, crosses HPL, then drops back. The region where error > HPL is shaded, labeled HMI exposure. Markers indicate fault start (t0) and detection time (tD), with a double-headed arrow labeled T_D between them.

Fig. 3.1. The two operational quantities every integrity test report tracks: (1) time-to-detect \(T_D = t_D - t_0\), the elapsed time between the fault starting and the system declaring it detected; (2) HMI exposure, the total time during which the true error exceeds the protection level. The F-47 ANS Requirement 4 (Block 9 project) requires that at least 27 of 30 spoof events show \(T_D \le 5\) s and both horizontal and vertical HMI exposure \(\le 1\) s during \([t_0, t_D]\).

Spoof Detection in Action#

The two short videos below come from our research-lab visualization of a tightly-coupled GPS/INS filter under spoof attacks. They show the time-history of position error, protection level, and the per-satellite Mahalanobis distance as the spoof injection grows. Watch for the moment the per-satellite \(D^2\) trace climbs above the threshold and the protection level inflates to keep the truth inside.

Single-satellite spoof event. One pseudorange picks up a slowly-growing bias. The per-satellite \(D^2\) for that one channel diverges from the chi-squared distribution while the others stay nominal. Sub-filter isolation flags the offender within a few seconds and the integrity solution holds the protection level wider while the bad satellite is downweighted.

Two-satellite spoof event. With more than one satellite faulted simultaneously, simple per-satellite testing is no longer enough: multiple \(D^2\) traces light up. The multi-filter architecture has to consider sub-filters that exclude multiple satellites, and the integrity bound widens accordingly. This is the scenario the F-47 ANS multi-filter design is meant to handle.

Fault Detection Demo#

The Fault Detection demo in this block extends the 5-state EKF from Block 7 with GPS fault injection and three coupled chi-squared monitoring views: the per-sample \(D^2_k\) test (rung 2), the running \(M\)-sample window \(\Lambda_k\) (rung 4), and a full sub-filter isolation matrix. A live trajectory shows the main filter drifting away from truth while the sub-filter that excluded the faulted satellite stays clean. Sliders and chips let you change the faulted SV, the ramp rate \(\dot{b}_f\), the window length \(M\), and the false-alarm probability \(P_{FA}\) to explore the false-alarm-vs-time-to-detect trade; a summary table counts alarms before and after the fault and reports \(T_D\). The plots never mark the faulted satellite; tick Mystery fault to hide the verdict too, read the chi-squared structure yourself, then Reveal. A MATLAB implementation is also included at demos/FaultDetectionDemo.m.

Wrap-Up#

A sensor fault violates the measurement model and the filter ingests it silently; the state estimate corrupts while the covariance stays misleadingly tight. The innovation grows under a fault while \(\mathbf{S}\) does not, so the Mahalanobis distance \(D^2 = \boldsymbol{\nu}^{\top}\mathbf{S}^{-1}\boldsymbol{\nu}\) is a clean test statistic with a known chi-squared distribution under the null. The detection ladder climbs from a sigma count, to \(\nu^2/S \sim \chi^2(1)\) for one pseudorange, to \(\chi^2(m)\) for \(m\) satellites stacked at one epoch, to the window \(\Lambda_k \sim \chi^2(M)\) for one satellite over \(M\) samples. Detection is a hypothesis test against a chi-squared threshold, with \(P_{\text{FA}}\) trading against time-to-detect; the window is how you gain sensitivity to slow ramps without paying in false alarms. Integrity is a separate question from accuracy: protection levels (HPL, VPL) come from a multi-filter architecture and remain valid under single-sensor faults, while the main filter’s \(\mathbf{P}\) becomes inconsistent. HMI (true error exceeding the protection level) is the failure mode any integrity-monitoring system must prevent or quickly detect. The F-47 ANS capstone in Block 9 will require you to measure \(T_D\) and HMI exposure on a 30-event spoof dataset: Requirement 4 passes if at least 27 of the 30 events show \(T_D \le 5\) s and horizontal and vertical HMI exposure \(\le 1\) s each.

Block 9 introduces the project framing: how to plan a statistically defensible flight-test campaign for a navigation system, including correlation time, effective sample size, and the autocorrelation discount you have to apply when working with high-rate sensor data.