Welcome to the Bode Plot Generator, a user-friendly application designed to help control engineers to visualize and analyze the frequency response of linear, time-invariant systems.
Are you dealing with academic projects or real-world control systems? This tool offers a great way to generate Bode diagrams directly in the browser, without any additional tool or requirement. The Bode plot is essential for understanding system stability and performance characteristics like gain margin, phase margin, and sensitivity analysis.
I’m convinced an online Bode plot calculator like this will help thousands of students and engineers. And that’s why I built it.
Enjoy it.
What is a Bode Plot?
The Bode plot for a linear, time-invariant system with transfer function
(where
is the complex frequency in the Laplace domain) consists of a magnitude plot and a phase plot.
The Bode magnitude plot is the graph of
of frequency
(where
is the imaginary unit). The
-axis of the magnitude plot is logarithmic and the magnitude is graphed in decibels, i.e., a value for the magnitude
is plotted on the axis at 20log
.
The Bode phase plot is the graph of the phase, expressed in degrees, of argā”(
) as a function of
. The phase is plotted on the same logarithmic
-axis as the magnitude plot, but the value for the phase is plotted on a linear vertical axis.
Here’s an example:

Why online?
Online tools are faster. An online Bode plot without installing any software? An accelerator for many engineers.
Stability
Why do we care about Bode diagrams in the context of control engineering? Stability.
But first, we need to understand the Nyquist Criterion.
Nyquist Criterion
is our open loop transfer function (often
where
is the controller and
is the plant).- The resulting closed-loop transfer function is
. - The Nyquist criterion says: if
is the number of unstable (in the right half plane) poles of the closed-loop system, and
is the number of unstable poles of the open-loop transfer function
, the Nyquist plot of
encircles (clockwise) the point (
)
times, where
. - Looking at the criterion from a stability perspective, we want the closed loop system to have 0 unstable poles (
). - The above means that for the closed-loop system to be stable, the Nyquist plot of
must encircle the point (
)
times counter-clockwise. - In the special case where
is stable, the Nyquist criterion becomes: for the closed-loop system to be stable, the Nyquist plot of
must not encircle the point (
).
Bode Plot Stability Analysis
The Bode Plot Stability Analysis and the margins mentioned before are relevant only when
is stable and when the closed-loop system is stable. The reason being:
- If
is unstable the Bode Plot is not the right tool - If the closed-loop system is unstable it doesn’t make sense to talk about stability margins (there are no margins)
Therefore, the Bode Plot Generator will:
- Draw the Bode Plot in any case (the plot itself always exists)
- Inform the user of the stability or instability of
and the closed-loop system - Only calculate and display the stability margins when
and the closed-loop system are stable
Stability Margins
The Bode Plot Generator application calculates 4 different stability margins:
- Sensitivity Margin: the smallest distance between the Nyquist Plot of
and the point (
). The application will also indicate the associate frequency (within the range indicated). - Gain Margin (dB): the maximum allowed increase (or decrease) in the gain of
(in dB) before the closed-loop system becomes unstable. A greater increase (or decrease) will cause the Nyquist plot to encircle the point (
). The application will also indicate the associate frequency (within the range indicated). - Phase Margin (deg): how much phase variation is needed at the gain crossover frequency (i.e. where gain = 0 dB) to lose stability. The application will also indicate the associate frequency (within the range indicated).
- Delay Margin (s): how much pure time delay is needed in the loop to lose stability.
Are you only interested in the frequency response of
?Then you can ignore the stability margins mentioned here.
How to use the Bode Plot Generator
- Write the transfer function (
) as you would on a piece of paper using only digits (0-9) and the following symbols: +-/.*()^s - Enter the maximum and the minimum frequency (in rad/s) for the plot
- Every time you change one of the entries press “enter” and the tool will recalculate the plot and the stability margins
- The tool will tell you if something is wrong
- You can interact with the plot through traditional controls (pan, zoom, full-screen) and you can even take a snapshot and download the image
Credits
The Bode Plot Generator is implemented in Python using the framework Streamlit.
Feedback
The Bode Plot Generator is a new project and I’m sure it can be improved.
If you think something is wrong or you have an idea for improvement, please let me know in the comments!

