Exercises for lectures 13 Design using frequency methods

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Exercises for lectures 13 Design using frequency methods"

Transcription

1 Exercises for lectures 13 Design using frequency methods Michael Šebek Automatic control

2 Setting of the closed loop bandwidth At the transition frequency in the open loop is (from definition) Value is L( jc ) T( jc ) 1 L( j ) c but it also depends on the phase L( j c ), thus on PM (Phase Margin) For PM = 90 is L( j ) j and small phase - 90, so c j 1 T( jc ) j 2 L( j ) 1 In this case the closed loop bandwidth equals to the transition frequency of open loop exactly! BW c For small PM, the value T( j c ) rises and appears a resonance peak. This bandwidth BW moves to the right, but usually does not exceed 2 c. It is usually c BW 2c. Therefore, we set (OL!!!) in order to ensure the required (CL!!!) c BW Michael Šebek ARI c

3 Relationship of ω c and ω BW Bode plot T( j) with marked and values c BW for various PM It is usually 2 c BW c For a 2 nd order system without zeros, the dependency on is show in the figure c BW C , BW (1 2 ) Michael Šebek ARI

4 Repetition: steady behavior of the Bode plot >> L=(1+s)/(2+s)/(3+s), M 15dB v=value(l,0),l=l/v*10^(15/20),k=value(l,0),bode(l) L = s / 6 + 5s + s^2 K = >> KpdB=20*log10(abs(value(L,j*.01))), Kp=10^(15/20) KpdB = , Kp = >> einfty = 1/(1+Kp) einfty = Initial slope is 0 so the system is of type 0 initial value (without a pole at 0) asymptote is 15 db and thus K 15d B p steady-state error to a step is estep,ss 1 1 K p L=(1+s)/(2+s)/(3+s)/s,v=value(coprime(s*L),0);L=L/v*10, L = s / 6s + 5s^2 + s^3 Kv=value(coprime(s*L),0),bode(L) Kv = Initial slope is 20 db/dek and so the system is of type 1 (with one pole at 0) stretched "initial asymptote" intersects the zero line for frequency 10 and thus K 10 Steady-state error to a ramp v e ( ) ramp K v Michael Šebek Pr-ARI

5 Comparison of time and frequency responses Michael Šebek Pr-ARI

6 Example: Setting K p by a P regulator System is 5 Gs () s 2 32dB K e p ss 2.5, K 20 log 2.5 8dB 1 1 K p p,db 0.29 We want K e ss,2 ss, Kp,2 99 ess,2 p,2,db We use K 1 e 20 log 99 40dB K p,2 K p db p,2, p,db 39.6 K K K dB (Beware - the result is very fast, with a large action peak) 6

7 58390 System Gs () has s s 36 s 100 Example: Setting K v by a P regulator eramp ( ) K If we want to reduce the steady-state error to ramp 10x, we must set Kv We increase the gain 10x, what leads to Ls () We obtain s s 36 s 100 K v v but beware, the result is unstable! Here, P controller will not solve the task! 7

8 Example: Setting of gain for required PM For the position control system in the figure set the preamp gain so that the resulting system reaches 9.5% overshoot by a step of reference. From the required overshoot we calculate the damping (of dominant poles) ln(%os 100) ln(0, 095) , ln (%OS 100) ln (0,095) and from that we obtain PM PM arctan arctan (0.6) 1 4 (0.6) The open loop transfer function has an indefinite K To draw the Bode plot and perform a design on the plot we have to choose some K. Let choose K = 3.6 and obtain Ls () s s L K K 36s 100 () s s s s 100 8

9 Example: Setting of gain for required PM We draw a Bode plot LK 3.6 ( s) 360 s s 36s 100 and find a frequency, for which L( j) From the graph we subtract 14.8rad s For this frequency the amplitude is L( ) M( ) dB and therefore we must increase gain by 44.2 db, so cca 162.2x. Then we obtain Ls () s s s 100 Simulation verifying the correct design is necessary. We continue later with this example and for this purpose we measure Kv e ( ) ramp 44.2dB rad s 9

