Units of a Fourier Transform (FFT) when doing Spectral Analysis of a Signal

MathPhysicsFftMeasurementSpectrum

Math Problem Overview


My question has to do with the physical meaning of the results of doing a spectral analysis of a signal, or of throwing the signal into an FFT and interpreting what comes out using a suitable numerical package,

Specifically:

  • take a signal, say a time-varying voltage v(t)
  • throw it into an FFT (you get back a sequence of complex numbers)
  • now take the modulus (abs) and square the result, i.e. |fft(v)|^2.

So you now have real numbers on the y axis -- shall I call these spectral coefficients?

  • using the sampling resolution, you follow a cookbook recipe and associate the spectral coefficients to frequencies.
  • AT THIS POINT, you have a frequency spectrum g(w) with frequency on the x axis, but WHAT PHYSICAL UNITS on the y axis?

My understanding is that this frequency spectrum shows how much of the various frequencies are present in the voltage signal -- they are spectral coefficients in the sense that they are the coefficients of the sines and cosines of the various frequencies required to reconstitute the original signal.

So the first question is, what are the UNITS of these spectral coefficients?

The reason this matters is that spectral coefficients can be tiny and enormous, so I want to use a dB scale to represent them.

But to do that, I have to make a choice:

  • Either I use the 20log10 dB conversion, corresponding to a field measurement, like voltage.
  • Or I use the 10log10 dB conversion, corresponding to an energy measurement, like power.

Which scaling I use depends on what the units are.

Any light shed on this would be greatly appreciated!

Math Solutions


Solution 1 - Math

> take a signal, a time-varying voltage v(t)

units are V, values are real.

> throw it into an FFT -- ok, you get back a sequence of complex numbers

units are still V, values are complex ( not V/Hz - the FFT a DC signal becomes a point at the DC level, not an dirac delta function zooming off to infinity )

> now take the modulus (abs)

units are still V, values are real - magnitude of signal components

> and square the result, i.e. |fft(v)|^2

units are now V2, values are real - square of magnitudes of signal components

> shall I call these spectral coefficients?

It's closer to an power density rather than usual use of spectral coefficient. If your sink is a perfect resistor, it will be power, but if your sink is frequency dependent it's "the square of the magnitude of the FFT of the input voltage".

> AT THIS POINT, you have a frequency spectrum g(w): frequency on the x axis, and... WHAT PHYSICAL UNITS on the y axis?

Units are V2

> The other reason the units matter is that the spectral coefficients can be tiny and enormous, so I want to use a dB scale to represent them. But to do that, I have to make a choice: do I use the 20log10 dB conversion (corresponding to a field measurement, like voltage)? Or do I use the 10log10 dB conversion (corresponding to an energy measurement, like power)?

You've already squared the voltage values, giving equivalent power into a perfect 1 Ohm resistor, so use 10log10.

log(x2) is 2 log(x), so 20log10 |fft(v)| = 10log10 ( |fft(v)|2), so alternatively if you did not square the values you could use 20log10.

Solution 2 - Math

The y axis is complex (as opposed to real). The magnitude is the amplitude of the original signal in whatever units your original samples were in. The angle is the phase of that frequency component.

Solution 3 - Math

Here's what I've been able to come up with so far:

The y-axis seems likely to be in units of [Energy / Hz] !?

Here's how I'm deriving this (feedback welcomed!):

  1. the signal v(t) is in volts

  2. so after taking the Fourier integral: integral e^iwt v(t) dt , we should have units of [volts*seconds], or [volts/Hz] (e^iwt is unitless)

  3. taking the magnitude squared should then give units of [volts^2 * s^2], or [v^2 * s/Hz]

  4. we know Power is proportional to volts ^2, so this gets us to [power * s / Hz]

  5. but Power is the time-rate of change in energy, i.e. power = energy/s, so we can also write Energy = power * s

  6. this leaves us with the candidate conclusion [Energy/Hz]. (Joules/Hz ?!)

... which suggests the meaning "Energy content per Hz", and suggests as a use integrating frequency bands and seeing the energy content... which would be very nice if it were true...

Continuing... assuming the above is correct, then we are dealing with an Energy measurement, so this would suggest using 10log10 conversion to get into dB scale, instead of 20log10...

...

Solution 4 - Math

The power into a resistor is v^2/R watts. The power of a signal x(t) is an abstraction of the power into a 1 Ohm resistor. Therefore, the power of a signal x(t) is x^2 (also called instantaneous power), regardless of the physical units of x(t).

For example, if x(t) is temperature, and the units of x(t) are degrees C, then the units for the power x^2 of x(t) are C^2, certainly not watts.

If you take the Fourier transform of x(t) to get X(jw), then the units of X(jw) are C*sec or C/Hz (according to the Fourier transform integral). If you use (abs(X(jw)))^2, then the units are C^2*sec^2=C^2*sec/Hz. Since power units are C^2, and energy units are C^2*sec, then abs(X(jw)))^2 gives the energy spectral density, say E/Hz. This is consistent with Parseval's theorem, where the energy of x(t) is given by (1/2*pi) times the integral of abs(X(jw)))^2 with respect to w, i.e., (1/2*pi)*int(abs(X(jw)))^2*dw) > (1/2*pi)*(C^2*sec^2)*2*pi*Hz > (1/2*pi)*(C^2*sec/Hz)*2*pi*Hz > E.

Conversion to a dB (log scale) scale does not change the units.

If you take the FFT of samples of x(t), written as x(n), to get X(k), then the result X(k) is an estimate of the Fourier series coefficients of a periodic function, where one period over T0 seconds is the segment of x(t) that was sampled. If the units of x(t) are degrees C, then the units of X(k) are also degrees C. The units of abs(X(k))^2 are C^2, which are the units of power. Thus, a plot of abs(X(k))^2 versus frequency shows the power spectrum (not power spectral density) of x(n), which is an estimate the power of a set of frequency components of x(t) at the frequencies k/T0 Hz.

Solution 5 - Math

Well, late answer I know. But I just had cause to do something like this, in a different context. My raw data was latency values for transactions against a storage unit - I resampled it to a 1ms time interval. So original data y was "latency, in microseconds." I had 2^18 = 262144 original data points, on 1ms time steps.

After I did the FFT, I got a 0th component (DC) such that the following held:

FFT[0] = 262144*(average of all input data).

So it looks to me like FFT[0] is N*(average of input data). That sort of makes sense - every single data point possesses that DC average as part of what it is, so you add 'em all up.

If you look at the definition of the FFT that makes sense too. All of the other components would involve sine and cosine terms too, but really the FFT is just a summation. The average is just the only one that happens to be present in all points equally, because you have cos(0) = 1.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAssad EbrahimView Question on Stackoverflow
Solution 1 - MathPete KirkhamView Answer on Stackoverflow
Solution 2 - MathLaurence GonsalvesView Answer on Stackoverflow
Solution 3 - MathAssad EbrahimView Answer on Stackoverflow
Solution 4 - MathRoland PriemerView Answer on Stackoverflow
Solution 5 - MathKip IngramView Answer on Stackoverflow