I am trying to design a set of bandpass filters for an audio spectrum analyzer. Since human perception of pitch is spaced logarithmically according to frequency, my low pitches have quite low and narrow bandpass frequencies. I am working in matlab using designing elliptical filters. I am having issues where my lowest filters, passband 8hz to 62hz and 64hz to 247hz are not working. My sampling rate for all filters is 44kHz. I noticed that reducing the sampling rate fixes the issue filters, why is this the case, I thought higher sampling was always better? Also, is there a way around this? Also, if not, is it difficult, implementation wise (on a chip) to decimate the sampled data for use on the lower frequency filter? I am completely new to this (Senior Design Project) so thanks for the help! Other info: 8th order filters 1dB passband ripple max, min 60dB attenuation in stopband using ellipord and ellip in Matlab to generate filter coefficients Thanks again Steve

# low frequency bandpass filters with high sampling rate

Started by ●December 29, 2006

Reply by ●December 29, 20062006-12-29

ssnyder wrote:> I am trying to design a set of bandpass filters for an audio spectrum > analyzer. Since human perception of pitch is spaced logarithmically > according to frequency, my low pitches have quite low and narrow bandpass > frequencies. I am working in matlab using designing elliptical filters. > I am having issues where my lowest filters, passband 8hz to 62hz and 64hz > to 247hz are not working. My sampling rate for all filters is 44kHz. I > noticed that reducing the sampling rate fixes the issue filters, why is > this the case, I thought higher sampling was always better? Also, is > there a way around this? Also, if not, is it difficult, implementation > wise (on a chip) to decimate the sampled data for use on the lower > frequency filter? I am completely new to this (Senior Design Project) so > thanks for the help!This has to do with the numeric precision loss in IIR filters when F/Fsa is low. There are some ways to deal with it. Refer to any book on filter design. If you don't want to mess with the details, the simplest cure will be implementing the filters in the double float accuracy. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com

Reply by ●December 29, 20062006-12-29

"ssnyder" <ssnyder@bu.edu> wrote in news:086dnfftW_p2tQjYnZ2dnUVZ_tmknZ2d@giganews.com:> I am trying to design a set of bandpass filters for an audio spectrum > analyzer. Since human perception of pitch is spaced logarithmically > according to frequency, my low pitches have quite low and narrowbandpass> frequencies. I am working in matlab using designing ellipticalfilters.> I am having issues where my lowest filters, passband 8hz to 62hz and64hz> to 247hz are not working. My sampling rate for all filters is 44kHz.I> noticed that reducing the sampling rate fixes the issue filters, why is > this the case, I thought higher sampling was always better? Also, is > there a way around this? Also, if not, is it difficult, implementation > wise (on a chip) to decimate the sampled data for use on the lower > frequency filter? I am completely new to this (Senior Design Project)so> thanks for the help! > > Other info: > 8th order filters > 1dB passband ripple max, min 60dB attenuation in stopband > using ellipord and ellip in Matlab to generate filter coefficients > > Thanks again > > Steve > > >Getting a filter to drop like a rock in a very small low frequency range that's just a very small portion of your sample frequency is difficult. You can try using much wider filters, but the problem will not go away entirely. One approach that you might have some luck with is 1) low-pass filter and decimate to a sampling rate that facilitates what you're trying to do (you filter first to prevent aliasing caused by the decimation) 2) Use a low-pass filter designed for the new sample rate to calculate the low-frequency portion you're trying to remove. 3) Resample the result of (2) back to the original sampling rate (use some interpolation routine 4) Subtract the result of (3) from the original signal. The result of this is a high-pass filter with a low-frequency cutoff of the filter you used in step (2) -- Scott Reverse name to reply

Reply by ●December 29, 20062006-12-29

ssnyder wrote:> I am trying to design a set of bandpass filters for an audio spectrum > analyzer. Since human perception of pitch is spaced logarithmically > according to frequency, my low pitches have quite low and narrow bandpass > frequencies.This is a very good application for multirate digital signal processing. I discussed how to do something like this in a thread here in 2001. Do a Google search on this group for the topic ' "Logarithmic" FFT '. To learn more about the very cool things you can do with multirate processing, I'd recommend you look at the book by fred harris. David L. Rick Hach Company

Reply by ●December 30, 20062006-12-30

ssnyder wrote:> I am trying to design a set of bandpass filters for an audio spectrum > analyzer. Since human perception of pitch is spaced logarithmically > according to frequency, my low pitches have quite low and narrow bandpass > frequencies. I am working in matlab using designing elliptical filters. > I am having issues where my lowest filters, passband 8hz to 62hz and 64hz > to 247hz are not working. My sampling rate for all filters is 44kHz. I > noticed that reducing the sampling rate fixes the issue filters, why is > this the case, I thought higher sampling was always better? Also, is > there a way around this? Also, if not, is it difficult, implementation > wise (on a chip) to decimate the sampled data for use on the lower > frequency filter? I am completely new to this (Senior Design Project) so > thanks for the help!The greater the ratio between the sampling rate and the passband frequency, the greater the number of bits that will be required to get a digital filter to work at all. With IIR filters, one will need more bits of arithmetic precision and intermediate results. With FIR filters, one will need more filter taps, thus needing more total bits of coefficients. So too high a ratio can cause computational problems. But too low a ratio, and you will need an antialiasing filter or prefilter with very steep skirts, which has its own set of problems. Since a low frequency bandpass filter doesn't really need any of that high frequency information available with high sampling rate, you might want to low pass and decimate the data (perhaps in several stages) to a lower sampling rate, until the ratio between the sampling rate and your desired passband becomes more tractable (but still high enough to strongly meet the Nyquist criterion). Then you can upsample if you need the result at a high sampling rate (in multiple stages, again, if necessary). IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M

Reply by ●January 1, 20072007-01-01

ssnyder wrote:> I am trying to design a set of bandpass filters for an audio spectrum > analyzer. Since human perception of pitch is spaced logarithmically > according to frequency, my low pitches have quite low and narrow bandpass > frequencies. I am working in matlab using designing elliptical filters. > I am having issues where my lowest filters, passband 8hz to 62hz and 64hz > to 247hz are not working. My sampling rate for all filters is 44kHz. I > noticed that reducing the sampling rate fixes the issue filters, why is > this the case, I thought higher sampling was always better?the fundamental reason, IMO, is that filter coefficients are often based on the value: cos(2*pi*f0/Fs) where f0 is the "significant frequency" whatever type filter you have and Fs is the sampling frequency. the problem with cos(w) when w is very small is that it gets so close to 1 and all of the information about w is really contained in the difference cos(w) is from 1 (which is around (w^2)/2). even with floating point representation, these important bits drop off the edge of your finite precision word.> Also, is there a way around this?try using the identity: cos(w) = 1 - 2*(sin(w/2))^2 substitute that in for cos(2*pi*f0/Fs) everywhere, redraw your signal flowgraph (with the 1 term as a separate signal with implicit gain of 1), combine all of your small signals first (the ones that are multiplied by (sin(pi*f0/Fs))^2) and then combine that small signal result to the bigger signals (the ones that are multiplied by 1 or 2). keep all of the bits of precision you can before you inevitibly have to hack off LSBs.> Also, if not, is it difficult, implementation > wise (on a chip) to decimate the sampled data for use on the lower > frequency filter? I am completely new to this (Senior Design Project) so > thanks for the help!decimation is pretty easy. interpolation (to upsample back to the original sampling rate to combine) is harder. r b-j