 | | From: | Andreas Besting | | Subject: | filter buffer size | | Date: | Sun, 23 Jan 2005 00:35:54 +0100 |
|
|
 | Hi!
I just finshed a fft implementation in java and a simple filter (i'm setting unwanted coefficients to zero). Since most signals have too many sample points and my fft needs an input of power of 2 i use a buffer with that size, e.g. 1024.
Here's the newbie question: In the result signal i get sometimes sharp peaks after each segment with the size of the buffer. is there a possibility to avoid this? does this depend on the size of the buffer?
Thanks in advance!
|
|
 | | From: | john | | Subject: | Re: filter buffer size | | Date: | 22 Jan 2005 16:17:05 -0800 |
|
|
 | Andreas Besting wrote: > Hi! > > I just finshed a fft implementation in java and a simple filter (i'm > setting unwanted coefficients to zero). Since most signals have too many > sample points and my fft needs an input of power of 2 i use a buffer > with that size, e.g. 1024. > > Here's the newbie question: In the result signal i get sometimes sharp > peaks after each segment with the size of the buffer. is there a > possibility to avoid this? does this depend on the size of the buffer? > > Thanks in advance!
Look up "overlap add" in a DSP textbook.
John
|
|
 | | From: | Richard Owlett | | Subject: | Re: filter buffer size | | Date: | Sat, 22 Jan 2005 20:14:22 -0600 |
|
|
 | john wrote: > Andreas Besting wrote: > >>Hi! >> >>I just finshed a fft implementation in java and a simple filter (i'm >>setting unwanted coefficients to zero). Since most signals have too > > many > >>sample points and my fft needs an input of power of 2 i use a buffer >>with that size, e.g. 1024. >> >>Here's the newbie question: In the result signal i get sometimes > > sharp > >>peaks after each segment with the size of the buffer. is there a >>possibility to avoid this? does this depend on the size of the > > buffer? > >>Thanks in advance! > > > Look up "overlap add" in a DSP textbook. > > John >
John ( and others ;) there is something missing. I've been told several times I don't have claim to "newbie" status. I don't see connection to "overlap add". I have 2nd edition of Rick Lyons book -- no index ref to "overlap add".
May I imply one liners as answers may be tooooo short.
BTW, may I claim "neophyte" status ;] { I know I *CAN*, but *may* I ? }
|
|
 | | From: | Mark Borgerding | | Subject: | Re: filter buffer size | | Date: | Sun, 23 Jan 2005 04:40:23 GMT |
|
|
 | Richard Owlett wrote: > john wrote: > >> Andreas Besting wrote: >> >>> Hi! >>> >>> I just finshed a fft implementation in java and a simple filter (i'm >>> setting unwanted coefficients to zero). Since most signals have too >> >> >> many >> >>> sample points and my fft needs an input of power of 2 i use a buffer >>> with that size, e.g. 1024. >>> >>> Here's the newbie question: In the result signal i get sometimes >> >> >> sharp >> >>> peaks after each segment with the size of the buffer. is there a >>> possibility to avoid this? does this depend on the size of the >> >> >> buffer? >> >>> Thanks in advance! >> >> >> >> Look up "overlap add" in a DSP textbook. >> >> John >> > > John ( and others ;) there is something missing. > I've been told several times I don't have claim to "newbie" status. > I don't see connection to "overlap add". > I have 2nd edition of Rick Lyons book -- no index ref to "overlap add". > > May I imply one liners as answers may be tooooo short. > > > BTW, may I claim "neophyte" status ;] > { I know I *CAN*, but *may* I ? }
The OP is partway to overlap add/save by trying to filter in the frequency domain. It sounds like he is not accounting for the time domain convolution that accompanies the frequency domain multiplication.
Zeroing some frequency bins is another way of stating that the frequency domain is multiplied by a rectangular window -- the time domain equivalent is a sinc wave that wraps around the front & back of each DFT ( due to periodicity thereof ).
I seem to recall Rick's book discussing Overlap Add or Overlap Save, perhaps it was called Fast Convolution or Fast Filtering. I'm afraid I can't check since I left my copy of the book with my previous job (feel like checking John?). It's on my list of books to replace.
-- Mark Borgerding
|
|
 | | From: | Andreas Besting | | Subject: | Re: filter buffer size | | Date: | Sun, 23 Jan 2005 19:36:00 +0100 |
|
|
 | Thank you for your replies - I'll look up these topics!
|
|