Lecture8 ID

Embed Size (px)

Citation preview

  • 8/12/2019 Lecture8 ID

    1/21

    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

  • 8/12/2019 Lecture8 ID

    2/21

    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

    Rarelyusedin

    real-lifecontr

    ol

  • 8/12/2019 Lecture8 ID

    3/21

    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

  • 8/12/2019 Lecture8 ID

    4/21

    EE392m - Winter 2003 Control Engineering 8-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 7

    0

    0.2

    0.4

    0.6

    0.8

    1IMPULSE RESPONSE

    TIME

    0 1 2 3 4 5 6 70. 5

    0

    0. 5

    1NOISY IMPULSE RESPONSE

    TIME Can be used for building simplified

    control design models from complex sims

  • 8/12/2019 Lecture8 ID

    5/21

    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 P APER 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

  • 8/12/2019 Lecture8 ID

    6/21

    EE392m - Winter 2003 Control Engineering 8-6

    Noise reductionNoise can be reduced by statistical averaging:

    Collect data for mutiple steps and do more averaging toestimate 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

  • 8/12/2019 Lecture8 ID

    7/21

    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

    j

    j +=!=

    Data Regression weights Regressor Error

    ey +=

    ""

    "

    #

    $

    %%

    %

    &

    '

    =

    ""

    "

    #

    $

    %%

    %

    &

    '

    =

    ""

    "

    #

    $

    %%

    %

    &

    '

    =

    ""

    "

    #

    $

    %%

    %

    &

    '

    =

    )(

    )1(

    ,,

    )()(

    )1()1(

    ,

    )(

    )1( 1

    1

    1

    Ne

    e

    e

    NNNy

    y

    y

    KK

    K

    !!

    "

    !#!

    "

    !

  • 8/12/2019 Lecture8 ID

    8/21

    EE392m - Winter 2003 Control Engineering 8-8

    Linear regression Makes sense only when matrix is

    tall, N >K, more data available thanthe number of unknown parameters.

    Statistical averaging

    Least square solution: ||e||2min

    Matlab pinv or left matrix division \

    Correlation interpretation:

    ( ) yTT = 1

    ey +=

    """""

    #

    $

    %%%%%

    &

    '

    =

    """""

    #

    $

    %%%%%

    &

    '

    =

    !

    !

    !!

    !!

    =

    =

    ==

    ==

    N

    t

    K

    N

    t

    N

    t

    K

    N

    t

    K

    N

    t

    K

    N

    t

    tyt

    tyt

    Nc

    ttt

    ttt

    NR

    1

    1

    1

    1

    2

    1

    1

    1

    1

    1

    2

    )()(

    )()(

    1,

    )()()(

    )()()(

    11

    !

    "

    !#!

    "

    cR 1 =

  • 8/12/2019 Lecture8 ID

    9/21

    EE392m - Winter 2003 Control Engineering 8-9

    Example: linear first-order model

    Linear regression representation

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

    "#

    $%&

    '=

    =

    =

    g

    a

    tut

    tyt

    )1()(

    )1()(

    2

    1

    This approach is considered in most of the technical

    literature 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

  • 8/12/2019 Lecture8 ID

    10/21

    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

  • 8/12/2019 Lecture8 ID

    11/21

    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

    n

    jj

    mmnnTsSRURVUSV 1

    ,, }diag{;;;=

    ==

    ( ) yUrs

    sVyrI T

    n

    jj

    jTT

    ""

    #

    $

    %%

    &

    '

    ()

    (*+

    (,

    (-.

    +=+=

    =

    1

    2

    1diag

    0 1 2 3 4 50

    0.5

    1

    1.5

    2

    s

    REGULARIZED INVERSE

    1.02 +ss

  • 8/12/2019 Lecture8 ID

    12/21

    EE392m - Winter 2003 Control Engineering 8-12

    Linear regression for FIR model

    Linear regression representation

    )()()()( 1 tektukhty

    K

    k

    +=

    !=

    """

    #

    $

    %%%

    &

    '

    =

    =

    =

    )(

    )1(

    )()(

    )1()(1

    Kh

    h

    Ktut

    tut

    K

    !!

    ( ) 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

    1

    PRBS EXCITATION SIGNAL

    PRBS =

    Pseudo-Random Binary Sequence,see IDINPUTin Matlab

  • 8/12/2019 Lecture8 ID

    13/21

    EE392m - Winter 2003 Control Engineering 8-13

    Example: FIR model ID PRBS excitation

    input

    Simulated system

    output: 4000

    samples, random

    noise of theamplitude 0.5

    0 200 400 600 800 1000

    -1

    -0.5

    0

    0.5

    1

    PRBS excitation

    0 200 400 600 800 1000

    -1

    -0.5

    0

    0.5

    1

    SYSTEM RESPONSE

    TIME

  • 8/12/2019 Lecture8 ID

    14/21

    EE392m - Winter 2003 Control Engineering 8-14

    Example: FIR model ID

    Linear regression

    estimate of the FIR

    model

    Impulse response

    for the simulated

    system: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 timate

    Impulse Res pons e

    Time (sec)

    0 1 2 3 4 5 6 7-0.05

    0

    0.05

    0.1

    0.15

    0.2

  • 8/12/2019 Lecture8 ID

    15/21

    EE392m - Winter 2003 Control Engineering 8-15

    Nonlinear parametric model ID Prediction model depending on

    the unknown parameter vector

    Loss index

    Iterative numerical optimization.

    Computation of Vas a subroutine sim

    Model including the

    parameters

    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

  • 8/12/2019 Lecture8 ID

    16/21

    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

    DB

    Ttt

    Ttt

    Tttegty

    DB

    for,0

    for,1)|(

    /)(

    Papermachine

    process

    DT

    g

    """

    "

    #

    $

    %%%

    %

    &

    '

    =

    DT

    g

  • 8/12/2019 Lecture8 ID

    17/21

    EE392m - Winter 2003 Control Engineering 8-17

    Gain estimation For given , the modeled step response can be

    presented 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,

  • 8/12/2019 Lecture8 ID

    18/21

  • 8/12/2019 Lecture8 ID

    19/21

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

    time in se c.; MD res ponse - solid; es timated res ponse - das hed

    Linear

    Regression ID

    of the first-ordermodel

    Nonlinear

    Regression ID

    Nonlinear

    Regression ID

  • 8/12/2019 Lecture8 ID

    20/21

    EE392m - Winter 2003 Control Engineering 8-20

    Linear filtering

    Lis a linear filtering operator, usually LPF

    A trick that helps: pre-filter data

    Consider data model

    euhy += *

    $$

    )(**)()*(

    )*(

    LuhuLhuhL

    LeuhLLyf

    fey

    ==

    +=

    Can estimate hfrom filteredyand filtered u

    Or can estimate filtered h from filteredyand raw u

    Pre-filter bandwidth will limit the estimation bandwidth

  • 8/12/2019 Lecture8 ID

    21/21

    EE392m - Winter 2003 Control Engineering 8-21

    Multivariable ID Apply SISO ID to various input/output pairs

    Need ntests - excite each input in turn

    Step/pulse response identification is a key part of the

    industrial Multivariable Predictive Control packages.