Probabilistic Robotics

Similar documents
2-Step Temporal Bayesian Networks (2TBN): Filtering, Smoothing, and Beyond Technical Report: TRCIM1030

CSE 473: Artificial Intelligence

Particle Filters. Pieter Abbeel UC Berkeley EECS. Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics

Bayesian Networks BY: MOHAMAD ALSABBAGH

Outline. CSE 573: Artificial Intelligence Autumn Agent. Partial Observability. Markov Decision Process (MDP) 10/31/2012

CSE 473: Artificial Intelligence Spring 2014

CS532, Winter 2010 Hidden Markov Models

CSEP 573: Artificial Intelligence

Robotics. Mobile Robotics. Marc Toussaint U Stuttgart

CS 343: Artificial Intelligence

Hidden Markov Models. Vibhav Gogate The University of Texas at Dallas

Our Status in CSE 5522

Mathematical Formulation of Our Example

CS 5522: Artificial Intelligence II

CS 5522: Artificial Intelligence II

Introduction to Mobile Robotics Probabilistic Robotics

Rapid Introduction to Machine Learning/ Deep Learning

CS188 Outline. We re done with Part I: Search and Planning! Part II: Probabilistic Reasoning. Part III: Machine Learning

CS 343: Artificial Intelligence

CSE 473: Artificial Intelligence Probability Review à Markov Models. Outline

Markov Models. CS 188: Artificial Intelligence Fall Example. Mini-Forward Algorithm. Stationary Distributions.

Probabilistic Partial Evaluation: Exploiting rule structure in probabilistic inference

Hidden Markov Models. AIMA Chapter 15, Sections 1 5. AIMA Chapter 15, Sections 1 5 1

Kalman filtering and friends: Inference in time series models. Herke van Hoof slides mostly by Michael Rubinstein

Lecture 6: Bayesian Inference in SDE Models

Probabilistic Graphical Models and Bayesian Networks. Artificial Intelligence Bert Huang Virginia Tech

Hidden Markov Models,99,100! Markov, here I come!

Robots Autónomos. Depto. CCIA. 2. Bayesian Estimation and sensor models. Domingo Gallardo

Lecture : Probabilistic Machine Learning

Lecture 2: From Linear Regression to Kalman Filter and Beyond

CS 343: Artificial Intelligence

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Human-Oriented Robotics. Temporal Reasoning. Kai Arras Social Robotics Lab, University of Freiburg

CS 188: Artificial Intelligence Spring Announcements

Quantifying uncertainty & Bayesian networks

Introduction to Mobile Robotics Bayes Filter Particle Filter and Monte Carlo Localization

Markov localization uses an explicit, discrete representation for the probability of all position in the state space.

Computer Vision Group Prof. Daniel Cremers. 14. Sampling Methods

CS 343: Artificial Intelligence

Intelligent Systems (AI-2)

13: Variational inference II

Inference and estimation in probabilistic time series models

Modeling and state estimation Examples State estimation Probabilities Bayes filter Particle filter. Modeling. CSC752 Autonomous Robotic Systems

Hidden Markov Models Part 2: Algorithms

Probabilistic Graphical Models

CS 188: Artificial Intelligence. Our Status in CS188

Probability. CS 3793/5233 Artificial Intelligence Probability 1

Intelligent Systems (AI-2)

Probabilistic Classification

Statistical learning. Chapter 20, Sections 1 4 1

Bayesian Approaches Data Mining Selected Technique

CS491/691: Introduction to Aerial Robotics

The Particle Filter. PD Dr. Rudolph Triebel Computer Vision Group. Machine Learning for Computer Vision

STA 4273H: Statistical Machine Learning

PROBABILISTIC REASONING OVER TIME

Introduction to Bayesian Learning. Machine Learning Fall 2018

Linear Dynamical Systems

Markov Models and Hidden Markov Models

Probabilistic Robotics

Lecture 16 Deep Neural Generative Models

Hidden Markov Models. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 19 Apr 2012

Mobile Robotics II: Simultaneous localization and mapping

CS 4649/7649 Robot Intelligence: Planning

Note Set 5: Hidden Markov Models

Lecture 4: Hidden Markov Models: An Introduction to Dynamic Decision Making. November 11, 2010

Probabilistic Reasoning. (Mostly using Bayesian Networks)

CS 5522: Artificial Intelligence II

Announcements. CS 188: Artificial Intelligence Fall Markov Models. Example: Markov Chain. Mini-Forward Algorithm. Example

Reasoning Under Uncertainty Over Time. CS 486/686: Introduction to Artificial Intelligence

CS 5522: Artificial Intelligence II

Sequential Monte Carlo and Particle Filtering. Frank Wood Gatsby, November 2007

Announcements. CS 188: Artificial Intelligence Fall VPI Example. VPI Properties. Reasoning over Time. Markov Models. Lecture 19: HMMs 11/4/2008

Inference in Bayesian Networks

Density Propagation for Continuous Temporal Chains Generative and Discriminative Models

Probabilistic Graphical Models

9 Forward-backward algorithm, sum-product on factor graphs

CSC321 Lecture 18: Learning Probabilistic Models

Intelligent Systems (AI-2)

15-780: Grad AI Lecture 19: Graphical models, Monte Carlo methods. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman

Conditional Independence

Final Exam December 12, 2017

CS 188: Artificial Intelligence

Our Status. We re done with Part I Search and Planning!

Probabilistic Graphical Networks: Definitions and Basic Results

Mobile Robot Localization

Introduction to Mobile Robotics Bayes Filter Kalman Filter

Hidden Markov Models (recap BNs)

15-381: Artificial Intelligence. Hidden Markov Models (HMMs)

Computer Vision Group Prof. Daniel Cremers. 11. Sampling Methods

CS325 Artificial Intelligence Ch. 15,20 Hidden Markov Models and Particle Filtering

PMR Learning as Inference

Markov Chains and Hidden Markov Models

Introduction to Artificial Intelligence (AI)

Conditional probabilities and graphical models

Final Exam December 12, 2017

Approximate Inference Part 1 of 2

Introduction to Artificial Intelligence (AI)

Course Introduction. Probabilistic Modelling and Reasoning. Relationships between courses. Dealing with Uncertainty. Chris Williams.

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic

Probability and Information Theory. Sargur N. Srihari

Transcription:

University of Rome La Sapienza Master in Artificial Intelligence and Robotics Probabilistic Robotics Prof. Giorgio Grisetti Course web site: http://www.dis.uniroma1.it/~grisetti/teaching/probabilistic_ro Giorgio Grisetti Dynamic Bayesian Networks 1 / 32

Overview Probabilistic Dynamic Systems Dynamic Bayesian Networks (DBN) Inference on DBN Recursive Bayes Equation Giorgio Grisetti Dynamic Bayesian Networks 2 / 32

Dynamic System, Deterministic View u t 1 x t 1 x t f(x t 1,u t 1 ) h(x t ) z t t f(x t 1,u t 1 ): transition function h(x t ): observation function x t 1 : previous state x t : current state u t 1 : previous control/action z t : current observation t : delay Giorgio Grisetti Dynamic Bayesian Networks 3 / 32

Dynamic System, Probabilistic View u t 1 x t 1 x t p(x t x t 1,u t 1 ) p(z t x t ) z t t p(x t x t 1,u t 1 ): transition model p(z t x t ): observation model x t 1 : previous state x t : current state u t 1 : previous control/action z t : current observation t : delay Giorgio Grisetti Dynamic Bayesian Networks 4 / 32

Evolution of a Dynamic System x 0 Let s start from a known initial state distribution p(x 0 ). Giorgio Grisetti Dynamic Bayesian Networks 5 / 32

Evolution of a Dynamic System u 0 x 0 A control u 0 becomes available Giorgio Grisetti Dynamic Bayesian Networks 6 / 32

Evolution of a Dynamic System u 0 x 0 x 1 The transition model p(x t x t 1,u t 1 ) correlates the current states x 1 with the previous control u 0 and the previous state x 0. Giorgio Grisetti Dynamic Bayesian Networks 7 / 32

