HOME
PDF (letter size)
PDF (legal size)

Using Mason's rule to solve Ax    =   b

Nasser M. Abbasi

September 12, 2016 compiled on — Monday September 12, 2016 at 10:49 PM

This note shows how to solve Ax  = b using Mason's rule method. Mason rule is used to obtain the transfer function between two nodes in a signal graph, used in control systems, but can also be used to solve a set of linear equations. This shows an example of how to use this method to solve the following system

Ax  = b

Where

(          ) (    )    (  )
  2  1   3     x1        1
( 4  0  − 2) ( x2 ) =  ( 2)
  1  2  − 1    x3        0
(1)

The solution to above, which can easily be found using Gaussian elimination is

pict

The first step in Mason rule, is to decide on which are the variables that will be the nodes. Clearly here the variables are x1, x2,x3  . So we write the three equations, with each one having one of those variables on the left side and everything to the right side. This gives the following three equations

pict

The above three equations are a rewrite of the original three equations in (1). It does not matter which variable to move to the left from each equation, as long as we have one variable moved to the left each time. Now we draw the signal graph from (2). Each node is a variable. Arrows are drawn from the other variables (on the RHS) to the variable on the LHS. The weight on the arrow is the coefficient next to each other variable. We use the number 1  as a node since it stands on its own. The result is the following diagram

pict

We now need to decide which is the input and which is the output. If we want to solve for x3  first, then we make x3  the output and always make the numerical value 1  as input, since it is known. Hence we are looking for the transfer function Y-= x3 = x3
U    1  . The first step in Mason method is to find all forward paths from U to Y . There are two in this case, they are

pict

Next we find all closed loops, there are three

pict

Next we find Δi  associated with each Fi  . These are found by removing Fi  path from the graph and recalculated the Mason Δ  for what is left. In this case we see that Δ1  = 1  and Δ1 =  1 − 14 = 34  . Now we are ready to find YU-=  x3

      ∑
          FiΔi                                  (  )
      --i-------  --F1-Δ1-+-F2-Δ2--    ----1-−-1--34-----   -1-
x3 =     ∑      = 1 − (− 1 + 1 − 3) =  1 − (− 1+  1−  3) = 17
      1 −    Li          2   4                2   4
           i

Now that we found one variable, we do the same for the next variable. Let us pick x2  as the output Y now, so we are looking for YU-= x21 = x2  . In this case, there are four forward paths from 1  to x2

pict

The loops remain the same as before, since the loops do not change as the graph remains the same. We now just need to recalculate the Δi  associated with each Fi  . From the graph we see that Δ1  = 1,Δ2  = 1,Δ3 =  1  and Δ4 = 1  Hence

      ∑
          FiΔi
      --i-------   F1Δ1-+-F2-Δ2-+-F3-Δ3-+-F4-Δ4-   -−-14 −-12 +-12 −-34-     -4-
x2 =      ∑     =       1 − (− 1 + 1 − 3)       =  1 − (− 1+  1−  3) = − 17
      1 −    Li                2   4                      2   4
           i

Now we will find the final unknown, which is x1  . Now x1  is the output. In this case, there are three forward paths from 1  to x2

pict

Now we find the Δi  associated with each Fi  . From the graph we see that Δ1  = 1,Δ2  = 1,Δ3  = 1  Hence

      ∑   FiΔi
        i         F1 Δ1 + F2 Δ2 + F3 Δ3        1+  1+  3        9
x1 =  ---∑------= ------(--1---1----)-- =  ----2(--14--12---) = ---
      1 −    Li     1 −  − 2 + 4 − 3       1 −  − 2 + 4 − 3    17
           i

Therefore the three variables are

pict