Lite / Intelligent Robotic Systems / Week 21
Combining measurements: averaging, fusion and the module check
A camera says 52 cm ± 4. Odometry says 48 cm ± 2. Is the best answer 50?
Why should I care?
Robots almost never trust a single sensor. Blending two imperfect measurements correctly gives an answer better than either, but only if each is weighted by how much it deserves to be trusted. This is the seed of the Kalman filter used in drones, phones and rovers.
- Combine two independent measurements by weighting each by 1/σ², and compute the combined uncertainty.
- Explain why averaging and fusion reduce random noise but not bias.
- Review weeks 19–21: sensor characteristics, error types, mean, spread and standard error.
Predict
Camera: 52 ± 4 cm. Odometry: 48 ± 2 cm (both ±1σ, independent, unbiased). Where should the best combined estimate be?
- 50 cm, halfway
- Closer to 48 cm, because odometry is more certain
- 52 cm, because cameras are better
Guess first, then reveal
Weight each by 1/σ²: 1/16 for the camera, 1/4 for odometry. Odometry gets four times the weight, so the estimate is (52/16 + 48/4) ÷ (1/16 + 1/4) = 48.8 cm, with σ = 1/√(1/16 + 1/4) ≈ 1.79 cm, better than either alone.
Discover
Choose the Kalman filter. With camera noise 8 cm and odometry noise 2 cm/s, watch the uncertainty band. Then raise odometry bias to 3 cm/s: does the fused line stay honest? Finally set camera dropout to 50% and watch the band widen while the camera is blind.
What the interactive shows (text version)
The fusion lab plots a fused position estimate with a ±2σ band. With camera noise 8 cm the camera readings scatter widely, but the Kalman estimate stays close to the truth with a narrow band. During camera dropouts the band widens steadily until the camera returns. With odometry bias 3 cm/s the fused estimate is pulled off the truth during dropouts.
Understand
Inverse-variance weighting
For two independent, unbiased measurements x₁ ± σ₁ and x₂ ± σ₂, the best combination weights each by 1/σ²: x = (x₁/σ₁² + x₂/σ₂²) ÷ (1/σ₁² + 1/σ₂²). Its uncertainty is σ = 1/√(1/σ₁² + 1/σ₂²), always smaller than either input. Averaging n equal readings is the special case that gives σ/√n.
Fusion over time
A Kalman filter does this repeatedly. It predicts where the robot is from its motion (uncertainty grows), then updates with a new measurement, weighting by the gain K = P/(P + R), where P is the prediction's variance and R the measurement's. When the camera drops out, only prediction runs and uncertainty widens.
Bias breaks the promise
Every formula above assumes unbiased, independent errors. A biased sensor pulls the fused answer off while the reported uncertainty stays small: confidently wrong. Fusion helps most when sensors fail in different ways.
Module check: what you should now be able to do
State a sensor's range, resolution and step size; separate accuracy from precision; classify an error as random or systematic; compute a mean, a sample standard deviation and a standard error; plan n for a target SE; and combine two measurements with inverse-variance weights. The practice below mixes all of these.
Explain it another way
Intuitive
Asking two friends for directions: you lean towards the one who knows the area better, but you still listen to both. If one always confuses left and right, though, listening more carefully doesn't help.
Technical
Minimum-variance unbiased combination of independent Gaussian measurements: weights wᵢ ∝ 1/σᵢ². Kalman update: K = P/(P + R), x̂ ← x̂ + K(z − x̂), P ← (1 − K)P.
Mathematical
Minimise Var(w x₁ + (1 − w) x₂) = w²σ₁² + (1 − w)²σ₂² over w: the derivative is zero at w = σ₂²/(σ₁² + σ₂²), which is the inverse-variance weight, and the minimum variance is σ₁²σ₂²/(σ₁² + σ₂²).
Applied
Phones fuse GPS (unbiased but noisy and slow) with accelerometers and gyros (smooth but drifting) to give a smooth, steady position on a map.
Worked example 1
Two thermometers read 20.6 ± 0.3 °C and 21.0 ± 0.6 °C. Combine them.
Weights: 1/0.09 ≈ 11.1 and 1/0.36 ≈ 2.78. x = (20.6 × 11.1 + 21.0 × 2.78) ÷ 13.9 ≈ 20.68 °C. σ = 1/√13.9 ≈ 0.27 °C.
Common mix-ups
The best combination of two readings is always their simple average.
✓ Only when they are equally certain. Otherwise weight each by 1/σ².Adding a worse sensor can only make the estimate worse.
✓ If its errors are independent and unbiased, it always helps a little; if it is biased, it can hurt.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
In the fusion lab, find settings where the complementary filter beats Kalman and settings where Kalman clearly wins. Report both with the RMS error the lab shows, and explain the difference in terms of bias and noise.
Reflect
Which idea from weeks 19–21 do you think engineers most often forget, and what goes wrong when they do?
Write your answer on paper or in your own notes. Lite never stores what you write.
Go further
Research mode: limits and open questions
The proposed TV-01 study asks whether local force sensing can keep a grasp stable when vision drops out, which is a fusion question: what to trust while one sensor is blind (no results exist).