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

The walk the core sees

Threshold noise in a relaxation oscillator walks its timing at 3.77 nanoseconds per root period at β = 0.5, because the draw two half cycles share adds. A transformer driven by the same square wave sees the difference of the halves instead, where the shared draw subtracts, and that walks at 1.89 — exactly β times the timing, 18.3 ns against 35.9 after a hundred periods over six hundred seeded runs. The per-period duty error does not vanish with the hysteresis and the walk does, consecutive duty errors are anticorrelated where consecutive periods are not, a comparator skew outruns the walk after 2(σB/d)² periods, and at a fixed frequency the core wants less hysteresis than the clock does.

Assumes: Two thresholds because there is a floor · The gain that is exactly one

The decision taken where the ramp is slowest put noise on the thresholds of a relaxation oscillator and measured what it does to the period. Each decision is a fresh draw, and each draw does two things: it moves the crossing it was armed for, with a sensitivity B=RC/V(1β)B = RC/V(1-\beta) set by the slow slope the ramp has at its threshold, and it moves the level the next half cycle starts from, with a sensitivity A=RC/V(1+β)A = RC/V(1+\beta) set by the fast slope the ramp has as it leaves. A period is two half cycles and three draws, and the one in the middle — shared between the halves — enters with A+BA + B, the largest coefficient of the three. So the period’s spread is twenty per cent above the two-crossing estimate at β = 0.5, consecutive periods are positively correlated, and the jitter accumulates at 3.771 units per root period.

It is the fourth look at one circuit. Two thresholds because there is a floor added the hysteresis to stop a comparator chattering, and the period a delay lengthens closed the loop into an oscillator. The noise essay was about a clock. An oscillator of this kind is as often a drive: its square wave switches a transformer, and the delay that is two delays showed what a transformer asks of it. The core does not care when an edge arrives. It integrates the voltage, so it cares about the difference between the time spent high and the time spent low, because that difference, multiplied by the rail voltage, is the volt-seconds left behind each cycle. That essay found ten nanoseconds of comparator skew saturating a hundred-turn core in 231 cycles.

The same draws are in the difference. They enter it with different signs, and that changes nearly every conclusion about the noise.

The period's spread is 1.20 times what counting two crossings gives. computed by solving, not by drawing. 19999 periods of a relaxation oscillator with 5 mV rms of noise on its thresholds, computed from the exact flip instants rather than marched, at β = 0.5. The measured standard deviation is 3.4 ns and the closed form — three partial derivatives of the period with respect to the three draws it depends on — gives 3.4 ns. The estimate that counts two threshold crossings and divides the noise by the slope at each gives 2.83 ns, which is 17 per cent low. The curve is the closed form's Gaussian, drawn on the measured histogram rather than fitted to it.
Fig. 1 The period’s spread at β = 0.5, from the essay on threshold noise: 3.40 ns measured over twenty thousand periods of the event map, against 3.40 from three partial derivatives and 2.83 from counting two crossings. The difference of the halves, measured below, uses the same draws.

Adding and subtracting the same draw

Write a period’s high half and low half in terms of the three draws that decide them. The first draw set the level the high half started from; the second ended the high half and started the low one; the third ended the low half. With every draw a threshold noise of standard deviation σ, a draw that moves the upper threshold up lengthens the high half that is climbing towards it, by BB per volt, and also lengthens the low half that starts from it, by AA per volt, because the ramp has further to fall.

So the shared draw enters the high half with BB and the low half with AA, both positive. The period is their sum, where the shared draw enters with A+BA + B. The imbalance — high less low — is their difference, where it enters with BAB - A.

Everything else follows from that one subtraction. The per-period spreads are

σT=σA2+(A+B)2+B2,σD=σA2+(BA)2+B2,\sigma_T = \sigma\sqrt{A^2 + (A+B)^2 + B^2}, \qquad \sigma_D = \sigma\sqrt{A^2 + (B-A)^2 + B^2},

and at β = 0.5, with AA and BB at 0.667 and 2.000 in units of RC/VRC/V, these are 3.40 and 2.49 nanoseconds for the oscillator the essays have been measuring — a microsecond RC, five-volt rails, five millivolts of noise. The event map, run for forty thousand periods, measures 3.39 and 2.49.

The duty error is quieter than the period, but not by as much as the shared draw’s coefficients suggest. A period’s middle coefficient is 2.667 and the imbalance’s is 1.333, a factor of two. The spreads differ by 1.36, because the draws at the two ends of the period — AA at the start and BB at the end — enter both quantities alike. The end draw BB is the largest single term in the imbalance and second only to the shared draw in the period, so the two quantities share their biggest contribution and differ only in the one they do not.

At β = 0.2, the duty error scatters by 1.56 ns a period against the period's 2.56 ns — and consecutive duty errors are anticorrelated, −0.432. Seeded: forty thousand periods of the event map with 5 mV of threshold noise, β = 0.2. The period scatters by 2.56 ns against σ√(A² + (A+B)² + B²) = 2.57 ns; the high half less the low half scatters by 1.56 ns against σ√(A² + (B−A)² + B²) = 1.56 ns, with A = RC/V(1+β) and B = RC/V(1−β) — 0.833 and 1.250 in units of RC/V. The draw both halves share enters the period with A + B and the difference with B − A. Consecutive periods correlate by 0.150 (closed form 0.158); consecutive duty errors by −0.432 (closed form −0.429).
Fig. 2 The same measurement at β = 0.2. The period scatters by 2.56 ns and the imbalance by 1.56, and consecutive imbalances correlate by −0.432 against a closed form of −0.429. With little hysteresis the two sensitivities are nearly equal and the shared draw nearly cancels in the difference.

The anticorrelation

Consecutive periods share a draw with the same sign in both — BB at the end of one and AA at the start of the next — so their covariance is ABAB and they are positively correlated, 0.115 at β = 0.5 in closed form.

Consecutive imbalances share a draw too, and the signs are not the same. The draw that ends one period’s low half enters that period’s imbalance with B-B, because it lengthens the half being subtracted, and it enters the next period’s imbalance with +A+A, because it lengthens the high half that starts from it. The covariance is AB-AB, and consecutive duty errors are anticorrelated:

  • at β=0.2\beta = 0.2, −0.432 measured against −0.429 in closed form;
  • at β=0.5\beta = 0.5, −0.217 against −0.214;
  • at β=0.8\beta = 0.8, −0.064 against −0.062.

The anticorrelation is strongest where the hysteresis is smallest, because there AA and BB are close and the shared term is most of the variance. At β = 0.2 a period whose high half ran long is followed, more often than not, by one whose high half runs short. The duty error is partly a dither that undoes itself.

That has a direct consequence for anything that averages the duty cycle — a filter, a core, a thermal mass. An average over N periods of a quantity whose consecutive values are negatively correlated has a smaller spread than the per-period figure divided by N\sqrt{N} would suggest, because neighbouring errors cancel rather than merely failing to add. The period’s positive correlation made the clock’s accumulated jitter worse than the per-period figure predicts; the imbalance’s negative correlation makes the core’s accumulated error better.

The walk, and why it is β

How much better is exact, and it is the reason the per-period figure is the wrong number to hand a transformer designer.

Sum the imbalance over N consecutive periods. Every interior draw appears in two consecutive half cycles — once ending a half and once starting the next — and the two appearances are a BB and an AA with opposite signs in the difference, so each interior draw contributes BAB - A. There are 2N12N - 1 of them. The first and last draws of the stretch appear once each and do not cancel. The spread of the summed imbalance is

σA2+B2+(2N1)(BA)2,\sigma\sqrt{A^2 + B^2 + (2N - 1)(B - A)^2},

and for large N that is σ2NBA\sigma\sqrt{2N}\,|B - A|. The summed period has the same form with A+BA + B in place of BAB - A, which gives the 3.771 per root period the clock essay found. The ratio of the two walks is

BAB+A=β,\frac{B - A}{B + A} = \beta,

exactly: BAB - A is (RC/V)2β/(1β2)(RC/V)\cdot 2\beta/(1-\beta^2) and B+AB + A is (RC/V)2/(1β2)(RC/V)\cdot 2/(1-\beta^2). The volt-second walk a core sees is β times the timing walk a clock sees, and at β = 0.5 that is 1.89 nanoseconds per root period against 3.77.

Six hundred independent seeded runs of the event map, each summed over a hundred periods, give a spread of 18.3 nanoseconds in the imbalance and 35.9 in the timing — a ratio of 0.511 against β = 0.5 — and the two curves sit on the exact finite-N expressions to within the six per cent that six hundred runs buys. At β = 0.2 the hundred-period figures are 5.86 and 28.0 nanoseconds, a ratio of 0.209; at β = 0.8, 60.9 and 74.7, a ratio of 0.815.

After a hundred periods at β = 0.5 the halves' imbalance has walked 18.3 ns and the timing 35.9 ns: a ratio of 0.511, against βSeeded: 600 independent runs of the event map, β = 0.5, 5 mV of threshold noise. The standard deviation, across runs, of the summed high-minus-low time and of the summed period after N periods. The timing walks as √(2N)·σ(A + B) = 3.77 ns per root period; the imbalance as √(2N)·σ|B − A| = 1.89 ns per root period, because the draw two halves share cancels in their difference except for the part B and A do not have in common. The ratio of the two rates is (B − A)/(B + A) = β. After 100 periods: 18.3 ns and 35.9 ns. At every N the two follow σ√(A² + B² + (2N − 1)(B ∓ A)²), drawn, to 5% — the first and last draws of the stretch, which do not cancel, matter only at small N.1n10n100n110100periodsstandard deviation after N periods (seconds)timing walk3.77 ns per √periodimbalance walk1.89 ns per √periodratio after 1000.511, β = 0.5600 seeds against two coefficientsthe imbalance walks at β times the timing
Fig. 3 The spread of the summed imbalance and of the summed period after N periods, over 600 seeded runs, at β = 0.5. The drawn lines are the exact finite-N expressions; the measured points sit on them. The two walks are parallel on these axes and a factor of β apart. The slider is the hysteresis.

The per-period duty error and the walk therefore disagree about the hysteresis entirely. As β goes to zero the per-period duty error does not vanish — at β = 0.2 it is still 1.56 nanoseconds, and it tends to σ2RC/V\sigma\sqrt{2}\cdot RC/V as the two end draws take over — while the walk goes to zero with β. What a single period’s imbalance mostly contains is the two draws at its ends, and those are exactly the contributions a sum over many periods telescopes away.

So a measurement of cycle-to-cycle duty jitter overstates what a core will integrate, by a factor that grows without limit as the hysteresis shrinks. At β = 0.2 the per-period figure would predict a spread of 15.6 nanoseconds after a hundred periods; the core sees 5.86.

What an instrument that measures duty jitter is reporting

The disagreement between the per-period figure and the walk is not a curiosity of the model; it decides what a measurement means. An oscilloscope’s pulse-width statistics, or a time-interval analyser set to measure high time less low time, reports the per-period spread — 2.49 nanoseconds at β = 0.5 — and a designer extrapolating to a core will multiply it by N\sqrt{N}.

The exact expression says how wrong that is at each count, and the error arrives immediately. Over two periods the imbalance’s spread is σA2+B2+3(BA)2\sigma\sqrt{A^2 + B^2 + 3(B-A)^2}, which is 3.13 nanoseconds against the 3.53 that independence gives. Over ten it is 6.18 against 7.89. Over a hundred it is 18.9 against 24.9, and the six hundred runs measured 18.3. The ratio heads towards BA2/A2+(BA)2+B2|B - A|\sqrt{2}/\sqrt{A^2 + (B-A)^2 + B^2}, which is 0.756 at β = 0.5 and 0.378 at β = 0.2: the extrapolation is a third high at the first ratio and more than two and a half times high at the second.

The measurement that does predict the core is not a pulse-width histogram at all. It is the spread of the summed imbalance over a record as long as the core integrates for, which is what a volt-second integrator on the drive would read directly — and it is the same quantity the six hundred seeded runs measure. Read the other way, a pulse-width histogram that looks alarming on a low-hysteresis oscillator may be almost entirely the two end draws of each period, which a core never sees.

At β = 0.8, the duty error scatters by 6.69 ns a period against the period's 7.47 ns — and consecutive duty errors are anticorrelated, −0.064. Seeded: forty thousand periods of the event map with 5 mV of threshold noise, β = 0.8. The period scatters by 7.47 ns against σ√(A² + (A+B)² + B²) = 7.49 ns; the high half less the low half scatters by 6.69 ns against σ√(A² + (B−A)² + B²) = 6.71 ns, with A = RC/V(1+β) and B = RC/V(1−β) — 0.556 and 5.000 in units of RC/V. The draw both halves share enters the period with A + B and the difference with B − A. Consecutive periods correlate by 0.042 (closed form 0.049); consecutive duty errors by −0.064 (closed form −0.062).
Fig. 4 β = 0.8, with the threshold close to the rail. The imbalance scatters by 6.69 ns a period against the period’s 7.47 and the anticorrelation is down to −0.064: the slow crossing’s sensitivity B has swamped A, so the imbalance is nearly the period, and the core’s walk is nearly the clock’s.

A skew is a ramp, and the noise is a walk

The delay essay’s comparator had a skew — one transition slower than the other — and no noise. A skew adds the same imbalance to every period, so the volt-seconds ramp linearly and a core saturates after a number of cycles proportional to its headroom. The flux that walks measured that ramp directly: a one per cent imbalance saturates its core in 64 cycles, and halving the drive only doubles the count. Noise adds a walk instead, whose spread grows as N\sqrt{N}, so it reaches a given headroom in a number of periods proportional to the square of it.

A real comparator has both, and which one a core feels depends on the count. The ramp’s mean after N periods is N times the per-period imbalance; the walk’s standard deviation is σ2NBA\sigma\sqrt{2N}\,|B - A|. They are equal after

N=2σ2(BA)2ramp2N^* = \frac{2\sigma^2 (B - A)^2}{\text{ramp}^2}

periods, with the ramp measured on the noiseless event map for each skew. Before NN^* the core wanders at random about a drift too small to see; after it, the drift dominates and the wandering is a ripple on it.

At β = 0.5 and five millivolts of noise, a skew of a nanosecond is overtaken after 7.99 periods, a tenth of a nanosecond after 800, and ten nanoseconds after less than a tenth of a period. At β = 0.2 the same skews give 312, 3.11 and 0.03 periods; at β = 0.8, 5,000, 50.0 and 0.5.

Two readings follow from the numbers, and both are cleaner than the expression suggests.

The dependence is an inverse square, visible down every column: a tenfold smaller skew is outrun by the noise for a hundredfold longer. That is the ramp against the square root, and it is why trimming a skew has diminishing value — past a point, the core’s worst case is set by the noise however well the skew is trimmed, and a designer could stop trimming there.

And the β-dependence collapses to one quantity. At a nanosecond of skew the three counts are 3.11, 7.99 and 50.0, which are 2/(1β)22/(1-\beta)^2 at β = 0.2, 0.5 and 0.8 to within half a per cent. Since Bσ=σRC/V(1β)B\sigma = \sigma RC/V(1-\beta) is exactly one nanosecond divided by (1β)(1-\beta) for this oscillator, the counts are N=2(σB/d)2N^* = 2(\sigma B/d)^2 for a skew dd: the skew is outrun by the walk until it exceeds 2/N\sqrt{2/N} times the timing error of a single slow crossing. The fast-slope sensitivity AA drops out, because the skew’s own imbalance carries the same factor of β as the walk’s.

That answers the question the clock essay left about whether a twenty-nanosecond skew is visible above the noise. On this oscillator it is visible within a fiftieth of one period. Skew only becomes invisible once it is comparable to the single-crossing timing error, and on this oscillator that is a nanosecond or two.

With 5 mV of threshold noise, a 1 ns skew's volt-second ramp overtakes the random walk after 7.99 periods at β = 0.5. A closed form for the walk and the noiseless event map for the ramp. A comparator whose rising decision is later than its falling one by a skew adds a fixed amount to every period's high-minus-low time, measured on the event map; threshold noise adds a walk of σ√(2N)|B − A|. The two are equal, the walk's standard deviation against the ramp's mean, after N = 2σ²(B − A)²/ramp² periods. At β = 0.2: 0.1 ns → 312, 0.3 ns → 34.7, 1 ns → 3.11, 3 ns → 0.344, 10 ns → 0.0302. At β = 0.5: 0.1 ns → 800, 0.3 ns → 88.9, 1 ns → 7.99, 3 ns → 0.887, 10 ns → 0.0795. At β = 0.8: 0.1 ns → 5.00e+3, 0.3 ns → 556, 1 ns → 50.0, 3 ns → 5.55, 10 ns → 0.499. Below N a core driven by the oscillator walks at random; above it, it ramps; and N* falls as the square of the skew.
Fig. 5 The number of periods after which a skew’s volt-second ramp overtakes the noise’s walk, against the skew, at three divider ratios with 5 mV of threshold noise. Every line falls as the inverse square of the skew, and the three are separated by (1 − β)², which is where the single-crossing timing error lives.

At a fixed frequency, the core and the clock disagree

Everything so far is at a fixed RC, where more hysteresis also means a longer period, so comparisons across β mix two effects. The clock essay removed that by rescaling RC at every divider ratio to hold the frequency, and found the accumulated timing jitter, as a fraction of the period, smallest at β = 0.648, where βln1+β1β=1\beta\ln\frac{1+\beta}{1-\beta} = 1.

Do the same for the two duty quantities and they disagree with it and with each other.

The per-period duty error is smallest at β = 0.533, found by golden section on the closed form, where it is 1.131 units of σT/V. It has an interior minimum for the same reason the timing jitter does: small hysteresis makes the period short, so a fixed timing error is a large fraction of it, and large hysteresis makes the crossings slow.

The imbalance walk has no interior minimum at all. It is β times the timing walk, and the timing walk rises as 1/β1/\beta at small β because the period shrinks as β, so their product tends to a floor of 1/21/\sqrt{2} as the hysteresis vanishes and rises at every step from there: 0.886 at β = 0.53, 1.023 at 0.65 and 1.430 at 0.8. At a fixed frequency, less hysteresis is always better for the core, down to a floor that no divider ratio can go below.

So a relaxation oscillator used as a drive and one used as a clock want different hysteresis, and the difference is not small. At the clock’s optimum of 0.648 the core’s walk is 45 per cent above its floor; at 0.2 it is within three per cent of it, where the clock’s accumulated jitter is more than twice its own optimum. A designer choosing the divider ratio has to know which of the two the oscillator is for.

At a fixed frequency the timing walk is smallest at β = 0.648, the duty error at 0.533, and the core's walk has no minimum at all. computed by solving, not by drawing. Three closed forms against the divider ratio, each divided by the period with the RC rescaled at every ratio to hold the frequency, in units of σ·T/V. The accumulated timing jitter per root period, √2/((1 − β²)·ln((1+β)/(1−β))), is smallest at β = 0.6479, where it is 1.5793. The per-period duty error is smallest at β = 0.5327, where it is 1.1309. The imbalance walk per root period is β times the timing walk; it rises with β from a floor of 1/√2 = 0.7071 as the hysteresis vanishes, is 0.8855 at 0.53, 1.0232 at 0.65 and 1.4303 at 0.8. The three agree with the RC-scaled forms the seeded figures measure, to a part in a billion, at β = 0.2, 0.5 and 0.8.
Fig. 6 Three closed forms at a fixed frequency, in units of σ·T/V: the accumulated timing jitter per root period, least at β = 0.648; the per-period duty error, least at 0.533; and the imbalance walk per root period, which rises from a floor of 1/21/\sqrt2 and has no minimum. The forms agree with the seeded figures’ closed forms to a part in a billion at three ratios.

What the noise model leaves out

Two things bound these conclusions, and both are worth stating before anyone sizes a core from them.

The noise model is a held draw. Each threshold carries one normal draw, armed when the threshold is armed and held until it is crossed — noise with a correlation time long against a crossing and short against a half cycle. The telescoping that makes the walk small depends on it: a draw appears in two consecutive half cycles precisely because it is held across the flip. A wideband floor, of the kind the bandwidth noise sees prices, would decorrelate the end of one half from the start of the next, and the cancellation in BAB - A would weaken. How much is the first of the questions below.

And the core is ideal. A winding with no resistance integrates the imbalance for ever, so a walk and a ramp both grow without limit and the question is only when they reach saturation. The walk that stops showed that resistance in the winding gives a ramp a fixed point: the magnetising current settles at the drive’s direct component over the resistance. A random imbalance under the same resistance should settle too, to a stationary spread rather than a growing one.

Still open

A wideband floor in place of a held draw. With noise whose correlation time is short against the crossing, the timing error at each threshold is set by the noise bandwidth against the slope, and the draw that ends one half is no longer the draw that starts the next. The cancellation that makes the interior coefficient BAB - A then weakens, and the walk’s ratio to the timing walk should move away from β by an amount that depends on the comparator’s bandwidth. Measuring the ratio’s dependence on β is what would say which model a real comparator obeys.

The stationary spread under winding resistance. An RL magnetising branch leaks the walk away with a time constant L/R, so the flux should settle at a spread of the order of the walk’s rate times the square root of that time constant, in periods. Whether the anticorrelation between consecutive imbalances reduces it further — it does at short counts, and the leak makes every count short — is a march with a seeded drive, and it would turn this essay’s inverse square into a boundary in millivolts and ohms.

And the flux as a boundary rather than a count. A boundary in volt-seconds drew the core’s limit in the units the drive is specified in. With a skew and a walk together, the quantity the core sees after N periods is a ramp plus a spread, and the probability of reaching a given headroom within a given number of periods is a first-passage problem with drift, whose answer is a contour in skew and noise rather than a single count.

Part 5 on hysteresis

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

The objects named here

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

ComparatorDesign tradeoffDuty cycleHysteresisPeriod jitterRelaxation oscillatorSeeded generatorVolt-seconds