mixpp: bdm::KalmanCh Class Reference

bdm::KalmanCh Class Reference

Kalman filter in square root form. More...

#include <kalman.h>

List of all members.


Detailed Description

Kalman filter in square root form.

Trivial example:

#include "estim/kalman.h"
using namespace bdm;
// estimation of AR(0) model
int main() {
    //dimensions
    int dx = 3, dy = 3, du = 1;
    // matrices
    mat A = eye ( dx );
    mat B = zeros ( dx, du );
    mat C = eye ( dx );
    mat D = zeros ( dy, du );
    mat Q = eye ( dx );
    mat R = 0.1 * eye ( dy );
    //prior
    mat P0 = 100 * eye ( dx );
    vec mu0 = zeros ( dx );
    // Estimator
    KalmanCh KF;
    KF.set_parameters ( A, B, C, D,/*covariances*/ Q, R );
    KF.set_statistics ( mu0, P0 );
    KF.validate();
    // Estimation loop
    for ( int i = 0; i < 100; i++ ) {
        KF.bayes ( randn ( dy ), randn ( du ) );
    }
    //print results
    cout << "Posterior estimate of x is: "  << endl;
    cout << "mean: " << KF.posterior().mean() << endl;
    cout << "variance: " << KF.posterior().variance() << endl;
}

Complete constructor:


Member Function Documentation

void bdm::KalmanCh::from_setting (const Setting & set )  [inline]

Create object from the following structure

    class = 'KalmanCh';
    --- inherited fields ---
    bdm::Kalman<chmat>::from_setting

Reimplemented from bdm::Kalman< chmat >.

Reimplemented in bdm::EKFCh.


The documentation for this class was generated from the following files:

Generated on Fri Aug 27 16:54:40 2010 for mixpp by  doxygen 1.6.0