I hope that, in the preceding blogs, I have convinced you that a low-pass filter is required (most of the time) to assure that your data is not corrupted by aliasing. The next question is: Which of the myriad of available filter strategies will do the trick in the least obnoxious way? In this edition, we compare the behavior of the most popular options:
It is important to point out that, is some ways, we are comparing Apples and Oranges.
The analog filters: Bessel, Butterworth, and Elliptical, require an analog-to-digital converter to complete the data conversion.
The Sigma Delta filtering process includes an analog filter, digitizer, and digital processing. Most of the filtering operation is done in the digital domain.
The next blog will discuss the nitty-gritty of how these low-pass filters work. The following will be an overview of what they do.
In the first blog, I showed the results of filtering my favorite shock time history with these filters with a cutoff frequency of 10 KHz.
Obviously, the results are different. Which is right?... None... Which is “rightest." That is in the eye of the beholder.
What are we doing? Figure 2 cartoons the filtering operation.
We pass a signal (Input Time History) through a filter and see what comes out (Output Time History).
Different filters have different amplitude and delay characteristics. Hence, the output time history (and spectrum) will be different.
It’s a simple as that… Don’t make it hard!
Disclosure: It’s not really that simple but that’s good enough for now.
Figure 3 shows the magnitude of the transfer functions of 8-pole versions of Bessel and Butterworth, an 8-pole/8-zero elliptical, and sigma-delta filter types.
We saw a similar plot in the third blog where we were discussing the minimum sample rates for the different filters. The point made there was that the attenuation characteristics (how fast they roll off) allowed different minimum sample rates. From that standpoint, the Sigma Delta and Elliptical filters looked very good. However, that is certainly not the whole story.
Let's take a break here to ask you to join the discussion.
With any luck, I have provoked some questions and/or disagreements in these blogs.
For instance, the first blog generated a comment/question about my dislike of Bessel filters.
I think I have answered that in this entry. Send me more...
At the bottom of the page you will find ways to contact me.
Alias rejection is critical but, as we saw in Figure 1, even when the data is well protected from aliasing, the different filters give significantly-different time history results. This is because of two effects:
We will tackle item 1 first.
Figure 4 shows the “complete” definition of an 8-pole Butterworth filter in its pass band (up to, and slightly above, the cutoff frequency). Note that the horizontal axis is linear.
Let’s look at the in-band characteristics for our four candidate filters (Figures 5, 6).
The Bessel filter:
Hence, the Bessel is called a “linear-phase/constant delay” filter. It is optimized for that behavior.
The Butterworth filter:
The Butterworth filter is optimized for flat in-band magnitude response.
The Elliptical filter:
The elliptical filter is optimized for ~flat in-band response and extremely sharp rolloff allowing lower sample rates.
The Sigma Delta (hybrid analog/digital) option:
Next, let’s look at the “in- and out-of-band contribution” to total response from an energy (magnitude2) standpoint.
Figure 7 shows the spectral energy response of each of the filters. Each curve is labeled with the ratio of the out-of-band area to the nominal input area.
An “ideal” filter would produce an in-band response ratio of 1 and an out-of-band ratio of 0.
Deviations from the “Ideal” response are errors if we don’t correct for them later. (We will talk about that in a future blog).
Let’s see what happens to our real shock signal (Figure 8).
What we see in both the raw filter characteristic and the shock results is that:
The results for this shock time history are biased toward out-of-band because the signal has significant energy above the cutoff frequency. This is not the most common case but it certainly can happen.
We started with the 10 KHz. cutoff in the first blog and we are sticking with it!
One of my favorite test signals is a square wave. If you drive your system with a square wave generator or simulate it, as we are doing here, you can learn a lot about your system.
Figure 9 shows the time-domain response of our candidate 8-pole, 10KHz, filters to a square wave input.
Bessel:
Butterworth:
Elliptical (this particular one)
Sigma Delta
What Anti-Alias Filter Do You Have?
I hope that I have made it clear that it is critical that you know the characteristics of your system. Here is a simple test: Do the same thing that I have done analytically here. Hook up a square-wave generator and set the amplitude of ½ of full scale and the frequency to 10% of the bandwidth. You should get a response like one of the colored curves in Figure 9.
--------------
What you don’t want to see is a square wave (the gray/Input) waveform in the figure. That indicates that you don’t have a filter! Most digital oscilloscopes don’t have a filter..Beware!
It took me some thinking to conjure up a test that would show the combined effect of the filter attenuation and non-linear phase. This is what I came up with:
Let’s look at a peak in our input time history. Ideally, when we put it through a low-pass filter, if its frequency is below the cutoff frequency, it will pass through delayed but otherwise unaffected.
However, if the filter gain and/or the delay is not constant the peak will be attenuated.
The error due to gain is obvious: Error = 1 – Gain.
The error due to Non-Constant Delay is Error = 1 – cos (Phase Distortion), the red curves in Figures 4, 5, and 6.
These, and the sum (Total Error) are plotted for Bessel, Butterworth, and Elliptical filters in Figure 10.
What we see is:
So, it depends on what frequency components are in your experiment. For the majority of applications, most of the energy is below 0.5 FC so it’s a wash between Butterworth and Elliptical. Up to 0.86 FC, the Butterworth looks better. In the unlikely case that most of the energy is above FC, the Bessel is the better choice.
I haven’t plotted the results from a Sigma Delta system because they are essentially perfect!
So far, I have presented a view of the filter characteristics and tried to keep my opinions about the optimum choice for a given application to myself. The fact is that all of these filter options cause some distortion (error?) in the output. The distortion appears in both the amplitude and phase of the transfer function and the different filter concepts provide a different mix.
Conventional wisdom:
My spin:
This discussion has primarily been intended to discuss the effects of filtering on the time history. For users primarily interested in spectral results (Fourier spectra, PSD, shock response spectra, octave analysis…) any of the filters except Bessel will do well.
Sigma Delta is my choice for (almost) all applications. Where won’t it work?
25 years ago, when the first commercial Sigma Delta systems hit the market, I predicted that this technology would completely replace analog filters for audio-frequency applications within the next 10 years. That prediction has proven to be wildly optimistic. However, it is happening. Pure analog filters will disappear!
What if we don’t like the result that the filter system that we have provided? In a later post, I will describe the process that you might use to make data acquired with one filter (Bessel?) filter look like it was acquired with another (Butterworth, Sigma Delta?). For instance, if you are lucky enough to have a sigma-delta-based system, you might want to make your results look like it was acquired by your older system for an apples-apples comparison.
I have applied the tests that I know of that explore the behaviors of low-pass filters that might be used for alias protection. Do you have others?
One of the reasons I've been writing these blogs is to get a discussion going. Please reach out to me with any questions or comments you may have.
You can participate by:
This blog is meant to be a seminar... not a lecture. I need your help & feedback to make it good!
Strether has no official connection to Mide or enDAQ, a product line of Mide, and does not endorse Mide’s, or any other vendor’s, product unless it is expressly discussed in his blog posts.
If you'd like to learn a little more about various aspects in shock and vibration testing and analysis, download our free Shock & Vibration Testing Overview eBook. In there are some examples, background, and a ton of links to where you can learn more. And as always, don't hesitate to reach out to us if you have any questions!