Evolution of a Dynamic System u 0 x 0 x 1 z 1 The observation model p(z t x t ) correlates the observation z 1 and the current state x 1. Giorgio Grisetti Dynamic Bayesian Networks 8 / 32

Evolution of a Dynamic System u 0 u 1 u t 1 u t x 0 x 1 x t 1 x t x T z 1 z t 1 z t z T This leads to a recurrent structure, that depends on the time. Giorgio Grisetti Dynamic Bayesian Networks 9 / 32

Dynamic Bayesian Networks (DBN) u 0 u 1 u t 1 u t x 0 x 1 x t 1 x t x T z 1 z t 1 z t z T Graphical representations of stochastic dynamic processes Characterized by a recurrent structure Giorgio Grisetti Dynamic Bayesian Networks 10 / 32

States in a DBN The domain of the states x t, the controls u t and the observations z t are not restricted to be boolean or discrete. Examples: Robot localization, with laser range finder states x t SE(2), isometries on a plane observations z t R #beams, laser range measurements controls u t R 2, translational and rotational speed HMM states x t [X 1,...,X Nx ], finite states observations z t [Z 1,...,Z Nz ], finite observations controls u t [U 1,...,U Nu ], finite observations Inference in a DBN requires to design a data structure that can represent a distribution over states. Giorgio Grisetti Dynamic Bayesian Networks 11 / 32

Typical Inferences in a DBN In a dynamic system, usually 1 we know: the observations made by the system z 1:T, because we measure them the controls u 1:T 1 because we issue them Typical inferences in a DBN: name query known Filtering p(x T u 0:T 1,z 1:T ) u 0:T 1,z 1:t Smoothing p(x k u 0:T 1,z 1:T ), 0 < k < T u 0:T 1,z 1:t Max a Posteriori argmax x0:t p(x 0:T u 0:T 1,z 1:T ) u 0:T 1,z 1:T 1 usually does not mean always Giorgio Grisetti Dynamic Bayesian Networks 12 / 32

Typical Inferences in a DBN Using the traditional tools for Bayes Networks is not a good idea. too many variables (potentially infinite) render the solution intractable the domains are not necessarily discrete However, we can exploit the recurrent structure to design procedures that take advantage of it. Giorgio Grisetti Dynamic Bayesian Networks 13 / 32

DBN Inference: Filtering u 0 u 1 u t 1 u t known query x 0 x 1 x t 1 x t x T z 1 z t 1 z t z T Given the sequence of all observations z 1:T up to the current time T, the sequence of all controls u 0:T 1 we want to compute the distrubution over the current states p(x T u 0:T 1,z 1:T ). Giorgio Grisetti Dynamic Bayesian Networks 14 / 32

DBN Inference: Smoothing u 0 u 1 u k 1 u k known query x 0 x 1 x k 1 x k x T z 1 z k 1 z k z T Given the sequence of all observations z 1:T up to the current time T, the sequence of all controls u 0:T 1 we want to compute the distrubution over a past state p(x k u 0:T 1,z 1:T ). Knowing also the controls u k:t 1 and the observations Z k:t after time k, leads to more accurate estimates than pure filtering. Giorgio Grisetti Dynamic Bayesian Networks 15 / 32

DBN Inference: Maximum a Posteriori u 0 u 1 u t 1 u t known query x 0 x 1 x t 1 x t x T z 1 z t 1 z t z T Given the sequence of all observations z 1:T up to the current time T, the sequence of all controls u 0:T 1 we want to find the most likely trajectory of states x 0:T. In this case we are not seeking for a distribution. Just the most likely sequence. Giorgio Grisetti Dynamic Bayesian Networks 16 / 32

DBN inference: Belief Algorithms for performing inference on a DBN keep track of the estimate of a distribution of states. This distribution should be stored in an appropriate data structure. The structure depends on the knowledge of the characteristics of the distribution (e.g. Gaussian) the domain of the state variables (e.g. continuous vs discrete) When we write b(x t ) we mean our current belief of p(x t...). The algorithms for performing inference on a DBN work by updating a belief. Giorgio Grisetti Dynamic Bayesian Networks 17 / 32

