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

Similar documents
Lecture 2: From Linear Regression to Kalman Filter and Beyond

Linear Dynamical Systems

Lecture 2: From Linear Regression to Kalman Filter and Beyond

2D Image Processing. Bayes filter implementation: Kalman filter

Lecture 6: Bayesian Inference in SDE Models

Autonomous Navigation for Flying Robots

2D Image Processing. Bayes filter implementation: Kalman filter

2D Image Processing (Extended) Kalman and particle filter

The Kalman Filter ImPr Talk

Autonomous Mobile Robot Design

Probabilistic Graphical Models

The Kalman Filter (part 1) Definition. Rudolf Emil Kalman. Why do we need a filter? Definition. HCI/ComS 575X: Computational Perception.

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

STA 4273H: Statistical Machine Learning

Bayes Filter Reminder. Kalman Filter Localization. Properties of Gaussians. Gaussians. Prediction. Correction. σ 2. Univariate. 1 2πσ e.

Sensor Fusion: Particle Filter

CSE 473: Artificial Intelligence

Note Set 5: Hidden Markov Models

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

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

PROBABILISTIC REASONING OVER TIME

Probabilistic Fundamentals in Robotics. DAUIN Politecnico di Torino July 2010

CS491/691: Introduction to Aerial Robotics

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

Lecture 7: Optimal Smoothing

PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 13: SEQUENTIAL DATA

Mobile Robot Localization

Dynamic System Identification using HDMR-Bayesian Technique

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

Mobile Robot Localization

L09. PARTICLE FILTERING. NA568 Mobile Robotics: Methods & Algorithms

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

Parametric Models. Dr. Shuang LIANG. School of Software Engineering TongJi University Fall, 2012

Dynamic models 1 Kalman filters, linearization,

Bayesian Methods in Positioning Applications

AUTOMOTIVE ENVIRONMENT SENSORS

L06. LINEAR KALMAN FILTERS. NA568 Mobile Robotics: Methods & Algorithms

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

Bayesian Machine Learning - Lecture 7

Introduction to Mobile Robotics Probabilistic Robotics

Markov Models and Hidden Markov Models

Rao-Blackwellized Particle Filter for Multiple Target Tracking

Miscellaneous. Regarding reading materials. Again, ask questions (if you have) and ask them earlier

L11. EKF SLAM: PART I. NA568 Mobile Robotics: Methods & Algorithms

Introduction to Artificial Intelligence (AI)

Stochastic Models, Estimation and Control Peter S. Maybeck Volumes 1, 2 & 3 Tables of Contents

Sequential Monte Carlo Methods for Bayesian Computation

CS 5522: Artificial Intelligence II

Robotics 2 Target Tracking. Kai Arras, Cyrill Stachniss, Maren Bennewitz, Wolfram Burgard

CS 5522: Artificial Intelligence II

CSEP 573: Artificial Intelligence

