Basic Image AlgorithmS Library 2.8.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

BIAS::Kalman Class Reference

Classical Kalman filter. More...

#include <StateEstimator/Kalman.hh>

Inheritance diagram for BIAS::Kalman:
Collaboration diagram for BIAS::Kalman:

List of all members.

Public Member Functions

void AddDebugLevel (const long int lv)
void AddDebugLevel (const std::string &name)
bool DebugLevelIsSet (const long int lv) const
bool DebugLevelIsSet (const std::string &name) const
void GetCovariance (Matrix< double > &cov) const
 Returns the system state covariance.
int GetDebugLevel () const
std::ostream & GetDebugStream () const
void GetDebugStream (std::ostream &os) const
void GetState (Vector< double > &state) const
 Returns the system state.
void Init (const Matrix< double > &SystemMatrix, const Matrix< double > &MeasurementMatrix, const Vector< double > &InitialSystemState, const Matrix< double > &InitialSystemCovariance)
 Kalman (const Matrix< double > &SystemMatrix, const Matrix< double > &MeasurementMatrix, const Vector< double > &InitialSystemState, const Matrix< double > &InitialSystemCovariance)
 Kalman ()
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel
void Predict (const Matrix< double > &ProcessCovariance)
 Calculates the prediction using the system matrix A.
void Predict (const Matrix< double > &SystemMatrix, const Matrix< double > &ProcessCovariance)
 Use this prediction function system in case of varying system matrix A.
void PrintDebugLevel (std::ostream &os=std::cout) const
void RemoveDebugLevel (const std::string &name)
void RemoveDebugLevel (const long int lv)
void SetDebugLevel (const std::string &name)
void SetDebugLevel (const long int lv)
void SetDebugStream (const std::ostream &os)
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels
void Update (const Vector< double > &Measurement, const Matrix< double > &MeasurementCovariance)
 Calculates the update step.
 ~Kalman ()

Static Public Member Functions

static long int GetGlobalDebugLevel ()
static void SetGlobalDebugLevel (long int lev)

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel

Protected Attributes

long int _liDebugLevel
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class
std::map< std::string, long int > _String2Debuglevel
Matrix< double > A_
 measurement matrix and transposed
Matrix< double > AT_
Matrix< double > Covariance_
 The covariance matrix corresponding to State_.
Matrix< double > H_
 measurement matrix and transposed
Matrix< double > HT_
Matrix< double > Identity_
 identity matrix
int MeasurementDim_
Vector< double > State_
 Contains either the prediction (prior) or Bayes optimal system estimate (posterior) depending what function (Predict()/Update()) wascalled last.
SVD svd_
 needed for matrix inversion
int SystemStateDim_
 dimensions of system space and measurement space

Static Protected Attributes

static std::ostream _zDebugStream
static long int GlobalDebugLevel = 0

Detailed Description

Classical Kalman filter.

See http://www.cs.unc.edu/~welch/kalman/ for details.

Initialize it by either

Use it by consecutively call

Extract the prediction (prior) by calling GetState() and GetCovariance() after the Predict() step.

Extract the estimated system state by calling GetState() and GetCovariance() after the Update() step.

Author:
Felix Woelk 05/2005, untested so far
Examples:

ExampleKalman.cpp.

Definition at line 54 of file Kalman.hh.


Constructor & Destructor Documentation

Kalman::Kalman ( )

Definition at line 10 of file Kalman.cpp.

Kalman::Kalman ( const Matrix< double > &  SystemMatrix,
const Matrix< double > &  MeasurementMatrix,
const Vector< double > &  InitialSystemState,
const Matrix< double > &  InitialSystemCovariance 
)

Definition at line 15 of file Kalman.cpp.

Kalman::~Kalman ( )

Definition at line 24 of file Kalman.cpp.


Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv) [inline, inherited]
void BIAS::Debug::AddDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 363 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( ) [inline, protected, inherited]

returns the next available debuglevel

Author:
woelk 09/2006

Definition at line 522 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const [inline, inherited]

Definition at line 351 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const [inline, inherited]
void BIAS::Kalman::GetCovariance ( Matrix< double > &  cov) const [inline]

Returns the system state covariance.

It could be the covariance of the prediction, if called after the predict step or the covariance of the posterior, if GetState is called after the update step.

