Академический Документы
Профессиональный Документы
Культура Документы
Introduction
Dynamic System
Bayesian Filters
an overview Kalman Filter
Grid-Based Filter
Particle Filter
Experiments
Summary
Matthias Muhlich Page 1 of 45
JJ II
Institut fur Angewandte Physik J I
J.W.Goethe-Universitat Frankfurt
muehlich@iap.uni-frankfurt.de
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Particle Filters Title Page
Introduction
Dynamic System
Bayesian Filters
a tutorial Kalman Filter
Grid-Based Filter
Particle Filter
Experiments
Summary
Matthias Muhlich Page 2 of 45
JJ II
Institut fur Angewandte Physik J I
J.W.Goethe-Universitat Frankfurt
muehlich@iap.uni-frankfurt.de
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
1 Introduction
An increasing number of researchers is using a family of
Title Page
techniques and algorithms called Introduction
Dynamic System
condensation algorithms Bayesian Filters
Kalman Filter
bootstrap filtering Grid-Based Filter
Search
The question of this talk is: What is behind all that?
Close
Filter-Workshop
Bucuresti 2003
General Classification of Filter Strategies
Gaussian models:
Title Page
Page 4 of 45
unscented filter JJ II
central difference filter J I
divided difference filter - ,
assumed density filter / moment matching Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Mixture of Gaussian models:
histogram filter JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Some Basic Remarks
various applications: computer vision (i.e. tracking),
control theory, econometrics (stock markets, mone- Title Page
Introduction
tary flow, interest rates), . . . Dynamic System
Bayesian Filters
we deal with discrete time systems only Kalman Filter
Grid-Based Filter
Search
Close
Filter-Workshop
Bucuresti 2003
Overview of this Talk
The Dynamic System Model
Title Page
Bayesian Filter Approach Introduction
Dynamic System
Page 7a of 45
JJ II
states of a system and state transition equation J I
measurement equation - ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Overview of this Talk
The Dynamic System Model
Title Page
Bayesian Filter Approach Introduction
Dynamic System
Page 7b of 45
JJ II
estimation of the state J I
probabilistic modelling - ,
Full Screen
Bayesian filter
Search
Close
Filter-Workshop
Bucuresti 2003
Overview of this Talk
The Dynamic System Model
Title Page
Bayesian Filter Approach Introduction
Dynamic System
Page 7c of 45
JJ II
filtered pdf can be written down easily, but it is not J I
always tractable ( ugly integrals . . . ) - ,
conditions under which optimal solutions exist: Kalman Full Screen
filter and grid-based filter Search
Page 7d of 45
JJ II
standard particle filter J I
various improved versions - ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Overview of this Talk
The Dynamic System Model
Title Page
Bayesian Filter Approach Introduction
Dynamic System
Page 7e of 45
JJ II
some experimental data and conclusion J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
2 Dynamic System
A dynamic system can be modelled with two equations:
Title Page
Introduction
Dynamic System
State Transition or Evolution Equation Bayesian Filters
Kalman Filter
Grid-Based Filter
Particle Filter
Experiments
xk = fk (xk1 , uk1 , vk1 ) Summary
Page 8 of 45
f (, , ): evolution function (possible non-linear) JJ II
xk , xk1 IRnx : current and previous state
J I
vk1 IRnv : state noise (usually not Gaussian)
uk1 IRnu : known input - ,
Full Screen
Note: state only depends on previous state, i.e. first order Search
Search
Close
Filter-Workshop
Bucuresti 2003
k-1 k k+1 time
Page 10a of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
k-1 k k+1 time
z k-1
measurements Title Page
measurement (observed) Introduction
process Dynamic System
Bayesian Filters
Kalman Filter
states Grid-Based Filter
x k-1 (cannot be observed and Particle Filter
have to be estimated) Experiments
Summary
Page 10b of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
k-1 k k+1 time
z k-1
measurements Title Page
(observed) Introduction
Dynamic System
Bayesian Filters
Kalman Filter
states Grid-Based Filter
x k-1 xk (cannot be observed and Particle Filter
have to be estimated) Experiments
Page 10c of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
k-1 k k+1 time
z k-1 zk
measurements Title Page
(observed) Introduction
Dynamic System
Bayesian Filters
Kalman Filter
states Grid-Based Filter
x k-1 xk (cannot be observed and Particle Filter
have to be estimated) Experiments
Summary
Page 10d of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
k-1 k k+1 time
z k-1 zk z k+1
measurements Title Page
(observed) Introduction
Dynamic System
Bayesian Filters
Kalman Filter
states Grid-Based Filter
x k-1 xk x k+1 (cannot be observed and Particle Filter
have to be estimated) Experiments
Summary
Page 10e of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
k-1 k k+1 time
z k-1 zk z k+1
measurements Title Page
(observed) Introduction
p(z k |x k )
Dynamic System
(measurements
only depend on Bayesian Filters
state Kalman Filter
states Grid-Based Filter
x k-1 xk x k+1 (cannot be observed and Particle Filter
have to be estimated)
p(x k |x k-1) Experiments
(first order Markov process) Summary
Page 10f of 45
Assumptions: JJ II
The observations are conditionally independent given the J I
state: p(zk |xk ). - ,
Full Screen
Hidden Markov Model (HMM):
p(x0 ) given and p(xk |xk1 ) defines state transition prob- Search
ability for k 1. Close
Filter-Workshop
Bucuresti 2003
3 Bayesian Filters
Estimating the Posterior Title Page
Introduction
Bayesian approach: We attempt to construct the posterior Dynamic System
Bayesian Filters
pdf of the state given all measurements. Kalman Filter
Grid-Based Filter
can be termed a complete solution to the estimation Particle Filter
problem because all available information is used; from Experiments
Summary
the pdf, an optimal estimate can theoretically be found
Page 11 of 45
for any criterion.
JJ II
in detail: We seek estimates of xk based on all available
J I
measurements up to time k (abbreviated as z1:k ) by con-
structing the posterior p(xk |z1:k ). - ,
Full Screen
Assumption: initial state pdf (prior) p(x0 ) is given
Search
Close
Filter-Workshop
Bucuresti 2003
The Use of Knowing the Posterior
Let fk : IR(k+1)nx IR be any arbitrary (integrable) func-
tion that can depend Title Page
Introduction
Dynamic System
on all components of the state x Bayesian Filters
Kalman Filter
Z Dynamic System
Bayesian Filters
p(xk |z1:k1 ) = p(xk |xk1 )p(xk1 |z1:k1 )dxk1 (1) Kalman Filter
Grid-Based Filter
Particle Filter
This is the prior of the state xk at time k without knowl- Experiments
Summary
edge of the measurement zk , i.e. the probability given only
Page 14 of 45
previous measurements.
JJ II
Update step: (compute posterior pdf from predicted prior
pdf and new measurement) J I
- ,
p(zk |xk )p(xk |z1:k1 ) Full Screen
p(xk |z1:k ) = (2)
p(zk |z1:k1 ) Search
Close
Filter-Workshop
Bucuresti 2003
Let us prove formula (2) (just in order to train calculations
with joint and conditional probabilities. . . )
Page 15a of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Let us prove formula (2) (just in order to train calculations
with joint and conditional probabilities. . . )
Search
Close
Filter-Workshop
Bucuresti 2003
Let us prove formula (2) (just in order to train calculations
with joint and conditional probabilities. . . )
Search
Close
Filter-Workshop
Bucuresti 2003
Let us prove formula (2) (just in order to train calculations
with joint and conditional probabilities. . . )
Search
Close
Filter-Workshop
Bucuresti 2003
Let us prove formula (2) (just in order to train calculations
with joint and conditional probabilities. . . )
Page 16 of 45
likelihood: given by observation model
JJ II
evidence: the normalizing constant in the denominator J I
- ,
Z
p(zk |z1:k1 ) = p(zk |xk )p(xk |z1:k1 )dxk
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
This theoretically allows an optimal Bayesian solution (in
the sense of computing the posterior pdf).
Title Page
Introduction
Problem: only a conceptual solution; integrals are Dynamic System
not tractable. Bayesian Filters
Kalman Filter
Grid-Based Filter
Particle Filter
But: in some restricted cases, an optimal solution is pos- Experiments
Summary
sible. Two optimal solutions (under restrictive assump-
Page 17 of 45
tions):
JJ II
(standard) Kalman filter J I
grid-based filter - ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
4 Kalman Filter
Introduction Title Page
Introduction
Assumptions: Dynamic System
Bayesian Filters
Kalman Filter
posterior at time k 1, i.e. p(xk1 |zk1 ), is Gaussian Grid-Based Filter
Particle Filter
Page 18 of 45
xk = Fk xk1 + Gk vk1
JJ II
zk = Hk xk + Jk nk
J I
Title Page
with JJ II
mk|k1 = Fk mk1|k1 J I
and - ,
Pk|k1 = Gk Qk1 GTk + Fk Pk1|k1 FTk Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Update Equation
Inserting into (2) yields
Title Page
Page 20 of 45
and
Pk|k = Pk|k1 Kk Hk Pk|k1 JJ II
J I
Kalman Gain:
- ,
Kk = Pk|k1 HTk (Hk Pk|k1 HTk + Jk Rk JTk )1 Full Screen
| {z }
Search
Cov [zk ]
Close
Filter-Workshop
Bucuresti 2003
5 Grid-Based Filter
Introduction
Title Page
Introduction
Assumptions: Dynamic System
Bayesian Filters
state space is discrete Kalman Filter
Grid-Based Filter
Page 21 of 45
Suppose at time k 1 we have states xi with i = 1, . . . , Ns .
JJ II
Conditional probability of these states:
J I
Pr(xk1 = xi |z1:k1 ) = wik1|k1
- ,
Then the (old) posterior at time k 1 is given by: Full Screen
Ns Search
p(xk1 |z1:k1 ) = wik1|k1 (xk1 xi )
Close
i=1
Filter-Workshop
Bucuresti 2003
Results (Summary)
Both the (new) prior and the (new) posterior have the
same structure: a sum of weighted Dirac peaks: Title Page
Introduction
Dynamic System
Ns Bayesian Filters
Page 23 of 45
j
where wik|k1 = Nj=1
s
wk1|k1 p(xi |x j ) JJ II
J I
- ,
(new) prior weights = old posterior weights, Full Screen
Close
Filter-Workshop
Bucuresti 2003
Update Equation (in Detail)
Inserting into (2) yields
Title Page
Ns Introduction
Search
Close
Filter-Workshop
Bucuresti 2003
6 Particle Filter
Suboptimal Approximations Title Page
Introduction
If we want to preserve Kalman filter principle. . . Dynamic System
Bayesian Filters
Kalman Filter
Extended Kalman Filter (EKF) Grid-Based Filter
Particle Filter
Page 25 of 45
...we get better results, JJ II
J I
BUT: we cannot get rid off Gaussian approximations - ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
EKF / UKF:
Search
Close
Filter-Workshop
Bucuresti 2003
Particle Filter General Concept
Many different names (do you remember the introduc-
tion?) but the general concept is rather simple: Title Page
Introduction
Dynamic System
Bayesian Filters
Page 28 of 45
Then: JJ II
Ns
p(xk |z1:k ) wik (x0:k xi0:k ) J I
i=1 - ,
(discrete weighted approximation to the true posterior) Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
SIS (continued)
Usually we cannot draw samples xik from p() directly. As-
sume we sample directly from a (different) importance Title Page
Introduction
function q(). Our approximation is still correct (up to Dynamic System
normalization) if Bayesian Filters
Kalman Filter
Page 29 of 45
The trick: we can choose q() freely! JJ II
J I
If the importance function is chosen to factorize such that - ,
Full Screen
q(x0:k |z1:k ) = q(xk |x0:k1 , z1:k ) q(x0:k1 |z1:k1 )
Search
then one can augment old particles xi0:k1 by xk
Close
q(xk |x0:k1 , z1:k ) to get new particles xi0:k . Filter-Workshop
Bucuresti 2003
SIS (continued)
Weight update (after some lengthy computations. . . ):
Title Page
Ns Page 30 of 45
Search
Close
Filter-Workshop
Bucuresti 2003
SIS Algorithm Pseudo Code
Ns
[{xik , wik }i=1 ] = SIS({xik1 , wik1 }Ni=1s
, zk ) Title Page
Introduction
FOR i = 1 : Ns Dynamic System
draw xik q(xk |xik1 , zk ) Bayesian Filters
Kalman Filter
update weights according to (3)
Grid-Based Filter
END FOR Particle Filter
N
normalize weights to i=1
s
wik = 1 Experiments
Summary
Page 31 of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
PROBLEM: Degeneracy Problem
Problem with SIS approach: after a few iterations, most
particles have negligible weight (the weight is concentrated Title Page
Introduction
on a few particles only) Dynamic System
Bayesian Filters
Counter measures: Kalman Filter
Grid-Based Filter
resampling JJ II
J I
Note: amount of degeneracy can be estimated based on - ,
variance of weights [Liu 1996]. Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Optimal Impotance Density:
It can be shown that the optimal importance density is
given by Title Page
Introduction
Dynamic System
q(xk |xk1 , zk )opt = p(xk |xk1 , zk ) Bayesian Filters
Kalman Filter
Grid-Based Filter
Then Z Particle Filter
Page 33 of 45
Two major drawbacks: usually neither sampling from qo pt
nor solving the integral in wik is possible. . . (but in some JJ II
special cases, it works) J I
Other alternative which is often convenient: - ,
q() = p(xk |xk1 ) (prior). Easy to implement, but does not Full Screen
take measurements into account. Search
Close
Filter-Workshop
Bucuresti 2003
Resampling Approaches
Basic idea of resampling:
Title Page
Introduction
Dynamic System
Whenever degeneracy rises above threshold: replace Bayesian Filters
old set of samples (+ weights) with new set of sam- Kalman Filter
Grid-Based Filter
ples (+ weights), such that sample density better Particle Filter
reflects posterior pdf. Experiments
Summary
Page 34 of 45
This eliminates particles with low weight and chooses more JJ II
particles in more probable regions. J I
Complexity: possible in O(Ns ) operations - ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
The resampling Particle
principle: Filters
Title Page
Introduction
Dynamic System
Bayesian Filters
Kalman Filter
Grid-Based Filter
Particle Filter
Experiments
Summary
Page 35 of 45
JJ II
J I
- ,
Full Screen
Search
Close
(graphics taken from Van der Merwe et al.) Filter-Workshop
Bucuresti 2003
General Particle Filter Pseudo Code
Ns Ns
[{xik , wik }i=1 ] = PF({xik1 , wik1 }i=1 , zk ) Title Page
FOR i = 1 : Ns Introduction
Search
Close
Filter-Workshop
Bucuresti 2003
PROBLEM: Loss of Diversity
No degeneracy problem but new problem arises:
Title Page
Introduction
Dynamic System
Particles with high weight are selected more and Bayesian Filters
more often, others die out slowly Kalman Filter
Grid-Based Filter
loss of diversity or sample impoverishment Particle Filter
Experiments
Summary
For small process noise, all particles can collapse into a Page 37 of 45
single point within a few iterations. JJ II
Other problem: resampling limits the ability to parallelize J I
algorithm. - ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
Other Particle Filter Variants
Methods to counteract loss of diversity and degeneracy
problem: Title Page
Introduction
regularization
Kalman Filter
Grid-Based Filter
Particle Filter
Rao-Blackwellisation Experiments
Summary
multiple Monte-Carlo Page 38 of 45
Close
... Filter-Workshop
Bucuresti 2003
7 Experiments
see videos...
Title Page
Introduction
Dynamic System
Bayesian Filters
Kalman Filter
Grid-Based Filter
Particle Filter
Experiments
Summary
Page 39 of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
8 Summary
First of all: what I did not talk about. . .
Title Page
Introduction
speed of convergence Dynamic System
Bayesian Filters
Search
Close
Filter-Workshop
Bucuresti 2003
Advantages of particle filters (PFs):
Search
Close
Filter-Workshop
Bucuresti 2003
Thesis:
Page 42 of 45
JJ II
J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003
WRONG!
Particle filters include a random element; they only conver-
gence to the true posterior pdf (almost surely) if Ns .
Title Page
Therefore: If the assumptions for Kalman filters or grid- Introduction
Dynamic System
based filters are valid, no PF can outperform them! Bayesian Filters
Kalman Filter
Additionally: depending on the dynamic model, Gaussian Grid-Based Filter
sum filters, unscented Kalman filters or extended Kalman Particle Filter
Experiments
filters may produce satisfactory results at lower computa- Summary
tional cost. Page 43 of 45
Search
Close
Filter-Workshop
Bucuresti 2003
PF approaches proved their usefulness in a variety of ap-
plications.
But:
Title Page
Introduction
choice of importance function q() is crucial in PF Dynamic System
Bayesian Filters
design Kalman Filter
Grid-Based Filter
large sample number Ns increases computational ef- Particle Filter
Experiments
fort Summary
Page 44 of 45
potential problems: degeneracy and loss of diversity
JJ II
J I
If these points are taken into account, then particle
filters are an extremely powerful tool for filtering /
- ,
Full Screen
estimation.
Search
Close
(black box usage vs know what youre doing!) Filter-Workshop
Bucuresti 2003
Title Page
Introduction
Dynamic System
Bayesian Filters
Thank you!
Kalman Filter
Grid-Based Filter
Particle Filter
Experiments
Summary
Page 45 of 45
JJ II
This presentation was made with LATEX.
(try to write Bucuresti in Powerpoint. . . ) J I
- ,
Full Screen
Search
Close
Filter-Workshop
Bucuresti 2003