Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

maltab txt code

Status
Not open for further replies.

tigercotter

New Member
I want to the phase difference between between two signals as explained in the attachment about the zero crossings of the two signals will not match up?
 

Attachments

  • zero_cross.zip
    14 KB · Views: 147
Could you clarify your question? It's not particularly clear.

Anyway to get phase difference you could use:

[y1,t1] = max(sinSignal1) and then
[y2,t2] = max(sinSignal2)

and

phase_difference=t2-t1

Then convert phase difference from time to degrees, and use if statements to detect leading or lagging
 
I am collecting data through labview. For instance if the second signal goes to zero on the negative slope and this is its first zero crossing while the second signal has its first zero crossing on the positive slope i.e from neg peak to positive peak, these two times should gine the wrong time difference
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top