Your Equation

Tools / Control block builder

Control block builder

Join gains, controllers, plants and summing junctions with a connection list. The builder draws the block diagram, finds the overall transfer function with Mason’s gain rule, shows how the system responds, and ranks how much each parameter matters for the response you care about.

Start from an example

A unity-feedback loop. The integral term drives the steady-state error to zero but adds overshoot. Try changing Ki and watch the poles and the overshoot move.

Connection list

Each row is one element with an input signal and an output signal. Signals are just names (R, E, U, Y). A block multiplies its input by its transfer function. A Sum lists its inputs with signs, separated by commas: R, -Y means R minus Y. A signal that no element produces is an external input, for example a reference R or a disturbance D. Feedback is simply a signal used before the element that produces it. Parameters accept plain numbers. For a custom transfer function type coefficients with the highest power first, so 2 3 1 means 2s² + 3s + 1.

Control system connection list
ElementTypeInputOutputParametersRemove
S1 Adds or subtracts its inputs
G1
G2

    Choose the response to analyse

    Stableslowest pole decays at 0.75 per second1final value for a unit step23.64 %overshoot0.7688 srise time4.886 ssettling time (2 %)2.413 rad/sbandwidth50.63°phase margin∞gain margin
    • The response overshoots its final value by 23.64 %, peaking at 1.773 s.
    • A constant R of 1 settles Y at 1 exactly.
    • A phase margin of 50.63° is comfortable.
    • For overshoot, G1 Kp matters most: changing it by 10 % moves the result by up to 2.161 %.

    Block diagram

    S1G1 · PI controller(0.4s + 1) / (s)G2 · First-order lag(5) / (2s + 1)E+−UYR

    Drawn automatically from the connection list. Feedback wires run underneath. The connection list is the exact description.

    Overall transfer function

    Y(s) / R(s) = s + 2.5s² + 1.5s + 2.5

    Poles: -0.75 ± 1.392j. Zeros: -2.5.

    Show Mason’s gain rule working

    Forward paths from R to Y

    • P1 = G1·G2 via R → E → U → Y

    Feedback loops

    • L1 = −G1·G2 around E → U → Y → E → E

    Combining them

    • Δ = 1 − (L1)
    • Δ1 = 1 (loops touching P1 are left out)
    • T(s) = (P1·Δ1) / Δ

    Mason’s gain rule. Two loops “touch” if they share a signal. The solver then multiplies out these products with exact polynomial arithmetic to get the transfer function above.

    Step response

    Y when R jumps from 0 to 1 at time zero.

    00.20.40.60.811.2012345678 final value 1settles 4.886 speak 23.64 % time (s)Y

    Frequency response of the overall system

    How strongly Y follows R at each frequency. The response falls 3 dB below its low-frequency value at 2.413 rad/s (the bandwidth).

    −40−30−20−100100.1110100 0 dBbandwidth frequency (rad/s)magnitude (dB)
    −140−120−100−80−60−40−2000.1110100 bandwidth frequency (rad/s)phase (°)

    Pole-zero map

    Crosses are poles, circles are zeros. Poles in the shaded left half give decaying behaviour.

    realimaginarystable side

    Open loop and margins

    The loop is cut at S1, input Y. L(s) is the gain a signal picks up going once around the loop. Phase margin is how far the phase is from −180° where the gain is 0 dB; gain margin is how much more gain the loop could take where the phase reaches −180°.

    L(s) = s + 2.5s² + 0.5s

    50.63°phase margin at 1.704 rad/s∞gain margin (phase never reaches −180°)
    −40−2002040600.010.1110100 0 dBgain crossover frequency (rad/s)magnitude (dB)
    −200−150−100−5000.010.1110100 −180°gain crossover frequency (rad/s)phase (°)

    Sensitivity

    How far the chosen result moves when each parameter is changed by −10 % and +10 %, all others held. The line marks today’s value, 23.64 %.

    G1 · KpPI controller 0.4 · S = −0.87Key driver
    21.68 %25.8 %
    G1 · KiPI controller 1 · S = +0.78
    21.71 %25.4 %
    G2 · τFirst-order lag 2 · S = +0.78
    21.71 %25.4 %
    G2 · KFirst-order lag 5 · S = −0.09
    23.4 %23.83 %

    Vary one parameter

    Step responses of Y as one parameter takes five values. Everything else stays as it is.

    00.51024681012 time (s)Y
    KpStabilityFinal valueOvershootSettling
    0.2stable137.06 %6.881 s
    0.3stable129.48 %5.02 s
    0.4 (now)stable123.64 %4.886 s
    0.6stable115.44 %3.162 s
    0.8stable110.19 %3.171 s

    How to read it

    The builder treats the diagram as a signal-flow graph and applies Mason’s gain rule: add up every forward path from input to output, each weighted by what remains of the loops it does not touch, and divide by one minus the loops (plus the products of loops that do not touch). The result is a ratio of polynomials in s, found with exact polynomial arithmetic rather than by repeated simplification.

    • Poles and zeros. The poles are the roots of the denominator. If every pole has a negative real part, the system is stable. The slowest pole (closest to the imaginary axis) sets how long the response takes to settle; a pole with a large imaginary part means oscillation.
    • Step response. The output when the input jumps from 0 to 1. Overshoot, rise time (10 % to 90 %) and 2 % settling time are read from this curve.
    • Margins. Phase and gain margin describe how close the loop is to instability. They need an open loop, so choose where to cut the loop: the cut is made at one input of a summing junction, and the open-loop response L is everything the signal passes through on its way around and back.
    • Sensitivity. Each numeric parameter is changed by −10 % and +10 % in turn, with all others held, and the chosen result is recomputed. S is the percentage change of the result for a 1 % change of the parameter. A parameter with a small bar matters little for that result; a different result can rank them differently.

    Limits: linear, time-invariant systems made of ideal blocks. There is no time-delay block, no saturation and no sampling. Overshoot, rise time and settling time are shown only for stable systems with a non-zero final value. The block diagram is drawn automatically, so the layout may differ from your textbook; the connection list is the exact description.