Bode Plot Calculator: How to Use One
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
A Bode plot calculator takes a transfer function (a ratio of polynomials in s) and plots its magnitude (in decibels) and phase (in degrees) against frequency on a logarithmic axis. You enter the numerator and denominator coefficients, and the tool returns the two plots, often with the ability to read values at any frequency. This page explains how these calculators work, what the plots mean, and how to use them without making common mistakes.
Formula
The Bode plot is based on the transfer function H(s) = N(s) / D(s), where N(s) and D(s) are polynomials in the complex frequency variable s = jω (j = √-1, ω = 2πf). The magnitude in decibels is:
|H(jω)|dB = 20·log�₀(|H(jω)|)
and the phase is:
∠H(jω) = atan2(Im(H(jω)), Re(H(jω))) in degrees or radians.
Here, ω is the angular frequency in rad/s (ω = 2πf, with f in Hz), Re and Im are the real and imaginary parts of the complex number H(jω). The calculator evaluates H at each frequency, then converts to dB and degrees.
Worked Example
Take the default transfer function H(s) = 1 / (s² + 2s + 1) = 1/(s+1)². At f = 10 Hz, ω = 2π·10 ≈ 62.83 rad/s. Then s = jω = j62.83. Compute s² = (j62.83)² = -3948, and 2s = j125.66. So D = -3948 + j125.66 + 1 = -3947 + j125.66. The magnitude |H| = 1 / √((-3947)² + (125.66)²) ≈ 1/3949 ≈ 0.0002532. In dB: 20·logâ‚�â‚€(0.0002532) ≈ -71.93 dB. The phase = atan2(0, 1) – atan2(125.66, -3947) = 0 – (Ï€ – 0.0318) ≈ -3.11 rad = -178.2°. The calculator’s output for these defaults is about -71.93 dB and -178.2°, matching the manual calculation.
What a Bode Plot Tells You
A Bode plot reveals how a linear time-invariant system responds to sinusoidal inputs of different frequencies. The magnitude plot shows gain or attenuation: a value of 0 dB means the output amplitude equals the input; positive dB means amplification, negative dB means attenuation. The phase plot shows the time shift between input and output, expressed as a fraction of the period. Engineers use Bode plots to assess stability (gain margin, phase margin), filter characteristics (cutoff frequencies, roll-off), and resonance peaks.
How to Enter a Transfer Function
Most Bode plot calculators accept the transfer function as two lists of coefficients: the numerator and the denominator, ordered from highest power of s down to the constant term. For example, H(s) = (s+2)/(s²+3s+5) is entered as numerator “1 2� and denominator “1 3 5�. If a polynomial has a missing term, you must include a zero coefficient. For instance, H(s) = 1/(s²+1) is numerator “1� and denominator “1 0 1�. Some calculators accept symbolic expressions like “(s+2)/(s^2+3*s+5)� instead; check the tool’s instructions.
Common Mistakes and How to Avoid Them
- Forgetting zero coefficients – Omitting a zero changes the polynomial entirely. Always write every term from highest degree down.
- Mixing up Hz and rad/s – The Bode plot’s x-axis is usually in rad/s or Hz. If you need Hz, convert ω = 2πf.
- Using natural frequency vs. cutoff frequency – For a second-order system, the corner frequency is ωₙ, not the frequency where the magnitude is -3 dB (that occurs at ωₙ for a damping ratio of 0.707, but otherwise differs).
- Ignoring phase wrap – Phase is often shown modulo 360°; a phase of -540° is the same as -180° for stability calculations, but the unwrapped plot shows the total phase lag.
- Rounding too early – When computing manually, keep several significant figures until the final step to avoid errors in the phase near 0° or 180°.
Limitations of the Calculator
A standard Bode plot calculator assumes a rational transfer function with real coefficients. It does not handle time delays (e-sT) directly, though some tools approximate them. It also assumes the system is linear and time-invariant; nonlinearities or time-varying parameters invalidate the plot. For systems with time delays, you need a more advanced tool or you can approximate the delay with a Padé approximation. Additionally, the calculator only evaluates the frequency response; it does not compute stability margins automatically unless the tool includes that feature.
Alternatives and Related Tools
If you need more than a basic Bode plot, consider:
- Nyquist plot – Plots the complex frequency response on the complex plane, useful for stability analysis.
- Nichols chart – Plots magnitude vs. phase, helpful for closed-loop design.
- Root locus – Shows how closed-loop poles move as gain changes.
- Step response – Shows time-domain behavior, complementary to frequency-domain plots.
Many online tools and software packages (like MATLAB or Python’s control library) combine these, but a simple Bode plot calculator is often enough for homework or quick checks.
Frequently Asked Questions
What is the difference between a Bode plot and a transfer function?
A transfer function is a mathematical expression H(s) that describes the system’s input-output relationship in the Laplace domain. A Bode plot is a graphical representation of that transfer function evaluated along the imaginary axis (s = jω), showing magnitude and phase versus frequency. The plot is a visualization of the transfer function’s frequency response.
How do I read the cutoff frequency from a Bode plot?
The cutoff frequency (or corner frequency) is where the magnitude is 3 dB below the passband value (for a low-pass filter, that’s the frequency where the magnitude drops to 0.707 of its DC value). On the Bode plot, find the frequency where the magnitude curve crosses the -3 dB line relative to the flat part of the curve. For a first-order system, this is also where the phase is -45°.
Can I use a Bode plot calculator for a system with a time delay?
Not directly, because a time delay adds a factor e-sT, which is not a rational polynomial. Some calculators allow you to enter a delay separately, but if not, you can approximate the delay with a Padé approximation (e.g., first-order: e-sT ≈ (1 – sT/2)/(1 + sT/2)). This gives a rational transfer function that is accurate up to a certain frequency.
Why does the phase start at 0° and go to -180° for a second-order low-pass filter?
At low frequencies, the output is in phase with the input (0°). As frequency increases, the phase lag increases. Each pole contributes -90° of phase shift at high frequencies, so two poles give -180°. The transition occurs around the corner frequency, and the slope of the phase curve depends on the damping ratio.
What does a resonance peak look like on a Bode plot?
For a second-order system with damping ratio ζ < 0.707, the magnitude plot shows a peak above the DC value at a frequency near ωₙ√(1-2ζ²). The peak height is 1/(2ζ√(1-ζ²)) in linear units, or 20·log�₀ of that in dB. The phase at the peak frequency is -90°.
Is a Bode plot the same as a frequency response?
Yes, in practice. A frequency response is the steady-state response of a linear system to a sinusoidal input at a given frequency. The Bode plot is a standard way to display the frequency response across a range of frequencies, with magnitude and phase as separate plots.
Related
Formula used
in num | Numerator coefficients (e.g. 1) | - | 1 | 0 in den | Denominator coefficients (e.g. 1 2 1) | - | 1 2 1 | 0 in freq | Frequency (Hz) | Hz | 10 | 0 out mag | Magnitude | dB | 20*log10(sqrt((real(1)^2+imag(1)^2))) | 2 out phase | Phase | deg | atan2(imag(1), real(1))*180/pi | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.