This is the second part of my thoughts on the analog or digital filters issue raised by Steve Taranovich. Whether or not it's the last part will depend on the response of the legions of Planet Analog readers out there.
There are many everyday things that can be “done” using either analog or digital methods. In imaging and audio, digital has long since overwhelmed analog, primarily because the means of distribution of both visual and audio content are overwhelmingly digital, even if analog means of production are still available.
Even if the dominant technology paradigm compels us to choose a digital solution, we all sense that in principle, we could take our photographs with a film camera, and digitize (and probably compress) the resulting images if needed. We could record our interviews or concerts on an old Nagra reel-to-reel or a cassette deck, and digitize (and probably compress) them. The methods remain interchangeable, to a limited extent — one is, to some degree, a substitute for another.
I've wasted precious blog word count on this leaden analogy for a reason: In very many cases, digital and analog filters are NOT substitutes for each other. The very question “should I use a digital filter or an analog filter” is misleading. Your system design should, if it is detailed enough, already contain a satisfactory answer to that question.
The simple filters we're thinking of here take one input signal and deliver one output signal. The archetypal “analog filter” takes an analog input and gives an analog output. Conventionally these signals are both voltages and the signal is just the voltage as a function of time. The “digital filter” has signals that are represented by arrays of numbers, the array index implying successive instants in time that are generally uniformly spaced by some sampling interval.
Domain-crossing filters are perfectly feasible. You might require an analog input to give a digital output, or vice versa. Note that these combinations can be achieved in other ways than the totally obvious approach of following an analog filter with an ADC, and so on. A properly condensed system block diagram should be agnostic to the actual format or domain of its signals except at the boundaries.
But this is a counsel of perfection, in terms of system design philosophy. The very presence of a converter, say a sampling ADC, may require an analog filter in front of it in order to convert correctly the expected input signal with an acceptably low level of aliasing.
This should be one example where it's abundantly clear that the question “do I use an analog or a digital filter?” is a dumb one. It's simple reduction ad absurdum. Replacing an analog antialiasing filter with a digital filter requires that you first convert the filter's input analog signal to digital, before sending it off to your chosen computation shop.
But if you have the wherewithal to convert the analog input signal to digital — without the infinite recursion of needing another analog filter — why, you've already solved the problem, and you don't need the digital filter at all. I could come up with some other examples, but I'd only be insulting your intelligence more than I already have.
I'm sure I'll hear the sound of the “oversimplification klaxon” on account of this explanation. You may say that in mixed domain systems, there may be a genuine choice between doing the filtering in domain A and then converting to domain B, or converting the signal directly from domain A to domain B and then doing the filtering in domain B.
This is perfectly plausible, but here's the overarching point: This can only be true if the filtering is not required in order to manage or optimize one of these domain conversion steps. And a very high percentage of filter designs are on the board just to do that.
There's really only a choice between analog and digital filtering when you have a choice between analog and digital approaches to your entire system design. Under those circumstances, you might expect a life-long analog guy like me to plump for the analog approach. Well, perhaps when I started out, in the late 70s, digital filtering might have been an expensive luxury in comparison to conventional electronic components.
I must say now though that the consistency of digital filtering, combined with its great compatibility with low voltage submicron CMOS and highly integrated SoCs, means that this lover of analog spends much more time these days designing and dropping digital filters into architecture diagrams, than analog ones.
I still creep into the “analog gym” from time to time to work out on an old-style piece of analog apparatus. I'm still best friends with several classical arrangements of resistors, capacitors, and op-amps. Ahh, those were the days. Mail me your analog filter design requests! But when I want my customer to build a million of something for a BOM of pennies, tasting the glue at the edge of the performance envelope? Digital, mate.