work on SDR in progress
work on SDR in progress
For beginners –
By definition and Example
Software-Defined Radio (SDR)
For beginners –
Content
Introduction…........................................................................................................................ 3
1.5. Some notions about signals and their applications in radio communications...17
2.2. Instrument control and signal acquisition using SDR#. The influence of the
Chapter 3. CONCLUSIONS....................................................................................................78
Appendices 80
Bibliography....................................................................................................................... 100
Introduction
Chapter 1. Background, Theory and Possibilities
embedded system. Although the concept of SDR has been around for some time,
advancements in digital electronics are making many processes that were once theoretical
become practical.
A basic Software Defined Radio (SDR) system typically consists of a computer equipped with
a sound card or another type of analog-to-digital converter, along with some form of RF front
end. In this design, a significant amount of signal processing is performed by the general-
purpose processor instead of using specialized hardware (electronic circuits). This approach
enables the radio to receive and transmit a wide variety of radio protocols, often referred to
Software-defined radios (SDRs) are highly valuable for military applications and cellular
phone services, as both need to adapt to various changing radio protocols in real time.
Proponents, such as the Wireless Innovation Forum, expect that in the long run, software-
defined radios will become the leading technology in radio communications. SDRs, combined
with software-defined antennas, are essential components that enable cognitive radio.
Traditional receivers have been using the heterodyne pattern for nearly a century, and a
basic understanding of this pattern is necessary to distinguish the difference from the SDR
receiver. The traditional receiver performs three basic functions: setting the carrier
frequency to select the desired signal (tuning), filtering this desired signal against other
received signals, amplifying this signal to compensate for losses on the communication line
The signal received from the antenna is amplified in the RF block which operates only in
the frequencies of a region of interest. Then the signal reaches a mixer where the
frequency of a local oscillator also reaches, through another input. The purpose of the
mixer is to translate the received signal to the intermediate frequency. Usually, the
intermediate frequency coincides with the local oscillator frequency. Further, the signal is
filtered by a band-pass filter, which allows to pass only a specific portion of the spectrum.
A typical SDR system comprises an analog front-end and a digital back-end. The front end
deals with the transmission and reception functions of a communication system and contains
analog RF components with tunable parameters, an ADC to convert analog signals, and a
DAC to generate analog signals from digital data. The front-end also uses a device that
performs the conversion for receivers and transmitters, and this device is usually an FPGA.
The front-end part has the main functions of signal conversion, frequency translation to/
from intermediate frequency, power and small signal RF signal amplification with low noise,
automatic gain control [1].
The back-end deals with the digital signal processing. There are also integrated SDR
In general, an SDR platform consists of several blocks: power supply, clock, reception
and transmission, digital conversion, signal processing. The blocks are connected by
wires that ensure fast data transmission from one block to another.
The structure of an SDR is detailed in the image above. The RF tuner block performs the
same function as the first three blocks on the heterodyne receiver, that of translating the
received signal to the intermediate frequency. Further, the signal is passed through a
6
analog-to-digital converter to be digitized. The digital signal reaches the DDC (Digital Down
Converter) block, which contains the mixer, a digital local oscillator and a low-pass filter,
components that work similarly to the classic heterodyne receiver. Finally, the digital signal
reaches the signal processing block (Digital Signal Processing) where operations such as
In 1992, Joe Mitola published a paper in which he mentions, for the first time, the
concept of Software Radio. It was created in 1991 by him, being "a radio whose
In 2003, Ettus Research offered the first series of USRP – Universal Software
Radio Peripheral;
In November 2004: FCC approves the first SDR device in the United States, and if
In 2011, the graphical interface for GNU Radio was implemented and Matlab began
Eliminating the hardware component and the related cost, the result being the
protocols.
- Disadvantages of SDR
The analog-to-digital converter limits the maximum frequency used by the digital
part of the SDR;
Developing an SDR requires both software and hardware engineers;
For some simple radio systems, an SDR platform can be an expensive investment.
The most popular SDR devices in the year 2022 [11]:
The fields of applicability of SDR are very diverse, it can be used in a wide range
- Research and development, through the ease with which an SDR can be programmed
- Military applications, for example the detection and jamming of radar signals from intruders;
8
- Communication between military personnel regardless of location or type of equipment used;
signal decoding;
GNU Radio allows users to create, simulate, and deploy systems that work in
9
comes with a rich library of processing blocks, which can be combined to realize complex
signal processing applications [14]. GNU Radio has been used for a wide range of real-
tracking, radar systems, GSM networks. Thus, the SDR part is moved from analog signal
GNU Radio allows you to use a radio device connected to your computer with
a program written from scratch, but this approach can become cumbersome. For
this reason, GNU Radio provides programs and implementations that are ready to
use. So, GNU Radio implements various functionalities in easy-to-use reusable
blocks, offers excellent scalability, provides a rich library of standard algorithms to
the user, and is optimized for a wide range of platforms. It also provides a variety of
examples to familiarize the user with the work environment [14].
Fig.4 – The working areas of the GNU Radio programming environment
10
GNU Radio provides the user with over 400 digital signal processing blocks,
including filters, modulators, demodulators, visualization tools, and the option
to add new blocks written in Python or C++.
- Connection 1 to N outputs
- Loops / feedback
- N to 1 connections
Fig.5 – Allowed and forbidden connections between blocks
11
The blocks:
things. Connections:
- Low cost:
- Can be used in various ways, such as GPS data acquisition, DVD transmitter, data
- It can be integrated not only using SDR, but also using a hardware called USRP
radio signals;
- Reconfiguration at the software level, maintaining the same hardware to facilitate the use
Mathworks, which allows manipulation of matrices, graphical representation of functions and data,
contains an additional package called Simulink, used for simulations based on blocks representing
Matlab was first commercialized in 1984, although it dates back to the 1960s, having
been invented by mathematician and programmer Cleve Moler. The idea of Matlab was
based on his PhD thesis. By the late 1980s, hundreds of copies of Matlab had been sold
12
to universities for student use. The program became popular thanks to the toolboxes
A Matlab application is built using the programming language of the same name.
Matlab is frequently used either using the command line or by executing script
- Antenna Toolbox;
- Filter Design;
- RF Toolbox;
Matlab is very useful in performing simulations because it contains a very diverse collection
of functions that allow the user to implement algorithms from different domains [8]. The
13
communications, image and video processing, machine learning, control systems, test
When selecting the optionBlank GUI,an empty interface will open, on which buttons, pop-
14
The GUI is accompanied by an attached .m file, which contains the predefined functions for
the elements in the interface, but in which the user can also write code to perform various
functions and links between elements, signal processing, graphics display, and more.
- It is easy to use and learn and the online community is knowledgeable and
capable;
- Code in Matlab is more difficult to execute than that in C or C++, because Matlab is
an interpreted language;
SDR# is a very popular program used with the RTL-SDR device, being a very easy
program to install and use. Upon opening the program, we see the following interface:
- SoftRock/Si570;
- HackRF;
- RTL-SDR;
- RFSPACE SDR-IQ/-IP/NetSDR;
- IQ file (*.wav).
16
WFM=Wideband Frequency Modulation = type of modulation used by FM radio stations
RAW=Raw IQ signal = used to listen or record raw IQ data. Almost never used.
Filters are used to select a signal from the RF window. A good filter will select only
the selected signal. The best option is usually the Blackman-Harris filter.
I made this short description of the SDR# program because this is the program I used
as a reference in checking the applications I made. In other words, I verified the correctness
and functionality of the applications by checking the reception of certain signals on a certain
frequency and with certain parameters, first using SDR#, to make sure of the certainty of the
reception, and then testing the same with the applications made by me.
been sampled and quantized, and the values of the signal only exist at regular time
samples. The time interval between two samples drives the sampling frequency.
17
Sample rate – sampling frequency–represents the number of values per second that are
sampled from a signal to create a discrete digital signal.
Initial phaserepresents the value of the signal phase at the initial time t = 0.
The sampling theorem,formulated by Shannon, says that a band-limited signal, that is,
having a maximum frequency, can be reconstructed from its samples if the sampling
frequency is greater than twice the maximum frequency in its spectrum [9].
Power spectral densityof a signal describes the power present in the signal as
a function of frequency, per unit frequency. Generally, power spectral density is
expressed in W/Hz.
spectrumrepresents the totality of sinusoids from which a signal is formed, and is determined using
the Fourier theorem, in the case of periodic signals, and with the Fourier transform in the case of
non-periodic signals.
irreversible process.
Fourier transformhas the role of decomposing a function (a signal) into the frequency
components that make it up. The inverse Fourier transform has the role of recomposing
18
Energy spectral densityis a measure suitable for signals with finite energy (eg pulses)
and shows the distribution of the energy of a signal in frequency [9].
Analog modulationtranslates the central frequency of the analog signal from the baseband to
the frequency of the carrier signal, and the basic schemes are: AM – amplitude modulation, FM
signal transmission is also called digital communication and the basic schemes are: ASK
– Amplitude Shift Keying, FSK – Frequency Shift Keying and PSK – Phase Shift Keying.
Encoding a signalis the data processing operation in the baseband, performed on the basis of
a clock signal, with the frequency equal to that of the bit from the encoder input. The spectrum
of the coded signal is centered on the zero frequency. Binary line codes, with the coded
sequence with two levels, are: NRZ – Non-Return to Zero, BIF – Biphase or Manchester, RZ –
19
An isotropic antenna is a theoretical antenna concept in which the emitted radiation
is equal in all three dimensions of space. In real antennas, the directivity
characteristics always differ and the radiation pattern is established following
precise measurements around the antenna [9].
Depending on the distance of the receiver from the transmitter, several areas of interest can be set
- Effective transmission area, where communications can be made and the error rate
is reduced;
- The detection area, where the signal is detected by the receiver and a stable
communication cannot be achieved;
- The interference zone, where the signal may not be detected and contributes additively to
the background noise [9].
Attenuation of a signal is the decrease in signal strength, and this increases in proportion to the
Filters can be of several types, depending on their characteristics, the most popular being:
20
- Low-Pass Filter: allows signals with a frequency lower than the
selected/set cutoff frequency to pass and attenuates or blocks signals
with a frequency higher than the cutoff frequency;
- High-Pass Filter: allows signals with a frequency higher than the selected/set
cutoff frequency to pass and attenuates or blocks signals with a frequency
lower than the cutoff frequency;
range of two cutoff frequencies to pass and rejects signals within this range.
Signal to Noise Ratio (SNR) - The signal-to-noise ratio[4] – represents the ratio of the
desired signal strength to the noise strength and is used as a standard measure of
signal quality for communication systems. An information signal used as a means of
communication will experience interference from noise, interference that can degrade
or even modify the information signal, changing its quality.
21
Chapter 2. PROCUREMENT SOFTWARE
APPLICATIONS SIGNAL
RTL2832U is a high-performance DVB-T COFDM demodulator that supports USB 2.0 interface.
It is used by radio amateurs, being perhaps the cheapest system of this kind, in the reception
of signals contained in the frequency range 24 MHz - 1.766 GHz. The housing is made of
plastic, which is a weak point compared to other similar but more expensive systems, and the
22
Fig.12 – Block diagram of the RTL-SDR system [31]
In the environment of radio amateurs, however, the opportunity to use this device for
hamradio applications was noticed, thus managing to transform this device into an SDR
receiver. Due to the fact that the operating frequency of these devices starts from 20 MHz
upwards, they did not become very popular, being generally used for FM reception.
In newer versions, these devices can receive signals from 20 kHz and allow direct
sampling operation, that is, the tuner block is bypassed and the signal goes directly to
This SDR stick can be used with Windows operating system, several versions, but
Controlling the RTL-SDR instrument using the SDR# software is very easy
easy, only the installation of the RTL2832U chipset driver being required at first.
To install this driver, we used a small program called Zadig, available on the
Internet for download [29]. The interface looks like this:
23
Fig.13 – Zadig program interface
Generally, the driver and programs that will be used with the SDR device come with the
Connecting to SDR# is very easy, the device just needs to be connected to a USB port
the influence of the environment, namely open space versus closed space on the reception of
signals, I checked the reception of radio stations from the city of Sibiu and from the town of
Zăvideni in Vâlcea county, with the help of the RTL-SDR device, both inside a house and in free
space, using Application 2 of this paper – FM receiver, made in the GNU Radio environment.
To evaluate the quality of the received sound, we used some attributes, which reflect a
- environment m: the voice message is received successfully, but the noise is persistent and continuously
- Nonexistent : there is no reception on the frequency on which there should be a radio station,
The results of this little experiment can be found in the following tables:
24
Table 1 – Signal quality received inside and outside a home, in the city of Sibiu
Table 2 – The quality of the signal received inside and outside a home, in Zăvideni, at
As can be seen, there are some differences between the reception inside a home and the
open space. Even in open space, however, there is the influence of buildings, bridges, which
obstruct and reduce signal quality. Also, one can observe the much better reception of
The reasons why the quality of signal reception differs depending on the environment from which
they are received can be: walls, location in relation to the signal emission source, poor quality of
25
2.3. Applications in GNU Radio using the RTL-SDR system
acquires the data first in the time domain, then calculates the frequency, using the fast
Fourier transform. In this way, it can acquire a large amount of data over a wide
frequency band, calculate amplitude versus frequency, and quickly display it in the
frequency domain. Spectrum analyzers differ from oscilloscopes in that they tend to
introduce background noise (noise floor) lower, and has more special filters that can
Radio work environment, and consists in making a spectrum analyzer, using the RTL-SDR
platform, for the frequency range 22.93 MHz – 1.760 GHz. The GNU Radio environment is
26
Fig.15 – Graphical interface of application 1 – data recording window
- Visualization of the received spectrum in real time with the help of the RTL-SDR device;
- Selecting the bandwidth of the visualized signal, with the help of a slider, from the
application interface;
- Recording of received data in .wav file or other format, with the option to choose the
In addition to all these functionalities, the Spectrum Analyzer and Time Domain windows allow,
thanks to the GNURadio environment, to adjust several options available in the Control Panel,
accessible by pressing the wheel on the mouse. The same press of the wheel allows adjusting
some parameters in the case of the other two windows, namely Waterfall and Constellation.
27
The block diagram that realizes the previously presented functionalities, realized in GNU Radio:
The block diagram contains a multitude of blocks, each with a well-defined function.
variables are represented of boxes without terminals, these being named
Center_frequency, RF_Gain, Bandwidth, sample_rate, bits_per_sample. These are of
chooser or range type to allow the user to adjust their values when using the interface.
In any case, they also have a predefined value that the program runs with at startup.
The RTL-SDR Source block is configured as follows. The configuration is done by double-
28
Fig.17 – Configuration of the RTL-SDR Source block
Sample rate, Frequency, RF Gain and Bandwidth parameters are adjustable from the interface.
The Selector block allows choosing a program execution branch. In this case, we can
select between displaying the signals but without saving data, or with the option to
save data and choose the number of bits to save the data in .wav format. Along with
the Selector block, a QT GUI Chooser block is used, which connects the input to the
Selector to its two outputs. Using the QT GUI Chooser, we choose whether or not to
record data, in the Record data tab.
The QT GUI Tab Widget block is used to arrange the options of the two branches
of the Selector block in two different menus, because when one of the branches is
executed, the other one stops. So I chose to make two menus, one to view the
signals when no data is being recorded, and a second to view the signals while
they are being recorded.
The Throttle block is used to limit the flow of samples so that their average rate
does not exceed the set value. We chose 3.2 MSPS as the limit, which is the
maximum number supported by the RTL-SDR device. Normally, when using
hardware, the Throttle block is not used, with GNU Radio displaying a warning
about this, but it is not contraindicated either, so I chose to put it in the
schematic anyway.
The QT GUI Frequency Sink, QT GUI Waterfall Sink, QT GUI Time Sink and QT GUI
Constellation Sink blocks allow viewing the received signal in multiple forms as seen in
the interface, namely frequency domain, spectrogram, time domain and constellation.
29
The blocks are configured as follows:
This type of graphical interface allows the display of the power spectral density of the
received signal.
The parameters Center Frequency and Bandwidth are variable, set by the user in
the interface.
GUI Hint represents the coordinates needed to position the display element in the general
independent signals cannot be displayed simultaneously. Most of the parameters are similar to
This block displays signals in the time domain, acting as an oscilloscope. Each signal is
represented with a different color. Some configuration options are similar to other blocks.
- Complex to Float – data conversion block from complex type to float type. It was
necessary to be able to use the Wav File Sink block, which only allows Float data;
- Options – default block of any application in GNURadio, in which the application ID, title,
author, language in which the application's functionality will be compiled (Python or C++)
are set.
Each block in GNURadio has a tab called Generated Code. In this tab you can see the code
generated by the respective block, in the Python language, and the code for the entire application
is generated in a file with the extension .py, after pressing the "Generate the flow graph" button in
The application made is relatively simple, but it allows the exploration of the spectrum of
the entire range made available by RTL-SDR. If another type of device is desired, it is
sufficient to replace the source block with another block, set the parameters and connect
The application allows an analysis of signals and disturbances, but also the acquisition of a
signal in wav format or in any other format, if the Wav File Sink block is replaced, a signal that can
using only an antenna connected to an SDR device, controlled by a program, such as the
32
The application made in GNURadio consists of an FM receiver, but with two
demodulation possibilities: mono and stereo. For this, we used two different branches to
implement the two types of receivers, each branch being accessible using the Selector
block and a selection menu in the GUI. The frequency range used by the application is
87 MHz – 108 MHz, as this is the FM band regulated by the authorities in the field, where
most radio stations are found and which use this type of modulation.
The difference between monophonic sound (mono) and stereophonic sound (stereo) is the number
of channels used to record and play the music/sound. Mono signals are recorded and played back
using a single audio channel, while stereo signals use two channels [30]. The audio difference is the
impression of directionality in the case of stereo sound, which gives the impression of being heard
from several directions, while mono sounds give the impression of being heard from only one
direction.
33
Fig.19 – Frequency Domain tab of application 2
34
Fig.22 – Constellation tab of application 2
- The options of each type of receiver, to listen without recording, or to listen and record the sound at
- The possibility of saving the sound in .wav format, mono or stereo, for
later listening or sound processing;
signal processing and filtering stages. The related window is activated when the
- The possibility of adjusting the reception frequency, volume and gain in dB,
for better quality reception. A higher gain leads to a reduced noise level;
- Visualization in the time domain of the audio signal, in the Time Domain tab;
- Visualization of the spectrogram of the received raw signal, in the Waterfall tab;
The block diagram that realizes the previously presented functionalities, realized in GNU Radio:
35
Fig.23 – Block diagram of application 2
- The blockRational Resamplerit has the role of a polyphase FIR filter, which has a frequency at the
input, and at the output the frequency will be that of the input multiplied by interpolation, all
divided by decimation. The interpolation and decimation parameters must have quant values
36
smallest possible. This block performs re-sampling of the signal, before and after filtering.
And the second Rational Resampler block in the schematic is configured like this:
- The blockLow Pass Filteris a low-pass filter, where parameters such as sampling
37
a FIR Type specifies the data types at the input and output of the block; Cutoff Freq is
a given by the cutoff variable, and has the value of 100 kHz; Sample Rate refers to the
a sampling frequency, and has the value of 2 MSPS; The width of the transition band
a (Transition Width) refers to the transition zone between the stop band and the
pass band and is given by the transition variable, which has a value of 1 MHz. The
transition region starts at the cutoff frequency and ends where the filter has
maximum attenuation;
a The Low Pass Filter removes the high frequencies of noise produced during
the demodulation process.
a The Quadrature Rate is 500 kHz and the audio decimation factor is
10. The quadrature rate is the sampling frequency of the complex
input signal to the baseband, and the audio decimation factor is the
factor used to re- sampling the input signal at a frequency to match
the audio's specific sampling frequency.
- The blockMultiply Constantallows adjusting the volume between the values specified by the
QT GUI Range with the identifierbook, which has values between 0 and 1, with a step of
and can be selected from a list of the most common frequencies. It's good to know
38
the fact that not all sample rates will be supported by the user's laptop
or device. For common applications, the frequency of 48 kHz is used.
- The last blockselectit allows the user to listen to the music either without recording
at the same time, or to listen and record at the same time. For the recording
a At File, specify the path of a folder and the name of a .wav file in which to
write the data;
a N Channels refers to the number of audio channels. Being a monophonic signal, the
number of channels is 1.
a Bits per Sample refers to the number of bits used to save the audio,
per sample.
- The Rational Resampler block has the same role as the monophonic receiver. The block
is configured as follows:
- The WBFM Receive PLL block has the role of demodulating an FM signal from a
broadcast station. Compared to the WBFM Receive block, it performs full stereo
demodulation. At the input to the WBFM Receive PLL block, the signal is
complex, and at its output, the signal is demodulated audio. The configuration of
40
- In addition to these basic blocks for processing the received raw signal, the
application also includes blocks for visualizing the signal, saving the
sound, converting various types of data, as well as blocks with variables.
- The first type blockselectin the schematic, positioned immediately after the RTL-
SDR source, gives the user the ability to choose the type of FM radio receiver
whose related branch to run. This choice can be made using the Receiver
Configuration menu in the interface, from which you can choose Monophonic
FM Receiver or Stereo FM Receiver;
- The blocksQT GUI Frequency Sink: this type of graphical interface allows displaying
the power spectral density of the received signal;
- The blocksQT GUI Time Sink: this block displays signals in the time domain, acting
as an oscilloscope. Each signal is represented with a different color;
- Blocks without terminals represent either variables and their values, or types of menus
to adjust or choose the value of a variable in the interface, during the execution of the
application;
- The blocksFloat to ComplexandComplex to Floatare blocks for converting one data type
to another.
Blocks in GNU Radio have a tab called Generated Code in their composition. There you can view
the code in Python language, generated for that block. Also, the code related to the entire
application can be found in the .py file generated when pressing the "Generate the flow graph"
MHz – 108 MHz, adjusting various parameters and recording sound. It also brings the differences
between mono and audio sound to the user, as well as the implementation
41
different in the GNU Radio work environment. If it is desired to use another type of device, it is
sufficient to replace the source block with another block, set the parameters and connect to
the Selector block, the input source selection being planned as further development of the
application.
modulation, but also the acquisition of sound in wav format. The application can be easily
of analog modulation and which is defined as the operation of multiplying a signal called a
the modulation of a wave by varying its amplitude, and is particularly used for the purpose of
transmitting an audio signal by combining the modulating signal with a higher frequency
Amplitude modulation is typically used in the frequency range 535 kHz – 1,705 MHz [34],
but can also be used at higher frequencies (eg hundreds of MHz) in applications such as
air control.
42
returned, for example by walkie-talkies or taxi stands. Narrowband systems typically
have lower data rates, while wideband systems support relatively high data rates.
A comparison between wideband FM and narrowband FM can also be found in the table below [33]:
greater than 1
Frequency domain
30 Hz – 15 kHz 30 Hz – 3 kHz
Modular
Bandwidth
great quality
a tabular comparison between these two types of modulation can be found below [35]:
Frequency and phase remain unchanged Frequency and phase remain unchanged
greater than 1
It has two sidebands in the spectrum It has an infinity of sidebands in the spectrum
The modulator has a simple circuit The modulator has a complex circuit
The amplitude of the carrier signal is The frequency of the carrier signal is changed
Frequency range used: 535 kHz – 1,705 Frequency range used: 87 – 108 MHz;
The quality of the received signal is poor The received signal quality is good
The graphical interface of the application can be found in the following image:
- Adjusting the frequency step for the center frequency. In addition to adjusting the step and
sweeping the spectrum with a chosen step, the frequency of interest can be entered
directly into the frequency box on the numeric keypad, then the Enter key is pressed to set
the frequency;
44
- Adjusting the degree of signal suppression, represented in the diagram by the
In addition to these functionalities made available to the user by the graphical interface, the GNU
Radio environment also offers several options, such as zooming on the graph, saving the spectrum
as an image, setting various parameters such as FFT Size, the minimum and maximum limits of the
The block diagram of the application, made in GNU Radio, looks like this:
Fig.27 – Block diagram of application 3
As can be seen, the general scheme of the application comprises two branches, separated
from the source by means of a type blockselect. This block, with the help of another block
calledQT GUI Chooserwith the identifierchooser, allows the user to choose the receiver type,
and therefore the branch from the selector output to execute. Thus, the upper branch is
intended for the AM receiver, and the lower branch is for the NBFM receiver. In addition to
these blocks are the two display blocks,QT GUI Frequency Sinkand QT GUI Waterfall Sink,
which allow the spectrum and spectrogram of the received signal to be displayed in the
At the top of the block diagram are the variables, defined with the help of several
45
The source is an Osmocom type, originally developed only for OsmoSDR hardware, and
- CCCamp 2015;
- FreeSRP.
Only some libraries are required to use these devices via the Osmocom
Source block.
The Osmocom source is configured to support the center frequency starting at 100 kHz,
which the RTL-SDR device used does not cover. In this regard, we have included a
First, the signal from the RTL-SDR source is passed through a low-pass filter to
46
The cutoff frequency chosen is 5kHz and the signal is decimated by a decimation factor of 10,
blocRational Resamplerit has the role of the polyphase FIR filter, which has a frequency at the input,
and at the output the frequency will be that of the input multiplied by interpolation, all divided by
decimation. The interpolation and decimation parameters should be as small as possible. This block
performs re-sampling of the signal after filtering. The block is configured as follows:
blocMultiply Constantallows adjusting the volume between the values specified by the QT GUI
Range with the identifierbook, which has values between 0 and 1, with a step of 0.001. These values
blocAudio Sinkallows a signal to be played, using the speakers of a laptop or PC. The
47
parameterSample Raterefers to the sampling frequency of the audio signal, and
can be selected from a list of the most common frequencies. Be aware that not all
sample rates will be supported by the user's laptop or device. For common
applications, the frequency of 48 kHz is used.
48
The cutoff frequency chosen is 10kHz and the signal is decimated by a decimation factor of 10,
Further, the signal reaches the blockSimple Squelchhas the role of suppressing the
output of the receiver, reducing it to silence, if the signal intensity falls below a certain
level (Threshold). The threshold level in dB can be selected from the interface, by the
user, it is declared as a variable under the name ofsquelchand defaults to -50 dB. The
After this block, the signal reaches the blockNBFM Receive,which demodulates the input signal
and produces at the output a signal with the sampling frequency of 48 kHz, which is the same as
the frequency of the audio signal of interest. The block is configured as follows:
blocMultiply Constantallows adjusting the volume between the values specified by the QT GUI
Range with the identifierbook, which has values between 0 and 1, with a step of 0.001. These values
Blocks in GNU Radio have a tab called Generated Code in their composition. There you can
view the generated Python code for that block. Also, the code related to the entire application
can be found in the .py file generated when pressing the "Generate the flow graph" button in
such as ground-to-air transmissions between control towers and aircraft, weather stations,
49
amateurs, taxi radio stations, walkie-talkie signals. It also offers the freedom to
Various blocks can be added to the app to make it more complex depending on the user's
interest. It should be noted that the present application is tested and stable, so including
some blocks or changing parameters in GNU Radio may lead to an unstable version.
Therefore, the application itself, as well as the GNU Radio environment, provide useful
analyzer, mono and stereo FM receiver, AM receiver and NBFM receiver, but with some
differences. Each type of receiver has the possibility to save data in wav format, with
selectable parameters.
The source type used is generic,Osmocom Source, compatible with several SDR
devices, including: RTL2832U sticks based on DBV-T tuners, RTL-TCP spectrum server,
SDRplay RSP devices, AirSpy Wideband receiver, Great Scott – HackRF devices,
RFSPace SDR-IQ , SDR-IT, NetSDR, Ettus USRP devices, and the list goes on. It should
be noted that the center frequency can be chosen from the interface in the range of 100
kHz - 6 GHz, but the application was tested only in the range of 22 MHz - 1.766 GHz,
Several types of parameters can be modified from the interface, as I will detail in
- Spectrum exploration in the range 100 kHz – 6 GHz, depending on the type of
device used;
51
- Selection of the type of receiver whose related branch in the block diagram to execute.
- Real-time visualization of the spectrum, the spectrogram and the received signal, in
- The option to save the signals in wav format, for each type of receiver. The
downside to this option is that you cannot save multiple sounds for the same
receiver, as the file will be overwritten. Also, once the application is closed, the
file must be moved to another location on the computer, or once the
application is opened again, the file will be deleted (empty) so that other new
data can be saved in that file;
- Option to choose sample rate and number of bits per sample for when using
the wav save option. The available sampling frequencies are: 16 kHz, 22.05
kHz, 32 kHz, 44.1 kHz, 48 kHz and the options for the number of bits are 8,
16, 32 and 64 bits per sample.
- Spectrum Analyzer without data record–related to the first branch afterselect from the
block diagram. In this window, the spectrum, the spectrogram and the received signal
are visualized, in the time domain, when the selected receiver type is "Spectrum
analyzer without data record", i.e. the first one in the list.
- Spectrum Analyzer with data record–related to the second branch after selectfrom
the block diagram. In this window the spectrum, the spectrogram is visualized
52
and the received signal, in the time domain, when the selected receiver type is
"Spectrum analyzer with data record", i.e. the second one in the list.
- Different type of receiver –related to the following branches after the blockselect,and in
the windows of this tab are represented the spectrum, spectrogram, signal in the time
domain, for the rest of the receivers in the list (AM, FM, NBFM).
53
Fig.34 – General block diagram of application 4 - second half
The blocks used are among those already known:Low Pass Filter, Rational
Resampler, Audio Sink,block types related to receivers, signal display blocks,
variable blocks. The configuration of the blocks is detailed in the previous
applications, which address each type of receiver. A novelty compared to
previous applications is the way we used the blockQT GUI Chooserusing the List
option. This option is valid when choosing an item from a list with more than 5
items. In this case I needed 10 options, and I configured the block like this:
Another novelty is the use of the blockOsmocom Source, which provides more flexibility to the
application, allowing the use of a wide range of SDR devices. The configuration of this block is
54
Blocks in GNU Radio have a tab called Generated Code in their composition. There you can
view the generated Python code for that block. Also, the code related to the entire application
can be found in the .py file generated when pressing the "Generate the flow graph" button in
The application allows the exploration of the spectrum in the minimum 100 kHz - maximum 6
GHz frequency range, depending on the type of SDR device used, also offering the possibility of
demodulating some frequencies, through the types of implemented receivers. The above application is
distinguished by its user-friendly interface, namely the settings that the user can adjust from the
graphical interface, explicitly named parameters, the possibility of making various adjustments, both
implemented in the program and offered by the GNU Radio development environment.
Various blocks can be added to the app to make it more complex depending on the user's
interest. It should be noted that the present application is tested and stable, so including some
blocks or changing parameters in GNU Radio (in the block diagram and not in the interface)
Therefore, the application is a suitable learning tool, suitable for applying the
knowledge learned to various subjects, but also a model for implementing the popular
This subchapter presents an application made in the Matlab development environment, an application that
it aims to process an audio signal acquired with the help of an SDR system and the
SDR# program. The audio signal is saved in .wav format and loaded into the interface
55
Fig.35 – The interface for processing an audio signal acquired with SDR
The interface includes 5 spaces for displaying graphics, a series of buttons, text input
boxes and a pop-up menu for selecting the type of filter to apply to the audio signal.
The audio signal is uploaded using the "Upload .wav original file" button,
to upload the audio file from anywhere on my computer. Next, with the functionaudioread,the
audio signal is read, and returns the data sampled inSound. The frequency at which this
Code line 190 in the image above converts the loaded two-channel stereo signal to a
mono signal consisting of a single-column matrix, i.e., a single channel. We did this
step so that we could perform various operations further on, such as convolution.
The code related to the interface and the implementation of the functionalities can be found in the
appendices of this work, under the name Dissertatie_Codrina_Lisaru.m. This file contains the functions
56
predefined by Matlab, related to the interface elements, and a function created by
me, namedaudio_signal.
This function includes an initial part, where we declared the variables and read various values of
the interface objects, such as the state of the buttons or the choice of the popup menu items.
Interface components:
- The Upload .wav original file button – allows uploading a .wav format file from anywhere on
the computer;
- The Play original sound button – plays the previously loaded audio signal;
- Original signal spectrum button – displays in the first axis system the spectrum in the
frequency domain of the previously loaded signal;
- The button Save filtered audio – gives the user the option to save the filtered audio signal in a
new .wav file, with the predefined name depending on the type of filter used; The Filter
a Filter; F cutoff (FTJ, FTS) text box in Hz: allows the user to insert the
cutoff frequency required to filter the signal using the low-pass and
high-pass filters;
a The text boxes Fcut1 and Fcut2 (FTB, FOB) in Hz: allow the user to
insert the two cutoff frequencies necessary to filter the loaded audio
signal, using the two types of filters mentioned in brackets;
characteristic of the selected filter in the last axis system. In the third and fourth axis
system, the original audio signal in the time domain and the filtered audio signal in
the time domain are displayed, so that you can notice any differences.
a Stop sound button – when pressing this button, the playback of the sound (either
original or filtered) is stopped, the button is very useful because some sounds are of
significant length and the user may not want to play them in full.
- The App info button – when you press it, a new window opens, which contains
the author's name, specialization, and the year she made the app.
57
image of background A the application maybe be found TO address:
https://previews.123rf.com/images/pavalena/pavalena1209/pavalena120900048/15389740-
light-blue-abstract-background-music-notes.jpg
and the SDR# program, signal representing a sequence from a radio broadcast, a man's
After loading the audio signal and pressing the buttons in the interface, the graphs
In the second system of axes, the spectrum of the signal can be observed after applying the
band-stop filter on the range 4000Hz – 18760Hz. I chose to leave out the frequencies above
4000Hz because the spectrum of the human voice is sufficiently covered by the components
up to 4000Hz, according to the specialized literature. The result is a voice signal with less
58
noise, but with a slightly reduced quality, due to the removal of high frequency components,
but the message is intelligible and the background noise is significantly reduced.
The last axis system shows, in blue, the ideal characteristic of the chosen filter, and in
red, the actual characteristic. The characteristics and implementation of each type of
Within the code, the implementation of filters is done on the branches of a structureswitch,
which, depending on the type of filter chosen in the interface, uses a certain approach.
To be able to implement filters with finite impulse response (FIR), it is necessary to calculate the coefficients of
To implementlow pass filter, we used the following formula to calculate the filter
coefficients:
Thus, in the image below you can find the code sequence in which we implemented the filter, the
functionwheyeyassign ho the matrix of N columns and a single row, which has the value 0 in all
positions. In functionforce,n is calculated according to the formula for the coefficients. function
sync In Matlab it has the value of π built in, so it no longer needs to be written in the formula.
To filter the original signal, I used the functionconv,called convolution, this being the way
to filter signals in the time domain. So, we performed the convolution between two
discrete signals, vizh[n]–filter coefficients, and the variableSound, which represents the
input signal. The relation by which the convolution operation is performed in the case of
60
In casehigh pass filter,the formula used to calculate the coefficients is as follows:
The code sequence for implementing the filter, and the graphical representation of the filter
For calculating the coefficientsthe bandpass filter, we used the following formula:
61
The code sequence for implementing the filter, and the graphical representation of the filter
following:
Also, the code to implement the filter, and the graphical representation of the
62
Fig.40 - FOB filter implementation and filter characteristic
- Choosing the filter of interest, knowing N – the number of coefficients, the sampling frequency Fs,
- The use of coefficients for filtering the signal, according to the general formula of the convolution
product between the two signals, namely the signal of interest and the coefficients.
63
2.4.2. Application 6. Types of modulation
The present application aims to support students in learning and studying the
types of modulations used in a multitude of fields. The application is built so that the
most popular types of modulation can be experienced by changing the parameters and
viewing the various types of signals (modulator, carrier, modulated, spectrum). The
application and this chapter are not directly related to SDR systems, but provide a range
of knowledge used both in the acquisition of signals with SDR systems and in the
analysis of these signals and the clearer understanding of the concepts used by analog
The types of modulation used in the implementation of the application are those in the scheme
below [36], and next follows a brief description of each type of modulation with examples of
situations in which they are used. Also, the formulas by which we implemented each type of
Amplitude modulation is essentially the modulation of a wave by varying its amplitude, and
is particularly used for the purpose of transmitting an audio signal by combining the
modulating signal with a higher frequency carrier radio signal. Amplitude modulation is
64
communication with aircraft, radio transceivers, modems for computers (digital
https://commons.wikimedia.org/w/index.php?curid=9820131
commons.wikimedia.org/w/index.php?curid=68824022
65
PM – Phase Modulation–is a type of modulation used to condition
communication signals for transmissions. It encodes an information signal in the
form of instantaneous phase variations of a carrier signal. Baseline modulation,
along with frequency modulation, are the main forms of angle modulation. Phase
modulation is commonly used in radio transmission and as an integral part of
many digital transmission coding schemes that underlie technologies such as Wi-
Fi, GSM and satellite television. It is also used in signal and waveform generation
in digital synthesizers [39].
https://commons.wikimedia.org/w/index.php?curid=50046376
66
Applications of this type of modulation include: low frequency RF
applications, home automation devices, tire pressure monitoring systems,
fiber optic data transmission.
https://commons.wikimedia.org/w/index.php?curid=635074
phase of the carrier signal is changed by varying the sin and cos inputs at a given time.
Depending on the phases at which the signal changes, there are two types of FSK [40]:
- BPSK – Binary PSK – where the sinusoidal carrier signal has two phase changes (0 and
180 degrees);
67
Fig.47 – BPSK modulation
- QPSK – Quadrature PSK – in which the sinusoidal carrier signal has four phase
changes (0, 90, 180, 270 degrees), but can be extended to 8 or 16 values [9].
This type of modulation is used in wireless LAN networks, Bluetooth communication, contactless
modulation in the transmission of radio signals, being more immune to noise and occupying less
signals, or two bit streams, into a single channel. Two carrier signals, out of phase by 90
degrees, are modulated and combined. As a result of the 90 degree phase shift, these
signals are in quadrature. One signal is called the in-phase signal, or I, and the other is
the quadrature signal, that is, Q [47][9]. The resulting signal is the combination of the two
68
PAM – Pulse-Amplitude Modulation-is a type of modulation to which the message
information is encoded in the amplitude of a series of pulses, so the amplitude of the pulses
is varied. The pulse-modulated signal follows the amplitude of the original signal [42].
Uses of PAM include: USB technology – USB 2.0 version uses PAM, some
versions of Ethernet, GDDR6X and GDDR7 based video cards, PCI Express
protocol, digital television [43].
PWM – Pulse Width Modulation–also known asPulse Duration Modulationis a type of
modulation in which the duration or pulse width of the carrier signal varies in proportion to
The analog method of generating a PWM signal uses a sawtooth signal as the
carrier signal and a sinusoidal signal as the modulating signal. These signals
represent the inputs of a comparator. The result is a PWM signal as seen in
the image below:
69
Fig.50 – PWM modulation
https://openlabpro.com/wp-content/uploads/2016/10/PWM-generation-analog-circuits.png
The duty cycle of a PWM signal represents what percentage of a period that signal is
commons.wikimedia.org/w/index.php?curid=72876123
PWM signals are often used to regulate the speed of motors, by varying the
PPM – Pulse Position Modulation–is a modulation technique that allows the position of the
pulses to vary depending on the amplitude of the sampled modulating signal. The amplitude and
width of the pulses are constant and only the position of the pulses varies. As the amplitude of the
70
Fig.52 – Generating the PPM signal
converted to digital form for use in digital transmission systems. First, the analog signal is
sampled, then the amplitude of each sample is approximated to the nearest quantization
level. This procedure allows representing the time domain and the amplitude in a discrete
manner [45]. So the major steps to follow in PCM are sampling, quantization, and finally
signal coding, which converts the quantized signal into binary codes. It should be noted
that the coded signal is decoded upon reception to access the original message. The
71
PCM modulation is used to digitize all forms of analog signal such as video,
music, voice. It is the standard format for digital audio signals for PCs, CDs,
DVDs, but also by digital telephone systems.
- Saving the image in png or pdf format, an option provided by the Matlab
development environment;
72
- Help button (Help!) which provides the user with a short theoretical breviary about each
type of modulation available in the application, and commands that can be used
in Matlab;
depending on the kind of carrier signal (analog or digital) and the resulting data.
73
Fig. 57 – Phase Modulation
Fig.58 – Amplitude-Shift Keying
74
Fig.60 – Phase-Shift Keying - Binary
Fig.61 – Pulse-Amplitude Modulation
75
Fig.63 – Pulse Position Modulation
Fig. 64 – Pulse Code Modulation
76
Fig.66 – Help! button
77
Chapter 3. CONCLUSIONS
- familiarization with the working environments necessary to control the tool, such as GNU
- analysis of acquired signals using various applications made using Matlab and
GNU Radio;
- presentation of the usefulness of the applications made and the possibility of using them in various
situations.
The applications made explore the capabilities of the RTL-SDR device, but they can be extended
and much more varied with the help of other software programs available on the Internet.
All applications have been tested to verify and confirm their functionality under
various conditions.
78
- Application 3: AM/NBFM receiver – selecting the type of receiver, adjusting the volume,
the center frequency, the displayed frequency band, the gain (Gain), the frequency
step, viewing the spectrum and the spectrogram of the received signal;
three applications, with the possibility of using other devices besides the RTL-SDR;
- Application 6: Types of modulation – setting the parameters and viewing the signals
that make up the main types of modulation used in communications and
electronics/ computers.
Since the RTL-SDR device only allows the reception of signals, messages can only be
transmitted with another device and with other block schemes, related to a transmitter.
So applications using RTL-SDR only allow reception of AM, FM – Mono, Stereo, NBFM
signal, signal that can be used for signal analysis, audio recordings, audio signal
Therefore, the applications made can be used, first of all, in the academic
environment, for learning by testing, but also by amateurs, to explore the
frequency bands received by the RTL-SDR.
79
Appendices
[1] Bechet P., Software Defined Radio Technology - course in the Radio Communications discipline
[2] Costa A., Lima J., Antunes L., Spectrum analyzer with USRP, GNU Radio and Matlab, January
23, 2009
[3] Gilbert J., Accessing the RF Spectrum with GNU Radio, GOMACTech, March 25, 2019
[4] Harianto BB, Rifai M., Irfansyah A., Suprapto Y., Design Indoor FM Communication Based on
SDR and GNU Radio Using Validated Spectrum Analyzer, Journal os Physics: Conference Series,
ICIASGA 2020
[5] Kempter R., From Analog to Software Defined: A History of the Radio, The
[6] Laufer C., The Hobbyist's Guide to the RTL-SDR: Really Cheap Software Defined Radio, 2014
[7] Machado-Fernandez JR, Software Defined Radio: Basic Principles and Applications,
[8] Mihu PI, Neghină C., Digital Signal Processing: Didactic Applications in Matlab, "Lucian
[9] Muntean H., Course notes – Interferences and disturbances, Sibiu, 2022
[10] Valerio D., Open Source Software-Defined Radio: A survey on GNU Radio and its
100
[11]https://blog.bliley.com/10-popular-software-defined-radios-sdr
[12]https://www.rfpage.com/what-are-the-components-of-software-defined-radio-and-itsapplications/
[13]https://www.researchdive.com/blog/all-you-need-to-know-about-software-defined-radio
[14]https://wiki.gnuradio.org/index.php?title=What_Is_GNU_Radio
[15]https://www.rfwireless-world.com/Terminology/Advantages-and-Disadvantages-of-
SDR-Software-Defined-Radio.html
[16]https://en.wikipedia.org/wiki/Digital_signal
[17]https://content.redpitaya.com/blog/why-sdr-software-defined-radio
[18]https://en.wikipedia.org/wiki/Software-defined_radio
[19]https://conference.hitb.org/hitblockdown002/materials/D1%20VIRTUAL%20LAB%20-
%20Signal%20Processing%20&%20GNU%20Radio%20-%20Ateet%20Kumar.pdf
[20]https://ro.wikipedia.org/wiki/E%C8%99antionare_(signal_processing)
[21]https://en.wikipedia.org/wiki/MATLAB
[22]https://guides.libraries.uc.edu/c.php?g=461109&p=3152738
[23]https://www.rfwireless-world.com/Terminology/Advantages-and-Disadvantages-of-
MATLAB.html#:~:text=Drawbacks%20or%20disadvantages%20of%20MATLAB,- Following%20are
%20amount%20of%20memory .
[24]https://www.javatpoint.com/advantages-and-disadvantages-of-matlab
[25]https://www.mathworks.com/discovery/what-
ismatlab.html#:~:text=Millions%20of%20engineers%20and%20scientists,computational%20finance%
2C%20and%20computational%20biology .
[26]https://www.everythingrf.com/community/what-is-a-software-defined-radio
[27]https://www.pe0sat.vgnet.nl/sdr/sdrsoftware/sdrsharp/ #:~:text=SDR
%23%20(SDRSharp),get%20hands%20into%20DSP%20techniques .
[28]https://www.rtl-sdr.com/sdrsharp-users-guide/
101
[29]https://zadig.akeo.ie/
[30]https://www.blackghostaudio.com/blog/mono-vs-stereo-sound-the-difference-explained-
withaudio-
examples#:~:text=The%20difference%20between%20monophonic%20(mono,back%20using%20two
%20audio%20channels .
[31]https://www.elforum.info/topic/140046-rtl-sdr-receptii-in-hf-si-vlf/
[32]https://jeremyclark.ca/wp/telecom/rtl-sdr-for-am-on-gnu-radio/
[33]https://electronicspost.com/explain-the-difference-between-narrowband-fm-and-wideband-fm/
[34]https://www.heavy.ai/technical-glossary/
frequencymodulation#:~:text=Amplitude%20Modulation%20index%20ranges%20from,signals%20with%20po
or%20sound%20quality .
[35]https://www.geeksforgeeks.org/difference-between-amplitude-modulation-and-
frequencymodulation/
[36]https://en.wikipedia.org/wiki/Modulation
[37]https://en.wikipedia.org/wiki/Amplitude_modulation#
[38]https://en.wikipedia.org/wiki/Frequency_modulation#
[39]https://en.wikipedia.org/wiki/Phase_modulation#
[40]https://en.wikipedia.org/wiki/Frequency-shift_keying
[41]https://www.tutorialspoint.com/principles_of_communication/principles_of_communication_digi
tal_modulation_techniques.htm#
[42]https://www.tutorialspoint.com/principles_of_communication/principles_of_communication_anal
og_pulse_modulation.htm
[43]https://en.wikipedia.org/wiki/Pulse-amplitude_modulation
[44]https://electronicscoach.com/pulse-position-modulation.html
[45]https://electronicscoach.com/pulse-code-modulation.html
[46]https://www.geeksforgeeks.org/difference-between-pulse-code-modulation-pcm-and-
deltamodulation-dm/
102
[47]https://ro.fmuser.net/content/?7549.html#:~:text=%23%20What%20is%20QAM%2C%20modular
[48]https://dsp.stackexchange.com/questions/63858/how-we-can-quantize-a-sampled-
signal-inmatlab
[49]https://electronicaplicata.wordpress.com/
[50]https://compatibilitateelectromagnetica.wordpress.com/
[51]https://github.com/codrinalisaru/GNURadio-Spectrum-Analyzer
[52]https://github.com/codrinalisaru/GNURadio-FM-Mono-and-Stereo-receiver
[53]https://github.com/codrinalisaru/GNURadio-Spectrum-analyzer-with-data-save
[54]https://github.com/codrinalisaru/GNURadio-AM-NBFM-Receiver
[55]https://github.com/codrinalisaru/Modulation_types
[56]https://github.com/codrinalisaru/Audio-signal-processing
103