Re: [Discuss-gnuradio] Basic USRP AM Transmission

2006-04-18 Thread Martin Dvh
Robert Roberts wrote:
 I added an interpolating FIR filter (used a lowpass filter) that stepped the 
 signal rate back up to 128mS/s, but it does not sounds any better. I have 
 been 
 playing with the interpolation value, as well as the filter values.

Since the bandwidth of the usb bus is limited, the maximum samplerate you can 
send to the usrp is 8Ms/s
Since the interpolation factor of the usrp is also limited (I think max 256) 
the min samplerate you can send to the usrp is 128/256 = 500 kS/s
Usrp interpolator must be in [4, 512] and a multiple of 4
So the min samplerate you can send to the usrp is 128/512 = 250 kS/s
The bandwidth of the signal of interest also has to fit in the samplerate.
And then you also need integer interpolation factors (unless you use a rational 
resampler)
usb bus rate:  min 0  max 8 MS/s
usrp interpolator factor : min 4, max 512
DAC :  min 128 MS/s max 128 MS/s

So I would come to the following:
src 32 kS/s
software interpolator:  interpolation factor 10 = 320 kS/s
usrp interpolation factor   400 = 128 MS/s

Also pay attention to signal levels, and any filter parameters you use.

If this all still doesn't help.
Try what happens if you use a non DC baseband freq.
(That is, multiply your 320 kS/s signal with for example a 100 kHz complex sine 
(gr_sig_source_c))


Also make sure that the signal you use as input is not bigger then the const 
you add.
You add 1.0, which would mean that your input signal should be between -1.0 and 
1.0.
You can check with a scopesink.


Greetings,
Martin

 
 I'll keep chugging away.  Thanks for your help!
 
 ~Chris~
 
 ** 
 
 *- Original Message -*
 
 *From*: Martin Dvh [EMAIL PROTECTED]
 
 *Date*: Tuesday, April 18, 2006 1:01 am
 
 *Subject*: Re: [Discuss-gnuradio] Basic USRP AM Transmission
 
   Robert Roberts wrote:
   
- Original Message -
From: Martin Dvh [EMAIL PROTECTED]
Date: Monday, April 17, 2006 3:06 pm
Subject: Re: [Discuss-gnuradio] Basic USRP AM Transmission
   
   Robert Roberts wrote:
   
   Hello everyone,
   
   
   I have been experimenting with the Flex400 board and have been
   
   trying to
   
   implement a basic AM transmitter. I have a WFM and NFM transmitter
   working, but I cannot get the AM one to transmit correctly.
   The
   
   code below generates a much higher frequency tone. Any advice
   to
   what I am
   
   doing wrong? Does my output need filtering befor! e connecting
   to
   
   the sink?
   
   
   self.u = usrp.sink_c () # the USRP sink
   
   # Code here for setting up the USRP, omitted
   
   src = gr.file_source (gr.sizeof_float, audio-1.dat, True) #
   
   440Hz tone
   
   file
   
   What is the sample_rate of the audio file
   What is you interpolation rate of the usrp
   What is the duc frequency of your usrp.
   
   
I have the file source sampled at 32kS/s
   
I use the following code for setting up my usrp:
   
self.dac_rate = self.u.dac_rate() #
   128 MS/s
self.usrp_interp = 400
self.u.set_interp_rate(self.usrp_interp)
 ! gt;  self.usrp_rate = self.dac_rate / self.usrp_interp #
   320 kS/s
self.sw_interp = 10
self.audio_rate = self.usrp_rate / self.sw_interp #
   32 kS/s
   
# determine the daughterboard subdevice we're using
if options.tx_subdev_spec is None:
options.tx_subdev_spec = usrp.pick_tx_subdevice(self.u)
   
m = usrp.determine_tx_mux_value(self.u,
   options.tx_subdev_spec) self.u.set_mux(m)
self.subdev = usrp.selected_subdev(self.u,
   options.tx_subdev_spec) print Using TX d'board %s %
   (self.subdev.side_and_name(),)
self.subdev.set_gain(self.subdev.gain_range()[1]) #
   set max
Tx gain
self.set_freq(options.freq)
self.subdev.set_enable(True) #
   enable transmitter
   
   
This is the same code I used for both a! NFM and WFM transmitter,
   both of
