Control System Lab [KEC-652]
EXPERIMENT NO.4
Objective: Determine the transfer function for given closed loop system in block diagram
representation.
Apparatus Used: MATLAB with Control System Toolbox.
Theory: If a given system is complicated, it is very difficult to analyze it as a whole. With the
help of transfer function approach, we can find transfer function of each and every element of the
complicated system. And by showing connection between the elements, complete system can be
splitted into different blocks and can be analyzed conveniently. This is the basic concept of block
diagram representation.
The block diagram shown in figure 4.1 is showing the parallel, series and feedback
connections. By using the rules of block diagram reduction, the closed loop block
diagram can be reduced to single block which gives the overall transfer function of the
system.
10
Input(R) Ei Eo2 + Eo Output(C)
5 1/s(s+1)
+ +
-
Figure 4.1: Block Diagram of a Control System
ECE Department, Prepared By Checked By
SRMCEM, LKO Page 13 of 44
Faculty In-charge Head of
Department
Control System Lab [KEC-652]
Program
%Determine the transfer function for given closed loop system in
block
diagram representation.
%Transfer Functions: G1 = 5, G2 = s, G3= 1/(s^2
+ s), H1=1
clear all
clc
syms s t
n1=[1 0]; % Numerator of G1
Denominator of
d1=[0 1]; % G1
G1=tf(n1,d1,'inputname','Ei','outputname','Eo
1')
n2=[5]; % Numerator of G2
Denominator of
d2=[1]; % G2
G2=tf(n2,d2,'inputname','Ei','outputname','Eo % Determining the
2') G2
n3=[1]; % Numerator of G3
% Denominator of
d3=[1 1 0]; G3
G3=tf(n3,d3,'inputname','Eo','outputname','C' % Determining the
) G3
n4=[1]; % Numerator of H1
% Denominator of
d4=[1]; H1
% Determining the
H1=tf(n4,d4,'inputname','C','outputname','B') H1
ECE Department, Prepared By Checked By
SRMCEM, LKO Page 14 of 44
Faculty In-charge Head of
Department
Control System Lab [KEC-652]
[n5,d5]=parallel(n1,d1,n2,d2);
G_12=tf(n5,d5,'inputname','Ei','outputname',' Paralle
Eo') % l
Combinatio
n of G1
and G2
[n6,d6]=series(n5,d5,n3,d3);
G_forward=tf(n6,d6,'inputname','Ei','outputname','C')%SeriesCombination of
G_12 and G3
[n7,d7]=feedback(n6,d6,n4,d4);
G_overall=tf(n7,d7,'inputname','R','outputname','C') % Overall Transfer
Function of Closed Loop
Transfer
Function
pzmap(G_overall) % To plot poles and zeros of
Overall
Transfer Function
Results:
Transfer function from input "Ei" to output "Eo1":
s
Transfer function from input "Ei" to output "Eo2":
5
ECE Department, Prepared By Checked By
SRMCEM, LKO Page 15 of 44
Faculty In-charge Head of
Department
Control System Lab [KEC-652]
Transfer function from input "Eo" to output "C":
1
s^2 + s
Transfer function from input "C" to output "B":
1
Transfer function from input "Ei" to output "Eo":
s+5
Transfer function from input "Ei" to output "C":
s+5
-------
s^2 + s
Transfer function from input "R" to output "C":
s+5
-------------
s^2 + 2 s + 5
ECE Department, Prepared By Checked By
SRMCEM, LKO Page 16 of 44
Faculty In-charge Head of
Department
Control System Lab [KEC-652]
Pole-Zero Map
2.5
1.5
0.5
-0.5
-1
-1.5
-2
-2.5
-5 -4 -3 -2 -1 0
-1
Real Axis (seconds )
Figure 4.2: Pole-Zero Plots for the given transfer function
Precautions:
1) Program must be written carefully to avoid errors.
2) Programs can never be saved as standard function name.
3) Functions in MATLAB case sensitive so commands must be written in proper
form
ECE Department, Prepared By Checked By
SRMCEM, LKO Page 17 of 44
Faculty In-charge Head of
Department