UHD I/O Data Types

Hello…

The I/O types defined in the uhd::io_type_t class lists 4 COMPLEX
types and a CUSTOM type. What I/O type should I specify in the call to
send()/recv() if my baseband signal is real and not complex, say I’m
transmitting from a file containing real samples of float type. How is
a sample type of real float or real short interpreted and/or converted
by the UHD library to shorts over the wire?

Thanks,
Arya

On 04/06/2011 08:42 PM, Arya S. wrote:

Hello…

The I/O types defined in the uhd::io_type_t class lists 4 COMPLEX
types and a CUSTOM type. What I/O type should I specify in the call to
send()/recv() if my baseband signal is real and not complex, say I’m
transmitting from a file containing real samples of float type. How is
a sample type of real float or real short interpreted and/or converted
by the UHD library to shorts over the wire?

I think this is a misunderstanding. A complex baseband signal represents
1/fs bandwidth of spectral content which the USRP will modulate to the
center frequency -> fc.

To have a “real” signal is to leave half of your spectrum undefined. Is
it symmetric about fc? or is it really a complex signal centered at
fc+fs/4?

-Josh

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,
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).

Arya

On 04/20/2011 04:31 PM, Arya S. 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.

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

_
One could take that real sinusoid, and translate it into the complex
plane with a
Hilbert transform, and there’s a block for doing that.

Although, if this is a pre-recorded signal, one could simply do the
Hilbert transform
“offline”, and have the pre-recorded signal be already transformed
into the complex
plane.

But if Arya is already using a signal-generator block within GRC or C++,
they could simply
use the already-existing complex output type.

The hardware expects signals to be represented in the complex plane,
even when there is no negative
frequency content of said signals.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium