finding phase shift using i and q signals

Status
Not open for further replies.

ashwini1

Member level 1
Joined
Jul 17, 2009
Messages
32
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Bangalore
Activity points
1,483
i and q signals

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
 

i & q signals

p=arctan(I/Q)
 

i and q signals

Thanks ...
ur answer is right .. but along with that u will also see the transient behavior at the beginning. To avoid that i am just skipping first few samples and taking average of rest all and which gives my phase (approximate value).

Thanks and Regards,
Ashwini
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…