which appeared to transmit without problems.
   But do you actually put a software interpolator in there somewhere.
   I didn't see any in your code:
   self.connect (src, const)
   self.connect (const, conv)
   self.connect (conv, gain)
   self.connect (gain, self.u)
   should be:
   self.connect (src, const)
   self.connect (const, conv)
   self.connect (conv, gain)
   self.connect (gain, softwareinterpolator)
   self.connect(softwareinterpolator,self.u)
  
   greetings,
   Martin
   
Sincerely,
~Chris~
   
   If the sample rate of your audio file is for example 48000 Herz
   Then the usrp interpolation rate should be 12800/48000 = 2666
   Which is I think way out of range for the usrp
 ! gt; You first have to interpolate in software to something in the
   range
   of the usrp.
   
   Greetings,
   Martin
   
   const = gr.add_const_ff (1.0)
   conv = gr.float_to_complex()
   
   
   gain = gr.multiply_const_cc (4000.0) # transmitter gain
   
   # connect it all
   
   self.connect (src, const)
   self.connect (const

Re: [Discuss-gnuradio] Basic USRP AM Transmission

2006-04-17 Thread Martin Dvh
Robert Roberts wrote:
 Hello everyone,
 
 
 I have been experimenting with the Flex400 board and have been trying to
 implement a basic AM transmitter. I have a WFM and NFM transmitter
 working, but I cannot get the AM one to transmit correctly.   The code
 below generates a much higher frequency tone.  Any advice to what I am
 doing wrong?   Does my output need filtering before connecting to the
 sink? 
 
 
 self.u = usrp.sink_c ()   # the USRP sink
 
 # Code here for setting up the USRP, omitted
 
 src = gr.file_source (gr.sizeof_float, audio-1.dat, True) # 440Hz tone
 file
What is the sample_rate of the audio file
What is you interpolation rate of the usrp
What is the duc frequency of your usrp.
If the sample rate of your audio file is for example 48000 Herz
Then the usrp interpolation rate should be 12800/48000 = 2666
Which is I think way out of range for the usrp
You first have to interpolate in software to something in the range of the usrp.

Greetings,
Martin
 const = gr.add_const_ff (1.0)
 conv = gr.float_to_complex()
 

 gain = gr.multiply_const_cc (4000.0) # transmitter gain
 
 # connect it all
 
 self.connect (src, const)
 self.connect (const, conv)
 self.connect (conv, gain)
 self.connect (gain, self.u)
 
 
 
 
 Thanks,
 ~Chris~
 
 
 
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 



___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Basic USRP AM Transmission

2006-04-17 Thread Robert Roberts


- Original Message -
From: Martin Dvh [EMAIL PROTECTED]
Date: Monday, April 17, 2006 3:06 pm
Subject: Re: [Discuss-gnuradio] Basic USRP AM Transmission
 Robert Roberts wrote:
  Hello everyone,
  
  
  I have been experimenting with the Flex400 board and have been 
 trying to
  implement a basic AM transmitter. I have a WFM and NFM transmitter
  working, but I cannot get the AM one to transmit correctly.   The 
 code below generates a much higher frequency tone.  Any advice to 
 what I am
  doing wrong?   Does my output need filtering before connecting to 
 the sink? 
  
  
  self.u = usrp.sink_c ()   # the USRP sink
  
  # Code here for setting up the USRP, omitted
  
  src = gr.file_source (gr.sizeof_float, audio-1.dat, True) # 
 440Hz tone
  file
 What is the sample_rate of the audio file
 What is you interpolation rate of the usrp
 What is the duc frequency of your usrp.

I have the file source sampled at 32kS/s

I use the following code for setting up my usrp:

self.dac_rate = self.u.dac_rate()# 128 MS/s
self.usrp_interp = 400
self.u.set_interp_rate(self.usrp_interp)
self.usrp_rate = self.dac_rate / self.usrp_interp# 320 kS/s
self.sw_interp = 10
self.audio_rate = self.usrp_rate / self.sw_interp# 32 kS/s

# determine the daughterboard subdevice we're using
if options.tx_subdev_spec is None:
options.tx_subdev_spec = usrp.pick_tx_subdevice(self.u)

m = usrp.determine_tx_mux_value(self.u, options.tx_subdev_spec)
self.u.set_mux(m)
self.subdev = usrp.selected_subdev(self.u, options.tx_subdev_spec)
print Using TX d'board %s % (self.subdev.side_and_name(),)

self.subdev.set_gain(self.subdev.gain_range()[1])# set max
Tx gain
self.set_freq(options.freq)
self.subdev.set_enable(True) # enable
transmitter


This is the same code I used for both a NFM and WFM transmitter, both of
which appeared to transmit without problems.

Sincerely,
~Chris~
 If the sample rate of your audio file is for example 48000 Herz
 Then the usrp interpolation rate should be 12800/48000 = 2666
 Which is I think way out of range for the usrp
 You first have to interpolate in software to something in the range 
 of the usrp.
 
 Greetings,
 Martin
  const = gr.add_const_ff (1.0)
  conv = gr.float_to_complex()
  
 
  gain = gr.multiply_const_cc (4000.0) # transmitter gain
  
  # connect it all
  
  self.connect (src, const)
  self.connect (const, conv)
  self.connect (conv, gain)
  self.connect (gain, self.u)
  
  
  
  
  Thanks,
  ~Chris~
  
  
  
  
  ___
  Discuss-gnuradio mailing list
  Discuss-gnuradio@gnu.org
  http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
  
 
 


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Basic USRP AM Transmission

2006-04-17 Thread Martin Dvh
Robert Roberts wrote:
 
 - Original Message -
 From: Martin Dvh [EMAIL PROTECTED]
 Date: Monday, April 17, 2006 3:06 pm
 Subject: Re: [Discuss-gnuradio] Basic USRP AM Transmission
 
Robert Roberts wrote:

Hello everyone,


I have been experimenting with the Flex400 board and have been 

trying to

implement a basic AM transmitter. I have a WFM and NFM transmitter
working, but I cannot get the AM one to transmit correctly.   The 

code below generates a much higher frequency tone.  Any advice to 
what I am

doing wrong?   Does my output need filtering before connecting to 

the sink? 


self.u = usrp.sink_c ()   # the USRP sink

# Code here for setting up the USRP, omitted

src = gr.file_source (gr.sizeof_float, audio-1.dat, True) # 

440Hz tone

file

What is the sample_rate of the audio file
What is you interpolation rate of the usrp
What is the duc frequency of your usrp.
 
 
 I have the file source sampled at 32kS/s
 
 I use the following code for setting up my usrp:
 
 self.dac_rate = self.u.dac_rate()# 128 MS/s
 self.usrp_interp = 400
 self.u.set_interp_rate(self.usrp_interp)
 self.usrp_rate = self.dac_rate / self.usrp_interp# 320 kS/s
 self.sw_interp = 10
 self.audio_rate = self.usrp_rate / self.sw_interp# 32 kS/s
 
 # determine the daughterboard subdevice we're using
 if options.tx_subdev_spec is None:
 options.tx_subdev_spec = usrp.pick_tx_subdevice(self.u)
 
 m = usrp.determine_tx_mux_value(self.u, options.tx_subdev_spec)
 self.u.set_mux(m)
 self.subdev = usrp.selected_subdev(self.u, options.tx_subdev_spec)
 print Using TX d'board %s % (self.subdev.side_and_name(),)
 
 self.subdev.set_gain(self.subdev.gain_range()[1])# set max
 Tx gain
 self.set_freq(options.freq)
 self.subdev.set_enable(True) # enable
 transmitter
 
 
 This is the same code I used for both a NFM and WFM transmitter, both of
 which appeared to transmit without problems.
But do you actually put a software interpolator in there somewhere.
I didn't see any in your code:
self.connect (src, const)
self.connect (const, conv)
self.connect (conv, gain)
self.connect (gain, self.u)
should be:
self.connect (src, const)
self.connect (const, conv)
self.connect (conv, gain)
self.connect (gain, softwareinterpolator)
self.connect(softwareinterpolator,self.u)

greetings,
Martin
 
 Sincerely,
 ~Chris~
 
If the sample rate of your audio file is for example 48000 Herz
Then the usrp interpolation rate should be 12800/48000 = 2666
Which is I think way out of range for the usrp
You first have to interpolate in software to something in the range 
of the usrp.

Greetings,
Martin

const = gr.add_const_ff (1.0)
conv = gr.float_to_complex()

   
gain = gr.multiply_const_cc (4000.0) # transmitter gain

# connect it all

self.connect (src, const)
self.connect (const, conv)
self.connect (conv, gain)
self.connect (gain, self.u)




Thanks,
~Chris~




___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio



 



___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio