Continue to Site

# finding phase shift using i and q signals

Status
Not open for further replies.

#### ashwini1

##### Member level 1
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)

#### ashwini1

##### Member level 1
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.