Filters, measured not tabulated

The node the inputs share

A stray-insensitive switched-capacitor integrator moves its plate strays out of the coefficient and into the amplifier's gain error, and that error belongs to the summing node, not to any input. Every input on the node hangs its capacitor, its stray and its switch's junction there, so the error grows with the fan-in — 0.146% with one input at a gain of a thousand, 0.515% with twelve, 0.034% for each — and every coefficient on the node carries the same error, so their ratios are exact to the last digit. A one-plate input's error is its own stray over its own capacitor, 60% on 0.5 pF and 7.5% on 4, and its ratios move. A careful one-plate layout's 1% is reached by a two-plate node only at 27 inputs, or below a gain of 145. In a biquad the two nodes' errors move the corner by their mean and the Q by half their difference, so the fan-in each integrator carries is a Q budget. And a small feedback capacitor magnifies all of it: 3.33% for twelve inputs on 0.5 pF.

Assumes: A resistor made of a clock · What a steep skirt costs

The capacitance at the switched plate found that a switched-capacitor integrator can be made insensitive to the stray capacitance at its switched plates by switching both plates and integrating into a virtual ground. The stray that would have been a tenth of error is moved into a term divided by the amplifier’s gain, and what is left is that gain’s own error — (1+(Cx+Cs+Cp)/Cf)/A(1 + (C_x + C_s + C_p)/C_f)/A, 0.14 per cent at a gain of a thousand. In that expression CxC_x was the amplifier’s input capacitance, a half picofarad, and the integrator had one input.

An integrator inside a filter has several. A biquad’s first integrator takes the filter’s input and the feedback from the second; its second takes the first’s output and a damping path of its own; a higher-order filter’s integrators take three or four. Each input brings a switch with a junction at the summing node, a sampling capacitor that meets the node in the transfer phase, and a stray at the plate that does the meeting. The question that essay left is how the error grows with the number of inputs on one node, and whether it ever overtakes a careful one-plate layout. It has a sharper answer than the question suggests, because the error turns out to belong to the node.

Every input on a summing node adds its capacitance to the node's error: 0.146% with one input at a gain of 1000, 0.515% with twelve — and a careful one-plate input's 1% would take 27 inputs to reachcomputed by solving, not by drawing, by charge conservation at the summing node in the transfer phase: a stray-insensitive integrator with Cf = 4 pF and 0.5 pF at the amplifier's input, at a gain of 1000, with n inputs of 1 pF, each bringing 0.3 pF of stray at its summing-node plate and 0.05 pF of switch junction. The coefficient error is 0.146% at 1, 0.213% at 3, 0.314% at 6, 0.515% at 12 — 0.0336% more for each input, in proportion to the capacitance it hangs on the node over Cf, divided by A. A one-plate input with a careful 1% stray has an error of 1% however many share its node; the two-plate node reaches that at 26.6 inputs. A bottom-plate stray of 15% would take 520.00.2000.4000.6000.80011.20124681012inputs on one summing nodecoefficient error (per cent)two plates, the node's error0.146% → 0.515%one plate, 1% stray1%, on its own inputeach input adds0.0336%reaches 1% at27 inputssolved, then checked — charge conserved at the nodethe error belongs to the node
Fig. 1 A stray-insensitive integrator with Cf = 4 pF and 0.5 pF at the amplifier’s input, at a gain of a thousand, with n inputs of 1 pF each bringing 0.3 pF of plate stray and 0.05 pF of switch junction: the coefficient error by charge conservation (dots) and in closed form (line). 0.146% with one input, 0.515% with twelve; a one-plate input with a careful 1% stray would be reached only at 27 inputs. The slider is the amplifier’s gain.

One equation for the node

In the transfer phase the summing node is an isolated conductor. Whatever charge it held before, plus whatever the arriving plates bring, must be what it holds once the amplifier has settled. Before the phase it holds the feedback capacitor’s charge and that of everything permanently on the node — the amplifier’s input and the junctions of every switch that meets it. Each arriving sampling capacitor brings the charge it took from its input, −CsVin-C_s V_{in}; its plate stray, which was grounded in the sampling phase, brings nothing. Once they have arrived every one of them sits at the same node voltage, Vx=−Vo/AV_x = -V_o/A. Solving for the new output,

Vo[n](Cf+Cf+Cx+n(Cs+Cp+Cj)A)=Vo[n−1](Cf+Cf+Cx+nCjA)+∑iCs,iVin,i[n].V_o[n]\Big(C_f + \frac{C_f + C_x + n(C_s + C_p + C_j)}{A}\Big) = V_o[n-1]\Big(C_f + \frac{C_f + C_x + nC_j}{A}\Big) + \sum_i C_{s,i}V_{in,i}[n].

The coefficient of every input has the same denominator, and that denominator contains every capacitance on the node. So the coefficient error, the shortfall of each input’s step from Cs,i/CfC_{s,i}/C_f, is

ε=1−CfCf+(Cf+Cx+n(Cs+Cp+Cj))/A,\varepsilon = 1 - \frac{C_f}{C_f + \big(C_f + C_x + n(C_s + C_p + C_j)\big)/A},

the same for every input. With one input it is 0.146 per cent at a gain of a thousand; with three, 0.213; with six, 0.314; with twelve, 0.515. Each input adds its 1.35 pF to the node and 0.034 per cent to the error — its capacitance over the feedback capacitor, divided by the gain. The figure’s dots are the charge bookkeeping, the line the closed form, and they agree to the arithmetic’s precision.

An error the node owns

The structure of that equation is the finding, and it is worth stating plainly. In a stray-insensitive integrator the error is not a property of an input. It is a property of the node: one number, set by everything the node carries, and applied to every coefficient that lands there. A one-plate integrator is the opposite. Its stray is charged with the input and dumped with it, so each input’s coefficient is high by its own stray over its own capacitor, and two inputs of different sizes on one node carry different errors.

Four inputs of 0.5 to 4 pF on one node: switched on one plate each carries its own error, 60%, 30%, 15%, 7.5%; switched on two they share one, 0.334%, and their ratios are exact. computed by solving, not by drawing, by charge conservation: an integrator node at a gain of 1000 with four inputs of 0.5, 1, 2 and 4 pF, each with 0.3 pF of stray at its switched plate, Cf = 4 pF. Switched on one plate, each input's stray is charged with it and dumped into the node, so its coefficient is high by its own stray over its own capacitor: 60% for 0.5 pF, 30% for 1 pF, 15% for 2 pF, 7.5% for 4 pF. Switched on both, every input sees one node voltage and one denominator, so every coefficient is low by the same 0.334% and the ratio of any two is the ratio of their capacitors to the last digit — 0.500000, 1.000000, 2.000000, 4.000000 against 0.5, 1, 2, 4. With one plate switched the ratios are 0.6154, 1.0000, 1.7692, 3.3077.
Fig. 2 Four inputs of 0.5, 1, 2 and 4 pF on one node, each with 0.3 pF of plate stray. Switched on one plate, each carries its own error — 60%, 30%, 15% and 7.5% — and their ratios become 0.615 : 1 : 1.77 : 3.31. Switched on two, all four are low by the same 0.334%, and their ratios are 0.5 : 1 : 2 : 4 to the last digit.

The consequence is that any quantity set by a ratio of two coefficients on one node is free of the node’s error entirely. A switched-capacitor filter’s passband gain is very often exactly that: the input capacitor over the capacitor that feeds the output back to the same integrator, both landing on one summing node. In a stray-insensitive design that gain is exact however many inputs share the node and however modest the amplifier. In a one-plate design it carries the difference of the two inputs’ stray ratios, 30 per cent against 7.5 in the figure, which is no use at all.

A resistor made of a clock introduced the switched capacitor as a resistor whose value is a capacitor ratio, and the whole attraction of the technique is that ratios are what a chip makes well. The stray-insensitive arrangement turns out to preserve ratios in a stronger sense than the single-input analysis showed: not only is each coefficient nearly right, but every coefficient on a node is wrong in exactly the same proportion.

When the fan-in beats the layout

That leaves the absolute error, which grows with the fan-in, against the one-plate layout’s, which does not. A one-plate input with a careful layout — its switched plate the top plate, its stray a per cent of the capacitor — has an error of one per cent whatever else shares its node. The two-plate node’s error passes one per cent at 27 inputs of this size at a gain of a thousand, which no real filter’s integrator carries. Against a bottom-plate stray of fifteen per cent it would take 520.

The gain below which a two-plate node loses to a careful one-plate input: 145 with 1 input, 212 with 3 inputs, 379 with 8 inputs — and against a bottom plate's 15%, 8.3, 12.1, 21.7. computed by solving, not by drawing, checked by charge conservation at each crossing: the coefficient error of a stray-insensitive integrator node against the amplifier's gain, with 1, 3 and 8 inputs of 1 pF on a 4 pF feedback capacitor. It falls as 1/A, 0.146% for 1 at a gain of a thousand, 0.213% for 3 at a gain of a thousand, 0.38% for 8 at a gain of a thousand. A one-plate input with 1% stray (the 1% line) has that error at every gain, so the two-plate node is the worse below a gain of 145 for 1, 212 for 3, 379 for 8. Against a bottom-plate stray of 15% the two-plate node loses only below 8.3, 12.1, 21.7: never, for any amplifier worth the name.
Fig. 3 The node’s coefficient error against the amplifier’s gain, with 1, 3 and 8 inputs of 1 pF on a 4 pF feedback capacitor, beside a one-plate input’s 1% (the level line). The two-plate node is the worse below a gain of 145 with one input, 212 with three and 379 with eight; against a bottom plate’s 15% it loses only below a gain of 8 to 22.

The trade is decided by the gain rather than by the fan-in. The node’s error falls as 1/A1/A, so the gain below which it exceeds a one-plate input’s one per cent is a number: 145 with one input, 212 with three, 379 with eight. Those are low gains for a precision amplifier and ordinary ones for a fast, low-power one — the single-stage transconductance amplifiers that switched- capacitor circuits favour for their speed often have open-loop gains of a few hundred. For such an amplifier a careful one-plate layout is the more accurate in absolute terms for every filter integrator with more than a couple of inputs, and the two-plate layout’s advantage is reduced to the ratio property of the last section.

Against a bottom-plate stray the two-plate node wins at every gain above 22, which is to say always. The choice the gain decides is between a stray-insensitive integrator and a carefully laid out one-plate integrator, and it is decided by the amplifier the process can make rather than by the filter.

What a biquad does with two nodes’ errors

A filter’s coefficients sit on several nodes, and the nodes’ errors differ when their fan-in does. The second-order section built from two integrators in a loop is the simplest case, and its poles say what two unequal node errors do.

In a two-integrator biquad the nodes' shared errors move the corner by their mean and the Q by half their difference: equal nodes cost 0.187% of corner and no Q; six extra inputs on one cost 0.288% and 0.094%. computed by solving, not by drawing: the poles of a two-integrator loop, from its state matrix, with every coefficient on each integrator's node scaled by that node's error at a gain of 1000 — two inputs on each node, then up to eight more on the first. Read as a corner and a Q, the corner falls by 0.187% with the nodes equally loaded and the Q moves by under a hundredth of a per cent; each extra input on the first node raises that node's error by 0.0336%, and lowers both the corner and the Q by half of it: 0 extra, corner −0.187% and Q 0.00704%; 2 extra, corner −0.221% and Q −0.0267%; 4 extra, corner −0.254% and Q −0.0603%; 8 extra, corner −0.321% and Q −0.128%. Both match −(ε₁ + ε₂)/2 and −(ε₁ − ε₂)/2. A filter's Q is a ratio across its nodes, and an imbalance in their fan-in is what moves it.
Fig. 4 A two-integrator loop with two inputs on each node, then up to eight more on the first, at a gain of a thousand, from the poles of its state matrix. With the nodes equally loaded the corner falls 0.187% and the Q moves by under a hundredth of a per cent; each extra input on the first node lowers the corner and the Q by half of the 0.034% it adds to that node’s error.

The loop’s corner frequency is set by the product of the two integrators’ gains and its Q by the ratio of that product’s square root to the damping, which sits on the second node. Scaling every coefficient on each node by its own error, the corner moves by minus the mean of the two errors and the Q by minus half their difference, −(ε1−ε2)/2-(\varepsilon_1 - \varepsilon_2)/2, to first order; the poles of the state matrix confirm both to a few parts in a hundred thousand. With two inputs on each node the errors are equal, the corner is 0.187 per cent low, and the Q does not move. Eight extra inputs on the first node take the corner to 0.321 per cent low and the Q to 0.128 per cent low.

This is the node property again, read across two nodes. A coefficient error common to a whole filter moves its frequency scale and nothing else, which is almost always tolerable — a switched-capacitor filter’s frequency is tied to its clock, and a few tenths of a per cent of frequency error is the same as a few tenths of a per cent of clock error. What moves the shape is a difference between nodes, and the difference comes from unequal fan-in. A designer laying out a filter can therefore buy shape accuracy by balancing the capacitance each integrator’s node carries, adding dummy switches to the lightly loaded nodes if need be — a trade of absolute accuracy for relative, which is the trade the stray-insensitive arrangement already makes within one node.

A fourth-order filter, counted node by node

The rule is easiest to use on a real topology. A fourth-order switched-capacitor low-pass built as two cascaded biquads has four integrators, and a typical arrangement gives them fan-ins of two, three, three and two: each first integrator takes its section’s input and the feedback from its partner, each second takes its partner’s output, its own damping and, in the first section, the path that feeds the second section. With a single-stage amplifier of gain 300 the node errors are 0.596 per cent for a node of two inputs and 0.708 for a node of three.

So each section has a 0.11 per cent imbalance between its two nodes, and its Q is out by half of that, 0.056 per cent, while its corner is out by about 0.65. Those are small numbers, and the point of counting them is which of them a designer can do something about. The corner error is common to the whole filter and is absorbed by trimming the clock. The Q errors are local, and balancing each section’s fan-in with one dummy switch on its lighter node removes them. Where the Q comes from found two continuous-time sections with identical transfer functions differing completely in how their Q responds to the amplifier; for a switched-capacitor section the corresponding statement is that two layouts with the same capacitor ratios differ in Q accuracy according to how evenly their nodes are loaded.

The same count explains why a switched-capacitor simulation of an LC ladder filter behaves differently from a cascade under amplifier error. A ladder is not a cascade found a ladder filter’s low sensitivity coming from the way its elements share the passband; in a switched-capacitor ladder filter every integrator node carries two or three inputs from its neighbours, the fan-ins are nearly equal by construction, and the node errors fall almost entirely into the frequency scale. A cascade’s sections can be balanced too, but only by deliberate layout.

Small feedback capacitors magnify all of it

Every term in the node’s error is a capacitance over the feedback capacitor. A filter with a low corner needs large ratios of feedback to sampling capacitance, and to keep the sampling capacitors from becoming enormous it is the sampling capacitors that are made small; but filters with high corners and modest area budgets end up with feedback capacitors of a picofarad or less, and there the node’s fixed capacitance is no longer small against them.

A small feedback capacitor magnifies every input on its node: at 0.5 pF the node's error is 0.468% with one input and 3.33% with twelve, at 16 pF 0.111% and 0.204%. computed by solving, not by drawing, by charge conservation: the coefficient error of a stray-insensitive node at a gain of 1000, with 1, 4 and 12 inputs, against the feedback capacitor. The node's capacitance enters over Cf, so a small feedback capacitor — which a low-frequency filter needs, to keep its sampling capacitors from becoming enormous — magnifies every input's contribution: 1 input: 0.468% at 0.5 pF, 0.146% at 4, 0.111% at 16; 4 inputs: 1.26% at 0.5 pF, 0.247% at 4, 0.137% at 16; 12 inputs: 3.33% at 0.5 pF, 0.515% at 4, 0.204% at 16. With Cf large against the node the error approaches 1/A, 0.1%.
Fig. 5 The node’s coefficient error at a gain of a thousand against the feedback capacitor, with 1, 4 and 12 inputs. At 0.5 pF it is 0.468%, 1.26% and 3.33%; at 4 pF 0.146%, 0.247% and 0.515%; at 16 pF 0.111%, 0.137% and 0.204%, approaching the amplifier’s own 0.1%.

At 0.5 pF of feedback capacitance one input puts the node’s error at 0.468 per cent and twelve at 3.33 — the error that was a fifth of a per cent at 4 pF is now worse than a careful one-plate layout. At 16 pF all three fan-ins approach the amplifier’s own floor of 1/A1/A, because the node’s capacitance is small against the feedback. So the fan-in that matters is the fan-in measured in units of the feedback capacitor: twelve picofarad-sized inputs on a half-picofarad feedback capacitor are a node carrying thirty-two times its feedback capacitance, and the gain divides that by only a thousand.

The practical rule that follows is that the inputs a node carries should be counted together with the capacitor that integrates them. The filter that samples found the filter’s corner set by a capacitor ratio; the accuracy of that ratio is set by another ratio, the node’s total capacitance over the feedback, divided by the gain.

When the gain moves

An amplifier’s open-loop gain is not a constant over temperature or supply: a single-stage amplifier’s gain is a product of transconductance and output resistance, and both fall as the die warms, so a gain of 300 at room temperature may be 200 at the top of the range. Every node’s error is inversely proportional to the gain, so every node’s error grows by the same factor, and the node property carries over to the drift. The common part moves the whole filter’s frequency scale, by about a third of a per cent across the range in the fourth-order example. The difference between nodes grows by the same factor as each node’s error, so a section whose fan-in is balanced keeps its Q across temperature and one that is unbalanced drifts in Q in proportion to its imbalance. The Q designed for the amplifier predistorted a continuous-time section for its amplifier’s finite bandwidth and found the correction good at one temperature; a balanced switched-capacitor section needs no correction for its amplifier’s gain at any temperature, because the error it would correct cancels inside the ratio that sets its Q.

Where the junctions are and are not counted

The model gives each input one junction at the summing node, for the switch that connects its sampling capacitor there, and that is the honest count for the transfer phase. It omits two things. A switch that grounds the summing-node plate in the sampling phase has its own junction at that plate, which is part of the plate stray rather than of the node and is already in CpC_p; and the amplifier’s input capacitance may itself depend on the common-mode level, which the virtual ground holds still, so treating it as fixed is fair.

What the model does not do is let the junctions leak. A junction at the summing node carries a reverse current, small at room temperature, which integrates on the feedback capacitor as an offset that grows each cycle; with many inputs the junction currents add exactly as their capacitances do. The average an integrator can hold found the integrator’s own leak limiting how long it can average; a summing node with a dozen junctions on it has a second leak of the same form, scaled by the fan-in and by the temperature.

The charge each input leaves

The fan-in also multiplies an error the single-input analysis treated separately. The offset that knows the signal found that each switch leaves a charge on the capacitor it samples, proportional to its gate area and its overdrive. In the stray-insensitive arrangement the switches that meet the summing node all inject into the same node at the same clock edge, and their charges add. Those that turn off with the node at the virtual ground inject a charge that does not depend on the signal, which the node’s equation turns into a fixed offset per cycle; those whose overdrive depends on the input inject a signal-dependent part, which is a coefficient error that, unlike the gain error, does not belong to the node but to each switch. How the signal-dependent part grows with the fan-in, against the gain error that grows with it too, is the next measurement the node invites.

The numbers worth keeping

Charge conservation at a stray-insensitive node gives every input the same coefficient error, 1−Cf/(Cf+(Cf+Cx+n(Cs+Cp+Cj))/A)1 - C_f/(C_f + (C_f + C_x + n(C_s + C_p + C_j))/A): 0.146 per cent with one input at a gain of a thousand, 0.515 with twelve, 0.034 for each 1.35 pF input on a 4 pF feedback capacitor. Coefficients on one node keep their ratios exactly; one-plate inputs carry their own errors, 60 per cent on 0.5 pF and 7.5 on 4, and their ratios move. A careful one-plate layout’s 1 per cent is reached at 27 inputs, or below a gain of 145 with one input and 379 with eight. In a biquad the nodes’ errors move the corner by their mean and the Q by half their difference. On a 0.5 pF feedback capacitor twelve inputs cost 3.33 per cent. The Q the amplifier decides found an active filter’s Q at the mercy of its amplifier’s gain-bandwidth; a switched-capacitor filter’s Q is at the mercy of its nodes’ fan-in balance, divided by its amplifiers’ gain.

Still open: a gain that depends on the output, settling with the node loaded, and the injected charge that adds

A gain that depends on the output. Every figure here treats the amplifier’s gain as a constant. A real amplifier’s gain falls as its output approaches a rail, so the node’s error grows with the signal — a distortion whose size is the node’s capacitance over the feedback, divided by a gain that is no longer constant. A node with a large fan-in is then more nonlinear as well as less accurate, by the same ratio.

Settling with the node loaded. Every coefficient assumes the amplifier settles completely in each phase. The node’s capacitance is also the amplifier’s load in the transfer phase, through the feedback factor Cf/(Cf+Cnode)C_f/(C_f + C_{node}), so a large fan-in slows settling as well as adding gain error. Which limit binds first at a given clock rate — the incomplete settling or the finite gain — is a march with the node’s capacitance in it.

The injected charge that adds. Each switch that meets the node injects charge at the same clock edge. The signal-independent part is an offset common to the node; the signal-dependent part is a per-switch coefficient error. How the second grows with the fan-in against the first, and whether a node with many inputs is limited by charge injection before it is limited by gain, is the comparison the node’s equation sets up.

Part 5 on Switched-capacitor

One argument about Switched-capacitor, 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.

Capacitor ratioGain errorLoop gainParasiticsQuality factorSampled dataSwitched-capacitor