Two radars track one aircraft from the same flight plan. Fuse their tracks naively three times and the claimed ellipse shrinks to a quarter of its first size, while the real error stays put. About half of the real errors then land outside a 95% ellipse. Honest bookkeeping keeps that near 5%.
Pick a fuser. Drag the exchanges and count the red dots: real errors outside the claimed 95% ellipse. Then we build, piece by piece, why the naive rule lies and four honest ways to fuse across a network.
You need the Kalman filter and inverse-variance fusion. We build the rest from zero.
A Gleam in the Estimation family. It takes the information filter and covariance intersection of the Sensor Fusion series out to whole networks. The devices and toy numbers are our own.
An illustrative toy in km. Both radars start from one shared prior (variance 1 km² per axis). Each sees range well and bearing poorly. The dots are 200 simulated fused errors. An exchange fuses the two nodes' latest answers again, with no new measurement.
Chapter 0
Fuse the same two tracks again and again, and watch the confidence rise for no reason
Two radar sites track the same aircraft. Each sends a track: a best guess of the position plus a covariance ellipse that says how sure it is. You fuse the two tracks. The ellipse gets smaller. Does the error?
The rule from inverse-variance fusion adds information. Information is one over the variance: how much an estimate knows. The rule is right only if the two errors are independent, which means they share nothing.
These two share a lot. Both radars started from the same flight plan, a shared prior. Both chase the same gusts. And after one exchange, each track holds part of the other.
Two nodes share a prior, then each takes one reading. Press the button to fuse their answers again. The slider sets how sharp the shared prior is.
Illustrative scalar case: each node reads once with noise variance 1. Chapter 3 derives the numbers. Bars use a log scale.
Each exchange doubles the claimed information. No sensor measured anything new, so the real error does not move. The NEES (normalized estimation error squared) is the squared error divided by the claimed variance. For an honest scalar filter it averages 1. Here it starts at 1.2 and doubles every round: after ten exchanges it is 1.2 × 29 = 614.
The fault is double counting: evidence that both estimates already hold enters the sum twice. Every method in this lesson answers one question: what do we both already know?
Symptom: the claimed variance falls between measurements, when no new reading arrived.
Measure: NEES on runs with known truth, as in debugging consistency.
Fix: one of the four kinds of bookkeeping in Chapters 4, 5, 7 and 8.
Chapter 1
Choose what each site sends, and you choose what can go wrong
Four radar sites must act like one tracker. What goes down the wire: raw detections, or finished tracks? That one choice decides the rest. The full taxonomy is in fusion architectures. Here are the three shapes that matter.
| Architecture | What crosses the wire | Who fuses | Double count risk |
|---|---|---|---|
| Centralized | raw detections, at sensor rate | one central filter | none: each reading enters once |
| Hierarchical | tracks, up to a fusion centre | the centre | shared process noise; loops if the centre sends tracks back |
| Decentralized | tracks or information, peer to peer | every node | everywhere, and no node sees the whole network |
Now size the messages. A position detection is about 3 numbers. A track report carries the n numbers of the state plus its covariance. The covariance is symmetric, so it needs n(n + 1)/2 numbers. A 6-state track is 6 + 21 = 27 numbers.
With numbers: a radar that sends 3-number detections at 50 Hz uses 150 numbers per second. Its 6-state track at 1 Hz uses 27. A track saves bandwidth by lowering the rate. Each message is nine times bigger.
Small dots are raw detections. Bars are track reports. Pick an architecture, set the sensor rate, then kill the busiest node.
Illustrative loads: 4 sensors, 3-number detections, tracks at 1 Hz, a 4-node ring for the decentralized case with a message each way on each link.
Centralized is the most accurate: one filter sees every raw reading once. It loses for other reasons. It has one point of failure, needs full-rate links, and partners often will not share raw data.
Decentralized is this lesson's home. Each node (a site with its own filter) talks only to its neighbours. Kill one node and the rest go on. The price is that shared information is everywhere, and no node can see it all.
Symptom: every site loses its fused track when one box fails.
Measure: kill each node in simulation and count who still has a track.
Fix: give each site its own filter, then pay for it with careful bookkeeping.
Chapter 2
Write each belief as information, and independent evidence simply adds
Three sensors measure the same temperature. One is twice as sharp as the others. How should their readings combine? The information filter gives a rule you can do on a napkin.
Write the belief in two numbers. The information matrix Y is one over the covariance: it grows as you get surer. The information vector y is Y times the estimate. Start from the prior, with information Y0 and vector y0. Sensor k gives a reading zk with noise covariance Rk. Its Hk maps the state to what that sensor sees.
Y equals Y-nought plus the sum over k of H-k transposed, R-k inverse, H-k. And y equals y-nought plus the sum over k of H-k transposed, R-k inverse, z-k.
Turn each sensor into its sharpness R-k inverse. Add the sharpnesses to the prior's Y-nought to get Y. Add each reading z-k times its sharpness to get y. The estimate is y over Y.
With made-up numbers: no prior, R = 4, 2 and 4, readings z = 10.4, 9.9 and 10.1. Y = 0.25 + 0.5 + 0.25 = 1.0, so the fused variance is 1.0. y = 2.6 + 4.95 + 2.525 = 10.075, so the estimate is 10.075 / 1.0 = 10.075. The best single sensor had variance 2: fusion doubled the sharpness.
Each slider sets one sensor's noise variance. Its information bar is one over that. Watch the bars stack and the fused estimate move toward the sharpest sensor.
Illustrative readings 10.4, 9.9 and 10.1, no prior, each sensor reading the state directly.
The sum is exact only under one condition. The readings must be conditionally independent: once you know the true state, their errors share nothing. Two raw readings from separate sensors pass. Two tracks never do, because they share a prior and they chase the same target.
The pieces HkTRk−1Hk are called information increments. They are local and cheap. Chapter 8 averages exactly these across a network.
Symptom: a fused variance far below any single sensor's, on sources that share history.
Measure: ask, for each pair of sources, what they hold in common: a prior, a target, a past message.
Fix: add only increments that are new. Everything else needs the methods below.
Chapter 3
Catch the shared prior voting twice, then watch a rumour lap a loop
Here is the smallest case. Two nodes start from one shared prior: mean 0, variance 4, so information 0.25. Node A reads zA = 1.2. Node B reads zB = 0.8. Both readings have noise variance 1. Each node does a correct Bayes update.
Name the pieces. Call the naive sum Ynaive, the central filter's information Ycentral, and the shared prior's information Y0.
Y-naive equals Y-A plus Y-B, which equals Y-central plus Y-nought.
Each node's Y holds one copy of the prior. Add Y-A and Y-B and you get two copies. So the naive sum is the right answer Y-central plus one extra Y-nought.
1.25 + 1.25 = 2.5, and 2.25 + 0.25 = 2.5. The excess is exactly the prior's 0.25.
Does it matter? The naive mean is (zA + zB)/2.5. Its real error variance works out to (0.25 × 4 + 2)/6.25 = 0.48. It claims 0.4. So its NEES is 0.48 / 0.4 = 1.2: a 20% lie from one shared prior. A Monte Carlo run of 400,000 trials gives 0.479.
Node A makes one reading, worth 1 unit. Each step it hops to the next node inside that node's estimate, and the receiver adds it. Break the loop and compare.
Illustrative. Each node adds what it receives, as naive fusion does. The dashed line is the true total: one unit, from one reading.
In a loop it gets worse. A's reading travels A to B to C and back to A. A cannot see its own reading inside C's estimate, so it adds it again. This is rumour propagation: confidence climbs each lap and no new data arrives.
Symptom: the gates shrink, true readings get rejected as outliers, and the track diverges while it reports its best confidence ever.
Measure: NEES above its 95% band, with the excess growing at each exchange.
Fix: track the overlap (Chapter 4), bound it (5), pre-pay it (7) or average it (8).
Chapter 4
Keep a ledger on each link of what both ends know, and take it out at fusion time
If the fault is counting shared evidence twice, the fix is an accountant. On each link, keep a running record of what the two ends both know. Subtract it when they fuse.
The record is a channel filter: a small filter that lives on the link and stores the common information. It is the core of the decentralized data fusion design of Grime and Durrant-Whyte (1994). Call the two nodes' information YA and YB, the ledger Ych, and the fused result Yf.
Y-f equals Y-A plus Y-B, minus Y-c-h.
Add the two nodes' information Y-A and Y-B. Each holds one copy of the shared part, so subtract the ledger Y-c-h once. Then store Y-f as the new ledger.
The Chapter 3 case: the ledger holds the prior, 0.25. Y-f = 1.25 + 1.25 − 0.25 = 2.25, and y-f = 1.2 + 0.8 − 0 = 2.0. Mean 0.889, variance 0.444: the central answer exactly.
One round on one link, step by step:
On a tree (a network with no loops), each node keeps one ledger per neighbour, and the whole network matches a central filter exactly. The reason: each link cuts the tree into two halves, so the link's ledger sees all that the halves share. On a loop, A's reading reaches C by two paths. The A–C ledger knows only what crossed A–C, so the copy that came through B looks new.
Each round: predict, read, then swap along the links, subtracting each ledger. Compare node A's bar with the dashed central filter. Then add the A–C link.
Illustrative scalar random walk, process noise 0.05 per round, prior variance 4. Swap order on the chain: C to B, B to A, A to B, B to C. With the loop, A and C also swap directly.
Symptom: a channel-filter network that was exact starts to drift overconfident after a link reroutes or a message drops.
Measure: compare each node with a central filter in simulation, and log every topology change and lost packet.
Fix: enforce a spanning tree by protocol, or use covariance intersection on the links you cannot keep tree-shaped.
Chapter 5
Blend the two informations with weights that add to one, and the shared part can only enter once
A ledger needs you to know what the other node knows. On a real network, with loops, drops and nodes that join late, you cannot. Covariance intersection (CI), from Julier and Uhlmann (1997), fuses safely without that knowledge. The full treatment is in covariance intersection.
Call the weight on node A ω, a number from 0 to 1. Node B gets 1 − ω. Call the blended information YCI.
Y-C-I equals omega times Y-A, plus one minus omega, times Y-B.
Scale A's information Y-A by omega and B's Y-B by one minus omega. Add them. Naive fusion uses weights 1 and 1; CI uses weights that add to 1.
The Chapter 3 nodes at ω = 0.5: Y-C-I = 0.5 × 1.25 + 0.5 × 1.25 = 1.25, so CI claims variance 0.8, mean 0.8. The real error variance of that mean is 0.48, which is below 0.8: honest. The exact answer was 0.444, so CI is 1.8 times too cautious here.
Why can CI never double count? Think of the two beliefs as densities and suppose both hold a shared factor, the rumour. CI raises A's density to the power ω and B's to 1 − ω, then multiplies them. The shared factor gets the power ω + (1 − ω) = 1, so it enters once, for every ω. Naive fusion multiplies the densities whole, so the shared factor enters squared.
How do you choose ω? Try every ω from 0 to 1 and keep the one, ω*, that makes the area of the fused ellipse smallest. With made-up 2-D tracks PA = [1, 0.2; 0.2, 0.5] and PB = [1.5, −0.1; −0.1, 0.3], the determinants are 0.46 and 0.44. The search lands on ω* = 0.447 with determinant 0.406: smaller than either. Naive fusion would claim a determinant of 0.102, a promise that fails for some correlations.
Blue and warm are tracks A and B. Grey ellipses are the real error of the fused estimate for five possible hidden correlations. Turn ω, or press Optimize. Show the naive fuse to compare.
Illustrative pairs. The first is the 2-D example above. Each grey ellipse is the real error of the fused mean for one hidden correlation ρ = −1, −0.5, 0, 0.5 or 1. The cross-covariance is ρ times the square roots of PA and PB. Ellipses are 1-sigma.
Symptom: a CI network is safe but its tracks are wide, and NEES sits well under its expected value.
Measure: on test runs, compare CI's claimed variance with the real one; a ratio near 2 is a big cost.
Fix: use exact fusion where you can prove the overlap, and CI only at the boundary where you cannot.
Chapter 6
Even independent radars give correlated tracks, so weigh them with the cross-covariance
Two radars have separate noise and separate starts. Are their tracks independent? No. One gust pushes the aircraft and surprises both filters the same way. There is one target, so both filters feel the same process noise (the random push on the target each step).
Take a scalar random walk. Call the two filter gains KA and KB, and the process noise variance Q. The cross-covariance PAB(k) measures how the two track errors move together at step k.
P-A-B of k equals one minus K-A, times P-A-B of k minus one plus Q, times one minus K-B.
Add this step's shared push Q to the old shared error P-A-B. Each update then keeps only part of it: multiply by one minus K-A and one minus K-B. The separate measurement noises add nothing.
With made-up numbers: Q = 0.1, reading variances 1 and 1.5, P-A-B starting at 0. At steady state P-A = 0.270, P-B = 0.341 and P-A-B = 0.129: a correlation of 0.43 (a Monte Carlo run gives 0.428).
Now fuse two tracks with a known cross-covariance. Call their variances PA and PB, and the best weight on A w*. This is the Bar-Shalom and Campo (1986) result.
w-star equals P-B minus P-A-B, over P-A plus P-B minus two P-A-B.
Subtract the shared part P-A-B from B's variance P-B. Divide by P-A plus P-B minus two P-A-B. That share goes to A.
With made-up numbers: x-A = 10.6 with P-A = 1.0, x-B = 9.8 with P-B = 1.5, P-A-B = 0.4 (correlation 0.327). The bottom is 1 + 1.5 − 0.8 = 1.7. w* = 1.1 / 1.7 = 0.647. The fused mean is 0.647 × 10.6 + 0.353 × 9.8 = 10.318.
Call the fused variance PF:
PF = (PAPB − PAB2) / (PA + PB − 2PAB) = (1.5 − 0.16) / 1.7 = 0.788
Naive weights 0.6 and 0.4 ignore PAB. They claim 0.6 but deliver 0.36 + 0.24 + 0.192 = 0.792: 1.32 times overconfident. Limits: PAB = 0 gives ordinary fusion; PAB = PA gives w* = 1, because B is then A plus extra noise.
Each dot is one real fused error. The shaded band is what the fuser claims (2 sigma). Drag the correlation and watch the naive band stay frozen while the dots spread.
Illustrative: PA = 1, PB = 1.5, 300 simulated error pairs with correlation ρ. At ρ = 0.327 this is the worked example.
Symptom: a fusion centre's tracks are overconfident even though every radar is well tuned.
Measure: run the PAB recursion offline with both filters' gains, and check the correlation.
Fix: use Bar-Shalom and Campo if you know both gains each step; otherwise use CI.
Chapter 7
Split the shared information before anyone filters, and plain addition becomes legal
A ledger removes the overlap after the fact. The federated filter (Carlson, 1990) splits it out before anyone filters. A master filter sits above N local filters, one per sensor suite. The classic host is aircraft navigation: GPS with an inertial unit, a baro altimeter, a star tracker (see INS/GNSS coupling).
The trick is an information-sharing factor for each local filter. Call local i's share βi, its posterior information Yi, and its own reading's increment Ii. Local i starts with only βi of the prior's information Y0.
The sum over i of Y-i equals the sum over i of beta-i, times Y-nought, plus the sum over i of I-i.
Give local i the prior scaled by its share beta-i. Let it add its own reading I-i. When the master adds all the Y-i, the prior comes back as the sum of the shares times Y-nought. If the shares add to 1, the prior counts once.
The Chapter 3 case with β = 0.5 each: each local's prior information is 0.5 × 0.25 = 0.125 (variance 8). Each local posterior is 1.125 (variance 0.889). The master adds: 1.125 + 1.125 = 2.25. Mean 2.0 / 2.25 = 0.889, variance 0.444: the central answer.
Pink is each local's share of the prior. Blue and warm are its own reading. The master stacks them all. Make the shares add to more or less than 1 and watch the master miss the dashed central line.
The Chapter 3 numbers: prior information 0.25, each reading worth 1, readings 1.2 and 0.8. A static case.
Over time it is less clean. The locals share the process noise too, so each one inflates it: Qi = Q / βi. That bounds the cross-correlation instead of reproducing it. So a moving federated filter is conservative: it never claims more than the central filter, but it is not exact.
| Mode | After each fusion | Gain | Cost |
|---|---|---|---|
| Fusion-reset | the master resets every local to its share of the fused answer | best accuracy | a fault in one sensor spreads to all locals |
| No-reset | locals never hear back | a spoofed GPS corrupts only its own local, and the master can drop it | less accuracy between fusions |
Symptom: a federated master is overconfident after someone tuned the shares by hand.
Measure: add up the βi. More than 1 counts the prior more than once.
Fix: normalize the shares to add to 1, for the prior and for Q.
Chapter 8
Repeat a local average, and every node learns a global sum no node could see
Each node talks only to its neighbours. Yet the central update needs the sum of every node's information increment. How can a node learn a sum over nodes it never hears from?
By average consensus. Each node holds a value. Call node i's value at iteration k ui(k). At each iteration it replaces its value with a weighted average of its own and its neighbours'. Call the weight node i gives node j Wij.
u-i of k plus one equals the sum over j of W-i-j times u-j of k.
Each node averages its own and its neighbours' values u-j with weights W-i-j. Every column of W adds to 1, so the total never changes. On a connected graph, every value moves toward the average.
Four nodes in a chain 1–2–3–4. Node 1 holds 4, the rest 0; the average is 1. One iteration gives [2.667, 1.333, 0, 0]. Two give [2.222, 1.333, 0.444, 0]. Ten give [1.194, 1.081, 0.919, 0.806]. The sum stays 4.
The example uses Metropolis weights. Call a node's number of neighbours its degree d. On each link, Wij = 1/(1 + max(di, dj)), and the node's own weight takes the rest. On the chain every link weight is 1/3. Each node needs only local facts.
One node holds all the value; the rest hold 0. Step the averaging and watch every node funnel into the dashed average. Change the topology and compare the rate.
Metropolis weights. The rate λ2 is the second largest eigenvalue size of W, computed on the page.
How fast? The spread between nodes shrinks by a fixed factor each iteration: λ2, the second largest eigenvalue size of W. For the 4-node chain λ2 = 0.805. To get within 10−5 takes about ln(10−5)/ln(0.805) = 53 iterations; a direct run needs 56. A 4-node ring has λ2 = 0.333. More links mean faster agreement.
The consensus information filter averages the increments for L iterations, then multiplies by N: the update needs the sum, not the mean. With small L the mixing is incomplete, each node counts itself too much, and the filter turns overconfident. The fix is consensus on whole posteriors with CI-style weights (Battistelli and Chisci, 2014). Each step is a convex blend, so it stays honest for any L.
Symptom: a consensus filter is honest in simulation but overconfident on the radio budget you can afford.
Measure: NEES against L, the iterations per reading.
Fix: consensus on posteriors with convex weights, which stays consistent at any L.
Chapter 9
Run every method on every topology, and let the NEES trace say which one lies
Four sensor nodes sit at the corners of a field. One target wanders across it. Each node sees range well and bearing poorly, so each ellipse points a different way. Each node runs its own filter and talks only along the links.
The lie detector is the NEES. Call the position error of node A's estimate e and its claimed covariance P.
Epsilon equals e transposed, P inverse, e.
Divide each part of the error e by the spread that P claims in that direction, square it, and add. An honest 2-D filter averages 2. Far above 2 means P is too small.
With made-up numbers: e = (0.1, −0.05) km and P = diag(0.01, 0.0025) km². ε = 0.01/0.01 + 0.0025/0.0025 = 1 + 1 = 2. On target.
The device runs 40 copies of the network side by side and plots the mean NEES of node A. For 40 runs its 95% band is 1.43 to 2.67. Predict each cell of the table before you run it.
Left: node A's fused ellipse (method colour) and the dashed central filter. Right: node A's mean NEES with its band shaded. Past runs stay as faint traces.
Illustrative 2-D target that drifts, with a weak pull back to the centre (factor 0.98 per step). Each time step: predict, read, then 3 rounds of exchange along the links. Channel mode passes each round only what the link has not carried yet, the ledger arithmetic of Chapter 4. The small ellipses at the nodes show each sensor's reading noise.
Our numpy run of the same toy (40 runs, steps 30 to 60) gives this table of node A's mean NEES:
| Fuser | Chain | Tree | Loop | Verdict |
|---|---|---|---|---|
| Naive | 36 | 44 | 75 | overconfident everywhere |
| Channel filter | 2.00 | 2.00 | 3.41 | exact on trees, lies on the loop |
| CI | 1.34 | 1.28 | 1.29 | honest everywhere, a bit cautious |
Read the second row twice. The same channel code is exact on the chain and the tree, then fails on the loop. The fault is the shape of the network, not a bug. CI's claimed variance is 2.6 times the central filter's (0.068 against 0.026, summed over both axes): that is the price of never lying.
Symptom: one node looks healthy while the network is not.
Measure: plot every node's NEES against its band, and audit the worst node.
Fix: pick the method from the topology: ledgers on proven trees, CI everywhere else.
Chapter 10
Pick the method from what you know and what you must guarantee
Shared information is the quantity that every method manages. Channel filters track it. CI bounds it. The federated filter pre-pays it. Consensus spreads it into an average. Naive fusion ignores it, and the NEES shows it.
| Method | Exact? | Honest? | Needs | Where it ships |
|---|---|---|---|---|
| Naive addition | no | no | nothing | bug reports |
| Channel filter | yes, on trees | on trees with reliable links | a tree and per-link history | decentralized robotics |
| Bar-Shalom–Campo | best linear, given PAB | if PAB is right | both filters' gains each step | track fusion centres |
| Covariance intersection | no, cautious | yes, any correlation | nothing | ad hoc and loopy networks |
| Federated (β-split) | static yes, moving cautious | yes | a master and fixed locals | integrated navigation |
| Consensus with CI weights | approaches it as L grows | yes, any L | neighbours' degrees | large sensor networks |
| Term | Meaning | Number in this lesson |
|---|---|---|
| Double count | shared evidence enters the sum twice | claim 0.4, real 0.48, NEES 1.2 |
| Track message | n + n(n + 1)/2 numbers | 27 for a 6-state track |
| Ledger | common information on a link | 2.5 − 0.25 = 2.25 |
| CI weight ω* | minimizes the fused determinant | 0.447, det 0.406 |
| Track correlation | from shared process noise | 0.43 at steady state |
| BC weight w* | best weight with known PAB | 0.647, PF 0.788 |
| Shares βi | must add to 1 | 0.5 + 0.5 gives 0.444 |
| λ2 | consensus rate per iteration | 0.805 (chain of 4) |
A two-node channel filter on a moving target, checked against the central filter at every step:
python import numpy as np F = np.array([[1, 1.0], [0, 1]]); Q = 0.05 * np.array([[1/3, 1/2], [1/2, 1]]) H = np.array([[1.0, 0.0]]); RA, RB = 1.0, 2.25 def to_info(x, P): Y = np.linalg.inv(P); return Y, Y @ x def from_info(Y, y): P = np.linalg.inv(Y); return P @ y, P def predict(Y, y): x, P = from_info(Y, y); return to_info(F @ x, F @ P @ F.T + Q) rng = np.random.default_rng(7) x = np.array([0.0, 1.0]); x0, P0 = np.array([0.0, 0.8]), np.diag([4.0, 1.0]) Yc, yc = to_info(x0, P0); YA, yA = Yc.copy(), yc.copy(); YB, yB = Yc.copy(), yc.copy() L, l = Yc.copy(), yc.copy() # the channel ledger for k in range(25): x = F @ x + rng.multivariate_normal(np.zeros(2), Q) zA = H @ x + rng.normal(0, RA ** 0.5, 1); zB = H @ x + rng.normal(0, RB ** 0.5, 1) IA, iA = H.T @ H / RA, H.T @ zA / RA; IB, iB = H.T @ H / RB, H.T @ zB / RB Yc, yc = predict(Yc, yc); Yc, yc = Yc + IA + IB, yc + iA + iB YA, yA = predict(YA, yA); YA, yA = YA + IA, yA + iA YB, yB = predict(YB, yB); YB, yB = YB + IB, yB + iB L, l = predict(L, l) # the ledger predicts too Yf, yf = YA + YB - L, yA + yB - l # add, minus what both know YA, yA = Yf.copy(), yf.copy(); YB, yB = Yf.copy(), yf.copy(); L, l = Yf.copy(), yf.copy() xf, Pf = from_info(Yf, yf); xc, Pc = from_info(Yc, yc) assert np.allclose(xf, xc) and np.allclose(Pf, Pc) # exact on a two-node tree
Now press Present or Teach and explain from memory: the double count, the ledger, CI's weights, the shared process noise, the β shares and consensus. Then go back to the hero, set three exchanges and say why only the Naive button turns the dots red.