LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Could anyone suggest me ways to get the phase difference between two signals of different frequencies. example files could have been useful

If the waveforms are at different frequencies, the phases of the two waveforms change at different rates.  The phase difference will also be constantly changing.  What are you actually trying to measure???

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 8
(3,514 Views)
i have a mach-zahender interferometry set-up, with PZT controlled mirror on one of the arms. An input ramp signal (few Hz) is fed into the PZT. This leads to a translation motion in the fringes of the interferogram. Due to this translation motion, the output signal from pixels of the CCD detector, is like a sine wave. I compare the output signal from a single pixel of the ccd with the input signal to the PZT. The phase difference between both the signals is obtained and the difference is then fed back to the input signal to the PZT. This feedback results in the locking of the phase of both signals.

I am using labview to generate the input ramp signal to the PZT. Since my frame grabber is not a NI card, so I save the output images and obtain the signal at a pixel by picking out the value at that pixel in each frame.
This output signal is then compared with the input signal to obtain the phase. There is the problem and an unknown place to me.
In principle i wish to develop  a PLL circuit in labview, but i stuck with it. If there could be some elagent and simple way of doing it then i would be very happy.

I am very greatful for the help!!


0 Kudos
Message 3 of 8
(3,500 Views)

I assume that instead of a ramp you mean you are using a sine signal to move the PZT.  If this is the case, I would do the following:

Multiply the CCD signal by the sine portion of the PZT control signal = A.  Also multiply the CCD signal by a cosine signal with the same magnitude as the sine PZT signal = B.  Sum each of these over 1/2 of a period (inverse of frequency).  The tangent of the phase difference is equal to sum B/sum A.

This allows you to make an adjustment every half cycle or so of your output frequency.  After you make an adjustment, you should collect all new data for the next iteration.

I think instead of adjusting your phase of your control signal, you will need to adjust the offset of the sine wave to control the phase relationship.  In other words, if your control signal is A + B sin theta, adjust A to change the phase relationship between the input and output signals.  The phase difference should be a linear function of A.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 8
(3,484 Views)
thank you very much, Bruce.
I will surely follow your suggestions, but a quick question.
Do you say that i dont use ramp signal. Why do you think so? I am supposed to use a ramp signal. Do you think while using ramp signal i will not get a sine wave in the output.

Thank you very much
0 Kudos
Message 5 of 8
(3,470 Views)

Yes, you will get a sine wave in the output, but what are you going to match phases with?  With a ramp, there is nothing that you can adjust to match the phase of the sine wave in the output.  I just don't understand your ultimate goal.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 8
(3,446 Views)
Is in't the ramp, a sawtooth signal. Ok, if not i am using a sawtooth signal. In prinicple i want to phase lock both signals. If i have a pll circuit, then i think the output of the pll should be the phase difference. That phase correction, i wish to input to the input signal.
Can't i do that?
what do you say?
0 Kudos
Message 7 of 8
(3,436 Views)

I still don't think it will work.  The frequency of the phase shifts on the CCD will be different than the frequency of the sawtooth signal.  It still isn't clear what you want to synchronize or how to do it.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 8 of 8
(3,430 Views)