Here's an easy way to obtain the z-domain transfer function of a DSP network (i.e., a DSP block diagram).
This article is drawn from the course "DSP Made Simple for Engineers." For more information, see Besser Associates. This article is also available as a PDF.
This article discusses a powerful analysis method (well known to our analog control system engineering brethren) to obtain the z-domain transfer function equations of digital signal processing (DSP) networks. That method, called "Mason's Rule" (sometimes called "Mason's Gain Formula"), was developed by Samuel Mason in the early 1950s to analyze interconnected analog systems[1-3]. Here we describe Mason's Rule and present several examples showing the power of this network analysis technique.
Mason's Rule enables us to determine the H(z) = Y(z)/X(z) transfer function of complicated networks, such as the multi-feedback loop network in Figure 1.

Figure 1. A discrete network with multiple feedback loops.
Mason's Rule is also particularly useful for deriving the z-domain transfer function of, say, a discrete network that has inner feedback loops embedded within outer feedback loops (nested loops). Here's the good news: if we are able to draw the block diagram of some discrete network, then the application of Mason's Rule will give us that network's z-domain H(z) transfer function. Once we have H(z) we can then use all the algebraic and software tools at our command to determine the frequency-domain behavior, and stability, of the network. Here we describe Mason's Rule, accompanied by several examples, in the hope this robust analysis technique is of use to the reader in their future DSP network analysis efforts.
For our purposes, Mason's Rule is a method to derive a discrete network's z-domain transfer function by identifying various forward paths from the input node to the output node of a discrete network, and the various feedback paths that may, or may not, share common signal nodes with those feedforward paths. This sounds mysterious, but it's not really too complicated. Let's define our Mason's Rule terminology and then demonstrate this analysis technique by way of examples.
I. A Few Definitions
Mason's Rule is based on converting a network's block diagram to a signal flow diagram like that shown in Figure 2, and identifying crucial signal paths and loops.

Figure 2. Example signal flow diagram.
Using Figure 2 as an example, we establish the following definitions:
- A gain symbol is an arrowhead with its associated z-domain function (indicated by an uppercase letter), such as a sample delay (z–1) or a constant multiplier. The direction of the arrowhead shows the direction of signal flow.
- A signal node is a single point in the flow diagram. In Figure 2, signal nodes are indicated by an italicized lowercase letter.
- A path is a sequence of signal flow branches from one node to another node.
- A forward path is a path that travels from the x(n) input to the y(n) output, without going through the same node twice. In Figure 2, the path from node a to node g, [a,b,c,d,e,f,g], is a forward path. The gain of that forward path is the product ACDFGI.
- A loop is a path that starts and ends at the same node, with no node encountered more than once. That is, a loop is a feedback path. In Figure 2, the path from node b to node c and back to node b is a loop. A signal flow diagram, of course, can have multiple forward paths and multiple loops.
- Nontouching loops are two loops that do not share a common signal node. In Figure 2, the loops [b,c,b] and [d,e,d], for example, are nontouching loops. The loops [b,c,b] and [b,c,d,e,f,g,b] are touching loops because they share the signal nodes b and c.
- The loop gain of a loop is the product of all the branch gain symbols within a loop. In Figure 2, the loop gain of the [d,e,d] loop is the product FE. The loop gain of the [b,c,d,e,f,g,b] loop is the product CDFGIJ.
With those simple definitions established (here comes the exciting part), we define the Δ(
z) determinant of a signal flow diagram as:

(Click to enlarge)
The "nontouching loop gains taken two at a time" are the combinations of pairs of loop gains. The pairs of nontouching loop gains in Figure 2 are the loop gain combinations: CB,FE; CB,IH; and FE,IH. The "nontouching loop gains taken three at a time" are the combinations of triplets of loop gains. The only triplet of nontouching loop gains in Figure 2 is the loop gain combination: CB,FE,IH.

For each forward path in a signal flow diagram there is an associated determinant represented by Δi(z). If a diagram has P = 3 forward paths (designated as paths P1(z), P2(z), and P3(z)), then there will be a Δ1(z), a Δ2(z), and a Δ3(z) determinant. Subscript variable i is merely the index identifying the individual forward paths and their associated determinants. Determinant Δi(z) is the determinant of the signal flow diagram that does not touch the ith forward path. To ascertain Δ1(z), for example, we delete the P1(z) forward path in a signal flow diagram (and any branches that touch the P1(z) forward path) and use the above Eq. (1) for whatever signal flow paths that remain. If no loops remain after deleting the P1(z) forward path, then Δ1(z) = 1.
To recap, a signal flow diagram has a Δ(z) determinant, and each Pi(z) forward path has a gain as well as its own Δi(z) determinant. All determinants are defined by Eq. (1) once a diagram's loops have been determined. With all this said, we can now (finally) define Mason's Rule.