You are on page 1of 3

INPUT:

//Name:Prathmesh Shelke
//SE ECS RollNo.:55
//Experiment 5:Determine Step and Impulse response for Type '0', Type '1', Type '2' Systems

clc ;clear; close;


s =%s;
t= 0:0.01:100;
p0 =poly ([100 100], "s",'c');
q0 =poly ([20 20 1 ],"s", 'c');
G0 =syslin ('c',p0/q0);
disp('Name:Prathmesh Shelke SE ECS RollNo.:55 Experiment 5 :')

H =1;
C0=G0 *H;
disp(C0,'Type O OLTF G(s.)H(s.)=')
C01=csim('step',t,C0);
subplot(3,2,1)
plot(t,C01)
title('Step Response of Type 0 System')
C02 = csim('impulse',t,C0);
subplot(3,2,2)
plot (t,C02)
title('Impulse Response of Type 0 System')

p1 = poly([100 100],"s",'c');
q1 = poly([0 20 12 1], "s",'c');
G1 = syslin('c',p1/q1);

H =1;
C1 = G1 * H ;
disp (C1, ' Type 1 OLTF G(s)H(s)=')
C11 =csim('step',t,C1);
subplot(3,2,3)
plot(t,C11)
title('Step Response of Type 1 System')
C12 = csim ('impulse' ,t,C1);
subplot(3,2,4)
plot(t,C12)
title('Impulse Response of Type 1 System')

p2 = poly([100 100],"s",'c');
q2 = poly([0 0 20 12 1], "s",'c');
G2 = syslin('c',p2/q2);

H =1;
C2 = G2 * H ;
disp (C2,'Type 2 OLTF G(s)H(s)=')
C21 =csim('step',t,C2);
subplot(3,2,5)
plot(t,C21)
title('Step Response of Type 2 System')
C22 = csim ('impulse' ,t,C2);
subplot(3,2,6)
plot(t,C22)
title('Impulse Response of Type 2 System')
CONSOLE:
OUTPUT:

You might also like