Harvey Mudd College
The simplest radio signal to work with is a pure sinusoidal wave with no modulation (changes) in frequency or amplitude. I generate such a signal around 100 MHz with a signal generator, show it on an oscilloscope, and look at the data coming from the SDR tuned to 100 MHz. I make a few observations whose significance will be fully explained in the next few lessons.
Sines and cosines are both sinusoids; they differ only by a phase. The combination of both a sine wave and a cosine wave at a given frequency can always be represented either as two signals—the cosine part, which we identify as the real part (or the in-phase part) of the signal, and the sine part (or the quadrature part) of the signal, which represents the imaginary part of the signal. In GNU Radio, the real part is represented by default with a blue curve and the imaginary part is represented with a red curve.
RTL-SDR Source: Uses a signal received from a RTL-SDR USB source, which should be connected to some antenna to receive a signal.
QT GUI Time Sink: Plots a sequence of complex numbers coming out of the source
QT GUI Frequency Sink: Plots the frequency of complex numbers coming out of the source
Variable: Creates a variable with a name and a value, similar to instantiating a variable in Python. (In the video, we instantiated samp_rate with value 1e6. 1e6, in this case, is meant for a signal of 1 Mega Hertz (1 MHz); since the RTL-SDR source uses the variable samp_rate, it will be checking for some signal at a frequency of 1 MHz.)
When Writing a GNU Program with the RTL-SDR Source
You would think that if the function generator is tuned precisely to 100.000 MHz and the SDR is set to receive the exact same frequency, that the resulting output (at the difference frequency) should be a constant (0 Hz). While entirely logical, that’s not what happens, because the precision of the clocks in the function generator and in the SDR aren’t perfect. They will have small but noticeable frequency offsets that may fluctuate in time with variations in local temperature. Even if they were in perfect agreement at one moment, we cannot count on their remaining synchronized as time passes. As we look at the output on the QT GUI Time Sink, we indeed see real and imaginary signals oscillating very slowly in time; they are not steady and constant.
Dealing with the small and gradually changing difference between clock rates in different components of a radio system will occupy a significant portion of this course; we will need to develop methods to monitor and correct for slow drifts in both frequency and phase, so that we can extract meaningful information from signals transmitted “on the back” of radio-frequency carriers.
The peaks should get closer together.
The blue wave is the real wave. It is indicated by sample 1 - additionally, it is considered as a cosine wave. Inversely, the red wave represents the complex part of the signal. This is sample 2, and it’s sinusoidal function is a sine function.
The plots will very slowly oscillate.
The real signal reaches its maximum before the imaginary signal in the Time Sink, and the peak on the Frequency sink lies above the value we’re looking for.