Kalman Filter recall: estimating the robot configuration by - - PowerPoint PPT Presentation

kalman filter
SMART_READER_LITE
LIVE PREVIEW

Kalman Filter recall: estimating the robot configuration by - - PowerPoint PPT Presentation

Autonomous and Mobile Robotics Prof. Giuseppe Oriolo Localization 2 Kalman Filter recall: estimating the robot configuration by iterative integration of the kinematic model (dead reckoning) is subject to an error that diverges over time


slide-1
SLIDE 1

Autonomous and Mobile Robotics

  • Prof. Giuseppe Oriolo

Localization 2

Kalman Filter

slide-2
SLIDE 2

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

2

  • probabilistic localization: instead of maintaining a single

hypothesis on the configuration, maintain a probability distribution over the space of all possible hypotheses

  • recall: estimating the robot configuration by iterative

integration of the kinematic model (dead reckoning) is subject to an error that diverges over time

  • effective localization methods use proprioceptive as

well as exteroceptive sensors: if an environment map is known, compare the actual sensor readings with those predicted using the current estimate

  • one possible approach: use a Kalman Filter
slide-3
SLIDE 3

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

3

a typical dead reckoning result

slide-4
SLIDE 4

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

4

basic concepts

  • given a vector random variable X with probability

density function fX(x), its expected (or mean) value is

  • its covariance matrix is
  • X has a multivariate gaussian distribution if
slide-5
SLIDE 5

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

5

  • geometric interpretation

equidensity contours are ellipsoids

X

  • the principal axes are directed as the eigenvectors of PX
  • their squared relative lengths are given by the corresponding

eigenvalues

slide-6
SLIDE 6

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

6

Kalman Filter ...without noise

  • consider a linear discrete-time system without noise
  • build a recursive observer that computes an estimate
  • f xk+1 from uk, yk+1 and previous estimate
  • two steps:
  • 1. prediction: generate an intermediate estimate by

propagating using the process dynamics

  • 2. correction (update): correct the prediction on the basis of the

difference between the measured and the predicted output

slide-7
SLIDE 7

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

7

  • correction: to be consistent with the measured value
  • f the output, xk+1 must belong to the hyperplane

hence the correction ¢x must satisfy

  • prediction

assuming that we know Ak, Bk and uk

slide-8
SLIDE 8

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

8

  • geometric interpretation

intuitively, the “best” correction ¢x is the closest to the prediction, which we believe is accurate

possible corrections “best” correction

slide-9
SLIDE 9

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

9

  • ¢x is then the solution of an optimization problem
  • it is well known that

where pseudoinverse of innovation note that we have assumed Ck+1 to be full row rank

slide-10
SLIDE 10

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

  • in general, the estimate will not converge to the

true value because the correction is naive: estimation errors directed as are not corrected

10

  • wrapping up, the resulting two-step observer is
  • we need to modify the above structure to take into

account the presence of noise; in doing so, we will fix the above problem

slide-11
SLIDE 11

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

11

Kalman Filter ...with process noise only

  • since this is now a random process, we estimate both

the state xk+1 and the associated covariance Pk+1

  • now include process noise

where vk is a white gaussian noise with zero mean and covariance matrix Vk

  • we keep the prediction/correction structure
slide-12
SLIDE 12

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

12

  • state prediction: as before

because vk has zero mean

  • covariance prediction: by definition
  • now use the linearity of E plus the independence of

vk on and ) the second term in the rhs is zero

slide-13
SLIDE 13

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

13

  • finally the covariance prediction is

p(x) is maximized when the exponent is minimized

  • state correction: we should choose ¢x so as to get

the most likely x in , i.e., the x that maximizes the gaussian distribution defined by and

slide-14
SLIDE 14

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

14

  • define the (squared) Mahalanobis distance
  • ¢x is the solution of a new optimization problem
  • it is well known that

where is the weighted pseudoinverse of

slide-15
SLIDE 15

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

15

  • geometric interpretation

the “best” correction is the closest to the prediction according to the current covariance estimate

“best” correction ellipses: sets of points equidistant from in terms of ||·||M

slide-16
SLIDE 16

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

16

  • covariance correction: using the covariance matrix

definition and the state correction one obtains

  • wrapping up, the resulting two-step filter is
  • problem: no measurement noise ) the covariance

estimate will become singular (no uncertainty in the normal direction to the measurement hyperplane)

slide-17
SLIDE 17

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

17

Kalman Filter ...full

  • finally include also measurement (sensor) noise

where vk, wk are white gaussian noises with zero mean and covariance matrices Vk, Wk

  • the dynamic equation is unchanged, therefore the

predictions are the same

slide-18
SLIDE 18

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

  • state correction: due to the sensor noise, the output

value is no more certain; we only know that yk+1 is drawn from a gaussian distribution with mean value Ck+1 xk+1 and covariance matrix Wk+1

18

  • first we compute the most likely output value

given the predictions and the measured output yk+1

  • then compute the associated most likely hyperplane
  • finally compute the correction ¢x as before but using

in place of

slide-19
SLIDE 19

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

19

  • geometric interpretation

“best” correction “most likely” hyperplane “measured” hyperplane

the “best” correction is still the closest to according to Pk+1|k, but now it lies on

slide-20
SLIDE 20

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

20

  • matrix R weighs the accuracy of the prediction vs.

that of the measurements

  • R “large”: measurements are more reliable
  • R “small”: prediction is more reliable
  • the resulting Kalman Filter (KF) is

with the Kalman gain matrix

slide-21
SLIDE 21

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

21

  • the KF is also correct, i.e., it provides mean value and

covariance of the posterior gaussian distribution

  • the KF provides an optimal estimate in the sense that

is minimized for each k

  • if the noises have non-gaussian distributions, the KF is

still the best linear estimator but there might exist more accurate nonlinear filters

  • if the process is observable, the estimate produced by

the KF converges, in the sense that is bounded for all k

slide-22
SLIDE 22

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

22

Extended Kalman Filter

  • consider a nonlinear discrete-time system with noise
  • one simple way to build a filter is to linearize the

system dynamic equations around the current estimate and then apply the KF equations to the resulting linear approximation where fk and hk are continuously differentiable for each k

slide-23
SLIDE 23

Oriolo: Autonomous and Mobile Robotics - Kalman Filter

23

with

  • the resulting Extended Kalman Filter (EKF) is

and the gain matrix