
.
.
:حل تمرین
clc;clear;close all
t0=0; tfinal=10; n=500; t=linspace(t0,tfinal,n);
for K=[10 100 500 1000 1500]
num1=[K] ; den1=[1 70];
G1=tf(num1,den1)
num2=[10] ; den2=conv([1 3],[1 7]);
G2=tf(num2,den2);
G3=series(G1,G2);
GF=feedback(G3,1);
u=t;
[y1,t1]=step(GF,t);
[y2,t2]=impulse(GF,t);
[y3,t3]=lsim(GF,u,t);
subplot(2,2,1)
plot(t1,y1)
legend('K1=1', 'K2=10', 'K3=100')
title('Closed Loop System Step Resonse');
xlabel('Time (seconds)')
ylabel('Amplitude')
grid on
hold on
subplot(2,2,2)
plot(t2,y2)
legend('K1=1', 'K2=10', 'K3=100')
title('Closed Loop System Impulse Resonse');
xlabel('Time (seconds)')
ylabel('Amplitude')
grid on
hold on
subplot(2,2,3)
plot(t3,y3)
legend('K1=1', 'K2=10', 'K3=100')
title('Closed Loop System Ramp Resonse');
xlabel('Time (seconds)')
ylabel('Amplitude')
grid on
hold on
end



دیدگاهها
هیچ نظری هنوز ثبت نشده است.