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

Similar documents
EKF, UKF. Pieter Abbeel UC Berkeley EECS. Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics

Autonomous Mobile Robot Design

Maximum Likelihood (ML), Expectation Maximization (EM) Pieter Abbeel UC Berkeley EECS

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

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

Probabilistic Fundamentals in Robotics. DAUIN Politecnico di Torino July 2010

Introduction to Unscented Kalman Filter

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

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

Lecture 2: From Linear Regression to Kalman Filter and Beyond

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

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

Introduction to Mobile Robotics Bayes Filter Kalman Filter

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Nonlinear Optimization for Optimal Control Part 2. Pieter Abbeel UC Berkeley EECS. From linear to nonlinear Model-predictive control (MPC) POMDPs

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

Autonomous Navigation for Flying Robots

Maximum Likelihood (ML), Expecta6on Maximiza6on (EM)

A new unscented Kalman filter with higher order moment-matching

1 Kalman Filter Introduction

Lecture 7: Optimal Smoothing

Partially Observable Markov Decision Processes (POMDPs) Pieter Abbeel UC Berkeley EECS

Kalman Filter. Predict: Update: x k k 1 = F k x k 1 k 1 + B k u k P k k 1 = F k P k 1 k 1 F T k + Q

Robot Mapping. Least Squares. Cyrill Stachniss

L07. KALMAN FILTERING FOR NON-LINEAR SYSTEMS. NA568 Mobile Robotics: Methods & Algorithms

The Unscented Particle Filter

(Extended) Kalman Filter

2D Image Processing (Extended) Kalman and particle filter

Lecture 4: Extended Kalman filter and Statistically Linearized Filter

The Scaled Unscented Transformation

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

Unscented Transformation of Vehicle States in SLAM

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

Expectation Propagation Algorithm

TSRT14: Sensor Fusion Lecture 8

Linear Regression and Its Applications

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Bastian Steder

Dynamic models 1 Kalman filters, linearization,

Adaptive Unscented Kalman Filter with Multiple Fading Factors for Pico Satellite Attitude Estimation

L03. PROBABILITY REVIEW II COVARIANCE PROJECTION. NA568 Mobile Robotics: Methods & Algorithms

ROBUST CONSTRAINED ESTIMATION VIA UNSCENTED TRANSFORMATION. Pramod Vachhani a, Shankar Narasimhan b and Raghunathan Rengaswamy a 1

Constrained State Estimation Using the Unscented Kalman Filter

2D Image Processing. Bayes filter implementation: Kalman filter

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

Reinforcement Learning Wrap-up

Lecture 6: Bayesian Inference in SDE Models

Discrete Mathematics and Probability Theory Fall 2015 Lecture 21

Mobile Robot Localization

CS491/691: Introduction to Aerial Robotics

Visual Tracking via Geometric Particle Filtering on the Affine Group with Optimal Importance Functions

State Estimation of Linear and Nonlinear Dynamic Systems

Bias-Variance Tradeoff

Chapter 3 Numerical Methods

Nonlinear Estimation Techniques for Impact Point Prediction of Ballistic Targets

2D Image Processing. Bayes filter implementation: Kalman filter

SYSTEMS OF NONLINEAR EQUATIONS

An Introduction to the Kalman Filter

Reduced Sigma Point Filters for the Propagation of Means and Covariances Through Nonlinear Transformations

Nonlinear State Estimation! Particle, Sigma-Points Filters!

Lecture 4: Numerical Solution of SDEs, Itô Taylor Series, Gaussian Approximations

State Estimation using Moving Horizon Estimation and Particle Filtering

On a Data Assimilation Method coupling Kalman Filtering, MCRE Concept and PGD Model Reduction for Real-Time Updating of Structural Mechanics Model

MODEL BASED LEARNING OF SIGMA POINTS IN UNSCENTED KALMAN FILTERING. Ryan Turner and Carl Edward Rasmussen

CIS 390 Fall 2016 Robotics: Planning and Perception Final Review Questions

Parameter estimation Conditional risk

Cheng Soon Ong & Christian Walder. Canberra February June 2018

ECE276A: Sensing & Estimation in Robotics Lecture 10: Gaussian Mixture and Particle Filtering

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

Machine Learning

Mobile Robot Localization

Efficient Monitoring for Planetary Rovers

Dual Estimation and the Unscented Transformation

Expectation Propagation in Dynamical Systems

COMP 551 Applied Machine Learning Lecture 20: Gaussian processes

CSE 473: Artificial Intelligence

Autonomous Mobile Robot Design

Probabilistic Graphical Models

Numerical solutions of nonlinear systems of equations

Policy Gradient. U(θ) = E[ R(s t,a t );π θ ] = E[R(τ);π θ ] (1) 1 + e θ φ(s t) E[R(τ);π θ ] (3) = max. θ P(τ;θ)R(τ) (6) P(τ;θ) θ log P(τ;θ)R(τ) (9)

Nonlinear Optimization for Optimal Control

GP-SUM. Gaussian Process Filtering of non-gaussian Beliefs

A Comparison of the EKF, SPKF, and the Bayes Filter for Landmark-Based Localization

Partially Observable Markov Decision Processes (POMDPs)

A NEW NONLINEAR FILTER

A Comparitive Study Of Kalman Filter, Extended Kalman Filter And Unscented Kalman Filter For Harmonic Analysis Of The Non-Stationary Signals

From Bayes to Extended Kalman Filter

Machine Learning. Gaussian Mixture Models. Zhiyao Duan & Bryan Pardo, Machine Learning: EECS 349 Fall

CS 188: Artificial Intelligence Spring Announcements

RECURSIVE OUTLIER-ROBUST FILTERING AND SMOOTHING FOR NONLINEAR SYSTEMS USING THE MULTIVARIATE STUDENT-T DISTRIBUTION

Vector Derivatives and the Gradient

Least Squares. Ken Kreutz-Delgado (Nuno Vasconcelos) ECE 175A Winter UCSD

1 Introduction ISSN

A STUDY ON THE STATE ESTIMATION OF NONLINEAR ELECTRIC CIRCUITS BY UNSCENTED KALMAN FILTER

Robotics 2 Target Tracking. Giorgio Grisetti, Cyrill Stachniss, Kai Arras, Wolfram Burgard

in a Rao-Blackwellised Unscented Kalman Filter

Computers and Chemical Engineering

CSCI567 Machine Learning (Fall 2014)

Mini-Course 07 Kalman Particle Filters. Henrique Massard da Fonseca Cesar Cunha Pacheco Wellington Bettencurte Julio Dutra

Machine Learning 4771

Linear Models for Regression CS534

Transcription:

EKF, UKF Pieter Abbeel UC Berkeley EECS Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics

Kalman Filter Kalman Filter = special case of a Bayes filter with dynamics model and sensory model being linear Gaussian: 2-1

Kalman Filtering Algorithm At time 0: For t = 1, 2, Dynamics update: Measurement update:

Nonlinear Dynamical Systems Most realistic robotic problems involve nonlinear functions: Versus linear setting: 4

Linearity Assumption Revisited y y p(y) x p(x) x 5

Linearity Assumption Revisited y y p(y) x p(x) x 6

Non-linear Function y y Gaussian of p(y) has mean and variance of y under p(y) p(y) p(x) x x 7

EKF Linearization (1) 8

EKF Linearization (2) p(x) has high variance relative to region in which linearization is accurate. 9

EKF Linearization (3) p(x) has small variance relative to region in which linearization is accurate. 10

EKF Linearization: First Order Taylor Series Expansion Dynamics model: for x t close to µ t we have: Measurement model: for x t close to µ t we have: 11

EKF Linearization: Numerical Numerically compute F t column by column: Here e i is the basis vector with all entries equal to zero, except for the i t entry, which equals 1. If wanting to approximate F t as closely as possible then ² is chosen to be a small number, but not too small to avoid numerical issues

Ordinary Least Squares Given: samples {(x (1), y (1) ), (x (2), y (2) ),, (x (m), y (m) )} Problem: find function of the form f(x) = a 0 + a 1 x that fits the samples as well as possible in the following sense:

