an introduction to particle filters€¦ · anintroductiontoparticlefilters andreassvensson...

71
An introduction to particle filters Andreas Svensson Department of Information Technology Uppsala University June 10, 2014 June 10, 2014, 1 / 16 Andreas Svensson - An introduction to particle filters

Upload: others

Post on 30-Apr-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

An introduction to particle filters

Andreas Svensson

Department of Information Technology

Uppsala University

June 10, 2014

June 10, 2014, 1 / 16 Andreas Svensson - An introduction to particle filters

Page 2: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

OutlineMotivation and ideas

Algorithm

High-level

Matlab code

Practical aspects

Resampling

Computational complexity

Software

Terminology

Advanced topics

Convergence

Extensions

References

June 10, 2014, 2 / 16 Andreas Svensson - An introduction to particle filters

Page 3: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

State Space Models

I Linear Gaussian state space model

xt+1 = Axt + But + wt

yt = Cxt + Dut + et

with wt and et Gaussian and E[wtwT

t]= Q, E

[eteT

t]= R.

I A more general state space model in different notation

xt+1 ∼ f (xt+1|xt , ut)

yt ∼ g(yt |xt , ut)

June 10, 2014, 3 / 16 Andreas Svensson - An introduction to particle filters

Page 4: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

State Space Models

I Linear Gaussian state space model

xt+1 = Axt + But + wt

yt = Cxt + Dut + et

with wt and et Gaussian and E[wtwT

t]= Q, E

[eteT

t]= R.

I A more general state space model in different notation

xt+1 ∼ f (xt+1|xt , ut)

yt ∼ g(yt |xt , ut)

June 10, 2014, 3 / 16 Andreas Svensson - An introduction to particle filters

Page 5: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

State Space Models

I Linear Gaussian state space model

xt+1 = Axt + But + wt

yt = Cxt + Dut + et

with wt and et Gaussian and E[wtwT

t]= Q, E

[eteT

t]= R.

I A more general state space model in different notation

xt+1 ∼ f (xt+1|xt , ut)

yt ∼ g(yt |xt , ut)

June 10, 2014, 3 / 16 Andreas Svensson - An introduction to particle filters

Page 6: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Filtering - Find p(xt|y1:t)

Linear Gaussian problems:

I Kalman filter! ''Exact solution to the right problem''

Nonlinear problems:

I EKF, UKF, … ''Exact solution to the wrong problem''I Particle filter ''Approximate solution to the right problem''

June 10, 2014, 4 / 16 Andreas Svensson - An introduction to particle filters

Page 7: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Filtering - Find p(xt|y1:t)

Linear Gaussian problems:

I Kalman filter! ''Exact solution to the right problem''

Nonlinear problems:

I EKF, UKF, … ''Exact solution to the wrong problem''I Particle filter ''Approximate solution to the right problem''

June 10, 2014, 4 / 16 Andreas Svensson - An introduction to particle filters

Page 8: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Filtering - Find p(xt|y1:t)

Linear Gaussian problems:

I Kalman filter!

''Exact solution to the right problem''

Nonlinear problems:

I EKF, UKF, … ''Exact solution to the wrong problem''I Particle filter ''Approximate solution to the right problem''

June 10, 2014, 4 / 16 Andreas Svensson - An introduction to particle filters

Page 9: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Filtering - Find p(xt|y1:t)

Linear Gaussian problems:

I Kalman filter!

''Exact solution to the right problem''

Nonlinear problems:

I EKF, UKF, … ''Exact solution to the wrong problem''I Particle filter ''Approximate solution to the right problem''

June 10, 2014, 4 / 16 Andreas Svensson - An introduction to particle filters

Page 10: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Filtering - Find p(xt|y1:t)

Linear Gaussian problems:

I Kalman filter!

''Exact solution to the right problem''

Nonlinear problems:

I EKF, UKF, …

''Exact solution to the wrong problem''

I Particle filter

''Approximate solution to the right problem''

June 10, 2014, 4 / 16 Andreas Svensson - An introduction to particle filters

Page 11: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Filtering - Find p(xt|y1:t)

Linear Gaussian problems:

I Kalman filter! ''Exact solution to the right problem''

Nonlinear problems:

I EKF, UKF, …

