Bug #179

I and Q channels may get swapped on transmit

Added by Johnathan Corgan over 5 years ago. Updated over 5 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Johnathan Corgan % Done:

0%

Category:-
Target version:release-3.1.1
Resolution:fixed

Description

Subject: [Discuss-gnuradio] USRP mux configuration bug
Date:     Fri, 20 Jul 2007 17:02:55 -0500
From:     Ketan Mandke <[email protected]>
To:     [email protected]
CC:     Robert Daniels <[email protected]>

I have been experiencing a weird bug when transmitting packets using the
USRP. I am part of the Hydra group at UT (hydra.ece.utexas.edu
<http://hydra.ece.utexas.edu>). We have been developing a multiple
antenna system using the USRP. It seems to work quite well except for
the following bug:

Since we're using two transmit chains, I set the mux value in
usrp.sink_c to 0xBA98. I have noticed however, that at random the
transmitter will flip the IQ channels of the transmitter. I have
verified that this occurs by analyzing the trace of the received signal.
I noticed that this same bug seems to occur when using a single antenna
system as well (there I set the mux value to 0x0098). In the single
antenna case I can just reset the mux value to 0x0098 everytime I send a
packet in order to alleviate the problem. This same approach does not
work in the two-antenna case.

Any thoughts on why the mux value in the transmitter might be changing
or why the IQ channels might get flipped? Please note that I have
already verified that the EXACT same waveform is being sent to the usrp
everytime I transmit a packet; hence, I am certain that the bug is not
being caused in software.
I am currently using a multiple antenna system, so I set the usrp.sink_c
mux value to 0xBA98. This should enable the USRP to support to transmit
RF chains, right?

-- Ketan Mandke

History

Updated by Johnathan Corgan over 5 years ago

Subject: [Discuss-gnuradio] USRP IQ channels flipping during packet
transmission
Date:     Sat, 21 Jul 2007 00:42:28 -0500
From:     Ketan Mandke <[email protected]>
To:     Eric Blossom <[email protected]>
CC:     [email protected], Robert Daniels <[email protected]>

Eric,

Thanks for your quick response. In regards to your comments:

> > Are you running one of our standard fpga images, or are you using one
that you have modified?

Yes. I am using the standard FPGA code distributed with GNU Radio
(version 3.0.3 - the latest stable release). I did not write my own
verilog code.

> > It's seriously unlikely that the contents of the mux register is
getting randomly disturbed.

I am also skeptical that the mux register is randomly changing. However,
I am very certain that the transmitter is flipping the IQ channels. I
have verified that this is definitely happening at the transmitter. In
the single antenna transmitter, setting the mux value to (0x0098) prior
to sending a packet seemed to solve this problem, but not in the
2-antenna case. Perhaps some details about my USRP setup and the nature
of the bug that I'm observing might help in understanding this problem.

Below is a boiled down list of method calls which describe how I've set
up the transmitter chain in our transceiver:
self.u = usrp.sink_c()
self.u.set_nchannels(2)
self.u.set_mux(gru.hexint(0xBA98) )
self.subdev1 = usrp.selected_subdev (self.u, (0,0) )
self.subdev2 = usrp.selected_subdev (self.u, (1,0) )
self.subdev1.set_auto_tr(True)
self.subdev2.set_auto_tr(True)

In our experiments we transmit packets, encoded using our MIMO physical
layer, across the USRP (after appropriate padding). I've observed that
after some random number of consecutive packets, I receive a packet
whose I-Q channels have been flipped. It took a considerable amount of
effort to diagnose and verify that this was the problem, but I am very
certain now that this is what is happening at the transmitter. I hope
that this might shed some more light on the problem and help in finding
a solution.

On 7/20/07, *Eric Blossom* <[email protected] <mailto:[email protected]>> wrote:

    On Fri, Jul 20, 2007 at 05:02:55PM -0500, Ketan Mandke wrote:
    > I have been experiencing a weird bug when transmitting packets
    using the
    > USRP. I am part of the Hydra group at UT (hydra.ece.utexas.edu
    <http://hydra.ece.utexas.edu>). We have
    > been developing a multiple antenna system using the USRP. It seems
    to work
    > quite well except for the following bug:
    >
    > Since we're using two transmit chains, I set the mux value in
    usrp.sink_c to
    > 0xBA98. I have noticed however, that at random the transmitter
    will flip the
    > IQ channels of the transmitter. I have verified that this occurs by
    > analyzing the trace of the received signal. I noticed that this
    same bug
    > seems to occur when using a single antenna system as well (there I
    set the
    > mux value to 0x0098). In the single antenna case I can just reset
    the mux
    > value to 0x0098 everytime I send a packet in order to alleviate
    the problem.
    > This same approach does not work in the two-antenna case.
    >
    > Any thoughts on why the mux value in the transmitter might be
    changing or
    > why the IQ channels might get flipped? Please note that I have already
    > verified that the EXACT same waveform is being sent to the usrp
    everytime I
    > transmit a packet; hence, I am certain that the bug is not being
    caused in
    > software.
    > I am currently using a multiple antenna system, so I set the
    usrp.sink_c mux
    > value to 0xBA98. This should enable the USRP to support to transmit RF
    > chains, right?
    >
    > --
    > Ketan Mandke

    Are you running one of our standard fpga images, or are you using one
    that you have modified?  That is, are you writing verilog code?

    If you are compiling your own verilog, are all timing constraints
    being met?  Did you start with our project file?

    It's seriously unlikely that the contents of the mux register is
    getting randomly disturbed.

    Eric

Updated by Johnathan Corgan over 5 years ago

Subject:     [Discuss-gnuradio] Re: USRP IQ channels flipping during packet
transmission
Date:     Tue, 24 Jul 2007 17:29:57 -0500
From:     Ketan Mandke <[email protected]>
To:     [email protected]
CC:     Eric Blossom <[email protected]>, Robert Daniels <[email protected]>
References:     <[email protected]>

After some major debugging, I have found a fix for this problem. To
summarize the problem again: the transmitter seems to flip the IQ
channels at random during packet transmissions, even though I do not
make any changes to mux settings or other USRP settings. In order to
fix this bug, I had to modify the write method inside usrp_basic_tx.
The following has solved the problem:

int
usrp_basic_tx::write (const void *buf, int len, bool *underrun)
{
 int r;

 /*
** Hydra Patch:
** Disable transmitter before writing data to USB buffer
  */
 bool enable = disable_tx();

 /* ...... original code for usrp_basic_tx::write ...... */

 /*
** Hydra Patch:
** Enable transmitter after writing data to USB buffer
  */
 restore_tx(enable);

 return r;
}

Somehow, by disabling and re-enabling the transmitter around the write
operation, I was able to prevent the transmitter from randomly
flipping the IQ channels. Please let me know if you would like me to
elaborate further on this bug or the fix.

Updated by Johnathan Corgan over 5 years ago

Subject: Re: [Discuss-gnuradio] Re: USRP IQ channels flipping during
packet transmission
Date:     Tue, 24 Jul 2007 17:45:54 -0500
From:     Ketan Mandke <[email protected]>
To:     Matt Ettus <[email protected]>
References:
<[email protected]>
<[email protected]>
<[email protected]>

Matt,

> > Does this problem occur with more than one USRP?  All of your USRPs?
We tried experimenting with different boards but got the same result.

> > Does it happen every time you run, or just sometimes?
It happens everytime. Since it seems to happen at random, we will
receive some random number of packet successfully before we see a
packet where the IQ channels have been flipped. The length of this run
of good packets may range anywhere from 0 to 300.

> >  Does it happen more after the system heats up?
We did not notice any correlation between this error and how long the
boards are plugged or running. Even after leaving the boards unplugged
overnight, we would still see this error the next morning.

Thanks for your timely response. Please let me know if you need any
further elaboration on these answers.

On 7/24/07, Matt Ettus <[email protected]> wrote:
> > Ketan Mandke wrote:
>> > > After some major debugging, I have found a fix for this problem. To
>> > > summarize the problem again: the transmitter seems to flip the IQ
>> > > channels at random during packet transmissions, even though I do not
>> > > make any changes to mux settings or other USRP settings. In order to
>> > > fix this bug, I had to modify the write method inside usrp_basic_tx.
>> > > The following has solved the problem:
> >
> > Ketan,
> >
> > Does this problem occur with more than one USRP?  All of your USRPs?
> > Does it happen every time you run, or just sometimes?  Does it happen
> > more after the system heats up?
> >
> > Matt
> >
> >

Updated by Johnathan Corgan over 5 years ago

  • Status changed from New to Assigned

Updated by Johnathan Corgan over 5 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Fixed in r6764 on trunk.

Also available in: Atom PDF