0
votes

I'm working on signal processing issues. I'm extracting some features for feeding a classifier. Among these features, there is the sum of first 5 FFT coefficients. As you know primary FFT coefficients actually indicate how dominant low frequency components of a signal are. This is very close to what a low-pass filter gives.

Here I'm suspicious about whether computing FFT to take those first 5 coefficients is an unnecessary task. I think applying low-pass filter will just eliminate low-frequency components and it won't have a significant effect on primary FFT coefficients. However there may be some other way in combination with low-pass filter in order to extract same information (that is contained in first five FFT coefficients) without using FFT.

Do you have any ideas or suggestions regarding this issue?

Thanks in advance.

2
The sum over the first five fft coefficients is a very special computation which is also highly depedent on the size of the fft window. What exactly do you want to model? Do you need the full complex valued coeffients or just the real part or the absolute value?André Bergner
Hi Andre, I'm computing FFT of 100-sample-windows that are read in 1sec with 100Hz frequency and taking only the real part of the coefficients. So as to obtain a simple indicator (feature) for low frequency components.mostar
low-pass filters eliminate higher frequencies and pass lower frequencies.Alexey Frunze
Probably should be asked at dsp.stackexchange.commtrw

2 Answers

3
votes

If you just need an indicator for the low freq part of a signal I suggest to do something really simple. Just take an ordinary lowpass filter, for instance a 2nd order butterworth, with the cutoff frequency set appropriately (5Hz in your case, if I understood right). Then compute the energy (sum over squared values) or rms-value over your window (length 100). Or perhaps take the ratio of the low-freq energy and the overall energy of the window, to get a relative measure. That should give you a pretty good indicator for low frequency contributions of your signal.

People tend to overuse the fft for all kinds of really simple tasks. In 90% of the use cases an fft can be replaced by a simpler algorithm.

1
votes

I seems you should take a look at the Goertzel Algorithm, as for the seemingly limited number of frequencies you need, it should take less computation. After updating the feedback parts on each sample, you can select how often to generate your "feature metric" or a little additional weighting of the results, can yield a respectable low pass filter.