Hello, I'm currently using an FFT to zereo out all the frequences above half Nyquist for my application. It makes perfect cutoff, but I have to use buffers and the old overlap/add to remove clicks. My question to you good folks - is there a clever 'trick' to cut frequencies off above this specific (SR / 4) point using time domain techniques? Or a more efficient frequency domain method? I've tried a cascade of Butterworth filters, but it just isn't steep enough to consider using it in my app. I know is only a small chance there is a trick for this, but I've got nothing to lose asking! : ) Thanks, Dave
Low pass filter at half Nyquist
Started by ●March 1, 2008
Reply by ●March 1, 20082008-03-01
"VelociChicken" <bob@yahoob.com> writes:> Hello, I'm currently using an FFT to zereo out all the frequences above half > Nyquist for my application. It makes perfect cutoff, but I have to use > buffers and the old overlap/add to remove clicks. > > My question to you good folks - is there a clever 'trick' to cut frequencies > off above this specific (SR / 4) point using time domain techniques? Or a > more efficient frequency domain method? > > I've tried a cascade of Butterworth filters, but it just isn't steep enough > to consider using it in my app. > > I know is only a small chance there is a trick for this, but I've got > nothing to lose asking! : ) > > Thanks, > > DaveHi Dave, Google half-band filters. Every other coefficient (except the middle one) is zero. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://www.digitalsignallabs.com
Reply by ●March 1, 20082008-03-01
>> My question to you good folks - is there a clever 'trick' to cut >> frequencies >> off above this specific (SR / 4) point using time domain techniques? Or a >> more efficient frequency domain method? >> >> I've tried a cascade of Butterworth filters, but it just isn't steep >> enough >> to consider using it in my app. >> >> I know is only a small chance there is a trick for this, but I've got >> nothing to lose asking! : ) >> >> Thanks, >> >> Dave > > Hi Dave, > > Google half-band filters. Every other coefficient (except the middle > one) is zero.Hello, thanks Randy that looks likely to be perfect! I hope I can keep the coef lengths short... D
Reply by ●March 1, 20082008-03-01
"VelociChicken" <bob@yahoob.com> wrote in message news:NBiyj.218534$3m6.13182@fe2.news.blueyonder.co.uk...>>> My question to you good folks - is there a clever 'trick' to cut >>> frequencies >>> off above this specific (SR / 4) point using time domain techniques? Or >>> a >>> more efficient frequency domain method? >>> >>> I've tried a cascade of Butterworth filters, but it just isn't steep >>> enough >>> to consider using it in my app. >>> >>> I know is only a small chance there is a trick for this, but I've got >>> nothing to lose asking! : ) >>> >>> Thanks, >>> >>> Dave >> >> Hi Dave, >> >> Google half-band filters. Every other coefficient (except the middle >> one) is zero. > > Hello, thanks Randy that looks likely to be perfect! I hope I can keep the > coef lengths short... > > DThe longer the filter or the data to be processed at once, the more efficient it is to FFT/multiply/IFFT. I know that's counterintuitive but it's true. The results in compute load savings can be compelling compared to time domain processing. So, I would definitely be looking into this ... as you've been doing. But, to "multiply by zero" is a bad idea. You're better off to multiply by the FFT of the halfband filter. Fred
Reply by ●March 2, 20082008-03-02
>>>> My question to you good folks - is there a clever 'trick' to cut >>>> frequencies >>>> off above this specific (SR / 4) point using time domain techniques? Or >>>> a >>>> more efficient frequency domain method? >>>> >>>> I've tried a cascade of Butterworth filters, but it just isn't steep >>>> enough >>>> to consider using it in my app. >>>> >>>> I know is only a small chance there is a trick for this, but I've got >>>> nothing to lose asking! : ) >>>> >>>> Thanks, >>>> >>>> Dave>>> Hi Dave, >>> >>> Google half-band filters. Every other coefficient (except the middle >>> one) is zero. >> >> Hello, thanks Randy that looks likely to be perfect! I hope I can keep >> the coef lengths short...> The longer the filter or the data to be processed at once, the more > efficient it is to FFT/multiply/IFFT. I know that's counterintuitive but > it's true. The results in compute load savings can be compelling compared > to time domain processing. So, I would definitely be looking into this > ... as you've been doing. > > But, to "multiply by zero" is a bad idea. You're better off to multiply > by the FFT of the halfband filter. > > FredHello Fred, I'm curious to know why I can't simply zero out the top half of the FFT. Will multiplying by the halfband filter remove the need for 'overlap/add window' code? Cheers, Dave
Reply by ●March 2, 20082008-03-02
"VelociChicken" <bob@yahoob.com> wrote in news:ISgyj.218517$3m6.124621@fe2.news.blueyonder.co.uk:> Hello, I'm currently using an FFT to zereo out all the frequences > above half Nyquist for my application. It makes perfect cutoff, but I > have to use buffers and the old overlap/add to remove clicks. > > My question to you good folks - is there a clever 'trick' to cut > frequencies off above this specific (SR / 4) point using time domain > techniques? Or a more efficient frequency domain method? > > I've tried a cascade of Butterworth filters, but it just isn't steep > enough to consider using it in my app. > > I know is only a small chance there is a trick for this, but I've got > nothing to lose asking! : ) > > Thanks, > > Dave > > >Is this for ADC or DAC? If its for acquisition, the whole idea is that you need to analog filter prior to collection to frevent aliasing, which is why you rarely hear of FFT techniques for this purpose. -- Scott Reverse name to reply
Reply by ●March 2, 20082008-03-02
VelociChicken wrote: ...> Hello Fred, I'm curious to know why I can't simply zero out the top half of > the FFT. Will multiplying by the halfband filter remove the need for > 'overlap/add window' code?Multiplying in frequency is equivalent to convolving in time. The effective convolution kernel created by zeroing an unwanted band is infinitely long; you can't pad an FFT enough to make the convolution linear instead of circular. There will be lots of ringing and probably other artifacts. If you multiply be the the FFT of a practical filter, you will get a result where the math doesn't break down. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●March 2, 20082008-03-02
On 2 Mar, 17:01, Jerry Avins <j...@ieee.org> wrote:> VelociChicken wrote: > > � �... > > > Hello Fred, I'm curious to know why I can't simply zero out the top half of > > the FFT. Will multiplying by the halfband filter remove the need for > > 'overlap/add window' code? > > Multiplying in frequency is equivalent to convolving in time. The > effective convolution kernel created by zeroing an unwanted band is > infinitely long; you can't pad an FFT enough to make the convolution > linear instead of circular. There will be lots of ringing and probably > other artifacts.Correct.> If you multiply be the the FFT of a practical filter, you will get a > result where the math doesn't break down....and if you want to mess with *really* long sequences a time-domain implementation of a simple filter may become cheaper than using the FFT. In the FFT you need to implement the FFT step (which is O(NlogN)), a complex multiplication step (O(N)) and an IFFT step (O(NlogN)) in addition to handling the logistics of the overlap-add method. When you add all the numbers (remember, constants are omitted in the 'big oh' notation!), it is cheaper to implement the time domain filter if a filter contains less than c*log(N) coefficients, where c is one of those omitted constants. Rune
Reply by ●March 2, 20082008-03-02
On Mar 1, 3:00�pm, "VelociChicken" <b...@yahoob.com> wrote:> >> My question to you good folks - is there a clever 'trick' to cut > >> frequencies > >> off above this specific (SR / 4) point using time domain techniques? Or a > >> more efficient frequency domain method? > > >> I've tried a cascade of Butterworth filters, but it just isn't steep > >> enough > >> to consider using it in my app. > > >> I know is only a small chance there is a trick for this, but I've got > >> nothing to lose asking! �: ) > > >> Thanks, > > >> Dave > > > Hi Dave, > > > Google half-band filters. Every other coefficient (except the middle > > one) is zero. > > Hello, thanks Randy that looks likely to be perfect! I hope I can keep the > coef lengths short... > > D- Hide quoted text - > > - Show quoted text -Hello Mr. Chicken, If you read about halfband filter (books or old posts in comp.dsp) you see they have really bad transition and are EXACTLY NOT what you want. Keep looking. Sorry other Gurus here not tell you. (Jerry, why you not tell him? You soooooooo smart. ) Regards, Kamar Ruptan DSP Guru (not related to DSPGURU of Grant Griffin)
Reply by ●March 2, 20082008-03-02
>> > Hello Fred, I'm curious to know why I can't simply zero out the top >> > half of >> > the FFT. Will multiplying by the halfband filter remove the need for >> > 'overlap/add window' code? > >> Multiplying in frequency is equivalent to convolving in time. The >> effective convolution kernel created by zeroing an unwanted band is >> infinitely long; you can't pad an FFT enough to make the convolution >> linear instead of circular. There will be lots of ringing and probably >> other artifacts.>Correct.>> If you multiply be the the FFT of a practical filter, you will get a > >result where the math doesn't break down.>...and if you want to mess with *really* long sequences >a time-domain implementation of a simple filter may become >cheaper than using the FFT.>In the FFT you need to implement the FFT step (which is O(NlogN)), >a complex multiplication step (O(N)) and an IFFT step (O(NlogN)) >in addition to handling the logistics of the overlap-add method. > >When you add all the numbers (remember, constants are omitted >in the 'big oh' notation!), it is cheaper to implement the >time domain filter if a filter contains less than c*log(N) >coefficients, where c is one of those omitted constants.>RuneThanks for all the help guys, that's lead to some good reading. I need a vertical cut across at half-band because I want to completely eliminate one half of a mirrored spectrum, so any kind of signal past this point gets wrongly introduced later. So with CPU speed and slope it looks like frequency domain is going to win afterall. Thanks, Dave