00001 #ifndef INDII_ML_FILTER_KALMANFILTERMODEL_HPP 00002 #define INDII_ML_FILTER_KALMANFILTERMODEL_HPP 00003 00004 #include "../aux/GaussianPdf.hpp" 00005 00006 namespace indii { 00007 namespace ml { 00008 namespace filter { 00009 00010 /** 00011 * KalmanFilter compatible model. 00012 * 00013 * @author Lawrence Murray <lawrence@indii.org> 00014 * @version $Rev: 301 $ 00015 * @date $Date: 2007-09-10 23:56:50 +0100 (Mon, 10 Sep 2007) $ 00016 * 00017 * @param T The type of time. 00018 * 00019 * @see indii::ml::filter for general usage guidelines. 00020 */ 00021 template <class T = unsigned int> 00022 class KalmanFilterModel { 00023 public: 00024 /** 00025 * Destructor. 00026 */ 00027 virtual ~KalmanFilterModel() = 0; 00028 00029 /** 00030 * Predict next system state. 00031 * 00032 * @param p_xtn_ytn 00033 * \f$P\big(\mathbf{x}(t_n)\, | 00034 * \,\mathbf{y}(t_1),\ldots,\mathbf{y}(t_n)\big)\f$; distribution 00035 * over states at the current time given the history of 00036 * measurements. 00037 * @param delta \f$\Delta t\f$; time step. 00038 * 00039 * @return \f$P\big(\mathbf{x}(t_n + \Delta t)\, | 00040 * \,\mathbf{y}(t_1),\ldots,\mathbf{y}(t_n)\big)\f$; predicted 00041 * distribution over states at time \f$t_n + \Delta t\f$ given the 00042 * history of measurements. 00043 */ 00044 virtual indii::ml::aux::GaussianPdf p_xtnp1_ytn( 00045 const indii::ml::aux::GaussianPdf& p_xtn_ytn, const T delta) = 0; 00046 00047 /** 00048 * Refine prediction of next system state using next measurement. 00049 * 00050 * @param p_xtnp1_ytn \f$P\big(\mathbf{x}(t_n + \Delta t)\, | 00051 * \,\mathbf{y}(t_1),\ldots,\mathbf{y}(t_n)\big)\f$; predicted 00052 * distribution over states at time \f$t_n + \Delta t\f$ given the 00053 * history of measurements. Typically obtained from prior call to 00054 * #p_xtnp1_ytn. 00055 * @param ytnp1 \f$\mathbf{y}(t_n + \Delta t)\f$; the measurement at 00056 * time \f$t_n + \Delta t\f$. 00057 * @param delta \f$\Delta t\f$; time step. 00058 * 00059 * @return \f$P\big(\mathbf{x}(t_n + \Delta 00060 * t)\,|\,\mathbf{y}(t_1),\ldots,\mathbf{y}(t_n + \Delta t)\big)\f$; 00061 * distribution over states at time \f$t_n + \Delta t\f$ given the 00062 * history of measurements and new measurement. 00063 */ 00064 virtual indii::ml::aux::GaussianPdf p_xtnp1_ytnp1( 00065 const indii::ml::aux::GaussianPdf& p_xtnp1_ytn, 00066 const indii::ml::aux::vector& ytnp1, const T delta) = 0; 00067 00068 /** 00069 * Predict measurement from system state. 00070 * 00071 * @param p_x Arbitrary distribution over system state. 00072 * 00073 * @return Distribution over measurements given the system state. 00074 */ 00075 virtual indii::ml::aux::GaussianPdf p_y_x( 00076 const indii::ml::aux::GaussianPdf& p_x) = 0; 00077 00078 }; 00079 00080 } 00081 } 00082 } 00083 00084 template <class T> 00085 indii::ml::filter::KalmanFilterModel<T>::~KalmanFilterModel() { 00086 // 00087 } 00088 00089 #endif
1.5.3