Help -- how to implement transmitting periodic on/off tones

Hello:

I have a USRP2 board and a WBX daughterboard. I am trying to implement a
scheme where a single-tone sine wave (at frequencies between 1 kHz and
10 kHz) is transmitted intermittently. Specifically, time is divided
into intervals, defined by the user on the command line, typically of
values such as 200 ms or 500 ms or 1s. When invoked, the flow graph (the
Python script) would transmit nothing (all zeros) during the first time
interval, then transmit the tone during the second time interval, then
transmit nothing (all zeros) during the third and fourth and fifth time
intervals, then transmit the tone during the sixth time interval, then
transmit nothing (all zeros) during the seventh time interval, and then
stop and end.

How in the world could I implement this? I feel like it’d be hard to do,
but maybe it’s actually easy. Would I need to use a timer in Python to
set what gets transmitted at the start of each interval duration? Any
help would be very much appreciated, as I am still somewhat new to GNU
Radio and Python. Thanks for your help, everyone.

Steve McMahon

On Mon, Nov 29, 2010 at 12:42:38AM -0800, Steve M. wrote:

Hello:

interval, then transmit nothing (all zeros) during the seventh time
interval, and then stop and end.

How in the world could I implement this? I feel like it’d be hard to
do, but maybe it’s actually easy. Would I need to use a timer in
Python to set what gets transmitted at the start of each interval
duration? Any help would be very much appreciated, as I am still
somewhat new to GNU Radio and Python. Thanks for your help,
everyone.

Think of the on/off part as a control stream consisting of 1’s and
0’s. Generate the control stream, and multiple the control stream by
the carrier stream.

Don’t try to start and stop the graph or anything like that from
python.

You can probably generate the control stream with a
gr.vector_source_f([], True) followed by a dumb
interpolator that will just replicate values.

my_pattern = [1, 1, 0, 0, 1, 0, … ]
interp_factor = 1000 # scale the pattern up in time to match signal

ctrl_pattern = gr.vector_source_f(my_pattern, True)
ctrl_interp = gr.interp_fir_filter_fff(interp_factor,
interp_factor*[1.0])

signal =

mult = gr.multiple_ff()

sink =

tb.connect(ctrl_pattern, ctrl_interp, (mult, 0))
tb.connect(signal, (mult, 1))
tb.connect(mult, sink)

Eric

sink =

tb.connect(ctrl_pattern, ctrl_interp, (mult, 0))
tb.connect(signal, (mult, 1))
tb.connect(mult, sink)

One would think something like this would work, but I’ve noticed that
even
if you’re sending 0’s to your usrp sink, the transmitter still puts out
some
amount of power (plenty strong enough to be detectable via a spec-an).
This
power goes away if you disable the transmitter via software. Does
anybody
know anything about this phenomenon?

-Steven

Yes, LO leakage, more specifically DC imbalance in the I and Q channels;
I
assume you are using a daughter board with an IQ modulator? This is
supposedly corrected for in the firmware, however, probably not done
over
temperature. You can probably tweak it by adding/subtracting a few LSB
of
DC offset to your I and Q samples. It’s an iterative approach, tweaking
until you minimize it. Won’t be able to do better than what’s spec’d in
the
data sheet though. I have never been able to get less than -60 dBc; not
on
URSP hardware but my own stuff. It’s really only a problem in really
wide-band modulation (e.g. spread spectrum) where your leakage poke
above
the modulation, or with tons of averaging and you are trying to hide
your
signal. Of course it’s a problem for you, but best bet to blank off the
buffer (or switch the T/R switch) to improve isolation.

View this message in context:
http://old.nabble.com/help----how-to-implement-transmitting-periodic-on-off-tones-tp30328518p30334344.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On 11/29/2010 01:35 PM, Steven C. wrote:

Slight LO leakage out of the mixer?

FWIW I have been able to squeeze out 64 dBc of carrier suppression for a
1 MHz SSB tone with the USRP2 + WBX at 500 MHz by trimming the I and Q
DC offset. No offset yields about 40 dBc. 10/32767 is a decent step
size and you won’t have to tune more than +/- 30 steps. Of course this
will change if you just look at it the wrong way, not to mention over
frequency and tone level. This cal routine could probably be automated
by piping the TX back into the RX and offsetting the RX LOs.