UAV Systems Engineering · Module 8
M8-T13: IMU failure handling
The IMU is the one sensor everything depends on. Detect its failure quickly, isolate it, and have a plan for when it is the only one.
When a GPS fix is lost the vehicle can still fly; when the IMU is wrong the vehicle is in trouble within a second. IMU failures are rare but severe, and several are silent: a stuck output looks calm, a bias step looks like a manoeuvre. Detection needs either redundancy and cross-checks or a model-based residual against other sensors.
Learning objectives
After this lesson, you should be able to:
- Classify IMU failure modes and their signatures in gyro and accelerometer data.
- Implement cross-check voting for triple redundancy and explain why dual redundancy cannot isolate.
- Use model-based residuals (gyro vs attitude change, accelerometer vs gravity) for single-IMU detection.
- State detection time and what the vehicle does on a confirmed failure.
Conceptual explanation
Established Redundancy management by voting and cross-checks is standard in avionics. Many autopilots use several IMUs and a selection logic; check what yours does and how it is configured. Thresholds in the example are placeholders and must be derived from the sensor noise specification and validated.
Failure modes and their signatures:
| Failure | Signature | How to detect |
|---|---|---|
| Stuck / frozen output | Identical successive samples, zero noise | Variance below the noise floor; repeated values |
| Bias step or drift | Constant offset on one axis | Disagreement with other IMUs; residual against attitude change |
| Noise increase | High-frequency variance up (bearing damage, loose mounting) | Variance ratio against its own history and against the other IMUs |
| Saturation / clipping | Samples at full scale | Range check; clipping flag |
| Dropout / timing | Missing or late samples | Sample counter and timestamp gaps |
| Scale-factor or axis error | Wrong magnitude or swapped axis after a fault | Disagreement scaling with motion; gravity magnitude check at rest |
Detection approaches:
- Cross-check between units: with the median of redundant measurements isolates one faulty unit; with 2, only a disagreement is seen.
- Model-based residuals: integrate the gyro and compare with the attitude change from another source (magnetometer, vision, GNSS velocity); compare the accelerometer’s mean at rest with gravity; compare the estimator’s innovations with their expected size.
- Built-in tests and data quality: sensor status flags, sample counters, temperature, vibration metrics.

