Help generating frequency offset

Hi all,

I’m attempting to generate frequency offset in a script that is adding
some channel features:
http://cyprus.cmcl.cs.cmu.edu/matched_filter/gen_noise_samples.py

The frequency offset is specified, for which the original signal is
mixed and then the offset signal is added with the noise.

But I’m not seeing the appropriate frequency offset. If I specify a
frequency offset of 100Hz, I’m only seeing a single point shift, all
other points are the same as if there is no offset:
http://cyprus.cmcl.cs.cmu.edu/matched_filter/graphs/freq_offset.jpg

I’d greatly appreciate any feedback.

Thanks!
George

George N. wrote:

frequency offset of 100Hz, I’m only seeing a single point shift, all
other points are the same as if there is no offset:
http://cyprus.cmcl.cs.cmu.edu/matched_filter/graphs/freq_offset.jpg

I’m not sure what you have plotted in that picture. Is that just the
raw samples? Can you write out to a file both the 2 inputs to the mixer
and the 1 output? Then do an FFT on all 3 in octave to make sure the
frequency has really moved as you expected.

Matt

Matt E. wrote:

But I’m not seeing the appropriate frequency offset. If I specify a

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.

But, is it possible to just use gr_rotator to apply the frequency offset
instead by setting the phase equal to offset/sampling_rate2pi ? If
I’m simulating the USRP at 1Msps with 2 samples per symbol, I think I
would set it to 1280Hz/500KHz2pi.

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.

  • George

On Feb 1, 2008 10:48 AM, George N. [email protected] 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_rate2pi ? If
I’m simulating the USRP at 1Msps with 2 samples per symbol, I think I
would set it to 1280Hz/500KHz2pi.

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.

Brian

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs