Feedback, and the margin

The crossover where two readings are quieter than one

Two injections at one cut combine into the exact loop gain, and each is read as a ratio of two noisy analyser channels. Where the loop gain is large the combination is three decibels noisier than the voltage reading alone, because the current reading's noise is seven hundred times larger and reaches the answer at a seven-hundredth of the weight. At the crossover of a loop with 160 nF on it the order reverses: the voltage reading carries 0.26 times the channel noise, the current 0.42 and the combination 0.22, quieter than either, because there the identity takes 0.71 of one and 0.29 of the other and averages two errors. In 160 seeded sweeps at 40 dB of channel signal-to-noise the voltage reading reports 15.0° ± 0.19° of margin, the combination 8.9° ± 0.07°, and the loop has 8.9°. Above crossover the combination is a small difference of two large readings, and the gain margin, read where the phase reaches −180°, is the number it reads worst: 39 dB on a lightly loaded loop needs channels 60 dB below the injection to read to a decibel.

Assumes: What is left at crossover · The load that gets inside the loop

Two wrong readings and one loop gain showed that a bench which can only cut a loop at a wire still recovers the exact loop gain, provided it reads the wire twice: once with a voltage injected in series and once with a current injected into the node. Each reading is wrong by (1+T)(1 + T) times an impedance ratio at the cut, the two ratios are reciprocal, and

11+T=11+Tv+11+Ti\frac{1}{1 + T} = \frac{1}{1 + T_v} + \frac{1}{1 + T_i}

removes them. On a netlist the combination matched the loop gain read at the controlled source to a few parts in a billion, at every frequency and at every load.

A netlist has no noise. An analyser does, and that essay left the question of what the identity does with it. Each reading is a ratio of two channels, and each channel carries some noise. The combination divides by Tv+Ti+2T_v + T_i + 2, which can be small, and it multiplies readings together, which compounds their errors. The worry is that two noisy measurements combined through a rational function will be noisier than either. Sometimes that is true. At the frequency the measurement exists for, on the loops that most need measuring, it is the other way round, and the reason says something about where the information in each reading actually sits.

How noisy each reading is, at 160 nF: at the crossover the voltage reading carries 0.26 and the current 0.42 times the channel noise, and the two combined 0.22 — quieter than eithercomputed by solving, not by drawing. The loop of the double-injection measurement — a three-pole amplifier closed for a gain of a hundred, 100 Ω of output resistance and 160 nF of load — read at its output wire. Each reading is a ratio of two analyser channels, and each channel carries additive noise of rms σ relative to the injection. The relative noise of each reading per unit σ: voltage (dashed), current (dotted), and the two combined through 1/(1 + T) = 1/(1 + Tv) + 1/(1 + Ti) (solid). At 10.0 Hz the loop gain is 706 and suppresses the channel each ratio divides by: voltage 708, current 499170, combined 1000, which is √2 times the voltage reading because the current reading's noise reaches the combination at an equal weight. At the crossover, 5.31 kHz: 0.26, 0.42 and 0.22. Above it the combination is finding a loop gain far smaller than either reading's own error and its relative noise climbs without limit: 3579 at 100 kHz.100m1101001k10k100k101001k10k100k1Mfrequency (hertz)relative noise of the reading, per unit of channel noisevoltage injection0.26 at crossovercurrent injection0.42 at crossoverthe two combined0.22 at crossoverat the lowest frequency708, 499170, 1000solved, then checked — noise carried through the identityloud below, quiet at crossover, lost above
Fig. 1 The loop of the double-injection measurement — three poles, closed for a gain of a hundred, 100 Ω of output resistance and 160 nF of load — read at its output wire, each analyser channel carrying noise of rms σ\sigma relative to the injection. The relative noise of each reading per unit σ\sigma: voltage (dashed), current (dotted), and the two combined (solid). At 10 Hz: 708, about 500,000, and 1,000. At the 5.31 kHz crossover: 0.26, 0.42 and 0.22. The slider sets the load from 10 nF to 330 nF.

A reading is a ratio the loop drives

The noise model is the simplest an analyser admits. Each reading is the ratio of two complex amplitudes read on two channels, and each channel adds complex Gaussian noise of a fixed rms, σ\sigma, measured against the size of the injection. For the voltage injection the two channels are the voltages either side of the injecting source; with the injection set to one, they are 1/(1+Tv)1/(1 + T_v) and Tv/(1+Tv)T_v/(1 + T_v). The current injection has the same structure with TiT_i in place of TvT_v, its two channels being the currents into the load and back into the amplifier.

The loop decides how large those two channels are, and so how noisy their ratio is. To first order the relative noise of a reading is

n(Tr)=∣1+Tr∣ 1+1/∣Tr∣2n(T_r) = |1 + T_r|\,\sqrt{1 + 1/|T_r|^2}

times σ\sigma. Where the loop gain is large, one of the two channels is 1/(1+Tr)1/(1 + T_r), tiny, because the loop works to cancel what is injected, and the reading is a ratio with a near-zero in its denominator. Where the loop gain is small both channels are about the injection’s own size and the reading is about as noisy as the channels. Where 1+Tr1 + T_r is small — near a crossover with little margin — both channels are larger than the injection, because the closed loop is peaking there, and the reading is quieter than the channels.

That last case is worth noticing before the figures. A loop with a small phase margin is close to T=−1T = -1 at its crossover — the closed-loop peaking that two measurements of one margin read as overshoot — and its readings there are amplified by the same peaking that makes it worrying. The noise in a reading of the phase margin falls as the margin falls.

Loud below crossover, and why the combination pays three decibels

The hero figure reads left to right in three regimes. At 10 Hz the loop gain is 706. The voltage reading’s noise is 708 times the channel noise — the loop has suppressed one channel by that factor — and the current reading’s is about half a million, because its error term (1+T)Zl/Zs(1 + T)Z_l/Z_s makes TiT_i seven hundred times larger again. The combination’s is 1,000.

That is 2\sqrt2 times the voltage reading’s, to two per cent, and the reason is a balance worth spelling out. The voltage reading is nearly the answer at low frequency: its error is (1+T)(1 + T) times Zs/ZlZ_s/Z_l, a seven-hundredth. The combination uses it almost entirely and uses the current reading as a small correction. But the current reading is seven hundred times noisier, and seven hundred times noisier at one seven-hundredth of the weight is the same contribution. The two noises arrive at the combination in equal amounts, and two equal, independent noises add to 2\sqrt2 of one.

So below crossover the combination costs three decibels of signal-to-noise against the voltage reading alone, and buys back a bias of a seven-hundredth, which is a hundredth of a decibel. On a loop measured only below crossover, a single voltage injection at a wire with a low source impedance is the better measurement. Nobody measures a loop only below crossover, though, and the cost changes sign where they do measure it.

What the combination takes from each reading

The identity has an explicit sensitivity to each reading. Differentiating T=(TvTi−1)/(Tv+Ti+2)T = (T_vT_i - 1)/(T_v + T_i + 2) and writing ρ=Zs/Zl\rho = Z_s/Z_l for the impedance ratio at the cut,

∂ln⁡T∂ln⁡Tv=TvT (1+ρ)2,∂ln⁡T∂ln⁡Ti=Ti ρ2T (1+ρ)2.\frac{\partial\ln T}{\partial\ln T_v} = \frac{T_v}{T\,(1+\rho)^2}, \qquad \frac{\partial\ln T}{\partial\ln T_i} = \frac{T_i\,\rho^2}{T\,(1+\rho)^2}.

What the combination takes from each reading: below crossover it is almost all voltage, at 5.31 kHz it is 0.71 of the voltage and 0.29 of the current, and above it both weights grow without limit. computed by solving, not by drawing. The logarithmic sensitivity of the combined loop gain to each reading, |∂ln D/∂ln Tv| (dashed) and |∂ln D/∂ln Ti| (dotted), at 160 nF, against frequency, with Tv/(T(1 + ρ)²) and Ti·ρ²/(T(1 + ρ)²) computed from the separately solved impedance ratio ρ = Zs/Zl (dots); the two agree to a part in a million. At 10.0 Hz the weights are 0.999 and 0.00142: the voltage reading is nearly the answer and the current reading a correction. But the current reading's own noise is larger by about 1/|ρ| = 705, so the two contributions to the combination's noise are equal there. At the crossover they share the answer, 0.71 and 0.29, and the combination averages two errors. Far above it the loop gain is a small difference of two large readings and each weight is about 1/|T|.
Fig. 2 The weight of each reading in the combination, ∣∂ln⁡T/∂ln⁡Tv∣|\partial\ln T/\partial\ln T_v| (dashed) and ∣∂ln⁡T/∂ln⁡Ti∣|\partial\ln T/\partial\ln T_i| (dotted), at 160 nF, with the two closed forms computed from the separately solved impedance ratio (dots), which agree to a part in a million. 0.999 and 0.0014 at 10 Hz; 0.71 and 0.29 at the 5.31 kHz crossover; both near 1/∣T∣1/|T| far above it.

The two forms in the figure are computed two ways — from the identity’s own derivative using only the solved readings, and from ρ\rho with ZsZ_s and ZlZ_l solved apart — and they agree to a part in a million. They show three things.

Below crossover the weights are 0.999 and 0.0014, the arrangement just described. At the crossover they are 0.71 and 0.29: the voltage reading is now wrong by a factor that is not small, the current reading is wrong in the reciprocal direction, and the identity takes about two-thirds of one and a third of the other. Two errors averaged in that way partly cancel, and so do two noises. Far above crossover both weights grow as 1/∣T∣1/|T|, because the loop gain has become a small difference between two readings that are each mostly their own cut’s error: TvT_v tends to ρ\rho and TiT_i to 1/ρ1/\rho, and the loop gain is what is left over.

Quieter than either at the crossover

So at the crossover the hero figure’s order reverses. With 160 nF on the output the voltage reading carries 0.26 of the channel noise, the current 0.42 and the combination 0.22. All three are below one, because the loop’s margin is 8.9° and ∣1+T∣|1 + T| at crossover is 2sin⁡(8.9°/2)=0.1552\sin(8.9°/2) = 0.155: the loop peaks, the channels are larger than the injection, and every reading is quieter than its channels. The combination is quieter still, because it averages.

The slider shows that this depends on the margin, which is the load’s doing: the load that gets inside the loop found the output capacitor putting a pole inside the loop, and the heavier the load the nearer that pole sits to crossover. At 10 nF the margin is larger, ∣1+T∣|1 + T| at crossover is 0.65, and the readings carry 0.81 and 15.8 of the channel noise; the combination carries 0.86, slightly more than the voltage reading, because the current reading is still a poor one there. At 47 nF the voltage reading and the combination are level at 0.66. At 330 nF, past instability, they are 0.12, 0.13 and 0.086. The loops on which the combination beats both single readings are the loops whose margin is small enough to matter, which is not a coincidence: a small margin is a load whose pole has reached the crossover, and that is what makes both single readings wrong by comparable and opposite amounts.

A hundred and sixty sweeps

A relative noise at one frequency is not yet a margin. An analyser sweeps, and the margin is read where the swept magnitude falls through unity, so noise moves both the frequency read and the phase read there. The honest test is to sweep.

160 noisy sweeps at 40 dB of channel signal-to-noise: the voltage reading alone reads 15.0° ± 0.19°, the combination 8.9° ± 0.07°, and the loop has 8.9°. computed by solving, not by drawing, and then by seeded sweeps. The loop with 160 nF of load, read at its output wire from 1 kHz to 30 kHz at 60 points a decade, each analyser channel carrying complex Gaussian noise 40 dB below the injection, 160 times. The phase margin each sweep reports, found by interpolating the first falling unity crossing as an analyser's marker would: voltage alone, 15.00° with a standard deviation of 0.191° (predicted from the readings' relative noise and the slopes at crossover, 0.220°); current alone, 19.81° with a standard deviation of 0.257° (predicted from the readings' relative noise and the slopes at crossover, 0.280°); both combined, 8.91° with a standard deviation of 0.072° (predicted from the readings' relative noise and the slopes at crossover, 0.099°). The true margin is 8.91°. The single readings are tight and wrong; the combination is centred on the truth, and here it is also the tightest.
Fig. 3 160 sweeps of the loop with 160 nF of load, 1 kHz to 30 kHz at 60 points a decade, each channel carrying complex Gaussian noise 40 dB below the injection, seeded. The margin each sweep reports, from the first falling unity crossing interpolated as an analyser’s marker would: voltage alone 15.0° ± 0.19°, current alone 19.8° ± 0.26°, combined 8.9° ± 0.07°. The loop has 8.91°.

Each sweep draws fresh noise on every channel of both injections at every frequency, computes the two readings and their combination, and interpolates the first falling unity crossing exactly as a marker would. The voltage reading alone reports 15.00° with a standard deviation of 0.191°. The current reading alone reports 19.81°, standard deviation 0.257°. The combination reports 8.91°, standard deviation 0.072°, centred on the true 8.91°.

The prediction from the readings’ relative noise — phase noise at the crossing, plus the crossing’s movement along the frequency axis times the phase slope there — gives 0.220°, 0.280° and 0.099°. The sweeps come in a little under each, by between a tenth and a quarter, because interpolating between two neighbouring points averages their noise and the prediction does not. That is the two routes agreeing on the order and on the ratio, which is what the figure is for: the single readings are tight and wrong by six and eleven degrees; the combination is right and, here, also the tightest.

When combining pays

The general question is a trade. A single voltage reading has a bias that grows with the load and a noise that does not; the combination has no bias and a noise that, below crossover, is 2\sqrt2 larger. Which is better depends on how large the bias is against the noise.

When combining pays: the voltage reading's error is its bias and the combination's is its noise, and at 40 dB of channel signal-to-noise the combination is the better reading from 2.2 nF, at 60 dB from 1 nF. computed by solving, not by drawing. The rms error of the phase margin, bias and scatter together, against the load capacitance, for the voltage reading alone (lines) and for the two readings combined (dots, which have no bias), with each analyser channel 40 dB and 60 dB below the injection. The scatter is the linearised prediction the seeded sweeps confirm. 1 nF: bias 0.100°, voltage 0.370° and 0.106°, combined 0.385° and 0.039°; 2.2 nF: bias 0.185°, voltage 0.400° and 0.188°, combined 0.382° and 0.038°; 4.7 nF: bias 0.361°, voltage 0.505° and 0.363°, combined 0.377° and 0.038°; 10 nF: bias 0.736°, voltage 0.815° and 0.737°, combined 0.364° and 0.036°; 22 nF: bias 1.580°, voltage 1.616° and 1.581°, combined 0.337° and 0.034°; 47 nF: bias 3.233°, voltage 3.248° and 3.233°, combined 0.284° and 0.028°; 100 nF: bias 5.698°, voltage 5.705° and 5.698°, combined 0.186° and 0.019°; 160 nF: bias 6.149°, voltage 6.153° and 6.149°, combined 0.099° and 0.010°; 220 nF: bias 3.890°, voltage 3.892° and 3.890°, combined 0.036° and 0.004°. At 40 dB the voltage reading's scatter is as large as its bias up to a few nanofarads and the two are nearly level; at 60 dB the combination is the better reading at every load; and once the load's pole approaches crossover the bias grows to degrees and the combination wins by more than an order of magnitude at either.
Fig. 4 The rms error of the phase margin, bias and scatter together, against the load capacitance, for the voltage reading alone (lines) and for the combination (dots, no bias), with channels 40 dB and 60 dB below the injection. The voltage reading’s bias is 0.10° at 1 nF and 6.15° at 160 nF; the combination’s scatter at 40 dB is 0.385° at 1 nF and 0.099° at 160 nF. At 40 dB the combination is the better reading from 2.2 nF, at 60 dB from 1 nF.

The voltage reading’s bias is a tenth of a degree at 1 nF and 6.15° at 160 nF. At 40 dB of channel signal-to-noise its scatter is about 0.37°, comparable with the bias at light loads, so the two methods are level there: 0.370° against 0.385° at 1 nF, and the combination ahead from 2.2 nF. At 60 dB the scatter is a tenth as large and the bias is all that is left of the single reading’s error, so the combination is the better reading at every load. And as the load’s pole approaches the crossover the bias grows to degrees while the combination’s scatter falls, because the margin is falling, so at 160 nF the combination is sixty times closer at 40 dB and six hundred times at 60 dB.

The practical reading is that a quieter analyser makes the combination more worth taking, not less. A quiet instrument reduces the single reading to its bias, and a bias does not average away. The combination’s only cost is noise, and noise does.

The number it reads worst

The phase margin is read where the loop gain is one. The gain margin is read where the phase reaches −180°, and on a well-compensated loop that is far above crossover, where the loop gain is small and the combination is at its weakest.

The gain margin is where the combination is weakest: at 1 nF the phase reaches −180° at 59.6 kHz with the loop gain 39.0 dB down, the combination's noise there is 124 times the channel's, and reading it to ±1 dB needs 60 dB of channel signal-to-noise. computed by solving, not by drawing. The magnitude of the loop gain at 1 nF (solid) against frequency, and the absolute noise of the combined reading for analyser channels 40, 60 and 80 dB below the injection (broken lines). The combination recovers the loop gain as a small difference of two readings each of which is mostly its cut's error, so above crossover its noise is roughly flat while the loop gain falls. The phase crosses −180° at 59.6 kHz, where the loop gain is −39.0 dB: the gain margin is 39.0 dB. There the combination's relative noise is 123.9 times the channel noise (the voltage reading's alone is 25.8), so a gain margin read to ±1 dB, about 12%, needs channels 60 dB below the injection. The phase margin, read at the gain crossover, is the easy number and the gain margin the hard one.
Fig. 5 The loop gain at 1 nF (solid) and the combination’s absolute noise for channels 40, 60 and 80 dB below the injection (broken lines). The phase reaches −180° at 59.6 kHz with the loop gain 39.0 dB down; the combination’s relative noise there is 124 times the channel noise, so reading the gain margin to ±1 dB needs 60 dB of channel signal-to-noise. Loaded further, at 10 nF, 23.6 dB at 24.3 kHz needs 44 dB; at 47 nF, 11.4 dB at 11.6 kHz needs 29 dB.

Above crossover the loop gain falls and the combination’s absolute noise stays roughly level, because each reading is dominated by its cut’s error and the loop gain is extracted as their small difference. With 1 nF on the output the phase reaches −180° at 59.6 kHz, where the loop gain is −39.0 dB. The combination’s relative noise there is 124 times the channel noise; the voltage reading’s alone is 25.8. To read 39 dB of gain margin to a decibel, about 12 per cent of the loop gain, the channels need to be 60 dB below the injection.

The requirement falls as the load grows, because the gain margin falls with it and the phase crossover comes closer to the gain crossover: 44 dB at 10 nF, 29 dB at 47 nF. The loops on which the gain margin is hard to read are the loops on which it is large, which is some consolation. A gain margin of 39 dB read as 35 or as 43 has not misled anybody about the loop’s stability — though stable, and unstable with less gain is the reminder that a loop can have a phase crossover below its gain crossover too, where the gain margin is a limit on reducing the gain rather than raising it, and is read where the loop gain is large rather than small. But it is a different instrument requirement from the phase margin’s, and an analyser setting chosen for a clean phase margin can return a gain margin that is mostly noise, with nothing on the plot to say so.

How a bench should set the injection

The model fixes the channel noise and lets the loop decide the channel signals, which is how an analyser with a fixed injection behaves. Two practical consequences follow.

The first is that the injection’s amplitude should follow the loop gain. Below crossover, the channel the reading divides by is suppressed by the loop gain, so a constant injection reads the low-frequency loop gain with a signal-to-noise that falls as the loop gain rises. Analysers allow an injection profile for this reason, larger at low frequency, and the amount it should rise is the loop gain itself. The limit on how large it may be is the small-signal condition: an injection large enough to read 60 dB of loop gain cleanly at 10 Hz is the same size as the output swing the loop is suppressing, and the step too large to have an impedance is the reminder that a loop driven into slewing has no loop gain to read.

The second is that the two injections need not use the same amplitude, and the weights say which to favour. Below crossover the current reading is the noisier one by the impedance ratio, so its injection should be larger by about that ratio; at crossover the two are comparable. Above crossover, where the gain margin is read, both should be raised and the bandwidth narrowed, because the combination is differencing two large readings to find a small one, and only averaging helps.

Where the two readings are taken in practice

A bench takes the voltage reading by placing a small resistor in the loop and driving a transformer across it, and the current reading by injecting through a series capacitor or resistor into the node, reading the two branch currents as voltages across sense resistors. Each of those has its own noise, and the model’s single σ\sigma per channel stands for all of it: the analyser’s receiver floor, the sense resistors’ Johnson noise, and the amplifier’s own output noise, which appears on both channels of both readings. The last is not independent between channels, and correlated noise between the two channels of one reading cancels partly in their ratio. The model treats every channel as independent, which is the cautious case.

What is left at crossover read its loop gain at the controlled source, where there is nothing to inject against and no noise either. A network analyser sweeping a real amplifier is the opposite case, and these figures are its error budget: three decibels lost below crossover, gained back with interest at crossover on a loop that matters, and a requirement for a quiet instrument above it.

What the noise does not change

The identity is exact and the combination’s mean is the loop gain at every frequency, so noise never biases the double injection in the linear model. It biases a single reading’s margin only through the nonlinearity of the crossing — interpolating a noisy magnitude through unity — and that bias is a few thousandths of a degree here, well below the scatter. The bias that matters is the cut’s, and the combination removes it whatever the noise. The repair a designer then makes — the resistor that buys the margin back between the amplifier and its load — changes the impedance ratio at the output wire, and so changes both single readings’ biases; it is one more reason to cut and read with both injections when judging whether a repair worked.

Nor does noise affect the questions the loop that never crosses raised about what a margin is. A loop with two paths has a different loop gain at different cuts, and a quiet analyser reads the one at its cut exactly; a noisy one reads it with scatter. Neither reads the other cut’s, and neither says anything about robustness to a delay, which the disc that does not see the step found the phase margin cannot see either.

What this leaves out

Each channel’s noise is white, complex Gaussian and independent of every other channel’s, and its size is fixed against the injection. A real analyser’s noise depends on its resolution bandwidth and on the channel’s range, and the amplifier’s own noise is correlated between channels. The sweep has a fixed 60 points a decade, and a finer sweep would interpolate less and scatter a little more. The loop is the earlier essay’s single-path loop, so the cut-dependence of a loop with two paths is absent. The injection is small throughout, and the question of how large it may be before it stops being small — set by the output stage’s slew rate — is a separate one. And a margin’s scatter has been stated as a standard deviation, which is right for a Gaussian and slightly understates the tails of a ratio of Gaussians where its denominator can approach zero.

What to carry to a bench

The combination is 2\sqrt2 noisier than a single voltage reading where the loop gain is large, because the current reading’s noise arrives at an equal weight. At the crossover of a loop with a small margin it is quieter than either reading: 0.22 of the channel noise against 0.26 and 0.42 at 160 nF, and in 160 seeded sweeps 8.9° ± 0.07° against a voltage reading’s 15.0° ± 0.19°. A quieter analyser makes the combination more worth taking, since it shrinks a single reading to its bias. The gain margin is the number the combination reads worst: on a loop with 39 dB of it, channels 60 dB below the injection to read it to a decibel.

Still open: the second path, the injection’s own size, and correlated noise

A loop with two paths. A feedforward capacitor across the top of the divider gives a loop whose gain differs between the output wire and the divider. The double injection reads each cut exactly, and now noise says which cut it reads more quietly. Whether the cut that predicts the closed loop’s ringing is also the quieter one is the measurement that would tell a bench where to cut a loop that is not a single ring.

How large an injection may be. Every argument here improves with a larger injection, and every one assumes it is small. An output stage that slews at a few volts per microsecond sets a largest injection at each frequency, and with it a smallest achievable noise. The largest injection at which the combined margin is still within a tenth of a degree of the true one, against the slew rate, is the number that closes this budget.

Correlated noise between the channels. The amplifier’s own output noise appears on both channels of each reading and partly cancels in their ratio. Treated as correlated rather than independent, it changes each reading’s noise by a factor that depends on where it enters the loop, and the combination’s weights are the same. Whether correlation helps the combination more than it helps a single reading is a short calculation with one more term in it.

The loop that never crosses asked what an instrument says when a margin is not a number. This essay asks how precisely it says it when the margin is one, and the answer depends on where the margin is read: at the gain crossover the two readings help each other, and at the phase crossover they need help.

Part 5 on loop gain

One argument about Loop gain, 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:

The objects named here

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

Crossover frequencyGain marginLoop gainMeasurement conditionMeasurement errorMonte carloPhase marginReturn ratio