Show
Ignore:
Timestamp:
10/12/09 13:49:39 (15 years ago)
Author:
mido
Message:

\doc directory cleaned a bit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/html/kalman.html

    r641 r651  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml"> 
    3 <head> 
    4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> 
     1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
     2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
    53<title>mixpp: Examples of (extended) Kalman filtering</title> 
    6 <link href="tabs.css" rel="stylesheet" type="text/css"/> 
    7 <link href="doxygen.css" rel="stylesheet" type="text/css"/> 
    8 </head> 
    9 <body> 
    10 <!-- Generated by Doxygen 1.6.1 --> 
     4<link href="tabs.css" rel="stylesheet" type="text/css"> 
     5<link href="doxygen.css" rel="stylesheet" type="text/css"> 
     6</head><body> 
     7<!-- Generated by Doxygen 1.5.9 --> 
    118<script type="text/javascript"> 
    129<!-- 
     
    6360</div> 
    6461<div class="contents"> 
    65  
    66  
    67 <h1><a class="anchor" id="kalman">Examples of (extended) Kalman filtering </a></h1><p>Kalman filtering and Extended Kalman filtering are special cases of Bayesian filtering. The Kalman filter is optimal for linear state space model with Gaussian disturbances, the extended Kalman filter is derived as linearization of non-linear state space models with Gaussian noises. Hence it is only sub-optimal filter.</p> 
    68 <p>More advanced filtering algorithms for non-linear non-Gaussian models can be derived, see ...</p> 
    69 <h2><a class="anchor" id="klm"> 
     62<h1><a class="anchor" name="kalman">Examples of (extended) Kalman filtering </a></h1>Kalman filtering and Extended Kalman filtering are special cases of Bayesian filtering. The Kalman filter is optimal for linear state space model with Gaussian disturbances, the extended Kalman filter is derived as linearization of non-linear state space models with Gaussian noises. Hence it is only sub-optimal filter.<p> 
     63More advanced filtering algorithms for non-linear non-Gaussian models can be derived, see ...<h2><a class="anchor" name="klm"> 
    7064Kalman Filtering</a></h2> 
    71 <p>Kalman filtering is optimal estimation procedure for linear state space model: </p> 
    72 <p class="formulaDsp"> 
    73 <img class="formulaDsp" alt="\begin{eqnarray} x_t &amp;= &amp;A x_{t-1} + B u_{t} + v_t,\\ y_t &amp;= &amp;C x_{t} + D u_{t} + w_t, \end{eqnarray}" src="form_119.png"/> 
    74 </p> 
    75 <p> where <img class="formulaInl" alt="$ x_t $" src="form_120.png"/> is the state, <img class="formulaInl" alt="$ y_t $" src="form_6.png"/> is the system output, <img class="formulaInl" alt="$ A, B, C, D$" src="form_121.png"/> are state matrices of appropriate dimensions, <img class="formulaInl" alt="$v_t, w_t$" src="form_122.png"/> are zero mean Gaussian noises with covariance matrices <img class="formulaInl" alt="$Q, R$" src="form_123.png"/>, respectively.</p> 
    76 <p>Both prior and posterior densities on the state are Gaussian, i.e. of the class enorm.</p> 
    77 <p>There is a range of classes that implements this functionality, namely:</p> 
    78 <ul> 
    79 <li><a class="el" href="classbdm_1_1KalmanFull.html" title="Basic Kalman filter with full matrices.">bdm::KalmanFull</a> which implements the estimation algorithm on full matrices,</li> 
    80 <li><a class="el" href="classbdm_1_1KalmanCh.html" title="Kalman filter in square root form.">bdm::KalmanCh</a> which implements the estimation algorithm using choleski decompositions and QR algorithm.</li> 
    81 </ul> 
    82 <h2><a class="anchor" id="ekf"> 
     65Kalman filtering is optimal estimation procedure for linear state space model: <p class="formulaDsp"> 
     66<img class="formulaDsp" alt="\begin{eqnarray} x_t &amp;= &amp;A x_{t-1} + B u_{t} + v_t,\\ y_t &amp;= &amp;C x_{t} + D u_{t} + w_t, \end{eqnarray}" src="form_119.png"> 
     67<p> 
     68 where <img class="formulaInl" alt="$ x_t $" src="form_120.png"> is the state, <img class="formulaInl" alt="$ y_t $" src="form_6.png"> is the system output, <img class="formulaInl" alt="$ A, B, C, D$" src="form_121.png"> are state matrices of appropriate dimensions, <img class="formulaInl" alt="$v_t, w_t$" src="form_122.png"> are zero mean Gaussian noises with covariance matrices <img class="formulaInl" alt="$Q, R$" src="form_123.png">, respectively.<p> 
     69Both prior and posterior densities on the state are Gaussian, i.e. of the class enorm.<p> 
     70There is a range of classes that implements this functionality, namely:<ul> 
     71<li><a class="el" href="classbdm_1_1KalmanFull.html" title="Basic Kalman filter with full matrices.">bdm::KalmanFull</a> which implements the estimation algorithm on full matrices,</li><li><a class="el" href="classbdm_1_1KalmanCh.html" title="Kalman filter in square root form.">bdm::KalmanCh</a> which implements the estimation algorithm using choleski decompositions and QR algorithm.</li></ul> 
     72<h2><a class="anchor" name="ekf"> 
    8373Extended Kalman Filtering</a></h2> 
    84 <p>Extended Kalman filtering arise by linearization of non-linear state space model: </p> 
    85 <p class="formulaDsp"> 
    86 <img class="formulaDsp" alt="\begin{eqnarray} x_t &amp;= &amp;g( x_{t-1}, u_{t}) + v_t,\\ y_t &amp;= &amp;h( x_{t} , u_{t}) + w_t, \end{eqnarray}" src="form_124.png"/> 
    87 </p> 
    88 <p> where <img class="formulaInl" alt="$ g(), h() $" src="form_125.png"/> are general non-linear functions which have finite derivatives. Remaining variables have the same meaning as in the Kalman Filter.</p> 
    89 <p>In order to use this class, the non-linear functions and their derivatives must be defined as an instance of class <code>diffbifn</code>.</p> 
    90 <p>Two classes are defined:</p> 
    91 <ul> 
    92 <li><a class="el" href="classbdm_1_1EKFfull.html" title="Extended Kalman Filter in full matrices.">bdm::EKFfull</a> on full size matrices,</li> 
    93 <li><a class="el" href="classbdm_1_1EKFCh.html" title="Extended Kalman Filter in Square root.">bdm::EKFCh</a> on Choleski decompositions and using QR algorithm.</li> 
    94 </ul> 
    95 <h2><a class="anchor" id="exa"> 
     74Extended Kalman filtering arise by linearization of non-linear state space model: <p class="formulaDsp"> 
     75<img class="formulaDsp" alt="\begin{eqnarray} x_t &amp;= &amp;g( x_{t-1}, u_{t}) + v_t,\\ y_t &amp;= &amp;h( x_{t} , u_{t}) + w_t, \end{eqnarray}" src="form_124.png"> 
     76<p> 
     77 where <img class="formulaInl" alt="$ g(), h() $" src="form_125.png"> are general non-linear functions which have finite derivatives. Remaining variables have the same meaning as in the Kalman Filter.<p> 
     78In order to use this class, the non-linear functions and their derivatives must be defined as an instance of class <code>diffbifn</code>.<p> 
     79Two classes are defined:<ul> 
     80<li><a class="el" href="classbdm_1_1EKFfull.html" title="Extended Kalman Filter in full matrices.">bdm::EKFfull</a> on full size matrices,</li><li><a class="el" href="classbdm_1_1EKFCh.html" title="Extended Kalman Filter in Square root.">bdm::EKFCh</a> on Choleski decompositions and using QR algorithm.</li></ul> 
     81<h2><a class="anchor" name="exa"> 
    9682Examples of Use</a></h2> 
    97 <p>The classes can be used directly in C++ or via User Info. The latter example is illustrated in file estimator. A very short example of the former follows:</p> 
    98 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include &quot;<a class="code" href="kalman_8h.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions.">estim/kalman.h</a>&quot;</span> 
     83The classes can be used directly in C++ or via User Info. The latter example is illustrated in file estimator. A very short example of the former follows:<p> 
     84<div class="fragment"><pre class="fragment"><span class="preprocessor">#include "<a class="code" href="kalman_8h.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions.">estim/kalman.h</a>"</span> 
    9985<span class="keyword">using namespace </span>bdm; 
    10086 
     
    122108        } 
    123109        <span class="comment">//print results</span> 
    124         cout &lt;&lt; <span class="stringliteral">&quot;Posterior estimate of x is: &quot;</span>  &lt;&lt; endl; 
    125         cout &lt;&lt; <span class="stringliteral">&quot;mean: &quot;</span> &lt;&lt; KF.posterior().mean() &lt;&lt; endl; 
    126         cout &lt;&lt; <span class="stringliteral">&quot;variance: &quot;</span> &lt;&lt; KF.posterior().variance() &lt;&lt; endl; 
     110        cout &lt;&lt; <span class="stringliteral">"Posterior estimate of x is: "</span>  &lt;&lt; endl; 
     111        cout &lt;&lt; <span class="stringliteral">"mean: "</span> &lt;&lt; KF.posterior().mean() &lt;&lt; endl; 
     112        cout &lt;&lt; <span class="stringliteral">"variance: "</span> &lt;&lt; KF.posterior().variance() &lt;&lt; endl; 
    127113} 
    128114</pre></div> </div> 
    129 <hr size="1"/><address style="text-align: right;"><small>Generated on Sun Sep 27 00:49:05 2009 for mixpp by&nbsp; 
     115<hr size="1"><address style="text-align: right;"><small>Generated on Wed Oct 7 17:34:44 2009 for mixpp by&nbsp; 
    130116<a href="http://www.doxygen.org/index.html"> 
    131 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> 
     117<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> 
    132118</body> 
    133119</html>