stochastic filtering - a brief tutorialrmcastro/publications/stochastic_filtering.pdf · stochastic...
TRANSCRIPT
![Page 1: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/1.jpg)
Stochastic FilteringStochastic Filtering
A brief tutorial
Rui Castro
© 2006 - Rui Castro
![Page 2: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/2.jpg)
MotivationIn many applications one wants to track time-varying processes
Example: tracking temperature in a museum room with a inaccurate thermometer with large error.
How can we accurately estimate the room temperature???
© 2006 - Rui Castro
![Page 3: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/3.jpg)
Motivation
Some kind of windowed estimate should do the trick... (low pass filtering)
Key fact: Knowledge of the process dynamics (i.e., temperature changes sloooooowly...
© 2006 - Rui Castro
![Page 4: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/4.jpg)
Modeling - Dynamics
The distribution of depends only on the value of .Together with the knowledge of this completely defines the random process
Dynamics Kernel
This random process is the quantity we are interested in estimating (e.g., temperature of the room)
© 2006 - Rui Castro
![Page 5: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/5.jpg)
Dynamics - Example
Position-Velocity (PV) Model:
Discrete counterpart:
Velocity is modeled as Brownian motion
© 2006 - Rui Castro
![Page 6: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/6.jpg)
Observation Model
In general we cannot observe the process directly
Model Assumptions:
• Observation at time n depends only on state at that time
• Observations do not affect the physical process
Observation Likelihood
© 2006 - Rui Castro
![Page 7: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/7.jpg)
Main Goal
Given a set of observations up to time n,
we want to estimate .
We follow a Bayesian approach, therefore all the information about is provided by the density
Filtering Density
How do we do it???© 2006 - Rui Castro
![Page 8: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/8.jpg)
Can we estimate ?
After we observe we can use Bayes rule
Density Propagation – First Observation
Prior Density
© 2006 - Rui Castro
![Page 9: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/9.jpg)
Density Propagation – Prediction
Can we predict ?
© 2006 - Rui Castro
![Page 10: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/10.jpg)
Our prediction is then given by
Prediction Density
Density Propagation – Prediction
© 2006 - Rui Castro
![Page 11: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/11.jpg)
Density Propagation – General
Start with a prediction based on previous observations
Prediction Density
After we observe we can compute
© 2006 - Rui Castro
![Page 12: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/12.jpg)
Density Propagation – General
We can now predict
© 2006 - Rui Castro
![Page 13: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/13.jpg)
Density Propagation – Graphically
© 2006 - Rui Castro
![Page 14: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/14.jpg)
Density Propagation – Filtering
© 2006 - Rui Castro
![Page 15: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/15.jpg)
Density Propagation – Prediction
© 2006 - Rui Castro
![Page 16: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/16.jpg)
Main Goal
Now that we have
what do we do with it? That is, how do we construct an estimate
Many possibilities, for example if we want to minimize
the optimal choice is
© 2006 - Rui Castro
![Page 17: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/17.jpg)
A Particular Case: The Kalman Filter
And, very important
In other words, we assume that
© 2006 - Rui Castro
![Page 18: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/18.jpg)
A Particular Case: The Kalman Filter
Since
are all Gaussian it follows that
and
are also Gaussian (because the product of two Gaussians is a Gaussian and the convolution of two Gaussians is also a Gaussian).
Therefore we need only to propagate means and covariance matrices (a nice closed form solution)
© 2006 - Rui Castro
![Page 19: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/19.jpg)
A Particular Case: The Kalman Filter
Start with the prediction density
After we observe compute
Compute the updated prediction
© 2006 - Rui Castro
![Page 20: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/20.jpg)
A Particular Case: The Kalman Filter
Taking
yields the Kalman Filter
Numerous applications, but restricted to linear models
What if models are non-linear???
© 2006 - Rui Castro
![Page 21: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/21.jpg)
The Extended Kalman Filter
Suppose is normal
If our prediction density is “accurate” then
Idea: Linearize around the prediction mean
© 2006 - Rui Castro
![Page 22: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/22.jpg)
The Extended Kalman Filter
Similarly, if
© 2006 - Rui Castro
![Page 23: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/23.jpg)
The Extended Kalman Filter
This procedure is widely used in practice, for example in the
Global Positioning System – GPS
The Extended Kalman filter works is you have an accurate clock and know where you are... If not the linearization is poor and there’s not much you can do
Distance measured using an
accurate clock
© 2006 - Rui Castro
![Page 24: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/24.jpg)
Other Non-Linear Model Procedures
Approximation of non-linearities by Gaussian Mixture models
Evaluate the densities only at a finite (fixed) set of points – the Point-Mass Filter
Effective only in small state spaces!!!© 2006 - Rui Castro
![Page 25: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/25.jpg)
Particle Filters
Same idea as in the point-mass filter, but dynamically allocate the location of the point masses.
In other words, describe the densities in a empirical way, though a set of samples:
The samples can be used to compute almost
anything interesting about the density
© 2006 - Rui Castro
![Page 26: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/26.jpg)
Condensation Algorithm (Blake et al)
Start with samples from
Importance Sampled
Filtering Density
© 2006 - Rui Castro
![Page 27: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/27.jpg)
Condensation Algorithm
Sample according to these importance samples and simulate the dynamics model
Keep repeating these two steps as you collect more observations
© 2006 - Rui Castro
![Page 28: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/28.jpg)
Condensation Algorithm
This procedure is asymptotically optimal as the number of particles grows
Many “tricks of the trade” can be used to improve performance and reduce computational cost, namely:
• Choose the number of particles dynamically• Augment/reduce the size of the dynamical model to allow multi-target tracking
Key Fact: For computationally feasible procedures the model of the dynamics must be easily simulated.
Recently, non-asymptotic guarantees for these procedures became available.
© 2006 - Rui Castro
![Page 29: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/29.jpg)
A Tracking Example
Tracking an orange (clementine), in clutter (including other oranges). Movie taken with a handheld camera (no camera motion registration).
© 2006 - Rui Castro
![Page 30: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/30.jpg)
A Tracking Example
A particle filter tracking the left-most orange, using a PV dynamics model and 1000 particles.
© 2006 - Rui Castro
![Page 31: Stochastic Filtering - A brief tutorialrmcastro/publications/stochastic_filtering.pdf · Stochastic Filtering A brief tutorial RuiCastro ©2006 -RuiCastro. ... A particle filter tracking](https://reader031.vdocument.in/reader031/viewer/2022011801/5b0850527f8b9a93738c29ea/html5/thumbnails/31.jpg)
Final Remarks
Stochastic Filtering is a very general (Bayesian) framework for sequential estimation in a model-based setting.
For linear and Gaussian models the densities being propagated have a closed-form solution and the result is simply the well known Kalman filter.
When using non-linear models closed-form solutions are generally not possible, and so approximate methods need to be used.
© 2006 - Rui Castro