OK, now that Dr. Dan Tomley is safely on vacation, we can return to more mundane issues. A few months ago we wrote about filters and noted that they take time to operate. This time is observed as a shift in phase that happens as the filter operates. We also noted that in the analog world this phase shift or delay is tied to the frequency response and there is nothing that can be done about it. At the end of that article, I promised to write about FIR filters. As I was preparing that article, I realized that I may have gotten ahead of myself. So, let's take a step back and go over some language and concepts that we need to have a grasp of before we dive into the deep water of the FIR filter.
First a disclaimer. My colleague, Ivan Beaver, is fond of saying “for every complex question there is a simple and often wrong answer”. This is very true of filters. So for you EEs out there, I know this is not complete and in some ways not exactly correct. I would remind those readers that this column is intended for the novice who may wonder about this stuff but has nowhere to turn…
If you want to describe a filter, there are a number of features you have to include if you are going to have a complete description. Generally, a description starts with the frequency. Remember, a filter is something that lets some frequencies through while stopping others. Consider a 1KHz filter. Well, that doesn't tell you much does it. There needs to be one more descriptor at least.
Here is a 1 KHZ low pass filter.
The Frequencies below 1 kHz are passed, the frequencies above 1KHz are not. But if we are going to get picky about it, where is it actually measured from? In
other words where on that graph is 1KHz exactly. Well, let's zoom in and take a closer look with the scale. We can see that the 1K point is actually already into the curve. So this 1KHz low pass filter is actually having an effect on frequencies a bit below 1 KHz. So this is the first thing we need to understand about how filters are described. The frequency of the “knee” is by convention the 3dB down point. You start in the pass band, that is the part of the curve where there is no effect, and you follow the curve until it drops 3 dB. That is the reference point for the filter.
Here is another filter, this one is a high pass filter set at 1 KHz as well. A high pass filter stops the frequencies below a certain point and passes the frequencies above the reference point. Once again we see that 1Khz is the 3 dB down point.
OK, to be complete here there is one more kind of filter we need to be aware of. We have seen the low pass and the high pass, here is a band pass filter. A band pass filter passes the frequencies in a certain band and only those frequencies. Clearly, a one number descriptor is not enough for a band pass filter. We need to know the center frequency, in this case, 1 KHz, but we also might want to know how wide the filter is. I'm going to return to the “how wide” question in a moment. First, the inverse of a band pass is usually called a notch filter.
Ok, now I want to introduce another aspect of a filter. Here is a graph of 3 high pass, 1 KHz filters. The -3dB point is 1 kHz for each of them.
What is different about these 3 curves is their slope. They all start at 1 kHz but look at the effect below 1 kHz. At 500 Hz where I have drawn a bright blue line, the red curve is down just about 6 dB. The vertical scale in these graphs is 5 dB per division which makes it a bit difficult to see, but if we could accurately measure it, it would have a slope of -6dB per octave. So at 500, it should be 6dB below 1K and at 250 Hz it should be 6 dB below 500 and so forth. The yellow curve is 12 dB down and follows a slope of -12 dB per octave. The green line is 18dB down and has a slope of -18 dB per octave. This is known as the order
of the filter. Each order is 6 dB greater then the previous one. So the red curve is a first order, 1 KHz , high pass filter. The yellow curve is a second order, 1KHz, high pass filter, and the green curve, you guessed it, is a third order 1 KHz high pass filter. The higher the order, the steeper the slope and the more components needed to construct it. In the analog world, it is unusual to see filters with orders higher than four. So here is a question... what is the slope of a fourth order filter? If you said 24 dB per octave, you are right! By the way, remember our discussion about phase? We talked about filters causing phase shift because they all take a certain amount of time to do the job of filtering. Well, not surprising then, the higher the order the more phase shift is caused.
Earlier I pointed out that in a band pass or a notch filter the question of how “how wide” must be addressed. So here is a graph showing a family of curves that are all 1 kHz notch filters, but clearly, they are different. This is where things get a little tricky. There are actually 2 ways to describe these differences both equally valid and both commonly used. Some like to refer to the bandwidth
of the notch filter. The red one has a larger or wider bandwidth than the green one. Bandwidth is often expressed in octaves or in terms of frequency. So, we can talk about a filter with a 2-octave bandwidth. That is a pretty “wide” filter. We can talk about a 10 Hz wide notch filter. That would be a very narrow filter indeed, depending of course on where it occurred in the frequency spectrum. The other way to describe the width of a filter is to use the letter Q. This is known as the “quality factor” and is a dimensionless quantity that also ultimately describes the shape of the filter. Although it is not exactly the same thing as bandwidth, you will often see digital filters that let you choose between Q or Band Width (BW) as a way to adjust the width of a band pass filter. What makes it a bit confusing is a large Band Width is a low Q. So, a filter with a Q of a small value like .5 would have a relatively large bandwidth around 2.5 octaves. A Q of 15, on the other hand, would be a much narrower or sharper filter and would have a bandwidth of something like a tenth of an octave.
Only one more element to go here… hang in there with me! Each of these filters has another descriptor. It really has no label, but most often you will see a reference to the “type” of filter. There are a number of named filter types commonly used in audio. If you poke around in a digital crossover, for example, you will see that you can choose between a Bessel or a Butterworth and sometimes others as well. These types of filters have features, which make them more or less attractive to designers for a variety of reasons. How was that for a vague and non-committal sentence! In other words, there are Butterworth filters, and there are Bessel filters and there are Chebyshev filters and Elliptical filters and Gaussian filters. Oh my! They all have their uses. How to pick the right one is way beyond our reach at this point, and I really want to get to FIRs! So with that, I will leave you to imagine a 400Hz, 2nd
order lowpass Bessel filter!