Matlab Manual
Matlab Manual
Experiment No. 01
INTRODUCTION TO MATLAB
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No. 02
Aim: - Determine transpose, inverse values of given matrix.
Theory: -
A = [1 2 0; 2 5 -1; 4 10 -1]
A=
1 2 0
2 5 -1
4 10 -1
B = A'
B=
1 2 4
2 5 10
0 -1 -1
Inverse of matrix
X = inv(A)
X=
5 2 -2
-2 -1 1
0 -2 1
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No. 03
Aim: - Plot the pole-zero configurations in s-plane for the given transfer
function.
Theory: -
8( + 3)( + 4)
() =
( + 2)( 2 + 2 + 5)
1 = 8 2 + 56 + 96
1 = 4 + 4 3 + 9 2 + 5
The commands are given as follows:
>> p1 = [8 56 96] ; q1 = [1 4 9 10 0]
Q1=
1 4 9 10 0
Transfer function :
8s2 + 56s + 96
4 + 4s3 + 9 2 + 10s
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No. 04
Aim: - Determine the transfer function for given closed loop system in block
diagram representation.
num/den =
1
2 + 2
num/den =
4
1
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
>> n3 = [1 0] ; d3 = [0 1];
num/den =
+4
1
num/den =
+4
2 +2
+4
num/den =
2 +2.5+2
+4
Num/den =
2 +3.5+6
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No. 05
Aim: - Plot unit step response of given transfer function and find peak
overshoot, peak time.
() 4+4
= 2
() +2+5
Theory: -
num =
4 4
>> den = [1 2 5]
den =
1 2 5
Transfer function :
4 + 4
2 + 2 + 5
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No. 06
Aim: - Plot unit step response and to find rise time and delay time.
+2
() =
( + 1)
num/den =
+2
2 +
n4 =
0 1 2
d4 =
1 2 2
num/den =
+2
2 +2+2
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No 7
Aim: - The open loop transfer function of a unity feedback system is given
below:
() =
( + 2)( 2 + 2 + 2)
Theory:-
P=1
>>q= [1 4 6 4 0]
Q=
1 4 6 4 0
Transfer function:
1
4 +43 +62 +4
>>rlocus (sys 5)
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No 8
Aim: - Sketch the root locus plot for open-loop transfer function
()() =
( + 1)( + 3)
Theory:-
>>P=1
P=1
>>q=[1 4 3 0]
Q= 1 4 3 0
>>sys 3=tf(p,q)
Transfer function :
1
3 +4 2 +3
>>rlocus (p,q)
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No 9
Aim: - A unity feedback control system has its forward path transfer function as
210
() =
( + 2)( 2 + 12 + 6)
Theory:-
>>sys=tf(n1,d1)
Transfer function:
210
4 + 44 3 + 390 2 + 192
>>[num.den]=cloop(n1,d1)
Num =
0 0 0 0 210
Den=
>>sys1=tf(num,den)
Transfer function:
210
4 + 44 3 + 390 2 + 192 + 210
>>roots (den)
Ans=
-31.9898
-11.5578
-0.2262+0.71891
-0.2262-0.71891
>>sisotool(sys)
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No 10
Aim: - sketch the Bode plot for the transfer function given below.
2( + 0.25)
()() =
2 ( + 1)( + 0.5)
Theory:-
Den=
>>sys1=tf(num,den)
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Transfer function:
2 + 0.5
4 + 1.5 3 + 0.5 2
>>margin(sys1)
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No. 11
Aim: - Draw the Nyquist plot for the open loop transfer function given below
and Comments on closed-loop stability
2.2
()() =
( 2 + 2 + 2)( + 1)
Theory:-
Num=2.2000
>>den=[1 3 4 2 0]
Den=1 3 4 2 0
>>sys 4 = tf(num,den)
Transfer function:
2.2
4 + 3 3 + 4 2 + 2
>>load ltiexamples
>>ltiview
Software lab-III
(EC-506) Lab Manual
Institute of Engineering & Science, IPS Academy Indore
Department of Electronics & Communication Engg
Software Lab-III (EC- 506)
Experiment No. 12
Aim: - Plot the Nyquist plot for given transfer function and to discuss closed
loop stability, gain and phase margin.
( 1)
()() =
( + 2)( + 3)
Theory: -
n1=
10-10
>>d1=[1 5 6]
d1=1 5 6
Transfer function:
10 10
2 + 5 + 6
>>load ltiexamples
>>ltiview
Software lab-III
(EC-506) Lab Manual