No jobs
Core 11 min 2 of 3

Fusing measurements

The Kalman gain is a precision-weighted average, and it is visible in the geometry.

What this repairs

Knowing the Kalman equations but not being able to predict, before computing, where the posterior will sit.

Start in one dimension, where the whole thing is transparent. Two independent estimates of the same quantity, N(μ1,σ12)\mathcal{N}(\mu_1, \sigma_1^2) and N(μ2,σ22)\mathcal{N}(\mu_2, \sigma_2^2) , combine to

μ=σ22μ1+σ12μ2σ12+σ22,1σ2=1σ12+1σ22.\mu = \frac{\sigma_2^2\,\mu_1 + \sigma_1^2\,\mu_2}{\sigma_1^2 + \sigma_2^2}, \qquad \frac{1}{\sigma^2} = \frac{1}{\sigma_1^2} + \frac{1}{\sigma_2^2}.

Read it as: precisions add, and the mean is a precision-weighted average. Two consequences follow immediately and are worth stating out loud. The posterior mean always lies between the two inputs. The posterior variance is always smaller than either — even if both inputs were terrible. Information never makes you less certain.

The multivariate update

  1. y=zHx^\mathbf{y} = \mathbf{z} - H\hat{\mathbf{x}}^-

    The innovation: what the sensor said minus what you expected it to say. All the new information is in here.

  2. S=HPH+RS = H P^- H^\top + R

    The innovation covariance — how surprised you are entitled to be, combining state uncertainty pushed through the sensor model with the sensor noise.

  3. K=PHS1K = P^- H^\top S^{-1}

    The gain. Read it as a ratio: state uncertainty over total uncertainty. Confident prior and noisy sensor gives a small K; the reverse gives K near one.

  4. x^+=x^+Ky,P+=(IKH)P\hat{\mathbf{x}}^+ = \hat{\mathbf{x}}^- + K\mathbf{y}, \qquad P^+ = (I - KH)P^-

    Move along the innovation by the gain, and shrink the covariance. Note P⁺ does not depend on the measurement value — how much you learn is fixed by the geometry before the sensor reports.

Check yourself

A robot has a laser giving 1 cm range and 5° bearing to a landmark. After one measurement, which direction is the position estimate still uncertain in?

Show answer

Along the arc perpendicular to the beam. Range is precise, so the radial direction collapses to about a centimetre; bearing is vague, so the tangential uncertainty is roughly 5°×5° \times range — about 99 cm at 11 m and 8787 cm at 1010 m. The posterior ellipse is thin radially and long tangentially, and it grows with distance in one axis only. This is exactly the shape the figure above produces when you make the sensor precise along one axis.

Euler View - ML Experiment Monitor