Calculate phase angle between sine waves?

1. Feb 2, 2012

rjsalmon

Hello,

I am trying to work out how to determine the phase angle between two sine wave mathematically?

I have setup a Matlab Simulink model and I would like to calculate the phase angle between my current and voltage (both at the same frequency) without using preprogrammed blocks, as i eventually want to calculate the power factor of the circuit.

Is there a simple way to calculate the phase angle between two sinusodal waves?

Thanks,
Rob

2. Feb 13, 2012

elibj123

If the sines are of the same frequency, use their multiplication

$$sin(ft+a)sin(ft+b)=0.5[sin(a-b)+sin(ft+(a+b)/2)]$$
Averaging over a complete cycle (1/f) will kill off the second sine, and will leave you with 0.5sin(a-b), which you can easilly derive the phase difference from