SlideShare una empresa de Scribd logo
1 de 23
Kalman Filter
•Born 1930 in Hungary
•Studied at MIT / Columbia
•Developed filter in 1960/61
•Based on Recursive Bayesian Filter
Kalman Filters
• A Kalman Filter is a more sophisticated
smoothing algorithm that will actually
change in real time as the performance of
Various Sensors Change and become more
or less reliable
• What we want to do is filter out noise in
our measurements and in our sensors and
Kalman Filter is one way to do that reliably
Noise
This is the actual path of our
UGV(Unmanned Ground Vehicle) as it
follows unwinding road.
This is the data we got from
GPS.
Notice it has the same shape
with some random variations
plus and minus.
Ok . How about if we just
average out our GPS reading?
That’s a bit better and smoothes out some of the bumps but
it is not useful since GPS is slow already and averaging
makes it much slower
Noise
• Removing Noise from Measurements by
Sensor is the purpose of Kalman Filter
• When you average the sensor signals or
readings it will slow down the system
Path of a Robot
Data We Get from SENSOR
Data after we average the Signals
Kalman Filter-Basic Block Diagram
• System state cannot be measured directly
• Need to estimate “optimally” from measurements
Measuring
Devices Estimator
Measurement
Error Sources
System State
(desired but not
known)
External Controls
Observed
Measurements
Optimal Estimate
of System State
System
Error Sources
System
Black Box
Sometimes the system state and
the measurement may be two
different things
Error in GPS(Global Positioning
System)-HISTOGRAM
GPS ERRORS
• We usually get GPS from manufacturers with
specification specifying some percentage of Accuracy
with in Some meters. For example we may get 95%
accuracy with in 2 meters etc…
If we were to plot
just the error of
GPS on graph, we
would see a plot
like this
Error
This is really a Good
GPS RECEIVER
As a review,
Histogram gets
taller the more
measurements are
at a particular value
Most of the time GPS is
inside this error range.
Notice that this makes a
particular distribution of
values that fall in certain
range. Let's say that as 4
meters
4m
So the Noise is this
random bits of
stuff here at the
bottom
So we could make a filter
that would get rid of this
noise.BUT we can’t measure
our own error while we are
moving
Moving Robot – Estimating Error
Path followed by robot
according to law of motion
Sensor Readings
Sensor Readings doesn’t follow the
Law of Physics or Equilibrium of
Motion which is
Y=x + vt + 1/2at2
Here’s the real path of UGV
over the ground with boxes
showing 1second interval
Now here’s the GPS
reading we received
at 1 HzSo what if we used the
physical motion of the
vehicle to estimate where
the next measurement
should be and use that for
the error?
Moving Robot – Estimating Error
Equilibrium of Motion which is
Y=x + vt + 1/2at2
X=position
V=velocity(meters per second)
a= acceleration(meters per second
squared
T=time interval
We also Know if we commanded the vehicle to
change course of Speed- a steering input or
throttle change
With this sort of straight line motion the state
estimate can be very accurate as the UGV is
moving in a constant direction and at constant
speed.
So we might see something like this out of a
continuously updated estimation function
20 mph
20 mph
20 mph
Kalman Filter Concept
• We can’t directly measure where the UGV(Unmanned Ground
Vehicle Robot) is- We have to use various Sensors to make
estimates.
• Each of those Sensors has a Certain amount of Accuracy and a
Certain amount of NOISE.
• We can use Equation of Motion to provide estimates on where
UGV may have moved and then see if Sensor Readings makes sense
given that estimate.
• Then we can Update our Estimates with new Sensor information
and whole cycle starts over again.
• Kalman filter is all done with matrix math
The Kalman Filter
Prior Knowledge of
State
Pk-1|k-1
x̌ k-1|k-1
Prediction Step
Based on Example
Physical Model
Pk|k-1
x̌ k|k-1
Update Step
Compare Prediction
to Measurements
Measurements
yk
Pk|k
x̌ k|k
Next Time step
k=k+1
Output Estimate of
State
Set of Kalman filter Equations in Detail
Prediction(Time Update)
1) Project the STATE ahead
ŷk
-=Ayk-1+Buk
2) Project the Error
Covariance ahead
P-
k≡APk-1AT+Q
Correction (Measurement
Update)
1) Compute the KALMAN GAIN
K=P-
kHT(HP-
kHT+R)-1
2) Update the estimate with
measurement zk
ŷk=ŷk
- + K (zk-H ŷk
- )
3) Update the Error Covariance
Pk=(I-KH)P-
k
Kalman Filter
1. Project the STATE ahead
ŷk
-=Ayk-1+Buk
• Ŷk is the predicted state of Vehicle at time k
• A is the model(equations of motion) that predict the new
state
• yk-1 is the state of Vehicle at previous time k-1
• B is the model that predicts what changes based on
commands to the vehicle – increase in throttle or steering
• Uk is the commanded inputs at time k
Kalman Filter
2. Project the Error Covariance ahead
 We want to predict how much noise will be in our
measurements
P-
k≡APk-1AT+Q
 A, same as first equation,Model of Motion
 P,the previous error value at time k-1
 AT,the model Transposed
 Q,the covariance of Error noise – describes the distribution
of noise
Kalman Filter
1. Computing the KALMAN GAIN
K=P-
kHT(HP-
kHT+R)-1
 K, the Kalman gain(How much to trust this sensor)
 P-
k, as before, the Predicted Error Covariance
 H,the model of how Sensor readings reflect the vehicle
state – a function to go from Sensor Reading to STATE
VECTOR
 R describes the noise in Sensor Measurement
Kalman Filter
• Update the estimate with measurements
from Sensor
ŷk=ŷk
- + K (zk-H ŷk
- )
 Ŷk is the state at time k and the output of the filter
 ŷk
- is the estimate of the state we did previously
 K is the Kalman Gain
 Zk is the measurements from Sensor
 H is the model of how the measurements reflect the state of
the Vehicle
Kalman Filter
• Update the Error Covariance
Pk=(I-KH)P-
k
 Pk is our new Error Covariance(description of the error
noise Gaussian Curve)
 I is the Identity Matrix
 K is the Kalman Gain
 H is the measurement Model
 P-
k was the previous estimate of error noise
Problems with Kalman Filters
• It is very difficult to compute the covariance matrix of
noise of various sensors and systems
• It is possible to do some trial and error fitting of error
matrix to the problem to “tune” the filter for performance
• The filter needs to process several samples in order to get
enough iterations to produce meaningful results – You
need to discard the first 20 iterations or so when the filter
first starts.
What is a Kalman Filter?- Another
Interpretation
• P(H|D)=P(H) * P(D|H)
• P(H)=Probability of Hypothesis
• P(D)=Probability of Data
• Kalman Filter is based on
• P(Ht|Ht-1,Dt) => P(Ht|Ht-1,At,Dt) Where At =Action State
Trash
WALL-E
GPS
Robot
Trash
Robot Picks up
Trash
What is a Kalman Filter?
-0.5
0
0.5
1
1.5
2
2.5
3
3.5
0 0.5 1 1.5 2 2.5 3 3.5 4
Position
Time
Probability Where Robot Is
Position Where Robot is Sent
Where GPS THINKS Robot is
Combination Where Robot Actually is
Xt
µ-Motor Command
Xt-1
What is a Kalman Filter?
STATE PREDICTION:
Xt=Axt-1+Bµt+€t
Where €t is Gaussian Error. It is a Linear Function Based
on Rule of Physics.
SENSOR PREDICTION:
Zt=Cxt +€t
Xest =Xt+K(Zt-Žt) WHERE
•Xt=Prediction
•K=Kalman Gain
•Zt =Actual Measurement
•Žt =Predicted Measurement
What is a Kalman Filter?
STATE PREDICTION MODEL:
Xt=Axt-1+Bµt+€t
Where €t is Gaussian Error. It is a Linear Function Based
on Rule of Physics.
Pt=Pt-1+Vt-1.t+1/2 att2
Vt=Vt-1+att 






)(
)(
VVelocity
PPosition
x
kt
T
t
t
t
t
t a
Tv
pt
v
p
x 





























2
2
10
1
1
1
What is a Kalman Filter?
STATE PREDICTION MODEL:
Pt=Pt-1+Vt-1.t+1/2 att2
Vt=Vt-1+att
Measurement Prediction:
Zt=Cxt +€t
k
tTav
p
v
p
x
t
t
t
t
t 



















1
t1-t1
0
Ta1/2.TV 2
    t
t
t
t
V
P
P 








1
1
01

Más contenido relacionado

La actualidad más candente

Kalman filter for object tracking
Kalman filter for object trackingKalman filter for object tracking
Kalman filter for object tracking
Mohit Yadav
 
Kalman filter - Applications in Image processing
Kalman filter - Applications in Image processingKalman filter - Applications in Image processing
Kalman filter - Applications in Image processing
Ravi Teja
 
Report kalman filtering
Report kalman filteringReport kalman filtering
Report kalman filtering
Irfan Anjum
 
Application of the Kalman Filter
Application of the Kalman FilterApplication of the Kalman Filter
Application of the Kalman Filter
Rohullah Latif
 

La actualidad más candente (20)

Kalman filter for object tracking
Kalman filter for object trackingKalman filter for object tracking
Kalman filter for object tracking
 
Seminar On Kalman Filter And Its Applications
Seminar On  Kalman  Filter And Its ApplicationsSeminar On  Kalman  Filter And Its Applications
Seminar On Kalman Filter And Its Applications
 
Av 738 - Adaptive Filtering - Kalman Filters
Av 738 - Adaptive Filtering - Kalman Filters Av 738 - Adaptive Filtering - Kalman Filters
Av 738 - Adaptive Filtering - Kalman Filters
 
Kalman filter - Applications in Image processing
Kalman filter - Applications in Image processingKalman filter - Applications in Image processing
Kalman filter - Applications in Image processing
 
Kalman Equations
Kalman EquationsKalman Equations
Kalman Equations
 
Kalman filter
Kalman filterKalman filter
Kalman filter
 
A KALMAN FILTERING TUTORIAL FOR UNDERGRADUATE STUDENTS
A KALMAN FILTERING TUTORIAL FOR UNDERGRADUATE STUDENTSA KALMAN FILTERING TUTORIAL FOR UNDERGRADUATE STUDENTS
A KALMAN FILTERING TUTORIAL FOR UNDERGRADUATE STUDENTS
 
Report kalman filtering
Report kalman filteringReport kalman filtering
Report kalman filtering
 
The extended kalman filter
The extended kalman filterThe extended kalman filter
The extended kalman filter
 
Kalman Filtering
Kalman FilteringKalman Filtering
Kalman Filtering
 
Application of the Kalman Filter
Application of the Kalman FilterApplication of the Kalman Filter
Application of the Kalman Filter
 
Application of adaptive linear equalizer
Application of adaptive linear equalizerApplication of adaptive linear equalizer
Application of adaptive linear equalizer
 
Particle filter
Particle filterParticle filter
Particle filter
 
Kalman Filter Presentation
Kalman Filter PresentationKalman Filter Presentation
Kalman Filter Presentation
 
Presentation
PresentationPresentation
Presentation
 
Lecture Notes on Adaptive Signal Processing-1.pdf
Lecture Notes on Adaptive Signal Processing-1.pdfLecture Notes on Adaptive Signal Processing-1.pdf
Lecture Notes on Adaptive Signal Processing-1.pdf
 
Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms
 
Sensor Fusion Study - Ch14. The Unscented Kalman Filter [Sooyoung Kim]
Sensor Fusion Study - Ch14. The Unscented Kalman Filter [Sooyoung Kim]Sensor Fusion Study - Ch14. The Unscented Kalman Filter [Sooyoung Kim]
Sensor Fusion Study - Ch14. The Unscented Kalman Filter [Sooyoung Kim]
 
Bayesian Inference and Filtering
Bayesian Inference and FilteringBayesian Inference and Filtering
Bayesian Inference and Filtering
 
Histogram equalization
Histogram equalizationHistogram equalization
Histogram equalization
 

Similar a Kalman filters

07 image filtering of colored noise based on kalman filter
07 image filtering of colored noise based on kalman filter07 image filtering of colored noise based on kalman filter
07 image filtering of colored noise based on kalman filter
studymate
 
Vlsi implementation of adaptive kalman filter for
Vlsi implementation of adaptive kalman filter forVlsi implementation of adaptive kalman filter for
Vlsi implementation of adaptive kalman filter for
eSAT Publishing House
 

Similar a Kalman filters (20)

Kalmanfilter
Kalmanfilter Kalmanfilter
Kalmanfilter
 
Kalmanfilter
KalmanfilterKalmanfilter
Kalmanfilter
 
Slideshare
SlideshareSlideshare
Slideshare
 
Basics Of Kalman Filter And Position Estimation Of Front Wheel Automatic Stee...
Basics Of Kalman Filter And Position Estimation Of Front Wheel Automatic Stee...Basics Of Kalman Filter And Position Estimation Of Front Wheel Automatic Stee...
Basics Of Kalman Filter And Position Estimation Of Front Wheel Automatic Stee...
 
Av 738-Adaptive Filters - Extended Kalman Filter
Av 738-Adaptive Filters - Extended Kalman FilterAv 738-Adaptive Filters - Extended Kalman Filter
Av 738-Adaptive Filters - Extended Kalman Filter
 
07 image filtering of colored noise based on kalman filter
07 image filtering of colored noise based on kalman filter07 image filtering of colored noise based on kalman filter
07 image filtering of colored noise based on kalman filter
 
Kalman filter.pdf
Kalman filter.pdfKalman filter.pdf
Kalman filter.pdf
 
kalman filter illustrated with 2D example
kalman filter illustrated with 2D examplekalman filter illustrated with 2D example
kalman filter illustrated with 2D example
 
B04402016018
B04402016018B04402016018
B04402016018
 
Vlsi implementation of adaptive kalman filter for
Vlsi implementation of adaptive kalman filter forVlsi implementation of adaptive kalman filter for
Vlsi implementation of adaptive kalman filter for
 
Pid controller
Pid controllerPid controller
Pid controller
 
presentation.ppt
presentation.pptpresentation.ppt
presentation.ppt
 
Kalman filter(nanheekim)
Kalman filter(nanheekim)Kalman filter(nanheekim)
Kalman filter(nanheekim)
 
Lecture 09: Localization and Mapping III
Lecture 09: Localization and Mapping IIILecture 09: Localization and Mapping III
Lecture 09: Localization and Mapping III
 
Sensor Fusion Study - Ch7. Kalman Filter Generalizations [김영범]
Sensor Fusion Study - Ch7. Kalman Filter Generalizations [김영범]Sensor Fusion Study - Ch7. Kalman Filter Generalizations [김영범]
Sensor Fusion Study - Ch7. Kalman Filter Generalizations [김영범]
 
P01061112116
P01061112116P01061112116
P01061112116
 
Relative Study of Measurement Noise Covariance R and Process Noise Covariance...
Relative Study of Measurement Noise Covariance R and Process Noise Covariance...Relative Study of Measurement Noise Covariance R and Process Noise Covariance...
Relative Study of Measurement Noise Covariance R and Process Noise Covariance...
 
Sensor Fusion Study - Ch5. The discrete-time Kalman filter [박정은]
Sensor Fusion Study - Ch5. The discrete-time Kalman filter  [박정은]Sensor Fusion Study - Ch5. The discrete-time Kalman filter  [박정은]
Sensor Fusion Study - Ch5. The discrete-time Kalman filter [박정은]
 
Applying Smoothing Techniques to Passive Target Tracking.pptx
Applying Smoothing Techniques to Passive Target Tracking.pptxApplying Smoothing Techniques to Passive Target Tracking.pptx
Applying Smoothing Techniques to Passive Target Tracking.pptx
 
1 tracking systems1
1 tracking systems11 tracking systems1
1 tracking systems1
 

Último

VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Último (20)

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 

Kalman filters

  • 1. Kalman Filter •Born 1930 in Hungary •Studied at MIT / Columbia •Developed filter in 1960/61 •Based on Recursive Bayesian Filter
  • 2. Kalman Filters • A Kalman Filter is a more sophisticated smoothing algorithm that will actually change in real time as the performance of Various Sensors Change and become more or less reliable • What we want to do is filter out noise in our measurements and in our sensors and Kalman Filter is one way to do that reliably
  • 3. Noise This is the actual path of our UGV(Unmanned Ground Vehicle) as it follows unwinding road. This is the data we got from GPS. Notice it has the same shape with some random variations plus and minus. Ok . How about if we just average out our GPS reading? That’s a bit better and smoothes out some of the bumps but it is not useful since GPS is slow already and averaging makes it much slower
  • 4. Noise • Removing Noise from Measurements by Sensor is the purpose of Kalman Filter • When you average the sensor signals or readings it will slow down the system Path of a Robot Data We Get from SENSOR Data after we average the Signals
  • 5. Kalman Filter-Basic Block Diagram • System state cannot be measured directly • Need to estimate “optimally” from measurements Measuring Devices Estimator Measurement Error Sources System State (desired but not known) External Controls Observed Measurements Optimal Estimate of System State System Error Sources System Black Box Sometimes the system state and the measurement may be two different things
  • 6. Error in GPS(Global Positioning System)-HISTOGRAM GPS ERRORS • We usually get GPS from manufacturers with specification specifying some percentage of Accuracy with in Some meters. For example we may get 95% accuracy with in 2 meters etc… If we were to plot just the error of GPS on graph, we would see a plot like this Error This is really a Good GPS RECEIVER As a review, Histogram gets taller the more measurements are at a particular value Most of the time GPS is inside this error range. Notice that this makes a particular distribution of values that fall in certain range. Let's say that as 4 meters 4m So the Noise is this random bits of stuff here at the bottom So we could make a filter that would get rid of this noise.BUT we can’t measure our own error while we are moving
  • 7. Moving Robot – Estimating Error Path followed by robot according to law of motion Sensor Readings Sensor Readings doesn’t follow the Law of Physics or Equilibrium of Motion which is Y=x + vt + 1/2at2 Here’s the real path of UGV over the ground with boxes showing 1second interval Now here’s the GPS reading we received at 1 HzSo what if we used the physical motion of the vehicle to estimate where the next measurement should be and use that for the error?
  • 8. Moving Robot – Estimating Error Equilibrium of Motion which is Y=x + vt + 1/2at2 X=position V=velocity(meters per second) a= acceleration(meters per second squared T=time interval We also Know if we commanded the vehicle to change course of Speed- a steering input or throttle change With this sort of straight line motion the state estimate can be very accurate as the UGV is moving in a constant direction and at constant speed. So we might see something like this out of a continuously updated estimation function 20 mph 20 mph 20 mph
  • 9. Kalman Filter Concept • We can’t directly measure where the UGV(Unmanned Ground Vehicle Robot) is- We have to use various Sensors to make estimates. • Each of those Sensors has a Certain amount of Accuracy and a Certain amount of NOISE. • We can use Equation of Motion to provide estimates on where UGV may have moved and then see if Sensor Readings makes sense given that estimate. • Then we can Update our Estimates with new Sensor information and whole cycle starts over again. • Kalman filter is all done with matrix math
  • 10. The Kalman Filter Prior Knowledge of State Pk-1|k-1 x̌ k-1|k-1 Prediction Step Based on Example Physical Model Pk|k-1 x̌ k|k-1 Update Step Compare Prediction to Measurements Measurements yk Pk|k x̌ k|k Next Time step k=k+1 Output Estimate of State
  • 11. Set of Kalman filter Equations in Detail Prediction(Time Update) 1) Project the STATE ahead ŷk -=Ayk-1+Buk 2) Project the Error Covariance ahead P- k≡APk-1AT+Q Correction (Measurement Update) 1) Compute the KALMAN GAIN K=P- kHT(HP- kHT+R)-1 2) Update the estimate with measurement zk ŷk=ŷk - + K (zk-H ŷk - ) 3) Update the Error Covariance Pk=(I-KH)P- k
  • 12. Kalman Filter 1. Project the STATE ahead ŷk -=Ayk-1+Buk • Ŷk is the predicted state of Vehicle at time k • A is the model(equations of motion) that predict the new state • yk-1 is the state of Vehicle at previous time k-1 • B is the model that predicts what changes based on commands to the vehicle – increase in throttle or steering • Uk is the commanded inputs at time k
  • 13. Kalman Filter 2. Project the Error Covariance ahead  We want to predict how much noise will be in our measurements P- k≡APk-1AT+Q  A, same as first equation,Model of Motion  P,the previous error value at time k-1  AT,the model Transposed  Q,the covariance of Error noise – describes the distribution of noise
  • 14. Kalman Filter 1. Computing the KALMAN GAIN K=P- kHT(HP- kHT+R)-1  K, the Kalman gain(How much to trust this sensor)  P- k, as before, the Predicted Error Covariance  H,the model of how Sensor readings reflect the vehicle state – a function to go from Sensor Reading to STATE VECTOR  R describes the noise in Sensor Measurement
  • 15. Kalman Filter • Update the estimate with measurements from Sensor ŷk=ŷk - + K (zk-H ŷk - )  Ŷk is the state at time k and the output of the filter  ŷk - is the estimate of the state we did previously  K is the Kalman Gain  Zk is the measurements from Sensor  H is the model of how the measurements reflect the state of the Vehicle
  • 16. Kalman Filter • Update the Error Covariance Pk=(I-KH)P- k  Pk is our new Error Covariance(description of the error noise Gaussian Curve)  I is the Identity Matrix  K is the Kalman Gain  H is the measurement Model  P- k was the previous estimate of error noise
  • 17. Problems with Kalman Filters • It is very difficult to compute the covariance matrix of noise of various sensors and systems • It is possible to do some trial and error fitting of error matrix to the problem to “tune” the filter for performance • The filter needs to process several samples in order to get enough iterations to produce meaningful results – You need to discard the first 20 iterations or so when the filter first starts.
  • 18.
  • 19. What is a Kalman Filter?- Another Interpretation • P(H|D)=P(H) * P(D|H) • P(H)=Probability of Hypothesis • P(D)=Probability of Data • Kalman Filter is based on • P(Ht|Ht-1,Dt) => P(Ht|Ht-1,At,Dt) Where At =Action State Trash WALL-E GPS Robot Trash Robot Picks up Trash
  • 20. What is a Kalman Filter? -0.5 0 0.5 1 1.5 2 2.5 3 3.5 0 0.5 1 1.5 2 2.5 3 3.5 4 Position Time Probability Where Robot Is Position Where Robot is Sent Where GPS THINKS Robot is Combination Where Robot Actually is Xt µ-Motor Command Xt-1
  • 21. What is a Kalman Filter? STATE PREDICTION: Xt=Axt-1+Bµt+€t Where €t is Gaussian Error. It is a Linear Function Based on Rule of Physics. SENSOR PREDICTION: Zt=Cxt +€t Xest =Xt+K(Zt-Žt) WHERE •Xt=Prediction •K=Kalman Gain •Zt =Actual Measurement •Žt =Predicted Measurement
  • 22. What is a Kalman Filter? STATE PREDICTION MODEL: Xt=Axt-1+Bµt+€t Where €t is Gaussian Error. It is a Linear Function Based on Rule of Physics. Pt=Pt-1+Vt-1.t+1/2 att2 Vt=Vt-1+att        )( )( VVelocity PPosition x kt T t t t t t a Tv pt v p x                               2 2 10 1 1 1
  • 23. What is a Kalman Filter? STATE PREDICTION MODEL: Pt=Pt-1+Vt-1.t+1/2 att2 Vt=Vt-1+att Measurement Prediction: Zt=Cxt +€t k tTav p v p x t t t t t                     1 t1-t1 0 Ta1/2.TV 2     t t t t V P P          1 1 01