Filters, measured not tabulated

The offset that knows the signal

The charge a switch leaves on the capacitor it was sampling is the gate oxide capacitance times the channel area times the overdrive, and both terms in that overdrive depend on the input — one directly and one through the body effect. So the 5.67 mV a data sheet would call an offset moves by 1.86 mV across a volt of signal, which is a gain error of 0.186 per cent and only 3.4 µV of anything else. Opening the summing-node switch first divides the gain error by the amplifier's own gain, exactly, and what is left goes from twenty-nine times the sampled-noise floor to nineteen times below it.

Assumes: A resistor made of a clock · The total that has no resistor in it

Two rungs of this anchor have treated the switch as an ideal one. A resistor made of a clock made an average current out of a capacitor moved between two nodes at a rate, and the filter that samples found that the arrangement is not a continuous system at all — an input at 992 kHz arrives at 7.8 kHz with the passband’s own gain, 42 dB above what the continuous model predicts.

Both take the switch to be closed, then open. It is a channel of carriers, and when the gate goes low that charge has to go somewhere: roughly half of it onto the capacitor that was being sampled.

The "offset" a switch leaves moves by 1.863 mV across a volt of signal. computed by solving, not by drawing. The charge a switch leaves on a 1 pF hold capacitor, as the input it was sampling changes. It is W·L·C_ox·(V_gs − V_th) with the clock's high level for the gate, so it falls as the input rises for two reasons at once: less gate drive, and a threshold that rises with the source potential through the body effect. The dashed line is the part that does not know what the signal is — the clock coupling through the gate overlap capacitance, -1.649 mV — and it is the only part of this that is honestly an offset. The curve stops where the switch does: an n-channel device passes nothing within a threshold of its own gate, and the model refuses rather than returning a zero.
Fig. 1 The step the hold node takes when the switch opens, as a function of the voltage it was sampling. The dashed line is the part that does not know what the signal is.

Two terms, and both of them know the signal

The charge in the channel is WLCox(VgsVth)W L C_{ox}(V_{gs} - V_{th}), and for a switch sampling a signal onto a capacitor, neither term in that bracket is a constant.

VgsV_{gs} is the clock’s high level minus the input, so it falls directly as the input rises. And VthV_{th} rises with the source potential through the body effect — the substrate is at a fixed potential, the channel is at the signal’s, and the depletion charge between them grows as the square root of the difference. Both effects push the same way, so the injected charge falls as the input rises, and it does so along a curve rather than a line.

There is a second mechanism and it is the only honest offset in the picture: the clock edge couples directly through the gate-to-source overlap capacitance, dividing between it and the hold capacitor. That contributes −1.649 mV here and it does not know what the signal is.

The "offset" a switch leaves moves by 3.726 mV across a volt of signal. computed by solving, not by drawing. The charge a switch leaves on a 0.5 pF hold capacitor, as the input it was sampling changes. It is W·L·C_ox·(V_gs − V_th) with the clock's high level for the gate, so it falls as the input rises for two reasons at once: less gate drive, and a threshold that rises with the source potential through the body effect. The dashed line is the part that does not know what the signal is — the clock coupling through the gate overlap capacitance, -3.297 mV — and it is the only part of this that is honestly an offset. The curve stops where the switch does: an n-channel device passes nothing within a threshold of its own gate, and the model refuses rather than returning a zero.
Fig. 2 The same switch onto half the hold capacitance. Every voltage doubles, because every one of them is a charge divided by that capacitance.

The curve stops where the switch does. An n-channel device passes nothing within a threshold of its own gate, so above about 2.2 volts the model has no channel to compute a charge for — and it refuses by name rather than returning a zero, because a zero here reads as no injection and means no switch.

The decomposition, which is what a specification does

The interesting question is not how large the error is but what kind of error it is, because a converter’s specification calibrates two kinds out and reports the third.

So the sampled sequence is fitted against the input by least squares — the operation a calibration performs — and what the fit removes and what it leaves are reported separately.

Nearly all of it is a gain error, and the technique divides that by the loop gain. computed by solving, not by drawing. The sampled sequence fitted against the input — which is what a converter's specification does, since offset and gain are calibrated out — and what is left after it. The apparent offset is -5.667 mV and is mostly honest. The signal-dependent part is a gain error of 0.1863 per cent, which is 0.931 millivolts at full scale and is the term that matters. What survives the fit is 3.40 microvolts of curvature. Opening the summing-node switch first puts the charge on a node held at the input divided by the amplifier's gain, so the gain error falls by that factor: 0.00204 per cent at a gain of 100.
Fig. 3 The apparent offset, the gain error expressed as millivolts at full scale, what is left after the fit, and what bottom-plate sampling leaves.

The apparent offset is 5.67 mV. The signal-dependent part is a gain error of 0.186 per cent, which is 0.93 mV at full scale and is the term that matters: on a twelve-bit converter with a one-volt range that is nearly four least significant bits. And what survives the fit — the actual curvature, the part that is neither an offset nor a gain — is 3.4 µV, which is a fortieth of a bit.

That ordering is the result, and it is not the one the phrase charge injection distortion suggests. Charge injection is overwhelmingly a gain error. The body effect’s square root is gentle enough over a volt of signal that the nonlinear residual is two orders of magnitude below the linear part of the same mechanism.

The technique, and the factor it is worth

The standard repair is bottom-plate sampling: open the switch at the summing node first, so that the charge is trapped before the switch connected to the signal opens.

The reason it works is that the summing node is a virtual earth. Its potential is not the signal, it is the signal divided by the amplifier’s own gain, so the charge that switch carries is signal-dependent by exactly that factor — and the gain error falls in proportion.

Measured: at an amplifier gain of 100 the gain error is 0.00204 per cent, against 0.186 without. At 1,000 it is 0.00020. The technique divides the gain error by the loop gain, exactly, which is the same relationship the current that does not reach the input finds for a guard ring and how much of the amplifier gets through states in general: what feedback improves, it improves by the loop gain.

Loop gain of a three-pole amplifier closed for a gain of 100. Unity loop gain at 5.73 kHz, where 34.9° of phase remains before −180°. The phase reaches −180° at 89.6 kHz, where the loop gain is 46.1 dB below unity.
Fig. 4 The quantity being spent, at the gain of 100 this stage closes around: a crossover at 5.73 kHz against a second pole at 4.00, leaving 34.9 degrees of phase margin. A sampled system’s loop gain is at the clock rate rather than continuous, but the division is the same.

It is worth being clear that the technique does not remove the offset. The summing-node switch still injects, at a potential near zero, and that injection is the same every time — which is exactly what makes it an offset rather than a gain error, and offsets are the easy kind.

What the fit is, and what it is entitled to remove

A least-squares fit of the sampled sequence against the input is not an innocent operation and it is worth saying what it corresponds to physically, because the decomposition above rests on it.

Removing the constant term is a calibration every converter performs: measure the output with the input grounded, store it, subtract it. Removing the linear term is also standard: apply a known reference, measure the ratio, store it. Both are done once, at manufacture or at power-up, and both are stable to the extent that the quantity being removed is.

What the fit is not entitled to remove is anything that changes between the calibration and the measurement. So the split above is only meaningful if the gain error is stable, and it is — the injected charge depends on the clock’s high level, on the device’s dimensions and on the threshold, none of which moves quickly.

The amplitude at which a converter's floor becomes distortion. computed by solving, not by drawing. The quantisation error is transformed and the power in harmonics of the input is measured directly, at the bins those harmonics occupy. Undithered, the share rises from 0.29% at 230 levels to 76.5% at 1.3: the error has stopped being spread and has become a deterministic staircase locked to the signal. The sweep is drawn against the levels the input uses rather than against volts because it is then the same sweep for every converter — a twelve-bit part and a sixteen-bit part agree here to 0.0e+0, so what decides the character of the error is how many levels the signal crosses and not how many the converter owns. With 2 least significant bits of dither the share stays under 0.31% at every amplitude, for 7.10 dB of signal to noise. Adding noise to a converter's input improves what comes out of it, which is true and sounds like it should not be — and the amount is one whole step, not "some": a quarter of a step leaves 52.7% and a half leaves 25.6%, because a dither smaller than a step cannot make the quantiser cross one.
Fig. 5 The character of an error rather than its size, from the digital field: whether a residue is noise-like or structured decides what can be done about it. Undithered, 76 per cent of the residue sits in harmonics of the input — it knows the signal, which is this essay’s whole subject; two least significant bits of dither take that to 0.31 per cent and cost 7.10 decibels of floor to do it. The fit above is the same distinction made operational.

Where it stops being stable is temperature, and the last section of this essay returns to that. A calibration performed at 25 °C removes a gain error that is not the gain error at 85 °C, and what is left over is proportional to the difference.

Against the floor the previous anchor computed

The total that has no resistor in it established the sampled-noise floor: √(kT/C), a quantity with no resistance in it at all, and the reason a hold capacitor cannot be made arbitrarily small. It is worth asking how the mechanism in this essay compares with it, because they scale differently.

One falls as 1/C and the other as 1/√C, and the calibration decides which matters. computed by solving, not by drawing. Three quantities against the hold capacitance: the injection's swing across the signal range, the √(kT/C) the previous anchor computed, and what is left of the injection after a straight line has been fitted out of it. The injection falls as one over the capacitance and the noise as one over its square root, so their ratio does not stay put — but the injection is above the noise at every capacitance drawn here, by 29 times at 1 pF. Calibrated, the same mechanism is 19 times below the noise. The floor a designer computes and the floor a part has are separated by whether anybody trims it.
Fig. 6 Three quantities against the hold capacitance: the injection’s swing across the signal range, the kT/C noise, and what is left of the injection after a straight line is fitted out of it.

Injection falls as one over the capacitance; noise falls as one over its square root. So their ratio is not fixed — but over every capacitance a designer would use, the uncalibrated injection is above the noise: twenty-nine times at a picofarad, and the ratio only improves as the square root of the capacitance.

Calibrated, the same mechanism is nineteen times below the noise at the same capacitance. The floor a designer computes and the floor a part has are separated by whether anybody trims it, and the kT/C result is the honest floor only for a system that has removed a gain error which is thirty times larger.

Where the charge actually goes

Half of it is the number used above, and it is the least defensible number in this essay. The split between the two ends of the channel depends on the impedances at those ends and on how fast the gate falls: a slow edge lets the charge redistribute towards whichever end can absorb it, a fast one divides it more evenly, and the boundary between the two regimes is a comparison between the edge rate and the channel’s own transit time.

So the injected step is a function of the clock as well as of the signal, which is a dependence nothing else in this collection’s sampled-system machinery has. It is also why measurements of injection on the same silicon at different clock rates disagree, and why the mitigation of last resort — slowing the clock edge — sometimes helps and sometimes does not.

The dummy-switch repair belongs here too and it is worth pricing. A half-sized device with its source and drain shorted, clocked in antiphase, absorbs channel charge as it turns on — and it absorbs a charge that is also signal-dependent, by a slightly different function of the same voltage, because its own VgsV_{gs} and VthV_{th} differ. Perfect cancellation therefore happens at one signal level, which is a statement of exactly the same shape as the capacitor that was right once.

Sizing the switch, which is two constraints pulling opposite ways

The injected charge is proportional to W·L, and the switch’s on-resistance is inversely proportional to W/L. So making the switch smaller reduces the injection and raises the resistance, and the resistance is what sets the settling time the first rung of this anchor measured.

That is a genuine optimum rather than a preference. The settling requirement puts a floor under W/L; the injection requirement puts a ceiling on W·L; and the length is at the process minimum for both, so the two constraints act on the same quantity from opposite sides and the design point is where the settling is just adequate.

A switched capacitor is a resistor below a ratio, not below a frequency. computed by solving, not by drawing. The exact response of a capacitor shuttled between the input and a holding capacitor at 1.00 MHz — a difference equation with one pole, evaluated on the unit circle — against the continuous R–C its equivalent resistance is supposed to make. The corner is 3.15 kHz against the model's 3.18 kHz, 0.99% out, and the discrepancy is set by the capacitor ratio alone: one per cent needs a ratio under 0.0201, which is a clock 315 times the corner. The second difference has no counterpart at all — the sampled response repeats at the clock, so the image rising on the right of this plot is signal at 997 kHz arriving as though it were at the corner. The third is settling: 1 pF charged through 1 kΩ gets 500.0 time constants a half period at this clock, and being short of full charge raises the equivalent resistance by 0.000%, which puts a ceiling on the clock at 108 MHz.
Fig. 7 The settling the first rung measured, which is the constraint pulling the other way. A switch small enough to inject nothing takes too long to charge the capacitor.

The hold capacitance is caught in a second pair of constraints of the same shape: larger is less injection and less noise, and larger is more area and a longer settling time at fixed switch size. Three requirements on two dimensions, which is why a sampling front end’s numbers look over-determined and are.

What a converter’s specification sees

Three of a converter’s published numbers move when this mechanism does, and the routes are different enough to be worth separating.

Gain error takes the whole of it and is calibrated out, so it is reported as a trimmed number and does not appear.

Integral nonlinearity takes the residual — the 3.4 µV — and it is small. That is why charge injection does not appear in a linearity plot even on a converter that has it badly.

And offset drift takes the part nobody expects: the injection depends on the threshold voltage, the threshold voltage moves with temperature at about −2 mV/K, so the offset above drifts with temperature at a rate set by WLCox/ChW L C_{ox}/C_h. On a one-picofarad hold capacitor that is tens of microvolts per kelvin, which is a large number for a precision part and belongs to the switch rather than to the amplifier.

That last point is the one worth carrying. Sampled noise averages down with repeated samples; injected charge does not, because it is the same charge every time. A measurement that improves as the square root of the number of samples has removed the first and kept the second.

The same mechanism in the arrangement of the rung below

The two rungs below built a filter out of switches and capacitors rather than a sampler, and the injection appears there too — with a different consequence, because a filter’s output is an average of many samples rather than one of them.

A switched-capacitor integrator injects the same charge every clock cycle into the same node, so the injection is a direct current into the integrator: an output that ramps. Real designs cancel it with a matched pair of switches clocked in antiphase, and what is left is the mismatch between two switches rather than the charge of one — which is the same structural move the semiconductors field’s the error that is a distribution makes, and it has the same consequence: a systematic error becomes a distribution with a width set by matching.

A switched capacitor is a resistor below a ratio, not below a frequency. computed by solving, not by drawing. The exact response of a capacitor shuttled between the input and a holding capacitor at 1.00 MHz — a difference equation with one pole, evaluated on the unit circle — against the continuous R–C its equivalent resistance is supposed to make. The corner is 7.77 kHz against the model's 7.96 kHz, 2.46% out, and the discrepancy is set by the capacitor ratio alone: one per cent needs a ratio under 0.0201, which is a clock 315 times the corner. The second difference has no counterpart at all — the sampled response repeats at the clock, so the image rising on the right of this plot is signal at 992 kHz arriving as though it were at the corner. The third is settling: 1 pF charged through 1 kΩ gets 500.0 time constants a half period at this clock, and being short of full charge raises the equivalent resistance by 0.000%, which puts a ceiling on the clock at 108 MHz.
Fig. 8 The arrangement the rung below measures. Every clock cycle moves a charge, and this essay’s mechanism adds a small fixed one to each of them.

The offset that results is referred to the input by dividing by the integrator’s gain, so a high-gain stage has a small input-referred offset from a large output-referred one — the ordinary arithmetic of an offset in a feedback loop, and a place where the analysis is easier than the sampler case rather than harder.

What is not modelled

No overlap of the two switches. Bottom-plate sampling is assumed perfect here: the summing-node switch opens strictly before the signal-side one. A real clock’s non-overlap is tens of picoseconds and finite, and the residual signal dependence during that window is a mechanism this model does not have.

No channel-length modulation of the injected charge, and no drain-source split by impedance. The share is a parameter here rather than a computed quantity, for the reason given above.

And no substrate coupling. The clock edge that turns the switch off also couples into the substrate and from there to every other node, which on an integrated converter is a signal-independent disturbance that is nonetheless synchronous with the sample — so it appears as an offset with a spectrum, and the noise a clock does not make is the rung that distinguishes the two.

Why it is called distortion anyway

The name in general use is charge injection distortion, and the measurements above say it is a gain error by two orders of magnitude. It is worth explaining the discrepancy rather than declaring the name wrong, because both descriptions come from real observations.

The residual measured here is small because the signal range used is a volt on a 3.3 V supply, well inside the region where the switch conducts. Push the signal towards the clock’s high level and the bracket VgsVthV_{gs} - V_{th} approaches zero: the charge falls to nothing, the curve’s slope steepens enormously, and the fit’s residual grows with it. A converter driven to within half a volt of its positive rail has a genuinely nonlinear injection, and one driven over a third of its range does not.

So the name records the failure at the top of the range, which is exactly where a converter is specified and exactly where a designer is tempted to operate. The transmission-gate repair — a p-channel device in parallel, whose injection rises where the n-channel’s falls — is aimed at that region and is a partial cancellation with its own signal dependence.

The shape of the answer

A quantity everybody calls an offset, decomposed, turns out to be five per cent offset, ninety-five per cent gain error and a fortieth of a per cent distortion. The word was wrong in a way that matters, because a gain error is removed by a technique that costs an amplifier’s gain and an offset is removed by a technique that costs nothing.

And the number that decides how much of it survives is the same number the guard ring and the feedback loop spend: how much gain there is at the moment the switch opens.

That is the third time in this collection that a technique’s value has turned out to be exactly a loop gain — the amplifier inside the sample found the same factor deciding what an amplifier contributes to a sampled floor — and it is worth noticing that in all three the loop gain in question is at the frequency of the event rather than at direct current. A switch opens in nanoseconds. The gain available then is not the gain on the data sheet’s first page.

How far apart those two numbers are is measured directly elsewhere. The ideal amplifier, and where it stops being one finds a closed-loop gain a tenth of a per cent low at direct current, one per cent low by 1.35 kHz, and with no loop gain left above 10 kHz — so an event at a megahertz is happening several decades past the point where the loop has stopped existing. And the node that is at ground for a while measures the same running-out on the node a switch of this kind opens onto: a tenth of an ohm at direct current, ten ohms at a kilohertz, and 909 ohms above a megahertz, which is the feedback network alone with the amplifier contributing nothing.

Read against those, the arrangement measured here is doing something better than dividing by a loop gain. It is arranging for the charge to be injected while the node is still low-impedance and the error still correctable, which is a statement about ordering in time rather than about gain — and the reason a change of ordering costing nothing can be worth a factor of the amplifier’s whole gain.

Which puts this result in the same family as one in the digital field, where the same kind of free improvement is available for the same kind of reason. Which section goes first enumerates the twenty-four orders of a four-biquad cascade — all realising the identical transfer function — and finds round-off floors running from 24 to 100 least significant bits, with thirteen of the twenty-four beaten on both counts by another arrangement. There as here, nothing has been added, nothing has been made more accurate, and a factor of four has been obtained by deciding what happens before what.

Part 3 on switched capacitor

One argument about Switched capacitor, and one of 3 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 objects named here

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

Charge injectionDevice mismatchGain errorKt over cLoop gainMeasurement errorSampled dataSwitched capacitor