Software-Defined Radio

From Invihertz

Jump to: navigation, search


Description of GnuRadio

As we know (or not), GnuRadio is one of the most popular software environment for our USRP. Indeed, it turns radio hardware problems into software problems, getting the code as close as possible to the antenna.

So using GnuRadio, we could reconfigure almost everything “on-the-fly”, precising the sink, source, modulation, demodulation, if we need a graph to observe the signal, etc. GnuRadio applications are written primarily in Python language while the supplied, performance-critical signal processing path is implemented in C++ using processor floating point extensions where available. After, we will see also a nice tool to develop quickly and easier, but now it is time for the basics right here.

Figure 1. Typical software radio block diagram

Software Radio SchemBlock

See the section about ADC/DAC if you didn't, to understand how they work.

Before we dive into the software

Understand what the USRP really is

You can start using GnuRadio and don't know very well what USRP is precisely, but we recommend you to read the chapter : Introduction to USRP. There are also some very good ressources like Exploring GNU Radio, the USRP GUIDE, some good documentation in ComSec and references you can see below for each page.

Programming skill

Get your hands dirty! GnuRadio is a framework, so you have to handle the modulation and demodulation processes. All the signal processing blocks are written in C++, but just using Python is sufficient. Indeed, many useful and frequently used blocks have been provided by the GNU Radio project for python, which is used to create a network and graphs. But if you are interested to write your own block, you can read the article written by Eric Blosson "How to Write a Signal Processing Block".

Using Python only, you'll need to know what blocks are already implemented. Unfortunately, the documentation is not well explained, so we'll complete it later here. We'll talk about GnuRadio Companion, which helpful to understand the GnuRadio API. After the installation, you can find two html packages provided by Doxygen :


You can also find the documentation written by Firas Abbas "Simple User Manual for Gnuradio 3.1.1".

If you are interested to learn Python, you can read the book "Beginning Python" by Magnus Lie Hetland (there is also a good documentation online). But as we said before, there are some points you should now before using GnuRadio:

  1. Section 2: Using the Python Interpreter
  2. Section 3: An Informal Introduction to Python
  3. Section 6: Modules
  4. Section 7: Input and Output
  5. Section 9: Classes

The section about Classes will be a little strange if you're unfamiliar with Oriented Object Programming. It's not very difficult but has to be carefully learned.

For C++, if you're already familiar with C, you'll need basics of OOP and the official documentations also.

Digital Signal Processing

Fourier, Nyquist, Shannon and everything we've learned in school about coding & transformation and other basics of Digital signal processing are really important. But as we know, the things we learn in school are insufficient, also like your programming courses I guess... One of the best reference I can suggest to learn more more and more is The Scientist and Engineer's Guide to Digital Signal Processing. Indeed, this reference cover almost everything in DSP and it's very simple to read, especially when you're not familiar with digital signal processing.

The knowledge of DSP is very important to understand how the sampling is done, how to get a spectre of a signal, finite impulse response (FIR) and infinite impulse response (IIR) filters. With that you'll understand primarely how the Analog to Digital/Digital to Analog convertion is performed, what's the purpose of the RF Frontend and other things in digital signal processing.

So in the digital world, the signal processing is done with specialised microprocessor as know as a DSP. The main difference with a simple microprocessor and a DSP is that the DSP is optimised to perform fast calculations on a continous data stream. The computer is often used to do this function and we will see how to do it thanks to GnuRadio.


These knowledge are very important and in some case you've maybe learned many things in AM, FM, PSK, QAM, QPSK, GSMK modulations as digital coding concepts like NRZ, RZ, NRZI, Manchester, Miller 1/2, CMI, AMI, HDB3, 4B3T. Also, it's important to understand the parts of the synchronization and regeneration.

As we should know, a digital signal has to fundamental properties :

  1. It reprents transition lelves at some synchronous instants and can't be represented somewhere else.
  2. Outside of these transitions, the signal concerves a constant value belonging to a finite set of known values.

So you need to do some estimations like :

  1. Locating the signal transitions
  2. From these transisions, regenerate the clock signal
  3. Thanks to the clock signals, sampling the received signal value at a chosen time
  4. Compare the sample with other possible values and decide about the assignment of one of these values
  5. Reconstruct the digitized signal thanks to the set of the values founded and the clock.

About references you can read Chapters 4 and 5 of "Digital Communications" by John G. Proakis, and some simple ressources online.


Personal tools