In the Kalman Filter the final covariance matrix is the estimate of the filter's uncertainty. How does one do so in Particle filters? Is it just the variance among the particles for each state?

If so, then how do you deal with crosscorrelation?


1 Answer 1


For a simple case, given a particle set, calculate the weighted sum of the particles by iterating over each particle $i$ in the set $N$: $$\mu_{x} = \Sigma_{I=1}^{N} w_{i} x_{i}$$ And then calculate the weighted covariance for each particle $i$ in the set $N$ and sum them up: $$P_{xx} = \Sigma_{I=1}^{N} w_{i} (x_{i}-\mu_{x})(x_{i}-\mu_{x})^{T}$$ Where $w_{i}$ is the weight of the i(th) particle and $x_{i}$ is the state vector (column vector in this case) represented by that particle.

  • $\begingroup$ Is the same true for Rao Blackwellized PF? $\endgroup$
    – rielt12
    Oct 6, 2020 at 15:11
  • $\begingroup$ I can't say with confidence if it is or is not, but I imagine there may be a difference, where for the "linear" states the mean and covariance is calculated with the Kalman update (and maybe takes some weighted approximation across all particles) and then for the nonlinear states the mean and covariance are calculated as above. But I am only speculating and would like to learn more myself. $\endgroup$
    – JJB_UT
    Oct 6, 2020 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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