This is Post 2 of the six-part VHM statistical-methods series. The previous post (spectral analysis) covered the bedrock methods that turn a raw signal into diagnostic features. This one covers what to do when you have something stronger than just a signal — when you also have a model of the system, and the diagnostic question becomes “where does my model and reality disagree?”
The residual — what the model predicted minus what the sensor actually measured — is one of the most diagnostic signals in engineering. A well-designed residual is zero in the absence of a fault and nonzero in a fault-specific direction when a fault occurs. The “specific direction” is the trick: a structured residual vector not only tells you that something is wrong, it tells you which component is at fault. This is the heart of model-based fault detection and isolation (FDI), and it is one of the cleanest, most powerful patterns in classical control engineering.
The post is the natural companion to the Loop Engineering field guide (residuals are what closed-loop systems use to know if they’re tracking) and the Adaptive Control field guide (parameter-estimation residuals are how adaptive controllers detect mismatch).
What it covers
About twenty-four minutes of careful reading.
Parity equations. The simplest residual generator. Algebraic relationships among sensors that should hold if the system is healthy. The redundancy that lets you find a contradiction.
Observer-based residuals. When you have a state-space model. The Luenberger observer as a residual factory. The Kalman filter as the optimal observer when there’s noise. The innovation sequence as the diagnostic signal.
Parameter-estimation residuals. When the fault is a parameter shift rather than a sensor or actuator. Recursive least squares as the workhorse. Detecting which parameter shifted from the structure of the residual.
Structured residual design. The discipline that turns “something is wrong” into “X is wrong.” Decoupling matrices. The geometric approach. The directional-residual conditions that make isolation possible.
Threshold setting. Where the math meets reality. Chi-squared thresholds for the linear-Gaussian case. CUSUM and GLR for the nonparametric cases. The trade-off between false alarms and missed detections, drawn out.
A worked example. A battery state-of-charge model with a known sensor-bias fault. The full residual generator from first principles, the chi-squared threshold, the detection delay, and the isolation matrix.
Read it
Code & data
↓ residual-analysis-kit.zip — the Python source for every figure plus the synthetic battery dataset.
The VHM statistical-methods series
This is Post 2 of 6:
- Listening to the Machine — time-series and spectral analysis
- Reading the Residual — (this post) — model-based fault detection and isolation
- Catching the Change — change and fault detection over time
- Reading the Couplings — dependence measures
- Reading the Whole Machine — multivariate monitoring
- Reasoning Under Uncertainty — probabilistic methods
← Back to Autonomy