11-18-2015 10:33 PM
Hi,
I'm using Power Spectral Density (PSD) vi and Power spectrum vi to process the same time signal acquired by DAQ (block diagram attached). I sent in a 0.1V 1kHz sinusoidal signal into DAQ, and the Power spectrum gives me the right RMS power at 1kHz (which is 0.05), however the PSD vi gives me 1670, which is just not right. The amplitude PSD gives me should be smaller than the amplitude Power spectrum gives me. This is supposed to be a simple processing but it is driving me crazy. Can somebody please help me resolve this issue?
Thank you very much.
Chuming
Solved! Go to Solution.
11-19-2015 01:44 AM
11-19-2015 05:30 AM
What's your FFT bin width? Why haven't you wired all the inputs? e.g. Sample rate into the calculations?
11-19-2015 07:13 AM
11-19-2015 11:00 AM
Hi,
Thanks for the quick reply. I'm attaching my program. Thank you very much. In this program, I included the calculation with sampling rate, frequency bin size and everything here, which I didn't include before. I also take the squre root of both result to see the result more directly. The input is an 0.1V 1kHz sin signal and Power spectrum gives me the right amplitude but PSD gives me 3300 V/sqrt(Hz) which is too high. Please help.
Thank you very much.
Chuming
11-19-2015 11:45 AM
If you convert the (Evil) Dynamic Data Type coming from the DAQ Assistant to an array of waveforms, the sampling rate information shouldbe included and none of your extra calculations should be required because the Power Sprctrum and PSD VIs will take care of that.. This is what Dennis referred to in his post.
We cannot do much without data. Please chage to waveform data type and add an indicator Array of Waveform. Run the VI until the indicator has data. Stop the VI. From the Edit menu select Make Current Values Default. Save that VI, possible with a different name, and post it. Then we will have access to your data.
Lynn
11-19-2015 01:29 PM
Hi Lynn,
Thanks for the reponse. The reason I used DBL instead of waveform is two-fold. 1. I have two channels of data for me to do FRF transfer function later. 2. I would like to save both PS and PSD data. I'm attaching the complete file in my dropbox and shared here because of the size limit. Thank you very much!
https://www.dropbox.com/sh/f36v3zbemnwcwm4/AABYnOjeEkfLzHSmIyg7kVOoa?dl=0
Chuming
11-19-2015 05:53 PM
I have not dug into your math but when I take the data, convert it to a waveform, and send that to the FFT Power Spectral Density.vi, I get a peak PSD value af about 1.7 mV per root Hz at 2 kHz.
It is so easy to use the waveform datatype and the VIs which accept it automatically do all the scaling for you.
I recommend that you use waveforms for these calculations and arrays for the others if necessary. Newer versions of LV have FRF functions which accept waveforms. As they are in the same palette as the spectrum VIs you are using, your version may have them also. I have attached the modifications I made. When I saved for previous version I got several warnings so some things may not convert correctly. All the graphs have been cleared and the empty graphs saved as default. This way only one copy of the data exists (about 3 MB) and the main VI is much smaller.
Lynn
11-20-2015 12:35 PM
Hi Lynn,
Thank you so much. It looks like PSD module does require the waveform data input. Interestingly, Power spectrum doesn't
Thank you!
Chuming
11-20-2015 12:51 PM