How this calculation works
Check negative-feedback stability by comparing an oriented Nyquist winding with independently computed closed-loop characteristic roots.
1+K G(s)=0; for the positively oriented RHP contour,Nccw=Z−P.A worked example
G(s)=1/(s+1) with K=2 has characteristic polynomial s+3, no RHP poles or roots, zero winding and a stable closed loop.
Good to know
Proper reduced real SISO transfer function degree≤6, gain within±10000, distinct resolved poles and closed-loop roots, no imaginary-axis boundary cases. Adaptive finite RHP contour plus root cross-check; common factors and unresolved winding rejected. Instantaneous feedthrough closure must be nonsingular:1+K Dfeedthrough≠0.
Reference: MathWorks: Nyquist response convention (opens in a new tab) ↗
Closing a feedback loop changes the question
An open-loop transfer function can be stable while a chosen feedback gain destabilizes its closed loop. Conversely, suitable feedback can stabilize some unstable open-loop models. Nyquist reasoning relates the critical-point winding to the number of open-loop poles and closed-loop characteristic roots in a specified half-plane.
This page uses negative feedback with characteristic expression one plus K times G. Replacing that plus sign by a minus sign is a different feedback convention. Enter the sign through the gain deliberately and keep the same convention when comparing with another control-system package.
Compare this with the Complex polynomial zero count calculator inside a simple polygon. Combine rational open-loop poles and oriented Nyquist winding to determine closed-loop stability for declared negative feedback.
Transfer coefficients and model assumptions
Supply ascending real coefficients for the proper rational function G equal to N over D. The numerator and denominator must already be reduced. A hidden common factor can conceal an unstable internal mode, so cancellation is not silently performed as a convenience before a stability verdict.
Imaginary-axis poles and closed-loop roots require indented contours or boundary stability conventions and are excluded here. Distinct roots must be numerically resolved. Rejected boundary cases are not reported as stable merely because a plotted curve happens to avoid a sampled critical point.
The stable default loop
The default model is one divided by s plus one, with gain two. Its closed-loop characteristic polynomial is D plus K N, which equals s plus three. Both the open-loop pole minus one and closed-loop root minus three lie in the left half-plane.
The right-half-plane contour therefore contains zero relevant poles and zero zeros, and the counterclockwise winding is zero. The closed loop is stable under this convention. Changing the gain to minus two gives characteristic s minus one and introduces a right-half-plane root, providing a useful contrasting test.
Contour orientation and the argument principle
The contour encloses a finite right half-disk large enough to contain all computed poles and characteristic roots. It travels downward along the imaginary axis, then upward around the right semicircle. This is the positive orientation of that right-half-plane region.
The algorithm evaluates the ratio D plus K N over D on the contour and sums successive argument increments. Under this orientation the counterclockwise winding equals the number of characteristic zeros minus the number of open-loop poles inside. Reversing the contour would reverse the winding sign, not the underlying root counts.
Why both refinement and roots are checked
A coarse set of Nyquist points can miss a rapid turn near the critical point. The implementation doubles contour sampling and requires stable winding, a small integral-turn residual and sufficiently small consecutive argument increments. Near-critical unresolved cases fail rather than producing a confident count.
It also solves the open-loop and closed-loop polynomials independently and checks that their right-half-plane counts agree with the argument-principle relation. Agreement is a valuable consistency test. Because both calculations use finite arithmetic, it is still not a formal complex interval certificate for arbitrarily clustered roots.
Interpreting the separate counts
The P field counts right-half-plane denominator roots. The Z field counts right-half-plane closed-loop characteristic roots. Stability in the supported nonboundary domain requires Z to be zero, not necessarily a zero winding. An unstable open loop can require a nonzero winding for a stable closed loop.
Do not compare the reported winding with another plot without matching its sign and contour convention. Many presentations use clockwise encirclements or a reversed imaginary-axis traversal. The page states its orientation explicitly to make the same root-count conclusion recoverable despite those notational differences.
What remains outside a scalar verdict
The result applies to the entered rational model and feedback gain. It does not account for an omitted time delay, sampling effects, nonlinear saturation or uncertainty in a measured transfer function. A tiny unmodeled delay can matter in a system operating close to instability.
For design, inspect gain margins, phase margins and robustness with an appropriate control tool after checking the nominal root count. This calculator makes the winding relation inspectable; it does not turn one nominal stable example into a guarantee that every physical implementation will behave safely.
A few questions, answered
Is zero winding always stable?
No. Stability depends on the open-loop RHP pole count and the stated N=Z−P relation.
Which feedback convention is used?
Negative feedback with characteristic1+K G(s); the sign of K is part of the input.
Why reject an imaginary-axis pole?
That boundary case needs additional contour and stability conventions outside this implementation.
Is the root calculation independent of the winding?
It uses the characteristic polynomial and checks the contour result, rather than inferring roots from a plotted winding alone.