Professional Documents
Culture Documents
Kalman Filter
Kalman Filter
Kalman Filter
1 / 19
Agenda
Introduction
KF Algorithm
Problem statement
Algorithm
Applications
Noise filtering in a measured variable
State estimation
Kalman Filter
2 / 19
Introduction
Introduction
Kalman Filter (KF) has been widely studied since the publication of
its seminal paper in 1960
KF is a very powerful statistical approach used to infer the value of a
signal y (t) = x(t) + , where represents gaussian noise, at a
particular time t = t1 .
t1 could be less than, equal or greater than t.
In the particular case of t1 < t, KF performs data-smothing. When
t1 = t, a filtering operation is executed; and when t1 > t, a prediction
feature is to be carried out by KF.
Kalman Filter
3 / 19
Introduction
Introduction
Kalman Filter (KF) has been widely studied since the publication of
its seminal paper in 1960
KF is a very powerful statistical approach used to infer the value of a
signal y (t) = x(t) + , where represents gaussian noise, at a
particular time t = t1 .
t1 could be less than, equal or greater than t.
In the particular case of t1 < t, KF performs data-smothing. When
t1 = t, a filtering operation is executed; and when t1 > t, a prediction
feature is to be carried out by KF.
Kalman Filter
3 / 19
Introduction
Introduction
Kalman Filter (KF) has been widely studied since the publication of
its seminal paper in 1960
KF is a very powerful statistical approach used to infer the value of a
signal y (t) = x(t) + , where represents gaussian noise, at a
particular time t = t1 .
t1 could be less than, equal or greater than t.
In the particular case of t1 < t, KF performs data-smothing. When
t1 = t, a filtering operation is executed; and when t1 > t, a prediction
feature is to be carried out by KF.
Kalman Filter
3 / 19
Introduction
Introduction
Kalman Filter (KF) has been widely studied since the publication of
its seminal paper in 1960
KF is a very powerful statistical approach used to infer the value of a
signal y (t) = x(t) + , where represents gaussian noise, at a
particular time t = t1 .
t1 could be less than, equal or greater than t.
In the particular case of t1 < t, KF performs data-smothing. When
t1 = t, a filtering operation is executed; and when t1 > t, a prediction
feature is to be carried out by KF.
Kalman Filter
3 / 19
Introduction
Introduction
Kalman Filter
4 / 19
Introduction
Introduction
Kalman Filter
4 / 19
Introduction
Introduction
Kalman Filter
4 / 19
Introduction
Introduction
Kalman Filter
5 / 19
Introduction
Introduction
Kalman Filter
5 / 19
Introduction
Introduction
Kalman Filter
5 / 19
Introduction
Introduction
Kalman Filter
5 / 19
KF Algorithm
Problem statement
Agenda
Introduction
KF Algorithm
Problem statement
Algorithm
Applications
Noise filtering in a measured variable
State estimation
Kalman Filter
6 / 19
KF Algorithm
Problem statement
(1)
w(k)
v(k)
w(k)
v(k)
= 0
Qw
0
0
w (l) v (l)
=
Q0wv
Kalman Filter
Qwv
Qv
kl
Dec 9th 2013
7 / 19
KF Algorithm
Problem statement
(1)
w(k)
v(k)
w(k)
v(k)
= 0
Qw
0
0
w (l) v (l)
=
Q0wv
Kalman Filter
Qwv
Qv
kl
Dec 9th 2013
7 / 19
KF Algorithm
Problem statement
(1)
w(k)
v(k)
w(k)
v(k)
= 0
Qw
0
0
w (l) v (l)
=
Q0wv
Kalman Filter
Qwv
Qv
kl
Dec 9th 2013
7 / 19
KF Algorithm
Problem statement
k
)
y
(k
k
+
1)
.
.
.
y
(k
1)
y
(k)
0
0
and
u(k k0 ) u(k k0 + 1) . . . u(k 1) u(k)
It is convenient to define a priori state estimation
x <n at step k,
given prior knowledge to step k of the observed values of y and u, and
a posteriori state estimate at step k,
x <n given the measurement
of y(k). Therefore, priori and posteriori errors are defined as follows:
e (k) , x(k)
x(k)
(2)
e(k) , x(k)
x(k)
(3)
Kalman Filter
8 / 19
KF Algorithm
Problem statement
k
)
y
(k
k
+
1)
.
.
.
y
(k
1)
y
(k)
0
0
and
u(k k0 ) u(k k0 + 1) . . . u(k 1) u(k)
It is convenient to define a priori state estimation
x <n at step k,
given prior knowledge to step k of the observed values of y and u, and
a posteriori state estimate at step k,
x <n given the measurement
of y(k). Therefore, priori and posteriori errors are defined as follows:
e (k) , x(k)
x(k)
(2)
e(k) , x(k)
x(k)
(3)
Kalman Filter
8 / 19
KF Algorithm
Problem statement
(4)
(5)
x(k) =
x(k) + K(k) y(k) C
x(k)
(6)
Kalman Filter
9 / 19
KF Algorithm
Problem statement
This optimization procedure, whose details are not presented here, can be
done by substituting Eq. 6 into the definition of the error, Eq. 3,
performing the corresponding expectation operations, taking the derivative
of the trace of the result with respect to K , setting the result equal to zero
and finally solving the equation for K . One particular form of K that
minimizes Eq. 5 is given by:
1
K(k) = P(k)CT CP(k) CT + Qv
(7)
Kalman Filter
10 / 19
KF Algorithm
Problem statement
This optimization procedure, whose details are not presented here, can be
done by substituting Eq. 6 into the definition of the error, Eq. 3,
performing the corresponding expectation operations, taking the derivative
of the trace of the result with respect to K , setting the result equal to zero
and finally solving the equation for K . One particular form of K that
minimizes Eq. 5 is given by:
1
K(k) = P(k)CT CP(k) CT + Qv
(7)
Kalman Filter
10 / 19
KF Algorithm
Algorithm
Agenda
Introduction
KF Algorithm
Problem statement
Algorithm
Applications
Noise filtering in a measured variable
State estimation
Kalman Filter
11 / 19
KF Algorithm
Algorithm
KF Algorithm
Initialize
x = x0 and P = P0
x(k) = A
x(k 1) + Bu(k 1) + K(k) y(k) C
x(k)
Return to step 1
Kalman Filter
12 / 19
KF Algorithm
Algorithm
KF Algorithm
Initialize
x = x0 and P = P0
x(k) = A
x(k 1) + Bu(k 1) + K(k) y(k) C
x(k)
Return to step 1
Kalman Filter
12 / 19
KF Algorithm
Algorithm
KF Algorithm
Initialize
x = x0 and P = P0
x(k) = A
x(k 1) + Bu(k 1) + K(k) y(k) C
x(k)
Return to step 1
Kalman Filter
12 / 19
KF Algorithm
Algorithm
KF Algorithm
Initialize
x = x0 and P = P0
x(k) = A
x(k 1) + Bu(k 1) + K(k) y(k) C
x(k)
Return to step 1
Kalman Filter
12 / 19
KF Algorithm
Algorithm
KF Algorithm
Initialize
x = x0 and P = P0
x(k) = A
x(k 1) + Bu(k 1) + K(k) y(k) C
x(k)
Return to step 1
Kalman Filter
12 / 19
KF Algorithm
Algorithm
KF Algorithm
Initialize
x = x0 and P = P0
x(k) = A
x(k 1) + Bu(k 1) + K(k) y(k) C
x(k)
Return to step 1
Kalman Filter
12 / 19
Applications
Agenda
Introduction
KF Algorithm
Problem statement
Algorithm
Applications
Noise filtering in a measured variable
State estimation
Kalman Filter
13 / 19
Applications
Noise filtering
Filter response
Ideal response
Filtered signal
Noisy signal
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Time (s)
Kalman Filter
14 / 19
Applications
Tuning parameters
Kalman Filter
15 / 19
Applications
State estimation
Agenda
Introduction
KF Algorithm
Problem statement
Algorithm
Applications
Noise filtering in a measured variable
State estimation
Kalman Filter
16 / 19
Applications
State estimation
70
Ideal x (t)
2
Noisy x (t)
2
Filtered x (t)
2
60
0
50
5
Ideal x1(t)
40
Noisy x (t)
1
10
Filtered x1(t)
30
15
20
20
10
0
0
5
Time (s)
10
25
0
Kalman Filter
5
Time (s)
10
17 / 19
Appendix
Questions I
Kalman Filter
18 / 19