SlideShare a Scribd company logo
1 of 24
1 
Introduction to Kalman Filters
2 
Overview 
• What could Kalman Filters be used for in 
Hydrosciences? 
• What is a Kalman Filter? 
• Conceptual Overview 
• The Theory of Kalman Filter (only the 
equations you need to use) 
• Simple Example (with lots of blah blah talk 
through handouts)
3 
A “Hydro” Example 
• Suppose you have a hydrologic model that predicts river 
water level every hour (using the usual inputs). 
• You know that your model is not perfect and you don’t 
trust it 100%. So you want to send someone to check 
the river level in person. 
• However, the river level can only be checked once a day 
around noon and not every hour. 
• Furthermore, the person who measures the river level 
can not be trusted 100% either. 
• So how do you combine both outputs of river level (from 
model and from measurement) so that you get a ‘fused’ 
and better estimate? – Kalman filtering
4 
Graphically speaking
5 
What is a Filter by the way? 
Class – define mathematically what a filter is (make an 
analogy to a real filter) Other applications of Kalman 
Filtering (or Filtering in general): 
1)Your Car GPS (predict and 
update location) 
2)Surface to Air Missile (hitting 
the target) 
3)Ship or Rocket navigation 
(Appollo 11 used some sort of 
filtering to make sure it didn’t 
miss the Moon!)
6 
The Problem in General 
(let’s get a little more technical) 
System 
Error Sources 
System 
System State 
(desired but not 
known) 
Black Box 
Sometimes the system 
state and the 
measurement may be two 
different things (not like 
river level example) 
Observed 
Measurements 
Measuring 
Devices Estimator 
Measurement 
Error Sources 
External 
Controls 
Optimal 
Estimate of 
System State 
• System state cannot be measured directly 
• Need to estimate “optimally” from 
measurements
7 
What is a Kalman Filter? 
• Recursive data processing algorithm 
• Generates optimal estimate of desired quantities 
given the set of measurements 
• Optimal? 
– For linear system and white Gaussian errors, Kalman 
filter is “best” estimate based on all previous 
measurements 
– For non-linear system optimality is ‘qualified’ 
• Recursive? 
– Doesn’t need to store all previous measurements and 
reprocess all data each time step
8 
Conceptual Overview 
• Simple example to motivate the workings 
of the Kalman Filter 
• The essential equations you need to know 
(Kalman Filtering for Dummies!) 
• Examples: Prediction and Correction
9 
Conceptual Overview 
y 
• Lost on the 1-dimensional line (imagine that you are 
guessing your position by looking at the stars using 
sextant) 
• Position – y(t) 
• Assume Gaussian distributed measurements
10 
Conceptual Overview 
0 10 20 30 40 50 60 70 80 90 100 
0.16 
0.14 
0.12 
0.1 
0.08 
0.06 
0.04 
0.02 
0 
State space – position 
Measurement - position 
• Sextant Measurement at t1: Mean = z1 and Variance = sz1 
• Optimal estimate of position is: ŷ(t1) = z1 
• Variance of error in estimate: s2 
x 
(t1) = s2 
z1 
• Boat in same position at time t2 - Predicted position is z1 
Sextant is not 
perfect
11 
Conceptual Overview 
0 10 20 30 40 50 60 70 80 90 100 
0.16 
0.14 
0.12 
0.1 
0.08 
0.06 
0.04 
0.02 
0 
prediction ŷ-(t2) 
State (by looking 
at the stars at t2) 
• So we have the prediction ŷ-(t2) 
• GPS Measurement at t2: Mean = z2 and Variance = sz2 
• Need to correct the prediction by Sextant due to measurement to get ŷ(t2) 
• Closer to more trusted measurement – should we do linear interpolation? 
Measurement 
usign GPS z(t2)
12 
corrected optimal 
estimate ŷ(t2) 
measurement 
z(t2) 
prediction ŷ-(t2) 
0 10 20 30 40 50 60 70 80 90 100 
0.16 
0.14 
0.12 
0.1 
0.08 
0.06 
0.04 
0.02 
0 
Conceptual Overview 
Kalman filter helps 
you fuse 
measurement and 
prediction on the 
basis of how much 
you trust each 
(I would trust the 
GPS more than the 
sextant) 
• Corrected mean is the new optimal estimate of position (basically 
you’ve ‘updated’ the predicted position by Sextant using GPS 
• New variance is smaller than either of the previous two variances
13 
Conceptual Overview 
(The Kalman Equations) 
• Lessons so far: 
Make prediction based on previous data - ŷ-, s- 
Take measurement – zk, sz 
Optimal estimate (ŷ) = Prediction + (Kalman Gain) * (Measurement - Prediction) 
Variance of estimate = Variance of prediction * (1 – Kalman Gain)
14 
Conceptual Overview 
ŷ(t2) 
Naïve Prediction 
(sextant) ŷ-(t3) 
0 10 20 30 40 50 60 70 80 90 100 
0.16 
0.14 
0.12 
0.1 
0.08 
0.06 
0.04 
0.02 
0 
What if the 
boat was 
now moving? 
• At time t3, boat moves with velocity dy/dt=u 
• Naïve approach: Shift probability to the right to predict 
• This would work if we knew the velocity exactly (perfect model)
But you may not be so 
sure about the exact 
velocity 
15 
ŷ(t2) 
Naïve Prediction 
ŷ-(t3) 
Prediction ŷ-(t3) 
0 10 20 30 40 50 60 70 80 90 100 
0.16 
0.14 
0.12 
0.1 
0.08 
0.06 
0.04 
0.02 
0 
Conceptual Overview 
• Better to assume imperfect model by adding Gaussian noise 
• dy/dt = u + w 
• Distribution for prediction moves and spreads out
16 
Corrected optimal estimate ŷ(t3) Updated Sextant position using GPS 
Measurement z(t3) GPS 
Prediction ŷ-(t3) Sextant 
0 10 20 30 40 50 60 70 80 90 100 
0.16 
0.14 
0.12 
0.1 
0.08 
0.06 
0.04 
0.02 
0 
Conceptual Overview 
• Now we take a measurement at t3 
• Need to once again correct the prediction 
• Same as before
17 
Conceptual Overview 
• Lessons learnt from conceptual overview: 
– Initial conditions (ŷand s) 
k-1 k-1– Prediction (ŷ-k 
, s- 
k) 
• Use initial conditions and model (eg. constant velocity) to 
make prediction 
– Measurement (zk) 
• Take measurement 
– Correction (ŷk , sk) 
• Use measurement to correct prediction by ‘blending’ 
prediction and residual – always a case of merging only two 
Gaussians 
• Optimal estimate with smaller variance
18 
Blending Factor 
• If we are sure about measurements: 
– Measurement error covariance (R) decreases to zero 
– K decreases and weights residual more heavily than prediction 
• If we are sure about prediction 
– Prediction error covariance P-k 
decreases to zero 
– K increases and weights prediction more heavily than residual
19 
The set of Kalman Filtering 
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-k 
HT(HP-k 
HT + R)-1 
(2) Update estimate with measurement zk 
ŷk = ŷ-k 
+ K(zk - H ŷ-k 
(3) Update Error Covariance 
) 
Pk = (I - KH)P-k
20 
Assumptions behind Kalman 
Filter 
• The model you use to predict the ‘state’ needs to 
be a LINEAR function of the measurement (so 
how do we use non-linear rainfall-runoff 
models?) 
• The model error and the measurement error 
(noise) must be Gaussian with zero mean
21 
What if the noise is NOT Gaussian? 
Given only the mean and standard deviation of noise, 
the Kalman filter is the best linear estimator. Non-linear 
estimators may be better. 
Why is Kalman Filtering so popular? 
· Good results in practice due to optimality and structure. 
· Convenient form for online real time processing. 
· Easy to formulate and implement given a basic 
understanding. 
· Measurement equations need not be inverted. 
ALSO popular in hydrosciences, weather/oceanography/ 
hydrologic modeling, data assimilation
Now ..to understand the jargons 
(You may begin the handouts) 
• First read the hand out by PD Joseph 
• Next, read the hand out by Welch and 
Bishop titled ‘An Introduction to the 
Kalman Filter’. (you can skip pages 4-5, 7- 
11). Pages 7-11 are on ‘Extended Kalman 
Filtering’ (for non-linear systems). Read 
the solved example from pages 11-16. 
22
Homework (conceptual) 
• Explain in NO MORE THAN 1 PAGE the example that 
you read from pages 11-16 in the handout by Welch and 
Bishop. Basically, I want you to give me a simple 
conceptual overview of why and how ‘filtering’ was applied 
using the previous analogy on a boat lost in sea. 
• DUE – Same date as the Class project report. 
• EXTRA CREDIT 5% marks– If you review (3-4 pages) the 
classic paper in 1960 by Kalman (hand out) 
• EXTRA CREDIT 5% marks – if you turn in a detailed 
summary of the STEVE software (pros/cons, what it is 
etc.) 
23
24 
References 
1. Kalman, R. E. 1960. “A New Approach to Linear Filtering and Prediction 
Problems”, Transaction of the ASME--Journal of Basic Engineering, pp. 35-45 
(March 1960). 
2. Welch, G and Bishop, G. 2001. “An introduction to the Kalman Filter”, 
http://www.cs.unc.edu/~welch/kalman/ 
By the way Dr. Rudolf Kalman is 
alive and living well today

More Related Content

What's hot

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 STUDENTSIJCSES Journal
 
Application of adaptive linear equalizer
Application of adaptive linear equalizerApplication of adaptive linear equalizer
Application of adaptive linear equalizerSayahnarahul
 
Application of the Kalman Filter
Application of the Kalman FilterApplication of the Kalman Filter
Application of the Kalman FilterRohullah Latif
 
The extended kalman filter
The extended kalman filterThe extended kalman filter
The extended kalman filterMudit Parnami
 
Neural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) AlgorithmNeural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) AlgorithmMostafa G. M. Mostafa
 
Kalman Filtering
Kalman FilteringKalman Filtering
Kalman FilteringEngin Gul
 
Report kalman filtering
Report kalman filteringReport kalman filtering
Report kalman filteringIrfan Anjum
 
Artificial Neural Networks Lect3: Neural Network Learning rules
Artificial Neural Networks Lect3: Neural Network Learning rulesArtificial Neural Networks Lect3: Neural Network Learning rules
Artificial Neural Networks Lect3: Neural Network Learning rulesMohammed Bennamoun
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filterA. Shamel
 

What's hot (20)

Av 738 - Adaptive Filtering - Kalman Filters
Av 738 - Adaptive Filtering - Kalman Filters Av 738 - Adaptive Filtering - Kalman Filters
Av 738 - Adaptive Filtering - Kalman Filters
 
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
 
Application of adaptive linear equalizer
Application of adaptive linear equalizerApplication of adaptive linear equalizer
Application of adaptive linear equalizer
 
Application of the Kalman Filter
Application of the Kalman FilterApplication of the Kalman Filter
Application of the Kalman Filter
 
Kalman Filter
 Kalman Filter    Kalman Filter
Kalman Filter
 
The extended kalman filter
The extended kalman filterThe extended kalman filter
The extended kalman filter
 
Kalman Filter Basic
Kalman Filter BasicKalman Filter Basic
Kalman Filter Basic
 