Probabilistic Robotics. Slides from Autonomous Robots (Siegwart and Nourbaksh), Chapter 5 Probabilistic Robotics (S. Thurn et al.

Probabilistic Graphical Models

9 Multi-Model State Estimation

STA 414/2104: Machine Learning

Particle Filters; Simultaneous Localization and Mapping (Intelligent Autonomous Robotics) Subramanian Ramamoorthy School of Informatics

Mathematical Formulation of Our Example

Why do we care? Examples. Bayes Rule. What room am I in? Handling uncertainty over time: predicting, estimating, recognizing, learning

Introduction to Machine Learning

Machine Learning for OR & FE

Hidden Markov Models (recap BNs)

Lecture: Gaussian Process Regression. STAT 6474 Instructor: Hongxiao Zhu

Bayesian Networks BY: MOHAMAD ALSABBAGH

Why do we care? Measurements. Handling uncertainty over time: predicting, estimating, recognizing, learning. Dealing with time

Probabilistic Graphical Models Homework 2: Due February 24, 2014 at 4 pm

EKF and SLAM. McGill COMP 765 Sept 18 th, 2017

Content.

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

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

Probabilistic Robotics

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

Reasoning Under Uncertainty: Conditioning, Bayes Rule & the Chain Rule

Lecture 3. Linear Regression II Bastian Leibe RWTH Aachen

Temporal probability models. Chapter 15, Sections 1 5 1

Probabilistic Robotics

Introduction to Bayesian Learning. Machine Learning Fall 2018

Bayesian Networks: Construction, Inference, Learning and Causal Interpretation. Volker Tresp Summer 2014

Vlad Estivill-Castro. Robots for People --- A project for intelligent integrated systems

State Estimation Based on Nested Particle Filters

Linear Dynamical Systems (Kalman filter)

Inference and estimation in probabilistic time series models

SEQUENTIAL MONTE CARLO METHODS WITH APPLICATIONS TO COMMUNICATION CHANNELS. A Thesis SIRISH BODDIKURAPATI

ECE521 Lecture 19 HMM cont. Inference in HMM

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

Lecture Note 2: Estimation and Information Theory

Nonlinear Estimation Techniques for Impact Point Prediction of Ballistic Targets

Expectation Propagation in Dynamical Systems

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

Nonlinear and/or Non-normal Filtering. Jesús Fernández-Villaverde University of Pennsylvania

Robotics. Mobile Robotics. Marc Toussaint U Stuttgart

Hidden Markov models 1

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

From Bayes to Extended Kalman Filter

Probability and Information Theory. Sargur N. Srihari

Part 1: Expectation Propagation

Hidden Markov Models. By Parisa Abedi. Slides courtesy: Eric Xing

Simultaneous Localization and Mapping (SLAM) Corso di Robotica Prof. Davide Brugali Università degli Studi di Bergamo

Particle Filters. Outline

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

Bayesian Networks: Construction, Inference, Learning and Causal Interpretation. Volker Tresp Summer 2016

Transcription:

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

Problem overview Goal Estimate most probable state at time k using measurement up to time k k <k: prediction k =k: filtering k >k: smoothing Input (Noisy) Sensor measurements Known or learned system model (see last lecture) Many problems require estimation of the state of systems that change over time using noisy measurements on the system

Applications Ballistics Robotics Robot localization Tracking hands/cars/ Econometrics Stock prediction Navigation Many more

Example: noisy localization https://img.clipartfest.com Position at t=0 Measurement at t=1 t=2 t=3 t=4 t=5 t=6

Example: noisy localization https://img.clipartfest.com Position at t=0 Measurement at t=1 Smoothing: where was I in the past t=2 t=3 t=4 t=5 t=6

Example: noisy localization https://img.clipartfest.com Position at t=0 Measurement at t=1 Smoothing: where was I in the past Filtering: where am I now t=2 t=3 t=4 t=5 t=6

Example: noisy localization https://img.clipartfest.com Position at t=0 Measurement at t=1 Smoothing: where was I in the past Filtering: where am I now t=2 t=3 t=4 t=5 t=6 Prediction: where will I be in the future

Today s lecture Fundamentals Formalizing time series models Recursive filtering Two cases with optimal solutions Linear Gaussian models Discrete systems Suboptimal solutions

Stochastic Processes Stochastic process Collection of random variables indexed by some set Ie. R.V. x " for every element i in index set Time series modeling Sequence of random states/variables Measurements available at discrete times Modeled as stochastic process indexed by N

Stochastic Processes Stochastic process Collection of random variables indexed by some set Ie. R.V. x " for every element i in index set Time series modeling Sequence of random states/variables Measurements available at discrete times Modeled as stochastic process indexed by N p(x $ ) x $ (location at t=1)

Stochastic Processes Stochastic process Collection of random variables indexed by some set Ie. R.V. x " for every element i in index set Time series modeling Sequence of random states/variables Measurements available at discrete times Modeled as stochastic process indexed by N p(x $ ) p(x ( ) p(x ) )

(First-order) Markov process The Markov property the likelihood of a future state depends on present state only Markov chain A stochastic process with Markov property k-1 k k+1 time x k-1 x k x k+1 States

Hidden Markov Model (HMM) the state is not directly visible, but output dependent on the state is visible k-1 k k+1 time x k-1 x k x k+1 States (hidden) z k-1 z k z k+1 Measurements (observed)

State space The state vector contains all available information to describe the investigated system usually multidimensional: The measurement vector represents observations related to the state vector Generally (but not necessarily) of lower dimension than the state vector

State space Tracking: Econometrics: Monetary flow Interest rates Inflation

Hidden Markov Model (HMM) the state is not directly visible, but output dependent on the state is visible k-1 k k+1 time x k-1 x k x k+1 States (hidden) z k-1 z k z k+1 Measurements (observed)

Dynamic System k-1 k k+1 x k-1 x k x k+1 z k-1 z k z k+1 Stochastic diffusion State equation: state vector at time instant k state transition function, i.i.d process noise Observation equation: observations at time instant k observation function, i.i.d measurement noise

A simple dynamic system (4-dimensional state space) Constant velocity motion: Only position is observed:

Gaussian distribution μ Yacov Hel-Or

Today s lecture Fundamentals Formalizing time series models Recursive filtering Two cases with optimal solutions Linear Gaussian models Discrete systems Suboptimal solutions

Recursive filters For many problems, estimate is required each time a new measurement arrives Batch processing Requires all available data Sequential processing New data is processed upon arrival Need not store the complete dataset Need not reprocess all data for each new measurement Assume no out-of-sequence measurements (solutions for this exist as well )

Bayesian filter Construct the posterior probability density function of the state based on all available information Posterior Thomas Bayes Sample space By knowing the posterior many kinds of estimates for can be derived mean (expectation), mode, median, Can also give estimation of the accuracy (e.g. covariance)

Recursive Bayes filters Given: System models in probabilistic forms Markovian process Measurements conditionally independent given state (known statistics of v k, w k ) Initial state also known as the prior Measurements z $,, z -

Recursive Bayes filters Prediction step (a-priori) Uses the system model to predict forward Deforms/translates/spreads state pdf due to random noise Update step (a-posteriori) Update the prediction in light of new data Tightens the state pdf

Prior vs posterior? It can seem odd to regard p x - z $:-/$ Compare to likelihood posterior P(x - z -, z $:-/$ ) = p z - x -, z $:-/$ P(x - z $:-/$ ) p(z - z $:-/$ ) evidence prior P(x - z -, z $:-/$ ) = p z - x -, z $:-/$ P(x - z $:-/$ ) p(z - z $:-/$ ) as prior In update with z -, it is a working prior

General prediction-update framework Assume is given at time k-1 Prediction: System model Previous posterior (1) Using Chapman-Kolmogorov identity + Markov property

General prediction-update framework Update step Measurement model Current prior (2) Where Normalization constant

Generating estimates Knowledge of enables to compute optimal estimate with respect to any criterion. e.g. Minimum mean-square error (MMSE) Maximum a-posteriori

General prediction-update framework So (1) and (2) give optimal solution for the recursive estimation problem! Unfortunately only conceptual solution integrals are intractable Cannot represent arbitrary pdfs! However, optimal solution does exist for several restrictive cases

Today s lecture Fundamentals Formalizing time series models Recursive filtering Two cases with optimal solutions Linear Gaussian models Discrete systems Suboptimal solutions

Restrictive case #1 Posterior at each time step is Gaussian Completely described by mean and covariance If is Gaussian it can be shown that is also Gaussian provided that: are Gaussian are linear

Restrictive case #1 Why Linear? Yacov Hel-Or

Restrictive case #1 Why Linear? Yacov Hel-Or

Restrictive case #1 Linear system with additive noise Simple example again /$ /$

The Kalman filter Rudolf E. Kalman Substituting into (1) and (2) yields the predict and update equations

The Kalman filter Predict: Update:

Intuition via 1D example Lost at sea Night No idea of location For simplicity let s assume 1D Not moving * Example and plots by Maybeck, Stochastic models, estimation and control, volume 1

Example cont d Time t1: Star Sighting Denote z(t1)=z1 Uncertainty (inaccuracies, human error, etc) Denote σ1 (normal) Can establish the conditional probability of x(t1) given measurement z1

Example cont d Probability for any location, based on measurement For Gaussian density 68.3% within ±σ1 Best estimate of position: Mean/Mode/Median

Example cont d Time t2: friend (more trained) x(t2)=z2, σ(t2)=σ2 Since she has higher skill: σ2<σ1

Example cont d f(x(t2) z1,z2) also Gaussian

Example cont d σ less than both σ1 and σ2 σ1= σ2: average σ1> σ2: more weight to z2 Rewrite:

Example cont d The Kalman update rule: Best estimate Given z2 (a posteriori) Best Prediction prior to z2 (a priori) Optimal Weighting (Kalman Gain) Residual

The Kalman filter Predict: Update: Generally increases variance Generally decreases variance

Kalman gain Small measurement error, H invertible: Small prediction error:

The Kalman filter Pros (compared to e.g. particle filter) Optimal closed-form solution to the tracking problem (under the assumptions) No algorithm can do better in a linear-gaussian environment! All logical estimations collapse to a unique solution Simple to implement Fast to execute Cons If either the system or measurement model is nonlinear à the posterior will be non-gaussian Smoothing possible with a backward message (cf HMMs, lecture 10)

Restrictive case #2 The state space (domain) is discrete and finite Assume the state space at time k-1 consists of states Let be the conditional probability of the state at time k-1, given measurements up to k-1

The Grid-based filter The posterior pdf at k-1 can be expressed as sum of delta functions Again, substitution into (1) and (2) yields the predict and update equations Equivalent to belief monitoring in HMMs (Lecture 10)

The Grid-based filter Prediction (1) New prior is also weighted sum of delta functions New prior weights are reweighting of old posterior weights using state transition probabilities

The Grid-based filter Update (2) Posterior weights are reweighting of prior weights using likelihoods (+ normalization)

The Grid-based filter Pros: assumed known, but no constraint on their (discrete) shapes Easy extension to varying number of states Optimal solution for the discrete-finite environment! Cons: Curse of dimensionality Inefficient if the state space is large Statically considers all possible hypotheses Smoothing possible with a backward message (cf HMMs, lecture 10)

Today s lecture Fundamentals Formalizing time series models Recursive filtering Two cases with optimal solutions Linear Gaussian models Discrete systems Suboptimal solutions

Suboptimal solutions In many cases these assumptions do not hold Practical environments are nonlinear, non-gaussian, continuous Approximations are necessary Extended Kalman filter (EKF) Approximate grid-based methods Multiple-model estimators Unscented Kalman filter (UKF) Particle filters (PF) Analytic approximations Numerical methods Gaussian-sum filters Sampling approaches

The extended Kalman filter The idea: local linearization of the dynamic system might be sufficient description of the nonlinearity The model: nonlinear system with additive noise

The extended Kalman filter f, h are approximated using a first-order Taylor series expansion (eval at state estimations) Predict: Update:

The extended Kalman filter

The extended Kalman filter Pros Good approximation when models are near-linear Efficient to calculate (de facto method for navigation systems and GPS) Cons Only approximation (optimality not proven) Still a single Gaussian approximations Nonlinearity à non-gaussianity (e.g. bimodal) If we have multimodal hypothesis, and choose incorrectly can be difficult to recover Inapplicable when f,h discontinuous

The unscented Kalman filter Yacov Hel-Or Can give more accurately approximates posterior

Challenges Detection specific Full/partial occlusions False positives/false negatives Entering/leaving the scene Efficiency Multiple models and switching dynamics Multiple targets

Conclusion Inference in time series models: Past: smoothing Present: filtering Future: prediction Recursive Bayes filter optimal Computable in two cases Linear Gaussian systems: Kalman filter Discrete systems: Grid filter Approximate solutions for other systems