[USRP-users] Questions on USRP N200 data streaming

Marcus Müller marcus.mueller at ettus.com
Wed Sep 17 17:32:55 EDT 2014

The cause is: there is no voltage in digital domain, it's just numbers!
The numbers correspond to voltages on the ADC, but it's not unless you
calibrated your complete frontend till you can map a number to a voltage.
Now, as I said in my previous mail, the UHD USRP source maps the ADC
range to (-1;1)+ (-1;1)j if set to float complex output, but in complex
int16 it uses the +- 2^15 range.


On 17.09.2014 22:43, Nicholas Hu wrote:
> Hi Marcus,
> Thank you for your suggestions, they worked perfectly. Now I've encountered
> another problem. I've setup the measurement so that both the wired data
> format and host data format are complex int16, a head block is added to
> take 125e6 samples total, and I have a input tone at 70 MHz -10 dBm which
> is DDCed to 0 MHz on the spectrum, followed by a decimation factor of 8
> (12.5 MSPS). The settings above are attached. My question is, when I read
> the I Q data using Matlab, the voltage amplitude is on the order of ~2000
> Vp, whereas when reading data stored as complex float 32 (taken previously)
> gives a voltage amplitude ~0.066 Vp which is far more reasonable. Could you
> please explain what is the cause of this?
> Thanks,
> Nicholas
> On Wed, Sep 17, 2014 at 10:29 AM, Marcus Müller <marcus.mueller at ettus.com>
> wrote:
>> Hi Nicholas,
>> over your cable you send 2x16bit, but you chose 2xfloat32 complex as GNU
>> Radio stream format (the link between the usrp source and the file
>> sink), and that's exactly what is stored in the file. I'm not quite sure
>> what I can tell you about the difference between both data formats --
>> one is two floats between (-1;1) constituting real and imaginary part,
>> the other is 16 bit integers doing the same within their value range.
>> Now, for less data than you are expecting there's a lot of possible
>> explanation. Maybe you underestimate the time your flowgraph needs to
>> get started; maybe you're seeing a lot of overflows and just miss half
>> of the samples.
>> I suggest using a head block, and watching the console output for "O"
>> messages.
>> Greetings,
>> Marcus
>> On 17.09.2014 16:17, Nicholas Hu wrote:
>>> Hi Marcus,
>>> Thank you for your reply. Could you please clarify this for me? Are you
>>> saying that in my streaming settings, I am actually sending 12.5e6 S/s
>>>  with 32 bit I and 32 bit Q in every sample through my 1 gigabit Ethernet
>>> cable ? If this is the case, why am I only getting ~500 MBytes instead of
>>> ~1 GBytes in 10 seconds? And could you also explain the difference
>> between
>>> the wire data format (complex int16) and the host  data format (complex
>> 32
>>> float)?
>>> Thanks again,
>>> Nicholas
>>> On Wed, Sep 17, 2014 at 9:08 AM, Marcus Müller <
>> usrp-users at lists.ettus.com>
>>> wrote:
>>>>  The In-GNU Radio "blue" data format is complex float32, so it's 64b ==
>> 8B
>>>> per file sample; the complex int16 format is converted between the cable
>>>> and the GNU Radio USRP source output port to complex float. So:
>>>> 8B*12.5e6 S/s * 10s = 100e6B* 10S = 1e9B ~= 1GB.
>>>> You probably want to use "output type"="complex int16" in the USRP
>> source,
>>>> but you would also need to write your own Matlab loader (which is not
>> hard
>>>> to do using the fread method).
>>>> You don't really need GNU Radio to just dump samples to a file; UHD
>> comes
>>>> with tools like uhd_rx_cfile that do exactly that.
>>>> Greetings,
>>>> Marcus
>>>> On 16.09.2014 17:43, Nicholas Hu via USRP-users wrote:
>>>> Hi,
>>>> I am working on a USRP project. I am using a USRP N200 with a BasicRX
>>>> daughter board to perform data streaming. I am using GRC on a
>>>> Ubuntu 12.04 machine. The USRP N200 is set to have a decimation factor
>> of 8
>>>> to achieve a streaming rate of 12.5 MSPS, the daughter board is set to
>> A:A
>>>> to perform single channel real sampling. The I Q data wire format is
>> set to
>>>> be 16 integer each, and the host data format is set to be complex float
>> 32.
>>>> The settings above are also in the attachments. For analyzing data, I am
>>>> using Matlab R2013b on Windows 7. My question is: when I am streaming
>> data
>>>> for about 10 seconds, I am getting a file around 500,000,000 bytes
>> which is
>>>> reasonable ((16 bits/sample I+16 bits/sample Q)*(10 seconds)*12.5
>> MSPS*(1/8
>>>> bytes/bits)=500 Mbytes), but when I use read_complex_binary.m provided
>> by
>>>> GNUradio to read the file in Matlab, I am only getting half of the
>> expected
>>>> samples (~62,500,000 samples) instead of 125,000,000 samples. Could
>> anyone
>>>> please explain why this is happening? Doesn't 16 bits I and 16 bits Q
>> wire
>>>> format give me 32 bits per sample? Any help would be appreciated.
>>>> _______________________________________________
>>>> USRP-users mailing listUSRP-users at lists.ettus.comhttp://
>> lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>>> _______________________________________________
>>>> USRP-users mailing list
>>>> USRP-users at lists.ettus.com
>>>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

More information about the USRP-users mailing list