EE392m - Winter 2003 Control Engineering 8-1
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-2
What is System Identification?
• White-box identification– estimate parameters of a physical model from data– Example: aircraft flight model
• Gray-box identification– 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
Data Identification ModelExperiment
Plant
Rar
ely
used
inre
al-li
fe c
ontro
l
EE392m - Winter 2003 Control Engineering 8-3
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-4
Impulse response identification
• Simplest approach: apply control impulse and collect thedata
• Difficult to apply a short impulse big enough such that theresponse is much larger than the noise
0 1 2 3 4 5 6 70
0.2
0.4
0.6
0.8
1IMPULSE RESPONSE
TIME
0 1 2 3 4 5 6 7-0.5
0
0.5
1NOISY IMP ULSE RESPONSE
TIME• Can be used for building simplifiedcontrol design models from complex sims
EE392m - Winter 2003 Control Engineering 8-5
Step response identification
• Step (bump) control input and collect the data– used in process control
• Impulse estimate still noisy: impulse(t) = step(t)-step(t-1)0 200 400 600 800 1000
0
0.5
1
1.5STEP RESPONSE OF PAPER WEIGHT
TIME (SEC)
0 100 200 300 400 500 600
0
0.1
0.2
0.3
IMPULSE RESPONSE OF PAPER WEIGHT
TIME (SEC)
Actuator bumped
EE392m - Winter 2003 Control Engineering 8-6
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, risetime, gain
• Do both in a sequence– done in real process control ID packages
• Pre-filter data
EE392m - Winter 2003 Control Engineering 8-7
Linear regression
• Mathematical aside– linear regression is one of the main System ID tools
)()()(1
tetty j
N
jj +=∑
=
ϕθ
Data Regression weights Regressor Error
ey +Φ= θ
=
=
=Φ
=
)(
)1(,,
)()(
)1()1(,
)(
)1( 1
1
1
Ne
ee
NNNy
yy
KK
K
MM
K
MOM
K
M
θ
θθ
ϕϕ
ϕϕ
EE392m - Winter 2003 Control Engineering 8-8
Linear regression
• Makes sense only when matrix Φ istall, N > K, more data available thanthe number of unknown parameters.– Statistical averaging
• Least square solution: ||e||2 → min– Matlab pinv or left matrix division \
• Correlation interpretation:
( ) yTT ΦΦΦ= −1θ̂
ey +Φ= θ
=
=
∑
∑
∑∑
∑∑
=
=
==
==
N
tK
N
t
N
tK
N
tK
N
tK
N
t
tyt
tyt
Nc
ttt
ttt
NR
1
11
1
2
11
11
1
2
)()(
)()(1,
)()()(
)()()(1
1
ϕ
ϕ
ϕϕϕ
ϕϕϕ
M
K
MOM
K
cR 1ˆ −=θ
EE392m - Winter 2003 Control Engineering 8-9
Example: linear first-order model
• Linear regression representation
)()1()1()( tetgutayty +−+−=
=−=−=
ga
tuttyt
θϕϕ
)1()()1()(
2
1
• This approach is considered in most of the technicalliterature on identification
• 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
Lennart Ljung, System Identification: Theory for the User, 2nd Ed, 1999
( ) yTT ΦΦΦ= −1θ̂
EE392m - Winter 2003 Control Engineering 8-10
Regularization
• Linear regression, where is ill-conditioned• Instead of ||e||2 → min solve a regularized problem
r is a small regularization parameter• Regularized solution
• Cut off the singular values of Φ that are smaller than r
ey +Φ= θ
ΦΦT
min22 →+ θre
( ) yrI TT Φ+ΦΦ= −1θ̂
EE392m - Winter 2003 Control Engineering 8-11
Regularization• Analysis through SVD (singular value decomposition)
• Regularized solution
• Cut off the singular values of Φ that are smaller than r
njj
mmnnT sSRURVUSV 1,, }diag{;;; ==∈∈=Φ
( ) yUrs
sVyrI T
n
jj
jTT
+=Φ+ΦΦ=
=
−
12
1 diagθ̂
0 1 2 3 4 50
0.5
1
1.5
2
s
REGULARIZED INVERSE
1.02 +ss
EE392m - Winter 2003 Control Engineering 8-12
Linear regression for FIR model
• Linear regression representation
)()()()(1
tektukhtyK
k+−=∑
=
=
−=
−=
)(
)1(
)()(
)1()(1
Kh
h
Ktut
tut
K
MM θϕ
ϕ( ) yrI TT Φ+ΦΦ= −1θ̂
• Identifying impulse response byapplying multiple steps
• PRBS excitation signal• FIR (impulse response) model 0 10 20 30 40 50
-1
-0.5
0
0.5
1PRBS EXCITATION SIGNAL
PRBS =Pseudo-Random Binary Sequence,see IDINPUT in Matlab
EE392m - Winter 2003 Control Engineering 8-13
Example: FIR model ID
• PRBS excitationinput
• Simulated systemoutput: 4000samples, randomnoise of theamplitude 0.5
0 200 400 600 800 1000-1
-0.5
0
0.5
1PRBS excita tion
0 200 400 600 800 1000
-1
-0.5
0
0.5
1
SYSTEM RESPONSE
TIME
EE392m - Winter 2003 Control Engineering 8-14
Example: FIR model ID
• Linear regressionestimate of the FIRmodel
• Impulse responsefor the simulatedsystem:
T=tf([1 .5],[1 1.1 1]);
P=c2d(T,0.25);
0 1 2 3 4 5 6 7-0.05
0
0.05
0.1
0.15
0.2
FIR es tima te
Impuls e Res pons e
Time (s ec)0 1 2 3 4 5 6 7
-0.05
0
0.05
0.1
0.15
0.2
EE392m - Winter 2003 Control Engineering 8-15
Nonlinear parametric model ID
• Prediction model depending onthe unknown parameter vector
• Loss index
• Iterative numerical optimization.Computation of V as a subroutine sim
Model including theparameters
Optimizerθ Loss Index V
)(tu
∑ −= 2)|(ˆ)( θtytyV
θ
∑ −= 2)|(ˆ)( θtytyJ
)|(ˆ)MODEL()( θθ tytu →→
)(tyθ
Lennart Ljung, “Identification for Control: Simple Process Models,”IEEE Conf. on Decision and Control, Las Vegas, NV, 2002
EE392m - Winter 2003 Control Engineering 8-16
Parametric ID of step response• First order process with deadtime• Most common industrial process model• Response to a control step applied at tB
Example:
( )
−≤−>−
+=−−
DB
DBTtt
TttTtteg
tyDB
for ,0for ,1
)|(/)( τ
γθ
Papermachineprocess
DT
τ
g
=
DT
gτ
γ
θ
EE392m - Winter 2003 Control Engineering 8-17
Gain estimation
• For given , the modeled step response can bepresented in the form
• This is a linear regression
• Parameter estimate and prediction for given
),|()|( 1 DTtygty τγθ ⋅+=
∑=
=2
1
)()|(k
kk twty ϕθ
DT,τ
( ) yTw TTD ΦΦΦ= −1),(ˆ τ ),|(ˆˆ),|(ˆ 1 DD TtygTty τγτ ⋅+=
1)(),|()(
2
11
2
1
==
==
tTtyt
wgw D
ϕτϕ
γ
DT,τ
EE392m - Winter 2003 Control Engineering 8-18
Rise time/dead time estimation
• For given , the loss index is
• Grid and find the minimum of
DT,τ
∑=
−=N
tDTtytyV
1
2),|(ˆ)( τ
),( DTVV τ=DT,τ
EE392m - Winter 2003 Control Engineering 8-19
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
0 10 20 30 40 50 60 70 80-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
0 100 200 300 400 500 600 700 800-0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6Proce s s pa ra me te rs : Ga in = 0.134; Tde l = 0.00; Tris e = 119.8969
time in s ec.; MD res pons e - solid; e s tima te d re spons e - da s hed
Linear Regression ID
of the first-ordermodel
Nonlinear Regression ID
Nonlinear Regression ID
EE392m - Winter 2003 Control Engineering 8-20
Linear filtering
• L is a linear filtering operator, usually LPF
• A trick that helps: pre-filter data• Consider data model
euhy += *
{ {
)(**)()*(
)*(
LuhuLhuhL
LeuhLLyff
ey
==
+=
• 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-21
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 theindustrial Multivariable Predictive Control packages.