Use Matlab to make the Bode plots for the closed-loop system and find the gain margin and phase margin. The system is in a closed-loop, unity gain configuration as shown above. a. Use Matlab to make the Bode plots for the closed-loop system and find the gain margin (GM) and phase margin (PM). b. Is the system stable? Why? c. Use Matlab to design a lead compensator D(s) to raise the phase at the crossover frequency (the frequency where you measure the PM) by 30 degrees. Use the recipe we saw in Lecture 18. Let Matlab calculate alpha and the zero and pole locations of the compensator. Do not round the pole and zero frequencies Matlab calculates. Matlab does not care if we do not have pretty, integer frequencies. What alpha, zero location, and pole location does Matlab find? d. Use Matlab to make the Bode plot of the lead compensator you found in 2.c. Does it look like the compensator will change the phase of G(s) by 30 degrees at the correct frequency? e. Use Matlab to make the Bode plot of the compensated system D(s)G(s). Is the compensated system stable? Why? f. You bumped the phase at the original crossover frequency by 30 degrees. Did the phase margin (PM) change by 30 degrees? Why?
E(s)
R(s)
G(s)
Y(s)