Particle Filters Pieter Abbeel UC Berkeley EECS
description
Transcript of Particle Filters Pieter Abbeel UC Berkeley EECS
![Page 1: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/1.jpg)
Particle Filters
Pieter AbbeelUC Berkeley EECS
Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics
![Page 2: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/2.jpg)
2
For continuous spaces: often no analytical formulas for Bayes filter updates
Solution 1: Histogram Filters: (not studied in this lecture) Partition the state space Keep track of probability for each partition Challenges:
What is the dynamics for the partitioned model? What is the measurement model? Often very fine resolution required to get reasonable results
Solution 2: Particle Filters: Represent belief by random samples Can use actual dynamics and measurement models Naturally allocates computational resources where required (~
adaptive resolution) Aka Monte Carlo filter, Survival of the fittest, Condensation,
Bootstrap filter
Motivation
![Page 3: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/3.jpg)
Sample-based Localization (sonar)
![Page 4: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/4.jpg)
Given a sample-based representation of Bel(xt) = P(xt | z1, …, zt, u1, …, ut)
Find a sample-based representation of Bel(xt+1) = P(xt+1 | z1, …, zt, zt+1 , u1, …, ut+1)
Problem to be Solved
![Page 5: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/5.jpg)
Given a sample-based representation of Bel(xt) = P(xt | z1, …, zt, u1, …, ut)
Find a sample-based representation of P(xt+1 | z1, …, zt, u1, …, ut+1)
Solution: For i=1, 2, …, N
Sample xit+1 from P(Xt+1 | Xt = xi
t)
Dynamics Update
![Page 6: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/6.jpg)
Sampling Intermezzo
![Page 7: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/7.jpg)
Given a sample-based representation of P(xt+1 | z1, …, zt)
Find a sample-based representation ofP(xt+1 | z1, …, zt, zt+1) = C * P(xt+1 | z1, …, zt) *
P(zt+1 | xt+1)
Solution: For i=1, 2, …, N
w(i)t+1 = w(i)
t* P(zt+1 | Xt+1 = x(i)t+1)
the distribution is represented by the weighted set of samples
Observation update
![Page 8: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/8.jpg)
Sample x11, x2
1, …, xN1 from P(X1)
Set wi1= 1 for all i=1,…,N
For t=1, 2, … Dynamics update:
For i=1, 2, …, N Sample xi
t+1 from P(Xt+1 | Xt = xit)
Observation update: For i=1, 2, …, N
wit+1 = wi
t* P(zt+1 | Xt+1 = xit+1)
At any time t, the distribution is represented by the weighted set of samples
{ <xit, wi
t> ; i=1,…,N}
Sequential Importance Sampling (SIS) Particle Filter
![Page 9: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/9.jpg)
The resulting samples are only weighted by the evidence
The samples themselves are never affected by the evidence
Fails to concentrate particles/computation in the high probability areas of the distribution P(xt | z1, …, zt)
SIS particle filter major issue
![Page 10: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/10.jpg)
At any time t, the distribution is represented by the weighted set of samples { <xi
t, wit> ; i=1,…,N}
Sample N times from the set of particles The probability of drawing each particle is given
by its importance weight
More particles/computation focused on the parts of the state space with high probability mass
Sequential Importance Resampling (SIR)
![Page 11: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/11.jpg)
1. Algorithm particle_filter( St-1, ut , zt):2.
3. For Generate new samples
4. Sample index j(i) from the discrete distribution given by wt-
1
5. Sample from using and
6. Compute importance weight
7. Update normalization factor
8. Insert
9. For
10. Normalize weights
0, tS
ni 1
},{ it
ittt wxSS
itw
itx )(
1ij
tx
)|( itt
it xzpw
ni 1
/it
it ww
![Page 12: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/12.jpg)
Particle Filters
![Page 13: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/13.jpg)
)|()(
)()|()()|()(
xzpxBel
xBelxzpw
xBelxzpxBel
Sensor Information: Importance Sampling
![Page 14: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/14.jpg)
'd)'()'|()( , xxBelxuxpxBel
Robot Motion
![Page 15: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/15.jpg)
)|()(
)()|()()|()(
xzpxBel
xBelxzpw
xBelxzpxBel
Sensor Information: Importance Sampling
![Page 16: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/16.jpg)
Robot Motion 'd)'()'|()( , xxBelxuxpxBel
![Page 17: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/17.jpg)
20
![Page 18: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/18.jpg)
21
![Page 19: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/19.jpg)
22
![Page 20: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/20.jpg)
23
![Page 21: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/21.jpg)
24
![Page 22: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/22.jpg)
25
![Page 23: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/23.jpg)
26
![Page 24: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/24.jpg)
27
![Page 25: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/25.jpg)
28
![Page 26: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/26.jpg)
29
![Page 27: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/27.jpg)
30
![Page 28: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/28.jpg)
31
![Page 29: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/29.jpg)
32
![Page 30: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/30.jpg)
33
![Page 31: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/31.jpg)
34
![Page 32: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/32.jpg)
35
![Page 33: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/33.jpg)
36
![Page 34: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/34.jpg)
37
![Page 35: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/35.jpg)
42
Summary – Particle Filters Particle filters are an implementation of
recursive Bayesian filtering They represent the posterior by a set of
weighted samples They can model non-Gaussian
distributions Proposal to draw new samples Weight to account for the differences
between the proposal and the target
![Page 36: Particle Filters Pieter Abbeel UC Berkeley EECS](https://reader036.fdocuments.us/reader036/viewer/2022081520/568160c0550346895dcfe61f/html5/thumbnails/36.jpg)
43
Summary – PF Localization In the context of localization, the particles are
propagated according to the motion model. They are then weighted according to the
likelihood of the observations. In a re-sampling step, new particles are drawn
with a probability proportional to the likelihood of the observation.