CS代写 Perception for Autonomous Systems 31392:

Perception for Autonomous Systems 31392:
State Estimation –
Lecturer: —PhD
15 Mar. 2021 DTU Electrical Engineering 2

Copyright By PowCoder代写 加微信 powcoder

Sum-UP so far
• State Estimation
• Markov Localization • Probability
• Total Probability
Coming UP:
15 Mar. 2021 DTU Electrical Engineering 3

What is State Estimation
• Given a State Vector of a system
• Estimate over time the state using input of external sensors
Useful for:
• Localization
• Tracking
• Prediction
• Sensor Fusion •…
15 Mar. 2021 DTU Electrical Engineering 4

Catching up
• Last part, we did state estimation specifically Localization
15 Mar. 2021 DTU Electrical Engineering 5

Catching up
• Last part, we did state estimation specifically Localization
15 Mar. 2021 DTU Electrical Engineering 5

Catching up
• Last part, we did state estimation specifically Localization
15 Mar. 2021 DTU Electrical Engineering 5

Catching up
• Last part, we did state estimation specifically Localization
15 Mar. 2021 DTU Electrical Engineering 5

Catching up
• Last part, we did state estimation specifically Localization
15 Mar. 2021 DTU Electrical Engineering 5

Catching up
• Last part, we did state estimation specifically Localization
15 Mar. 2021 DTU Electrical Engineering 5

Catching up
• Last part, we did state estimation specifically Localization
• Maximum confusion to Location estimation
15 Mar. 2021 DTU Electrical Engineering 5

Catching up
• Last part, we did state estimation specifically Localization
• Maximum confusion to Location estimation
• In other words:
“Used sensor information to manipulate an original belief (a uniform distribution) into a high confidence probability density function centered on our correct location“
15 Mar. 2021 DTU Electrical Engineering 5

In this part..
• We will see how we can track objects.
• Not only their location as in the previous localization case, • But also infer their speed.
• In the case of autonomous driving it is quite important to track and predict the movement of objects. – Why?
– Which other examples can we find?
15 Mar. 2021 DTU Electrical Engineering 13

Cases of Tracking
15 Mar. 2021 DTU Electrical Engineering 14

Histogram filter

Differences between state estimation filters
Continuous

15 Mar. 2021 DTU Electrical Engineering 15

Let’s see tracking as an example
• Assuming there is a point in space like this: • The object moves like this:
15 Mar. 2021 DTU Electrical Engineering 16

Let’s see tracking as an example
• Assuming there is a point in space like this: • The object moves like this:
• What is the next point?
15 Mar. 2021 DTU Electrical Engineering 16

Let’s see tracking as an example
• Assuming there is a point in space like this: • The object moves like this:
• What is the next point?
15 Mar. 2021 DTU Electrical Engineering 16

Let’s see tracking as an example
• Assuming there is a point in space like this: • The object moves like this:
• What is the next point?
• For you it is easy! How about a machine?
15 Mar. 2021 DTU Electrical Engineering 16

Kalman has a thing for Gaussians
• In our Markov model the world was divided
into discrete grids and each grid had a probability
• This is called a histogram:
• In we describe the distribution as a Gaussian:
– It is a continuous function and – The area under the curve is: 1
15 Mar. 2021 DTU Electrical Engineering

• 1D Gaussian is described by the pair: (μ, σ2)
• Which of the following are Gaussians?
• Which of the following have small, medium, larger (co)variance? • When doing state estimation which one do we prefer?
15 Mar. 2021 DTU Electrical Engineering 21

• Kalman, as with the histogram filter involves the measurementmotion cycle:
• Which one requires convolution and which one a product?
15 Mar. 2021 DTU Electrical Engineering 22

• Kalman, as with the histogram filter involves the measurementmotion cycle:
• Which one requires convolution and which one a product? – MeasurementProduct
– MotionConvolution
15 Mar. 2021 DTU Electrical Engineering 22

• Kalman, as with the histogram filter involves the measurementmotion cycle:
• Which one applies Bayes Rule and which one Total Probability?
15 Mar. 2021 DTU Electrical Engineering 24

• Kalman, as with the histogram filter involves the measurementmotion cycle:
• Which one applies Bayes Rule and which one Total Probability? – MeasurementBayes Rule
– MotionTotal Probability
15 Mar. 2021 DTU Electrical Engineering 24

• In Kalman we call them “Measurement Update” and “Prediction” • Both of these involve the Gaussians
15 Mar. 2021 DTU Electrical Engineering 26

• Assume we are localizing another robot with a prior as follows:
• Then we have a measurement which inform us that we have this location: • Where will the new mean be?
15 Mar. 2021 DTU Electrical Engineering 27

• Where will the new peak be? r • The higher one -> as we gain information
• Let’s prove it
15 Mar. 2021 DTU Electrical Engineering 28

• Assuming these gaussians: –μ 0σ2=4
– ν , r2= 4
• Assuming these gaussians: –μ 0σ2=8
– ν 3 , r2= 2
• Assuming these gaussians:
15 Mar. 2021 DTU Electrical Engineering 29

Motion Update
• Called also prediction:
• As we move we lose some information:
• Assuming a gaussian before the prediction: –μ 8 σ2=4
• And a movement gaussian – ν 0, r2= 6
• What’s the Gaussian after the update?
15 Mar. 2021 DTU Electrical Engineering 30

Let’s code the 1D Kalman
• Start with a initial belief of: – u=0,
– σ2=10000 • Motion:
– [1, 1, 2, 1, 1]
– Uncertainty: 2 • Measurement:
– [5, 6, 7, 9, 10] – Uncertainty: 4
15 Mar. 2021 DTU Electrical Engineering 31

From 1D to Many D’s
• We just implemented a Full 1D Kalman filter.
• However the shines in Many D’s • Let’s see an example:
– A camera
– Or a pedestrian in front of a car
– Where should it be at t=3?
• That is the power of Kalman!!!
➔ AI and Control Theory
15 Mar. 2021 DTU Electrical Engineering 32

Multivariate Gaussians
As promised we have married the Gaussians today Multi-Dimensional Gaussians
• The mean is a vector:
• The variance now is called covariance and is a matrix:
15 Mar. 2021 DTU Electrical Engineering 33

Multivariate Gaussians
• Let’s start with an one dimensional motion example:
15 Mar. 2021 DTU Electrical Engineering 34

Multivariate Gaussians – Space
t • Let’s go at the Kalman state space:
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
t • Let’s go at the Kalman state space:
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1 – Velocity: 2
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1 – Velocity: 2
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1 – Velocity: 2
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1 – Velocity: 2
Consider this Gaussian
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1 – Velocity: 2
Consider this Gaussian • Measurement:
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1 – Velocity: 2
Consider this Gaussian • Measurement:
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1 – Velocity: 2
Consider this Gaussian • Measurement:
15 Mar. 2021 DTU Electrical Engineering

Multivariate Gaussians – Space
• Let’s go at the Kalman state space: • Prior:
– Location: 1 • Prediction:
– Velocity: 0 – Velocity: 1 – Velocity: 2
Consider this Gaussian • Measurement:
15 Mar. 2021 DTU Electrical Engineering

Design of a
• Two types of States variables: – Observables
• State Transition Function: – Matrix
• Measurement Function:
– Vector (Usually be Matrix)
15 Mar. 2021 DTU Electrical Engineering 50

Linear Algebra Formulation For For
(No need to memorize these:)
Prediction (Ingredients):
• X: State Vector (Including our Prior Info)
• P: Uncertainty Covariance (Incl. Prior Info)
• F: State Transition Matrix (we just discussed it) • u: External Motion (E.g. Deceleration from car) Measurement Update (Ingredients): :
• Z: Measurement
• H: Measurement Matrix
• R: Measurement Noise
• y: Error
• I : Identity Matrix
15 Mar. 2021 DTU Electrical Engineering 51

Conclusion
• We’ve acquired an amazing skill!!!
• We now understand what state estimation is • We understand what a covariance represents • We know how to track objects in space
(We can handle even occlusions)
• We know how to estimate our position (attitude) over time
• We’ll come back on this (project) to do an end-to-end example!
15 Mar. 2021 DTU Electrical Engineering 52

Perception for Autonomous Systems 31392:
State Estimation –
Lecturer: —PhD
15 Mar. 2021 DTU Electrical Engineering 53

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com