Bayes++ Bayesian Filtering Classes  Release 2014.5 - Copyright (c) 2003,2004,2005,2006,2011,2012,2014 Michael Stevens
infFlt.hpp
Go to the documentation of this file.
1 #ifndef _BAYES_FILTER_INFORMATION
2 #define _BAYES_FILTER_INFORMATION
3 
4 /*
5  * Bayes++ the Bayesian Filtering Library
6  * Copyright (c) 2002 Michael Stevens
7  * See accompanying Bayes++.htm for terms and conditions of use.
8  *
9  * $Id$
10  */
11 
12 /*
13  * Information Filter Scheme.
14  * A possibly non-linear Information filter
15  *
16  * References
17  * [1] "Stochastic Models, Estimation, and Control} Peter S Maybeck, Academic Press, ISBN 0-12-480701-1
18  * Section 5.7
19  * [2] "Kalman Filtering, Theory and Practice", Mohinder S. Grewal, Angus P. Andrews ISBN 0-13-211335-X
20  * To work with with Linear and Linrz models
21  * a) a separate state and information (via covariance) predict is used.
22  * b) a EIF modified innovation update algorithm is used.
23  *
24  * Two alternative algorithms are used for predict functions:
25  * For linrz models an extended predict form is used so information state 'y' is predicted via the
26  * non-linear function. This requires that X, and Y are invertible so 'x' can be computed.
27  * For linear invertible models predict can be done directly without computing x
28  * Discontinuous observe models require that predict is normailised with
29  * respect to the observation.
30  * NUMERICS
31  * The state x is represented by prod(X,y). This may be ill conditioned if the product is
32  * ill conditioned. At present only the conditioning of X if checked, if y has a large range the product
33  * may be ill conditioned. This is not checked
34  *
35  * The filter is operated by performing a
36  * predict, observe
37  * cycle defined by the base class
38  */
39 #include "bayesFlt.hpp"
40 
41 /* Filter namespace */
42 namespace Bayesian_filter
43 {
44 
46 {
47 public:
48  Information_scheme (std::size_t x_size, std::size_t z_initialsize = 0);
50  // Optimise copy assignment to only copy filter state
51 
53  {
54  Linear_predict_byproducts (std::size_t x_size, std::size_t q_size);
59  };
60 
61 
62  void init ();
63  void update ();
64  void init_yY ();
65  void update_yY ();
66  // Covariance and information form state interface
67 
69  // Linear Prediction in information form as in Ref[2]
71  {
72  Linear_predict_byproducts b(f.Fx.size1(),f.q.size());
73  return predict (f, b);
74  }
75 
77  // Extended Prediction via state
78 
81 
82 protected:
83  bool update_required; // Postcondition of update is not met
84 
85 protected: // Permanently allocated temps
89  // allow fast operation if z_size remains constant
91  std::size_t last_z_size;
92  void observe_size (std::size_t z_size);
93 };
94 
95 
96 }//namespace
97 #endif
Float predict(Linear_invertable_predict_model &f, Linear_predict_byproducts &b)
Definition: infFlt.cpp:131
Float predict(Linear_invertable_predict_model &f)
Definition: infFlt.hpp:70
FM::SymMatrix ZI
Definition: infFlt.hpp:90
FM::Vec i
Definition: infFlt.hpp:87
void init()
Definition: infFlt.cpp:53
std::size_t last_z_size
Definition: infFlt.hpp:91
Definition: bayesException.hpp:20
Definition: infFlt.hpp:45
void observe_size(std::size_t z_size)
Definition: infFlt.cpp:174
void update_yY()
Definition: infFlt.cpp:84
Definition: bayesFlt.hpp:606
FMVec< detail::BaseVector > Vec
Definition: uBLASmatrix.hpp:323
Information_scheme & operator=(const Information_scheme &)
Definition: infFlt.cpp:42
RowMatrix Matrix
Definition: uBLASmatrix.hpp:325
bool update_required
Definition: infFlt.hpp:83
Float observe_innovation(Linrz_uncorrelated_observe_model &h, const FM::Vec &s)
Definition: infFlt.cpp:216
FM::RowMatrix tempX
Definition: infFlt.hpp:86
Bayesian_filter_matrix::Float Float
Definition: bayesFlt.hpp:39
void update()
Definition: infFlt.cpp:91
FM::Vec q
Definition: bayesFlt.hpp:170
FMMatrix< detail::SymMatrixWrapper< detail::BaseRowMatrix > > SymMatrix
Definition: uBLASmatrix.hpp:327
Definition: bayesFlt.hpp:524
Definition: bayesFlt.hpp:177
FM::SymMatrix I
Definition: infFlt.hpp:88
FM::Matrix Fx
Definition: bayesFlt.hpp:186
FMMatrix< detail::BaseRowMatrix > RowMatrix
Definition: uBLASmatrix.hpp:324
Information_scheme(std::size_t x_size, std::size_t z_initialsize=0)
Definition: infFlt.cpp:21
Linear_predict_byproducts(std::size_t x_size, std::size_t q_size)
Definition: infFlt.cpp:34
void init_yY()
Definition: infFlt.cpp:70