''Exact solution to the wrong problem''

I Particle filter

''Approximate solution to the right problem''

June 10, 2014, 4 / 16 Andreas Svensson - An introduction to particle filters

Page 12: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Filtering - Find p(xt|y1:t)

Linear Gaussian problems:

I Kalman filter! ''Exact solution to the right problem''

Nonlinear problems:

I EKF, UKF, … ''Exact solution to the wrong problem''I Particle filter

''Approximate solution to the right problem''

June 10, 2014, 4 / 16 Andreas Svensson - An introduction to particle filters

Page 13: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Filtering - Find p(xt|y1:t)

Linear Gaussian problems:

I Kalman filter! ''Exact solution to the right problem''

Nonlinear problems:

I EKF, UKF, … ''Exact solution to the wrong problem''I Particle filter ''Approximate solution to the right problem''

June 10, 2014, 4 / 16 Andreas Svensson - An introduction to particle filters

Page 14: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Idea

Time

Sta

te

True state tracejctory

A linear system - Find p(xt|y1:t) (true xt shown)!

June 10, 2014, 5 / 16 Andreas Svensson - An introduction to particle filters

Page 15: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Idea

Time

Sta

te

True state tracejctory

Kalman filter mean

Kalman filter mean

June 10, 2014, 5 / 16 Andreas Svensson - An introduction to particle filters

Page 16: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Idea

Time

Sta

te

True state tracejctory

Kalman filter mean

Kalman filter covariance

Kalman filter mean and covariance

June 10, 2014, 5 / 16 Andreas Svensson - An introduction to particle filters

Page 17: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Idea

Time

Sta

te

True state tracejctory

Kalman filter mean

Kalman filter covariance

Kalman filter mean and covariance defines a Gaussian distribution at each t

June 10, 2014, 5 / 16 Andreas Svensson - An introduction to particle filters

Page 18: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Idea

Time

Sta

te

True state tracejctory

A numerical approximation can be used to describe the distribution - Particle Filter

June 10, 2014, 5 / 16 Andreas Svensson - An introduction to particle filters

Page 19: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Idea

Time

Sta

te

True state tracejctory

The Particle Filter can easily handle, e.g., non-gaussian multimodal hypotheses

June 10, 2014, 5 / 16 Andreas Svensson - An introduction to particle filters

Page 20: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Idea

Generate a lot of hypotheses about xt , keep the most likely ones andpropagate them further to xt+1. Keep the likely hypotheses about

xt+1, propagate them again to xt+2, etc.

June 10, 2014, 6 / 16 Andreas Svensson - An introduction to particle filters

Page 21: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

xit+1 from f (·|xi

t , ut)for i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

0 x(:,1) = random(i_dist,N,1);w(:,1) = ones(N,1)/N;

for t = 1:T

1 w(:,t) =pdf(m_dist,y(t)-g(x(:,t)));w(:,t) =w(:,t)/sum(w(:,t));

2 Resample x(:,t)3 x(:,t+1) = f(x(:,t),u(t))

+ random(t_dist,N,1);

end

June 10, 2014, 7 / 16 Andreas Svensson - An introduction to particle filters

Page 22: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

xit+1 from f (·|xi

t , ut)for i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

0 x(:,1) = random(i_dist,N,1);w(:,1) = ones(N,1)/N;

for t = 1:T

1 w(:,t) =pdf(m_dist,y(t)-g(x(:,t)));w(:,t) =w(:,t)/sum(w(:,t));

2 Resample x(:,t)3 x(:,t+1) = f(x(:,t),u(t))

+ random(t_dist,N,1);

end

June 10, 2014, 7 / 16 Andreas Svensson - An introduction to particle filters

Page 23: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

→0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 24: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

→1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 25: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

→2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 26: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

→3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 27: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

→1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 28: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

→2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 29: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

→3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 30: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

→1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 31: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

→2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 32: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

→3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 33: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

→1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 34: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

→2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 35: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

→3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 36: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

→1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 37: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

→2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 38: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

→3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 39: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Algorithm

0 Initialize xi1 ∼ p(x1) and

wi =1N for i = 1, . . . ,N

for t = 1 to T

1 Evaluate wit = g(yt|xi

t , ut)for i = 1, . . . ,N

