Professional Documents
Culture Documents
Faculty of Engineering
Laboratory Report Cover Sheet
Students must complete all details except the faculty use part.
Please submit all reports to your subject supervisor or the office of the concerned faculty.
1 Adnan 19-39561-1
Group Members:
Faculty comments___________________________________________________________________________
___________________________________________________________________________________________
Group 01 Member contributions:
No. Name ID Contributions
1 Adnan 19-39561-1 A. Simulink Simulation
2 Ruham Rofique 19-39473-1 A. Theory
3 Foisal Ahmed 19-39512-1 A. Methodology (1st half)
B. Report Compilation
4 Md Mazharul Islam 19-39555-1 A. Results
B. Discussion (1st half)
5 Md. Shadman 19-39495-1 A. Methodology (2nd half)
Shakif Bhuiyan B. Discussion (2nd half)
Title
A Message Transmitting and Receiving System for Digital Communication System
Objective
In this experiment, we will design a digital communication system in simulation which we will use to
transmit a message by encoding it. We will be using different types of modulations during message
transmissions.
Equipments used
• MATLAB 2019a
• SIMULINK
• Blocks Used:
o String Constant
o String to ASCII
o ASCII to String
o Reshape
o Data Type Conversion
o Integer to Bit Converter
o Bit to Integer Converter
o AWGN
o Constellation Diagram
o Display
o Rectangular QAM Modulator baseband
o Rectangular QAM Demodulator baseband
o BPSK Modulator Baseband
o BPSK Demodulator Baseband
o M-FSK Modulator Baseband
o M-FSK Demodulator Baseband
o QPSK Modulator Baseband
o QPSK Demodulator Baseband
Introduction
In real life, we send messages and it 1st gets modulated to be able to transmit it in analog signal. After
modulation, the signal is transmitted and then on the receiving end, the signal is demodulated from analog to
digital to get the message back. Now there are many type of modulations that can be used in this modulation
step. There can be advantages or disadvantages for each modulations for specific cases. We will try to find
the differences in these different types of modulations in this experiment.
So we will focus on 4 types of modulation. BFSK (Binary Frequency Shift Keying), BPSK (Binary Phase
Shift Keying), QPSK (Quadrature Phase Shift Keying) and QAM (Quadrature Amplitude Modulation)
BFSK: -
The frequency modulation method is called frequency-shift keying (FSK). The discrete frequency shift of a
carrier wave is used to transmit digital information. Amateur radio, caller ID, and emergency broadcasts are
all examples of communication systems that use the technology. Binary FSK is the simplest FSK.
BPSK: -
In Binary Phase Shift Keying (BPSK) system two different phase scheme can be represented by binary “0”
and binary “1”. BPSK is a two-phase modulation scheme. It can be stated in digital modulation techniques, a
set of basis function (0&1), expressed for a particular modulation with carrier signal.
QPSK: -
The technique of quadrature phase shift keying (QPSK) is a form of phase modulation. When two bits of
data are modulated at the same time, one of the four possible carrier phase shift states is occurred.
16-QAM: -
Definition of the 16-QAM is16-State Quadrature Amplitude Modulation. Quadrature Amplitude Modulation
means two signals are used to amplitude-modulate two quadrature carriers in this modulation process.
The 16 QAM bits per symbol are 4 (four). This means in 16-QAM each symbol represents 4 bits as
mentioned in the 16-QAM constellation diagram.
These are the different modulation schemes that we will be trying in this lab. Now there are some terms we
need to get familiarized such as SNR, Eb/No ratio and ASCII Code.
Eb/No Ratio: -
The signal-to-noise ratio of a digital communication system is measured in Eb/No. It is calculated at the
receiver's input and is used as a simple indicator of signal strength.
The distance between the different points on the constellation diagram decreases as the QAM or other
modulation order increases, and the chance of data errors increases. To use high-order QAM formats, the
connection must have a high Eb/No ratio; otherwise, data errors would occur. If the Eb/No deteriorates, the
power level must be increased, or the QAM order must be decreased if the QAM order deteriorates.
SNR:-
SNR is defined as the ratio of the signal received to the sound signal. It is often published in decibels. A
signal-to-noise ratio greater than 0 dB means that there is more signal than noise. The Shannon–Hartley
theorem connects SNR, bandwidth, and channel capacity in a communication channel.
Formula:- SNR = 20 log (S ÷ N).
ASCII Code:-
The American Standard Code for Information Interchange (ASCII) is a character encoding standard used in
electronic communication. Computers, telephone equipment, and other machines all use ASCII codes to
represent text. Based on the English alphabet, ASCII encodes 128 specified characters into seven-bit
integers. We will use this to encode our message into numbers.
This is the entire block diagram of the whole process of sending and receiving data using BPSK modulation.
This part of the system is the sending of the message. We have used the string constant block to be the
message word we want to send. We typed the word “Ramadan” as the message and then passed it onto the
string to ASCII conversion block. In this block, all the letters in the word “Ramadan” is being converted to
ASCII codes of some integer by encoding.
These encoded ASCII numbers can be seen in the display below showing the ASCII code of the word
“Ramadan” to be [82 97 109 97 100 97 119]. Notice that there are 7 letters and each letter has it’s code.
This code is in the format of matrix with dimension of [1x31]. We will use the Integer to Bit Converter to
convert these numbers into bits allowing them to travel as a digital signal. But the Integer to Bit Converter
block does not take a row matrix but it accepts a column matrix and double format of the number as input.
So we use the reshape block to convert it into a single column and a Data Type conversion block is used to
convert the unit8 number format into double data type for the Integer to Bit block to accept the input.
As the number leave the Integer to Bit converter, they are being converted into bits of 1’s and 0’s of digital
signal.
In the 1st case, we are using a BPSK modulator block to modulate the signal using phase shift keying from
digital to analog signal. This block would convert the digital bits into an analog signal with varying phase
corresponding to the bits.
As the signal is modulated into an analog signal, we are considering this signal to be the transmitted signal
over a very long distance. In order to replicate the travelling of long distance for this analog signal, we
introduced a noise to the signal using the AWGN block, as it happens in real life as well. We set the SNR
value of the signal to a reasonable level so that the original signal can be identified. We can also see the
constellation diagram of the noisy and the noiseless or sent signal to view scattering of the bits due to the
noise. As the noisy or the received signal leaves the AWGN, it enters into a BPSK demodulator, which
essentially converts the analog signal that it received into a digital signal, which is the steam of bits
consisting 1’s and 0’s.
These are the constellation diagrams. On the left we can see the 2 dots, which represents a BPSK
modulation. On the right we can see that the 2 points have been scattered due to the noise added to the
signal. The SNRdB of the signal in this constellation diagram is set to 15dB
As the signal is received and demodulated, we get the original bits. These bits is then converted to the
corresponding numbers using the Bit to Integer converted. As this block converts the bits into the ASCII
numbers, a ASCII to string block is used to convert the numbers back to the message. But before that, we
changed the data type to be compatible with the ASCII to String block and reshaped the data into a row
matrix.
At last the original message is retracted which says “Ramadan”.
So this modulation has been successful so far and we have retrieved the original message as it is.
This sending, transmission and receiving of data took 1.03 seconds to complete. We will use time to
compare with other modulation techniques to see which one is better.
We have done the exact same thing using M-FSK, 4-QAM, 16-QAM and QPSK.
The block diagrams of these digital transmission systems are given below.
4-QAM:
We used the Rectangular QAM modulator and demodulator baseband for this case and set the number to 4,
making it 4-QAM.
These are the constellation diagrams of sending and receiving of 4-QAM modulated signals over the
transmission line.
The time required for this message the modulate and demodulate is 1.58 seconds
This is the block diagram for the 16-QAM modulation and demodulation. It is essentially the same process,
but by changing the value from 4 to 16 in the modulator and demodulator block.
\
M-FSK:
QPSK:
Results
So now that we have tried all the different modulation schemes. Now lets try to compare these modulations.
So we have changed the SNR values and kept decreasing it up until the original message is not received.
Which means we have found the minimum SNR required for each modulation process to receive the original
signal. In addition to the threshold SNR, we have also recorded the time required for the system to send and
receive message. The values are summarised in the table below.
So it can be seen that M-FSK has the highest threshold SNR of 33. This means that this modulation
technique is the least reliable with noise as a slight noise can make the system to receive wrong message. It
takes around 1.33seconds to receive the message.
The 4-QAM modulation process has a very low threshold SNR of 6 which indicates that it can tolerate a lot
of noise in the system. In addition to that, it takes around 1.58 seconds to receive the signal which is
comparatively similar to the M-FSK.
Other modulation processes has moderate level of SNR threshold. All of them seem to have around the same
amount of time required to complete the sending and receiving of the signal so the time might not affect the
overall comparative performance of the system.
However, the BPSK modulation has the least Threshold of SNR as well as Eb/No ratio. This indicates that
this modulation process can detect the signal even of there is very high amount of noise. It has the highest
amount of noise tolerance. This is probably because of the simplicity of the modulation process of just 2
components.
So it can be said that BPSK takes almost the same amount of time as all the other modulation processes, but
it can tolerate and very high level of noise, which is a threshold SNR level of 3dB.
It suggests that BPSK is the best modulation process among the others tested in this experiment using
simulation software.
Conclusion
The goal of this experiment was to send a message from one place by modulating a digital signal and to
receive that message by demodulating the signal. So we started off by taking a word message of “Ramadan”
in a string constant block. This word was converted into ASCII code by using a block which gives integers.
We then changed the data type and the dimension of the integers so that the integer to bit block can accept
this data. This bits of digital data is then modulated so that it is appropriate for transmission over distances.
In addition to that, we added a noise to the signal to replicate the real life scenario of getting noise. Later that
signal was demodulated to get back the original digital signal. That digital signal’s bits of 1’s and 0’s was
then converted back to the integer numbers using integer bits to converter. Then after a reshaping and a data
conversion, this numbers were fed to a ASCII to string block to convert it to a word which was originally
written, in our case “Ramadan”.
At first, we used the BPSK modulation and a reasonable SNR value to add as the noise. Later, we used
different types of modulation techniques such as M-FSK, 4-QAM, 16-QAM, QPSK and also found the
threshold SNRdB value required to receive the message correctly. The datas were recorded on a table
including the time required for the messages to send and receive. It was concluded that all the modulation
processes took on average the same time to complete which indicates that the time is not a major factor here
in choosing which one the most suitable one. It was found that among all the modulation process, the BPSK
modulation had the least SNR threshold, which indicated that it can withstand a lot of noise in the
transmission process and still give the original message back.
So the experiment was successful as we were able to retrieve the original sent message and BPSK
modulation was found to be the best one in this case.