tutorial on particle filters assembled and extended by longin jan latecki temple university,...

68
Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, [email protected] using slides from Keith Copsey, Pattern and Information Processing Group, DERA Malvern; D. Fox, J. Hightower, L. Liao, D. Schulz, and G. Borriello, Univ. of Washington, Seattle Honggang Zhang, Univ. of Maryland, College Park Miodrag Bolic, University of Ottawa, Canada Michael Pfeiffer, TU Gratz, Austria

Post on 22-Dec-2015

233 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Tutorial on Particle Filters

assembled and extended by Longin Jan LateckiTemple University, [email protected]

using slides from

Keith Copsey, Pattern and Information Processing Group, DERA Malvern;

D. Fox, J. Hightower, L. Liao, D. Schulz, and G. Borriello, Univ. of Washington, SeattleHonggang Zhang, Univ. of Maryland, College ParkMiodrag Bolic, University of Ottawa, CanadaMichael Pfeiffer, TU Gratz, Austria

Page 2: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Outline

Introduction to particle filters

– Recursive Bayesian estimation Bayesian Importance sampling

– Sequential Importance sampling (SIS)

– Sampling Importance resampling (SIR) Improvements to SIR

– On-line Markov chain Monte Carlo Basic Particle Filter algorithm Example for robot localization Conclusions

Page 3: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Particle Filters

Sequential Monte Carlo methods for on-line learning within a Bayesian framework.

Known as

– Particle filters

– Sequential sampling-importance resampling (SIR)

– Bootstrap filters

– Condensation trackers

– Interacting particle approximations

– Survival of the fittest

Page 4: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

History

First attempts – simulations of growing polymers– M. N. Rosenbluth and A.W. Rosenbluth, “Monte Carlo calculation of the average extension of molecular chains,” Journal of

Chemical Physics, vol. 23, no. 2, pp. 356–359, 1956.

First application in signal processing - 1993– N. J. Gordon, D. J. Salmond, and A. F. M. Smith, “Novel approach to nonlinear/non-Gaussian Bayesian state estimation,”

IEE Proceedings-F, vol. 140, no. 2, pp. 107–113, 1993.

Books– A. Doucet, N. de Freitas, and N. Gordon, Eds., Sequential Monte Carlo Methods in Practice, Springer, 2001.

– B. Ristic, S. Arulampalam, N. Gordon, Beyond the Kalman Filter: Particle Filters for Tracking Applications, Artech House Publishers, 2004.

Tutorials– M. S. Arulampalam, S. Maskell, N. Gordon, and T. Clapp, “A tutorial on particle filters for online nonlinear/non-gaussian

Bayesian tracking,” IEEE Transactions on Signal Processing, vol. 50, no. 2, pp. 174–188, 2002.

Page 5: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Problem Statement

Tracking the state of a system as it evolves over time

Sequentially arriving (noisy or ambiguous) observations

We want to know: Best possible estimate of the hidden variables

Page 6: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Solution: Sequential Update

Storing and processing all incoming measurements is inconvenient and may be impossible

Recursive filtering:–Predict next state pdf from current estimate–Update the prediction using sequentially

arriving new measurements

Optimal Bayesian solution: recursively calculating exact posterior density

Page 7: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Particle filtering ideas

Particle filter is a technique for implementing recursive Bayesian filter by Monte Carlo sampling

The idea: represent the posterior density by a set of random particles with associated weights.

Compute estimates based on these samples and weights

Sample space

Posterior density

Page 8: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Global Localization of Robot with Sonarhttp://www.cs.washington.edu/ai/Mobile_Robotics/mcl/animations/global-floor.gif

Page 9: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith
Page 10: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Tools needed

1 1 1( ) ( | ) ( )t t t t tp x p x x p x dx ( | ) ( )

( | )( )

t t tt t

t

p z x p xp x z

p z

Recall “law of total probability” (or marginalization) and “Bayes’ rule”

Page 11: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Recursive Bayesian estimation (I)

Recursive filter:

– System model:

– Measurement model:

