Two measurements of one margin
The most valuable construction available to a collection like this one is a quantity that can be measured twice by routes sharing no arithmetic. This field supplies the best example in the subject, and the subject supplies it free.
The two routes, spelled out
Route one is entirely in frequency. Cut the loop. Drive one side of the cut with a source and sweep it. Measure what returns to the other side. Bisect for the frequency where the returned signal is exactly as large as the injected one. Read the phase there. Nothing in that procedure involves time, a step, or the closed-loop circuit at all.
Route two is entirely in time. Close the loop. Apply a step. Compute the response — from the closed-loop network’s own poles, by a residue expansion. Find its maximum. Compute the overshoot as a fraction of the final value. Invert the standard second-order relation to obtain a damping ratio, and convert that to the phase margin it implies. Nothing in that procedure involves a sweep, a loop gain, or a cut.
The two share the netlist and nothing else. No intermediate quantity is passed between them, no subroutine is common to both, and neither could confirm itself.
What they give
At the default setting — a second pole at four kilohertz, a loop closed for a gain of 100 — the two routes give:
- from the loop gain: 34.9°
- from the measured overshoot of 35.1%: 34.9°
Across the slider:
| Second pole | From the loop gain | Overshoot | Implied by the overshoot |
|---|---|---|---|
| 1 kHz | 18.1° | 61.9% | 17.1° |
| 2 kHz | 25.2° | 48.9% | 25.0° |
| 4 kHz | 34.9° | 35.1% | 34.9° |
| 8 kHz | 47.3° | 20.8% | 47.3° |
| 20 kHz | 65.3° | 4.5% | 65.3° |
| 60 kHz | 80.4° | none | — |
The agreement in the middle of the range is remarkable — three of the rows match to a tenth of a degree — and it deteriorates in a specific, explicable way at both ends. That deterioration is the interesting part, and it is the reason the figure reports the gap rather than only the agreement.
Why they agree at all
The relation being tested is the standard second-order result. A system with two poles and a damping ratio ζ overshoots by exp(−πζ/√(1−ζ²)), and the same ζ produces a phase margin of a particular value, so overshoot and margin are related through it.
The reason it applies to a three-pole loop at all is that a well-compensated loop is dominated by two of its poles: one from the deliberate low-frequency compensation and one from whatever is nearest the crossover. The third contributes phase but very little magnitude at the frequencies that decide the response, so the closed-loop behaviour is nearly that of a second-order system with an adjusted damping.
“Nearly” is a number, and it is what the figure’s third row reports.
Where they part company, and why
At the low-margin end — a second pole at one kilohertz — the two disagree by a degree. The relation assumes two poles; this loop has three, and at low margin the third one’s contribution to the closed-loop response is no longer negligible against the other two. The response is a sum of three exponentials rather than two, and the maximum of that sum is not exactly the maximum a two-pole system with the same margin would have.
At the high-margin end the disagreement is larger and for a different reason. Above about 70° of margin the closed-loop response has essentially no overshoot, and an overshoot of zero cannot be inverted: every margin above the threshold maps to the same measured value. That is not a failure of the circuit or of the relation but of the measurement — the quantity being read has run out of resolution.
Both are worth stating explicitly, because the temptation is to report the range where the routes agree and let the rest pass. A figure that quietly restricted its slider to the agreeing range would be presenting a check that had been arranged to succeed.
What the assertion actually says
The generator behind the figure asserts that the two margins agree to within 22°, at every position of the slider. That is a wide tolerance, and it is wide for the reason above: at the top of the range the second route saturates, and a tighter tolerance would be a claim the figure disproves.
It also asserts something that a reader might not think to check and that catches a whole class of error: that the closed loop settles on the gain the feedback network asks for, within two per cent. A loop whose margin has been computed correctly and whose feedback network has been assembled wrongly would pass every stability check and settle on the wrong value, and the step response would look entirely convincing.
That is the general shape of the checks in this collection: one assertion for the quantity being argued about, and one for the thing that would still be wrong if the argument were right.
What the margin is really saying
There is a way of reading the correspondence that makes it feel less like a coincidence.
The phase margin is a statement about how close the loop gain gets to the point where a returned signal exactly cancels the input. The overshoot is a statement about how far the closed-loop poles have moved toward the imaginary axis. They are the same statement because closing a loop moves the poles, and it moves them by an amount determined by the loop gain: the closed-loop poles are the values of s at which the loop gain equals −1.
So the frequency-domain measurement is asking how nearly the loop gain reaches −1 at some real frequency, and the time-domain measurement is asking how close the closed-loop poles are to the imaginary axis. Those are two ways of asking how near the circuit is to sustaining a signal on its own, and the correspondence between them is not a coincidence but a change of coordinates.
What a margin does not tell anybody
A phase margin is a statement about a linear model of a loop at small signal, and three things it does not cover are worth naming, because each has been the cause of a circuit that oscillated despite a comfortable margin on paper.
It is a small-signal statement. During a large transient an amplifier may be slew-limited, at which point its loop gain is essentially zero and the margin computed from the linear model does not describe what is happening. The recovery as the loop comes back into its linear region is a genuine effect, it produces a settling tail far longer than the linear analysis predicts, and no frequency sweep reveals it.
It is a statement about the nominal circuit. Every quantity in the calculation moves. Gain –bandwidth product varies part to part by a factor that is rarely below two; the amplifier’s output resistance changes with temperature and load; and the load capacitance is whatever somebody eventually connects. Thirty degrees of margin in hand is thirty degrees that reality can consume.
It assumes one loop. A circuit with two feedback paths — a main loop and a local one round an output stage, say — has a loop gain that is well defined only once the cut point is chosen, and a margin measured at one cut can be comfortable while the circuit is unstable in a mode that does not pass through it. The cut-and-inject method used here is exactly right for a single loop and needs care beyond that.
Reading the table as a design curve
The five rows in the middle of this essay are a design curve with the points filled in, and it is worth stating what the curve is for.
A designer chooses where to sit on it by choosing where the second pole goes relative to the crossover. That is not usually a free choice — the second pole is whatever the output stage and the load produce — so in practice the choice is made the other way round, by moving the crossover relative to the pole. Reducing the loop gain moves the crossover down, which increases the margin and costs bandwidth; that is the entire content of “compensating” an amplifier.
What the table adds is the exchange rate. Moving the second pole from four kilohertz to twenty — a factor of five — takes the margin from 35° to 65° and the overshoot from 35% to 4.5%, and costs almost nothing in crossover frequency, which moves only from 5.7 kHz to 9.1 kHz. Moving it the other way, from four kilohertz to one, costs 17° of margin and gains nothing at all: the crossover falls from 5.7 kHz to 3.1 kHz, so the circuit is both less stable and slower.
That asymmetry is the useful reading. There is no benefit to a second pole below the crossover. Above it there is a genuine trade between speed and tidiness; below it the pole is pure loss, and a circuit in that region has usually got there by accident — most often by a capacitive load nobody accounted for.
The two routes as a habit rather than a demonstration
It is worth ending on why this construction is used throughout the collection rather than only here, since a reader could reasonably take it for an elaborate way of confirming a textbook relation.
The value is not in the agreement. It is that the pair makes a whole category of mistake impossible to ship. A figure produced by a single computation is a picture of that computation, and if the computation is wrong the picture is a convincing picture of the wrong thing — smooth, correctly labelled, plausible in every respect a reader can check. The only defence available is a second computation that would have to be wrong in exactly the same way, and arranging for two routes to share no arithmetic is what makes that unlikely.
The version of the habit that this field supplies is unusually strong because the two routes are in different domains. A margin in frequency and an overshoot in time are not two calculations of one formula; they are two measurements of one circuit made with entirely different machinery — a sweep and a bisection on one side, a pole recovery and a residue expansion on the other. There is no shared subroutine in which a single error could hide.
The oscillator, which is the same measurement inverted
Every argument in this field has been about avoiding a condition. It is worth noting once that the condition is also something people build on purpose, because it clarifies what the margin is measuring.
An oscillator is a loop deliberately arranged to have unity gain and zero phase margin at one frequency and less than unity gain everywhere else. The Barkhausen conditions — loop gain of one, loop phase a whole number of turns — are the stability criterion with the inequality reversed, and the same cut-and-inject measurement designs both.
The measurement even carries over to the part designers find hardest. A practical oscillator needs a loop gain slightly above one at the intended frequency, so that oscillation starts from noise, and some mechanism that reduces it to exactly one as the amplitude grows, or the output climbs until something saturates and the waveform is a square. That amplitude-dependent loop gain is a nonlinearity, and it is outside everything this field’s linear machinery can express — which is the same boundary the transients field ran into from the other side, arrived at from a design goal rather than from a failure.
The design reading
Stripped of the machinery, the table above is a design guide of the kind that is usually given as folklore, with numbers attached.
45° of margin gives about twenty per cent overshoot and a couple of visible cycles of ringing. It is fast and it looks untidy on an oscilloscope.
60° of margin gives a few per cent and settles quickly. This is the usual target and the reason is visible in the table: it is the point at which the overshoot has become small while the response has not yet slowed down much.
Above 70° there is no overshoot to speak of and the response is dominated by a single slow exponential. Adding more margin from here buys nothing except slowness.
Below 30° the ringing dominates and the settling time is many times the rise time. The circuit is not unstable and it is not usable for anything that has to settle.
And the reason to aim above the minimum has nothing to do with the nominal circuit. Every quantity here moves — with temperature, with the particular part, with a capacitive load somebody adds later. Thirty degrees of margin in hand is thirty degrees that reality can take without the circuit oscillating on a customer’s bench.
Why two routes, restated
It would be quicker to compute the margin once and print it. The reason not to is that a single computation cannot detect a mistake in its own premises, and in this subject a mistake in the premises produces something entirely plausible.
Consider the mistakes this pair actually catches. A sign error in the loop injection gives a loop gain of the wrong sign, a phase curve displaced by 180°, and a margin that looks fine while the circuit rings; the step response would disagree violently. A feedback divider assembled with its arms swapped gives a loop gain scaled by the wrong factor, a crossover at the wrong frequency, and a margin that is confidently wrong; the step’s final value would disagree. A pole entered at the wrong frequency changes both routes, but not by the same amount, and the gap opens.
None of those would be visible in either figure alone. All of them break the agreement between two numbers that were never allowed to talk to each other, which is precisely what the construction is for.