Circuits that do a job, and the range they do it over

The gain an amplifier asks for, squared

A Wien oscillator built round a real amplifier needs more than a gain of three, and the excess is easy to overrate: the amplifier's lag moves the frequency in proportion to the lag and the required gain only in proportion to its square. At a gain–bandwidth product a hundred times the oscillation frequency the frequency is 4.22 per cent low and the gain needed is 3.00257 — fifty-one times smaller in proportion. The square is also what makes the bias spread: an amplifier 30 per cent slow asks for 1.94 times the typical excess. Against 1 per cent parts the amplifier matches the network's share at a ratio of 16; against a network matched to 0.05 per cent, not until 86.

Assumes: The gain that is exactly one · The ideal amplifier, and where it stops being one

The gain a tolerance demands found that a Wien oscillator from 1 per cent parts must have its gain set to 3.072 for 999 units in a thousand to start, and it closed on a term it had not counted. The amplifier has a finite gain–bandwidth product, which adds phase to the loop, which moves the gain the loop needs — by an amount that is the same in every unit, which makes it a bias rather than a spread. With a modest amplifier, it guessed, the term could be as large as a 1 per cent tolerance’s.

The guess is right in its conclusion and wrong in its scale, and the reason it is wrong is worth having. The amplifier’s lag reaches the oscillator by two routes. One is the frequency, and the frequency that is not the formula measured it: a few per cent low at a gain–bandwidth product a hundred times the oscillation frequency, enough to matter in any oscillator meant to be on frequency. The other is the gain the resistors must be set to, and that route goes through the network’s curvature rather than its slope. It is the square of the same small number, and a square of a small number is much smaller.

This essay measures the second route on the netlist, states it in closed form, and puts it beside the tolerance that set the margin to see which one the margin is really paying for.

The gain a Wien oscillator needs above three, against its amplifier's gain–bandwidth product. computed by solving, not by drawing: the closed-loop gain at which the oscillating pair reaches the axis, bisected on the netlist with a one-pole amplifier of 100 dB direct-current gain, for equal 10 kΩ and 10 nF parts. At 10 times the frequency, 3.15339; at 30 times the frequency, 3.02349; at 100 times the frequency, 3.00257; at 1000 times the frequency, 3.00012. Every point agrees with 3(1 + δ) + 3ε²/(1 + δ + 3ε), where ε = kf₀/GBW and δ = k/a0, to two parts in ten million. The bandwidth's share falls as the square of the ratio; below it sits a floor of 9.00e-5 from the finite direct-current gain, and the two are equal near a ratio of √(3a0) = 548.
Fig. 1 The gain a Wien oscillator needs above three, against its amplifier’s gain–bandwidth product in multiples of the oscillation frequency, bisected on the netlist with a one-pole amplifier of 100 dB direct-current gain. At ten times the frequency it is 3.15339, at thirty 3.02349, at a hundred 3.00257 and at a thousand 3.00012. The bandwidth’s share falls as the square of the ratio until it meets a floor of nine parts in a hundred thousand set by the finite direct-current gain, near a ratio of 548.

The oscillator, with an amplifier in it

The circuit is the one the earlier measurements used: a series arm of ten kilohms and ten nanofarads, a shunt arm of the same, oscillating at 1.59 kilohertz, with a non-inverting stage setting the gain through two resistors. The difference is the amplifier. In the gain that is exactly one it was a nullor, an ideal operational amplifier with infinite gain at every frequency, and the required gain came out 3.000000000000. Here it is a single pole: a transconductance into a resistor and a capacitor, followed by a unity buffer, with a direct-current gain of a hundred thousand and a gain–bandwidth product set to a stated multiple of the oscillation frequency. That is the amplifier the ideal amplifier, and where it stops being one measured against its ideal, placed in the oscillator the amplitude nothing linear predicts first marched, and it is the model most general-purpose operational amplifiers follow over the band that matters here.

The required gain is found the way every essay in this group finds it: the resistor ratio is bisected on the netlist until the oscillating pair of poles sits on the imaginary axis. What comes back is the setting of the two gain resistors — 1+Rf/Rg1 + R_f/R_g — that makes the circuit oscillate at constant amplitude, not the gain the stage actually achieves at the oscillation frequency, which is less. That distinction is the whole of the effect. A designer chooses resistors; the amplifier then delivers a little less than the resistors ask for, and the resistors must ask for a little more to make up the difference.

Two routes to one number

The bisection is one route. The other is a closed form, and the two share nothing but the circuit.

Break the loop at the amplifier’s input and write each half. The non-inverting stage with a one-pole amplifier, whose inverse open-loop gain is 1/a0+s/ωt1/a_0 + s/\omega_t, is k/(1+δ+jεx)k/(1 + \delta + j\varepsilon x), where xx is the frequency in units of the network’s own, δ=k/a0\delta = k/a_0 and ε=kω0/ωt\varepsilon = k\omega_0/\omega_t. The network is jx/(1−x2+3jx)jx/(1 - x^2 + 3jx). Their product is one where its real and imaginary parts separately balance, and the two balances give

x2=1+δ1+δ+3ε,k=3(1+δ)+3ε21+δ+3ε.x^2 = \frac{1+\delta}{1+\delta+3\varepsilon}, \qquad k = 3(1+\delta) + \frac{3\varepsilon^2}{1+\delta+3\varepsilon}.

Both ε\varepsilon and δ\delta contain kk, so the pair is iterated to a fixed point, which it reaches in a handful of steps. At every ratio in the figure, from ten to ten thousand, the closed form and the netlist’s bisection agree to two parts in ten million. That agreement is what entitles the figure’s curve to be read as a law rather than as a fit to fourteen points.

The law has two terms and they do different things. The first, 3δ=3k/a03\delta = 3k/a_0, is the direct-current gain’s share: a constant nine parts in a hundred thousand for an amplifier of a hundred decibels, present at any speed. The second is the bandwidth’s, and at small ε\varepsilon it is 3ε23\varepsilon^2 — the square of the amplifier’s lag at the oscillation frequency, times three. At a ratio of a thousand it is three parts in a hundred thousand and the floor is larger; at a hundred it is 0.00248 and the floor is negligible. They are equal near 3a0\sqrt{3a_0}, a ratio of 548, and the figure’s elbow sits there.

The frequency moves first

The square is the result, and it is worth seeing beside the first power the same lag produces elsewhere.

What a finite gain–bandwidth product does to a Wien oscillator: the frequency's departure and the gain's. computed by solving, not by drawing, with the direct-current gain made effectively infinite so that only the bandwidth acts. The frequency falls by 4.22% at a ratio of 100 and 0.447% at 1000 — slope -0.997 on these axes. The gain needed rises by 0.0827% of three at 100 and 0.00089% at 1000 — slope -1.996. The amplifier's lag is absorbed by the network's phase slope, which moves the frequency in proportion; the gain changes only through the network's curvature away from its peak, which is second order. At a ratio of 100 the frequency is 51 times further from ideal, in proportion, than the gain.
Fig. 2 The two departures from the ideal amplifier’s oscillator, with the direct-current gain made effectively infinite so that only the bandwidth acts. The frequency falls by 4.22 per cent at a ratio of 100 and 0.447 per cent at 1000, a slope of minus one on these axes; the gain needed rises by 0.0827 per cent of three at 100 and 0.00089 per cent at 1000, a slope of minus two. At a ratio of 100 the frequency is fifty-one times further from ideal, in proportion, than the gain.

The reason is in the network’s phase. At its own frequency the Wien network has zero phase and a steep phase slope, and a small lag from the amplifier is absorbed by moving down that slope until the network supplies a matching lead. The move needed is proportional to the lag, so the frequency departs in proportion to ε\varepsilon: the oscillation settles at x=1/1+3εx = 1/\sqrt{1+3\varepsilon}, which is 1−1.5ε1 - 1.5\varepsilon to first order, and at a ratio of a hundred that is the 4.22 per cent the figure reads.

The network’s gain at that new frequency is not much less than its peak, because the peak is flat. A smooth maximum changes by the square of the distance from it, so moving a few per cent off the peak costs a few parts in ten thousand of the network’s transfer, and the amplifier must make that up. That is all the bandwidth term is — the curvature of the network’s magnitude at its peak, read at the displacement the phase forced. Every resonant network has the same shape, which is why the Q the amplifier decides found a filter section’s Q moving with a slow amplifier while its pole frequency barely did: there the lag enters the quantity that sits at the slope, and here it enters the quantity that sits at the flat top.

So the earlier guess has the scale inverted. The amplifier’s lag is a large effect on the frequency and a small one on the gain. A designer who budgets the start-up margin by analogy with the frequency shift — a few per cent of lag, a few per cent of gain — will overrate it by fifty times at a ratio of a hundred.

A bias that is not one number

The term is the same in every unit only if every amplifier is the same, and amplifiers are not. A data sheet quotes a gain–bandwidth product as a typical value and, where it quotes a minimum, a minimum of around seventy per cent of typical is common. A square turns that into something worse.

The gain a Wien oscillator needs above three, for amplifiers whose bandwidth is 30% either side of typical. computed by solving, not by drawing: the crossing gain bisected for the typical amplifier and for one 30% slower and one 30% faster. At a typical ratio of 30 the excess is 0.0235, 0.0440 for the slow part and 0.0146 for the fast; at 100, 0.00257, 0.00499 and 0.00159. Because the bandwidth's share goes as the inverse square of the speed, a part 30% slow asks for 1.94 times the typical excess at 100 — the spread of a squared quantity is twice the spread of the quantity. A nominal gain can absorb the typical excess; it must be set for the slow one.
Fig. 3 The gain needed above three for amplifiers whose bandwidth is 30 per cent either side of typical. At a typical ratio of 30 the excess is 0.0235, rising to 0.0440 for the slow part and falling to 0.0146 for the fast; at 100 it is 0.00257, 0.00499 and 0.00159. A part 30 per cent slow asks for 1.94 times the typical excess.

The spread of a squared quantity is twice the spread of the quantity, so a bandwidth that varies by 30 per cent gives a bias that varies by about 60 — a factor of 1.94 between the slow part and the typical one at a ratio of a hundred, a little under the 1/0.72=2.041/0.7^2 = 2.04 the pure square predicts because ε\varepsilon also sits in the denominator. The figure’s band is that range. At a ratio of thirty it runs from 0.0146 to 0.0440, which is a factor of three from end to end.

That changes what “absorbing the bias” means. Two exponentials, and where they meet found that the amplitude an oscillator settles at depends on how far above its requirement its gain is set, and the earlier tolerance essay found the distortion following the margin; a bias that every unit shared could be absorbed into the nominal setting at no cost in either, since every unit would then run at the same excess as before. A bias that varies by a factor of three cannot be. The nominal has to be set for the slow amplifier, and every typical amplifier then runs with the difference as extra margin, which the limiter turns into extra amplitude and extra distortion. At a ratio of thirty that difference is 0.0205 — a margin by itself larger than half of what 1 per cent parts demand.

Against the tolerance it was supposed to rival

The comparison the earlier essay asked for can now be made, and it should be made on the same four thousand seeded units, because the two terms do not simply add when one of them depends on the network’s own values. Each unit’s requirement is computed in closed form for its own four parts and its own amplifier — the closed form extended to unequal parts, which with T2=RsRpCsCpT^2 = R_sR_pC_sC_p, b=RsCs+RpCp+RpCsb = R_sC_s + R_pC_p + R_pC_s and a=RpCsa = R_pC_s gives ω2=(1+δ)/((1+δ)T2+bk/ωt)\omega^2 = (1+\delta)/((1+\delta)T^2 + bk/\omega_t) and k=b(1+δ)/(a−(1−ω2T2)/ωt)k = b(1+\delta)/(a - (1-\omega^2T^2)/\omega_t). It is held against the netlist’s bisection on a sample of units at two speeds and agrees to two parts in ten million, so the four thousand can be solved without four thousand bisections.

Wien oscillators from 1% parts: the nominal gain for 99.9% to start, against the amplifier's speed. computed by solving, not by drawing: 4000 seeded units, every part uniform within ±1%; each unit's requirement with a one-pole amplifier in closed form (held against the netlist's bisection on a sample to two parts in ten million). With an ideal amplifier the nominal is 3.0720. At a typical ratio of 14: 3.1632 with every amplifier typical, 3.2090 with bandwidths spread ±30%; at 30: 3.0964 with every amplifier typical, 3.1045 with bandwidths spread ±30%; at 100: 3.0747 with every amplifier typical, 3.0748 with bandwidths spread ±30%. The amplifier adds as much as the network's own share at a ratio of 16 with typical amplifiers and 20 with spread ones.
Fig. 4 Four thousand Wien oscillators from 1 per cent parts: the nominal gain for 999 in a thousand to start, against the amplifier’s typical gain–bandwidth product. With an ideal amplifier it is 3.0720. At a ratio of 14 it is 3.1632 with every amplifier typical and 3.2090 with bandwidths spread 30 per cent either way; at 30, 3.0964 and 3.1045; at 100, 3.0747 and 3.0748. The amplifier adds as much as the network’s own share at a ratio of 16 with typical amplifiers and 20 with spread ones.

Against 1 per cent parts the amplifier is the larger term only at ratios below sixteen, or twenty when the amplifiers spread. At a ratio of thirty it adds 0.024 to the margin with typical amplifiers and 0.033 with spread ones, against the network’s 0.072; at a hundred it adds 0.003 and the spread adds nothing visible, because the network’s tail has already set the 99.9th percentile and the amplifier only shifts every unit by an amount too small to reorder them. Above a ratio of a hundred the nominal gain an oscillator from 1 per cent parts needs is the nominal the earlier essay found, to the third decimal.

That is a useful design number in its own right. A general-purpose amplifier of a megahertz is a ratio of six hundred at a 1.59 kilohertz oscillator and a ratio of a hundred at ten kilohertz, so for audio oscillators of ordinary parts the amplifier has been irrelevant to the start-up margin all along, and the tolerance is the whole of it. The amplifier only begins to compete for the margin when the oscillator is pushed to within a factor of twenty of the amplifier’s bandwidth, where the frequency that is not the formula found its frequency already ten per cent or more off the formula — a regime where the frequency, not the margin, is the first thing to fix.

Where the amplifier is the margin

The conclusion inverts as soon as the network is good. The tolerance essay’s last figure built networks whose resistors and capacitors came from single arrays, 1 per cent absolute but matched to 0.05 per cent, and found they needed only 3.0035 — because the gain depends on the ratios of the parts, and parts from one array keep their ratios. A margin that small has no room for an amplifier.

Wien oscillators from parts tracking to 0.05%: the nominal gain for 99.9% to start, against the amplifier's speed. computed by solving, not by drawing: 4000 seeded units, each pair of resistors and of capacitors from one array, 1% absolute and 0.05% mismatched; each unit's requirement with a one-pole amplifier in closed form (held against the netlist's bisection on a sample to two parts in ten million). With an ideal amplifier the nominal is 3.0035. At a typical ratio of 30: 3.0273 with every amplifier typical, 3.0460 with bandwidths spread ±30%; at 100: 3.0061 with every amplifier typical, 3.0075 with bandwidths spread ±30%; at 1000: 3.0036 with every amplifier typical, 3.0036 with bandwidths spread ±30%. The amplifier adds as much as the network's own share at a ratio of 86 with typical amplifiers and 107 with spread ones.
Fig. 5 The same four thousand units with each pair of resistors and of capacitors from one array, 1 per cent absolute and 0.05 per cent mismatched. With an ideal amplifier the nominal is 3.0035. At a ratio of 30 it is 3.0273 with typical amplifiers and 3.0460 with spread ones; at 100, 3.0061 and 3.0075; at 1000, 3.0036 for both. The amplifier adds as much as the network’s own share at a ratio of 86 with typical amplifiers and 107 with spread ones.

For a matched network the amplifier is the larger term out to a ratio of 86, or 107 when the amplifiers spread. At a hundred it adds three quarters to the margin with typical amplifiers, 0.0061 against 0.0035, and the spread of real amplifiers more than doubles it. At thirty it adds nearly seven times the network’s share with typical parts and twelve times with spread ones. The careful matching that took the margin from 0.072 down to 0.0035 is spent on the amplifier unless the amplifier is fast, and “fast” here means a hundred times the oscillation frequency rather than the sixteen that sufficed for loose parts.

The scale has moved because the network’s term shrank twenty-fold and the amplifier’s did not move at all. The amplifier’s share is fixed by the ratio of two frequencies; the network’s is fixed by how well its parts match. Improving one without the other moves the crossover by the square root of the improvement, since the amplifier’s term goes as the inverse square of the ratio. Matching that cuts the network’s share twenty-and-a-half times should move the crossover by about four and a half; the figures read 16 and 86, a factor of 5.4 — the square law, to within what a crossover read off the 999th unit in a thousand can resolve, with the denominator’s 3ε3\varepsilon pulling the low-ratio end away from a pure square.

What a designer can do with it

The practical reading has three parts. First, an oscillator’s start-up margin should be budgeted from the larger of two terms that scale differently: the network’s, which is about seven times the tolerance of its parts, and the amplifier’s, which is three times the square of three times the oscillation frequency over the gain–bandwidth product. Neither is a percentage of the other, and the crossover between them is where the design effort should go.

Second, the amplifier’s share is the one term in the requirement that is a property of a part number rather than of a population, so it is the one that can be trimmed. A unit-to-unit spread of the gain–bandwidth product can be bounded by a minimum on the data sheet, and the nominal set for that minimum; a temperature that slows the amplifier can be budgeted the same way. The loop then needs margin only for what cannot be measured, which is the network’s own tolerance.

Third, the amplifier’s lag is not free even when the margin can absorb it, because it is still moving the frequency in proportion. The amplifier that buys back the margin buys back fifty times as much frequency error in proportion, so the speed a frequency specification demands is almost always the binding one. An oscillator fast enough to be on frequency is fast enough that its amplifier costs the start-up margin nothing.

The closed form, read for its limits

The closed form is exact for the amplifier in the netlist, which is one pole and nothing else, and that is where its authority ends. A real operational amplifier has a second pole somewhere above its unity-gain frequency, and at a ratio of ten the oscillation sits only a decade below the first — close enough for a second pole a decade or two above that to add lag of its own. What is left at crossover is the standing reminder that a loop’s behaviour near the unity-gain frequency is decided by everything the one-pole model leaves out. The figures below a ratio of about thirty should be read as the one-pole amplifier’s answer, not any particular part’s.

The amplifier also has an output resistance, which forms a divider with the network’s input impedance, and a finite input impedance, which loads the shunt arm. With ten-kilohm parts both are small against the impedances the network presents, and neither changes the scaling, since each is a fixed fractional loss in the loop and so a fixed contribution to the required gain, like the direct-current gain’s floor. A low-impedance network built for low noise would bring them up, and they would join 3k/a03k/a_0 as constants under the bandwidth’s square.

And the whole of this is linear. The required gain is the gain at which the small-signal poles reach the axis, which is the start-up condition. Once the oscillator is running, the amplitude settles where the limiter has brought the average gain down to the requirement, and the requirement it settles to is the one computed here. The limiter’s own harmonics then move the frequency further, which the earlier essay measured as the floor a faster amplifier cannot remove.

The number to keep

A one-pole amplifier asks a Wien oscillator for 3(1+δ)+3ε2/(1+δ+3ε)3(1+\delta) + 3\varepsilon^2/(1+\delta+3\varepsilon), with ε=kf0/GBW\varepsilon = kf_0/\mathrm{GBW} and δ=k/a0\delta = k/a_0, which the netlist confirms to two parts in ten million. The bandwidth’s share is a square: 3.00257 at a ratio of a hundred against a frequency already 4.22 per cent low, fifty-one times smaller in proportion. Its spread is twice the bandwidth’s, so a part 30 per cent slow asks for 1.94 times as much. Against 1 per cent parts it stops mattering above a ratio of about twenty; against parts matched to 0.05 per cent it is the larger term until about two hundred.

Still open: the amplitude loop, the temperature, and the second pole

An amplitude loop instead of a fixed margin. A lamp, a thermistor or a field-effect transistor in the gain-setting network adjusts the gain to whatever each unit needs, so the margin — the network’s and now the amplifier’s — is used only at start-up. What that costs is a slow control loop with dynamics of its own, and whether its settling or its own oscillation in amplitude is the larger price is the question for an oscillator whose margin would otherwise be spent on its amplifier.

The margin across temperature. The gain–bandwidth product of a bipolar amplifier falls as it warms, and the network’s parts drift with coefficients of their own. Since the amplifier’s share goes as the inverse square of its speed, a bandwidth that falls a fifth over the range raises the share by more than half, and whether that or the network’s differential drift decides the cold-start or hot-start margin depends on which side of the crossover the design sits.

A second pole. At ratios below thirty the oscillation sits within a decade or so of the amplifier’s crossover, and a real amplifier’s second pole adds lag there. With two poles the phase the network must supply rises faster than the square law allows, and where a typical amplifier’s second pole makes the requirement depart from the one-pole curve would say how far down in ratio the closed form can be trusted.

Part 7 on oscillator

One argument about Oscillator, and one of 8 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.

Barkhausen criterionComponent toleranceDesign tradeoffGain–bandwidth productLoop gainModel rangeMonte carloWien bridge