[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] UHD I/O Data Types
From: |
Josh Blum |
Subject: |
Re: [Discuss-gnuradio] UHD I/O Data Types |
Date: |
Wed, 20 Apr 2011 16:50:03 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 |
On 04/20/2011 04:31 PM, Arya Santini wrote:
> By a real signal, I mean a signal like a real valued sinusoid. Say in
> a grc graph, I have this: signal generator (sine, float o/p) ---->
> float to short converter ----> usrp sink (short i/p). In this example,
Time out.
The USRP sink w/ short input is this hack-y thing in gnuradio that we
called interleaved shorts. Every other even sample is I and every other
odd sample is Q. In binary, the format its identical to a
std::complex<short>.
So you are generating a real sinusoid and sending every other sample
into I and Q, which would make I and Q basically identical with a
sinusoid of double the rate.
> I'm inputting a stream of shorts representing a pure sine wave to the
> usrp module. I wanted to ask how I can do this exactly when I call the
> send() to the UHD inside a C++ program? (an array of float values
> represent the pure sinusoid, which is the waveform I wish to
> transmit).
>
You cannot represent a "pure" sinusoid with a real signal. Think e^(jw)
vs Re{e^(jw)} Maybe someone could think of a better way to say this.
All USRP devices input and output complex baseband. You need to
represent your signal in complex baseband. I suggest experimenting by
feeding your signal into the _complex_ fft plotter in grc and see how it
looks spectrally, because thats how your actual spectrum will look when
you transmit, but shifted up by fc Hz.
-Josh