Kalman::KFilter< T, BEG, OQ, OVR, DBG > Class Template Reference

Generic Linear Kalman Filter template base class. More...

#include <kfilter.hpp>

Inheritance diagram for Kalman::KFilter< T, BEG, OQ, OVR, DBG >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~KFilter ()=0
 Virtual destructor.

Protected Member Functions

virtual void makeB ()
 Virtual creator of B.
virtual void makeBaseB ()
 Virtual pre-creator of B.

Protected Attributes

Matrix B
 Input matrix.

Private Member Functions

virtual void makeMeasure ()
 Measurement function overridden to be linear.
virtual void makeProcess ()
 Process function overridden to be linear.
virtual void sizeUpdate ()
 Matrix and vector resizing function, overridden to take B into account.

Private Attributes

Vector x__
 Temporary vector.

Detailed Description

template<typename T, K_UINT_32 BEG, bool OQ = false, bool OVR = false, bool DBG = true>
class Kalman::KFilter< T, BEG, OQ, OVR, DBG >

Generic Linear Kalman Filter template base class.

Usage
This class is derived from EKFilter. You should really read all the documentation of EKFilter before reading this.
This class implements a Variable-Dimension Linear Kalman Filter based on the EKFilter template class.
Notation
Assume a state vector $ x $ (to estimate) and a linear process function $ f $ (to model) that describes the evolution of this state through time, that is :

\[ x_k = f \left( x_{k-1}, u_{k-1}, w_{k-1} \right) = //! A x_{k-1} + B u_{k-1} + W w_{k-1} \]

where $ u $ is the (known) input vector fed to the process and $ w $ is the (unknown) process noise vector due to uncertainty and process modeling errors. Further suppose that the (known) process noise covariance matrix is :

\[ Q = E \left( w w^T \right) \]

Now, let's assume a (known) measurement vector $ z $, which depends on the current state $ x $ in the form of a linear function $ h $ (to model) :

\[ z_k = h \left( x_k, v_k \right) = //! H x_k + V v_k \]

where $ v $ is the (unknown) measurement noise vector with a (known) covariance matrix :

\[ R = E \left( v v^T \right) \]

Suppose that we have an estimate of the previous state $ \hat{x}_{k-1} $, called a corrected state or an a posteriori state estimate. We can build a predicted state (also called an a priori state estimate) by using $ f $ :

\[ \tilde{x}_k = f \left( \hat{x}_{k-1}, u_{k-1}, 0 \right) = //! A \hat{x}_{k-1} + B u_{k-1} \]

since the input is known and the process noise, unknown. With this predicted state, we can get a predicted measurement vector by using $ h $ :

\[ \tilde{z}_k = h \left( \tilde{x}_k, 0 \right) = //! H \tilde{x}_k \]

since the measurement noise is unknown.
Note:
In this class, makeProcess() and makeMeasure() have already been overridden, and cannot be ovverridden again. However, there is a new matrix to create : B. This means there are two new virtual functions that can be overridden : makeBaseB() and makeB().
See also:
EKFilter

Definition at line 82 of file kfilter.hpp.


Constructor & Destructor Documentation

template<typename T , K_UINT_32 BEG, bool OQ, bool OVR, bool DBG>
Kalman::KFilter< T, BEG, OQ, OVR, DBG >::~KFilter (  )  [inline, pure virtual]

Virtual destructor.

Definition at line 36 of file kfilter_impl.hpp.


Member Function Documentation

template<typename T , K_UINT_32 BEG, bool OQ, bool OVR, bool DBG>
void Kalman::KFilter< T, BEG, OQ, OVR, DBG >::makeB (  )  [inline, protected, virtual]

Virtual creator of B.

Definition at line 42 of file kfilter_impl.hpp.

template<typename T , K_UINT_32 BEG, bool OQ, bool OVR, bool DBG>
void Kalman::KFilter< T, BEG, OQ, OVR, DBG >::makeBaseB (  )  [inline, protected, virtual]

Virtual pre-creator of B.

Definition at line 39 of file kfilter_impl.hpp.

template<typename T , K_UINT_32 BEG, bool OQ, bool OVR, bool DBG>
void Kalman::KFilter< T, BEG, OQ, OVR, DBG >::makeMeasure (  )  [inline, private, virtual]

Measurement function overridden to be linear.

Implements Kalman::EKFilter< T, BEG, OQ, OVR, DBG >.

Definition at line 70 of file kfilter_impl.hpp.

template<typename T , K_UINT_32 BEG, bool OQ, bool OVR, bool DBG>
void Kalman::KFilter< T, BEG, OQ, OVR, DBG >::makeProcess (  )  [inline, private, virtual]

Process function overridden to be linear.

Implements Kalman::EKFilter< T, BEG, OQ, OVR, DBG >.

Definition at line 45 of file kfilter_impl.hpp.

template<typename T , K_UINT_32 BEG, bool OQ, bool OVR, bool DBG>
void Kalman::KFilter< T, BEG, OQ, OVR, DBG >::sizeUpdate (  )  [inline, private, virtual]

Matrix and vector resizing function, overridden to take B into account.

Reimplemented from Kalman::EKFilter< T, BEG, OQ, OVR, DBG >.

Definition at line 88 of file kfilter_impl.hpp.


Member Data Documentation

template<typename T , K_UINT_32 BEG, bool OQ = false, bool OVR = false, bool DBG = true>
Matrix Kalman::KFilter< T, BEG, OQ, OVR, DBG >::B [protected]

Input matrix.

Definition at line 49 of file kfilter.hpp.

template<typename T , K_UINT_32 BEG, bool OQ = false, bool OVR = false, bool DBG = true>
Vector Kalman::KFilter< T, BEG, OQ, OVR, DBG >::x__ [private]

Temporary vector.

Definition at line 63 of file kfilter.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Defines


kfilter
Author(s): Vincent Zalzal, Sylvain Marleau, Richard Gourdeau
autogenerated on Wed Jul 23 04:33:42 2014