SIPE - Lecture 8. Identification using basis functions
-
Upload
tu-delft-opencourseware -
Category
Education
-
view
290 -
download
3
description
Transcript of SIPE - Lecture 8. Identification using basis functions
1
Delft University of TechnologyDelft University of Technology
Identification using basisfunctionsCourse: Wb2301
Lecture 8
Erwin de Vlugt
April 10, 2007
April 10, 2007 2
Delft University of Technology
Contents
• Basisfunctions, properties and application• Application using ARX models• Examples
April 10, 2007 3
Delft University of Technology
Basisfunctions
• Fourier basisfunctions (sine-cosine)Application: Linear time-invariant (LTI) signals and systems
Advantage: general purpose, fast (FFT)
Disadvantage: fixed frequency resolution (∆f = 1
T)
• Custom basisfunctions (any shape)Application: Linear time-variant (LTV) signals and systems
Advantage: Time and frequency decoupled
Disadvantage: Choice of basisfunction shape
April 10, 2007 4
Delft University of Technology
Examples
• Sines and cosines (orthogonal, unbounded)
• Legendre polynomials (smooth, unbounded)
• Haar wavelets (transient, orthogonal, bounded)
• and many more ...Sinusoidals Legendre polynomials Haar Wavelets
April 10, 2007 5
Delft University of Technology
Signal Decomposition
x(t) = l1f1 + l2f2 + ...
with fn the nth basisfunction and ln the nth expansioncoefficient.
Note: a basisfunction can be selected for its own specific
spectral (frequency) and temporal (timing) properties!
April 10, 2007 6
Delft University of Technology
Decomposition
• Find a minimum number of expansion coefficients ln
• Number of expansion coefficients determined by’degree of orthogonality’ of fn
• Choose type of basisfunctions to comply with theexpected TV-dynamics of the signal
April 10, 2007 7
Delft University of Technology
Example: Estimating an LTV model
Process (ARX):
y(n) =P∑
i=1
a(i, n)y(n− i)+Q∑
j=0
b(j, n)x(n− j)+ e(n)
where a(i, n) and b(i, n) are the TV ARX coeffi-
cients to be determined and are a function of time
(i.e. n)!
April 10, 2007 8
Delft University of Technology
Example: Estimating an LTV model
Time courses a(i, n), b(i, n) and signals:
0 0.5 1 1.5 2 2.5−2
−1
0
1input x(n)
0 0.5 1 1.5 2 2.5−2
−1
0
1
2output y(n)
Choose Legendre polynomials
0 1 2 3−1
−0.5
0
0.5
1
b0
0 1 2 3−0.6
−0.4
−0.2
0
0.2
b1
0 1 2 30.5
0.6
0.7
0.8
0.9
1
a1
0 1 2 3−2
−1.5
−1
−0.5
0
0.5
a2
April 10, 2007 9
Delft University of Technology
Example: Estimating an LTV model
Expand a(i, n) and b(i, n) onto a set ofbasisfunctions πk(n):
a(i, n) =V∑
k=0
α(i, k)πk(n)
b(j, n) =V∑
k=0
β(j, k)πk(n)
with α(i, k) and β(j, k) the expansion coefficients
and V the maximum number of basisfunctions.
April 10, 2007 10
Delft University of Technology
Example: Estimating an LTV model
Substituting the expansion into the ARX model:
y(n) =
P∑
i=1
V∑
k=0
α(i, k)πk(n)y(n − i)+
Q∑
j=0
V∑
k=0
β(j, k)πk(n)x(n − j)+ e(n)
Now, create new variables:
yk(n − i) = πk(n)y(n − i)
xk(n − j) = πk(n)x(n − j)
The model is now TIV because the regression parameters α(i, k) and
β(j, k) are no longer functions of time!
April 10, 2007 11
Delft University of Technology
Example: Estimating an LTV model
yk(n − i) = πky(n − i)
= [πk(1)y(1 − i), πk(2)y(2 − i), . . . , πk(N)y(N − i)]T
and similar for xk(n − j). Now make a new matrix M of regressors:
M = [y0(n−1), . . . ,yV(n−1),x0(n), . . . ,xV(n),y0(n−2), . . . ,yV(n−2), . . .]
and reject the linear dependent regressors resulting in a regressionmatrix W :
W = [w1,w2, . . . ,wS]
April 10, 2007 12
Delft University of Technology
Example: Estimating an LTV model
The model in basisframe:
y(n) = ΘT W + e(n)
where Θ = [θ1, θ2, . . . , θS ] the vector of regression coefficients.Solution to LS analysis:
Θ̂ = [WWT ]−1Wy(n)
Convert to original TV modelparmeters a(i, n) and b(j, n):
[a(1, n), b(0, n), a(2, n), b(1, n), . . .]T = Θ ∈ π
April 10, 2007 13
Delft University of Technology
Example: Results
Estimated TV modelparameters:
0 0.5 1 1.5 2 2.5−1.5
−1
−0.5
0
0.5
1
1.5output y(n)
trueTV model
0 1 2 3−2
−1
0
1
2
b0
0 1 2 3−2
−1
0
1
2
b1
0 1 2 3−1.5
−1
−0.5
0
0.5
1
b2
0 1 2 30.4
0.6
0.8
1
1.2
1.4
a1
0 1 2 3−1.2
−1
−0.8
−0.6
−0.4
a2
April 10, 2007 14
Delft University of Technology
Example: Results
Estimated TV modelparameters using Haar wavelets:
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5−2
−1.5
−1
−0.5
0
0.5
1
1.5
2output y(n)
trueTV model
0 2 4 6−2
−1
0
1
2
b0
0 2 4 6−2
−1
0
1
2
b1
0 2 4 6−1
−0.5
0
0.5
1
b2
0 2 4 60.5
1
1.5
2
a1
0 2 4 6−1
−0.8
−0.6
−0.4
−0.2
a2
April 10, 2007 15
Delft University of Technology
Example: 2D movement experiment
Goal: Estimate an TV MBK model
−0.05 0 0.05 0.1 0.15 0.2
0.86
0.88
0.9
0.92
0.94
0.96
0.98
1
1.02
1.04
1.06
X direction [m]
Y d
irect
ion
[m]
Hand position
1 1.5 2 2.5 3 3.5−10
−5
0
5
10Input force disturbance [N]
1 1.5 2 2.5 3 3.5−4
−2
0
2
4x 10
−3 Output Y−position
April 10, 2007 16
Delft University of Technology
Example: 2D movement experiment
1 1.5 2 2.5 3 3.5−2
−1
0
1
2x 10
−4
b0
1 1.5 2 2.5 3 3.5−5
0
5
10
15x 10
−5
b1
1 1.5 2 2.5 3 3.5−10
−5
0
5x 10
−6
b2
1 1.5 2 2.5 3 3.5−2
0
2
4
a1
1 1.5 2 2.5 3 3.5−2
0
2
4
a2
00.1
0.20.3
0.40.5
0.60.7
0.80.9
1
100
101
102
10−5
10−4
10−3
10−2
Time [s]
Time Frequency plot
Frequency [Hz]
Gai
n M
BK
mod
el [−
]
Inverse Z-transform:H(q−1, t) → H(f, t)
April 10, 2007 17
Delft University of Technology
Example: 2D movement experiment
0.9
0.95
1
1.05
Y p
ositi
on [m
]Fitted MBK Model parameters
2
3
4
Mas
s [k
g]
10
20
30
40
Dam
ping
[Ns/
m]
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
500
1000
1500
Stif
fnes
s [N
/m]
Time [s]
April 10, 2007 18
Delft University of Technology
Summary and Conclusions
• Basisfunctions are useful to describe TVsystem dynamics
• Time and frequency are decoupled• Basisfunctions have to be chosen on apriori
knowledge• Trading-off accuracy vs number of coefficients