Contents · Probability & Information Theory
Part 0 · Expectation & Monte Carlo
Part 1 · Entropy & Divergence
Part 2 · Score-Function Gradient
Part 3 · Bayesian Estimation
- Bayesian Inference and the Kalman Filter
Part 3 · Bayesian Estimation
Bayesian Inference and the Kalman Filter
A robot never sees its state. It sees noisy sensors and knows a rough model of how it moves. State estimation is the problem of turning that stream into a probability distribution over the hidden state , updated every time a new measurement arrives.
Recursive Bayesian estimation
Keep a belief , the posterior over the state given all measurements so far. Each step does two things. First predict: push the belief through the dynamics with the Chapman-Kolmogorov integral,
Then update: multiply the predicted belief (now the prior) by the likelihood of the new measurement and renormalize,
That is Bayes' rule applied once per timestep. Posterior becomes the next prior, forever. The integral is intractable in general, but for one family it closes in a few matrix operations.1
The linear-Gaussian case is the Kalman filter
Assume linear dynamics and a linear measurement with Gaussian noise,
A Gaussian pushed through a linear map and multiplied by another Gaussian stays Gaussian, so the belief is fully described by its mean and covariance . Tracking those two through predict and update gives the Kalman filter.
Predict:
Update with innovation , innovation covariance , and gain :
The gain is the whole story. It is the ratio of what the model does not know, , to the total uncertainty, . When the sensor is noisy ( large) the gain shrinks and the estimate leans on the model. When the model is uncertain ( large, so large) the gain grows and the estimate leans on the measurement.2
A one-step worked example
Take the simplest case: a scalar constant position, , no process noise. Start with prior mean and variance , sensor variance . A measurement arrives.
Equal trust in model and sensor puts the estimate exactly halfway, at , and halves the variance from to ( from to ). Two measurements with equal weight, one combined answer with less uncertainty than either alone.
Fusing a moving target
Now a 1D target with position and velocity, , constant-velocity model , measuring position only, . The true track below is a slow sinusoid, so the constant-velocity model is deliberately wrong at the turns and has to absorb the mismatch. Drop and the estimate chases the noisy dots; raise it and the band widens as the filter smooths. Starve and the filter grows overconfident and lags the curve; feed it and the estimate stays nimble.
- gain K₀
- 1.000
- σ = √P₀₀
- 1.000
This is the core of how a robot fuses an IMU, wheel odometry, and GPS into one physical state estimate: each sensor is a linear-Gaussian measurement, and the filter weighs every one by its variance. When the dynamics or measurements turn nonlinear, the same predict-update skeleton runs on a local linearization (the extended Kalman filter) or on sampled sigma points (the unscented filter), but the Bayesian recursion underneath does not change.1
Footnotes
-
Thrun, Burgard, Fox, Probabilistic Robotics (2005). ↩ ↩2
-
Kalman, A New Approach to Linear Filtering and Prediction Problems (1960). ↩