Kalman Filters
Maqsood
Kalman Filters Maqsood BIG PICTURE: CPS Unknown execution times - - PowerPoint PPT Presentation
Kalman Filters Maqsood BIG PICTURE: CPS Unknown execution times Packet losses Unknown delays Uncontrollable scheduling SENSORS ACTUATORS Sensor Noise MODEL Physical noise Imperfect actuation Parts failures Model Uncertainties
Maqsood
BIG PICTURE: CPS
SENSORS ACTUATORS “Essentially, all models are wrong, but some are useful.” “Everything is an approximation” “A CPS system is only as good as the Sensors”
Parts failures Imperfect actuation Unknown delays Packet losses Uncontrollable scheduling Physical noise Unknown execution times Sensor Noise
MODEL
Model Uncertainties
bias or measurement error).
uncertainty).
Mean Variance Measurements- Gaussian Gaussian PDF
What is a Kalman Filter:
from indirect, inaccurate and uncertain observations. It is recursive so that new measurements can be processed as they arrive.
Optimal in what sense:
estimated parameters.
linear estimators may be better.
An Estimator: Optimal under Linear or Gaussian and is On-Line. Why is Kalman Filtering so popular:
Why use the word “Filter”
“filtering out” the noise.
them onto the state estimate.
Kalman Filter: Smoothing, Filtering, Prediction
Kalman Filter: Mechanism
model and observations
Intuition: State Observer: Estimating state of a Rocket
https://www.mathworks.com/videos/series/understanding-kalman-filters.html
Kalman Filter Stochastic Processes
𝑨𝑙 = 𝐼𝑦𝑙 + 𝑤 Ƹ 𝑨𝑙 = 𝐼 ො 𝑦𝑙
𝑨𝑙 = 𝐼𝑦𝑙 + 𝑤
2 (uncertainty s1)
ො 𝑦1 = 𝑨1 ො 𝜏1
2 = 𝜏1 2
Simple Example: Data Acquisition Intuition
2
z1 z2
2
average
ො 𝑦2 = 1 𝜏1
2 𝑨1 + 1
𝜏2
2 𝑨2
1 𝜏1
2 + 1
𝜏2
2
= ො 𝑦1 + 𝜏1
2
𝜏1
2 + 𝜏2 2 𝑨2 − ො
𝑦1 ො 𝜏2
2 =
1 1 ො 𝜏1
2 + 1
𝜏2
2
Minimum Variance Estimator
System model: 𝑦𝑙 = 𝐵𝑦𝑙−1 + 𝐶𝑣 + 𝑥
Measurement model: 𝑨𝑙 = 𝐼𝑦𝑙 + 𝑤
𝑦 with covariance P
Further Reading: http://web.mit.edu/kirtley/kirtley/binlustuff/literature/control/Kalman%20filter.pdf
Kalman Gain: Weighting of process model vs. measurements
𝑦𝑙
′ = 𝐵ො
𝑦𝑙−1 𝑄𝑙
′ = 𝐵𝑄𝑙−1𝐵T + 𝑅
𝑨𝑙
′ = 𝐵𝑦𝑙 ′
𝐿𝑙 = 𝑄𝑙
′𝐼T 𝐼𝑄𝑙 ′𝐼T + 𝑆 −1
ො 𝑦𝑙 = 𝑦𝑙
′ + 𝐿𝑙 𝑨𝑙 − 𝐼 𝑦𝑙 ′
𝑄𝑙 = 𝐽 − 𝐿𝑙𝐼 𝑄
𝑙 ′
prediction of new state based on passed state predicted observation new observation new estimate of state 𝑦𝑙
′
𝑨𝑙
′
𝑨𝑙 ො 𝑦𝑙 Pk is the error covariance matrix at time k
Further Reading: https://www.kalmanfilter.net/kalman1d.html
HIGH KALMAN GAIN LOW KALMAN GAIN
Example 1: Estimating Temperature of Liquid in Tank Numerical Example
For Further Details: https://www.kalmanfilter.net/kalman1d.html
ITERATION ZERO
FIRST ITERATION
SECOND ITERATION
EXAMPLE 2: AIRPLANE CONSTANT ACCELERATION MODEL Determining The State Space Mode
Estimated State Vector Control vector State transition matrix Control Matrix
The state extrapolation equation is: The matrix multiplication results:
Sen Sensor Fus Fusio ion
Vector of multiple measurements
Co Comparison: Pos
tion-Only y vs s Pos
tion-Velocity ty Mod
Position-Only Model [Welch & Bishop] Position-Velocity Model E.g., GPS position measurements E.g., GPS position + Odometer speed
Ex Example le 3: 3: Pen endulum Equ quation of
tion De Determin ining a a Lin Linear St State Spa Space Rep epresentati tion
For Small Angles Non-Linear Linear Dynamic Model
Pen endulu lum Equati tion of
tion
Dynamic Model Defining States System Matrices
Who ho sa said id Li Life is s Lin Linear?
Gaussian Gaussian Gaussian Non-Gaussian Kalman Filters are optimal for Linear, Gaussian Systems Extended Kalman Filter Unscented Kalman Filter
Gaussian Gaussian Non-Gaussian Estimation
App pplic icati tions
Large Kalman filter system: Including trajectories of 24+ satellites, drift rates and phases
parameters related to atmospheric propagation delays with time and location For prolonging life of wind turbines by detecting wind anomalies (wind shear, extreme gusts) utilizing an EKF for regression analysis. Forecast model. Uses an Ensemble Kalman filter which throws out bad data that would result in a poor forecast.” GPS Tracking Wind-Mill Tracking Weather forecasting
App pplic icati tions
In VR, predictive tracking is used to forecast the position of an
Improves efficiency of ADAS and makes vehicle control operations like blind spot detection, stability and traction control, lane departure detection and automatic braking in emergency situations a lot safer and more effective Forecast model. Uses an Ensemble Kalman filter which throws out bad data that would result in a poor forecast.” GPS Tracking Advanced Driver Assistance Systems (ADAS) Weather forecasting