Feedback, and the margin

The phase a delay never stops adding

Put a pure delay in a feedback loop and Bode's sensitivity integral does not notice: with 10 µs in the three-pole amplifier's loop the logarithm of the sensitivity still has equal areas above and below zero, 7.14 kHz·Np each side. What changes is where they are. The delay keeps turning the loop's phase above crossover, so the sensitivity becomes a comb with a tooth every 100 kHz; the desensitisation shrinks from 6.74 to 6.48 kHz·Np, the main peak rises from 5.70 dB to 13.53 and overpays it by 7%, and the comb hands the excess back below zero. The margin reads the peak from below by about 1.4 dB at every delay. Past 16.9 µs the loop is unstable and the integral stops balancing — by exactly the growth rate of the pole pair that has crossed.

Assumes: How much of the amplifier gets through · What is left at crossover · Two measurements of one margin

The area that feedback only moves measured Bode’s sensitivity integral on a three-pole amplifier and found it exact: the logarithm of the device sensitivity ∣1/(1+T)∣|1/(1 + T)|, integrated over linear frequency, has as much area above zero as below it — 6.74 kilohertz-nepers each side at 34.9° of margin, net zero to eight parts in a billion. The theorem behind it needs only two things of the loop: that it falls at least two poles’ worth at high frequency, and that nothing in it is unstable when the loop is cut. A pure delay satisfies both. It adds no poles and no zeros, and e−sTe^{-sT} is analytic everywhere, so a loop with a delay in it must still balance.

But a delay does something no pole does. A pole’s phase saturates — it contributes ninety degrees and then stops — while a delay’s phase grows without limit, 360 f T360\,f\,T degrees at frequency ff. Above crossover, where every other contribution to the loop’s phase has settled, the delay keeps turning it. That is the area essay’s last open question: whether the repayment, with a phase that never stops turning, breaks into a comb. It does, and the comb turns out to do the opposite of what a comb of small peaks suggests.

Delays are not exotic in feedback. A digital controller takes time to compute; a sensor at the end of a cable reports what happened a cable’s length ago; an amplifier’s input stage and a power stage’s driver each contribute a fraction of a microsecond that a three-pole model leaves out. Each is, to the loop, a phase that keeps growing with frequency.

The same loop, ten microseconds late

The loop is the area essay’s: a gain of 10510^5, poles at 10 Hz, 4 kHz and 2 MHz, closed for a gain of a hundred, crossing over at 5.73 kHz with 34.9° of margin. The netlist solves one frequency at a time, and an integral that follows a comb to tens of megahertz needs a hundred thousand frequencies, so the integrals here use the loop’s closed form — A0βA_0\beta over its three poles — after holding it against the netlist’s cut loop at four frequencies, where the two agree to a part in a billion. The delay multiplies both alike.

A 10 µs delay in the loop: the peak rises to 13.53 dB and the sensitivity above crossover becomes a comb, and the two areas are still equal — 7.14 kHz·Np each sidecomputed by solving, not by drawing, from the loop's closed form, held against the netlist's cut loop to a part in a billion. The three-pole amplifier of the area essay (second pole 4 kHz) with a pure delay of 10 µs in its loop. Its margin falls from 34.9° to 14.3° at an unchanged crossover of 5.73 kHz, and the peak of |1/(1 + T)| rises from +5.70 to +13.53 dB. Above crossover the delay keeps turning the loop's phase, so the sensitivity rises and falls about zero with a period of 100 kHz. The area below zero is 7.144 kHz·Np, the area above 7.144, net 9.00 × 10⁻⁵ Hz·Np — integrated to 50 MHz on a grid that takes sixty steps a tooth.-20-10010050100150200250300frequency (kilohertz) — a linear axis20 log |1/(1 + T)| (decibels)with 10 µs: peak +13.53 dBno delay: peak +5.70 dBbelow 7.14, above 7.14 kHz·Npsolved, then checked — the area, with a delaynet 9.00 × 10⁻⁵ Hz·Np
Fig. 1 The device sensitivity in decibels against linear frequency to 300 kHz, with 10 µs of delay in the loop (and, faint, without). The peak rises from 5.70 dB to 13.53, the curve above crossover becomes a comb with a tooth every 100 kHz, and the two areas are still equal. The slider is the delay.

