LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two-sided power spectrum values

Hello,

I've been studying a pdf document from NI: Labview Analysis Concepts.

I've stopped at Chapter 4 (Frequency Analysis (page 4-22)),where I have some problems understanding the calculations for the Power Spectrum.
I,ve generated a sinusoidal signal, which contains 16 samples, attached here.
I understand that  if you  compute  the Power Spectrum:

[FFT(signal)*conjugatedFFT(signal)]/number of samples = I get a scaled, two-sided, magnitude squared spectrum.

However, the document states that the heigth of the components of this spectrum is Ak^2/4. Ak is the peak amplitude of the sinusoidal
component at frequency k.

Is Ak the amplitude resulting from the simple FFT (simple magnitude spectrum)??? I do not understand which is the value for Ak. I need
to correctly understand which unit of measure I have on the Y-axis.

Thank you
 
Download All
0 Kudos
Message 1 of 9
(4,228 Views)
Hi Raul,

Ak would be the value resulting from the simple FFT.
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 2 of 9
(4,192 Views)
Hello and thank you for your answer.

I tried to plot the Simple FFT output for a signal and then I calculated the Power Spectrum for the same signal (with the formula from the document).

The values do not match. Both , Simple FFT and Power Spectrum are double sided.
As I understand, if I look at the maximum value of the simple FFT I can say that value is Ak.
So if I calculate, Ak^2/4, then I should get the value from the same frequency line, but from the Power Spectrum?

I have attached some pictures with my calculations.

Thank you
Download All
0 Kudos
Message 3 of 9
(4,182 Views)
Hi Raul,

I made mistake the last time when I said Ak is the value resulting from FFT. It would just be the peak amplitutude of the sinusodial curve.For example, in your case it would be 1 (This is from the images that you posted).

You can use the FFT power spectrum to calculate thr power spectrum value.


Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 4 of 9
(4,142 Views)
Hello and thank you for your answer.
Now it makes sense.
However, if you look at the formula from the pdf document, it says:

Power Spectrum = FFT(signal)*conjFFT(signal)/number of samples.

I believe that in the FFT Power Spectrum.vi (and in the pdf document) the Power Spectrum is calculated like this:

Power Spectrum = FFT(signal)*conjFFT(signal)/(number of samples)^2

This produces the double sided spectrum. In order to obtain the correct value in Vrms^2, the plot should be
one sided and the values multiplied by two.

Is this correct?

Thank you.
0 Kudos
Message 5 of 9
(4,124 Views)
Hi Raul,

The two sided power spectrum formula  is :

Power Spectrum = FFT(A)*FFT*(A)/n^2;

You can also find the formula and the explanation here







)
Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 6 of 9
(4,095 Views)
Thank you for your help,

Have a nice day. Smiley Wink
0 Kudos
Message 7 of 9
(4,076 Views)

Hello sir/madam,

If we multiply signals of 2 different frequencies (ex: 100 and 1000) we should get 2 spikes in the spectrum, one is at 1000+100 and another at 1000-100. but i am getting only one spike at 1000-100.

what should i do to get another spike.

0 Kudos
Message 8 of 9
(3,519 Views)

Hello ashwini11,

 

Thanks for using the National Instruments forums. This hread is over 9 years old, and I believe the best idea is for you to post your question creating a new thread, so that the community can find it and help you more efficiently.

 

Also, try sharing the VI you are using, since its easier to understand what might be happening when we have the code available.

 

All the best for your applciation!

0 Kudos
Message 9 of 9
(3,506 Views)