Introduction To Transfer Function in MATLAB
Introduction To Transfer Function in MATLAB
Introduction To Transfer Function in MATLAB
:
Roll no.: 11 University of Calcutta
Date:
Problem 1:
a) Find out the Transfer function of a first-order system where the coefficient of s is 4,
and 7 in the denominator.
b) Find out the transfer function of a second order system in which the coefficient of s in
2
the numerator is 0, and the coefficient of s in the denominator is 12.
a) Code: b) Code:
Num = [4 5]; Num = [2 0 1];
Den = [7 3]; Den = [12 2 4];
G = tf(Num, Den) G = tf(Num, Den)
Output: Output:
G= G=
4s+5 2 s^2 + 1
------- ---------------
7s+3 12s^2 + 2s + 4
Problem 2:
20 s
G1(s) = 2
s +4 s and G2(s) = s+ 6 . Find the series and parallel of G1(s) and G2(s).
Code:
num1=[20];
den1=[1 4 0];
G1 = tf(num1,den1);
num2=[1 0]
den2=[1 6];
G2 = tf(num2,den2);
Gs = series(G1,G2)
Gp = parallel(G1, G2)
Output(s):
>>Series: Gs =
20 s
-------------------
s^3 + 10 s^2 + 24 s
>>Parallel: Gp =
system. Also find the feedbacks when there is unity feedback in system [H(s) = 1].
Code:
num1=[1 1];
den1=[1 10 2];
G = tf(num1,den1);
num2=[1 0];
den2=[1 1];
H = tf(num2,den2);
Gpos = feedback(G,H,1)
Gneg = feedback(G,H,-1)
Gpos1 = feedback(G,1,1)
Gneg1 = feedback(G,1,-1)
Output(s):
>>Positive Feedback:
Gpos =
s^2 + 2 s + 1
-----------------------
s^3 + 10 s^2 + 11 s + 2
Rahul Mitra Dept. of Applied Physics Page no.:
Roll no.: 11 University of Calcutta
Date:
>>Negative Feedback:
Gneg =
s^2 + 2 s + 1
-----------------------
s^3 + 12 s^2 + 13 s + 2
s+1
-------------
s^2 + 9 s + 1
s+1
--------------
s^2 + 11 s + 3
Rahul Mitra Dept. of Applied Physics Page no.:
Roll no.: 11 University of Calcutta
Date:
Problem 4:
10
Find out the transfer function of the resultant system, when G1(s) = s ( s+5 ) and
s+1
G2(s) = 2
s ( s +3 s+10 ) are connected in series and parallel.
Code:
num1 = [10];
den1 = [1 5 0];
G1 = tf (num1, den1);
num2 = [1 1];
den2 = [1 3 10 0];
G2 = tf(num2, den2);
Gseries = series (G1, G2)
Gpara = parallel (G1, G2)
Outputs:
Series connection: Gseries =
10 s + 10
-----------------------------
s^5 + 8 s^4 + 25 s^3 + 50 s^2
Problem 5:
s 3
Two systems with respective transfer functions G1(s) = s+5 and G2(s) = s+ 4 are
connected in series in a way that G1(s) is in forward path and G2(s) is in the feedback
path. Find out the resultant transfer function.
Code:
num1 = [1 0];
den1 = [1 5];
G1 = tf(num1, den1);
num2 = [3];
den2 = [1 4];
G2 = tf(num2, den2);
Gfeed = feedback (G1, G2, -1)
Output:
Gfeed =
s^2 + 4 s
---------------
s^2 + 12 s + 20
Problem 6:
Determine the overall transfer function of the following figure:
Code:
num1 = [1];
den1 = [1 10];
G1 = tf (num1, den1);
num2 = [1];
den2 = [1 1];
G2 = tf (num2, den2);
num3 = [1 0 1];
den3 = [1 4 4];
G3 = tf (num3, den3);
G4 = 4;
G5 = 3;
Gequ1 = G2 + G4;
Gequ2 = Gequ1*G3;
Gequ3 = feedback (Gequ2, G5, -1);
Gequ4 = Gequ3*G1;
Gtotal = feedback (Gequ4, 1, -1)
Rahul Mitra Dept. of Applied Physics Page no.:
Roll no.: 11 University of Calcutta
Date:
Output:
Gtotal =
4 s^3 + 5 s^2 + 4 s + 5
----------------------------------------
13 s^4 + 154 s^3 + 225 s^2 + 223 s + 195