Particle Filter
Problem Statement
When posterior distributions are multi-modal or strongly non-Gaussian, Kalman-family filters become brittle. Particle filters approximate the full posterior with weighted samples and remain effective in nonlinear, non-Gaussian settings.
Model and Formulation
The posterior is approximated by particles:
Weights are updated from measurement likelihood:
Resampling is triggered by effective sample size:
Algorithm Procedure
- Sample particles from transition model.
- Evaluate measurement likelihood for each particle.
- Normalize weights and compute
N_eff. - Resample when degeneracy threshold is crossed.
Tuning Guidance
Scale
Q-equivalent noise per state, not with one scalar. Position and velocity have different units and different sensitivities; a singleprocess_noise_stdapplied to all four states injects metres of position noise per step and swamps the filter.But do not shrink it below the measurement noise either. A bootstrap filter proposes from the prior, so the particle cloud must overlap the likelihood. Make the cloud much tighter than the sensor and every particle scores the same, the weights go uniform, and the estimate stops being corrected at all — it coasts on its own dynamics and diverges. This is the failure that looks most like "the filter is broken" and is really "the proposal has no support where the data is".
Resample on effective sample size, not every step. Unconditional resampling throws away information and injects avoidable jitter. The atlas demo holds
N_eff ≈ 327/400.Seed the generator. Drawing from a fresh unseeded RNG on every call makes runs irreproducible even when everything around them is seeded.
Increase particle count for higher-dimensional states.
Match proposal noise to platform maneuver envelope.
Use stratified/systematic resampling to reduce variance.
Failure Modes and Diagnostics
- Particle impoverishment occurs with frequent resampling and narrow proposals.
- Sparse particle sets miss low-probability but valid hypotheses.
- Computational load scales with particle count and measurement complexity.
Implementation and Execution
python -m uav_sim.simulations.estimation.particle_filterEvidence

References
- Arulampalam et al., A Tutorial on Particle Filters for Online Nonlinear/Non-Gaussian Bayesian Tracking (2002)
- Doucet and Johansen, A Tutorial on Particle Filtering and Smoothing (2009)