Bayes++ Bayesian Filtering Classes  Release 2014.5 - Copyright (c) 2003,2004,2005,2006,2011,2012,2014 Michael Stevens
covFlt.hpp
Go to the documentation of this file.
1 #ifndef _BAYES_FILTER_COVARIANCE
2 #define _BAYES_FILTER_COVARIANCE
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  * Covariance Filter Scheme.
14  * Implementation of extended Kalman filter
15  *
16  * To work with with Linear and Linrz models
17  * a) a state separate from covariance predict is used.
18  * b) a EKF innovation update algorithm is used.
19  * Discontinuous observe models require that predict is normalised with
20  * respect to the observation.
21  *
22  * A initial observation size may also be specified for efficiency.
23  *
24  * The filter is operated by performing a
25  * predict, observe
26  * cycle defined by the base class
27  */
28 #include "bayesFlt.hpp"
29 
30 /* Filter namespace */
31 namespace Bayesian_filter
32 {
33 
35 {
36 public:
37  Covariance_scheme (std::size_t x_size, std::size_t z_initialsize = 0);
39  // Optimise copy assignment to only copy filter state
40 
41  void init ();
42  void update ();
43 
45  // Standard Linrz prediction
47  // Specialised 'stationary' prediction, only additive noise
48 
51 
52 public: // Exposed Numerical Results
53  FM::SymMatrix S, SI; // Innovation Covariance and Inverse
54  FM::Matrix W; // Kalman Gain
55 
56 protected: // Permanently allocated temps
58 protected: // allow fast operation if z_size remains constant
59  std::size_t last_z_size;
60  void observe_size (std::size_t z_size);
61 };
62 
63 
64 }//namespace
65 #endif
Covariance_scheme & operator=(const Covariance_scheme &)
Definition: covFlt.cpp:33
Covariance_scheme(std::size_t x_size, std::size_t z_initialsize=0)
Definition: covFlt.cpp:22
Float observe_innovation(Linrz_uncorrelated_observe_model &h, const FM::Vec &s)
Definition: covFlt.cpp:123
FM::RowMatrix tempX
Definition: covFlt.hpp:57
void update()
Definition: covFlt.cpp:50
Definition: bayesException.hpp:20
void init()
Definition: covFlt.cpp:43
Definition: bayesFlt.hpp:135
FM::SymMatrix SI
Definition: covFlt.hpp:53
Definition: bayesFlt.hpp:606
FMVec< detail::BaseVector > Vec
Definition: uBLASmatrix.hpp:323
FM::Matrix W
Definition: covFlt.hpp:54
std::size_t last_z_size
Definition: covFlt.hpp:59
RowMatrix Matrix
Definition: uBLASmatrix.hpp:325
Bayesian_filter_matrix::Float Float
Definition: bayesFlt.hpp:39
Float predict(Linrz_predict_model &f)
Definition: covFlt.cpp:56
void observe_size(std::size_t z_size)
Definition: covFlt.cpp:80
FMMatrix< detail::SymMatrixWrapper< detail::BaseRowMatrix > > SymMatrix
Definition: uBLASmatrix.hpp:327
Definition: covFlt.hpp:34
Definition: bayesFlt.hpp:177
FMMatrix< detail::BaseRowMatrix > RowMatrix
Definition: uBLASmatrix.hpp:324
FM::SymMatrix S
Definition: covFlt.hpp:53