Vous êtes sur la page 1sur 57

Modelos para Control IPD469

Lecture 3
System Identification

Prof: Juan C. Agero

Departamento de Ingeniera Electrnica


UTFSM, Chile

Valparaso, 31 de Agosto de 2017

J. C. Agero Lecture 3 1/ 38
Outline

1 System identification

2 Non-parametric methods

3 Input signals

4 Models parameterization

5 Estimates / Estimators

J. C. Agero Lecture 3 2/ 38
Outline

1 System identification

2 Non-parametric methods

3 Input signals

4 Models parameterization

5 Estimates / Estimators

J. C. Agero Lecture 3 3/ 38
References for System Identification:
P. Eykhoff. System Identification: Parameter and state estimation. John
Wiley and Sons, 1974.
G. C. Goodwin and R. Payne. Dynamic System Identification: Experi-
ment design and data analysis. Academic Press, 1977.
T. Sderstrm and P. Stoica. System Identification. Prentice-Hall Interna-
tional, 1989.
L. Ljung. System Identification: Theory for the user. Prentice Hall, 2nd
edition, 1999.
R. Pintelon and J. Schoukens. System Identification: A frequency domain
approach. IEEE Press, 2001.
J. P. Norton. An introduction to Identification. Academic Press, 1986.
S. D. Silvey. Statistical inference. Chapman and Hall, 1975.

J. C. Agero Lecture 3 4/ 38
System identification

Problem of interest:
To find a model for a dynamic system utilizing experimental data.

What for?
Most of modern control design techniques are based on an available model
(e.g. MPC, adpative control).

J. C. Agero Lecture 3 5/ 38
System identification

Problem of interest:
To find a model for a dynamic system utilizing experimental data.

What for?

We can gain understanding of the real system by building a model that


represents it.

J. C. Agero Lecture 3 5/ 38
System identification

Problem of interest:
To find a model for a dynamic system utilizing experimental data.

What for?

Many electronic devices utilize some kind of identification method. For


example, channel estimation in wireless communications.

J. C. Agero Lecture 3 5/ 38
System identification

Problem of interest:
To find a model for a dynamic system utilizing experimental data.

What for?

Methods utilized in Signal processing, Machine Learning, Fault detection,


and Econometrics are closely related to System Identification methods.

J. C. Agero Lecture 3 5/ 38
System identification

Problem of interest:
To find a model for a dynamic system utilizing experimental data.

What for?
Most of modern control design techniques are based on an available model
(e.g. MPC, adpative control).
We can gain understanding of the real system by building a model that
represents it.
Many electronic devices utilize some kind of identification method. For
example, channel estimation in wireless communications.
Methods utilized in Signal processing, Machine Learning, Fault detection,
and Econometrics are closely related to System Identification methods.

J. C. Agero Lecture 3 5/ 38
System identification

System identification loop:

J. C. Agero Lecture 3 6/ 38
System identification

Difficulties:
Defining inputs and outputs of the systems. What are the available sensors
and actuators?

J. C. Agero Lecture 3 7/ 38
System identification

Difficulties:

Model parametrization Physics, general parametrization (Black-Box).


How to deal with model uncertainty?

J. C. Agero Lecture 3 7/ 38
System identification

Difficulties:

Measurements are usually contaminated with noise. It is important to


know what signals are contaminated with noise. If there is no noise, and
no model uncertainty, then it is enough to solve a system of equations for
most problems.

J. C. Agero Lecture 3 7/ 38
System identification

Difficulties:

Experimental conditions are important to obtain a good model: sampling


time, open / closed loop. In some cases it is impossible to identify the
system irrespective of the identification algorithm utilized.

J. C. Agero Lecture 3 7/ 38
System identification

Difficulties:

How to design an experiment?

J. C. Agero Lecture 3 7/ 38
System identification

Difficulties:

What identification methods should be used for a particular problem?

J. C. Agero Lecture 3 7/ 38
System identification

Difficulties:
Defining inputs and outputs of the systems. What are the available sensors
and actuators?
Model parametrization Physics, general parametrization (Black-Box).
How to deal with model uncertainty?
Measurements are usually contaminated with noise. It is important to
know what signals are contaminated with noise. If there is no noise, and
no model uncertainty, then it is enough to solve a system of equations for
most problems.
Experimental conditions are important to obtain a good model: sampling
time, open / closed loop. In some cases it is impossible to identify the
system irrespective of the identification algorithm utilized.
How to design an experiment?
What identification methods should be used for a particular problem?

J. C. Agero Lecture 3 7/ 38
System identification

Areas of research:
Developing identification algorithms for a particular problem of interest.
Even though we typically use ML or Bayesian estimation methods, it is
still necessary to especialize the methods for a particular problem.

J. C. Agero Lecture 3 8/ 38
System identification

Areas of research:

Establishing limitations and theoretical results that help to define what can
and cannot be achieved for a class of problems. For example, is it better
to run experiments in open or closed loop?

J. C. Agero Lecture 3 8/ 38
System identification

Areas of research:

Design identification experiments: For example what is a good input to


use?

J. C. Agero Lecture 3 8/ 38
System identification

Areas of research:

Use identification for different engineering problems. For example chan-


nel estimation for wireless communications.

J. C. Agero Lecture 3 8/ 38
System identification

Areas of research:
Developing identification algorithms for a particular problem of interest.
Even though we typically use ML or Bayesian estimation methods, it is
still necessary to especialize the methods for a particular problem.
Establishing limitations and theoretical results that help to define what can
and cannot be achieved for a class of problems. For example, is it better
to run experiments in open or closed loop?
Design identification experiments: For example what is a good input to
use?
Use identification for different engineering problems. For example chan-
nel estimation for wireless communications.

J. C. Agero Lecture 3 8/ 38
System identification

True system: Linear time-invariant continuous-time systems

yt = G0 (p)ut + H0 (p)wt
d
where p = dt is the derivative operator.

True system: Linear time-invariant discrete-time systems

yt = G0 (q1 )ut + H0 (q1 )wt

where q1 wt = wt1 .

We call this relationship the Data generating mechanism.


We will mainly focus on discrete-time systems.

J. C. Agero Lecture 3 9/ 38
Outline

1 System identification

2 Non-parametric methods

3 Input signals

4 Models parameterization

5 Estimates / Estimators

J. C. Agero Lecture 3 10/ 38


Step response

A step is applied to the system and based on the transient response a model can
be obtained.

Advantages
This is a popular method in pratice and provides low order continuous-
time model.
The computational load is low.

Disadvantages
No useful to obtain higuer order models or non-linear models.
Low accuracy of the model (high variance).
It works only for moderate level of noise.

J. C. Agero Lecture 3 11/ 38


Basic frequency analysis

A sinuosid is applied to the system. Since the steady-state response is also a


sinusoid a model can be obtained

Advantages
This is a popular method in pratice and it works for any continuous-time
model order.
The computational load is low.

Disadvantages
No useful to obtain non-linear models (even mild non-linearities will af-
fect the resulting model).
Low accuracy of the model (high variance). The transient response cannot
be used.
It works only for moderate level of noise.

J. C. Agero Lecture 3 12/ 38


Correlation analysis

A model is obtained by computing estimates of the input-output correlation


functions.

Impulse response representation for a discrete-time system:


yt = hk utk + vt
k=0

If the noise is un-correlated with the input, then:



ryu () = hk ru ( k) Wiener-Hopf equation
k=0

J. C. Agero Lecture 3 13/ 38


Correlation analysis

Correlation estimates:

1 N
ru () = ut+ ut , = 0, 1, 2, ru () = ru ()
N t=1
1 Nmax(,0)
ryu () = yt+ ut , = 0, 1, 2,
N t=1min(,0)

Note the these estimates are closely related to the correlation of quasi-
stationary signals.

A infinite dimension system of equation should be solved, but for white noise
input we have that

ryu (t)
ht =
ru (0)
J. C. Agero Lecture 3 14/ 38
Correlation analysis

