Re: [Bayes++] Bayes++ EKF Example Request
Brought to you by:
mistevens
From: Nicola B. <nb...@es...> - 2006-07-28 07:31:06
|
Nithya, Look at the documentation and the library's sources for the classes "Covariance_scheme", "Linrz_predict_model" and "Linrz_(un)correlated_observe_model" for the EKF implementation. Also, if you change "Unscented_scheme" with "Covariance_scheme" in the file "simpleExample.cpp", you have an example of classic Kalman Filter. Finally, if you didn't do it yet, take a look at this good introduction: http://www.cs.unc.edu/~welch/kalman/kalmanIntro.html Hope it helps. Nicola On Tuesday 25 Jul 2006 16:37, Nithya Nirmal Vijayakumar wrote: > 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 > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your opinions on IT & business topics through brief surveys -- and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Bayesclasses-general mailing list > Bay...@li... > https://lists.sourceforge.net/lists/listinfo/bayesclasses-general -- ------------------------------------------ Nicola Bellotto University of Essex Department of Computer Science Wivenhoe Park Colchester CO4 3SQ United Kingdom Room: 1N1.2.8 Tel. +44 (0)1206 874094 URL: http://privatewww.essex.ac.uk/~nbello ------------------------------------------ |