Ecn 222 Lab 2
Ecn 222 Lab 2
Ecn 222 Lab 2
Navtej Mishra
Experiment – 2
STUDY OF BLOCK DIAGRAM REDUCTION TECHNIQUES AND DETERMINING TRANSFER FUNCTIONS
OF LINEAR COTROL SYSTEMS
Objectives:
1. To determine transfer functions of linear systems with series, parallel and feedback
configuration via block diagram reduction using MATLAB.
Assignment Questions:
1. (a) Given 𝐺1 (𝑠) = (𝑠 + 1)⁄(𝑠 + 2) and 𝐺2 (𝑠) = 1 500 𝑠 2 ⁄ , implement each of the following
systems in Simulink and obtain the impulse, step and ramp responses of the system.
(i)
(iii)
IMPULSE RESPONSES OF THE SYSTEM
STEP RESPONSES OF THE SYSTEM
RAMP RESPONSES OF THE SYSTEM
(b)
Determine the transfer function of each of the above using MATLAB commands. Hence
implement each of the systems in Simulink in the form of a single LTI system block and obtain
the impulse, step and ramp responses of the system. Compare your results with that obtained
in Part (a) above.
(i)
H1 = tf([1 1],[1 2])
H2 = tf(1,[500 0 0])
H = series(H1,H2);
H = H2 * H1
impulse(H)
Step(H)
t=0:0.1:10
alpha=2
ramp=alpha*t
[y,t]=lsim(H,ramp,t)
plot(t,y)
(ii)
impulse(P)
step(P)
t=0:0.1:10
alpha=2
ramp=alpha*t
[y,t]=lsim(P,ramp,t)
plot(t,y)
(iii)
impulse(F)
step (F)
t=0:0.1:10
alpha=2
ramp=alpha*t
[y,t]=lsim(F,ramp,t)
plot(t,y)
As you can compare graphs of all three parts (i) , (ii),(iii) , they are same . Hence the responses which
we calculated through simulink and matlab matches .
2.
(a) For the following multi-loop feedback system, determine the closed-loop transfer function
following block diagram reduction technique.
(b) Apply Mason’s gain formula directly to the system block diagram above and find the
transfer function
(c) – skipped
(d) - Using the individual block transfer functions given in Part (c), determine the transfer
function of the above system using MATLAB commands. Check that the result so obtained
matches with that obtained by Mason’s gain formula in Part (b).
G1 = tf(1,[1 10])
G2 = tf(1,[1 1])
G3 = tf([1 0 1],[1 4 4])
G4 = tf([1 1],[1 6])
H1 = tf(1,[1 2])
H2 = tf([1 0],[1 2])
H3 = tf(2,1)
H4 = tf(1,1)
sys1 = series(G1,G2)
sys2 = H3/G4
sys3 = feedback(sys1,H1,1)
sys4 = feedback(sys3,H2,1)
sys5 = series(sys4,G2)
sys6 = feedback(sys5,sys2,-1)
sys7 = series(sys6,G1)
sys8 = feedback(sys7,H4,-1)
impulse(sys8)
step(sys8)
t=0:0.1:10
alpha=2
ramp=alpha*t
[y,t]=lsim(sys8,ramp,t)
plot(t,y)
IMPULSE RESPONSES OF THE SYSTEM
As you can compare graphs are same for responses that we got in matlab(in part d ) and Simulink (in
part e ). Hence the responses which we calculated through simulink and matlab matches.