10 Example: Setting PD System transfer function (aircraft attitude) Requirements e K 1 e 2257 ramp, ss v ramp, ss PM 80 First set K p = , to increase K v,1 = 12.5 to K v =2258 and to ensure the required regulation error. Then search for the part 1 KDs Obtained PD regulator for the system is K G() s P ss Gs () K p 45dB Kv, ss Kv,

11 Example: Setting PD We draw the Bode plot for system L( s) KP 1 KDs G( s) s s for K d = 0. We find ω D, at which PM = required (regulator phase at ω D ) = = 35 where the phase is = = It is D 516. We calculate 1 1 KD Resulting L has a Bode plot. The requirement is fulfilled: PM = K Ds D 145 Phase of PD regulator D K P K D D KP KD 10K P K D 11

12 One more example: Setting PD For a transfer function Gs () s s Consider, we already designed K P = 1 and now we set K D in PD regulator for good PM We draw Bode plot for following values KD 0, 0.002, 0.005, 0.02 Uncompensated system (K d = 0) has PM = 7.78 To reach PM 58.5 PM = 80, regulator should PM add 72,22 to the new ω c From figure it follows, that it is impossible. High regulator gain PM 7.78 shifts ω c to higher frequencies, where phase of the uncompensated system declining faster than it is increased by the compensator s D K s PM 25.9

13 For a transfer function Gs () Find a PI regulator, that increases PM = 22.6 to PM new = 65 Draw a Bode graph Ls () K s K K 2 s s First for K p = 1 and K I = 0 From requirement PM new =65 find ω c,new = 170 rad/s and calculate K P G j K I choose so that the corner freq. is less than a decade ω c,new K K P I P ( c, new ) db K I P c, new I P c, new 10 K ss Example: Setting PI PM new 65 c, new c PM 22.6

14 Example: Setting PI For this K 1.42 calculate the transfer function and draw the Bode plot Ls () We obtain PM new =59, what does not satisfy the requirement. Lets try to use a smaller K I (= move the corner frequency to left). For example K I = 0.07 leads to the transfer function L () s 2 2 with PM new = 64.3 I KP s KI KP 68489s s s s s s s s

15 PID See the attached document. 15

16 Example: Lag regulator design Task: For a plat give by a transfer function Fs () 1 2s 30 s s design a Lag regulator satisfying these requirements: e, 0.05, PM 45 ss ramp Solution: 1. Find the value of the gain providing the desired deviation: ( ) ( ) K L1 s KF s s s 2 30 e ss, ramp s K 1200 Kv lim sl1 ( s) K K 0.05 s0 230 This OL transfer function gives incorrect PM and GM >> K=1200;F=1/s/(s+2)/(s+30);L1=K*F L1 = 1200 / 60s + 32s^2 + s^3 >> [GM,PM,om_cp,om_cg]=margin(tf(L1)) GM = PM = om_cp = om_cg = >> GM_dB = 20*log10(GM) GM_dB = Michael Šebek ARI

17 Phase (deg) Magnitude (db) Example: Lag regulator design 2. Draw a Bode plot L L1 () s s s s 30 From the required PM we calculate necessary phase and we find new ω c,new = 1.28 rad/s At this frequency, we find the necessary attenuation c, new Bode Diagram C( j ) 22.1dB db System: untitled1 Frequency (rad/s): 1.31 Magnitude (db): 22.1 System: untitled1 Frequency (rad/s): 1.28 Phase (deg): Frequency (rad/s) 3. We calculate the parameter a from the measurements or from a transfer fcn. a C( j ) 22.1dB c, new db C( j ) c, new = C( j ) 10 db c, new >> aa=1/abs(value(l1,j*1.28)) aa = Michael Šebek ARI

