Class representing the family of all Kalman Filters (EKF, IEKF, ...) More...
#include <kalmanfilter.h>
Classes | |
struct | MeasUpdateVariables |
Public Member Functions | |
void | AllocateMeasModel (const vector< unsigned int > &meas_dimensions) |
Function to allocate memory needed during the measurement update,. More... | |
void | AllocateMeasModel (const unsigned int &meas_dimensions) |
Function to allocate memory needed during the measurement update. More... | |
KalmanFilter (Gaussian *prior) | |
Constructor. More... | |
virtual Gaussian * | PostGet () |
Get Posterior density. More... | |
virtual | ~KalmanFilter () |
Destructor. More... | |
![]() | |
Filter (Pdf< MatrixWrapper::ColumnVector > *prior) | |
Constructor. More... | |
Filter (const Filter< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > &filt) | |
copy constructor More... | |
virtual void | Reset (Pdf< MatrixWrapper::ColumnVector > *prior) |
Reset Filter. More... | |
int | TimeStepGet () const |
Get current time. More... | |
virtual bool | Update (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, const MatrixWrapper::ColumnVector &u, MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &s) |
Full Update (system with inputs/sensing params) More... | |
virtual bool | Update (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &s) |
Full Update (system without inputs, with sensing params) More... | |
virtual bool | Update (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z) |
Full Update (system without inputs/sensing params) More... | |
virtual bool | Update (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, const MatrixWrapper::ColumnVector &u, MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z) |
Full Update (system with inputs, without sensing params) More... | |
virtual bool | Update (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, const MatrixWrapper::ColumnVector &u) |
System Update (system with inputs) More... | |
virtual bool | Update (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel) |
System Update (system without inputs) More... | |
virtual bool | Update (MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &s) |
Measurement Update (system with "sensing params") More... | |
virtual bool | Update (MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z) |
Measurement Update (system without "sensing params") More... | |
virtual | ~Filter () |
destructor More... | |
Protected Member Functions | |
void | CalculateMeasUpdate (const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &Z, const MatrixWrapper::Matrix &H, const MatrixWrapper::SymmetricMatrix &R) |
void | CalculateSysUpdate (const MatrixWrapper::ColumnVector &J, const MatrixWrapper::Matrix &F, const MatrixWrapper::SymmetricMatrix &Q) |
virtual void | MeasUpdate (MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &s)=0 |
Measurement Update (overloaded) More... | |
void | PostMuSet (const MatrixWrapper::ColumnVector &c) |
Set expected value of posterior estimate. More... | |
void | PostSigmaSet (const MatrixWrapper::SymmetricMatrix &s) |
Set covariance of posterior estimate. More... | |
virtual void | SysUpdate (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, const MatrixWrapper::ColumnVector &u)=0 |
System Update. More... | |
virtual bool | UpdateInternal (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, const MatrixWrapper::ColumnVector &u, MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &s) |
Actual implementation of Update, varies along filters. More... | |
Protected Attributes | |
Matrix | _K |
std::map< unsigned int, MeasUpdateVariables > | _mapMeasUpdateVariables |
std::map< unsigned int, MeasUpdateVariables >::iterator | _mapMeasUpdateVariables_it |
ColumnVector | _Mu_new |
SymmetricMatrix | _Sigma_new |
Matrix | _Sigma_temp |
Matrix | _Sigma_temp_par |
Matrix | _SMatrix |
![]() | |
Pdf< MatrixWrapper::ColumnVector > * | _post |
Pointer to the Posterior Pdf. More... | |
Pdf< MatrixWrapper::ColumnVector > * | _prior |
prior Pdf More... | |
int | _timestep |
Represents the current timestep of the filter. More... | |
Friends | |
class | NonminimalKalmanFilter |
Class representing the family of all Kalman Filters (EKF, IEKF, ...)
This is a class representing the family of all Kalman Filter (KF). Kalman filters are filters in which the Posterior density is represented by a Gaussian density. Kalman filters are only applicable to continuous systems.
The system of updating the Posterior density is implemented in this base class. However, the parameters used for this update differ for different KFs (Simple KF,EKF,IEKF): that's why the xUpdate members are still pure virtual functions.
This class is the base class for all sorts of KFs.
Definition at line 49 of file kalmanfilter.h.
BFL::KalmanFilter::KalmanFilter | ( | Gaussian * | prior | ) |
|
virtual |
Destructor.
Definition at line 39 of file kalmanfilter.cpp.
void BFL::KalmanFilter::AllocateMeasModel | ( | const vector< unsigned int > & | meas_dimensions | ) |
Function to allocate memory needed during the measurement update,.
Definition at line 45 of file kalmanfilter.cpp.
void BFL::KalmanFilter::AllocateMeasModel | ( | const unsigned int & | meas_dimensions | ) |
Function to allocate memory needed during the measurement update.
Definition at line 63 of file kalmanfilter.cpp.
|
protected |
|
protected |
|
protectedpure virtual |
Measurement Update (overloaded)
Update the filter's Posterior density using the sensor measurements, an input and the measurement model. This method is used when the measurements depend on the inputs too (doesn't happen very often, does it?) BEWARE: the first time the measurment update is called with a new size of measurement, new allocations are done
measmodel | pointer to the measurement model the filter should use |
z | sensor measurement |
s | input to the system (must be of the same type as u for now, since this was not yet implemented in ConditionalPdf |
Implemented in BFL::ExtendedKalmanFilter, BFL::SRIteratedExtendedKalmanFilter, and BFL::IteratedExtendedKalmanFilter.
|
virtual |
Get Posterior density.
Get the current Posterior density
Reimplemented from BFL::Filter< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector >.
Definition at line 160 of file kalmanfilter.cpp.
|
protected |
Set expected value of posterior estimate.
Definition at line 153 of file kalmanfilter.cpp.
|
protected |
Set covariance of posterior estimate.
Definition at line 147 of file kalmanfilter.cpp.
|
protectedpure virtual |
System Update.
Update the filter's Posterior density using the deterministic inputs to the system and the system model
sysmodel | pointer to the system model the filter should use |
u | input to the system |
Implemented in BFL::ExtendedKalmanFilter, BFL::SRIteratedExtendedKalmanFilter, and BFL::IteratedExtendedKalmanFilter.
|
protectedvirtual |
Actual implementation of Update, varies along filters.
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 |
Implements BFL::Filter< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector >.
Definition at line 130 of file kalmanfilter.cpp.
|
friend |
Very dirty hack to avoid ugly methods PostSigmaSet and PostMuSet to be public! NonMinimalKalmanFilter should be redesigned though!
Definition at line 110 of file kalmanfilter.h.
|
protected |
Definition at line 101 of file kalmanfilter.h.
|
protected |
Definition at line 102 of file kalmanfilter.h.
|
protected |
Definition at line 103 of file kalmanfilter.h.
|
protected |
Definition at line 96 of file kalmanfilter.h.
|
protected |
Definition at line 97 of file kalmanfilter.h.
|
protected |
Definition at line 98 of file kalmanfilter.h.
|
protected |
Definition at line 99 of file kalmanfilter.h.
|
protected |
Definition at line 100 of file kalmanfilter.h.