0
$\begingroup$

I'm running an fft once a second on a buffer of data 60 seconds long. The data is sampled at 558Hz and is placed into the fifo buffer once per second. FFT is numpy.rfft. The data is scaled to psia prior to fft. From the research I have done so far (found several previous questions on this) the unit of the fft magnitude will also be in psia. But I am unsure of how I should interpret this magnitude. Is it a sum of the entire sample? Something else? My intuition says it is a sum of the entire sample. Where if I had say a peak at 25Hz of 30psia on the 60 second buffer, if I wanted to know the peak over a 1 second sample I would divide by 60. My sensor data is only varying by about 2-3 psi when plotted in time domain so that got me wondering how the fft y-data could be orders of magnitude larger than the pk-pk difference of input signal. Or maybe I'm thinking about this totally wrong, I am pretty ingorant on this : )

$\endgroup$
0
$\begingroup$

In general the output of a Fourier Transform is "spectral density". For a continuous Fourier Transform that's implicit: if the signal in Volts, the unit of the FT are Volts/Hz. For the discrete case, the units are the same but the frequency interval is implicit: it's the sample rate divided by the FFT length.

If you want to extract "physical" meaning from the FFT, you need to watch your scaling. In your specific case it would probably be best to scale both the forward and backward FFT by $1/\sqrt{N}$ since that maintains Parseval's theorem, i.e. $$\sum |x[n]|^2 = \sum |X[k]|^2$$ which means that total power in the time and frequency domain are the same.

$\endgroup$
4
  • $\begingroup$ Hil, is the OP asking about power? I don't see that. $\endgroup$ – robert bristow-johnson Apr 21 at 18:11
  • $\begingroup$ No, but they are asking about the interpretation of the Y-axis. So I thought power conservancy is better then not. $\endgroup$ – Hilmar Apr 21 at 18:45
  • $\begingroup$ well, if using the most common scaling, then the answer to the question in the title would be "yes", i think. i dunno exactly how to answer the question. $\endgroup$ – robert bristow-johnson Apr 22 at 1:33
  • $\begingroup$ That math ima have to learn up on. I did try to empirically determine the scaling by feeding known amplitudes in. Initially it looked like the relationship of signal amplitude to bin amplitude was linear and for each bin that seems to be the case. But each bin seems to have a different relationship. Looking more into the differences between forward and backward fft's I found some information that backwards can be used if scaling is not important because it saves some divisions. And numpy.rfft by default uses backward. So ima try forward and see if the scaling starts to look better. $\endgroup$ – chrismec Apr 22 at 13:21
0
$\begingroup$

Different FFT implementations use different scalings, some energy preserving (Parseval), some amplitude preserving, some a square root between the two. You might be using an energy preserving FFT implementation, where a longer signal with more energy thus results in the higher FFT magnitude. Scale this result down by length to get something closer to amplitude preserving. Or use a different type of FFT implementation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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