18 4. We calculate zero and pole 5. The final regulator is p c z c 10 c, new Example: Lag regulator design az c C lag () s as pc s s p s c 6. Finally, we verify if the regulator satisfies the requirements. Michael Šebek ARI

19 Phase (deg) Magnitude (db) Example: Lag regulator design Bode Diagram rad/s rad/s System: untitled3 Phase Margin (deg): 49 Delay Margin (sec): 0.65 At frequency (rad/s): 1.32 Closed loop stable? Yes Frequency (rad/s) >> Kv=value(coprime(s*L2),0), e_ss_ramp=1/kv Kv = , e_ss_ramp = Michael Šebek ARI

20 Other Example: Lag compensation In the positioning control system, Ls () the gain was by previous method adjusted so ss 36s 100 that the system has overshoot 9.5% and 1 Kv eramp ( ) Kv Add Lag compensation so that the steady state value to the ramp is 10x smaller and the overshoot does not increase The steady state leads to Kv 162.2, so we have to increase the gain 10 and then we obtain Ls () The overshot requirement 9.5% leads to ss 36s PM 59.2 Because Lag decreases PM only little, but still (we expect a deteriorateon PM 5 12 ), we consider rather PM Lets find a frequency, for which the phase is L( j)

21 Lag compensation From required phase we determine frequency 9.8rad s 24dB Ls () 36s 100 s s and then the value 20log M( ) 24dB rad s From the definition, PM for should be 20log M( ) 0dB 9.8rad s Lag should have at the frequency attenuation 24dB 21

22 Lag compensation Draw the asymptote for higher frequencies in 20log M( ) 24dB 1 T 0.062rad s 20dB dek 24dB 1 T 0.98rad s The upper corner frequency is chosen by a decade left from 9.8rad s, it is 1 T 0.98rad s From there we continue with the slope 20dB dek to 0dB, what we reach for 1 T 0.062rad s After substitution we obtain s 1 T s 0.98 Cs () s 1 T s It has correct shape, but not the gain, so we set up the DC gain of the compensator s 0.98 K DC( s) KCC( s) C 1 p z DC(0) 1 0dB s

23 Lag compensation The result is s 100 s s 0.063( s 0.98) s ( s 0.98) s s 36s100 s Compensated system Lag compensator Amplified uncompensated system Step response Ramp response 23

24 Lets get back to the positioning control system and design a regulator according to specifications: OS 20%, K v = 40, T p = 0,1s First set up gain so, that K 40 K lim sl( s) K 40 K 1440 v s0 Lets substitute it and continue From the given specification we calculate PM a ω BW : v Example: Lead compensation Ls () s s Ls () s s 100K 36s s 100 ln(%os 100) PM arctan ln (%OS 100) BW 2 1 T p rad s 24

25 Lead compensation Draw a Bode plot for This uncompensated system has PM = 34,1 By Lead compensation we increase PM to required value Since Lead also increases ω C, we add also some compensation factor. To compensate the smaller phase for larger frequencies ω C we choose the factor as 10º. Ls () s 100 s s We require the regulator phase increase of

26 Lead compensation We require the regulator phase increase of 48, = 24,1 Generally the compensated system should have PM 48.1 a BW 46.6rad s It should not produce satisfactory results, we have to repeat the design with other correction factor. From the phase growth requirement we have max 24.1 and from it It follows that 1 sin 1 sin max max D( max ) 3.76dB If we choose C, new max, then at this frequency the amplitude of the uncompensated system should be -3,76 db According to that we find ω max Michael Šebek Pr-ARI

27 Lead compensation On the Bode plot Ls () s s s 100 We measure max 39rad s. Then from and 0.42 we calculate max 3.76dB max 39rad s max T , 60.2 T T and in the end, we obtain the search factor 1 s ( ) T s Ds s s 60.2 T 27

28 Lead compensation The result is: Compensated system Uncompensated system Lead compensator Simulation: OS% 22.6, PM 45.5, 39 rad s 68.8rad s, T 0.075s, K 40 BW p v C 28