Professional Documents
Culture Documents
Full Midterm Report Group Dinali Lâm Hà Hiếu
Full Midterm Report Group Dinali Lâm Hà Hiếu
----
PROJECT REPORT
UNDERSTANDING WIRELESS COMMUNICATION SYSTEM AND
IMPLEMENTING SIMPLE SYSTEMS ON GNU RADIO
Instructor: Assoc. Prof. Đỗ Trọng Tuấn
Group 3
Liyanaarachchige Dinali
20170289 EEE K61
Thushanga Jayasinghe
Đỗ Thu Hà 20161213 EEE K61
Ha Noi, 19/11/2020
Contents
PREFACE ........................................................................................................................................................ 4
LIST OF FIGURES ............................................................................................................................................ 5
TABLE OF TASKS FOR MEMBER ..................................................................................................................... 6
I. Wireless Communication - Overview.................................................................................................... 7
I.I Features of Wireless Communication .............................................................................................. 7
I.II General structure of a communication system .............................................................................. 7
I.III Advantages ...................................................................................................................................... 8
I.IV Types of Paths ................................................................................................................................. 8
a. Direct-path ................................................................................................................................... 8
b. Multi-path .................................................................................................................................... 8
c. Multipath propagation ............................................................................................................... 9
I.V Characteristics of Wireless Channel ............................................................................................... 9
I.VI Transmission Limitations ............................................................................................................... 9
a. Attenuation .................................................................................................................................. 9
b. Distortion ..................................................................................................................................... 9
c. Dispersion .................................................................................................................................. 10
d. Noise ........................................................................................................................................... 10
e. Scope of performance deterioration, which affects the output ............................................. 11
II. Simulation on GNU Radio ................................................................................................................... 12
II.I AM Transmission ........................................................................................................................... 12
a. What is amplitude modulation?............................................................................................... 13
b. Amplitude demodulation .......................................................................................................... 14
c. Advantages & disadvantages of amplitude modulation, AM................................................ 14
d. Derivatives of Amplitude Modulation ..................................................................................... 15
e. AM overview.............................................................................................................................. 15
f. Flow graph ................................................................................................................................. 15
II.II Modulation .................................................................................................................................... 18
a. Definition: .................................................................................................................................. 18
b. Types of modulation ................................................................................................................. 19
c. Modulation and demodulation................................................................................................. 20
d. Why use modulation? ............................................................................................................... 20
e. MPSK modulation: ................................................................................................................... 21
f. Modulation Sequence................................................................................................................ 22
g. With Channel Impairments ..................................................................................................... 26
h. Transmission Channel .............................................................................................................. 28
II.III Demodulation............................................................................................................................... 30
a. Definition: .................................................................................................................................. 30
b. Need of demodulation ............................................................................................................... 31
c. Difference between Modulation and Demodulation .............................................................. 31
d. QPSK and 16-QAM Demodulation ......................................................................................... 31
e. Channel Model with Timing Recovery ................................................................................... 34
f. With Equalizer .......................................................................................................................... 37
g. Decoding..................................................................................................................................... 41
II.4 Orthogonal Frequency Division Multiplexing (OFDM) ............................................................. 44
a. Introduction: ............................................................................................................................. 44
b. Data on OFDM .......................................................................................................................... 45
c. Perks ........................................................................................................................................... 45
d. Block diagram ........................................................................................................................... 46
e. Simulation .................................................................................................................................. 46
f. Results ........................................................................................................................................ 47
II.5 Image Transfer............................................................................................................................... 48
Conclusion ................................................................................................................................................... 50
References .................................................................................................................................................. 51
PREFACE
With the extremely strong development of information technology in general
and wireless communication systems in particular, the demand for electronic and
telecommunication systems is growing rapidly and strongly. Therefore, it has
design requirements for the manufacture of wireless communication systems with
small and compact dimensions that still meet the required function that the noise
can be avoided as little as possible and suitable for current use needs and aims. The
subject “Wireless Communication” helps us understand more about using Gnu
Radio software to simulate some simple communication systems, know what is
good communication systems and how to mitigate the noise and interference. We
would like to send our most sincere thanks to Assoc. Prof. Do Trong Tuan for
supporting and supervising us during the course. Due to lacking of time and
experience in terms of deeply diving into new software, so our project is inevitable
shortcomings.
Ultimately, we would like to send our sincere thanks to the teachers in the
Institution, the students of previous year and especially to Assoc. Prof. Do Trong
Tuan who enthusiastically guided and explained in detail throughout the course of
study to help us complete this topic.
We sincerely thank you!
LIST OF FIGURES
FIGURE 1. 1 GENERAL STRUCTURE OF A COMMUNICATION SYSTEM. ......................................................7
FIGURE 1. 2 THE SIGNAL WITH BURST ERRORS ............................................................................................. 10
FIGURE 2. 1 AMPLITUDE MODULATION ........................................................................................................... 13
FIGURE 2. 2 AM TRANSCEIVER FLOW GRAPH [1]........................................................................................... 16
FIGURE 2. 3 AM RECEIVER FLOW GRAPH ........................................................................................................ 17
FIGURE 2. 4 AM TRANSCEIVER AND RECEIVER WAVEFORM ..................................................................... 18
FIGURE 2. 5 WAVEFORM OF THE SIGNAL AFTER THREE TYPES OF MODULATION .............................. 19
FIGURE 2. 6 MPSK MODULATION FLOWGRAPH ............................................................................................. 21
FIGURE 2. 7 MPSK MODULATION SIMULATION RESULTS ........................................................................... 22
FIGURE 2. 8 MODULATION SEQUENCE FLOWGRAPH ................................................................................... 23
FIGURE 2. 9 MODULATION SEQUENCE SIMULATION RESULTS ................................................................. 25
FIGURE 2. 10 MODULATION WITH CHANNEL IMPAIRMENTS FLOWGRAPH ........................................... 27
FIGURE 2. 11 MODULATION WITH CHANNEL IMPAIRMENTS SIMULATION RESULTS ......................... 28
FIGURE 2. 12 TRANSMISSION CHANNEL FLOWGRAPH ................................................................................ 30
FIGURE 2. 13 TRANSMISSION CHANNEL SIMULATION RESULTS .............................................................. 30
FIGURE 2. 14 DEMODULATION BLOCK DIAGRAM ........................................................................................ 31
FIGURE 2. 15 QAM AND QPSK DEMODULATION FLOWGRAPH [1] ............................................................ 33
FIGURE 2. 16 QPSK DEMODULATION WAVEFORM ....................................................................................... 33
FIGURE 2. 17 QAM DEMODULATION WAVEFORM ........................................................................................ 34
FIGURE 2. 18 CHANNEL MODEL WITH TIMING RECOVERY FLOWGRAPH [1] ........................................ 35
FIGURE 2. 19 CHANNEL MODEL WITH TIMING RECOVERY SIMULATION RESULTS ............................. 36
FIGURE 2. 20 SYMBOLS AFTER AND BEFORE ADDING TIMING RECOVERY .......................................... 37
FIGURE 2. 21 CHANNEL MODEL ADDING EQUALIZER FLOWGRAPH [1] ................................................. 39
FIGURE 2. 22 SIMULATION RESULTS BEFORE ADDING EQUALIZER........................................................ 39
FIGURE 2. 23 SIMULATION RESULTS AFTER ADDING EQUALIZER ........................................................... 40
FIGURE 2. 24 SIMULATION RESULTS AFTER ADDING EQUALIZER .......................................................... 41
FIGURE 2. 25 CHANNEL MODEL WITH DECODING FLOWGRAPH [1] ........................................................ 43
FIGURE 2. 26 OFDM FIGURE ................................................................................................................................ 44
FIGURE 2. 27 GUARD INTERVAL ON OFDM SIGNALS .................................................................................... 45
FIGURE 2. 28 BLOCK DIAGRAM OF OFDM ........................................................................................................ 46
FIGURE 2. 29 HELLO WORLD SCREEN CAPTURE ............................................................................................ 47
FIGURE 2. 30 OFDM FLOW CHART [3] ................................................................................................................ 47
FIGURE 2. 31 SIMULATED RESULT .................................................................................................................... 48
FIGURE 2. 32 IMAGE TRANSFER FLOW GRAPH ............................................................................................... 48
FIGURE 2. 33 INPUT IMAGE .................................................................................................................................. 49
FIGURE 2. 34 OUTPUT IMAGE .............................................................................................................................. 49
TABLE OF TASKS FOR MEMBER
No. Task Assign Support
Synthesize materials and
1 documents relating to Hà, Dinali Lâm,Hiếu
project
I.III Advantages
Cost effectiveness
Flexibility
Convenience
Speed
Accessibility
Constant connectivity
Path loss
Fading
Interference
Doppler shift
The above figure clearly illustrates how the noise signal overlaps the original
signal and tries to change its characteristics.
e. Scope of performance deterioration, which affects the output
The major cause: mobile channel impairments
To resolve this, there are three popular techniques –
1)Equalizer
2)Diversity
3)Channel Coding
Advantages
It is simple to implement
it can be demodulated using a circuit consisting of very few components
AM receivers being very cheap as no specialized components are needed.
Disadvantages
It is not efficient in terms of its power usage
It is not efficient in terms of its use of bandwidth, requiring a bandwidth equal to
twice that of the highest audio frequency
It is prone to high levels of noise because most noise is amplitude based and
obviously AM detectors are sensitive to it.
Although in the current technological climate, AM in its basic form is not nearly
as effective as other modes that can be used, it is still retained in many areas like
broadcasting, because of the number of users. However, it is likely that with time,
its use will decrease still further and ultimately many AM transmissions will cease.
However, its derivatives like quadrature amplitude modulation are widely used as
they offer a very effective form of modulation, especially for data transmission.
d. Derivatives of Amplitude Modulation
Although the use of amplitude modulation is decreasing, it nevertheless forms
the basis of other forms of modulation that are still being widely used, or their use
is increasing.
Waveform
Figure 2. 7 MPSK modulation simulation results
f. Modulation Sequence
Flow graph
Figure 2. 8 Modulation sequence flowgraph
The simulation is run with a random number generator as an input. The source is
set to repeat, creating a continuous signal to allow analysis. The range of the
random number generator is set from 0 to 256. The GNU-Radio documentation
suggests a maximum value that is one greater than the desired value. Since the
output values are bytes, a conversion block is used to change the values from
unsigned characters to floating point values. This enables the generated signal to
conform to something readable on an oscilloscope. The signal is also passed to a
modulation block which performs the phase shift keying (PSK). There are two
signal paths, one for analysis of the input signal, and one for the modulated output.
As this is a simulation, throttle blocks are necessary and placed in both signal
paths. Four different outputs will analyze both the input signal and the modulated
signal. For the input signal, a histogram and an oscilloscope will be used. For the
modulated signal, a constellation plot as well as the spectral waveform will be
used. The outputs are shown using “QT GUI” processing blocks. Figure 2.5.
shows the oscilloscope and histogram outputs.
Waveform
Figure 2. 9 Modulation sequence simulation results
For the time signal in Figure 2.5., with the scaling set large enough, the periodic
nature of the signal is noticeable. Even though the source is a pseudo random
number generator, when in repeat mode the random sequence is no longer random.
Although not evident in this report, the histogram plot appears static. This is due to
the fact that the number sequence repeats at 100 and the plot shows every 1000
values. When the frame size is changed to something other than a multiple of 100,
the graph becomes quite active. In the second path, the signal first passes through a
“Constellation Modulator” block. There are several ways to implement PSK in
GNU-Radio. This was chosen, not only because of the ease of choosing the PSK
schemes, but because it implements differential encoding within the block.
Without this, in the case of BPSK for example, the received data could be inverted.
Some form of synchronization is needed between transmitter and receiver.
Differential encoding allows for this unambiguous signal reception. Because of
exclusive-or operations on the data, what is transmitted depends, not only on the
current bit, but the previous one as well. The “Constellation Modulator” block is
controlled via the “Constellation Object” block. Any changes in the type of keying
being performed, occurs here. For this report, QPSK was designated and is shown
in all diagrams. The output of the “Constellation Modulator” block is fed to a
Constellation Sink to view the Constellation Plot (Figure 2.5.) and a Frequency
sink for spectral analysis (Figure 2.5.). The samples per symbol was increased to
32 (far greater than necessary) to show the transitions between constellation points.
The constellation plot shows distinct separation between the four phase values of
the QSPK signal. The spectral plot shows a fairly smooth and narrow baseband
signal that rolls off into the noise.
g. With Channel Impairments
That first stage example only dealt with the mechanics of transmitting a
QPSK signal. We'll now look into the effects of the channel and how the signal is
distorted between when it was transmitted and when we see the signal in the
receiver. The first step is to add a channel model, which is done using the example
mpsk_stage2.grc below. To start with, we'll use the most basic Channel Model
block of GNU Radio.
This block allows us to simulate a few main issues that we have to deal with.
The first issue with receivers is noise. Thermal noise in our receiver causes noise
that we know of as Additive White Gaussian Noise (AWGN). We set the noise
power by adjusting the noise voltage value of the channel model. We specify the
voltage here instead of power because we need to know the bandwidth of the
signal in order to calculate the power properly. One of the defining aspects of GNU
Radio is the independence of the blocks, so the channel model doesn't know
anything about the incoming signal. We can calculate the noise voltage from a
desired power level knowing the other parameters of the simulation.
Another significant problem between two radios is different clocks, which
drive the frequency of the radios. The clocks are, for one thing, imperfect, and
therefore different between radios. One radio transmits nominally at fc (say, 450
MHz), but the imperfections mean that it is really transmitting at fc + f_delta_1.
Meanwhile, the other radio has a different clock and therefore a different offset,
f_delta_2. When it's set to fc, the real frequency is at fc + f_delta_2. In the end, the
received signal will be f_delta_1 + f_delta_2 off where we think it should be (these
deltas may be positive or negative).
Related to the clock problem is the ideal sampling point. We've up-sampled
our signal in the transmitter and shaped it, but when receiving it, we need to
sample the signal at the original sampling point in order to maximize the signal
power and minimize and inter-symbol interference. Like in our stage 1 simulation
after adding the second RRC filter, we can see that among the 4 samples per
symbol, one of them is at the ideal sampling point of +1, -1, or 0. But again, the
two radios are running at different speeds, so the ideal sampling point is an
unknown.
The second stage of our simulation allows us to play with these effects of
additive noise, frequency offset, and timing offset. When we run this graph we
have added a bit of noise (0.2), some frequency offset 0.025), and some timing
offset (1.0005) to see the resulting signal.
Flow graph
Figure 2. 10 Modulation with channel impairments flowgraph
Waveform
Figure 2. 11 Modulation with channel impairments simulation results
The constellation plot shows us a cloud of samples, far worse that what we
started off with in the last stage. From this received signal, we now have to undo
all of these effects.
h. Transmission Channel
There are 3 problems:
1. Gaussian Noise
2. The transmitter and receiver have different clocks
3. Large timing offset between origin and destination
There are a few differences from the original flow graph in this version. First,
there is no output for the pre-modulated signal. Second, a “Channel Model”
processing block has been added. This will enable the simulation of the typical
issues that occur during transmission. Our concern is with three things, noise,
timing, and frequency drift. For each of these, a “QT GUI Range” processing block
is added. These will allow dynamic simulation of the corresponding issue. Lastly,
the output of the channel will be shown in constellation, time, and frequency plots.
The purpose of this portion is look into the effects of the channel and how the
signal becomes distorted after it is transmitted and before it is seen at the receiver.
The first issue is noise. Thermal noise in the hardware causes noise that is
commonly known as additive white Gaussian noise (AWGN). The noise power is
set by adjusting the noise voltage of the “Channel Model.” The voltage is specified
instead of power because of its independence to the signal. This is necessary
because the “Channel Model” knows nothing about the incoming signal. The
second problem to be resolved occurs because the transmitter and receiver have
different clocks, which drive the frequencies of both devices. Imperfections in both
clocks cause the specified frequencies to be skewed. Additionally, a lack of
synchronization between the two compounds the issue. The end result is a timing
offset between origin and destination. A related issue to the timing offset is the
problem of finding the ideal sampling point. To minimize the ISI, we need to
sample the signal as close to the original sampling point as possible. Figure 2.9.
show the modulated signal prior to any channel effects. The time signal is clean, as
well as the spectral plot. The constellation plot shows some spreading due to over
sampling.
Flow graph
Figure 2. 12 Transmission channel flowgraph
The signal without White Gaussian Noise
Since the CMA equalizer is only capable of converging to the unit circle, it can
lock at any given phase. For this reason, the signal flow graph needs to correct for
any phase offset as well as any frequency offset. For this, the “Costas Loop”
processing block will be used. The Costas Loop can synchronize to both BPSK and
QPSK.
The output “samples per symbol” was altered to create the appearance of
interference. Both the constellation and spectral plots are cleaned up. The
frequency spectrum in particular has a constant, “equalized” shape.
Figure 2. 24 Simulation results after adding Equalizer
We can watch the CMA algorithm converge. Note, too, that since we have both
a clock sync and equalizer block, they are converging independently, but the one
stage will affect the next stage. So there is some interaction going on here while
both are locking on to the signal. In the end, though, we can see the effect of the
time-locked multipath signal before and after the equalizer. Before the equalizer,
we have a very ugly signal, even without noise. The equalizer nicely figures out
how to invert and cancel out this channel so that we have a nice, clean signal again.
We can also see the channel itself and how it flattens out nicely after the equalizer.
Play with the taps provided to the channel model block to change the multipath.
The current taps were simply randomly generated to provide a multipath profile
with no real mathematical basis for them
g. Decoding
The next step in the demodulation process was the decoding procedure. In this
part, the symbols from the constellation plot are converted back to bits. Several
processing blocks are used to complete the simulation, although not all will be
used in the final flow graph. First, the Costas Loop is followed by a demodulator
block. The symbols are then mapped to their binary equivalents. Since differential
encoding was used before modulation, differential decoding is used now. The
actual constellation was not transmitted. Instead, differential symbols were, and are
now converted. Since the symbols represent multiple bits, an “Unpack” processing
block is used. The final step is to convert the byte values into floating point values
so that the signal can be viewed on a time plot.
The flow graph uses the Differential Decoder block to translate the differential
coded symbols back to their original symbols due to the phase transitions, not the
absolute phase itself. But even out of here, our symbols are not exactly right. This
is the hardest part about demodulation, really. In the synchronization steps, we had
basic physics and math on our side. Now, though, we have to interpret some
symbol based on what someone else said it was. We, basically, just have to know
this mapping. And luckily, we did, so we use the Map block to convert the symbols
from the differential decoder to the original symbols we transmitted. At this point,
we now have the original symbols from 0-3, so let’s unpack those 2 bits per
symbol into bits using the unpack bits block. Now, we have the original bit stream
of data!
But how do we know that it's the original bit stream? To do so, we'll compare to
the input bit stream, which we can do because this is a simulation and we have
access to the transmitted data. But of course, the transmitter produced packed bits,
so we again use the unpack bit block to unpack from 8-bits per byte to 1-bit per
byte. We then convert these streams to floating point values of 0.0 and 1.0 simply
because our time sinks only accept float and complex values. Comparing these two
directly would show us... nothing. Why? Because the receiver chain has many
blocks and filters that delay the signal, so the received signal is some number of
bits behind. To compensate, we have to delay the transmitted bits by the same
amount using the Delay block. You can then adjust the delay to find the correct
value and see how the bits synchronize. You can also subtract one signal from the
other to see when they are synchronized as the output will be 0. Adding noise and
other channel affects can then be easily seen as bit errors whenever this signal is
not 0.
Flow graph
Figure 2. 25 Channel model with decoding flowgraph [1]
Waveform
[2] Nicola Marchetti, Muhammad Imadur Rahman, Sanjay Kumar and Ramjee Prasad, "OFDM: Principles
and challenges," 2009.
[3] Steve Jordan, Bhaumil Patel, "Image transfer and Software Defined Radio using USRP and GNU
Radio".