[ANN] State estimation with LowLevelParticleFilters.jl

baggepinnen
Wed, 13 Apr 2022 09:24:45 +0000
Package Announcements

LowLevelParticleFilters.jl is a library for state estimation, that is, given measurements y(t) from a dynamical system with inputs u(t), estimate the state vector x(t). Throughout, we assume discrete-time dynamics on the form

x(t+1) = f(x(t), u(t), p, t, w(t))\\ y(t) = g(x(t), u(t), p, t, e(t))

where p are some form of parameters, t is the time and w,e are disturbances (noise).
The documentation describes how to handle continuous-time ODEs on the form

\dot x(t) = f(x(t), u(t), p, t, w(t))

as well.

The library has existed for a while, but has never really been announced before. I just pushed it over to version 3.0, breaking the previous interface by moving to an interface similar to the SciML ecosystem where many functions accept a parameter vector p. The Documentation has also seen some improvements in the process.

We provide a number of filter types

KalmanFilter. A standard Kalman filter. Is restricted to linear dynamics (possibly time varying) and Gaussian noise.

ExtendedKalmanFilter: For nonlinear systems, the EKF runs a regular Kalman filter on linearized dynamics. Uses ForwardDiff.jl for linearization. The noise model must be Gaussian.

UnscentedKalmanFilter: The Unscented Kalman filter often performs slightly better than the Extended Kalman filter but may be slightly more computationally expensive. The UKF handles nonlinear dynamics and measurement model, but still requires an additive Gaussian noise model and assumes all posterior distributions are Gaussian, i.e., can not handle multi-modal posteriors.

ParticleFilter: The particle filter is a nonlinear estimator. This filter is simple to use and assumes that both dynamics noise and measurement noise are additive. Particle filters handle multi-modal posteriors.

AuxiliaryParticleFilter: This filter is identical to ParticleFilter, but uses a slightly different proposal mechanism for new particles.

AdvancedParticleFilter: This filter gives you more flexibility, at the expense of having to define a few more functions. This filter does not require the noise to be additive and is thus the most flexible filter type.

DAEUnscentedKalmanFilter: An Unscented Kalman filter for differential-algebraic systems (DAE). Still somewhat experimental.

The code has been written to be reasonably fast and it supports StaticArrays everywhere. For simple systems, we can push about 7k particles per millisecond. We also support particle and Kalman smoothing as well as automatic differentiation through the filters using ForwardDiff.jl, making parameter estimation with the Prediction-Error Method (PEM) relatively easy. We also have a new example of estimating time-varying parameters in ODEs.

Happy filtering
Fredrik

5 posts - 3 participants