guia labo 04knklklonmijpolñmknoijpoñlmlnkoijpmñlnkimñl

8
:PID Tutorial ,@ C c ',@ @ @- ,€- E €' é €- rllirocEeileE S:e three.erx controlier, -,-.- ---:-::---_,1_--,;t-::,,,._:::_.;_.__. - l'. , , ,, .r:. ,';,,.,.-'... ,,l.i.;i¡ti: .''' .: :::..:...:a.:.. ..:.., ,: :. ..i..:::,::.t,;..:., ::,,,:., .'Y'eylvlat1abCorlrnandsusedrnthis.tutorial.are:steuc}c*rr...,.] '-Ñote: Matlab comrnands from the controi system tólboxle higirligtrted in red. i :i i 'Tlüs tutonal wili siiow you flre characteriiliri'of th* each of proporfionai {p), the inte;ai (I) andtie ¿erlvairr¿,¡, (; "ll,T?'^1lil9-l'.* touse thern toobtain a desired response. ln tnis rrronal, wewin "";ri¡;1tüáiil*duir;'"' \ iedback system: !r " . " , t-.,r : l ' t, Plant: A s)'stem to be controlled (.i Conkolier: Provides the excitation fo; tireplant; Designed to control the or¡erall s),stem behavíor tlhe Éhree-Éeím ccntrcl[er L,; "'-^*Y' ,, t. l. I ,r'tfp ://rvrvtv. engin. urn i ch. edulgroup/ctrnlpiD,triD. hfini I r1/20/2046

Upload: emilio-lovaton

