Particle Filters utilise samples (particles) to represent a probability density function of the prediction of a state at a given timestep. It uses this to generate a posterior estimate for non-parametric models.
We can represent the probability as either a number of samples or as a weighted representation.
Sampling
We generate the samples according to a proposal function.
We can generate random points according to a distribution:
Gaussian Sampling
We can generate random points in order to form a Gaussian:
This generates normally distributed samples between .
Rejection Sampling
Rejection Sampling consists of generating a set of random points along two axes, for example, .
We can then ‘reject’ the points above the curve according to a chosen distribution. For example, for an exponential:

Importance Sampling
We can also use a proposal based on the importance of the value of a function at a given point. Namely, the weight of a particle is dependent on the difference between the importance and the
Algorithm
Then, we can form the particle filter algorithm, which loops between a prediction and correction step, for each timestep , as:
- Create a prediction set and a correction set.
- Generate samples from the proposal distribution.
- Generate weights based on a target distribution.
- Draw weighted samples in order to resample at .
Within Localisation
Specifically within localisation, we can treat the particles as a belief of the position of a mobile robot.
- Given the timestep , we can assume no knowledge of the location of the Robot is known. This can be improved by utilising Robot Localisation.
- We can generate random samples in the environment to model the robot’s unknown position:

- At the timestep , we can make an observation. We can then generate weights based on the likelihood the true pose matches the prediction (target).

- We can then use this set of weighted sample to resample the particles. The image below shows this resampling, where the new samples are most prominent where the prior estimate’s weights were higher:

- We can also incorporate the transition model using Dead Reckoning and propagating the particles’ positions according to the movement calculated by dead reckoning.
Resampling Methods
Above, we do not detail how resampling is performed. There are two main methods:
Fitness Proportionate Selection
We can imagine ‘buckets’ with size equal to the weights of the particles. We can then randomly pick values such that we return a biased set of random values, dependent on the bucket size.
Analogically, this can be represented as a biased roulette wheel being spun times:

Stochastic Universal Sampling
We can instead pick values at once, at an arc length interval of . This minimises variance and is faster:
