Вы находитесь на странице: 1из 21

Lecture 8 - Model Identification

What is system identification?


Direct pulse response identification
Linear regression
Regularization
Parametric model ID, nonlinear LS

EE392m - Winter 2003

Control Engineering

8-1

What is System Identification?


Experiment
Plant

Data

Identification

Model

White-box identification
estimate parameters of a physical model from data
Example: aircraft flight model

Gray-box identification

Rarely used in
real-life control

given generic model structure estimate parameters from data


Example: neural network model of an engine

Black-box identification
determine model structure and estimate parameters from data
Example: security pricing models for stock market

EE392m - Winter 2003

Control Engineering

8-2

Industrial Use of System ID


Process control - most developed ID approaches
all plants and processes are different
need to do identification, cannot spend too much time on each
industrial identification tools

Aerospace
white-box identification, specially designed programs of tests

Automotive
white-box, significant effort on model development and calibration

Disk drives
used to do thorough identification, shorter cycle time

Embedded systems
simplified models, short cycle time
EE392m - Winter 2003

Control Engineering

8-3

Impulse response identification


Simplest approach: apply control impulse and collect the
data
IMP ULS E RES P ONS E

0.8
0.6
0.4
0.2
0

TIME

Difficult to apply a short impulse big enough such that the


response is much larger than the noise
NOIS Y IMP ULS E RES P ONS E
1
0.5

-0.5

Can be used for building simplified


control design models from complex sims
EE392m - Winter 2003

Control Engineering

TIME

8-4

Step response identification


Step (bump) control input and collect the data
used in process control

S TEP RES P ONS E OF P AP ER WEIGHT


1.5
1

Actuator bumped
0.5
0
0

200

400

600
TIME (S EC)

800

1000

Impulse estimate still noisy: impulse(t) = step(t)-step(t-1)


IMP ULS E RES P ONS E OF P AP ER WEIGHT
0.3
0.2
0.1
0
0

EE392m - Winter 2003

100

Control Engineering

200

300
400
TIME (S EC)

500

600

8-5

Noise reduction
Noise can be reduced by statistical averaging:
Collect data for mutiple steps and do more averaging to
estimate the step/pulse response
Use a parametric model of the system and estimate a few
model parameters describing the response: dead time, rise
time, gain
Do both in a sequence
done in real process control ID packages

Pre-filter data

EE392m - Winter 2003

Control Engineering

8-6

Linear regression
Mathematical aside
linear regression is one of the main System ID tools
Data

Regression weights

Regressor

y (t ) = j j (t ) + e(t )

Error

y = + e

j =1

y (1)
1 (1) K K (1)
1
e(1)
O
M , = M , e = M
y = M , = M

y ( N )
1 ( N ) K K ( N )
K
e( N )

EE392m - Winter 2003

Control Engineering

8-7

Linear regression
Makes sense only when matrix is
tall, N > K, more data available than
the number of unknown parameters.
Statistical averaging

Least square solution:

||e||2

min

y = + e

= ( T ) T y
1

Matlab pinv or left matrix division \

Correlation interpretation:
N
N 2

K K (t )1 (t )
1 (t )
t =1
1 t =1

,
M
O
M
R=

N
N N
2
1 (t ) K (t ) K

K (t )
t =1

t =1
EE392m - Winter 2003

Control Engineering

= R 1c
N

1 ( t ) y ( t )
1 t =1

M
c=

N N
K (t ) y (t )
t =1

8-8

Example: linear first-order model


y (t ) = ay (t 1) + gu (t 1) + e(t )

Linear regression representation


1 (t ) = y (t 1)
a
=
2 (t ) = u(t 1)
g

1 T
T

= ( ) y

This approach is considered in most of the technical


literature on identification
Lennart Ljung, System Identification: Theory for the User, 2nd Ed, 1999

Matlab Identification Toolbox


Industrial use in aerospace mostly
Not really used much in industrial process control

Main issue:
small error in a might mean large change in response
EE392m - Winter 2003

Control Engineering

8-9

Regularization
Linear regression, where T is ill-conditioned
Instead of ||e||2 min solve a regularized problem
2
2
e + r min
y = + e
r is a small regularization parameter
Regularized solution
1 T
T

= ( + rI ) y

Cut off the singular values of that are smaller than r

EE392m - Winter 2003

Control Engineering

8-10

Regularization
Analysis through SVD (singular value decomposition)
= USV T ;
V R n ,n ;U R m ,m ; S = diag{s j }nj =1
Regularized solution
n

= ( T + rI ) T y = V diag 2 j U T y
s j + r j =1

Cut off the singular values of that are smaller than r


REGULARIZED INVERS E
2
1.5

