HCI / CprE / ComS 575: Computational Perception Instructor: Alexander Stoytchev

Slides:



Advertisements
Similar presentations
Probabilistic Reasoning over Time
Advertisements

CHAPTER 8 More About Estimation. 8.1 Bayesian Estimation In this chapter we introduce the concepts related to estimation and begin this by considering.
Introduction To Tracking
Lecture 13: Mapping Landmarks CS 344R: Robotics Benjamin Kuipers.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Newton’s Method Application to LMS Recursive Least Squares Exponentially-Weighted.
Observers and Kalman Filters
Presenter: Yufan Liu November 17th,
Lecture 11: Recursive Parameter Estimation
280 SYSTEM IDENTIFICATION The System Identification Problem is to estimate a model of a system based on input-output data. Basic Configuration continuous.
1 Introduction to Kalman Filters Michael Williams 5 June 2003.
Mobile Intelligent Systems 2004 Course Responsibility: Ola Bengtsson.
Tracking using the Kalman Filter. Point Tracking Estimate the location of a given point along a sequence of images. (x 0,y 0 ) (x n,y n )
Discriminative Training of Kalman Filters P. Abbeel, A. Coates, M
Prepared By: Kevin Meier Alok Desai
Estimation and the Kalman Filter David Johnson. The Mean of a Discrete Distribution “I have more legs than average”
© 2003 by Davi GeigerComputer Vision November 2003 L1.1 Tracking We are given a contour   with coordinates   ={x 1, x 2, …, x N } at the initial frame.
Tracking with Linear Dynamic Models. Introduction Tracking is the problem of generating an inference about the motion of an object given a sequence of.
Kalman Filtering Pieter Abbeel UC Berkeley EECS Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics TexPoint fonts used in EMF. Read.
Computer Vision Linear Tracking Jan-Michael Frahm COMP 256 Some slides from Welch & Bishop.
Overview and Mathematics Bjoern Griesbach
HCI / CprE / ComS 575: Computational Perception
Adaptive Signal Processing
ROBOT MAPPING AND EKF SLAM
1 Formation et Analyse d’Images Session 7 Daniela Hall 7 November 2005.
Kalman filter and SLAM problem
Muhammad Moeen YaqoobPage 1 Moment-Matching Trackers for Difficult Targets Muhammad Moeen Yaqoob Supervisor: Professor Richard Vinter.
Colorado Center for Astrodynamics Research The University of Colorado STATISTICAL ORBIT DETERMINATION Project Report Unscented kalman Filter Information.
Mobile Robot controlled by Kalman Filter
Statistical learning and optimal control:
Particle Filter & Search
Lecture 11: Kalman Filters CS 344R: Robotics Benjamin Kuipers.
/09/dji-phantom-crashes-into- canadian-lake/
Computer vision: models, learning and inference Chapter 19 Temporal models.
Lab 4 1.Get an image into a ROS node 2.Find all the orange pixels (suggest HSV) 3.Identify the midpoint of all the orange pixels 4.Explore the findContours.
Computer Vision - A Modern Approach Set: Tracking Slides by D.A. Forsyth The three main issues in tracking.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Deterministic vs. Random Maximum A Posteriori Maximum Likelihood Minimum.
Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.
University of Colorado Boulder ASEN 5070: Statistical Orbit Determination I Fall 2014 Professor Brandon A. Jones Lecture 26: Singular Value Decomposition.
The “ ” Paige in Kalman Filtering K. E. Schubert.
Real-Time Simultaneous Localization and Mapping with a Single Camera (Mono SLAM) Young Ki Baik Computer Vision Lab. Seoul National University.
2 Introduction to Kalman Filters Michael Williams 5 June 2003.
HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev
Robotics Research Laboratory 1 Chapter 7 Multivariable and Optimal Control.
An Introduction to Kalman Filtering by Arthur Pece
Lesson 2 – kalman Filters
NCAF Manchester July 2000 Graham Hesketh Information Engineering Group Rolls-Royce Strategic Research Centre.
Estimators and estimates: An estimator is a mathematical formula. An estimate is a number obtained by applying this formula to a set of sample data. 1.
Dept. E.E./ESAT-STADIUS, KU Leuven
Short Introduction to Particle Filtering by Arthur Pece [ follows my Introduction to Kalman filtering ]
Analysis of Experimental Data; Introduction
Object Tracking - Slide 1 Object Tracking Computer Vision Course Presentation by Wei-Chao Chen April 05, 2000.
HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev
State Estimation and Kalman Filtering Zeeshan Ali Sayyed.
Tracking with dynamics
Probabilistic Robotics Introduction Probabilities Bayes rule Bayes filters.
HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev
Robust Localization Kalman Filter & LADAR Scans
DSP-CIS Part-III : Optimal & Adaptive Filters Chapter-9 : Kalman Filters Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven
Statistics 350 Lecture 2. Today Last Day: Section Today: Section 1.6 Homework #1: Chapter 1 Problems (page 33-38): 2, 5, 6, 7, 22, 26, 33, 34,
Autonomous Mobile Robots Autonomous Systems Lab Zürich Probabilistic Map Based Localization "Position" Global Map PerceptionMotion Control Cognition Real.
General approach: A: action S: pose O: observation Position at time t depends on position previous position and action, and current observation.
Zhaoxia Fu, Yan Han Measurement Volume 45, Issue 4, May 2012, Pages 650–655 Reporter: Jing-Siang, Chen.
Probabilistic Robotics Bayes Filter Implementations Gaussian filters.
PSG College of Technology
Probabilistic Robotics
Lecture 10: Observers and Kalman Filters
Probabilistic Map Based Localization
Bayes and Kalman Filter
Kalman Filter: Bayes Interpretation
The Discrete Kalman Filter
Presentation transcript:

