Princeton Intro to Robotics (Fall 2026) | Lecture 12: Kalman & Particle Filters
Overview
Kalman and particle filters are presented as practical implementations of the Bayes filter for continuous robot state estimation. The Kalman filter computes an exact Gaussian belief update when dynamics, measurements, and the initial belief are Gaussian and linear; particle filters approximate more general, potentially multimodal beliefs with weighted samples, making them useful for localization but vulnerable to particle depletion.
Key takeaways
- A Kalman filter is an exact Bayes-filter implementation when the dynamics and sensor models are linear Gaussian and the initial belief is Gaussian; under those conditions, every updated belief remains Gaussian.
- The Kalman measurement update balances prediction and observation uncertainty: a low-variance sensor measurement receives more weight than an uncertain dynamics prediction.
- Observability determines which state variables can be inferred: repeated measurements of quadrotor position and orientation may reveal velocity, but omitted or unobservable state components remain uncertain.
- A single Gaussian cannot faithfully represent ambiguous localization, such as being near either of two visually indistinguishable doors; a particle set can maintain both hypotheses.
- A particle filter predicts particles through the dynamics model, weights them by sensor likelihood, then resamples with replacement in proportion to those weights.
- Particle depletion can remove samples near the true state, especially in high-dimensional or complex beliefs; injecting random particles is one way to preserve diversity.
Chapters
- The Bayes filter alternates a dynamics prediction, which marginalizes over previous states, and a measurement update using Bayes' rule.
- Finite examples, such as a door that is open or closed, allow exact sums over states and observations.
- For continuous states, controls, or observations, those sums become integrals that are generally intractable for arbitrary models.
- The lecture introduces the Kalman filter as an exact solution under restrictive assumptions and the particle filter as an approximation for broader models.
- The state evolves as a linear function of the previous state and control, with matrices A and B that may vary over time.
- A Gaussian process-noise term, with zero mean and covariance R, models effects such as wind gusts or imperfect dynamics.
- Time-varying A and B can represent changing dynamics or linearizations along a planned trajectory.
- A multivariate Gaussian belief is specified by its mean vector and covariance matrix.
- Dynamics-only updates propagate uncertainty forward, so the belief can spread as process noise accumulates.
- Increasing the process-noise variance from 0.3 to 4 square meters produces a visibly wider one-dimensional state distribution.
- The sensor model is linear Gaussian: an observation equals C times the state plus zero-mean Gaussian noise with covariance Q.
- In the illustrated one-dimensional example, C = 0.8, so a state of 2 produces a measurement centered at 1.6.
- For a six-dimensional quadrotor state containing x, y, theta, vx, vy, and angular velocity, measuring only x and theta requires a 2-by-6 matrix C.
- A more typical 3-by-6 sensor matrix extracts x, y, and theta while leaving velocities unmeasured directly.
- Repeated position and orientation measurements can help infer velocities over time, provided the system is observable.
- The Kalman filter also requires an initial Gaussian belief, specified by mean mu-zero and covariance Sigma-zero.
- With linear Gaussian dynamics, a linear Gaussian measurement model, and a Gaussian initial belief, the posterior remains Gaussian at every time step.
- The prediction step transforms the prior mean and covariance through the dynamics and adds process uncertainty.
- The measurement step applies Bayes' rule to combine the predicted belief with the sensor likelihood.
- A Kalman visualization shows the predicted distribution widening, then narrowing or shifting when a measurement arrives.
- The prediction computes a new mean and covariance from the previous Gaussian belief and the linear dynamics.
- The measurement update uses the observed value and sensor model to compute the posterior mean and covariance.
- The gain matrix controls how strongly the update trusts the measurement relative to the prediction.
- Once A, B, R, C, and Q are specified, the filter update is a compact sequence of matrix operations.
- A quadrotor filter can maintain a Gaussian belief over all six state variables even when the camera measures only x, y, and theta.
- As position and orientation observations accumulate, the filter can reduce uncertainty in vx, vy, and angular velocity.
- A state component that is never measured, such as y in a sensor setup that omits y, may remain difficult or impossible to estimate accurately.
- Observability depends on both the sensor matrix and system dynamics, not just on the Kalman update equations.
- The Crazyflie drone uses a more sophisticated Kalman-filter variant for state estimation.
- A downward-facing range sensor supports height tracking; the estimated vertical position follows the drone as it rises and descends.
- Kalman filtering is widely used in aerospace applications because Gaussian state estimates can be updated efficiently.
- The exact Kalman filter is limited when real dynamics or sensor models are nonlinear.
- The extended Kalman filter repeatedly linearizes nonlinear dynamics and measurement models around the current estimated state.
- Even with relinearization, an extended Kalman filter still represents the belief as a single Gaussian.
- In a two-door localization example, detecting a nearby door without knowing which door was seen should create two distinct probability modes.
- A single Gaussian may put probability between the doors, where the robot is unlikely to be, or discard one plausible location.
- A particle filter represents a belief using M state samples rather than a fixed Gaussian or a mixture model.
- Each particle is a concrete state hypothesis, and particle density approximates probability density.
- Particles can represent a bimodal belief by clustering around both plausible door locations.
- Increasing M, potentially to thousands or millions of particles, generally improves the approximation at greater computational cost.
- Sebastian Thrun's demonstration uses a robot with noisy sonar range sensors to localize inside a mapped building.
- Each particle represents a possible x-position, y-position, and heading; the collection represents the robot's location belief.
- Range measurements concentrate particles in a corridor, while corridor symmetry initially leaves two plausible location clusters.
- When the robot enters an asymmetric office, measurements eliminate the incorrect cluster and resolve the ambiguity.
- The prediction step samples a new state for each previous particle from the dynamics model conditioned on the previous state and control.
- The measurement update assigns each predicted particle an importance weight based on the likelihood of the observed sensor data at that state.
- The filter samples M particles with replacement, with selection probability proportional to importance weight.
- Duplicate particles are valid and indicate that probability has concentrated around their shared state.
- The repeated particle-filter cycle is prediction, sensor-likelihood evaluation, and weighted resampling.
- A tilde over a state indicates drawing a sample from a dynamics distribution; evaluating a probability density produces a weight instead.
- A localization filter assumes a known map and estimates the robot's pose relative to it.
- The particle representation can track a simulated robot's hidden true state without using that true state as an input.
- Particle filters are effective for localization when the belief is multimodal, but high-dimensional or complex beliefs may require many samples.
- Particle depletion occurs when resampling removes particles near the true state, making recovery difficult.
- One mitigation is to inject random particles after updates to preserve diversity; other practical variants add further safeguards.
- The next lecture applies particle filtering to SLAM, simultaneous localization and mapping.
Transcript excerpt
0:10 All right, I think we'll go and get started. So just as a reminder of where we are in the course. So we're still pursuing the second module on localization and mapping. So in the last lecture, we covered base filtering. So this is kind of the fundamental probabilistic framework around which the algorithms that we'll discuss today are are based. So the base filter gives us a general way to take into account some partial probabilistic knowledge of the dynamics of the robot and some probabilistic knowledge of the sensor measurements that the robot has access to. But I guess as we kind of mentioned in the last lecture, the base filter is very computationally challenging to implement. And I'll I'll say more about that a little bit.
0:57 So what we're going to discuss today are basically two instantiations of the the base filter. So the first one is what's known as the Kalman filter. So if you've taken a controls course, you might have seen this before. The second one is a particle filter, which is used extremely widely in robotics, particularly for localization, mapping, and slam, which is simultaneous localization and mapping. So that's the the plan for for today. And I'll say a bit more about this in in a couple of minutes. And the kind of classic reference for all of this material on base filtering, Kalman filtering, particle filtering, at least from a robotics perspective, are these chapters from the probabilistic robotics textbook, which is one of the reference books in in the course. So I guess just a reminder of the the base filter which we discussed in the
1:45 last lecture. So the base filter, what it's trying to do is update its belief about the state of the robot. So the state of the robot
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Introduction to Robotics @ Princeton.