Bayesian Filtering Library Generated from SVN r
|
#include <nonminimalkalmanfilter.h>
Public Member Functions | |
NonminimalKalmanFilter (Gaussian *prior, unsigned int NrIterations, vector< NLSysModel * > minimalsysmodels, vector< NLMeasModel * > minimalmeasmodels, vector< GiNaC::symbol > nonlinearstate=*(new vector< GiNaC::symbol >)) | |
virtual | ~NonminimalKalmanFilter () |
Destructor. | |
virtual void | SysUpdate (SystemModel< ColumnVector > *const sysmodel, const ColumnVector &u) |
virtual void | MeasUpdate (MeasurementModel< ColumnVector, ColumnVector > *const measmodel, const ColumnVector &z, const ColumnVector &s) |
virtual Gaussian * | PostGet () |
Get Posterior density. | |
void | AllocateMeasModel (const vector< unsigned int > &meas_dimensions) |
Function to allocate memory needed during the measurement update,. | |
void | AllocateMeasModel (const unsigned int &meas_dimensions) |
Function to allocate memory needed during the measurement update. | |
virtual void | Reset (Pdf< MatrixWrapper::ColumnVector > *prior) |
Reset Filter. | |
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) | |
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) | |
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) | |
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) | |
virtual bool | Update (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, const MatrixWrapper::ColumnVector &u) |
System Update (system with inputs) | |
virtual bool | Update (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel) |
System Update (system without inputs) | |
virtual bool | Update (MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &s) |
Measurement Update (system with "sensing params") | |
virtual bool | Update (MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z) |
Measurement Update (system without "sensing params") | |
int | TimeStepGet () const |
Get current time. | |
Protected Member Functions | |
void | PostSigmaSet (const MatrixWrapper::SymmetricMatrix &s) |
Set covariance of posterior estimate. | |
void | PostMuSet (const MatrixWrapper::ColumnVector &c) |
Set expected value of posterior estimate. | |
void | CalculateSysUpdate (const MatrixWrapper::ColumnVector &J, const MatrixWrapper::Matrix &F, const MatrixWrapper::SymmetricMatrix &Q) |
void | CalculateMeasUpdate (const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &Z, const MatrixWrapper::Matrix &H, const MatrixWrapper::SymmetricMatrix &R) |
virtual void | SysUpdate (SystemModel< MatrixWrapper::ColumnVector > *const sysmodel, const MatrixWrapper::ColumnVector &u)=0 |
System Update. | |
virtual void | MeasUpdate (MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const measmodel, const MatrixWrapper::ColumnVector &z, const MatrixWrapper::ColumnVector &s)=0 |
Measurement Update (overloaded) | |
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. | |
Protected Attributes | |
ColumnVector | _Mu_new |
SymmetricMatrix | _Sigma_new |
Matrix | _Sigma_temp |
Matrix | _Sigma_temp_par |
Matrix | _SMatrix |
Matrix | _K |
std::map< unsigned int, MeasUpdateVariables > | _mapMeasUpdateVariables |
std::map< unsigned int, MeasUpdateVariables > ::iterator | _mapMeasUpdateVariables_it |
Pdf < MatrixWrapper::ColumnVector > * | _prior |
prior Pdf | |
Pdf < MatrixWrapper::ColumnVector > * | _post |
Pointer to the Posterior Pdf. | |
int | _timestep |
Represents the current timestep of the filter. | |
Friends | |
class | NonminimalKalmanFilter |
This is a class implementing the Kalman Filter (KF) class for Non Minimal State Kalman Filters.
The System- and MeasurementUpdate equasions are not linear. Substituting the state by a non-minimal state will make the System- and MeasurementUpdate linear in the non-minimal state
Definition at line 47 of file nonminimalkalmanfilter.h.
NonminimalKalmanFilter | ( | Gaussian * | prior, |
unsigned int | NrIterations, | ||
vector< NLSysModel * > | minimalsysmodels, | ||
vector< NLMeasModel * > | minimalmeasmodels, | ||
vector< GiNaC::symbol > | nonlinearstate = *(new vector< GiNaC::symbol >) |
||
) |
Constructor
prior | pointer to the Gaussian prior density |
NrIterations | Number of iterations that will be used (this class uses 2 IEKF: one for the minimal state and one for the nonminimal state) |
minimalsysmodels | vector of measurement models that can be used for measurement updates |
minimalmeasmodels | vector of system models that can be used for system updates |
nonlinearstate | symbols of state in wich the filter should be linearised |
void CalculateMeasUpdate | ( | const MatrixWrapper::ColumnVector & | z, |
const MatrixWrapper::ColumnVector & | Z, | ||
const MatrixWrapper::Matrix & | H, | ||
const MatrixWrapper::SymmetricMatrix & | R | ||
) | [protected, inherited] |
Calculate Kalman filter Measurement Update
with
void CalculateSysUpdate | ( | const MatrixWrapper::ColumnVector & | J, |
const MatrixWrapper::Matrix & | F, | ||
const MatrixWrapper::SymmetricMatrix & | Q | ||
) | [protected, inherited] |
Calculate Kalman filter System Update
virtual void MeasUpdate | ( | MeasurementModel< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector > *const | measmodel, |
const MatrixWrapper::ColumnVector & | z, | ||
const MatrixWrapper::ColumnVector & | s | ||
) | [protected, pure virtual, inherited] |
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 ExtendedKalmanFilter, IteratedExtendedKalmanFilter, and SRIteratedExtendedKalmanFilter.
virtual Gaussian* PostGet | ( | ) | [virtual, inherited] |
Get Posterior density.
Get the current Posterior density
Reimplemented from Filter< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector >.
virtual void SysUpdate | ( | SystemModel< MatrixWrapper::ColumnVector > *const | sysmodel, |
const MatrixWrapper::ColumnVector & | u | ||
) | [protected, pure virtual, inherited] |
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 ExtendedKalmanFilter, IteratedExtendedKalmanFilter, and SRIteratedExtendedKalmanFilter.
int TimeStepGet | ( | ) | const [inherited] |
Get current time.
Get the current time of the filter
virtual bool Update | ( | SystemModel< MatrixWrapper::ColumnVector > *const | sysmodel | ) | [virtual, inherited] |
System Update (system without inputs)
sysmodel | pointer to the system model to use for update |
virtual bool Update | ( | SystemModel< MatrixWrapper::ColumnVector > *const | sysmodel, |
const MatrixWrapper::ColumnVector & | u | ||
) | [virtual, inherited] |
System Update (system with inputs)
sysmodel | pointer to the system model to use for update |
u | input to the system |
virtual bool Update | ( | MeasurementModel< MatrixWrapper::ColumnVector , MatrixWrapper::ColumnVector > *const | measmodel, |
const MatrixWrapper::ColumnVector & | z, | ||
const MatrixWrapper::ColumnVector & | s | ||
) | [virtual, inherited] |
Measurement Update (system with "sensing params")
measmodel | pointer to the measurement model to use for update |
z | measurement |
s | "sensing parameter" |
virtual bool Update | ( | SystemModel< MatrixWrapper::ColumnVector > *const | sysmodel, |
const MatrixWrapper::ColumnVector & | u, | ||
MeasurementModel< MatrixWrapper::ColumnVector , MatrixWrapper::ColumnVector > *const | measmodel, | ||
const MatrixWrapper::ColumnVector & | z | ||
) | [virtual, inherited] |
Full Update (system with inputs, without sensing params)
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 |
virtual bool Update | ( | SystemModel< MatrixWrapper::ColumnVector > *const | sysmodel, |
MeasurementModel< MatrixWrapper::ColumnVector , MatrixWrapper::ColumnVector > *const | measmodel, | ||
const MatrixWrapper::ColumnVector & | z, | ||
const MatrixWrapper::ColumnVector & | s | ||
) | [virtual, inherited] |
Full Update (system without inputs, with sensing params)
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" |
virtual bool Update | ( | SystemModel< MatrixWrapper::ColumnVector > *const | sysmodel, |
MeasurementModel< MatrixWrapper::ColumnVector , MatrixWrapper::ColumnVector > *const | measmodel, | ||
const MatrixWrapper::ColumnVector & | z | ||
) | [virtual, inherited] |
Full Update (system without inputs/sensing params)
sysmodel | pointer to the system model to use for update |
measmodel | pointer to the measurement model to use for update |
z | measurement |
virtual bool Update | ( | MeasurementModel< MatrixWrapper::ColumnVector , MatrixWrapper::ColumnVector > *const | measmodel, |
const MatrixWrapper::ColumnVector & | z | ||
) | [virtual, inherited] |
Measurement Update (system without "sensing params")
measmodel | pointer to the measurement model to use for update |
z | measurement |
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 | ||
) | [virtual, inherited] |
Full Update (system with inputs/sensing params)
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" |
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 | ||
) | [protected, virtual, inherited] |
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 Filter< MatrixWrapper::ColumnVector, MatrixWrapper::ColumnVector >.
friend class NonminimalKalmanFilter [friend, inherited] |
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.
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
int _timestep [protected, inherited] |