Store how sure you are instead of how unsure, and fusing a sensor becomes one addition. Six cameras, six additions: the error ellipse shrinks from 8 m long to under 1 m, the same answer the Kalman filter gives.
Switch cameras on and off. Watch the ellipse shrink most in the direction each new camera sees well, and watch the purple stacks add up. Then we build, piece by piece, information, the update that adds, the costly predict step, and the networks that run on it.
You need what a variance is and the Kalman filter idea of Lesson 5. We build the rest from zero.
Lesson 9 of 22 in Sensor Fusion: Classical to Modern. The filter follows Thrun, Burgard and Fox, Probabilistic Robotics (2005), Chapter 3. Next: The Particle Filter.
Illustrative toy: six cameras on a 4 m ring around the target. Each pins the target to 0.4 m across its line of sight and 2 m along it. The ellipse holds 2 standard deviations. The readings use fixed noise, so the run repeats.
Chapter 0
See why many sensors need weights, and why the bookkeeping of the weights matters
A forklift crosses a warehouse. Twelve ceiling cameras watch it. Each camera reports a position with its own error. The camera overhead is good to 0.3 m, the one in the far corner only to 4 m.
A flat average treats the 4 m camera like the 0.3 m camera. Lesson 3 gave the fix: weight each reading by one over its variance. Add the cameras one at a time and compare.
Each blue row is one camera: its reading and its error bar. Press Add a camera. The teal mark is the weighted pool, the pink mark the flat average.
Illustrative toy: the forklift is at 5.00 m. The twelve error sizes run from 0.3 m to 4 m, and each reading's error is fixed in advance.
Watch camera 11, the 4 m one: the flat average jumps, the pool barely moves. The weights are right. The question of this lesson is how to keep them.
The Kalman filter of Lesson 5 stores a covariance: the spread of its belief. To fold in a camera it computes a gain, inverts a small matrix and rewrites the covariance. Each camera's step depends on the steps before it. The information filter stores the inverse of the covariance: how sure it is. Then the bookkeeping changes:
| Task | Kalman form (covariance) | Information form |
|---|---|---|
| Fold in one camera | gain, small inversion, rewrite the covariance | add its information |
| Order of cameras | each step uses the last one's output | any order, same sum |
| Drop a bad camera | no clean undo | subtract its information |
| Start knowing nothing | infinite variance, no number to store | information 0 |
| Move the forklift (predict) | cheap | two inversions (Chapter 4) |
Chapter 1
Flip the spread of a belief into its sharpness, and see that sharpness adds
Your belief about the forklift's x has a variance: its spread, in square metres. A big variance is a vague belief, a small one a sharp belief. Call the variance σ² (sigma squared).
Now flip it. The information is one over the variance: how sharp the belief is. Lesson 3 called the same number precision. Call it Ω (capital omega).
Omega equals one over sigma squared.
Square the standard deviation to get the variance sigma squared. Divide 1 by it. The result is the information Omega.
A sensor good to 2 m has sigma squared 4 m², so Omega = 1/4 = 0.25 per m². A sensor good to 5 m has 25 m² and Omega = 0.04. Five times the spread gives a twenty-fifth of the information.
Drag the variance. The bell is the belief. The grey meter shows the variance and the purple meter the information, both on a log scale.
The meters stop at 0.05 and 50 m². Total ignorance, infinite variance, sits off the right end, where the information reaches 0.
The flip turns "I know nothing" into a usable number. Infinite variance is not a number a computer stores. Its information is 0, a clean starting value.
The flip also shows why fusion works. Sensor A reads 100 m with variance 4 m². Sensor B reads 104 m with variance 16 m². Their informations add:
Ω = 1/4 + 1/16 = 0.25 + 0.0625 = 0.3125 per m² → σ² = 1/0.3125 = 3.2 m²
The fused variance, 3.2 m², is smaller than both inputs. Adding information only sharpens. Chapter 3 proves the sum is the right rule and finds the fused position.
The failure: using the standard deviation where the variance belongs. Symptom: a 2 m sensor enters as 1/2 instead of 1/4, so it counts twice as much as it should. Measure: check the units; information is per square metre. Fix: square sigma first.
Chapter 2
Store the same belief as the mean and covariance, inverted
A forklift has an x and a y. The Kalman filter stores its belief as a mean vector μ (mu), the best guess, and a covariance matrix Σ (capital sigma). The diagonal of the covariance holds each coordinate's variance. The off-diagonal holds how the two errors move together.
The information form stores two other objects that hold the same belief. The first is the information matrix, the inverse of the covariance.
Omega equals Sigma inverse.
Invert the covariance Sigma as a whole matrix. The result Omega is large along the directions you know well and small along the ones you do not.
With made-up numbers: Sigma has rows 4, 2 and 2, 5. Its determinant is 4 × 5 − 2 × 2 = 16. So Omega has rows 5/16, −2/16 and −2/16, 4/16: that is 0.3125, −0.125 and −0.125, 0.25. The x entry is 0.3125, not 1/4, because the two errors move together.
The second object is the information vector: the mean, multiplied by the information matrix. Call it ξ (xi).
xi equals Omega times mu.
Multiply the mean mu by the information matrix Omega. To get the mean back, multiply xi by Omega inverse, which is Sigma.
With the Omega above and mu = (10, 20) m: xi = (0.3125 × 10 − 0.125 × 20, −0.125 × 10 + 0.25 × 20) = (0.625, 3.75). Back: Sigma times xi = (4 × 0.625 + 2 × 3.75, 2 × 0.625 + 5 × 3.75) = (10, 20). The round trip loses nothing.
On its own, xi looks like noise. It is the form in which evidence adds, as Chapter 3 shows. The two descriptions match line by line:
| Part of the belief | Kalman form | Information form |
|---|---|---|
| Where | mean μ | ξ = Ωμ |
| How spread or how sharp | covariance Σ | Ω = Σ−1 |
| Knowing nothing | Σ infinite | Ω = 0, ξ = 0 |
| Read the guess | read μ | μ = Ω−1ξ (one inversion) |
Set the three entries of the information matrix. The teal ellipse is the belief it describes. Push one diagonal entry toward zero and watch the ellipse stretch along that axis.
The start is the worked example above. The ellipse holds 2 standard deviations.
The failure: inverting entry by entry. Symptom: the ellipse has the wrong size and tilt whenever the two errors move together. Measure: multiply Omega by Sigma; you must get the identity matrix. Fix: invert the whole matrix, with a Cholesky routine for large ones.
Chapter 3
Fold a reading into the belief by adding its information
A camera reports a reading z, with noise covariance R. A camera may see only part of the state. The measurement matrix H says which part: an edge-on camera that sees only x has H = [1 0].
The reading's own information is R inverse. H places it on the coordinates the camera sees. The update adds it to the information you hold.
Omega-plus equals Omega-minus plus H-transpose, R-inverse, H.
Turn the camera's noise R into information by inverting it. Place it on the seen coordinates with H-transpose and H. Add it to Omega-minus. The sum is Omega-plus.
With made-up numbers: Omega-minus has diagonal 0.25 and 0.04, so the belief is good to 2 m in x and 5 m in y. An edge-on camera sees x with R = 0.25 m², so R-inverse = 4. H-transpose R-inverse H puts a 4 in the x corner only. Omega-plus has diagonal 4.25 and 0.04: x is now good to 0.49 m, and y is still 5 m.
The information vector takes the reading itself, weighted the same way.
xi-plus equals xi-minus plus H-transpose, R-inverse, z.
Weight the reading z by its information R-inverse. Place it with H-transpose. Add it to xi-minus.
Continuing: the old mean (10, 20) m gives xi-minus = (2.5, 0.8). The camera reads z = 10.8 m, so it adds (4 × 10.8, 0) = (43.2, 0). xi-plus = (45.7, 0.8). Read back: x = 45.7 / 4.25 = 10.75 m, y = 0.8 / 0.04 = 20 m.
Check it against Lesson 3 in one dimension, where H = 1. Start from knowing nothing: Omega = 0, xi = 0. Add sensor A (100 m, 4 m²) and sensor B (104 m, 16 m²):
Ω = 0 + 0.25 + 0.0625 = 0.3125 · ξ = 0 + 25 + 6.5 = 31.5 → x = 31.5 / 0.3125 = 100.8 m, σ² = 3.2 m²
That is the inverse-variance fuse of Lesson 3, number for number. Addition does not care about order, and subtracting a reading's two terms removes it exactly.
Press Add a sensor. Each purple block is one sensor's information; the stack height is the sum. The teal bell is the fused belief. Remove last takes the top block off.
Illustrative toy: the truth is 100 m. Sensors A and B are the worked example; the other four are invented.
The failure: a noise R that is too small. Symptom: the estimate jumps to one sensor and ignores the rest. Measure: log the gaps between readings and estimates; their spread should match HSHT + R, with S the covariance. Fix: set R from logged data.
Build the fuse yourself below: convert, add, convert back.
Chapter 4
Pay for the cheap update with an expensive motion step
Between readings the forklift moves. The predict step pushes the belief through the motion model F, the matrix that moves the state one step. It then adds the process noise Q: the uncertainty the motion adds, as a covariance. In the Kalman form that is one line, Σ− = FΣFT + Q: multiply, then add.
The information form has no such shortcut. Q says "the forklift may have drifted 1 m", which is a covariance. To add it you must leave information form, add, and come back.
Omega-minus equals the inverse of: F, Omega-inverse, F-transpose, plus Q.
Invert Omega to get the covariance. Move it with F and add Q. Invert the result to get Omega-minus.
With made-up numbers in one dimension: Omega = 0.25, F = 1, Q = 1 m². Invert: 1 / 0.25 = 4 m². Add Q: 4 + 1 = 5 m². Invert back: 1 / 5 = 0.2. The information fell from 0.25 to 0.2.
The information vector follows the mean: ξ− = Ω−FΩ−1ξ. With a mean of 100 m above, xi goes from 25 to 0.2 × 100 = 20.
Press Predict a few times: the purple bars fall. Press Add a reading: they jump back up. Raise Q and the drain gets steeper.
Illustrative toy in one dimension: F = 1, each reading has variance 4 m² (information 0.25). In one dimension an inversion is one division; in n dimensions it is about n³ multiplies.
Inverting an n by n matrix costs about n³ multiplies. Two per predict is the bill for the cheap update. The two forms are mirror images:
| Step | Kalman form | Information form |
|---|---|---|
| Predict | multiply by F, add Q | invert, move, add Q, invert |
| Update, per reading | gain, small inversion, rewrite Σ | add two terms |
The failure: leaving Q at zero. Symptom: the information never drains, the filter grows sure of itself and stops following the forklift. Measure: plot the claimed sigma against the real error on a logged run. Fix: set Q from how far the forklift can move between steps.
Chapter 5
Pool a sensor network by summing, and get the central answer
Lesson 2 described decentralized fusion: each sensor node has its own processor, and no central computer collects the raw data. The hard question is how the nodes pool their estimates and still get the answer a central filter would.
In information form, each node ships its new information: the two terms of Chapter 3. Any node, or a tally, adds them. Call the shared starting information Ω0 and node i's new information Ωi.
Omega equals Omega-zero plus the sum over i of Omega-i.
Start from the prior Omega-zero once. Add each node's new information Omega-i. Do the same with the information vectors, then convert back.
With made-up numbers, no prior (Omega-zero = 0), and three nodes reading x: 50.0 m with variance 1, 52.0 m with 4, 47.0 m with 10. Omega = 1 + 0.25 + 0.1 = 1.35. xi = 50 + 13 + 4.7 = 67.7. So the variance is 1 / 1.35 = 0.741 m² and x = 67.7 / 1.35 = 50.15 m.
The pooled variance, 0.741 m², beats the best node's 1 m². The estimate leans toward the sharp node and barely hears the vague one. A central filter given all three readings computes the same sum, so the network loses nothing (Rao and Durrant-Whyte, 1991). Lose a node, and its term drops out. Add one, and the sum has one more term.
Switch nodes on and off and press Shuffle order: the sum does not change. Then switch on Ship the prior too, the classic mistake, and compare with the central answer.
Illustrative toy: the three nodes of the worked example, plus a shared prior of information 0.2 centred on 49 m.
The failure: each node ships its whole posterior, prior included. Symptom: the pool claims more certainty than the evidence gives; with three nodes the pool counts the prior three times. Measure: compare the pool with Omega-zero plus the nodes' new terms. Fix: each node subtracts the prior before it ships.
Pool five two-dimensional nodes yourself below, then invert once.
Chapter 6
Run the whole filter: predict, add each node, and check it against the Kalman form
Five nodes surround a moving target. Each sees well in one direction only: its faint blue ellipse is thin across its line of sight and long along it. The filter starts from a weak prior, then on each step it predicts and adds every active node. The read-out runs the Kalman form beside it on the same readings.
Toggle nodes and watch the teal ellipse. Press Run: each step the ellipse grows (predict) and shrinks again (the additions).
Illustrative toy: nodes 1 to 4 see 0.4 m across their line of sight and 2 m along it. Node 5 sees 1.2 m and 3 m. The prior is information 0.01 per m². Each step adds Q = 0.08 m². The ellipses hold 2 standard deviations.
Try these five moves:
Watch the last line of the read-out: the Kalman form agrees to under 10−12 m, rounding error. The order of the additions never matters. Node 5 adds the least, because its information is small.
Add two blind directions into one sharp joint below.
Chapter 7
Count predicts and updates, then pick the form whose cheap step you do most
Both forms give the same numbers. You pick one for cost and for the shape of the system. Count multiplies for a state of n numbers, where each sensor report holds d numbers:
| Step | Kalman form | Information form |
|---|---|---|
| One predict | about 2n³ | about 4n³ (two inversions and the move) |
| One sensor report | about 2n²d | about n²d |
With m reports per predict, set the two totals equal: 2n³ + 2n²dm = 4n³ + n²dm. The information form wins when m is above 2n/d. For a forklift state of 6 numbers and cameras that report x and y, that is more than 6 reports per predict.
Set the state size and the reports per predict. Yellow is the predict part of each bar, blue the report part.
Leading terms only, each report has d = 2 numbers, and the Kalman form takes reports one at a time. Real costs depend on the library and on sparsity, so treat the crossover as a guide.
Real systems follow the count:
| System | Form | Why |
|---|---|---|
| Warehouse camera grid | information | 12 reports per slow step; cameras join and drop |
| Radar network, track-to-track fusion | information | no central computer; each radar adds its track |
| SLAM with many landmarks | information (SEIF) | the information matrix is nearly sparse |
| Racing drone, one IMU at 1,000 Hz | Kalman | many predicts, one sensor |
SLAM needs a word. Its state holds the robot and every landmark. A landmark reading adds information only to the entries that link the robot to that landmark. So most entries of the information matrix stay near zero, while the covariance fills in. The Sparse Extended Information Filter keeps the matrix sparse (Thrun, Burgard and Fox, Chapter 12).
The failure: the information form on a fast loop with one sensor. Symptom: the profiler shows the predict step eating the time budget. Measure: count predicts and reports per second. Fix: use the Kalman form for that loop.
Chapter 8
Catch double counting, a bad inversion and a singular start before they ship
Every plus sign in the information form is a promise: this term is new, independent evidence. Break the promise and the filter lies.
The classic route is the echo. Node A sends its estimate to node B. B fuses it and sends the result back. A adds it, not knowing that its own reading is inside. The same evidence is now in the sum twice.
This is double counting, also called data incest. Say one reading has variance σ², and the network adds it k times.
sigma-squared-claimed equals sigma squared over k.
Adding the same information k times multiplies it by k. So the claimed variance shrinks by k, while the real error stays sigma squared.
With made-up numbers: sigma squared is 4 m² and the echo adds the reading twice, so k = 2. The claim is 4 / 2 = 2 m², a sigma of 1.41 m, while the real sigma is 2 m. About 16% of real errors then fall outside the claimed 2-sigma band, where 5% should.
Each dot is the real error of one run. The shaded band is the 2-sigma band the filter claims: teal when honest, red when too narrow. Slide the copies up and count the dots outside.
Illustrative toy: 200 runs with a real sigma of 2 m, drawn from a fixed seed. The NEES is the average of error squared over claimed variance; 1 is honest.
An overconfident filter is worse than a vague one: it rejects good readings that disagree with its false precision. The three traps:
| Trap | Symptom | Measure | Fix |
|---|---|---|---|
| Double counting | tight ellipse, large real errors | NEES well above 1 on logged runs | track where each term came from; ship only new information; use covariance intersection (Lesson 11) for correlated sources |
| Ill-conditioned predict | numbers drift, then blow up | condition number of the matrices you invert | Cholesky inversion; add a tiny multiple of the identity |
| Singular start | reading the mean throws an error | smallest eigenvalue of Omega | wait until a sensor sees every direction, or add a weak prior |
The singular start comes from the zero prior. With Omega = 0, or with only an edge-on camera, some direction has no information yet, and Omega has no inverse. That is honest: the filter does not know. Code must check before it inverts.
Chapter 9
Keep the numbers, the terms, the checks and the core code of the lesson on one page
The information filter stores Omega, the inverse covariance, and xi, Omega times the mean. A reading adds its information: one addition, any order, and subtraction undoes it. Predict pays for this with two inversions. A network of independent nodes adds its terms and gets the central answer.
| What | Number | Why it matters |
|---|---|---|
| Information of a 2 m sensor | 1 / 4 = 0.25 per m² | square sigma first |
| Two sensors, 1-D | 0.25 + 0.0625 = 0.3125; 100.8 m, 3.2 m² | equals the Lesson 3 fuse |
| Correlated 2 by 2 inverse | Ω xx = 0.3125, not 0.25 | invert the whole matrix |
| Edge-on camera, R = 0.25 | adds 4 to x only; x from 2 m to 0.49 m | H places the information |
| One predict, Q = 1 | 0.25 → 4 → 5 → 0.2 | two inversions |
| Three nodes | Ω 1.35, ξ 67.7; 50.15 m, 0.741 m² | beats the best node |
| Crossover | m above 2n/d reports per predict | picks the form |
| Reading added twice | claims 2 m² for 4 m²; 16% outside 2 sigma | double counting |
| Term | Meaning |
|---|---|
| Information | One over the variance: how sharp a belief is. |
| Information matrix | The inverse of the covariance matrix, Omega. |
| Information vector | Omega times the mean, xi. |
| Measurement matrix | H: which coordinates a sensor sees. |
| Process noise | Q: the doubt one motion step adds, as a covariance. |
| Decentralized fusion | Nodes fuse among themselves with no central computer. |
| Double counting | The same evidence added more than once; the filter claims too much. |
| NEES | Average of error squared over claimed variance; 1 is honest. |
pythonimport numpy as np def update(Om, xi, H, R, z): # a reading ADDS its information Ri = np.linalg.inv(R) # the sensor's small noise matrix return Om + H.T @ Ri @ H, xi + H.T @ Ri @ z def predict(Om, xi, F, Q): # two inversions Sig = np.linalg.inv(Om); mu = Sig @ xi Om_p = np.linalg.inv(F @ Sig @ F.T + Q) return Om_p, Om_p @ (F @ mu) def read(Om, xi): # only when someone asks assert np.linalg.eigvalsh(Om).min() > 1e-9, "not every direction seen yet" Sig = np.linalg.inv(Om) return Sig @ xi, Sig Om, xi = np.diag([0.25, 0.04]), np.array([2.5, 0.8]) # mean (10, 20) Om, xi = update(Om, xi, np.array([[1., 0]]), np.array([[0.25]]), np.array([10.8])) mu, Sig = read(Om, xi) # (10.75, 20.0)
Now press Present or Teach. Explain from memory why information adds, the update with H and R, the two inversions of predict, and the echo that double counts. Then go back to the six cameras, switch on cameras 1 and 2, and say why the ellipse turns round.