File Exchange

image thumbnail

Mason.m

version 1.0.0.0 (7.76 KB) by Rob Walton
Mason.m uses mason's rule to simplify signal flow graphs.

16 Downloads

Updated 16 Jul 2016

View License

Mason.m uses mason's rule to simplify signal flow graphs. It takes a file describing the network and produces a symbolic equation relating a dependent output node to an independent input node.

The directory contains a comprehensive readme file and an example network file to experiment with. Mason's rule is traditionally used for control system analysis but has applications in microwave circuit design, filter design and many other areas.
(If you want to develop this code further, please find it here: https://github.com/robwalton/mason)

Comments and Ratings (15)

SHAHIL SHAH

Thanks a lot for sharing. Very useful.

Darwincj

Very nice, thank you!

Hi, thanks for this submission. It's really great job.

Yet, I have a question. I'm using it to calculate gains for the graphs with positive feedback loops. at the calculation step I feed network with numeric coefficients (via num2str) and the call eval(Num)/eval(Den) to obtain numerical gain. But with positive feedback loops I always get negative denumerator. Is there a way how to handle positive feedback loop properly using Masons formula?

Thanks,

Arsen

Soraya

Soraya (view profile)

Very nice and clean code, thanks for making it accessible to anyone, it is a powerful tool!

The program is good, but too complex to understand.
We developed a simple way to solve this peoblem in our new submitted file signal_flow_graphz. Where the network description file is replaced by a connection matrix Q and an input Matrix P. The simultaneous equations of the linear system are expressed in a matrix form:
X=QX+PU.
The solution is expressed by a simple MATLAB inversion command line:
W=X/U=inv(eye(size(Q))-Q)*P
Thus the calculation process is completely transparent to the user and eazier to debug or to modify. In signal_flos_graphz this command line is replaced by a function sigflow.m just for doing some check to matrices Q and P. Moreover, this method is valid to MIMO systems.

rami dred

Antonio Nanner

Simple to use, but very useful

Kosta Grgurevic

Good

Ramiro Aduviri

thank you

racky lee

nice!

Lei Pan

Very nice. Just wondering if possible to contrustruct paths automatically by readling a state-flow diagram?

aji devianto

ok

Salomon Luque

Josh Weaver

Impressive

Francisco Lotufo

Updates

1.0.0.0

Added link to github copy

1.0.0.0

Update file in order to add BSD license and Mathwork's request.

modifying description

MATLAB Release Compatibility
Created with R11.1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor

MasonsRule/MasonsRule/