Advanced maths

Rational feedback delay margin calculator from gain crossings

Find the first critical pure feedback delay from simple unit-gain crossings of a stable nominal rational loop.

Your numbers

Constant coefficient first, followed by increasing powers of s.
Constant coefficient first, followed by increasing powers of s.
Enter finite values within the stated bounds; coordinate rows may use commas.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Find the first critical pure feedback delay from simple unit-gain crossings of a stable nominal rational loop.

THE FORMULA|K G(iω)|=1; τ=(arg(KG(iω))+π mod 2π)/ω at a critical crossing.

A worked example

For G=1/(s+1), K=2, the crossing isω=√3 and the first destabilizing delay is 2π/(3√3)≈1.2091995762.

Good to know

Stable open loop and stable nominal negative-feedback loop, nonzero strictly proper real degree 1–6 model, positive gain≤10000. Simple resolved positive gain crossings only; unit DC boundary and tangencies rejected. No model uncertainty, multiple delays or general neutral-system guarantee.

A delay can destabilize a stable loop

A pure delay rotates a frequency response without changing its magnitude. Increasing delay therefore changes where a loop crosses the negative real axis even when its unit-gain frequencies remain fixed. The delay margin asks when the initially stable feedback loop first reaches a critical configuration.

This page assumes a stable rational open loop and a stable zero-delay negative-feedback closure. It then inserts one constant pure delay into that loop. It does not analyze an already unstable nominal design, several independently delayed channels or an arbitrary characteristic equation with delay terms.

Delay uses the remaining phase lagω = √3Added lag = 2π/3τ ≈ 1.209200
Scroll across to see the full diagram.
For 2/(s+1), the unit-gain crossing hasω=√3 and needs 2π/3 more phase lag.

Compare this with the Nyquist stability calculator for a rational open loop transfer function. Find critical pure-delay values from unit-gain crossing frequencies and phases; a nominal Nyquist verdict at zero delay does not report a robustness margin.

Preparing the loop convention

Enter ascending real coefficients for G equal to N over D and a positive scalar gain K. The loop must be strictly proper, with degree between one and six. Open-loop and nominal closed-loop roots must be distinct enough for the bounded numerical root checks to resolve.

The characteristic convention is one plus K G times exp minus s tau. Changing the feedback sign changes the critical phase relation. The page rejects unit DC-gain and tangential-crossing boundary cases rather than returning a margin from a phase expression whose first-crossing interpretation has not been established there.

The first-order worked example

For G equal to one divided by s plus one and gain two, unit magnitude requires four divided by one plus omega squared to equal one. The positive crossing frequency is therefore square root of three. The loop phase at that frequency is minus pi over three.

A delay contributes minus omega tau, so another two pi over three of phase lag reaches minus pi. Dividing that lag by square root of three gives approximately 1.2091995762 time units. This explicit example checks both the gain equation and the phase-wrap convention.

Isolating every gain crossing

Squared magnitudes of real rational polynomials become polynomials in omega squared. The difference between K squared times numerator magnitude and denominator magnitude identifies all candidate positive unit-gain frequencies. The solver isolates their real roots rather than choosing a crossing from a coarse plot.

Each crossing is checked for a nonzero derivative. A nearly repeated or tangential crossing is numerically and topologically different from an ordinary transverse crossing, so the implementation declines to assign it a first-destabilizing verdict. Coefficient scaling and a bounded root-search range also limit which models are resolved safely.

From phase to critical delays

At a unit-gain crossing, the phase is measured using a two-argument arctangent of the complex numerator-denominator product. Adding pi and wrapping to the positive angular interval supplies the first positive delay that aligns the response with the negative critical direction.

A crossing's magnitude slope determines its local increasing-delay crossing direction under the declared retarded-loop assumptions. The calculator lists both the critical delays and these directions, then chooses the smallest resolved destabilizing candidate. Simply taking the smallest delay without examining direction could confuse a later restabilizing branch with the first loss of stability.

No-crossing and limiting cases

For a strictly stable open loop whose magnitude remains below one at all frequencies, no positive unit-gain crossing exists and this model is delay-independently stable. The page reports an unbounded model margin instead of manufacturing a finite crossing outside its search domain.

That conclusion depends on the stated stable, strictly proper loop and one-delay formulation. A hidden feedthrough, an omitted unstable mode or a frequency-dependent uncertainty can invalidate it. A numerical root bound that cannot be resolved is rejected rather than mistaken for proof that no crossing exists.

Using a margin as a model diagnostic

The margin uses the same time unit as the transfer function's s variable. A pole expressed per second yields seconds, while a model scaled in minutes yields minutes. Unit mismatch can produce a factor-of-sixty error without changing the formal algebra.

Treat the result as a nominal critical-delay calculation, not a safe implementation budget. Actual sampling, jitter, nonlinear saturation and model uncertainty require separate analysis. Preserve the crossing table so a control engineer can verify which frequency and direction determined the reported first margin.

A few questions, answered

Does delay change loop magnitude?

A pure delay has unit magnitude on the imaginary axis; it changes phase, not magnitude.

Why require nominal stability?

The reported first destabilizing delay is measured from a stable zero-delay closure.

What does an unbounded margin mean?

Under the declared stable strictly proper model, no unit-gain crossing exists to lose stability through this pure-delay mechanism.

Are tangential crossings supported?

No. Unresolved or repeated gain crossings are rejected rather than given an unsupported delay-margin verdict.

Find your calculator

Start typing to explore the library.