Handout Matlab Lect4

Embed Size (px)

Citation preview

  • 7/29/2019 Handout Matlab Lect4

    1/6

    2 6 8 Chapter 4 Feedback Control System Characteristics4.9 CONTROL SYSTEM CHARACTERISTICS USING CONTROL DESIGN SOFTWARE

    In this section, the advantages of feedback will be illustrated with two examples. Inthe first exa mple, we will introduce feedback control to a speed tac hom eter systemin an effort to reject disturbances. The ta cho me ter speed c ontrol system e xamp lecan be found in Section 4.5. The reduction in system sensitivity to process variations,adjustment of the transient res ponse, and red uction in steady-state erro r will bedemonstrated using the English Channel boring machine example of Section 4.8.EXAMPLE 4.5 Speed contro l systemThe open-loop block diagram description of the armature-controlled DC motorwith a load torque disturbance Td($ ) is shown in Figure 4.7. The values for the various para me ters ( ta ken from Figure 4.7) are given in Table 4.3 . We have two inputs toour system, Va(s) and T (l(s). Relying on the principle of superposition, which appliesto our linea r system, we cons ider ea ch input separa tely. To investiga te the effects ofdisturbances on the system, we let Va(s) = 0 and consider only the disturbanceTd(s). Conversely, to investigate the respon se of the system to a reference input, wele t Td(s) = 0 and consider only the input Va(s).The closed-loop speed tachometer control system block diagram is shown inFigure 4.9. The values for K a and K t are given in Table 4.3 .If our system displays good disturbance rejection, then we expect the disturbance Td(s) to have a small effect on the output o){s). Consider the open-loop system in Figure 4.11 first. We can co m put e the tra nsfer function from Tj(s) to (o(s) andevaluate the output response to a unit step disturbance (that is , T(l(s) = 1/s). Thetime resp onse to a unit step disturb anc e is show n in Figure 4.29 (a). The sc ript shownin Figure 4.29(b) is used to analyze the open-loop speed tach om eter system.The open-loop transfer function (from Equation (4.26)) is

  • 7/29/2019 Handout Matlab Lect4

    2/6

    Se c t io n 4 .9 C o n t ro l Sys te m C h a ra c te r i s t i cs U s in g C o n t ro l D e s ig n So f tw a re 2 6 9

    0-0 .1-0 .2-0 .3-0 .4-0 .5-0 .6-0 .7

    Open-Loop D isturbance Step Response

    V\^ ^ - - _ _ _

    jSteady-state error

    \0 1 2 3 4 5 6 7

    Time (s)(a)

    F IGU R E 4 .2 9Analysis of theopen-loop speedcontrol system.(a) Response.(b) m-file script.

    %Speed Tachometer Example%Ra=1; Km=10; J=2; f=0.5; Kb=0.1;num1=[1]; den1=[J,b]; sys1=tf(num1,den1);num2=[Km*Kb/Ra]; den2=[1]; sys2=tf(num2,den2);sys_o=feedback(sys1 ,sys2);%sys_o=-sys_o *%[yo,T]=step(sys_o); ^plot{T,yo)title('Open-Loop D isturbance S lep R esponse')xlabel(T ime (s)'),ylabel('\omega_o'), grid%yo(length(T)) 4

    Change sign of transfer function since thedisturbance has negative sign in the diagram.

    Compu te response tostep disturbance.

    Steady-state error last value of output yo.

    (b )In a similar fashion, we begin the closed-loop system analysis by computing theclosed-loop transfer function from T(i(s) to (o(s) and then generating the time-response of (o(t) to a unit step disturbance input. The outpu t response and thescript cltach.m are shown in Figure 4.30. The closed-loop transfer function from thedisturbance input (from Equation (4.30)) is

    - 1Td(s) 2s + 541.5 sys_c.As before, the steady-state error is just the final value of

  • 7/29/2019 Handout Matlab Lect4

    3/6

    270 C h a p te r 4 Fe e d b a ck C o n t ro l Sys te m C h a ra c te r i s t i csClosed-Loop Disturbance Step Response

    Steady-state error

    0.004 0.008 0.012Time (s)

    (a)

    0.016 0.020

    F I G U R E 4 . 3 0Analysis of theclosed-loop speedcontrol system.(a) Response.(b) m-file script.

    %Speed Tachometer Example%Ra=1; Km=10; J=2; b=0.5; Kb=0.1; Ka=54; Kt=1;num1=[1]; den1=[J,b]; sys1=tf{num1,den1);num2=[Ka*Kt]; den2=[1]; sys2=tf(num2,den2);num3=[Kb]; den3=[1]; sys3=tf(num3,den3);num4=[Km/Ra]; den4=[1]; sys4=tf(num4,den4);sysa=parallel(sys2,sys3);sysb=series(sysa,sys4);sys_c=feedback(sys1 ,sysb);%sys_c=-sys_c

  • 7/29/2019 Handout Matlab Lect4

    4/6

    Se c t io n 4.9 C o n t ro l Sys te m C h a ra c te r is t i cs U s in g C o n t ro l D e s ig n So f tw a reStep Response for K= 1001.5

    1.00.5

    0 0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0Time (s)

    (a)

    271

    Overshoot

    i

    a

    Settling time, |

    1.0

    0.5/ -

    j\

    Step Response tor K= 2 0i >

    Overshooti i

    Settling time

    0 0.2 0.4 0.6 0.8 1.0 1.2 1.Time (s)

    (b )

    1.6 1.8 2.0

    F IGU R E 4 .3 1The response to astep input when(a)K= 100 and(b) K = 20.(c) m-file script.

    % Response to a Unit Step Input R(s)=1/s for K=20 and K=100%numg= [1]; deng=[1 1 0]; sysg=tf(numg,deng);K1=100;K2=20;num1=[11 K 1]; num2=[11 K2]; den=[0 1];sys1=tf(num1,den);sys2=tf(num2,den);%sysa=series(sys1 ,sysg); sysb=series(sys2,sysg);sysc=feedback(sysa,[1]); sysd=feedback(sysb,[1]);/o

    Closed-looptransfer functions.

    t=[0:0.01:2.0];

  • 7/29/2019 Handout Matlab Lect4

    5/6

    272 C h a p te r 4 Fe e d b a c k C o n t ro l Sys te m C h a ra c te r i s ti cscan be altered by feedback control gain, K. Based on our analysis thus far, we wouldprefer to use K = 20. Other considerations must be taken into account before wecan establish the final design.Before making the final choice of K, it is important to consider the system responseto a unit step disturbance, as shown in Figure 4.32. We see that increasing K reduces the

    Disturbance Response for K = 100

    (a)

    Disturbance Response for K=20

    (b)

    FIGURE 4.32The response to astep disturbancewhen (a) K = 100and (b) K = 20.(c) m-file script.

    % Response to a Disturbance Td(s)=Ms for K=20 and K=100%numg= [1]; deng=[1 1 0];sysg=tf(numg,deng);K1=100; K2=20;num1=[11 K1]; num2=[11 K 2]; den=[0 1];sys1=tf(num1 ,den); sys2=tf(num2,den);%sysa=feedback(sysg,sys1); sysa=minreal(sysa); . Closed-loopsysb =feed back (sysg ,sys2); sysb =m inreal(sy sb); transfer functions.%t=[0:0.01:2.5];[y1 ,t]=step(sysa,t); [y2,t]=step(sysb,t);subplot(211),plot(t,y1), title('Disturbance Response for K=100')xlabe l(Time (s)'),ylabel('y(t)'), gridsubplot(212),plot(t,y2), title('Disturbance Response for K=20")xlabel('Tim e (s)'),ylabel('y(t)'), grid -4 Create subplots withx and y labels.

    (c)

  • 7/29/2019 Handout Matlab Lect4

    6/6

    Section 4.10 Sequential Design Example: Disk Drive Read System 273Table 4.4 Response of the Boring Mac hine Control Systemfo rK = 20 and K = 100

    K= 20 K ~ 100Step ResponseOvershoot 4 % 2 2 %T s 1.0 s 0.7 sDisturbance Responsee 5% 1%

    s t e a d y - s t a t e r e s p o n s e of y(t) t o t h e s tep d i s tu rbanc e . Th e s teady-s ta te va lue of y(t)is 0.05 and 0 .01 for K = 20 and 100, respect ively. T h e s teady-s ta te e r ro rs , pe rcen to v e r s h o o t , a n d se t t l ing t imes ( 2 % cr i t e r ia ) a r e s u m m a r i z e d in T a b l e 4 . 4 . T h es teady-s ta te va lues a r e pred ic ted f rom t h e f ina l -va lue theorem for a unit dis turb a n c e i n p u t a s fol lows:

    li m y(t) = lim si > = ., - / v ' , - 0 [s(s + 12) + KJ s KIf o u r only des ign cons idera t ion is dis tu rbance re jec t ion , w e would p re fe r t o u seK = 100.

    We have jus t exper ienced a very common t rade-of f s i tua t ion in cont ro l sys temdes ign . In th i s pa r t i cu la r exam ple , inc reas ing K l e a d s t o be t te r d i s tu rbance re jec t ion ,w h e r e a s d e c r e a s i n g K l eads t o be t t e r pe r fo rm ance ( tha t is , l e ss ove rsho ot ) .T he f ina ldec i s ion o n h o w t o c h o o s e K res ts with t h e design er . Al tho ug h con trol design sof tw a r e c a n certa inly ass is t i n the cont ro l sys tem des ign , it cannot rep lace t h e engi neer ' s dec i s ion-making capab i l i ty a n d in tu i t ion .

    The final step in th e analysis is to look a t t he system sensi t ivi ty t o c h a n g e s i n theprocess . Th e sy stem sensi t ivi ty is given b y ( E q u a t i o n 4 . 6 0 ) ,

    S T _ s(s + 1)s(s + 12) + K'W e c a n c o m p u t e t h e values of SG(S) for different values of.? a n d g e n e r a t e a plot of th esystem sensitivity. For low frequencies , w e c a n a p p r o x i m a t e t h e system sensitivity b y

    sInc reas ing t h e gain K r e d u c e s t h e system sensitivity. T h e system sensi t ivi ty plotsw h e n s = jco a r e s h o w n in Figure 4 .33 fo r K = 20.

    4.10 SEQUENTIAL DESIGN EXAMPLE: D ISK DRIVE READ SYSTEMThe des ign of a disk drive system is an exercise in c o m p r o m i s e a n d opt imiza t ion . Thedisk dr ive must accurately posi t ion t h e head reader while being able to r e d u c e t h eeffects of p a r a m e t e r c h a n g e s a n d external shocks a n d vibrat ions. The mech anical a r mand flexure will resonate a t frequencies that m a y b e caused b y exci ta t ions such as ashock t o a notebook compute r . Dis tu rbances t o the o p e r a t i o n of the disk drive include