Two thresholds because there is a floor
Assumes: The floor a resistor sets · The divider, and the thing it does not know about
The noise field’s whole subject is a boundary that bounds from below: every other limit in this collection is an upper one, and gain does not help against this one because gain amplifies it too. This essay is about the simplest circuit that runs into it — a comparison — and about the fact that a threshold is never crossed once.
The thresholds, solved
A comparator with positive feedback has two thresholds, and it is worth getting them off a solve rather than out of an expression, because the expression a reader would write is not right.
The arrangement: the input reaches the summing node through R₁, the output reaches it through R₂, and the comparison is against a reference. The network is solved twice — once with the output at +Vsat and once at −Vsat — and in each case the input voltage that puts the summing node at the reference is read out. That is what a threshold is: the input at which the decision changes, given where the output currently sits.
With ±5 V of output, R₁ = 10 kΩ and R₂ = 100 kΩ, the two come out at exactly ±0.5 V, a width of 1.000 V, centred on the reference to .
The expression a reader reaches for is , which gives 0.909 V — nine per cent out. The right one here is , because the input is a source driving through R₁ rather than a divider tap: the summing node is held at the reference by the comparison, so the two resistors carry currents rather than forming a ratio.
That is a small thing and it is the kind of small thing the divider essays exist for. The divider, and the thing it does not know about is the general case: a two-resistor divider’s output is set by the ratio of its resistances with nothing connected, and the moment anything is connected what decides the answer is the quantity the ratio was built to discard — two dividers of identical ratio giving six volts and one volt into the same load. Here the thing connected is a comparison holding the summing node at the reference, which is a load of zero impedance, and it is why the two resistors carry currents rather than forming a ratio.
The σ the thresholds are measured in has the same provenance. The floor a resistor sets establishes it: 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, which makes it the one quantity in this essay that no component choice removes and no amount of gain improves.
Why one threshold is not enough
Set the hysteresis to zero and watch a ramp cross the threshold once, with noise on it. The decision does not change once.
| hysteresis | transitions (mean of 12 seeds) | range |
|---|---|---|
| 0 | 22.67 ± 5.52 | 9 – 29 |
| 1σ | 11.17 ± 3.95 | 5 – 19 |
| 2σ | 6.17 ± 3.35 | 1 – 13 |
| 3σ | 2.00 ± 1.35 | 1 – 5 |
| 4σ | 1.00 ± 0.00 | 1 – 1 |
| 6σ | 1.00 ± 0.00 | 1 – 1 |
The right answer is one. With no hysteresis the answer is twenty-three, and it is a different twenty-three on every seed — which is why this figure is drawn with its spread rather than as a curve. The noise field’s rule for this collection is that the only figures whose content is a sample are run across seeds and quoted with their scatter, and a transition count is exactly such a quantity.
Interpolating for the point at which the expected number of extra transitions falls below a tenth gives 3.57 standard deviations. That is bisected on the mean over sixteen seeds rather than read off the table, and the criterion is the mean rather than “every seed clean” — a criterion that asks whether the worst of eight runs is perfect moves by a whole grid step when one run changes, so it measures the seed set as much as it measures the circuit.
The units are the point
The measurement is in units of σ, and that is the essay’s first result rather than a convenience.
There is no voltage of hysteresis that is correct. A comparator watching a signal from a 50 Ω source in a kilohertz of bandwidth has a few nanovolts of Johnson noise under it and needs nanovolts of hysteresis; one watching a sensor through a megohm in a megahertz has hundreds of microvolts and needs hundreds. The number that transfers between the two cases is the multiple, and the noise field supplies the σ.
It depends on how long the threshold is watched
The count above is over twenty thousand samples of the crossing region. Watch for longer and the count rises, because more samples are more chances for the noise to reach back across the threshold.
| samples | transitions with no hysteresis | hysteresis needed |
|---|---|---|
| 2 000 | 2.17 | 1.63σ |
| 20 000 | 22.67 | 3.57σ |
| 200 000 | 223.17 | 5.31σ |
The left column is proportional to the record length — ten times the samples, ten times the chatter — which is what an independent-samples argument predicts and is worth confirming rather than assuming.
The right column is the useful one. A hundredfold longer record needs about three times the hysteresis, not a hundred times. The reason is that the requirement is set by the largest excursion the noise makes over the record, and the tail of a Gaussian falls fast enough that the expected maximum of N samples grows like the square root of the logarithm of N — so buying an order of magnitude of confidence costs a fixed small increment rather than a factor.
That is a boundary of an unusual shape for this collection: not a frequency, amplitude, size or duration above which a model fails, but a requirement that grows with the observation. It has the same character as a measurement’s confidence interval, and it is the second time the collection has had to say that a number depends on the length of the record — the first being the averaging law.
A threshold is a loop that is meant to be unstable
It is worth connecting this to the field’s first ladder, because the circuits are closer than they look.
The positive feedback that makes the two thresholds is a loop, and its loop gain is the amplifier’s gain times the fraction of the output that reaches the summing node — , which for these resistors is 0.0909A. The circuit snaps between its two states only if that product exceeds one, so an amplifier of gain below 11 does not make a Schmitt trigger at all; it makes an amplifier with a slightly peculiar transfer curve.
Compare the oscillator. There the design condition is loop gain exactly one, at one frequency, met on a set of measure zero, and the essay was about the impossibility of sitting on it. Here the design condition is loop gain comfortably above one, at direct current, and there is nothing delicate about it — a comparator’s open-loop gain is ten thousand or more, so the requirement is exceeded by three orders and no tolerance on any component threatens it.
The gain that is exactly one is the essay that measures the knife edge: the crossing at 3.000000000000, bisected on the netlist, with a growth rate either side of it that reaches the rails in sixty-one milliseconds and no interior at all.
The same inequality, on the same axis, is a knife edge in one circuit and a formality in the other, and the difference is entirely whether the design needs to sit on the boundary or merely on one side of it. That is worth stating as a general observation about this field: the circuits that are hard to build are the ones whose specification is an equality.
What the hysteresis costs
Nothing in this collection is free and this is no exception. Hysteresis buys immunity to noise and it is paid for in the timing of the decision.
The threshold has moved by half the hysteresis width, so a signal ramping at s volts a second reaches it later by
which for the 3.57σ requirement above is . A signal with a microvolt of noise on it ramping at a volt a millisecond is decided 1.8 nanoseconds late; the same signal ramping at a volt a second is decided 1.8 microseconds late.
And the delay is not a constant offset that a calibration could remove, because it depends on the slope — a circuit deciding when two signals cross has a timing error proportional to the hysteresis and inversely proportional to how fast they are crossing, which is exactly the regime where the crossing is hardest to see in the first place. Slow crossings need the most hysteresis and are hurt most by it.
The other cost is that the decision is now asymmetric: the level at which the output goes high is not the level at which it goes low, so a signal wandering inside the band leaves the output wherever it last was. For a threshold detector that is the whole point. For a circuit trying to report a voltage it is a systematic error of half the hysteresis width, in a direction that depends on history — which is a strange thing to have in a measurement and is one reason a converter uses a ladder of undithered thresholds and a great deal of averaging instead.
The same noise, with the sign reversed
There is a circuit in this collection where noise on a threshold is deliberately added rather than suppressed, and the contrast is worth drawing because it is the same mechanism with the opposite verdict.
A converter’s quantiser is a row of thresholds. Undithered, a slowly moving input crosses each one cleanly, and the error is a deterministic staircase locked to the signal — which is to say its energy sits in harmonics of the input rather than being spread. Adding a least significant bit of noise breaks the lock, at a cost of three decibels of signal to noise and a benefit of taking the harmonic share from 76.5% to 0.32%.
So a converter wants its thresholds noisy and a comparator wants its threshold quiet, and the difference is what happens afterwards. A converter’s output is averaged — by a filter, by a later stage, by the ear — and averaging a dithered error recovers information that a locked one has destroyed. A comparator’s output is a decision, it is not averaged, and every extra transition is a whole event downstream.
When a floor stops being a floor is where that verdict is measured rather than asserted, and its central observation is the one worth carrying back here: the floor does not move. The share of the error’s power sitting in harmonics of the input rises from 0.29 per cent at 230 levels of amplitude to 76 per cent at 1.3, with the total unchanged throughout — so what dither buys is not a smaller error but a differently distributed one. A comparator has no distribution to redistribute into, because its output has one bit and no bandwidth to hide anything in, which is the whole reason the two circuits want opposite things from the same noise.
And both circuits end up bounded by the same floor from underneath. The floor a converter sets crosses the two: measured against the Johnson noise of a kilohm source in a hundred kilohertz of bandwidth, the quantiser is the limit up to 18.80 bits and the resistor above it, so past the crossing every further bit buys a more precise measurement of thermal noise. A comparator with too little hysteresis is doing exactly that, and its twenty-three transitions are the same measurement reported as events instead of as codes.
What this model leaves out
The comparator’s own noise. The measurement puts noise on the input and treats the comparator as noiseless. A real one has an input-referred noise density of its own, which adds to the source’s in quadrature and is often the larger of the two for a low source impedance — so the σ in these units is the total at the input, not the source’s alone.
The floor a circuit has is where that addition is done properly, and it says something this essay’s units conceal. A device contributes two generators rather than one — 4 nV/√Hz in series with its input and 0.6 pA/√Hz across it — and because the first matters most into a small source and the second into a large one, there is a source resistance at which their sum is least: 6.67 kΩ, which is the ratio of the two and is not the resistance that transfers maximum power. So the σ this essay measures hysteresis in is not a monotone function of the source impedance. It has a minimum, the minimum is a property of the comparator rather than of the signal, and a design that lowers its source impedance to reduce Johnson noise can raise the total by driving the current generator harder.
The bandwidth is unstated. The samples here are independent, so the sequence is white and the record length is a count rather than a time. In a real circuit the noise has a bandwidth, the comparator has a bandwidth, and the number of independent samples in a crossing is set by the smaller of the two against how fast the signal is moving. That is a genuine gap: it means the table above converts to a time only when a bandwidth is supplied.
And supplying one is not the trivial half of the work. The bandwidth noise sees measures the quantity that has to be used and it is not the corner frequency: a single pole passes π/2 times as much noise power as a brick wall at its own corner, so a noise voltage computed from the −3 dB point is twenty-one per cent low. Integrating the solved response gives 1.5706 against π/2’s 1.5708, and a five-pole Chebyshev’s ratio is 0.964 — less than one, so the factor is not even always in the same direction. Twenty-one per cent of σ is twenty-one per cent of the hysteresis a design needs, which puts that essay’s correction ahead of most of the refinements a designer would think of first.
The other half of converting a count into a time is whether the samples are independent at all. The corner where averaging stops working measures what happens when they are not: on the same seeded stream filtered and unfiltered, the white sequence’s block mean falls as the −0.510 power of the block length and the pink one’s as the −0.087, so a thousand-sample average buys a factor of 36.9 on one and 2.1 on the other. Flicker noise’s correlation extends over every time scale, which is what a spectrum with no bottom means — and the record-length law measured in this essay, which assumes each sample is a fresh chance for the noise to reach back across the threshold, is a white-noise law. Under a signal with a flicker component the wandering is slower and larger, and a long watch needs more hysteresis than the logarithm here suggests.
Input speed. A signal crossing quickly spends less time in the region where the noise can reach back, so it chatters less. The measurement here uses one ramp rate; a faster one is equivalent to a shorter record and moves along the left-hand column of the table above.
How the sequence is generated, and why it is seeded
The noise here is a seeded generator from verify-kit, and the reason it is seeded rather than random
is that a figure has to be the same figure every time it is built. A build whose pictures differ from
one run to the next cannot be checked against anything, and a gate that fails on one in twenty builds
is worse than no gate.
What that costs is that the result is a property of twelve specific sequences rather than of the distribution, and the repair is to quote the spread across them rather than the mean alone. Every number in the table above carries its range for that reason, and the interpolated 3.57σ is taken on the mean over sixteen seeds — enough that moving one seed moves the answer by less than the third digit.
It is the same discipline the noise field arrived at when it found that a sampled noise voltage and an integrated one differed by 0.11% against a sampling spread of 1.84%: the agreement is only meaningful because the spread is stated beside it.
The gate
With no hysteresis a single crossing is decided many times, and a different number of times on each seed — the mean above five and the range non-degenerate, which together are the statement that this is a random variable.
More hysteresis never makes it worse, monotonically across the sweep.
Enough of it decides once on every seed, exactly one transition with zero scatter at six standard deviations.
And the amount needed grows with the record and grows slowly — 1.63σ, 3.57σ, 5.31σ for two thousand, twenty thousand and two hundred thousand samples, which is a factor of 3.3 for a factor of a hundred.
The second of those four is the one with teeth, and it is worth saying why a monotonicity claim is worth gating at all. The measurement is a mean over twelve seeds of a quantity whose range at zero hysteresis runs from nine to twenty-nine, so a curve drawn through it could easily be non-monotonic by chance at a few points and still be right. Requiring monotonicity of the mean over the whole sweep is a claim about the mechanism rather than about the sample, and it fails immediately if the seeds are too few — which is what makes it a check on the measurement as well as on the circuit.
Part 1 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:
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 13.
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.
ComparatorHysteresisMonte carloNoise floorSeeded generatorVoltage divider
- The tolerance that is not on any part monte carlo, seeded generator, voltage divider
- The filter an average is monte carlo, seeded generator