Particle filter Flashcards
Particle Filter
The idea of the particle filter (PF: Particle Filter) is based on Monte Carlo methods, which use particle sets to represent probabilities and can be used in any form of state space model. The core idea is to express its distribution by extracting random state particles from the posterior probability.
* Particle Filters
* One particle represents a possible state matrix xt
* Many particles represent the believe of the robot χt
χ
χ is the believe of the robot expressed as the distribution of particles (i.e. a particle matrix)
input χt−1 , ut , zt
χt−1 : prior believe, algorithm will produce posterior χt
ut : update matrix (actions with unpredictable effect)
zt : observation matrix (noisy observations)
χ̄t = χt = 0
Prepare two empty particle collisions
χ̄t : to store the predicted particles
χt : to store the final result
for m = 1 to M do
Iterate over the M particles in χt−1
// Control update
[m] [m]
x t ∼ p ( x t | u t , x t −1 )
for particle m:
* calculate probability distribution for state xt given update ut and
[m]
previous state xt−1 )
[m]
* draw one state xt from this distribution
// Measurement update van χt !!
[m] [m]
wt = p(zt | xt )
Calculate weight wt for particle m based upon how likely zt is from state xt at particle m.
Based upon the definition of a probability distribution, weights are in [0,1].
[m] [m]
χ t = χ t + h x t , wt i
Add the particle and its weight to collection of predictions χ̄t .
endfor
End of first loop
// Resample the space
for m = 1 to M do
Visit the collection of particle-weight pairs χ̄t M times.
[m] [m]
draw xt from χt with probability ∝ wt or draw i with probability ∝ wt
Draw with repetition a particle from χ̄t considering its weight. Store this particle in i.
Many particles with relatively high weights will be drawn several times!
Mind, the image shows two steps at once:
* you see the result of the election (three areas with dense particles).
* you see the effect of the robot moving two meters to the right.
// Construeer χt
[m]
χt = χt + xt
Add the selected particles to χt as it weight is no longer needed.
endfor
return χt
We’ve done it! return Xt (the final result)