Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 37 ยท Getting Started

Block Diagrams and Feedback Basics

Read control block diagrams, derive the closed-loop formula G/(1+GH), and compute the sensitivity function and loop gain with NumPy polynomials.

Engineers draw control systems as block diagrams: boxes for components, arrows for signals, and circles for sums. A diagram shows at a glance what feeds what, and it can be turned into algebra that gives the overall behaviour. This lesson introduces the building blocks and the single most important formula in classical control, the closed-loop transfer function.

The building blocks

  • Block: a box containing a system. The signal entering is multiplied (in a sense made precise in Transfer Functions) by the block's function G(s).
  • Summing junction: a circle with signs. It adds or subtracts the incoming signals.
  • Take-off point: a dot where a signal splits so the same value goes to two places.
  • Arrow: a signal travelling in one direction.

You can think of G(s) for now as "the thing that turns an input signal into an output signal", written as a ratio of polynomials in a variable s. A pure gain of 5 is G = 5. A first-order plant with gain 2 and time constant 5 s is G(s) = 2 / (5s + 1).

The standard feedback loop

flowchart LR
    R["R(s)"] --> S(("+ -"))
    S -- "E(s)" --> C["C(s)<br/>controller"]
    C -- "U(s)" --> G["G(s)<br/>plant"]
    G --> Y["Y(s)"]
    Y --> H["H(s)<br/>sensor"]
    H -- "B(s)" --> S

A standard single-loop feedback system. The forward path is C then G; the feedback path is H.

Read the arrows to write equations. The error is E = R - B where B = H Y is the measured output. The output is Y = G C E. Substitute:

Text
Y = G C (R - H Y)
Y (1 + G C H) = G C R
Y / R = G C / (1 + G C H)

The product L = G C H is the loop gain (also called the open-loop transfer function): follow the signal once around the loop. The result is the famous rule:

Text
closed-loop = forward path / (1 + loop gain)

For unity feedback (H = 1, a perfect sensor) this becomes T = L / (1 + L) where L = G C.

Reading a feedback diagram

Forward path Controller then plant, R to Y.
Feedback path The sensor returns Y to the sum.
Loop gain L = G C H, once around the loop.

Closed loop equals forward path over one plus loop gain.

1 / 2

Sensitivity and complementary sensitivity

Two closed-loop functions appear everywhere. With unity feedback:

  • Complementary sensitivity T = L / (1 + L): how the output follows the reference.
  • Sensitivity S = 1 / (1 + L): how an output disturbance, or a change in the plant, shows up at the output.

They always satisfy S + T = 1. If you want the output to follow the reference well (T near 1 at some frequencies), then S is near 0 there, so disturbances are rejected at the same frequencies. You cannot make both T and S small at the same frequency: this trade-off underlies much of controller design.

Working with polynomials in Python

Transfer functions are ratios of polynomials, and NumPy represents a polynomial by its coefficients in descending powers: [2] for 2, [5, 1] for 5s + 1. Writing G = nG/dG and C = nC/dC, the unity-feedback closed loop is

Text
T = nG nC / (dG dC + nG nC)
Python Closed loop from polynomials

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

You should see T(s) = 20 / (5s + 21), whose DC gain is 20/21 = 0.952, matching the steady output we found by simulation in Open-Loop and Closed-Loop Control. The denominator 5s + 21 has its root at s = -4.2, so the closed loop is much faster than the open loop (root at -0.2): feedback changed the speed, not only the accuracy.

Non-unity feedback and disturbances

If the sensor has dynamics H(s), use the general rule. If a disturbance enters at the plant output, it reaches the output multiplied by S. If it enters at the plant input, it passes through G first and is multiplied by G / (1 + L).

Python Sensitivity and complementary sensitivity

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

At low frequency |S| is small and |T| is close to 1: slow reference changes are tracked and slow disturbances are rejected. At high frequency |T| falls toward 0 and |S| returns to 1, meaning the loop cannot affect fast signals. The printed S+T is always 1.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A unity-feedback loop has loop gain L(s). What is the closed-loop transfer function from R to Y?

    Y = L (R - Y), so Y (1 + L) = L R, giving T = L / (1 + L). The expression 1/(1+L) is the sensitivity, not the reference-to-output function.
  2. 2. For H = 1, what is S + T?

    S + T = 1/(1+L) + L/(1+L) = 1 at every frequency.
  3. 3. G = 2/(5s+1) and C = 10 with unity feedback. What is the denominator of the closed loop?

    den = dG dC + nG nC = (5s + 1)(1) + (2)(10) = 5s + 21.
  4. 4. Which statement about the loop gain L = G C H is correct?

    L multiplies the blocks you pass through travelling once around the loop. The closed-loop transfer function is G C / (1 + L).

Summary

  • Block diagrams use blocks, summing junctions and take-off points to show how signals flow.
  • For a loop with forward path G C and feedback H, the closed loop is G C / (1 + G C H).
  • L = G C H is the loop gain; with unity feedback T = L/(1+L), S = 1/(1+L), and S + T = 1.
  • NumPy polynomial functions (polymul, polyadd) turn the algebra into code.
  • Feedback can move the closed-loop denominator roots, changing both accuracy and speed.

Next: The Control Design Workflow and Python Toolkit