discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Compare Phase block


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Compare Phase block
Date: Fri, 4 Apr 2008 12:22:44 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

On Fri, Apr 04, 2008 at 10:33:41PM +0900, Geof Nieboer wrote:
> All,
> 
>  
> 
> New to gnuradio, got it built under CygWin, receiving assorted channels,
> life is good.
> 
>  
> 
> What I want to do to start of is receive a VOR and determine it's direction.
> That's done by comparing the phase of 2 30 Hz signals which are encoded.  I
> can demodulate both signals, but I'm not sure how to take the 2 signals and
> compare the phase of them.  Has someone already built a block that can do
> that?  I looked but didn't find one.  I just want to stream both signals in,
> and get a degree or radian output that tells me the relative phase between
> the two signals, which will be the radial off the VOR.
> 
> If a block hasn't already been built for relative phase, does anyone know a
> mathematical solution to compare phase?  I could find the peak value for the
> sine wave for each signal and compare the time value for each peak, but I'm
> wondering if there isn't a better book answer.
> 
> Thanks!
> Geof

You can get the phase difference by multiplying one signal by the
complex conjugate of the other, then take the arg (arctan) of that.
There are blocks for each of those operations.

sig0 = ...
sig1 = ...

conj = gr.conjugate_cc()
mult = gr.multiply_cc()
arg = gr.complex_to_arg()

dst = ... # stream of float radians

connect(sig0, conj, mult)
connect(sig1, (mult, 1))
connect(mult, arg)
connect(arg, dst)


Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]