# Forum: GNU Radio Measuring phase between channels

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
on 2014-06-17 19:07
Hello,
I want to measure the phase difference between three synchronised USRP
channels (Common Ref & PPS), does software exist to do this, and to what
Sorry, this is a bit of a newbie question, and probably already covered!
Dave
on 2014-06-17 20:30
On 17.06.2014 19:06, David Miller wrote:
> Hello,
> I want to measure the phase difference between three synchronised USRP
> channels (Common Ref & PPS), does software exist to do this, and to what
> Sorry, this is a bit of a newbie question, and probably already covered!

Sure, the easiest way would simply be to put in a scope, and check by
looking -- of course, that's not very accurate.

There's enough math operators in GNU Radio to see the actual phase
difference, such as conjugate and multiply, then convert to phase.

Cheers,
Martin
on 2014-06-17 21:36
Hi David,

for starters, you could just divide one channel by the other and
calculate the result's argument. There are blocks for both operations :)

Short explanation:
Just consider the complex signals $s_1, s_2$ in polar coordinates
(instead of the usual real/imag representation)
$s_1(t) = a_1(t) * e^{j \phi_1(t)}$.
Dividing that by $s_2(t) = a_2(t) * e^{j \phi_2(t)}$ gives you
$p(t) = a_1(t)/a_2(t) * e^{j \phi_1 - \phi_2(t)}$, of which you can take
the argument to get the phase difference.

Greetings,
Marcus
on 2014-06-18 01:48
I did an experiment similar to this a year or so ago. I synced all the
USRPs to the same 10MHz and PPS. I had pretty good results using libgps
to
get the GPS time and then using UHD to start streaming on a particular
PPS
edge on all units. With LFRX boards this will ensure that the DDCs start
at
the same time and start from zero degrees. I seem to remember there was
some small random variation from run to run. If you are just looking for
relative changes in phase difference I found this approach works fairly
well.

On Tue, Jun 17, 2014 at 10:36 AM, Martin Braun <martin.braun@ettus.com>
This topic is locked and can not be replied to.