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
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio