Particle Filtering Darryl Morrell Stochastic Modeling Seminar 1

  • Slides: 78
Download presentation
Particle Filtering Darryl Morrell Stochastic Modeling Seminar 1

Particle Filtering Darryl Morrell Stochastic Modeling Seminar 1

Organization of Slides • Part I (PF from Dynamic Bayes Net Perspective) Understand particle

Organization of Slides • Part I (PF from Dynamic Bayes Net Perspective) Understand particle filtering as a likelihood monte carlo sampling method on DBNs – Review of likelihood sampling – Uses R&N • Part II (PF from general filtering perspective – Uses the Arulampalam tutorial Darryl Morrell Stochastic Modeling Seminar 2

Darryl Morrell Stochastic Modeling Seminar 3

Darryl Morrell Stochastic Modeling Seminar 3

Darryl Morrell Stochastic Modeling Seminar 4

Darryl Morrell Stochastic Modeling Seminar 4

Darryl Morrell Stochastic Modeling Seminar 5

Darryl Morrell Stochastic Modeling Seminar 5

Darryl Morrell Stochastic Modeling Seminar 6

Darryl Morrell Stochastic Modeling Seminar 6

Darryl Morrell Stochastic Modeling Seminar 7

Darryl Morrell Stochastic Modeling Seminar 7

Darryl Morrell Stochastic Modeling Seminar 8

Darryl Morrell Stochastic Modeling Seminar 8

Outcome: <Cloudy, ~sprinkler, Rain, Wetgrass> Darryl Morrell Stochastic Modeling Seminar 9

Outcome: <Cloudy, ~sprinkler, Rain, Wetgrass> Darryl Morrell Stochastic Modeling Seminar 9

Darryl Morrell Stochastic Modeling Seminar Problem: may need 11 many samples if the required

Darryl Morrell Stochastic Modeling Seminar Problem: may need 11 many samples if the required probability is very low. .

Darryl Morrell Stochastic Modeling Seminar 13

Darryl Morrell Stochastic Modeling Seminar 13

Darryl Morrell Stochastic Modeling Seminar 14

Darryl Morrell Stochastic Modeling Seminar 14

Darryl Morrell Stochastic Modeling Seminar 15

Darryl Morrell Stochastic Modeling Seminar 15

Darryl Morrell Stochastic Modeling Seminar 16

Darryl Morrell Stochastic Modeling Seminar 16

Darryl Morrell Stochastic Modeling Seminar 17

Darryl Morrell Stochastic Modeling Seminar 17

Darryl Morrell Stochastic Modeling Seminar 18

Darryl Morrell Stochastic Modeling Seminar 18

Darryl Morrell Stochastic Modeling Seminar 19

Darryl Morrell Stochastic Modeling Seminar 19

Darryl Morrell Stochastic Modeling Seminar 20

Darryl Morrell Stochastic Modeling Seminar 20

Darryl Morrell Stochastic Modeling Seminar 21

Darryl Morrell Stochastic Modeling Seminar 21

Darryl Morrell Stochastic Modeling Seminar 22

Darryl Morrell Stochastic Modeling Seminar 22

Darryl Morrell Stochastic Modeling Seminar 23

Darryl Morrell Stochastic Modeling Seminar 23

Darryl Morrell Stochastic Modeling Seminar 24

Darryl Morrell Stochastic Modeling Seminar 24

Darryl Morrell Stochastic Modeling Seminar 25

Darryl Morrell Stochastic Modeling Seminar 25

Particle Filters: a Solution to Hard Problems in Navigation, Target Tracking, and Perception Darryl

Particle Filters: a Solution to Hard Problems in Navigation, Target Tracking, and Perception Darryl Morrell & Ya Xue Department of Electrical Engineering Arizona State University Portions of this work supported by AFOSR under award number F 49620 -00 -1 -0124 Darryl Morrell Stochastic Modeling Seminar 26

References for More Information • M. Arulampalam, S. Maskell, N. Gordon, and T. Clapp.

References for More Information • M. 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, 50(2): 174 -188, February 2002. – This is an excellent tutorial paper-read this first. • A. Doucet, N. de Freitas, and N. Gordon, editors. Sequential Monte Carlo Methods in Practice. Springer. Verlag, 2001. – This is a broad ranging collection of articles that will introduce your to most of the important particle filter developments. Darryl Morrell Stochastic Modeling Seminar 27

Introduction “The importance of Monte Carlo methods for inference in science and engineering problems

Introduction “The importance of Monte Carlo methods for inference in science and engineering problems has grown steadily over the past decade. This growth has largely been propelled by an explosive increase in accessible computing power. …it has become clear that Monte Carlo methods can significantly expand the class of problems that can be addressed practically. ” (Introduction to Feb 2002 IEEE Transactions on Signal Processing special issue on Monte Carlo Methods) Darryl Morrell Stochastic Modeling Seminar 28

Sequential Monte Carlo Techniques Sequential Monte Carlo techniques have been developed in a wide

Sequential Monte Carlo Techniques Sequential Monte Carlo techniques have been developed in a wide range of disciplines, and go under many names: – Bootstrap filtering – The condensation algorithm – Particle filtering – Interacting particle approximations – Survival of the fittest Darryl Morrell Stochastic Modeling Seminar 29

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple particle filter Variations on the simple particle filter Pros and Cons of particle filters Application to configuration of a foveal sensor Conclusions Darryl Morrell Stochastic Modeling Seminar 30

Applications of Particle Filters Particle filters have provided solutions to problems from many disciplines:

Applications of Particle Filters Particle filters have provided solutions to problems from many disciplines: – image processing and understanding – tracking complex objects (e. g. people) in video sequences – robot navigation – tracking and identifying complex military targets (e. g. vehicle convoys) Darryl Morrell Stochastic Modeling Seminar 31

Some Specific Applications • • • Terrain aided navigation Car positioning using map information

Some Specific Applications • • • Terrain aided navigation Car positioning using map information Robot navigation Tracking of articulated targets using video Tracking of complex targets using distributed sensors. Darryl Morrell Stochastic Modeling Seminar 32

Terrain Aided Navigation http: //www. control. isy. liu. se/research/sensorfusion/sensorfusion. html • Observations are measured

Terrain Aided Navigation http: //www. control. isy. liu. se/research/sensorfusion/sensorfusion. html • Observations are measured ground clearance. • Unknowns are aircraft position and velocity. • The particle filter is needed because measured ground clearance does not uniquely determine position. Darryl Morrell Stochastic Modeling Seminar 33

Car Positioning Using Map Info Gustafsson et al. , “Particle Filters for Positioning, Navigation,

Car Positioning Using Map Info Gustafsson et al. , “Particle Filters for Positioning, Navigation, and Tracking, ” IEEE Transactions on SP, Feb 2002 • Observations are yaw rate and speed information computed from wheel speed sensors. • Vehicle position is unknown. • The map provides constraints on the vehicle position. Darryl Morrell Stochastic Modeling Seminar 34

Mobile Robot Localization http: //www. cs. washington. edu/ai/Mobile_Robotics/mcl/2 • Observations are sensor data (image,

Mobile Robot Localization http: //www. cs. washington. edu/ai/Mobile_Robotics/mcl/2 • Observations are sensor data (image, video, sonar, laser rangefinder, etc. ) • Robot position is unknown. • The robot’s position is estimated by correlating sensor data with known maps. Darryl Morrell Stochastic Modeling Seminar 35

Tracking Articulated Objects http: //www. dai. ed. ac. uk/CVonline/LOCAL_COPIES/ RINGER 1/mocap_overview. html • Observations

Tracking Articulated Objects http: //www. dai. ed. ac. uk/CVonline/LOCAL_COPIES/ RINGER 1/mocap_overview. html • Observations are video sequences from two cameras. • Unknowns are positions and velocities of model components Darryl Morrell Stochastic Modeling Seminar 36

Tracking with Networks of Distributed Sensors http: //www. parc. xerox. com/spl/projects/cosense/ • Targets are

Tracking with Networks of Distributed Sensors http: //www. parc. xerox. com/spl/projects/cosense/ • Targets are tracked using an ad hoc network of distributed micro-sensors. Darryl Morrell Stochastic Modeling Seminar 37

Other Applications • • • Channel equalization Estimation of parameters of multiple chirp signals

Other Applications • • • Channel equalization Estimation of parameters of multiple chirp signals Multiple target tracking Bearing’s-only target tracking Track before detect target tracking Image segmentation Darryl Morrell Stochastic Modeling Seminar 38

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple particle filter Variations on the simple particle filter Pros and Cons of particle filters Application to configuration of a foveal sensor Conclusions Darryl Morrell Stochastic Modeling Seminar 39

Fundamental Concepts • • Bayesian inference Monte Carlo samples Importance Sampling Resampling Darryl Morrell

Fundamental Concepts • • Bayesian inference Monte Carlo samples Importance Sampling Resampling Darryl Morrell Stochastic Modeling Seminar 40

Bayesian Inference • X is unknown-a random variable or set (vector) of random variables

Bayesian Inference • X is unknown-a random variable or set (vector) of random variables • Z is observed-also a set of random variables • We wish to infer X by observing Z. • The probability distribution p(x) models our prior knowledge of X. • The conditional probability distribution p(z|x) models the relationship between Z and X. Darryl Morrell Stochastic Modeling Seminar 41

Bayes Theorem • The conditional distribution p(x|z) represents posterior information about X given Z.

Bayes Theorem • The conditional distribution p(x|z) represents posterior information about X given Z. Darryl Morrell Stochastic Modeling Seminar 42

Monte Carlo Samples (Particles) • The posterior distribution p(x|z) may be difficult or impossible

Monte Carlo Samples (Particles) • The posterior distribution p(x|z) may be difficult or impossible to compute in closed form. • An alternative is to represent p(x|z) using Monte Carlo samples (particles): – Each particle has a value and a weight x x Darryl Morrell Stochastic Modeling Seminar 43

Importance Sampling • Ideally, the particles would represent samples drawn from the distribution p(x|z).

Importance Sampling • Ideally, the particles would represent samples drawn from the distribution p(x|z). – In practice, we usually cannot get p(x|z) in closed form; in any case, it would usually be difficult to draw samples from p(x|z). • We use importance sampling: – Particles are drawn from an importance distribution. – Particles are weighted by importance weights. Darryl Morrell Stochastic Modeling Seminar 44

Resampling • In inference problems, most weights tend to zero except a few (from

Resampling • In inference problems, most weights tend to zero except a few (from particles that closely match observations), which become large. • We resample to concentrate particles in regions where p(x|z) is larger. Darryl Morrell Stochastic Modeling Seminar x x 45

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple particle filter Variations on the simple particle filter Pros and Cons of particle filters Application to configuration of a foveal sensor Conclusions Darryl Morrell Stochastic Modeling Seminar 46

Anatomy of a Simple Particle Filter A simple particle filter requires the following: •

Anatomy of a Simple Particle Filter A simple particle filter requires the following: • A system state evolution model • An observation model • Particle computation processes: – Propagate forward in time – Compute weights given observations – Resampling Darryl Morrell Stochastic Modeling Seminar 47

System State • The state represents the unknown whose value we want to infer.

System State • The state represents the unknown whose value we want to infer. For example, – Position (and velocity) of a robot, car, plane, . . . – Position of articulated model components. • The system state at (discrete) time k is denoted xk. • The state evolves according to the following dynamics equation: xk+1 = fk (xk, wk) Darryl Morrell Stochastic Modeling Seminar 48

Observation Model • The observation zk may be an image, a frame of video,

Observation Model • The observation zk may be an image, a frame of video, a radar or sonar measurement, etc. • The relationship between the observation and the state is given by the conditional probability distribution p(zk | xk). • This distribution may be derived from a functional relationship between zk and xk : zk = hk (xk, vk) Darryl Morrell Stochastic Modeling Seminar 49

Objective-Find p(xk|zk, …, z 1) • The objective of the particle filter is to

Objective-Find p(xk|zk, …, z 1) • The objective of the particle filter is to compute the conditional distribution p(xk|zk, …, z 1) • To do this analytically, we would use the Chapman-Kolmogorov equation and Bayes Theorem along with Markov model assumptions. • The particle filter gives us an approximate computational technique. Darryl Morrell Stochastic Modeling Seminar 50

Particle Filter Algorithm • Create particles as samples from the initial state distribution p(x

Particle Filter Algorithm • Create particles as samples from the initial state distribution p(x 0). • For k going from 1 to K – Sample each particle from a proposal distribution. – Compute weights for each particle using the observation value. – (Optionally) resample particles. Darryl Morrell Stochastic Modeling Seminar 51

Initial State Distribution x 0 Darryl Morrell Stochastic Modeling Seminar 52

Initial State Distribution x 0 Darryl Morrell Stochastic Modeling Seminar 52

State Update x 0 x 1 = f 0 (x 0, w 0) x

State Update x 0 x 1 = f 0 (x 0, w 0) x 1 This is one way to sample from a proposal distribution. Darryl Morrell Stochastic Modeling Seminar 53

Compute Weights p(z 1|x 1) x 1 x 1 Darryl Morrell Stochastic Modeling Seminar

Compute Weights p(z 1|x 1) x 1 x 1 Darryl Morrell Stochastic Modeling Seminar Before After 54

Resample x 1 Darryl Morrell Stochastic Modeling Seminar 55

Resample x 1 Darryl Morrell Stochastic Modeling Seminar 55

Particle Filter Demonstration • A target moves from left to right. • Two sensors:

Particle Filter Demonstration • A target moves from left to right. • Two sensors: – Each measures the distance from itself to the target. – Sensors at (30, 0) and (0, 50) • 4000 Particles were used to track the target. • The animation on the following slide shows the particles, the true target position, and the estimated target position. Darryl Morrell Stochastic Modeling Seminar 56

Particle Filter Demonstration Darryl Morrell Stochastic Modeling Seminar 57

Particle Filter Demonstration Darryl Morrell Stochastic Modeling Seminar 57

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple particle filter Variations on the simple particle filter Pros and Cons of particle filters Application to configuration of a foveal sensor Conclusions Darryl Morrell Stochastic Modeling Seminar 58

Variations on this Simple Implementation • Use a different importance distribution: – In this

Variations on this Simple Implementation • Use a different importance distribution: – In this implementation, the importance distribution is the predicted state distribution p(xk+1|zk, …, z 1). – Several papers have pointed out that this distribution may not be the best one can use. – If the observation at time k+1 is available, significant improvement in performance can be obtained. Darryl Morrell Stochastic Modeling Seminar 59

Variations • Use a different resampling technique: – Resampling adds variance to the estimate;

Variations • Use a different resampling technique: – Resampling adds variance to the estimate; several resampling techniques are available that minimize this added variance. – Our simple resampling leaves several particles with the same value; methods for spreading them are available. Darryl Morrell Stochastic Modeling Seminar 60

Variations • Reduce the resampling frequency: – Our implementation resamples after every observation, which

Variations • Reduce the resampling frequency: – Our implementation resamples after every observation, which may add unneeded variance to the estimate. – Alternatively, one can resample only when the particle weights warrant it. This can be determined by the effective sample size. Darryl Morrell Stochastic Modeling Seminar 61

Variations • Rao-Blackwellization: – Some components of the model may have linear dynamics and

Variations • Rao-Blackwellization: – Some components of the model may have linear dynamics and can be well estimated using a conventional Kalman filter. – The Kalman filter is combined with a particle filter to reduce the number of particles needed to obtain a given level of performance. Darryl Morrell Stochastic Modeling Seminar 62

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple particle filter Variations on the simple particle filter Pros and Cons of particle filters Application to configuration of a foveal sensor Conclusions Darryl Morrell Stochastic Modeling Seminar 63

Advantages of Particle Filters • Under general conditions, the particle filter estimate becomes asymptotically

Advantages of Particle Filters • Under general conditions, the particle filter estimate becomes asymptotically optimal as the number of particles goes to infinity. • Non-linear, non-Gaussian state update and observation equations can be used. • Multi-modal distributions are not a problem. • Particle filter solutions to inference problems are often easy to formulate. Darryl Morrell Stochastic Modeling Seminar 64

Disadvantages of Particle Filters • Naïve formulations of problems usually result in significant computation

Disadvantages of Particle Filters • Naïve formulations of problems usually result in significant computation times. • It is hard to tell if you have enough particles. • The best importance distribution and/or resampling methods may be very problem specific. Darryl Morrell Stochastic Modeling Seminar 65

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple particle filter Variations on the simple particle filter Pros and Cons of particle filters Application to configuration of a foveal sensor Conclusions Darryl Morrell Stochastic Modeling Seminar 66

A Foveal Sensor A foveal sensor has a high acuity area (similar to the

A Foveal Sensor A foveal sensor has a high acuity area (similar to the fovea of the eye) that can be steered towards a desired location. Foveal Region Target Position Low Acuity Region Darryl Morrell Stochastic Modeling Seminar 67

Mathematical Model The foveal sensor is modeled mathematically as: zk = tan-1(Ck(xk-dk)) xk is

Mathematical Model The foveal sensor is modeled mathematically as: zk = tan-1(Ck(xk-dk)) xk is the target position. dk controls the location of the center of the foveal region. Ck controls the width of the foveal region. zk Foveal Region dk Darryl Morrell Stochastic Modeling Seminar xk 68

Before 1 st Observation Position True Position Darryl Morrell Estimated Initial Position Stochastic Modeling

Before 1 st Observation Position True Position Darryl Morrell Estimated Initial Position Stochastic Modeling Seminar 69

Collecting 1 st Observation 1 Foveal sensor is configured using predicted values. Predicted Position

Collecting 1 st Observation 1 Foveal sensor is configured using predicted values. Predicted Position True Observed Estimated 2 Observation is obtained 3 Position (and velocity) estimates are computed Darryl Morrell Stochastic Modeling Seminar 70

Collecting 2 nd Observation 1 Foveal sensor is configured using predicted values. Predicted True

Collecting 2 nd Observation 1 Foveal sensor is configured using predicted values. Predicted True Observed Estimated Position 2 Observation is obtained 3 Position (and velocity) estimates are computed Darryl Morrell Stochastic Modeling Seminar 71

Collecting 3 rd Observation 1 Foveal sensor is configured using predicted values. Predicted True

Collecting 3 rd Observation 1 Foveal sensor is configured using predicted values. Predicted True Observed Estimated Position 2 Observation is obtained 3 Position (and velocity) estimates are computed Darryl Morrell Stochastic Modeling Seminar 72

Implementation • We implemented a particle filter to estimate the target position from observations.

Implementation • We implemented a particle filter to estimate the target position from observations. – The foveal region is centered on the predicted target position. – The gain is either set to a constant value or adjusted to include a certain percentage of the particles in the foveal region. • The implementation took a few hours. • Tuning the filter has taken a few weeks. Darryl Morrell Stochastic Modeling Seminar 73

Comparison with Previous Foveal Sensor • A two dimensional linear system dynamics model is

Comparison with Previous Foveal Sensor • A two dimensional linear system dynamics model is used. • The system state transition matrix is stable. • The following plot shows curves of constant estimation error as a function of process and observation noise variance: – Stat fixed gain-Kalman filter implementation of fixed gain sensor – PF fixed gain-Particle filter implementation of a fixed gain sensor – PF Var. gain-Particle filter implementation of an adaptive gain sensor Darryl Morrell Stochastic Modeling Seminar 74

Curves of Constant Error Process Noise Variance 10000 1000 Stat, Fixed Gain PF, Var.

Curves of Constant Error Process Noise Variance 10000 1000 Stat, Fixed Gain PF, Var. Gain 100 10 1 0. 001 0. 1 1 10 100 Observation Noise Variance Darryl Morrell Stochastic Modeling Seminar 75

Discussion of Results • Adaptive acuity gives better performance than fixed acuity. • The

Discussion of Results • Adaptive acuity gives better performance than fixed acuity. • The particle filter implementations do not perform well with very small observation noise variances. – The number of particles is too small for very sharply peaked observation densities-few particles fall within the peaks. – Several approaches to improve the performance for small observation variances are currently under investigation. Darryl Morrell Stochastic Modeling Seminar 76

Fixed vs. Adaptive Acuity • The foveal sensor collects observations of position. • The

Fixed vs. Adaptive Acuity • The foveal sensor collects observations of position. • The acuity of the foveal region is adjusted so that 80% of the predicted particle positions fall into the foveal region. • The gain of the foveal region is smoothed using a low-pass filter with an exponentially decaying impulse response. • We show plots of the average squared estimate error as a function of time for – Fixed acuity foveal sensor for gains of 0. 25, 1, and 4 – Adaptive acuity foveal sensor Darryl Morrell Stochastic Modeling Seminar 77

Average Estimate Error Average Squared Position Error 10. 00 1. 00 Adaptive G G

Average Estimate Error Average Squared Position Error 10. 00 1. 00 Adaptive G G = 0. 25 G=1 G=4 0. 10 0. 01 0 5 10 15 20 k Darryl Morrell Stochastic Modeling Seminar 78

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple

Presentation Outline • • Applications of particle filters Fundamental concepts Anatomy of a simple particle filter Variations on the simple particle filter Pros and Cons of particle filters Application to configuration of a foveal sensor Conclusions Darryl Morrell Stochastic Modeling Seminar 79

Conclusions Particle filters (and other Monte Carlo methods) are a powerful tool to solve

Conclusions Particle filters (and other Monte Carlo methods) are a powerful tool to solve difficult inference problems. – Formulating a filter is now a tractable exercise for many previously difficult or impossible problems. – Implementing a filter effectively may require significant creativity and expertise to keep the computational requirements tractable. Darryl Morrell Stochastic Modeling Seminar 80