You are on page 1of 14

AMERICAN INTERNATIONAL UNIVERSITY BANGLADESH

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.

Laboratory Title: ___________________________________________________


A Message Transmitting and Receiving System for Digital
Communication System
Experiment Number: __OEL__ Due Date: 30/04/2021__ Semester: _Spring 2020-2021_
Subject Code: EEE 3211_ Subject Name: Principles of Communication Section: __C__
Course Instructor: NOWSHIN ALAM Degree Program: EEE

Declaration and Statement of Authorship:


1. I/we hold a copy of this report, which can be produced if the original is lost/ damaged.
2. This report is my/our original work and no part of it has been copied from any other student’s work or from
any other source except where due acknowledgement is made.
3. No part of this report has been written for me/us by any other person except where such collaboration has been
authorized by the lecturer/teacher concerned and is clearly acknowledged in the report.
I/we understand that
7. Plagiarism is the presentation of the work, idea or creation of another person as though it is your own. It is a
form of cheating and is a very serious academic offence that may lead to expulsion from the University.
Plagiarized material can be drawn from, and presented in, written, graphic and visual form, including electronic
data, and oral presentations. Plagiarism occurs when the origin of the material used is not appropriately cited.
8. Enabling plagiarism is the act of assisting or allowing another person to plagiarize or to copy your work

Group Number (if applicable): 1 Individual Submission Group Submission

No. Student Name Student Number Student Signature Date


Submitted by:

1 Adnan 19-39561-1
Group Members:

2 Ruham Rofique 19-39473-1

3 Foisal Ahmed 19-39512-1

4 Md Mazharul Islam 19-39555-1

5 Md. Shadman Shakif Bhuiyan 19-39495-1

For faculty use only:


Total Marks: _______ Marks Obtained: _______

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.

Methodology and Procedure


So in this experiment, we will try to send a text message from one end to another.
This is the SIMULINK block diagram of the BPSK modulation and demodulation of the transmission.

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

To summarize the steps that we have done earlier incase of BPSK:


1. In the first block of the SIMULINK model a string text has been take as input.
2. That string text then has been converted into ASCII value by using the ‘String to ASCII’ block.
3. To see the result of the conversion of the previous step a display has been used.
4. In the third block a ‘Reshape’ block has been used. The Reshape block changes the dimensionality of
the input signal to a dimensionality that are specified, using the block's output dimensionality
parameter. For example, the block can be used to change an N-element vector to a 1-by-N or N-by-1
matrix signal, and vice versa.
5. Next the output from the step 3 then has been converted into ‘double’ datatype by using the ‘Data
Type Conversion’ block.
6. In this step ‘Integer to Bit Converter’ block has been used. This block is single-rate and single-
channel. The block maps each integer value (or stored integer when a fixed-point input is used) to a
group of M bits, using the selection for the Output bit order to determine the most significant bit. The
resulting output vector length is M times the input vector length.
7. Then output value from the previous block which is discrete-time binary-valued signal has been
passed through the ‘QAM Modulator Baseband” block. This block modulates a signal by using the
quadrature amplitude modulation (QAM) method. The output is a baseband representation of the
modulated signal.
8. In this step noiseless constellation diagram has been observed which is our transmitted constellation
diagram. To define the amplitude and phase of a signal element, particularly when two carriers in-
phase and quadrature are used a diagram called constellation diagram is used. The X axis is related to
the in-phase carrier; the Y axis is related to the quadrature carrier. The length of the line (vector) that
connects the point to the origin is the peak amplitude of the signal element.
9. After that by using ‘AWGN’ block noise has been added to signal.
10. By varying the value of 𝐸𝑏/𝑁𝑜 and peak power the output result has been observed by using another
constellation diagram. At this point the steps from 1 to 6 have been repeated but in reverse manner.
11. Next QAM Demodulator Baseband block has been used to demodulate a signal that was modulated
using the binary phase shift keying method.
12. Bit to Integer converter has been used to map the groups of bits in the input vector to integers in the
output vector.
13. After that ‘Data type conversion’ block has been used to convert the output from the previous block
into unit8 data type.14. In this step output from the previous block has been passed through the
‘Reshape’ block to change the dimensionality of the input signal to a dimensionality that has been
specified, using the Output dimensionality parameter.
14. To justify the ASCII value with the sent ASCII value a display has been used.
15. Then a data type conversion block ‘ASCII to String’ has been used to retrain the sent message at the
beginning.
16. Lastly a display block has been used to see the “Ramadan’ text string data that was sent at the very
beginning

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.

Modulation Process Threshold SNR Threshold Eb/No Time required (s)


(dB)
BPSK 3 5 1.03
4-QAM 6 4 1.58
QPSK 9 8 1.06
16-QAM 16 12 1.16
M-FSK 33 27 1.33

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.

You might also like