GNU Radio Introduction

What is GNU Radio?

GNU Radio is a free open source toolkit that provides signal processing blocks to implement software defined radios, and signal processing systems.  I recommend reading the brief introduction to RTL-SDR before diving into GNU Radio.  GNU Radio can be used with the cheap inexpensive USB devices that can receive or transmit radio frequencies.  

What is Software Radio?

Before Software Defined Radio (SDR) was around radio components such as modulators, demodulators, and tuners were implemented in hardware components. With the rise of SDR and modern computing all of these components can now be implemented in software, or digitally.  Which allows for easy signal processing, and experimentation with more complex radio frequency builds.

What Does GNU Radio Do?

GNU Radio performs all the signal processing.  You can use it to write applications to receive and transmit data with radio hardware, or to create entirely simulation-based applications. GNU Radio has filters, channel codes, synchronization elements, equalizers, demodulators, vocoders, decoders, and many other types of blocks which are typically found in signal processing systems. More importantly, it includes a method of connecting these blocks and then manages how data is passed from one block to another. Extending GNU Radio is also quite easy; if you find a specific block that is missing, you can quickly create and add it.

GNU Radio applications can be written in either C++ or Python programming language, while the performance-critical signal processing path is implemented in C++ using processor floating-point extensions where available. This enables the developer to implement real-time, high-throughput radio systems in a simple-to-use, rapid-application-development environment.

Additionally, GNU Radio also comes with a Companion which helps beginners to jump straight into the world of SDR without having to have a background in programming.  The GNU Radio Companion is a Graphical User Interface (GUI) that allows the developer to create signal flow graphs and generate flow-graph source code.  The screenshot below is an example of the GNU Radio Companion application.

Building Blocks

There are several key building blocks that combine to make SDR possible. The first is some input device (a source) that is sampled at some sampling rate. For an audio device, the samples will be real numbers. However, radio devices will more likely provide complex numbers with an I and Q component.

If you aren’t familiar with expressing signals as I and Q components (sometimes known as quadrature data), that’s a big topic (with a great 3D explanation, one from Tektronix, and another one from National Instruments). However, you don’t need to directly understand the theory behind quadrature signals to get started with GRC. Just know that the I and Q signals can combine to express any waveform and, conversely, any waveform can break up into a series of I and Q values. With GRC, though, it isn’t that important (in most cases) to understand that, just like you can use a video card without knowing exactly what signals are on the PCI express bus.

Hello World of GNU Radio

Building an AM/FM receiver (a.k.a the Hello world program of GNU Radio).