Bode Plot Calculator & Interactive Generator
Enter a transfer function in polynomial or zero–pole–gain form to generate magnitude and phase Bode plots over a logarithmic frequency range.
1. Define the transfer function H(s)
2. Frequency range
3. Bode magnitude & phase plots
Magnitude |H(jω)| in dB
Phase ∠H(jω) in degrees
Tip: Hover over the curves to read exact magnitude and phase values at each frequency.
How this Bode plot calculator works
This tool evaluates the transfer function \(H(s)\) along the imaginary axis \(s = j\omega\) over a logarithmic grid of frequencies. For each frequency \(\omega\):
- It computes the complex value \(H(j\omega)\).
- Magnitude in dB: \(20 \log_{10} |H(j\omega)|\).
- Phase in degrees: \(\angle H(j\omega)\) converted from radians to degrees.
General transfer function:
\[ H(s) = \frac{b_0 s^n + b_1 s^{n-1} + \dots + b_n}{a_0 s^m + a_1 s^{m-1} + \dots + a_m} \]
Evaluated on the imaginary axis:
\[ H(j\omega) = H(s)\big|_{s = j\omega} \]
Magnitude and phase:
\[ |H(j\omega)| = \sqrt{\Re(H)^2 + \Im(H)^2}, \quad \angle H(j\omega) = \tan^{-1}\left(\frac{\Im(H)}{\Re(H)}\right) \]
Typical example: second-order low-pass
A standard second-order low-pass filter with natural frequency \(\omega_n\) and damping ratio \(\zeta\) has:
\[ H(s) = \frac{\omega_n^2}{s^2 + 2\zeta \omega_n s + \omega_n^2} \]
For example, with \(\omega_n = 10\ \text{rad/s}\) and \(\zeta = 0.7\):
- Numerator coefficients: \(b = [100]\)
- Denominator coefficients: \(a = [1,\ 14,\ 100]\)
The magnitude plot is flat near 0 dB at low frequency, then rolls off at −40 dB/decade after the corner frequency, while the phase transitions from 0° to −180°.
Zeros, poles, and gain interpretation
In zero–pole–gain form, the transfer function is written as:
\[ H(s) = K \frac{\prod_i (s - z_i)}{\prod_j (s - p_j)} \]
- Real zero at \(-\omega_z\): adds +20 dB/decade to the slope after \(\omega_z\) and +90° phase shift.
- Real pole at \(-\omega_p\): adds −20 dB/decade to the slope after \(\omega_p\) and −90° phase shift.
- Complex conjugate poles: produce a −40 dB/decade roll-off and up to −180° phase shift.
- Gain K: shifts the magnitude plot vertically by \(20 \log_{10} |K|\) dB without changing phase.
Choosing a good frequency range
To capture all important dynamics, choose \(\omega_{\min}\) and \(\omega_{\max}\) such that:
- \(\omega_{\min}\) is at least one decade below the smallest pole/zero magnitude.
- \(\omega_{\max}\) is at least one decade above the largest pole/zero magnitude.
For example, if your poles and zeros are around 1, 10, and 100 rad/s, a range of 0.1 to 1000 rad/s with 50–100 points per decade works well.
FAQ
What is a Bode plot used for?
Bode plots are used in control systems, signal processing, and electronics to analyze stability margins, bandwidth, and how a system responds to sinusoidal inputs at different frequencies.
Does this calculator show asymptotic lines?
This tool computes the exact numerical frequency response. The curves you see are the true magnitude and phase, not only asymptotic approximations. However, the slopes on the log–log scale still reflect the classic ±20 dB/decade per pole/zero behavior.
Can I use it for discrete-time systems?
This version assumes a continuous-time transfer function in the Laplace variable \(s\). For discrete-time systems with \(z\)-domain transfer functions, you can approximate by mapping \(z\) to \(s\) (e.g., via bilinear transform) and then plotting the resulting continuous-time equivalent.