Code covered by the BSD License  

Highlights from
UD Factorization & Kalman Filtering

UD Factorization & Kalman Filtering

by

 

15 Aug 2011 (Updated )

UD and LD factorization of nonnegative matrices and associated Kalman filter implementations.

[P,xhat]=kmftu(Phi,V,P,xhat,Gam,u)
function [P,xhat]=kmftu(Phi,V,P,xhat,Gam,u)
% KMFTU:  Discrete-time Kalman filter time update.
%
%         [P,xhat]=kmftu(Phi,V,P,xhat,Gam,u)
%
%         Phi : Discrete-time system state transition matrix
%         V   : Discrete-time system noise covariance matrix
%         P   : State covariance matrix
%         xhat: State estimate
%         Gam:  Discrete-time System control matrix
%         u:    Discrete-time control input
%
%         L.G. Van Willigenburg, W.L. De Koning, 10-01-2002.

if nargin<3; error(' KMFTU requires 3,4 or 6 Input Argments'); end
P=Phi*P*Phi'+V;  
if nargin==3
  xhat=[];
elseif nargin==4
  xhat=Phi*xhat;
elseif nargin==6
  xhat=Phi*xhat+Gam*u;
else
  error(' KMFTU requires 3,4 or 6 Input Argments');
end

Contact us