Top Banner
EE392m - Spring 2005 Gorinevsky Control Engineering 10-1 Lecture 10 - Model Identification What is system identification? Direct impulse response identification Linear regression Regularization Parametric model ID, nonlinear LS
23

Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

Mar 21, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-1

Lecture 10 - Model Identification

• What is system identification? • Direct impulse response identification • Linear regression• Regularization • Parametric model ID, nonlinear LS

Page 2: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-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 System Identification Model

ExperimentPlant

Rar

ely

used

in

real

-life

con

trol

Page 3: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-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

Page 4: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-4

Impulse response identification

• Simplest approach: apply control impulse and collect the data

• Difficult to apply a short impulse big enough such that the response 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 IMPULSE RESPONSE

TIME

• FIR modeling can be used for building simplified control design models from complex sims

Page 5: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-5

Step response identification

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

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

0 200 400 600 800 10000

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

Page 6: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-6

Noise reduction

Noise can be reduced by statistical averaging:• Collect data for multiple step inputs and perform 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

Page 7: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-7

Linear Regression - univariate• Simple fitting problem:

– Given model step response y (t)

– And process step response ϕ (t)

– Find the gain factor θ

)()()( tetty += θϕ

0 200 400 600 800 10000

0.5

1

1.5STEP RESPONSE OF PAPER WEIGHT

TIME (SEC)

)(tϕ

y(t)

ey +Φ= θ

,)(

)1(

⎥⎥⎥

⎢⎢⎢

⎡=

Ny

yy M

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

⎡=Φ

)(

)1(,

)(

)1(

Ne

ee

NMM

ϕ

ϕ

ΦΦΦ= T

T yθ

Solution assuming uncorrelated noise:

Page 8: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-8

Linear Regression

• Linear regression is one of the main System ID tools

)()()(1

tetty j

K

jj +=∑

=

ϕθ

DataRegression weights Regressor Error of the fit

ey +Φ= θ

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

⎡=Φ

⎥⎥⎥

⎢⎢⎢

⎡=

)(

)1(,,

)()(

)1()1(,

)(

)1( 1

1

1

Ne

ee

NNNy

yy

KK

K

MM

K

MOM

K

M

θ

θθ

ϕϕ

ϕϕ

Page 9: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-9

Linear regression - least squares• 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

( ) yTT ΦΦΦ= −1θ

( ) ( ) min→Φ−Φ−= θθ yyL T

( ) 02 =Φ−Φ−=∂∂ θθ

yL T

• Can be computed using Matlab pinv or left matrix division \

Page 10: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-10

Linear regression - least squares• Correlation interpretation of the least squares solution

( ) yTT ΦΦΦ= −1θ

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

=

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

=

∑∑

∑∑

=

=

==

==

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ˆ −=θ

Information matrix Correlation vector

ΦΦ= T

NR 1 y

Nc TΦ= 1

Page 11: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-11

Example: First-order ARMA model

• Linear regression representation

)()1()1()( tetgutayty +−+−=

⎥⎦

⎤⎢⎣

⎡=−=−=

ga

tuttyt

θϕϕ

)1()()1()(

2

1

• This (type of) approach is considered in most of the technical literature on identification

• Matlab Identification Toolbox– Limited industrial use

• Fundamental issue: – Small error in a might mean large change in the system response

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

( ) yTT ΦΦΦ= −1θ

)()()()( 2211 tettty ++= ϕθϕθ

Page 12: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-12

Regularization• Linear regression, where is ill-conditioned• Instead of ||e||2 → min solve a regularized problem

where r is a small regularization parameter• A.N.Tikhonov (1963)

– see http://solon.cma.univie.ac.at/~neum/ms/regtutorial.pdf• Regularized solution

• Cut off the singular values of Φ that are smaller than r

ey +Φ= θ

ΦΦT

min22 →+ θre

( ) yrI TT Φ+ΦΦ= −1θ

Page 13: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-13

Regularization• Analysis through SVD (singular value decomposition)

• Regularized solution

• Cut off the singular values of Φ that are smaller than r

Kjj

KNKK sSRURV 1,, }diag{;; ==∈∈

( ) yUrs

sVyrI T

K

jj

jTT

⎥⎥

⎢⎢

⎪⎭

⎪⎬⎫

⎪⎩

⎪⎨⎧

+=Φ+ΦΦ=

=

12

1 diagθ

10-2

10-1

100

101

10210

-2

10-1

100

101

102

INV

ER

SE

SINGULAR VALUE

Inverse singular values 1/s

Regularized inverse values

1.02 +ss

s

IVVUU TT ==TUSV=Φ

Page 14: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-14

Linear regression for FIR model

• Linear regression representation

)()()()(1

tektukhtyK

k

+−=∑=

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

+−−−−−

−−−=Φ

−=

−=

)(

)1(,

)1()1()(

)()2()1(,

)()(

)1()(1

Kh

h

KNtuNtuNtu

Ktututu

Ktut

tut

K

M

K

MOMM

K

M θϕ

ϕ

( ) yrI TT Φ+ΦΦ= −1θ

• Identifying impulse response by applying 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

Regularized LS solution:

Page 15: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-15

Example: FIR model ID

• PRBS excitation input

• Simulated system output: 4000 samples, random noise of the amplitude 0.5

0 200 400 600 800 1000-1

-0.5

0

0.5

1PRBS excitation

0 200 400 600 800 1000

-1

-0.5

0

0.5

1

SYSTEM RESPONSE

TIME

Page 16: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-16

Example: FIR model ID

• Linear regression estimate of the FIR model

• Impulse response for the simulated system:

0 1 2 3 4 5 6 7-0.05

0

0.05

0.1

0.15

0.2

FIR estimate

Impulse Response

Time (sec)0 1 2 3 4 5 6 7

-0.05

0

0.05

0.1

0.15

0.2

H = tf([1 .5],[1 1.1 1]); P = c2d(H,0.25);

Page 17: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-17

Nonlinear parametric model ID

• Prediction model depending on the unknown parameter vector

• Nonlinear regression: loss index

• Iterative numerical optimization. Computation of L as a subroutine sim

Model including the parameters

Optimizerθ Loss Index L

)(tu

∑ −= 2)|(ˆ)( θtytyL

θ

min)|(ˆ)( 2 →−= ∑ θtytyL

)|(ˆ)MODEL()( θθ tytu →→

)(tyθ

Lennart Ljung, “Identification for Control: Simple Process Models,”IEEE Conf. on Decision and Control, Las Vegas, NV, 2002

Page 18: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-18

Parametric SysID 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

)|(/)( τ

γθ

Paper machine process

DT

τ

g

⎥⎥⎥⎥

⎢⎢⎢⎢

=

DT

γ

θ

Page 19: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-19

Step1: Gain and Offset EstimationTwo-step approach: linear regression + nonlinear regression • For given , the modeled step response can be presented

in the form

• This is a linear regression

• Parameter estimate and prediction for given

),|(),;|( 1 DD TtygTty τγτθ ⋅+=

∑=

=2

1

)(),;|(k

kkD tTty ϕθτθ

DT,τ

( ) yT TTD ΦΦΦ== −1),(ˆˆ τθθ ),|(ˆˆ),|(ˆ 1 DD TtygTty τγτ ⋅+=

1)(),|()(

2

11

2

1

==

==

tTtytg D

ϕτϕ

γθθ

DT,τ

Page 20: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-20

Step 2: Rise Time & Dead Time Estimation

• For any given , the loss index is

• Grid and find the minimum of

DT,τ

∑=

−=N

tDTtytyL

1

2),|(ˆ)( τ

),( DTLL τ=DT,τ

Page 21: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-21

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.6Process parameters: Gain = 0.134; Tdel = 0.00; Trise = 119.8969

time in sec.; MD response - solid; estimated response - dashed

Linear Regression ID

of the first-ordermodel

Nonlinear Regression ID

Nonlinear Regression ID

Page 22: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-22

Linear Filtering in SysID

• F is a linear filtering operator, usually LPF

• A trick that helps: pre-filter data• Consider data model

euhy += *

{ {

)(**)()*(

)*(

FuhuFhuhF

FeuhFFyff

ey

==

+=

• Can estimate h from filtered y and filtered u• Or can estimate filtered h from filtered y and ‘raw’ u• Pre-filter bandwidth limits the estimation bandwidth

Plantu y

SysID

Plantu y

SysIDF

F

h

h

Page 23: Lecture 10 - Model Identification– estimate parameters of a physical model from data – Example: aircraft flight model • Gray-box identification – given generic model structure

EE392m - Spring 2005Gorinevsky

Control Engineering 10-23

Multivariable Identification

• Apply SISO ID to various input/output pairs

• Need n tests: excite each input in turn and collect all outputs at that

• Step/impulse response identification is a key part of the industrial multivariable Model Predictive Control packages