Lab#7 Block Diagram Reduction and Analysis and Design of Feedback Systems
Lab#7 Block Diagram Reduction and Analysis and Design of Feedback Systems
Given SISO LTI models C and G, you can construct the closed-loop transfer T from r to y using
CONNECT function.
e
+ u
r --->O-->[ C ]---[ G ]-+---> y
- | |
+<--------------------+
MATLAB Code
clc
clear all
close all
c.inputname= ‘e’;
c.outpuname=‘u’;
g. inputname= ‘u’;
g.outname= ‘y’;
x =sumblk(‘e’, ‘r’, ‘y’, ‘+-’);
T=connect(g,c,sum, ‘r’, ‘y’);
Results
Lab Tasks
Lab Task 1:
For the following Figures find the transfer function (C/R) using series, parallel and feedback
functions and plot unit step response for the system. Verify the results using Simulink.
i.
MATLAB Code
Results
SIMULINK
ii.
MATLAB Code
P_out = parallel(G1,G2);
P_output = parallel(P_out,G3);
step(P_output)
Results
SIMULINK
iii.
Figure. 7.3 Feedback block diagram reduction
MATLAB Code
H1 = tf([1],[1 2]);
H2 = tf([1],[1 3]);
F1 = series(H1,H2);
F2 = series(G2,G3);
Feed_out = feedback(F1,F2,+1);
Feed_output = series(G1,Feed_out);
step(Feed_output)
Results
Lab Task 2:
Using connect functions find the equivalent transfer function for block diagram in Figure 7.4 and
Figure 7.5. Plot the unit step response and verify using Simulink.
Gi(s)=1/(s+1)
i.
Figure. 7.4 Block diagram reduction Task 2
MATLAB Code
Gs1.inputname='i';
Gs1.outputname='j';
Gs2.inputname='a';
Gs2.outputname='b';
Gs3.inputname='a';
Gs3.outputname='d';
Gs4.inputname='a';
Gs4.outputname='e';
Gs5.inputname='i';
Gs5.outputname='h';
Gs6.inputname='k';
Gs6.outputname='c';
Gs7.inputname='c';
Gs7.outputname='l';
s1=sumblk('a','l','r','j','-+-');
s2=sumblk('i','b','d','++');
s3=sumblk('f','e','d','++');
s4=sumblk('k','h','c','f','+-+');
s_1=CONNECT(Gs1,Gs2,Gs3,Gs4,Gs5,Gs6,Gs7,s1,s2,s3,s4,'r','c')
t=0:0.1:10;
x=ones(1,length(t));
v=lsim(s_1,x,t);
plot(t,v)
xlabel('Time')
ylabel('Amplitude')
title('Step Response')
RESULTS
SIMULINK
ii.
MATLAB Code
s1=sumblk('e','r','a','+-');
s2=sumblk('a','o','b','++');
s3=sumblk('l','j','k','++');
s4=sumblk('g','f','d','++');
s5=sumblk('i','h','g','-+');
OUT=CONNECT(Gs1,Gs2,Gs3,Gs4,Gs5,Gs6,Gs7,Gs8,s1,s2,s3,s4,s5,'r','c');
t=0:0.1:10;
x=ones(1,length(t));
output=lsim(OUT,x,t);
plot(t,output)
xlabel('Time')
ylabel('Amplitude')
title('Step Response')
RESULTS
SIMULINK
Post Lab Tasks
Lab Task No 1:
For the following system consider: Plant=Motor=1/[s(s+6)] and controller=k, design a closed
loop system with poles at –3±3j. Compare the motor system response before and after
implementation of controller
Figure. 7.6 System for Task 3
– a −a a2
Hint: According to the feedback analysis, to get poles at ± j, we need to set K =
2 2 2
So
K=a2/2 = 6^2 / 2 = 36 / 2 = 18
K = 18
Performance Viva
Total/15
(10 Marks) (5 Marks )
Performance /6
Results /3
Critical Analysis /1
Comments
Critical Analysis / Conclusion
In this lab we have learnt how to reduce block diagrams using MATLAB functions and plot
the result and verification of the results using Simulink also how to design controller system
gain for obtaining specified poles.