MATLAB File Help: cv.KalmanFilter Index
cv.KalmanFilter

Kalman filter class

The class implements a standard Kalman filter http://en.wikipedia.org/wiki/Kalman_filter, [Welch95]. However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get an extended Kalman filter functionality.

Example

% initialization
kf = cv.KalmanFilter(4,2);
kf.statePre = [10;20;0;0]; % initial state prediction
kf.transitionMatrix = [1,0,1,0; 0,1,0,1; 0,0,1,0; 0,0,0,1];
kf.measurementMatrix([1,4]) = 1;
kf.processNoiseCov = eye(4) * 1e-4;
kf.measurementNoiseCov = eye(2) * 1e-1;
kf.errorCovPost = eye(4) * 0.1;

% dynamics
p_pred = kf.predict();       % update internal state
measure = [11;21];           % measurement
p_est = kf.correct(measure); % correct

References

[Welch95]:

Greg Welch and Gary Bishop. An introduction to the kalman filter, 1995. http://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf

See also
Class Details
Superclasses handle
Sealed false
Construct on load false
Constructor Summary
KalmanFilter KalmanFilter constructor 
Property Summary
controlMatrix control matrix `(B)` (not used if there is no control) 
errorCovPost posteriori error estimate covariance matrix 
errorCovPre priori error estimate covariance matrix 
gain Kalman gain matrix `(K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R`) 
id Object id 
measurementMatrix measurement matrix `(H)` 
measurementNoiseCov measurement noise covariance matrix `(R)` 
processNoiseCov process noise covariance matrix `(Q)` 
statePost corrected state `(x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k))` 
statePre predicted state `(x'(k)): x(k)=A*x(k-1)+B*u(k)` 
transitionMatrix state transition matrix `(A)` 
Method Summary
  addlistener Add listener for event. 
  correct Updates the predicted state from the measurement 
  delete Destructor 
  eq == (EQ) Test handle equality. 
  findobj Find objects matching specified conditions. 
  findprop Find property of MATLAB handle object. 
  ge >= (GE) Greater than or equal relation for handles. 
  gt > (GT) Greater than relation for handles. 
  init Re-initializes Kalman filter. The previous content is destroyed 
Sealed   isvalid Test handle validity. 
  le <= (LE) Less than or equal relation for handles. 
  lt < (LT) Less than relation for handles. 
  ne ~= (NE) Not equal relation for handles. 
  notify Notify listeners of event. 
  predict Computes a predicted state