Particle filter
Particle filterParticle filter
Particle filter
 
Neural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) AlgorithmNeural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) Algorithm
 
Data fusion with kalman filtering
Data fusion with kalman filteringData fusion with kalman filtering
Data fusion with kalman filtering
 
kalman filtering "From Basics to unscented Kaman filter"
 kalman filtering "From Basics to unscented Kaman filter" kalman filtering "From Basics to unscented Kaman filter"
kalman filtering "From Basics to unscented Kaman filter"
 
Kalman Filtering
Kalman FilteringKalman Filtering
Kalman Filtering
 
Kalman Filter Presentation
Kalman Filter PresentationKalman Filter Presentation
Kalman Filter Presentation
 
Kalman Filter | Statistics
Kalman Filter | StatisticsKalman Filter | Statistics
Kalman Filter | Statistics
 
Report kalman filtering
Report kalman filteringReport kalman filtering
Report kalman filtering
 
Artificial Neural Networks Lect3: Neural Network Learning rules
Artificial Neural Networks Lect3: Neural Network Learning rulesArtificial Neural Networks Lect3: Neural Network Learning rules
Artificial Neural Networks Lect3: Neural Network Learning rules
 
Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)
 
Dsp lecture vol 7 adaptive filter
Dsp lecture vol 7 adaptive filterDsp lecture vol 7 adaptive filter
Dsp lecture vol 7 adaptive filter
 
Quadrature amplitude modulation
Quadrature amplitude modulationQuadrature amplitude modulation
Quadrature amplitude modulation
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 

