KalmanFilter Class Reference

#include <kalman_filter.h>

List of all members.


Detailed Description

Definition at line 38 of file kalman_filter.h.


Public Member Functions

 KalmanFilter (unsigned int ns, unsigned int nm, unsigned int nc, const vnl_matrix< double > &Ai, const vnl_matrix< double > &Hi, const vnl_matrix< double > &Bi, const vnl_matrix< double > &z_initial, const vnl_matrix< double > &x_initial, const vnl_matrix< double > &Pi)
 Constructor.
 KalmanFilter (unsigned int ns, unsigned int nm, const vnl_matrix< double > &Ai, const vnl_matrix< double > &Hi, const vnl_matrix< double > &z_initial, const vnl_matrix< double > &x_initial, const vnl_matrix< double > &Pi)
 Constructor.
void set_initial_input (const vnl_matrix< double > &x_initial)
void measurement_update (const vnl_matrix< double > &zk, const vnl_matrix< double > &Rk)
 measurement_update.
vnl_matrix< double > predict (const vnl_matrix< double > &Qk)
 predict.
vnl_matrix< double > predict (const vnl_matrix< double > &Qk, const vnl_matrix< double > &uk)
 predict.
vnl_matrix< double > update_predict (const vnl_matrix< double > &zk, const vnl_matrix< double > &Rk, const vnl_matrix< double > &Qk)
 update_predict.
vnl_matrix< double > estimate ()
vnl_matrix< double > prediction ()

Private Attributes

unsigned int num_signal_dimensions
unsigned int num_measurement_dimensions
unsigned int num_control_dimensions
vnl_matrix< double > A
vnl_matrix< double > H
vnl_matrix< double > B
vnl_matrix< double > x
vnl_matrix< double > x_pred
vnl_matrix< double > z
vnl_matrix< double > P
vnl_matrix< double > K

Friends

vcl_ostream & operator<< (vcl_ostream &os, const KalmanFilter &kf)
 output operator.

Constructor & Destructor Documentation

KalmanFilter::KalmanFilter ( unsigned int  ns,
unsigned int  nm,
unsigned int  nc,
const vnl_matrix< double > &  Ai,
const vnl_matrix< double > &  Hi,
const vnl_matrix< double > &  Bi,
const vnl_matrix< double > &  z_initial,
const vnl_matrix< double > &  x_initial,
const vnl_matrix< double > &  Pi 
)

Constructor.

Initialises the necessary parameters and matrices

Parameters:
ns number of dimensions in signal
nm number of dimensions in measurement
nc number of dimensions in control input
A the ns*ns matrix relating signal at time k to signal at time k+1.
H the nm*ns matrix relating the measurement to the signal.
B the nc*ns matrix relating the signal to the control input. I'm not sure what this is used for, but I've included it for completeness.
x_initial the initial ns*1 estimate of the signal.
p_initial the initial error variance vector. P = p_initial.transpose()*p_initial.
under development
Author:
Brendan McCane

Definition at line 54 of file kalman_filter.cxx.

KalmanFilter::KalmanFilter ( unsigned int  ns,
unsigned int  nm,
const vnl_matrix< double > &  Ai,
const vnl_matrix< double > &  Hi,
const vnl_matrix< double > &  z_initial,
const vnl_matrix< double > &  x_initial,
const vnl_matrix< double > &  Pi 
)

Constructor.

Initialises the necessary parameters and matrices

Parameters:
ns number of dimensions in signal
nm number of dimensions in measurement
A the ns*ns matrix relating signal at time k to signal at time k+1.
H the nm*ns matrix relating the measurement to the signal.
x_initial the initial ns*1 estimate of the signal.
p_initial the initial error variance vector. P = p_initial.transpose()*p_initial.
under development
Author:
Brendan McCane

Definition at line 131 of file kalman_filter.cxx.


Member Function Documentation

void KalmanFilter::set_initial_input ( const vnl_matrix< double > &  x_initial  )  [inline]

Definition at line 91 of file kalman_filter.h.

void KalmanFilter::measurement_update ( const vnl_matrix< double > &  zk,
const vnl_matrix< double > &  Rk 
)

measurement_update.

Calculate the Kalman gain, update the signal estimate from the last time point using the previous estimate and the new measurement, and update the error covariance matrix.

Parameters:
zk the new measurement
Rk the measurement error covariance matrix
under development
Author:
Brendan McCane

Definition at line 192 of file kalman_filter.cxx.

vnl_matrix< double > KalmanFilter::predict ( const vnl_matrix< double > &  Qk  ) 

predict.

Calculate the next state given the current estimate and project the error covariance matrix ahead in time as well. In this case, I am assuming there is no control input.

Parameters:
Qk the process error covariance matrix
under development
Author:
Brendan McCane

Definition at line 248 of file kalman_filter.cxx.

vnl_matrix< double > KalmanFilter::predict ( const vnl_matrix< double > &  Qk,
const vnl_matrix< double > &  uk 
)

predict.

Calculate the next state given the current estimate and project the error covariance matrix ahead in time as well.

Parameters:
Qk the process error covariance matrix
uk the control input
under development
Author:
Brendan McCane

Definition at line 281 of file kalman_filter.cxx.

vnl_matrix< double > KalmanFilter::update_predict ( const vnl_matrix< double > &  zk,
const vnl_matrix< double > &  Rk,
const vnl_matrix< double > &  Qk 
)

update_predict.

A wrapper function to both update the measurement and predict the new state.

Parameters:
zk the new measurement
Rk the measurement error covariance matrix
Qk the process error covariance matrix
under development
Author:
Brendan McCane

Definition at line 324 of file kalman_filter.cxx.

vnl_matrix<double> KalmanFilter::estimate (  )  [inline]

Definition at line 119 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::prediction (  )  [inline]

Definition at line 121 of file kalman_filter.h.


Friends And Related Function Documentation

vcl_ostream& operator<< ( vcl_ostream &  os,
const KalmanFilter kf 
) [friend]

output operator.

Parameters:
kf the Kalman filter to output
under development
Author:
Brendan McCane

Definition at line 342 of file kalman_filter.cxx.


Member Data Documentation

unsigned int KalmanFilter::num_signal_dimensions [private]

Definition at line 41 of file kalman_filter.h.

unsigned int KalmanFilter::num_measurement_dimensions [private]

Definition at line 44 of file kalman_filter.h.

unsigned int KalmanFilter::num_control_dimensions [private]

Definition at line 47 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::A [private]

Definition at line 50 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::H [private]

Definition at line 53 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::B [private]

Definition at line 56 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::x [private]

Definition at line 59 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::x_pred [private]

Definition at line 62 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::z [private]

Definition at line 65 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::P [private]

Definition at line 68 of file kalman_filter.h.

vnl_matrix<double> KalmanFilter::K [private]

Definition at line 71 of file kalman_filter.h.


The documentation for this class was generated from the following files:
Generated on Tue Dec 2 05:25:22 2008 for contrib/oul/ouel by  doxygen 1.5.1