The loop that never crosses
Assumes: What is left at crossover · Two measurements of one margin · The matrix that is ill, and the answer that is not
What is left at crossover quotes two numbers about every loop this field has drawn: how much phase is left where the gain has fallen to unity, and how far below unity the gain has fallen where the phase reaches −180°. They are read off the same sweep, they are printed side by side, and they look like the same kind of quantity.
Only the first of them always exists. The second is a distance to a crossing, and a loop is not obliged to have one. The machinery that measures it says so — asked for a gain margin on a loop whose phase never reaches −180°, it returns a sentence instead of a number — and until now nothing in this collection has ever taken that branch, because every loop drawn here was built with three poles on purpose so that it could not.
That decision is recorded in the construction itself. A two-pole loop, the reasoning went, has an infinite gain margin and a locus that never crosses the negative real axis, which makes both of those figures a picture of an idealisation rather than of an amplifier; every real device has a third corner somewhere, so put one in and let the criterion have something to decide. The reasoning is sound. What it produced is a field in which one of the two headline numbers has never once been allowed to come out empty, and a category that is described in a comment and measured nowhere.
What is being solved
The loop gain is obtained the way it is obtained on a bench rather than written down as an expression. The feedback network is cut at one point, a source drives one side of the cut, and what comes back to the other side is measured — so the quantity plotted is a return ratio taken from a solved netlist, and no symbol for βA appears anywhere in it. The closed loop is the identical forward path with the divider joined back on, element for element, which is what makes any comparison between the two a comparison of one circuit.
The forward path is a gain block of 10⁵ followed by three resistor–capacitor sections at 10 Hz, 4 kHz and 2 MHz, each with a unity buffer behind it so that one section does not load the next. The divider is two resistors asking for a closed-loop gain of 100.
Removing a pole means removing one section and its buffer and nothing else. The gain block, the two remaining sections, the divider and the cut are the same elements with the same values and the same names; a unity buffer carries the second section’s node to the output so that the node the sweep reads is called the same thing either way. Two netlists, one pole apart.
The reproduction, which comes before the departure
A comparison between two circuits is worth nothing until it is established that they are the same circuit where they ought to be. The place to establish it is the crossover, because that is where the number this field trusts most is measured, and because a pole two and a half decades above the crossover has almost no business being there.
It has almost none, and the residue is measurable. The two-pole loop crosses unity at 5726.43836 Hz and the three-pole loop at 5726.42432 — apart by 2.45 parts per million. The phase margins are 35.034911° and 34.870927°, apart by 0.163983°.
That shortfall is not a discrepancy to be tolerated. It is a prediction that can be checked, because a single lag section contributes exactly of phase at frequency , and at the crossover that is , which is 0.164050°. The measured shortfall and the arctangent agree to four parts in ten thousand at this pole position, and to seven figures once the pole is far enough out that nothing else is left. One of those numbers comes from bisecting a solved netlist twice over and differencing the results; the other is one arctangent of a ratio of two frequencies. They share the crossover frequency and nothing else.
So the two loops are the same loop where they should be, and the instrument reading them is calibrated. Whatever they now disagree about is the third pole and not the arithmetic — the same move the assumption that is a geometry makes before it is allowed to quote a disagreement, and the same one one step computed twice insists on for a transient.
The departure, which is not a small number
The gain margin of the three-pole loop is 46.06 decibels. The gain margin of the two-pole loop does not exist. That is not a large disagreement between two numbers; it is a disagreement about whether there is a number.
The way to see that this is a property of the model rather than an accident of one pole position is to move the pole rather than remove it, and watch what each margin does on the way out.
The two panels are two straight lines pointing in opposite directions, and the difference between them is the whole content of this essay. The phase margin has a limit. It approaches 35.034911° as the shortfall falls a decade for every decade the pole moves, and the shortfall multiplied by the pole frequency is one constant to within half a per cent across six decades, which is what a reciprocal is when it is measured rather than fitted.
The gain margin has no limit. It rises by 20 decibels for every decade, forever, and the number it is approaching is not a number.
That asymmetry has a name in this collection. A phase margin is continuous in the model’s order — a loop with a distant third pole has nearly the phase margin of the loop without it, and “nearly” can be priced. A gain margin is not: the loop with a third pole at 100 gigahertz has 140 decibels of gain margin and the loop without one has none, and no amount of moving the pole gets from the first statement to the second. One of the two numbers this field quotes side by side survives a small change in the model and the other does not.
The mechanism, which is that the two run out together
The reason is visible in one table and needs no criterion to state it. Two lag sections contribute at most 90° each, so the phase of a two-pole loop approaches −180° and does not reach it. Meanwhile each section rolls the magnitude off at 20 decibels a decade, so a loop that is still approaching −180° is a loop whose magnitude is still falling at 40.
The two run out together, and the arithmetic of that is what makes the gain margin infinite rather than merely large. The two-pole loop’s phase is −179° at 229.7 kHz, where the loop gain is already 7.578 × 10⁻⁴ — 62.41 decibels below unity. It is −179.9° at 2.2976 MHz, at −102.41 decibels. The last degree costs a decade of frequency and 40 more decibels, and the one after that costs the same again. The distance from the locus to the critical point, expressed in decibels, is what the gain margin is; it grows without bound because the remaining tenth of a degree always costs another factor of a hundred in magnitude.
That is the picture the split magnitude-and-phase pair cannot show, and it is the same reason stable, and unstable with less gain had to draw a locus: the criterion is about a curve and a point, and both of these essays are about something a pair of graphs read at one frequency each will not report.
What the criterion says instead
The gain margin’s real content is a statement about gain: how much larger the loop gain could be before the closed loop stops settling. That statement can be made without a margin at all, and it is the statement the criterion itself makes.
Two routes reach it. The cheap one solves for every frequency at which the loop phase passes an odd multiple of 180° and takes the reciprocal of the magnitude at each — the gain that would move the locus exactly onto the critical point. The expensive one integrates the turning of around the whole contour and counts encirclements, which is the criterion’s own definition and about four hundred times slower.
The list of critical gains for the two-pole loop is empty, and an empty list is the answer rather than a failure to produce one. The encirclement count confirms it out to a multiplier of 10¹².
Which raises a question about what those gains are. Every one of them is applied as a multiplication on the measured return ratio, because that is what the criterion is a statement about — a curve and a point, with the gain scaling the curve. Written into the netlist’s own gain block instead, a multiplier above 100 makes the nodal matrix singular at the frequency the contour starts from, and the solve refuses it rather than returning a large plausible number. That refusal sits below the three-pole loop’s own critical gain of 200.902. The edge on that band is therefore a fact about a curve rather than about a circuit anyone could build, which is exactly the distinction the refusal and what it was protecting draws, and it is the reason the criterion can go twelve decades further than the netlist: multiplying a measured return ratio needs no matrix.
Reporting that empty list correctly turned out to need a repair, and it is worth naming because it is exactly the shape of defect this essay is about. Beside the list, the routine that finds the critical gains returns a consistency flag, whose job is to catch a search that has returned a crossing of the positive real axis by mistake — a number that would not be a critical gain at all. It was defined as there is at least one crossing, and every crossing is at an odd multiple of 180°, and on a loop with no crossings it therefore came back false. Nothing was inconsistent. There was nothing to check.
Those are different answers and a flag that gives them the same value cannot tell them apart, so it is two flags now: whether the locus reaches the negative real axis at all, and whether the crossings that were found are real ones — the second vacuously true of an empty list, because none of no crossings is wrong. The two-pole loop is what made the conflation visible, and nothing else could have, because every loop this field had drawn crosses. The same fault appears twice more below in a more expensive form.
The self-checks, and what they are actually checking
The encirclement count carried two numbers that read as its own diagnostics. The first is how far the turning integral is from an integer, offered on the stated grounds that anything above a few hundredths means the grid was too coarse to follow the locus round. The second is the largest angle the locus turned between two sampled frequencies.
Neither had ever been plotted against the sampling it was supposed to diagnose. Plotting them takes a loop with a known answer and a deliberately bad grid, and it is why the first of those two sentences is written in the past tense.
The verdict is wrong below 28 sampled frequencies and right at and above them, and the number that was supposed to say so does not move at all — not merely insensitively, but to eight significant figures, straight across the sampling where the answer changes.
The reason is arithmetic rather than bad luck. The integral is a sum of differences of the same quantity at successive frequencies, so it telescopes: whatever the grid, the total is the angle at the last frequency minus the angle at the first, and the only thing a coarse grid can do is assign a wrapped difference to the wrong branch — which changes the total by exactly a whole turn and leaves its distance from an integer untouched. A residual made of a telescoping sum cannot report an error that is an integer number of turns.
What the residual is measuring is elsewhere entirely.
The Nyquist contour runs from zero and a computed one starts at a finite frequency, where the loop still has a little phase left to turn. The residual is that missing piece and nothing else: it falls by a decade when the contour’s low end falls by a decade, and by nothing at all when the sampling changes by three hundred times. It is a real and useful measurement — of contour truncation — and it is not the measurement it was being read as.
The other number does move, and it is the one to read. But it cannot be turned into a threshold either, because it approaches half a turn for two unrelated reasons. A grid too coarse to follow the locus gives large steps; so does a locus passing close to the critical point, where the angle of genuinely does swing through nearly 180° in a short span of frequency. At a gain a part in 10⁵ below the critical one, the count is right and the largest step is 179.92°. On the two-pole loop at a multiplier of 10¹² the count is right and the largest step is 179.99°, because the locus is hugging the negative real axis all the way to the origin. Large steps are a warning that the answer may be about the grid; they are not evidence that it is.
What replaced it, and how far it goes
No residual computed from one sampling answers was this grid fine enough, and the honest thing to do with that sentence is to say it rather than to find a substitute. The way to answer the question is the expensive way: refine the contour until the count stops changing.
Half of that is free, and taking it is the repair this measurement produced. The angles at every sampled frequency are already in hand, so the integral can be walked a second time over every second sample, spanning the same contour, at the cost of no further solve. If the two counts differ, the grid is certainly too coarse.
The bound on it is in the same measurement, which is why it can be stated rather than hoped for. At 28 and at 40 sampled frequencies the halved grid disagrees with the full one, and those are exactly where the answer has only just become right — a conservative refusal, and a useful one. At 20 and at 24 the two grids agree with each other and are both wrong. So it is one-way: disagreement proves the sampling is too coarse and agreement proves nothing.
That is a weaker check than the one it replaces and it is the first one either routine has had that is true. A check that fires only sometimes tells a reader which of its answers to believe; one that never fires tells them the opposite of the truth, at whatever sampling they happened to choose.
What this does not say
It does not say a two-pole loop is a model of an amplifier. It is not. Every real device has a third corner, the reason for putting one in this field’s standard loop was correct, and a designer who reads an infinite gain margin off a two-pole macro-model and concludes that the loop cannot be made to oscillate has been told something about the model. The 46.06 decibels of the three-pole loop is the honest figure for a part with a corner at 2 megahertz, and the ideal amplifier, and where it stops being one is where the finite product that makes any of this necessary is measured.
What it says is narrower and harder to design around. A gain margin is a property of the model’s order, not of the loop. Two models that agree to two parts per million about the crossover, and to a sixth of a degree about the phase margin, can differ by everything about the gain margin — and the difference is not detectable at the crossover, which is where the loop was characterised. A macro-model truncated one pole early is exactly the model that gives an infinite gain margin, and truncating a macro-model one pole early is the most ordinary thing anyone does to one.
The practical form of that is a rule about what to trust. A phase margin read from a truncated model is wrong by the phase the missing sections would have contributed at the crossover, which is an arctangent and is small when the sections are far out. A gain margin read from the same model is not wrong by a small amount; it is a different kind of statement. The quantity that survives truncation is the phase margin, and the quantity that does not is the one this field prints beside it.
What is still open
Two things this essay does not reach.
The closed-loop step is not drawn here. Two measurements of one margin requires a phase margin measured in the frequency domain and an overshoot measured in the time domain to agree through the second-order relation, and notes that they part company because the loop has three poles. A two-pole loop is the case where that relation should be exact, and the comparison has not been made.
And nothing here is an amplifier with a limit in it. Every number above comes from a linear solve. The step too large to have an impedance is where the same field stops being linear, and none of the margins on this page survives into that regime as a number either — for reasons that have nothing to do with pole counts.
The number worth carrying
2.45 parts per million in the crossover, 0.164 degrees in the phase margin, and everything in the gain margin.
The habit that goes with it is about how a null answer is shaped. Three instruments here reported nothing, and each did it in a different form: a sentence where a number was expected, an empty list, and a flag that means inconsistent coming back false because there was nothing to be consistent about. Only the first of the three is legible without reading the machinery. A quantity that can fail to exist should say so in the same slot it would have used for its value, because a caller that formats an infinity, an empty list or a false flag as though it were a measurement will do so silently and forever — which is the same argument a boundary is a model and a tolerance makes about edges, applied to the reporting rather than to the edge.
And one more, about self-checks. A residual that does not change when the thing it is checking changes is not a weak check; it is a check of something else, and its steadiness reads as reassurance. Two independent samplings agreeing to eight figures is evidence only if the two samplings could have disagreed — the digits the arithmetic did not have makes the same point about a subtraction that looks converged. The way to find out is to break the computation on purpose and watch which of its numbers notices, which is what the last two figures on this page are, and it costs nineteen evaluations of something that was already written.
Both faults above are repaired rather than only reported: the flag that could not tell nothing to check from this is wrong is two flags, the residual that could not see the grid now says what it does measure, and the free half-sampling comparison stands in its place with its one-way limit written beside it. The figures on this page found all three and are what will keep them found — every sampling that returns the wrong verdict is drawn, so the day a later change makes the residual notice them, an assertion here stops the build.
Part 3 on loop gain
One argument about Loop gain, 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.
Encirclement countGain marginLoop gainModel rangeNumerical errorNyquist criterionPhase marginStabilityVerification
- The gain margin the straight lines get exactly wrong gain margin, loop gain, model range, phase margin
- A sum that is exact, and the estimate that is not model range, numerical error, verification
- Every derivative, and the one that is zero model range, numerical error, verification
- The floor a second capacitor removes loop gain, phase margin, verification
- The gain the loop closes against loop gain, phase margin, stability
- The loop gain one temperature understates loop gain, model range, verification