Lecture 9b: Estimating The Kalman Filter From Data: 14th December 2016
Lecture 9b: Estimating The Kalman Filter From Data: 14th December 2016
LTI SI
Problem
The 3-step strategy
Lecture 9b: Estimating the Kalman Filter from
data
Michel Verhaegen 1
1
Based on the work: [1] A. Chiuso. The Role of Vector Autoregressive
Modeling in Predictor Based Subspace Identification. Automatica, vol.
43pp. 1034–1048, 2007
Michel Verhaegen 14th December 2016 1/8
Contents
Beyond LTI SI
LTI SI
Problem
The 3-step strategy
Beyond LTI SI (
x(k + 1) = Ax(k) + Bu(k) + Ke(k)
LTI SI Σ:
Problem y(k) = Cx(k) + e(k)
The 3-step strategy
e(k)
u(k) Σ y(k)
Beyond LTI SI (
x(k + 1) = Ax(k) + Bu(k) + Ke(k)
LTI SI Σ:
Problem y(k) = Cx(k) + e(k)
The 3-step strategy
e(k)
u(k) Σ y(k)
Identification Problem
Given i/o data sequences {u(k), y(k)}N k=1 from an unknown finite
dimensional, linear time-invariant system, determine the system matrices:
AT , BT , CT , D, KT
and the system order n such that they are a consistent estimate of the
orginal system matrices up to a similarity transformation.
Beyond LTI SI (
b : x̂(k + 1) = Ax̂(k) + Bu(k) + K y(k) − C x̂(k)
LTI SI Σ
Problem
The 3-step strategy
y(k) = C x̂(k) + e(k)
y(k)
u(k) b
Σ ŷ(k) = C x̂(k)
Identification Problem
Given i/o data sequences {u(k), y(k)}N k=1 from an unknown finite
dimensional, linear time-invariant system, determine the system matrices:
AT , BT , CT , D, KT
and the system order n such that they are a consistent estimate of the
orginal system matrices up to a similarity transformation.
Beyond LTI SI
Lemma 1
LTI SI
Problem Let the LTI system be given as
The 3-step strategy
x̂(k + 1) = (A − KC) x̂(k) + (B − KD) u(k) + Ky(k)
| {z } | {z }
Φ
B̃
y(k) = C x̂(k) + Du(k) + e(k)
T
and define the joint input-output data vector z(t) = u(t)T y(t)T ,
then
z(t − p)
z(t − p + 1)
Φ p−1
[B̃, K] Φ p−2
[B̃, K] ··· [B̃, K]
x̂(t) = Φp x̂(t−p)+ | {z } ..
Bz
.
z(t − 1)
| {z }
Zt−p,p,1
Beyond LTI SI
LTI SI
Corollary 1
Problem
The 3-step strategy
The (A) matrix with the required state sequence as its row space is given
by:
C
CΦ
. X̂t,N = Of Φp X̂t−p,N +
..
CΦf −1
| {z }
Of
CΦp−1 Bz CΦp−2 Bz ··· CBz
CΦp Bz CΦp−1 Bz ··· CΦBz
Zt−p,p,N
.. .. ..
. . .
CΦp+f −1 Bz ··· CΦ f −1
Bz
Beyond LTI SI
Subspace “trick” 1
LTI SI
Problem
The 3-step strategy The matrix Φ is A.S. and therefore: Φℓ ≈ 0 for ℓ ≥ p ⇒
C
CΦ
. X̂t,N ≈ Of Φp X̂t−p,N +
..
CΦf −1
| {z }
Of
CΦp−1 Bz CΦp−2 Bz ··· CBz
CΦp Bz CΦp−1 Bz ··· CΦBz
Zt−p,p,N
.. .. ..
. . .
CΦp+f −1 Bz ··· CΦ f −1
Bz
Beyond LTI SI
Subspace “trick” 2: From Lemma 1
LTI SI Let the LTI system be given as
Problem
The 3-step strategy
x̂(k + 1) = (A − KC) x̂(k) + (B − KD) u(k) + Ky(k)
| {z } | {z }
Φ
B̃
y(k) = C x̂(k) + Du(k) + e(k)
then
h i
y(t) = CΦp x̂(t−p)+ CΦp−1 Bz CΦp−2 Bz ··· CBz Zt−p,p,1 +Du(t)
With “trick” 1:
h i
y(t) ≈ CΦp x̂(t − p)+ CΦp−1 Bz CΦp−2 Bz ··· CBz Zt−p,p,1 +Du(t)
Beyond LTI SI
CΦp−1 Bz CΦp−2 Bz ··· CBz
CΦp Bz CΦp−1 Bz ··· CΦBz
.. .. .. Zt−p,p,N
. . .
CΦp+f −1 Bz ··· CΦf −1 Bz
Beyond LTI SI
LTI SI
" #
Problem u(t)
The 3-step strategy With the given data define z(t) =
{u(t), y(t)}···
t=0
y(t)
construct the “compound” Hankel matrix:
z(0) z(1) · · · z(N − 1)
z(1) z(2) · · · z(N )
Z0,s,N =
.. .. ..
. . .
z(s − 1) ··· z(N + s − 2)
h i
Ys,1,N = y(s) y(s + 1) · · · y(N + s − 1)
h i
x̂T (s) x̂T (s + 1) · · · x̂T (s + N − 1) = VnT
Step 3: Estimate the system matrices:
"x̂T (s) · · · x̂T (s + N −
x̂T (s + 1) · · · x̂T (s + N − 1) Φ B K
min k − u(s) · · · u(s + N − 2
Φ,B,K,C,D y(s) · · · y(s + N − 2) C D 0
y(s) · · · y(s + N − 2