discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] A question about using two daughter boards on usrp fo


From: Zenny Zhang
Subject: [Discuss-gnuradio] A question about using two daughter boards on usrp for simultaneous transmitting and receiving
Date: Fri, 20 Jun 2008 14:22:01 -0400

Hi,

I have a question about using two daughter boards on usrp for
simultaneous transmitting and receiving. Basically, in my application,
the sender has two antennas and transmit a stream of training symbols
to the receiver who has one antenna. The receiver estimates the
channel and send the estimate back to the sender.

For simplicity allow me to call the sender S and the receiver R.  So
for S I created two flow graphs, fg and fg1, one for transmitting the
training symbols and the other for receiving the channel estimate
report. The trouble is that each flow graph works perfectly fine
individually, that is, if I only run fg, S can estimate the channel,
and if I only run fg1 and ask R to send some constant back, S can get
the correct report. But when I run fg first, then stop it, then run
fg1 (by doing so I am trying to achieve the automatic channel feedback
function), S will not get the report for most of the time.

More over, after I run my application, if I run benchmark_tx.py on R
and benchmark_rx.py on S, S cannot get the packets from R. This lead
me to guess that I really messed up something in USRP. I can return
things to normal by unplugging the power of USRP and plug it back
after some time.

Based on my limited experience, I guess it is because of S has two
antennas and maybe I didn't do the right thing for setting up the usrp
sink. I am guessing this because R is also running two flow graphs,
one for receiving from S and the other for sending to S, and R seems
to be fine.

I tried several means to fix this:
1. I made sure that S and R are transmitting on different frequencies
2. I made sure that when I stop fg, the transmitting power at S is 0
3. I checked the received signal strength at S and it should be fine.
It looks like S cannot get the correct carrier phase/sampling time.


Any hint wil be greatly appreciated. Thanks. Also, please let me know
if you need any more information for this.

Below is the code I used to set up the usrp sink, I basically just
copied from the usrp multi-antenna code and modified a little

    def _setup_usrp_sink(self):
        """
        Creates a USRP sink, determines the settings for best bitrate,
        and attaches to the transmitter's subdevice.
        """
        self.u = usrp.sink_c(nchan=2)          # say we want two channels
        
        self.dac_rate = self.u.dac_rate()                    # 128 MS/s

        # derive values of bitrate, samples_per_symbol, and interp
from desired info
        (self._bitrate, self._samples_per_symbol, self._interp) = \
            pick_tx_bitrate(self._bitrate, 1,
                            self._samples_per_symbol, None, self.dac_rate)

        self.u.set_interp_rate(self._interp)

        self.usrp_rate = self.dac_rate / self._interp

        # we're using both daughterboard slots, thus subdev is a 2-tuple
        self.subdev = (self.u.db[0][0], self.u.db[1][0])
        print "Using TX d'board %s" % (self.subdev[0].side_and_name(),)
        print "Using TX d'board %s" % (self.subdev[1].side_and_name(),)
        
        # set up the Tx mux so that
        #  channel 0 goes to Slot A I&Q and channel 1 to Slot B I&Q
        self.u.set_mux(0xba98)
        self.subdev[0].set_gain(self.subdev[0].gain_range()[1])    #
set max Tx gain
        self.subdev[1].set_gain(self.subdev[1].gain_range()[1])    #
set max Tx gain
        
        self.set_freq(0, _def_sd_tx_freq)
        self.set_freq(1, _def_sd_tx_freq)
        self.subdev[0].set_enable(True)             # enable transmitter
        self.subdev[1].set_enable(True)

Thanks,

Zenny




reply via email to

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