Software Libre para Formas de Onda 5G
Software Libre para Formas de Onda 5G
Formato de Publicación
An Open de la for
Source Project Escuela Técnica
Learning 5G
Superior de Ingeniería
Waveforms at an Electrical Engineering
Graduate Level
Autor:Autor: Guillermo
F. Javier Palomino Lozano
Payán Somet
Tutor:Tutor: Juan Murillo
Juan José AntonioFuentes
Becerra González
Dep.
Dep. de Teoría
Teoría de la de la Señal
Señal y Comunicaciones
y Comunicaciones
Escuela
Escuela Técnica
Técnica Superior
Superior de Ingeniería
de Ingeniería
Universidad
Universidad de Sevilla
de Sevilla
Sevilla, 2020
Sevilla, 2013
Trabajo Fin de Máster
Máster en Ingeniería de Telecomunicación
Autor:
Tutor:
El tribunal nombrado para juzgar el trabajo arriba indicado, compuesto por los siguientes profesores:
Presidente:
Vocal/es:
Secretario:
Fecha:
Acknowledgements
C on este documento termina mi formación educativa en un campo tan apasionante como es la Ingeniería
de Telecomunicaciones. Atrás quedan 6 hermosos años, en los que he ido recorriendo un camino
fascinante descubriendo y aprendiendo de este mundo. Y te vienen a la mente muchísimas personas que, en
mayor o menor medida, te han ayudado o han formado parte de esta aventura.
En primer lugar, los profesores. Gracias a todos y cada uno de ellos, que con su esfuerzo consiguen que
año tras año muchas personas salgan formadas como ingenieros, la profesión más bonita del mundo. Mención
especial merece el tutor de este trabajo, Juan Antonio, que siempre ha estado ahí al pie del cañón. Siempre te
estaré agradecido por todo tu empeño y dedicación a lo largo de toda mi formación académica. También me
gustaría agradecer a la profesora María José Madero, que colaboró en la redacción del artículo asociado a
este trabajo, y también por su extraordinaria docencia durante los últimos años.
En segundo lugar, los compañeros. Este proceso no solo te forma para poder ejercer tu profesión, también te
forma para ser mejor persona. Y gran culpa de ello depende de la gente de la que te rodeas. Y, afortunadamente,
me he sentido muy bien rodeado durante estos 6 años. Compañeros de clase convertidos en grandes amigos
que se convertirán en compañeros de profesión. La unión hace la fuerza, creo que ha quedado más que
demostrado. El Team Polinino nunca morirá.
En tercer lugar, merece mención especial este último año de mi vida, donde gracias a la beca Erasmus
he podido vivir en el extranjero el mejor año de mi vida. Sin duda, la experiencia vivida allí, así como la
formación recibida en una universidad extranjera, una vez más han servido para crecer aún más como futuro
ingeniero y como persona. Gracias a todos y cada uno de vosotros, chicxs.
Por último, la familia. Esos que siempre están ahí y nunca se irán, que te agarran cuando te caes, que
te echan una mano cuando todo parece desmoronarse. Gracias papás por educarnos tanto a mí como a mi
hermana en unos valores que quizá no entendimos de pequeño, pero que sin embargo ahora sí que entendemos
e intentaremos transmitir a las futuras generaciones: educación y respeto. Y gracias a ti, Sara, por entrar en
mi mundo hace ya más de 7 años y hacerme la persona más feliz del mundo.
Mi etapa educativa finaliza en un momento de muchísima incertidumbre, en la que nuestras vidas se han
visto alteradas en los últimos meses de forma drástica, marcadas por la pandemia COVID-19. Habrá cosas
que nunca volverán a ser como antes, pero la ilusión y motivación permanecerán igual que el primer día.
THE END.
I
Resumen
III
Abstract
T his paper describes the implementation of a free and open-source software for 5G-NR waveform gen-
eration. Learning digital communication technologies skills requires experience and the students often
demand more practical contents in order to understand the basic concepts of their courses. Linked to this,
the commercial development of the fifth generation wireless system (5G) started in 2020. 5G aims to be a
revolutionary wireless technology in terms of latency, data rates, energy efficiency and massive communica-
tion. Digital Communication students must know how 5G works and, therefore, they must study its physical
layer and the system design challenges that exist in this technology. The presented tool is contextualized in
Engineering curricula, more precisely in a program named Electrical and Computer engineering. This tool
developed will also be helpful to researchers that will be able to use 5G-NR waveforms for their projects.
V
Summarized contents
Resumen III
Abstract V
1 Introduction 1
1.1 Scope and challenges 2
1.2 Planning 3
1.3 Structure of this work 4
1.4 Software employed 5
VII
VIII Summarized contents
A.1 Simulation script that uses the toolbox presented in this work 33
A.2 Main 5G-NR toolbox script for waveform generation 37
A.3 Some other util functions 44
A.4 Extra code for some figures generation 57
List of Figures 61
List of Tables 63
List of Codes 65
Bibliography 67
Contents
Resumen III
Abstract V
Summarized contents VII
Abbreviations and Acronyms XI
1 Introduction 1
1.1 Scope and challenges 2
1.2 Planning 3
1.3 Structure of this work 4
1.4 Software employed 5
IX
X Contents
List of Figures 61
List of Tables 63
List of Codes 65
Bibliography 67
Abbreviations and Acronyms
XI
1 Introduction
Why should I try to make you believe the things I believe in?
M obile communications have redefined the relationship between human beings in the last 40 years
in terms of society and technology. Everything started in 1973 when Martin Cooper (a Motorola
executive) made the first phone call ever. At that moment a race for bringing this new technology to the user
market started, and it meant that around 1980 the first generation of mobile communication emerged. This
very first system only allowed voice serviced but, for the first time in history, allowed ordinary people to
make phone calls to every part of the world.
The second generation of mobile communication (2G) came out in the first years of the 1990s. But there
was a lack of a unified system for serving calls all over the world. One of the most famous systems was the
Global System for Mobile Communication (GSM) that was developed by some European countries. GSM
dominated the implementation of 2G because it spread to other non-European countries and it is considered
the first global system for mobile communication. 2G was mainly designed for serving voice calls but it
included digital transmission to provided limited data services.
People started to use a cell phone in their daily lives so it was necessary to introduce a new generation.
In early 2000 the third generation of mobile communication (3G) was born, with the main difference that
now it uses packet switching instead of circuit switching for data transmission. This technology was known
as High-Speed Packet Access (HSPA) [GMB, 2006]. Additionally, a new core network architecture was
completely designed, called Universal Mobile Telecommunications System (UMTS), and the channel access
technique used was Code-Division Multiple Access (CDMA). Therefore, a big step of quality was taken
and users observed how data rates increased. A new era had just begun, and users started to connect to the
Internet with their cellphones.
The fourth generation (4G) was deployed in 2013 and went one step further providing not only higher data
rates but also more devices connected. 4G is a technology that understands that the number of devices in
the society is growing exponentially and therefore the services that those devices can offer are more than
just calls and messages. Cellphones are now smartphones, and they demand a stable Internet connection for
video streaming, social media, augmented reality, etc. This generation involves the Long Term Evolution
(LTE) technology and the channel access is Orthogonal Frequency Division Multiplexing (OFDM).
Almost half a century after Martin Cooper made the first call, the fifth generation (5G) wireless sys-
tem deployment is starting. A summarized evolution of the different generations of mobile communica-
tions is shown in Fig. 1.1. But 5G is not just an upgrade of last generations of mobile communication
[Gupta and Jha, 2015, Ghosh et al., 2019]. Far from being only an evolution of the latest generation wireless
technology, 5G is a system with new services capabilities that expect to meet the demands imposed by the
users in the coming years. According to [Cis, 2020], by 2023 a 66% of the population will have Internet
access —up from 51% in 2018— and the 29.3 billion devices connected to this global network will represent
more than thrice the global population. Additionally, there will be an increase in the number of devices in
machine-to-machine (M2M) communication, growing from 33% of the total devices in 2018 to 50% by
1
2 Chapter 1. Introduction
2023. The increment in data rates and the number of connected devices to legacy mobile generations pose a
challenge to standards that are fulfilled with 5G [Ijaz et al., 2016, Henry et al., 2020].
After initial 5G launches in 2019, it is expected that commercial telecommunication companies start to offer
5G connection in most of their territory in the following years. The key for a successful technology is in its
process of standardization that must allow interoperability between infrastructure and devices from different
companies. The specifications of the new standard have been created by the Third-Generation Partnership
Project (3GPP), as they did with previous cellular technologies such as Universal Mobile Telecommunica-
tions System (UMTS) and Long-Term Evolution (LTE) [ROA, 2020]. 3GPP is following the International
Telecommunications Union - Radio communications sector (ITU-R) guidelines, submitting a candidate
technology that will be evaluated following the International Mobile Telecommunications 2020 (IMT-2020)
requirements [Marcus, 2015]. Taking into account the necessities of the society today, IMT-2020 specified
three use case scenarios [ITU-R, 2015]:
• Enhanced mobile broadband (eMBB): Requirement of high data rates across a wide coverage area.
Since the end-user data-rate demand is continuously increasing, higher frequency deployment is
particularly suitable for dedicating more bandwidth for the transmission.
• Ultra-reliable and low-latency communications (URLLC): This case is considered for scenarios where
latency requirement is crucial. Additionally, very high availability and reliability must be guaranteed.
Examples of scenarios that cover this situation are those related to autonomous driving and automatic
control.
• Massive machine-type communications (mMTC): services that require a large number of entities
connected simultaneously. These low-cost devices such as sensors or actuators consume ultra-low
power. Their requirements also include ultra-low latency, high reliability, and availability.
This work presents a free and open-source software (FOSS) platform for learning 5G New Radio (5G
NR), the radio access technology of 5G, that is intended for its use at undergraduate and graduate-level
courses. Previous studies have presented FOSS frameworks for 5G deployment, but focusing on other
aspects, such as a techno-economic assessment [Gomes et al., 2018] or communication between networks
1.2 Planning 3
[Lin et al., 2017, Kaltenberger et al., 2019, Salama and Elmesalawy, 2019]. This software is developed in
the Python programming language and it is publicly available within SciPy, the Python-based ecosystem of
open-source software that is a common tool for laboratory activities at engineering programs, and Codeocean,
a research collaboration platform by IEEE.
The objectives of this work can be enumerated as follow:
1. Study the origin of the mobile communication systems and how they have progressed during the last
decades, highlighting in the most recent technologies (LTE and 5G NR).
2. Try to know better about how 5G-NR waveforms are generated and how to choose the parameters
needed for the transmission efficiency.
3. Develop a FOSS platform for learning 5G-NR waveforms using Python programming language.
4. Learn which are the most important figures of merit in 5G NR and try to understand which values are
considered as admissible parameters in this technology.
5. Provide an on-line tool for future students that helps them to understand how 5G NR works.
6. Bring a closed-box package that generates 5G-NR signals that researchers and users, in general, can
use to develop their simulations and experiments.
1.2 Planning
Since this works consists of a real project that is going to be implemented, it was considered to create a Gantt
chart to schedule and define all the tasks that had to be performed. The fact of creating this chart was helpful
because it allowed me to separate tasks, and it was also helpful to the supervisor, that knew in every moment
how was the project status. The Gantt chart is represented in Fig. 1.2. It is possible to identify two different
groups of tasks. One called software development and another one called documentation and publication
then all the documentation and publication process. All tasks are explained in detail next:
• Software development.
– Problem definition. This part consisted of some meetings where the project supervisor explained
to the student the problem they had and the reasons why they wanted to develop a platform like
this.
– 5G-NR readings. It is true that the student had some previous knowledge in 5G NR but it was
necessary to read some books to get background knowledge of how exactly 5G-NR standardization
process is doing. Once all this knowledge was gotten, I was ready to start coding.
– Toolbox implementation. This task is the main one of this part, where all implementation is
done taking more than two months. This task was coordinated with the next one, which is the
verification and simulation process. As the reader can think, the verification process will return
modifications in the toolbox: that is the reason why both share space in time.
– Verification and simulations. Once most of the tool is developed, it is convenient to start with
the simulations that will be explained in the following chapters. Additionally, some tests were
performed to verify the system developed.
• Documentation and publication.
– IEEE Access paper preparation. It was convenient to write a paper explaining the tool per-
formed and the impact it will have on Electrical Engineering students. Therefore, a task was
defined, whose objectives were to start explaining and defining the software.
– Pypi package preparation. Additionally, the tool was uploaded to the Pypi package. It needs
some modifications regarding the structure and some files that must be defined.
– Codeocean capsule preparation. Doing the same way, the purpose of this task is to adapt the
tool to the Codeocean format.
4 Chapter 1. Introduction
– Thesis elaboration. Finally, this project finishes with the thesis elaboration, that is this document
that you are reading. The thesis elaboration includes a defense with a presentation that must be
also prepared in these tasks.
WEEKS: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
1 Software development
This thesis is organized into four chapters, where the first one is the one you are reading now, and it is an
introduction for the rest of the work. As you can understand, this first chapter is useful for the reader in terms
of motivation and understanding. The rest of this is organized in three chapters, very different from each
other:
• Chapter 2: 5G New Radio overview. This second chapter presents an overview of 5G-NR technology
on which this project is based. We will motivate the use of numerology, key for considerate several
usage scenarios. A brief recap of how OFDM works is also included here, and how 5G-NR adapt
OFDM for their transmissions. Signal generation, both frequency and time domain is also considered
here. This chapter finishes with some necessary definitions that everyone who works with 5G NR
should be familiar with.
• Chapter 3: design of the proposed tool. The complete description of the designed tool is introduced
in this chapter. The design is organized in seven different blocks: random data generator, modulator,
oversampling, Inverse Fast-Fourier Transform (IFFT), Cyclic Prefix, Peak clipping, and Spectrum
shaping filter. Every block is explained in detail in a mathematical way, related at the same time with
the code that has been developed. This chapter is the key to the whole thesis and it is a basic one that
the reader must understand before reading the next one, that is where all simulations and results are
presented.
• Chapter 4: results and discussions. Once the tool has been completely explained, the next step is to
present all the simulations that have been carried out and the results that are extracted after that. The
tool presented here allows a lot of functionalities, therefore a variety of different simulations may be
performed. The motivation for creating new simulations is also explained here. This chapter ends with
some future lines that could continue the work done here and also some conclusions.
1.4 Software employed 5
For the platform implementation, the chosen programming language was Python. The reasons why Python
was selected are explained next, but it is also important to know that the author has already some experience
with this programming language. Hence, most of the work is to focus on developing the tool itself and not
learning the programming language. However, there is always something new that must be learned, like
new libraries or some code techniques that the developer must understand and therefore spend some time on
learning those tasks. In any way, some of the Python features that are helpful for this particular project are
[Oliphant, 2007, Fangohr, 2004, Ozgur et al., 2017]:
• It is a FOSS, so there is an active community of developers continuously creating projects that users can
employ for their activities. Hence, it helps to reduce development costs significantly. It is commonly
known that Python has strengthened the past years. If you go search in Google which are the most
famous programming languages Python will be for sure the top 3 in each of them.
• There are a large available number of libraries that help to optimize the code. Some of the most
important libraries and packages for signal processing used in this project are: Numpy, that pro-
vides support for matrices and vectors enabling efficient implementation in a high-level language
[van der Walt et al., 2011]; Matplotlib, a data visualization package with a graphical interface similar
to the Matlab programming language that provides high-quality output in many formats, including
portable document format (PDF), encapsulated postscript (EPS), and portable network graphics (PNG)
[Ari and Ustazhanov, 2014]; and SciPy, more for a general purpose on scientific and technical comput-
ing [Oliphant, 2004]. The latter is part of the Numpy project.
• The Python Package Index (PyPi) is the official software repository for Python, where hundreds of
thousands of developers upload their packages. Users can easily download, install a package, and
add them to their projects. Precisely, this project is uploaded to the PyPi, so it is easy to install and
download for anyone.
• Users can run external applications with Python, as well as embed Python into another one. Conse-
quently, the abstraction level is increased. As an example, in this project, an application developed in
Matlab located in an external server is run.
To put it briefly, Python is one of the most important programming languages in the world of today, and it
also applies in mobile communication where every day more and more projects are developed in Python
because of its robustness.
2 5G New Radio Overview
2.1 Motivation
T he purpose of this second chapter is to give a 5G background before start commenting on how devel-
opment tool has been designed. Our starting point is the fourth generation of mobile communication,
LTE. One reason for doing that is that both are developed by the same organization, 3GPP. Hence, 5G NR
can be considered as an upgrade of LTE in terms of radio access, providing the following benefits:
• Lower latency, that allows new scenarios.
• It is possible to exploit higher frequencies, which is directly related to the use of more spectrum for
getting more data rates.
• Researchers have focused on what is known as ultra-lean design. It improves network energy efficiency,
managing the transmissions in a way that the "always-on" transmissions are minimized, according to
an Ericsson report [Zaidi, 2017]. This technique is without any doubt an advantage because of two
reasons: first, it is better for a sustainable society and second, it reduces operational expenses.
• 5G NR is prepared for forwarding compatibility, for future use cases and technologies.
• If we have to describe 5G-NR technology with one word, it is clear: flexibility. It will be mentioned
during all the chapters but 5G NR must address all of the different use cases already mentioned in the
last chapter (eMBB, mMTC, URLLC), so a range of carrier frequencies, order modulation and, in
general, different transmission schemes must be defined dynamically. The software that is presented in
this project covers most of these aspects, see next chapter for further details.
Following the same procedure which was done with the development of LTE, orthogonal frequency division
multiplexing (OFDM) was chosen as the waveform for 5G-NR transmissions [Guan et al., 2017]. OFDM is
primarily chosen due to its spectrum efficiency, relative immunity to selective fading, and simple channel
equalization. Additionally, it is also easy to exploit both the time and frequency domains. OFDM allows
dividing the available bandwidth into parallel subchannels that are called subcarriers. Some of the advantages
of using OFDM include:
• No equalization of delay spread is needed. As a consequence, the OFDM received symbols does not
experience any ISI.
7
8 Chapter 2. 5G New Radio Overview
• It is a modulation that is robust to selective fading. The channel is divided into orthogonal signals: a
selective fading is therefore converted into a flat fading for one subcarrier.
• High spectral efficiency. The subcarriers are close to each other which is good for spectral efficiency.
But OFDM has also some disadvantages, such as high Peak to Average Power Ratio (PAPR), which is
defined as the ratio between the peak power and the average power of a signal, commonly expressed in
decibels. As a consequence of a high PAPR, there will be a high dynamic range, therefore a highly linear
power amplification will be needed. Amplifiers with a high dynamic range usually are power inefficient.
Another technique commonly used is to reduce PAPR using peak clipping techniques. This one is the one
that is implemented in this project. Another disadvantage of OFDM is that it is sensitive to carrier frequency
offset, that arises a phenomenon known as Intercarrier Interference (ICI), that deteriorates the quality of the
transmission.
The physical layer designed in 5G NR allows OFDM for both the downlink and uplink. Additionally,
discrete Fourier transform (DFT) precoded OFDM can be used as a waveform in the uplink due to its
efficiency in energy-limited scenarios. According to [Truong et al., 2014], the energy consumption of the
power amplifier may be reduced by a factor of two. But the use of DFT-precoded OFDM also has some
drawbacks. To give an example, spatial multiplexing becomes more complex, and also using this scheme the
possibility of allocating resources in non-contiguous frequencies is lost, so it implies scheduling restrictions
as well as losing frequency diversity.
2.3 Numerology
In a 5G-NR context, the term numerology is associated to the design parameters that can be defined for a
specific waveform. In LTE, there is only one type of subcarrier spacing of 15 kHz. In 5G this is completely
different since one of the main challenges is to support different use case scenarios [Osseiran et al., 2014]
therefore it is not possible to have just one numerology. A scalable numerology is needed. As a result, a
completely new one is defined and it is shown in Table 2.1. To give an explanation of how numerology works
in 5G NR, it is convenient to discuss regarding the definition of Discrete Fourier Transform operator (DFT).
Waveform generation in 5G NR is based on OFDM, which is straightforward related to the DFT, defined as
1 N−1
X(k) = ∑ x(n)e− j2πkn/N ,
N k=0
(2.1)
where x(n) is the signal represented in a sequence of N complex number in discrete-time domain, and X(k)
the output of the DFT operation, also a sequence of complex numbers. It is also possible to define the inverse
operation, the Inverse Discrete Fourier Transform (IDFT),
1 N−1
x(n) = ∑ X(k)e j2πkn/N . (2.2)
N n=0
2.4 Duplex schemes 9
The most common algorithm that computes the DFT and the IDFT is called the fast Fourier Transform
(FFT) and the inverse Fourier Transform (IFFT) respectively, and they are widely used in 5G-NR waveform
generation. Each subcarrier is modulated depending on one transmitted symbol, i.e., the modulation is
performed in parallel, as it is shown on Fig. 3.3. It means that every Tu seconds an IFFT with FFTsize points
is performed. The sampling frequency Fs is defined as follows,
Fs = FFTsize · ∆ f , (2.3)
where FFTsize is the FFT size, that must be power of two in order to be computationally efficient, and ∆ f is
the subcarrier spacing, whose expression is
∆ f = 2µ · 15, (2.4)
where µ ∈ [0,4] is the parameter that defines the numerology. Available configurations are shown in Table
2.1.
After the IFFT operation, the cyclic prefix (CP) is added. In LTE, two types of CP are specified: normal
CP (NCP) and extended CP (ECP). In practice, ECP was not used, so 5G only defines a NCP except for
∆ f = 60 kHz, situation in which both types of CP may be used, so that a CP similar to the ∆ f = 15 KHz case
can be maintained. Following the 3GPP standard [ETS, 2018], the length of the CP, in samples, is defined as
follows,
−µ
512κ · 2
ECP
NCP = 144κ · 2−µ + 16κ NCP for symbol 0 (2.5)
µ
where κ is a constant that relates LTE and 5G basic unit times and takes a value of κ = 64. Note that the first
symbol of every 7 symbols exhibits an extended duration in time. The CP duration follows
0 Tu
NCP = NCP · , (2.7)
Ts
0
where NCP is the new length of the CP after the adjustment. Once the numerology has been defined, the next
step is to create the time structure of the signal. In 5G the transmission schemes are defined in two domains:
time domain and frequency domain. Both are reviewed next.
One of the keys of the wireless systems is how to maintain the communication link in both directions.
Spectrum flexibility is one of the features of NR. It ensures separation of uplink and downlink in frequency
and/or time domains. Duplex schemes defined in NR are Time-Division Duplex (TDD), Frequency-Division
Duplex (FDD), and Half-Duplex FDD. All of them are briefly explained next.
It uses only a single frequency for transmission and reception. Hence, there is not exist and overlap-
ping between uplink and downlink transmissions. What is more, NR uses what is called dynamic TDD
10 Chapter 2. 5G New Radio Overview
[Dahlman et al., 2018]. Dynamic TDD ensures the system to dynamically allocate resources for uplink or
downlink depending on the demand in a certain moment. It means that it is easy to adjust the capacity in
either direction. It is useful in small-cell and isolated cell scenarios. However, for large distances it is not a
good technique: a guard period is added to solves the propagation time issues.
It requires one channel for uplink transmissions and another for downlink transmissions. Nevertheless, both
links can be transmitted at the same time. If the capacity must be adjusted, it is possible to re-allocate
channels. This technique solves the problem of the period guard but the complexity is higher (duplex-filters
must be added). Therefore, the costs increase. That is the reason why another duplex scheme is introduced.
In this case, the device uses different frequencies for uplink and downlink and they do not transmit at the
same time. This is a simplified technique that reduces device costs, for cases where there are no duplex-filters.
Since the devices cannot transmit in all uplink/downlink subframes, the data rate is reduced in this case.
5G transmissions in time domain are structured into frames of 10 ms. One frame is, in turn, divided into
10 subframes of 1 ms each. A subframe is again divided into several slots that contain 14 OFDM symbols
each. The number of slots allocated in a subframe depends on the numerology. An example of how slots are
organized in 5G is shown in Fig. 2.1, in which shaded symbols denote a symbol whose CP is longer. It is
possible to see in the figure that the structure is scaled dividing by a power of two, with the origin in 15 KHz
for coexistence with LTE. Another benefit of this division is that mixing different numerologies in the same
subcarrier is avoided.
14 symbols / 1 slot
Δf = 15 kHz
28 symbols / 1 slot
Δf = 30 kHz
56 symbols / 1 slot
Δf = 60 kHz
Figure 2.1 Slots in 5G according to subcarrier spacings of 15, 30, 600, 120, and 240 kHz.
It is also important to comment that there is a technique implemented in 5G NR to support low latency
transmissions. It consists on separate the concept of transmission duration from slot duration. In other words,
it is possible to use only a portion of the slot for transmission. It is known as mini-slot transmission.
2.6 Frequency domain 11
The basic element in terms of frequency is a Resource Element (RE). It consists of one subcarrier during one
OFDM symbol. Another division commonly used is referred to as a Resource Block (RB), which consists
of twelve consecutive subcarriers. It is important to remark here the difference of a RB in LTE, which was
twelve subcarriers during one OFDM symbol and one slot. Here an RB is a one-dimensional measure, and
it can be explained if we understand that 5G NR is more flexible. As was commented in the last section, now
the transmission does not have to occupy the entire slot, and that is the reason why the definition has changed.
3GPP introduced in Release 15 two ranges of frequency where a 5G transmission can be allocated, which
are called frequency ranges (FRs). Sub 6 GHz range is called FR1 and the millimeter-wave range is called
FR2. FR1 covers bands from 450 MHz to 7.125 GHz and FR2 from 24.25 GHz to 52.60 GHz. 1 The selection
of an FR involves a different utilization of the spectrum. Note that not every numerology is allowed in each
FR. Table 2.2 shows the number of RBs allowed for each situation as well as the channel bandwidth specified
for each case.
1
For the full list of the bands involved in the different frequency ranges, see https:// [Link]/ wirelesstechnology/ 4glte/ 5g-
frequency-bands-lte/
3 Design of the proposed tool
A fter introducing all 5G-NR concepts that are necessary for the complete understanding of this work,
next step is to introduce how the development tool looks like and also how it has been designed and
implemented. This chapter is organized into two parts. The first one, where the tool itself is presented and
we will discuss everything based on the flowchart and the block diagram of the tool. The second part of this
chapter consists of a description of the repositories used to upload this project.
To start with, the flowchart of the full project is shown and can be found in Fig. 3.1, and the full code of the
developed tool is included in the appendix (Code A.2 and Code A.1). It consists of a full simulation of 5G
generation and their following reception. As it has been already commented during the first chapter, the tool
has been developed in Python, which is an open-source programming language.
The software starts with some configuration parameters, that can be set by the user but they must be
according to the standard defined, that has been commented in the last chapter (table 2.1 and 2.2). More
precisely, the parameters that the user can set are:
• Number of Resource Blocks (NRB). Here the number of RB is set and must be defined according to
Table 2.2.
• Subcarrier spacing (Df). Subcarrier spacing is another parameter that must be set in order to prepare
everything for the transmission.
• Number of slots (Nslots). It indicates the number of slots that are going to be generated. The more
slots that are generated, the more accurate our calculates will be, but it also will take more resources
on our computer, and more time will be spent to calculate the results.
• Frequency range (FR). As has been commented, 5G-NR transmission can be allocated in two frequency
ranges. By setting FR1 or FR2 we fix the numerology we are using, that is completely different.
• Modulation order (M). It represents the size of the constellation used for the transmission. One of
the following schemes supported must be chosen [ETS, 2018]: binary phase-shift keying (BPSK),
quadrature phase-shift keying (QPSK), and quadrature-amplitude modulation (QAM) of 16QAM,
64QAM, and 256QAM.
13
14 Chapter 3. Design of the proposed tool
initialize parameters
simulation
model
extract
numerology
standard
okay?
yes
set
modulation
yes
order
multicarrier
generation
& channel
simulation
chosen
power
BER plot options amplifier
simulation enabled simulation
analyse
multicarrier
present &
save results
more
simulation?
no
no
stop
• Peak to Average Power Ratio (PAPR). We were discussing in the last chapter that PAPR was one of
the drawbacks of using OFDM as the modulation technique. This parameter set what is the maximum
PAPR value admissible. If it is higher, it will be reduced by peak clipping techniques.
• Seed for random number generation (SEED). This parameter intends to set the seed for random
number generation, commonly used for developers.
Additionally, there are also some boolean variables that the user can change, and that allows us to run one
specific simulation or just avoid the representation of figures to be more computationally efficient. Regarding
those parameters, they will be commented in detail in the next chapter where all simulations that have been
carried out are presented.
As was said a few lines ago, before starting the simulation, the tool checks that every parameter is defined
according to the standard. If that is not true, the simulation will stop, showing in the screen that the parameters
set are not defined according to the standard, and it shows how the format should be. An example is shown in
Fig. 3.2, where a certain number of RB of 1 is set, but the program returns a message specifying the range of
the RB that can be set for the given parameters.
3.1 Software designed 15
Figure 3.2 Screenshot that shows and example of what happen when parameters specified does not match the
standard of 5G NR.
Once the parameters have been defined properly, the next step is to specify the modulation order. It is done
like this because there is a simulation that uses all the modulations to calculate some results and compare
them for every modulation. Hence, if it is defined here and not before, it is possible to repeat the simulation
only varying that parameter, and they can be allocated under a for a loop. After that, the set-up would be
complete, and the next step is to generate the 5G-NR signal and after that, receive it. All this process is
described in detail in the next section, where a block diagram that represents this action is commented. Lastly,
all results must be saved but additionally, some of then are printed and can be seen in the console log. If
more simulations are necessary to do, the software will be run again, otherwise, it will finish and we will be
able to see all the figures that have been generated.
Figure 3.3 Diagram of the multicarrier generation stage (ovs stands for oversampling).
The block diagram of the transmitter stage is shown in Fig. 3.3. In this section, waveform generation is
discussed. For waveform reception, the steps defined are the same as in the generation stage, but backward.
For simplicity, we will only comment on the transmitter stage. There are some stages with more than one
arrow, which means that the information in those stages is processed in parallel. Each step is explained next.
First of all, a random sequence of bits must be generated. Therefore, it is necessary to calculate how many
bits are needed. It is important to remark that the bit sequence will be determined by the seed value already
commented in the last section. Taking into account the number of slots and resource blocks that have been
specified, it is possible to calculate the number of bits that must be generated for the transmission,
where Nslots , NRB and k are the number of slots, RBs and the order modulation, respectively. This equation
comes from the fact that we need to insert k bits into an specific subcarrier every symbol. 12 NRB is the
number of subcarrier per OFDM symbol and 14 Nslots the number of OFDM symbols specified.
To give some understanding of the equation defined above, it is important to remark that the number of
bits generated is influenced mainly by two variables: the number of slots and the number of resource blocks.
We will see in the next chapter that if we want to run a simulation we must generate a significant number of
bits, so it is important to take into account that there are two ways of doing that: time domain (slots) and
16 Chapter 3. Design of the proposed tool
frequency domain (resource blocks). The first one is unlimited since we can always generate more symbols
and therefore exploit the time domain. However, the number of RBs is limited at some point by the standard.
Modulator
Once that bits have been generated, the next step is to modulate them. For this purpose, it is necessary to
obtain the level of amplitude for each complex symbol in both in-phase (I) and quadrature (Q) components.
First, we get a constant that guarantees the desired energy per bit Eb in Joules,
s
3Eb log2 (M1 M2 )
A= , (3.2)
M12 + M22 − 2
AI = A(2i − M1 + 1)
(3.3)
AQ = A(2 j − M2 + 1),
where i and j = 0,1,...,M − 1. Then, a bit sequence must be associated with each symbol. The best way to
do that is by using a Gray codification, that ensures the minimum BER for a given symbol error rate (SER).
After that, the bit sequence has turned into a digital signal that contains the bits mapped into symbols and
can be represented into a constellation To show an example, Fig. 3.4 represents the constellation of every
symbol for a given modulation order. The energy per bit value has been set to 1 during all experiments.
Once the symbol has been calculated, the next step is to associate them with the subcarriers. Thanks to
the simplicity of OFDM modulation, this association is a direct operation because the value of each symbol
corresponds to the value of each subcarrier. It is important to remark that the symbol generated is represented
in the complex plane, as can be seen in Fig. 3.4. As a consequence, the subcarrier is also complex and if we
want to plot the subcarriers, we will have to represent the absolute value of them instead of the real or the
imaginary part. This is a concept that engineers that work with signals know very well.
Oversampling
To meet the requirements for other external applications, sometimes it is necessary to apply an oversampling
(ovs) to increase the sampling rate. The natural way of doing that is at the final stage, where an interpolation
may be performed to add/remove samples and change the sampling rate. However, this method distorts the
spectrum of the signal and therefore it is necessary to explore other techniques to change the signal sampling
frequency. One technique is to perform part of the oversampling in this stage. After modulating the subcarriers
individually, it is possible to add zeros to the left and the right of the subcarriers. As a consequence, the
number of samples will increase, but since we are adding zeros on both sides, the information stored will not
change.
It is important to remark that only an equal number of zeros must be added on both sides. That means that
only an oversampling with an integer value can be performed here. It follows that if an oversampling with
decimals is required, an additional fine oversampling to the final rate will be performed before the clipping
stage. But, at least, most of it will be performed here and, hence, the distortion is minimized.
The second part of the oversampling is performed at the end of the transmitter stage, after the CP insertion.
However, it is going to be explained here because we have already put into context this concept. As it was
said at the beginning of this section, if it is possible, the oversampling will be performed in the frequency
domain, adding zeros to the left and the right of the subcarriers if it is an upsampling, or removing zeroes if
it is downsampling. But sometimes the overall oversampling that must be performed will not be an integer
number and therefore we will need to explore other techniques to change the frequency sampling accordingly.
What has been done here is a technique that is called FFT interpolation [Selva, 2015].
Lastly, it must be clear that the purpose of the oversampling is to change the frequency sampling and an
oversampling technique that works in the frequency domain will be always preferable: the distortion of doing
a resampling is minimized if we face the problem in this domain.
3.1 Software designed 17
&