2 Resample {xit}N

i=1 from

{xit ,wi

t}Ni=1

3 Propagate xit by sampling

from f (·|xit−1, ut−1) for

i = 1, . . . ,N

end

N Number of particles,

xit Particles,

wit Particle weights

5 10 15 20−30

−25

−20

−15

−10

−5

0

5

10

15

Time

Sta

te x

June 10, 2014, 8 / 16 Andreas Svensson - An introduction to particle filters

Page 40: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling

I Represent the information contained in the N black dots (of

different sizes) …

with the N red dots (of equal sizes)

I Can be seen as sampling from a cathegorical distribution

I To avoid particle depletion (''a lot of 0-weights particles'')

I Some Matlab code:

v = rand(N,1); wc = cumsum(w(:,t)); [ ,ind1] = sort([v;wc]);ind=find(ind1<=N)-(0:N-1)'; x(:,t)=x(ind,t);w(:,t)=ones(N,1)./N;

June 10, 2014, 9 / 16 Andreas Svensson - An introduction to particle filters

Page 41: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling

I Represent the information contained in the N black dots (of

different sizes) …

with the N red dots (of equal sizes)

state

I Can be seen as sampling from a cathegorical distribution

I To avoid particle depletion (''a lot of 0-weights particles'')

I Some Matlab code:

v = rand(N,1); wc = cumsum(w(:,t)); [ ,ind1] = sort([v;wc]);ind=find(ind1<=N)-(0:N-1)'; x(:,t)=x(ind,t);w(:,t)=ones(N,1)./N;

June 10, 2014, 9 / 16 Andreas Svensson - An introduction to particle filters

Page 42: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling

I Represent the information contained in the N black dots (of

different sizes) … with the N red dots (of equal sizes)

state

I Can be seen as sampling from a cathegorical distribution

I To avoid particle depletion (''a lot of 0-weights particles'')

I Some Matlab code:

v = rand(N,1); wc = cumsum(w(:,t)); [ ,ind1] = sort([v;wc]);ind=find(ind1<=N)-(0:N-1)'; x(:,t)=x(ind,t);w(:,t)=ones(N,1)./N;

June 10, 2014, 9 / 16 Andreas Svensson - An introduction to particle filters

Page 43: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling

I Represent the information contained in the N black dots (of

different sizes) … with the N red dots (of equal sizes)

state

I Can be seen as sampling from a cathegorical distribution

I To avoid particle depletion (''a lot of 0-weights particles'')

I Some Matlab code:

v = rand(N,1); wc = cumsum(w(:,t)); [ ,ind1] = sort([v;wc]);ind=find(ind1<=N)-(0:N-1)'; x(:,t)=x(ind,t);w(:,t)=ones(N,1)./N;

June 10, 2014, 9 / 16 Andreas Svensson - An introduction to particle filters

Page 44: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling

I Represent the information contained in the N black dots (of

different sizes) … with the N red dots (of equal sizes)

state

I Can be seen as sampling from a cathegorical distribution

I To avoid particle depletion (''a lot of 0-weights particles'')

I Some Matlab code:

v = rand(N,1); wc = cumsum(w(:,t)); [ ,ind1] = sort([v;wc]);ind=find(ind1<=N)-(0:N-1)'; x(:,t)=x(ind,t);w(:,t)=ones(N,1)./N;

June 10, 2014, 9 / 16 Andreas Svensson - An introduction to particle filters

Page 45: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling

I Represent the information contained in the N black dots (of

different sizes) … with the N red dots (of equal sizes)

state

I Can be seen as sampling from a cathegorical distribution

I To avoid particle depletion (''a lot of 0-weights particles'')

I Some Matlab code:

v = rand(N,1); wc = cumsum(w(:,t)); [ ,ind1] = sort([v;wc]);ind=find(ind1<=N)-(0:N-1)'; x(:,t)=x(ind,t);w(:,t)=ones(N,1)./N;

June 10, 2014, 9 / 16 Andreas Svensson - An introduction to particle filters

Page 46: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling cont'd

I Crucial step in the development in the 90's for making particle

filters useful in practice

I Many different techniques exists with different properties and

effiency (the Matlab code shown was only one way of doing it)

I Computationally heavy. Not necessary to do in every iteration -

a ''depletion measure'' can be introduced, and the resampling

only performed when it reaches a certain threshold.

I It is sometimes preferred to use the logarithms of the weights

for numerical reasons.

June 10, 2014, 10 / 16 Andreas Svensson - An introduction to particle filters

Page 47: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling cont'd

I Crucial step in the development in the 90's for making particle

filters useful in practice

I Many different techniques exists with different properties and

effiency (the Matlab code shown was only one way of doing it)

I Computationally heavy. Not necessary to do in every iteration -

a ''depletion measure'' can be introduced, and the resampling

only performed when it reaches a certain threshold.

I It is sometimes preferred to use the logarithms of the weights

for numerical reasons.

June 10, 2014, 10 / 16 Andreas Svensson - An introduction to particle filters

Page 48: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling cont'd

I Crucial step in the development in the 90's for making particle

filters useful in practice

I Many different techniques exists with different properties and

effiency (the Matlab code shown was only one way of doing it)

I Computationally heavy. Not necessary to do in every iteration -

a ''depletion measure'' can be introduced, and the resampling

only performed when it reaches a certain threshold.

I It is sometimes preferred to use the logarithms of the weights

for numerical reasons.

June 10, 2014, 10 / 16 Andreas Svensson - An introduction to particle filters

Page 49: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling cont'd

I Crucial step in the development in the 90's for making particle

filters useful in practice

I Many different techniques exists with different properties and

effiency (the Matlab code shown was only one way of doing it)

I Computationally heavy. Not necessary to do in every iteration -

a ''depletion measure'' can be introduced, and the resampling

only performed when it reaches a certain threshold.

I It is sometimes preferred to use the logarithms of the weights

for numerical reasons.

June 10, 2014, 10 / 16 Andreas Svensson - An introduction to particle filters

Page 50: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Resampling cont'd

I Crucial step in the development in the 90's for making particle

filters useful in practice

I Many different techniques exists with different properties and

effiency (the Matlab code shown was only one way of doing it)

I Computationally heavy. Not necessary to do in every iteration -

a ''depletion measure'' can be introduced, and the resampling

only performed when it reaches a certain threshold.

I It is sometimes preferred to use the logarithms of the weights

for numerical reasons.

June 10, 2014, 10 / 16 Andreas Svensson - An introduction to particle filters

Page 51: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Computational complexity

In theory O(NTn2x) (nx is the number of states)

(Kalman filter is approx. of order O(Tn3x))

Possible bottlenecks:

I Resampling stepI Likelihood evaluation (for the weight evaluation)I Sampling from f for the propagation (trick: use proposaldistributions!)

June 10, 2014, 11 / 16 Andreas Svensson - An introduction to particle filters

Page 52: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Computational complexity

In theory O(NTn2x) (nx is the number of states)

(Kalman filter is approx. of order O(Tn3x))

Possible bottlenecks:

I Resampling stepI Likelihood evaluation (for the weight evaluation)I Sampling from f for the propagation (trick: use proposaldistributions!)

June 10, 2014, 11 / 16 Andreas Svensson - An introduction to particle filters

Page 53: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Computational complexity

In theory O(NTn2x) (nx is the number of states)

(Kalman filter is approx. of order O(Tn3x))

Possible bottlenecks:

I Resampling stepI Likelihood evaluation (for the weight evaluation)I Sampling from f for the propagation (trick: use proposaldistributions!)

June 10, 2014, 11 / 16 Andreas Svensson - An introduction to particle filters

Page 54: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Computational complexity

In theory O(NTn2x) (nx is the number of states)

(Kalman filter is approx. of order O(Tn3x))

Possible bottlenecks:

I Resampling stepI Likelihood evaluation (for the weight evaluation)I Sampling from f for the propagation (trick: use proposaldistributions!)

June 10, 2014, 11 / 16 Andreas Svensson - An introduction to particle filters

Page 55: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Software

Lot of software packages exists. However, to my knowledge, no

package that ''everybody'' uses. (In our research, we write our own

code.)

A few relevant existing packages:

I Python: pyParticleEst

I Matlab: PFToolbox, PFLib

I C++: Particle++

