Lab No. 3-Block Diagram Reduction
Lab No. 3-Block Diagram Reduction
Lab No. 3-Block Diagram Reduction
03
Section: A Block Diagram Reduction
General Description:
Block diagram consist of Uni-directional operational block that represent the transfer function of
the variable of the interest. The block diagram of representation of a given system often can be
reduced to a simplified block diagram with fewer blocks than original block.
Useful Commands for block-reduction:
i) conv
Convolution and polynomial multiplication:
Syntax:
w = conv(u,v)
ii) Tf
Create or convert to transfer function model.
sys = tf(num,den)
sys = tf(num,den,Ts)
sys = tf(M)
sys = tf(num,den,ltisys)
tfsys = tf(sys)
iii) Feedback
Syntax:
sys = feedback(sys1,sys2)
Problem # 01:
Find the Close-loop gain of a given system in Matlab using feedback.
Source Code:
%Block diagram reduction
num=conv([1 1],[1]); %convolving the cascaded System neuminator
den=conv([1 2],[200 0 0]); %convolving the denominator system denominator
G=tf(num,den) %calculating the tf of a system
H=1;.
T=feedback(G,H) %using feed-back command to find cloase loop tf
Output:
G=
s+1
-----------------
200 s^3 + 400 s^2
T=
s+1
-------------------------
200 s^3 + 400 s^2 + s + 1
Problem# 02:
Find the Close loop Transfer function of a given system using Matlab.
Source Code:
%Problem # 02 %find the close loop transfer function of a system.
num1=[1]; %declaring the numerator of feed-forward path.
den1=[200 0 0]; %declaring the denominator of feed-forward path.
num2=[1 1]; %declaring the numerator of feed-back path.
den2=[1 2]; %declaring the denominator of feed-back path.
G=tf(num1,den1) %finding tf of feed-forward path
H=tf(num2,den2) %finding tf of feed-back path
T=feedback(G,H,1) %finding tf of close-loop system: Put 1 for +ve
%Feedback at end of feedback(G,H)
Output:
G=
1
-------
200 s^2
H=
s+1
-----
s+2
T=
s+2
-------------------------
200 s^3 + 400 s^2 - s - 1
The state-space representation consists of specifying the A, B, C, and D matrices followed by the creation
of an LTI state-space object using the MATLAB command, ss(A,B,C,D).
Problem # 01:
Let;
0 1 0 0
A=[ 0 0 1 ]; B=[0] ; C=[1 1 0]; D=0;
−4 − 5 − 8 4
As 𝑋̇ = 𝐴𝑋 + 𝐵𝑈
Y=CX+DU
‘State_Space_Model’
Matlab Output:
Problem # 02:
For illustration of state space representation, consider the following simple model of an electric
motor.
Where θ is the angular displacement of the rotor and I is the driving current. The relation
between the input current u = I and the angular velocity y is described by the state-space
equations.
Output:
sys_C =
-----
s + 2
sys_ss_C =
a =
x1
x1 -2
b =
u1
x1 1
c =
x1
y1 1
d =
u1
y1 0
sys_P =
-------------
s^2 + 2 s + 4
sys_ss_P =
a =
x1 x2
x1 -2 -2
x2 2 0
b =
u1
x1 0.5
x2 0
c =
x1 x2
y1 0 1
d =
u1
y1 0
num_Series =
0 0 0 1
den_Series =
1 4 8 8
num_feedback =
den_feedback =
num_Closed_Loop_tf =
0 0 0 1
den_Closed_Loop_tf =
1 4 8 9
Closed_Loop_tf =
1
---------------------
s^3 + 4 s^2 + 8 s + 9
ss_of_Closed_Loop_tf =
a =
x1 x2 x3
x1 -4 -2 -2.25
x2 4 0 0
x3 0 1 0
b =
u1
x1 0.5
x2 0
x3 0
c =
x1 x2 x3
y1 0 0 0.5
d =
u1
y1 0