0% found this document useful (0 votes)
69 views

Expt 6 Block Diagram Reduction

This MATLAB program reduces a block diagram with four transfer functions (G1, G2, G3, G4) using the sumblk function. It defines the input and output names for each transfer function block and relates them using two summing points. The overall transfer function from input R to output YM is calculated. Finally, the program plots the impulse, step, and ramp responses of the reduced system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Expt 6 Block Diagram Reduction

This MATLAB program reduces a block diagram with four transfer functions (G1, G2, G3, G4) using the sumblk function. It defines the input and output names for each transfer function block and relates them using two summing points. The overall transfer function from input R to output YM is calculated. Finally, the program plots the impulse, step, and ramp responses of the reduced system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Block Diagram Reduction

Laboratory Experiment No.__

To perform a block diagram reduction using MATLAB

Here G1(s) and G2(s) represents the transfer function of the individual elements of a control
system. The system given is a feedback system or can also be called a closed loop system. The
output signal C(s)is fed back to be compared with the input R(s). the difference E(s)=[R(s)- C(S)]
is actuating signal or error signal.

Problem: To reduce the given block diagram using sumblk and find impulse, step and ramp
response.
Materials and Equipment

Matlab Software
Personal Computer

Program

%-----------------------------------------------------------------------------------------------------------------------------
-----------
% Experiment 2 – Block Diagram Reduction
%-----------------------------------------------------------------------------------------------------------------------------
-----------
%
% Reduce the givem Block Diagram using sumblk function.
% [see the image attached]
%
% Given -------------------------------------------------------------------------------------------------------------------
------------
s = tf(‘s’);
G1 = 1/(s+1);
G2 = 2/((s^2) + (5*s) +100);
G3 = 10/((2*s) +1);
G4 = 100/(s+1);
%-----------------------------------------------------------------------------------------------------------------------------
-----------
% Now we are required to define allthe blocks input and output. As shown
% below. Using these defines input output we will be using sumblk -------------------------------------
------------
G1.InputName = ‘r’;
G1.OutputName = ‘ug1’;
G2,InputName = ‘e’;
G2.OutputName = ‘ug2’;
G3.InputName = ‘ym’;
G3.OutputName = ‘y’;
G4.InputName = ‘u’;
G4.OutputName = ‘ym’;
%-----------------------------------------------------------------------------------------------------------------------------
-----------
% Note: Now we are required to relate all these inputs and outputs. Why?
% Because there are two summing points in our block diagram. This way matlalb will be able to
relate
% the transfer function with each other. You can notice ym is our output and its not attached
to any
% summing point hence it is not included in the summing.
% ---------------------------------------------------------------------------------------------------------------------------
------------
sum1 = sumblk(‘e’,’r’,’y’,’+-‘); % e = r – y
sum2 = sumblk(‘u’,’ug1’,’ug2’); % u = ug1 +ug2
% Rest is pretty simple ------------------------------------------------------------------------------------------------
------------
% we have to find the relationship between r and ym for our output transfer
% function.----------------------------------------------------------------------------------------------------------------
-----------
OutputTF = connect(G1,G2,G3,sum1.sum2,’r’,’ym’);
%-----------------------------------------------------------------------------------------------------------------------------
-----------
% Calculating responses. Responses taken into account are step and ramp. Others can also be
included.
% A generalised form has been given below.
%-----------------------------------------------------------------------------------------------------------------------------
-----------
% First Impulse ----------------------------------------------------------------------------------------------------------
-----------
inputTime = [0:.1:10];
[outputResp, time] = impulse(OutputTF, inputTime);
Subplot(3,1,1);
Plot(time, outputResp);
Title(‘Impulse Response’);
Xlabel(‘Time -->’);
Ylabel(‘Magnitude -->’);
% Step Response --------------------------------------------------------------------------------------------------------
-----------
inputTime = [0:.1:10];
inputSignal = ones(size(inputTime));
[outputResp, time] = step(OutputTF);%, inputSignal, inputTime);
Subplot(3,1,2);
Plot(time,outputResp);
Title(‘Step Response’);
xlabel(‘Time -->’);
ylabel(‘Magnitude -->’);
%-----------------------------------------------------------------------------------------------------------------------------
-----------
% End of Program. Created by Siddharth Kaul
%-----------------------------------------------------------------------------------------------------------------------------
-----------

Output:
Analysis and Conclusion
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

You might also like