Professional Documents
Culture Documents
Practical: 1 Unit Impulse Response: Num (0 0 1) Den (1 0.2 1) Impulse (Num, Den) Grid Title
Practical: 1 Unit Impulse Response: Num (0 0 1) Den (1 0.2 1) Impulse (Num, Den) Grid Title
num = [0 0 1];
den = [1 0.2 1];
impulse(num,den);
grid
title('Unit-Impulse Response of G(s) = l/(s^2 + 0.2s + 1)')
Output
Unit-Impulse Response of G(s) = l/(sA2 + 0.2s + 1)
1
0.8
0.6
Amplitude
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
10
20
30
40
Time (sec)
50
60
num = [0 0 0 1];
den = [1 1 1 0];
t=0:0.2:7;
dhruvi=step(num,den,t);
plot(t,dhruvi,'*',t,dhruvi,'--')
grid
title('unit ramp response curve for system')
xlabel('t sec')
ylabel('input and output')
Output
7
6
5
4
3
2
1
0
0
t sec
Output
Step Response
From: In(1)
0.4
From: In(2)
To: Out(1)
0.2
0
Amplitude
-0.2
-0.4
2
To: Out(2)
1.5
1
0.5
0
10
12 0
Time (sec)
10
12
Output
Root-Locus Plot
5
4
3
2
lmag Axis
1
0
-1
-2
-3
-4
-5
-14
-12
-10
-8
-6
Rea1 Axis
-4
-2
(2)
Root locus
Output
Root-Locus Plot
2
1.5
1
lmag Axis
0.5
0
-0.5
-1
-1.5
-2
-4
-3.5
-3
-2.5
-2
-1.5
Rea1 Axis
-1
-0.5
0.5
num = [0 0 25];
den = [1 4 25];
bode(num,den)
title('Bode Diagram of G(s) = 25/(sA2 + 4s + 25)')
Output
Magnitude (dB)
20
0
-20
-40
Phase (deg)
-60
0
-45
-90
-135
-180
-1
10
10
10
Frequency (rad/sec)
10
Output
20
Magnitude (dB)
10
0
-10
-20
Phase (deg)
-30
90
45
0
-45
-90
-1
10
10
10
Frequency (rad/sec)
10
(3)
Bode plot
Output
Bode Diagram
Magnitude (dB)
20
0
-20
-40
Phase (deg)
-60
-180
-225
-270
-315
-360
-1
10
10
10
Frequency (rad/sec)
10
num = [0 0 1];
den = [1 0.8 1];
nyquist(num,den)
grid
title('Nyquist Plot of G(s) = l/(s^2 + 0.8s + 1)')
Output
1.5
0 dB
-2 dB
-4 dB
4 dB
-6 dB
6 dB
Imaginary Axis
0.5
-10 dB
10 dB
20 dB
-20 dB
-0.5
-1
-1.5
-1
-0.5
0.5
Real Axis
1.5
Output
Nyquist Plot of G(s) = l/[s(s + 111)]
20
0 dB
15
Imaginary Axis
10
5
0
2
dB
4
6 dB
-2
dB
-4
-6 dB
-5
-10
-15
-20
-1
-0.9
-0.8
-0.7
-0.6
-0.5
Real Axis
-0.4
-0.3
-0.2
-0.1
Output
Nyquist Diagram
From: In(1)
From: In(2)
To: Out(1)
0.5
0
Imaginary Axis
-0.5
-1
3
To: Out(2)
2
1
0
-1
-2
-3
-1
3 -2
Real Axis
-1
Output
a=
-1.5000
-1.2500
1.0000
0
b=
1
0
0
c=
-3.2500
-1.8750
-7.2500
d=
2.5000
1.0000
-3.5000
0
0
Output
a = -0.6667
-1.3333
1.0000
0
b =1
0
c = 8.1111
d =0.333
0.8889
Practical: 8 Residue
num = [5 1 2 3];
den= [1 3 3 1];
sys=tf(num,den)
[r,p,k] = residue(num,den)
Output
Transfer function:
5 s^3 + s^2 + 2 s + 3
--------------------S^3 + 3 s^2 + 3 s + 1
r=
-14
15
-3
p=
-1
-1
-1
k=
5
(2) Residue
num = [8 4 2 8 1 2];
den=[1 2 10 8 9 8];
[r,p,k] = residue(num,den)
Output
r=
-6.2539 +11.2652i
-6.2539 -11.2652i
0.1259 - 0.3533i
0.1259 + 0.3533i
0.2560
p=
-0.6439 + 2.7780i
-0.6439 - 2.7780i
0.0881 + 1.0487i
0.0881 - 1.0487i
-0.8883
k=
8
Output
Plot of Unit-Step Response Curves with -n = 1 and = 0,0.2, 0.4, 0.6, 0.8, 1
2
= 0
1.8
1.6
0.2
Response1
1.4
0.4
1.2
0.6
0.8
1
0.8
0.6
0.4
0.2
0
10
t (sec)
12
14
16
18
20
Respons e1
1.5
1
0.5
0
1
0.5
10
t Sec
15
20
Output
Num/den =
5 s^2 + 70 s + 225
------------------s^3 + 10 s^2 + 24 s