HOME

PDF (letter size)

Using Mason’s rule to solve Ax=b

Nasser M. Abbasi

January 5, 2019   Compiled on January 30, 2024 at 11:29pm

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 systemAx=b Where(1)(213402121)(x1x2x3)=(120) The solution to above, which can easily be found using Gaussian elimination isx1=917x2=417x3=117

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 equationsx1=1212x232x3(2)x3=1+2x1x2=12x1+12x3

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

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 YU=x31=x3. The first step in Mason method is to find all forward paths from U to Y. There are two in this case, they areF1=(12)(2)=1F2=1

Next we find all closed loops, there are threeL1=(2)(12)(12)=12L2=(12)(12)=14L3=(2)(32)=3

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 Δ2=114=34. Now we are ready to find YU=x3x3=iFiΔi1iLi=F1Δ1+F2Δ21(12+143)=11(34)1(12+143)=117 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 F1=(12)(12)=14F2=(1)(12)=12F3=(12)(2)(12)=12F4=(1)(32)(12)=34

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 Hencex2=iFiΔi1iLi=F1Δ1+F2Δ2+F3Δ3+F4Δ41(12+143)=1412+12341(12+143)=417 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 F1=(12)F2=(1)(12)(12)=14F3=(1)(32)=32

Now we find the Δi associated with each Fi. From the graph we see that Δ1=1,Δ2=1,Δ3=1 Hencex1=iFiΔi1iLi=F1Δ1+F2Δ2+F3Δ31(12+143)=12+14+321(12+143)=917 Therefore the three variables are x1=917x2=417x3=117