Ordinary Least Squares Recall our objective: Let s write this in vector notation:, giving: Set gradient equal to zero to find extremum: (See the Matrix Cookbook for matrix identities, including derivatives.)

Ordinary Least Squares For our example problem we obtain a = [4.75; 2.00] a 0 + a 1 x

Ordinary Least Squares 26 24 22 20 More generally: 30 20 10 0 0 10 20 30 40 In vector notation:, gives: Set gradient equal to zero to find extremum (exact same derivation as two slides back):

Vector Valued Ordinary Least Squares Problems So far have considered approximating a scalar valued function from samples {(x (1), y (1) ), (x (2), y (2) ),, (x (m), y (m) )} with A vector valued function is just many scalar valued functions and we can approximate it the same way by solving an OLS problem multiple times. Concretely, let then we have: In our vector notation: This can be solved by solving a separate ordinary least squares problem to find each row of

Vector Valued Ordinary Least Squares Problems Solving the OLS problem for each row gives us: Each OLS problem has the same structure. We have

Vector Valued Ordinary Least Squares and EKF Linearization Approximate x t+1 = f t (x t, u t ) with affine function a 0 + F t x t by running least squares on samples from the function: {( x t (1), y (1) =f t (x t (1),u t ), ( x t (2), y (2) =f t (x t (2),u t ),, ( x t (m), y (m) =f t (x t (m),u t )} Similarly for z t+1 = h t (x t )

OLS and EKF Linearization: Sample Point Selection OLS vs. traditional (tangent) linearization: OLS traditional (tangent)

OLS Linearization: choosing samples points Perhaps most natural choice: reasonable way of trying to cover the region with reasonably high probability mass

Analytical vs. Numerical Linearization Numerical (based on least squares or finite differences) could give a more accurate regional approximation. Size of region determined by evaluation points. Computational efficiency: Analytical derivatives can be cheaper or more expensive than function evaluations Development hint: Numerical derivatives tend to be easier to implement If deciding to use analytical derivatives, implementing finite difference derivative and comparing with analytical results can help debugging the analytical derivatives

EKF Algorithm At time 0: For t = 1, 2, Dynamics update: Measurement update:

EKF Summary Highly efficient: Polynomial in measurement dimensionality k and state dimensionality n: O(k 2.376 + n 2 ) Not optimal! Can diverge if nonlinearities are large! Works surprisingly well even when all assumptions are violated! 35

Linearization via Unscented Transform EKF UKF 36

UKF Sigma-Point Estimate (2) EKF UKF 37

UKF Sigma-Point Estimate (3) EKF UKF 38

UKF Sigma-Point Estimate (4)

[Julier and Uhlmann, 1997] UKF intuition why it can perform better Assume we know the distribution over X and it has a mean \bar{x} Y = f(x) EKF approximates f by first order and ignores higher-order terms UKF uses f exactly, but approximates p(x).

Original unscented transform Picks a minimal set of sample points that match 1 st, 2 nd and 3 rd moments of a Gaussian: \bar{x} = mean, P xx = covariance, i à i th column, x 2 < n : extra degree of freedom to fine-tune the higher order moments of the approximation; when x is Gaussian, n+ = 3 is a suggested heuristic L = \sqrt{p_{xx}} can be chosen to be any matrix satisfying: L L T = P xx [Julier and Uhlmann, 1997]

A crude preliminary investigation of whether we can get EKF to match UKF by particular choice of points used in the least squares fitting Beyond scope of course, just including for completeness.

Self-quiz When would the UKF significantly outperform the EKF? y x Analytical derivatives, finite-difference derivatives, and least squares will all end up with a horizontal linearization à they d predict zero variance in Y = f(x)

Unscented Kalman filter Dynamics update: Can simply use unscented transform and estimate the mean and variance at the next time from the sample points Observation update: Use sigma-points from unscented transform to compute the covariance matrix between x t and z t. Then can do the standard update.

[Table 3.4 in Probabilistic Robotics]

UKF Summary Highly efficient: Same complexity as EKF, with a constant factor slower in typical practical applications Better linearization than EKF: Accurate in first two terms of Taylor expansion (EKF only first term) + capturing more aspects of the higher order terms Derivative-free: No Jacobians needed Still not optimal!