Skip to content
Tactiverge

School/○ Innovator/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?

About 45 min · 3 goals · Checked by automated tests

1.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.

2.Predict

Camera: 52 ± 4 cm. Odometry: 48 ± 2 cm (both ±1σ, independent, unbiased). Where should the best combined estimate be?

Guess first. Being wrong here is how the surprise works.

3.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.

Explorer 03 — Sensor fusion

Two imperfect sensors, one better estimate

A camera gives absolute position but loses sight of the target; odometry never drops out but drifts. Combining them gives an estimate better than either alone.

POSITION (cm)NO VIEWNO VIEWNO VIEW-40-200204002468101214161820TIME (s)
  • True position
  • Camera reading
  • Odometry dead-reckoning
  • Fused (Kalman)
  • ±2σ uncertainty
  • Camera dropout

Camera · absolute, drops out

3.0 cm
25 %

Long-run share of time with no view, in bursts of about 1.2 s (occlusions).

Odometry · relative, drifts

4.0 cm/s
1.5 cm/s

A constant error in measured speed: its position estimate drifts by bias × time.

Fusion method

The Kalman filter weights each sensor by its stated noise, tracks its own uncertainty, and estimates the odometry bias while the camera can see.

Show

Root-mean-square error vs truth · lower is better

  • Camera aloneholds last reading in dropouts7.9 cm
  • Odometry alonedead reckoning from start15.1 cm
  • Kalman filterfused estimate0.9 cm
  • Fused, in dropoutsonly samples with no camera1.1 cm

Camera coverage 60 %. Camera error only over frames it saw: 2.9 cm (≈ its σ).

State

Seed 7. The camera saw the target 60 % of the time in 4 dropouts. Error (RMSE): camera alone 7.9 cm holding its last reading, odometry alone 15.1 cm, kalman filter 0.9 cm (1.1 cm during dropouts). Fusion is 88 % better than the better single sensor. Estimated odometry bias 1.53 cm/s (true 1.50).

Seed 7. The camera saw the target 60 % of the time in 4 dropouts. Error (RMSE): camera alone 7.9 cm holding its last reading, odometry alone 15.1 cm, kalman filter 0.9 cm (1.1 cm during dropouts). Fusion is 88 % better than the better single sensor. Estimated odometry bias 1.53 cm/s (true 1.50).

How to read this

Time runs left to right over 20 seconds. The thin solid line is where the object really is. Crosses are camera readings; hatched columns are dropouts where the camera sees nothing. The dashed line is odometry integrated from the start: smooth, but it wanders away as its bias accumulates. The thick line is the fused estimate, with a shaded ±2σ band showing how uncertain the Kalman filter believes it is. The band widens during each dropout and snaps back when the camera returns.

This mirrors Tactiverge's research question: when vision drops out, can local sensing such as force and joint feedback carry the estimate until it returns?

Assumptions & limitations
  • One dimension, a smooth known trajectory and a single object: real tracking is 3-D, with orientation, multiple objects and data association.
  • Noise is white Gaussian with the σ you set, and the Kalman filter is told the true σ values. Real filters must be tuned against noise they can only estimate.
  • Odometry error is a constant bias plus white noise; real drift also comes from slip, scale-factor error and temperature.
  • Dropouts are random bursts, independent of where the object is. Real occlusions often happen exactly when the task gets hard, for example when a gripper covers the object.
  • The camera has no latency and runs at the same 20 Hz as odometry; real cameras are slower and delayed, which the filter would have to compensate for.
  • Figures are from one seeded run of 401 samples; change the seed to see how much the numbers vary by chance.
Can't use the interactive? Read a description instead

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.

4.Checkpoint: guided practice

Check what you just discovered before going on. Hints appear after a wrong answer.

Practice 1

Two independent sensors have σ₁ = 3 cm and σ₂ = 4 cm. What is the uncertainty of their best combination, in cm?

cm

5.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

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.

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.

6.Practice on your own

Practice, not a test. Wrong answers get a hint and another try.

Practice 2

Combine 10.0 ± 1 and 13.0 ± 2 with inverse-variance weights. What is the estimate?

Practice 3 · a fresh version every time

One reading of a temperature sensor has standard deviation 2 °C. You average n = 36 independent readings. What is the standard error of the mean, in °C?

°C

Practice 4 · a fresh version every time

A sensor's output spans 0 to 10 V and you need steps no bigger than 10 mV. Taking one step as range ÷ 2^n, what is the smallest whole number of bits n that works?

bits

Practice 5

Fusing a biased sensor with an unbiased one gives an estimate that is…

Practice 6

Review: a sensor reads 0.2 V high every time and also jitters by ±0.05 V. Which statement is right?

7.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.

8.Reflect

9.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).

    Concepts: Sensor fusion · Measurement error and uncertainty · Noise and filtering