Toolvito

Calculates on this device. File exports run online.

Bode Plot Generator

Type a transfer function as N(s) ÷ D(s) (coefficients or an expression such as 100 ÷ (s(s + 1)(s + 10))), or its poles and zeros, or paste measured points. You get the magnitude and phase plots with the straight-line approximation, the break frequencies, the gain and phase margins and the bandwidth.

Enter your values

Your values

Coefficients from the highest power (for example 2, 1 for 2s + 1), or an expression in s such as 10(s + 2) or s^2 + 3s + 2.

The same way: (s + 1)(s + 10), s^3 + 11s^2 + 10s or 1, 11, 10, 0.

Multiplies N(s) ÷ D(s).

More options

e^(−sθ): it adds phase lag θ ω and leaves the magnitude alone.

Leave empty for a range two decades around the break frequencies.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose Calculate.

Margins with Bode, Nyquist and step plots

Margins with Bode, Nyquist and step plots

Uses the transfer function of the result above. The server works out the crossovers and margins again (NumPy and python-control), lists the poles and zeros and the closed-loop poles, and draws Bode, Nyquist and step-response plots.

The calculator above works on your device. When you run a task in this section, Toolvito receives the values and result you submit to make the file or run the check. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

How to use the Bode plot generator

  1. Choose A transfer function and type the numerator and the denominator in s, for example 100 and s(s + 1)(s + 10). Or choose Poles, zeros and gain, or Measured frequency response to paste frequency, gain and phase.
  2. Under More options add a dead time, a frequency range, or the closed loop with unity feedback.
  3. Press Calculate. The tables give the magnitude and phase at many frequencies and the break frequencies with their damping.
  4. The box under the result works out the margins again on the server and adds Nyquist and step-response plots.

Reading a Bode plot

  • Each real pole bends the magnitude down by 20 dB per decade from its break frequency |p| and adds up to −90° of phase; each real zero does the opposite. A complex pair bends by 40 dB per decade and may peak.
  • Gain margin: how far the magnitude is below 0 dB where the phase is −180°. Phase margin: how far the phase is above −180° where the magnitude is 0 dB. Positive margins mean a stable closed loop (for an open loop with no unstable poles).
  • A dead time θ adds a phase lag of θ ω (in radians) and changes no magnitude: it lowers the phase margin.

Worked example

L(s) = 100 ÷ (s (s + 1)(s + 10)) crosses 0 dB at 3.01 rad/s, where the phase is −178.4°: the phase margin is only 1.6°. The phase reaches −180° at √10 = 3.16 rad/s, where the gain is 0.83 dB below 0 dB: the gain margin.

Limits you should know

  • Linear, time-invariant models only. Margins are read from the first crossings within the frequency range.
  • Margins alone do not prove stability for an open loop with unstable poles: use the Nyquist plot from the box below.

Related tools