Filters, measured not tabulated

The zeros that buy an order

Butterworth, Chebyshev and Bessel all fall because their denominator grows, so the only way to make one fall faster is another pole. An elliptic filter puts zeros in the stopband instead, and reaches forty decibels at twice the corner with two poles where the steepest all-pole family needs five. What it charges is a stopband that stops falling — measured here at −38.7 dB, and overtaken by an ordinary Chebyshev two corners out.

Assumes: Three families, one corner · Where the behaviour is written down

Three families were compared in this field and the comparison was fair: each one’s poles computed from its own definition, each normalised to its own measured half-power point, each built as a network and then measured on the network. What none of the three does is put a zero anywhere.

That is not a detail of those three families. It is a property of the kind of filter they are. A Butterworth, a Chebyshev and a Bessel response are each a constant over a polynomial, so the magnitude falls only because the denominator grows, and it grows at a rate set by the number of poles and by nothing else. Twenty decibels per decade per pole, forever, with the family deciding only how the fall begins.

There is another way to make a response small at a frequency, and it is much more direct: arrange for the numerator to be zero there.

Four families at order 5, and the 2 zeros in the stopbandcomputed by solving, not by drawing. The elliptic design is drawn at a selectivity of 0.8, so its stopband is asked to begin at 1.250 times the corner, and the degree equation returns 38.68 dB for it at 0.5 dB of ripple. From the stopband edge outward the elliptic response never rises above -38.7 dB; the steepest all-pole family of the same order is only -19.0 dB down there and does not reach -38.7 dB until 1.77 times the corner. That is what 2 transmission zeros buy. The price is in the same picture: the elliptic stopband has a floor and an all-pole one does not, so beyond 2.0×fc the all-pole response is the lower of the two and keeps going.0-20-40-60-801k10kfrequency (hertz)magnitude (decibels)2 transmission zerosstopband floor -38.7 dBButterworthChebyshevBesselellipticall-pole overtakes at 2.0×fcall-pole reaches the floor at 1.77×fcsolved, then checked — zeros against polesthe floor held from 1.25×fc, reached at 1.77×
Fig. 1 Four families at the fifth order, normalised to the same measured corner. Three of them fall smoothly. The fourth has two frequencies at which it is not merely small but zero, and between and beyond them it comes back up to a floor and stays there. Both halves of that are what a transmission zero does. The slider is the order.

Where a zero comes from, and where it can go

A transmission zero is a frequency at which no signal reaches the output at all. In a network it happens when some path develops an infinite impedance or a perfect short at exactly that frequency, which needs a resonance — an inductor and a capacitor arranged so that one of them cancels the other. So a filter with zeros in its stopband is a filter with resonant branches in it, and that is the first thing that makes this family more expensive to build than the other three.

The second is the mathematics of where to put them. Placing zeros is not free: every zero pulls the response up on either side of itself, and putting them badly gives a stopband that is deep in two narrow places and poor everywhere else. The optimal placement — the one that makes the worst stopband rejection as good as it can be for a given order — is a problem in elliptic functions, and that is the whole reason this family was left out when this field was first built. The foundation phase recorded it as a stated gap in exactly those terms.

The solution is worth a paragraph, because it is short and it needs no tables at all. The elliptic functions sn and cd are what sine and cosine become when the “circle” they parameterise is stretched into an ellipse of modulus kk. There is a transformation — Landen’s — that takes a problem of modulus kk into one of modulus k1<kk_1 < k, and iterating it drives the modulus to zero quadratically, where sn and cd degenerate into sin and cos. So an elliptic function is evaluated by walking down to a circular one and climbing back through the transformation:

w(1+kn)w1+knw2w \leftarrow \frac{(1+k_n)\,w}{1 + k_n w^2}

one line per level, six levels for machine precision, and it works over the complex plane unchanged because it is arithmetic. That is all lib/filter.js contains on the subject, and the poles of an elliptic filter are cd evaluated off the real axis.

The specification decides how much it is worth

The interesting comparison is not “which is steeper at some frequency” — that question has different answers at different frequencies, and this family’s answer changes sign. It is the question a designer actually has: given this stopband requirement, what does each family cost?

The order each family needs for 40 dB at 2×fc. computed by solving, not by drawing, by building every order of every family and testing it rather than by inverting a formula — which is the only way the elliptic family can be in the comparison at all, since its attenuation is not a closed form in the order. The elliptic family reaches 40 dB at 2 times the corner at order 2; the best all-pole family needs order 5. Those 3 poles are what the transmission zeros replace. Bessel never gets there inside 12 poles: at 12 it is still only -12.9 dB down.
Fig. 2 The lowest order of each family that reaches forty decibels of rejection at twice the corner frequency, found by building every order of every family and testing it. The elliptic design is given the same specification as the others rather than a fixed shape, which matters: designed at some other selectivity and then tested against this requirement, it comes out level with Chebyshev, and that is a fact about the mismatch rather than about the family. The same comparison at sixty decibels is further down this page.

Two poles against five. That is not a marginal improvement; it is the difference between a filter somebody builds and one they argue about. And the reason is exactly the one above: the all-pole families are spending order on the slope, and slope is a poor way to get rejection at a particular frequency when a zero can be placed there directly.

The Bessel family does not appear in the comparison at all, and the figure says so rather than omitting it. At twelve poles it is still only 12.9 dB down at twice its corner. That is not a failure of the search; it is what a maximally flat delay costs in the magnitude domain, and this field measured it two essays ago from the other side.

What is bought, and what is charged

Every trade on this site is drawn with both halves in the same picture, because a trade drawn with one half is an advertisement. The first figure has both.

The elliptic response is at its floor from the stopband edge onward — from 1.25 times the corner in that drawing — and it never rises above −38.7 dB again. The steepest all-pole family of the same order is only 19.0 dB down at that frequency and does not reach −38.7 dB until 1.77 times the corner. Inside that region the elliptic filter is decisively better.

Outside it, the ordering reverses. The all-pole response keeps falling and the elliptic response does not, so they cross — at twice the corner in the fifth-order drawing — and beyond the crossing the ordinary Chebyshev is the deeper of the two and getting deeper. Which of the two matters depends entirely on where the thing being rejected actually is. A filter protecting a converter from one nearby interferer wants the elliptic; a filter that has to keep everything above a decade out below some level wants the poles.

The floor is not an implementation defect and cannot be engineered away. It is what the degree equation returns:

NK(k)K(k)=K(k1)K(k1)N \frac{K'(k)}{K(k)} = \frac{K'(k_1)}{K(k_1)}

Order, selectivity and stopband attenuation are three quantities with two degrees of freedom between them. Choose the passband ripple and the transition width, and the attenuation is decided — not approximately, and not as a bound. lib/filter.js computes it through the nome q=eπK/Kq = e^{-\pi K'/K}, where the equation is simply q1=qNq_1 = q^N, and the figure checks the answer against the built network: the measured stopband floor agrees with the degree equation to about a hundredth of a decibel, and the stopband peaks are all at that level to within 0.2 dB, which is what “equiripple” means and is a property of the circuit here rather than of the polynomial that produced it.

Four families at order 7, and the 3 zeros in the stopband. computed by solving, not by drawing. The elliptic design is drawn at a selectivity of 0.8, so its stopband is asked to begin at 1.250 times the corner, and the degree equation returns 62.62 dB for it at 0.5 dB of ripple. From the stopband edge outward the elliptic response never rises above -62.6 dB; the steepest all-pole family of the same order is only -29.9 dB down there and does not reach -62.6 dB until 1.88 times the corner. That is what 3 transmission zeros buy. The price is in the same picture: the elliptic stopband has a floor and an all-pole one does not, so beyond 2.4×fc the all-pole response is the lower of the two and keeps going.
Fig. 3 The seventh order, where the family’s character is unmistakable: three transmission zeros packed into the first octave above the corner, a stopband floor sixty-odd decibels down, and a crossing with the all-pole families pushed further out because the floor is deeper. Order buys floor depth here rather than slope, which is the opposite of what it buys in the other three families.
Three filter families at order 5, all with the same half-power point. At three times the corner the Chebyshev is -64.0 dB down, the Butterworth -47.7 dB and the Bessel -28.3 dB. The inset is the passband at forty times the vertical magnification, which is the only place the Chebyshev's half-decibel of ripple is visible at all.
Fig. 4 The three all-pole families at the same order, which is the figure this field opens with. Nothing in it has changed and it is worth having beside the elliptic response: what the fourth family adds is not a steeper version of these curves but a different mechanism, and the two are easier to tell apart when the pole-only case is in view.

The section, and why the obvious one will not do

A conjugate pole pair becomes a series-resonant section in the realisation this site has used since the filter field was built: a resistor, an inductor and a capacitor, with the output taken across the capacitor. That gives a second-order low-pass of natural frequency p|p| and quality factor p/2Rep|p|/2|\mathrm{Re}\,p|, and it has no zero at any finite frequency at all.

The obvious repair is to put the resonance somewhere it can null the output — a series inductor and capacitor to ground, which is a short circuit at 1/LC1/\sqrt{LC}. That does produce a zero. It also produces a pole at the same frequency, and an elliptic design needs the zero above the pole by a stated ratio. One inductor and one capacitor cannot separate them: whatever the arrangement, the two frequencies come out equal, because there is only one resonance in the section to place.

Four families at order 4, and the 2 zeros in the stopband. computed by solving, not by drawing. The elliptic design is drawn at a selectivity of 0.8, so its stopband is asked to begin at 1.250 times the corner, and the degree equation returns 26.72 dB for it at 0.5 dB of ripple. From the stopband edge outward the elliptic response never rises above -26.2 dB; the steepest all-pole family of the same order is only -14.0 dB down there and does not reach -26.2 dB until 1.64 times the corner. That is what 2 transmission zeros buy. The price is in the same picture: the elliptic stopband has a floor and an all-pole one does not, so beyond 1.7×fc the all-pole response is the lower of the two and keeps going.
Fig. 5 The fourth order. The elliptic response holds −26.2 dB from 1.25 times the corner; the all-pole one of the same order reaches that only at 1.64 times, and overtakes the elliptic at 1.7. The section, and why the obvious one will not do, follows from the zero: a transmission zero at a finite frequency needs a resonant branch, and no cascade of simple poles produces one.

The answer is to split the capacitance. The series arm is an inductor with CpC_p across it, so it is an open circuit at ωz=1/LCp\omega_z = 1/\sqrt{LC_p} and nothing gets through; the shunt arm is the rest of the capacitance with the damping resistor, and the pole pair belongs to the total capacitance Cp+C2C_p + C_2. The two frequencies are therefore separated by exactly the ratio of the capacitances, and there is nothing to adjust independently:

ωzω0=Cp+C2Cp\frac{\omega_z}{\omega_0} = \sqrt{\frac{C_p + C_2}{C_p}}

Four families at order 5, and the 2 zeros in the stopband. computed by solving, not by drawing. The elliptic design is drawn at a selectivity of 0.8, so its stopband is asked to begin at 1.250 times the corner, and the degree equation returns 41.95 dB for it at 1 dB of ripple. From the stopband edge outward the elliptic response never rises above -41.9 dB; the steepest all-pole family of the same order is only -19.0 dB down there and does not reach -41.9 dB until 1.88 times the corner. That is what 2 transmission zeros buy. The price is in the same picture: the elliptic stopband has a floor and an all-pole one does not, so beyond 2.1×fc the all-pole response is the lower of the two and keeps going.
Fig. 6 The fifth order again with a full decibel of passband ripple rather than the default half. The elliptic response holds −41.9 dB from 1.25 times the corner where the half-decibel design holds −38.7, the all-pole design reaches that only at 1.88 times, and the crossover moves out to 2.1. More ripple buys stopband depth in both families and buys it faster in the elliptic one, which is the third axis of a decision usually presented as two.

The part of this worth noticing is the last line of the earlier figure’s caption. Far above both frequencies the inductor is out of the picture and the section is a capacitive divider, so the response settles at Cp/(Cp+C2)C_p/(C_p+C_2) — which is the same ratio, inverted. The zero’s placement and the stopband floor are one choice and not two. Asking for a zero close to the passband, which is what a steep skirt needs, is asking for most of the capacitance to be in the series arm, which is asking for a shallow floor. That is the trade of the whole family, visible in one section, and the figure asserts it: the measured high-frequency level agrees with Cp/CtotalC_p/C_\text{total} to two hundredths of a decibel.

Four families at order 3, and the 1 zeros in the stopband. computed by solving, not by drawing. The elliptic design is drawn at a selectivity of 0.8, so its stopband is asked to begin at 1.250 times the corner, and the degree equation returns 14.89 dB for it at 0.5 dB of ripple. From the stopband edge outward the elliptic response never rises above -14.9 dB; the steepest all-pole family of the same order is only -9.5 dB down there and does not reach -14.9 dB until 1.48 times the corner. That is what 1 transmission zero buy. The price is in the same picture: the elliptic stopband has a floor and an all-pole one does not, so beyond 1.6×fc the all-pole response is the lower of the two and keeps going.
Fig. 7 And the third order, the shallowest drawn. Across the orders the elliptic’s held stopband runs deeper and the frequency at which the all-pole design overtakes it moves out — so the elliptic buys an order near the transition and gives it back far into the stopband, which is a trade rather than a free order.

What it costs in the other domain

This field’s second essay measured what a steep skirt costs in delay, and every result there applies here with more force. An elliptic filter has the highest pole Q of the four families at any given order, its poles sit closest to the imaginary axis, and its group delay peaks hardest at the band edge.

So the ordering is consistent and worth stating once: Bessel, Butterworth, Chebyshev, elliptic is the order of increasing steepness, of increasing passband ripple where there is any, of increasing delay variation, and of increasing sensitivity to component tolerance. There is one axis here with four families on it, not four independent choices, and the next essay in this field measures the last item on that list — which turns out to depend more on how the filter is built than on which family it is.

Four families at order 6, and the 3 zeros in the stopband. computed by solving, not by drawing. The elliptic design is drawn at a selectivity of 0.8, so its stopband is asked to begin at 1.250 times the corner, and the degree equation returns 53.92 dB for it at 1 dB of ripple. From the stopband edge outward the elliptic response never rises above -52.9 dB; the steepest all-pole family of the same order is only -24.3 dB down there and does not reach -52.9 dB until 1.91 times the corner. That is what 3 transmission zeros buy. The price is in the same picture: the elliptic stopband has a floor and an all-pole one does not, so beyond 1.9×fc the all-pole response is the lower of the two and keeps going.
Fig. 8 And the sixth order at a decibel of ripple, the largest ripple this page draws. Across the six settings the elliptic response’s held stopband runs from −14.9 dB at order three to −62.6 dB at order seven, with this one at −52.9 — a decibel of ripple at order six buying 2.7 dB over the half-decibel design and still not reaching what a seventh order gives at half the ripple. And the frequency at which an all-pole design of the same order overtakes it moves out with every one of them. The zeros buy an order near the transition and give it back far into the stopband; what decides whether that is a good trade is where the specification’s stopband actually is.

Two routes, as always

Nothing above would be worth printing if the elliptic response in these figures came from the same place as the design. It does not, and the check is the one this site applies to everything.

The design produces a set of poles and a set of transmission zeros. Those are turned into a network — real inductors, real capacitors, real resistors, in the section topology above — and the network is handed to the same nodal solver as every other figure on this site, which verifies Kirchhoff’s current law and the energy balance on every solve before returning an answer. The response drawn is the network’s. The response the design predicts is computed separately from the poles and zeros as a ratio of polynomials.

Across five decades the two agree to 4 × 10⁻¹² of a decibel. That is not a tolerance anybody chose; it is where double-precision arithmetic gives out, and it is what a correct synthesis looks like when it is checked against an independent computation of the same thing.

The equiripple property gives a second, stronger check that needs no reference values at all. An equiripple response is one whose stopband peaks are equal, and nothing in the code enforces that — it is a consequence of the pole and zero placement being right. If the Landen recursion were wrong, or the degree equation misapplied, or v0v_0 solved on the wrong branch, the peaks would not be level. Measured on the built network at the fifth order they are level to within two hundredths of a decibel, and the passband ripple is 0.5000 dB against a design value of 0.5.

That is the argument for computing a special function rather than looking one up. A table has to be trusted; a recursion that produces an equiripple response can be checked, by asking whether the response is equiripple.

What the design refuses

The habit this site runs on is that an assertion which has never rejected anything proves nothing, so every piece of machinery here ends by being fed input it must decline. The elliptic design has two such inputs and they fail differently, which is the interesting part.

A selectivity outside the open interval from zero to one is refused by name. It is not a small number or a large one; it is a ratio of two frequencies, the passband edge over the stopband edge, and a value of one means the two edges are the same frequency — a filter with no transition band at all, which is not a hard design but an impossible one. A value above one means the stopband starts below the passband, which is a different filter described with the wrong words. Neither is approximated, and neither returns a large plausible number: ellipticDesign throws, and the site’s gate asserts that it does.

The second is subtler and is not refused, because it is legitimate: an order of two with a selectivity of 0.9 produces a design whose stopband floor is about four decibels. That is a filter, it is correctly computed, and it is useless — the equiripple stopband is real and the ripples are level, and they are level at a height that rejects nothing. Nothing in the mathematics warns about it. What warns about it is the third figure above, which draws the floor as a line rather than quoting a rejection figure from the passband edge alone, so a design that has none is visibly a design that has none.

What is still not here

Two things, stated rather than left to be discovered.

The zeros are placed by the approximation and then realised one to a section, each zero paired with the pole pair nearest it in frequency. That pairing is a real design decision — it decides how much of the response’s dynamic range each section carries, and pairing badly can put a section into clipping in a real build — and it is made here by a rule with one line of justification rather than by optimisation.

And this family, like the other three, is realised as a cascade of buffered sections. That is the right realisation for drawing a pole pair and the wrong one for building a filter, and the difference between them is not a matter of taste: a ladder is not a cascade measures it as fifty-four times at one per cent, with the exponent rather than the ratio being the claim — the cascade’s error growing as the 0.99 power of the tolerance and the ladder’s as the 2.00, because at maximum power transfer the response is stationary in every element it contains.

That result lands harder on this family than on the other three, and the reason is the stopband floor this essay measures. A Butterworth’s stopband falls for ever, so a tolerance that moves it by a fraction of a decibel moves a curve that has plenty of margin below it. An elliptic’s stopband is a level, quoted as a number, and it is the number the whole design was chosen for — what the filter in front costs refuses an elliptic design outright for exactly that reason, because a floor is not a slope and no sample rate reaches past a floor. A first-order realisation of a design whose specification is a floor is a design whose specification is met by some of the units.

Three further costs of the cascade are measured elsewhere and all three bind harder at this family’s higher effective order. The band that does not close finds a cascade buildable at three decades of impedance level at second order, one at sixth and none at eighth, while a doubly terminated ladder still has four decades at order nine. The Q the amplifier decides finds a section built with an amplifier a hundred times its corner coming out two per cent high in Q and two per cent low in pole frequency, which on a fifth-order half-decibel Chebyshev is 2.1 decibels of ripple — and an elliptic section’s Q is higher than a Chebyshev’s of the same order, so the error is larger. And the ripple that is a temperature finds that two per cent carrying a temperature coefficient of its own, taking a design from 0.82 dB of ripple at −40 °C to 1.05 at +125 with passives that have no temperature coefficient at all.

Which leaves the family’s real advantage narrower and sharper than the order count suggests. What an elliptic design buys is a transition width — forty decibels at twice the corner from two poles — and what it charges is a stopband that is a level rather than a slope, realised by a structure whose errors are first order in the tolerance and whose pole positions move with an amplifier’s gain–bandwidth. Every one of those charges lands on the level rather than on the transition. So the design is at its best where the requirement is about how quickly the response falls and at its worst where the requirement is about how far, which is exactly the opposite of how the family is usually introduced.

What the zeros cost

A transmission zero at a finite frequency buys an order near the band edge and gives it back far into the stopband, and three other essays price the rest of it. What actually fills a null is the section that makes the zero, and the two mechanisms that stop it being a null at all. Three families, one corner is the three all-pole families this is a fourth beside. What a steep skirt costs is the trade the extra order is spent on, and Flat magnitude, unflat delay is the delay an elliptic response has, which is the worst of the four. A ladder is not a cascade is the realisation decision that follows.

Part 2 on filter families

One argument about Filter families, and one of 2 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.

Elliptic filterEquirippleFilter orderJacobi elliptic functionsSelectivityStopband attenuationTransmission zero