[Bayes++] Bayes++ EKF Example Request
Brought to you by:
mistevens
From: Nithya N. V. <nvi...@cs...> - 2006-07-25 15:37:18
|
Hi, I am working on a prediction system implemented using Extended Kalman filters. Ideally, my system would take a set of time series data points and fill in any missing values. I have installed Bayes++ and tried out the examples. I am looking for more examples on extended kalman filters implemented using Bayes++. As a novice to Kalman filters, I greatly appreciate any help. To begin with, I am working on extending the position velocity example to take in a set of observations made at 10 time points, update the kalman filter and then predict the observations for the 11th through 15th time points. I would like to use EKF. I wrote a simple example using the kalman filter toolbox in matlab. I appreciate any help in coding this up in Bayes++. The partial code in matlab is as follows. ------position_velocity.m---------- %Take as observation vector and velocity vector values %set F, H, Q, R values ss = 2; % state size os = 1; % observation size F = [1 dt; ... 0 1]; H = [1 0]; Q = 0.1*eye(ss); R = 1*eye(os); initx = [obsVec(1); velVec(1)] initV = 10*eye(ss) %first 10 observations. perform kalman update T = 10; xfilt(:,1) = initx; Vfilt(:,:,1) = initV; for i = 2:T [xfilt(:,i), Vfilt(:,:,i)] = kalman_update(F, H, Q, R, obsVec(i), ... xfilt(:,i-1), Vfilt(:,:,i-1), 'initial', 0); end %predict next 5 values x = [obsVec; velVec]; temp = zeros(2,2); for i=T:T+5 %calculate next position temp = F*xfilt(:,i-1); %update filter [xfilt(:,i), Vfilt(:,:,i)] = kalman_update(F, H, Q, R, temp(1), ... xfilt(:,i-1),Vfilt(:,:,i-1), 'initial', 0); end thanks, Nithya |