05-14-2013 12:38 PM
Hello,
I have a .csv file that corresponds to readings (every 1 second) of voltage.
I am able to read it using LabView, I use Read Spreadsheet and take its output (All Rows) then select the first column only, then pass it to Build Waveform, then display Power Spectral Density.
Unfortunately, nothing appears.
Any ideas? The files just contains double numbers (e.g. 0.01234 etc). There are 50 thousand rows.
Thanks in advance.
Solved! Go to Solution.
05-14-2013 01:00 PM - edited 05-14-2013 01:00 PM
Your lack of a dt could be a major problem (default to 0). The dt should be your sample rate (in seconds/sample).
05-14-2013 01:09 PM
It works fine for me.
Some troubleshooting tips:
You need to make sure dt is set to a positive number (I just used 1).
Have you confirmed that you are passing a valid waveform to the FFT Power Spectrum and PSD.vi? The easiest way to do so would be to wire your input waveform to a graph and make sure it looks good.
Does the FFT Power Spectrum and PSD.vi generate an error?
Sometime spectrums are hard to see on graph -- try creating an indicator from the block diagram (right click on the output and click "Create Indicator") and check to see if it is indeed returning nothing.
Hope this helps,
Simon
05-14-2013 01:35 PM - edited 05-14-2013 01:35 PM
Hi,
Yes dt=1. And I output it to a graph and it works fine.
Please try the attached file, corresponding to first 1000 samples.
(change extension to csv)
05-14-2013 02:40 PM
OK so I was able to get correct result. But still there seems to be something wrong.
When I plot the PSD the range is around 1m Hz to 0.5 Hz which is fine.
But then when is normalize the signal by dividing it over the square of the resistance, the freq. range change! It shouldn't! only the amplitude should be affected.
Please see the attachment yourself. Use the sample csv file in the previous post.
05-14-2013 03:39 PM
I tried to edit the previous post but not possible.
Anyway, dividing the output of the PSD actually seems to affect x-axis instead of y-axis !!!
Don't know why!
05-14-2013 09:09 PM
Hello,
I solved the problem by unbundeling the signal out of the PSD, then taking the magnitude subsignal and scaling it alone, then bundeling together.