discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Reading I & Q from a binary file


From: paul munro
Subject: Re: [Discuss-gnuradio] Reading I & Q from a binary file
Date: Wed, 28 Jun 2006 06:00:13 +0000

I have updated from CVS and re-recorded a new file using complex types and the gain set to 20.

LabView is able to read in any type, so I have defined it to read single precision floats (assuming the first 32 bits are I and the second 32 bits are Q).
I have also read straight into a complex type and obtain the same results.

I now have I and Q values as I should. The values are in the range of 10^-41. Has anyone looked at the sampled values from the USRP before?? I am using the basic daughter board with no front end. I want to check that these values are reasonable. D Shens tutorial mentions the PGA amplifies the signal to a dynamic range of +-1???
I want to make sure the values are ok before moving on the next stage.


Regards
Paul


From: Eric Blossom <address@hidden>
To: paul munro <address@hidden>
CC: address@hidden
Subject: Re: [Discuss-gnuradio] Reading I & Q from a binary file
Date: Sun, 25 Jun 2006 19:47:06 -0700

On Sun, Jun 25, 2006 at 10:49:03PM +0000, paul munro wrote:
> Hi.
> I have sampled a FM signal and saved it to a file using 'usrp_rx_cfile.py'.
> I have checked the file by demodulating it using 'wfm_rcv_file.py' and
> everything works fine. I am now trying to read the file using LabView. The
> tutorial by Dawei Shen says the data is 16 bit signed integers in I
> followed by Q format. What I read in LabView is: each I sample is zero, and
> Q values range from 0 to +-32000 (see figure).

The output of usrp_rx_cfile depends on the command line options you
use. It saves files either with 16-bit I & Q, or 32-bit float I & Q (complex<float>).
By default it writes complex<float>.

> Are these values reasonable?? Should the inphase sample be zero?? I doesn't > seem right to me... Is it definitely I followed by Q, am I a word out?? I
> have tried with a few different files, but I get the same results.

No, this doesn't sound reasonable.  It's highly unlikely that every
other sample is zero.

If you are expecting 16-bit I & Q, try using usrp_rx_cfile with the -s
command line option.

FYI, most of the examples understand --help.  E.g.,


    address@hidden usrp]$ ./usrp_rx_cfile.py --help
    audio: using audio_alsa
    usage: usrp_rx_cfile.py: [options] output_filename

    options:
      -h, --help            show this help message and exit
      -R RX_SUBDEV_SPEC, --rx-subdev-spec=RX_SUBDEV_SPEC
                            select USRP Rx side A or B (default=A)
      -d DECIM, --decim=DECIM
                            set fgpa decimation rate to DECIM [default=16]
      -f FREQ, --freq=FREQ  set frequency to FREQ
      -g GAIN, --gain=GAIN  set gain in dB (default is midpoint)
      -8, --width-8         Enable 8-bit samples across USB
      --no-hb               don't use halfband filter in usrp
-s, --output-shorts output interleaved shorts in stead of complex floats
      -N NSAMPLES, --nsamples=NSAMPLES
                            number of samples to collect [default=+inf]

Eric

_________________________________________________________________
Need more speed? Get Xtra Broadband @ http://jetstream.xtra.co.nz/chm/0,,202853-1000,00.html





reply via email to

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