The gain that is exactly one
Assumes: What is left at crossover · Where the behaviour is written down
Thirteen fields of this collection have measured an element and found the frequency, amplitude or size at which its model stops being true. This one starts on circuits made of several of them at once — an oscillator, a supply, a regulator, a threshold, a bridge — and the question is the same asked of the whole rather than of a part. It is worth saying at the outset that the answer is almost never the worst of the parts. A regulator built from an amplifier that is flat to a megahertz is a voltage source to three kilohertz. A bridge built from four resistors of any accuracy at all is linear only near balance.
This essay is about the first of them, and about a design condition that cannot be met.
What the condition says
The circuit is the standard one: an amplifier with a non-inverting gain of k = 1 + Rf/Rg, and a positive-feedback network from its output back to its non-inverting input made of a resistor and capacitor in series feeding a resistor and capacitor in parallel. That network has a frequency at which its phase shift is zero, and at that frequency it passes exactly one third of what is put into it. Both of those are exact statements about the network, and neither of them depends on the amplifier.
So the loop gain at the zero-phase frequency is k/3, and the condition an oscillator is designed to meet is that this number equals one. That is the Barkhausen condition, and every textbook states it in the form it is stated in here: unity loop gain, zero phase.
The frequency comes out as
which for the 10 kΩ and 10 nF used throughout this field is 1591.5 Hz.
The interesting quantity is not that frequency. It is the gain.
Where the poles are, and where they cross
The site’s usual route is available here without any new machinery. transferFunction recovers the
characteristic polynomial by sampling the determinant on a circle and rooting it, so the closed-loop
poles come out of the netlist rather than out of an algebraic rearrangement. Sweeping k and asking
for them at each value gives the locus in the figure above.
Two poles, a conjugate pair, moving to the right as the gain rises. They reach the imaginary axis at a gain the bisection returns as 3.000000000000, which is not a coincidence and not an approximation. The characteristic equation of the ideal circuit is
so the real part of the pole is exactly and the imaginary part is . Both closed forms are returned beside the measured pair in the figure — drawn as crosses on the measured circles — and neither is used to produce it. They agree to better than a part in at every gain on the slider.
At k = 3 itself the measured real part is radians a second against an of , which is seventeen decimal places of zero. The arithmetic has no complaint about the condition. The circuit is another matter.
Why an equality is not a specification
A pole on the imaginary axis is a solution that neither grows nor decays. It is the only condition under which a linear circuit sustains an oscillation of constant amplitude, and it holds on a set of gains containing exactly one point.
Every other boundary this collection has drawn has a safe side. An amplifier is one per cent low above 1.4 kHz, so stay below it. A small-signal model is one per cent optimistic above 7.3 mV, so drive it less. Even the volt-second boundary in the magnetics field, which cannot be respected by staying below anything, at least names a mechanism to remove.
This one has two unsafe sides and no interior. Either the poles are in the left half plane, in which case whatever starts the circuit dies away and the output is nothing at all, or they are in the right half plane, in which case the amplitude grows without bound until some part of the circuit stops behaving as it was modelled. There is no third case, and the width of the third case is zero.
How fast either failure arrives
The rate is worth having in numbers, because “unstable” and “damped” are qualitative words for something quantitative. The envelope is multiplied each cycle by
and with and that is very nearly .
| gain | per cycle | to a factor of 10⁴ |
|---|---|---|
| 3% high | ×1.0987 | 98 cycles, 61 ms |
| 0.3% high | ×1.0095 | 977 cycles, 614 ms |
| 3% low | ÷1.0987 | 98 cycles, 61 ms |
The gate holds two things about that table. The first is the arithmetic: a gain one per cent either side of three gives a factor of about nine per cent of envelope per cycle. The second is that the two directions are reciprocal to within a per cent — the growth at 3.03 times the decay at 2.97 is 1.0000 — so neither side of the condition is the forgiving one. A designer who aims slightly low gets silence and a designer who aims slightly high gets the rails, and both get there in about sixty milliseconds.
Sixty milliseconds is the number that makes this a real problem rather than a philosophical one. It is not a slow drift that a trimmer could chase; it is over before anybody has seen it.
What a real resistor delivers
The gain is set by two resistors, and it is worth asking what an ordinary pair of them can deliver.
A one per cent resistor pair sets k = 1 + Rf/Rg to about ±1.4% in the worst case, which puts the loop gain between 0.986 and 1.014 and the envelope between ÷1.045 and ×1.045 per cycle. A tenth of a per cent pair, which is a specialist part, still gives ±0.14% and ×1.0044 per cycle — a factor of ten thousand in about two thousand cycles, or 1.4 seconds.
There is no resistor tolerance on any manufacturer’s list that makes this circuit work. Nor would a tighter one help, because the amplifier’s own gain, the resistors’ temperature coefficients and their ageing all move the same number. A one part per million per kelvin difference between the two resistors, over ten kelvin, is a hundredth of a per cent of gain, and a hundredth of a per cent of gain is a factor of a thousand in three thousand cycles.
Two of those three sentences are usually where a designer would look for relief, and the collection has measured both. The tolerance that is not on any part separates the worst case from the spread: four one per cent resistors have a worst case of one per cent that does not improve however many parts are added, and a measured population spread of 0.29 of a per cent that shrinks as one over the root of the count. Neither number helps here, and the reason is worth stating because it is the one place this essay’s boundary differs in kind from a tolerance problem. A spread is useful when the specification is a band, since most units land inside it. The specification here is a point, and no unit lands on a point — so the fraction of units that oscillate at constant amplitude is zero for every tolerance in the catalogue, not merely small for the loose ones.
The temperature term is the other half, and the edges that move with the room is the collection’s account of what it does to a boundary generally: every number in this collection is quoted at one temperature, most of them are functions of it, and the condition attached to them is usually left off. A gain condition is unusual in that the temperature enters through a difference of two coefficients rather than through a coefficient, so a pair of resistors from one batch on one substrate is far better than the individual specification suggests — which is the same argument what matching does about temperature makes about a transistor pair, where the residual after matching is exact and drifts at 3 333 parts per million per kelvin because it is proportional to absolute temperature. Matching turns the problem from a tolerance into a smaller tolerance. It does not turn a point into a band.
The instruments field has a figure about a component tolerance too tight to buy, and it is worth looking at beside this one because it is the easy version of the same problem.
The condition is a statement about a loop
It is worth connecting this to the machinery the feedback field already built, because the two are the same thing looked at from opposite ends.
That field’s subject is a loop designed to be stable, and its measure is how far from instability it is: the phase margin, the gain margin, the distance of the Nyquist locus from the critical point. An oscillator is the same loop with those margins set to zero deliberately.
The middle of the family is the case the condition is written about, and it is worth pausing on because it is the only one of the four that no built circuit occupies.
The feedback field also carries the case that shows the condition is not a matter of “enough gain” or “too much”.
What actually happens
Nothing in the above says an oscillator cannot be built. Oscillators are among the most common circuits there are, and they work.
What they are not is linear. The circuit that runs is one whose gain is deliberately set above three, so that the poles are in the right half plane and any disturbance grows, together with a mechanism that reduces the gain as the amplitude rises. The amplitude settles where the gain averaged over a cycle has been pulled back to exactly three — not by a resistor holding a ratio, but by a nonlinear element whose effective gain depends on how hard it is driven.
That is the next essay, and it needs machinery this collection did not have: a netlist with a nonlinearity in it, stepped forward in time. The two halves existed separately — a linear network marched by the trapezoidal rule, and a nonlinear network solved by Newton’s method at one instant — and an oscillator is the first circuit here that needs both at once, because its frequency comes from the linear half and its amplitude from the nonlinear half.
The oscillator that has no such condition
This field builds a second oscillator out of entirely different parts, and the comparison is the clearest way to see what the condition above actually costs.
The period a delay lengthens feeds a comparator’s output back through a resistor to the capacitor on its own input. Its frequency is a charging exponential — , exact — and its amplitude is the comparator’s output levels, exactly, with no dynamics at all. The condition for it to oscillate is that the loop gain exceed one, and a comparator’s gain exceeds one by three or four orders of magnitude, so the condition is met by anything. Everything difficult about the Wien bridge is trivial there, and what is difficult there is the period: a comparator that responds fifty nanoseconds late does not add fifty nanoseconds to each half cycle but times the delay to the period, 2.65 times rather than 2.
That is the trade this whole essay is about, stated in another circuit. An equality can be met only by a mechanism that holds it; an inequality can be met by margin. The Wien bridge buys a nearly sinusoidal output and pays for it with a condition of measure zero and a nonlinearity to enforce it; the relaxation oscillator buys robustness and pays for it with a waveform that is a triangle and a square and a period set by whatever the comparator’s delay happens to be.
And the threshold that makes the second one work is itself measured rather than assumed. Two thresholds because there is a floor finds that a comparator with one threshold watching a slow signal cross it changes its mind 22.7 times on average, because there is noise under the signal and no threshold is ever crossed once, and that the hysteresis needed to stop it is a multiple of the noise’s own standard deviation — 3.57 of them — and not a voltage. So the second oscillator’s easy condition is bought with a second design quantity that the first one does not have.
Three things this essay does not settle
Which nonlinearity. The choice of amplitude-limiting mechanism is a design decision with consequences all through the rest of the ladder. The amplitude nothing linear predicts settles where two diodes across the feedback resistor stop the growth — 858 millivolts, a number no pole, no transfer function and no bias point contains — and what the limiter charges for prices it, with the amplitude going as the 0.11 power of the excess gain and the distortion as the 0.74, so the same slider that buys purity costs start-up time at a measured exchange rate.
Whether the frequency is 1/2πRC. It is not, and by more than the arithmetic in this essay would suggest. The frequency that is not the formula finds two separate reasons and only one of them can be bought off: with a perfect amplifier the circuit runs 0.771 per cent low because the limiter’s harmonics are part of the waveform whose period is being measured, and with a real one it runs lower still by an amount inversely proportional to the gain–bandwidth product. The two are equal at a ratio of 578, above which a faster amplifier buys nothing.
What starts it. This essay’s figure marches from a millivolt on one capacitor because something has to be there. In a real circuit that something is the Johnson noise of the resistors, and the floor a resistor sets is where the size of it is established: a kilohm at room temperature produces 4.00 nanovolts per root hertz, because it is warm rather than because of anything about how it was made, and it is the first boundary in this collection that bounds a model from below — gain does not help, because gain amplifies it too. A 10 kΩ resistor in a kilohertz of bandwidth is about 400 nanovolts, and an envelope multiplying by 1.0987 a cycle takes 148 cycles to bring that to a volt — 93 milliseconds. An oscillator’s start-up transient is a noise voltage amplified for a tenth of a second, which is a pleasing thing for a collection with a noise field to be able to say.
The same floor bounds the circuit at the other end of its life, and a floor and a ceiling is the essay that measures both at once: 4.00 nanovolts per root hertz at the bottom, one per cent of harmonic distortion at 1.03 millivolts at the top, and 66.3 decibels of range between them in a ten-kilohertz measurement. An oscillator is the one circuit in this collection that starts at the bottom of that range and is designed to end at the top of it, and the whole of this ladder is about what happens in between.
Why the condition is stated anyway
Given all of the above, it is fair to ask why the Barkhausen condition is taught as a design rule when no circuit can be built to satisfy it.
The answer is that it is not a design rule; it is a boundary, and it is the most useful one in this essay. It says exactly where the transition is, which side of it produces growth, and — through the closed form for the pole’s real part — how fast. A design that wants an oscillation puts the gain a controlled distance on the growing side and adds something to bring it back; a design that wants an amplifier puts it a controlled distance on the other side. The condition is what “distance” is measured from.
Read that way it is the same kind of object as everything else here. edge-map puts four of this
site’s boundaries on one axis; this one belongs on a different axis, since its variable is a
dimensionless gain rather than a frequency, and it is sharper than any of them.
The measurement, stated plainly
The gate holds four claims about this circuit, and between them they are the essay.
The crossing is at three. Bisected on the real part of the dominant pole, computed from the netlist’s own determinant: 3.000000000000.
The measured pole is the closed form, at every gain. Both the real and imaginary parts, over seven gains from 2.8 to 3.3, agreeing to better than a part in .
At exactly three the real part is zero to the arithmetic’s floor. radians a second on an of .
A one per cent error in the gain is nine per cent of envelope a cycle, in either direction, and the two directions are reciprocal to a per cent.
The last one is the essay’s argument in a line. The first three establish that the condition is exact; the fourth establishes that exactness is precisely the problem.
Part 1 on oscillator
One argument about Oscillator, and one of 5 essays on it so far, each part numbered by how much of the idea it assumes. What sits either side of it:
What links here
Essays that reach for this one mid-argument — the half of a link its own author cannot write down, the 8 sharing most with it of 14.
What this makes readable
Essays that name this one as a prerequisite.
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 toleranceLoop gainPolesStabilityWien bridge
- The best damping is not the one to build component tolerance, poles
- The derivative of a root component tolerance, poles
- The four resistors that decide, and the two that do not component tolerance, loop gain
- The gain the loop closes against loop gain, stability
- The gap a derivative needs component tolerance, poles
- The loop that never crosses loop gain, stability