Mars Adaptive Control

download Mars Adaptive Control

of 19

Transcript of Mars Adaptive Control

  • 7/30/2019 Mars Adaptive Control

    1/19

    :-

    s stems MRAS MRAC

    Lectures, Spring 2012

    -Systems

    Model

    my

    myye Bring

    Adjustment

    mechanism

    Controller parameters to zero!

    Controller Plant

    cuyu

    Historical MRAS= Model Reference Adaptive SystemFormulated in continuous time, deterministic servo problem

    - ...

    The desi n of the ada tation mechanism differs

    considerably from that of the STRs.

    - the MIT rule

    - use of L a unov stabilit theor

    - use of input/output analysis of systems, small-gain

    theorem, passivity theory, positive real functions,

    Kalman-Yakubovich lemma etc.

    - ...

    Let ebe the error between the system and model outputs.

    1

    Set the cost criterion

    where is the parameter vector of the

    2e controller, which must be adjusted.

    To make Jsmall, it is (heuristically) reasonable to changethe parameters in the direction of negative gradient ofJ.

  • 7/30/2019 Mars Adaptive Control

    2/19

    - ...

    ee

    dt

    eThis is the MIT rule. The term is crucial. It is called

    the sensitivity derivative. It is assumed that the parameters

    c ange more s ow y an e o er var a es n e sys em.

    Then the sensitivity derivative can be calculated assuming

    as constant.

    - ...

    There are other alternatives forJ e. .

    eJ )(

    which ives

    0,1 e

    ee

    dtsign

    0,0sign eeDef.

    ,

    - ...

    Exam le: Ada tation of a feedforward ain

    )(skG

    Process: where kis an unknown parameter

    Underlying design problem: find a feedforward coontroller

    which gives the system

    )()( 0 sGksGm 0kwhere is a given parameter.

    cuu With the controller the system output becomes )(skG

    which gives the correct)(sGm if

    /0

    - ...

    uGkukGe

    Then calculate the sensitivity derivative

    mc yk

    kupkG

    e)(

    and apply the MIT rule

    eyeykd

    mm

    ' 0, kk are constantst

    0

  • 7/30/2019 Mars Adaptive Control

    3/19

    - ...

    Model

    )(0

    sGk

    m

    s

    -

    e

    Process

    )(skG

    ycu u

    can be regarded as a tuning parameter. Increasingits value leads eventually to oscillations, even instability.

    1( )

    1

    G s

    s

    ucsinusoidal with angular frequency 1 rad/s

    01, 2k k

    - ...

    is a time-variable

    cupGupG )())((

    parameter, so that e.g.

    Example: MRAS for a first-order system

    buay

    dt

    dy

    b

    tytutu

    m

    c

    0

    11

    21

    cmmm

    m ubyady

    aam 022

    - ...

    It follows that

    cubap

    y2

    1

    myye Form the sensitivity derivatives of

    u

    bap

    bec

    21

    y

    bap

    bu

    bap

    bec

    2

    2

    2

    1

    2

    2

  • 7/30/2019 Mars Adaptive Control

    4/19

    - ...

    But the arameters aand bare not known. Assume thatthey change slowly enough, so that the parameters can

    be assumed constant in the derivation of the adaptation law.

    mapbap 2

    The above approximation is reasonable, if the parameter

    .

    the adaptation laws

    - ...

    eua

    a

    dt

    dc

    m

    1w ere certa n constant va ues

    have been included in .

    ad m2

    be known.

    apdt m

    The layout of the controlled system is on the following page.

    Note that the uc and y signals must be filtered first,

    .

    - e)(sGm

    my

    ++

    -

    yucu

    )(sG

    1

    2

    s

    s

    ma ma

    m m

    Simulation results: 1, 0.5, 2, 1m ma b a b

    Correct values0 0

    1 24, 2

  • 7/30/2019 Mars Adaptive Control

    5/19

    2 1/a b

    line

    Simulation over 500 time units. The parameer values

    The parameters do not necessarily have to adapt to their

    correct values. The errorecan still become zero. Consider

    again the example of the adaptation of feedforward gain. s

    The s stem e uations: ukuuku ,,

    The error:cc ukukke )()(

    0

    0 where kk /00

    MIT rule gives: 022

    cuk

    d

    Ik2

    00 w c as e so u on e

    wheret

    2

    ct

    0

    The estimate converges to the correct value only ifItdiverges as tapproaches infinity. This means that the

    c .

    tIketkute2

    00

    c

    which will always approach zero, because either the integral

    diverges or the input signal approaches zero.

    rate and stability. The amplitudes of system signals, e.g. the

    reference values can have a considerable effect of the possible

    values of the gain.

    ed

    edt ,

    as a gradient method for minimizing the error. To overcome

    the difficulties related to signal amplitudes in the determining

    , ere ex mo ca ons o e ru e, e.g.

    ed

    Tdt

    .

  • 7/30/2019 Mars Adaptive Control

    6/19

    ons er e au onomous eren a sys em

    dx, x

    dt

    which is assumed to have a unique solution through a

    given initial point. The function fcan be nonlinear, buts no me-vary ng. or me-var a e sys ems we

    would write f= f(x,t).)

    Stability definition: The solution x(t) = 0 is called stable,s a e n e sense o yapunov

    if for any given > 0 there exists a number > 0 such that

    )()0( txx

    The solution is unstable, if it is not stable. The solution is,

    stable and

    tx as

    If the system is asymptotically stable and convergent

    0)( tx( ) for all initial values, it is then globally

    asymp o ca y s a e orasymp o ca y s a e n e arge.The definition of stability is defined for the null solution,

    not the system itsel . Equivalently, it can be de ined in

    terms of an equilibrium point xe, where f(xe) = 0.

    non near system can ave many equ r um po nts. e

    equations can always be scaled such that a particular equi-

    .

    asymptotically stable, it can only have one equilibrium point.

    Forlinears stems the above definitions can be sim lifiedconsiderably:

    e equ r um s s a e, ere ex s a cons an suc a

    0,)( 0 txtx where )0(xx

    It is asymptotically stable, if it is stable and

    0)( tx as tapproaches infinity.

    Note that for linear systems stability is always global.

  • 7/30/2019 Mars Adaptive Control

    7/19

    Another in ut stabilit conce t is the in ut-out ut stabilit(BIBO stability, bounded input-bounded output).

    ,

    gives a bounded output signal.

    n asymp o ca y s a e sys em s a ways s a e.

    A BIBO system is asymptotically stable, if the system is

    both reachable and observable. For example, i there are

    unobservable modes, these might be unstable, but this does

    .

    The second method of L a unov direct method:

    System: 0)0()),(()( ftxftx

    If a (scalar-valued) Lyapunov function V(x) is found such that

    . , xx

    2. 0)0( V

    3. Vis continuously differentiable with respect to all xi

    VV. 0))(()()(

    txx

    txx

    tV

    then the s stem is stable at the ori in or the null solution

    is stable).

    .4: The time derivative ofV(calculated along the systemtra ector must be ne ative semidefinite.

    If (in 4) 0)( tV (negative definite)

    then the system is asymptotically stable at the origin.

    If, additionall , )(xV when x then the system

    is globally asymptotically stable.

    The solution is unstable if there exists a ositive definiteV(x), such that its time derivative is positive definite.

    the energy of a system, which must decrease in order the

    solution to conver e to a stable e uilibrium oint.

    To find a Lyapunov function is generally very difficult. If a

    ,

    regarding stability. The equilibrium point can then be stable

    or unstable.

  • 7/30/2019 Mars Adaptive Control

    8/19

    211 4 xxx

    212 22 xxx

    The origin xe= 0 is the equilibrium point. Consider theossible L a unov function 22 21

    1. V(x) > 0, for all xnot equal to zero. Ok!. .

    3. Ok!

    4. next a e

    22

    22)()(21

    21

    21

    xx

    xxtx

    x

    xV

    4428

    222

    2

    22121

    2

    1 xxxxxx

    2121 xxxx

    Ok!Moreover, xV as x

    The system is globally asymptotically stable. That could

    ,which have negative real parts.

    Exam le: )()( 12

    2

    2

    1121 xfxxxxx

    )()( 22

    2

    2

    1212 xfxxxxx

    The system is nonlinear. Investigate the stability of theorigin, which is clearly an equilibrium point. Try

    2

    2

    2

    1)( xxxV as a candidate for a Lyapunov function.

    ear y , an are sa s e . or , ca cu a e

    )(2221

    xfV

    )(

    212211

    2

    21

    xfx

    .

    The system is also globally asymptotically stable, which

    implies that the origin is the only equilibrium point.

    Note that if the time derivative weree.g.

    0)()( 2212

    2 xxxxV (negative semidefinite)

    wou on y mp y s a y e er va ve s zero a ways

    when

    21 xx

  • 7/30/2019 Mars Adaptive Control

    9/19

    T ical e uilibrium curves and s stem tra ector in the

    phase plane2x

    321VVV

    s stem tra ector

    1x

    1V

    2V

    3V

    Exam le: Consider a linear s stem

    0)0(),()( xxtAxtx

    where A is a constant matrix. Investigate the quadratic form

    PxxxV )( , where Pis a symmetric positive definite

    matrix , as a candidate for a Lyapunov function.

    Recall that a square matrix Pis positive definite, if the

    xx s pos ve or a nonzero vec ors x.

    T

    AxPPxxV

    tV TT

    AxPxPAxxx

    TTT

    AxPxxPAx TTTTT

    xPAPAx

    xxxx

    TT if QPAPAT

    0 QxxT and Qis positive definite.

    In the calculation the fact that Pis symmetric, was used.Also, note that a scalar can be transposed without changing

    .

    Note that Qis symmetric.

  • 7/30/2019 Mars Adaptive Control

    10/19

    - .. .

    Lyapunov theory for nonlinear time-varying systems:

    or e sys ems , txtx

    the equilibrium pointsare defined by

    *

    0,,x

    -

    txtAtx has a unique equilibrium point at theorigin,0, provided that is non-singular.

    Definition: The equilibrium point 0 is stableat t0, if for anyR> 0 there exists a ositive scalarr R t such that

    , ttRtxrtx

    .

    can be chosen independent oft0, the equilibrium point isuniformly stable.

    Definition: The equilibrium point is uniformly

    uniformly to the equilibrium point.

    ,

    but the converse is not generally true.

    Example: The system xx

    has the solution )(1

    )( 00 tx

    ttx

    which converges asymptotically to the origin. The

    , 0

    longer time to get close to the origin.

    - ,

    definite ifV(0,t) = 0 and there exists a time-invariant positivedefinite function V0(x) such that

    )(),( 0 xVtxV

    Naturally, V(x,t) is negative definite, if - V(x,t) is positivedefinite; V(x,t) is positive semi-definite, if it dominates apositive semi-definite function etc.

  • 7/30/2019 Mars Adaptive Control

    11/19

    e n t on: sca ar unc on x, s ecrescen V(0,t) = 0, and if there exists a time-invariant positive

    1

    , 1

    xamp e: e unc on21)(sin1),( xxttxV

    is ositive definite, because it dominates the function

    22

    )( xxxV It is also decrescent, because it is dominatedby 22211 2)( xxxV

    ven a me-vary ng sca ar unc on x, , s er va vealong a system trajectory is

    ),( txfx

    V

    t

    V

    dt

    dV

    Stability: If in a region around the equilibrium point thereexists a scalar function V(x,t) with continuous partialderivatives such that 1. Vis positive definite, 2. dV/dtis

    v - , u u .

    , , . ,

    stable. If, (in 2), dV/dtis negative definite, then thee uilibrium is uniforml as m toticall stable.

    If,additionally, the stability region is the whole state-space

    and Vis radially unbounded,then the equilibrium isglobally uniformly asymptotically stable.

    Example: Consider the system

    )()()( 22

    11 txetxtxt

    212

    and examine the stability of the equilibrium point (0,0).

    Choose the Lyapunov function candidate

    22221 1),( xextxV t

    This function is positive definite, because it dominates thetime-invariant positive definite function

    2

    2

    2

    1 xx It is also decrescent, because it is dominated bythe time-invariant positive definite function

    2

    2

    2

    1 2xx

  • 7/30/2019 Mars Adaptive Control

    12/19

    Furthermore texxxxtxV22

    221

    2

    1 212),(

    and212122112),( xxxxxxxxtxV

    w c s nega ve e n e. ere ore e or g n s

    globally asymptotically stable.

    Usually it is easier to prove a derivative to be negative

    semi-definite not ne ative definite which would be neededfor asymptotic stability.

    A special theorem called Barbalats lemma, helps. First,note the following:

    1. 0f does not imply that fconverges as tapproaches.

    ))(log(sin)( ttf tt

    tf as,0

    ))(log(cos

    )(

    t

    2. converges does not imply that 0f

    2tttends to zero, but its derivative is

    s n ee unbounded.

    3. Iffis lower bounded and decreasin 0

    converges to a limit. (But nothing can be said about

    .

    Question: Given that a function tends to a finite limit, what

    actually converges to zero? Barbalats lemma indicates that

    the derivative itself should have some smoothness.

    finite limit, as tapproaches infinity, and if df/dtisuniformly continuous, then

    ttf as0)(

    The term uniforml is crucial here. A sufficient condition

    for a function to be uniformly continuous is that itsderivative is bounded. This can be seen from the finite

    difference theorem: Let gbe a differentiable function. Forall tand t1 there exists a t2 (between the two other points)

    ))(()()( 121 tttgtgtg

    If dg/dtis bounded, the uniformity condition can beestablished.

  • 7/30/2019 Mars Adaptive Control

    13/19

    s mp e coro ary o e emma: e eren a e

    function f(t) has a finite limit as tapproaches infinity, and,

    ttf as0)(

    A Lyapunov-Like lemma: If 1. V(x,t) is lower bounded,. x, s nega ve sem - e n e, . x, s

    uniformly continuous is time, then ttxV as0),(

    The theoretical results can now be used to establish adaptive

    w u y y.

    Design of MRAS using Lyapunov theory:

    x :

    Process and the desired res onse are

    buady

    0m aubady

    dt

    dt

    c 21

    Introduce the error myye

    orm t e er vat ve o t e error

    decmmm uyaaeadt

    12

    The error goes to zero, if the parameters are in the correct

    values. Tr to find an ad ustment mechanism that will

    drive the parameters to these values.

    Assume that b > 0 and try the candidate for a Lyapunovfunction

    212

    2

    2

    21

    111),,( mm bbaabeeV

    The function is zero when eis zero and the controllerparameters are in their correct values. Calculate the

  • 7/30/2019 Mars Adaptive Control

    14/19

    dt

    bbdt

    aabdt

    ee

    dtmm

    11

    22

    ye

    dt

    daabea mm

    22

    2 1

    eudt

    dbb cm

    11

    1

    Update the parameters as

    221 , eadV

    yed

    eud

    mc

    u e er va ve o s nega ve sem - e n e, no

    negative definite. Thus )0()( VtV and thus the variables

    21,, e are bounded. Then y= e+ ymis also bounded.

    deVd2

    cmmmmm uyaaeaeadt

    eadt

    122

    which is bounded, because yeuc and, are bounded.

    .lemma, the error will go to zero.

    But note that the parameters do not necessarily converge

    to their correct values; we know onl that the are

    bounded. But in spite of that the adaptation works.

    The fact that an adaptive control law can work perfectly,although the parameters do not converge to their true

    va ues, s a p enomenon w c we ave seen e ore.

    ot ce t e s m ar ty etween t e resu ts y us ng t e

    rule and the Lyapunov-based method. Both have a similar

    ed

    T ac yu c

    m

    m yuap

    (Lyapunov) (MIT)

  • 7/30/2019 Mars Adaptive Control

    15/19

    ea za on:

    +

    -

    +

    e

    yucu

    )(sGm

    m

    -

    )(sG

    1

    s

    s

    2

    Lyapunov

    0.5 / ( 1)G s s

    2 / ( 2)mG s s

    a=1, b= 0.5, am= bm= 2

    1

    LTI case (discussed earlier also): Consider the homogenous

    linear time-invariant system

    0)0(, xxAxdt

    dx

    which is known to be asymptotically stable. Consider the

    possibility for using PxxxV T)( as a Lyapunov function,

    where Pis a symmetric positive definite matrix.

    a cu a e e me er va ve a ong e so u on a o er

    conditions are trivially fulfilled).

    VdV

    xxxxxxx

    xdtTTTTT

    xPAPAxPAxxPxAx TTTTT

    0 QxxxQx TT

    in which Qis a positive definite matrix. Hence, if thereexist positive definite matrices Qand P, which satisty theyapunov equa on

    T

  • 7/30/2019 Mars Adaptive Control

    16/19

    then Vis a L a unov function and the ori inal s stem isasymptotically stable (even globally).

    Note that Qis necessarily symmetric, because Pwas

    assumed to be symmetric.

    In fact,we can go a bit further. The following can be

    roved: IfA is as m toticall stable, then foreachsymmetric positive definite matrix Qthere exists aunique symmetric positive definite matrix Pthat satisfies

    e yapunov equa on.

    It follows that if we choose any symmetric pos. def. matrixQand from Lyapunov equation we get a solution P, which

    . ., .

    We could try e.g. Q= I.

    State-space models: Adaptation of the feedforward gain

    Consider again the same example discussed in the beginning

    of MRAC theory. The plant has the transfer function kG(s),where G(s) is known but kunknown. The desired response

    0

    .

    0 cc

    0 If a realization ofkG is given by the triplet0 (A,B,C) then

    uBAxdt

    xc

    0

    Cxe

    is the realization,which generates the error function. Assume

    that the hono enous s stem Axx is as m toticall stable.

    Then there exist positive definite matrices Pand Qsuch that

    QPAPAT

  • 7/30/2019 Mars Adaptive Control

    17/19

    Choose the candidate for a Lyapunov function

    21

    2 PxxV no e a s a sca ar n s case

    The time derivative ofValong the solution becomes

    xPPxdt

    TT 0)(2

    uBAxPPx cTT 00)(

    2

    uBPxAxPxuPBxPAxx cTTTTcTT 000

    2

    PxBuxAPPAx TcTTT 002)(2

    PxBudt

    dQxx

    T

    c

    T

    0

    2

    dPxBu

    dtc

    so that the derivative ofVis negative definite. The statevector and the errorewill go to zero as tapproachesinfinity. However, the parameter error

    0 will not

    necessarily converge.

    Drawback: in order to im lement the ada tation law, the

    states have to be measurable.

    But ifPcan be chosen such that

    TT exx

    d

    dtc

  • 7/30/2019 Mars Adaptive Control

    18/19

    ,

    if

    s s s r c y pos ve rea ,

    such that sG is PR.

    Im s G(s)Im

    e e

    Example:1

    1)(

    ssG is SPR,

    ssG

    1)(

    is PR, but notSPR

    Im s G(s)Im

    Re Re

    1

    1s

    Nyquist curve in the RHP!

    Im G(s) G(s)Im

    Re Re

    1

    1.0

    1

    ss

    1

    By using any small the curve will move into the LHP.

    The question on the realizability of the adaptation law

    is given by the Kalman-Yakubovich lemma:

    Lemma: Let the time-invariant system

    BuAxdx

    Cxy

    .

    Then the transfer function BAsICsG 1)()(

    ,

  • 7/30/2019 Mars Adaptive Control

    19/19

    Pand Qsuch that

    QPAPA

    and CPBT

    In the adaptive feedforward gain problem, ifGis SPR,then the parameter adjustment rule

    eu

    d

    makes the output errorego to zero.t

    k0G(s)

    uc

    ym

    - e

    Process

    kG(s)y +

    s

    k0G(s)

    ym

    - e

    Model

    u

    kG(s)y +

    sProcess

    c