Sunteți pe pagina 1din 7

$

'

'
Outline of this lecture

Practical Control Systems

1. Identification: General overview

System Identification I

models
time domain / frequency domain identification
2. System identification in the time domain

Bart De Schutter & Robert Babuska

general case
identification of 1st order models

Web Page: Blackboard or http://www.dcsc.tudelft.nl/sc4070

identification of 2nd order models


Delft Center for Systems and Control

&

Delft University of Technology

ARX, OE, and ARMAX models


%

'

Practical Control Systems

pcs id.1

1. Identification: General overview

&

'

Practical Control Systems

pcs id.2

Black-box models:

1st order & 2nd order linear models (continuous-time):


Models:

G1 (s) =

tailor-made

1
s + 1

G2 (s) =

2
s2 + 2s + 2

black-box
linear models (ARX, OE, ARMAX, BJ discrete-time):
Tailor-made models (based on physical modeling):

y(k) = G(q, )u(k) + H(q, )e(k)

d
x(t) = f (x(t), u(t), e(t), )
dt
y(t) = h(x(t), u(t), e(t), )
&

Practical Control Systems

nonlinear models (neural networks, fuzzy models, . . . )


%

pcs id.3

&

Practical Control Systems

pcs id.4

'

Box-Jenkins and Output-Error model

rag replacements

'

ARMAX and ARX models

PSfrag replacements

C
D
u

B
F

Box-Jenkins (BJ)

y(k) =

B(q)
C(q)
u(k) +
e(k)
F(q)
D(q)

ARMAX

1
A

1
A

A(q)y(k) = B(q)u(k) +C(q)e(k)

B
e
u
&

B
F

Output-Error (OE)

y
y(k) =

B(q)
u(k) + e(k)
F(q)

u
%

'

Practical Control Systems

pcs id.5

&
'

ARX

A(q)y(k) = B(q)u(k) + e(k)

Practical Control Systems

pcs id.6

References

Identification

L. Ljung, System Identification: Theory for the User, 2nd edition,


Prentice-Hall, 1999

Time domain

L. Ljung, System Identification, Chapter 58 of the Control Engineering

Frequency domain (yields transfer function G, for linear systems)

Handbook, pp. 10331054, CRC Press, 1996

frequency analysis (sines as input signal)

om
& B. Wittenmark, Computer-Controlled Systems,
K.J. Astr

Fourier analysis (arbitrary input signals)

Prentice-Hall, 1997, Chapter 13

spectral analysis ( signal spectra G)

Lecture notes of the courses Filtering & identification (SC4040) or

We concentrate on identification in the time domain.

&

Practical Control Systems

System identification (SC4110)

pcs id.7

Manual of MATLAB System Identification Toolbox


&

Practical Control Systems

pcs id.8

'

'

General case (nonlinear)

Model:

2. Identification in the time domain

d
x(t) = f (x(t), u(t), e(t), )
dt
y(t) = h(x(t), u(t), e(t), )

Overview:

Optimal value of ?

General case
Identification of 1st order models

Model, prediction of output y(t


k |) at t = tk = k h

Identification of 2nd order models

k |)
Prediction error: (k, ) = y(tk ) y(t
Performance:

ARX, OE, and ARMAX models

JN () =

&
'

Practical Control Systems

Performance:
JN () =

Note:

pcs id.9

General case (continued)

Usually:

with N : # data points

'

Practical Control Systems

pcs id.10

General case (continued)

d
x(t) = f (x(t), u(t), e(t), )
dt
y(t)
= h(x(t), u(t), e(t), )

1 N
g((k, ))
N k=1

Optimal value of :

g() = 2

1 N
N = arg min 2 (k, )
N k=1

g() = log f e () with fe probability density function of noise e

N
In general: use numerical, nonlinear optimization algorithms to compute

Optimal value:

N = arg min JN ()

(see course Optimization in Systems and Control (SC4090))

Practical Control Systems

1 N
g((k, ))
N k=1

&

maximum likelihood estimate

&

pcs id.11

Matlab optimization toolbox (lsqnonlin)


Matlab NCD toolbox (nonlinear control design)
&

Practical Control Systems

pcs id.12

'

Nonlinear least squares


N

f () =

i=1

'
Syntax:

2i () = ()T ()
N

f () = 2() ()

i=1

Approximation of the Hessian:

H()
:= 2()T ()
k+1 = k H 1 (k ) f (k )

1
k)
Levenberg-Marquardt method : k+1 = k I + H(
f (k )
Gauss-Newton method :

'

Practical Control Systems

x=lsqnonlin(fun,x0,lb,ub,options) with

[e,J]=fun(x)
e=...
% Compute Jacobian if required.
if ( nargout > 1 )
J=...
end;

&

lsqnonlin

fun : m-file function returning e and its Jacobian e (optional)

H() = 2() () + 2 i ()i ()


T

x0 : initial starting point


lb, ub : lower and upper bounds for x (optional)
%

pcs id.13

options : options structure (optional)


&
'

LargeScale : use a large-scale algorithm (on) or medium-scale


algorithm (off).

pcs id.14

Example of lsqnonlin

Note: Illustrative example, not related to identification

min eT e

Display : controls display of (intermediate) values. Possible values:


off, iter, and final

Define m-file:

Jacobian : indicates whether Jacobian is defined by user


MaxIter : maximum number of iterations allowed
TolFun, TolX : termination tolerance on the function value and on x
LevenbergMarquardt : Choose Levenberg-Marquardt over
Gauss-Newton algorithm (default: on)

Practical Control Systems

Practical Control Systems

Most important options:

&

pcs id.15

with

e(x) =

10(x2 x12 ) (1 x1 )

function [e,J]=fun_rosenbrock_e(x)
e=[10*(x(2)-x(1)2) (1-x(1))];
if ( nargout > 1 )
J=[-20*x(1) -1;
10
0];
end;

&

Practical Control Systems

T

pcs id.16

'

'

Identification of 1st order models

step response y(t) K(1 exp((t L)/))

Perform optimization:

x0=[2 2];
K
slope = K/
% Select medium-scale, Gauss-Newton, and
% Jacobian provided by user
PSfrag replacements 0.63K
options=optimset(LargeScale,off,...
LevenbergMarquardt,off,...
Jacobian,on);
x=lsqnonlin(fun_rosenbrock_e,x0,[],[],options)

&

'

Practical Control Systems

pcs id.17

2nd order models

PSfrag replacements

&

'

Practical Control Systems

pcs id.18

ARX, OE, and ARMAX models

envelope et

y0

Model:

y(k) = G(q, )u(k) + H(q, )e(k)


with e zero-mean white noise sequence

Optimal one-step ahead prediction:

a2
a1
&

N1

N1
, {y(k)}k=1
and model (G(q, ), H(q, )), determine
best estimate of y(k): y(k,
|k 1)

Given {u(k)}k=1

2
=
T
1
a1
=
ln
2 a2
0

Practical Control Systems

t + T

Prediction error:

pcs id.19

&

Practical Control Systems

(k, ) = y(k) y(k,


|k 1)
%

pcs id.20

'

Prediction error

OE: y(k) = G(q, )u(k) + e(k)

'

Solving optimization analytically?

Necessary condition for minimum of JN ():

y(k,
|k 1) = G(q, )u(k),

(k, ) = y(k) G(q, )u(k)

JN () = 0

When (k, ) is linear in parameter vector (ARX!):

ARX: A(q)y(k) = B(q)u(k) + e(k)

(k, ) = y(k) (k)T

y(k) = a1 y(k 1) ana y(k na )


+ b0 u(k L) + + bnb u(k L nb ) + e(k)

necessary condition becomes:

y(k,
|k 1) = a1 y(k 1) + bnb u(k L nb )

JN () =

(k, ) = y(k) + a1 y(k 1) + + ana y(k na )


b0 u(k L) bnb u(k L nb )
linear in parameters ai , bi !
&

'

Practical Control Systems

pcs id.21

&

1 N
2 (k, )(k, )
N k=1

1 N
2(k) y(k) (k)T = 0

N k=1

'

Practical Control Systems

pcs id.22

Nonlinear versus linear models


These are well-known Normal Equations:
N

k=1

k=1

(k)y(k) = (k)(k)T

Nonlinear models

+ general
+ based on physical models

solve linear equation to obtain

+ relation with physical system


- nonlinear optimization local minima, time-consuming

&

Practical Control Systems

pcs id.23

&

Practical Control Systems

pcs id.24

'

Linear models
+ often very effective
+ intuitive behavior (in particular for 1st & 2nd order models)
+ identification is fast process
+ many control design methods for linear models
- black-box relation with physical system?
- linear not general

&

Practical Control Systems

pcs id.25

S-ar putea să vă placă și