ω = 1 rad/sG(s) = 1/(s+1)²y(t)
012345-1-0.500.51time (input cycles)u, yINPUT AND OUTPUTinput uω 0.1ω 1ω 3+0.50−0.50¼ cycle = 90°-1-0.500.51-0.5j0realimaginaryNYQUIST: G(jω)ω 0.1ω 1ω 3−10.010.1110100-80-60-40-200ω (rad/s)dBBODE: GAINω 0.1ω 1ω 30 dB = gain 10.010.1110100-180-135-90-450ω (rad/s)degreesBODE: PHASEω 0.1ω 1ω 3−180°: never reached
Lit wire with moving dashes: the signal is flowing along itBlocks: the sine generator, the plant G(s) and the output; the pucks ride up and down with the signalsPlots: time response, Nyquist and Bode, computed from the modelCollars on each mast mark +1, 0 and −1, the input's full swingA frequency-response test: a sine generator shakes the plant G(s) = 1/(s + 1)² and an output meter shows what comes out. The pucks bob with the input and the output. The plots below are computed from the model: the time responses from rest at ω = 0.1, 1 and 3 rad/s, and G(jω) as a Nyquist plot and a Bode plot. The animation is not to scale in time: every frequency plays at a comfortable pace, and the time plot measures time in input cycles so the three outputs can share one axis.

Shake it

  1. To see how a system treats fast and slow changes, shake its input with a sine wave. Our plant is G(s) = 1/(s + 1)², two one-second lags in a row. The generator feeds it u(t) = sin(ωt) with ω = 1 rad/s.

Gain and phase

Every frequency

What is happening

# step 1/11 · shake
# about: Sine generator, Plant G(s), Input on the time plot

plant    G(s) = 1 / (s + 1)²
         y'' + 2y' + y = u
input    u(t) = sin(ω t)
         ω = 1 rad/s  (one cycle every 6.28 s)

ω is the angular frequency in radians per
second: 2π rad/s is one cycle per second.

The plant G(s) = 1/(s + 1)² is an illustrative example (two first-order lags, each with a 1 s time constant). Every curve is computed from it: the time plot from its exact response from rest, the Bode and Nyquist plots from G(jω). The Python is plain Python 3 with cmath and math: abs(z) is the length of a complex number and cmath.phase(z) its angle in radians. python-control's frequency_response and bode_plot give the same numbers.