ENع
→Block reduction
الدرس 11 · Modelling systems

Reducing block diagrams to one block

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

15 دقيقة9 خطوات5 أسئلةIntermediate
عن هذا الدرس

A real loop is drawn as many blocks, junctions and loops. Three rules turn it into one block: parallel paths add, blocks in series multiply, and a negative-feedback loop becomes G/(1 + GH). Follow a motor position loop as its parts slide together into T(s) = (2s + 1)/(s³ + 2s² + 2s + 1), then check that the full diagram and the one block give the same step response.

ستتعلّم

حدّد ما تشعر بأنك أتقنته. هذا التقييم الذاتي لا يؤثر في درجة الدرس.

شكل 11 · تفاعلي
01 / 09

One block from R to Y

This diagram holds a motor shaft at the angle we ask for. R(s) is the angle asked for, Y(s) the angle we get. Our job: replace every block, junction and loop with one block, T(s) = Y(s)/R(s). The plot shows its output.

R(s)  angle asked for (input)
Y(s)  shaft angle (output)

full diagram   5 blocks, 3 junctions, 2 loops
goal           one block T(s) = Y(s)/R(s)

The plot shows the full diagram's answer
to a unit step R = 1. Any reduction must
give exactly the same curve.
جارٍ تحميل الرسم…
أو ← →
اقرأ الدرس خطوة بخطوة
  1. One block from R to Y

    This diagram holds a motor shaft at the angle we ask for. R(s) is the angle asked for, Y(s) the angle we get. Our job: replace every block, junction and loop with one block, T(s) = Y(s)/R(s). The plot shows its output.

    R(s)  angle asked for (input)
    Y(s)  shaft angle (output)
    
    full diagram   5 blocks, 3 junctions, 2 loops
    goal           one block T(s) = Y(s)/R(s)
    
    The plot shows the full diagram's answer
    to a unit step R = 1. Any reduction must
    give exactly the same curve.
  2. Blocks multiply, circles add

    A block multiplies its input by its transfer function: out = G(s) × in. A circle adds its inputs with the signs shown. A dot copies a signal unchanged. Reducing a diagram is just this algebra, one piece at a time.

    block      out = G(s) · in
    circle     out = (+ in1) (− in2) ...
    dot        pickoff: the same signal
               goes two ways
    
    motor      G = 1/(s + 1)
    tachometer H = 1
    shaft      1/s   (speed → angle)
  3. Rule 1: parallel paths add

    The controller splits the error into two paths, a gain of 2 and an integrator 1/s, then adds them. Paths whose outputs are added combine by adding: C(s) = 2 + 1/s = (2s + 1)/s.

    parallel:  out = G1·in + G2·in = (G1 + G2)·in
    
    C(s) = 2 + 1/s
         = 2s/s + 1/s
         = (2s + 1)/s
    
    # python (full program on step 7)
    C = parallel(([2], [1]), ([1], [1, 0]))
    # ([2, 1], [1, 0])
  4. Rule 2: close the inner loop

    The tachometer feeds the motor speed back. Call the motor G = 1/(s + 1) and the tachometer H = 1. Around the loop out = G·(in − H·out), so out/in = G/(1 + GH) = 1/(s + 2).

    loop:  out = G·(in − H·out)
           out·(1 + GH) = G·in
           out/in = G/(1 + GH)
    
    G = 1/(s + 1), H = 1:
      (1/(s + 1)) / (1 + 1/(s + 1))
    = 1/(s + 1 + 1) = 1/(s + 2)
    
    A plus sign at the circle would give
    G/(1 − GH) instead.
  5. Rule 3: series blocks multiply

    The inner loop's speed drives the shaft, which turns speed into angle: 1/s. When one block feeds the next, multiply: P(s) = 1/(s + 2) × 1/s = 1/(s² + 2s).

    series:  out = G2·(G1·in) = (G1·G2)·in
    
    P(s) = 1/(s + 2) · 1/s
         = 1/(s² + 2s)
    
    # python
    P = series(inner, ([1], [1, 0]))
    # ([1], [1, 2, 0])
  6. Series again: the forward path

    The controller and the plant are now in a row too, so multiply again: G(s) = C(s)·P(s) = (2s + 1)/(s³ + 2s²). This is the forward path, from the error at the first circle to the output.

    G(s) = C(s) · P(s)
         = (2s + 1)/s · 1/(s² + 2s)
         = (2s + 1)/(s³ + 2s²)
    
    What is left: one block G(s) inside one
    unity-feedback loop.
  7. Rule 2 again: the outer loop

    The output is fed straight back and subtracted at the first circle: unity feedback, H = 1. So T = G/(1 + G). Multiply top and bottom by s³ + 2s²: T(s) = (2s + 1)/(s³ + 2s² + 2s + 1). One block.

    T = G/(1 + G),  G = (2s + 1)/(s³ + 2s²)
      = (2s + 1)/(s³ + 2s² + 2s + 1)
    
    def mul(a, b):  # polynomials: coefficient lists, highest 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(a, b):
        n = max(len(a), len(b))
        a, b = [0] * (n - len(a)) + a, [0] * (n - len(b)) + b
        return [x + y for x, y in zip(a, b)]
    series   = lambda g, h: (mul(g[0], h[0]), mul(g[1], h[1]))
    parallel = lambda g, h: (add(mul(g[0], h[1]), mul(h[0], g[1])), mul(g[1], h[1]))
    feedback = lambda g, h: (mul(g[0], h[1]), add(mul(g[1], h[1]), mul(g[0], h[0])))
    
    C = parallel(([2], [1]), ([1], [1, 0]))      # 2 + 1/s
    inner = feedback(([1], [1, 1]), ([1], [1]))  # motor, tachometer
    P = series(inner, ([1], [1, 0]))             # then the shaft 1/s
    G = series(C, P)
    T = feedback(G, ([1], [1]))                  # unity feedback
    print(T)  # ([2, 1], [1, 2, 2, 1])
  8. Same output, one block

    Push a unit step into both. The full diagram, simulated block by block, and the one block T(s) draw the same curve: peak 1.43 at 2.89 s, settling at 1 because T(0) = 1. Reduction changes the drawing, never the behaviour.

    T(0) = 1/1 = 1   → the output ends at R = 1
    peak            1.43 at t = 2.89 s
    2 % settling    8.3 s
    
    import math
    # unit step through T(s), by partial fractions
    y = lambda t: 1 + math.exp(-t) - 2 * math.exp(-t / 2) * math.cos(math.sqrt(3) / 2 * t)
    ts = [i / 1000 for i in range(20001)]
    tp = max(ts, key=y)
    print(round(tp, 2), round(y(tp), 2))  # 2.89 1.43
  9. The poles come out on top

    The bottom of T(s) factors as (s + 1)(s² + s + 1), so the closed-loop poles are −1 and −0.5 ± 0.87j. They decide how the response moves, as in Poles and zeros on the s-plane. The tangled diagram hid them.

    s³ + 2s² + 2s + 1 = (s + 1)(s² + s + 1)
    
    poles   s = −1
            s = −0.5 ± 0.87j
    zero    s = −0.5   (from 2s + 1)
    
    Step response, by partial fractions:
    y(t) = 1 + e^(−t) − 2·e^(−t/2)·cos(0.87 t)

اختبار يتاح بعد الخطوة الأخيرة.