Namespaces

Types in MathNet.Filtering.Kalman

Type DiscreteKalmanFilter

Namespace MathNet.Filtering.Kalman

Interfaces IKalmanFilter

The DiscreteTimeKalmanFilter is generally used in digital computer implementations of the Kalman Filter. As the name suggests, it is used when the state of the system and updates are available at discrete points in time.

This is the most general form of the discrete time Kalman Filter. Other, more specialized forms are available if discrete measurements are available at fixed time intervals.

This implementation uses the most common form of the discrete time Kalman Filter: Prediction: x(k|k-1) = F(k-1) * x(k-1|k-1) P(k|k-1) = F(k-1)*P(k-1|k-1)*F(k-1) + G(k-1)*Q(k-1)*G'(k-1) Update: S(k) = H(k)*P(k|k-1)*H'(k) + R(k) K(k) = P(k|k-1)*H'(k)*S^(-1)(k) P(k|k) = (I-K(k)*H(k))*P(k|k-1) x(k|k) = x(k|k-1)+K(k)*(z(k)-H(k)*x(k|k-1))

Constructors

Methods

Properties

Public Constructors

DiscreteKalmanFilter(Matrix<double> x0, Matrix<double> P0)

Creates a new Discrete Time Kalman Filter with the given values for the initial state and the covariance of that state.
Parameters
Matrix<double> x0

The best estimate of the initial state of the estimate.

Matrix<double> P0

The covariance of the initial state estimate. If unsure about initial state, set to a large value

Public Methods

bool Equals(object obj)

int GetHashCode()

Type GetType()

void Predict(Matrix<double> F)

Perform a discrete time prediction of the system state.
Parameters
Matrix<double> F

State transition matrix.

void Predict(Matrix<double> F, Matrix<double> Q)

Preform a discrete time prediction of the system state.
Performs a prediction of the next state of the Kalman Filter, where there is plant noise. The covariance matrix of the plant noise, in this case, is a square matrix corresponding to the state transition and the state of the system.
Parameters
Matrix<double> F

State transition matrix.

Matrix<double> Q

A plant noise covariance matrix.

void Predict(Matrix<double> F, Matrix<double> G, Matrix<double> Q)

Perform a discrete time prediction of the system state.
Performs a prediction of the next state of the Kalman Filter, given a description of the dynamic equations of the system, the covariance of the plant noise affecting the system and the equations that describe the effect on the system of that plant noise.
Parameters
Matrix<double> F

State transition matrix.

Matrix<double> G

Noise coupling matrix.

Matrix<double> Q

Plant noise covariance.

string ToString()

void Update(Matrix<double> z, Matrix<double> H, Matrix<double> R)

Updates the state of the system based on the given noisy measurements, a description of how those measurements relate to the system, and a covariance Matrix to describe the noise of the system.
Parameters
Matrix<double> z

The measurements of the system.

Matrix<double> H

Measurement model.

Matrix<double> R

Covariance of measurements.

Public Properties

Matrix<double> Cov get;

The covariance of the current state of the filter. Higher covariances indicate a lower confidence in the state estimate.

Matrix<double> State get;

The best estimate of the current state of the system.