Download - Steady State MATLAB

Transcript

s = tf('s');G = ((s+3)*(s+5))/(s*(s+7)*(s+8));T = feedback(G,1);t = 0:0.1:25;u = t;[y,t,x] = lsim(T,u,t);plot(t,y,'y',t,u,'m')xlabel('Time (sec)')ylabel('Amplitude')title('Input-purple, Output-yellow')

K = 37.33 ;s = tf('s');G = (K*(s+3)*(s+5))/(s*(s+7)*(s+8));sysCL = feedback(G,1);t = 0:0.1:50;u = t;[y,t,x] = lsim(sysCL,u,t);plot(t,y,'y',t,u,'m')xlabel('Time (sec)')ylabel('Amplitude')title('Input-purple, Output-yellow')

s = tf('s');P = ((s+3)*(s+5))/(s*(s+7)*(s+8));C = 1/s;sysCL = feedback(C*P,1);t = 0:0.1:250;u = t;[y,t,x] = lsim(sysCL,u,t);plot(t,y,'y',t,u,'m')xlabel('Time (sec)')ylabel('Amplitude')title('Input-purple, Output-yellow')