Feedback, and the margin

The margin a delay spends

A phase margin can be made of a lag or of a delay, and the number is the same either way. Forty-five degrees from a lag overshoots 23.3 per cent, and forty-five degrees from a delay overshoots 28.7; at sixty degrees the sign reverses, 8.77 against 5.57, and the two cross near 54 degrees. The overshoot is the smaller difference. A two-pole loop's gain margin has no limit at all, and five per cent of its extra lag as delay brings that to 25.5 dB; with all of it delay the gain margin is 90°/(90° − margin), which is 6.0 dB at 45°, and nothing else is in the expression. Across twenty-one such loops the margin alone misses the overshoot by 13.1 points. The closed-loop peak, which already reads the whole band, misses by 1.2.

Assumes: Two measurements of one margin · What is left at crossover

One margin, and the gain under it held a loop’s phase margin at 45° and changed the spacing of its three lags, and it found the overshoot moving while the margin did not. Three lags a hundredfold apart overshoot 23.6 per cent, and the same three brought together overshoot a good deal more. It closed on three further ways to make the same point, and the second was the one with a real consequence in practice: a delay’s phase falls linearly with frequency and never stops, and building loops of a fixed margin from a delay and a lag would extend that result to the case that limits every sampled and digital loop.

A delay is unlike a lag in a way that a phase margin is not able to express. A lag gives at most ninety degrees and has given most of them a decade above its corner; a delay’s phase is unbounded and is proportional to frequency all the way up. At crossover, though, a lag and a delay can be arranged to give exactly the same phase and the same magnitude slope is nearly the same. So a loop with 45 degrees from a lag and a loop with 45 degrees from a delay are identical at the one frequency where a phase margin looks.

Two loops with exactly 45° of margin and the same crossover: with 100% of the extra lag a delay, the step overshoots 28.7%, against 23.3% for two polescomputed by solving, not by drawing: the closed-loop step of a loop K·exp(−sD)/(s(1 + s/p)) with its crossover at one, its phase margin exactly 45°, and 100% of the 45° beyond the integrator supplied by the delay (solid), against the same margin from a lag alone (dashed). Delay 0.785, lag's pole absent. Overshoot 28.7% against 23.3%; settled within 2% at 7.03 against 7.06; gain margin 6.0 dB against no limit. Marched with a history buffer, and at δ = 1 checked against the exact series of the method of steps.00.2500.5000.75011.251.5004812162024time, in reciprocal crossover frequenciesover the settled output100% from the delayovershoot 28.7%all from a lagovershoot 23.3%gain margin6.0 dBsettled 2% at7.0, against 7.1solved, then checked — and by the exact seriesone margin, two steps
Fig. 1 The closed-loop step of a loop with its crossover at one and exactly 45° of phase margin, with the 45° beyond the integrator supplied wholly by a delay (solid), against the same margin from a lag alone (dashed). Overshoot 28.7% against 23.3%; the two settle within 2 per cent at nearly the same time, 7.03 and 7.06; gain margin 6.0 dB against no limit at all. The slider moves the delay’s share of the lag down to a quarter.

A family with one number held

Every loop here has the form

L(s)=K e−sDs (1+s/p),L(s) = \frac{K\,e^{-sD}}{s\,(1 + s/p)},

with KK set so that the crossover is at ω=1\omega = 1, and with the phase beyond the integrator divided between the delay and the lag. For a phase margin of 45°, that extra phase is 45°; a share δ\delta of it comes from the delay, so D=δ⋅45°D = \delta\cdot 45° in radians at crossover, and the rest from tan⁡−1(1/p)\tan^{-1}(1/p). With δ=0\delta = 0 the loop is the two-pole loop that two measurements of one margin checked against the standard relation, and the relation holds exactly, since it is that loop’s own identity. With δ=1\delta = 1 the loop is an integrator and a delay, which is the shape of a sampled control loop seen below its sample rate, and it is not second order in any sense at all.

A delay has no netlist in the usual sense, so the step is marched with a history buffer that holds the last DD of the output. There is an exact check available at δ=1\delta = 1: an integrator and a delay can be integrated piecewise, one delay at a time, the method of steps, and the result is an exact finite series for the output at any time. March and series agree to two parts in a thousand at every sampled time. Everything else comes from the formula for L(jω)L(j\omega) directly, which is exact.

The overshoot, and its surprising sign

The natural expectation is that a delay is worse than a lag, and at 45° it is. Forty-five degrees from a lag overshoots 23.3 per cent. Forty-five degrees from a delay overshoots 28.7. At 30° the same comparison is 41.6 against 54.7 per cent, so a loop with a small margin is worse by a third, and the second-order relation that takes the first number from the margin gives no hint of the second.

Overshoot against the share of the margin's lag that is delay: at 45° a delay raises it from 23.3% to 28.7%, at 60° it lowers it from 8.77% to 5.57%, and the two cross near 53.8°. computed by solving, not by drawing: the overshoot of loops with their crossover at one and their phase margin held at 30°, 45° and 60°, against the share of the phase beyond the integrator that the delay supplies. 30°: 41.6% at none, 46.7% at half, 54.7% at all, against the second-order relation's 41.6%; 45°: 23.3% at none, 25% at half, 28.7% at all, against the second-order relation's 23.3%; 60°: 8.77% at none, 6.74% at half, 5.57% at all, against the second-order relation's 8.77%. The sign of the delay's effect changes near 53.8° of margin. A delay gives its phase in proportion to frequency and keeps giving, where a lag has already given most of what it has by crossover; so a delay loop has more phase left below crossover and less above it, and which of those matters depends on how far from crossover the closed loop's peak falls.
Fig. 2 The overshoot of loops with their crossover at one and their phase margin held at 30°, 45° and 60°, against the share of the phase beyond the integrator that the delay supplies. 30°: 41.6% at none, 54.7% at all. 45°: 23.3% at none, 28.7% at all. 60°: 8.77% at none, 5.57% at all. The two ends meet near 54°: above that margin a delay overshoots less than a lag does.

Then at 60° the sign reverses. Sixty degrees from a lag overshoots 8.77 per cent, and sixty from a delay 5.57. The two ends of the family cross near 54° of margin. The conventional textbook picture of delay as a uniformly bad thing fails here in a direct measurement: at a comfortable margin, a delay’s contribution leaves the step cleaner than a lag’s would.

The reason is the shape of the phase on either side of crossover. A lag has given most of its phase by a decade above its corner, and has given proportionally more below crossover than a delay of the same crossover phase. A delay’s phase at half the crossover frequency is exactly half of its crossover value. A lag’s is more, since its arctangent is concave: at a 45° lag, tan⁡−1(0.5)=26.6°\tan^{-1}(0.5) = 26.6° against a delay’s 22.5°. So below crossover, where the closed-loop response’s main peak lies for a generous margin, the delay loop has more phase in hand. Above crossover the delay loses phase faster and by far, and that is where the peak moves for a tight margin. The measured overshoot follows whichever side the loop’s own peak is standing on, and the crossing near 54° is where they trade. The closed-loop response says so directly: at 60° both loops peak below crossover, at 0.71 of it, and the delay’s peak is 1.006 against the lag’s 1.033, while at 45° the delay’s peak has moved above crossover, to 1.39 of it, and stands at 1.47 against 1.31.

The practical consequence is small in size and large in principle. The overshoot difference between delay and lag at a designer’s usual 60° is two or three percentage points and in the favourable direction, so a rule that converts margin into overshoot works tolerably for a delay at that margin. At 45° it is off by more than a fifth of the overshoot, and at 30° by a third.

The margin that has no limit, and then does

That overshoot difference is the less important of the two findings, because a loop’s designer usually is not chasing a fifth of its overshoot. The more important one is what the margins say about how the loop fails.

The gain margin is where a delay shows at once: at 45° of phase margin, 25.5 dB with 5% of the lag as delay, 8.5 dB at half, 6.0 dB at all of it, and a two-pole loop has no limit. computed by solving, not by drawing: the gain margin of loops with their phase margin held at 45° and 60°, against the delay's share of the phase beyond the integrator. A two-pole loop's phase never reaches −180°, so its gain margin is unbounded; the smallest delay gives the phase somewhere to go. 45°: 0.05: 25.5 dB, 0.25: 12.9 dB, 0.50: 8.5 dB, 0.75: 6.6 dB, 1.00: 6.0 dB. 60°: 0.05: 30.6 dB, 0.25: 17.4 dB, 0.50: 12.4 dB, 0.75: 10.2 dB, 1.00: 9.5 dB. With all of the lag a delay the gain margin is 90°/(90° − margin) as a ratio, exactly: 6.0 dB at 45° and 9.5 dB at 60°, with nothing else in the expression.
Fig. 3 The gain margin of loops with their phase margin held at 45° and 60°, against the delay’s share of the phase beyond the integrator. At 45°: 25.5 dB with a twentieth of the lag as delay, 12.9 dB at a quarter, 8.5 dB at half, 6.0 dB at all of it. With no delay at all, a two-pole loop has no gain margin to measure.

A two-pole loop’s phase approaches −180° and never reaches it, so its gain margin is unbounded: any amount of gain leaves it stable. The smallest delay gives the phase somewhere to go. With one twentieth of the 45° beyond the integrator supplied by a delay, the gain margin is 25.5 dB, and with a quarter it is 12.9. At half it is 8.5, and at all of it the loop has 6.0 dB. That sits at a phase margin everyone would call acceptable. At 60° the same family is 30.6 dB down to 9.5.

The end of the curve has a closed form with nothing else in it. An integrator and a delay reach −180° when ωD\omega D has added its 90°, and at that frequency the magnitude has fallen in proportion to frequency. So the ratio of frequencies is the gain margin, and it is 90°/(90°−PM)90°/(90° - \mathrm{PM}) as a ratio: 2 at 45° and 3 at 60°. So a loop with an integrator and a delay at 60° of phase margin can tolerate its gain being multiplied by exactly three, whatever its delay and its crossover are.

Stable and unstable with less gain found a conditionally stable loop whose margin hid a boundary on the low side. Here the hidden boundary is on the high side, and it is much more of a practical matter. The loop gain in many control systems varies by more than 6 dB between units or operating points, and a designer who checks a phase margin of 45° at the nominal point has not checked that. A sampled loop’s own limit is where this comes up most directly, because in a sampled loop the delay is not a small addition but a principal part of the loop.

Reading the overshoot without the step

The earlier essay found that the closed-loop peak predicts overshoot better than the phase margin does, on loops whose lags had moved. Loops with delays are a harder test, because a delay is what makes a loop’s behaviour most unlike the second-order relation that does the prediction. Across twenty-one loops at three margins and seven shares of delay, each loop’s overshoot can be predicted twice, once by inverting the relation from the margin and once by inverting it from the closed-loop peak, and each prediction compared with the measured overshoot.

Reading the overshoot off the band: the closed-loop peak predicts it to 1.2 points across twenty-one loops, and the margin alone misses by 13.1. computed by solving, not by drawing: twenty-one loops at three margins and seven shares of delay, the overshoot predicted by the second-order relation from the phase margin (dots, open) and from the closed-loop peak (dots, solid), against the overshoot measured. A perfect predictor lies on the diagonal. Worst misses, in points of overshoot: 13.1 from the margin and 1.2 from the peak. The margin is one number at one frequency, and what a delay does is below and above it. The closed-loop peak has already been integrated across the band by the loop itself, and although it cannot be read without closing the loop, it can be read without a step.
Fig. 4 Twenty-one loops at three margins and seven shares of delay: the overshoot predicted by the second-order relation from the phase margin (open dots) and from the closed-loop peak (solid dots), against the overshoot measured. The peak’s worst miss is 1.2 points of overshoot, and the margin’s is 13.1.

The closed-loop peak’s worst miss is 1.2 points, and the margin’s is 13.1. A second-order relation inverted at the closed-loop peak works on a loop with a delay almost as well as it does on the second-order loop itself, and the reason is what the peak measures. It has already been integrated across the band by the closing of the loop, so it knows what the loop does on each side of crossover. The phase margin was read at one frequency and cannot know. What is left at crossover gives a related warning for the case of lead networks.

A practical procedure comes from this directly. A frequency response of a closed loop is often measurable when a step is not: on a loop that is already carrying a signal, or a loop whose step would upset something. The peak of the response then gives the overshoot to a point or so on any of these loops, with no need to know how much of its lag was delay.

The whole range of one loop

Fixing the margin and varying the share is one way to read this family. The other is to take the extreme member, an integrator and a delay, and walk it up through every gain, since it has one number in it and the whole of its behaviour fits on one axis.

An integrator and a delay: no overshoot up to KD = 1/e, 5.57% at 60° of margin, 28.7% at 45°, and unbounded at π/2, the whole of a sampled loop's speed limit on one axis. computed by solving, not by drawing: the overshoot of the loop K·exp(−sD)/s against KD, which is the crossover in radians of the delay, marched (solid), against the second-order relation from the phase margin 90° − KD (dashed). No overshoot up to KD = 1/e = 0.368, where a real root and its neighbour merge; 5.57% at KD = π/6, 60° of margin; 28.7% at π/4, 45°; 49.2% at 1, 32.7°; and oscillation at π/2. A sampled loop's delay is about one and a half sample periods, so its fastest non-overshooting crossover is a fraction 0.0390 of the sample rate, and the conventional 60° rule at one-tenth of the sample rate would have spent 54° of phase rather than 30°.
Fig. 5 The overshoot of the loop Ke−sD/sK e^{-sD}/s against KDKD, the crossover in radians of the delay, marched (solid), against the second-order relation from the phase margin 90°−KD90° - KD (dashed). No overshoot up to KD=1/eKD = 1/e, where a real root and its neighbour merge. 5.57% at 60° of margin, 28.7% at 45°, oscillation at π/2\pi/2.

There is no overshoot at all up to KD=1/eKD = 1/e, or 0.368. That is a definite threshold, and an unusual one: below it the closed loop has a dominant real root and the step is monotonic, which is the delay equivalent of an overdamped loop, and at it the two rightmost roots merge. Above it the overshoot rises to 5.57 per cent at 60° of margin, 28.7 at 45°, 49.2 at a KDKD of one and without bound at π/2\pi/2.

Writing the delay as what it would be in a sampled loop puts the threshold in familiar units. A sampled loop’s delay is about one and a half sample periods, half for the hold and one for the computation, and with that the non-overshooting crossover is 0.368/(2π×1.5)0.368/(2\pi \times 1.5), or 3.9 per cent of the sample rate. That is a harder limit than the common rule of a crossover at a tenth of the sample rate. A loop at a tenth of the sample rate has spent 54° of its 90° on delay, leaving 36°, on which this figure reads an overshoot of about 44 per cent and a gain margin of 1.67 times. So a rule that sounds comfortably conservative is sitting in the uncomfortable part of this curve, and it survives in practice only because real loops have additional damping and are not asked to do much at the crossover. The band a sampled loop repays in reaches a similar conclusion by a different measurement.

How much delay is too little to matter

It is natural to ask below what share a delay can be ignored. For overshoot the answer is generous: with a quarter of the extra lag as delay, at 45° of margin the overshoot moves only from 23.3 to 23.5 per cent. Half moves it to 25.0. A loop can have a quarter of its extra phase in a delay and read exactly like a two-pole loop on the step.

For the gain margin there is no such threshold, because it starts from infinity. A loop that has any delay at all has a gain margin, and it has one even at a thousandth of the extra lag. Whether that margin is large enough to be irrelevant depends on how far the gain can move, and a designer has to look. At a twentieth of the lag the margin of 25.5 dB is as good as infinite for almost every purpose. At a quarter, 12.9 dB is not infinite, and a loop whose gain can vary by a factor of four has used half of it.

So the two readings disagree about the question of how much delay matters. A delay that does nothing visible to the step has already placed a finite limit on the gain, and that limit is what a designer would need to know, and the step does not show it. It is the same disagreement what is left at crossover noted between a margin and what the margin is actually protecting, with the phase and gain margins now each reporting from a different side.

Where delays come from in analogue loops

A delay need not be sampled to be there. Many poles far above crossover act together as a delay, since a chain of nn poles at npnp has a phase close to a delay’s below its corners. The delay a chain adds measured that for amplifiers in cascade, and the arithmetic says a chain of poles each a decade or so above crossover has a small δ\delta in this essay’s terms. A long cable in a feedback path is an obvious literal delay, and a thermal path behaves like a distributed line with a phase that keeps falling, though not linearly.

So an analogue amplifier with a fast third, fourth and fifth pole has a finite gain margin for this reason, which a two-pole approximation misses, and which one margin, and the gain under it first showed from the lag side. A multi-pole phase looks like a delay for a while, then saturates at a limit a real delay does not have, and how closely this essay’s family describes a given amplifier depends on how many poles are hiding and where. Delay’s virtue as a model is that it has only one parameter, and at the frequencies around crossover a pole tail is well summarised by it.

What the model leaves out

The delay and the lag are both treated as linear, with a magnitude that is exactly flat or exactly first-order. A real sampled loop has a hold with a magnitude that also falls near half the sample rate, and quantisation that adds a limit cycle of its own, as the band a sampled loop repays in discusses. The loop here also has no zero, and a lead network would change the side on which the closed-loop peak stands and so where the crossing near 54° falls. A loop that had been designed with a zero to reach 60° of margin may not behave as the 60° curve here does, and the essay’s result on sign reversal should not be extended to it without measuring.

A step is also only one question to ask. A delay limits rejection of a disturbance in a way its own step cannot show, because a disturbance entering after the delay is seen by the output before the loop can do anything, a limitation that exists for any delay at any margin. The same family, driven at its disturbance input, would give a different comparison. It is left open below.

The numbers worth carrying

At 45° of phase margin a lag overshoots 23.3 per cent and a delay 28.7; at 60°, 8.77 and 5.57; they cross near 54°. A two-pole loop has no limit on its gain margin, a loop with a twentieth of its extra lag as delay has 25.5 dB, and an integrator with a delay has exactly 90°/(90°−PM)90°/(90° - \mathrm{PM}) as a ratio: 6.0 dB at 45° and 9.5 at 60°. That integrator and delay is free of overshoot only below KD=1/eKD = 1/e, 3.9 per cent of the sample rate for a sampled loop. Across twenty-one loops the margin misses the overshoot by up to 13.1 points, and the closed-loop peak by 1.2. So a phase margin alone cannot distinguish a lag from a delay, and the difference is what the gain margin reports.

Still open: a disturbance after the delay, a zero at crossover, and the disc

A disturbance arriving after the delay. A step at the loop’s output is seen by the measurement before any correction can reach it, for a full delay and more, so the rejection of a disturbance has a floor a command step does not show. What the same family gives for its output disturbance, at equal margins, is the comparison that would say which loops are truly equivalent to what a controller has to do.

A zero near crossover. Compensation commonly adds a zero to win back margin, and a zero’s phase has the opposite curvature to a delay’s. Where the closed-loop peak then falls, and whether the delay loop’s clean step at 60° survives a zero, separates what the loop was doing from what the compensation is doing.

The disc margin. The distance of the Nyquist locus from the critical point, minimised over all frequencies, combines both of these margins into a single number. A delay moves the locus towards the critical point from an angle a lag does not, so whether a disc margin distinguishes the family better than the peak, and what it says about the 6 dB loop, is a measurement on these same loops.

Part 4 on margin overshoot

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

The objects named here

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

Closed-loop responseDamping ratioGain marginLoop gainModel rangeOvershootPhase marginSecond-order approximation