– Information available:

)|( ),( 11 kkkkkk xxpxfx

)|( ),( kkkkkk xypxhy

),,( 1 kk yyD

)( 0xp

Page 12: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Recursive Bayesian estimation (II)

Seek:

– i = 0: filtering.

– i > 0: prediction.

– i<0: smoothing.

Prediction:

– since:

)|( kik Dxp

1111 )|,()|( kkkkkk dxDxxpDxp

11111 )|()|()|( kkkkkkk dxDxpxxpDxp

)|()|()|(),|()|,( 111111111 kkkkkkkkkkkk DxpxxpDxpDxxpDxxp

Page 13: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Recursive Bayesian estimation (III)

Update:

where:

– since:

kkkkkk dxDxypDyp )|,()|( 11

kkkkkkk dxDxpxypDyp )|()|()|( 11

)|(

)|()|()|(

1

1

kk

kkkkkk Dyp

DxpxypDxp

)|()|()|(),|()|,( 1111 kkkkkkkkkkkk DxpxypDxpDxypDxyp

Page 14: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Bayes Filters (second pass)

1( , )

( , )t t t t

t t t t

x f x w

z g x v

System state dynamics

Observation dynamics

1( ) ( | , , )t t tBel x p x z z

We are interested in: Belief or posterior density

Estimating system state from noisy observations

Page 15: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

1:( 1) 1 1where , ,t tz z z

1:( 1) 1, 1:( 1) 1 1:( 1) 1( | ) ( | ) ( | )t t t t t t t tp x z p x x z p x z dx

From above, constructing two steps of Bayes Filters

1:( 1)1:( 1) 1:( 1)

1:( 1)

( | , )( | , ) ( | )

( | )t t t

t t t t tt t

p z x zp x z z p x z

p z z

Predict:

Update:

Page 16: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

1:( 1) 1, 1:( 1) 1 1:( 1) 1( | ) ( | ) ( | )t t t t t t t tp x z p x x z p x z dx

1:( 1)replace ( | , ) with ( | )t t t t tp z x z p z x

Predict:

Update:

Assumptions: Markov Process

1 1: 1 1replace ( | , ) with ( | )t t t t tp x x z p x x

1:( 1)1:( 1) 1:( 1)

1:( 1)

( | , )( | , ) ( | )

( | )t t t

t t t t tt t

p z x zp x z z p x z

p z z

Page 17: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

1:( 1) 1:( 1)( | , ) ( | ) ( | )t t t t t t t tp x z z p z x p x z

Bayes Filter

1:( 1) 1 1 1:( 1) 1( | ) ( | ) ( | )t t t t t t tp x z p x x p x z dx

1( | )

( | )t t

t t

p x x

p z x

How to use it? What else to know?

Motion Model

Perceptual Model

Start from: 0 00 0 0

0

( | )( | ) ( )

( )

p z xp x z p x

p z

Page 18: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Example 1

10 0( ) or ( )Bel x p x

Step 0: initialization

0 0 0

0 0 0 0

( ) or ( | )

( | ) ( )

Bel x p x z

p z x p x

Step 1: updating

Page 19: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Example 1 (continue)

1 1 1

1 1 1 0 0

( ) or ( | )

( | ) ( | )

Bel x p x z

p z x p x z

Step 3: updating

12 2 1

2 1 1 1 1

( ) or ( | )

( | ) ( | )

Bel x p x z

p x x p x z dx

Step 4: predicting

11 1 0

1 0 0 0 0

( ) or ( | )

( | ) ( | )

Bel x p x z

p x x p x z dx

Step 2: predicting

1

Page 20: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Classical approximations

Analytical methods:

– Extended Kalman filter,

– Gaussian sums… (Alspach et al. 1971)

• Perform poorly in numerous cases of interest

Numerical methods:

– point masses approximations,

– splines. (Bucy 1971, de Figueiro 1974…)

• Very complex to implement, not flexible.

Page 21: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Perfect Monte Carlo simulation

Recall that

Random samples are drawn from the posterior distribution.

Represent posterior distribution using a set of samples or particles.

Easy to approximate expectations of the form:

– by:

),,( 0:0 kk xxx

kkkkk dxDxpxgxgE :0:0:0:0 )|()())((

N

i

ikk xg

NxgE

1:0:0 )(

1))((

ikx :0

N

i

ikkkk xx

NDxp

1:0:0:0 )(

1)|(

Page 22: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Random samples and the pdf (I)

Take p(x)=Gamma(4,1) Generate some random samples Plot histogram and basic approximation to pdf

0 2 4 6 8 10 12 14 16 18 200

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0 20 40 60 80 100 120 140 160 180 2000

2

4

6

8

10

12

200 samples

Page 23: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Random samples and the pdf (II)

0 2 4 6 8 10 12 14 16 18 200

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0 2 4 6 8 10 12 14 16 18 200

0.05

0.1

0.15

0.2

0.25

0.3

0.35

500 samples 1000 samples

Page 24: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Random samples and the pdf (III)

0 5 10 15 20 250

0.05

0.1

0.15

0.2

0.25

0 5 10 15 20 250

0.05

0.1

0.15

0.2

0.25

200000 samples5000 samples

Page 25: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Importance Sampling

Unfortunately it is often not possible to sample directly from the posterior distribution, but we can use importance sampling.

Let p(x) be a pdf from which it is difficult to draw samples.

Let xi ~ q(x), i=1, …, N, be samples that are easily generated from a proposal pdf q, which is called an importance density.

Then approximation to the density p is given by

)(

)(i

ii

xq

xpw )()(

1

in

i

i xxwxp

where

Page 26: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Bayesian Importance Sampling

By drawing samples from a known easy to sample proposal distribution we obtain:

N

i

ikk

ikkk xxwDxp

1:0:0:0 )()|(

)|( :0 kk Dxq

ikx :0

)|(

)|(

:0

:0

kik

kiki

k Dxq

Dxpw

where

are normalized weights.

Page 27: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith
Page 28: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Sequential Importance Sampling (I)

Factorizing the proposal distribution:

and remembering that the state evolution is modeled as a Markov process

we obtain a recursive estimate of the importance weights:

Factorizing is obtained by recursively applying

k

jjjjkk DxxqxqDxq

11:00:0 ),|()()|(

),|(

)|()|(

1:0

11

kkk

kkkkkk Dxxq

xxpxypww

)|(),|()|( 11:01:0:0 kkkkkkk DxqDxxqDxq

Page 29: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Sequential Importance Sampling (SIS) Particle Filter

SIS Particle Filter Algorithm

],},[{]},[{ 1111 kNi

ik

ik

Ni

ik

ik zwxSISwx

for i=1:N

Draw a particle

Assign a weight

end

),|(~ 1 kik

ik

ik zxxqx

),|(

)|()|(

1:0

11

kik

ik

ik

ik

ikki

kik Dxxq

xxpxzpww

(k is index over time and i is the particle index)

Page 30: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Derivation of SIS weights (I)

The main idea is Factorizing :

k

jjjk xxpxpxp

110:0 )|()()( and

k

jjjkk xypxDp

1:0 )|()|(

)|(

)|(

:0

:0

kik

kiki

k Dxq

Dxpw

)|(),|()|( 11:01:0:0 kkkkkkk DxqDxxqDxq

Our goal is to expand p and q in time t

Page 31: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Derivation of SIS weights (II)

)()|(

)()|()|(),|(

)(

)()|()|(

11

1:01:0:01:01:0:0:0

kkk

kkkkkkkk

k

kkkkk DpDzp

xpxxpxDpxDzp

Dp

xpxDpDxp

)|(

)|()|(),|(

1

11:01:0:01

kk

kkkkkkk

Dzp

DxpxxpxDzp

)()|(

)()|()|(),|(

11

1:01:011:0:01

kkk

kkkkkkkk

DpDzp

xpxDpxxpxDzp

)|()|(),|( 11:01:0:01 kkkkkkk DxpxxpxDzp

Page 32: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

)|(

)|(

),|(

)|(),|(

)|(

)|(

11:0

11:0

1:0

1:0:01

:0

:0

k

ik

kik

kik

ik

ik

ik

ikkk

kik

kiki

k Dxq

Dxp

Dxxq

xxpxDzp

Dxq

Dxpw

Derivation of SIS weights (II)

),|(

)|(),|(

1:0

1:0:011

kik

ik

ik

ik

ikkki

k Dxxq

xxpxDzpw

),|(

)|()|(

1

11

kik

ik

ik

ik

ikki

kik zxxq

xxpxzpww

and under Markov assumptions

Page 33: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

SIS Particle Filter Foundation

At each time step k Random samples are drawn from the proposal distribution for i=1, …, N

They represent posterior distribution using a set of samples or particles

Since the weights are given by

and q factorizes as

N

i

ikk

ikkk xxwDxp

1

)()|(

ikx

),|( 1:0 kkk Dxxq

)|(

)|(

:0

:0

kik

kiki

k Dxq

Dxpw

k

jjjjkk DxxqxqDxq

11:00:0 ),|()()|(

Page 34: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Sequential Importance Sampling (II)

Choice of the proposal distribution:

Choose proposal function to minimize variance of (Doucet et al. 1999):

Although common choice is the prior distribution:

We obtain then

),|( 1:0 kkk Dxxq

kw

),|(),|( 1:01:0 kkkkkk DxxpDxxq

)|(),|( 11:0 kkkkk xxpDxxq

)|(),|(

)|()|(1

1:0

11

ikk

ik

kik

ik

ik

ik

ikki

kik xzpw

Dxxq

xxpxzpww

Page 35: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Illustration of SIS:

Degeneracy problems:

– variance of importance ratios increases stochastically over time (Kong et al. 1994; Doucet et al. 1999).

– In most cases then after a few iterations, all but one particle will have negligible weight

Sequential Importance Sampling (III)

w

Time 19

w

Time 10

w

Time 1

)|(/)|( :0:0 kkkk DxqDxp

Page 36: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Sequential Importance Sampling (IV)

Illustration of degeneracy:

w

Time 19

w

Time 10

w

Time 1

Page 37: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

SIS - why variance increase

Suppose we want to sample from the posterior

– choose a proposal density to be very close to the posterior

density

• Then

• and

So we expect the variance to be close to 0 to obtain reasonable estimates

– thus a variance increase has a harmful effect on accuracy

1)|(

)|(

:0

:0

kk

kkq Dxq

DxpE

01)|(

)|(

)|(

)|(var

2

:0

:0

:0

:0

kk

kkq

kk

kkq Dxq

DxpE

Dxq

Dxp

Page 38: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith
Page 39: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Sampling-Importance Resampling

SIS suffers from degeneracy problems so we don’t want to do that!

Introduce a selection (resampling) step to eliminate samples with low importance ratios and multiply samples with high importance ratios.

Resampling maps the weighted random measure on to the equally weighted random measure

– by sampling uniformly with replacement from

with probabilities

Scheme generates children such that and satisfies:

)}(~,{ :0:0ikk

ik xwx} { 1-

:0 Nx j k},,1;{ :0 Nixi k

},,1;~{ Niwik

NNN

ii

1iN

iki wNNE ~)(

)~1(~)var( ik

iki wwNN

Page 40: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Basic SIR Particle Filter - Schematic

Initialisation

Importancesampling step

Resamplingstep

0k

1 kk

)}(~,{ :0:0ikk

ik xwx

},{ 1:0

Nxi k

measurement

ky

Extract estimate, kx :0ˆ

Page 41: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Basic SIR Particle Filter algorithm (I) Initialisation

– For sample

– and set

0k

Ni ,,1 )(~ 00 xpxi

1k

Importance Sampling step

– For sample

– For compute the importance weights wik

– Normalise the importance weights,

N

j

jk

ik

ik www

1

/~

Ni ,,1 )|(~~1

ikk

ik xxqx

),(~1:0:0

ik

ik

ik xxx and set

Ni ,,1

Page 42: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Basic SIR Particle Filter algorithm (II)

Resampling step

– Resample with replacement particles:

– from the set:

– according to the normalised importance weights,

Set

– proceed to the Importance Sampling step, as the next

measurement arrives.

N

),,1;( :0 Nixi k

),,1;~( :0 Nix i k ikw

~

1 kk

Page 43: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Resampling

M

m

mk Mx

1

)(1

1,

x

Mmmk

mk wx 1

)()( ,

M

m

m

kM

x1

)(~ 1,

M

m

mk Mx

1

)(1

1,

Mmmk

mk wx 1

)(1

)(1 ,

M

m

m

kM

x1

)(

1

~ 1,

M

m

mk Mx

1

)(2

1,

Page 44: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Generic SIR Particle Filter algorithm M. S. Arulampalam, S. Maskell, N. Gordon, and T. Clapp, “A tutorial on particle filters …,” IEEE Trans. on Signal Processing,

50( 2), 2002.

Page 45: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Improvements to SIR (I)

Variety of resampling schemes with varying performance in terms of the variance of the particles :

– Residual sampling (Liu & Chen, 1998).

– Systematic sampling (Carpenter et al., 1999).

– Mixture of SIS and SIR, only resample when necessary (Liu &

Chen, 1995; Doucet et al., 1999).

Degeneracy may still be a problem:

– During resampling a sample with high importance weight may

be duplicated many times.

– Samples may eventually collapse to a single point.

)var( iN

Page 46: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Improvements to SIR (II)

To alleviate numerical degeneracy problems, sample smoothing methods may be adopted.

– Roughening (Gordon et al., 1993).

• Adds an independent jitter to the resampled particles

– Prior boosting (Gordon et al., 1993).

• Increase the number of samples from the proposal distribution to M>N,

• but in the resampling stage only draw N particles.

Page 47: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Improvements to SIR (III)

Local Monte Carlo methods for alleviating degeneracy:

– Local linearisation - using an EKF (Doucet, 1999; Pitt &

Shephard, 1999) or UKF (Doucet et al, 2000) to estimate the

importance distribution.

– Rejection methods (Müller, 1991; Doucet, 1999; Pitt & Shephard,

1999).

– Auxiliary particle filters (Pitt & Shephard, 1999)

– Kernel smoothing (Gordon, 1994; Hürzeler & Künsch, 1998; Liu &

West, 2000; Musso et al., 2000).

– MCMC methods (Müller, 1992; Gordon & Whitby, 1995; Berzuini et

al., 1997; Gilks & Berzuini, 1998; Andrieu et al., 1999).

Page 48: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Improvements to SIR (IV)

Illustration of SIR with sample smoothing:

w

Time 19

w

Time 10

w

Time 1

Page 49: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Ingredients for SMC

Importance sampling function

– Gordon et al

– Optimal

– UKF pdf from UKF at Redistribution scheme

– Gordon et al SIR

– Liu & Chen Residual

– Carpenter et al Systematic

– Liu & Chen, Doucet et al Resample when necessary

Careful initialisation procedure (for efficiency)

)|( 1ikk xxp

),|( 1:0 kikk Dxxp

ikx 1

Page 50: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Particle filters

Also known as Sequential Monte Carlo Methods Representing belief by sets of samples or

particles

are nonnegative weights called importance factors

Updating procedure is sequential importance sampling with re-sampling

( ) ~ { , | 1,..., }i it t t tBel x S x w i n

itw

Page 51: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Example 2: Particle Filter

Step 0: initialization

Each particle has the same weight

Step 1: updating weights. Weights are proportional to p(z|x)

Page 52: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Example 2: Particle Filter

Particles are more concentrated in the region where the person is more likely to be

Step 3: updating weights. Weights are proportional to p(z|x)

Step 4: predicting.

Predict the new locations of particles.

Step 2: predicting.

Predict the new locations of particles.

Page 53: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Compare Particle Filter with Bayes Filter with Known Distribution

Example 1

Example 2

Example 1

Example 2

Predicting

Updating

Page 54: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Particle Filters

Page 55: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

)|()(

)()|()()|()(

xzpxBel

xBelxzpw

xBelxzpxBel

Sensor Information: Importance Sampling

Page 56: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

'd)'()'|()( , xxBelxuxpxBel

Robot Motion

Page 57: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

)|()(

)()|()()|()(

xzpxBel

xBelxzpw

xBelxzpxBel

Sensor Information: Importance Sampling

Page 58: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Robot Motion

'd)'()'|()( , xxBelxuxpxBel

Page 59: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Tracking in 1D: the blue trajectory is the target.The best of10 particles is in red.

Page 60: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Matlab code: truex is a vector of 100 positions to be tracked.

Page 61: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith
Page 62: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith
Page 63: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith
Page 64: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith
Page 65: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith
Page 66: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Application Examples

Robot localization Robot mapping Visual Tracking

–e.g. human motion (body parts) Prediction of (financial) time series

–e.g. mapping gold price to stock price

Target recognition from single or multiple images Guidance of missiles Contour grouping

Nice video demos:http://www.cs.washington.edu/ai/Mobile_Robotics/mcl/

Page 67: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

2nd Book Advert

Statistical Pattern Recognition Andrew Webb, DERA ISBN 0340741643, Paperback: 1999: £29.99 Butterworth Heinemann

Contents:

– Introduction to SPR, Estimation, Density estimation, Linear

discriminant analysis, Nonlinear discriminant analysis - neural

networks, Nonlinear discriminant analysis - statistical methods,

Classification trees, Feature selction and extraction, Clustering,

Additional topics, Measures of dissimilarity, Parameter estimation,

Linear algebra, Data, Probability theory.

Page 68: Tutorial on Particle Filters assembled and extended by Longin Jan Latecki Temple University, latecki@temple.edulatecki@temple.edu using slides from Keith

Homework

Implement all three particle filter algorithms

SIS Particle Filter Algorithm (p. 27)Basic SIR Particle Filter algorithm (p. 39,40)Generic SIR Particle Filter algorithm (p. 42)

and evaluate their performance on a problem of your choice.

Groups of two are allowed. Submit a report and a ready to run Matlab code (with a

script and the data). Present a report to the class.