Signal-Flow Graphs and Mason's Gain Rule: Solving a System by Drawing It
Up for GrabsUpdated 5 min read
A signal-flow graph is another way to represent a system visually. Its lines carry multiplier values, and it makes the loops and forward paths visible, so methods such as Mason's Gain Formula can be used to find the system's gain.
Nodes, branches and gains
In a signal-flow graph:
- each node is a signal (a voltage, a speed, a variable);
- each branch is an arrow from one node to another, labelled with a gain: a constant or a whole transfer function;
- the signal at a node is the sum of everything arriving at it, each input multiplied by its branch's gain.
Branches in series multiply, just as boxes do in a block diagram. Signal-flow graphs usually draw branches as curved lines rather than the boxes and right angles of a block diagram, and they make two structures easy to see:
- A forward path runs from the input to the output without passing through any node more than once. A system can have several.
- A loop starts and ends at the same node, again visiting no node twice. Its loop gain is the product of the gains around it. Two loops touch if they share a node or a branch.
Mason's gain rule
Mason's rule gives the total gain of the system, output over input, in one formula. First compute the graph's determinant, Δ:
\Delta = 1 - A + B - C + D - \dotswhere A is the sum of all the individual loop gains, B the sum of the products of every pair of loops that do not touch, C the same for every set of three non-touching loops, and so on. If no two loops are separate, B and everything after it are zero.
Then
M = \frac{y_{out}}{y_{in}} = \sum_{k=1}^{N} \frac{M_k \, \Delta_k}{\Delta}where M is the total gain, N the number of forward paths, M_k the gain of the kth forward path, and \Delta_k the determinant of what is left of the graph once every loop touching that path is removed. When a path touches every loop, its \Delta_k is simply 1. The rule works on block diagrams too, but it is easiest on signal-flow graphs.
Example: two interlocking loops
Here is a system of five equations in five unknowns, with input xᵢₙ and gains a to e:
x_1 = x_{in} + e\,x_3,\quad x_2 = b\,x_1 + a\,x_4,\quad x_3 = c\,x_2,\quad x_4 = d\,x_3,\quad x_{out} = x_4
The graph of the five equations. Branch e feeds x₃ back to x₁, and branch a feeds x₄ back to x₂. (Image: Pierre5018, CC BY-SA 4.0)
By Mason's rule. There is one forward path, xᵢₙ → x₁ → x₂ → x₃ → x₄ → xₒᵤₜ, with gain bcd. There are two loops: x₁ → x₂ → x₃ → x₁, with gain bce, and x₂ → x₃ → x₄ → x₂, with gain cda. They share x₂ and x₃, so they touch, and Δ = 1 − (bce + acd). The forward path touches both loops, so its Δ₁ = 1, and
\frac{x_{out}}{x_{in}} = \frac{bcd}{1 - bce - acd}By systematic reduction. The book also solves the same graph by hand, one step at a time: substitute a branch into the node it feeds, delete any node with no outflow that is not wanted, and remove each self-loop (a node feeding itself with gain g) by dividing that node's other inputs by 1 − g. After a dozen or so steps the graph shrinks to a single branch, with the same answer in another form:

The fully reduced graph: one branch, one gain. (Image: Pierre5018, CC BY-SA 4.0)
Example: a resistor and capacitor
Signal-flow graphs are just as useful for circuits. Take a voltage source S in series with a resistor R and a capacitor C, and ask for the voltage across the capacitor.

The circuit: source, resistor and capacitor in series, with the capacitor voltage measured. (Image: Pierre5018, CC BY-SA 4.0)
Start from the physics, in Laplace-transformed form (s is the Laplace variable), with the capacitor assumed to start uncharged:
V_R = R\,I_R,\qquad I_C = sC\,V_C,\qquad V_R + V_C - V_S = 0The first two are the branch equations of the resistor and the capacitor; the third is Kirchhoff's voltage law for the circuit's single loop. Kirchhoff's current law gives three node equations, but only two are independent, so one is dropped.
Each equation is then assigned one signal to compute. The source voltage V_S is an independent input, so it gets no equation. Many valid graphs are possible, as long as each equation is used once and the signals of interest appear.

The circuit as a signal-flow graph. (Image: Pierre5018, CC BY-SA 4.0)
Read it with Mason's rule. The one forward path, V_S \to V_C, has gain 1. The one loop, V_C \to I_C \to I_R \to V_R \to V_C, has gain sC \times 1 \times R \times (-1) = -sRC, so \Delta = 1 + sRC. The forward path touches the loop, so
\frac{V_C}{V_S} = \frac{1}{1 + sRC}
The solved graph: the capacitor voltage is the source voltage times 1/(1 + sRC). (Image: Pierre5018, CC BY-SA 4.0)
A bigger example
Real machines give bigger graphs. An angle-positioning servo, with a motor, a tachometer and an angle encoder, has nested loops for current, velocity and position, and its signal-flow graph lays them all out on one line.

An angular position servo and its signal-flow graph, loops 0 to 5 marked. (Image: Constant314, CC0)
Sources
- "Control Systems/Signal Flow Diagrams" from Wikibooks, by its contributors, under CC BY-SA 4.0. Changed: rewritten in hubnx's own words and shortened; the step-by-step reductions summarized, a second worked example left out, the definition of Δₖ stated in full and the two worked answers read with Mason's rule; each image under its own licence, credited in its caption. This page is shared under CC BY-SA 4.0.