Professional Documents
Culture Documents
0-0
Introduction to least-squares time domain identification 1/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 2/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 3/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 4/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 5/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 6/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 7/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 8/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 9/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 10/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 11/92
zoh-measurement configuration
• The excitation signal is generated by the measurement device that also
measures the system output. This measurement device is typically a digital
control computer also used to control the system.
• The excitation signal is a discrete-time signal u(kT ), free of noise.
• Through a zero-order-hold interpolation performed by the digital-to-analog
converter (DAC) of the control computer a continuous-time signal u(t) is
generated, a sequence of steps, that is applied to the (continuous-time)
system.
• At the system output, the continuous-time signal y(t) is sampled yielding
the discrete-time signal y(kT ) that is stored in the control computer
memory.
• The sampled output signal may be perturbed by measurement noise,
• Discrete-time models including dynamics of zoh-interpolation are
appropriate.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 12/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 13/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 14/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 15/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 16/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 17/92
• This yields:
Z ∞ ∞ Z
X lT
y(kT ) = g(τ )u(kT − τ )dτ = g(τ )u(kT − τ )dτ,
τ =0 l=1 τ =(l−1)T
∞ ∞
!
X Z lT X
= g(τ )dτ uk−l = gT (l)uk−l ,
l=1 τ =(l−1)T l=1
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 18/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 19/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 20/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 21/92
Timing diagram
• The derived ZOH relation assumes following timing of the input and
output:
compute u
k k +1 k +2
yk yk+1 yk+2
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 22/92
k k +1 k +2
yk yk+1 yk+2
∆k ∆k+1 ∆k+2
uk uk+1 uk+2 t/Ts
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 23/92
k k +1 k +2
yk yk+1 yk+2
∆k ∆k+1 ∆k+2
uk uk+1 t/Ts
Introducing disturbances
• We assume that the disturbances and noise can be lumped into an additive
term v(t) at the output:
∞
X
y(t) = g(k)u(t − k) + v(t).
k=1
• Sources of disturbances:
– Measurement noise: the sensors that measure the signals are subject to
noise and drift.
– Uncontrollable inputs: the system is subject to signals that have the
character of inputs, but are not controllable by the user.
• This model does not consider input disturbances, for example noise on the
measurements of the input data sequence.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 25/92
Prediction
The prediction of future outputs of a system is most essential for the
development of the time-domain identification methods discussed here.
One-step-ahead prediction of v(t)
∞
X
v(t) = H(q)e(t) = h(k)e(t − k).
k=0
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 28/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 29/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 30/92
The variable e(t) represents that part of y(t) that cannot be predicted from
past data: the innovation at time t.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 31/92
• Prediction error:
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 32/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 33/92
y(t)+a1 y(t−1)+. . .+ana y(t−na ) = b1 u(t−nk )+. . .+bnb u(t−nk −nb +1)+e(t),
The white-noise term e(t) enters as a direct error in the difference equation:
equation error model.
The model parameter vector:
h iT
θ = a1 a2 ... a na b1 . . . b nb .
If we introduce:
we get:
A(q, θ)y(t) = B(q, θ)u(t − nk ) + e(t).
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 34/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 35/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 36/92
Figuur 1: *
ARMAX
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 37/92
Figuur 2: *
ARARMAX
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 38/92
Figuur 3: *
Output error model structure
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 39/92
Figuur 4: *
Box-Jenkings model structure
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 40/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 41/92
Parameter estimation
• We have selected a certain set of candidate models :
M∗ = {M(θ)|θ ∈ DM }.
• We are also in the situation that we have collected a batch of data from the
system:
T
Z N = [y(1), u(1), y(2), u(2), . . . , y(N ), u(N )] .
Z N → θ̂ N ∈ DM .
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 42/92
with
ε(t, θ) = H −1 (q, θ) [y(t) − G(q, θ)u(t)] .
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 44/92
E{e(t)} = 0,
E{e(t)e(t1 )} = δ(t, t1 )σ 2 ,
where E{} denotes the expected value, and δ denotes the Kronecker delta.
• Prediction error:
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 45/92
ŷ(t|t − 1, θ) = ϕT (t)θ,
with
h iT
ϕ(t) = −y(t − 1) . . . −y(t − na ) u(t − nk ) . . . u(t − nk − nb + 1) .
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 46/92
ŷ(θ) = Φθ
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 47/92
ε(θ) = y − ŷ(θ).
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 49/92
R∗ = plim R(N ),
h∗ = plim f (N ).
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 51/92
Example
• Consider the following system (not an ARX model structure !!!):
B(q)
y(t) = u(t − 1) + e(t),
A(q)
with
A(q) = 1 + a1 q −1 ,
B(q) = b1 + b2 q −1 .
Example (2)
• The sequence ν0 (t) is not a sequence of independent random variables. For
example, ν0 (t) and ν0 (t − 1) are related since they both depend on e(t − 1).
As a result, ν0 (t) also relates to y(t − 1), i.e. it relates to some of the
elements of φ(t).
• In matrix form:
y(3) −y(2) u(2) u(1)
ν0 (3)
a
1
y(4) −y(3) u(3) u(2) ν0 (4)
= b1 + .
.. .. .. .. ..
. . . . .
b2
y(N − 2) −y(N − 1) u(N − 1) u(N ) ν0 (N − 2)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 54/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 55/92
with
|UN (ej2πk/N )|2 C
QN (2πk/N, θ) = , RN ≤ √ .
|H(ej2πk/N , θ)|2 N
ĜN (ej2πk/N ) is called the empirical transfer function estimate (ETFE) and
equals:
j2πk/N YN (ej2πk/N )
ĜN (e )= j2πk/N
.
UN (e )
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 56/92
VN (θ, Z N ) ≈
N −1
1 X 1 j2πk/N j2πk/N 2 j2πk/N 2 j2πk/N 2
|Ĝ N (e ) − G(e , θ)| |UN (e )| |A(e , θ)| .
N2 2
k=0
The difference between the empirical transfer function estimate and the
frequency response function of the model is weighted by two terms:
periodogram of the input and the frequency response of the denominator of the
model.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 57/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 58/92
Example (2)
Excited with a step-up and step-down excitation:
1.5
input
0.5
−0.5
0 200 400 600 800 1000
time [samples]
Figuur 5: *
Input excitation for second order system
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 59/92
Example (3)
Gaussian noise is added to the simulated output:
B(q)
y(t) = u(t) + e(t),
A(q)
with e(t) ∈ N (0, σ 2 ) with σ = 0.05.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 60/92
1.5
output
0.5
−0.5
−1
0 200 400 600 800 1000
time [samples]
Figuur 6: *
Noise-free (red) and noisy (blue) response to step-up and down input excitation
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 61/92
Example (4)
LSE:
y(2)
y(3)
y =
..
,
.
y(999)
−y(1) −y(0) u(1) u(0)
−y(2) −y(1) u(2) u(1)
Φ = ,
.. .. ..
. . .
−y(998) −y(997) u(998) u(997)
and
h iT
θ̂ LS = â1 â2 b̂1 b̂2 = Φ+ y.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 62/92
Example (5)
Inaccurate results due to high frequency weighting introduced by denominator
|A(ej2πk/N , θ)|2 .
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 63/92
20
Magnitude [dB]
10
−10
−20
0 5 10 15
0
Phase [degrees]
−50
−100
−150
−200
−250
0 5 10 15
Frequency [Hz]
Figuur 7: *
Magnitude and phase of exact model (red) and identified model (blue)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 64/92
Example (6)
• Next, the identification is repeated after filtering the input and output data
with the same low-pass filter.
• Second-order Butterworth filter with a cut-off frequency of 7 Hz. Both
input and output signals are filtered with the same filter such that the
relation between the filtered signals does not alter.
VN (θ, Z N ) ≈
N −1
1 X 1 2 j2πk/N 2 j2πk/N 2 j2πk/N 2
2
| ĜN − G(θ)| |UN (e )| |A(e , θ)| |H f (e )| ,
N 2
k=0
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 65/92
Example (7)
Improved result:
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 66/92
20
Magnitude [dB]
10
−10
−20
0 5 10 15
0
Phase [degrees]
−50
−100
−150
−200
−250
0 5 10 15
Frequency [Hz]
Figuur 8: *
Magnitude and phase of exact model (red) and identified models obtained
without data filtering (blue) and with data filtering (green) respectively
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 67/92
Example (8)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 68/92
1.5
output
0.5
−0.5
−1
0 200 400 600 800 1000
time [samples]
Figuur 9: *
Time-domain evaluation: exact output (red) and simulated output with
identified models obtained without data filtering (blue) and with data filtering
(green) respectively
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 69/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 70/92
VN (θ, θ̂ (i−1) , Z N ) ≈
N −1
1 X 1 2 j2πk/N 2 |A(ej2πk/N , θ)|2
|ĜN − G(θ)| |UN (e )| .
N2 2 |A(e j2πk/N , θ̂ (i−1) )| 2
k=0
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 71/92
Example revisited
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 72/92
20
Magnitude [dB]
10
−10
−20
0 5 10 15
0
Phase [degrees]
−50
−100
−150
−200
−250
0 5 10 15
Frequency [Hz]
Figuur 10: *
Magnitude and phase of exact model (red) and identified models obtained in
the first (blue), second (green) and third (yellow) step of the iterative
procedure, respectively
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 73/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 74/92
0.04
0.03
0.02
−0.01
−0.02
−0.03
−0.04
0 200 400 600 800 1000
time [samples]
Figuur 11: *
Time-domain evaluation: difference between exact model output and simulated
output with model identified with low-pass data filtering (green) and model
from third step of[H00S3A-H00S4A-H04X3A-H04X3B]
the iterative procedure (yellow), respectively
Introduction to least-squares time domain identification 75/92
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 76/92
y ∗ (t) = Ak (q)y(t),
u∗ (t) = Bk (q)u(t),
we get a similar ARX model structure but now with only the unknown
part of the system model:
∗ Bu (q, θ) ∗ 1
y (t) = u (t − nk ) + e(t),
Au (q, θ) Au (q, θ)
and referred to as scheme 1.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 77/92
Approach: scheme 2
• Filter only the input with the known part of the model:
Bk (q)
u∗ (t) = u(t),
Ak (q)
yielding:
Bu (q, θ) ∗ 1
y(t) = u (t − nk ) + e(t).
Au (q, θ) Ak (q)Au (q, θ)
The corresponding ”ARX” model structure equals:
1
Au (q, θ)y(t) = Bu (q, θ)u∗ (t − nk ) + e(t).
Ak (q)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 78/92
Approach: scheme 3
• Filter the output with the inverse of the known part of the model:
Ak (q)
y ∗ (t) = y(t),
Bk (q)
yielding:
Bu (q, θ) 1
y ∗ (t) = u(t − nk ) + e(t).
Au (q, θ) Bk (q)Au (q, θ)
The corresponding ”ARX” model structure equals:
1
Au (q, θ)y ∗ (t) = Bu (q, θ)u(t − nk ) + e(t).
Bk (q)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 79/92
VN (θ, Z N ) ≈
N −1
1 X 1 YN∗ 2 ∗ j2πk/N 2 j2πk/N 2
2
| ∗ − Gu (θ)| |UN (e )| |A u (e , θ)| ,
N 2 UN
k=0
with
• for scheme 1: u∗ = Bk u and y ∗ = Ak y,
• for scheme 2: u∗ = Bk /Ak u and y ∗ = y,
• and for scheme 3: u∗ = u and y ∗ = Ak /Bk y.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 80/92
Remarks
• If data filtering is applied to improve the accuracy of the parameter
estimate, it should compensate for the high frequency weighting
|Au (ej2πk/N , θ)|.
∗
• Depending on the applied scheme, also |UN (ej2πk/N )| can emphasis certain
frequencies and should be checked.
• In some situations, also low frequency distortions are present (DC-offset
and/or drift on measurements), also on inputs! These can be amplified by
the pre-filtering with the known part of the model, e.g. if the system
contains a pure integration or differentiation ... Then, apply band-pass
filters to remove these low frequency distortions.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 81/92
Example
Consider system:
B(q) b1 q −1 + b2 q −2 + b3 q −3
=
A(q) (1 − q −1 )(1 + a1 q −1 + a2 q −2 )
0.1656 e−3 q −1 + 0.6580 e−3 q −2 + 0.1651 e−3 q −3
= −1 −1 −2
,
(1 − q )(1.0000 − 1.8962q + 0.9937q )
which is the zero-order-hold discrete-time equivalent for a sampling rate
fs = 100 Hz of a second order continuous-time system with undamped natural
frequency fn = 5 Hz, damping ratio ζ = 0.01 augmented with an integrator.
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 82/92
Example (2)
The discrete-time system is excited with a random excitation:
input
0
−1
−2
−3
−4
0 200 400 600 800 1000
time [samples]
Figuur 12: *
Input excitation for second order system
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 83/92
Example (3)
Gaussian noise is added to the simulated output:
B(q)
y(t) = u(t) + e(t),
A(q)
with e(t) ∈ N (0, σ 2 ) with σ = 0.01
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 84/92
0.5
0.4
0.3
0.2
output
0.1
−0.1
−0.2
−0.3
0 200 400 600 800 1000
time [samples]
Figuur 13: *
Noise-free (red) and noisy (blue) response to step-up and down input excitation
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 85/92
Example (4)
The known and unknown parts of the model equal:
Bk (q) q −1
= −1
,
Ak (q) 1−q
Bu (q, θ) b1 + b2 q −1 + b3 q −2
= −1 −2
.
Au (q, θ) 1 + a1 q + a2 q
We apply scheme 1:
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 86/92
Example (5)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 87/92
40
Magnitude [dB]
20
−20
−40
−60
0 2 4 6 8 10
−50
Phase [degrees]
−100
−150
−200
−250
−300
0 2 4 6 8 10
Frequency [Hz]
Figuur 14: *
Magnitude and phase of exact model (red) and identified model using low-pass
filtered data (blue) and model obtained after one Sanathanan-Koerner step
(green)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 88/92
Example (6)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 89/92
40
Magnitude [dB]
20
−20
−40
−60
0 2 4 6 8 10
0
Phase [degrees]
−100
−200
−300
0 2 4 6 8 10
Frequency [Hz]
Figuur 15: *
Magnitude and phase of exact model (red) and identified model using low-pass
filtered data taking a priori knowledge into account (blue) and without
accounting for the a priori knowledge (green)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 90/92
Example (7)
[H00S3A-H00S4A-H04X3A-H04X3B]
Introduction to least-squares time domain identification 91/92
1.2
0.8
simulated output
0.6
0.4
0.2
−0.2
−0.4
0 200 400 600 800 1000
time [samples]
Figuur 16: *
Time-domain evaluation: comparison of simulated output of three models using
step-up and down input signal: (1) exact model (red) (2) model with a pole at
z = 1 (a priori system knowledge taken into account) (blue) and (3) model with
a pole at z[H00S3A-H00S4A-H04X3A-H04X3B]
= 0.9987 (full model identified) (green)
Introduction to least-squares time domain identification 92/92
[H00S3A-H00S4A-H04X3A-H04X3B]