DBN inference: Belief In the simple case of a system with discrete state x {X 1:n }, the belief can be represented through and array x of float values. Each cell of the array x[i] = p(x = X i ) contains the probability of that state. If our system has a continous state and we know it is distributed according to a Gaussian, we can represent the belief through its parameters (mean and covariance matrix). If the state is continuous but the distribution is unknown, we can use some approximate representation (e.g. weighed samples of state values). Giorgio Grisetti Dynamic Bayesian Networks 18 / 32

Filtering: Bayes Recursion We want to compute p(x T u 0:T 1,z 1:T ) =? We know: the observations z 1:T the controls u 0:T 1 p(x t x t 1,u t 1 ): the transition model. It is a function that given the previous state x t 1 and control u t 1, tells us how likely it is to lend in state x t. p(z t x t ): the transition model. It is a function, that given the current state x t 1, tells us how likely it is to observe z t. b(x t 1 ), which is our previous belief about p(x t 1, u 0:t 2,z 1:t 1 ) Giorgio Grisetti Dynamic Bayesian Networks 19 / 32

Filtering (1) splitting z t : = p( x t }{{} A p(x t u 0:t 1,z 1:t ) = (1),u }{{} 0:t 1,z 1:t 1 ) (2) }{{} B C z t recall the conditional bayes rule p(a B,C) = p(b A,C)p(A C) p(b C) B A C A C = p( {}}{{}}{{}}{{}}{{}}{ z t x t, u 0:t 1,z 1:t 1 )p( x t u 0:t 1,z 1:t 1 ) p( z }{{} t u 0:t 1,z 1:t 1 ) }{{} B C (3) Giorgio Grisetti Dynamic Bayesian Networks 20 / 32

Filtering: Denominator Let the denominator η t = 1/p(z t u 0:t 1,z 1:t 1 ). (4) Note that η t does not depend on x, thus to the extent of our computation is just a normalizing constant. We will come back to the denominator later. Giorgio Grisetti Dynamic Bayesian Networks 21 / 32

Filtering: Observation model Our filtering equation becomes η t p(z t x t,u 0:t 1,z 1:t 1 )p(x t u 0:t 1,z 1:t 1 ) (5) Note that p(z t x t,u 0:t 1,z 1:t 1 ) means this known u 0 u 1 u t 1 query x 0 x 1 x t 1 x t z 1 z t 1 z t If we know x t, we do not need to know u 0:t 1,z 1:t 1 to predict z t, since the state x t encodes all the knowledge about the past (Markov assumption) : p(z t x t,u 0:t 1,z 1:t 1 ) = p(z t x t ) (6) Giorgio Grisetti Dynamic Bayesian Networks 22 / 32

Filtering: Transition Model Thus, our current equation is p(x t u 0:t 1,z 1:t ) = η t p(z t x t )p(x t u 0:t 1,z 1:t 1 ) (7) Still the second part of the equation is obscure. Our task is to manipulate it to get something that matches our preconditions. Giorgio Grisetti Dynamic Bayesian Networks 23 / 32

Filtering: Transition Model If we would know x t 1, our life would be nuch easier, as we could repeat the trick done for the observation model: u 0 u 1 u t 1 known query x 0 x 1 x t 1 x t z 1 z t 1 z t thus p(x t x t 1,u 0:t 1,z 1:t 1 ) = p(x t x t 1,u t 1 ) (8) Giorgio Grisetti Dynamic Bayesian Networks 24 / 32

Filtering: Transition Model The sad truth is that we do not have x t 1, however Recall the following probability identities p(a C) = b p(a, B C) (9) combining the two above we have p(a,b C) = p(a B,C)p(B C) (10) p(a C) = b p(a B, C)p(B C) (11) Giorgio Grisetti Dynamic Bayesian Networks 25 / 32

Filtering: Transition Model The sad truth is that we do not have x t 1, however let s look again at our problematic equation, and put some letters p( x }{{} t u 0:t 1,z 1:t 1 ) = (12) }{{} A C = x t x }{{} t 1,u }{{} 0:t 1,z 1:t 1 )p(x }{{} t 1 u }{{} 0:t 1,z 1:t 1 ) (13) }{{} x t 1p( A B C B C putting in the result of Eq. 8, we highlight the transition model = x t 1p(x t x t 1,u t 1 )p(x t 1 u 0:t 1,z 1:t 1 ) (14) Giorgio Grisetti Dynamic Bayesian Networks 26 / 32

Filtering: Wrapup After our efforts, we figure out that the recursive filtering equation is the following: p(x t u 0:t 1,z 1:t ) = (15) η t p(z t x t ) x t 1p(x t x t 1,u t 1 )p(x t 1 u 0:t 1,z 1:t 1 ) (16) yet, if in the last term of the product in the summation, we would not have a dependancy from u t 1, we would have a recursive equation. luckily, p(x t 1 u 0:t 1,z 1:t 1 ) = p(x t 1 u 0:t 2,z 1:t 1 ), since the last control has no influence on x t 1 if we don t know x t. Giorgio Grisetti Dynamic Bayesian Networks 27 / 32

Filtering: Wrapup We can finally write the recursive equation of filtering as: b(x t) {}}{ p(x t u 0:t 1,z 1:t ) (17) = η t p(z t x t ) x t 1p(x t x t 1,u t 1 )p(x t 1 u 0:t 2,z 1:t 1 ) }{{} b(x t 1 ) during the estimation, we do not have the true distribution, but rather beliefs estimate. Equation 18 tells us how to update a current belief once new observations/controls become available b(x t ) = η t p(z t x t ) x t 1p(x t x t 1,u t 1 )b(x t 1 ) (18) Giorgio Grisetti Dynamic Bayesian Networks 28 / 32

Normalizer: η t η t is just a constant ensuring that b(x t ) is still a probability distribution. 1 η t = x t p(x t x t 1,u t 1 )b(x t 1 ) Giorgio Grisetti Dynamic Bayesian Networks 29 / 32

Filtering: Discrete case float transition model ( int to, int from, int control ); float observation model ( int observarion, int state ); void f i l t e r ( float b, int n states, int z, int u) { // clear the states float b pred [ n states ]; for ( int i =0; i<n states ; i++) b pred [ i ]=0; } // predict for ( int i =0; i<n states ; i++) for ( int j=0; j<n states ; j++) b pred [ i]+=transition model (i, j,u) b[ j ]; // integrate the observation float inverse eta = 0; for ( int i =0; i<n states ; i++) inverse eta += b pred [ i] =observation model (z, i ); // normalize float eta = 1./ inverse eta ; for ( int i =0; i<n states ; i++) b[ i ] = b pred [ i ] eta ; Giorgio Grisetti Dynamic Bayesian Networks 30 / 32

Filtering: Alternative Formulation Predict: incorporate in the last belief b t 1, the most recent observation. From transition model and the last state, compute the following joint distribution through chain rule p(x t,x t 1 z 1:t 1,u 1:t 1 ) = p(x t x t 1,u t 1 )p(x t,x t 1 z 1:t 1,u 1:t 2 ) }{{} b t 1 (19) From the joint, remove x t 1 through marginalization p(x t z 1:t 1,u 1:t 1 ) = p(x }{{} t,x t 1 z 1:t 1,u 1:t 1 ) (20) x b t 1 t t 1 Giorgio Grisetti Dynamic Bayesian Networks 31 / 32

Filtering: Alternative Formulation Update: from the predicted belief b t t 1, compute the joint distribution that predicts the observation. From transition model and the last state, compute the following joint distribution through chain rule p(x t,z t z 1:t 1,u 1:t 1 ) = p(z t x t )p(x t, z 1:t 1,u 1:t 1 ) (21) Incorporate the current observation through conditioning, on the actual measurement p(x t,z t z 1:t 1,u 1:t 1 ) p(x t z 1:t,u 1:t 1 ) = }{{} p(z t z 1:t 1,u 1:t 1 ) b t t (22) Note: since we already know the value of z t, we do not need to compute the joint distribution for all possible values of z Z, but just for the current measurement. Giorgio Grisetti Dynamic Bayesian Networks 32 / 32