-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (118 loc) · 5.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="apple-touch-icon" sizes="180x180" href="favicon_io/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon_io/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon_io/favicon-16x16.png">
<link rel="manifest" href="favicon_io/site.webmanifest">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open%20Sans">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<!--Favicon has roboto mono font, white letter, black background.-->
<title>Mason's Gain Formula</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="styles.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="app.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/FileSaver.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/nerdamer.core.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/Algebra.min.js"></script>
<script id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cytoscape.min.js" integrity="sha256-dB67c4TXRS6fjUDgpC3eu7rK8QOIGgXK7vXHpN5CEI4=" crossorigin="anonymous"></script>
</head>
<body onload="onBodyLoad()">
<span id='topOfPage'></span>
<div class="halfWidthEach">
<div>
<a href="instructions.html">Instructions & Caveats</a><br>
<p><small>A portion of the code for this site was taken from an open source resource that requires attribution. <a href="attribution.html">View attribution.</a></small></p><br>
<input type="button" onclick="addRow()" value="Add Row"></input>
<input type="button" onclick="removeLastRow()" value="Remove Last Row"></input>
<input type="button" onclick="removeAllRows()" value="Delete Rows"></input>
<input type="button" onclick="generateSample()" value="Generate Sample"></input>
<br>
<table id="table">
<tr>
<th>from</th>
<th>to</th>
<th>gain</th>
</tr>
</table>
<br>
Enter the consecutive connections first in descending order (0, 1, etc), then the nonconsecutive ones.
<br><br>
<div class="halfWidthEach">
<div>
<input type="file" id="fileInput"></input><br>
<br><br>
<input type="radio" id="tableSubmit" onclick="uncheckFileSubmit()"></input>
<label for="tableSubmit">Submit Values Through Table</label>
<br>
<input type="radio" id="fileSubmit" checked onclick="uncheckTableSubmit()"></input>
<label for="fileSubmit">Submit Values Through File</label>
</div>
<div id="pageLinks"></div>
</div>
<br><br>
<input type="button" value="Submit" onclick="onSubmit()"></input><br>
<input type="button" value="Download File For Current Graph" onclick="downloadEdgeFile()"></input><br>
<textarea id="content-target"></textarea>
</div>
<div>
The gain formula is as follows:
<div class="halfWidthEach">
<div class="math">
<br><span class="left">$$G = \frac{y_\text{out}}{y_\text{in}} = \frac{ \sum_{k=1}^N {G_k \Delta _k} }{ \Delta\ }$$</span>
<br><span class="left">$$\Delta = 1 - \sum L_i + \sum L_iL_j- \sum L_iL_jL_k + \cdots + (-1)^m \sum \cdots +\cdots$$</span>
</div>
<div></div>
</div>
<br>
where:
<ul>
<li>Δ = the determinant of the graph.</li>
<li>y<sub>in</sub> = input-node variable</li>
<li>y<sub>out</sub> = output-node variable</li>
<li>G = complete gain between y<sub>in</sub> and y<sub>out</sub></li>
<li>N = total number of forward paths between y<sub>in</sub> and y<sub>out</sub></li>
<li>G<sub>k</sub> = path gain of the kth forward path between y<sub>in</sub> and y<sub>out</sub></li>
<li>L<sub>i</sub> = loop gain of each closed loop in the system</li>
<li>L<sub>i</sub>L<sub>j</sub> = product of the loop gains of any two non-touching loops (no common nodes)</li>
<li>L<sub>i</sub>L<sub>j</sub>L<sub>k</sub> = product of the loop gains of any three pairwise nontouching loops</li>
<li>Δ<sub>k</sub> = the cofactor value of Δ for the k<sup>th</sup> forward path, with the loops touching the k<sup>th</sup> forward path removed. </li>
</ul>
<p><small>Descripton Liscenced under Wikipedia's
<a href="https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License">Creative Commons Attribution-ShareAlike License</a><br>
<a href="https://en.wikipedia.org/wiki/Mason%27s_gain_formula#Formula">Original Ariticle.</a>
</small></p>
</div>
</div>
<div class="halfWidthEach">
<div>
<p id='totalGraphDesc'></p><br>
<a href='#topOfPage' id='signalFlowGraphLink'>Top Menu</a>
</div>
<div>
Signal Flow Graph:<br>
<div id='generalChart' class="cytoscapeChart"></div>
</div>
</div>
<div id='numeratorStr'></div><br>
<div id='determinantStr'></div>
<!--<div class="halfWidthEach">
<div class="math">
<div class="left" id='numeratorStr'></div>
</div>
<div id='determinantStr'></div>
</div><br>-->
<div class="halfWidthEach">
<div>
<div id='loopGraphs'></div>
<div id='nonTouchingLoopGraphs'></div>
</div>
<div id='forwardPathGraphs'></div>
</div>
</body>
</html>