Author:
woelk 05/2005
Examples:
ExampleKalman.cpp.

Definition at line 96 of file Kalman.hh.

int BIAS::Debug::GetDebugLevel ( ) const [inline, inherited]
std::ostream& BIAS::Debug::GetDebugStream ( ) const [inline, inherited]

Definition at line 406 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const [inline, inherited]

Definition at line 415 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( ) [inline, static, inherited]

Definition at line 432 of file Debug.hh.

void BIAS::Kalman::GetState ( Vector< double > &  state) const [inline]

Returns the system state.

It could be the prediction, if called after the predict step or the posterior, if GetState is called after the update step.

Author:
woelk 05/2005
Examples:
ExampleKalman.cpp.

Definition at line 89 of file Kalman.hh.

void Kalman::Init ( const Matrix< double > &  SystemMatrix,
const Matrix< double > &  MeasurementMatrix,
const Vector< double > &  InitialSystemState,
const Matrix< double > &  InitialSystemCovariance 
)
long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const [inline, inherited]

looks up a debuglevel in the internal map, returns 0 if not found

Author:
woelk 09/2006

Definition at line 455 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name) [inline, inherited]
void Kalman::Predict ( const Matrix< double > &  ProcessCovariance)

Calculates the prediction using the system matrix A.

Author:
woelk 05/2005
Examples:
ExampleKalman.cpp.

Definition at line 51 of file Kalman.cpp.

void Kalman::Predict ( const Matrix< double > &  SystemMatrix,
const Matrix< double > &  ProcessCovariance 
)

Use this prediction function system in case of varying system matrix A.

Author:
woelk 05/2005

Definition at line 59 of file Kalman.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

Definition at line 384 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 377 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv) [inline, inherited]

Definition at line 370 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const std::string &  name) [inline, inherited]

Definition at line 326 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv) [inline, inherited]
void BIAS::Debug::SetDebugStream ( const std::ostream &  os) [inline, inherited]

Definition at line 399 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev) [inline, static, inherited]

Definition at line 425 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const [inline, inherited]

prints all internally known debuglevels

Author:
woelk 09/2006

Definition at line 497 of file Debug.hh.

void Kalman::Update ( const Vector< double > &  Measurement,
const Matrix< double > &  MeasurementCovariance 
)

Calculates the update step.

Author:
woelk 05/2005
Examples:
ExampleKalman.cpp.

Definition at line 72 of file Kalman.cpp.

References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().


Member Data Documentation

long int BIAS::Debug::_liDebugLevel [protected, inherited]

Definition at line 511 of file Debug.hh.

Referenced by BIAS::ImageBase::operator=(), and BIAS::Debug::operator=().

long int BIAS::Debug::_liNextDebugLevel [protected, inherited]

new concept, debuglevel are managed here in the debug class

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel [protected, inherited]

Definition at line 518 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream [static, protected, inherited]

Definition at line 512 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

Matrix<double> BIAS::Kalman::A_ [protected]

measurement matrix and transposed

Definition at line 110 of file Kalman.hh.

Matrix<double> BIAS::Kalman::AT_ [protected]

Definition at line 110 of file Kalman.hh.

Matrix<double> BIAS::Kalman::Covariance_ [protected]

The covariance matrix corresponding to State_.

Definition at line 104 of file Kalman.hh.

long int BIAS::Debug::GlobalDebugLevel = 0 [static, protected, inherited]

Definition at line 514 of file Debug.hh.

Matrix<double> BIAS::Kalman::H_ [protected]

measurement matrix and transposed

Definition at line 107 of file Kalman.hh.

Matrix<double> BIAS::Kalman::HT_ [protected]

Definition at line 107 of file Kalman.hh.

Matrix<double> BIAS::Kalman::Identity_ [protected]

identity matrix

Definition at line 113 of file Kalman.hh.

Definition at line 116 of file Kalman.hh.

Vector<double> BIAS::Kalman::State_ [protected]

Contains either the prediction (prior) or Bayes optimal system estimate (posterior) depending what function (Predict()/Update()) wascalled last.

Definition at line 102 of file Kalman.hh.

SVD BIAS::Kalman::svd_ [protected]

needed for matrix inversion

Definition at line 119 of file Kalman.hh.

dimensions of system space and measurement space

Definition at line 116 of file Kalman.hh.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends