Series

Hysteresis — the series

8 essays on one idea, from the one that introduces it to the one that assumes the rest.
  1. A threshold crossed once, in 20k samples of noise. With no hysteresis the comparator changes its mind 22.7 times on average and as many as 29, on a signal that crosses the threshold once. The vertical bars are the range over twelve seeds. The expected number of extra transitions falls below a tenth at 3.57 standard deviations — so the hysteresis a threshold needs is set by the noise under it and not by the signal over it.

    Two thresholds because there is a floor

    A comparator with one threshold, watching a slow signal cross it once, changes its mind 22.7 times on average and as many as 29 — because there is noise under the signal and no threshold is ever crossed once. Hysteresis fixes it, and how much is needed is a multiple of the noise's own standard deviation rather than a voltage: 3.57 of them here. The multiple grows with how long the threshold is watched, and slowly — a hundredfold longer record needs three times the hysteresis, not a hundred times.

    part 1 · applied
  2. A comparator's delay, at a divider ratio of 0.50. Each nanosecond of comparator delay adds 2.650 nanoseconds to the period — measured as a slope between two delays, both exact multiples of the marching step — against the 2.667 that 4/(1+β) gives and the 2 that counting the delay twice gives. A 50 ns comparator therefore holds the frequency to one per cent only below 75.0 kHz.

    The period a delay lengthens

    Feed a comparator's output back through a resistor to the capacitor on its own input and the two thresholds stop defending a decision and start setting a period. The closed form is two RC times the log of one plus beta over one minus beta, and a marched circuit recovers it as the step shortens. A comparator that responds fifty nanoseconds late does not add fifty nanoseconds to each half cycle: it adds 4/(1+beta) times the delay to the period, 2.65 here against the 2 that counting it twice gives, because during the delay the capacitor keeps going the way it was going.

    part 2 · applied
  3. Twenty nanoseconds of skew is 0.28% of duty, not 0.40. computed by solving, not by drawing. The duty cycle of a relaxation oscillator whose comparator takes longer to go one way than the other, marched, against the expression that lengthens each half cycle by its own delay. The two part company immediately and by a constant factor of about 1.42: during a delay the capacitor keeps charging past the threshold it already crossed, so the next half cycle starts further out and takes longer, and the two halves partly cancel. At 200 ns of skew on a 2585 ns period the duty is 52.805 per cent where the expression says 54.004. The open circles are the same quantity in closed form — the overshoot is V(1 − (1 − β)e^(−d/τ)) and the next half starts from it — which the march reproduces to parts in ten thousand.

    The delay that is two delays

    Modelling one comparator delay applied to both transitions makes the two half cycles equal by construction, and the fix is a change of one line. Made, the duty cycle moves by 0.28 per cent for twenty nanoseconds of skew rather than the 0.40 the obvious expression gives, more hysteresis improves the duty cycle and worsens the volt-seconds at the same time, and ten nanoseconds of skew saturates a hundred-turn core in 231 cycles.

    part 3 · applied
  4. 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.

    The decision taken where the ramp is slowest

    A relaxation oscillator decides at its thresholds, and a threshold is the one place on a charging exponential where the slope is smallest. Noise there costs 3.399 units of period against the 2.828 that counting two crossings gives, because a draw moves the crossing it is armed for and the level the next ramp starts from. Consecutive periods share that draw, so they are positively correlated and the jitter accumulates at 3.771 per root period rather than at 3.399. And at a fixed frequency there is a best hysteresis: β = 0.648, where β·ln((1+β)/(1−β)) = 1.

    part 4 · applied
  5. At β = 0.5, the duty error scatters by 2.49 ns a period against the period's 3.39 ns — and consecutive duty errors are anticorrelated, −0.217. Seeded: forty thousand periods of the event map with 5 mV of threshold noise, β = 0.5. The period scatters by 3.39 ns against σ√(A² + (A+B)² + B²) = 3.4 ns; the high half less the low half scatters by 2.49 ns against σ√(A² + (B−A)² + B²) = 2.49 ns, with A = RC/V(1+β) and B = RC/V(1−β) — 0.667 and 2.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.107 (closed form 0.115); consecutive duty errors by −0.217 (closed form −0.214).

    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.

    part 5 · applied
  6. With a leak of a hundred periods the flux settles to a spread of 1.22% of the swing at β = 0.5 — 0.759 of what independent duty errors would give. Seeded: three runs of sixty thousand periods of the event map, 5 mV of threshold noise, β = 0.5, driving a magnetising branch whose flux leaks with τ = L/R. The stationary spread of the period-end flux in volt-nanoseconds against τ in periods, quoted here as a percentage of one half cycle's swing V·T/2 = 5493 V·ns: 1 → 0.146% (closed form 0.145%), 3 → 0.233% (closed form 0.232%), 10 → 0.401% (closed form 0.397%), 30 → 0.685% (closed form 0.673%), 100 → 1.25% (closed form 1.22%), 300 → 2.16% (closed form 2.10%). The closed form linearises one period, keeping the leak inside each half and the covariance −AB between consecutive periods' imbalances; dropping that covariance gives the upper curve, 1.61% at a hundred periods. For a slow leak the spread is V·σ·|B − A|·√(τ/T), the drawn asymptote.

    The spread a winding resistance holds

    A relaxation oscillator's threshold noise walks an ideal core's flux without limit. Put the winding's resistance back and the walk stops at a spread: 1.22% of a half cycle's swing when L/R is a hundred periods, growing as the square root of L/R, while a comparator skew's offset grows as L/R itself. The anticorrelation between consecutive duty errors is worth 24% of that spread at β = 0.5 and 62% at β = 0.2 — but only in a core slow enough to remember several periods. And the resistance that bounds the walk is a boundary in its own right: with a millihenry and a fifth of the swing to spare, an ohm tolerates 12.9 mV of noise, and a hundred picoseconds of skew needs at least 0.14 Ω.

    part 6 · applied
  7. With a 300 ps skew and 5 mV of noise a core with 100 ns of headroom saturates after 502 periods on average — the 500 the skew alone gives — and one drive in a hundred by 184. Seeded: 2,000 drives of an ideal core by the event map at β = 0.5, 5 mV of threshold noise and a comparator skew of 300 ps, each run until the summed high-minus-low time leaves ±100 ns. A histogram of the counts on logarithmic bins, against the closed-form first-passage distribution, between two barriers, of a walk with drift 0.200 ns a period and spread 1.89 ns per root period. Mean 501.9 against 499.9; quantiles 1% 184, 10% 275, 50% 463; the empirical and closed-form cumulative distributions differ by at most 0.014.

    The count a core survives

    A relaxation oscillator with a 300 ps comparator skew and 5 mV of threshold noise saturates an ideal core with 100 ns of volt-second headroom after 502 periods on average — the 500 the skew alone gives — and one drive in a hundred by 184. The mean does not see the noise at all until the noise is large enough to saturate the core the other way first; the early tail sees nothing else. Every skew and noise level falls on one curve in one ratio, the skew's count over the count at which its ramp overtakes the walk. Read as a burst, a thousand periods with one failure in a thousand allows 150 ps of skew with no noise, 93.5 ps at a millivolt, and none at all above 2.41 mV.

    part 7 · applied
  8. Forty thousand periods at β = 0.5: each period's error against the same period's duty error, correlated by 0.008. Seeded: forty thousand periods of the event map, β = 0.5, 5 mV of threshold noise; one in twenty is drawn, each scaled by its own standard deviation (3.4 ns for the period, 2.49 ns for the high-minus-low time). A period is three draws with coefficients A, A + B, B and its duty error the same three with A, B − A, −B, so their covariance is σ²[A² + (A + B)(B − A) − B²], which is zero at every β. Measured, the correlation is 0.0080, inside the ±0.0100 that forty thousand samples resolve. With normal draws, uncorrelated is independent: the cloud is round.

    Every draw shared, and nothing in common

    A relaxation oscillator's period error and its volt-second error are made of the same threshold draws, and they are exactly uncorrelated. A period weighs its three draws A, A + B and B; the high half less the low weighs the same three A, B − A and −B; the products sum to A² + B² − A² − B², which is zero at every hysteresis. Over forty thousand periods the measured correlation is 0.008 against a resolution of 0.010. What the two do share is one draw with the period on either side, ±0.157 at β = 0.5, and over any whole burst those two lags cancel term for term. Four thousand bursts judged against twenty-five pairs of limits fail both ways exactly as often as the product of the two rates says: the margins specified separately double-count nothing.

    part 8 · applied

All series