Analog or Digital Filters: Oh Yeah?!

I'm presenting a response to the topics Steve Taranovich raised in his blog Integration Choices: Analog Filters vs. Digital Filters. I'll break it into two parts. This first part will deal directly with the views of the people to which Steve refers. The second part will focus on my views, abstracted from a career-long obsession with filtering.

This first part is more a counter-commentary to the material that Steve extracted for his post. Someone once said that the only reason it takes two experts to have an argument is that no expert has yet worked out how to have an argument with himself. So naturally I have some views not only on the topic of filtering but also on other people's views on the topic of filtering. Look, positive feedback right there, and of course positive feedback is an essential element of very many filter designs — in whichever domain you feel like working.

So, in the order that these luminaries appeared in Steve's post:

Walt Kester
I spent a big chunk of my career designing antialiasing and reconstruction filters. There's a part of me that considers it scandalous that there are so many sampling ADCs, out there in real equipment, that are unprotected, or insufficiently protected, against the signal-altering ravages of aliasing. This is balanced by the realization that there are many applications in which modest amounts of aliasing do not actually affect the end results achieved by a data acquisition system.

Walt talks about the need to transition to filters using purely passive components at “extremely” high frequencies. But there's no shame in using all-passive filters. The mathematics of sophisticated network transfer functions, crafted in the first half of the 20th Century by the Titans of the filter world such as Wilhelm Cauer, form the foundation of modern filter design. The inconvenient dimensions of inductors at voice frequencies drove the development of active filters in the second half of the century. But at high MHz and GHz frequencies, passive is still the most natural, and lowest-power, approach.

And I don't agree with Walt's observation that digital filters are easier to design and simulate than analog filters. The approximation step, arguably the hardest part of filter design, needs to be done for both types. People regularly make the (mistaken) assumption that less effort is required to make a digital filter, and that's one reason why there are so many poor digital filter designs out there.

Steven Smith
“Flatness” can be an important criterion for some filter applications, but it's not the only metric. And if you do need filters that are “flat” — i.e. have a frequency response magnitude that does not vary by very much over a substantial fraction of the intentional passband — then there are analog techniques that will achieve that. I designed — and manufactured — analog filters with passband ripple of less than a milli-dB over the working passband range.

The bit about the digital filter usually having better rolloff and stopband attenuation is specious (one of my old filter mentors' favorite words). Analog and digital filters that are designed to have the same transfer function will have the same rolloff and stopband attenuation! Likewise with the step response (which doesn't “have” linear phase). You can make analog filters with linear phase passbands if that's important, and the most efficient digital filter structures have non-linear phase just like the analog filters they are modeled on.

As for “speed” of filters, well, I'll weigh in more on that on the next part. Many modern systems rely on very high speed digital signal processing, and there are many arguments for preferentially using digital filters for high frequency filtering. The oft-repeated saw that digital filters are superior to analog filters at low frequencies is in fact flat-out false.

Switched-cap filters — now that's a group of topologies that has definitely found its home in integration. When I was younger I was very “sniffy” about the poor performance of switched-cap filters. But these days I realize that it's not all about performance. When the dynamic range of a switched cap filter is good enough, other factors such as its ease of tuning and the stability of its transfer function may well be more important. Definitely more to talk about on this topic in future posts.

Paul Hasler's excerpt propagates the misperception that digital filters have an unconditionally higher SNR than “equivalent” analog filters. For some popular digital filter topologies such as the Direct Form, this just isn't always the case, and such filters can provide unexpectedly terrible performance when used to implement transfer functions with frequencies far from the sample rate.

Julius Smith (I presume he's the CCRMA guy quoted, definitely my go-to-guy for the Digital Music applications of filter structures) sort of misses the point about analog filters as “analogues.” A network of resistors, capacitors, and inductors isn't an “analogue” of a network of dampers, masses, and springs. It's an isomorph — it is governed by the very same differential equations. A loudspeaker crossover is just as “real world” as a car suspension. It's a pile of chunks of crystallized Maxwell's equations (rather than crystallized Newton's Laws), and it's pretty easy to go figure what happens in the time domain when you hit it with something.

And that's where we signal processing engineers and filter designers differ from most of humanity. Most normal people are only interested in the time domain, all clocks, calendars, Gantt charts, TV schedules, and so on. The need to characterize what happens in a system as a function of some hypothetical sinusoidal excitation — the frequency response — is quite an exotic passion, shared by few others. Messieurs Laplace et Fourier sont à blâmer!

Related posts:

3 comments on “Analog or Digital Filters: Oh Yeah?!

  1. RedDerek
    July 16, 2013

    I am sure there are limits to digital filtering as compared to analog filtering. At some point, the processing time is longer than a simple analog filter running in the real-time domain. Also, the digital filter, by the adjective “digital” means a discrete filter. Thus the signal is chopped up and could miss something the analog filter would still see and react to.

  2. kendallcp
    July 16, 2013

    >>  the signal is chopped up and could miss something the analog filter would still see and react to

    If you chose the sample rate of the 'digital' filter appropriately, this can't be strictly correct.  If (and it's a big if) the transfer functions of continuous and sampled filters match exactly up to the point there the gain is tiny, then it can make no difference whether you sample then filter, or filter then sample, *as long as* the incoming signal has no components above Nyquist.

    Of course, if the filter is 'not very good', it will let through signals that won't sample correctly, so things will be different.

    But any signal that a sampled filter might 'miss' must inherently have frequency components that you shouldn't be putting into the sampled filter in the first place…

  3. Davidled
    July 16, 2013

    Today, CPU processing is much and much faster than that a few years ago. I do not think that there is a limitation for calculating filtering process. Also my concern is about analog filter which is designed by incorrect circuit and pre-amp, causing signal chopping.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.