Disclaimer: I have not used any of these packages myself

June 10, 2014, 12 / 16 Andreas Svensson - An introduction to particle filters

Page 56: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Software

Lot of software packages exists. However, to my knowledge, no

package that ''everybody'' uses. (In our research, we write our own

code.)

A few relevant existing packages:

I Python: pyParticleEst

I Matlab: PFToolbox, PFLib

I C++: Particle++

Disclaimer: I have not used any of these packages myself

June 10, 2014, 12 / 16 Andreas Svensson - An introduction to particle filters

Page 57: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Software

Lot of software packages exists. However, to my knowledge, no

package that ''everybody'' uses. (In our research, we write our own

code.)

A few relevant existing packages:

I Python: pyParticleEst

I Matlab: PFToolbox, PFLib

I C++: Particle++

Disclaimer: I have not used any of these packages myself

June 10, 2014, 12 / 16 Andreas Svensson - An introduction to particle filters

Page 58: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Terminology

Bootstrap particle filter ≈ ''Standard'' particle filter

Sequential Monte Carlo (SMC) ≈ Particle filter

June 10, 2014, 13 / 16 Andreas Svensson - An introduction to particle filters

Page 59: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Terminology

Bootstrap particle filter ≈ ''Standard'' particle filter

Sequential Monte Carlo (SMC) ≈ Particle filter

June 10, 2014, 13 / 16 Andreas Svensson - An introduction to particle filters

Page 60: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Terminology

Bootstrap particle filter ≈ ''Standard'' particle filter

Sequential Monte Carlo (SMC) ≈ Particle filter

June 10, 2014, 13 / 16 Andreas Svensson - An introduction to particle filters

Page 61: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Convergence

The particle filter is ''exact for N = ∞''

Consider a function g(xt) of interest. How well can it be

approximated as g(xt) when xt is estimated in a particle filter?

E [g(xt)− E [g(xt)]]2 ≤ pt‖g(xt)‖sup

NIf the system ''forgets exponentially fast'' (e.g. linear systems),

and some additional weak assumptions, pt = p < ∞, i.e.,

E [g(xt)− E [g(xt)]]2 ≤ C

N

June 10, 2014, 14 / 16 Andreas Svensson - An introduction to particle filters

Page 62: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Convergence

The particle filter is ''exact for N = ∞''

Consider a function g(xt) of interest. How well can it be

approximated as g(xt) when xt is estimated in a particle filter?

E [g(xt)− E [g(xt)]]2 ≤ pt‖g(xt)‖sup

NIf the system ''forgets exponentially fast'' (e.g. linear systems),

and some additional weak assumptions, pt = p < ∞, i.e.,

E [g(xt)− E [g(xt)]]2 ≤ C

N

June 10, 2014, 14 / 16 Andreas Svensson - An introduction to particle filters

Page 63: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Convergence

The particle filter is ''exact for N = ∞''

Consider a function g(xt) of interest. How well can it be

approximated as g(xt) when xt is estimated in a particle filter?

E [g(xt)− E [g(xt)]]2 ≤ pt‖g(xt)‖sup

NIf the system ''forgets exponentially fast'' (e.g. linear systems),

and some additional weak assumptions, pt = p < ∞, i.e.,

E [g(xt)− E [g(xt)]]2 ≤ C

N

June 10, 2014, 14 / 16 Andreas Svensson - An introduction to particle filters

Page 64: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Convergence

The particle filter is ''exact for N = ∞''

Consider a function g(xt) of interest. How well can it be

approximated as g(xt) when xt is estimated in a particle filter?

E [g(xt)− E [g(xt)]]2 ≤ pt‖g(xt)‖sup

N

If the system ''forgets exponentially fast'' (e.g. linear systems),

and some additional weak assumptions, pt = p < ∞, i.e.,

E [g(xt)− E [g(xt)]]2 ≤ C

N

June 10, 2014, 14 / 16 Andreas Svensson - An introduction to particle filters

Page 65: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Convergence

The particle filter is ''exact for N = ∞''

Consider a function g(xt) of interest. How well can it be

approximated as g(xt) when xt is estimated in a particle filter?

E [g(xt)− E [g(xt)]]2 ≤ pt‖g(xt)‖sup

