Series

Hysteresis — the series

5 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

All series