dc-motor (2)

Embed Size (px)

Citation preview

  • 8/7/2019 dc-motor (2)

    1/49

    Robust Generalized

    Proportional Integral control of

    a DC-Motor

    Hebertt Sira-Ramrez

    Jesus Linares-Flores

    October 15, 2010

    1

  • 8/7/2019 dc-motor (2)

    2/49

    The DC motor model

    Consider the popular model of a DC motor

    Ldia

    dt= (uV Ria Kw)

    Jdwdt

    = Kia Bw (t)

    where ia is the armature current, w is the angu-

    lar velocity of the motor shaft (t) is the load

    torque applied to the shaft, The parameters L,

    R and K represent respectively the inductance

    in the armature circuit, the armature winding

    resistance and the current gain of the motor.

    V is the fixed input voltage amplitude, mod-

    ulated by the control input u, taking values

    on the segment [1, 1]. On the other hand

    J and B represent the motor inertia and theviscous friction coefficient. The torque gain is

    assumed to be identical to the current gain K.

    2

  • 8/7/2019 dc-motor (2)

    3/49

    Flatness of the DC motor model

    The unperturbed motor system ((t) = 0, t)

    is represented by a linear controllable system

    model. Hence, the system is flat with flat out-

    put given by the angular velocity w. Indeed, all

    variables can be written in terms of the angularvelocity and its time derivatives:

    ia =1

    K[Jw + Bw]

    u =JL

    KVw +

    BL

    KV+

    JR

    KV

    w +

    RB

    K+ K

    w

    The perturbed version of the above differential

    parametrization is simply given by

    ia =J

    Kw +

    B

    Kw +

    (t)

    K

    u =JL

    KVw + BL

    KV +RJ

    KV

    w +RB

    KV +K

    V

    w

    +L

    KV(t) +

    R

    KV(t)

    3

  • 8/7/2019 dc-motor (2)

    4/49

    Sensor aided control problem formulation

    We first present the GPI observer-based solu-

    tion to the problem of robust angular velocity

    reference trajectory tracking when the angular

    velocity is gathered from the motor with the

    aid of a tachometer. We formulate the prob-

    lem as follows:

    Given a desired angular reference trajectory

    w(t) device, on the basis of the measured w

    and the relevant system parameters, a feed-

    back control law which, irrespectively of the

    uniformly absolutely bounded values of the torque

    input (t), forces the motor angular velocity, w

    to asymptotically exponentially track the given

    reference signal, w

    (t), modulo a small as de-sired tracking error neighborhood around the

    origin of the tracking error phase space.

    4

  • 8/7/2019 dc-motor (2)

    5/49

    Robust angular velocity feedback control

    A simplified non-phenomenological relation link-ing the angular velocity to the control input isreadily obtained from the above perturbed dif-ferential parametrization of the control input.We have,

    w =

    KV

    JL

    u + (t)

    where (t) is, both, an exogenous and a statedependent unknown disturbance input given

    by:

    (t) =

    B

    J+

    R

    L

    w+

    RB

    JL+

    K2

    JL

    w+

    1

    J(t)+

    R

    JL(t)

    We assume (t) is an unknown time signal,but otherwise known to be uniformly abso-

    lutely bounded combined state dependent andexogenous disturbance input signal. We alsoassume that the time derivatives: (j)(t), j =1, 2, 3, 4 are also uniformly absolutely bounded.

    5

  • 8/7/2019 dc-motor (2)

    6/49

    A GPI observer based feedback controller is

    readily proposed to be

    u = u(t) +JL

    KV

    s(t) k1(w2s w

    (t))

    k0(w w(t))

    where s(t) and w2s are, respectively, a smoothedestimate of the unknown signal (t) a n d a

    smoothed estimate of the angular accelerationw, given by the following GPI linear observer

    w1 = w2 + 4(w w1)

    w2 =KV

    JLu + z1 + 3(w w1)

    z1

    = z2

    + 2

    (w w1

    )

    z2 = z3 + 1(w w1)

    z3 = 0(w w1)

    where w1 is the redundant estimate of the mea-sured angular velocity w. The signal w2 isthe estimate of the angular acceleration w and

    z1 represents an internal, self-updating, timepolynomial model (also called Taylor polyno-

    mial) of just second degree, estimating theperturbation input (t).

    6

  • 8/7/2019 dc-motor (2)

    7/49

    The estimation error vector (e1, e2) = (w

    w1, w w2) satisfies

    e1 = e2 4e1

    e2

    = (t) z1

    3e

    1z1 = z2 + 2e1

    z2 = z3 + 1e1

    z3 = 0e1

    The estimation error e = e1 = w w1 obeys,upon elimination of the variables z1, z2 and

    z3, the following perturbed linear differential

    equation

    e(5) + 4e(4) + + 0e =

    (3)(t)

    We have the following result:

    7

  • 8/7/2019 dc-motor (2)

    8/49

    Theorem. The linear feedback control law

    u = u(t) + JLKV

    (t) k1(w2 w

    (t))

    k0(w w(t))

    with (t) = z1 and w2 being, respectively, es-

    timates of (t) and w which are generated by

    the observer:

    w1 = w2 + 4(w w1)

    w2 =KV

    JLu + z1 + 3(w w1)

    z1 = z2 + 2(w w1)

    z2 = z3 + 1(w w1)

    z3 = 0(w w1)asymptotically exponentially drives the obser-

    vation error variables e1 = ww1, e2 = ww2,to an arbitrarily small neighborhood of zero,

    while z1 asymptotically exponentially converges

    to a small as desired neighborhood of the un-

    known signal, (t), provided the observer gains,{4,...,0}, and the controller gains, {k1, k0},are chosen so that the dominating characteris-

    tic polynomials:

    8

  • 8/7/2019 dc-motor (2)

    9/49

    pc(s) = s2 + k1s + k0po(s) = s

    5 + 4s4 + + 1s + 0

    are Hurwitz polynomials with their roots lo-

    cated deep into the left half of the complex

    plane. Moreover, the further the roots of these

    polynomials are located in the left half of thecomplex plane the smaller the estimation er-

    rors and the tracking errors ew = w w(t),

    ew = w w(t)

    The proof of this result stems from the fact

    that the closed loop and injected dynamics aregiven by

    e(5) + 4e(4) + + 0e =

    (3)(t)

    ew + k1ew + k0ew = (t) (t) + l(e, e, ...)

    where l(e, e, ...) is a linear, rapidly fading, func-

    tion of the estimation error e and its time deriva-tives, circumscribed to a small as desired disk

    centered on the origin of the estimation error

    phase space.

    9

  • 8/7/2019 dc-motor (2)

    10/49

    Remark

    The observer variables z1 = (t) and w2 = w(t)

    being produced by a high gain observer nat-

    urally exhibit the peaking phenomenon at

    the initial stages of their existence. In order

    to avoid the effects of these initially large sig-

    nals in the controller, we propose, as custom-

    arily made, a smoothing of its initial values

    by means of a clutching function smoothly

    interpolating between the values 0 and 1 dur-

    ing a small time interval [0, ] whose value isa function of the large negative real part of

    the eigenvalues, or characteristic polynomial

    roots, defining the dominating estimation error

    injected dynamics for e. We propose

    s(t) = sf(t)(t)

    sf(t) =

    sin8(t2) t 1 for t >

    with = w2, z1.

    10

  • 8/7/2019 dc-motor (2)

    11/49

    Simulation Results

    CONTINUOUS SYSTEM MOTORDC"this program simulates a dc motor robustly controlled via" a GPI observer based controller rejecting the

    " additive disturbance containing the unknown load torque" and other system terms. A stabilization task is presented.

    STATE ia w

    STATE w1 w2 z1 z2 z3DER dia dwDER dw1 dw2 dz1 dz2 dz3

    TIME t

    " Plant equations:

    dia=1/L*(v-R*ia-K*w)dw=1/J*(K*ia-B*w-tau)

    " definition of load torque disturbance input

    tau=0.5*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)

    "Linear controller with disturbance rejection

    v=1/ga*(-z1s-k1*(w2s-wsd)-k0*(w-ws))

    k0=wnc^2k1=2*zetac*wnc

    wnc:1.5zetac:1

    11

  • 8/7/2019 dc-motor (2)

    12/49

    "GPI observer

    dw1=w2+g4*(w-w1)

    dw2=ga*v+z1+g3*(w-w1)

    dz1=z2+g2*(w-w1)dz2=z3+g1*(w-w1)

    dz3=g0*(w-w1)

    ga=K/(L*J)

    "smoothing of observer signals

    z1s=z1*sfw2s=w2*sf

    sf=if t < eps then sin8 else 1

    sin8=sin4*sin4sin4=sin2*sin2

    sin2=sin1*sin1sin1=sin(pi*t/(2*eps))

    pi:3.14159265

    eps:0.5

    " pole placement for GPI observer

    g4=po+4*zetao*wno

    g3=4*zetao*po*wno+2*wno^2+4*zetao^2*wno^2g2=4*zetao*wno^3+2*po*wno^2+4*zetao^2*po*wno^2

    g1=wno^4+4*zetao*po*wno^3g0=po*wno^4

    po=40

    wno=40zetao=1

    12

  • 8/7/2019 dc-motor (2)

    13/49

    " reference angular velocity signal

    ws:100wsd:0

    " Motor parameter values:

    L:7e-3

    R:2.33B:.00937K:.479

    J:.01164

    END

    13

  • 8/7/2019 dc-motor (2)

    14/49

    0 2 4 6 8 10

    0

    2

    4

    0 2 4 6 8 100

    50

    100

    0 2 4 6 8 100

    50

    ia(t)

    v(t)

    w(t), w(t)

    Performance of direct GPI observer based

    control for angular velocity tracking

    14

  • 8/7/2019 dc-motor (2)

    15/49

    0 2 4 6 8 104

    3

    2

    1

    0

    1x 10

    5

    0 2 4 6 8 100

    0.1

    0.2

    0.3

    0.4

    0.5

    (t)

    (t)

    Disturbance estimation and applied load

    torque

    15

  • 8/7/2019 dc-motor (2)

    16/49

    A two stage robust controller design

    Consider again the DC motor dynamics

    d

    dtia = u

    V

    L

    R

    Lia

    K

    Lw

    d

    dtw =

    K

    Jia

    B

    Jw

    1

    J(t)

    In contrast with the previous controller design

    procedure, we now adopt a two stage con-

    troller design approach. This is accomplished

    by first designing an outer loop robust GPI

    observer based angular velocity reference tra-

    jectory tracking controller taking the armature

    current, ia, as an effective control input. Once

    the robust feedback control law is established

    for the armature current, we design an inner

    loop controller specifying a robust controller

    for the armature voltage so that the armaturecurrent tracks, on-line, the generated time val-

    ues of the designed outer loop armature cur-

    rent inner loop controller.

    16

  • 8/7/2019 dc-motor (2)

    17/49

    Outer loop robust controller design

    The design of the outer loop controller designentitles the angular velocity dynamics alone

    taking as an auxiliary control input the arma-ture current, ia,

    We consider the torque perturbed angular ve-locity dynamics:

    d

    dtw =

    K

    Jia

    B

    Jw

    1

    J(t)

    We specifically assume that the load torque(t) is unknown and that the viscous frictioncoefficient B is also unknown.

    We, thus, propose the following perturbed sim-plified model of the mechanical part of the sys-

    tem, lumping all the uncertainties into a sin-gle time-varying function of unknown, but uni-formly absolutely bounded, nature denoted by1(t).

    17

  • 8/7/2019 dc-motor (2)

    18/49

    ddt

    w = KJ

    ia + 1(t)

    where the unknown perturbation input 1(t) isgiven by the sum of uncertain quantities:

    1(t) = B

    Jw

    1

    J(t)

    The outer loop robust armature current feed-back controller design may be formulated as

    follows:

    Given a smooth, desired, reference trajectory

    for the motor shaft angular velocity, w(t), de-

    vice an auxiliary feedback control law for thearmature current, denoted by ia,ref, which achievesthe reference trajectory tracking, even if in

    an approximate manner, regardless of the per-

    turbation inputs represented by the exogenous

    torque input, (t) and regardless of the un-

    known friction coefficient, B, i.e., regardlessof the lumped unknown but bounded uncer-

    tain term, 1(t), in the simplified descriptionof the perturbed system.

    18

  • 8/7/2019 dc-motor (2)

    19/49

    The robust, GPI observer based controller for

    the angular velocity trajectory tracking is givenby

    ia,ref = ia(t) +

    J

    K

    z1s k1(w w

    (t))

    where z1s is the smoothed version of the GPI

    observer variable, z1, generated by the observer:d

    dtw =

    K

    Jia,ref + z1 + 3(w w)

    z1 = z2 + 2(w w)

    z2 = z3 + 1(w w)

    z3 = 0(w w)

    The nominal armature current, ia(t), cannot

    be exactly pre-computed, due to the uncer-

    tainty surrounding the viscous friction coeffi-

    cient, B, and the torque input, (t). We, thus,

    propose to compute such a pre-compensation

    in the following faulty manner:

    ia(t) =J

    Kw(t)

    19

  • 8/7/2019 dc-motor (2)

    20/49

    Let ew = w w denote the, redundant, angular

    velocity estimation error. Subtracting from theangular velocity equation the angular velocity

    estimation equation and eliminating the z vari-

    ables, we obtain, after some algebraic manip-

    ulations it is found that ew satisfies,

    e(4)w + 3e

    (3)w + 2ew + 1ew + 0ew =

    (3)

    (t)

    while the tracking error, e, closed loop system

    satisfies,

    e + k1e = (t) (t)

    Under the assumption of an absolutely uni-

    formly bounded right hand side in the above

    set of equations, by choosing the observer gains

    and the controller gains sufficiently large, it

    follows that the trajectories of the estimation

    error and of its time derivatives, as well as thetracking error converge to a small neighbor-

    hood of the origin of the corresponding phase

    space.

    20

  • 8/7/2019 dc-motor (2)

    21/49

    Inner loop robust controller design

    The second stage for the controller design is

    concerned with the electrical system,

    d

    dtia =

    V

    L u R

    Lia K

    L w

    which is controlled by the armature circuit in-

    put voltage, u. In this instance, we assume

    that the armature resistance, R, is unknown

    while we try to synthesize the control withoutthe aid of the angular velocity w. We thus pro-

    pose the following simplified perturbed model:

    d

    dtia =

    V

    Lu + 2(t)

    where

    2(t) = R

    Lia

    K

    Lw

    21

  • 8/7/2019 dc-motor (2)

    22/49

    The inner loop robust armature input voltage

    feedback controller design may be formulated

    as follows:

    Given the smooth, desired, reference trajectory

    for the armature current, ia,ref(t), obtained

    from the first design stage, device a feedback

    control law for the armature input voltage, u,

    which achieves the reference trajectory track-

    ing, even if in an approximate manner, regard-

    less of the perturbation inputs represented by

    the endogenous inputs, RL ia and regardless of

    the angular velocity influence through the term

    KL w i.e., regardless of the lumped unknown

    but bounded uncertain term, 2(t), in the sim-

    plified description of the perturbed system.

    22

  • 8/7/2019 dc-motor (2)

    23/49

    The robust feedback control law for the arma-

    ture circuit input voltage is given by

    u = u(t) +L

    V

    z1is p1(ia ia,ref)

    where

    u(t) =LJ

    V Kw(t)

    and where z1is is the smoothed version of the

    observer variable z1i defined by the following

    observer

    ddt

    a = uVL

    + z1i + 3(ia a)

    z1i = z2i + 2(ia a)

    z2i = z3i + 1(ia a)

    z3i = 0(ia a)

    (Note that we have used the same design pa-

    rameters for the observers appearing in each

    design stage)

    23

  • 8/7/2019 dc-motor (2)

    24/49

    Since ia(t) = (J/K) w(t) and u(t) = (L/V)ia(t),

    the closed loop system is given by,

    d

    dtia

    d

    dtia(t) =

    d

    dt(ia i

    a(t)) = p1(ia ia,ref)

    Note that if eia = ia ia,ref then

    eia = p1eia + (d

    dtia(t)

    d

    dtia,ref)

    For large p1, the tracking error eia converges to

    a vicinity of zero in spite of the bounded per-

    turbation input represented by the time deriva-

    tive of ia(t) ia,ref.

    Let ei = ia a. The injected estimation error

    dynamics evolves, after elimination of the z1i,

    in accordance with,

    e(4)i + 3e(3)i + 2e

    (2)i + 1ei + 0ei =

    (3)2

    24

  • 8/7/2019 dc-motor (2)

    25/49

    CONTINUOUS SYSTEM MOTORDC4

    " This program simulates a two stage robust gpi observer based

    " controller for a dc motor in a sensor aided scheme.

    " A two stage desgin controller is proposed. An outer loop" controller for angular velocity control through the current

    " acting as a control, with due cancellation of

    " unknown torque and viscous friction effects" thanks to a gpi observer. The GPI observer based inner

    " loop controller specifies the input voltage to" regulate the current towards the current

    " reference signal acting as a control in the previous stage." the main advantage is that B, R, and tau may be unknown

    STATE ia w wh z1 z2 z3

    STATE iah z1i z2i z3iDER dia dw dwh dz1 dz2 dz3

    DER diah dz1i dz2i dz3iTIME t

    "dc motor plant

    dia=u*V/L-R/L*ia-K/L*w

    dw=K/J*ia-B/J*w-tau/J

    "time varying load torque

    tau=0.6*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)

    "outer loop PI controller

    iar=ias+J/K*(-z1s-k1*(w-ws))ias=J/K*wsd

    phi1=-B/J*w-tau/J

    k1:4

    25

  • 8/7/2019 dc-motor (2)

    26/49

    "inner loop PI controller

    u=us+L/V*(-z1is-p1*(ia-iar))

    us=L*J/(V*K)*wsddphi2=-R/L*ia-K/L*w

    p1=20

    " armature current and disturbance observer

    diah=u*V/L+z1i+g3*(ia-iah)

    dz1i=z2i+g2*(ia-iah)dz2i=z3i+g1*(ia-iah)

    dz3i=g0*(ia-iah)

    " angular velocity and disturbance observer

    dwh=K/J*ia+z1+g3*(w-wh)

    dz1=z2+g2*(w-wh)dz2=z3+g1*(w-wh)dz3=g0*(w-wh)

    "observer design gains

    g3=4*zo*wnog2=(2*wno^2+4*zo^2*wno^2)

    g1=4*zo*wno^3g0=wno^4

    zo=1

    wno=40

    26

  • 8/7/2019 dc-motor (2)

    27/49

    "angular velocity trajectory

    ws=Fs "desired constant angular velocitywsd=Fsd

    wsdd=Fsdd

    "smoothing of observer variables

    whs=wh*sf

    z1s=z1*sf

    z1is=z1i*sf

    sf=if t < eps then sin8 else 1

    sin8=sin2*sin2*sin2*sin2sin2=sin1*sin1

    sin1=sin(pi*t/(2*eps))

    eps:0.5pi:3.14159265

    "DC motor parameter values:

    L:7e-3

    R:2.33B:0.00937

    K:0.479J:0.01164

    V:100

    27

  • 8/7/2019 dc-motor (2)

    28/49

    "rest to rest trajectory planning for angular velocity profile

    t1=0 " initial and final instants of rest-to-restt2=4

    delt=t2-t1

    tdif = abs(t-t1)

    z1f = 100 " initial and final values

    z1in = 0

    z1dif = z1f-z1in

    tau1=(tdif/delt)

    tau2=tau1*tau1

    tau3=tau1*tau2tau4=tau1*tau3

    tau5=tau1*tau4tau6=tau1*tau5

    tau7=tau1*tau6tau8=tau1*tau7tau9=tau1*tau8

    r1=12870r2=91520

    r3=288288r4=524160

    r5=600600r6=443520

    r7=205920r8=54912

    r9=6435

    28

  • 8/7/2019 dc-motor (2)

    29/49

    z1st1 = z1in

    fr=r1-r2*tau1+r3*tau2-r4*tau3+r5*tau4-r6*tau5+r7*tau6-r8*tau7+r9*tau8z1stt = z1in+z1dif*tau8*fr

    z1st2 = z1f

    z1std1 = 0

    frd2=14*r7*tau6-15*r8*tau7+16*r9*tau8frd=8*r1-9*r2*tau1+10*r3*tau2-11*r4*tau3+12*r5*tau4-13*r6*tau5+frd2

    z1stdt= z1dif*tau7*frd/deltz1std2 = 0

    z1stdd1 = 0

    frdd2=-12*13*r6*tau5+13*14*r7*tau6-14*15*r8*tau7+15*16*r9*tau8frdd=7*8*r1-8*9*r2*tau1+9*10*r3*tau2-10*11*r4*tau3+11*12*r5*tau4+frdd

    z1stddt = z1dif*tau6*frdd/(delt*delt)z1stdd2 = 0

    z1st3d1 = 0frddd3=-13*14*15*r8*tau7+14*15*16*r9*tau8

    frddd2=10*11*12*r5*tau4-11*12*13*r6*tau5+12*13*14*r7*tau6+frddd3

    frddd=6*7*8*r1-7*8*9*r2*tau1+8*9*10*r3*tau2-9*10*11*r4*tau3+frddd2z1st3dt = z1dif*tau5*frddd/(delt*delt*delt)

    z1st3d2 = 0

    Fs=if t < t1 then z1st1 else if t < t2 then z1stt else z1st2

    Fsd=if t < t1 then z1std1 else if t < t2 then z1stdt else z1std2Fsdd=if t < t1 then z1stdd1 else if t < t2 then z1stddt else z1stdd2

    Fs3d=if t < t1 then z1st3d1 else if t < t2 then z1st3dt else z1st3d2

    END

    29

  • 8/7/2019 dc-motor (2)

    30/49

    Simulation Results

    0 1 2 3 4 5 6 7 8 9 102

    0

    2

    4

    0 1 2 3 4 5 6 7 8 9 10100

    0

    100

    200

    ia,ref(t), ia(t)

    w(t), w(t)

    30

  • 8/7/2019 dc-motor (2)

    31/49

    0 1 2 3 4 5 6 7 8 9 10150

    100

    50

    0

    0 1 2 3 4 5 6 7 8 9 1010000

    5000

    0

    5000

    1(t), 1(t)

    2(t), 2(t)

    31

  • 8/7/2019 dc-motor (2)

    32/49

    Sensorless feedback control of the DC mo-

    tor: A GPI observer approach

    Sensorless control of DC motors refers to the possi-

    bility of controlling the motor without measuring the

    mechanical variables such as angular position or angu-

    lar velocity. The control scheme is then to be carried

    out solely on the basis of armature current measure-

    ments and, possibly, the knowledge of the control input

    voltage. The usual approach is to use an observer, of

    the reduced order type, in order to estimate the angular

    velocity from an indirect output equation representing

    the angular velocity in terms of the input voltage, the

    armature current and its time derivative.

    However, most sensorless designs are not particularly ro-

    bust with respect to the mechanical loads and specially

    when these are not of constant nature, but rather time

    varying. Here, we propose a GPI observer approach for

    the efficient simultaneous asymptotic, though approxi-

    mate, estimation of the angular velocity as well as of

    the unknown, time-varying, load torque input.

    32

  • 8/7/2019 dc-motor (2)

    33/49

    Problem formulation

    Given a desired angular velocity profile, w(t),

    for the motor shaft, device a linear feedback

    control law, on the basis of the armature cur-

    rent, ia, and knowledge of the system parame-

    ters, which asymptotically exponentially drives

    the angular velocity of the motor, w(t), to-wards the desired reference signal within an

    uniformly absolutely bounded negligible error,

    regardless of the unknown, but uniformly ab-

    solutely bounded, load torque input, (t).

    33

  • 8/7/2019 dc-motor (2)

    34/49

    We will be proposing, in the next paragraphs,a reduced order GPI observer which simultane-

    ously estimates in a rather close manner, both,

    the angular velocity, w, and the torque input,

    (t), based only on knowledge of the armature

    current, ia. In principle, such an observer isgiven by

    dw

    dt=

    K

    Jia

    B

    Jw + z1 + 3(w w)

    z1 = z2 + 2(w w)

    z2 = z3 + 1(w w)

    z3 = 0(w w)

    with the injection of w given by

    w = L

    K

    dia

    dt

    +

    V

    Ku

    R

    Kia

    where we have adopted a second degree time

    polynomial for the internal model of the torque

    input, (t).

    34

  • 8/7/2019 dc-motor (2)

    35/49

    The angular velocity estimation error, e = w

    w, is seen to formally satisfy the following per-turbed injected dynamics,

    e(4)+(3+B

    J)e(3)+2e+1e+0e =

    1

    J(3)(t)

    Thus, the design coefficients may be chosen

    by comparison with those of a desired, domi-

    nating, fourth degree characteristic polynomialof the form pd(s) = (s

    2 + 2onos + 2no)2. i.e.,

    3 = 4ono B

    J2 = 2

    2no + 4

    2o

    2no

    1 = 4o

    3

    no0 =

    4no

    As long as the roots of the characteristic poly-

    nomial are chosen sufficiently far from the imag-

    inary axis in the left portion of the complex

    plane, the effect of the third order derivative

    of (t) is diminished having the estimation er-ror and its time derivatives converge towards

    a small as desired disk in the estimation error

    phase space.

    35

  • 8/7/2019 dc-motor (2)

    36/49

    Observer assessment Before presenting the

    complete solution to the problem, we carryout a partial assessment of the proposed load

    torque GPI observer by simulating the observer

    as if ia were the control input and w were ac-

    tually the measurable output. We propose a

    rather complex torque input given by,

    (t) = e sin2(3t) cos2(0.3t) [N m]

    We set, for the observer gains,

    o = 1, no = 40

    The feedback controller for the current, ia, was

    set to be:ia = i

    a +

    J

    K

    1

    Jz1s k1(w w

    (t))

    k0

    t0

    (w w())d

    with w(t) being a rest-to-rest velocity profile

    starting at 0 and ending at 100 [r/s] in 2[s]. We have set k1 = 2cnc, k0 =

    2nc, with

    c = 1, nc = 0.3. The smoothing interval:

    = 0.4[s].

    36

  • 8/7/2019 dc-motor (2)

    37/49

    0 2 4 6 8 100

    50

    100

    0 2 4 6 8 10

    0

    0.2

    0.4

    0 2 4 6 8 100

    2

    4

    6

    w(t), w(t), w(t)

    (t), (t)

    ia(t)

    37

  • 8/7/2019 dc-motor (2)

    38/49

    The sensorless GPI controller

    However, we must modify the form of the GPI

    observer since the expression for w contains

    time derivatives which are inconvenient to com-

    pute in practise. Substituting the expression

    for w and defining:

    = w + 3L

    Kia

    j = zj + 3jL

    Kia, j = 1, 2, 3

    one obtains the following modified GPI ob-server:

    ddt

    =

    KJ 2 L

    K 3 R

    K+ L

    K

    BJ

    + 3

    3

    ia

    B

    J+ 3

    + 1 + 3

    V

    Ku

    d1

    dt= 2 + 2

    V

    Ku

    2

    R

    K+ 1

    L

    K 23

    L

    K

    ia 2

    d2

    dt = 3 + 1V

    Ku

    1R

    K + 0L

    K 13L

    K

    ia 1

    d3

    dt= 0

    V

    Ku

    0

    R

    K 03

    L

    K

    ia 0

    38

  • 8/7/2019 dc-motor (2)

    39/49

    The angular velocity estimate is thus given by

    w = 3L

    Kia

    and the torque estimate is obtained as

    (t) = J1 2L

    K

    iaIn order to complete the solution to the prob-lem we propose a customary two stage pro-cedure with the advantageous standpoint ofhaving now accurate angular velocity and loadtorque input estimations. For this, we firstview the armature current, ia, as an interme-diate auxiliary control input we set,

    ia =J

    K

    (t)

    J+

    B

    J(w w(t)) 1(w w

    (t))

    0

    t0

    (w w()) d

    + ia(t)

    where ia(t) may be taken to be

    ia(t) = JK(t) + B

    K(t)

    and 1, 0 are control design constants

    39

  • 8/7/2019 dc-motor (2)

    40/49

    Under the assumption of fast convergence of

    w and (t) to their actual values w and , theclosed loop behavior of the tracking error, ew =ww(t), caused by this auxiliary control input,is found to be described by the following lineardynamics,

    ew

    + 1

    +B

    J

    ew+

    0t

    0 ew(

    )

    d= 0

    We may set 1 and 0 so that the closed loopcharacteristic polynomial coincides with

    s2 + 2cncs + 2nc

    and thus, have an asymptotic exponential con-

    vergence of w to w.We regard this control law as part of an outercontrol loop specifying the desirable currentsignal. We let this specification of the arma-ture current to act as a current reference anddenote it, from now on, as ia,ref, i.e.,

    ia,ref =

    J

    K (t)

    J +

    B

    J(w w

    (t)) 1(w w

    (t))

    0

    t0

    (w w()) d

    + ia(t)

    40

  • 8/7/2019 dc-motor (2)

    41/49

    At the second controller design stage, the in-

    ner control loop specifies now the input volt-age, u, to the armature circuit, so that the ac-

    tual armature current, ia, asymptotically expo-

    nentially tracks the desired current reference,

    ia,ref, specified in the first stage. We set

    u = u(t) + LV

    RL

    (ia ia(t)) +

    KL

    (w w(t))

    1(ia ia,ref(t)) 0

    t0

    (ia ia,ref())d

    where

    u(t) = LV d

    dti

    a(t) +

    R

    Vi

    a(t) +

    K

    V(t)

    and

    ia(t) =J

    K(t) +

    B

    K(t)

    The proposed controller design produces a closed

    loop current behavior tracking error, eia = ia

    ia,ref, ultimately governed by

    d

    dteia +

    1 +

    R

    L

    eia + 0

    t0

    eia()d = 0

    41

  • 8/7/2019 dc-motor (2)

    42/49

    where the coefficients 1, 0, are set so that

    the characteristic polynomial coincides with the

    desired closed loop polynomial,

    pdi(s) = s2 + 2cincis +

    2nci

    This is achieved by simply setting

    1 = 2cinci R

    L0 =

    2nci

    42

  • 8/7/2019 dc-motor (2)

    43/49

    Simulation results

    CONTINUOUS SYSTEM MOTORDC3

    " This program simulates a robust gpi observer based" controller for a dc motor in a sensorless scheme.

    " A two stage desgin controller is proposed. An outer loop" controller for angular velocity control through the current

    " acting as a control, with due cancellation of unknown torque

    " thanks to a gpi observer. The inner loop controller specifies" the input voltage to regulate the current towards the current

    " reference signal acting as a control in the previous stage.

    STATE ia w iwmwo iiamir

    STATE wh z1 z2 z3DER dia dw diwmwo diiamirDER dwh dz1 dz2 dz3

    TIME t

    "dc motor plant

    dia=u*V/L-R/L*ia-K/L*wdw=K/J*ia-B/J*w-tau/J

    "time varying load torque

    tau=0.6*exp(-sin(3*t)*sin(3*t))*cos(0.3*t)*cos(0.3*t)

    "inner loop PI controller

    u=us+L/V*(R/L*(ia-ias)+K/L*(wh-ws)-p1*(ia-iar)-p0*iiamir)diiamir=ia-iar

    us=L*J/(V*K)*wsdd+(L*B/(V*K)+R*J/(V*K))*wsd+ussuss=(R*B/(V*K)+K/V)*ws

    43

  • 8/7/2019 dc-motor (2)

    44/49

    p1=2*zic*wnicp0=wnic^2

    zic:1wnic:8

    "outer loop PI controller

    iar=ias+J/K*(tauh/J+B/J*(wh-ws)-k1*(wh-ws)-k0*iwmwo)diwmwo=wh-ws

    ias=J/K*wsd+B/K*ws

    ws=Fs "desired constant angular velocity

    wsd=Fsdwsdd=Fsdd

    k1=2*zc*wc

    k0=wc*wczc:1wc:4

    "reduced order angular velocity and torque observer

    dwh=1/J*(K*ia-B*wh)+z1+g3*(wm-wh)dz1=z2+g2*(wm-wh)

    dz2=z3+g1*(wm-wh)dz3=g0*(wm-wh)

    wm=-L/K*dia+V/K*u-R/K*ia

    44

  • 8/7/2019 dc-motor (2)

    45/49

    "smoothing of observer variables

    whs=wh*sf

    z1s=z1*sftauh=-J*z1s

    sf=if t < eps then sin8 else 1

    sin8=sin2*sin2*sin2*sin2

    sin2=sin1*sin1sin1=sin(pi*t/(2*eps))

    eps:0.2pi:3.14159265

    "observer design gains

    g3=4*zo*wno-B/Jg2=(2*wno^2+4*zo^2*wno^2)

    g1=4*zo*wno^3g0=wno^4

    zo=1

    wno=40

    "DC motor parameter values:

    L:7e-3R:2.33

    B:0.00937K:0.479

    J:0.01164V:100

    45

  • 8/7/2019 dc-motor (2)

    46/49

    "rest to rest trajectory planning for angular velocity profile

    t1=0 " initial and final instants of rest-to-restt2=2

    delt=t2-t1

    tdif = abs(t-t1)

    z1f = 100 " initial and final values

    z1in = 0

    z1dif = z1f-z1in

    tau1=(tdif/delt)

    tau2=tau1*tau1

    tau3=tau1*tau2tau4=tau1*tau3

    tau5=tau1*tau4tau6=tau1*tau5

    tau7=tau1*tau6tau8=tau1*tau7tau9=tau1*tau8

    r1=12870r2=91520

    r3=288288r4=524160

    r5=600600r6=443520

    r7=205920r8=54912

    r9=6435

    46

  • 8/7/2019 dc-motor (2)

    47/49

    z1st1 = z1in

    fr=r1-r2*tau1+r3*tau2-r4*tau3+r5*tau4-r6*tau5+r7*tau6-r8*tau7+r9*tau8z1stt = z1in+z1dif*tau8*fr

    z1st2 = z1f

    z1std1 = 0

    frd2=14*r7*tau6-15*r8*tau7+16*r9*tau8frd=8*r1-9*r2*tau1+10*r3*tau2-11*r4*tau3+12*r5*tau4-13*r6*tau5+frd2

    z1stdt= z1dif*tau7*frd/deltz1std2 = 0

    z1stdd1 = 0

    frdd2=-12*13*r6*tau5+13*14*r7*tau6-14*15*r8*tau7+15*16*r9*tau8frdd=7*8*r1-8*9*r2*tau1+9*10*r3*tau2-10*11*r4*tau3+11*12*r5*tau4+frdd

    z1stddt = z1dif*tau6*frdd/(delt*delt)z1stdd2 = 0

    z1st3d1 = 0frddd3=-13*14*15*r8*tau7+14*15*16*r9*tau8

    frddd2=10*11*12*r5*tau4-11*12*13*r6*tau5+12*13*14*r7*tau6+frddd3

    frddd=6*7*8*r1-7*8*9*r2*tau1+8*9*10*r3*tau2-9*10*11*r4*tau3+frddd2z1st3dt = z1dif*tau5*frddd/(delt*delt*delt)

    z1st3d2 = 0

    Fs=if t < t1 then z1st1 else if t < t2 then z1stt else z1st2

    Fsd=if t < t1 then z1std1 else if t < t2 then z1stdt else z1std2Fsdd=if t < t1 then z1stdd1 else if t < t2 then z1stddt else z1stdd2

    Fs3d=if t < t1 then z1st3d1 else if t < t2 then z1st3dt else z1st3d2

    END

    47

  • 8/7/2019 dc-motor (2)

    48/49

    0 5 10 15 200

    2

    4

    6

    8

    [A]

    0 2 4 6 8 10

    0

    50

    100

    [rad/s]

    0 5 10 15 200.5

    0

    0.5

    1

    [Nm]

    w(t), w(t)w(t)

    ia(t), ia,ref(t)

    (t), (t)

    Performance of sensorless GPI observer based

    control for angular velocity tracking

    48

  • 8/7/2019 dc-motor (2)

    49/49

    0 5 10 15 200.1

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    u(t)

    Applied input voltage in a sensorless GPI

    observer based control for angular velocity

    tracking