View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Particle filter tutorial

4.2 | 6 ratings Rate this file 161 Downloads (last 30 days) File Size: 4.88 KB File ID: #35468 Version: 1.1
image thumbnail

Particle filter tutorial



05 Mar 2012 (Updated )

Implementation of the generic particle filter

| Watch this File

File Information

This file implements the particle filter described in

Arulampalam et. al. (2002). A tutorial on particle filters for online nonlinear/non-gaussian bayesian tracking. IEEE Transactions on Signal Processing. 50 (2). p 174--188

Heavily commented code included

Required Products Statistics and Machine Learning Toolbox
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
10 Feb 2017 mau

mau (view profile)

Hello, is there anybody found a solution to the problem of having more than one observation?

Comment only
17 Jan 2017 Simon Mpasi

I want to verify that this is good code.

Comment only
23 Oct 2016 Ilias Konsoulas

07 Jun 2016 manh 123

Particle filter is explained through example of color tracking in here:

Comment only
13 Apr 2016 Michael

Statistics and Machine Learning Toolbox

11 Apr 2016 pangpang jz


07 Oct 2013 Nima

Nima (view profile)

03 Oct 2013 droulias Roulias

add regularized PF

case 'regularized_pf'

edges = min([0 cumsum(wk)'],1); % protect against accumulated round-off
edges(end) = 1; % get the upper edge exact
u1 = rand/Ns;

[~, idx] = histc(u1:1/Ns:1, edges);
xk = xk(:,idx); % extract new particles
wk = repmat(1/Ns, 1, Ns); % now all particles have the same weight

%according to Mussao et al., 2001
% compute empirical covariance of particles
% form D'*D=emp_cov

%unit sphere volume (in two dimensions)
%form the optimal choice of bandwidth
% form an estimation of continuous pdf via epanechnikov kernel
[f,~] = ksdensity(wk,'npoints',length(wk),'kernel','epanechnikov');
% compute the cumulative of the continuous distribution
edges = min([0 cumsum(f)],1); % protect against accumulated round-off
edges(end) = 1; % get the upper edge exact
%sample from the inverse of cumulative of continuous density
u1 = rand/Ns;
[~, idx] = histc(u1:1/Ns:1, edges);
%move all samples to centre
% adjust resampled particles
xk = xk+hopt*dd*ee; % extract new particles
wk = repmat(1/Ns, 1, Ns);

16 Sep 2013 soheil

soheil (view profile)

Dear Dr. Alvarez,
I am using your Particle Filter code and that is great. Right now, I am changing that to solve my problem. The problem has observation likelihood with more than two dimensions. I was wondering how I can model observation likelihood "p_yk_given_xk". Any idea for that will be really appreciated.



Comment only
22 Jul 2013 Jesús Lucio

Thanks a lot.

20 Jun 2013 SaiNave

not helpful it is so complexed :(

Comment only
03 Nov 2012 eddieyang Yang


Comment only
14 Aug 2012 1.1

Changed title

Contact us