Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Kalman 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
Noise
Notice it has the same
shape with some
random variations plus
and minus.
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
System
Black
Box
System State
(desired but
not known)
Measurin
g Devices
Observed
Measurement
s
Estimato
r
Measurement
Error Sources
Optimal
Estimate of
System State
If we were to
plot just the
error of GPS on
graph, we
would see a
plot like this
So the Noise is
this random
bits of stuff
here at the
bottom
As a review,
Histogram gets
taller the more
measurements
are at a
particular value
This is really a
Good GPS
RECEIVER
So we could make a
Erro
r
Sensor
Readings
Now heres the
GPS reading we
received at 1 Hz
20
mph
20
mph
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
20
mph
We also Know if we commanded the
vehicle to change course of Speed- a
steering input or throttle change
Pk-1|k-1
xxk-1|k-1
Next Time
step
k=k+1
Pk|k
xxk|k
Prediction
Step
Based on
Example
Physical Model
Pk|k-1
xxk|k-1
Update Step
Compare
Prediction to
Measurements
Output
Estimate of
State
Measureme
nts
yk
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-kAPk-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
THANK YOU!
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
WALL-E
Robot
GPS
Trash
Robot Picks
up Trash
Trash
Xt
Xt-1
-Motor Command
2.5
2
Probability Where Robot Is
Position
1.5
0.5
0
0
0.5
1.5
2
Time
2.5
3.5
Vt=Vt-1+att
pt 1 t
xt
vt 0 1
T2
pt 1
at k
2
vt 1 T
vt
Measurement Prediction:
Zt=Cxt +t
Pt 1
Pt 1 0
t
Vt 1