Another option (for general inputs) is to truncate the impulse response which
leads to FIR models (ht = 0 for t M).

ryu (0) h0
ryu (1) ru (0) ru (M 1)
h1


=
.
. . . ..
.. . . . .
..

.
ru (M 1) ru (0)
ryu (M 1) hM1

In order to solve this system of equations it is neccesary that the matrices con-
taining the input correlation terms to be full rank. This condition imposes a
constraint on the class of inputs to be used on the experiment.

J. C. Agero Lecture 3 15/ 38


Correlation analysis

Advantages
It works for any model order (continuous- and discrete-time), any input
(provides certain matrix is full rank), but the representation is based on
the (infinite) inpulse response.
The computational load is moderate.

Disadvantages
No useful to obtain non-linear models.
Low accuracy of the model (high variance).
It works only for moderate level of noise since the input-output correlation
estimates should be good.

J. C. Agero Lecture 3 16/ 38


Spectral analysis

A model is directly obtained from the estimates of the input-output spectrum.

yt = G(q1 )ut + vt

If the input and noise are un-correlated, then,

yu (ej ) = G(ej )u (ej )

Model:

yu (ej )
G(ej ) =
u (ej )

J. C. Agero Lecture 3 17/ 38


Spectral analysis

Spectra definition:


u (ej ) = ru ()ej
=

yu (ej ) = ryu ()ej
=

Spectra estimates:

N
u (ej ) = ru ()ej
=N
N
yu (ej ) = ryu ()ej
=N

J. C. Agero Lecture 3 18/ 38


Spectral analysis

Advantages
It works for any model order and any input.
The computational load is moderate.

Disadvantages
No useful to obtain non-linear models. However, some research have
been developed in order to obtain models to initiate other (more accurate)
methods.
Low accuracy of the model (high variance).
It works only for moderate level of noise since the spectrum estimates
should be good.

J. C. Agero Lecture 3 19/ 38


Outline

1 System identification

2 Non-parametric methods

3 Input signals

4 Models parameterization

5 Estimates / Estimators

J. C. Agero Lecture 3 20/ 38


Input signals

Common signals used for identification:


step signal.
white noise (pseudo-random numbers).
sum of sinuoids.
binary signals: For example an PRBS is a periodic signal that takes values
a with period T. This signal has similar first and second order statisical
properties to white noise.

We use deterministic, WSS or quasi-stationary signals.

J. C. Agero Lecture 3 21/ 38


Input signals
Spectral density estimates:
N
yu (ej ) = ryu ()ej 1 N
=N YN (ej ) = ys ejs
N s=1
N
1 Nmax(,0)
= N yt+ ut ej 1 N
UN (ej ) = us ejs
=N t=1min(,0) N s=1
1 N N
= ys ut ejs ejt
N s=1 Periodogram:
t=1
1 N 1 N
= ys ejs ut ejt
N s=1 N t=1 u (ej ) = |UN (ej )|2
= YN (ej )UN (ej )
ETFE:
See page 44 of the book by Sderstrm (1989)
for details. Note the slight difference in YN (ej )
the definitions of spectral density and Fourier G(ej ) =
UN (ej )
transform.)
J. C. Agero Lecture 3 22/ 38
Input signals

If = 2k j j ) can be computed by using


N , k = 0, 1, . . . , N, YN (e ) and UN (e
Fast Fourier Transform (FFT) algorithms.

The spectral density estimates given before are not good for stochastic signals
since their variance do not tend to zero as N .

Periodogram of a sinusoid (Ljungs book, chapter 2)


2
Consider 0 = N0 for some integer N0 , and N = sN0 a multiple of N0 ,

ut = A cos(0 t)
( 2
j 2 N A4 if = 0
|UN (e )| =
0 if = 2k
N , k 6= s

J. C. Agero Lecture 3 23/ 38


Input signals

Periodogram of a periodic signals (Ljungs book, chapter 2)


If ut = ut+N0 , and N = sN0
(
s|Ar |2 if = 2r
N0 , r = 0, 1, 2, , N20
|UN (ej )|2 = 2k
0 if = N , k 6= rs

J. C. Agero Lecture 3 24/ 38


Input signals

A necessary condition to obtain an estimate via correlation analysis


In the correlation analysis, the following matrix plays an important role:

ru (0) ru (M 1)
RM .. .. ..
u =

. . .
ru (M 1) ru (0)

This is the covariance matrix of a (column) vector containing


{ut1 , ut2 , . . . , utM } RM u is, in general, positive semidefinite. Thus,
we need RM u to be positive definite (invertible) to be able to solve the
corresponding system of equations to estimate ht .

J. C. Agero Lecture 3 25/ 38


Input signals

We say that a signal is persistent of order n if


The following limit exists:

ru () = E {ut+ ut }

the matrix

ru (0) ru (n 1)
Rnu =
.. .. ..
. . .
ru (n 1) ru (0)

is positive definite.

In the context of adaptive control, ut a different definition of persistent exciting


signal is available.

J. C. Agero Lecture 3 26/ 38


Input signals

Some properties:
If a signal is persistent of order n, then it is also persitent of order k, with
0 k n.

J. C. Agero Lecture 3 27/ 38


Input signals

Some properties:

If ut is white noise, then Rnu = 2 In which is always positive definite. Thus


white noise signals are persistent exciting of all orders.

J. C. Agero Lecture 3 27/ 38


Input signals

Some properties:

If ut is a constant of magnitude , then ru () = 2 for all . Hence, Rnu is


non-singular iff n = 1. Thus, constant signals are persistent excinting of
order n = 1.

J. C. Agero Lecture 3 27/ 38


Input signals

Some properties:

If ut is an impulse (Kronecker), then ru () = 0 for all . Thus, an impulse


signal is not persistently exciting of any order.

J. C. Agero Lecture 3 27/ 38


Input signals

Some properties:

If the spectrum of a ergodic signal is positive definite at n distinct frequen-


cies (within the interval (, )), then the signal is persistent exciting of
order n. For scalar signals this is also a necessary condition.

J. C. Agero Lecture 3 27/ 38


Input signals

Some properties:
If a signal is persistent of order n, then it is also persitent of order k, with
0 k n.
If ut is white noise, then Rnu = 2 In which is always positive definite. Thus
white noise signals are persistent exciting of all orders.
If ut is a constant of magnitude , then ru () = 2 for all . Hence, Rnu is
non-singular iff n = 1. Thus, constant signals are persistent excinting of
order n = 1.
If ut is an impulse (Kronecker), then ru () = 0 for all . Thus, an impulse
signal is not persistently exciting of any order.
If the spectrum of a ergodic signal is positive definite at n distinct frequen-
cies (within the interval (, )), then the signal is persistent exciting of
order n. For scalar signals this is also a necessary condition.

J. C. Agero Lecture 3 27/ 38


Input signals

Some properties:
The output of an ARMA system is persistent of any finite order.
The correlation of a PRBS signal is given by
(
a2 = kT k = 0, 1, 2, . . .
ru () = 2
a /T elsewhere
2
a2 /T a2

a
a2 /T a2 a2 /T

.. .. ..
RT+1 = .
u
2. .


a /T
a2 2
a /T a 2

Since the first and last row are the same, the matrix RT+1
u is singular.
Hence a PRBS with period T is persistently exciting of order equal but
not greater than T.

J. C. Agero Lecture 3 28/ 38


Input signals

The order of persistency is related to the capacity to identify systems of


determined order. For example, in some identification algorithms, it is
necessary to have a persistent input of order 2n to identify a system of
order n. For LS only an input of order n is needed to identify a system of
order n.
The condition of persistency is necessary to identify a system but not suf-
ficient. In most cases, we need an input with some particular spectra in
order to obtain the best estimate.

J. C. Agero Lecture 3 29/ 38


Outline

1 System identification

2 Non-parametric methods

3 Input signals

4 Models parameterization

5 Estimates / Estimators

J. C. Agero Lecture 3 30/ 38


Models parameterization

Parametrization of the true system:

yt = G(q1 , 0 )ut + H(q1 , 0 )wt Model

yt = G(q1 , )ut + H(q1 , )wt


G(q1 , 0 ) = G0 (q1 )
H(q1 , 0 ) = H0 (q1 )

We want to find a parameter estimate, , that is close (in a statistical sense) to


the true parameter 0 .

J. C. Agero Lecture 3 31/ 38


Models parameterization

A general class for linear systems is given by

B(q1 , ) C(q1 , )
A(q1 , )yt = ut + wt
F(q1 , ) D(q1 , )

where wt is zero mean white noise with variance 2 , and


A(q1 , ),B(q1 , ),F(q1 , ),C(q1 , ), D(q1 , ) are polynomial in
the the backward-shift operator (q1 wt = wt1 ).

A(q1 , ) = 1 + a1 q1 + + an qn
B(q1 , ) = b0 + b1 q1 + + bn qn
C(q1 , ) = 1 + c1 q1 + + cn qn
D(q1 , ) = 1 + d1 q1 + + dn qn
F(q1 , ) = 1 + f1 q1 + + fn qn

Polynomials might, in general, be of different orders.


J. C. Agero Lecture 3 32/ 38
Models parameterization

Particular cases:
AR: A(q1 , )yt = wt .
MA: yt = C(q1 , )wt
ARMA: A(q1 , )yt = C(q1 , )wt .
ARMAX: A(q1 , )yt = B(q1 , )ut + C(q1 , )wt .
ARX: A(q1 , )yt = B(q1 , )ut + wt .
FIR: yt = B(q1 , )ut + wt .
B(q1 , )
OE: yt = u + wt .
F(q1 , ) t
B(q1 ,) C(q1 ,)
BJ: yt = u + D(q
F(q1 ,) t 1 ,) wt .

J. C. Agero Lecture 3 33/ 38


Outline

1 System identification

2 Non-parametric methods

3 Input signals

4 Models parameterization

5 Estimates / Estimators

J. C. Agero Lecture 3 34/ 38


Estimates / Estimators

Estimate:
An estimate of 0 is any function of the (input-output) data, i.e.

= (y1:N , u1:N )

Since the data is given, we obtain a particular estimate of 0 .

For different experiments we will obtain, in general, different estimates for 0 .


Using the data generating mechanism and the statistical properties of the noise
signal wt (e.g. Gaussian white noise) then we can find the statistical properties
of the estimator .

J. C. Agero Lecture 3 35/ 38


Estimators properties


Unbiasness: E = 0 .
Consistency: 0 .
Efficiency: E ( 0 )( 0 )T achieving its smallest value (in a ma-


trix sense).

Example
Assume we take measurements from a Gaussian random variable and we would
like to estimate the mean value . Just one sample of the random variable
would be enough to obtain an unbiased estimator. However, the variance of
this estimate might be too large. A better estimate is provided by the average
of several measurements.

These three properties are independent and one would like to obtain estimators
with all of them. Moreover, we would like to have general system identification
methods with nice properties (ML and Bayesian methods).
J. C. Agero Lecture 3 36/ 38
Estimators for dynamic systems

In system identification we deal with dynamic systems G(q1 , 0 ). Thus we


are interested on the statistical properties of G(ej , ), i.e.
E G(ej , ) = G(ej , 0 )


G(ej , ) G(ej , 0 )
E |G(ej , ) G(ej , 0 )|2


Note that G(ej , ) is a complex random variable.

J. C. Agero Lecture 3 37/ 38


Estimators for dynamic systems

Delta rule:
Using a Taylor series of first order:

dG(q1 , )

1 1
G(q , ) G(q , 0 ) + ( 0 )
d T 0

dG(ej , )

j j
 
E G(e , ) G(e , ) T
(E 0 )
d

0
j , ) dG(ej , )

 j j 2
dG(e
E |G(e , ) G(e , 0 )|

d T 0 d
0
T

= E ( 0 )( 0 )

J. C. Agero Lecture 3 38/ 38

Vous aimerez peut-être aussi