Robotics
← Roadmap/State Estimation

Bayesian Filtering

The recursive predict–update loop behind all filters.

Progress0/9 questions
mediumState EstimationSkip to practice questions ↓

Prerequisites

Why it matters in robotics

Bayesian filtering is the recursive predict-update backbone beneath every estimator a robot uses for tracking its own position or state over time. Starting from the assumption that the robot's next state depends only on its current state and not its full history, a motion model predicts where the robot's belief should move next, and a new sensor reading corrects that prediction by weighing it against how reliable the sensor is. Understanding this recursion from first principles is what makes it possible to build and debug real localization and sensor-fusion stacks rather than treat a filter as a black box.

What to study

  • The recursive belief equation: derive bel(x_t) from the prior, motion model p(x_t | u_t, x_{t-1}), and measurement model p(z_t | x_t)
  • The two-step predict (control update / total probability) then update (measurement / Bayes rule with normalizer eta) loop
  • The Markov assumption and conditional independence that make the recursion tractable
  • How the general Bayes filter specializes into the Kalman filter, EKF, histogram filter, and particle filter

Where to study

Cheatsheet

Symbols used below

xtx_tstate at time tt
ztz_tmeasurement at time tt
utu_tcontrol input applied between t1t-1 and tt
bel(xt)bel(x_t)belief — posterior distribution over xtx_t given all data so far
bel(xt)\overline{bel}(x_t)predicted belief, before folding in ztz_t
η\etanormalizing constant (makes the posterior integrate to 1)

The two-step recursion

Predict (total probability over the motion model):

bel(xt)=p(xtut,xt1)bel(xt1)dxt1\overline{bel}(x_t) = \int p(x_t \mid u_t, x_{t-1})\, bel(x_{t-1})\, dx_{t-1}

Update (Bayes' rule with the measurement model):

bel(xt)=ηp(ztxt)bel(xt)bel(x_t) = \eta \, p(z_t \mid x_t) \, \overline{bel}(x_t)

Every filter — KF, EKF, histogram, particle — is this same loop with a different representation of belbel.

Markov assumption

The recursion only works because the state is assumed complete: xtx_t depends on the past only through xt1x_{t-1} and utu_t, and ztz_t depends on the past only through xtx_t.

This conditional independence is what lets you replace a growing history of data with a single running belief.

Predict spreads, update sharpens

Predicting through the motion model always adds uncertainty (it convolves in process noise), even with a perfect model.

Updating with a measurement always removes uncertainty, weighted by how much you trust the sensor. A filter that only predicts drifts; one that only updates never smooths out noise.

Choosing a representation

The Bayes filter itself is intractable to compute exactly for general distributions — every concrete filter is a choice of how to represent and propagate bel(xt)bel(x_t): a single Gaussian (KF), a linearized or sigma-point Gaussian (EKF/UKF), a discretized grid (histogram filter), or a weighted sample set (particle filter).

Why it specializes the way it does

Gaussian + linear motion/measurement models collapse the integral into closed form — that's the Kalman filter.

Drop linearity but keep the belief unimodal and you get the EKF/UKF. Drop the Gaussian assumption entirely and you need a grid or particles to represent arbitrary, possibly multimodal shapes.

Predictbel⁻ = ∫ p(x|x′,u) bel dx′(motion model)Updatebel ∝ p(z|x) · bel⁻(measurement, normalize)bel⁻bel
Every Bayes filter alternates a predict step (convolve the belief with the motion model) and an update step (multiply by the measurement likelihood, then normalize).
 Histogram filterKalman filter (+ EKF/UKF)Particle filter
Belief representationDiscretized grid of probabilitiesSingle Gaussian (mean + covariance)Set of weighted samples
Handles multimodal beliefYesNo — unimodal onlyYes
Cost driverGrows exponentially with state dimensionCheap: closed-form linear algebraScales with particle count, not state shape
prior×likelihood=posteriorthen re-normalize
The discrete Bayes update multiplies the prior belief by the measurement likelihood cell-by-cell, then renormalizes — sharpening the belief wherever the two agree.

Application focus

Select an application above.

Practice questions (9)