Bayesian Filtering Library  Generated from SVN r
Public Member Functions | Protected Member Functions | Protected Attributes
Filter< StateVar, MeasVar > Class Template Reference

Abstract class representing an interface for Bayesian Filters. More...

#include <filter.h>

Inheritance diagram for Filter< StateVar, MeasVar >:
MixtureParticleFilter< StateVar, MeasVar > ParticleFilter< StateVar, MeasVar > ParticleFilter< ColumnVector, ColumnVector > MixtureBootstrapFilter< StateVar, MeasVar > ASIRFilter< StateVar, MeasVar > BootstrapFilter< StateVar, MeasVar > Optimalimportancefilter< StateVar, MeasVar > EKParticleFilter

List of all members.

Public Member Functions

 Filter (Pdf< StateVar > *prior)
 Constructor.
 Filter (const Filter< StateVar, MeasVar > &filt)
 copy constructor
virtual ~Filter ()
 destructor
virtual void Reset (Pdf< StateVar > *prior)
 Reset Filter.
virtual bool Update (SystemModel< StateVar > *const sysmodel, const StateVar &u, MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z, const StateVar &s)
 Full Update (system with inputs/sensing params)
virtual bool Update (SystemModel< StateVar > *const sysmodel, MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z, const StateVar &s)
 Full Update (system without inputs, with sensing params)
virtual bool Update (SystemModel< StateVar > *const sysmodel, MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z)
 Full Update (system without inputs/sensing params)
virtual bool Update (SystemModel< StateVar > *const sysmodel, const StateVar &u, MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z)
 Full Update (system with inputs, without sensing params)
virtual bool Update (SystemModel< StateVar > *const sysmodel, const StateVar &u)
 System Update (system with inputs)
virtual bool Update (SystemModel< StateVar > *const sysmodel)
 System Update (system without inputs)
virtual bool Update (MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z, const StateVar &s)
 Measurement Update (system with "sensing params")
virtual bool Update (MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z)
 Measurement Update (system without "sensing params")
virtual Pdf< StateVar > * PostGet ()
 Get Posterior density.
int TimeStepGet () const
 Get current time.

Protected Member Functions

virtual bool UpdateInternal (SystemModel< StateVar > *const sysmodel, const StateVar &u, MeasurementModel< MeasVar, StateVar > *const measmodel, const MeasVar &z, const StateVar &s)=0
 Actual implementation of Update, varies along filters.

Protected Attributes

Pdf< StateVar > * _prior
 prior Pdf
Pdf< StateVar > * _post
 Pointer to the Posterior Pdf.
int _timestep
 Represents the current timestep of the filter.

Detailed Description

template<typename StateVar, typename MeasVar>
class BFL::Filter< StateVar, MeasVar >

Abstract class representing an interface for Bayesian Filters.

This is the Abstract interface class that defines the interface of Bayesian filters. These filters are all related to i) a System Model, ii) a Measurement Model and iii) a Prior density reflecting the subjective belief of the person applying the filter BEFORE getting sensor or any other form of information about the modeled system.

This class is the base class for particle filters, kalman filters, ...

This class is a template class with 2 templates. In this way it allows filtering for "semi-discrete" models, eg. models with a fixed number of states (discrete states) but with continuous observations, as needed in Automatic Speech Recognition.

