How to measure the phase difference between two signals in simulink?

I have two signals in my circuit and i would like to measure the phase difference between them. Is there a block i could use? If not, how can i measure this difference?

4 commentaires

i don't think such block exist,
try the "complex phase difference" model
You can use Fourier block to get amplitude and phase angle of each signal, and by subtracting the phase angles you will get the phase difference between your signals.
dear hamed
fourier block uses for Fund, dc. or harmonics, i want to measure the original signal angle, how can i do it ?

Connectez-vous pour commenter.

 Réponse acceptée

Rick Rosson
Rick Rosson le 1 Août 2012
Try multiplying the two signals together, and then passing the result through a low pass filter.

3 commentaires

Can you explain how this works please?
how does this methode give the phase difference ?
You may find the answer from https://en.wikipedia.org/wiki/Phase_detector#Analog_phase_detector

Connectez-vous pour commenter.

Plus de réponses (2)

Hamed Bahmani
Hamed Bahmani le 13 Juin 2018
You can use Fourier block to get amplitude and phase angle of each signal, and by subtracting the phase angles you will get the phase difference between your signals.

4 commentaires

what block should i use with fourier to display the mag and phase ? scope ? or display
Tysm
Helped a lot!!
This gives a different answer from the known way .... measuring from the graph directly!!

Connectez-vous pour commenter.

Getu Gabisa
Getu Gabisa le 15 Sep 2020
Phase difference measurment
Its accuracy is based on the sampling time you use.By simply connecting in parallel you can measure phase differnce of any number of signales with resepect to a reference signal.

4 commentaires

Works Great. Thank You Very Much.
Hello, i use your file in my proyect, i want to know if i can share it and give you the credits. i can give you my email for more details if you want. thanks
Hi I came across your model for measuring phase difference in one of my projects. Could you please give me an explanation of how this works ? I did not understand the state-flow chart

Connectez-vous pour commenter.

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by