Anda di halaman 1dari 19

GNU Radio and USRP

Chandrakant Sharpa
SRMRI, Bangalore
Introduction : GNU Radio
GNU Radio Architecture
Software Architecture
Hardware Architecture
Development in GNU Radio

GNU Radio
GNU Radio Overview
Open Source signal processing software
development toolkit
Supports, Linux, Mac OS and Windows
Provide facility to create signal processing
Defining and processing waveform in software
A framework for building software radio
GNU Radio- SDR experimental
Open source of both software and hardware
GNU Radio software based on python and c++
Baseband radio signal processing is performed in
host computer for both transmission and reception
GNU Radio SDR hardware based on :
Motherboard with ADC+DAC, FPGA, radio-to-
computer interface(ethernet cable)
Daughterboards with RF front-ends for covering
frequencies from DC upto 5.9 GHz

Using the GNU radio is cross disciplinary
Requiring know-how in the fields of
Computer programming
Communications systems
Digital signal processing
Analog as well as digital hardware(basic)

Installation in Ubuntu machine
Download and build GNU Radio(Manually)
Install the pre-requisites
$ git clone
$ ./bootstrap # Do NOT perform this step if you are building from a
$ ./configure, $ make, $ make check, $ sudo make install
Install directly from repository(new ubuntu version)
deb unstable main
deb-src unstable main
Easiest way :
Install from script(also works for other linux machine)
Download and run the script :

GNU-Radio : Software Architecture
Python scripting language used for
creating signal flow graphs
C++ used for creating signal
processing blocks
SWIG used to generate the interface
between python and c++
The scheduler is using pythons built-
in module threading, to control the
starting, stopping or waiting
operations of the signal flow graph.

GNU Radio: Hardware Architecture
USRP/Daughterboard Snapshots
USRP N210 : Basic features
Two 100 MS/s 14-bit analog to digital converters
Two 400MS/s 16-bit digital to analog converters
Gigabit ethernet interface
Modular architecture supports a wide varity of RF daughterboards
Xilinx Spartan 3A-DSP 3400 FPGA
1 MB of on-board high-speed SRAM

Development in GNU Radio
The application of Python
Using Python for creating flow graphs
Also used for creating GUIs
and other non performance critical applications
The application of C++
Performance critical applications
Signal processing blocks

GNU Radio Companion
Graphical tool for creating signal flow graphs
Generating flow-graph source code in python

Signal Processing Blocks in C++

Built as shared libraries
Using python import feature can be load dynamically
SWIG Simplified Wrapper and Interface Generator used for glue code
allowing python import
C++ class gr_block is base for all signal processing blocks

Components needed in writing a c++ block
.h file for class declaration
.cc file for class definition
.i file defining how SWIG generate glue code
binding the c++ class into python

How to Write a Signal Processing

Implement a class derived from gr_block in c++
Use SWIG to generate the interface between
python and c++
Provide a python module in gnuradio package
allowing to access the new block
Hello World Example
Generates two sine waves and outputs them to
the sound card

References :
GNU Radio Website
GNU Radio Tutorial
GNU Radio Examples
Youtube s GNU Radio Tutorial Series

Email-id :