Introduction To GNURadio Companion

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

Introduction to

GNURadio Companion
Digital Radio Laboratory
Chillarige Ajay Kumar
Dhanush D Pai
Prof. Shrishailayya Mallikarjunayya Hiremath
National Institute of Technology Rourkela
CONTENT
1. Software Defined Radio
2. GNURadio Companion
3. Boolean Operators
4. Type Convertors
5. Some Important Blocks
6. Input sources
7. Important WX GUI Sources
8. Important QT GUI Sources
9. Signal Generation Experiment
10. References
11. Assignment
Software Defined Radio
● Hardware can be well configured using software. It takes the analog signal processing and
moves it, as far as physically and economically feasible, reusable, to processing the radio signal
on a computer using algorithms in software.
● Wireless systems demand increasingly high degree of software intelligence and
reconfigurability to include field feedback or remote diagnostics/ customization as per user
request.
● The system can be reconfigured at run time with no changes in the hardware.
● Architecture represents a programmable hardware in the form of a FPGA and interchangeable
RF front end so that the platform can be easily customized/reconfigured for different end use
cases
GNURadio Companion
● GNU Radio is a free, open source framework that enables users to design, simulate, and
deploy highly capable real-world radio systems.
● It is a highly modular, "flowgraph"-oriented framework.
● It has comprehensive library of processing blocks (algorithms) that can be used to make
complex signal processing applications.
● It is used for real-world radio applications, including audio processing, mobile
communications, tracking satellites, radar systems, GSM networks, Digital Radio
Mondiale, and much more - all in computer software.
● It can be used to develop implementations of basically any band-limited communication
standard.
● It offers excellent scalability and is heavily optimized for a large variety of common
platforms.
GNU Radio Companion Interface

Workspace

Variables

Toolbar

Terminal

Library
Color Mapping
Boolean Operators
● And - has a high output (I.e. 1)
only, if all its inputs are high.

● And Const - output =(in) AND


(const). This can be useful to
mask certain bits in a byte,
hence forcing them to zero.

● Not - inverter produces an


inverted version of the input at
its Output.

● Or - has a high output (i.e. 1)


only, if one or more inputs are
List of Available Boolean
Operators in GNURadio high.
Companion
● Xor - has high output only if the
two inputs are different.
Type Convertors

Color indications for different data


types

List of Available Type Convertors in GNURadio


Companion
Type Convertors

Decimal float value to Magnitude is (real2 + Imag2 )1/2 Convert the decimal float
the binary integer values Phase is tan-1 (Imag/real) values to the complex values

For every complex input, real and Complex to imag gives us the Imaginary part of
complex parts are converted to the complex input while the Complex to Real
shorts and given at output gives us the real part of the complex input.
Waveform Generators ● Constant Source - Produces a
constant value output (Complex,
Float, Int, Short type).

● Noise Source - Generates noise of


desired distribution (Impulse,
Gaussian, Laplacian, Uniform) of
desired amplitude and desired data
type (Complex, Float, Int, Short).

● Signal Source - Can generate a


waveform (Sine, Cosine, Triangular,
Square, Constant, Sawtooth) for a
List of Available Waveform Generators in desired frequency, amplitude,
GNURadio Companion
sampling rate, and data type.

● Random Source -Generates random


data of desired data type between
the desired minimum and maximum.
Some Important Blocks - 1. Options Block

● Options block is used to select the


standard QT or WX.
● The Title, Author, and Description
Options Block on the of the Experiments can also be
Workspace mentioned in this block to be
visible on the canvas.

Properties options of the Options Block


Some Important Blocks - 2. Variable Block
● Variable block is used to set the
sample rate constant through each
block.
● Once Sample rate is set constant in
Variable Block on
the Workspace Variable block, then it will remain
constant in every block.
● Here sample rate is considered as
32K for proper conversion of analog
signals to discrete sampled signals.

Properties options of the Variable Block


Some Important Blocks - 2. Variable Block

Experimental setup to understand the effect of sampling rate.


Some Important Blocks - 2. Variable Block

