LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase Shift and Power Spectrum..

Hi.
I am new to Labview..
I want to find the phase difference between two signals.. I actually want to do this.. I am sending out a refernce signal and taking in an input.. now for further processing I need to multiply the input with the refernce.. For tht I think both of them must be in the same phase.. So how should I go about phase shifting the refernce signal.. And I also want to know wat does a power spectrum of a signal indicate..? And wat is the difference between getting a FFT of a signal (converting the complex no. into its polar form and plotting the 'r' value) and Amplitude Spectrum..
I am an amateur in the field of digital signal processing so please explain n a lucid language..
Thanx..
Gokul..
0 Kudos
Message 1 of 25
(5,522 Views)
This will give you the phase difference of sinusoids.  If your signal is more complex then the phase difference will be different at various frequency components.


Randall Pursley
Message 2 of 25
(5,494 Views)
Thanks a lot for that reply.. But please tell me about the power spectrum.. wat does it tell us?
0 Kudos
Message 3 of 25
(5,480 Views)
Thanks a lot for that reply.. But please tell me about the power spectrum.. wat does it tell us?
0 Kudos
Message 4 of 25
(5,481 Views)
I get a perfect result if the sinusoids have a phase difference other than zero.. when their phase difference is zero I am not getting a proper answer.. It shows some -ve answer.. For example, if u send sinusoids with zero phase and then apply the vi shown in the above post I am getting some -6.6667.. Wat is the problem ?
0 Kudos
Message 5 of 25
(5,475 Views)
With respect to the reply from rpursley8, wat is the difference if I use SingleToneMeasurement vi from the Waveform Measurement function palette and take the difference of the detected phase of the two sinusoids and then display it as the Phase Difference?
0 Kudos
Message 6 of 25
(5,468 Views)

Randall's vi is based on the two input signals being of the same amplitude.  If one signal is greater in amplitude than the other, you will not get desired results.  This could be why you are getting a negative number when both signals are in phase.

You could use single tone measurement for each signal and subtract the two, then take absolute value to get the phase difference.

Power spectrum refers to the power or each sinusoid in a signal.  If the signal is an ideal sine wave, you will get one straight vertical line in the power spectrum graph showing the power level (amplitude) of that signal.  If the signal is something like a square wave which is the product of many sine waves, you will get many lines showing the power at each sinewave frequency of all sinewaves that make up the square wave.  In a power spectrum graph, the x axis represents frequency, the y axis represents amplitude or power.

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 25
(5,460 Views)
I do normalize the signals before processing them, so the amplitudes should be close to the same.  I don't see the problem a 0 degrees phase shift when I use it.  If the signals are noisy in some way, that might cause the problems or if there is a DC offset present in one of the signals.
Randall Pursley
0 Kudos
Message 8 of 25
(5,453 Views)
i dont understand the difference between a power spectrum and amplitude spectrum.. does both of them represent amplitude vs. freq of a signal?? ok let power spectrum be power vs. freq.. but is power a sole function of amplitude? then wat is the use of power spectrum?
0 Kudos
Message 9 of 25
(5,441 Views)
i dont understand the difference between a power spectrum and amplitude spectrum.. does both of them represent amplitude vs. freq of a signal?? ok let power spectrum be power vs. freq.. but is power a sole function of amplitude? then wat is the use of power spectrum?
0 Kudos
Message 10 of 25
(5,442 Views)