Similar to Kalman filters

Similar to Kalman filters (20)

Slideshare
SlideshareSlideshare
Slideshare
 
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
 
presentation.ppt
presentation.pptpresentation.ppt
presentation.ppt
 
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3Build Your Own VR Display Course - SIGGRAPH 2017: Part 3
Build Your Own VR Display Course - SIGGRAPH 2017: Part 3
 
Understanding kalman filter for soc estimation.
Understanding kalman filter for soc estimation.Understanding kalman filter for soc estimation.
Understanding kalman filter for soc estimation.
 
Accelerometers 2015
Accelerometers 2015Accelerometers 2015
Accelerometers 2015
 
CUGravity PDR Presentation
CUGravity PDR PresentationCUGravity PDR Presentation
CUGravity PDR Presentation
 
Kalman filter.pdf
Kalman filter.pdfKalman filter.pdf
Kalman filter.pdf
 
1 tracking systems1
1 tracking systems11 tracking systems1
1 tracking systems1
 
B04402016018
B04402016018B04402016018
B04402016018
 
Ch2 2011 s
Ch2 2011 sCh2 2011 s
Ch2 2011 s
 
lecture_18-19_state_observer_design.pptx
lecture_18-19_state_observer_design.pptxlecture_18-19_state_observer_design.pptx
lecture_18-19_state_observer_design.pptx
 
Kalmanfilter
Kalmanfilter Kalmanfilter
Kalmanfilter
 
Kalmanfilter
KalmanfilterKalmanfilter
Kalmanfilter
 
Tracking[1]
Tracking[1]Tracking[1]
Tracking[1]
 
presentation_btp
presentation_btppresentation_btp
presentation_btp
 
Ch r ssm
Ch r ssmCh r ssm
Ch r ssm
 
115L Lab TwoUsing Graphs to Recognize Mathematical Relatio.docx
115L Lab TwoUsing Graphs to Recognize Mathematical Relatio.docx115L Lab TwoUsing Graphs to Recognize Mathematical Relatio.docx
115L Lab TwoUsing Graphs to Recognize Mathematical Relatio.docx
 
Ms 1341-p touze-final
Ms 1341-p touze-finalMs 1341-p touze-final
Ms 1341-p touze-final
 
Basicnav
BasicnavBasicnav
Basicnav
 

More from AJAL A J

KEAM KERALA ENTRANCE EXAM
KEAM KERALA ENTRANCE EXAMKEAM KERALA ENTRANCE EXAM
KEAM KERALA ENTRANCE EXAMAJAL A J
 
Paleontology Career
Paleontology  CareerPaleontology  Career
Paleontology CareerAJAL A J
 
CHEMISTRY basic concepts of chemistry
CHEMISTRY  basic concepts of chemistryCHEMISTRY  basic concepts of chemistry
CHEMISTRY basic concepts of chemistryAJAL A J
 
Biogeochemical cycles
Biogeochemical cyclesBiogeochemical cycles
Biogeochemical cyclesAJAL A J
 
ac dc bridges
ac dc bridgesac dc bridges
ac dc bridgesAJAL A J
 
Hays bridge schering bridge wien bridge
Hays bridge  schering bridge  wien bridgeHays bridge  schering bridge  wien bridge
Hays bridge schering bridge wien bridgeAJAL A J
 
App Naming Tip
App Naming TipApp Naming Tip
App Naming Tip AJAL A J
 
flora and fauna of himachal pradesh and kerala
flora and fauna of himachal pradesh and keralaflora and fauna of himachal pradesh and kerala
flora and fauna of himachal pradesh and keralaAJAL A J
 
B.Sc Cardiovascular Technology(CVT)
 B.Sc Cardiovascular Technology(CVT)  B.Sc Cardiovascular Technology(CVT)
B.Sc Cardiovascular Technology(CVT) AJAL A J
 
11 business strategies to make profit
11 business strategies to make profit 11 business strategies to make profit
11 business strategies to make profit AJAL A J
 
PCOS Polycystic Ovary Syndrome
PCOS  Polycystic Ovary SyndromePCOS  Polycystic Ovary Syndrome
PCOS Polycystic Ovary SyndromeAJAL A J
 
Courses and Career Options after Class 12 in Humanities
Courses and Career Options after Class 12 in HumanitiesCourses and Career Options after Class 12 in Humanities
Courses and Career Options after Class 12 in HumanitiesAJAL A J
 
