0% found this document useful (0 votes)
17 views24 pages

Introduction to Particle Filter

Uploaded by

Alaa Awaysa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views24 pages

Introduction to Particle Filter

Uploaded by

Alaa Awaysa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Introduction to Particle Filter

Monte Carlo Estimation


Monte Carlo methods:
are a broad class of computational algorithms that rely on
repeated random sampling to obtain numerical results.
Monte Carlo Estimation
• Estimation of p
area of the circle 𝜋𝑟 2 𝜋
• = =
area of the square 4𝑟 2 4

area of the circle


• 𝜋 =4∙
area of the square

no.of points in the circle


• 𝜋 =4∙
no.of points in the square
Note: In particle filter algorithm we called each point a particle
Monte Carlo Estimation
• The Algorithm

1. circle_points=0, square_points=0
2. While #iterations not reached
i. Generate random point x between 0 and 1.
ii. Generate random point y between 0 and 1.
iii. Calculate d = x*x + y*y.
iv. If d <= 1, then increment circle_points
v. Increment square_points.
3. End while
9. Calculate pi = 4*(circle_points/square_points).
10. Terminate.
Convergence
The robot localization problem
The process of determining where a
mobile robot is located with respect to
its environment
Robot sensors

Sonar
To perform localization, the
robot relies on:
1. Its sensor information about
its current state
2. An implicit map of the
environment
3. The context. How the robot
reach here
• PF algorithm is iterative and
time dependent

• The robot position is updated


Using its motion and sensor
information
Example
• Given 6 particles 3 on the street and
3 on the while lane markers
• Assume
• P(bright |on the lane maker) =0.8
• P(dark |off the lane marker) =0.9
• The robot sensor values: Z={bright, dark}
• Assume Z=bright, assign a weight values for
each of the 6 particles
Answer
Z=bright
• P(bright |on the lane maker) =0.8
• P(dark |off the lane marker) =0.9
➔P(bright |off the lane marker) =1-0.9 = 0.1
• Particle weights are {0.8,0.8,0.8,0.1,0.1,0.1}
Sum of weights =2.7
• But need the sum of weights will be 1
• Normalized particles will be:
0.8 0.8 0.8 0.1 0.1 0.1
• { , , , , , }
2.7 2.7 2.7 2.7 2.7 2.7
Particle
• A particle: a representation of robot location and its
corresponding belief value
• A Particle 𝑝 = { 𝑥, 𝑦, 𝜃 , 𝑤}
• 𝑥, 𝑦, 𝜃 : A coordinate/position information
• 𝑤 ∶ a weight reflecting the particle belief

• Particle positions are updated by the robot controller


• Particle weight is updated based on to the sensor information
Sampling
• Each round in the PF algorithm a particle is sampled proportional
to its weight 𝑤
• Sampling is performed with replacement
Particle Filter Algorithm
1
Sample a particle
𝑝∝𝑤

𝑺𝒕−𝟏 𝑺𝒕

# 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛 # 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛
Sum of particle weights 𝜼 = 1 Sum of particle weights 𝜼 = 1
Particle Filter Algorithm
2
update the particle
position 𝑝𝑥 ∝ 𝑢𝑡

𝑺𝒕−𝟏 𝑺𝒕

# 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛 # 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛
Sum of particle weights 𝜼 = 1 Sum of particle weights 𝜼 = 1
Particle Filter Algorithm
3
update the particle
weight 𝑝𝑤 ∝ 𝑧𝑡

𝑺𝒕−𝟏 𝑺𝒕

# 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛 # 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛
Sum of particle weights = 1 Sum of particle weights = 1
Particle Filter Algorithm
4
Add the particle p
to 𝑺𝒕

𝑺𝒕−𝟏 𝑺𝒕

# 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛 # 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛
Sum of particle weights = 1 Sum of particle weights = 1
Particle Filter Algorithm
5
U𝑝𝑑𝑎𝑡𝑒 𝜼

𝑺𝒕−𝟏 𝑺𝒕

# 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛 # 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛
Sum of particle weights = 1 Sum of particle weights = 1
Particle Filter Algorithm

𝑺𝒕−𝟏 Repeat n times 𝑺𝒕

# 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛 # 𝑝𝑎𝑟𝑡𝑖𝑐𝑙𝑒𝑠 = 𝑛
Sum of particle weights = 1 Sum of particle weights = 1
Rolette wheel sampling
• Assume the following chart represents the weights of 5 particles
in 𝑺𝒕−𝟏
• Since the sampling is proportional to the weight we may have:
𝑺𝒕 = {𝒑𝟓, 𝒑𝟒, 𝒑𝟑, 𝒑𝟓, 𝒑𝟒}
Rolette wheel sampling
• Assume the following chart represents the weights of 5 particles
in 𝑺𝒕−𝟏
• Since the sampling is proportional to the weight we may have:
𝑺𝒕 = {𝒑𝟓, 𝒑𝟒, 𝒑𝟑, 𝒑𝟓, 𝒑𝟒}

p1 p4
p4
p2
p3 p3

p5 p5

You might also like