KalmanFilter

The module implements a standard Kalman filter. The process is described by the equation x(t+1) = Ax(t)+Bu(t), where x is the state of the process and u is the control input. The observation (or measurement) is described by Hz(t). The a priori process variance is set by the parameter process_noise and the measurement variance by observation_noise.

Example XML definition

A simple example

  <module
      class = "KalmanFilter"
      name = "KalmanFilter"
      observation_size = "1"
      state_size = "1"
      A = ""
      B = ""
      H = ""
  />

Parameters

NameDescriptionTypeDefault
classThe class name for the module; must be "KalmanFilter".string
nameThe name of this instance of the module.string
AThe state transition matrix (state gain) [n x n]matrix
BThe input gain [n x m]matrix
HThe output gain [m x n]matrix
state_sizeThe size of the stateint1
observation_sizeThe size of the observation (measurement noise)int1
process_noiseNoise for the processfloat1
observation_noiseNoise for each observationfloat1

Module Connections

Inputs

NameDescription
INPUTThe input [1 x m]
OBSERVATIONThe observation [1 x m]

Outputs

NameDescription
STATEThe state [n x 1]
INNOVATIONThe state [m x 1]
KALMAN_GAINThe Kalman gain [n x m]

Limitations

It should be possible to specify the full covariance matrices for the process and measurements (R and Q).

The matrices A, B and H should also be able to use inputs instead of parameters.

Observation and state sizes should be inferred from the matrix parameters.

Author

Christian Balkenius
christian.balkenius@lucs.lu.se
Lund Univeristy Cognitive Science

Files

KalmanFilter.h
KalmanFilter.cc
KalmanFilter.ikc

blog comments powered by Disqus