[Top][All Lists]

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

Re: [Discuss-gnuradio] help generating frequency offset

From: Brian Padalino
Subject: Re: [Discuss-gnuradio] help generating frequency offset
Date: Fri, 1 Feb 2008 11:30:23 -0500

On Feb 1, 2008 10:48 AM, George Nychis <address@hidden> wrote:
> Let me step all the way back and just try to be a little clearer with
> what I'm trying to do.
> I'm trying to simulate the frequency offset added by the crystal
> oscillator in the USRP.  64MHz*20ppm/1e6=1280Hz max, +/- ?
> So, I'm trying to add this frequency offset to a modulated GMSK signal.
> I believe the proper solution, which Brian suggested to me, is too
> upconvert and then downconvert to add the frequency offset.

Sorry, bad advice - an easier way to do this would just do a complex
mult against your frequency offset signal.

> But, is it possible to just use gr_rotator to apply the frequency offset
> instead by setting the phase equal to offset/sampling_rate*2*pi ?  If
> I'm simulating the USRP at 1Msps with 2 samples per symbol, I think I
> would set it to 1280Hz/500KHz*2*pi.
> http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/lib/filter/gr_rotator.h
> But, I'm not entirely sure this is accomplishing what I want to.

Try this:

        lfsr = gr.lfsr_32k_source_s( )
        mod = gmsk_mod( self, 2 )
        offset = gr.sig_source_c( 500e3, gr.GR_COS_WAVE, 100, 1.0, 0+0j )
        mixer = gr.multiply_cc( )

        s_to_f  =   gr.short_to_float( )
        f_to_char  =   gr.float_to_char( )

        self.connect( lfsr, s_to_f )
        self.connect( s_to_f, f_to_char )
        self.connect( f_to_char, mod.head )
        self.connect( mod.tail, (mixer,0) )
        self.connect( offset, (mixer,1))
        self.connect( mixer, self.cscope )

This connects an LFSR up to the modulator input, but you get the idea.
 You have a phasor being your offset slowly rotating your signal at a
rate of 100Hz.

I believe this will model the frequency offsets properly.


reply via email to

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