MANAGEMENT Stories
 MANAGEMENT Stories MANAGEMENT Stories
MANAGEMENT StoriesAJAL A J
 
NEET PREPRATION TIPS AND STRATEGY
NEET PREPRATION TIPS AND STRATEGYNEET PREPRATION TIPS AND STRATEGY
NEET PREPRATION TIPS AND STRATEGYAJAL A J
 
REVOLUTIONS IN AGRICULTURE
REVOLUTIONS IN AGRICULTUREREVOLUTIONS IN AGRICULTURE
REVOLUTIONS IN AGRICULTUREAJAL A J
 
NRI QUOTA IN NIT'S
NRI QUOTA IN NIT'S NRI QUOTA IN NIT'S
NRI QUOTA IN NIT'S AJAL A J
 
Subjects to study if you want to work for a charity
Subjects to study if you want to work for a charitySubjects to study if you want to work for a charity
Subjects to study if you want to work for a charityAJAL A J
 
IIT JEE A KERALA PERSPECTIVE
IIT JEE A KERALA PERSPECTIVE IIT JEE A KERALA PERSPECTIVE
IIT JEE A KERALA PERSPECTIVE AJAL A J
 
Clat 2020 exam COMPLETE DETAILS
Clat 2020 exam COMPLETE DETAILSClat 2020 exam COMPLETE DETAILS
Clat 2020 exam COMPLETE DETAILSAJAL A J
 

More from AJAL A J (20)

KEAM KERALA ENTRANCE EXAM
KEAM KERALA ENTRANCE EXAMKEAM KERALA ENTRANCE EXAM
KEAM KERALA ENTRANCE EXAM
 
Paleontology Career
Paleontology  CareerPaleontology  Career
Paleontology Career
 
CHEMISTRY basic concepts of chemistry
CHEMISTRY  basic concepts of chemistryCHEMISTRY  basic concepts of chemistry
CHEMISTRY basic concepts of chemistry
 
Ecology
EcologyEcology
Ecology
 
Biogeochemical cycles
Biogeochemical cyclesBiogeochemical cycles
Biogeochemical cycles
 
ac dc bridges
ac dc bridgesac dc bridges
ac dc bridges
 
Hays bridge schering bridge wien bridge
Hays bridge  schering bridge  wien bridgeHays bridge  schering bridge  wien bridge
Hays bridge schering bridge wien bridge
 
App Naming Tip
App Naming TipApp Naming Tip
App Naming Tip
 
flora and fauna of himachal pradesh and kerala
flora and fauna of himachal pradesh and keralaflora and fauna of himachal pradesh and kerala
flora and fauna of himachal pradesh and kerala
 
B.Sc Cardiovascular Technology(CVT)
 B.Sc Cardiovascular Technology(CVT)  B.Sc Cardiovascular Technology(CVT)
B.Sc Cardiovascular Technology(CVT)
 
11 business strategies to make profit
11 business strategies to make profit 11 business strategies to make profit
11 business strategies to make profit
 
PCOS Polycystic Ovary Syndrome
PCOS  Polycystic Ovary SyndromePCOS  Polycystic Ovary Syndrome
PCOS Polycystic Ovary Syndrome
 
Courses and Career Options after Class 12 in Humanities
Courses and Career Options after Class 12 in HumanitiesCourses and Career Options after Class 12 in Humanities
Courses and Career Options after Class 12 in Humanities
 
MANAGEMENT Stories
 MANAGEMENT Stories MANAGEMENT Stories
MANAGEMENT Stories
 
NEET PREPRATION TIPS AND STRATEGY
NEET PREPRATION TIPS AND STRATEGYNEET PREPRATION TIPS AND STRATEGY
NEET PREPRATION TIPS AND STRATEGY
 
REVOLUTIONS IN AGRICULTURE
REVOLUTIONS IN AGRICULTUREREVOLUTIONS IN AGRICULTURE
REVOLUTIONS IN AGRICULTURE
 
NRI QUOTA IN NIT'S
NRI QUOTA IN NIT'S NRI QUOTA IN NIT'S
NRI QUOTA IN NIT'S
 
Subjects to study if you want to work for a charity
Subjects to study if you want to work for a charitySubjects to study if you want to work for a charity
Subjects to study if you want to work for a charity
 
