LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

power spectral density .vi

Hi can anyone advise me on the use of power spectral density .vi,
i plot the graph in dB but how do i  abstract out the values in complex number ie polar
form of the spectrum?
0 Kudos
Message 1 of 14
(6,333 Views)
The PSD VI returns real values. If you look at its diagram or the VI Hierarchy you will see that internally it uses the standard FFT function which returns a complex array. Save a copy of the VI (and its subVIs) to a new location with new names, NOT in vi.lib, and modify the copies to produce the complex output you want. The reason you need to save the VIs to a new location is (1) any LV upgrades would overwrite your changes if you did not and (2) other VIs which call the VIs you are modifying might not work as expected.

Lynn
0 Kudos
Message 2 of 14
(6,309 Views)
Sorry i have no idea how to modify the psd.vi from the hierarachy.Can you advise more.
0 Kudos
Message 3 of 14
(6,295 Views)
Hi,
 
You can browse the hierarchy of psd.vi by going to Browse >> Show VI hierarchy and then double click on any subVI to open its front panel. Do a control E to look at the block diagram of the subVI.
 
In your case, I think you would need to modify the FFT VIs to look at the data in polar form.
 
Hope this helps.
Ankita
0 Kudos
Message 4 of 14
(6,270 Views)

Hi, yes i understand but i have no idea how to modify the hierarchy, ie how do i go about modifying the FFT to give me the complex number.

i need only the complex number it doesnt matter if i want it in polar form.

0 Kudos
Message 5 of 14
(6,265 Views)
Hi Celynn,
 
Power Spectrum is square of magnitude of FFT and hence is always real. You lose any phase information with the power spectrum. If you wnat to work with the complex portion, use the FFT VI instead of the PSD VI. Here is a document that discusses this in detail:
 
Hope this helps.
Ankita 


Message Edited by Support on 07-18-2008 09:13 AM
0 Kudos
Message 6 of 14
(6,256 Views)

Hi ankita,

i have read and understood the function.

Say i need to plot my spectrum in dB and use its complex form to compute some maths.

Do i just add an indicator to the fft output in every level of the hierachy to display the complex form?

Attached is my vi hierachy.

0 Kudos
Message 7 of 14
(6,249 Views)
Hi Celynn,
 
If I am not wrong, it appears that you want to work with the complex portion of the FFT of the signal. As I have already suggested, to make life easier you should use the FFT spectrum(real-imaginary) function along with the PSD function. However, for reasons unclear to me, if you still want to use only the PSD function,  you can add an indicator to the FFT output in all levels of the hierarchy and that would work just as well.
 
Hope this helps.
Ankita
0 Kudos
Message 8 of 14
(6,230 Views)

Hi Ankita,

what i want to calculate here is the coherence between 3 signals. So i will use the FFT  spectrum(real and im) and the cross spectrum(real and im) am i right?

0 Kudos
Message 9 of 14
(6,222 Views)
Hi,
 
As far as I understand Coherence, it is defined as the square of magnitude of cross spectral density divided by the product of individual power spectral densities. So I think you can just use the PSD and CSD functions in LabVIEW to calculate coherence.
 
Ankita
0 Kudos
Message 10 of 14
(6,204 Views)