2
$\begingroup$

I have a doubt with likelihood calculation in particle filtering.

In my understanding the particle filter consists of the following steps

  1. Generate particles from initial point

  2. Propagate through system model ($X_p(k) = A*X_f(k-1) + Q$) (I am generating Gaussian noise and adding to state equation based on $Q$ for each particle)

  3. Weight update using likelihood calculation For likelihood calculation I need measurement from sensor (with Gaussian noise) and predicted measurement

    For the predicted measurements, I have to use the measurement equation $$y = H*x + R$$ For each particle I have to calculate corresponding $y$ value.

    Should I generate Gaussian noise based of R for every particle while calculating predicted measurement y?

In the Kalman filter we use $y = H*x$ ( since we are calculating mean), what should I do in particle filter...?

$\endgroup$
2
$\begingroup$

Just compute the likelihood of data given the particles. For 1-d

normpdf(y(k),x_particles,standard_dev_of_noise)

For multi-dimensional case

mvnpdf(y(k),H*x_particles,R)

These will be your weights. Then get the resampling indices according to your favorite resampling algorithm and resample your particles.

$\endgroup$
1
$\begingroup$

Additions to the above answer:

  • The likelihoods are not your weights. You need to multiply them with your weight at time k-1.

  • Also you should normalize the weights before resampling.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.