=
k k
k k
k k
k k
p
p
p
p z x
z z
x z
z x
}
+ +
=
k k k k k k k
d p p p x z x x x z x ) | ( ) | ( ) | (
: 1 1 : 1 1
12 Nov 2004 22
Meaning of the densities
Bearings-only tracking problem
p(x
k
|z
1:k
) posterior
What is the probability that the object is at the location x
k
for
all possible locations x
k
if the history of measurements is
z
1:k
?
p(x
k
|x
k-1
) prior
The motion model where will the object be at time instant k
given that it was previously at x
k-1
?
p(z
k
|x
k
) likelihood
The likelihood of making the observation z
k
given that the
object is at the location x
k
.
12 Nov 2004 23
Bayesian filtering - problems
Optimal solution in the sense of computing posterior
The solution is conceptual because integrals are not
tractable
Closed form solutions are possible in a small number
of situations
Gaussian noise process and linear state space model
Optimal estimation using the Kalman filter
Idea: use Monte Carlo techniques
12 Nov 2004 24
Monte Carlo method
Example: Estimate the variance of a zero mean Gaussian
process
Monte Carlo approach:
1. Simulate M random variables from a Gaussian distribution
2. Compute the average
dx x p x v ) (
2
}
+
=
) , 0 ( ~
2 ) (
o N x
m
=
=
M
m
m
x
M
v
1
2 ) (
) (
1
12 Nov 2004 25
Importance sampling
Classical Monte Carlo integration Difficult to draw
samples from the desired distribution
Importance sampling solution:
1. Draw samples from another (proposal) distribution
2. Weight them according to how they fit the original distribution
Free to choose the proposal density
Important:
It should be easy to sample from the proposal density
Proposal density should resemble the original density as
closely as possible
12 Nov 2004 26
Importance sampling
Evaluation of integrals
Monte Carlo approach:
1. Simulate M random variables from proposal density t(x)
2. Compute the average
dx x
x
x p
x f dx x p x f X f E
X X
) (
) (
) (
) ( ) ( ) ( )) ( ( t
t
} }
= =
) ( ~
) (
x x
m
t
=
~
M
m
w
m
m
m
m
x
x p
x f
M
x f E
1
) (
) (
) (
) (
) (
) (
) (
1
)) ( (
t
12 Nov 2004 27
Outline
Motivation
Applications
Fundamental concepts
Sample importance resampling
Advantages and disadvantages
Implementation of particle filters in hardware
12 Nov 2004 28
Sequential importance sampling
Idea:
Update filtering density using Bayesian filtering
Compute integrals using importance sampling
The filtering density p(x
k
|z
1:k
) is represented using
particles and their weights
Compute weights using:
{ }
M
m
m
k
m
k
w x
1
) ( ) (
,
=
) , (
) , (
: 1
) (
: 1
) (
) (
k
m
k
k
m
k m
k
z x
z x p
w
t
=
x
Posterior
12 Nov 2004 29
Sequential importance sampling
Let the proposal density be equal to the prior
Particle filtering steps for m=1,,M:
1. Particle generation
2a. Weight computation
2b. Weight normalization
3. Estimate computation
) | ( ~
1
) (
k k
m
k
x x p x
) | (
) ( ) *(
1
) *( m
k k
m
k
m
k
x z p w w
=
=
=
M
m
m
k
m
k
m
k
w
w
w
1
) *(
) *(
) (
=
=
M
m
m
k
m
k k k
w x g z x g E
1
) ( ) (
: 1
) ( )) | ( (
12 Nov 2004 30
Resampling
Problems:
Weight Degeneration
Wastage of computational resources
Solution RESAMPLING
Replicate particles in proportion to their weights
Done again by random sampling
{ }
M
m
m
k
m
k
M
m
m
k
w x
M
x
1
) ( ) (
1
) (
~
, ~
1
,
=
=
)
`
12 Nov 2004 31
Resampling
M
m
m
k
M
x
1
) (
1
1
,
=
)
`
x
{ }
M
m
m
k
m
k
w x
1
) ( ) (
,
=
M
m
m
k
M
x
1
) (
~
1
,
=
)
`
M
m
m
k
M
x
1
) (
1
1
,
=
+
)
`
{ }
M
m
m
k
m
k
w x
1
) (
1
) (
1
,
= + +
M
m
m
k
M
x
1
) (
1
~
1
,
=
+
)
`
M
m
m
k
M
x
1
) (
2
1
,
=
+
)
`
12 Nov 2004 32
Particle filtering algorithm
Initialize
particles
Output
Output estimates
1 2
M . . .
Particle
generation
New observation
Exit
Normalize weights
1 2
M . . .
Weigth
computation
Resampling
More
observations?
yes
no
12 Nov 2004 33
Bearings-only tracking example
MODEL
States:
x
k
=[x
k
, V
xk
, y
k
, V
yk
]
T
Observations: z
k
Noise
State equation:
x
k
=Fx
k-1
+ Gu
k
Observation
equation:
z
k
=atan(y
k
/ x
k
)+v
k
ALGORITHM
Particle generation
Generate M random numbers
Particle computation
Weight computation
Weight normalization
Resampling
Computation of the estimates
) (
~
(m)
k
m
k
(m)
k
G F u x x + =
) , atan (
2
) (
) (
) *(
v
m
k
m
k
k
m
k
x
y
z w o =
) , ~N(
u
(m)
k
2
0 u
) , ~N( v ) , ~N(
v k u k
2 2
0 , 0 u
{ }
M
m
m
k
m
k
M
m
m
k w
M
1
) ( ) (
1
) (
~
, ~
1
,
=
=
)
`
x x
12 Nov 2004 34
Bearings-Only Tracking Example
12 Nov 2004 35
Bearings-Only Tracking Example
12 Nov 2004 36
Bearings-Only Tracking Example
12 Nov 2004 37
General particle filter
If the proposal is a prior density, then there can be
a poor overlap between the prior and posterior
Idea: include the observations into the proposal
density
This proposal density minimize
) , | ( ) , | (
) (
1
1
k
m
k k k k
z x x p z x x
k
=
t
) (
) *(m
k
w Var
12 Nov 2004 38
Outline
Motivation
Applications
Fundamental concepts
Sample importance resampling
Advantages and disadvantages
Implementation of particle filters in hardware
12 Nov 2004 39
Advantages of particle filters
Ability to represent arbitrary densities
Adaptive focusing on probable regions of
state-space
Dealing with non-Gaussian noise
The framework allows for including multiple
models (tracking maneuvering targets)
12 Nov 2004 40
Disadvantages of particle filters
High computational complexity
It is difficult to determine optimal number of
particles
Number of particles increase with increasing
model dimension
Potential problems: degeneracy and loss of
diversity
The choice of importance density is crucial
12 Nov 2004 41
Variations
Rao-Blackwellization:
Some components of the model may have linear
dynamics and can be well estimated using a
conventional Kalman filter.
The Kalman filter is combined with a particle filter to
reduce the number of particles needed to obtain a
given level of performance.
12 Nov 2004 42
Variations
Gaussian particle filters
Approximate the predictive and filtering density with
Gaussians
Moments of these densities are computed from the
particles
Advantage: there is no need for resampling
Restriction: filtering and predictive densities are
unimodal
12 Nov 2004 43
Outline
Motivation
Applications
Fundamental concepts
Sample importance resampling
Advantages and disadvantages
Implementation of particle filters in hardware
12 Nov 2004 44
Challenges and results
Challenges
Reducing computational complexity
Randomness difficult to exploit regular structures in VLSI
Exploiting temporal and spatial concurrency
Results
New resampling algorithms suitable for hardware
implementation
Fast particle filtering algorithms that do not use memories
First distributed algorithms and architectures for particle
filters
12 Nov 2004 45
Complexity
4M random number generations
Propagation of the particles
M exponential and arctangent functions
Bearings-only tracking problem
Number of particles M=1000
Complexity
Initialize
particles
Output
Output
estimates
1 2
M . . .
Particle
generation
New observation
Exit
Normalize weights
1 2
M . . .
Weigth
computation
Resampling
More
observations?
yes
no
12 Nov 2004 46
Mapping to the parallel architecture
Processing
Element 1
Processing
Element 4
Processing
Element 2
Central
Unit
Start
New observation
Exit
1 2
M . . .
Particle
generation
Resampling
1 2
M . . .
Weight
computation
Propagation
of particles
Processing
Element 3
Processing elements (PE)
Particle generation
Weight Calculation
Central Unit
Algorithm for particle
propagation
Resampling
1 M
1 M
12 Nov 2004 47
PE 2 PE 1 PE 3 PE 4
Propagation of particles
Processing
Element 1
Processing
Element 4
Processing
Element 2
Central
Unit
Processing
Element 3
Disadvantages of the particle
propagation step
Random communication pattern
Decision about connections is
not known before the run time
Requires dynamic type of a
network
Speed-up is significantly
affected
Particles after
resampling
p
12 Nov 2004 48
Parallel resampling
1 2
3 4
N=13 N=0
N=0 N=3
1
4
4
1 2
3 4
N=8 N=0
N=0 N=8
4
4
1 2
3 4
N=4 N=4
N=4 N=4
1
1
1 1
Solution
The way in which Monte Carlo sampling is performed is modified
Advantages
Propagation is only local
Propagation is controlled in advance by a designer
Performances are the same as in the sequential applications
Result
Speed-up is almost equal to the number of PEs (up to 8 PEs)
12 Nov 2004 49
PE1
PE2 PE4
PE3
Central
Unit
Architectures for parallel resampling
Controlled particle propagation after resampling
Architecture that allows adaptive connection among the
processing elements
12 Nov 2004 50
1
2
4
8
16
32
1
10
100
1000
1 10 100
Number of PEs
S
a
m
p
l
e
p
e
r
i
o
d
(
u
s
)
500
1000
5000
10000
50000
Virtex II Pro design space
K=14
Number of
particles M
Limit: Available memory
Limit: Logic blocks
Space exploration
Hardware platform is Xilinx Virtex-II Pro
Clock period is 10ns
PFs are applied to the bearings-only tracking problem
12 Nov 2004 51
Summary
Very powerful framework for estimating parameters
of non-linear and non-Gaussian models
Main research directions
Finding new applications for particle filters
Developing variations of particle filters which have reduced
complexity
Finding the optimal parameters of the algorithms (number
of particles, divergence tests)
Challenge
Popularize the particle filter so that it becomes a standard
tool for solving many problems in industry