<< Chapter < Page Chapter >> Page >

Fir filter bank – graphic equalizer

Now you are going to add two more FIR filters that cover the rest of the frequency range DC – Fs/2 and thencombine these FIR filters into a filter bank that will allow you to selectively boost/attenuate the various frequency ranges. A filterbank is nothing more than a parallel combination of different filters. This is basically what a graphic equalizer does on atypical stereo system, except that many equalizers are analog filters, rather than digital filters.

  • Open LabVIEW (not Embedded Edition) and open the Filter Design VI built in Section II.
  • Design a bandpass FIR filter to meet the following specifications:
    • Type: bandpass
    • Design Method: Kaiser Window
    • Stop Edge Frequency: 400Hz / 2000Hz
    • Passband Edge Frequency: 800Hz / 1600Hz
    • Passband ripple: 1 dB (doesn’t matter because stopband specs will determine passband ripple)
    • Minimum stopband attenuation: 40 dB
    • Sampling Frequency : 8000 Hz
  • After entering the parameters, press OK. Run the VI and save the filter coefficients as BPFIR800_1600.fds.

    The filter length for this BP filter was the same as for the LP filter. Why did this happen?

    Got questions? Get instant answers now!
  • Design a highpass FIR filter to meet the following specifications:
    • Type: Highpass
    • Design Method: Kaiser Window
    • Stopband Edge Frequency: 1600 Hz
    • Passband Edge Frequnecy: 2000 Hz
    • Passband ripple: 1 dB (doesn’t matter because stopband specs will determine passband ripple)
    • Minimum stopband attenuation: 40dB
    • Sampling Frequency: 8000 Hz
  • Run the VI and save the coefficient file as HPFIR2000.fds

    You should have noticed that all 3 filters had (nearly) identical filter lengths. For an FIR-based filter bank, this is a very important feature to have. Why? Hint: Think about the phase responses of FIR filters.

    Got questions? Get instant answers now!

    You should have noticed that the length of the highpass filter was slightly different than the other filters. What is the reason for this? Hint: Think about the 4 basic types of FIR filters (Type I – Type IV).

    Got questions? Get instant answers now!
  • Open the lab3setup VI and change the filter coefficient’s file in the DFD filter VI to the bandpass filter file. Save the VIwith a different name such as lab3filters.vi. Run the VI and make sure it works fine.
  • Change again the filter file for the highpass filter file. Do not change the name of the file. Save it and run it.
  • Once you have verified that your 2 additional FIR filters work, add two more DFD Filter VIs to the block diagram and two Addfunctions.
  • Wire the output of the Add function that adds the Analog Input node to the two new DFD filters. Configure the three DFDFilter VIs with the Lowpass, Highpass and Bandpass filter files.
  • Put three Multiply functions and wire the output of the filters to them. Place three numeric controls in the Front Paneland set them to 1.
  • Wire a numeric control to the other input of the Multiply functions. Do this for each of the DFD Filter VIs. With this we aregoing to control the gain for that filter.
  • Wire the output of the Multiply functions to the Add functions to add the three multiplications or gain sets. Wire theoutput of the last Add to the Analog Output node and the signal input of the Spectral Measurements Express VI.
  • The resulting configuration is a 3-band filter bank that covers frequencies in the range DC-4000 Hz. Note that the frequencyranges of these 3 filters were selected so that the transition regions overlap perfectly (i.e. the edge of the passband of onefilter is the edge of the stopband of the prior filter). This type of overlap yields the best frequency coverage and provides a nearlyconstant gain in each transition region. (i.e. As one filter starts attenuating, the next filter starts amplifying).
  • Start your CD. Save and Run the VI. You should hear the music basically unfiltered, since all frequencies in the range 0-4000 Hzare passed with a gain of 1. Start playing with the individual Gains now to boost/attenuate the various frequency ranges byselecting gains<1 and>1. Don’t select gains too large (greater than 3 or 4) or else you may start clipping the outputsignal. Call your TA over to verify that you have completed this part of the lab.
When you are done with this lab, exit LabVIEW and LabVIEW Embedded Edition and log off the computer. Unplug the SPEEDY-33 board and turn off the headphone volume booster. Turn in your completed worksheet to the lab TA.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Fundamentals of digital signal processing lab. OpenStax CNX. Jan 03, 2006 Download for free at http://cnx.org/content/col10303/1.5
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Fundamentals of digital signal processing lab' conversation and receive update notifications?

Ask