Professional Documents
Culture Documents
Ans 1:
a) num=[0 0 160 2880 2720];
den=[1 180 330 2880 2720];
step(num,den);
grid;
title('Step Response');
b) sys = tf([0 0 160 2880 2720],[1 180 330 2880 2720]);
S = stepinfo(sys,'RiseTimeLimits',[0.05,0.95])
ouput of 1)b):
S=
RiseTime: 0.3237
SettlingTime: 9.7991
SettlingMin: 0.4522
SettlingMax: 1.7448
Overshoot: 74.4801
Undershoot: 0
Peak: 1.7448
PeakTime: 0.7226
output of 1 a) is given separately.
Step Response
1.8
1.6
1.4
Amplitude
1.2
0.8
0.6
0.4
0.2
8
Time (sec)
10
12
14
Ans 2:
a)
num=[0 0 10];
den=[1 2 10];
step(num,den);
grid;
title('Step Response');
b)
num=[0 0 10];
den=[1 2 10];
impulse(num,den);
grid;
title('Impulse Response');
c)
num=[0 10 0];
den=[1 2 10];
t=0:0.1:7;
c=step(num,den,t);
plot(t,c,'o',t,t,'--');
grid;
title('Ramp Response');
Step Response
1.4
1.2
Amplitude
0.8
0.6
0.4
0.2
3
Time (sec)
Impulse Response
2.5
Amplitude
1.5
0.5
-0.5
-1
4
Time (sec)
Ramp Response
7
-1
Ans 3:
a)
A=[-1 -0.5; 1 0];
B=[0.5; 0];
C=[1 0];
D=[0];
step(A,B,C,D);
grid;
title('Step Response');
b)
A=[-1 -0.5; 1 0];
B=[0.5; 0];
C=[1 0];
D=[0];
impulse (A,B,C,D);
grid;
title('Impulse Response');
c)
A=[-1 -0.5; 1 0];
B=[0.5; 0];
C=[1 0];
D=[0];
[n,e]=ss2tf(A,B,C,D);
t=0:0.1:7;
c=step(n,e,t);
plot(t,c,'o',t,t,'--');
grid;
title('Ramp Response');
Step Response
0.35
0.3
0.25
Amplitude
0.2
0.15
0.1
0.05
-0.05
8
Time (sec)
10
12
14
Impulse Response
0.5
0.4
Amplitude
0.3
0.2
0.1
-0.1
-0.2
5
Time (sec)
10
Ramp Response
7
-1