Professional Documents
Culture Documents
CS 3 Doc
CS 3 Doc
CS 3 Doc
k=1;
z=[]; 1
T=0:0.01:20;
G=zpk(z,p,k); 0.8
sys=feedback(G,1);
response=step(sys,T);
output
0.6
plot(response)
grid on;
0.4
xlabel('time');
ylabel('output');
title('unit step response') 0.2
0
0 500 1000 1500 2000 2500
time
2. p=[0 -1 -2]; 1.2
z on negative real axis
k=-(1./z); z=-1
z=[-1 -5 10]; 1
z=-5
T=0:0.01:40; z=10
response=step(sys,T);
plot(response) 0.6
grid on;
hold on; 0.4
end
xlabel('time');ylabel('output'); 0.2
legend('p=0','p=-1','p=-2')
title('z on negative real axis') 0
0 500 1000 1500 2000 2500
time
4. s=tf('s'); Step Response
1.4
td=[0.1 0.3 0.5 0.7];
td=0.1
for i=1:length(td) 1.2 td=0.3
g1= exp(-td(i)*s); td=0.5
td=0.7
g2= tf([1],[1 3 2 0]); 1
G=g1*g2; 0.8
sys=feedback(G,1);
Amplitude
'td=0.7')
-0.2
title('Step Response') 0 5 10 15 20 25 30 35
time (seconds)