System Simplification: Block Diagram or Signal Flow Graph

(Uses Matlab): syms, simple, input
Block diagram simplification or Mason's Gain Rule is easily accomplish in LTI objects.

(SAMPLE Fig.2.25a Dorf's Textbook):



The LTI object m-script,

%block1.m
syms g1 g2 g3 g4 h1 h2 h3
gg1=g3*g4/(1-g3*g4*h1);
gg2=g2*gg1/(1+g2*gg1*h2/g4);
tf=g1*gg2/(1+g1*gg2*h3);
T=simple(tf);
input('press ENTER key twice')
T

The result is,
EDUğ press ENTER key twice

T =

g4*g3*g2*g1/(1-g3*g4*h1+g2*g3*h2+g1*g2*g3*g4*h3)

EDUğ


(SAMPLE fig.2.33c Dorf):


The LTI object m-script,

%block2.m
syms s
g1=10/(s+1);
g2=1/(2*s+0.5);
g3=540;
h1=0.1;
gg1=g1*g2/(1+g1*g2*h1);
gg2=g3*gg1;
tf=gg2/(1+gg2);
T=simple(tf);
input('press ENTER key twice')
T

The result is,
EDUğ press ENTER key twice

T =

10800/(4*s^2+5*s+10803)

EDUğ


(SAMPLE signal flow graph):
Given signal flow graph, we use Mason's Gain Rule to find the transfer functions.

Tij = [ SUM( Pijk DELijk ] / DELTA

Where:
Pijk = kth path from variable xi to variable xj,
DELTA = determinant of the graph
DELijk = cofactor of the path Pijk and
DELTA = 1 - (sum of all different loop gains) + (sum of the gain products of all combinations of 2 nontouching loops) - (sum of the gain products of all combinations of 3 nontouchinbg loops) + ...

Lets apply it to the SFG,


Y / U1 evaluation using Mason Rule in Symbolic Matlab is,

%sfg11.m
syms s
L1 = -6/s;
L2 = -1/s^2;
L3 = -3/s^3;
SUM1 = L1 + L2 + L3;
%no 2 or 3 nontouching loops
DELTA = 1 - SUM1;
T11 = (-5/s*1 + 4/s^2*1 -12/s^3*1) / DELTA;
T=simple(T11);
input('press ENTER key twice')
T

The result,
EDUğ press ENTER key twice

T =

-(5*s^2-4*s+12)/(s^3+6*s^2+s+3)

EDUğ


Y / U2 evaluation using Mason Rule in Symbolic Matlab is,

%sfg21.m
syms s
L1 = -6/s;
L2 = -1/s^2;
L3 = -3/s^3;
SUM1 = L1 + L2 + L3;
%no 2 or 3 nontouching loops
DELTA = 1 - SUM1;
T21 = (10/s*1 + 7/s^2*1 -8/s^3*1) / DELTA;
T=simple(T21);
input('press ENTER key twice')
T

The result,
EDUğ press ENTER key twice

T =

(10*s^2+7*s-8)/(s^3+6*s^2+s+3)

EDUğ