SIR (sequential importance resampling)
Sequential Importance Resampling (SIR) is a method used in particle filtering, a type of recursive Bayesian filtering, to estimate the posterior distribution of a system state in a sequential manner. It is particularly useful in scenarios where the system evolves over time and the measurements obtained are noisy or incomplete.
To understand SIR, let's break down the steps involved:
Initialization:
- Generate an initial set of particles that represents the possible states of the system. Each particle consists of a state vector.
- Assign equal weights to all particles.
Prediction:
- Update the state of each particle based on the system dynamics. This involves propagating the state forward in time using a motion model or a transition function.
- Introduce some random perturbations to account for system uncertainties.
Measurement Update:
- Obtain a measurement of the system state from a sensor. This measurement is typically noisy and may not provide a complete representation of the true state.
- Compute the likelihood of each particle based on how well it agrees with the measurement. This is done by comparing the predicted measurement (based on the particle's state) with the actual measurement using a measurement model or observation function.
- Update the weights of the particles according to their likelihoods. Particles that have higher likelihoods get assigned higher weights.
Resampling:
- Select new particles from the current set of particles based on their weights. The idea is to draw more particles from the high-weight regions of the posterior distribution and discard particles with low weights.
- The selection is performed using a resampling algorithm, such as the multinomial resampling or systematic resampling.
- The resampling step ensures that the particles with higher weights have a greater chance of surviving and contributing to the next iteration.
Repeat:
- Iterate the prediction and measurement update steps for subsequent time steps.
- The new set of particles represents an approximation of the posterior distribution of the system state given all the measurements up to the current time step.
SIR is called "sequential" because it processes measurements one at a time in a sequential manner. It updates the particle weights based on the likelihood of the measurements and resamples the particles to maintain a representative set for the posterior distribution. By repeating this process over time, SIR allows us to track the evolving state of the system in a recursive manner.
Note that SIR has limitations, such as particle degeneracy (where a few particles end up having very high weights, while the rest have negligible weights) and sample impoverishment (where the particle set loses diversity over time). To address these issues, more advanced particle filtering algorithms like the Sequential Monte Carlo (SMC) filter and its variants have been developed.