s
s 2 + 0.1

1
0.5
0

EE392m - Winter 2003

Control Engineering

8-11

Linear regression for FIR model


P RBS EXCITATION S IGNAL

Identifying impulse response by 1


0.5
applying multiple steps
0
-0.5
PRBS excitation signal
-1
FIR (impulse response) model 0
K

y ( t ) = h ( k )u ( t k ) + e( t )
k =1

10

20

30

40

PRBS =
Pseudo-Random Binary Sequence,
see IDINPUT in Matlab

Linear regression representation

1 (t ) = u(t 1)
M

K (t ) = u (t K )
EE392m - Winter 2003

h (1)
= M

h ( K )
Control Engineering

1 T
T

= ( + rI ) y

8-12

50

Example: FIR model ID


P RBS e xcita tion

PRBS excitation
input

1
0.5
0
-0.5
-1
0

200

400

600

800

1000

800

1000

S YS TEM RES P ONS E

Simulated system 1
output: 4000
0.5
samples, random 0
-0.5
noise of the
-1
amplitude 0.5
0

200

400

600
TIME

EE392m - Winter 2003

Control Engineering

8-13

Example: FIR model ID


FIR es tima te

Linear regression 0.2


estimate of the FIR0.15
0.1
model
0.05
0
-0.05

Impuls e Re s pons e

Impulse response
for the simulated
system:

0.2
0.15
0.1
0.05
0

-0.05
T=tf([1 .5],[1 1.1 1]);
0
P=c2d(T,0.25);

EE392m - Winter 2003

Time (s ec)

Control Engineering

8-14

Nonlinear parametric model ID


Prediction model depending on
the unknown parameter vector
u (t ) MODEL( ) y (t | )

Loss Index V

V = y (t ) y (t | )

Loss index

J = y (t ) y (t | )

Optimizer

Iterative numerical optimization.


Computation of V as a subroutine

y (t )
u (t )

Model including the


parameters
sim

Lennart Ljung, Identification for Control: Simple Process Models,


IEEE Conf. on Decision and Control, Las Vegas, NV, 2002
EE392m - Winter 2003

Control Engineering

8-15

Parametric ID of step response

First order process with deadtime


Most common industrial process model
Response to a control step applied at tB
g (1 e( t tB TD ) / ), for t > tB TD
y (t | ) = +
0,
for t tB TD


g
=


TD

g
TD

Example:
Paper
machine
process

EE392m - Winter 2003

Control Engineering

8-16

Gain estimation
For given , TD , the modeled step response can be
presented in the form
y (t | ) = + g y1 (t | , TD )
This is a linear regression
2

w1 = g

k =1

w2 =

y (t | ) = wk k (t )

1 (t ) = y1 (t | , TD )
2 (t ) = 1

Parameter estimate and prediction for given , TD


w ( , TD ) = ( ) T y
T

EE392m - Winter 2003

y (t | , TD ) = + g y1 (t | , TD )

Control Engineering

8-17

Rise time/dead time estimation


For given , TD , the loss index is
N

V = y (t ) y (t | , TD )

t =1

Grid , TD and find the minimum of V = V ( , TD )

EE392m - Winter 2003

Control Engineering

8-18

Examples: Step response ID


Identification results for real industrial process data
This algorithm works in an industrial tool used in 500+
industrial plants, many processes each
P roce s s pa ra me te rs : Ga in = 0.134; Tde l = 0.00; Tris e = 119.8969

1.6
1.4

Nonlinear
Regression ID

0.8
0.6

1.2
1

0.4

0.8

Linear
Regression ID
of the first-order
model

0.2
0
-0.2
-0.4

10

20

30

40

EE392m - Winter 2003

50

60

70

0.6

Nonlinear
Regression ID

0.4
0.2
0

80

-0.2
0

100
200
300
400
500
600
700
time in s e c.; MD re s pons e - s olid; e s tima te d re s pons e - da s he d

Control Engineering

8-19

800

Linear filtering
A trick that helps: pre-filter data
Consider data model
y = h *u + e

L is a linear filtering operator, usually LPF


Ly = L( h * u ) + {
Le
{
e
yf

L( h * u ) = ( Lh ) * u = h * ( Lu )

Can estimate h from filtered y and filtered u


Or can estimate filtered h from filtered y and raw u
Pre-filter bandwidth will limit the estimation bandwidth
EE392m - Winter 2003

Control Engineering

8-20

Multivariable ID
Apply SISO ID to various input/output pairs
Need n tests - excite each input in turn
Step/pulse response identification is a key part of the
industrial Multivariable Predictive Control packages.

EE392m - Winter 2003

Control Engineering

8-21

Вам также может понравиться