Bode plot calculator (gain and phase margin)
Enter your values. The answer and the full worked solution update as you type.
Result
| ω (rad/s) | |G(jω)| | |G| (dB) | phase (°) |
|---|---|---|---|
| 0.01 | 99.99 | 40 | −90.86 |
| 0.02154 | 46.4 | 33.33 | −91.85 |
| 0.04642 | 21.52 | 26.65 | −93.99 |
| 0.1 | 9.938 | 19.95 | −98.57 |
| 0.2154 | 4.511 | 13.09 | −108.3 |
| 0.4642 | 1.904 | 5.591 | −128 |
| 1 | 0.6325 | −3.979 | −161.6 |
| 2.154 | 0.133 | −17.53 | −202.2 |
| 4.642 | 0.01796 | −34.92 | −234.5 |
| 10 | 0.001951 | −54.19 | −253 |
| 21.54 | 0.0001989 | −74.03 | −262 |
| 46.42 | 1.998 × 10⁻⁵ | −93.99 | −266.3 |
| 100 | 2 × 10⁻⁶ | −114 | −268.3 |
Draw the Bode diagram of a transfer function G(s) entered as numerator and denominator coefficients. The calculator plots the magnitude in dB and the phase against frequency, lists them in a table, and finds the gain crossover frequency (|G| = 0 dB), the phase crossover frequency (phase = −180°), the gain margin and the phase margin.
Bode plot
Step-by-step solution
Frequency response
Gain crossover: |G(jω)| = 1 (0 dB)
Phase crossover: phase = −180°
Stability
How to find gain and phase margins from a Bode plot
- Substitute s = jω and evaluate |G(jω)| in dB (20·log₁₀|G|) and the phase arg G(jω) over a range of frequencies.
- Gain crossover ω_gc: where |G(jω)| = 1, i.e. 0 dB. The phase margin is PM = 180° + phase at ω_gc.
- Phase crossover ω_pc: where the phase is −180°. The gain margin is GM = −|G(jω_pc)| in dB.
- For an open loop without right half-plane poles, the closed loop is stable when both margins are positive.
- Typical design targets are a phase margin of 45° to 60° and a gain margin of at least 6 dB.
Questions and answers
How do I enter G(s)?
Type the coefficients of the numerator and the denominator from the highest power of s down, with zeros for missing powers. 2/(s(s + 1)(s + 2)) = 2/(s³ + 3s² + 2s) is numerator 2 and denominator 1 3 2 0.
Why is the phase not limited to −180°…180°?
The phase is unwrapped: it changes continuously with frequency, so a system with three poles goes down to −270°. The crossover with −180° is found on that continuous curve.
What if there is no crossover?
If |G| never crosses 0 dB, the phase margin is infinite; if the phase never reaches −180°, the gain margin is infinite. A first-order or second-order system without delay, for example, has an infinite gain margin.
When can the margins mislead?
For open-loop systems with right half-plane poles or zeros, or with several crossovers, the margins alone do not decide stability; use the Nyquist criterion. The calculator reports the smallest margins when there are several crossovers.
How accurate are the results?
The response is evaluated directly from the complex transfer function on a fine logarithmic grid, and the crossovers are refined by bisection, so the frequencies and margins are accurate to many digits.
Practise it yourself
Practise Bode plots & margins
A calculator gives the answer. In the exam you need the method: practise it with new problems, hints and worked solutions.