30
Kalman Filtering (Intelligent Autonomous Robotics) Dr. Subramanian Ramamoorthy School of Informatics

Kalman Filtering (Intelligent Autonomous Robotics)

  • Upload
    others

  • View
    32

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Kalman Filtering (Intelligent Autonomous Robotics)

Kalman Filtering

(Intelligent Autonomous Robotics)

Dr. Subramanian Ramamoorthy

School of Informatics

Page 2: Kalman Filtering (Intelligent Autonomous Robotics)

Recall: Estimation

Last time, we looked at the following:

Estimation of “true state” from noisy measurements

We assumed a sensor model (y = Hx + w) where the

state is linearly transformed and corrupted with noise

Then, we looked at a variety of estimation procedures

Least squares

Weighted least squares

Recursive formulation of WLS

Maximum likelihood estimation

Nonlinear sensor model (i.e., y = h(x) + w), which resulted in the

ideas of Monte Carlo methods and Unscented estimation

February 26, 2008 Kalman Filtering 2

Page 3: Kalman Filtering (Intelligent Autonomous Robotics)

Agenda for this lecture

Recap of the basic multiple observations scenario

Introduction of dynamics

The Kalman filter algorithm

Discrete time, linear dynamics

Continuous time, linear dynamics

Extensions for nonlinear dynamics

Multiple-model estimation

February 26, 2008 Kalman Filtering 3

Page 4: Kalman Filtering (Intelligent Autonomous Robotics)

Simple Estimation Problem

Consider a ship in choppy waters

Needs to navigate using a distant landmark (star)

Can make multiple measurements of the same ground

truth (anticipating the rest of the lecture, let us say –

successively in time)

We know (a priori) one crucial fact – the variance of each

measurement

Then, what is the true value of the

distance to the landmark?

February 26, 2008 Kalman Filtering 4

Page 5: Kalman Filtering (Intelligent Autonomous Robotics)

Updating Estimated State

How to combine multiple measurements?

February 26, 2008 Kalman Filtering 5

Page 6: Kalman Filtering (Intelligent Autonomous Robotics)

Answer: Variance-weighted Sum

February 26, 2008 Kalman Filtering 6

Page 7: Kalman Filtering (Intelligent Autonomous Robotics)

In pictures…

February 26, 2008 Kalman Filtering 7

Page 8: Kalman Filtering (Intelligent Autonomous Robotics)

What happens if we Add Dynamics?

February 26, 2008 Kalman Filtering 8

Page 9: Kalman Filtering (Intelligent Autonomous Robotics)

Effect of Adding System Dynamics

The uncertainty is amplified –

density function gets “squashed”

February 26, 2008 Kalman Filtering 9

Page 10: Kalman Filtering (Intelligent Autonomous Robotics)

Idea of the “Kalman Filter”

February 26, 2008 Kalman Filtering 10

Page 11: Kalman Filtering (Intelligent Autonomous Robotics)

Key Variables: First Two Statistical Moments

February 26, 2008 Kalman Filtering 11

Page 12: Kalman Filtering (Intelligent Autonomous Robotics)

Discrete Kalman Filter: Key Ingredients

Discrete process model

State change over time

Linear difference equation

Discrete measurement model

Relationship between state and measurement

Linear function (this is what we dealt with in last lecture!)

Model parameters

Process noise characteristics

Measurement noise characteristics

February 26, 2008 Kalman Filtering 12

Page 13: Kalman Filtering (Intelligent Autonomous Robotics)

Discrete Kalman Filter: Two Models

February 26, 2008 Kalman Filtering 13

Page 14: Kalman Filtering (Intelligent Autonomous Robotics)

Discrete Kalman Filter: Model Equations

February 26, 2008 Kalman Filtering 14

Page 15: Kalman Filtering (Intelligent Autonomous Robotics)

Complete Model Specification

February 26, 2008 Kalman Filtering 15

Page 16: Kalman Filtering (Intelligent Autonomous Robotics)

How the Filter Works

Time Update or

Prediction (a priori

estimates) - Project state

and covariance forward in

time

Measurement Update or

Correction (a posteriori

estimates) - Update

variables based on a

noise measurement

February 26, 2008 Kalman Filtering 16

Page 17: Kalman Filtering (Intelligent Autonomous Robotics)

Discrete Kalman Filter – In Equations

February 26, 2008 Kalman Filtering 17

Page 18: Kalman Filtering (Intelligent Autonomous Robotics)

Discrete Kalman Filter: The Complete Loop

February 26, 2008 Kalman Filtering 18

Page 19: Kalman Filtering (Intelligent Autonomous Robotics)

Example: Estimating a (Noisy) Constant

February 26, 2008 Kalman Filtering 19

Page 20: Kalman Filtering (Intelligent Autonomous Robotics)

Recap: What is the Kalman Filter?

An optimal, recursive data processing algorithm

Optimal in what sense?

If the system dynamics are linear

And system/sensor noise is Gaussian and white

Then, there is no alternate algorithm with lower MSE

Therefore, Optimal Best Linear Unbiased Estimator

Bayesian View of the Kalman Filter:

It propagates the conditional probability density of the

desired quantities, conditioned on the knowledge of the

actual sensor data

February 26, 2008 Kalman Filtering 20

Page 21: Kalman Filtering (Intelligent Autonomous Robotics)

Kalman Filter: Continuous Time-variant case

February 26, 2008 Kalman Filtering 21

Page 22: Kalman Filtering (Intelligent Autonomous Robotics)

Dealing with Nonlinearities

February 26, 2008 Kalman Filtering 22

Page 23: Kalman Filtering (Intelligent Autonomous Robotics)

Extended Kalman Filter - Setup

February 26, 2008 Kalman Filtering 23

Page 24: Kalman Filtering (Intelligent Autonomous Robotics)

Extended Kalman Filter - Computation

Notice that the above equations look a lot like the linear

system dynamics and measurement equations

So, we can define a Kalman filter over this error

And then, use that linear error estimate to drive the main

estimation loop

February 26, 2008 Kalman Filtering 24

Page 25: Kalman Filtering (Intelligent Autonomous Robotics)

Extended Kalman Filter: The Loop

February 26, 2008 Kalman Filtering 25

Page 26: Kalman Filtering (Intelligent Autonomous Robotics)

Limitations of the EKF

If the initial state estimate is wrong, or if the process is

incorrectly modeled, the filter may quickly diverge (due to

linearization)

Covariance estimate is an underestimate of the true

matrix - risks becoming inconsistent in a statistical sense

without the addition of "stabilizing noise“

Computational complexity associated with

Jacobian/Hessian calculation – can be an issue in high-

dimensional setting

February 26, 2008 Kalman Filtering 26

Page 27: Kalman Filtering (Intelligent Autonomous Robotics)

Unscented Kalman Filter: Basic Idea

February 26, 2008 Kalman Filtering 27

Page 28: Kalman Filtering (Intelligent Autonomous Robotics)

Multiple Model Filters

February 26, 2008 Kalman Filtering 28

Page 29: Kalman Filtering (Intelligent Autonomous Robotics)

Interesting Recent Hypothesis

February 26, 2008 Kalman Filtering 29

Page 30: Kalman Filtering (Intelligent Autonomous Robotics)

Reference:

S. Thrun et al., Probabilistic Robotics, MIT Press, 2005.

Several pictures and equations in this presentation are

taken from the tutorial by Welch and Bishop

(http://www.cs.unc.edu/~welch/kalman/)

February 26, 2008 Kalman Filtering 30