With 10 µs of delay the crossover does not move — a delay changes no magnitude — but the margin falls from 34.9° to 14.3°, since 10 µs at 5.73 kHz is 20.6 degrees. The sensitivity’s peak rises from 5.70 dB to 13.53 dB, and above the peak the curve no longer settles: it swings above and below zero with a period of 100 kHz, the reciprocal of the delay. And the integral, taken to 50 MHz on a grid with sixty steps a tooth, balances: 7.144 kHz·Np below zero and 7.144 above, net 9×10−59\times10^{-5} hertz-nepers.

The slider runs the delay through 0, 2, 5 and 10 µs. The margin falls through 34.9°, 30.7°, 24.6° and 14.3°, the peak rises through 5.70, 6.80, 8.76 and 13.53 dB, and at every setting the areas agree. The theorem holds exactly as stated. Bode’s integral is not a statement about phase margin or about how a loop’s phase behaves above crossover. It is a statement about analyticity, and a delay is analytic.

A comb, and why

Far above crossover the loop gain is small and the logarithm of the sensitivity is, to second order in it,

ln⁡∣11+T∣≈−Re⁡T.\ln\left|\frac{1}{1 + T}\right| \approx -\operatorname{Re} T.

Without a delay, T’s phase settles towards −270° as the three poles take effect, its real part settles to one sign, and the sensitivity approaches one from one side. With a delay, T’s phase goes on turning, a full cycle every 1/Td1/T_d, and its real part changes sign twice a cycle.

Above crossover a 10 µs delay turns the sensitivity into a comb with a tooth every 100 kHz, inside an envelope of ±|T| that falls with the loop gain. computed by solving, not by drawing. The device sensitivity of the delayed loop from 40.0 kHz to 400 kHz, in decibels. Far above crossover ln|1/(1 + T)| is −Re T to second order in the loop gain, and the delay turns T's phase through a full cycle every 100 kHz, so the sensitivity swings above and below one with that period — 7 zero crossings across the band drawn. The envelope is ±20·log(e)·|T|, which falls as the loop gain does. Each tooth above zero is followed by one below it, so the comb's net is small — and, summed over every tooth, below zero.
Fig. 2 The comb, from 40 kHz to 400 kHz with 10 µs of delay: the sensitivity in decibels against linear frequency, inside the envelope ±20·log(e)·|T|. It crosses zero twice per 100 kHz, seven times in the band drawn, and its teeth shrink as the loop gain falls.

Above a hundred kilohertz the computed sensitivity is −Re⁡T-\operatorname{Re} T to within a twentieth of ∣T∣|T|, and it crosses zero seven times between 40 and 400 kHz — twice per period of the delay. The envelope is the loop gain’s own magnitude, falling at forty decibels a decade between the second pole and the third, so the teeth are a fifth of a decibel at 40 kHz and a few thousandths by 300 kHz. Each tooth above zero is followed by one below, and the obvious guess is that they cancel, so that the comb contributes nothing and the main peak must carry the whole repayment.

The peak overpays, and the comb refunds

The guess is wrong in an instructive direction. Split the area three ways: the desensitisation proper, below zero up to the sensitivity’s first zero crossing; the main peak, the stretch above zero after it; and the comb, everything beyond.

With 10 µs of delay the main peak repays 107.0% of the desensitisation, and the comb above it hands the excess back as 453 Hz·Np of further desensitisation. computed by solving, not by drawing. The running integral of ln|1/(1 + T)| from zero, divided by the desensitisation — the area below zero up to the sensitivity's first zero crossing — for delays of 0, 5, 10 µs in the three-pole loop. 0 µs: desensitisation 6744.8 Hz·Np to 4.48 kHz, main peak 6744.8 (100.0%), comb 0.0; 5 µs: desensitisation 6602.9 Hz·Np to 4.24 kHz, main peak 6843.0 (103.6%), comb −240.2; 10 µs: desensitisation 6484.5 Hz·Np to 4.06 kHz, main peak 6937.1 (107.0%), comb −452.6. A delay shrinks the desensitisation, makes the main peak overpay it, and leaves the comb, whose teeth below zero outweigh those above, to bring the total back to zero.
Fig. 3 The running integral of the sensitivity’s logarithm, divided by the desensitisation, for no delay, 5 µs and 10 µs. Without a delay the main peak repays exactly the desensitisation and the curve settles at zero. With a delay it overshoots — the peak overpays — and the comb’s teeth bring it back, each paying and refunding in turn.

Without a delay the split is trivial: the main peak repays the desensitisation exactly, 6,744.8 Hz·Np each, and there is no comb. With 5 µs the desensitisation is 6,602.9 Hz·Np, ending at 4.24 kHz rather than 4.48; the main peak is 6,843.0, 103.6 per cent of it; and the comb nets −240.2. With 10 µs the desensitisation is 6,484.5, the main peak 6,937.1, 107.0 per cent, and the comb −452.6.

So the delay does three things at once, and they all point the same way. It shrinks the desensitisation, because the extra lag brings the loop’s phase closer to −180° just below crossover, where ∣1+T∣|1 + T| is then smaller than ∣T∣|T|, and the sensitivity reaches one at a lower frequency. It makes the main peak overpay the shrunken debt, because the margin is smaller and the peak taller. And the comb, whose teeth below zero slightly outweigh those above, hands the excess back as further desensitisation — 7 per cent of it at 10 µs, spread over hundreds of kilohertz.

Two more numbers explain why the total areas rose when the desensitisation fell. The area below zero in the hero figure, 7,144 Hz·Np, is the desensitisation plus every negative tooth of the comb; the area above, also 7,144, is the main peak plus every positive tooth. The comb adds to both sides, and the sides still balance. A designer reading the hero figure’s two equal numbers as “the delay increased the desensitisation” would have it backwards: the useful part, below crossover, went down, and what went up was the comb’s churn far above the band the loop was built for.

Why the comb’s net is below zero

The comb’s teeth alternate, so its net is the small remainder of a large cancellation, and the remainder has a sign for a reason that can be read off the numbers. Far above crossover the comb is −Re⁡T-\operatorname{Re} T to first order — the second-order term, half the real part of T2T^2, contributes less than six Hz·Np of the 453 — and TT is a rotating arrow whose length falls at forty decibels a decade. An alternating series whose terms shrink is dominated by its first term, and here the first term is the tooth just after the main peak.

With 10 µs of delay the main peak ends at 26.7 kHz, far above the crossover, because the delay keeps ∣1+T∣|1 + T| below one for a long stretch past it. The tooth that follows, from 26.7 to 50 kHz, lies below zero and contributes −354 Hz·Np on its own. Every tooth after it is smaller than its predecessor, and the next hundred kilohertz add only −95; everything above 150 kHz adds less than four. So the comb’s net is essentially its first tooth, and that tooth is below zero because the main peak, which ends where TT’s real part changes sign, is necessarily followed by a stretch where it has the other sign.

That turns the overpayment into something a designer can picture. The main peak with a delay is wider as well as taller than the same loop’s without one — it runs from 4.06 kHz to 26.7 kHz — and the extra width carries more area than the shrunken desensitisation owes. The first tooth of the comb then takes back most of the excess, and the rest of the comb takes back the remainder in ever smaller instalments, each alternating in sign.

What a microsecond of delay costs, in the loop’s own currency

The delay figures above can be compressed into rules that do not need the integral. The margin falls by 360 fc Td360\,f_c\,T_d degrees, 2.06 degrees per microsecond at this crossover, so the delay a loop can tolerate is its margin divided by that rate: 16.9 µs for 34.9°. The peak follows the margin, a decibel and a half above the margin-implied value, so a stated peak is a stated margin is a stated delay. And the desensitisation, the part of the area that does the loop’s job, falls by about 0.4 per cent per microsecond here — small, because the delay’s phase is small at the low frequencies where the desensitisation lives, and growing as the delay approaches its limit.

Read the other way, a fixed delay fixes how high the crossover may go. A digital controller with 10 µs of computation loses twenty degrees at 5.73 kHz, forty at 11.5 and all of a forty-five-degree loop’s margin at 12.5. Halving the delay doubles every one of those frequencies, which is why the latency of a control computation, rather than its sample rate, is so often the number that limits a digitally controlled loop’s bandwidth.

What the margin says about the peak, and what it misses

The peak rises from 5.70 dB to 13.53 at 10 µs and without bound as the delay nears 16.9 µs, where the margin is gone. computed by solving, not by drawing. The peak of the device sensitivity of the three-pole loop against the delay in it, from 0 to 16 µs in half-microsecond steps, beside the value |1/(1 + T)| takes at the crossover, which the phase margin φ alone fixes at 1/(2 sin(φ/2)). The delay leaves the crossover at 5.73 kHz and removes 360·fc·T degrees of margin, so the margin reaches zero at 16.92 µs. 0 µs: margin 34.9°, peak 5.70 dB, at crossover 4.45; 5 µs: margin 24.6°, peak 8.76 dB, at crossover 7.42; 10 µs: margin 14.3°, peak 13.53 dB, at crossover 12.11; 15 µs: margin 3.9°, peak 24.73 dB, at crossover 23.24.
Fig. 4 The sensitivity’s peak against the delay, beside its value at crossover — which the margin φ alone fixes at 1/(2 sin(φ/2)). The margin reaches zero at 16.92 µs, where both rise without bound; at every delay the peak is a little above what the margin implies.

At the crossover ∣T∣=1|T| = 1, so ∣1+T∣=2sin⁡(φ/2)|1 + T| = 2\sin(\varphi/2) for a margin φ, and the sensitivity there is 1/(2sin⁡(φ/2))1/(2\sin(\varphi/2)) exactly. The peak can only be higher. With no delay it is 5.70 dB against 4.45 at crossover; with 5 µs, 8.76 against 7.42; with 10 µs, 13.53 against 12.11; with 15 µs, 24.73 against 23.24. The margin reads the peak from below by about 1.2 to 1.5 dB across the whole range, and both go to infinity together at 16.92 µs, where the delay has used up all 34.9° — 34.9 divided by 360 times 5.73 kHz.

That near-constant gap is reassuring and is the reason margin is a usable design number for a delayed loop: a designer who sizes the margin for a stated peak will be wrong by about a decibel and a half, in the safe direction only if the gap is added. The delay does not hide anything from the margin that a pole would not. Not every loop is so obliging: Stable, and unstable with less gain found one whose margins could not see that turning its gain down breaks it. This loop’s magnitude falls monotonically, so it crosses unity once whatever the delay, and its one phase margin is the whole account of its stability. What the margin cannot see is the comb, which sits well below the peak and changes nothing about stability, and the shrinking of the desensitisation, which is a statement about the loop’s low-frequency behaviour that a single phase reading at crossover could not make.

Past the critical delay, the integral counts the growth

A loop with more than 16.92 µs in it is unstable. Its sensitivity is no longer analytic in the right half-plane — 1/(1+T)1/(1 + T) has poles there, at the closed-loop poles that crossed — and the integral’s premise fails. It does not fail into nonsense. For a loop that is stable when cut and unstable when closed, the integral of ln⁡∣1/(1+T)∣\ln|1/(1 + T)| over frequency in hertz is minus half the sum of the real parts of the unstable closed-loop poles.

Once the delay has taken the margin, the area no longer balances: at 20 µs it is −1.548 kHz·Np, and the unstable pair grows at 1548 per second — the same number. computed by solving, not by drawing. The net area of ln|1/(1 + T)| over linear frequency for delays from 12 to 25 µs, beside the real part of the closed-loop pole pair near crossover, found by Newton's method on 1 + L(s)exp(−sT) = 0. While the pair is in the left half-plane the net is zero. Once it crosses, the net is −Re p, minus half the sum over the pair — to about a hertz-neper just past the edge and a part in a thousand beyond: 12 µs: net 0.0 Hz·Np, Re p = −3038.7 s⁻¹; 14 µs: net 0.0 Hz·Np, Re p = −1715.9 s⁻¹; 16 µs: net 0.0 Hz·Np, Re p = −511.5 s⁻¹; 17 µs: net −46.9 Hz·Np, Re p = 46.1 s⁻¹; 18 µs: net −574.7 Hz·Np, Re p = 574.7 s⁻¹; 20 µs: net −1547.7 Hz·Np, Re p = 1547.7 s⁻¹; 22 µs: net −2414.5 Hz·Np, Re p = 2414.5 s⁻¹; 25 µs: net −3535.1 Hz·Np, Re p = 3535.1 s⁻¹. The integral counts the growth rate of what has gone unstable.
Fig. 5 The net area of the sensitivity’s logarithm against the delay, from 12 to 25 µs, beside the real part of the closed-loop pole pair near crossover, found by Newton’s method on 1+L(s)e−std=01 + L(s)e^{-st_d} = 0. Zero while the pair is stable; once it crosses, the two agree.

Newton’s method on 1+L(s)e−sTd=01 + L(s)e^{-sT_d} = 0, started near the crossover, finds the pair. At 12, 14 and 16 µs its real part is −3,039, −1,716 and −512 per second, and the net area is zero to the integration’s accuracy. At 17 µs the pair has crossed: its real part is +46.1 per second and the net area is −46.9 Hz·Np. At 20 µs, +1,547.7 and −1,547.7; at 25 µs, +3,535.1 and −3,535.1. Two routes — a root of a characteristic equation in the complex plane and an area on the frequency axis — give the same number to a part in a thousand once the pair is clear of the axis, and to a hertz-neper at 17 µs, where the pole is so close to the axis that the sensitivity is a needle the grid only just follows.

So the integral does not merely fail for an unstable loop; it measures how unstable. At 20 µs the oscillation that builds up grows by a factor of e every 646 µs, and the sensitivity’s logarithm has lost exactly that growth rate, in hertz-nepers, from its balance. It is the same identity what is left at crossover reads as a margin, carried past the point where a margin stops being a number.

Where a real loop’s delay comes from

The delay here is a pure e−sTe^{-sT}, which a loop meets in two common forms. One is a digital controller’s computation: the sample is taken, the arithmetic runs, the correction is applied one computation later, and the loop has a delay of that computation time in it whatever the sample rate. Half a clock against a pole priced a converter’s share of it as 180 degrees times the crossover over the clock, which is this essay’s 360 fc Td360\,f_c\,T_d at half a clock. The other is transport: a sensor at the end of a cable, a remote voltage sense on a long supply line, a mechanical or thermal path whose response arrives late. Neither adds a pole, and both, by this essay’s measurements, cost the loop margin at a rate set by the crossover frequency — 2.06 degrees per microsecond here — and turn its above-crossover sensitivity into a comb at the reciprocal of the delay.

A third form is worth separating because it is not a pure delay. A sampled loop with a zero-order hold behaves, well below its sample rate, like a continuous loop with half a sample of delay, and that is a useful first estimate of what sampling costs. But near half the sample rate the two part: the hold’s response folds back and ends, where a delay’s comb runs on. A sampled loop’s integral is taken over a finite band, and that changes its conclusions more than the half-sample estimate suggests. The band a sampled loop repays in takes that finite band as its subject.

What it leaves out

Only a pure delay. Real delays come with dispersion — a cable’s delay depends a little on frequency, a filter’s group delay a great deal — and a delay whose phase grows less than linearly makes a comb whose teeth spread apart. The balance still holds; the split between peak and comb would change.

And only this loop. A loop with more margin to start with can afford more delay before the peak climbs; a loop with less has less. The 1.2 to 1.5 dB gap between peak and margin-implied value is this loop’s, and a loop with two poles close to crossover, or a resonance near it, would have a different gap.

Still open: the sampled loop, the bound on the peak, and a delay the loop can predict

The sampled loop’s integral. A loop closed through a sampler and hold has a sensitivity defined only up to half the sample rate, and its Bode integral is taken over that finite band. The comb here repaid part of the debt far above crossover; a sampled loop has nowhere far above crossover to put anything, and the question is how much higher its peak must be as a result, and whether the finite band puts a floor under the peak that no design can go beneath.

A bound on the peak from the band. Half to the amplifier, half to the resistors split a loop’s sensitivity between its device and its divider at every frequency; the continuous integral says the areas of the first balance and says nothing about how high the peak must be, because the repayment can always be spread thinner over a wider band. Any constraint that confines the repayment — a finite band, a loop gain required to be small above some frequency — turns the equality into a lower bound on the peak, and computing that bound for this loop would say how close its ordinary compensation comes to the best possible.

A predictor in the loop. A Smith predictor removes a known delay from the loop’s characteristic equation by modelling it, so the margin no longer falls with the delay. It cannot remove the delay from the loop’s response to disturbances, and whether its sensitivity still carries the comb — and where the predictor’s own modelling error puts the peak — is the practical form of the question this essay asked.

Part 4 on desensitivity

One argument about Desensitivity, and one of 5 essays on it so far, each part numbered by how much of the idea it assumes. What sits either side of it:

On a linear frequency axis the loop's desensitisation is an area, and the area it gives back above crossover is the same: 6.74 and 6.74 kilohertz-nepers at 34.9° of margin. computed by solving, not by drawing. The logarithm of the device sensitivity |1/(1 + T)|, from the cut loop at 3601 frequencies between 0.01 Hz and 10 GHz, drawn in decibels against linear frequency to 60 kHz. It is −60.0 dB at low frequency, crosses zero at 4.47 kHz (the crossover is 5.73 kHz), peaks at +5.70 dB at 6.87 kHz, and returns towards zero as the loop gain goes. The area below zero is 6.74 kHz·Np (58.6 dB·kHz); the area above, integrated to 10 GHz, is 6.74, of which 6.11 lies inside the drawing. The net is −1.48 × 10⁻⁸ Hz·Np. Bode's sensitivity integral says it must be zero for a loop that falls two poles or more and is stable when cut. The area that feedback only moves Part 3 — A feedback amplifier divides its device's variation by the loop gain, sixty decibels of it at low frequency, and pays for it with a sensitivity peak near crossover. The payment is exact. Integrated over linear frequency, the logarithm of the sensitivity has as much area above zero as below — 6.74 kilohertz-nepers each side at 34.9° of margin, net zero to eight parts in a billion — at every margin and every gain, because the loop falls by more than one pole. Margin decides only the shape of the repayment: a 14-decibel spike at 11.7°, a one-decibel hump spread past half a megahertz at 80.4°. Only a loop that falls as a single pole keeps any of it, (π/2) times its crossover, and no amplifier is one. Sampled at 100 kHz, the loop repays its whole debt below 50.0 kHz: 6.60 kHz·Np each side, with a peak of 8.72 dB — the continuous loop had repaid 89% by then. computed by solving, not by drawing, from the loop's exact zero-order-hold equivalent. The three-pole amplifier of the area essay (second pole 4 kHz), closed through a sampler and hold at 100 kHz. The device sensitivity, in decibels, against linear frequency from zero to half the sample rate, where the discrete response ends. Margin 24.7° at a crossover of 5.71 kHz, against 34.9° for the continuous loop; peak +8.72 dB at 6.45 kHz. The area below zero is 6.598 kHz·Np and the area above, all of it inside the band, 6.598; net 1.84 × 10⁻² Hz·Np. The continuous loop, by 50.0 kHz, had repaid 88.6% of its own. The band a sampled loop repays in Part 5 — Close the three-pole amplifier's loop through a sampler and hold at 100 kHz and Bode's sensitivity integral still balances — but only over the band below 50 kHz, because that is all the band a sampled loop has. The whole debt, 6.60 kHz·Np, is repaid there; the continuous loop had repaid 88.6% of its own by the same frequency and spends decades above on the rest. Below a tenth of the sample rate the sampled loop is the continuous loop with half a sample of delay, 24.7° of margin against 24.6°. And the finite band turns the equality into a floor: hold the sensitivity 20 dB down over a third of the band and no loop can peak below 10 dB. This loop's floor is low and its margin sets its peak; the sample rate at which the peak is 3 dB above the continuous loop's is 18 times the crossover.

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

The objects named here

The third axis, after the field and the idea: the things themselves, and every essay that touches each one.

Crossover frequencyDesensitivityIntegrationLoop gainNewton raphsonPhase marginPropagation delayStability