Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLEASE HELP!!!! Problem #1 (35 pts.) Consider the following closed-loop system,

ID: 2249933 • Letter: P

Question

PLEASE HELP!!!!

Problem #1 (35 pts.) Consider the following closed-loop system, in which PCs) = 750 R(s) C(s) P(S)Y(s) Use MATLAB to generate a Bode diagram that allows you to design a lead compensator (including appropriate gain K) such that the compensated system simultaneously satisfies the following conditions: a) Steady-state error due to a unit step input is 1/100, or ess 0.01 b) Phase margin is 45.00.5. (Your lead controller will likely need between 6 and 10° of"extra" margin to accomplish this objective.) Verify your compensator design using MATLAB code. Include your script, and include a Bode diagram with two traces; one for compensation with proportional gain K alone, and one for compensation with your final lead controller. [Hint: Use Matlab command hold on to plot multiple traces on the same figure, and use the command margin(sys) to display resulting phase margins. The last system used with the margin command will control the margin values shown when combined on the same plot. Use the command legend) to identify the traces in your final plot.]

Explanation / Answer

clear all % clear all variables

close all % close all previous graphs

K=9600 % value of K calculated from error constants

'G(s)' % Display heading

G=tf(K,conv([1 4 0],[1 80])) % make the transfer function

[Gm,Pm]=margin(G) %get the gain margin and phase margin

margin(G) %plot the bode plot

Pd=input('Enter Desired Phase margin')

ep=input('Enter value e') % enter the value of epsilon initially start with 5

ph=Pd-Pm+ep

if ph>60 % check if angle needed is greater than 60

phm=ph/2

else

phm=ph

end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote