Top Banner
Human-Computer Interaction Human-Computer Interaction Kalman Filter Kalman Filter Hanyang University Jong-Il Park
27

Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Jan 03, 2016

Download

Documents

Oswin Neal
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Human-Computer InteractionHuman-Computer Interaction Kalman FilterKalman Filter

Hanyang University

Jong-Il Park

Page 2: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Rudolf Emil KalmanRudolf Emil Kalman

Born 1930 in Hungary Born 1930 iHungary

BS and MS from MIT BS and MS from MIT

PhD 1957 from Columbia Filter developed in 1960-61 Filter Now retired Now retired

Page 3: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

What is a Kalman filter?What is a Kalman filter?

Just some applied math. A linear system: f(a+b) = f(a) + f(b). Noisy data in hopefully less noisy

out. But delay is the price for filtering... Pure KF does not even adapt to the

data.

Page 4: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

What is it used for?What is it used for?

Tracking missiles Tracking missiles Tracking heads/hands/drumsticks Extracting lip motion from video Fitting Bezier patches to point data Lots of computer vision

applications Economics Navigation Navigation

Page 5: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Typical Kalman filter Typical Kalman filter applicationapplication

system

measuring device

Kalmanfilter

measurement noise

system noise

systemstate(desired but not known )

controls

observedmeasurement

optimalestimate

(system state)

Page 6: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Simple exampleSimple example

Page 7: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Observation 1Observation 1

Page 8: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Observation 2Observation 2

Page 9: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Combine the twoCombine the two Combine estimates

Combine variances

Page 10: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Combined estimatesCombined estimates

Online weighted average!

Page 11: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

But suppose we are But suppose we are movingmoving……

Not all the difference is error Some may be motion Some may be

motion KF can include a motion model Estimate velocity and position

Page 12: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Process modelProcess model

Describes how the state changes over time

The state for the first example was scalar

The process model was nothing changes

A better model might be A State is a 2-vector [ position, velocity ] positionn+1= positionn + velocityn * time

velocityn+1= velocityn

Page 13: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Measurement modelMeasurement model

“What you see from where you are”

Page 14: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Predict Predict Correct Correct

KF operates by KF operates by Predicting the new state and its

uncertainty Correcting with the new

measurement Correcting with the new measurementPredict

Correct

Kalmanfilter

Page 15: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

FormulationFormulation

Page 16: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Kalman FilterKalman Filter

Page 17: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Kalman filter assumes Kalman filter assumes linearitylinearity Only matrix operations allowed Measurement is a linear function of

state Next state is linear function of

previous state state

If nonlinear No way?projection

Page 18: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

If nonlinear If nonlinear Extended Kalman Extended Kalman ilter(EKF)ilter(EKF)Nonlinear Process (Model)

Process dynamics: A becomes a(x)Measurement: H becomes h(x)

Filter ReformulationUse functions instead of matricesUse Jacobians to project forward, and

to relate measurement to state

Page 19: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Formulation - EKFFormulation - EKF

Page 20: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Extended Kalman filterExtended Kalman filter

Page 21: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

JacobianJacobian

Partial derivative of measurement with respect to state

If measurement is a vector of length M and state has length N

Jacobian of measurement fucntion will be MxN matrix of numbers (not equations)

Often evaluating h(x) and Jacobian(h(x)) at the same time cost only a little extra

Page 22: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Simulation Simulation –– Exact R Exact R

Page 23: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Convergence of Convergence of covariance Pcovariance P

Page 24: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Simulation Simulation –– Bigger R Bigger R

Page 25: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Simulation Simulation –– Smaller R Smaller R

Page 26: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

Concluding remarksConcluding remarks Kalman filter is a very useful and

powerful Optimal in many sense Linear system -> Kalman filter Nonlinear system -> Extended Kalman

filter Effect of initial value

Covariance matrix – less sensitive Measurement noise

Over-estimated -> slow convergence Under-estimated -> noisy output

Page 27: Human-Computer Interaction Kalman Filter Hanyang University Jong-Il Park.

ResourcesResources

Kalman filter website maintained by Greg Welch