Matlab FFT Units: Solving the Mystery

  • Thread starter Thread starter Mindscrape
  • Start date Start date
  • Tags Tags
    Fft Matlab Units
AI Thread Summary
The discussion centers on understanding the units returned by MATLAB's FFT function, specifically how to convert the output into useful measurements like volts/sqrt(Hz) or volts^2/Hz. Participants clarify that the FFT output is in volts, and to obtain amplitude, one should take the absolute value of the FFT result. To achieve the desired units, it is suggested to square the modulus of the FFT coefficients and adjust for the frequency bin spacing. The conversation also highlights the need for practical examples and comparisons with data from spectrum analyzers. Overall, the thread emphasizes the complexity of unit conversion in FFT results and the importance of understanding the underlying mathematics.
Mindscrape
Messages
1,854
Reaction score
1
I was browsing another topic, and I suddenly remembered that I've never quite figured out what units matlab's fft returns. I've used the fft before and found where I had signal noise by taking the power density of the Fourier coefficients, which is all I really wanted to use the fft for in the first place. Still, I'm curious what would need to be done to get a useful measurement like volts/sqrt(Hz), or volts^2/Hz. The units after the FFT should still be in volts, so would all I need to do is divide by frequency, and take the complex conjugate or complex conjugate root? Anyone done this before, if so mind posting your code for me to look at? My initial search on the internet, even through the mathworks site, still reveals nothing very concrete.
 
Physics news on Phys.org
The units of FFT will be in volts only as you mentioned but i don't know the procedure to get it in terms of other units.
 
The answer from MATLAB will be complex, you'll get the transfer function H(w).

To get amplitude (volt) you need to take the absolute value of the result.

abs(fft(x));

Acctually you will get (volt/radian velocity)
 
Right, but I'm looking for a concrete example of taking the FFT coefficients from matlab, and producing Volts/sqrt(Hz). I think my original inclination of taking zz*, dividing by frequency, and sqrt must be very close.
 
Sorry, it seems that MATLAB will return in frequency domain and not radial velocity.

y=fft(x);
z=abs(y); //Now you have V/Hz
z=z*sqrt(freq) // Now you have V/sqrt(Hz) since (freq/sqrt(freq) = sqrt(freq))
 
As you noted, the units for the FFT is the same as in the time domain, so if it's volts, you need to square the modulus to get a quantity proportional to the power. If I understand correctly what you're asking for, you then want to divide by \Delta\omega, the spacing of bins in the frequency domain. But \Delta\omega is a constant, so simply squaring the FFT gives you what you want, up to an overall constant.
 
Jaynte, you may be right, I'll give it a try sometime. I just have to get my hands on a spectrum analyzer, save the data, and compare. Or take somebody's time data that they have converted into V/sqrt(Hz) by some method, and see what MATLAB gives, or probably actually what octave gives.
 

Similar threads

Replies
5
Views
2K
Replies
11
Views
3K
Replies
3
Views
2K
Replies
1
Views
2K
Replies
3
Views
3K
Back
Top