Feedback, and the margin

The mute switch the loop can still see

A sixteen-input mixer of 10 kΩ resistors on a 10 MHz amplifier, two channels in use, has a noise gain of 17 if the other fourteen are muted by grounding their sources and 3 if their resistors are switched off the junction. A real switch leaves its off-capacitance in series with the resistor, and with 5 pF the noise gain is still 3.00 at 1 kHz but 8.28 at 1 MHz. In the audio band the switch does its job — 3.75 µV of output noise to 20 kHz, as for an ideal switch, against 14.1 grounded — but the loop closes at a few megahertz, where the switch is most of a connection. The phase margin is 80.7° muted open and 88.3° muted grounded, and with real switches it is below both: 50.2° at 1 pF, 41.6° at 5 pF with 3.4 dB of peaking, 53.0° at 20 pF. A shunt switch behind the resistor, the usual cure for feedthrough, makes it slightly worse.

Assumes: The gain the loop closes against

The input that costs every other input found that a summing amplifier closes its loop against one more than the number of resistors on its junction, so that every input costs every other input bandwidth and noise. It found the same thing about muted inputs. A channel muted by grounding its source leaves its resistor on the junction, and a sixteen-input mixer with two channels in use is then 11.5 decibels noisier than one whose fourteen unused resistors have been disconnected. Disconnecting them means a switch, and the essay ended on the switch’s own nature: an analogue switch that is open is not an open circuit but a small capacitance, so a muted resistor is not fully off the junction at high frequency.

The gain the loop closes against found the place where that matters. A loop’s margin is decided at its crossover, a few megahertz on a ten-megahertz part, and anything that changes the noise gain there changes the margin — nine picofarads at a summing junction took a loop from ninety degrees to forty-five. A muted channel behind a few picofarads of switch is exactly that kind of thing. This essay measures how much.

The mixer, muted three ways

The mixer is the earlier essay’s: sixteen inputs of ten kilohms into one junction, ten kilohms of feedback, and the unity-gain-stable amplifier of ten megahertz gain–bandwidth with its second pole at twenty. Two channels are in use. The other fourteen are muted in one of three ways: grounded, with each source shorted and its resistor left on the junction; opened by an ideal switch, the resistor removed; or opened by a real switch, the resistor left connected to the junction through the switch’s off-capacitance.

A sixteen-input mixer with two channels in use and fourteen muted by switches of 5 pF off-capacitance: the noise gain against frequencycomputed by solving, not by drawing, 10 kΩ input and feedback resistors on a 10 MHz amplifier. Muted by grounding (faint) the noise gain is 17 at low frequency; muted by an ideal open switch (dashed) it is 3. With 5 pF across each open switch (solid) it is 3.00 at 1 kHz, 3.06 at 100 kHz and 8.28 at 1 MHz, rising past the corner 1/(2πRC) = 3.18 MHz towards the grounded value, until the amplifier's own bandwidth takes all three down together.1101001k10k100k1M10M100Mfrequencynoise gain1/(2πRC) = 3.18 MHzsolved, then checked — fourteen switches8.3 at 1 MHz, not 3
Fig. 1 The noise gain of a sixteen-input mixer with two channels in use, against frequency. Fourteen channels muted by grounding (faint): 17. Muted by ideal open switches (dashed): 3. Muted by switches of 5 pF off-capacitance (solid): 3.00 at 1 kHz, 3.06 at 100 kHz and 8.28 at 1 MHz, rising past 1/(2πRC) = 3.18 MHz towards the grounded value. The slider is the off-capacitance: 1, 5 or 20 pF.

At a kilohertz the real switch is indistinguishable from the ideal one: the noise gain is 3.00, and the fourteen muted resistors are gone. At a hundred kilohertz it is 3.06. At a megahertz it is 8.28 — more than halfway, on a logarithmic scale, back to the seventeen that grounding gives — and it keeps rising towards the grounded value as the switch’s reactance falls below the resistor’s. The corner where the two are equal is 1/(2πRC)1/(2\pi RC), 3.18 megahertz for five picofarads behind ten kilohms, and fourteen such channels in parallel begin to matter well below it, because fourteen small admittances add.

The slider shows the scale of the effect. With 1 picofarad per switch the noise gain at a megahertz is 3.36; with 20, 11.61. The off-capacitance of a common analogue switch is a few picofarads, and of a large, low-resistance one tens of picofarads, so the whole range on the slider is real hardware.

Fourteen small admittances, and a loop that peaks

The rise can be written down for an ideal amplifier. The noise gain is one plus the feedback resistor times the junction’s admittance to ground, which is two channels’ conductance plus fourteen series pairs: 3+14 jx/(1+jx)3 + 14\,jx/(1 + jx) with x=ωRCx = \omega RC. At a megahertz and five picofarads xx is 0.314, and the formula gives a magnitude of 5.84 — well short of the 8.28 the solve finds. The difference is the loop itself. The noise gain the solve reports is the closed-loop transfer from the amplifier’s input, which near the crossover is the ideal noise gain multiplied by the loop’s own closed-loop response, and a loop with forty degrees of margin peaks there. The muted channels lower the margin, the lowered margin lifts the noise gain near crossover, and the measured rise is steeper than the switches alone explain.

That is the feedback between the two figures, and what is left at crossover is the reason it is worth separating them: a loop’s behaviour near its crossover is set by what remains of its gain there, and a few picofarads change what remains.

What the loop makes of it

The phase margin of the sixteen-input mixer, two channels in use, with the other fourteen muted by switches of each off-capacitance. computed by solving, not by drawing. Muted by ideal open switches the loop has 80.7° of margin and the channel's −3 dB point is 3.95 MHz; muted by grounding, 88.3° and 603 kHz. With real switches the margin is below both: 0.5 pF 59.4°, 1 pF 50.2°, 2 pF 43.7°, 5 pF 41.6°, 10 pF 45.2°, 20 pF 53.0°, least at 5 pF, where the channel peaks by 3.4 dB (×1.48). The bandwidth falls through 4.82 MHz, 3.99 MHz, 3.05 MHz, 2.06 MHz, 1.52 MHz, 1.15 MHz. A switch of a few picofarads makes the noise gain rise with frequency through the crossover, which is a lag the loop was not designed for.
Fig. 2 The phase margin of the mixer with fourteen of sixteen channels muted by switches of each off-capacitance. Muted open: 80.7°, and a channel’s −3 dB point at 3.95 MHz. Muted grounded: 88.3° and 603 kHz. With real switches the margin is below both: 59.4° at 0.5 pF, 50.2° at 1, 43.7° at 2, 41.6° at 5, 45.2° at 10 and 53.0° at 20 pF. At 5 pF a channel peaks by 3.4 dB.

The two clean ways of muting both leave a comfortable loop. Muted by ideal switches, the noise gain is three, the crossover is high and the margin is 80.7 degrees, with a channel’s bandwidth of 3.95 megahertz. Muted by grounding, the noise gain is seventeen, the crossover is low, the margin is 88.3 degrees and the bandwidth only 603 kilohertz — the earlier essay’s price for leaving resistors on the junction.

Every real switch is worse than either. Half a picofarad takes the margin to 59.4 degrees; one picofarad to 50.2; two to 43.7; five to 41.6, the least, where a channel’s response peaks by 3.4 decibels before it falls. Larger switches recover — 45.2 at ten picofarads, 53.0 at twenty — and in the limit of a switch so large it is a short, the margin returns to the grounded mute’s. The worst switch is not the biggest. It is the one whose corner sits near the crossover.

The reason is the shape of the noise gain, not its size. A flat noise gain of three or of seventeen is a constant feedback factor, and a constant factor costs no phase. A noise gain that is rising with frequency at the crossover is a lead in the feedback factor’s reciprocal — a lag in the loop — exactly as a capacitance at the junction is, which is what the earlier essay’s nine picofarads did. Fourteen channels each of a resistor and a small capacitor in series are a capacitance at the junction below their corner and a resistance above it, and while they are a capacitance they cost phase. When the corner falls in the band where the loop is crossing, the loop sees a capacitance appear just where it can least afford one — the same trouble where the trouble is at the input found a photodiode’s capacitance making for a transimpedance stage.

Where the corner falls against the crossover

The pattern across the sweep follows from where each switch’s corner sits. A half-picofarad switch has its corner near thirty megahertz, above the crossover: the loop sees only the beginning of the rise, and loses twenty degrees. A five-picofarad switch has its corner at 3.18 megahertz, close to where the loop crosses with a noise gain of three; the rise is in full swing at crossover, and the margin is least. A twenty-picofarad switch has its corner at 796 kilohertz, below the crossover; by the time the loop crosses, the muted channels are nearly fully back, the noise gain is nearly flat at its higher value, and the crossover has moved down to meet it. The margin recovers because the rise is over before the loop needs the phase.

The bandwidth tells the same story from the other side. It falls steadily as the switches grow — 4.82 megahertz at half a picofarad, where the peaking lifts it above the open mute’s 3.95, then 3.99, 3.05, 2.06, 1.52, 1.15 — towards the grounded mute’s 603 kilohertz. A mixer muted by real switches is narrower than its designer computed from the channels in use, and less damped than the one computed from all sixteen.

In the audio band the switch works

None of this means the switches fail at their purpose. Their purpose is the noise in the band the mixer carries, and there the off-capacitance is negligible.

Output noise of the sixteen-input mixer with two channels in use, integrated over the audio band and over the amplifier's band, for four ways of muting the rest. computed by solving, not by drawing, integrated from 20 Hz. To 20 kHz: open 3.75 µV, 1 pF 3.75 µV, 5 pF 3.75 µV, 20 pF 3.76 µV, grounded 14.1 µV. To 20 MHz: open 59.9 µV, 1 pF 70.7 µV, 5 pF 82.8 µV, 20 pF 91.0 µV, grounded 95.5 µV. In the audio band a 5 pF switch is 0.00 dB from an ideal one and 11.5 dB quieter than grounding; over the amplifier's band it is 2.8 dB worse than ideal, because that noise lives where the switch has become a capacitor.
Fig. 3 The mixer’s output noise with two channels in use, integrated from 20 Hz to 20 kHz and to 20 MHz, for the fourteen others muted open, by switches of 1, 5 and 20 pF, and grounded. To 20 kHz: 3.75 µV for the ideal and every real switch, 3.76 at 20 pF, 14.1 µV grounded. To 20 MHz: 59.9 µV open, 70.7 at 1 pF, 82.8 at 5 pF, 91.0 at 20 pF, 95.5 grounded.

Integrated over the audio band the output noise is 3.75 microvolts with ideal switches and with every real switch to five picofarads, and 3.76 at twenty; grounding the muted channels gives 14.1, the earlier essay’s eleven and a half decibels. In the band a listener hears, the real switch is as good as an ideal one to the second decimal place.

The arithmetic says why. At twenty kilohertz a five-picofarad switch behind ten kilohms has x=ωRC=0.0063x = \omega RC = 0.0063, and fourteen of them add an admittance whose magnitude is 14x14x times a resistor’s — about nine per cent of one channel’s conductance, and almost all of it imaginary, at right angles to the three the junction already has. Added at right angles to three, it moves the noise gain’s magnitude by less than a part in a thousand, which is why the integrated noise does not change in the second decimal. The switch’s job is done in the band it was specified for, and its data sheet’s off-isolation, quoted at a kilohertz, is honest about that band.

Over the amplifier’s own band the picture changes. Integrated to twenty megahertz the output noise is 59.9 microvolts with ideal switches, 70.7 with one-picofarad switches, 82.8 with five and 91.0 with twenty — approaching the grounded mute’s 95.5. That wideband noise matters to whatever follows the mixer without a filter: a converter sampling the output, an amplifier that rectifies out-of-band noise, a long cable. Five-picofarad switches cost 2.8 decibels of it, because that noise lives where the switch has stopped being open.

The shunt switch, which does not help

The usual refinement of a series mute is a second switch, closed when the channel is muted, from the junction side of the resistor to ground — a T-switch. It exists to stop the signal feeding through the open switch’s capacitance: with the resistor’s end shorted, nothing of the muted source reaches the switch.

Fourteen muted channels: an open series switch of 5 pF, and the same switch with the resistor's end shorted to ground behind it. computed by solving, not by drawing. The shunt switch is the usual cure for a series switch's feedthrough of SIGNAL — the muted source is shorted, so nothing reaches the 5 pF — but the noise gain is about the junction's admittance to ground, and the shunt puts the 5 pF across 50 Ω instead of 10 kΩ. At 1 MHz the noise gain is 2.91 open, 8.28 with the series switch and 8.72 with the shunt as well; the channel's bandwidth open 3.95 MHz, series switch 2.06 MHz, series and shunt 2.27 MHz.
Fig. 4 Fourteen muted channels: an open series switch of 5 pF (dashed), and the same switch with the resistor’s end shorted to ground behind it by a 50 Ω shunt switch (solid); ideal open switches faint. At 1 MHz the noise gain is 2.91 open, 8.28 with the series switch and 8.72 with the shunt as well; a channel’s bandwidth is 3.95, 2.06 and 2.27 MHz.

For the signal the T-switch is a large improvement. For the noise gain it is a small step backwards. The noise gain is a property of the junction’s admittance to ground, and the shunt switch puts the five picofarads across fifty ohms instead of ten kilohms — a capacitance to ground with almost nothing in series, where before it had ten kilohms in series. At a megahertz the noise gain is 8.72 with the shunt against 8.28 without it, and the channel’s bandwidth 2.27 megahertz against 2.06. The shunt fixes the problem it was designed for and leaves this one where it was: the junction still sees fourteen off-capacitances, now connected to ground more firmly.

The worst switch is not the largest

It is tempting to read the margin figure as a warning against large switches, and it is not one. The twenty-picofarad switch leaves more margin than the five, and a switch large enough to be a short leaves the most of all. What the figure warns against is a corner near the crossover, and that depends on three numbers together — the switch’s capacitance, the channel’s resistance and the loop’s crossover — none of which a switch data sheet and an amplifier data sheet put on the same page. Stable, and unstable with less gain found a loop that loses its stability as its gain falls through a range rather than as it rises; the mixer’s margin against switch size is the same kind of curve, with a worst value in the middle that neither end predicts.

The schematic’s open switch

A schematic draws a muted channel as an open switch, which is a statement that the resistor has gone. In the audio band the statement is true to the noise floor’s last decimal. At the loop’s crossover it is false, and false in the direction that costs margin, because the open switch is a capacitor whose impedance at a few megahertz is comparable to the resistor it was meant to remove. The node that does not care how many found the virtual earth holding firm however many inputs are connected; it holds firm here too, at audio, and it is the loop holding it that has changed.

The essay that found the muted-resistor penalty recommended disconnecting unused resistors, and that recommendation stands: it is worth eleven and a half decibels in band. What this adds is the margin it costs. A designer who disconnects the resistors and then computes the loop with the channels in use has computed the loop of a mixer with ideal switches, and built one with forty-two degrees of margin instead of eighty.

What to do about it

Three remedies follow from the mechanism. The first is to make the junction’s capacitance deliberate rather than accidental: a small capacitor across the feedback resistor, the standard cure for capacitance at a junction, which the gain added to buy a margin set against the other way of buying margin. Sized for the worst switch it should restore the margin across the range at the cost of bandwidth the mixer does not need at audio; the value it needs is a measurement this essay has not made.

The second is to choose the switch by its corner. A switch whose corner is well below the crossover leaves a nearly flat noise gain at crossover and a recovered margin; one whose corner is well above leaves the loop almost untouched. The worst choice is in the middle, and on this mixer it is the few-picofarad part a designer would pick for low distortion.

The third is to go back to the grounded mute where the margin matters more than the noise. That is the choice stated plainly: the grounded mute pays eleven and a half decibels in band to keep eighty-eight degrees; the switched mute keeps the noise and pays in margin, unless a compensation capacitor buys the margin back. A mixer that feeds a converter directly, with no filter, may prefer the first; one that feeds a listener, the second.

How the mixer was solved

Each configuration is a netlist: the sixteen sources, each through its ten-kilohm resistor — or, for a muted channel, through the resistor and a capacitor in series — into the junction; ten kilohms of feedback; and the amplifier as a two-pole model with ten megahertz of gain–bandwidth, a second pole at twenty and fifty ohms of output resistance. The noise gain is the transfer from a source in series with the non-inverting input to the output. The phase margin is read from the loop gain, the netlist cut at the amplifier’s inverting input; the bandwidth is bisected on the transfer from a channel in use. Output noise is the amplifier’s five nanovolts per root hertz times the noise gain, together with each resistor’s Johnson noise times its own transfer, integrated on a logarithmic grid.

The switches have no on-resistance and no charge injection, the off-capacitance is fixed, and every muted channel’s switch is identical. A real switch’s off-capacitance varies with the voltage across it, which would make the margin depend on the muted channels’ signal levels — a nonlinear term this model, at small signal, cannot see.

Still open: the converter that is a summer, the switch’s on-resistance, and the resistance to build at

A resistor-ladder converter is a summing amplifier. The ladder built for the rest of itself measured the divider chain such a converter is made from, and its output stage switches binary-weighted resistors between the junction and ground according to the digital word. Every bit switched off the junction leaves an off-capacitance behind, so the margin of a current-output converter’s amplifier depends on the word being converted, and a full-scale transition walks the loop across the worst switch size in this essay.

The switch’s on-resistance. A channel in use has its switch closed, and the switch’s on-resistance adds to its resistor: a gain error at low frequency, and at high frequency a pole with the switch’s own capacitance to ground. With fourteen switches open and two closed, the closed ones’ parasitics sit inside the loop as well, and whether they help or hurt the margin found here is the same netlist with two more elements per channel.

The resistance a mixer should be built at. Raising every resistor raises the Johnson noise and moves every switch’s corner down, towards the frequencies where a muted channel is already back; lowering them does the reverse and costs drive current. The resistance that keeps the corner clear of the crossover for a given switch is a new constraint on a choice the earlier essay left to noise alone.

Part 4 on noise gain

One argument about Noise gain, and one of 4 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.

Input capacitanceLoop gainNoise gainPhase marginStabilitySumming junction