12-15-2010 06:47 PM
Hi, there
I am using the PSD function. In order to get the RMS noise, I integrated the PSD data and doubled the result because I have two sides in positive frequency range and negative frequency range. Then my result is 1.414 (or Sqrt(2)) times higher than my RMS data measured in time domain.
Then I looked into the PSD fuction and found out that in the function of "Convert to on-sided spectrum", the amplitude was doubled. But it is not meantioned in the help file.
My thinking is: either change the help file of PSD function and mention that it is a doubled one-sided output or do not double the amplitude when convert the spectrum from two-sided to one-sided output.
best regards
Chengquan Li
12-16-2010 06:17 PM
Hi Chengquan,
Would you mind elaborating a on what math you are expecting to be contained in the PSD function? It would also be useful if you could include a block diagram of your setup.
Elizabeth K.
National Instruments | Applications Engineer | www.ni.com/support
12-16-2010 06:47 PM
Hi, Eli
I was measuring some voltage waveform V(t). Say from t1 to t2 time range, it fluctuated arround 0 (mean value=0). then the RMS of this signal is RMS=\Sqrt(\int_t1^t2V(t)^2dt. And the FFT of this V(t) signal is V(u). Then in frequency domain, We should have the RMS=\Sqrt[\int_(-f1)^(-f2)|V(u)|^2du+ \int_(f2)^(f1)|V(u)|^2du], where f2 and f1 are the lowest and highest frequency of FFT. because the |V(-u)|=|V(u)|, then RMS in frequency domain=\Sqrt[2*\int_(f2)^(f1)|V(u)|^2du], where \int_(f2)^(f1)|V(u)|^2du is the integration of one-side of PSD function |V(u)|^2.
Somehow in the PSD vi, the PSD output has been amplitude doubled, the integrated RMS=\Sqrt[2*\int_(f2)^(f1)2*|V(u)|^2du]. Then I got a factor of 1.414, comparing to the time domain result.
best regards
12-17-2010 01:52 PM
Dr. Chengquan Li,
I know sometimes the help can be hard to navigate, but I think I found the help documentation that address this issue. It can be found here: Power Spectrum.
Under the heading "Converting a Two-Sided Power Spectrum to a Single-Sided Power Spectrum", you can find the following:
"A two-sided power spectrum displays half the energy at the positive frequency and half the energy at the negative frequency. Therefore, to convert a two-sided spectrum to a single-sided spectrum, you discard the second half of the array and multiply every point except for DC by two, as shown in the following equations."
This is why you noticed that the block diagram of "Convert to One-Sided Spectrum" had the output doubled. I hope this helps clear up the issue.
Regards,
Elizabeth K.
National Instruments | Applications Engineer | www.ni.com/support
12-17-2010 03:52 PM
Hi, Eli
Thanks for that. Here I attached a screenshot of PSD LabVIEW Help.
I will suggest that in this document, please add the description of PSD output too. As a user, I always go to check the LabVIEW help by right clicking the fuction first.
best regards
12-27-2010 03:00 PM
Dr. Chengguan Li,
Thank you for your suggestion. I submitted a request to get more information added to that help file.
Best,
Elizabeth K.
National Instruments | Applications Engineer | www.ni.com/support