Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert sine waveform in to Square wave

Dear All
 
Using NI DAQ I aquare two voltage waveform simultaneously. I want to calculate phase difference of those analog sine waveforms. How to do that? If I want to convert those sine waveform into square wave, what is the procedure. If any friend know the answer please mail me
 
Wije
0 Kudos
Message 1 of 6
(5,212 Views)
Assuming the frequency of the two signals is the same, one way is to use the trig identities.

sin(x+theta)*sin(x) = 0.5 * {cos((x+theta)-x) + cos((x+theta+x))}

The second term is a signal at twice the frequency, but the first term simplifies down to a DC signal that is equal to cos(theta).  As the phase changes, the DC term of this multiplication will also change.  You have to remember to normalize both signals to an amplitude of one before the muliplication.




Randall Pursley
0 Kudos
Message 2 of 6
(5,207 Views)

Dear Randall

Thanks for the valuble comments on my problem. According to first terms of equation { sin(x+theta)*sin(x) } is equal cos(theta) when the when the x is equal to period nT/4 when n = 1,3 etc. This point can be detect eassliy when the amplitude of the 1st sample is equal to zero. But it is not always zero. So I cannot assign exactly Time indices to get y values for multiflication to show the phase differance when running the programme. If we can obtain time values of the two signals when cross zero line (Y=0) it is easy to compute time differance of two arrays signal. So How this procedure do in LabView?

Best Regards

Wije

0 Kudos
Message 3 of 6
(5,180 Views)
Hey Wije,

You may want to have a look at the following KB article. It shows you how to calculate the phase difference between two channels in LabVIEW.

How Can I Determine Phase Mismatch Between Two Channels?
http://digital.ni.com/public.nsf/allkb/F4BB644ECCA595D886256FFE00722E29?OpenDocument
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 4 of 6
(5,173 Views)

Dear Chris

 

I triyed sevaral times to open the document. Always I can see text of documents not figures. Please email me figures of the document which is How can I dittermine phase mismach between two channels.

 

Regards

wije

0 Kudos
Message 5 of 6
(5,097 Views)
Wije,

The images were linked to an internal server.  They are fixed now and you should be able to see them.  Let me know if they don't show up.

Regards,

Neil S.
Multifunction DAQ PSE
National Instruments
0 Kudos
Message 6 of 6
(5,087 Views)