Field

Feedback, and the margin

The site's strongest construction, and the subject supplies it free: a phase margin computed from the loop gain in the frequency domain, an overshoot measured from the step response in the time domain, one circuit, and a required agreement between two numbers that share no arithmetic.
Loop gain of a three-pole amplifier closed for a gain of 100. Unity loop gain at 5.73 kHz, where 34.9° of phase remains before −180°. The phase reaches −180° at 89.6 kHz, where the loop gain is 46.1 dB below unity.

What is left at crossover

A feedback loop is stable or not according to one number read at one frequency — how much phase remains before −180° at the point where the loop gain passes unity. The loop gain here is obtained the way it is obtained on a bench: cut the loop, drive one side of the cut, and measure what comes back to the other.

One loop, two measurements of the same margin. The loop gain crosses unity at 5.73 kHz with 34.9° of phase left. The closed-loop step overshoots by 35.2%, which the second-order relation says corresponds to 34.8°. They differ by 0.1°, and the difference is the third pole.

Two measurements of one margin

A phase margin is computed from the loop gain in the frequency domain, without ever looking at a step. An overshoot is measured from the closed-loop step response in the time domain, without ever looking at a Bode plot. Inverting the standard relation on the second returns 34.9° against the first's 34.9°, and the residue is the third pole.

A gain of 100 asked of an amplifier with 1.00 MHz of gain–bandwidth. The ideal amplifier — a nullor, so the two golden rules exactly — holds 100 at every frequency. The real one is 0.10% low at direct current, 1% low by 1.35 kHz, and 3 dB down at 10.0 kHz. Above 10.0 kHz there is no loop gain left and the ideal answer is not an approximation to anything.

The ideal amplifier, and where it stops being one

An ideal operational amplifier's closed-loop gain is set by two resistors and nothing else — a horizontal line at every frequency. The real one is already a tenth of a per cent low at direct current, one per cent low by 1.35 kHz, and above 10 kHz has no loop gain left, at which point the ideal answer is not an approximation to anything.

A loop whose phase comes back, at a gain of 1.0e+7. computed by solving, not by drawing. Three identical poles take the phase to −270°, two lead sections bring it back to −158°, and their own poles take it down again — so ∠L = −180° at 189 Hz, 3.46 kHz and 23.5 kHz. The gain moves the magnitude curve and not those three frequencies, so it decides only which side of each the unity-gain point falls. At 1.00e+7 the crossover is 10.6 kHz, in the recovered band, and the loop is stable.

Stable, and unstable with less gain

A three-pole loop with two lead sections is stable for gains between 1.81 × 10⁶ and 3.36 × 10⁷ and unstable on both sides of that window. Turning its gain *down* is what breaks it. Neither margin can see this, because a phase margin describes the loop at one frequency and a gain margin at one other, and this loop's phase crosses −180° at three: 189 Hz, 3.46 kHz and 23.5 kHz.

How much of the amplifier reaches the answer, at 35° of phase margin. computed by solving, not by drawing by multiplying the forward path's gain by 1 + 10⁻⁵ and solving again. At low frequency 0.0999% of a fractional change in the device reaches the closed-loop gain, which is one over the loop gain of 995.04. It changes sign at 258 Hz — above there a better amplifier gives a smaller gain — and reaches 1.61 at 8.08 kHz, which is worse than having no feedback, and settles at exactly 1 above crossover (5.73 kHz), where there is no loop gain left to spend. The second route, the real part of 1/(1 + T) from the cut loop, agrees to 9.6e-6.

How much of the amplifier gets through

The reason to build an amplifier from a bad amplifier and two resistors is that a change in the device barely reaches the answer — a tenth of a per cent of it at low frequency, measured by making the device better and solving again. Near crossover the same fraction rises above one, so feedback makes the gain more device-dependent than no feedback at all, and below fifty degrees of margin it changes sign on the way.

What the summing junction of an inverting amplifier actually is, at 1.00 MHz of gain–bandwidth. computed by solving, not by drawing by driving a current into the node and reading the voltage. It is 100 mΩ at direct current, rises 1.000 decades per decade of frequency, and settles at 909.5 Ω — which is the 1 kΩ and 10 kΩ in parallel, with the amplifier contributing nothing. It passes one per cent of the input resistor at 995 Hz, a factor of 1,005 below the gain–bandwidth. The second route — the open-loop impedance over one plus the return ratio from the cut loop — agrees to 0.045%.

The node that is at ground for a while

An inverting amplifier's summing junction is held at ground by the loop, so it is at ground exactly as well as the loop is strong. Driven with a current and measured, it is a tenth of an ohm at direct current, ten ohms at a kilohertz, and 909 ohms above a megahertz — which is the two feedback resistors in parallel, with the amplifier contributing nothing.

An inverting unity gain, and the 100 pF that only the loop can see. computed by solving, not by drawing. Two ten-kilohm resistors around a 10 MHz amplifier make a gain of 1.00, and a loop that closes against 2.01 — one plus the ratio, not the ratio. Adding 100 pF at the summing junction leaves the closed-loop gain at a kilohertz unchanged — 0.99998051 against 0.99997988, three parts in a million at the far end of the slider — and takes the phase margin from 90.0° to 14.4°, because the noise gain now rises a decade per decade and the loop closes at forty decibels per decade instead of twenty. Forty-five degrees is reached at 9.00 pF, bisected on the netlist. The capacitance is not part of the signal path and does not appear in any expression for the gain.

The gain the loop closes against

An inverting amplifier with two equal resistors has a gain of one and a loop that closes against two, so it has half the bandwidth of a follower built from the same part — 4.99 megahertz against ten. Nine picofarads at the summing junction, less than a scope probe, takes the phase margin from ninety degrees to forty-five, and a hundred picofarads puts twelve decibels of peaking on a response whose designed gain is nought decibels and whose measured gain at a kilohertz has not moved by three parts in a million.

An inverting unity gain driving 2.2 nF, and the pole that is inside the loop. computed by solving, not by drawing. Two ten-kilohm resistors around a 10 MHz amplifier make a gain of 1.00, and a loop that closes against 2.01 — one plus the ratio, not the ratio. Hanging 2.2 nF on the output leaves the closed-loop gain at a kilohertz unchanged — 0.99998002 against 0.99997988 — and takes the phase margin from 90.0° to 30.1°. The mechanism is at the other end of the amplifier from the summing-junction case and the arithmetic is the same: the load works against the amplifier's own fifty ohms of output resistance, which puts a second pole in the forward path — inside the loop, where the feedback has to live with it — while the gain the loop closes against does not move at all. Forty-five degrees is reached at 905 pF, bisected on the netlist. The capacitance is not part of the signal path and does not appear in any expression for the gain.

The load that gets inside the loop

Hanging a capacitor on an amplifier's output changes nothing a reader can find in any expression for its gain, and takes the phase margin of a unity-gain inverter from ninety degrees to thirty. The mechanism is fifty ohms of output resistance that no data sheet page puts next to the stability page: the load works against it, the pole that results is in the forward path, and forty-five degrees arrives at 905 picofarads — which is a metre of coaxial cable.

9.9 Ω restores 45°, 23 Ω restores 60°, and the load pays for it in ohms. computed by solving, not by drawing. Phase margin against the resistor placed between a unity-gain inverter's output and 2.2 nF of load capacitance, with the feedback taken from the amplifier's own side of it. With no resistor the margin is 30.11°; 9.90 Ω restores 45° and 23.20 Ω restores 60°. The lower curve is the same resistor with the feedback taken from the load instead, where it makes every value worse — the pole is then inside the loop rather than outside it, and at 220 Ω the margin is 13.4°. The rising curve is what it costs: the loop no longer regulates the load's node, so 1 kΩ of resistive load pulls the output down by 0.990% at 10 Ω, uncorrected, at direct current.

The resistor that buys the margin back

Two point two nanofarads takes a unity-gain inverter's phase margin from ninety degrees to thirty. Ten ohms between the amplifier and the load restores forty-five, twenty-three restores sixty, and it works for a reason that reads as a cheat: the feedback is taken from the wrong side of the resistor, so its pole is outside the loop. Take the feedback from the load instead — which is what anyone controlling the load would do — and the same resistor makes every value worse. What it costs is that the loop no longer regulates the load's node at all: ten ohms is one per cent of error into a kilohm, at direct current, uncorrected.

The second path costs nothing at 12 pF and an order at 100 pF. computed by solving, not by drawing. Settling time to 0.01% of final value, marched on the closed loop, against the value of the second feedback path's capacitor — with the phase margin of the same circuit divided by ten drawn on the same axis so the two can be compared. The direct-current error the previous rung recorded as the isolation resistor's cost, 0.99% into 1 kΩ, falls to 1.20e-4% with the second path in. What the second path costs instead is a range: at 12 pF the circuit settles in 0.745 µs against the isolation resistor's 1.419 µs — faster than the thing it repairs — and at 100 pF it takes 9.18 µs, 12 times longer, at a phase margin of 47.9° that reports nothing whatever about it. What it is settling by there is one exponential of time constant 0.99 µs, which is the feedback network's own RC and contains no amplifier.

The path that buys the error back

An isolation resistor restores a capacitively loaded amplifier's phase margin and costs it the thing feedback was for: the loop stops regulating the node the load is on, and a kilohm of load pulls the output down by a per cent. The standard repair is a second feedback path, and its cost is not an error or a margin — it is a range. At twelve picofarads it settles to a hundredth of a per cent in 0.745 microseconds, faster than the circuit it repairs; at a hundred it takes 9.18, and the phase margin there is better.

The quietest capacitor is 18× the fastest one, and the margin prefers neither. computed by solving, not by drawing. The total noise at the load of a capacitively loaded stage against its compensation capacitor, with the settling time on the same axis at ten microseconds to the microvolt. Three independent sources are put in the netlist and solved separately — the amplifier's own 4 nV/√Hz at its input, and √(4kTR) in series with each of the two feedback resistors — and added in power. The noise falls monotonically with the capacitor, from 50.7 µV at 1 pF to 12.1 µV at 220 pF. The peak in the noise gain falls with every larger capacitor and is gone entirely from 12 pF upward, where the uncompensated stage's peaks at 3.85 times its own low-frequency value. What the capacitor costs is settling: the fastest is 12 pF at 0.74 µs — the same capacitor that flattens the noise gain, because one handover decides both — and the quietest takes 20.3 µs, at a margin above 40° everywhere in that range.

What the second path costs at the floor

The arrangement that repaired a capacitively loaded amplifier was suspected of paying for itself in noise, because that is how compensations usually pay. It does not: it has no peak in its noise gain at all, and the total at the load falls from 54.9 microvolts to 28.9 as the capacitor is added. What it costs is settling, and the capacitor that is quietest is eighteen times the capacitor that settles fastest — a trade the phase margin says nothing about, because the margin is comfortable at both.

The load sees 10.0 Ω, 1.2e-3 Ω or 1.2e-3 Ω at direct current, and the peak is lowest for the arrangement with both paths. computed by solving, not by drawing. The impedance at the load node of all three arrangements, measured by grounding the input and driving a unit current into the load. Feedback from the amplifier leaves the load looking at the isolation resistor — 10.0 Ω, with no loop gain in it at all. Feedback from the load gives 1.2e-3 Ω, and the two-path arrangement has the same, which is what its direct-current path is for. All three resonate with the load capacitance near 3.2 MHz, and the two-path arrangement's peak is the lowest — 27.6 Ω against 37.4 and 59.2. What it gives up is between: above the 159 kHz handover it has let go of the load node.

What the load sees looking back

Four rungs of this argument have measured what the amplifier does to the signal — the margin, the settling, the error, the noise. None has asked the question from the other end. A load that draws its own current sees an impedance looking back, and with the feedback taken from the amplifier that impedance is the isolation resistor, with no loop gain in it whatever: ten ohms, and a load step leaves an error that never goes away. The two-path arrangement recovers to a thousandth of it and charges for that in a quantity none of the four rungs below measured.

A photodiode's own capacitance sets the bandwidth, as its -0.50 power. computed by solving, not by drawing. The bandwidth of a 1.0 MΩ transimpedance stage against the capacitance of the diode driving it, with the feedback capacitor at each point bisected to give exactly forty-five degrees of phase margin on the solved loop. The classical expression √(GBW/2π·rf·cd) is drawn over it: the right shape, and conservative by about a fifth at every capacitance. The bandwidth falls as the -0.497 power of the capacitance — a square-root law, so a diode of four times the area costs half the bandwidth rather than three quarters of it. At 30 pF the compensation is 0.598 pF against the expression's 0.725, and the bandwidth 295 kHz against 220.

Where the trouble is at the input

Every other arrangement in this field has its difficulty at the output — a capacitive load, an isolation resistor, a load that draws current. A photodiode amplifier has it at the input, and the capacitance causing it is not a parasitic: it is the diode's junction, which is the price of its area, and area is what a photodiode is bought for. The feedback resistor's own noise is 127 nV/√Hz against the amplifier's 4, and the amplifier is still ninety-five per cent of the noise at a large diode.

The step at which the output impedance stops being a number. computed by solving, not by drawing. The excursion divided by the step, against the step. The flat line is the linear model, and it is flat to 0.0 parts per million across four decades — which is what an impedance is. The rising curve is the same netlist with the differential pair's tanh in the transconductor, and it leaves at 10.6 mA: the input error there is 3.63 thermal voltages, so the boundary is an amplitude in the pair's own units rather than a current with the amplifier's name on it. At 300 mA the ratio is 54.5 Ω against the linear 23.6 — 131 per cent, and it is no longer a property of the circuit at all. The slew rate that decides it is 3.25 V/µs, which is twice the thermal voltage times the gain-bandwidth in radians, and contains no design choice.

The step too large to have an impedance

The rung below drove the load node with a current step and reported an impedance: a voltage divided by a current, which is a number only if the ratio does not depend on the current. Give the amplifier the differential pair's own tanh in place of a linear transconductor and it is a number up to 10.6 milliamps and not above — where the input error is 3.63 thermal voltages, and where the slew rate that decides it is twice the thermal voltage times the gain-bandwidth in radians, containing no design choice at all.

Which limit binds is a property of the load, and they change places near 22 nF. computed by solving, not by drawing. Each limit measured on its own, as the departure of its march from the linear one, at a load step of half the output stage's rating. The input pair's departure falls with load capacitance — a bigger reservoir holds the node while the loop responds, which is the sixth rung's own result — and the output stage's does not fall nearly as fast, because what it has to supply is the charge the capacitor wants. Below about 22 nanofarads the thermal voltage decides the answer and above it the output stage does, and nothing about the amplifier changed.

The current above which there is no impedance

The sixth rung found the impedance leaving at 10.6 mA, where the input pair's own tanh takes over and the slew rate is twice the thermal voltage times the gain-bandwidth in radians, with no design choice in it. A real output stage has a second limit that is nothing but design choice, and the two do not bind at the same load: at 0.47 nF the input pair's departure is 19.4 per cent against the output stage's 4.2, at 22 nF it is 0.9 against 2.3, and above the output stage's rating the excursion does not come back at all — 2,254 Ω for a quantity that was 37.

One channel's load step reaches another through the supply, and the compensation decides by 4497×. computed by solving, not by drawing. Two identical amplifiers on one rail — sharing no signal node — with an ampere of load step pulled from the first and the second's output read. With the wiring left out the coupling is exactly zero, which is what the seven rungs below this one computed. With 30 nanohenries and fifty milliohms of rail and 10 microfarads of decoupling it is not: 3.84 microvolts per ampere at 271 kHz if the compensation capacitor returns to ground, and 17.29 millivolts per ampere at 2.33 MHz if it returns to the rail. That is a factor of 4497 decided by a modelling choice, which is why both are drawn. The channel that caused the step is unaffected: its own loop corrects the disturbance along with everything else, and the crosstalk is entirely a problem for the channel that did not.

The rail the load moves

Seven rungs of this ladder end by saying the same thing: the supply is an ideal voltage source, so a load step is drawn from a node that cannot be disturbed. Giving the rail an impedance turns out to change the disturbing channel's own output impedance by three parts in ten million — its loop corrects the supply along with everything else — and to open a path to a second amplifier that shares nothing with it but a wire. How large that path is is a modelling choice: 3.84 microvolts per ampere with the compensation capacitor returned to ground, 17.3 millivolts with it returned to the rail, a factor of four and a half thousand.

The resistors own the floor between 2.91k Ω and 85.9k Ω, and the part owns it outside. computed by solving, not by drawing. The noise at the load of the two-path compensation against the impedance of its own feedback network, with the resistors scaled together and the compensation capacitor taken down in proportion so that Rf·Cf — the handover between the two feedback paths — does not move. Four contributions are integrated over 10 Hz to 100 MHz: the amplifier's 4 nV/√Hz, fitted as the 0.005 power of the impedance and so flat; the two resistors' √(4kTR), the 0.501 power; and the amplifier's 0.60 pA/√Hz flowing in the feedback resistor, the 0.997 power. Two different powers of one quantity cross twice. The resistors carry more than half the power only between 2.91k Ω and 85.9k Ω; outside that window, in both directions, the part does. The part's share is least at 15.8k Ω, which is not eₙ/iₙ — it is that ratio multiplied by the noise gain of 2.000 and again by 1.187, the square root of the ratio of the bandwidths the two generators actually see; there it carries 26.26 per cent. The model stops where the amplifier's output current does: at 100 Ω the feedback resistor alone draws 10 mA a volt.

The window the resistors own

Eight essays have priced one compensated stage, and the fourth of them left two of the amplifier's own generators named and uncounted. With the current generator put in the netlist the floor at ten kilohms goes from 28.88 microvolts to 30.13, and the resistors carry more than half the noise power only between 2.91 kΩ and 85.9 kΩ — outside that window, in both directions, the part does. The flicker corner turns out to be worth 1.00009 in this stage's own band, and 3.474 one band away.

One capacitor moves three quantities, and the expression's own answer peaks by 1.18 dB. computed by solving, not by drawing. The bandwidth, the peaking and the total output noise of a 1.0 MΩ transimpedance stage against its feedback capacitor, swept from 0.30 to 4.20 times what the classical expression asks for. Over that factor of fourteen the bandwidth falls from 334 to 55.4 kHz, the total noise from 230 to 65 µV, and the peaking from 10.0 dB to nothing. The expression's own answer sits at 1.18 dB of peaking, 0.82× is where the loop reaches forty-five degrees, and √2× is where the response is flat — so the choice usually quoted as maximally flat is neither of the two conditions it is quoted for. The faint families are the same three quantities at 3 pF and 300 pF of diode: normalised this way they are one curve, so the diode sets the scale and the multiple sets the shape.

The factor the expression leaves out

The classical compensation for a photodiode amplifier is quoted both as the forty-five degree choice and as the maximally flat one, and it is neither: it leaves 1.18 dB of peaking and 52.4° of margin. Flat is at exactly √2 times it — fitted at 1.4186 against 1.4142, at every detector from 3 pF to 1 nF. And the third quantity the capacitor is supposed to trade, the noise, does not move at all inside the signal band: three compensations spanning a factor of fourteen give 8.37 against 8.36 µV in a 4.36 kHz measurement and 230 against 65 µV over the whole plane.

Loop gain of a two-pole amplifier closed for a gain of 100. Unity loop gain at 5.73 kHz, where 35.0° of phase remains before −180°. The phase never reaches −180° at any frequency, so there is no gain margin to quote: 2 poles contribute at most 180° and the last of it arrives only at infinity.

The loop that never crosses

Every loop this field draws carries two margins, and one of them is not always a number. Take the third pole out of the standard loop and its crossover moves by 2.45 parts per million and its phase margin by 0.164 degrees — the third pole's own arctangent there, to five decimal places — while its gain margin goes from 46.06 decibels to no number at all. The phase reaches −180° only where the magnitude has already reached −62 decibels, and the two instruments that are supposed to notice report 3.19 × 10⁻⁶ either way.

Two large-signal limits, each alone and then both, at 20 mA and half of it. computed by solving, not by drawing. Four marches of one netlist at each load: neither limit, the input pair's tanh alone, the output stage's 20 mA alone, and both, driven by a 10 mA step. The three curves are each limit's departure from the linear march and the departure with both present; the faint line is the two singles added. Both lies on the sum and a little above it — 1.112 times it at 0.47 nF and 1.022 at 47 nF — so the limits are present together rather than taking turns. Where the two singles cross, near 10 nanofarads, the pair costs 1.88 times what the worse of them costs alone.

The load that neither limit owns

Nine rungs of this argument asked which of an amplifier's two large-signal limits binds, and drew the load capacitance where the answer changes hands. Both are present at every load: the excursion with both in the netlist is the two departures added and between 2 and 12 per cent more, never the larger of them. So the crossing is not a handover but a maximum — at 12 nanofarads the pair costs 2.084 times what the worse of them costs alone, against 1.35 at 2.2 nanofarads and 1.07 at 47 — and the same peak sits on the resistance axis at 20 ohms and the gain-bandwidth axis at 50 megahertz.

The direct-current error a bigger feedback resistor does not fix. computed by solving, not by drawing, at direct current with the amplifier in the netlist. A 1.0 nA photocurrent into 100 MΩ gives -0.100 V. The bias current flows in the same resistor, so its contribution is the ratio of the two currents — 0.1000% at 25 °C, and the same percentage at 1 MΩ and at 1 GΩ, which is checked by changing the resistor rather than by reading an expression. The amplifier's 100 µV of offset behaves the other way: it is multiplied by one plus the resistor over the diode's own leakage, so it grows with the resistor and with temperature. Both terms double every ten kelvin, for two different reasons, and at 85 °C they are 6.40% and 0.740% against 0.100% and 0.110% at 25.

The error a bigger resistor cannot help

Every other quantity in a photodiode amplifier improves with a larger feedback resistor: the signal grows as R and the resistor's own noise as √R, so the ratio goes as √R. The bias current does not behave like either — it flows in the same resistor the signal does, so its contribution is the ratio of the two currents with the resistance cancelled, 0.1 per cent at 25 °C and the same 0.1 per cent at a megohm and at a gigohm. The offset behaves the other way, growing as one plus the resistor over the diode's own leakage, and at 85 °C the two are 6.40 and 0.74 per cent against 0.10 and 0.11 at room temperature.

What a feedback tee buys, and the single thing it charges. computed by solving, not by drawing. Two 50 kΩ resistors with a 6.250 kΩ tap give 500.0 kΩ of transimpedance, which is R₁(1 + R₂/R₃) + R₂ solved on the netlist. That expression has no term for the noise gain, and the tap sets it to 1 + R₁/R₃ = ×9.00 — against exactly one for a single resistor of any value, because at direct current the source is a capacitor. One quantity then does all three things at once. The signal and R₁'s own noise are multiplied together, so the tee buys no signal-to-noise ratio at all: 1846 against 5582 in a hertz at a nanoamp for one resistor of the same transimpedance, a factor of 3.02 which is the square root of the noise gain. The amplifier's own voltage noise and offset are multiplied where they were not before. And the phase margin RISES, from 1.8° to 15.9°, because starting the noise gain high shortens its climb to the peak — so the tee is a compensation that charges for itself in noise, and a capacitor across the feedback is the same compensation for nothing. With no tap the three effects are absent rather than small.

The tee that charges for its own compensation

A feedback tee makes a large transimpedance out of small resistors, and R₁(1 + R₂/R₃) + R₂ is the whole of what is usually said about it. The expression has no term for the noise gain, and the tap sets that to 1 + R₁/R₃ — nine, where a single feedback resistor of any value gives exactly one, because at direct current the source is a capacitor. One quantity then does everything: the signal and R₁'s own noise are multiplied together so the tee buys no signal-to-noise ratio at all, and the phase margin RISES from 1.8° to 15.9°.

All essays