NIf the system ''forgets exponentially fast'' (e.g. linear systems),

and some additional weak assumptions, pt = p < ∞, i.e.,

E [g(xt)− E [g(xt)]]2 ≤ C

N

June 10, 2014, 14 / 16 Andreas Svensson - An introduction to particle filters

Page 66: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Extensions

I Smoothing: Finding p(xt |y1:T ) (marginal smoothing) orp(x1:t |y1:T ) (joint smoothing) instead of p(xt |y1:t) (filtering).Offline (y1:T has to be available). Increased computational load.

I If f (xt+1|xt , ut) is not suitable to sample from, proposaldistributions can be used. In fact, an optimal proposal (w.r.t.

reduced variance) exists.

I Rao-Blackwellization for mixed linear/nonlinear models.

I System identification: PMCMC, SMC2.

June 10, 2014, 15 / 16 Andreas Svensson - An introduction to particle filters

Page 67: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Extensions

I Smoothing: Finding p(xt |y1:T ) (marginal smoothing) orp(x1:t |y1:T ) (joint smoothing) instead of p(xt |y1:t) (filtering).Offline (y1:T has to be available). Increased computational load.

I If f (xt+1|xt , ut) is not suitable to sample from, proposaldistributions can be used. In fact, an optimal proposal (w.r.t.

reduced variance) exists.

I Rao-Blackwellization for mixed linear/nonlinear models.

I System identification: PMCMC, SMC2.

June 10, 2014, 15 / 16 Andreas Svensson - An introduction to particle filters

Page 68: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Extensions

I Smoothing: Finding p(xt |y1:T ) (marginal smoothing) orp(x1:t |y1:T ) (joint smoothing) instead of p(xt |y1:t) (filtering).Offline (y1:T has to be available). Increased computational load.

I If f (xt+1|xt , ut) is not suitable to sample from, proposaldistributions can be used. In fact, an optimal proposal (w.r.t.

reduced variance) exists.

I Rao-Blackwellization for mixed linear/nonlinear models.

I System identification: PMCMC, SMC2.

June 10, 2014, 15 / 16 Andreas Svensson - An introduction to particle filters

Page 69: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Extensions

I Smoothing: Finding p(xt |y1:T ) (marginal smoothing) orp(x1:t |y1:T ) (joint smoothing) instead of p(xt |y1:t) (filtering).Offline (y1:T has to be available). Increased computational load.

I If f (xt+1|xt , ut) is not suitable to sample from, proposaldistributions can be used. In fact, an optimal proposal (w.r.t.

reduced variance) exists.

I Rao-Blackwellization for mixed linear/nonlinear models.

I System identification: PMCMC, SMC2.

June 10, 2014, 15 / 16 Andreas Svensson - An introduction to particle filters

Page 70: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

Extensions

I Smoothing: Finding p(xt |y1:T ) (marginal smoothing) orp(x1:t |y1:T ) (joint smoothing) instead of p(xt |y1:t) (filtering).Offline (y1:T has to be available). Increased computational load.

I If f (xt+1|xt , ut) is not suitable to sample from, proposaldistributions can be used. In fact, an optimal proposal (w.r.t.

reduced variance) exists.

I Rao-Blackwellization for mixed linear/nonlinear models.

I System identification: PMCMC, SMC2.

June 10, 2014, 15 / 16 Andreas Svensson - An introduction to particle filters

Page 71: An introduction to particle filters€¦ · Anintroductiontoparticlefilters AndreasSvensson DepartmentofInformationTechnology UppsalaUniversity June10,2014 June10,2014, 1/16 AndreasSvensson

References

I Gustafsson, F. (2010). Particle filter theory and practice with

positioning applications. Aerospace and Electronic Systems Magazine, IEEE,

25(7), 53-82.

I Schön, T.B., & Lindsten, F. Learning of dynamical systems - Particle

Filters and Markov chain methods. Draft available.

I Doucet, A., & Johansen, A. M. (2009). A tutorial on particle filtering and

smoothing: Fifteen years later. Handbook of Nonlinear Filtering, 12,

656-704.

Homework: Implement your own Particle Filter for any (simple) problem of your

choice!

June 10, 2014, 16 / 16 Andreas Svensson - An introduction to particle filters