finding phase shift using i and q signals

Thread Starter

ashwini1

Joined Aug 1, 2009
9
Hi,

I have read in one document that the phase of a signal (say sine wave) can be calculated by making use of I and Q signals of it. For ex:
Fs = 10e3;
t=(0:Fs)/Fs';
ph=45;
x=sin(2*pi*50*t+(ph*pi/180));

i=x.*cos(2*pi*50*t);
q=x.*sin(2*pi*50*t);

it was mentioned that by subtracting the max values of i and q, i will get the ph value.

But that is not happening.

what is wrong with this ??
i have to make use of i and q signals to find the ph.

Can anyone help me plz..

Ashwini :)
 

rspuzio

Joined Jan 19, 2009
77
Apply the angle addition formula to your expression:

\( x = \sin (2 \pi 50 t+ (\phi \pi/180)) =
\sin (2 \pi 50 t) \cos (\phi \pi/180) +
\cos (2 \pi 50 t) \sin (\phi \pi/180)
\)

Now that you have x expressed as a superposition of
\( \sin (2 \pi 50 t) \) and
\( \cos (2 \pi 50 t) \), it should be easy enough
to multiply by a sine or cosine and find the maximum.
 

rspuzio

Joined Jan 19, 2009
77
You can also use the trigonometric identities for
product of two sines or a product of a sine and
a cosine:

\(i=\sin(2 \pi 50 t+(\phi \pi/180)) \cos(2 \pi 50 t) =
{1 \over 2} \left[ \sin (\phi \pi/180) +
\sin (4 \pi 50 t+(\phi \pi/180)) \right] \)
\(q=\sin(2 \pi 50 t+(\phi \pi/180)) \sin(2 \pi 50 t) =
{1 \over 2} \left[ \cos (\phi \pi/180) +
\cos (4 \pi 50 t+(\phi \pi/180)) \right] \)

Note that in these expressions the first term is constant
whilst the second term is a sine or a cosine so that its
maximum value will be 1. So we have that the
maximum value of i is

\( i_{\rm max} = {1 \over 2} \left[ \sin (\phi \pi/180)
+ 1 \right] \)

and the maximum value for q is

\( q_{\rm max} = {1 \over 2} \left[ \cos (\phi \pi/180)
+ 1 \right] \)

So we see that the maximum values of i and q depend
on \( \phi \). To recover the value of \( \phi \)
we can use inverse trig functions. Not quite as simple as
subtracting them, but you can use the maximum values
of i and q to determine the phase.
 
Top