Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

psd

HI,I want to calculate the psd and csd in labview.
I am also a matlab user and there is a nice function
[Pxx,F] = psd(X,NFFT,Fs,WINDOW,NOVERLAP)
I load a static data and want to set the length of window and the
percent of overlap,but it seems not work.
In labview,for a static data, it seems that the window is applied
to the whole length of the data and I can not choose the length of
the window.
Another question,what the meaning of the number of the number of averages?
In matlab, for a signal whose length is 8192 points, if the length of
window is set as 1024 points and the overlap is set 0, the signal is
divded into 8 sections and at last 8 sections were averaged.but in
labview,if I set the number of averages,it does not work.
the attached file are the data, vi and the plots form labview and matlab.
please help me !!!!!
 
Download All
0 Kudos
Message 1 of 9
(13,115 Views)
Based on your description of the expected behavior, the logic seemed pretty straightforward to map desired block size and % overlap into start index and number of averages. The number of averages is the number of blocks that will be included in the averaged spectrum returned by PSD. You can learn more about different averaging modes from the online help or by doing a search at NI.com. I have attached a modified version of the original VI. Please let us know if you have any questions.

Message Edited by dsb@NI on 05-22-2006 10:09 AM

Doug
NI Sound and Vibration
0 Kudos
Message 2 of 9
(13,097 Views)
Thanks a lot!
 
Now I am clear that what I refered to is the Welch Method to estimate the PSD.
 
But, I can not open your VI since I only have Version.7, would you like to save your
 
file in Version.7 environment?
 
Thanks again
0 Kudos
Message 3 of 9
(13,052 Views)
In LabVIEW 7.0:
Doug
NI Sound and Vibration
0 Kudos
Message 4 of 9
(13,037 Views)
It is so kind of you, thanks a lot, and I will try to compare the results with the one from matlab.
0 Kudos
Message 5 of 9
(13,017 Views)
This is my first question for this forum, so I hope it finds the right address.
I have a time data recorded in labview 8.0.  When  I  take the PSD in Labview and in  MATLAB (either using spectrum.periodogram or spectrum.welch) the amplitudes are different. They are close to each other but not same.
For example if my  time signal is  a sinus the amplitude of PSD (LAbview without any windowing or averaging) is -47.97dB but in Matlab it is -50.01dB.
For my application I need to get the same amplitudes both in Matlab and Labview. I guess they use different algorithms to estimate or calculate the PSD, but how can I obtain the same PSD spectrum in Labview and Matlab. Can anyone explain me why they are different?
This question is also related with Matlab, I hope someone has faced with a similar situation.
Thanks
icoz


Message Edited by icoz on 11-29-2007 09:56 PM
0 Kudos
Message 6 of 9
(12,225 Views)
There are a number of different reasons that could lead to ~3 dB differences in PSD results:
1. spectrum displayed in rms units versus peak units
2. different dB reference (reference 1 or 0.707 or other)
3. different window

I am assuming that you are processing the exact same data in LabVIEW and Matlab.

Do the spectra have the same shape, but one is just shifted by a ~3 dB? Compare the spectra expressed in linear units.

Please share the results of your investigation. If you post back to the forum with more questions, please provide as much information as possible (such as the time-domain data, your LabVIEW VI, a simple math script file) so that we can provide more specific recommendations.
Doug
NI Sound and Vibration
0 Kudos
Message 7 of 9
(12,195 Views)
I am working in labview 8.0. I am trying to make a data aquisition software where I can also make a pre-process of the data  using the welch spectrum. The problem is that I need to acquire signals from a multin channel ADC. With tyhe software I have created until the moment I can only see the welch spectrum of the first channel. Could anybody help me because I have no more ideas yo arise my objective. I am sending the VI and an example of a data acquired in two channels.

Thank very much!
Download All
0 Kudos
Message 8 of 9
(11,979 Views)

Hi Doug,

 

Thanks for your help.

 

I want to ask you another question.

 

Let's say I want to get the PSD of an acceleration data. The unit of PSD that you shared is dB. How can I change it into g^2/Hz?

 

Thanks in advance,

 

Best regards,

Can

0 Kudos
Message 9 of 9
(7,451 Views)