Two measurements of one margin
Assumes: What is left at crossover · One step, computed twice
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.2%: 34.8°
Across the slider:
| Second pole | From the loop gain | Overshoot | Implied by the overshoot |
|---|---|---|---|
| 1 kHz | 18.1° | 62.1% | 17.0° |
| 2 kHz | 25.2° | 49.0% | 24.9° |
| 4 kHz | 34.9° | 35.2% | 34.8° |
| 8 kHz | 47.3° | 21.0% | 47.2° |
| 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.
The applied field builds that circuit and measures all three halves of the argument. The gain that is exactly one bisects the condition on the netlist and gets 3.000000000000 — an equality met on a set of measure zero, with a growth rate either side of it that reaches the rails in sixty-one milliseconds and no third case in between, so that no resistor tolerance on any manufacturer’s list makes the circuit work. The amplitude nothing linear predicts then supplies the mechanism that holds it: two diodes across the feedback resistor stopping the growth at 858 millivolts, a number no pole, no transfer function and no bias point contains, and reachable only by a netlist with a nonlinearity in it marched forward in time.
Read from this page, the pair says something about what a phase margin is. A margin is a distance from a condition, and the whole of this essay’s correspondence between a frequency-domain number and a time-domain one holds because the circuit stays linear while the distance is being measured. On the condition itself the correspondence has nothing to describe: an overshoot is undefined for a response that does not settle, and the quantity that decides what actually happens is not in the loop gain at all.
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. How little it takes is measured on this field’s own worked example: the load that gets inside the loop finds a metre of coaxial cable — 905 picofarads, hung on an output by somebody who was not thinking about stability — taking a unity-gain inverter from ninety degrees to forty-five, and the gain the loop closes against finds nine picofarads at the summing junction doing the same thing, which is less capacitance than a scope probe.
There is one more reason, and it is the one the table cannot show. How much of the amplifier gets through measures a different consequence of the same margin: the fraction of a device change that reaches the answer rises above one near crossover, and below fifty degrees of margin it changes sign on the way. So margin buys accuracy as well as tidiness, on circuits that are never asked to respond to a step at all — which is an argument for sixty degrees that survives on a direct-current amplifier where every row of the table above is irrelevant.
The one thing the whole table assumes is that a margin read at one frequency describes the loop, and stable, and unstable with less gain is the loop where it does not: a phase crossing −180° at 189 Hz, 3.46 kHz and 23.5 kHz, stable between and of gain and unstable on both sides of that window. Turning its gain down is what breaks it, and neither margin can see that, because a phase margin describes the loop at one frequency and a gain margin at one other.
The two comfortable margins finish the sweep, and they are where the agreement between the two readings becomes too close to argue about — which is itself the finding, because it is the comfortable end that nobody needs a second measurement at.
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.
Where the two readings disagree
A margin read two ways agrees to a tenth of a degree at the comfortable end, and this field has three cases where it does not. Stable, and unstable with less gain has three crossovers, so a margin at one of them describes none of the others. How much of the amplifier gets through is the sensitivity peak neither reading carries. The path that buys the error back is where the settling time refuses to follow the margin at all, because a residue rather than a pole decides it. What is left at crossover is where the crossover both readings are taken at is defined.
What links here
Essays that reach for this one mid-argument — the half of a link its own author cannot write down, the 8 sharing most with it of 15.
What this makes readable
Essays that name this one as a prerequisite.
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 ratioOvershootPhase marginSecond-order approximation
- The best damping is not the one to build damping ratio, overshoot
- Two requirements pulling one capacitor overshoot, phase margin