3.5.20 · D3Guidance, Navigation & Control (GNC)

Worked examples — Sensor fusion — complementary filter (simple), Kalman filter (optimal)

2,100 words10 min readBack to topic

Before we touch numbers, one reminder of the two update laws we will reuse everywhere.

Here is our angle estimate, the gyro rate, the accelerometer angle, the sample time, the filter time-constant. For Kalman, is process-noise variance (how much the truth wanders per step), is measurement-noise variance (how jittery the sensor is), is our current uncertainty (variance) and the gain (how far we jump toward the new reading).


The scenario matrix

Every filter behaviour lives in one of these cells. The examples below each carry a [Cell N] tag.

Cell Case class What makes it special
1 (large ) trust gyro almost fully — drift survives
2 (small ) trust accel almost fully — noise survives
3 Balanced , many steps drift-cancellation shown over time
4 Kalman: (perfect sensor) , snap to measurement
5 Kalman: (dead sensor) , ignore measurement
6 Kalman: (frozen truth) and shrink to zero — converges
7 Kalman: multi-step steady state converges to a constant = complementary
8 Degenerate: (agreement) measurement adds no correction
9 Word problem — drone pitch real signs, real units
10 Exam twist — pick for a cutoff design, not just simulate

Complementary filter cases


Kalman filter cases


Word problems


Figure — Sensor fusion — complementary filter (simple), Kalman filter (optimal)

The figure above places every example on one map: the complementary gain axis (Examples 1, 2, 9, 10) and the Kalman gain axis (Examples 4–8) are the same axis viewed twice, joined at the steady state (Example 7) where .


Recall Quick self-check

Big (noisy sensor) makes the Kalman gain do what? ::: Shrink toward 0 — trust the sensor less. With and constant truth, what happens to over many steps? ::: It shrinks toward 0 as ; the filter eventually stops listening. At steady state, the Kalman filter equals which simpler filter? ::: A complementary filter with fixed . If the measurement equals the prediction, does the estimate move? Does uncertainty drop? ::: Estimate stays put; uncertainty still drops. Higher crossover frequency needs a larger or smaller ? ::: Smaller , since .

Prerequisite refreshers: Gyroscope, Accelerometer, Low-pass and High-pass filters, Gaussian distribution, Bayesian estimation, State-space models, Extended Kalman Filter, Attitude estimation (AHRS), Inertial Navigation Systems.