Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev"— Presentation transcript:

1 HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev http://www.cs.iastate.edu/~alex/classes/2006_Spring_575X/

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

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

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

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

6 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)]

7 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)]

8 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)]

9 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)]

10 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)]

11 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)]

12 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)]

13 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)]

14 A simple example using diagrams

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

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

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

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

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

20 Propagation of the conditional density [Maybeck (1979)]

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

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

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

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

25

26 Questions?

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

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

29 Calculating the new mean Scaling Factor 1 Scaling Factor 2

30 Calculating the new mean Scaling Factor 1 Scaling Factor 2

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

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

33 Calculating the new variance Scaling Factor 1 Scaling Factor 2

34 Calculating the new variance Scaling Factor 1 Scaling Factor 2

35 Calculating the new variance Scaling Factor 1 Scaling Factor 2

36 Calculating the new variance

37

38

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

40 Remember the Gaussian Properties?

41 If and Then This is a 2 not a

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

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

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

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

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

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

48 Adding Movement [Maybeck (1979)]

49 Adding Movement [Maybeck (1979)]

50 Adding Movement [Maybeck (1979)]

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

52 Another Example

53 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 [www.cse.lehigh.edu/~spletzer/cse398_Spring05/lec011_Localization2.ppt]

54 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 100 125 [www.cse.lehigh.edu/~spletzer/cse398_Spring05/lec011_Localization2.ppt]

55 A Simple Example (cont’d) x x 2 =116 [www.cse.lehigh.edu/~spletzer/cse398_Spring05/lec011_Localization2.ppt]

56 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 [www.cse.lehigh.edu/~spletzer/cse398_Spring05/lec011_Localization2.ppt]

57 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 =? [www.cse.lehigh.edu/~spletzer/cse398_Spring05/lec011_Localization2.ppt]

58 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 [www.cse.lehigh.edu/~spletzer/cse398_Spring05/lec011_Localization2.ppt]

59 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) [www.cse.lehigh.edu/~spletzer/cse398_Spring05/lec011_Localization2.ppt]

60 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 [www.cse.lehigh.edu/~spletzer/cse398_Spring05/lec011_Localization2.ppt]

61

62 Kalman Filter Diagram [Brown and Hwang (1992)]

63 The process to be estimated

64

65 THE END


Download ppt "HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev"

Similar presentations


Ads by Google