Perception · Theory · P8
P8-T5 — Uncertainty and Conflicting Observations
A measurement without an uncertainty cannot be fused. And two measurements that disagree should not be.
Combining estimates well means trusting each according to how accurate it is, in each direction. That needs an uncertainty for every measurement, written as a covariance, and a rule for combining them. It also needs a check that the estimates are consistent, because the arithmetic of fusion works on the assumption that they describe the same thing. When they do not, the arithmetic still produces an answer, confidently, and the answer belongs to neither sensor. This lesson sets out covariance ellipses, the fusion formula, the conditions it requires, and the chi-square test for conflict, using the camera and lidar models of Lab P8-L4.
Learning objectives
After this lesson, you should be able to:
- Read a 2D covariance as an ellipse and explain why uncertainty depends on direction.
- Fuse two Gaussian estimates in information form and compute the fused covariance.
- Explain why correlated errors and double counting make the fused covariance too small.
- Test two estimates for consistency with a chi-square gate and decide what to do on a conflict.
The idea: trust in proportion to certainty, and check that they agree
An estimate with its uncertainty is a cloud of where the object might be. A covariance matrix describes the cloud as an ellipse: wide in the direction in which the sensor is uncertain, narrow where it is accurate. Camera and lidar clouds have different shapes at the same object, and that is what makes fusion useful.
Fusion as the overlap of two clouds
If the object is in both clouds, it is in their overlap. The overlap of two Gaussian clouds is again Gaussian, centred nearer to the tighter one in each direction, and smaller than both. That is the whole of the fusion formula; the next section writes it down.
What the formula assumes
- The same object. Both estimates are of one object at one moment. If the association was wrong, or the timestamps differ, they are not.
- The same frame. Both are expressed in one coordinate frame with the same axes and units (Lesson P8-T3).
- Independent errors. The sensors’ errors are unrelated. Errors that share a cause, such as the same ego-motion estimate or the same map prior, are correlated, and the result is over-confident.
- Honest covariances. The stated uncertainties are the real ones. A sensor that claims 0.05 m and is off by 0.3 m will dominate the fusion and mislead it.
When the estimates disagree
If the two estimates are further apart than their combined uncertainty explains, at least one assumption has failed. The test is the squared statistical distance between them (the same quantity used for gating in Lesson P7-T2), compared with a chi-square limit. A conflict can mean a wrong association, a calibration or timing fault (Lab P8-L3), a failed sensor, or a rare large error. It does not say which. The robust responses are to not fuse, to fall back to the sensor that is more reliable for the decision at hand, or to keep both hypotheses, and to log the event, because a rising conflict rate is a symptom.
The mathematics: information form and the consistency test
Let two independent estimates of the same position be z1 with covariance P1 and z2 with P2. The inverse of a covariance, the information matrix, measures how much is known in each direction. Information adds:
- P₁⁻¹, P₂⁻¹
- the information matrices: large in a direction where the sensor is accurate.
- Pf
- the fused covariance. In every direction it is no larger than either input.
- xf
- the fused position: an information-weighted average, so each direction is dominated by the more accurate sensor.
For one dimension this reduces to the weights w1 = σ2² / (σ1² + σ2²) on z1 and 1 − w1 on z2.
Covariance of a polar measurement. A sensor with range error σr and bearing error σθ has, at range r, an error σr along the line of sight and r σθ across it. In a frame rotated by the bearing θ the covariance is diagonal, diag(σr², (rσθ)²); in the robot frame it is R(θ) diag(·) R(θ)ᵀ.
Correlation. If the two estimates have a cross-covariance P12 (because they share a prior), the formula above understates the fused uncertainty. The Covariance Intersection method gives a safe bound without knowing P12, at the price of being conservative.
Consistency test. If both estimates are of the same object with independent errors, their difference d = z1 − z2 has covariance P1 + P2. Then
follows a chi-square distribution with as many degrees of freedom as the dimension of z. For 2D positions the limits are 5.99 (95%), 9.21 (99%) and 13.8 (99.9%). A value above the limit says the pair is inconsistent at that level of confidence; a genuine pair exceeds the 99% limit about once in a hundred.
Worked examples: an ellipse, a fusion and a conflict
The two sensors. An object is 10 m away straight ahead. The camera (size-based range, bearing from the pixel) has σalong = 0.09 × 10 = 0.9 m and σacross = 0.01 × 10 = 0.1 m. The lidar has σalong = 0.05 m and σacross = 0.02 × 10 = 0.2 m. Since the line of sight is the x axis, the covariances are diagonal.
| Direction | Camera σ | Lidar σ | Fused 1/σ² = sum | Fused σ | Weight on camera |
|---|---|---|---|---|---|
| Along the line of sight | 0.9 m (0.81) | 0.05 m (0.0025) | 1/0.81 + 1/0.0025 = 401.2 | 0.050 m | 0.0025 / 0.8125 = 0.003 |
| Across the line of sight | 0.1 m (0.01) | 0.2 m (0.04) | 100 + 25 = 125 | 0.089 m | 0.04 / 0.05 = 0.80 |
Along the line of sight the lidar is 99.7% of the answer; across it the camera is 80%. The fused uncertainty (0.050 m, 0.089 m) is smaller than the camera’s in both directions and smaller than the lidar’s in both. This is what the weights in Lab P8-L4, stage 1, were searching for: about 0 along, 0.8 across.
A consistent pair. Camera and lidar differ by 1.5 m along the line of sight. The combined variance there is 0.81 + 0.0025 = 0.8125. d² = 1.5² / 0.8125 = 2.77, well below 9.21: the disagreement is within what the camera’s range error explains. The pair is fused and the fused position is almost the lidar’s.
A conflicting pair. Camera and lidar differ by 1.0 m across the line of sight. The combined variance there is 0.01 + 0.04 = 0.05, so d² = 1² / 0.05 = 20, far above 9.21. This is a conflict, although the offset is smaller than the earlier 1.5 m. A metre sideways is 4.5 standard deviations of what the two sensors’ bearings could explain, while a metre and a half in range is 1.7. The same distance is harmless in one direction and decisive in the other, which a plain distance gate cannot capture.
What fusing a conflict does. With the 1 m lateral disagreement, fusing would place the object 0.8 m towards the camera’s side (the camera’s weight across the line of sight is 0.8). If the camera had matched a different object, the fused point is 0.8 m from the lidar’s true object and 0.2 m from nothing: a phantom that is wrong and, with a covariance of 0.089 m, claims to be precise.
Double counting. Two estimates share a map prior with the same variance 0.04 m² as their common error. Fusing them as if independent halves the variance of the part they share, reporting a standard deviation of 0.14 m for the common part instead of the true 0.2 m: the covariance is too small by a factor of 1.4. The fused estimate looks tighter than it is, and later gates, which use it, become too narrow.
Engineering implications and limitations
Give every measurement a covariance. If a sensor or a detector gives only a position, create the covariance from its error model: range-dependent, direction-dependent, and larger for small and low-score detections. A constant covariance is a common source of poor fusion.
Validate the covariances. Compare the predicted spread with the observed errors on logged data against a reference. If the normalised errors have a mean square of 1 (per dimension), the covariances are honest; if more, inflate them (Lesson P7-T4, NIS).
Gate before you fuse. Use the chi-square test on every pair, and never fuse an inconsistent pair. Choose the confidence level from the cost of a conflict being missed against being wrongly raised.
Decide the fallback in advance. For each decision, which sensor is trusted on a conflict? For obstacle avoidance the safe fallback is usually “treat both detections as obstacles”, the union, which errs towards stopping.
Watch the conflict rate. The fraction of pairs that fail the gate should stay near the expected 1% at the 99% level. A steady rise points to calibration or timing drift (Lesson P8-T3) or a failing sensor.
Do not reuse fused outputs as raw inputs. Feeding a fused estimate back into a later fusion with the same sensors counts the same information twice. Keep a clear flow of measurements, and when sharing between systems, use methods that account for the correlation.
Remember that fusion is not calibration. A consistent-looking fusion can still hide a shared error. Alignment and honest covariances are prerequisites, not outcomes.
Common misconceptions
“Fusion averages the two positions.”
It averages them with weights from the inverse covariances, direction by direction. The result can be almost entirely one sensor along one axis and the other along the perpendicular axis.
“A smaller fused covariance means a better estimate.”
Only if the inputs are honest and independent. Double counting or misalignment gives a small covariance and a large error.
“A conflict means one sensor is wrong.”
It means the assumptions failed. The cause may be the association, the calibration, the timing, or either sensor, and the test does not say which.
“A distance threshold detects conflicts.”
The same distance can be consistent in one direction and a conflict in another. Use the statistical distance with the covariances.
Engineering takeaways
- A covariance is an ellipse: camera and lidar are uncertain in different directions, so their fusion can beat both.
- Information form: Pf = (P₁⁻¹ + P₂⁻¹)⁻¹, xf = Pf (P₁⁻¹ z₁ + P₂⁻¹ z₂). In the example: along the line of sight 0.05 m (lidar 99.7%), across 0.089 m (camera 80%).
- The formula assumes the same object, frame and time, independent errors and honest covariances; violating any of them gives confident wrong answers.
- Test d² = dᵀ(P₁ + P₂)⁻¹d against a chi-square limit (9.21 for 99%, 2D): 1.5 m along the line of sight is consistent (d² = 2.8), 1.0 m across is a conflict (d² = 20).
- On a conflict do not fuse; fall back by a rule fixed in advance, log it, and monitor the conflict rate.
References and further reading
Textbooks and papers for the methods. The sensor error models are those of Lab P8-L4 (simulated, stated), not of any real device.
- Bar-Shalom, Y., Li, X.-R. and Kirubarajan, T. (2001). Estimation with Applications to Tracking and Navigation. Wiley: fusion, track-to-track correlation, chi-square consistency tests.
- Thrun, S., Burgard, W. and Fox, D. (2005). Probabilistic Robotics. MIT Press: Gaussian estimation and information form.
- Julier, S. J. and Uhlmann, J. K. (1997). A Non-divergent Estimation Algorithm in the Presence of Unknown Correlations. American Control Conference: Covariance Intersection.
- Durrant-Whyte, H. and Henderson, T. C. (2016). Multisensor Data Fusion. In Springer Handbook of Robotics, 2nd ed.
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
Sensor 1 has σ = 0.4 m and sensor 2 σ = 0.2 m in the same direction. What are the weights and the fused σ?
Explanation
Weight on sensor 1 = 0.2² / (0.4² + 0.2²) = 0.04 / 0.20 = 0.2; on sensor 2, 0.8. 1/σ² = 6.25 + 25 = 31.25, σ = 0.179 m.
Question 2
Two estimates differ by (0.3, 0.9) m with combined variances (0.04, 0.09) m² in the two axes (diagonal). Is the pair consistent at 99% (limit 9.21)?
Explanation
d² = 0.3²/0.04 + 0.9²/0.09 = 2.25 + 9 = 11.25 > 9.21: a conflict, mostly because of the second axis (9 of the 11.25).
Question 3
A tracker fuses a lidar track and a camera track that both used the same wheel odometry (error variance 0.09 m² in the shared part). What is wrong with treating them as independent?
Explanation
The shared odometry error is counted twice, so the fused uncertainty of that part is too small (halved instead of unchanged). The fused covariance is over-confident; use measurements before the shared transform, or a method such as Covariance Intersection.
What’s next
Next: what to do with the fused result: representing the scene so that planning, control and manipulation can use it.
Related content
Nothing below is required to finish this lesson.
- BeforeP8-T4: Early Fusion, Late Fusion and Object-Level Fusion
Compare fusion architectures and their failure modes.
- LabP8-L2: Compare Camera-Only and Depth-Assisted Distance Estimates
Estimate distance from apparent size and from depth and compare their errors.
- LabP8-L4: Fuse Simulated Observations with Uncertainty
Combine camera and LiDAR estimates by their covariances and reject conflicts.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.