Twenty-one lessons answer one question: given several flawed sensors, what is the best estimate, and how sure is it? Pick a situation and the atlas routes it to the method the series recommends. In a 30 s tunnel the IMU alone ends 155 m off. The error-state filter of Lesson 14 ends 6.6 m off.
Pick a situation. Watch its route light up through the map, and read the evidence from the lesson that derived it. Then we walk the four families one chapter each, and finish with a router you set yourself.
You need the earlier lessons, or what a variance is and some curiosity. Every number links back to its lesson.
Lesson 22 of 22 in Sensor Fusion: Classical to Modern. It follows Debugging and Consistency and closes the series.
Every number comes from the lesson named in the read-out. Most are that lesson's illustrative toy; the street numbers are TransFusion's Table 5 (nuScenes validation). Bars use a log scale and lower is better. The route lists the lessons to read, in order.
Chapter 0
Build a sensor suite and find the conditions where every sensor goes dark at once
An engineer gets a robot car with five sensors and about twenty methods to choose from. Each lesson in this series solved one piece. This page puts the pieces on one map, so you can route a new problem to a method in a minute.
The map rests on one fact from Lesson 1: different sensors fail in different conditions. A camera goes blind at night, where a LiDAR still works. GNSS dies in a tunnel, where the IMU keeps counting. Fusion pays because these failures do not overlap.
Each row is a sensor, each column a condition. Turn sensors on to build a suite. The bottom row says whether the suite still sees: green covered, grey weak (degraded, or bridged for seconds by the IMU), red dark.
Illustrative ratings for keeping track of a car and its surroundings. Real performance depends on the model, the weather and the scene. The IMU works everywhere for seconds and drifts after that (Lesson 13), so it only bridges.
Overlap is the whole story. GNSS and IMU leave the tunnel bridged for seconds only, because the IMU drifts. Add a LiDAR and it covers the tunnel. Two cameras leave night dark: two copies of one weakness add nothing there.
Voting turns this into a number. Say each sensor works 95% of the time and fails on its own. Call that chance R. Three sensors that vote give the right answer when at least two of them work. Call that chance R-two-out-of-three.
R-two-out-of-three equals three R squared, minus two R cubed.
Square R and triple it. Cube R, double it, and subtract. The result is the chance the vote is right.
R = 0.95: 3 × 0.9025 − 2 × 0.857 = 0.99275. One sensor is right 95% of the time; the vote is right 99.3% of the time. Two cameras that must both work for stereo give 0.95 × 0.95 = 0.9025 (Lesson 1).
The formula assumes the failures are independent. Fog that blinds the camera also hurts the LiDAR, so the real gain is smaller.
Chapter 1
Walk the map of all twenty-one lessons, and see which ideas grew from which
The twenty-one lessons fall into four families. They are stages, not buckets. Each family answers a harder form of the question than the one before.
One more lesson runs along all four as a spine. Lesson 21 audits every filter: is it as sure as it claims?
Solid lines mean "learn this first". Dashed lines mean "grew out of". Tap a node, or step through with the buttons. The timeline view puts the same story on a calendar.
The edges are this series' teaching order, not a citation graph. Dates name the first well-known paper or system for each idea.
Look at how much hangs off Lesson 4, the Bayes filter. The Kalman filter is the Bayes filter with straight models and bell curves. The EKF and UKF are the Kalman filter on curved models. The information filter stores the same belief as precision. The particle filter drops the bell curve. So 5 of the 7 filters after Lesson 4 (Lessons 5, 7, 8, 9 and 10) are one recursion with a different way to store the belief.
The timeline adds the dates. The classical era, from 1960 into the 1990s, built the core of straight models and bell curves. The robotics era added particles, SLAM and factor graphs. From 2016, the deep era made the fusion rule itself learnable. Each era wrapped the last: KalmanNet still runs a Kalman recursion and lets a network compute the gain.
Chapter 2
Weight each reading by one over its variance, then find the same rule inside the Kalman gain
Two thermometers read one room. Thermometer A reads 22.0 °C with a noise of 0.5 °C. Thermometer B reads 20.0 °C with a noise of 2 °C. The plain average, 21.0 °C, is about twice as noisy as A alone. A good fuser leans on A.
By how much? Lesson 3 answers with precision: one over the variance, where the variance is the noise squared. A's precision is 1/0.25 = 4, and B's is 1/4 = 0.25. Call the readings x-A and x-B, and their precisions P-A and P-B. Call the fused estimate x-f.
x-f equals P-A x-A plus P-B x-B, all over P-A plus P-B.
Multiply each reading by its precision. Add the two products. Divide by the total precision. The fused precision is that total, P-A plus P-B.
P-A = 4, P-B = 0.25: x-f = (4 × 22 + 0.25 × 20) / 4.25 = 21.88 °C. A's weight is 4/4.25 = 0.941. The fused precision is 4.25, so the fused noise is 0.485 °C, better than A's 0.5 (Lesson 3).
The curve is the fused noise for every weight on A. Drag the weight to find the bottom, then change either thermometer's noise and watch the bottom move.
Exact for independent noise: the fused variance is w²σA² + (1 − w)²σB², with its bottom at w = PA/(PA + PB).
This rule hides in the rest of the series. In Lesson 5, call the prediction's variance P-bar and the reading's variance R. The Kalman gain K is the weight on the reading, the same precision weight with new names:
K = P̄ / (P̄ + R) = 13 / (13 + 9) = 0.591. The drone predicts 110 m and reads 115 m, so it lands at 110 + 0.591 × 5 = 112.95 m, with variance 0.409 × 13 = 5.32 m².
The information filter (Lesson 9) stores precisions and adds them. Particle weights (Lesson 10) multiply by how well each particle explains the reading. A factor graph (Lesson 17) divides each squared error by its variance. Attention (Lesson 19) learns a weight per source. One rule, many costumes.
Chapter 3
Predict and update a belief, then choose its shape: a bell curve, a tangent, sigma points or particles
Now the robot moves, and readings arrive over time. The Bayes filter of Lesson 4 carries a belief: a probability for every place the robot might be. Two steps repeat. Predict: move the belief with the motion model, which blurs it. Update: multiply by how well each place explains the reading, which sharpens it.
Call the belief over place x bel(x). Call the chance of reading z from place x p(z | x), the likelihood. Call the chance of moving from place x-prime to place x p(x | x′), the motion model. A constant η rescales the result so it adds to 1.
bel of x equals eta, times p of z given x, times the sum over x-prime of p of x given x-prime, times bel of x-prime.
For each place x, add the old belief from every place x-prime, each times the chance of moving from there. That is the prediction. Multiply it by the likelihood p of z given x, then rescale with eta so the belief adds to 1.
Lesson 4's hallway: 8 cells with a flat belief of 0.125, 3 of them doors. The sensor says "door"; p(door | door) = 0.8 and p(door | wall) = 0.3. The total is (3 × 0.8 + 5 × 0.3) / 8 = 0.4875, so eta = 1/0.4875. Each door cell rises to 0.8 × 0.125 / 0.4875 = 0.205. Each wall cell falls to 0.077.
The sum runs over every place, which is too slow when the state is continuous. Each later filter stores the belief in a cheaper shape:
Grey dashes are the honest belief. Teal is what the chosen filter stores. Pick a problem, then a filter, and read where its answer lands.
Illustrative, exact maths. Straight: y = 2x + 1. Squared: y = x². Both start from a belief with mean 2 and variance 4, as in Lesson 8. Three landmarks: Lesson 10's hallway, peaks at 10, 30 and 50 m, each 1.5 m wide; "gaps" are more than 4 m from every landmark, inside the 72 m hallway. Particles: 400 seeded samples.
On the straight sensor all four agree, and the Kalman filter is exact. Square the reading and the tangent fails: the true mean is 8, the EKF says 4, and three sigma points say 8. Give the robot three identical landmarks and every bell curve fails. The best one centres on 30 m with a width of 16.4 m and puts 58% of its belief in empty hallway.
Chapter 4
Add precisions when estimates are independent, and intersect them when they might share data
Two robots each send an estimate of a wall: 10 m, variance 4 m². If their errors are independent, the information filter of Lesson 9 adds the precisions: 0.25 + 0.25 = 0.5, so the fused variance is 2 m². Six cameras, six additions.
Now say robot B copied its number from A. The two estimates share all their error, and adding precisions counts one reading twice. Lesson 2 calls this double counting. The fuser claims 2 m², but the real variance stays 4 m².
Call the correlation of the two errors rho: 0 when independent, 1 for a copy. The real variance of the average is 4(1 + rho)/2. At rho 0.5 it is 3 m², and the naive fuser still claims 2.
Covariance intersection (CI, Lesson 11) fuses without knowing rho. Call the two estimates' variances P-1 and P-2, and a weight ω between 0 and 1.
P-C-I inverse equals omega P-one inverse, plus one minus omega, P-two inverse.
Take omega of the first precision and the rest from the second. The blend is the fused precision. Because the weights add to 1, in one dimension the result is never sharper than the better source.
P-1 = P-2 = 4 m², so both precisions are 0.25. For any omega the blend is 0.25, so CI claims 4 m²: the honest answer for a copy. With independent estimates it is cautious, since plain addition would honestly give 2 m².
Each dot is one fused error from 240 simulated pairs. Purple is the 95% band the chosen fuser claims. Raise the correlation and count the red dots outside.
Illustrative, seeded: both estimates have variance 4 m² and errors with correlation rho. Both fusers give the same fused number here (the average); only the claimed band differs. The expected share outside is exact; the dot count varies with the seed.
At rho = 1, about 16% of the naive fuser's errors fall outside a band that should miss 5% (Lesson 11). CI's band misses about 5% at every rho, because it never assumes the errors are independent.
Chapter 5
Bound the IMU's drift with fixes, sort readings to targets, and line up the clocks
A real vehicle runs its filter on messy hardware. Family 3 is the engineering that makes the filter work. An IMU drifts (Lesson 13), and GNSS bounds the drift (Lesson 14). Each reading must find its target (Lesson 12), and the clocks and mounts must agree (Lesson 15).
Start with the drift. Call the accelerometer bias b. From a perfect start, the IMU's position error grows as one half b t squared. Call the GNSS noise σ. The IMU beats GNSS until its drift reaches sigma. Call that time t-star.
t-star equals the square root of two sigma over b.
Set the drift, one half b t squared, equal to sigma and solve for t. Before t-star, the IMU's motion is better than a fix. After it, the next fix is better.
Lesson 14: b = 0.05 m/s² and sigma = 1.5 m. t-star = √(2 × 1.5 / 0.05) = √60 = 7.7 s. GNSS fixes come every second, well inside 7.7 s, so the IMU only has to bridge short gaps.
The shaded span is the tunnel, with no fixes. Warm is the IMU alone, teal the fused filter, and the dashed blue line the GNSS noise. Move the bias and the tunnel length.
Illustrative, a constant bias and nothing else: the IMU alone is one half b t squared from the start. The fused filter is reset to 1 m by each 1 Hz fix and has learned the bias to within 0.007 m/s² (made up, near Lesson 14's learned case). GNSS noise 1.5 m.
In the tunnel the fixes stop. Alone for 30 s, the IMU in the device drifts 0.5 × 0.05 × 900 = 22.5 m. The fused filter learned the bias before the tunnel, so only the leftover drifts. A leftover of 0.007 m/s² adds 3.2 m to the 1 m it entered with. The first fix after the tunnel snaps it back.
The other two lessons guard the inputs. Data association gates each reading by its statistical distance before it reaches a track. With 10 false alarms a frame, nearest neighbour lost a track in 16 of 100 runs, and JPDA in 3. Calibration lines up the clocks: a 10 ms offset at 30 m/s puts LiDAR points 30 cm behind the car the camera sees.
Chapter 6
Write every reading as a weighted squared error and solve for the whole trajectory at once
A filter summarises the past and throws it away. That is fast, but a late reading cannot fix an old pose. The visual-inertial and LiDAR-inertial systems of Lesson 16 and Lesson 17 keep a window of past poses and solve for all of them together.
Each reading becomes a factor. Call its residual r-i: the gap between what reading i says and what the candidate poses x predict. Call that reading's variance sigma-i squared. The best trajectory, x-hat, makes the weighted sum smallest. This is the maximum a posteriori (MAP) estimate.
x-hat equals the arg-min over x of the sum over i of r-i of x squared, over sigma-i squared.
Write each reading as a residual r-i. Divide its square by the reading's variance sigma-i squared. Add them all, then move every pose until the sum is smallest.
Lesson 17's two poses: a prior says x-0 = 0 (variance 1), odometry says x-1 − x-0 = 10 (variance 1), and GNSS says x-1 = 11 (variance 4). Setting the derivatives to zero gives x-0 = 0.167 m and x-1 = 10.333 m. A Kalman filter gives the same x-1 but leaves x-0 at 0.
The robot drives ten 1 m steps, and its odometry reads 5% long. Bars show each pose's error. Choose filter or graph, then sharpen the fix at pose 10.
Illustrative, exact least squares: a 0.01 m prior on pose 0, ten odometry factors of 1.05 m with a 0.05 m sigma, and one absolute fix of 10.00 m on pose 10.
That is the deep link. A Kalman filter is this graph shaped as a chain and solved forward once. The graph keeps the chain, so a late factor reaches back. In the device the fix pulls the whole chain toward the truth: worst error 0.14 m. The filter fixes only pose 10 and leaves pose 9 0.45 m off.
Lesson 16 adds the camera's twist: one camera sees shape but not size, and the IMU's acceleration sets the scale, 1.8 on its walk. Lesson 17 adds loop closures, preintegrated IMU factors and the blind corridor.
Chapter 7
Draw camera and LiDAR into one grid, and let attention weigh each source
A camera sees what a thing is. A LiDAR measures how far away it is. A radar measures how fast it moves, even in fog (Lesson 18). Classical fusion uses the calibration to tell the network which pixel belongs to each LiDAR point. If the calibration is off, the pairing is wrong.
The networks of Lesson 19 learn the pairing. Both sensors draw features into one bird's-eye-view (BEV) grid, a top-down map of the road. Then attention lets a query score each candidate source and turns the scores into weights. Call the score of source i s-i and its weight w-i.
w-i equals e to the s-i, over the sum over j of e to the s-j.
Raise e to each score s-i. Divide each by the total. The weights w-i are positive and add to 1, like the precision weights of Chapter 2, but learned from data.
Scores 2.0 and 1.6 (Lesson 19): e to the 2.0 is 7.39 and e to the 1.6 is 4.95. The weights are 7.39 / 12.34 = 0.60 and 4.95 / 12.34 = 0.40.
Grey bars fuse by hard matching; teal fuses by attention. Choose how many of the six cameras die and compare what each fuser keeps.
Numbers from TransFusion (Bai et al., CVPR 2022), Table 5: nuScenes validation mAP with the dropped images' features set to zero. CC is point-wise concatenation and PA is PointAugmenting, both hard associations. The axis starts at 30 mAP; dashed outlines mark each fuser with all cameras on.
Soft weights survive a dead sensor. With all six cameras off, the concatenating fuser drops from 63.3 to 39.5 mAP. TransFusion drops from 65.6 to 61.7. Here mAP, mean average precision, is a detection score out of 100.
Lesson 20 goes the other way: keep the filter and learn one piece of it. KalmanNet keeps the Kalman recursion and trains a small recurrent network to output the gain, for systems whose noise model is unknown but whose data exists.
Chapter 8
Grade any filter by its own surprises, with no ground truth
Every method above reports a doubt: a variance, a covariance, a particle spread. A filter can be sure and wrong at once. Tell a Kalman filter that its target moves 100 times more smoothly than it does. The filter of Lesson 21 claims ±0.75 m while its real error is 3.6 m.
The filter cannot hide its surprises. Each update, it predicts the reading. The gap between the real reading and the prediction is the innovation, ν. The filter also predicts how big that gap should be: its variance S. Their ratio is the normalised innovation squared (NIS), ε.
epsilon equals nu squared over S.
Square the surprise nu. Divide by S, the size the filter expected. For a one-number reading, an honest filter's epsilon averages 1. Far above 1, the filter is overconfident.
Lesson 5's drone: nu = 115 − 110 = 5 m and S = 13 + 9 = 22 m², so epsilon = 25 / 22 = 1.14. For the mean of 50 such values, the 95% band is 0.65 to 1.43 (a chi-square band, Lesson 21).
Purple is the error the filter claims; grey dashes are its real error. The gauge is its mean NIS against the green band. Slide the motion noise the filter believes.
Exact steady state, Lesson 21's toy: a target on a line with random acceleration (true noise intensity 0.05 m²/s³), a 2 m sensor, one reading a second. The real error comes from the error covariance of the mistuned filter, not from one run.
Slide the believed noise. At the true value the mean NIS is 1.00. At 100 times too small, the filter claims ±0.75 m, its real error is 3.6 m, and the mean NIS climbs to 4.7, far outside the band. At 100 times too large it falls to 0.63, just below the band: the filter is timid.
Lesson 21 adds three more checks. NEES uses the ground truth on a bench. Whiteness tests whether one surprise predicts the next. Robust costs such as Huber cap the pull of one wild reading.
Chapter 9
Answer six questions and read the stack of lessons the series would build
The hero routed ten fixed situations. Here you set the questions. The router follows the series' rules in order. Line up the sensors, sort readings to targets, and choose how to store the belief. Then guard any shared estimates, and always audit.
Answer each question. The map lights the lessons in the stack, and the read-out lists them from input to audit.
The router encodes this series' defaults, in this order: calibration, association, belief shape, sensor architecture, shared estimates, audit. Real systems mix layers. Evidence numbers are the same lesson numbers as the hero's.
Try a robot car in a crowded city: camera, LiDAR and radar, many targets. The stack is calibration (Lesson 15), BEV fusion to detect (Lesson 19), association (Lesson 12), a filter per track (Lesson 5) and the audit (Lesson 21). Switch to IMU and GNSS with one target and the stack shrinks to the error-state filter of Lesson 14.
Now choose several places. The particle filter replaces the bell-curve filters, whatever the sensors. Choose "Yes, loops or a map" and the camera and LiDAR stacks switch from filters to graphs.
Chapter 10
Keep the routes, the numbers, the symptoms, the code and the library in one place
Fusion pays because sensors fail in different places. Weight every source by its precision. Carry a belief over time, and store it in the cheapest shape that fits: a bell curve, a tangent, sigma points or particles. Guard against shared data, line up the clocks, keep a window of poses when the past matters, and let networks learn weights when the pairing is hard. Then audit every claim with its own surprises.
| Lesson | Use it when | Number from that lesson |
|---|---|---|
| 1 Why fuse | deciding how to wire sensors | 2 of 3 vote: 0.99275; two in series: 0.9025 |
| 2 Architectures | choosing where to fuse | raw data needs about 31,000 times the bandwidth of tracks |
| 3 Two measurements | two readings, one moment | noise 0.5 and 2 fuse to 0.485 |
| 4 Bayes filter | a small discrete state | belief in the true cell from 1 in 16 to 0.94 |
| 5 Kalman filter | straight models, one peak | 110 m (var 13) and 115 m (var 9) give 112.95 m (var 5.32) |
| 6 Complementary | tilt from a gyro and an accelerometer | steady error 0.245° where the gyro alone drifts 30° a minute |
| 7 EKF | gently curved models | frozen tangent 10 m off; redrawn within 0.1 m |
| 8 UKF | sharply curved models | mean of x²: true 8, EKF 4, UKF 8 |
| 9 Information filter | many independent sensors per step | six cameras shrink the ellipse from 8 m to under 1 m |
| 10 Particle filter | several possible places | a bell curve puts 58% in empty hallway |
| 11 Covariance intersection | estimates may share data | naive band misses 16% instead of 5% |
| 12 Data association | many targets in clutter | tracks lost in 100 runs: NN 16, JPDA 3 |
| 13 IMU | dead reckoning between fixes | still for a minute: phone grade 64 m, navigation grade 0.45 m |
| 14 INS/GNSS | IMU plus satellite fixes | 30 s tunnel: 155 m alone, 6.6 m fused |
| 15 Calibration | every multi-sensor rig, first | 10 ms late at 30 m/s: 30 cm |
| 16 VIO | one camera and an IMU | IMU alone 32.7 m in 30 s; fused near 4 cm |
| 17 LiDAR-inertial | LiDAR and IMU, loops, maps | loop gap 29.8 m LiDAR alone; 0.013 m fused with a loop closure |
| 18 Driving fusion | camera, LiDAR and radar detection | a BEV grid of ±50 m at 0.5 m has 40,000 cells |
| 19 Transformer BEV | pairing is hard or sensors die | 6 cameras dead: 61.7 mAP against 39.5 (TransFusion) |
| 20 Learned filters | the noise model is unknown, data exists | KalmanNet learns only the gain |
| 21 Consistency | always | claims ±0.75 m, real 3.6 m, mean NIS 4.7 |
Then audit it, whatever you built: mean NIS inside its band, surprises white (Lesson 21).
| Symptom | Likely cause | Go to |
|---|---|---|
| Fine at rest, wrong at speed | a time offset or a wrong mount | Lesson 15 |
| Confidence grows with no new data | double counting between nodes | Lessons 2 and 11 |
| Locks onto the wrong landmark | a bell curve on a belief with several peaks | Lesson 10 |
| Diverges after a sharp turn | the tangent line lies on a curved model | Lessons 7 and 8 |
| Tracks swap where targets cross | hard nearest-neighbour association | Lesson 12 |
| Drifts in a tunnel or indoors | the IMU coasting on an unlearned bias | Lessons 13 and 14 |
| Map folds in a plain corridor | a blind direction claiming certainty | Lesson 17 |
| Detections vanish when a camera dies | a fuser never trained on a dead sensor | Lesson 19 |
| Smooth track, mean NIS far above 1 | process noise set too small | Lesson 21 |
pythondef fuse(xa, Pa, xb, Pb): # Lesson 3: precision weighting """xa, xb: readings; Pa, Pb: precisions (1 / variance).""" return (Pa * xa + Pb * xb) / (Pa + Pb), Pa + Pb def kalman_step(x, P, z, R, v=10.0, dt=1.0, Q=4.0): # Lesson 5, one dimension x_bar, P_bar = x + v * dt, P + Q # predict: slide the guess, grow the doubt nu, S = z - x_bar, P_bar + R # innovation and its expected size K = P_bar / S # gain: the precision weight again nis = nu ** 2 / S # Lesson 21: honest near 1 on average return x_bar + K * nu, (1 - K) * P_bar, nis print(fuse(22.0, 4.0, 20.0, 0.25)) # (21.88..., 4.25) print(kalman_step(100.0, 9.0, 115.0, 9.0)) # (112.95..., 5.318..., 1.136...)
Phones and headsets run visual-inertial odometry. Drones and wearables run complementary attitude filters. Cars and aircraft run INS/GNSS. Survey robots map warehouses and mines with LiDAR and IMU. Robot cars fuse camera, LiDAR and radar in a bird's-eye view, then track what they see.
The library behind the series: the textbooks to keep on the shelf, then the paper behind each lesson.
Now press Present or Teach and route problems from memory. Cover the voting formula, the precision weight, the Bayes recursion, covariance intersection, the crossover time, MAP as least squares, the softmax weights and the NIS. Then go back to the map, pick the tunnel, and say why the IMU alone ends 155 m off.
Lesson 22 of 22 in Sensor Fusion: Classical to Modern on Engineermaxxing. Every toy number on this page names the lesson that derived it; the TransFusion numbers name their table.