Quick answer The Nyquist stability criterion gives the number of unstable closed-loop poles as Z = P + N (P = open-loop right-half-plane poles, N = net clockwise encirclements of (−1, 0) by L(jω)); Z = 0 means the closed loop is stable. Margins follow from the gain margin GM = 20·log₁₀(1/|G(jω_pc)|) in dB and the phase margin PM = 180° + ∠G(jω_gc).
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
Four positive-parameter models; unity negative feedback. Stability comes from the characteristic polynomial. The finite plotted curve is not a complete Nyquist contour.
Bodegain
Theory & Key Formulas
Nyquist Stability Criterion
Number of closed-loop unstable poles: $Z = N + P$
$N$: clockwise 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?
🎓
The plot shows the open-loop frequency response relative to (-1,0). This page supports four low-order models with positive K, a, b and z. Under unity negative feedback, their closed-loop poles remain in the left half-plane throughout the supported range. You can study how margins change; these four models do not demonstrate an instability boundary.
🙋
Wait, really? So the encirclement is what matters? How do I count it using this simulator?
🎓
For a complete Nyquist contour traversing the right half-plane clockwise, let N count clockwise encirclements of (-1,0). Then Z=P+N. This display draws a finite frequency sweep and its mirror, not the complete contour. The integrator model also needs a detour around its pole at the origin. The stability card is calculated from the closed-loop characteristic polynomial, not by counting turns of the clipped picture.
🙋
What about the poles and zeros? If I change the "Pole a" or "Zero z" parameters, what am I actually changing in the system?
🎓
In s+a and s+b, the poles are at -a and -b; in s+z the zero is at -z. Increasing a moves that pole farther left, making its individual time constant 1/a smaller. Compare the resulting gain and phase curves; changing one parameter is not a universal rule for improving every margin.
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 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
GM in dB is -20 log10(|G(jωpc)|) at a negative-real-axis crossing; it is not the absolute value of the gain in dB. PM is 180° plus the phase at a unity-gain crossing. Here GM is infinite because none of the four supported models has a finite -180° crossing. A dash for PM means there is no unity-gain crossing, not that the closed loop is unstable. When there are two crossings, the smaller phase margin is shown.
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.
These four positive-parameter models are closed-loop stable under unity negative feedback. For K/[s(s+a)], increasing K reduces the phase margin even though the model remains stable. Use the curves to compare margins; delays, higher-order poles and unstable plants are outside this page’s model.
P counts strictly right-half-plane open-loop poles. The factors s+a and s+b have poles -a and -b, so positive a and b give P=0. K/[s(s+a)] also has an origin pole; this is not a right-half-plane pole and requires a contour detour in a full Nyquist argument.
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
The curves show 0.01–1000 rad/s and their conjugate mirror. They omit the infinite arc and any origin-pole detour, so visual winding alone is not a stability proof. The displayed stability uses D(s)+N(s) for unity negative feedback. The controls accept positive coefficients only; negative poles parameters, delay and higher-order plants are not simulated.
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.
Enter the numerator coefficients (kNyqNum, kNum, k) and denominator coefficients (aNyqNum, aNum, a, bNyqNum, bNum) to define your open-loop transfer function G(s)H(s).
Adjust gain K using the interactive slider to observe how the Nyquist contour shifts relative to the critical point (-1, 0j) in real time.
Read stability margins: gain margin (GM in dB), phase margin (PM in degrees), gain crossover frequency (ωgc in rad/s), and overall stability status.
Count encirclements around (-1, 0j); the Nyquist criterion requires N = P for stability, where N is encirclements and P is right-half-plane poles.
Worked Example
Choose K/[s(s+a)] with K=2 and a=1. Solving |G(jω)|=1 gives ωgc≈1.250 rad/s, PM≈38.67° and GM=∞. The closed-loop characteristic polynomial is s²+s+2, whose roots are -0.5±1.323j, so it is stable. For K/(s+a), K=0.5 and a=1, there is no unity-gain crossing: PM is shown as a dash, while the closed-loop pole -1.5 is stable.
Practical Notes
For aerospace autopilot loops (e.g., short-period pitch dynamics), target GM≥6 dB and PM≥45° to ensure robustness against sensor noise and actuator delays.
When GM or PM approaches zero, the system sits near marginal stability; use this calculator to find maximum safe gain K before instability occurs.
Industrial controllers often include lead compensators; add poles/zeros via denominator/numerator fields to pre-design compensation before hardware testing.
The -180° asymptote crossing frequency sets the phase margin baseline; systems with lightly damped poles show sharp magnitude dips that reduce available gain margin.