# Guessing at the Number of Coefficients Filters Might Need

There probably exist Mathematically-more-rigorous ways to derive the following information. But just in order to be able to understand concepts clearly, I often find that I need to do some estimating, that will give some idea, of how many zero-crossings, for example, a Sinc Filter should realistically have, on each side of its center sample. Or, of what kind of cutoff-performance the low-pass part of a Daubechies Wavelet will have, If it only has 8 coefficients…

If the idea is accepted that a low-pass filter is supposed to be of some type, based on the ‘Sinc Function’, including filters that only have 2x / 1-octave over-sampling, then a question which Electronics Experts will face, is what number of zero-crossings is appropriate. This question is especially difficult to find a precise answer to, because the series does not converge. It is a modified series of the form Infinite Sum (1/n) .

Just to orient ourselves within the Sinc Function when applied this way, the center sample is technically one of the zero-crossings, but is equal to 1, because it has the only coefficient of the form (0/0). After that, each coefficient twice removed is a zero-crossing, and the coefficients displaced from those are the standard non-zero examples.

Firstly, the question can be thought legitimate, whether it would be better to use an even or an odd number of zero-crossings, on either side of the center sample. If using an odd number, the last zero-crossing went from positive to negative, meaning that the last non-zero coefficient was positive. If the number of crossings was even, then the last non-zero coefficient was negative.

This will affect, whether the DC gain is greater or less, than some ideal outcome, assuming that the DC gain is normalized as 2, and that the center coefficient acting by itself represents the cutoff-frequency, and yields an amplitude that counts as (1/2) in the greater scheme of things.

Therefore, after a positive coefficient, we have an overestimation, and after a negative one, we have an underestimation.

An underestimation, and therefore an even number of zero-crossings, seems to imply to me, that the frequency response starts out slightly low at DC, grows to an ideal level, forms a crest in the spectrum just before the cutoff curve, and then dives.

An overestimation seems to imply, that the frequency-response curve will have slight negative slope from DC to the cutoff point, and then continues with suddenly stronger, negative slope.

I suspect that Experts today do not like low-pass filters which form a crest before their cutoff point, just because this is bad form, and because this tends to remind people of the old analog days, when many filters did this.

And so a practical question comes down, to whether it is better to continue until 5+5 zero-crossings, or until 7+7. My best estimation is, that with 5+5 zero-crossings, we will achieve good but partial suppression of frequencies that are higher by 1/10 than the cutoff frequency. Hence, if it was our assumption to achieve CD-quality sound, and that 20 kHz signals should be rid of their aliasing at 24.1 kHz, then 24.1 kHz is just less than 1/10 removed from the Nyquist Frequency of 22.05 kHz. It will not be suppressed completely.

If OTOH we choose a Sinc Filter with 7+7 zero-crossings, we will achieve good but partial suppression of frequencies that are 1/14 higher, than the cutoff frequency, which is almost ideal for audio CD quality sound.

This thinking would also lead to the anticipation, that some of the practical filters today may only compute to 5+5 zero-crossings, just to reduce computational cost, where 1/10 is ‘close enough’ to 1/11. But I see a catch.

If we were also to assume that a chain of Half-Band Filters like these was to be implemented instead of just one, let us say in order to achieve 4x over-sampling, then the effect of imperfect frequency response is not cumulative near the cutoff frequency, because two different cutoff frequencies are implied. But, the spectral coloration will be cumulative, in the middle of the pass-band, where I just stated it was non-zero, and slightly negative for odd numbers of zero-crossings.

Having significant coloration of the sound in the middle of the pass-band is not lauded. And thus, if these filters are meant to be chained, then it makes more sense that each one should actually reach 7+7 zero-crossings.

But all of this is really just guesswork on my part.

Also, it strikes me as plausible, that a Daubechies Wavelet with 8 coefficients, will only be able to suppress frequencies well, that are 1/4 higher or lower that the cutoff-frequency, so that again, we will not have ideal suppression of aliasing, for top audio specifications.

However, this realization seems to offer the recommendation, that if we are going to apply a Quadrature Mirror Filter in two stages, giving the parent stage twice as many coefficients as each child stage, will produce results closer to ideal.

Yet, a feasible way to make the decoding of ‘aptX‘-compressed sound more economical, than the non-plus-ultra specification above, would be to compute a set of 8-coefficient Daubechies Wavelets once in the design phase, and to apply them not only to decode all the ‘QMF’ stages, but also to compute the 2x over-sampling.

Dirk