Variable phase signal generator

Hi,

How do I generate variable phase signals using GNU radio blocks? For
example, I generate a reference Sine wave. I need another sine wave
whose phase can be varied with respect to the reference sine wave. How
can I do that?

Thanking you,

Regards,

Sivaram

On Wed, Jul 29, 2009 at 09:50:32AM +0530, Narayanan, Sivaramasubramanian
(R&T) wrote:

Hi,

How do I generate variable phase signals using GNU radio blocks? For
example, I generate a reference Sine wave. I need another sine wave
whose phase can be varied with respect to the reference sine wave. How
can I do that?

You can do it using any of:

gr.vco_f, gr.frequency_modulator_fc or gr.phase_modulator_fc

http://gnuradio.org/doc/doxygen/gr__vco__f_8h-source.html
http://gnuradio.org/doc/doxygen/classgr__frequency__modulator__fc.html
http://gnuradio.org/doc/doxygen/classgr__phase__modulator__fc.html

Thanking you,
Regards,
Sivaram

Eric

Thanks Eric,

I actually need to vary only the phase of the signal, the frequency of
the signal and reference remaining constant. Also I need to be able to
vary the phase continuously in the run time.

I hope gr.delay(…) would work, except for the initial latency. And I
could use gr.delay.set_delay() to change the phase difference during run
time, provided the delay value is maintained within the number of
samples per cycle. Please advice.

Also, I want to know whether there is any block that takes in two
signals (float / complex streams) and gives out the phase difference
between them in some form, say no of samples. Please Clarify.

Thanks a lot.

Regards,
Sivaram

On Thu, Jul 30, 2009 at 12:13:51PM +0530, Narayanan, Sivaramasubramanian
(R&T) wrote:

Thanks Eric,

I actually need to vary only the phase of the signal, the frequency of
the signal and reference remaining constant. Also I need to be able to
vary the phase continuously in the run time.

freq = d phase / dt.

You cannot modulate the phase without modulating the instantaneous
frequency. The blocks I mentioned yesterday will do what you want.

I hope gr.delay(…) would work, except for the initial latency. And I
could use gr.delay.set_delay() to change the phase difference during run
time, provided the delay value is maintained within the number of
samples per cycle. Please advice.

You may want to bone up on your basic DSP and digital comms.
We’re got a big list of suggestions here:

http://gnuradio.org/trac/wiki/SuggestedReading

Also, I want to know whether there is any block that takes in two
signals (float / complex streams) and gives out the phase difference
between them in some form, say no of samples. Please Clarify.

Note that the phase difference could be a fraction of a sample.
Imagine one complex sinusoid that’s rotated 15 degrees with respect to
the other.

Multiplying one stream by the conjugate of the other will give the
instantaneous phase difference between them. You can then take the
arctan of that if you like (gr.complex_to_arg).

Perhaps you should think about the correlation between the two
streams. I’m not sure what you’re really trying to do…

Eric