ctrgg123456.pdf

Upload: makroum

Post on 28-Feb-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 ctrgg123456.pdf

    1/39

    Control Systems Lab SC4070

    Lecture 3, February 13, 2012

    dr.ir. Alessandro Abate

    Delft Center for Systems and Control

    Delft University of Technology

    The Netherlands

    e-mail: [email protected]

    tel: 015 27 85606

    (slides modified from the original, drafted by Robert Babuska)

  • 7/25/2019 ctrgg123456.pdf

    2/39

    Lecture outline

    Overview of control design methods.

    Continuous vs. discrete time design. State-feedback control, observers.

    Control architectures, nonlinear control.

    PID controllers.

  • 7/25/2019 ctrgg123456.pdf

    3/39

    Linear control design methods

    P, PD, PI, PID, lead-lag control (classical, in frequency)

    state feedback, output feedback (modern, in state-space)

    LQR, linear quadratic control (optimal)

    model predictive control (optimal, finite-horizon, constrained)

    robust control (H, synthesis)

  • 7/25/2019 ctrgg123456.pdf

    4/39

    Nonlinear control techniques

    feedback linearization

    sliding-mode control

    nonlinear model predictive control

    passivity-based control

    knowledge-based control

    adaptive control

  • 7/25/2019 ctrgg123456.pdf

    5/39

    Computer-controlled systems: approach 1

    y(t)u(t)Algorithm

    Clock

    A-D D-A System

    Design a continuous-time controller, then make sure that the (dig-

    ital) computer implementation approximates the continuous-time

    controller as well as possible.

  • 7/25/2019 ctrgg123456.pdf

    6/39

    Computer-controlled systems: approach 2

    y(t)u(t)Algorithm

    Clock

    A-D D-A System

    Describe the system from the computers (digital) viewpoint and

    design directly a discrete-time controller.

  • 7/25/2019 ctrgg123456.pdf

    7/39

    System from the computers viewpoint

    y t( )u t( ) System

    Clock

    { ( )}y tk{ ( )}u tk A-DD-A

    Describe system (including converters) only over discrete sampling

    instants.

  • 7/25/2019 ctrgg123456.pdf

    8/39

    A-D Converter: Zero-Order Hold

    Timet t t t t t 0 1 2 3 4 5

    u(t) =u(tk), tk t

  • 7/25/2019 ctrgg123456.pdf

    9/39

    Zero-order hold sampling of systems

    Continuous-time system:

    dx(t)

    dt

    = Ax(t) +Bu(t)

    y(t) = Cx(t) +Du(t)

    Discrete-time system:

    x(k+ 1) = x(k) +u(k)y(k) = Cx(k) +Du(k)

    with (recall solution of non-autonomous ODE):

    =eAh , =

    h0

    eAsdsB, where h is the sampling period

    Reflect on eigenvalues placement

  • 7/25/2019 ctrgg123456.pdf

    10/39

    Useful basic MATLAB commands

    G = ss(A,B,C,D); % LTI continuous-time state-space model

    h = 0.1; % sampling period [s]

    H = c2d(G,h); % convert to discrete time (ZOH)

    H = c2d(G,h,method); % method = foh, matched, ...

    G = d2c(H); % convert to continuous time (ZOH)

  • 7/25/2019 ctrgg123456.pdf

    11/39

    Selection of sampling period (1st order)

    Number of samples per rise time: Nr= Tr

    h 410

    0 5

    1

    0

    1(a)

    0 50

    1

    0 5

    1

    0

    1(b)

    0 50

    1

    0 5

    1

    0

    1(c)

    0 50

    1

    0 5

    1

    0

    1(d)

    Time

    0 50

    1

    Time

    (a)Nr=1

    (b)N

    r=2

    (c)Nr=4

    (d)Nr=8

  • 7/25/2019 ctrgg123456.pdf

    12/39

    Selection of sampling period (2nd order)

    Nr= Tr

    h 410 corresponds to 0h 0.20.6

    0 50

    1

    (a)

    0 50

    1

    (b)

    0 50

    1

    (c)

    Time

    0 50

    1

    (d)

    Time

    (a)h=0.125(0h=0.23), (b)h=0.250(0h=0.46),

    (c)h=0.500(0h=0.92), (d)h=1.000(0h=1.83)

  • 7/25/2019 ctrgg123456.pdf

    13/39

    State feedback in DT: problem formulation

    Discretize LTI model choosing a sampling interval

    Model : x(k+ 1) = x(k) +u(k)

    Linear controller:

    u(k) = Lx(k)

    Design parameters: closed-loop poles

    Evaluation: compare x(k) and u(k) with specifications

    (trade-off between control magnitude and speed of response)

  • 7/25/2019 ctrgg123456.pdf

    14/39

    Poles placement: Ackermann formula

    Compute L such that (L) has a desired characteristic poly-

    nomial P(z). Ackermann formula:

    L = (0 . . . 0 1)W1c P()

    where P() is the desired characteristic polynomial in

    Place poles inside unit ball

    In Matlab:

    L = acker(Phi,Gamma,Po) (SISO, numeric problems ?)

    L = place(Phi,Gamma,Po) (MISO, more robust)

  • 7/25/2019 ctrgg123456.pdf

    15/39

    Alternatively, choice of desired poles in CT

    Use the continuous-time 2nd order model, study char. pol.:

    s

    2

    + 2s +2

    ,

    which leads to z2 +p1z +p2 with

    p1 = 2eh cosh

    12

    p2 = e2h

    Thereafter in Matlab use c2d for closed-loop model

  • 7/25/2019 ctrgg123456.pdf

    16/39

    Linear quadratic control: LQR

    J=N

    k=1

    x(k)TQx(k) + u(k)TRu(k),

    where (matrices, weights) Q, R are design parameters

    A state feedback matrix Lthat gives a minimal Jcan be found by

    solving the Riccati equation.

    Similar to pole placement, but no need to define poles!

    In Matlab: dlqr(Phi,Gamma,Q,R) % state weighting

    In Matlab: dlqry(Phi,Gamma,C,D,Q,R) % output weighting

  • 7/25/2019 ctrgg123456.pdf

    17/39

    State estimation: observers

    x(k+ 1) = x(k) +u(k)

    y(k) = Cx(k)

    Assume input and output are available, reconstruct the state:

    Direct calculation (requires differentiation)

    Luenberger observer (model-based)

    Kalman filter (optimal in presence of noise)

    Note: the terms observer, estimator, filter are in this con-

    text used synonymously

  • 7/25/2019 ctrgg123456.pdf

    18/39

    State reconstruction based on a model

    Consider the model: x(k+ 1) = x(k) +u(k)

  • 7/25/2019 ctrgg123456.pdf

    19/39

    Model-based state estimation

    Consider the model: x(k+ 1) = x(k) +u(k)

    Introduce feedback term from measured y(k)

    x(k+ 1) = x(k) +u(k) + K[y(k)Cx(k)]

  • 7/25/2019 ctrgg123456.pdf

    20/39

    State reconstruction based on a model

    Consider the model: x(k+ 1) = x(k) +u(k)

    Introduce feedback from measured y(k)

    x(k+ 1) = x(k) +u(k) + K[y(k)Cx(k)]

    Defineestimation error e=x x

    e(k+ 1) = e(k)KCe(k) = [KC]e(k)

  • 7/25/2019 ctrgg123456.pdf

    21/39

    Observer block diagram

    K

    1z

    u k( ) x k+( 1)^

    y k( )^

    y k( )

    Cx k( )^

    x k( )^

  • 7/25/2019 ctrgg123456.pdf

    22/39

    Output feedback (observer + state feedback)

    x(k+ 1) = x(k) +u(k) + K

    y(k)Cx(k)

    u(k) = L x(k)

  • 7/25/2019 ctrgg123456.pdf

    23/39

    Poles of the closed-loop system

    x(k+ 1) = x(k) +u(k)

    e(k+ 1) = (KC)e(k)

    u(k) = L(x(k) e(k))

  • 7/25/2019 ctrgg123456.pdf

    24/39

    Poles of the closed-loop system

    x(k+ 1) = x(k) +u(k)

    e(k+ 1) = (KC)e(k)

    u(k) = L(x(k) e(k))

    x(k+ 1)e(k+ 1)

    =L L

    0 KCx(k)

    e(k)

  • 7/25/2019 ctrgg123456.pdf

    25/39

    Poles of the closed-loop system

    x(k+ 1) = x(k) +u(k)

    e(k+ 1) = (KC)e(k)

    u(k) = L(x(k) e(k))

    x(k+ 1)e(k+ 1)

    =L L

    0 KCx(k)

    e(k)

    Separation principle:(Closed-loop) Process poles: Ar(z) = det(zI+L)

    Observer poles: Ao(z) =det(zI+ KC)

  • 7/25/2019 ctrgg123456.pdf

    26/39

    Feed-forward (two-degree-of-freedom)

    Goal: respond to a reference signal with desired specs.Replace u(k) = L x(k) by: u(k) = L x(k) +Lcuc(k)

    ux^

    Lc

    Observer

    Process-L

    uc

    y

  • 7/25/2019 ctrgg123456.pdf

    27/39

    Feed-forward (two-degree-of-freedom)

    Closed-loop system:

    x(k+ 1) = (L)x(k) +Le(k) +Lcuc(k)

    e(k+ 1) = (KC)e(k)

    y(k) = Cx(k)

    Transfer function from uc to y (for impulse response):

    Hcl(z) = C(zI+L)1Lc=Lc

    B(z)

    Ar(z)

    A li i li

  • 7/25/2019 ctrgg123456.pdf

    28/39

    Application to a nonlinear system

    Feedbackcontroller

    Reference Nonlinearsystem

    y0

    y

    u0

    y0

    Feedforwardcontroller

    Li i i f li d l

  • 7/25/2019 ctrgg123456.pdf

    29/39

    Linearization of nonlinear models

    xnl = f(xnl,unl)

    ynl = g(xnl,unl)

    Choose x0, y0 or u0 such that 0= f(x0,u0) and y0=g(x0,u0) (equi-

    librium). Linearize the above model:

    x = fxnl

    xnl=x0

    (xnlx0) + funl

    unl=u0

    (unl u0)

    ynly0 = g

    xnl

    xnl=x0

    (xnlx0) + g

    unl

    unl=u0

    (unl u0)

    Li i ti f li d l

  • 7/25/2019 ctrgg123456.pdf

    30/39

    Linearization of nonlinear models

    x = f

    xnl

    xnl=x0

    (xnlx0) + f

    unl

    unl=u0

    (unl u0)

    ynly

    0 =

    g

    xnlxfnl=x0 (

    xnlx

    0) +

    g

    unl

    unl=u0 (u

    nlu

    0)

    x = Ax + Bu

    y = Cx + Du

    with x=xnlx0, u=unl u0, y=ynly0, etc.

    C i f d l th h i l ti

  • 7/25/2019 ctrgg123456.pdf

    31/39

    Comparison of models through simulation

    u

    y

    u0

    Linearized

    model

    Nonlinearsystem

    y0

    y

    u=unl u0 ynl=y +y0

    Alt ti l

  • 7/25/2019 ctrgg123456.pdf

    32/39

    Alternatively . . .

    u0

    Linearizedmodel

    Nonlinear

    system

    y0

    u y

    unl=u + u0 y=ynly0

    Control b local linear controller

  • 7/25/2019 ctrgg123456.pdf

    33/39

    Control by local linear controller

    u

    u0

    Linearcontroller

    Nonlinear

    system

    y0

    y

    Linearized

    model

    Model based adaptive control

  • 7/25/2019 ctrgg123456.pdf

    34/39

    Model-based adaptive control

    u

    Adaptation

    Design parameters

    Controller

    -

    Process

    Linearmodel

    yr

    ym

    Continuous time PID controller

  • 7/25/2019 ctrgg123456.pdf

    35/39

    Continuous-time PID controller

    The textbook version of a PID controller:

    u(

    t) =

    Ke(

    t) +

    1

    Ti

    t

    e(

    s)

    ds+

    Td

    de(t)

    dt

    Continuous time PID controller

  • 7/25/2019 ctrgg123456.pdf

    36/39

    Continuous-time PID controller

    The textbook version of a PID controller:

    u(t) =Ke(t) + 1Ti

    t

    e(s)ds + Td

    de(t)

    dt

    A more realistic PID controller:

    U(s) =K

    bUc(s)

    Y(s) +

    1

    sTi(Uc(s)

    Y(s))

    sTd

    1 + sTd/NY(s)

    Discrete time PID controller

  • 7/25/2019 ctrgg123456.pdf

    37/39

    Discrete-time PID controller

    P-term: P(k) =K(buc(k)y(k))

    I-term: I(k+ 1) =I(k) +KTie(k)

    D-term: D(k) = TdTd+Nh

    D(k1) KTdNTd+Nh

    (y(k)y(k1))

    u(k) =P(k) +I(k) +D(k)

    PID tuning

  • 7/25/2019 ctrgg123456.pdf

    38/39

    PID tuning

    Pole placement

    Root locus

    Bode diagram

    Tuning rules (Ziegler-Nichols, tuning)

    G(s) =et0s Kp

    (s + 1) Kc=

    Kp(+ t0), Ti= , Td=

    t0

    2

    Cascaded control Example:Inverted Pendulum

  • 7/25/2019 ctrgg123456.pdf

    39/39

    Cascaded control Example:Inverted Pendulum

    Reference Position

    controller InvertedpendulumAnglecontroller