Here, we design a high-pass FIR filter using ScopeFIR. Our first example, did the job of making a CD sound like a telephone by using a low-pass filter. Next, we try a high-pass for that purpose. This will at least take all the bass out. We require that the filter have at least 40 dB of attenuation below 30 Hz and no more than 3-dB of ripple up above 300 Hz. The Specification Editor entries for it are shown below:
After opening the Project or entering the band data, hit the “Design” button, which will bring up a plot of the frequency response
The frequency response plot shows that the filter is slightly better than required, because its response is between the lines showing the specified passband ripple, and below the line showing the minimum stopband attenuation. Going back to the Specification Editor for a moment, we can read numerical values of the filter’s actual ripple and attenuation, which are “2.094” and “43.086”.
Compared to the low-pass example, there are a few things to notice here. First, we set the Sampling Frequency to 44100 Hz rather than 44.1 kHz. This illustrates that you can use any units you want for Sampling Frequency, but once you specify the Sampling Frequency, other parameters must be in the same units. In this example, our band edge frequencies of 30 and 300 Hz would have been “0.030” and “0.3” if we had set the Sampling Frequency to “44.1 kHz”. However, in this case, it was simply more convenient to work in Hz.
The next thing you should notice is that this design required a comparatively large number of taps, 133. When you examine the Frequency Response plot, you can see why. Notice that the transition between the stopband and the passband is very narrow, as a percentage of the sampling rate. However, if you look at the low-pass example, (which requires only 10 taps) you will see that its transition is very broad. Moral of the story: For the same passband ripple and stopband attenuation, narrowing the transition band increases the number of taps that a filter requires.
Our third example uses ScopeFIR’s “Advanced Parks-McClellan Editor” to combine the characteristics of the previous low-pass and high-pass filters into a band-pass filter.