HW5-Solutions

pdf

School

Purdue University *

*We aren’t endorsed by this school

Course

375

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

13

Uploaded by ColonelHeat13546

Report
ME375 Homework 5 - Spring 2024 Due at 5:00pm on Wednesday, March 20 R ( s ) + Y ( s ) P ( s ) C ( s ) - Figure 1: Use this figure for Problem 1 1. (Lead compensator design) Given the plant P ( s ) = 1 s ( s + 1) in the block diagram of Figure 1, your objective is to design a lead compensator, C ( s ), such that the closed loop system will have about 15% maximum overshoot and 2% settling time of about 1.33 s. a. Estimate the closed loop bandwidth and phase margin corresponding to about 15% overshoot and 2% settling time of 1.33 seconds. (For simplicity, assume the closed loop bandwidth, closed loop natural frequency, and gain crossover frequency are equal.) Percent overshoot is related to damping ratio % overshoot = 100% e πζ 1 ζ 2 (1) 15% = (2) ζ = 0 . 52 (3) Damping ratio is approximately related to phase margin (in degrees) ζ PM 100 (4) PM 100 ζ (5) 100 · 0 . 52 (6) = 52 (7) 2% settling time t 2% = 4 ζω n (8) ω n = 4 ζt 2% (9) = 4 0 . 52 · 1 . 33 (10) = 5 . 78 rad/s (11) Approximate bandwidth ω BW ω n (12) 5 . 78 rad/s (13) b. Use frequency domain controller techniques to construct an initial design for a lead compensator of the form C ( s ) = K s z s p to achieve the objective. (Note, your initial design need not perfectly meet the objective.) Approach 1 (gain crossover frequency is in the ballpark) 1 Copyright 2024, Todd Lillian
ME375 Homework 5 - Spring 2024 Due at 5:00pm on Wednesday, March 20 Let’s approximate the desired gain crossover frequency with bandwidth. ω gc ω BW (14) 5 . 78 rad/s (15) Find K to satisfy gain crossover frequency K = 1 | P ( gc ) | (16) = | gc ( gc + 1) | (17) = | j 5 . 78( j 5 . 78 + 1) | (18) = | j 5 . 78 | | ( j 5 . 78 + 1) | (19) = 5 . 78 · p 5 . 78 2 + 1 2 (20) = 33 . 9 (21) How much phase angle do we need to add at ω gc to meet our margin requirement (including somewhere between 5-12 extra; lets use 7 . 8 ) additional phase = PM ̸ P ( gc ) + 7 . 8 (22) = PM (180 + ̸ P ( gc )) + 7 . 8 (23) = 52 (180 + ̸ 1 gc ( gc + 1) ) + 7 . 8 (24) = 52 (180 + ̸ 1 j 5 . 78( j 5 . 78 + 1) ) + 7 . 8 (25) = 42 . 2 + 7 . 8 (26) = 50 (27) Calculate the corresponding ratio α = z p α = 1 sin(additional phase) 1 + sin(additional phase) (28) = 1 sin(50 ) 1 + sin(50 ) (29) 0 . 133 (30) Lead compensator C ( s ) = K 1 α s + ω gc α s + ω gc α (31) = 33 . 9 1 0 . 133 s + 5 . 78 0 . 133 s + 5 . 78 1 0 . 133 (32) = 255 s + 2 . 11 s + 15 . 8 (33) Although this approach will get us sufficiently close to an acceptable controller that we can iterate, it yields a larger than required gain crossover frequency. In many applications this may be a good thing because the system will respond faster. Approach 2 (exact gain crossover frequency) Let’s approximate the desired gain crossover frequency with bandwidth. ω gc ω BW (34) 5 . 78 rad/s (35) 2 Copyright 2024, Todd Lillian
ME375 Homework 5 - Spring 2024 Due at 5:00pm on Wednesday, March 20 How much phase angle do we need to add at ω gc to meet our margin requirement additional phase = PM ̸ P ( gc ) (36) = PM (180 + ̸ P ( gc )) (37) = 52 (180 + ̸ 1 gc ( gc + 1) ) (38) = 52 (180 + ̸ 1 j 5 . 78( j 5 . 78 + 1) ) (39) = 42 . 2 (40) Calculate the corresponding ratio α = z p α = 1 sin(additional phase) 1 + sin(additional phase) (41) = 1 sin(42 . 2 ) 1 + sin(42 . 2 ) (42) 0 . 196 (43) How much gain, K , do we need to make ω gc the crossover frequency K = 1 1 α gc + ω gc α gc + ωgc α P ( gc ) (44) = 1 1 α j + α αj +1 P ( gc ) (45) = 1 1 α | P ( gc ) | (46) = α | gc ( gc + 1) | (47) = . 196 | j 5 . 78( j 5 . 78 + 1) | (48) = . 196 | j 5 . 78 | | ( j 5 . 78 + 1) | (49) = . 196 · 5 . 78 · p 5 . 78 2 + 1 2 (50) = 15 . 0 (51) Lead compensator C ( s ) = K 1 α s + ω gc α s + ω gc α (52) = 15 . 0 1 0 . 196 s + 5 . 78 0 . 196 s + 5 . 78 1 0 . 196 (53) = 76 . 6 s + 2 . 56 s + 13 . 1 (54) c. Use software to compute the phase margin, gain margin, and gain crossover frequency for your design. see Matlab script below which uses the second approach from above d. Use software to plot the closed loop step response for your system. see Matlab script below which uses the second approach from above e. Use software to determine the maximum percent overshoot and settling time for your system. (Hint, you may want to use the stepinfo(sys) command in Matlab.) see Matlab script below which uses the second approach from above 3 Copyright 2024, Todd Lillian
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
clear all clc close all P=tf(1,[1,1,0]); C=zpk(-2.56,-13.1,76.6); margin(P*C) figure() sys=feedback(P*C,1); step(sys) stepinfo(sys) ans = struct with fields: RiseTime: 0.2056 TransientTime: 1.0396 SettlingTime: 1.0396 SettlingMin: 0.9154 SettlingMax: 1.2093 Overshoot: 20.9291 Undershoot: 0 Peak: 1.2093 PeakTime: 0.5006 1
Published with MATLAB® R2021b 2
ME375 Homework 5 - Spring 2024 Due at 5:00pm on Wednesday, March 20 R ( s ) + Y ( s ) P ( s ) C ( s ) - Figure 2: Use this figure for Problem 2 2. (Lag-lead compensator design) Given the plant P ( s ) = 1 ( s 2 + 2 s + 2)( s + 5) in the block diagram of Figure 2, your objective is to design a lag-lead compensator, C ( s ), such that the resultant system has a phase margin of 45 , steady state error to a unit step of 0.01, and gain crossover frequency of ω gc = 3 rad/s. Complete the following: a. Determine the static gain of lag-lead compensator, K , necessary to meet the steady state error requirement. e ss = 1 1 + K p (55) K p = 1 e ss 1 (56) KP (0) = (57) K = 1 e ss 1 P (0) (58) = 100 1 1 10 (59) = 990 (60) b. Design a lead compensator to meet the phase margin requirement at the desired crossover frequency, ω gc = 3. Additional phase needed from lead compensator (an extra 5.57 are added to account for a reduction in angle by the lag compensator) additional angle = PM (180 + ̸ P ( ω gc )) (61) = 45 + 5 . 57 180 ̸ 1 ( ω 2 gc + 2 gc + 2)( gc + 5) (62) = 45 + 5 . 57 180 + ̸ ( ω 2 gc + 2 gc + 2) + ̸ ( gc + 5) (63) = 45 + 5 . 57 180 + ̸ ( 3 2 + 2 j 3 + 2) + ̸ ( j 3 + 5) (64) = 45 + 5 . 57 180 + ̸ ( 7 + 6 j ) + ̸ (5 + 3 j ) (65) = 45 + 5 . 57 180 + tan 1 6 7 + tan 1 3 5 (66) = 45 + 5 . 57 180 + 139 . 4 + 30 . 96 (67) = 40 . 93 (68) lead ratio α = 1 sin(additional phase) 1 + sin(additional phase) (69) = 1 sin(40 . 93 ) 1 + sin(40 . 8 ) (70) = 0 . 2084 (71) 6 Copyright 2024, Todd Lillian
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
ME375 Homework 5 - Spring 2024 Due at 5:00pm on Wednesday, March 20 Lead compensator C lead ( s ) = K 1 ωgc α s + 1 α ωgc s + 1 (72) = 990 1 3 0 . 2084 s + 1 0 . 2084 3 s + 1 (73) = 990 1 1 . 370 s + 1 1 6 . 572 s + 1 (74) c. Design a lag compensator such that the gain crossover frequency is ω gc = 3 rad./s. Current gain at ω gc = 3 Γ = P ( gc ) C lead ( gc ) | (75) = 1 (( gc ) 2 + 2 gc + 2)( gc + 5) 990 1 1 . 370 jωgc + 1 1 6 . 572 gc + 1 (76) = 40 . 33 (77) Lag compensator C lag ( s ) = 10 ω gc s + 1 10Γ ω gc s + 1 (78) = 1 0 . 3 s + 1 1 0 . 0074 s + 1 (79) d. Use software to determine the gain and phase margin for your design. See matlab script below Gain margin: GM=11.1 dB /Users/tlillian/Library/Mobile Documents/com apple CloudDocs/Course Content/ME375- 2024-Spring/HW/HW5/Figures/HW4Prob1Figure.pdf Phase margin: PM=44.8 e. Compute the closed loop poles for your design to verify its stability. See matlab script below Stable: all poles have negative real parts. 7 Copyright 2024, Todd Lillian
clear all clc close all ess=1/100; P=zpk([],[-1-1j,-1+1j,-5],1); w_gc=3; NSF=4; %number of sig figs K=round((1/ess-1)/dcgain(P),NSF, 'significant' ); AdditionalPhase=round(45+5.569- (180+rad2deg(angle(freqresp(P*K,w_gc)))),4, 'significant' ); alpha=round((1-sin(deg2rad(AdditionalPhase)))/ (1+sin(deg2rad(AdditionalPhase))),NSF, 'significant' ); z=round(w_gc*sqrt(alpha),NSF, 'significant' ); p=round(w_gc/sqrt(alpha),NSF, 'significant' ); C1=tf([1/z,1],[1/p,1])*K; Gamma=round(abs(freqresp(C1*P,w_gc)),NSF, 'significant' ); w_z=round(w_gc/10,NSF, 'significant' ); w_p=round(w_z/Gamma,NSF, 'significant' ); C2=tf([1/w_z,1],[1/w_p,1]); margin(P*C1*C2) pole(feedback(P*C1*C2,1)) ans = -9.4417 + 0.0000i -1.1527 + 3.6230i -1.1527 - 3.6230i -0.2225 + 0.0000i -1.6097 + 0.0000i 1
Published with MATLAB® R2021b 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
ME375 Homework 5 - Spring 2024 Due at 5:00pm on Wednesday, March 20 R ( s ) + Y ( s ) P ( s ) C ( s ) - Figure 3: Use this figure for Problem 3 3. (PI compensator design) Given the plant P ( s ) = 1 ( s + 1)( s + 5) in the block diagram of Figure 3: design a PI compensator, C ( s ), such that the resultant system has a phase margin of 45 . Complete the following: a. Design a PI compensator, C ( s ), such that the resultant system has a phase margin of 45 . Find the frequency at which the phase margin would be 45 with a 5-12 cushion. Using 10 yields Graphically Intersection of Bode plot with -125 : 5.1686 rad/s Algebraically ̸ P ( gc ) + 180 = 55 (80) ̸ 1 ( gc + 1)( gc + 5) = 125 (81) ̸ 1 ω 2 gc + 6 gc + 5 = (82) tan 1 6 ω gc 5 ω 2 gc = (83) 6 ω gc 5 ω 2 gc = tan (125 ) (84) tan (125 ) ω 2 gc 6 ω gc + 5 tan (125 ) = 0 (85) ω gc = 6 ± p 6 2 + 4 · 5 tan 2 (125 ) 2 tan (125 ) (86) = 6 + p 6 2 + 4 · 5 tan 2 (125 ) 2 tan (125 ) (87) = 5 . 1686 rad/s (88) This is the desired gain crossover frequency: ω gc = 5 . 1686 rad/s (89) Select K to make achieve the desired gain crossover frequency K = 1 | P ( gc | (90) = | ( gc + 1)( gc + 5) | (91) = q ω 2 gc + 1 q ω 2 gc + 5 (92) = p 5 . 1686 2 + 1 2 p 5 . 1686 2 + 5 2 (93) = 37 . 8581 (94) 10 Copyright 2024, Todd Lillian
ME375 Homework 5 - Spring 2024 Due at 5:00pm on Wednesday, March 20 Set ω z using the rule of thumb ω z = ω gc 10 (95) = 0 . 51686 (96) PI compensator C PI = K s + ω z s (97) = 37 . 8581 s + 0 . 51686 s (98) b. Use software to determine the gain and phase margin of your design. See matlab script below Gain margin: GM= Phase margin: PM=49.2 c. Compute the closed loop poles of your design to verify stability. See matlab script below stable: all poles have negative real parts 11 Copyright 2024, Todd Lillian
clear all clc close all P=zpk([],[-1,-5],1); wgc=(6+sqrt(6^2+20*tand(125)^2))/(-2*tand(125)) K=1/abs(freqresp(P,wgc)) C=zpk(-wgc/10,0,K); margin(C*P) pole(feedback(C*P,1)) wgc = 5.1686 K = 37.8583 ans = -0.4871 + 0.0000i -2.7565 + 5.7075i -2.7565 - 5.7075i 1
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Published with MATLAB® R2022b 2