To safely control a complex system—whether it is an autonomous vehicle, a robotic arm, or a power grid—we must be certain that our sensors and actuators are telling the truth. If a sensor fails due to hardware wear, or if an attacker hijacks a data stream to inject malicious values, the controller will react to false information, often with catastrophic results.
How can a system detect that its inputs have been compromised without relying on redundant hardware? The answer lies in residual monitoring: using an internal mathematical model of the system to predict future behavior, and analyzing the mismatch between expectation and reality.
The Core Intuition: The Predictive Loop
At the heart of residual-based detection is a simple idea: we can run a real-time simulation of the physical system in parallel with the actual system. This simulation, often called an observer or a Kalman filter, takes the same control inputs as the physical system and predicts what the next sensor measurements should be.
As shown by Frisk et al., this framework allows us to continuously calculate a residual (or innovation)—the mathematical difference between the actual observed sensor measurement ($y$) and the model's prediction ($\hat{y}$):
$$\text{Residual} = y - \hat{y}$$
Control Input (u) ---> [ Physical System ] ---> Actual Measurement (y)
| |
v v
[ System Model ] ----> Predicted Measurement (ŷ) --------> ( - )
|
v
Residual (y - ŷ)
Under nominal operating conditions, the mathematical model is highly accurate. The residual is not exactly zero due to ambient environmental noise, but it behaves as a predictable, zero-mean Gaussian white noise process.
However, if a component breaks or an attacker injects false data, the physical system and the model diverge. The residual shifts away from zero. As Nakamura et al. demonstrate, this internal observer loop can be embedded directly within the controller architecture itself, allowing the system to generate diagnostic signals automatically without requiring separate, redundant monitoring hardware.
Passive Monitoring: Distinguishing Noise from Faults
In the real world, a residual rarely jumps to a clean, obvious constant during a fault. Instead, it is obscured by sensor noise and environmental disturbances. If we set our detection threshold too low, normal noise fluctuations will trigger constant false alarms; if we set it too high, we will miss subtle, slow-drifting faults.
To solve this, researchers use statistical change-point detection algorithms that evaluate the history of the residual rather than looking at individual data points in isolation.
Cumulative Summation (CUSUM)
As Lee et al. and Wan et al. explain, the CUSUM algorithm integrates the residual over a sliding time window. Because normal sensor noise is zero-mean, its positive and negative fluctuations tend to cancel out over time, keeping the cumulative sum near zero.
However, if a sustained bias is introduced—such as a GPS spoofing attack or a sticking actuator—the residuals will consistently skew in one direction. The CUSUM statistic will rapidly accumulate this evidence, causing a sharp statistical shift that easily breaks through the noise floor.
Covariance and Likelihood Ratio Tests
Instead of just tracking the mean, we can monitor the statistical distribution of the residuals. Mishra et al. and Xia et al. utilize windowed likelihood ratio tests to evaluate whether the variance of the recent residuals matches the expected noise profile. If an attacker injects random data or if a sensor begins to fail erratically, the energy and covariance of the innovations will warp, violating the expected Gaussian distribution and triggering an alarm.
Active Defense: Defeating Stealthy Replay Attacks
Passive monitoring works perfectly if an attacker blindly injects arbitrary data. But what if the attacker is sophisticated?
In a replay attack, an adversary records a stream of legitimate sensor data during normal operation. They then hijack the system, execute a destructive action, and loop the recorded "healthy" data back to the controller. Because the replayed data came from the real system, it perfectly matches the physics encoded in our model. The passive residuals remain near zero, leaving the controller completely blind to the ongoing destruction.
To defeat this, researchers use an active defense strategy known as dynamic watermarking.
Control Command ---> ( + ) ---> [ Physical System ] ---> [ Attacker Replays ] ---> Controller
^ [ Old Data ]
| |
Secret Watermark v
(Random Signal Δu) Missing Watermark
Fingerprint!
The core idea, explored by Porter et al. and Du et al., is to inject a tiny, zero-mean, pseudo-random "secret" signal ($\Delta u$) directly into the control inputs. This watermark is small enough that it doesn't disrupt the system's stability or performance, but it forces the physical system to wiggle in a very specific, unpredictable way.
Because the physical system reacts to this watermark, the true sensor outputs must contain the statistical fingerprint of $\Delta u$.
When an attacker replays old data, that data contains the fingerprint of past control inputs, not the current secret watermark. By calculating the cross-covariance between the current injected watermark and the incoming sensor residuals, the security system can instantly detect the mismatch. As Somarakis et al. demonstrate, this concept can even be extended to "delay-induced" watermarking, where random time delays are introduced into the control loop to create a unique statistical signature without adding artificial noise.
Fault Isolation: Mapping Residuals to Geometry
Detecting that an anomaly has occurred is only half the battle; a resilient system must also isolate where the anomaly is occurring so it can ignore the compromised component and continue operating safely.
When a system has multiple sensors and actuators, a fault in one component propagates through the dynamics and taints multiple residuals simultaneously. To pinpoint the root cause, researchers treat fault isolation as a geometric problem.
Parity Spaces and Subspace Classification
As Sheikhi et al. demonstrate, we can construct data-driven filters that map the system's healthy dynamics into a specific mathematical nullspace (or parity space). When a specific sensor fails, it drives the residual vector along a predictable geometric trajectory unique to that sensor. By measuring the "angle" or projection of the real-time residual vector against these predefined fault subspaces, the system can instantly classify which component has failed.
Directional Alignment
Attackers sometimes attempt to blind safety mechanisms by slowly biasing sensors to make the system appear safer than it actually is. Arnström et al. address this by analyzing the directional correlation of measurement residuals. If the residual vector is unnaturally aligned with the interior of a safe operating zone, it reveals a coordinated, directional attempt to mask unsafe behavior, allowing the system to catch stealthy manipulations that magnitude-based thresholds would completely miss.
By combining passive statistical monitoring, active dynamic watermarking, and geometric isolation, modern control systems can transform basic state estimation loops into highly secure, self-diagnosing architectures capable of surviving both hardware wear and malicious cyber-attacks.
Key Foundational Work
Fault detection of NCS based on eigendecomposition, adaptive evaluation and adaptive threshold (2007) — contributed 1 concept elements to this direction.
A minimal polynomial basis solution to residual generation for fault diagnosis in linear systems (2001) — contributed 1 concept elements to this direction.
Joint Synthesis of Controller and Fault Detector and Its Application to Motor Drive Control System (2001) — contributed 1 concept elements to this direction.