Output obtained for same sampling rate(32kHz) but for different signal frequency (700,10kHz, 25kHz)
Some Important Blocks - 3. Throttle Block
● Throttle block limits the amount
of data signals passing through
the system as per the sample rate.
● It protects the GNU Radio
Throttle Option in the platform from excess
Library
consumption of the CPU resource
which occurs when the flow graph
is not being properly regulated by
the external hardware like audio
source, audio sink, USRP source,
Throttle Block on the USRP sink.
Workspace
Properties options of the Throttle Block
WX GUI Blocks

List of Available WX GUI blocks in GNURadio Companion


WX GUI Blocks

It creates a
variable with a
radio button, drop
down. It is used to Complex stream of Used to display frequency Used to display
provide a multiple data is plotted on to domain representation of Spectrogram plot or
choice between the IQ Constellation the signals. All the Waterfall for complex or
the multiple diagram. Sample Rate, parameters like FFT size, floating data streams.
options. Frame Rate, Window Sample Rate, Reference
size can be manually level, Baseband frequency
adjusted can be set manually
WX GUI Blocks

Notebook section Used to plot the Used to create a It creates a


is used to gives a time domain variable with slider variable with a text
display the representation of option making it box. It can convert
graphical element the complex or vary from the the text in float,
in the Notebook float input data. specified minimum integer, string, and
page. Grid position Sample Rate and and maximum Evaluate. It is just a
is used to position Trigger Mode can values. labelling to the
the graphical be set manually. textbox.
element in the
window.
QT GUI Blocks

List of Available QT GUI blocks in GNURadio Companion


QT GUI Blocks

It is a block which Used to plot the Used to plot the Used to plot floating
chooses the number constellation diagram histogram (graphically point streams them
of options available in (scatter plot) taking summarize the on a waterfall plot or
chooser. Each option complex inputs of distribution of data) of spectrogram plot
has its own label. It different digital the data.
set a number of modulation schemes.
options to “list “to
enter a single list of
options and labels.
QT GUI Blocks

Used to display time Used to display It is used to plot the


domain representation of frequency domain output in time domain,
the float or complex representation of the Frequency domain
data. float or complex data. Spectrogram (waterfall
Frequency sink tunes the diagram). It tunes the
center frequency in such center frequency
a way that the carrier mentioned so that the
signals will lies within the signals falls within the
bandwidth (BW) defined. desired BW.
Difference Between WX GUI Blocks and QT GUI Blocks
● WX is the older versions of GUI which has an issues that the entire
instrumentation block performs very poor especially on the
integrated graphic cards.
● In various plots like FTT plot , scope plot, the graphs does not provide
a wide range from negative to positive but only covers the from 0 to
positive range.
● No-one develops the WX functionality anymore, and bugfixes
haven't been available in a long time.
● Furthermore, WXGui has been completely dropped from the current
release of GNU Radio, 3.8.
Experiment Block Diagram
References
1. https://wiki.gnuradio.org/index.php/Tutorials
2. Ram, Amitesh Pandey. Practical approach to Software Defined
Radios.BUUKS, 2019.
Assignment
● Questions in Python-
1. (a) Generate sine, cosine, square, triangle, sawtooth wave in Gnu radio and Plot it’s
time and frequency response.
(Frequency = Last 3 digits of your Roll Number, Amplitude = Sum of digit of your
Roll Number. Ex- 117EC1234 takes frequency = 234 Hz and Amplitude = 10).
(b) Plot and analyze the time and frequency domain representations of cosine signal
passed through a Quantizer with number of bits n=4, 16 and amplitude of signal is 1.
2. (a) Plot and Analyze the effects of different types of Noises on cosine wave signal in
Gnu radio.
(b) Calculate BER of the above signal with amplitude of signal =1 and amplitude of
noise =1/(sum of last 2 digit of your roll number % 10)
(Note: If sum of last 2 digit of your roll number is a multiple of 10, use 4 in the
denominator)
Assignment (Contd.)
3. Plot FFT response of 3 cosine signals that have a sampling rate fs = 8 KHz
(a). With signal frequencies f1 = 1 KHz, f2 = 2 KHz and f3 = 3 KHz
(b). With signal frequencies f1 = 1 KHz, f2 = 9 KHz and f3 = 15 KHz
(c). Analyse the outputs of (a) and (b)
(d). What is sampling theory ?
(e). What is aliasing error ?

You might also like