Bode Plot Generator
Enter the coefficients of a transfer function H(s) and read magnitude, unwrapped phase, gain margin, phase margin, poles, and zeros — plotted instantly, exported as CSV or SVG.
Free online tool · runs entirely in your browser · no signup
Transfer function
Coefficients and frequency range
Bode plots
Magnitude and phase versus logarithmic frequency
Point at a plot to inspect a sample. With keyboard focus, use Left/Right or Home/End.
Characteristics
Computed over the sampled range
| Parameter | Symbol | Value | At frequency |
|---|---|---|---|
| Gain margin | GM | — | — |
| Phase margin | φm | — | — |
| Gain crossover (0 dB) | ωgc | — | |
| Phase crossover (−180°) | ωpc | — | |
| DC gain | |H(0)| | — | |
| Zeros | zi | — | |
| Poles | pi | — | |
| Open-loop stability | — | — | |
What is a Bode plot?
A Bode plot is a pair of graphs that shows how a linear time-invariant (LTI) system responds to every frequency: a magnitude plot in decibels and a phase plot in degrees, both drawn against frequency on a logarithmic axis. Named after Hendrik Bode, who developed the technique at Bell Labs in the 1930s, it remains the standard way engineers read the frequency response of a transfer function.
The magnitude curve is 20·log₁₀|H(jω)|, so gains multiply as simple additions of dB. The phase curve is the angle of H(jω), and this tool unwraps it continuously so you can follow accumulated phase lag past −180° instead of seeing it jump.
Bode plots matter because they turn stability into something you can see: how close the loop gain is to 0 dB when the phase reaches −180° decides whether a feedback system rings, oscillates, or settles cleanly.
Key concepts
Gain margin
Gain margin is how much extra gain, in dB, the open loop can take before a unity-feedback system goes unstable. It is read at the phase crossover frequency, where the phase reaches −180°: the margin is the distance from the magnitude curve up to 0 dB. Common design guidance asks for 6 dB or more.
Phase margin
Phase margin is how much additional phase lag the open loop can absorb before instability. It is read at the gain crossover frequency, where the magnitude crosses 0 dB: the margin is the distance from the phase curve up to −180°. Common design guidance asks for 45° or more; both margins apply when the open loop is itself stable.
Corner frequency
A corner (or break) frequency is where the asymptotic magnitude changes slope — at ω = |p| for a pole p, or ω = |z| for a zero z. At a first-order corner the true curve sits 3 dB away from the asymptotes and the phase has moved 45°, which is why the −3 dB point defines bandwidth.
Poles, zeros, and slopes
Each pole bends the magnitude slope by −20 dB/decade and contributes −90° of phase; each zero adds +20 dB/decade and +90°. Complex-conjugate pole pairs with low damping add a resonant peak near their natural frequency. Counting poles and zeros against the plotted slopes is the fastest sanity check of a model.
How to use this generator
- Type the numerator and denominator coefficients of H(s) in descending powers of s — for example, 1, 0, 4 for s² + 4. Commas or spaces both work.
- Set the frequency range and choose rad/s or Hz. The sweep is logarithmic between the two limits.
- Select Generate plots. The magnitude and phase curves render immediately, and the characteristics table reports gain margin, phase margin, crossover frequencies, poles, zeros, and open-loop stability.
- Inspect any point with the pointer or arrow keys, then export the sampled response as CSV or the plots as SVG. Everything is computed locally — nothing you enter leaves the page.
Common transfer functions
Select Load to plot an example instantly.
| System | H(s) | Behavior | Load |
|---|---|---|---|
| First-order low-pass | 1 / (s + 1) | Flat to the corner, then −20 dB/decade; phase settles at −90°. | |
| First-order high-pass | s / (s + 1) | +20 dB/decade below the corner, flat above; phase starts at +90°. | |
| Second-order low-pass | 100 / (s² + 10s + 100) | −40 dB/decade above ωₙ; peaks near ωₙ when damping ζ < 0.707. | |
| Band-pass | 10s / (s² + 10s + 100) | Passes a band around ωₙ; ±20 dB/decade skirts on both sides. | |
| Integrator | 1 / s | Constant −20 dB/decade through all frequencies; phase fixed at −90°. | |
| Differentiator with pole | s / (0.1s + 1) | +20 dB/decade until the pole takes over; phase falls from +90°. | |
| PID controller | (s² + 10s + 20) / s | Integral action at low frequency, derivative boost at high frequency. | |
| Unity-feedback loop | 1 / (s(s + 1)) | Classic margins demo: integrator plus pole, finite phase margin. |
Accuracy and method
Curves are computed by evaluating the polynomials at up to 5,000 sampled frequencies; ω is used in rad/s internally and Hz inputs are converted with ω = 2πf. Phase is unwrapped continuously wherever the response is defined, and crossings are interpolated between samples, so margins are estimates within the entered range.
Margins are interpreted for an open-loop transfer function under unity feedback. If the open loop has right-half-plane poles the table says so and the Bode margins should not be trusted for closed-loop stability — use the Nyquist criterion instead.
Frequently asked questions
What does this Bode plot generator compute?
It evaluates H(jω) directly from your polynomial coefficients at logarithmically spaced frequencies, then reports the magnitude in dB, the continuously unwrapped phase in degrees, gain margin, phase margin, crossover frequencies, DC gain, and the numerically factored poles and zeros. All computation happens in your browser.
How do I read a Bode plot?
The horizontal axis is frequency on a log scale. On the magnitude plot, positive dB means amplification and negative dB means attenuation, and straight segments fall on multiples of ±20 dB/decade. On the phase plot, watch how much lag accumulates as frequency rises — the distance to −180° when the magnitude is at 0 dB is the phase margin.
What are gain margin and phase margin?
They are the two standard safety margins of a feedback loop. Gain margin is measured where the phase crosses −180° and says how many dB of extra gain the loop tolerates. Phase margin is measured where the magnitude crosses 0 dB and says how many degrees of extra lag it tolerates. Both should be positive for a stable unity-feedback loop, and they are meaningful when the open loop is itself stable.
What is the difference between a Bode plot and a Nyquist plot?
A Bode plot shows magnitude and phase as two separate curves against frequency; a Nyquist plot traces H(jω) as one curve in the complex plane. Bode plots are easier to read margins from; the Nyquist criterion is the more general stability test, and it is the right tool when the open loop has right-half-plane poles.
How do poles and zeros shape the plot?
Every pole adds −20 dB/decade of slope and −90° of eventual phase lag, starting near its corner frequency; every zero does the opposite. Lightly damped complex pole pairs add a resonant peak. This tool factors your polynomials numerically and lists the poles and zeros so you can match each break in the curve to a root.
Is this tool free, and where does my data go?
It is completely free, with no signup and no usage limits. The math runs locally in your browser — coefficients are never uploaded, and the page makes no network requests after it loads. CSV and SVG exports are generated on your machine.