IIT JEE A KERALA PERSPECTIVE
IIT JEE A KERALA PERSPECTIVE IIT JEE A KERALA PERSPECTIVE
IIT JEE A KERALA PERSPECTIVE
 
Clat 2020 exam COMPLETE DETAILS
Clat 2020 exam COMPLETE DETAILSClat 2020 exam COMPLETE DETAILS
Clat 2020 exam COMPLETE DETAILS
 

Recently uploaded

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
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 01KreezheaRecto
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
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 ...SUHANI PANDEY
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
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.pdfankushspencer015
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
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
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
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 ...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
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
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 

Kalman filters

  • 1. 1 Introduction to Kalman Filters
  • 2. 2 Overview • What could Kalman Filters be used for in Hydrosciences? • What is a Kalman Filter? • Conceptual Overview • The Theory of Kalman Filter (only the equations you need to use) • Simple Example (with lots of blah blah talk through handouts)
  • 3. 3 A “Hydro” Example • Suppose you have a hydrologic model that predicts river water level every hour (using the usual inputs). • You know that your model is not perfect and you don’t trust it 100%. So you want to send someone to check the river level in person. • However, the river level can only be checked once a day around noon and not every hour. • Furthermore, the person who measures the river level can not be trusted 100% either. • So how do you combine both outputs of river level (from model and from measurement) so that you get a ‘fused’ and better estimate? – Kalman filtering
  • 5. 5 What is a Filter by the way? Class – define mathematically what a filter is (make an analogy to a real filter) Other applications of Kalman Filtering (or Filtering in general): 1)Your Car GPS (predict and update location) 2)Surface to Air Missile (hitting the target) 3)Ship or Rocket navigation (Appollo 11 used some sort of filtering to make sure it didn’t miss the Moon!)
  • 6. 6 The Problem in General (let’s get a little more technical) System Error Sources System System State (desired but not known) Black Box Sometimes the system state and the measurement may be two different things (not like river level example) Observed Measurements Measuring Devices Estimator Measurement Error Sources External Controls Optimal Estimate of System State • System state cannot be measured directly • Need to estimate “optimally” from measurements
  • 7. 7 What is a Kalman Filter? • Recursive data processing algorithm • Generates optimal estimate of desired quantities given the set of measurements • Optimal? – For linear system and white Gaussian errors, Kalman filter is “best” estimate based on all previous measurements – For non-linear system optimality is ‘qualified’ • Recursive? – Doesn’t need to store all previous measurements and reprocess all data each time step
  • 8. 8 Conceptual Overview • Simple example to motivate the workings of the Kalman Filter • The essential equations you need to know (Kalman Filtering for Dummies!) • Examples: Prediction and Correction
  • 9. 9 Conceptual Overview y • Lost on the 1-dimensional line (imagine that you are guessing your position by looking at the stars using sextant) • Position – y(t) • Assume Gaussian distributed measurements
  • 10. 10 Conceptual Overview 0 10 20 30 40 50 60 70 80 90 100 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 State space – position Measurement - position • Sextant Measurement at t1: Mean = z1 and Variance = sz1 • Optimal estimate of position is: ŷ(t1) = z1 • Variance of error in estimate: s2 x (t1) = s2 z1 • Boat in same position at time t2 - Predicted position is z1 Sextant is not perfect
  • 11. 11 Conceptual Overview 0 10 20 30 40 50 60 70 80 90 100 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 prediction ŷ-(t2) State (by looking at the stars at t2) • So we have the prediction ŷ-(t2) • GPS Measurement at t2: Mean = z2 and Variance = sz2 • Need to correct the prediction by Sextant due to measurement to get ŷ(t2) • Closer to more trusted measurement – should we do linear interpolation? Measurement usign GPS z(t2)
  • 12. 12 corrected optimal estimate ŷ(t2) measurement z(t2) prediction ŷ-(t2) 0 10 20 30 40 50 60 70 80 90 100 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 Conceptual Overview Kalman filter helps you fuse measurement and prediction on the basis of how much you trust each (I would trust the GPS more than the sextant) • Corrected mean is the new optimal estimate of position (basically you’ve ‘updated’ the predicted position by Sextant using GPS • New variance is smaller than either of the previous two variances
  • 13. 13 Conceptual Overview (The Kalman Equations) • Lessons so far: Make prediction based on previous data - ŷ-, s- Take measurement – zk, sz Optimal estimate (ŷ) = Prediction + (Kalman Gain) * (Measurement - Prediction) Variance of estimate = Variance of prediction * (1 – Kalman Gain)
  • 14. 14 Conceptual Overview ŷ(t2) Naïve Prediction (sextant) ŷ-(t3) 0 10 20 30 40 50 60 70 80 90 100 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 What if the boat was now moving? • At time t3, boat moves with velocity dy/dt=u • Naïve approach: Shift probability to the right to predict • This would work if we knew the velocity exactly (perfect model)
  • 15. But you may not be so sure about the exact velocity 15 ŷ(t2) Naïve Prediction ŷ-(t3) Prediction ŷ-(t3) 0 10 20 30 40 50 60 70 80 90 100 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 Conceptual Overview • Better to assume imperfect model by adding Gaussian noise • dy/dt = u + w • Distribution for prediction moves and spreads out
  • 16. 16 Corrected optimal estimate ŷ(t3) Updated Sextant position using GPS Measurement z(t3) GPS Prediction ŷ-(t3) Sextant 0 10 20 30 40 50 60 70 80 90 100 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 Conceptual Overview • Now we take a measurement at t3 • Need to once again correct the prediction • Same as before
  • 17. 17 Conceptual Overview • Lessons learnt from conceptual overview: – Initial conditions (ŷand s) k-1 k-1– Prediction (ŷ-k , s- k) • Use initial conditions and model (eg. constant velocity) to make prediction – Measurement (zk) • Take measurement – Correction (ŷk , sk) • Use measurement to correct prediction by ‘blending’ prediction and residual – always a case of merging only two Gaussians • Optimal estimate with smaller variance
  • 18. 18 Blending Factor • If we are sure about measurements: – Measurement error covariance (R) decreases to zero – K decreases and weights residual more heavily than prediction • If we are sure about prediction – Prediction error covariance P-k decreases to zero – K increases and weights prediction more heavily than residual
  • 19. 19 The set of Kalman Filtering 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-k HT(HP-k HT + R)-1 (2) Update estimate with measurement zk ŷk = ŷ-k + K(zk - H ŷ-k (3) Update Error Covariance ) Pk = (I - KH)P-k
  • 20. 20 Assumptions behind Kalman Filter • The model you use to predict the ‘state’ needs to be a LINEAR function of the measurement (so how do we use non-linear rainfall-runoff models?) • The model error and the measurement error (noise) must be Gaussian with zero mean
  • 21. 21 What if the noise is NOT Gaussian? Given only the mean and standard deviation of noise, the Kalman filter is the best linear estimator. Non-linear estimators may be better. Why is Kalman Filtering so popular? · Good results in practice due to optimality and structure. · Convenient form for online real time processing. · Easy to formulate and implement given a basic understanding. · Measurement equations need not be inverted. ALSO popular in hydrosciences, weather/oceanography/ hydrologic modeling, data assimilation
  • 22. Now ..to understand the jargons (You may begin the handouts) • First read the hand out by PD Joseph • Next, read the hand out by Welch and Bishop titled ‘An Introduction to the Kalman Filter’. (you can skip pages 4-5, 7- 11). Pages 7-11 are on ‘Extended Kalman Filtering’ (for non-linear systems). Read the solved example from pages 11-16. 22
  • 23. Homework (conceptual) • Explain in NO MORE THAN 1 PAGE the example that you read from pages 11-16 in the handout by Welch and Bishop. Basically, I want you to give me a simple conceptual overview of why and how ‘filtering’ was applied using the previous analogy on a boat lost in sea. • DUE – Same date as the Class project report. • EXTRA CREDIT 5% marks– If you review (3-4 pages) the classic paper in 1960 by Kalman (hand out) • EXTRA CREDIT 5% marks – if you turn in a detailed summary of the STEVE software (pros/cons, what it is etc.) 23
  • 24. 24 References 1. Kalman, R. E. 1960. “A New Approach to Linear Filtering and Prediction Problems”, Transaction of the ASME--Journal of Basic Engineering, pp. 35-45 (March 1960). 2. Welch, G and Bishop, G. 2001. “An introduction to the Kalman Filter”, http://www.cs.unc.edu/~welch/kalman/ By the way Dr. Rudolf Kalman is alive and living well today