Engineering intuition
Three clocks on a wall: if one disagrees, you believe the other two. Two clocks that disagree tell you something is wrong, not which one. IMUs work the same way, except vibration makes “disagree” fuzzy: two units at different mounting positions legitimately see slightly different signals during manoeuvres (lever arm, mounting flexure), so the thresholds must exceed the normal disagreement while staying below the level that matters to the estimator.
Isolation is only half the answer. After removing a faulty IMU the system has less redundancy; the next failure may be unrecoverable. The response ladder is: continue with warning on the first fault if two healthy units remain; land promptly if one remains; and treat a failure with no healthy unit as an emergency (controlled descent from a model-based estimate if the autopilot has one, otherwise termination).
Mathematical formulation
For three units measuring the same quantity with independent noise and no fault, the pairwise differences have standard deviation ; a fault is declared when a unit’s disagreement with the median of the three persists. For unit with measurement and the median of the three, the residual is a noise-like quantity whose standard deviation is below for an unfaulted unit, so a threshold of several is conservative:
where accounts for legitimate disagreement from lever arms (for angular rate and a lever-arm acceleration, a·) and keeps the false-alarm probability per sample at about to for Gaussian noise. The detection delay for a bias step of size with required samples at rate is N/f provided ; for near detection takes longer and a CUSUM test improves sensitivity: , alarm when . A gyro bias of rad/s gives an attitude error , so a 0.05 rad/s bias reaches in 1 s: detection within tens of milliseconds is needed for a fast vehicle.
- ,
- sensor noise and legitimate inter-unit disagreement.
- ,
- threshold multiplier and consecutive-sample count.
- ,
- CUSUM allowance and alarm level.
Architecture and data flow
IMU , , (SPI, each with its own sample counter and timestamp) → sensor drivers → sensors module (voter and selection) → estimator input (selected unit, or the combination of healthy units) with flags in the status message. The vehicle status reports the selected IMU and failure flags; the commander applies the failure response. The log records every unit’s raw data and the voter decisions so that a fault can be reconstructed. (In PX4 the sensors module and EKF2 handle multi-IMU selection and use innovation checks; consult the documentation of your version for the parameters and behaviour.)
Real-world UAV applications
- Triple-IMU flight controllers with automatic failover.
- Single-IMU vehicles using model-based residuals and a conservative failsafe.
- Vibration and mounting diagnostics during development.
- Verification of fault detection by injecting faults in recorded data.
Implementation example
This runs as shown. A triple-IMU gyro voter with three injected faults on different units (stuck output, bias step, noise increase), detection by median cross-check with consecutive samples and a CUSUM for small biases. It reports detection delays and false alarms, and shows that two units alone detect but cannot isolate.
import numpy as np
rng = np.random.default_rng(51)
fs, T = 250, 60.0; n = int(fs * T); t = np.arange(n) / fs
sigma = 0.004 # gyro noise (rad/s) per sample, placeholder
truth = 0.8 * np.sin(2 * np.pi * 0.5 * t) + 0.3 * np.sin(2 * np.pi * 1.7 * t) # true body rate about one axis
def triple(fault=None, unit=0, t_fault=20.0):
z = np.stack([truth + sigma * rng.standard_normal(n) for _ in range(3)]); k = int(t_fault * fs)
if fault == 'stuck': z[unit, k:] = z[unit, k]
if fault == 'bias': z[unit, k:] += 0.03 # about 7.5 sigma
if fault == 'noise': z[unit, k:] += 0.05 * rng.standard_normal(n - k) # about 12 sigma
return z
def voter(z, k=6.0, N=5, nu=1.5 * sigma, h=12 * sigma, window=125):
# median cross-check of three units; returns the time at which each unit is first flagged (None if never)
alarm = [None] * 3; S = np.zeros(3); cnt = np.zeros(3, int)
for j in range(z.shape[1]):
m = np.median(z[:, j]); r = np.abs(z[:, j] - m)
cnt = np.where(r > k * sigma, cnt + 1, 0); S = np.maximum(0.0, S + r - nu) # consecutive-exceedance counter and a CUSUM
if j > window:
w = z[:, j - window:j]; frozen = np.ptp(w, axis=1) < 1e-9 # no change at all for 0.5 s
d = np.std(np.diff(w, axis=1), axis=1); noisy = d > 3 * np.median(d) # much noisier than the median unit
else: frozen = noisy = np.zeros(3, bool)
for i in range(3):
if alarm[i] is None and (cnt[i] >= N or S[i] > h or frozen[i] or noisy[i]): alarm[i] = t[j]
return alarm
for fault, unit in (('stuck', 0), ('bias', 1), ('noise', 2)):
a = voter(triple(fault, unit)); delay = a[unit] - 20.0
print(f"{fault:>5} fault on unit {unit}: flagged at {a[unit]:.3f} s (delay {delay:.3f} s); other units flagged: {[x for i, x in enumerate(a) if i != unit and x is not None]}")
assert 0 <= delay < 0.8 and all(x is None for i, x in enumerate(a) if i != unit)
fa = sum(x is not None for x in voter(triple())); print("false alarms on 60 s of fault-free data (3 units):", fa); assert fa == 0
z = triple('bias', 1); two = z[[0, 1]]; dis = np.abs(two[0] - two[1])[int(20 * fs):]
print(f"with two units only: disagreement after the fault is {dis.mean():.3f} rad/s ({dis.mean() / sigma:.0f} sigma) on average, but which of the two is wrong is undetermined")
assert dis.mean() > 5 * sigma
print(f"attitude error from the bias if not isolated: {np.degrees(0.03 * 1.0):.2f} deg after 1 s")Common engineering mistakes
Voting with two IMUs and pretending to isolate
Two units detect disagreement only; use a third unit or a model-based tie-breaker.
Thresholds ignoring legitimate disagreement
Lever arms and flexure cause disagreement in manoeuvres: include it, or false alarms occur in flight.
Same fault source for all IMUs
Common vibration, power or temperature faults hit all units: redundancy does not help.
No detection of stuck outputs
A frozen IMU looks calm; check for zero variance.
No response ladder
Decide in advance what to do after the first, second and last unit fail.
Failure modes
| Failure mode | How it shows up | Likely cause |
|---|---|---|
| Silent bias step | Attitude slowly wrong | Single IMU with no model-based residual |
| False failover in flight | Unit rejected during aggressive manoeuvre | Threshold below legitimate disagreement |
| Common-mode vibration | All IMUs corrupted | Mount resonance or prop imbalance; redundancy defeated |
| Late detection | Large attitude error before isolation | Too many required samples or too high a threshold for the bias size |
Debugging approach
- Log raw data of all IMUs and the voter state; plot pairwise differences.
- Measure normal disagreement in flight to set thresholds above it.
- Inject frozen, biased and noisy data into a recorded flight and replay.
- Check vibration spectra at the IMU mounts for resonances.
Practical exercises
- Compute the detection delay for a 0.02 rad/s bias with the example CUSUM parameters.
- Add the accelerometer and a gravity check at rest to the monitor.
- Estimate for a 0.1 m lever arm at angular acceleration.
- Define the response ladder for your vehicle (three, two, one IMU).
Interview questions
Write an answer in your own words, then reveal the model answer. Nothing is sent anywhere.
Question 1
Why can two IMUs not isolate a fault by voting?
Model answer
A disagreement is symmetric: either unit could be wrong. A third unit provides a majority, or a model-based residual provides a tie-breaker.
Question 2
How can a single IMU’s failure be detected?
Model answer
With model-based residuals: compare integrated gyro with attitude change from a magnetometer, vision or GNSS velocity, check that the accelerometer norm at rest equals gravity, and monitor estimator innovations and sensor variance.
Question 3
What is a common-mode failure?
Model answer
A single cause that affects all redundant units at once (shared power, vibration, temperature, software), which defeats voting and has to be handled by design, isolation and separate mounting.
References and further reading
Primary papers, official documentation and standards. Each claim above that is specific to a tool or version points here.