Models

The BasicParticleFilter requires two pieces of information about the system that is being filtered:

  1. A generative dynamics model, which determines how the state will change (possibly stochastically) over time, and
  2. An explicit model of the observation distribution.

The ParticleFilterModel provides a standard structure for these two elements. The first parameter of the type, S, specifies the state type. The constructor arguments are two functions. The first, f, is the dynamics function, which produces the next state given the current state, control, and a random number generator as arguments. The second function, g is describes the weight that should be given to the particle given the original state, control, final state, and observation as arguments. See the docstring below and the feedback control and filtering tutorials for more info.

ParticleFilters.jl requires the rng argument in the system dynamics functions for the sake of reproducibility independent of the simulation or control system.

The dynamics and reweighting models may also be specified separately using PredictModel and ReweightModel.

Note that a POMDP with POMDPs.gen and POMDPTools.ModelTools.obs_weight implemented may also serve as a model.

Docstrings

ParticleFilters.ParticleFilterModelType
ParticleFilterModel{S}(f, g)

Create a system model suitable for use in a particle filter. This is a combination prediction/dynamics model and reweighting model.

Parameters

  • S is the state type, e.g. Float64, Vector{Float64}

Arguments

  • f is the dynamics function. xₜ₊₁ = f(xₜ, uₜ, rng) where x is the state, u is the control input, and rng is a random number generator.
  • g is the observation weight function. g(xₜ, uₜ, xₜ₊₁, yₜ₊₁) returns the likelihood weight of measurement yₜ₊₁ given that the state transitioned from xₜ to xₜ₊₁ when control uₜ was applied. These weights need not be normalized (and, for performance, usually should not be).
source