DSPRelated.com
Forums

Partial FFT... Possible?

Started by hq9000 March 16, 2009

hq9000 wrote:
> > >It is pretty simple to accomplish what you want to do. All you have to do > is > >downsample the data by 4 and then take your 1024 point FFT. > > > >-jim > > Should this downsampling be complemented by any kind of filtering?
Yes that would probably be a good thing. If your data has energy above the 0-Fs/8 band that you are interested in then you will need to low pass filter as part of the process of reducing the sample rate. If the data already is free of energy in the band from Fs/8 to Fs/2 then you could just keep every fourth sample and discard the rest. Or you might just acquire the data at the lower rate in the first place, but that should have a filter in the process also. -jim
>>It is pretty simple to accomplish what you want to do. All you have to
do
>is >>downsample the data by 4 and then take your 1024 point FFT. >> >>-jim > >Should this downsampling be complemented by any kind of filtering? > >
well, now I start to realize that it's much the same idea as I sugested in my drawing above. But it looks much more elegant. Thanks for this. But what kind of concerns me a bit is the alias effect that will appear after downsampling. that's why I'm asking if i should pre-filter the data before downsampling. ---------------------------------- http://www.ufo-scientific.com Your favourite audio/midi software
hq9000 wrote:
>>> It is pretty simple to accomplish what you want to do. All you have to > do >> is >>> downsample the data by 4 and then take your 1024 point FFT. >>> >>> -jim >> Should this downsampling be complemented by any kind of filtering? >> >> > > well, now I start to realize that it's much the same idea as I sugested in > my drawing above. But it looks much more elegant. > > Thanks for this. > > But what kind of concerns me a bit is the alias effect that will appear > after downsampling. > > that's why I'm asking if i should pre-filter the data before > downsampling.
And that's why you've been answered yes. The signal will be corrupted if it contains frequencies above half the new sampling frequency. Filtering them out before discarding samples is a necessary part of the downsampling procedure. Note that the filter needn't calculate samples that are to be discarded. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
>Yes that would probably be a good thing. If your data has energy above >the 0-Fs/8 band that you are interested in then you will need to low >pass filter as part of the process of reducing the sample rate. If the >data already is free of energy in the band from Fs/8 to Fs/2 then you >could just keep every fourth sample and discard the rest. > Or you might just acquire the data at the lower rate in the first >place, but that should have a filter in the process also. > > >-jim
Yes, didn't see your post when replying. Thanks for explainations! ------------------------------ http://www.ufo-scientific.com Your favourite audio/midi software

hq9000 wrote:
> > >>It is pretty simple to accomplish what you want to do. All you have to > do > >is > >>downsample the data by 4 and then take your 1024 point FFT. > >> > >>-jim > > > >Should this downsampling be complemented by any kind of filtering? > > > > > > well, now I start to realize that it's much the same idea as I sugested in > my drawing above. But it looks much more elegant.
I didn't see a drawing.
> > Thanks for this. > > But what kind of concerns me a bit is the alias effect that will appear > after downsampling. >
It's hard to give anything more than generalized advice since I don't know how you intend to accomplish any of this. I don't know if you are going to roll your own code or if you are just using ready made functions (like Matlab, for instance). If it is the latter then there are probably functions available to you that will take care of the filtering and downsampling probably all in one function call. -jim
> that's why I'm asking if i should pre-filter the data before > downsampling. > > ---------------------------------- > http://www.ufo-scientific.com > Your favourite audio/midi software
>I didn't see a drawing.
Oh... That's it: http://www.ufo-scientific.com/files/fft_scheme.GIF After all the wise advices in this thread it looks quite immature ))... Thanks! ---------------------------------- http://www.ufo-scientific.com Your favourite audio/midi software

hq9000 wrote:
> > >I didn't see a drawing. > > Oh... That's it: > http://www.ufo-scientific.com/files/fft_scheme.GIF
Oh I see.... I can't really tell for sure what is happening in the upper right, but that might amount to the same thing. I hope you program a little better than you draw :^) -jim
> > After all the wise advices in this thread it looks quite immature ))... > > Thanks! > > ---------------------------------- > http://www.ufo-scientific.com > Your favourite audio/midi software