Foundations to Frontier
Tests
K. Time Series and Sensor Data › K4 Prognostics and Health Management

Sensor fusion and sensor faults

Monitoring systems often measure the same quantity with several sensors. Fusion combines their readings into one estimate that is better than any single sensor, and redundancy makes it possible to notice when one sensor goes wrong. This page derives inverse-variance fusion, shows that a Kalman update is the same idea over time, and compares averaging, inverse-variance weighting, median voting and Kalman filtering with and without a fault test when the best sensor develops a bias, a drift or gets stuck.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Four thermometers, one temperature

If four thermometers measure the same room, their readings differ a little because each has its own noise. Averaging them gives a better estimate than any one of them, and trusting the more precise ones more is better still. But a sensor can also fail: it may read too high, slowly drift away or freeze at one value. Then the sensor you trusted most can pull the whole estimate off. Sensor fusion is about combining readings well and noticing when one of them can no longer be trusted.

Prognostics lab
Four sensors (sd 0.5, 0.5, 1, 1) read a slowly wandering value; from step 400 sensor 0 has fault “bias”. Light: sensor 0; dark: truth; Kalman without (third colour) and with a fault test (fourth). RMSE after step 400 — average 0.843, inverse-variance 1.232, median 0.641, Kalman 1.194, Kalman + fault test 0.189. The fault test left sensor 0 out 100% of the time.
Why engineers care

Aircraft measure airspeed with three independent probes and compare them, because a single blocked probe has caused accidents.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Averaging several noisy sensors usually gives…
  2. 2. A stuck sensor…
  3. 3. Redundant sensors help to…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Redundant sensors: several sensors measure the same quantity; each reading is the true value plus its own noise.
  • Inverse-variance fusion: weight each reading by 1/σ²; the fused variance is 1 / Σ 1/σ², smaller than that of the best sensor.
  • Kalman fusion: a state model (here a random walk) carries the estimate forward in time; each new reading is fused with the prediction.
  • Median voting: take the median of the readings; one wild sensor cannot move it far. Two-out-of-three voting flags the sensor that disagrees with the other two.
  • Fault types: bias (a constant offset), drift (an offset that grows), stuck (frozen output), spikes, and higher noise.
  • Fault detection and isolation: compare each sensor with the others, decide that something is wrong (detection) and which sensor it is (isolation), then leave it out.
  • Common-cause errors: errors shared by all sensors (same power supply, same heat) do not average out.
📝 Quick check (Level 1)
0/3 answered
  1. 1. The inverse-variance weight of a sensor is proportional to…
  2. 2. Isolation means deciding…
  3. 3. A drift fault is…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Weighting sensors by their precision

Exercise 1.

  • Fuse two readings, 10 (variance 1) and 12 (variance 4).
  • Four sensors with noise sd 0.5, 0.5, 1 and 1 read the value 20 on 20,000 draws.
  • Compare the variance of inverse-variance fusion with its theoretical value, the plain average and the best single sensor.

Practice.

  • Estimate each sensor’s noise from calibration data or, without a reference, from pairwise differences (the three-cornered hat).
  • Use a state model when the quantity changes slowly; a Kalman filter averages over time as well as across sensors.
  • Never trust weights blindly: the most trusted sensor does the most damage when it fails.
  • Check each sensor against the others, not against the fused estimate, which a faulty sensor has already pulled.
  • Use at least three sensors if you must decide which one is wrong.
  • Tools: NumPy, filterpy, robot_localization (ROS), and the fault-detection blocks of industrial control systems.
import numpy as np

def fuse(y, var):
    w = 1 / np.asarray(var)
    return np.sum(w * y) / w.sum(), 1 / w.sum()
🐍 Exercise 1: inverse-variance fusion
Write the inverse-variance fusion of independent readings, return the fused estimate and its variance, and check by simulation that it beats both the plain average and the best single sensor.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Without a reference instrument, sensor noise can be estimated from…
  2. 2. A faulty sensor should be checked against…
  3. 3. To decide which of the sensors is wrong you need at least…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Inverse-variance fusion. Let readings y_i = x + e_i with independent errors of variance σ_i². Any unbiased linear estimate Σ w_i y_i needs Σ w_i = 1, and its variance is Σ w_i² σ_i². Minimising this under the constraint (a Lagrange multiplier) gives w_i proportional to 1/σ_i², with variance 1 / Σ 1/σ_i². In Exercise 1 four sensors with sd 0.5, 0.5, 1 and 1 gave variance 0.1005 (theory 0.1), the plain average 0.1561, and the best sensor alone 0.25.

A Kalman update is fusion. The scalar update x⁺ = x + K(y − x) with K = P/(P + R) is exactly inverse-variance fusion of the prediction (variance P) and the reading (variance R). Fusing several sensors in one update, or one after another, gives the same result. Over time the filter also averages successive readings, which is why it beats fusion of single time steps when the true value changes slowly.

