⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 udflt_8hpp-source.html

📁 Bayes滤波器算法C++类说明文档,源码见Bayes滤波器算法
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Bayes++ Bayesian Filtering Classes: UDFlt.hpp Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.2 --><div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div><h1>UDFlt.hpp</h1><a href="UDFlt_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef _BAYES_FILTER_UD</span>00002 <span class="preprocessor"></span><span class="preprocessor">#define _BAYES_FILTER_UD</span>00003 <span class="preprocessor"></span><span class="comment">/*</span>00004 <span class="comment"> * Bayes++ the Bayesian Filtering Library</span>00005 <span class="comment"> * Copyright (c) 2002 Michael Stevens</span>00006 <span class="comment"> * See accompanying Bayes++.htm for terms and conditions of use.</span>00007 <span class="comment"> *</span>00008 <span class="comment"> * $Header: /cvsroot/bayesclasses/Bayes++/BayesFilter/UDFlt.hpp,v 1.6.2.1 2004/02/11 21:06:42 mistevens Exp $</span>00009 <span class="comment"> * $NoKeywords: $</span>00010 <span class="comment"> */</span>00011 00012 <span class="comment">/*</span>00013 <span class="comment"> * UdU' Factorisation of covariance Filter Scheme.</span>00014 <span class="comment"> *  Implementation of a 'Square-root' linearised kalman filter</span>00015 <span class="comment"> * </span>00016 <span class="comment"> * Bierman's UD factorisatised update algorithm using Agee-Turner UdU' factorisation rank 1 update</span>00017 <span class="comment"> * Thornton's MWG-S factorisation predict algorithm</span>00018 <span class="comment"> * References</span>00019 <span class="comment"> * [1] "Factorisation Methods for Discrete Sequential Estimation" Gerald J. Bierman ISBN 0-12-097350-2</span>00020 <span class="comment"> * [2] "Kalman Filtering, Theory and Practice", Mohinder S. Grewal, Angus P. Andrews ISBN 0-13-211335-X</span>00021 <span class="comment"> *</span>00022 <span class="comment"> * A initial observation size may also be specified for efficiency.</span>00023 <span class="comment"> * </span>00024 <span class="comment"> * The filter is operated by performing a</span>00025 <span class="comment"> *  predict, observe</span>00026 <span class="comment"> * cycle defined by the base class</span>00027 <span class="comment"> */</span>00028 <span class="preprocessor">#include "<a class="code" href="bayesFlt_8hpp.html">bayesFlt.hpp</a>"</span>00029 00030 <span class="comment">/* Filter namespace */</span>00031 <span class="keyword">namespace </span>Bayesian_filter00032 {00033 <a name="l00034"></a><a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html">00034</a> <span class="keyword">class </span><a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html">UD_sequential_observe_model</a> : <span class="keyword">public</span> <a class="code" href="classBayesian__filter_1_1Linrz__uncorrelated__observe__model.html">Linrz_uncorrelated_observe_model</a>00035 {00036 <span class="keyword">public</span>:<a name="l00037"></a><a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html#a0">00037</a>     <a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html#a0">UD_sequential_observe_model</a> (size_t x_size, size_t z_size) :00038         <a class="code" href="classBayesian__filter_1_1Linrz__uncorrelated__observe__model.html">Linrz_uncorrelated_observe_model</a>(x_size, z_size), <a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html#o0">Hx_o</a>(x_size)00039     {}00040     <span class="keyword">virtual</span> <span class="keyword">const</span> FM::Vec&amp; <a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html#a1">ho</a> (<span class="keyword">const</span> FM::Vec&amp; x, <span class="keyword">const</span> size_t o) = 0;00041     <span class="comment">/* Supplied model (h) for observation using state x, z allows normalisation and model variation</span>00042 <span class="comment">       Fast model of a single element (o) in observation model</span>00043 <span class="comment">       Precondition: Hx_o is conformantly dimensioned</span>00044 <span class="comment">       Postcondition:</span>00045 <span class="comment">        z(k|k-1) = h(x(k|k-1)</span>00046 <span class="comment">        Hx_o(x(k-1|k-1) = Jacobian of h with respect to state x (row o)</span>00047 <span class="comment">    */</span><a name="l00048"></a><a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html#o0">00048</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html#o0">Hx_o</a>;00049 };00050 00051 <a name="l00052"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html">00052</a> <span class="keyword">class </span><a class="code" href="classBayesian__filter_1_1UD__scheme.html">UD_scheme</a> : <span class="keyword">public</span> <a class="code" href="classBayesian__filter_1_1Linrz__kalman__filter.html">Linrz_kalman_filter</a>00053 {00054 <span class="keyword">private</span>:00055     size_t q_max;   <span class="comment">// Maxiumum size allocated for noise model, constructed before UD</span>00056 <span class="keyword">public</span>:<a name="l00057"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#o0">00057</a>     FM::Matrix <a class="code" href="classBayesian__filter_1_1UD__scheme.html#o0">UD</a>;  <span class="comment">// UDU factorisation of X with D on diagonal</span>00058                         <span class="comment">// Lower triangle used as workspace</span><a name="l00059"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#o1">00059</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__scheme.html#o1">s</a>;      <span class="comment">// Innovation</span><a name="l00060"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#o2">00060</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__scheme.html#o2">Sd</a>;     <span class="comment">// Innovation Covariance </span>00061 00062     <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a0">UD_scheme</a> (size_t x_size, size_t q_maxsize, size_t z_initialsize = 0);00063     <a class="code" href="classBayesian__filter_1_1UD__scheme.html">UD_scheme</a>&amp; <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a1">operator= </a>(<span class="keyword">const</span> <a class="code" href="classBayesian__filter_1_1UD__scheme.html">UD_scheme</a>&amp;);00064     <span class="comment">// Optimise copy assignment to only copy filter state</span>00065 00066     <span class="keywordtype">void</span> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a2">init</a> ();00067     <span class="keywordtype">void</span> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a3">update</a> ();00068     <a class="code" href="classBayesian__filter_1_1Bayes__base.html#w0">Float</a> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a4">predict</a> (<a class="code" href="classBayesian__filter_1_1Linrz__predict__model.html">Linrz_predict_model</a>&amp; f);00069 00070     <a class="code" href="classBayesian__filter_1_1Bayes__base.html#w0">Float</a> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a5">observe</a> (<a class="code" href="classBayesian__filter_1_1Linrz__correlated__observe__model.html">Linrz_correlated_observe_model</a>&amp; h, <span class="keyword">const</span> FM::Vec&amp; z);00071     <span class="comment">/* No solution for Correlated noise and Linrz model */</span>00072     <a class="code" href="classBayesian__filter_1_1Bayes__base.html#w0">Float</a> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a5">observe</a> (<a class="code" href="classBayesian__filter_1_1Linrz__uncorrelated__observe__model.html">Linrz_uncorrelated_observe_model</a>&amp; h, <span class="keyword">const</span> FM::Vec&amp; z);00073     <span class="comment">/* General observe */</span>00074 00075     <a class="code" href="classBayesian__filter_1_1Bayes__base.html#w0">Float</a> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a5">observe</a> (<a class="code" href="classBayesian__filter_1_1Linear__correlated__observe__model.html">Linear_correlated_observe_model</a>&amp; h, <span class="keyword">const</span> FM::Vec&amp; z);00076     <span class="comment">/* Special Linear observe for correlated Z, fast Z decorrelation */</span>00077     <a class="code" href="classBayesian__filter_1_1Bayes__base.html#w0">Float</a> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#a5">observe</a> (<a class="code" href="classBayesian__filter_1_1UD__sequential__observe__model.html">UD_sequential_observe_model</a>&amp; h, <span class="keyword">const</span> FM::Vec&amp; z);00078     <span class="comment">/* Special Linrz observe using fast sequential model */</span>00079 00080 <span class="keyword">protected</span>:00081     <a class="code" href="classBayesian__filter_1_1Bayes__base.html#w0">Float</a> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#b0">predictGq</a> (<span class="keyword">const</span> FM::Matrix&amp; Fx, <span class="keyword">const</span> FM::Matrix&amp; G, <span class="keyword">const</span> FM::Vec&amp; q);<a name="l00082"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p2">00082</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p0">d</a>, <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p1">dv</a>, <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p2">v</a>;   <span class="comment">// predictGQ temporaries</span>00083     <a class="code" href="classBayesian__filter_1_1Bayes__base.html#w0">Float</a> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#b1">observeUD</a> (FM::Vec&amp; gain, Float&amp; alpha, <span class="keyword">const</span> FM::Vec&amp; h, <span class="keyword">const</span> Float r);<a name="l00084"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p4">00084</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p3">a</a>, <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p4">b</a>;       <span class="comment">// observeUD temporaries</span>00085                         <span class="comment">// Observation temporaies</span>00086     <span class="keywordtype">void</span> <a class="code" href="classBayesian__filter_1_1UD__scheme.html#b2">observe_size</a> (size_t z_size);<a name="l00087"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p5">00087</a>     size_t <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p5">last_z_size</a>;<a name="l00088"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p6">00088</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p6">h1</a>;             <span class="comment">// Single Observation model</span><a name="l00089"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p7">00089</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p7">w</a>;              <span class="comment">// Single Gain</span><a name="l00090"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p8">00090</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p8">znorm</a>;          <span class="comment">// Normalised innovation</span><a name="l00091"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p9">00091</a>     FM::Vec <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p9">zpdecol</a>;        <span class="comment">// Decorrelated zp</span><a name="l00092"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p10">00092</a>     FM::Matrix <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p10">Gz</a>;          <span class="comment">// Z coupling</span><a name="l00093"></a><a class="code" href="classBayesian__filter_1_1UD__scheme.html#p11">00093</a>     FM::Matrix <a class="code" href="classBayesian__filter_1_1UD__scheme.html#p11">GIHx</a>;        <span class="comment">// Modified Model for linear decorrelation</span>00094 };00095 00096 00097 }<span class="comment">//namespace</span>00098 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Feb 16 11:20:41 2004 for Bayes++ Bayesian Filtering Classes by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.2 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -