Feedback, and the margin

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.

Assumes: Where the trouble is at the input · The gain the loop closes against

Where the trouble is at the input chose a photodiode amplifier’s feedback capacitor twice. Once from the classical expression, which takes the detector’s capacitance, the feedback resistor and the amplifier’s gain-bandwidth and returns a number; and once by bisecting the solved loop until the phase margin was exactly forty-five degrees. The first asked for more capacitance than the second, by a factor between 0.80 and 0.83 at every detector from three picofarads to a nanofarad, and the conclusion drawn was that the expression has the right shape and a conservative constant.

That is two points. Neither of them says anything about the capacitor between them, and there is a great deal between them: on a megohm with a thirty picofarad detector the two values are 0.725 and 0.598 picofarads, and a designer fitting the nearest available part fits neither of them.

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 100 pF the compensation is 1.06 pF against the expression's 1.28, and the bandwidth 168 kHz against 124.
Fig. 1 The rung below, at a hundred picofarads of detector: 1.06 pF of compensation bisected to forty-five degrees against the 1.28 the expression names, and 168 kHz of bandwidth against the 124 it promises. The bandwidth falls as the −0.497 power of the capacitance, fitted over the whole sweep.

There is a second reason to distrust the single number, and it is in the way the expression is usually introduced. It is derived by making the pole it puts in the noise gain coincide with the frequency at which the loop closes — that is the whole derivation — and it is then described, often in the same sentence, as the choice that gives a maximally flat response. Those are two different requirements. A closed form can satisfy one of them, and every margin quoted below is read off a loop that was cut and injected rather than written down, the way what is left at crossover established for this field.

One capacitor, three readings

The three quantities a designer cares about here all depend on that one component, and the way to see what it is worth is to sweep it rather than to evaluate it. Everything below is normalised to what the expression itself asks for, which turns out to be the right variable and not merely a convenient one.

One capacitor moves three quantities, and the expression's own answer peaks by 1.18 dBcomputed 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.00.5011.521compensation, as a multiple of what the expression asks forrelative to the expression's own choice; peaking in decibels ÷ 10the expression's own answerflat at √2×45° at 0.82×0.30.524bandwidth · noise · peaking ÷ 10diode here30 pF, +3 of amplifierthe expression asks0.725 pF, peaking 1.18 dB45° is at0.825× — 0.598 pFflat is at √2×1.02 pF, 65.8°bandwidth, 45° → √2×295 kHz → 216 kHz…the expression's275 kHznoise, 45° → √2×142 → 110 µVnoise goes as bandwidth to0.700solved, then checked — one component, three readingsthe expression's own answer peaks 1.18 dB
Fig. 2 The bandwidth, the peaking and the total output noise against the feedback capacitor, from 0.30 to 4.20 times what the expression names — a factor of fourteen in one component. The bandwidth runs from 334 to 55.4 kHz, the noise from 230 to 65 µV, and the peaking from 10.0 dB to nothing. The two faint families are the same three quantities at 3 pF and 300 pF of detector. Drag it through the detector and watch the curve not move.

Read the middle of that first. The expression’s own answer sits at 1.18 dB of peaking and 52.4° of phase margin. It is not the forty-five degree point, which is at 0.825 times it, and it is not the flat point either, which the next section puts at √2 times it. It is a third place, and the two conditions it is quoted for are on either side of it.

Both curves that matter are monotone in the capacitor. The bandwidth falls, the total noise falls, and neither has a turning point anywhere in the swept range — so there is no optimum to find, only an exchange rate to state. Stated as a power, the total noise goes as the 0.700 power of the bandwidth over the whole sweep. That is steeper than a half, which is what a white source through a widening filter would give, and the reason is the thing that caused the stability trouble in the first place: taking the capacitor out does not merely widen a flat noise gain, it lets a rising one go on rising. The extra bandwidth arrives with more gain applied to the amplifier’s own voltage noise per hertz, not the same gain over more hertz. The gain the loop closes against is where that quantity is isolated on the simplest circuit that has one.

The same curve at every detector

The faint families in that figure are the argument that the normalisation was the right one, and they are drawn rather than asserted so that the comparison happens inside one picture instead of between two slider positions.

Over two decades of detector capacitance — 3 pF to 300 pF, across which the capacitor itself changes by a factor of seven and the bandwidth by seven the other way — the normalised bandwidth curve varies by 3.08 per cent and the normalised noise curve by 4.80 per cent. The detector sets the scale and the multiple sets the shape. Everything a designer decides about this component is one curve in one dimensionless variable, and the detector’s job is only to say what the horizontal axis is worth in picofarads.

The peaking collapses less well and it is worth saying by how much rather than glossing it: at 0.30 times the expression it is 9.28 dB at a 3 pF detector, 9.97 at 30 and 10.33 at 300 — an eleven per cent spread against three and five for the other two. The reason is that peaking is a property of the closed-loop pole pair alone, and the amplifier’s finite output resistance and its own input capacitance sit outside the scaling that the other two obey.

Where flat actually is

The flat point is the one place on that curve with a definition rather than a convention attached, and finding it is harder than it looks, because a maximally flat response is one whose peaking is zero and zero is exactly the value a search cannot land on.

The flat point is √2 times the expression, and a threshold bisection misses it by 2.8%. computed by solving, not by drawing. The peaking of the closed-loop transimpedance vanishes quadratically, so its square root is a straight line in the feedback capacitor and the flat point is that line's root. Fitted over the 9 points whose peaking is between 0.02 and 0.5 dB, r² = 0.999901, the root is at 1.4186 times what the classical expression asks for — against √2 = 1.4142, which is 0.31 per cent away. Bisecting instead on "the smallest capacitor whose peak is under a hundredth of a decibel" returns 1.3782×, 2.8 per cent low, and moves with the threshold rather than with the circuit.
Fig. 3 The peaking vanishes quadratically, so its square root is a straight line in the capacitor and the flat point is that line’s root. Fitted over the nine points whose peaking is between 0.02 and 0.5 dB, r² = 0.999901, the root is at 1.4186 times what the expression asks for. √2 is 1.4142.

The number is √2, and it is √2 at every detector: 1.4177 at three picofarads, 1.4186 at thirty, 1.4175 at three hundred, against 1.4142 — a departure of a quarter to a third of a per cent, on fits whose r² is 0.9999 and better. That is a closed form, and it is a closed form the sweep did not know about.

So the expression’s own answer is 1/21/\sqrt{2} of the flat choice — 0.705 times the capacitor as measured, and that shortfall is what leaves 1.18 dB on the response. The margin at the flat point is 65.8° at a thirty picofarad detector and 65.6° at three hundred, essentially fixed, which is the other way of saying the same thing — flatness is a condition on the pole pair and the pole pair is what a margin reads.

What it costs is bandwidth, and that has to be quoted rather than implied. Going from the forty-five degree choice to the flat one takes the stage from 295 kHz to 216 kHz at a thirty picofarad detector, and the total noise from 142 µV to 110 µV. At three hundred picofarads it is 98.0 kHz to 72.0 kHz and 209 µV to 161 µV. A quarter of the bandwidth for a fifth of the noise and all of the peaking — which is a trade a designer can make, and cannot make from a single number.

What a threshold bisection converges on

The fit is the second method tried and the first one is worth recording, because it gives an answer that is formally correct and about the instrument rather than about the circuit.

The obvious way to find where the response stops peaking is to bisect: take the smallest capacitor whose measured peak is under some small threshold. At a hundredth of a decibel that returns 1.3782 times the expression, which is 2.8 per cent below the fitted root, and moving the threshold by two decades moves the answer by seven per cent. It has converged on the threshold. The quantity being bisected is a distance from a boundary that the search approaches asymptotically, and a bisection on that has no fixed point except the one the tolerance puts there — the same defect as bisecting on a sign, arriving in a different disguise.

The fit does not have that problem because it never evaluates anything near the root. It measures the peaking where the peaking is large enough to be measured well — between 0.02 and 0.5 dB — and reaches the root by extrapolation along a line whose straightness is itself the check. If the quadratic vanishing were wrong the r² would say so, which is the property this collection asks of every boundary it quotes and which a boundary is a model and a tolerance measures across the whole of it.

One capacitor moves three quantities, and the expression's own answer peaks by 1.22 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 111 to 18.3 kHz, the total noise from 344 to 94 µV, and the peaking from 10.3 dB to nothing. The expression's own answer sits at 1.22 dB of peaking, 0.83× 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.
Fig. 4 The same sweep at three hundred picofarads of detector. The expression asks for 2.20 pF and peaks 1.22 dB; forty-five degrees is at 0.834 times that and flat at √2 times it, 3.11 pF and 65.7°. The bandwidth goes 98.0 kHz to 72.0 across that span and the noise 209 µV to 161. The exponent relating the two is 0.718 here against 0.700 at a thirty picofarad detector.

The third quantity is not a design quantity

Now the part of the trade that turns out not to be a trade.

The noise quoted above, and in the rung below, and in every treatment of this circuit, is the output noise integrated over every frequency the stage passes. Nothing reads a photodiode amplifier over every frequency it passes. There is a filter, or an averaging window, or a sample rate, and it is narrower than the stage — usually much narrower, because the reason for a megohm of transimpedance is that the signal is small and slow.

So the same two sources are integrated cumulatively, one pass up the frequency axis for each compensation, and the curve is the noise a measurement of that width would actually see.

Three compensations, one noise curve, until the measurement is 43.6 kHz wide. computed by solving, not by drawing. The output noise of the same stage integrated cumulatively up the frequency axis, for feedback capacitors of 0.30, 1.00 and 4.20 times what the classical expression asks for — a factor of fourteen in the component. A measurement 4.36 kHz wide sees 8.37 to 8.36 µV from all three, a spread of 0.1 per cent. Integrated over the whole plane they are 230 against 65 µV, a factor of 3.52. The three part company at 43.6 kHz, which is 16 per cent of the stage's own 275 kHz bandwidth — so the compensation's effect on noise is almost entirely above the signal band, where a filter removes it and a sampler folds it back.
Fig. 5 Three compensations spanning a factor of fourteen — 0.30, 1.00 and 4.20 times the expression — and one noise curve. In a 4.36 kHz measurement they give 8.37, 8.37 and 8.36 µV. They part company at 43.6 kHz, sixteen per cent of the stage’s own 275 kHz bandwidth, and over the whole plane they are 230 against 65 µV. Drag it through the detector.

A factor of fourteen in the component and a factor of 3.52 in the number everybody quotes buys a spread of one tenth of a per cent in the noise a measurement a tenth as wide as the parting sees. The whole of the difference lives above the signal band. A filter removes it; the compensation did not.

That reverses the usual reasoning about this circuit, which runs that the feedback capacitor trades bandwidth against noise. It trades bandwidth against noise outside the band the signal is in, which is a different statement and a much weaker one. What the capacitor is really deciding is the shape of the response — the peaking, the ringing, and the settling behind them — and the noise column in the trade is an artefact of integrating a quantity to infinity that nobody measures to infinity. The bandwidth noise sees is the same distinction made from the other end, where an equivalent noise bandwidth is measured off a solved network rather than taken as a multiple of a corner.

The parting frequency moves with the detector and moves the right way: 102 kHz at three picofarads, 43.6 at thirty, 13.7 at three hundred. A large detector is a slow stage, and a slow stage puts the compensation’s noise difference lower in frequency. What it does not do is move it relative to the stage: those three are 16, 16 and 15 per cent of their own stages’ bandwidths, so the parting is a fixed fraction rather than a frequency, and a measurement taken at a sensible fraction of the bandwidth is on the wrong side of it at every detector.

What a margin is, in the time domain

The quantity the capacitor genuinely decides is the response shape, and the shape has a reading that is not a plot of magnitude.

One loop, two measurements of the same margin. The loop gain crosses unity at 9.10 kHz with 65.3° of phase left. The closed-loop step overshoots by 4.5%, which the second-order relation says corresponds to 65.3°. They differ by 0.0°, and the difference is the third pole.
Fig. 6 From this field’s own two-route essay, on a different loop: 65.3° of phase margin and 4.5% of overshoot, which the second-order relation says corresponds to 65.3°. The margin at the flat compensation above is 65.8°.

Sixty-five degrees is a step response that overshoots by four and a half per cent and is finished. Forty-seven is twenty-one per cent, and the forty-five degree choice this ladder started from is a little worse than that. The relation used there assumes two poles and two measurements of one margin measures where it stops holding; the point that carries across is that the difference between the two ends of the compensation sweep is visible in a step and invisible in a spectrum, which is the failure mode the rung below already recorded from the other direction — an uncompensated stage measuring a better bandwidth than a compensated one.

The capacitance that is on nobody’s data sheet

Everything above takes the capacitance at the summing junction as given. It is not given, and one of its two parts is not printed.

The detector’s junction capacitance is on the detector’s data sheet, in one number, at a stated reverse bias. The amplifier’s own input capacitance is on the amplifier’s data sheet sometimes, split into a common-mode part and a differential part that a reader has to add, and it is not a quantity anybody chooses, because choosing it means choosing a different amplifier. It sits at the same node and does the same thing.

The capacitance nobody prints costs 9.6 dB at a small diode and nothing at a large one. computed by solving, not by drawing. What the classical compensation expression does when it is fed the diode capacitance a data sheet prints rather than the capacitance at the summing junction, which is that plus the amplifier's own 10 pF. The capacitor it names is exactly √(cd/(cd+cin)) times the right one, so the error is largest where the diode is smallest: 0.302 times at 1 pF and 0.995 at 1000. The response peaks 9.55 dB against the 1.14 it should at 1 pF, and 1.25 against 1.22 at 1000. Three decibels of peaking is anything below 12.8 pF of diode. A large detector forgives the omission entirely; a small one, which is what somebody chose to get bandwidth, does not.
Fig. 7 What the expression does when it is fed the printed detector capacitance instead of the capacitance at the node. The capacitor it names is smaller by exactly √(Cd/(Cd+Cin)), so at 1 pF of detector against 10 pF of amplifier it is 0.302 times the right one and the response peaks 9.55 dB where it should peak 1.14. Three decibels of peaking is anything below 12.8 pF of detector. Drag it through the amplifier’s own capacitance.

The ratio is an identity rather than an approximation, and it is asserted as one — worst departure under a part in 101210^{12} across nineteen detector sizes — because a tolerance loose enough to hide a wrongly assembled node capacitance would hide the entire defect.

What the identity says is that the omission is harmless where the detector is large and ruinous where it is small: at a nanofarad of detector the capacitor is 0.995 times the right one and the peaking 1.25 dB against 1.22. At one picofarad with a ten picofarad amplifier it is 9.55 dB. That is the wrong way round for whoever made the choice, because a small detector is what somebody picks when they want bandwidth, and the arrangement then answers with a response that peaks by ten decibels and rings — while measuring 576 kHz of bandwidth against the 471 the correctly compensated stage gives, which is the flattering number.

The size of the effect is set by the amplifier and not by the designer. At one picofarad of amplifier input capacitance the worst case is 2.94 dB and there is no detector at which the naive choice reaches three; at twenty picofarads it is 12.27 dB and everything below 26.5 pF of detector is past three. A part chosen for its low voltage noise is frequently a part with a large input capacitance, which makes this a trade against the very quantity the rung below found dominant — the amplifier is ninety-five per cent of the noise power at a large detector, and the floor a circuit has is where a part’s two noise generators are measured against the impedance it is asked to look at. The window the resistors own is the same pair solved into a compensated stage against the impedance of its own feedback network, which is what this one is.

The knob that moves all three at once

None of the choices above is the first one a designer makes. The first one is the detector, and it moves everything.

A junction’s capacitance is proportional to its area, and so is the current it makes at a given irradiance. So area is a single control on the signal and on the capacitance together, and it settles the bandwidth before any of the compensation arithmetic is reached.

Area buys signal-to-noise as its 0.76 power and spends bandwidth as its -0.50. computed by solving, not by drawing. A photodiode's junction capacitance and the current it makes are both proportional to its area, so area moves the signal and the capacitance together and settles the bandwidth before any compensation is chosen. Every stage here is compensated at √2 times the classical expression, which is where the response is flat, and the noise is solved one source at a time and integrated. The signal-to-noise ratio rises as the 1.006 power of the area at a small detector and as the 0.762 power at a large one. The two are separated by the 12.1 pF at which the amplifier's own voltage noise passes the feedback resistor's: below it the dominant source does not know the capacitance is there and the ratio is proportional to the area, above it the dominant source is the one the capacitance multiplies. The bandwidth goes as the -0.497 power throughout. Doubling the area is worth 1.70 times the signal-to-noise ratio for 0.71 times the bandwidth.
Fig. 8 Signal-to-noise and bandwidth against detector area, every stage compensated at √2 times the expression so that all of them are flat. The ratio goes as the 1.006 power of the area at a small detector and the 0.762 power at a large one, the two separated by the 12.1 pF at which the amplifier’s voltage noise passes the resistor’s. The bandwidth goes as the −0.497 power throughout.

There is no turning point in it. A larger detector is always a better signal-to-noise ratio and always less bandwidth, at every area drawn — doubling the area is worth 1.70 times the ratio for 0.71 times the bandwidth, so the ratio falls as the 1.53 power of any bandwidth bought this way, that being the ratio of the two fitted exponents. It is a much harsher exchange than the one the compensation offers, and it is made first and usually without being recognised as an exchange at all.

The exponent has a mechanism in it rather than being a fitted number. Below about twelve picofarads the feedback resistor’s own thermal noise is the dominant source, and that source does not know the detector’s capacitance is there, so the noise is fixed and the ratio is exactly proportional to the area. Above it the amplifier’s voltage noise dominates, and that source is multiplied by a noise gain the capacitance sets, so the noise rises with the area and the exponent falls to four fifths. The crossing is located on the solved shares rather than assumed, and it moves: at twenty picofarads of amplifier input capacitance there is no crossing inside the range at all, because the amplifier is already sixty per cent of the noise power at the smallest detector drawn.

What it does not say

It does not say the classical expression should be discarded. It costs nothing to evaluate, it has the right shape at every detector, and multiplying it by √2 turns it into the flat choice exactly — which is a better outcome than replacing it, since the correction is a constant rather than a function.

It does not say the flat choice is the right one. Flatness is a convention, not a requirement; a detector reading a slow signal into a narrow filter has no use for the 216 kHz the flat compensation leaves and might sensibly take the 55.4 kHz at four times it, where the response is over-damped and the settling is monotone. What the sweep provides is the price list, and the price of the extra bandwidth at the other end is the peaking rather than the noise. Nor does it transfer to the arrangement it most resembles: the load that gets inside the loop puts its capacitance at the output, where the cure is a resistor rather than a capacitor and costs accuracy rather than bandwidth.

The noise result has a stated boundary of its own and it is a sharp one. Three compensations are one noise curve only below the parting frequency, and the parting frequency is a property of the stage rather than a universal — 43.6 kHz on the stage drawn. A measurement wider than that sees the difference, and there is one common arrangement that sees all of it: a sampler with no filter in front of it, which folds every hertz above its own rate back into the band. That is the mechanism the frequency a sample rate invents generates and differences rather than asserts, and the filter that samples prices the continuous prefilter it obliges. Against a bare sampler an under-compensated transimpedance stage is 230 µV where a well-compensated one is 65, and the factor of 3.52 that a filter removes comes back in full.

Three things in the model are unchanged from the rung below and still not there: the amplifier’s own current noise, which flows in the feedback resistor; the detector’s shot noise, which is proportional to the photocurrent and therefore signal-dependent; and the feedback resistor’s own parasitic capacitance, which for a megohm is a fraction of a picofarad and is a real and unchosen part of every compensation value on this page — often most of the 0.309 pF a three picofarad detector asks for. That last one deserves the observation that it is the same defect as the amplifier’s input capacitance arriving at the other end of the same component, and neither of them is a parasitic in the sense every model has an edge uses: they are the specification of parts somebody chose, showing up where nobody looked for them.

The number worth carrying

√2, and it is not in the expression.

The classical compensation is 0.705 of the flat one at every detector, which is 1.18 dB of peaking; it is 1.21 times the forty-five degree one; and it is described as both. The correction is a constant, the constant was fitted at 1.4186 against 1.4142 with an r² of 0.9999, and it does not move over two decades of detector capacitance.

The habit that goes with it is about the third column. A component that appears in three quantities is not necessarily trading three quantities, and the way to find out is to integrate the one in doubt over the band the measurement actually has rather than over the band the algebra has. On this circuit that turns a factor of 3.52 into one tenth of a per cent, and it turns a three-way trade into a two-way one with a much clearer answer: the capacitor buys response shape with bandwidth, and the noise was never in the argument.

Part 2 on transimpedance

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

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down.

The objects named here

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

Anti-alias filterClosed formDesign tradeoffModel rangeNoise gainOvercompensationPhase marginPower law fitSignal-to-noise ratioTransimpedance