Why faults are dangerous. The fused estimate moves by w_i times the error of sensor i. A bias b in the most trusted sensor therefore shifts the estimate by its full weight times b, and the Kalman filter, which trusts its own history, cannot tell a fault from a real change. The median moves by at most the spread of the healthy readings. A fault test compares each sensor with the median of the others, smooths that residual with an EWMA chart as in the change-point topic, and removes the sensor while the chart is out of its limits.

📝 Quick check (Level 3)
0/3 answered
  1. 1. The variance of an unbiased linear estimate with weights w_i is…
  2. 2. The Kalman gain P/(P + R) is the weight of…
  3. 3. A bias b in sensor i shifts the fused estimate by…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

When the most precise of four redundant sensors develops a bias, a drift or gets stuck, how much do averaging, inverse-variance weighting, median voting and Kalman filtering lose, and how much does a simple fault test recover?

History.

  • C. F. Gauss (1809) and A.-M. Legendre (1805) introduced least squares; weighting by precision follows from it.
  • R. E. Kalman (1960) gave the recursive filter.
  • A. S. Willsky (1976) and R. Isermann (1984, 2006) surveyed fault detection and isolation; triple modular redundancy and two-out-of-three voting go back to J. von Neumann (1956).

Exercise 2.

  • The true value is a random walk (step sd 0.1) around 20, read by four sensors with noise sd 0.5, 0.5, 1 and 1 for 1000 steps.
  • From step 400 sensor 0 fails: a bias of +3, a drift of 0.01 per step, or stuck at its last reading.
  • Rules: plain average, inverse-variance weighting, median, a Kalman filter with all sensors, and the same filter with a fault test (EWMA, weight 0.2, of each sensor’s residual against the median of the other three, limits at 4 standard deviations of the EWMA).
  • RMSE after step 400, over 20 runs per fault.

Seed 0, RMSE:

fault average inverse-variance median Kalman Kalman + fault test sensor 0 left out
none 0.396 0.319 0.386 0.164 0.164 0%
bias 0.846 1.239 0.642 1.201 0.204 100%
drift 0.949 1.416 0.589 1.382 0.220 81%
stuck 0.605 0.799 0.520 0.778 0.254 48%
  • With healthy sensors trust paid off: inverse-variance beat the average, and the Kalman filter, which also averages over time, halved the error again. With no fault the test left out a healthy sensor on only 0.003% of sensor-steps.
  • After a fault the ranking flipped: inverse-variance and Kalman, which give sensor 0 the most weight, became the worst; the median was the best of the simple rules.
  • The fault test recovered almost all of the loss: RMSE 0.20 to 0.25 against 1.2 to 1.4 without it.
  • Stuck was the hardest to detect: a frozen sensor looks healthy while the true value stays near it, so it was left out only 48% of the time; while left out its error averaged 2.36, while kept 0.54, so it was removed when it mattered.
  • A first version that tested each sensor against the filter’s own estimate failed on the stuck fault (RMSE 1.59, worse than no test): the faulty sensor had pulled the estimate, so the healthy sensors looked wrong and were removed.
  • Seeds 1 and 2: Kalman + fault test 0.160 and 0.163 with no fault, 0.201 and 0.199 with bias, 0.245 and 0.250 when stuck; Kalman without the test 1.209 and 1.211 with bias.
🐍 Exercise 2 (research): when the most precise of four redundant sensors develops a bias, a drift or gets stuck, how much do averaging, inverse-variance weighting, median voting and Kalman filtering lose, and how much does a simple fault test recover?
Simulate four redundant sensors of a slowly changing value, let the best sensor fail in three ways, and compare five fusion rules, including a Kalman filter with a fault test based on the other sensors.

Sensor fusion in practice

  • Different kinds of sensors: accelerometers, gyroscopes and GPS measure different but related quantities; extended and unscented Kalman filters fuse them through a model.
  • Analytical redundancy: a model of the system can stand in for a missing physical sensor, so faults can be found with fewer sensors.
  • Calibration and time alignment matter as much as the fusion rule: a time offset looks like noise or bias.
  • Safety standards (for example IEC 61508 and aviation rules) prescribe redundancy and voting for critical measurements.

References

  1. R. E. Kalman (1960). “A new approach to linear filtering and prediction problems.” Journal of Basic Engineering.
  2. A. S. Willsky (1976). “A survey of design methods for failure detection in dynamic systems.” Automatica.
  3. R. Isermann (2006). Fault-Diagnosis Systems. Springer.
  4. J. von Neumann (1956). “Probabilistic logics and the synthesis of reliable organisms from unreliable components.” Automata Studies.
  5. Y. Bar-Shalom, X. R. Li and T. Kirubarajan (2001). Estimation with Applications to Tracking and Navigation. Wiley.