1
$\begingroup$

I've been reading time series data off of an accelerometer, and converting it to one RMS acceleration in g. The sensor works in a range of 0-6.4 kHz approximately. Ideally i would like to restrict the range to 10 - 5000 Hz, i however there is no direct way or setting to modify this on the sensor.

Hence i'm thinking of getting all the time series data, and performing an FFT. Then removing any unwanted frequency by setting their values to zero, perform an inverse FFT and calculate my new RMS acceleration based on the new signal.

Does this make sense from a DSP point of view?

Also, should i remove all the negative frequency components too, before performing the inverse FFT?

I'm doing this on python using numpy library.

$\endgroup$

2 Answers 2

-1
$\begingroup$

There is no need of performing an inverse FFT in order to calculate RMS value of the signal. You can it directly from the FFT spectrum itself. You can simply consider the data of 10Hz to 5kHz from their corresponding FFT bins and apply Parseval's theorem, it will give you accurate RMS values in that particular frequency range.

$\endgroup$
-1
$\begingroup$

I agree with the other answer, that you can just take into account the data from 10 to 5000 Hz. If you do want your time signal with only frequencies in that range, don't just set to 0 in the spectrum because this can quickly lead to aliasing and artefacts in your signal. Try instead to do a band pass filtering using either an IIR or a FIR filter. For that you can check into any DSP-Book of your liking and use the library scipy.signal which has already implemented tons of functions.

The negative frequencies are actually needed in order to reconstruct your time signal from a FFT so don't throw them away. For a real signal there's no "new" information in the negative part (magnitude is mirrored and phase is mirrored and multiplied by -1 around 0 Hz), but for complex signals, there would be (which is not very interesting for your needs). You can just ignore the negative frequencies in your analysis but as soon as you want to go back to time, you have to take them with you. There's the function numpy.fft.rfft which gives you only the positive part and numpy.fft.irfft which reconstructs its time signal using only positive frequencies. The standard numpy.fft.fft needs the other half!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.