Filter Class Template Reference

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

#include <filter.h>

Inheritance diagram for Filter:

ParticleFilter ParticleFilter< ColumnVector, ColumnVector > ASIRFilter BootstrapFilter Optimalimportancefilter 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  )  [inline]

Constructor.

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

Definition at line 247 of file filter.h.

Filter ( const Filter< SVar, MVar > &  filt  )  [inline]

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 258 of file filter.h.


Member Function Documentation

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:
sysmodel pointer to the used system model
u input param for proposal density
measmodel pointer to the used measurementmodel
z measurement param for proposal density
s sensor param for proposal density

Implemented in HistogramFilter, KalmanFilter, and ParticleFilter.

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

Full Update (system with inputs/sensing params).

Parameters:
sysmodel pointer to the system model to use for update
u input to the system
measmodel pointer to the measurement model to use for update
z measurement
s "sensing parameter"

Definition at line 276 of file filter.h.

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

Full Update (system without inputs, with sensing params).

Parameters:
sysmodel pointer to the system model to use for update
measmodel pointer to the measurement model to use for update
z measurement
s "sensing parameter"

Definition at line 286 of file filter.h.

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

Full Update (system without inputs/sensing params).

Parameters:
sysmodel pointer to the system model to use for update
measmodel pointer to the measurement model to use for update
z measurement

Definition at line 296 of file filter.h.

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

Full Update (system with inputs, without sensing params).

Parameters:
sysmodel pointer to the system model to use for update
u input to the system
measmodel pointer to the measurement model to use for update
z measurement

Definition at line 305 of file filter.h.

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

System Update (system with inputs).

Parameters:
sysmodel pointer to the system model to use for update
u input to the system

Definition at line 315 of file filter.h.

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

System Update (system without inputs).

Parameters:
sysmodel pointer to the system model to use for update

Definition at line 323 of file filter.h.

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

Measurement Update (system with "sensing params").

Parameters:
measmodel pointer to the measurement model to use for update
z measurement
s "sensing parameter"

Definition at line 330 of file filter.h.

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

Measurement Update (system without "sensing params").

Parameters:
measmodel pointer to the measurement model to use for update
z measurement

Definition at line 339 of file filter.h.

Pdf< SVar > * PostGet (  )  [inline, virtual]

Get Posterior density.

Get the current Posterior density

Returns:
a pointer to the current posterior

Reimplemented in HistogramFilter, KalmanFilter, ParticleFilter, and ParticleFilter< ColumnVector, ColumnVector >.

Definition at line 347 of file filter.h.

int TimeStepGet (  )  const [inline]

Get current time.

Get the current time of the filter

Returns:
the current timestep

Definition at line 270 of file filter.h.


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 file:

Generated on Mon Mar 30 05:43:59 2009 for Bayesian Filtering Library by  doxygen 1.5.5