Select an open-loop transfer function and adjust gain K to see the Nyquist plot update in real time. Automatic gain margin, phase margin, and crossover frequency calculation with Bode plot comparison.
Open-Loop Transfer Function
Transfer Function Form
Gain K
Pole a
Pole b
Zero z
Stability Summary
Results
—
GM (dB)
—
PM (°)
—
ωgc (rad/s)
—
Stability
Nyquist
Note: The red x marks the critical point (-1, 0). The blue curve is the ω > 0 branch, and the dashed curve is the mirrored ω < 0 branch. Counterclockwise encirclement of (-1, 0) adds closed-loop unstable poles.
Bodegain
Theory & Key Formulas
Nyquist Stability Criterion
Number of closed-loop unstable poles: $Z = N + P$
$N$: counterclockwise encirclements of (-1,0) by the Nyquist curve
$P$: number of open-loop right-half-plane (RHP) poles
$Z = 0$ → closed-loop stable
Gain margin: $GM = 20\log_{10}\frac{1}{|G(j\omega_{pc})|}$ (dB)
What exactly is a Nyquist plot, and why is the point at (-1, 0) so critical?
🎓
Basically, a Nyquist plot is a graphical way to check if a closed-loop control system will be stable. You take the open-loop transfer function $G(s)$ and plot its frequency response $G(j\omega)$ on the complex plane. The critical point (-1, 0) represents a phase shift of -180° and a gain of 1. In practice, if the plot encircles this point, the closed-loop system can become unstable. Try moving the "Gain K" slider above—you'll see the entire curve grow or shrink, changing its distance from that red "×".
🙋
Wait, really? So the encirclement is what matters? How do I count it using this simulator?
🎓
Exactly. The Nyquist stability criterion boils down to counting encirclements. The rule is $Z = N + P$. Here, $N$ is the net number of counter-clockwise encirclements of (-1,0). In the simulator, the solid blue curve is for $\omega > 0$, and the dashed curve is its mirror for $\omega < 0$. Watch what happens when you increase K so the curve expands and wraps around the red "×". That's a visual count of $N$ happening in real time.
🙋
What about the poles and zeros? If I change the "Pole a" or "Zero z" parameters, what am I actually changing in the system?
🎓
Great question. Those parameters define your open-loop plant. For instance, moving "Pole a" to the right makes it a slower, more dominant pole, which will pull the Nyquist plot's shape inward at low frequencies. Adding a "Zero z" introduces a phase lead, which can twist the plot away from (-1,0) and improve stability. A common case is designing a compensator (like a lead-lag network) by adjusting these very features. Play with them and see how the plot's "loop" changes shape.
Physical Model & Key Equations
The core of the analysis is the open-loop transfer function $G(s)$, which is constructed from the simulator's parameters (gain, poles, zero). Its frequency response is evaluated by substituting $s = j\omega$.
$$G(s) = K \frac{(s - z)}{(s - a)(s - b)}$$
Where $K$ is the gain, $z$ is the zero, and $a$ and $b$ are the poles. These are the parameters you adjust in the simulator. The plot shows $G(j\omega)$ as $\omega$ sweeps from $-\infty$ to $+\infty$.
The stability of the closed-loop system is determined by the Nyquist Criterion, which relates the open-loop characteristics to closed-loop stability.
$$Z = N + P$$
$Z$: Number of closed-loop poles in the Right-Half Plane (RHP). We need $Z=0$ for stability. $N$: Net number of counter-clockwise encirclements of the point $(-1, 0)$ by the Nyquist plot. $P$: Number of open-loop poles in the RHP (from $G(s)$). This is fixed by your choice of poles $a$ and $b$.
Frequently Asked Questions
The gain margin is the absolute value of the gain [dB] when the phase is -180°, and the phase margin is the difference between the phase when the gain is 0 dB and -180°. Check the value at the corresponding frequency on the Bode plot, or refer to the automatic calculation results on the right side of the screen. If the margin is positive, the system is stable; if negative, it is unstable.
After dragging the slider, release the mouse or press the Enter key in the numerical input field to update in real time. Check if JavaScript is enabled in your browser, and if reloading the page does not resolve the issue, clear the cache and try accessing again.
Decreasing the gain K increases the gain margin, making stabilization easier. Also, increasing the zero z (moving it to the left half-plane) improves the phase margin through phase lead effects. Decreasing the poles a and b slows the response but improves stability. Try adjusting each parameter while ensuring that the Nyquist plot passes to the left of the point (-1, 0).
P is the number of poles of the open-loop transfer function L(s) in the right half-plane (real part > 0). In this simulator, if poles a or b are positive, they are right-half-plane poles. For example, if a = 2 (positive), then P = 1. Check whether the 'pole values' on the screen are positive or negative, and count the number of positive ones.
Real-World Applications
Aircraft Flight Control: Autopilot systems use Nyquist analysis to ensure stability across all flight conditions. Engineers adjust gain and phase margins (visualized as distances from the (-1,0) point) to guarantee the plane doesn't enter dangerous oscillations, even with sensor delays or changing aerodynamics.
Power Grid Voltage Regulation: Large-scale power converters that stabilize grid voltage must be unconditionally stable. Nyquist plots are used to design controllers that maintain stability despite sudden load changes, preventing cascading blackouts.
Hard Disk Drive Servo Systems: The read/write head must track a microscopic track precisely. The Nyquist criterion helps design ultra-fast, stable positioning controllers that compensate for mechanical resonances in the actuator arm, which act like troublesome poles in the transfer function.
Chemical Process Control: In a temperature-controlled reactor, the process has inherent lag (poles). Nyquist analysis is used to tune PID controllers, ensuring the system doesn't oscillate out of control when setpoints change, which could lead to runaway reactions.
Common Misconceptions and Points to Note
First, note that it is not always true that "the system is absolutely stable if the Nyquist plot does not encircle (-1,0)". This statement applies under the major premise of applying the Nyquist stability criterion: when the open-loop system is stable (P=0). For instance, when controlling a plant that is inherently unstable, like an inverted pendulum (P>0), this premise no longer holds. If you try setting poles `a` or `b` to negative values (i.e., having poles in the right-half plane) in the simulator, you'll see the situation change.
Next, do not blindly trust stability margin numbers alone. For example, a gain margin (GM) of 10dB and a phase margin (PM) of 45 degrees might seem sufficient from a textbook perspective. However, if the Nyquist trajectory has a sharply pointed curve or skims very close to (-1,0), even slight model errors or disturbances can easily push the system into instability. While adjusting K in this tool, develop the habit of visually checking the "quality" of the margin—how the trajectory approaches (-1,0).
Finally, understand the gap between the simulator's transfer function model and reality. The tool deals with a very simple second-order model. Actual control objects inevitably include dead time, higher-order vibration modes, and nonlinearities. For example, adding dead time $e^{-Ls}$ introduces further phase lag, causing the Nyquist trajectory to spiral inward infinitely. Always consider how to extend the fundamental principles learned here to more realistic, complex models.