Post on 10-Sep-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

  • :PID Tutorial,@

    C

    c',@

    @

    '

    @-

    ,-

    E

    '

    -rllirocEeileE

    S:e three.erx controlier,

    - , - . - - - - : - : : - - -_,1_-- , ; t - : : , , , ._: : :_. ;_.__. -

    l ' . , , , , . r : . , ' ; , , . , . - ' . . . , , l . i . ; i t i : . ' ' '

    . : : : : . . : . . . :a. : . . . . : . . , , : : . . . i . . : : : , : : . t , ; . . : . , : : , , , : . ,

    . 'Y 'eylv lat1abCorlrnandsusedrnthis. tutor ia l .are:steuc}c*rr . . . , . ]'-ote: Matlab comrnands from the controi system tlboxle higirligtrted in red.

    i : i i'Tls tutonal wili siiow you flre characteriiliri'of th* each of proporfionai {p), the inte;ai (I) and tie erlvairr ,,( ;

    "ll,T?'^1lil9-l'.* to use thern to obtain a desired response. ln tnis rrronal, we win "";ri;1tiil*duir;'"'\ iedback system:

    !r " . " ,

    t-.,r : l '

    t, Plant: A s)'stem to be controlled

    (.i Conkolier: Provides the excitation fo; tire plant; Designed to control the orerall s),stem behavor

    tlhe hree-em ccntrcl[erL,;

    " ' -^*Y' , ,

    t .

    l. I

    ,r'tfp ://rvrvtv. engin. urn i ch. edulgroup/ctrnlpiD,triD. hfiniI

    r1/20/2046

  • rt - -|

    ,i; rtD Tutorial

    II

    fe rransier funcrion of tlie PID controller looks like the following:

    II * K-st +K-s+n,

    | "o*&*Kos-Kis*+:f+ ' rII| " fp: ProPortional

    gainu KI: hitegral gaiir. Kd : Derivative gain

    irsr, let,s take a look at how the PID controllervorks in a closed-loop s-vstern *s*g,1t:x5T:::^tl:::1Y,: P:l l J l ) r ! (ariabie (e) represenrs rtre tracking error, the difference between the desired itrprut value F) f_q -t1]: T:l lJIlllI,ILL lhul uil;.; *g,ruf (e) u,ill r:e se-.irr t rhe PID controiier, a:rd the controller computes both f: +,"T,1:11:::S*:

    integralJl lJ Llrwt rrrru ' \ ,v/ r r I

    f this error signal. Ttire sigrrat G jusr pasfthe controller is now equal to the proportignai ryin.!rIiT::,11:ragni*de of tire *"ror piilule'i,rtegtai gain (Ki) times the integral of the error

    pius the denvative gain (Kd) tirnes tire

    envatit,e of the etror

    u: i{s++H,f,edt * K"+dt

    Fl9t r

    i

    ,his sigral (u) rviii be sent to tlie plant, and the nerv orltput (Y) will be obtained. This nev output (Y) will be sent back

    :l the sensor again to find the,r.* .rro, signal (e). The coltroller talies this new error signal and computes its

    vative zurdlts integral again. Tiris process goos on and on'

    ' ihe cEtaraseE.isics of F, i, and E c*rlrcllers

    b;

    ! Froportional coritr-oller (Kp) rvill hav,e_the effect ofreducing the rise tirne and will reduce ,but never eliminate, the

    i i ; . . , : , ,r . , : . : : , . : , : , , . . : .e,r l . i t"gticontrol (Ki)rvi l lhavetheeffeciofel irninatingthesteady-stateerror,!rt i tmaymakethe.--_f;;r,=qp""* worse. derivative control (Kd) will iravethe effect of increasing

    the stabiliqr of the-system,

    rr:ducing the oversho"i "" irnprovurg ttre tralsient response. Effects of each of controllers Kp, Kd, and Ki on a

    .Josed.l-oopS)stenraresurnarizedntlretablesirorvnbelorv.

    g.,ote that these conelations rnay not be exactll, accurate, because Kp, Ki, and I(d are depeildent of eagfi other' In fact'

    .rraiging one of tirese variables can change the effect of tire other two. For this reason, tlie table should only be used as

    ^ ref.e'ce when vou are detenninrg tite 'alues for Ki. Kp and Kd.

    t -

    t,xaru [e PrcblemtL '

    $,lppose rve liave a sirnple mass, spdng, and darnper problern.

    t-

    L RESPCF{S

    i

    L'

    ,r"1t p' ' //rvu'w.engin.urpich. edu/group/ctm/PlD,PID.hnnli - - '

    [,:

    II

    '.f'

    [ :

    SS ERRORSETTLING TI]\{VERSHGOTRISE TIh4ESmall Change

    Eliminate

    Srnall Chan

    TlDADAA6

  • 5!

    rc modeling equation of this system is

    M* +I:ir +Ice : F (U -'' I

    el-aplace transform of the rnodeling equation (i) ''

    . t ' - ' . , .

    I*fX{si *bsX(si +!H{s} :'F{si

    transfer function betrveen the displacement X(s) and tire input F(s) then be,c.o,rye1

    i : : ; :

    '::, :i

    ; t ' ; "

    x{sj } _Fi=]

    : Ms'-tts-k

    trDAD0A6

    iet l '

    , i * M: lkg,\ \ . b:10N.s/ml' . k: 20 Nnt j c l (S): I

    ' ' 'l the above transfer firncaonDiug these values lnt(

    I-Q: I .F(si s2 +10s+2

    the goal of this problern is to show you how each of Kp' Ki and Kd conftltrtes

    to obtaur" ''

    l. .-- * Fast-nse fimel- " Minimurn

    overshootL' . No steadY-state efforIt ,{}pen-laop seP respanse

    "; and add in the foilowing code:Yet,s rst view the open_loop step resporxe. Create

    a new !:i:-:::iii luu aulr 'r Ltrv rvr

    r iL:

    \ r

    t ,

    x* ''|ttp: l/www. engin.u?nich. edulgsoup/cfin/PID/PID'html

    ,-

    l{

  • /F

    a

    g

    G

    @

    lb

    e

    a

    i l

    r1(:

    ttetn Tutorial

    - , ,*-1 .

    . ^ ^Af

    .

    den=LI IU uj 'slep (num, den)

    E

    !.*"*g this m-file in the Matlab command rvindori

    p

    : , ' , : ; : ' , , " l r , ' ra

    . ,_ : . . , ; -1: . , r , , , , ,

    i t ' l . ' r- , .':ishould glve you the plot shorvn be-lola''

    Operr- Lr-rarr Steti.F

    &

    fi fi.4

    E

    g 0.t - t3l

    E'41trl r' rr'3-.:io

    u.u I

    1Tirrte {:;ec)

    i

    ^Tl:e Dc gain of the plant transfer nnc1915 1/2.9: ?1?^t::1*- *,T:1,:::'.:,:t|'.";:l;L?'3nuffi:ff: ;;:::JT,,'U o';

    !' .rliiliinates ille sieaC,y-s'{'ate enor'

    .e-

    ":*3f"fre'J':i#:xi"ffi:;il,'J:'#';i';bi ;;# ;r'rJ.::g,"ll',1*lT:i:.i':" rise time is about one second' and t

    ih\etttinq riine. is about 1.5 seoods. L.tr; ;;r;6 u "ont-oil., that will reduce the rise time, reduce the settling time' and

    :( *. 'Prc

    t ^-----^ l

    |; -: toPorticnal contrat

    +ti -lro,r, tiie tabre srrorvn above, we see that the proportional contloller (Kp) reduces tire rise time''increases

    ttle o'ershoot'

    or.?od reduces rhe sread5,-srate enor. n ;;i;;;-lolp tralsfer function of th* .b";

    ";"* u'ith a prooortinal controller't

    " '

    : '

    N- \ j -J.

    ICLl. : \ - : ' { {s} KP[ : --.--. : . ' t iu i s '+ l t ls+in+K'Jl lt r : ,

    '' '

    300 and change the rn-fi'le to the followirg:n': tiet tiie proportronal gain (Kp) equalgrolc \

    tr tar q-I,

    ^ . .^+ KP=300;

    a'o 'L num--[KP] ;

    . . den= [1 i0 20+KP] ;

    ttx t't :0:0 .07: .2 i

    ' t - - L-v 'u

    i :: (nur ' den' t )

    rtpl i

    t,' t--

    ' ,.-.utning this m-file in the h4atlab command tvindou' should gives you the follorving plot

    i

    tn. , - : - t - ^-J- , / -^, ,* /^h-- /nrT-\ /T] IT-\ l lhr l

    'l P' lrfl 1 ; 7iv,'q,s'. en gin.um ich. edritgrotip I cnni |' lv t y I l-, llnn I

    . -

    _ ' r '

    tuz\l20a6

  • i i^ tI t

    t lf l i - '