Bayes++ Bayesian Filtering Classes  Release 2014.5 - Copyright (c) 2003,2004,2005,2006,2011,2012,2014 Michael Stevens
CIFlt.hpp
Go to the documentation of this file.
1 #ifndef _BAYES_FILTER_CI
2 #define _BAYES_FILTER_CI
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 Intersection Filter Scheme.
14  *
15  * References
16  * [1] "A Non divergent Estimation Algorithm in the Presence of Unknown Correlations"
17  * Simon J Julier, Jeffrey K Uhlmann
18  *
19  * CI provides a generalised consistent method to combine mean and covariances
20  * of two estimates. The combination can be optimised by choosing a norm of the
21  * combined correlations. The norm (omega) is restrict to 0..1 inclusive an effectively
22  * scales the combination
23  * Here is CI with a predict and observe model to form a filter.
24  *
25  * The Omega norm chosen here is the fixed value of 0.5
26  * The Omega function should be overloaded to produce more useful results
27  *
28  * The filter is operated by performing a
29  * predict, observe
30  * cycle derived from the Extended_filter
31  */
32 #include "bayesFlt.hpp"
33 
34 /* Filter namespace */
35 namespace Bayesian_filter
36 {
37 
39 {
40 public:
41  CI_scheme (std::size_t x_size, std::size_t z_initialsize = 0);
43  // Optimise copy assignment to only copy filter state
44 
45  void init ();
46  void update ();
50 
51  virtual Float Omega(const FM::SymMatrix& Ai, const FM::SymMatrix& Bi, const FM::SymMatrix& A)
52  // Determine norm Omega 0..1 for the CI combination
53  // Default norm is the fixed value 0.5
54  {
55  return 0.5;
56  }
57 
58 public: // Exposed Numerical Results
59  FM::SymMatrix S, SI; // Innovation Covariance and Inverse
60 
61 protected: // allow fast operation if z_size remains constant
62  std::size_t last_z_size;
63  void observe_size (std::size_t z_size);
64 };
65 
66 
67 }//namespace
68 #endif
virtual Float Omega(const FM::SymMatrix &Ai, const FM::SymMatrix &Bi, const FM::SymMatrix &A)
Definition: CIFlt.hpp:51
CI_scheme & operator=(const CI_scheme &)
Definition: CIFlt.cpp:33
void update()
Definition: CIFlt.cpp:50
Float observe_innovation(Linrz_uncorrelated_observe_model &h, const FM::Vec &s)
Definition: CIFlt.cpp:81
Definition: bayesException.hpp:20
Definition: bayesFlt.hpp:606
FMVec< detail::BaseVector > Vec
Definition: uBLASmatrix.hpp:323
Definition: CIFlt.hpp:38
CI_scheme(std::size_t x_size, std::size_t z_initialsize=0)
Definition: CIFlt.cpp:23
void observe_size(std::size_t z_size)
Definition: CIFlt.cpp:67
FM::SymMatrix SI
Definition: CIFlt.hpp:59
void init()
Definition: CIFlt.cpp:43
Bayesian_filter_matrix::Float Float
Definition: bayesFlt.hpp:39
FMMatrix< detail::SymMatrixWrapper< detail::BaseRowMatrix > > SymMatrix
Definition: uBLASmatrix.hpp:327
Definition: bayesFlt.hpp:177
std::size_t last_z_size
Definition: CIFlt.hpp:62
FM::SymMatrix S
Definition: CIFlt.hpp:59
Float predict(Linrz_predict_model &f)
Definition: CIFlt.cpp:56