Go to the documentation of this file.
22 #ifndef KALMANFILTERBASEHPP
23 #define KALMANFILTERBASEHPP
25 #include <state-observation/api.h>
102 virtual void setA(
const Amatrix & A);
104 virtual Matrix getA()
const;
107 virtual void clearA();
110 virtual void setC(
const Cmatrix & C);
112 virtual Matrix getC()
const;
115 virtual void clearC();
118 virtual void setR(
const Rmatrix & R);
125 virtual Matrix getR()
const;
132 virtual void clearR();
135 virtual void setQ(
const Qmatrix & Q);
142 virtual Matrix getQ()
const;
149 virtual void clearQ();
152 virtual void setStateCovariance(
const Pmatrix & P);
156 virtual void clearStates();
160 virtual void clearStateCovariance();
163 virtual Pmatrix getStateCovariance()
const;
166 virtual void reset();
169 Amatrix getAmatrixConstant(
double c)
const;
172 Amatrix getAmatrixRandom()
const;
175 Amatrix getAmatrixZero()
const;
178 Amatrix getAmatrixIdentity()
const;
181 bool checkAmatrix(
const Amatrix &)
const;
184 Cmatrix getCmatrixConstant(
double c)
const;
187 Cmatrix getCmatrixRandom()
const;
190 Cmatrix getCmatrixZero()
const;
193 bool checkCmatrix(
const Cmatrix &)
const;
196 Qmatrix getQmatrixConstant(
double c)
const;
199 Qmatrix getQmatrixRandom()
const;
202 Qmatrix getQmatrixZero()
const;
205 Qmatrix getQmatrixIdentity()
const;
208 bool checkQmatrix(
const Qmatrix &)
const;
211 Rmatrix getRmatrixConstant(
double c)
const;
214 Rmatrix getRmatrixRandom()
const;
217 Rmatrix getRmatrixZero()
const;
220 Rmatrix getRmatrixIdentity()
const;
223 bool checkRmatrix(
const Rmatrix &)
const;
226 Pmatrix getPmatrixConstant(
double c)
const;
229 Pmatrix getPmatrixRandom()
const;
232 Pmatrix getPmatrixZero()
const;
235 Pmatrix getPmatrixIdentity()
const;
238 bool checkPmatrix(
const Pmatrix &)
const;
241 virtual StateVectorTan stateTangentVectorConstant(
double c)
const;
244 virtual StateVectorTan stateTangentVectorRandom()
const;
247 virtual StateVectorTan stateTangentVectorZero()
const;
250 virtual bool checkStateTangentVector(
const StateVectorTan & v)
const;
253 virtual MeasureVectorTan measureTangentVectorConstant(
double c)
const;
256 virtual MeasureVectorTan measureTangentVectorRandom()
const;
259 virtual MeasureVectorTan measureTangentVectorZero()
const;
262 virtual bool checkMeasureTangentVector(
const MeasureVectorTan &)
const;
267 virtual void setStateSize(
Index n);
279 virtual void setMeasureSize(
Index m);
289 virtual MeasureVector getSimulatedMeasurement(
TimeIndex k);
292 virtual const StateVector & getInnovation();
298 inline const StateVector & updateStatePrediction();
304 inline MeasureVector updateStateAndMeasurementPrediction();
307 const StateVector & getLastPrediction()
const;
310 const MeasureVector & getLastPredictedMeasurement()
const;
313 const MeasureVector & getLastMeasurement()
const;
316 const Matrix & getLastGain()
const;
370 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
385 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
403 #endif // KALMANFILTERBASEHPP
Eigen::VectorXd Vector
Dynamic sized scalar vector.
Definition: definitions.hpp:76
virtual MeasureVector predictSensor_(TimeIndex k)
Predicts the sensor measurement,.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Matrix pbar
Definition: kalman-filter-base.hpp:371
void setProcessCovariance(const Qmatrix &Q)
Definition: kalman-filter-base.hpp:136
Vector innovation_
Vector containing the inovation of the Kalman filter.
Definition: kalman-filter-base.hpp:366
Matrix q_
Container for the process noise covariance matrice.
Definition: kalman-filter-base.hpp:351
Vector StateVector
StateVector is the type of state vector.
Definition: observer-base.hpp:42
Definition: kalman-filter-base.hpp:368
Matrix pr_
Container for the covariance matrix of the estimation error.
Definition: kalman-filter-base.hpp:357
TimeIndex getTime() const
Get the time index.
This class is used to customize the way the difference between measurements, the state update functio...
Definition: state-vector-arithmetics.hpp:27
Matrix mKc
Definition: kalman-filter-base.hpp:379
IndexedVector x_
while the measurements and iputs are put in lists
Definition: zero-delay-observer.hpp:194
Matrix Kmatrix
The type of Kalman gain matrix.
Definition: kalman-filter-base.hpp:330
LLTPMatrix inoMeasCovLLT
Definition: kalman-filter-base.hpp:376
Matrix a_
Containers for the jacobian matrix of the process.
Definition: kalman-filter-base.hpp:345
Matrix Cmatrix
The type of the jacobian dh/dx.
Definition: kalman-filter-base.hpp:57
Matrix Amatrix
The type of the jacobian df/dx.
Definition: kalman-filter-base.hpp:54
Matrix c_
Containers for the jacobian matrix of the measurement.
Definition: kalman-filter-base.hpp:348
Matrix getMeasurementCovariance() const
Definition: kalman-filter-base.hpp:126
IndexedVector ybar_
container for the prediction of the sensor
Definition: kalman-filter-base.hpp:363
IndexedVector xbar_
container for the prediction
Definition: kalman-filter-base.hpp:360
void setMeasurementCovariance(const Rmatrix &R)
Definition: kalman-filter-base.hpp:119
It mostly implements the equations of Kalman filtering It is suitablle by derivation to be used incas...
Definition: kalman-filter-base.hpp:50
Index mt_
the size of tangent space of the measurement space
Definition: kalman-filter-base.hpp:327
Index nt_
the size of tangent space of the state space
Definition: kalman-filter-base.hpp:324
Eigen::MatrixXd Matrix
Dynamic sized Matrix.
Definition: definitions.hpp:100
Matrix Rmatrix
The type of the covariance matrix of the measurement noise w.
Definition: kalman-filter-base.hpp:63
Vector MeasureVector
MeasureVector is the type of measurements vector.
Definition: observer-base.hpp:45
Vector inoMeas
Definition: kalman-filter-base.hpp:373
long int TimeIndex
Definition: definitions.hpp:139
Matrix getProcessCovariance() const
Definition: kalman-filter-base.hpp:143
StateVectorArithmetics * arithm_
Definition: kalman-filter-base.hpp:382
Matrix inoMeasCovInverse
Definition: kalman-filter-base.hpp:375
constexpr double m
mass of the robot
Definition: hrp2.hpp:36
Vector StateVectorTan
StateVector is the type of state tangent vector.
Definition: kalman-filter-base.hpp:71
Eigen::Index Index
Definition: definitions.hpp:138
Matrix t
Definition: kalman-filter-base.hpp:378
MeasureVector updateStateAndMeasurementPrediction()
Definition: kalman-filter-base.hpp:394
Matrix Qmatrix
The type of the covariance matrix of the process noise v.
Definition: kalman-filter-base.hpp:60
Vector MeasureVectorTan
MeasureVector is the type of measurement tanegnt vector.
Definition: kalman-filter-base.hpp:74
virtual StateVector prediction_(TimeIndex k)=0
The abstract method to overload to implement f(x,u)
Eigen::LLT< Pmatrix > LLTPMatrix
Definition: kalman-filter-base.hpp:68
const StateVector & updateStatePrediction()
Definition: kalman-filter-base.hpp:388
Defines the base class of online zero delay observers. Zero delay observers are the classical state o...
Matrix kGain
Definition: kalman-filter-base.hpp:377
Definition: bidim-elastic-inv-pendulum-dyn-sys.hpp:20
Matrix r_
Container for the measurement noise covariance matrice.
Definition: kalman-filter-base.hpp:354
Defines the base class of online zero delay observers. Zero delay observers are the classical state o...
Definition: zero-delay-observer.hpp:43
Matrix Pmatrix
The type of the covariance matrix of the state estimation error.
Definition: kalman-filter-base.hpp:66
Vector xhat
Definition: kalman-filter-base.hpp:372
Matrix inoMeasCov
Definition: kalman-filter-base.hpp:374