Professional Documents
Culture Documents
Control Theory 1: Laboratory Work
Control Theory 1: Laboratory Work
Control Theory 1
Laboratory work
Group number
17.2
|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
Content
Introduction........................................................................................3
Theory ................................................................................................3
Solution to Problems...........................................................................4
Discussion of Results…..........................................................................9
Conclusions .......................................................................................10
References…………………………………………………………………….…………………10
2|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
Introduction
In this assignment, it is required to solve problems of calculating transfer functions
of the closed-loop control systems which are included in Laboratory Notes (Task 2,
4, 6 and 8) by using Signal Flow Graphs and utilizing the Formula of Mason, also
utilizing the functions provided by Matlab software.As an background information
to solve those problems, firstly I will provide the brief introduction about the topic.
The closed-loop control systems in supplied problems will be represented as signal
flow graphs.I will apply the formula of Mason in order to derive the proper transfer
functions for problems.
Theory
The Signal Flow Graphs or SFG for short were invented by Shannon, but often called
a Mason graph after Samuel Mason who coined the term. These special types of
graphs are a specialized flow graph, a directed graph in which nodes represent
system variables, and branches (edges, arcs, or arrows) represent functional
connections between pairs of nodes. The functional connections often represent
transfer functions between nodes of the graph. Their theory is primarily built on
that of directed graphs and oriented graphs. SFGs also are known as topological
models of a linear systems of equations.
The formula of Mason is a technique used to find the transfer functions of a linear
signal-flow-graphs. The method mainly uses the formula below for calculations:
3|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
𝐺= =
𝑦𝑖𝑛 ∆
Gk the path gain of the kth forward path between yin and yout
To use the formula of Mason, all the step below should be applied one by one:
Firstly we are making a list of all forward paths, and their gains, and labelling these
Gk. Then we are making a list of all the loops and their gains and label these Li (for i
loops). After that we are making a list of all pairs of non-touching loops and the
products of their gains (Li*Lj). After that we are making a list of all pairwise non-
touching loops taken three at a time (Li*Lj*Lk), then four at a time, and so forth,
until there are no more. We are computing the determinant Δ and cofactors Δk.
Applying the formula.
4|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
5|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
6|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
7|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
8|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
Task 2 and 4
9|Page
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
% PART 1
% TASK 2
% a section:
clear all; clc;
T = 2; % constant determined by task
k1 = 2;
k2 = 2;
k3 = 2;
% T, k1, k2 and k3 can have any value
disp('Transfer functions for the "a" section of Task 2');
s = tf('s');
denominator1 = (T*s^2+s+k1*k2)/(T*s^2+s);
numerator1 = k1*k2/(T*s^2+s); numerator2 = -
k2/(T*s^2+s);
numerator3 = k3/s;
g1 = numerator1/denominator1 % y(s)/r(s)
g2 = numerator2/denominator1
g3 = numerator3/denominator1
% b section
numerator4 = (T*s^2+s+k1*k2)/(T*s^2+s);
numerator5 = k2/(T*s^2+s);
numerator6 = -k3/s;
g4 = numerator4/denominator1 % e(s)/r(s)
g5 = numerator5/denominator1
g6 = numerator6/denominator1
% PART 1
% TASK 4
clear all;
T1 = 2; % constant determined by task
T2 = 2;
k1 = 2;
k2 = 2;
k3 = 2;
k4 = 2;
% T1, T2, k1, k2, k3 and k4 can have any value
disp('Transfer functions for the "b" section of Task 2');
s = tf('s');
denominator = 1 + (k2 + k3 + k2 * k3 * (k1 + k1/(T1 * s)))/(T2 * s);
numerator1 = k2*k3*(k1+k1/(T1*s))/(T2*s);
numerator2 = -k2*k3*k4/(T2*s);
g1 = numerator1/denominator % y(s)/r(s)
g2 = numerator2/denominator
Task 6
10 | P a g e
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
%%Task6
clear
clc
s=tf('s');
G1=(5/s)
G2=(2*(0.1*s+1)/s*(0.4*s+1))
Task 8
% PART 2 %
TASK 8
clear all;
T1 = 70; % constant determined by task
k1 = 38; % constant determined by task
k2 = 0.8; % constant determined by task
c0 = 80000; % constant determined by task
c1 = 5400; % constant determined by task
c2 = 190; % constant determined by task
% T1, T2, k1, k2, k3 and k4 can have any value
disp('Transfer functions for Task 8');
s = tf('s');
denominator1 = 1 + k1*k2*(T1*s+1)/(T1*s*(c0*s^3+c1*s^2+c2*s+1));
num1 = k1*k2*(T1*s+1)/(T1*s*(c0*s^3+c1*s^2+c2*s+1));
num2 = -k2*(T1*s+1)/(c0*s^3+c1*s^2+c2*s+1);
num3 = 1 + k1*k2*(T1*s+1)/(T1*s*(c0*s^3+c1*s^2+c2*s+1));
num4 = k2*(T1*s+1)/(c0*s^3+c1*s^2+c2*s+1);
y_s_over_r_s = num1/denominator1 % y(s)/r(s)
y_s_over_d_s = num2/denominator1
e_s_over_r_s = num3/denominator1
e_s_over_d_s = num4/denominator1 % e(s)/d(s)
11 | P a g e
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
Discussion of Results
In this assignment, as a result of the calculations I have determined the transfer
functions for closed-loop control systems by utilizing the formula of Mason.
Conclusions
In this assignment, I have derived the transfer functions of the closed-loop control
systems provided in Problems 2 and 4 in Lecture Notes for different inputs.
Additionally, it should be noted that all calculations are made by utilizing signal
flow graphs and the formula of Mason.
12 | P a g e
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020
BAKI ALİ NEFT MƏKTƏBİ
References
Lecture Notes: Mason Formula and Signal Flow Graphs.pdf
Lecture Notes: Introduction_to_Signal-Flow-Graphs_SFG.pdf
Labwork2
13 | P a g e
KEYFİYYƏTİN TƏMİNATI ŞÖBƏSİ
BAKI 2020