HCI / CprE / ComS 575: Computational Perception Instructor: Alexander Stoytchev

The Kalman Filter (part 1) HCI/ComS 575X: Computational Perception Iowa State University Copyright © Alexander Stoytchev

Lecture Plan Administrative Stuff More details on Project Proposals One last example with Color & Movement Start with the Kalman Filter

Administrative Stuff Wiki HW2 due this Thursday HW3 will go out this week as well

Brown and Hwang (1992) “Introduction to Random Signals and Applied Kalman Filtering” Ch 5: The Discrete Kalman Filter Readings for Today:

Maybeck, Peter S. (1979) Chapter 1 in ``Stochastic models, estimation, and control'', Mathematics in Science and Engineering Series, Academic Press.

Arthur Gelb, Joseph Kasper, Raymond Nash, Charles Price, Arthur Sutherland (1974) Applied Optimal Estimation MIT Press.

Rudolf Emil Kalman [

Definition A Kalman filter is simply an optimal recursive data processing algorithm Under some assumptions the Kalman filter is optimal with respect to virtually any criterion that makes sense.

Definition “The Kalman filter incorporates all information that can be provided to it. It processes all available measurements, regardless of their precision, to estimate the current value of the variables of interest.” [Maybeck (1979)]

Why do we need a filter? No mathematical model of a real system is perfect Real world disturbances Imperfect Sensors

Application: Radar Tracking

Application: Lunar Landing

Application: Missile Tracking

Application: Sailing

Application: Robot Navigation

Application: Other Tracking

Application: Head Tracking

Face & Hand Tracking

A Simple Recursive Example Problem Statement: Given the measurement sequence: z 1, z 2, …, z n find the mean [Brown and Hwang (1992)]

First Approach 1. Make the first measurement z 1 Store z 1 and estimate the mean as µ 1 =z 1 2. Make the second measurement z 2 Store z 1 along with z 2 and estimate the mean as µ 2 = (z 1 +z 2 )/2 [Brown and Hwang (1992)]

First Approach (cont’d) 3. Make the third measurement z 3 Store z 3 along with z 1 and z 2 and estimate the mean as µ 3 = (z 1 +z 2 +z 3 )/3 [Brown and Hwang (1992)]

First Approach (cont’d) n. Make the n-th measurement z n Store z n along with z 1, z 2,…, z n-1 and estimate the mean as µ n = (z 1 + z 2 + … + z n )/n [Brown and Hwang (1992)]

Second Approach 1. Make the first measurement z 1 Compute the mean estimate as µ 1 =z 1 Store µ 1 and discard z 1 [Brown and Hwang (1992)]

Second Approach (cont’d) 2.Make the second measurement z 2 Compute the estimate of the mean as a weighted sum of the previous estimate µ 1 and the current measurement z 2: µ 2 = 1/2 µ 1 +1/2 z 2 Store µ 2 and discard z 2 and µ 1 [Brown and Hwang (1992)]

Second Approach (cont’d) 3.Make the third measurement z 3 Compute the estimate of the mean as a weighted sum of the previous estimate µ 2 and the current measurement z 3: µ 3 = 2/3 µ 2 +1/3 z 3 Store µ 3 and discard z 3 and µ 2 [Brown and Hwang (1992)]

Second Approach (cont’d) n.Make the n-th measurement z n Compute the estimate of the mean as a weighted sum of the previous estimate µ n-1 and the current measurement z n: µ n = (n-1)/n µ n-1 +1/n z n Store µ n and discard z n and µ n-1 [Brown and Hwang (1992)]

Comparison Batch MethodRecursive Method

Analysis The second procedure gives the same result as the first procedure. It uses the result for the previous step to help obtain an estimate at the current step. The difference is that it does not need to keep the sequence in memory. [Brown and Hwang (1992)]

Second Approach (rewrite the general formula) µ n = (n-1)/n µ n-1 +1/n z n µ n = (n/n) µ n-1 - (1/n) µ n-1 +1/n z n

Second Approach (rewrite the general formula) µ n = (n-1)/n µ n-1 +1/n z n µ n = (n/n) µ n-1 - (1/n) µ n-1 +1/n z n µ n = µ n-1 + 1/n (z n - µ n-1 ) Old Estimate Difference Between New Reading and Old Estimate Gain Factor

Second Approach (rewrite the general formula) Old Estimate Difference Between New Reading and Old Estimate Gain Factor

Gaussian Properties

The Gaussian Function

Gaussian pdf

Properties If and Then

pdf for

Properties

Summation and Subtraction

A simple example using diagrams

Conditional density of position based on measured value of z 1 [Maybeck (1979)]

Conditional density of position based on measured value of z 1 [Maybeck (1979)] position measured position uncertainty

Conditional density of position based on measurement of z 2 alone [Maybeck (1979)]

Conditional density of position based on measurement of z 2 alone [Maybeck (1979)] measured position 2 uncertainty 2

Conditional density of position based on data z 1 and z 2 [Maybeck (1979)] position estimate uncertainty estimate

Propagation of the conditional density [Maybeck (1979)]

Propagation of the conditional density [Maybeck (1979)] movement vector expected position just prior to taking measurement 3

Propagation of the conditional density [Maybeck (1979)] movement vector expected position just prior to taking measurement 3

Propagation of the conditional density z3z3 σ x (t 3 ) measured position 3 uncertainty 3

Updating the conditional density after the third measurement z3z3 σ x (t 3 ) position uncertainty position estimate x(t3)

Questions?

Now let’s do the same thing …but this time we’ll use math

How should we combine the two measurements? [Maybeck (1979)] σZ1σZ1 σZ2σZ2

Calculating the new mean Scaling Factor 1 Scaling Factor 2

Calculating the new mean Scaling Factor 1 Scaling Factor 2

Calculating the new mean Scaling Factor 1 Scaling Factor 2 Why is this not z 1 ?

Calculating the new variance [Maybeck (1979)] σZ1σZ1 σZ2σZ2

Calculating the new variance Scaling Factor 1 Scaling Factor 2

Calculating the new variance Scaling Factor 1 Scaling Factor 2

Calculating the new variance Scaling Factor 1 Scaling Factor 2

Calculating the new variance

Why is this result different from the one given in the paper?

Remember the Gaussian Properties?

If and Then This is a 2 not a

The scaling factors must be squared! Scaling Factor 1 Scaling Factor 2

The scaling factors must be squared! Scaling Factor 1 Scaling Factor 2

Therefore the new variance is Try to derive this on your own.

Another Way to Express The New Position [Maybeck (1979)]

Another Way to Express The New Position [Maybeck (1979)]

Another Way to Express The New Position [Maybeck (1979)]

The equation for the variance can also be rewritten as [Maybeck (1979)]

Adding Movement [Maybeck (1979)]

Adding Movement [Maybeck (1979)]

Adding Movement [Maybeck (1979)]

Properties of K If the measurement noise is large K is small 0 [Maybeck (1979)]

The Kalman Filter (part 2) HCI/ComS 575X: Computational Perception Iowa State University Copyright © Alexander Stoytchev

Let’s Start With a Demo Matlab Program Written by John Burnett

Another Example

A Simple Example Consider a ship sailing east with a perfect compass trying to estimate its position. You estimate the position x from the stars as z 1 =100 with a precision of σ x =4 miles x 100 [

A Simple Example (cont’d) Along comes a more experienced navigator, and she takes her own sighting z 2 She estimates the position x= z 2 =125 with a precision of σ x =3 miles How do you merge her estimate with your own? x [

A Simple Example (cont’d) x x 2 =116 [

With the distributions being Gaussian, the best estimate for the state is the mean of the distribution, so… or alternately where K t is referred to as the Kalman gain, and must be computed at each time step A Simple Example (cont’d) Correction Term [

OK, now you fall asleep on your watch. You wake up after 2 hours, and you now have to re-estimate your position Let the velocity of the boat be nominally 20 miles/hour, but with a variance of σ 2 w =4 miles 2 /hour What is the best estimate of your current position? A Simple Example (cont’d) x x 2 =116 x - 3 =? [

The next effect is that the gaussian is translated by a distance and the variance of the distribution is increased to account for the uncertainty in dynamics A Simple Example (cont’d) x x 2 =116x - 3 =156 [

OK, this is not a very accurate estimate. So, since you’ve had your nap you decide to take another measurement and you get z 3 =165 miles Using the same update procedure as the first update, we obtain and so on… A Simple Example (cont’d) [

In this example, prediction came from using knowledge of the vehicle dynamics to estimate its change in position An analogy with a robot would be integrating information from the robot kinematics (i.e. you give it a desired [x, y, α] velocities for a time Δt) to estimate changed in position The correction is accomplished through making exteroceptive observations and then fusing this with your current estimate This is akin to updating position estimates using landmark information, etc. In practice, the prediction rate is typically much higher than the correction The Predictor-Corrector Approach [

Calculating the new mean Scaling Factor 1 Scaling Factor 2

Calculating the new variance Scaling Factor 1 Scaling Factor 2

What makes these scaling factors special? Are there other ways to combine the two measurements? They minimize the error between the prediction and the true value of X. They are optimal in the least-squares sense.

Minimize the error

What is the minimum value? [

What is the minimum value? [

Finding the Minimum Value Y= 9x x + 50 dY/dx = 18 x -50 =0 The minimum is obtained when x=50/18= (7) The minimum value is Y(x min ) = 9*(50/18) 2 -50*(50/18) +50 = (4)

Start with two measurements v 1 and v 2 represent zero mean noise

Formula for the estimation error The new estimate is The error is

Expected value of the error If the estimate is unbiased this should hold

Find the Mean Square Error = ?

Mean Square Error

Minimize the mean square error

Finding S 1 Therefore

Finding S 2

Finally we get what we wanted

Finding the new variance

Formula for the new variance

Kalman Filter Diagram [Brown and Hwang (1992)]

The process to be estimated

THE END