See also:
Pdf SystemModel MeasurementModel ConditionalPdf
Bug:
For now, due to a "bug" (= non-existence of a feature :-) in the ConditionalPdf class, STATES AND INPUTS MUST BE OF THE SAME TYPE (both discrete, or both continuous! This means that you can use this class for the following model types:
  • States, inputs and measurements continuous (most frequently used?)
  • States and inputs continous, Measurements discrete
  • States and inputs discrete, Measurements continous
  • States, inputs and measurements discrete

StateVar represents the nature of the states and inputs MeasVar represents the nature of the measurements

BEWARE: The order of the template arguments is reversed with respect to the notation used in "measurementmodel.h"

Definition at line 77 of file filter.h.


Constructor & Destructor Documentation

Filter ( Pdf< SVar > *  prior)

Constructor.

Precondition:
you created the prior
Parameters:
priorpointer to the prior Pdf

Definition at line 27 of file filter.h.

Filter ( const Filter< SVar, MVar > &  filt)

copy constructor

Bug:
we should make a copy of the prior
Todo:
Check if we should make a copy of the pdf's too?
Bug:
we should make a copy of the pdf's too

Definition at line 38 of file filter.h.


Member Function Documentation

Pdf< SVar > * PostGet ( ) [virtual]

Get Posterior density.

Get the current Posterior density

Returns:
a pointer to the current posterior

Reimplemented in MixtureParticleFilter< StateVar, MeasVar >, ParticleFilter< StateVar, MeasVar >, ParticleFilter< ColumnVector, ColumnVector >, HistogramFilter< MeasVar >, and KalmanFilter.

Definition at line 127 of file filter.h.

int TimeStepGet ( ) const

Get current time.

Get the current time of the filter

Returns:
the current timestep

Definition at line 50 of file filter.h.

bool Update ( SystemModel< SVar > *const  sysmodel,
const SVar &  u,
MeasurementModel< MVar, SVar > *const  measmodel,
const MVar &  z,
const SVar &  s 
) [virtual]

Full Update (system with inputs/sensing params)

Parameters:
sysmodelpointer to the system model to use for update
uinput to the system
measmodelpointer to the measurement model to use for update
zmeasurement
s"sensing parameter"

Definition at line 56 of file filter.h.

bool Update ( SystemModel< SVar > *const  sysmodel,
MeasurementModel< MVar, SVar > *const  measmodel,
const MVar &  z,
const SVar &  s 
) [virtual]

Full Update (system without inputs, with sensing params)

Parameters:
sysmodelpointer to the system model to use for update
measmodelpointer to the measurement model to use for update
zmeasurement
s"sensing parameter"

Definition at line 66 of file filter.h.

bool Update ( SystemModel< SVar > *const  sysmodel,
MeasurementModel< MVar, SVar > *const  measmodel,
const MVar &  z 
) [virtual]

Full Update (system without inputs/sensing params)

Parameters:
sysmodelpointer to the system model to use for update
measmodelpointer to the measurement model to use for update
zmeasurement

Definition at line 76 of file filter.h.

bool Update ( SystemModel< SVar > *const  sysmodel,
const SVar &  u,
MeasurementModel< MVar, SVar > *const  measmodel,
const MVar &  z 
) [virtual]

Full Update (system with inputs, without sensing params)

Parameters:
sysmodelpointer to the system model to use for update
uinput to the system
measmodelpointer to the measurement model to use for update
zmeasurement

Definition at line 85 of file filter.h.

bool Update ( SystemModel< SVar > *const  sysmodel,
const SVar &  u 
) [virtual]

System Update (system with inputs)

Parameters:
sysmodelpointer to the system model to use for update
uinput to the system

Definition at line 95 of file filter.h.

bool Update ( SystemModel< SVar > *const  sysmodel) [virtual]

System Update (system without inputs)

Parameters:
sysmodelpointer to the system model to use for update

Definition at line 103 of file filter.h.

bool Update ( MeasurementModel< MVar, SVar > *const  measmodel,
const MVar &  z,
const SVar &  s 
) [virtual]

Measurement Update (system with "sensing params")

Parameters:
measmodelpointer to the measurement model to use for update
zmeasurement
s"sensing parameter"

Definition at line 110 of file filter.h.

bool Update ( MeasurementModel< MVar, SVar > *const  measmodel,
const MVar &  z 
) [virtual]

Measurement Update (system without "sensing params")

Parameters:
measmodelpointer to the measurement model to use for update
zmeasurement

Definition at line 119 of file filter.h.

virtual bool UpdateInternal ( SystemModel< StateVar > *const  sysmodel,
const StateVar &  u,
MeasurementModel< MeasVar, StateVar > *const  measmodel,
const MeasVar &  z,
const StateVar &  s 
) [protected, pure virtual]

Actual implementation of Update, varies along filters.

Parameters:
sysmodelpointer to the used system model
uinput param for proposal density
measmodelpointer to the used measurementmodel
zmeasurement param for proposal density
ssensor param for proposal density

Implemented in ParticleFilter< StateVar, MeasVar >, KalmanFilter, MixtureParticleFilter< StateVar, MeasVar >, HistogramFilter< MeasVar >, ASIRFilter< StateVar, MeasVar >, BootstrapFilter< StateVar, MeasVar >, and MixtureBootstrapFilter< StateVar, MeasVar >.


Member Data Documentation

Pdf<StateVar>* _post [protected]

Pointer to the Posterior Pdf.

The Posterior Pdf represents the subjective belief of the person applying the filter AFTER processing inputs and measurements. A filter does not maintain the beliefs at all timesteps t, since this leads to non-constant (or ever growing if you prefer) memory requirements. However, it is possible, to copy the Posterior density at all timesteps in your application by means of the PostGet() member function

See also:
PostGet()

Definition at line 95 of file filter.h.

int _timestep [protected]

Represents the current timestep of the filter.

Todo:
Check wether this really belongs here

Definition at line 100 of file filter.h.


The documentation for this class was generated from the following files: