Matlab FFT Units: Solving the Mystery

  • Thread starter Thread starter Mindscrape
  • Start date Start date
  • Tags Tags
    Fft Matlab Units
Click For Summary

Discussion Overview

The discussion centers around understanding the units returned by MATLAB's FFT function, particularly in the context of converting these units into meaningful measurements such as volts/sqrt(Hz) or volts^2/Hz. Participants explore the implications of FFT output for signal analysis, including power density calculations and the relationship between time and frequency domains.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant notes that the FFT output will be in volts and questions how to convert this to other units like volts/sqrt(Hz) or volts^2/Hz.
  • Another participant confirms that the FFT result is complex and suggests taking the absolute value to obtain amplitude in volts.
  • A different participant proposes that to achieve volts/sqrt(Hz), one might need to take the complex conjugate, divide by frequency, and apply a square root.
  • Another response indicates that the FFT output is in volts/Hz and suggests multiplying by the square root of frequency to obtain volts/sqrt(Hz).
  • One participant emphasizes that squaring the modulus of the FFT gives a quantity proportional to power, but notes the need to divide by the bin spacing in the frequency domain for accurate power density representation.
  • A later reply expresses intent to compare MATLAB results with data from a spectrum analyzer to validate the conversion process.

Areas of Agreement / Disagreement

Participants generally agree that the FFT output retains the units of the input signal (volts), but there is no consensus on the exact procedure for converting these units into volts/sqrt(Hz) or volts^2/Hz. Multiple competing views on the conversion methods remain unresolved.

Contextual Notes

There are limitations regarding the assumptions about the frequency bin spacing and the specific methods for unit conversion, which are not fully resolved in the discussion.

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 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K