# Power spectrum question -- seek verification

#### Do you have a question? Post it now! No Registration Necessary Translate This Thread From English to

• Subject
• Author
• Posted on Could some electronics guru here please verify this ?
Suppose that I calculate the power spectrum of an
oscillator output. In the time domain the output is a
sine wave across a 50 Ohm resistor, with units of Volts.
When the Discrete Fourier Transform(DFT) is computed,
followed by the power spectrum, what would be units of
the vertical axis. The horizontal axis unit is Hz.
As the raw DFT values are complex numbers, the power
spectrum must contain the magnitudes of these DFT values,
so that the units for the vertical axis must be Volt/Hz.
Is this correct ? Thanks in advance. Re: Power spectrum question -- seek verification
On 4/22/19 7:01 AM, snipped-for-privacy@gmail.com wrote: Nope.  The vertical axis is in volts squared, because the frequency bin
width is 1/T, where T is the total measurement time.  So the vertical
scaling in volts is the power spectral density (PSD) in V**2/Hz times
1/T Hz.

The horizontal axis is also 1/T per bin.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
We've slightly trimmed the long signature. Click to see the full one. Re: Power spectrum question -- seek verification
On Monday, April 22, 2019 at 8:10:51 AM UTC-4, Phil Hobbs wrote:  Considering the math, can you explain how this comes out of analysis of the
units?

In a DFT is the sinewave the inputs are multiplied by unitless or the same
units as the input?  If unitless, the resultant values are just volts or vo
lt seconds depending on how you regard the input units.  The magnitudes wou
ld then be volts^2 or volts^2*seconds^2 which can be related to power throu
gh a constant impedance so watts or joule seconds.

I remember in college being able to come up with the units for virtually an
y calculation.  Sometimes it took some odd paths to simplify the units, but
it always worked.

--

Rick C.

- Get a 1,000 miles of free Supercharging
We've slightly trimmed the long signature. Click to see the full one. Re: Power spectrum question -- seek verification
On 4/22/19 9:59 AM, snipped-for-privacy@gmail.com wrote: Parseval and Nyquist.  The total power is the same in both domains, and
the bin width in each domain is the reciprocal of the total measurement
time in the other domain.  (You have to leave the power spectrum
two-sided for this to work.)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
We've slightly trimmed the long signature. Click to see the full one. Re: Power spectrum question -- seek verification
On Monday, April 22, 2019 at 7:24:57 PM UTC-4, Phil Hobbs wrote: How does that relate to the units of the bins?

--

Rick C.

+ Get a 1,000 miles of free Supercharging
We've slightly trimmed the long signature. Click to see the full one. Re: Power spectrum question -- seek verification
On 4/22/19 10:40 PM, snipped-for-privacy@gmail.com wrote: The amplitude is always going to be in volts.  It's just the
bandwidth/time duration that you have to worry about.

The energy is the same in the time and frequency domains.  Let's say we
take N samples, a...a[N-1], in a time T. Parseval says

sum     |a[i]|**2  =      sum        |A[i]|**2.
i=0 to N-1                 i = 1 to N-1

where is the transform of .  An A/D converter implicitly divides
its input by the reference voltage, so to convert to V**2, we need to
multiply both sides by Vref**2.

It's natural to want the RHS to be normalized in terms of frequency.
The frequency bin width is 1/T Hz, and the two-sided frequency range is
N/T.  Thus each frequency bin has the total energy in a band of 1/T Hz.

To convert the raw FFT power spectrum to PSD, besides multiplying by
Vref**2, you have to multiply the frequency-domain samples by T, i.e.
divide by the bin width in frequency.

PSD_2sided[i] =  Vref**2 * T * |A[i]|**2, i = 0...N-1

Since the negative frequencies have the same power spectrum as the
positive ones, we usually switch to the analytic signal convention, where

PSD_1sided[i] = { Vref**2 * T * |A|**2   , i = 0 }
{ 2 Vref**2 * T * |A[i]|**2 , 0 < i < (N+1)//2 }

where // is integer division.  What to do about the peculiar sample at
N/2 for even N is left as an exercise for the reader. ;)  (It shouldn't
have anything much in it anyway, provided that you've done your
antialiasing filter correctly.)

Scope and spectrum analyzer FFT power spectra are always quoted in
single-sided terms.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
We've slightly trimmed the long signature. Click to see the full one. Re: Power spectrum question -- seek verification
On Tuesday, April 23, 2019 at 11:21:47 PM UTC+5:30, Phil Hobbs wrote: Thanks for the detailed explanation. I was only referring to the
raw DFT power spectrum. My simple C program does a somewhat
brute force implementation of DFT, and the raw power spectrum,
when plotted with gnuplot shows the peaks at the correct,
expected frequencies(i.e.,fundamental, first harmonic etc.,)
I will add the PSD feature soon. Re: Power spectrum question -- seek verification
On 22/04/2019 13:10, Phil Hobbs wrote:  Although there are some versions of "power spectrum" display that
actually display the amplitude of the signal at each frequency bin.

That is amplitude A determined from A.exp(i.theta) = x + iy

Rather than the true power spectrum A^2 = x^2 + y^2

Always worth checking which display your spectrum analyser is using.

Displaying A, theta plots is quite common in VLBI interferometry. --
Regards,
Martin Brown

#### Site Timeline 