Signal-flow graphs and Mason's gain rule
لم يُترجم بعد؛ يُعرض باللغة الإنجليزية
عن هذا الدرس
A signal-flow graph draws a system as nodes (signals) and arrows (gains). Mason's gain rule reads the transfer function straight off the graph, with no redrawing: find the forward paths, the loops and which loops touch, then T = Σ PₖΔₖ/Δ. Follow a token round every path and loop of one graph to get T(s) = (s + 2)/(s² + 3s + 3), then check it against a node-by-node simulation.
Dots and arrows, not boxes
A signal-flow graph draws a system as dots and arrows. Each dot, called a node, is a signal. Each arrow, called a branch, multiplies its signal by the gain written on it. We want one answer: T = Y/R.
node a signal (R, x₁ … x₄, Y)
branch an arrow with a gain:
head signal = gain × tail signal
this graph 6 nodes, 9 branches
goal T(s) = Y(s)/R(s)
The same system as a block diagram:
two lags 1/(s + 1) and 1/(s + 2) in a row,
a feedforward from R into the second,
all inside unity negative feedback.اقرأ الدرس خطوة بخطوة
Dots and arrows, not boxes
A signal-flow graph draws a system as dots and arrows. Each dot, called a node, is a signal. Each arrow, called a branch, multiplies its signal by the gain written on it. We want one answer: T = Y/R.
node a signal (R, x₁ … x₄, Y) branch an arrow with a gain: head signal = gain × tail signal this graph 6 nodes, 9 branches goal T(s) = Y(s)/R(s) The same system as a block diagram: two lags 1/(s + 1) and 1/(s + 2) in a row, a feedforward from R into the second, all inside unity negative feedback.A node adds what flows in
A node's value is the sum of the signals arriving on its arrows. Node x₁ receives R × 1, x₂ × (−1) and Y × (−1), so x₁ = R − x₂ − Y. Arrows leaving a node copy its value; they never change it.
x₁ = 1·R + (−1)·x₂ + (−1)·Y x₂ = (1/s)·x₁ x₃ = 1·x₂ + 1·R + (−2)·x₄ x₄ = (1/s)·x₃ Y = 1·x₄ A summing junction and a pickoff point are both just a node here.Forward path P₁
A forward path runs from input to output, visiting no node twice. Its gain is the product of its branch gains. The main path gives P₁ = 1 × 1/s × 1 × 1/s × 1 = 1/s².
P₁ R → x₁ → x₂ → x₃ → x₄ → Y = 1 × 1/s × 1 × 1/s × 1 = 1/s²A shortcut makes path P₂
The branch R → x₃ skips ahead, so there is a second forward path: R → x₃ → x₄ → Y. Its gain is P₂ = 1 × 1/s × 1 = 1/s. Mason's rule uses every forward path.
P₂ R → x₃ → x₄ → Y = 1 × 1/s × 1 = 1/s forward paths found: 2Two small loops
A loop starts at a node, follows the arrows and comes back, visiting no node twice. Its gain is the product around it. L₁ = 1/s × (−1) = −1/s. L₂ = 1/s × (−2) = −2/s.
L₁ x₁ → x₂ → x₁ = 1/s × (−1) = −1/s L₂ x₃ → x₄ → x₃ = 1/s × (−2) = −2/sThe big loop L₃
One more loop goes all the way round, through the output and back to x₁. L₃ = 1/s × 1 × 1/s × 1 × (−1) = −1/s². That makes three loops in all.
L₃ x₁ → x₂ → x₃ → x₄ → Y → x₁ = 1/s × 1 × 1/s × 1 × (−1) = −1/s² loops found: 3Loops that don't touch
Two loops touch if they share a node. L₁ uses x₁ and x₂; L₂ uses x₃ and x₄. They share nothing, so they are non-touching. L₃ touches both. The only non-touching pair is L₁L₂ = 2/s².
L₁ nodes x₁ x₂ L₂ nodes x₃ x₄ L₃ nodes x₁ x₂ x₃ x₄ Y non-touching pairs: L₁L₂ only L₁·L₂ = (−1/s)(−2/s) = 2/s² no non-touching triplesThe graph determinant Δ
Δ = 1 − (sum of all loop gains) + (sum of non-touching pairs) − (non-touching triples) and so on. Here: Δ = 1 + 1/s + 2/s + 1/s² + 2/s² = 1 + 3/s + 3/s².
Δ = 1 − (L₁ + L₂ + L₃) + L₁L₂ = 1 − (−1/s − 2/s − 1/s²) + 2/s² = 1 + 1/s + 2/s + 1/s² + 2/s² = 1 + 3/s + 3/s² Signs alternate: odd-sized groups of non-touching loops subtract, even add.Each path's own Δ
Δₖ is Δ worked out with only the loops that do not touch path k. P₁ touches all three loops, so Δ₁ = 1. P₂ misses L₁, so Δ₂ = 1 − L₁ = 1 + 1/s.
P₁ nodes R x₁ x₂ x₃ x₄ Y → touches L₁ L₂ L₃ Δ₁ = 1 P₂ nodes R x₃ x₄ Y → misses L₁ Δ₂ = 1 − L₁ = 1 + 1/sMason's gain rule
T = (P₁Δ₁ + P₂Δ₂)/Δ = (1/s + 2/s²)/(1 + 3/s + 3/s²). Multiply top and bottom by s²: T(s) = (s + 2)/(s² + 3s + 3). One formula, no redrawing.
T = Σ Pₖ Δₖ / Δ = (1/s²·1 + 1/s·(1 + 1/s)) / Δ = (1/s + 2/s²) / (1 + 3/s + 3/s²) = (s + 2)/(s² + 3s + 3) def mul(a, b): # polynomials in q = 1/s, lowest power first out = [0] * (len(a) + len(b) - 1) for i, x in enumerate(a): for j, y in enumerate(b): out[i + j] += x * y return out def add(*ps): n = max(len(p) for p in ps) return [sum(p[i] for p in ps if i < len(p)) for i in range(n)] neg = lambda p: [-x for x in p] L1, L2, L3 = [0, -1], [0, -2], [0, 0, -1] # loop gains P1, P2 = [0, 0, 1], [0, 1] # forward paths D = add([1], neg(add(L1, L2, L3)), mul(L1, L2)) # L1, L2 don't touch D1, D2 = [1], add([1], neg(L1)) # P2 misses L1 num = add(mul(P1, D1), mul(P2, D2)) print(num, D) # [0, 1, 2] [1, 3, 3]Check it with a step
Push a unit step into R. Simulating the graph node by node and simulating T(s) draw the same curve. It settles at T(0) = 2/3, the value of T(s) at s = 0.
T(0) = 2/3 → the output ends at 0.667 poles s = −1.5 ± 0.87j y(t) = 2/3 − (2/3)·e^(−1.5t)·cos(0.87 t) import math w = math.sqrt(3) / 2 y = lambda t: 2/3 - 2/3 * math.exp(-1.5 * t) * math.cos(w * t) print(round(y(1), 3), round(y(2), 3), round(y(6), 3)) # 0.57 0.672 0.667
أسئلة سريعة: 5
اختر إجابة واحدة لكل سؤال. يمكنك تغيير اختياراتك قبل التحقق منها.
01Node x has three arrows coming in: from a with gain 2, from b with gain −1 and from c with gain 1/s. What is x?
A node is the sum of its incoming signals, each multiplied by its branch gain: x = 2a + (−1)b + (1/s)c.
02A forward path crosses branches with gains 3, 1/s and −2. What is its path gain?
A path gain is the product of the branch gains along it: 3 × (1/s) × (−2) = −6/s.
03A graph has loops L₁, L₂ and L₃. Only L₁ and L₃ share no node. What is Δ?
Δ = 1 − (sum of all loop gains) + (sum of products of non-touching pairs) − … Only L₁L₃ is a non-touching pair, and there are no non-touching triples.
04In this lesson's graph, why is Δ₂ = 1 − L₁ but Δ₁ = 1?
Δₖ keeps only the loops that do not touch path k. P₂ (R → x₃ → x₄ → Y) misses L₁ (x₁, x₂), so Δ₂ = 1 − L₁. P₁ passes through every node, so no loop is left and Δ₁ = 1.
05A single loop has forward gain G and feedback gain −H back to the input node. What does Mason's rule give?
One path P₁ = G touching the one loop L₁ = −GH, so Δ = 1 + GH and Δ₁ = 1: T = G/(1 + GH), the same feedback rule as block-diagram reduction.
المسرد
- Signal-flow graph
- A drawing of a linear system as nodes joined by arrows. Each node is a signal; each arrow carries a gain.
- Node
- A point that stands for one signal. Its value is the sum of the signals arriving on its incoming arrows.
- Branch
- An arrow from one node to another. The signal at its head is its gain times the signal at its tail.
- Forward path
- A route along the arrows from the input node to the output node that visits no node twice.
- Loop
- A route along the arrows that starts and ends at the same node and visits no other node twice.
- Non-touching loops
- Loops that share no node. Their gains multiply together in Δ.
- Determinant Δ
- 1 − (sum of loop gains) + (sum of non-touching pair products) − (sum of non-touching triple products) + …
- Cofactor Δₖ
- Δ worked out using only the loops that do not touch forward path k.
الملاحظات والمصادر
- The branch gains are illustrative round numbers, not a measured machine. Every number and curve in the figure is computed from them.
- Mason's gain formula: S. J. Mason, Proc. IRE 44(7), 920–926, 1956. Path, loop and non-touching follow the usual textbook definitions (B. C. Kuo).
- Block-diagram reduction (see Reducing block diagrams to one block) gives the same T(s): the inner loops become 1/(s + 1) and 1/(s + 2), and closing the outer loop gives (s + 2)/(s² + 3s + 3). Mason's rule gets there without redrawing.
- The Python is plain Python 3. Each gain is a list of coefficients of 1/s, lowest power first, so [1, 3, 3] means 1 + 3/s + 3/s². Multiplying by s² turns that list into s² + 3s + 3.
- S. J. Mason, Feedback Theory: Further Properties of Signal Flow Graphs, Proc. IRE 44(7), 920–926, 1956
- Wikipedia, Mason's gain formula (definitions after B. C. Kuo)
- Wikipedia, Signal-flow graph (nodes add, branches multiply)
- N. S. Nise, Control Systems Engineering, 8th ed., Wiley (ch. 5, signal-flow graphs and Mason's rule)
- G. F. Franklin, J. D. Powell, A. Emami-Naeini, Feedback Control of Dynamic Systems, 8th ed., Pearson
- K. Ogata, Modern Control Engineering, 5th ed., Pearson (block diagrams, the same algebra)
- MIT OpenCourseWare 16.06 Principles of Automatic Control (S. Hall)
- MIT OpenCourseWare 6.302 Feedback Systems (Roberge, Dawson, Lundberg)
- python-control: control.feedback (to check a result; negative feedback by default)
اختبار يتاح بعد الخطوة الأخيرة.