/FeedbackParticleFilters.jl

Feedback particle filters for nonlinear stochastic filtering and data assimilation problems

Primary LanguageJuliaMIT LicenseMIT

FeedbackParticleFilters.jl

Lifecycle Dev Build Status codecov

This package's aim is to provide a versatile and efficient feedback particle filter implementation in Julia, with abstractions to flexibly construct, run, and analyze feedback particle filters for a variety of uni- and multivariate filtering problems with both diffusion and point process observations.

In particular, the following features are planned to be implemented in FeedbackParticleFilters:

  • Types for hidden state and observation models: diffusions, Poisson processes, etc.
  • A variety of gain estimation methods
  • Automatic filter deployment and simulation of the state and filtering equations
  • Storing of intermediate (trajectory) data from simulation
  • An interface to the powerful solvers from the DifferentialEquations package

Installation

Use the built-in package manager:

using Pkg
Pkg.add("FeedbackParticleFilters")

Usage

To load the package, use the command:

using FeedbackParticleFilters

Set up a basic one-dimensional linear-Gaussian continuous-time filtering problem:

using Distributions
state_model = ScalarDiffusionStateModel(x->-x, x->sqrt(2.), Normal())
obs_model   = ScalarDiffusionObservationModel(x->x)

filt_prob   = FilteringProblem(state_model, obs_model)

Once the filtering problem is defined, an appropriate filtering algorithm can be defined like this:

method = ConstantGainApproximation()
filter = FPF(filt_prob, method, 100)

The package comes with methods to automatically simulate a given system:

simulation = ContinuousTimeSimulation(filt_prob, filter, 10000, 0.01)
run!(simulation)

To learn more about how to use this package, please check out some tutorials or the documentation linked below.

Tutorials

There are various Jupyter notebooks that explore various key functions of the package:

  1. Getting started
  2. Gain estimation using the semigroup method
  3. Harmonic oscillator example

Documentation

In development...

Acknowledgements

This package was developed as part of academic research at Department of Physiology, University of Bern, Switzerland. The research was funded by the Swiss National Science Foundation.