Nothing Special   »   [go: up one dir, main page]

Implementation of Digital Communication Using Matlab (Graduation Project For B.Sc. Degree)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/321097403

Implementation of Digital Communication using Matlab (Graduation project for


B.Sc. degree)

Thesis · May 2015

CITATIONS READS

0 9,422

2 authors:

Ali Kamal Taqi Zeena Mohammed Faris


University of Technology, Iraq University of Technology
10 PUBLICATIONS   7 CITATIONS    3 PUBLICATIONS   0 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Data Compression View project

DNA HUMAN RECOGNITION View project

All content following this page was uploaded by Ali Kamal Taqi on 16 November 2017.

The user has requested enhancement of the downloaded file.


Ministry of Higher Education and scientific Research
University of Technology
Computer Engineering Department
Information Technology Branch

Implementation of Digital Communication using


Matlab
Graduation project submitted to the department of
Computer Engineering in partial fulfillment of requirement
for the degree of B.Sc.

By
Zena Mohammed
Ali Kamal

Supervised By
Dr.Eng.Riyadh J.S

May-2015
Supervisor’s Certificates

I certify that this project entitled


“Implementation of Digital Communication
Using Matlab” was prepared by (Zena
Mohammed, Ali Kamal) under my supervision
at the Computer Engineering Department,
University of Technology Iraq, Baghdad. In
partial fulfillment of the requirement for B.Sc.
Degree

Signature:

Name: Dr.Eng.Riyadh J.S


Scientific Degree:
Date: 2015-5-
‫‪Dedication‬‬

‫﷽‬
‫خ‬ ‫ٔ �خ ت خ � خ ٔ خ‬
‫بدأ خ�أ�أ ب��� ةوة و�أ خ�� خن ��ينوم ن ة�� خف ثي�أر �س� ةيرة ٔأعوأم ك خ�ن هد ف��فا ض�ينه وا ض��ا و� ضا�‬
‫أ ي�أم �ب �ن �ر�أ ب‬
‫ت‬ ‫ف‬
‫���ى � يفى كل ينوم ��� ت�ين ت�ه و��و�ول �ه ���أ ك ف�ن ��ب�أ و�أ ف�� فن ��ينوم فن تف فف ٔأ�أ��م و�أ ف�� فن و�� ف�أ وب يبب يدب�أف‬
‫ق‬ ‫ذ‬ ‫ش‬ ‫�� ��� ة ةئ ف�� خ‬
‫�‬ ‫ش � ف‬
‫��� ةة �م وس��رص كل �رص ي �ا �ئئ �� � ٔفئ و �ر أ��� أو�� وأ �يرا ى أن و � أ و أ�د أ ى د �‬
‫ل‬ ‫ذ‬ ‫�‬‫�‬ ‫�‬‫ذ‬ ‫�‬ ‫�‬‫ذ‬ ‫ف‬ ‫ذ‬ ‫ٔ‬ ‫�‬‫�‬ ‫�‬ ‫خ‬ ‫ٔ‬ ‫ٔ‬ ‫�‬

‫�‬ ‫ت‬ ‫ث‬ ‫ث‬


‫ىم نب تن ت�دم ب�إ���ر �ٕ �ى ���� بب � � نن نون � نن ك� نب تب ب ب��إ ن ببب�نإ بن�ل ���را�ل �� ييتي � ذ� تب � ذن ت��ذذذذ تب ب�ا���ا�ذا ةة‬
‫ش‬
‫و�ٕ �ى � فن ��� ف�أ ٔأ فن فن قف فف و�ين فف ببفبدأٔ‬ ‫وك� نب تب ���ه ت�� ت� ترق �بت نب�ير درب نا�‬
‫خ‬
‫�� نن ٔأ��ك ب يبب يدب ن أ�‬ ‫أ ٔ��� خف �ي�ل ب��� ةوة �ٕ �ى بيد خ�أ �� يى� خىى �ٕ �ى � خن ��� خ�أ ���عود و�يب خ�أة ة�رأ ة�بب خ أ�‬
‫و����فإ �ر�فإ ‪�..‬ر�فإ ‪..‬س ف�هدى �ه ف��جإ��فإ ��ينوم �ٕ �ى � فن ك� ننوا س نندا ��ضإ �ٕ �ى � ضن ��م �� ض� ض�ل ب�ٕإر�شإد�ضإ �ٕ �ى � ينر قق ���م�‬
‫ي‬
‫�م خ�� خن � خخ� خ‬
‫ورون بن�م ٔأ�د ت�أ ٔئ خ�أ ٔوأ�بئئت خ�أ و� خن �هروأ �� خ�أ � يخئ �س� ئت خير أ�‬ ‫و���� فر�ه‬
‫ض‬
‫ن‬ ‫ض‬ ‫ٔ ج��� ة‬ ‫�‬ ‫���‬
‫��يبه ��ى � ضن �دوأ ٔأ ي�أد ي �م ��بب�ي ض�أء � يضى ض���م أل�ي�ل وك� ضنوآ عو�ضآ ��ضآ آ ي�آم ي �ة ي ضآ آ آ آ��ن �ضة‪...‬‬
‫ة‬ ‫�‬ ‫�‬ ‫ض‬ ‫ٓ‬ ‫�‬ ‫�‬‫ش‬ ‫ن‬‫�‬
‫ي‬ ‫�‬ ‫�‬‫ن‬ ‫�‬ ‫�‬
‫ى‬
‫ب��� خ� ةة و خ� ش��ر و ك ٔ� خ��أ ش� ي�رط يى�ر ب � خ�ي�� ةب خ�أ � خن ب�دبيد �أم‪.‬و�أم ينو�أ‪ ...‬يونوم � خن خب خب�أ�م �أ�ي يبب خ�أ‪ ...‬و� خن خب خب�ى هدأخ‬
‫ٔ � ةئ ذ ذ ٔ � ذ ذ� ش� � ن ة��� ة ك� ة ش� ذ ��ئ ذ‬
‫�‬ ‫���ك ذ�ن ��دذئ ب��� ذ�أ بئ ة‬
‫دئ‬ ‫ي‬ ‫ه‬ ‫و‬ ‫ذئ‬ ‫ن‬ ‫�‬ ‫ر‬ ‫�‬ ‫ة‬ ‫�‬ ‫ة‬ ‫�‬ ‫أ‬‫�‬ ‫ل‬‫�‬ ‫ب‬ ‫م‬ ‫ر‬ ‫�‬ ‫ة‬ ‫ئ‬‫ب‬ ‫ء‬ ‫ر‬‫�‬ ‫ب‬ ‫ل‬‫ك‬ ‫ئ‬ ‫�ٕ‬ ‫ة‬ ‫ئ‬ ‫أ‬‫�‬‫�‬ ‫ئ‬ ‫ة‬ ‫ئ‬‫ب‬ ‫وأ‬ ‫ن‬‫ب‬ ‫وأ‬ ‫دة‬ ‫�‬ ‫أ‬‫��‬ ‫ي‬
‫�� ك �� ض� � ٔ ب�� � � ض� ب ض� ث�� � ةب ض�� ة�� ة�� ب ض� �� ٔ��سب ةضب ض� ض� ث�� � ك� ة ةن�ىض � ض� ��� ثب� ة��� � ض �� عث‬
‫�‬
‫م ل رأ ي أ أ ل أ ى ة رم أ و أ ى أ رم �ة يى أ ير و ل ن ور‬

‫خ‬ ‫خخ خ‬ ‫ت‬ ‫ث‬ ‫تخ‬


‫��� ثب�ير ��وخب خ�أ كل �ب�أر تأب ����ر � يخى ن ت�ديىم �أ ي��ين تق بن�م � خن بب�ى ��� خ�ل و� خن ب خب�أ�م ٔأببدأ‬
Abstract

With the increasing demand in communication, it has


become necessary to give better and efficient service to
users by using better technique. This project
demonstrate different modulation technique including
Amplitude Shift Keying (ASK), Frequency Shift Keying
(FSK), Phase Shift Keying (PSK) and analyze the Bit
Error Rate (BER) for different modulation schemes such
as Binary Phase Shift Keying (BPSK), Quadrature Phase
Shift Keying (QPSK), Octal Phase Shift Keying (8PSK),
and Trellis Coded Modulation (TCM). By Choosing a
reliable modulation scheme and better coding
technique the enhancement of the performance can be
obtained in transmitter and receiver of the system.
Simulated result is shown to analyze and compare the
performance of these systems by using additive white
Gaussian noise channel (AWGN). Finally the different
modulation schemes are compared on the basis of BER
and best modulation scheme is determined. From
analysis of modulation techniques, the system could use
more appropriate modulation technique to suit the
channel quality, thus we can deliver the optimum and
efficient system parameters. Both Matlab Code and
Simulink have been used for simulation.
List of Contents

Subject Page No.


Chapter One: General Introduction
1.1 Introduction 1
1.2 Digital commutation System 2

Chapter Two: Related Theory


2.1 Amplitude-Shift Keying (ASK) Modulation 4
2.2 Frequency-Shift Keying (FSK) Modulation 10
2.3 Phase-Shift Keying (PSK) Modulation 17

Chapter Three: Modeling of Digital Communication System


3.1 Modeling using Matlab M-File 22
3.2 Modeling using Matlab Simulink 27
3.3 Convolutional Encoder TCM 32
3.4 Integrating Matlab with C# GUI 37

Chapter Four: Conclusion 41

References 42
Chapter One
Introduction
Chapter One

1.1 Introduction
In the simplest form, a transmission-reception system is a three-block system,
consisting of a) a transmitter, b) a transmission medium and c) a receiver. If we
think of a combination of the transmission device and reception device in the form
of a ‘transceiver’ and if (as is usually the case) the transmission medium allows
signal both ways, we are in a position to think of a both-way (bi-directional)
communication system. For ease of description, we will discuss about a one-way
transmission-reception system with the implicit assumption that, once understood,
the ideas can be utilized for developing / analyzing two-way communication
systems. So, our representative communication system, in a simple form, again
consists of three different entities, viz. a transmitter, a communication channel and a
receiver. A digital communication system has several distinguishing features when
compared with an analog communication system. Both analog (such as voice signal)
and digital signals (such as data generated by computers) can be communicated
over a digital transmission system. When the signal is analog in nature, an
equivalent discrete-time discrete-amplitude representation is possible after the
initial processing of sampling and quantization. So, both a digital signal and a
quantized analog signal are of similar type, i.e. discrete-time-discrete-amplitude
signals. A key feature of a digital communication system is that a sense of
‘information’, with appropriate unit of measure, is associated with such signals. This
visualization, credited to Claude E. Shannon, leads to several interesting schematic
description of a digital communication system. For example, consider Fig.1.1 which
shows the signal source at the transmission end as an equivalent ‘Information
Source’ and the receiving user as an ‘Information sink’. The overall purpose of the
digital communication system is ‘to collect information from the source and carry
out necessary electronic signal processing such that the information can be
delivered to the end user (information sink) with acceptable quality’. One may take
note of the compromising phrase ‘acceptable quality’ and wonder why a digital
transmission system should not deliver exactly the same information to the sink as
accepted from the source. A broad and general answer to such query at this point is:
well, it depends on the designer’s understanding of the ‘channel’ (Fig. 1.1) and how
the designer can translate his knowledge to design the electronic signal processing
algorithms / techniques in the ’Encoder’ and ‘decoder’ blocks in Fig. 1.1 We hope to
pick up a few basic yet good approaches to acquire the above skills. However,
pioneering work in the 1940-s and 1950-s have established a bottom-line to the
search for ‘a flawless (equivalently, ‘error-less’) digital communication system’
bringing out several profound theorems (which now go in the name of Information

1
Chapter One

Theory) to establish that, while error-less transmission of information can never be


guaranteed, any other ‘acceptable quality’, arbitrarily close to error-less
transmission may be possible. This ‘possibility’ of almost error-less information
transmission has driven significant research over the last five decades in multiple
related areas such as, a) digital modulation schemes, b) error control techniques, c)
optimum receiver design, d) modeling and characterization of channel and so forth.
As a result, varieties of digital communication systems have been designed and put
to use over the years and the overall performance have improved significantly.

Figure 1.1: Basic block diagram of a digital communication system

1.2 Digital Communication System


It is possible to expand our basic ‘three-entity’ description of a digital
communication system in multiple ways. For example, Fig. 1.2 shows a somewhat
elaborate block diagram explicitly showing the important processes of ‘modulation
demodulation’, ‘source coding-decoding’ and ‘channel encoding – decoding’. A
reader may have multiple queries relating to this kind of abstraction. For example,
when ‘information’ has to be sent over a large distance, it is a common knowledge
that the signal should be amplified in terms of power and then launched into the
physical transmission medium. Diagrams of the type in Figs. 1.1 and 1.2 have no
explicit reference to such issues. However, the issue here is more of suitable
representation of a system for clarity rather than a module-by-module replication of
an operational digital communication system.

2
Chapter One

Figure 1.2: A possible breakup of the pervious diagram (following Shannon’s ideas)

To elaborate this potentially useful style of representation, let us note that we have
hardly discussed about the third entity of our model, viz. the ‘channel’. One can
define several types of channel. For example, the ‘channel’ in Fig. 1.2 should more
appropriately be called as a ‘modulation channel’ with an understanding that the
actual transmission medium (called ‘physical channel’), any electromagnetic (or
otherwise) transmission- reception operations, amplifiers at the transmission and
reception ends and any other necessary signal processing units are combined
together to form this ‘modulation channel’. We will see later that a modulation
channel usually accepts modulated signals as analog waveforms at its inputs and
delivers another version of the modulated signal in the form of analog waveforms.
Such channels are also referred as ‘waveform channels’. The ‘channel’ in Fig. 1.1, on
the other hand, appears to accept some ‘encoded’ information from the source and
deliver some ‘decoded’ information to the sink. Both the figures are potentially
useful for describing the same digital communication system. On comparison of the
two figures, the reader is encouraged to infer that the ‘channel’ in Fig. 1.1 includes
the ‘modulation channel’ and the modulation- demodulation operations of Fig. 1.2.
The ‘channel’ of Fig. 1.1 is widely denoted as a ‘discrete channel’, implying that it
accepts discrete-time-discrete-amplitude signals and also delivers discrete-time
discrete-amplitude signals.

3
Chapter Two
Related Theory
Chapter Two

2.1 Amplitude-Shift Keying (ASK) Modulation


U

The transmission of digital signals is increasing at a rapid rate. Low-frequency analogue


signals are often converted to digital format (PAM) before transmission. The source
signals are generally referred to as baseband signals. Of course, we can send analogue
and digital signals directly over a medium. From electro-magnetic theory, for efficient
radiation of electrical energy from an antenna it must be at least in the order of
magnitude of a wavelength in size; c = fλ, where c is the velocity of light, f is the signal
frequency and λ is the wavelength. For a 1kHz audio signal, the wavelength is 300 km.
An antenna of this size is not practical for efficient transmission. The low-frequency
signal is often frequency-translated to a higher frequency range for efficient
transmission. The process is called modulation. The use of a higher frequency range
reduces antenna size.

In the modulation process, the baseband signals constitute the modulating signal and
the high-frequency carrier signal is a sinusiodal waveform. There are three basic ways
of modulating a sine wave carrier. For binary digital modulation, they are called binary
amplitude-shift keying (BASK), binary frequency-shift keying (BFSK) and binary phase-
shift keying (BPSK). Modulation also leads to the possibility of frequency multiplexing.
In a frequency-multiplexed system, individual signals are transmitted over adjacent,
non-overlapping frequency bands. They are therefore transmitted in parallel and
simultaneously in time. If we operate at higher carrier frequencies, more bandwidth is
available for frequency-multiplexing more signals.

2.1.1 Binary Amplitude-Shift Keying (BASK)


U

A binary amplitude-shift keying (BASK) signal can be defined by

s(t) = A m(t) cos2πf c t, R R

0<t<T

Where A is constant, m(t)=1 or 0 , f c is the carrier frequency, and T is the bit


R R

duration. It has a power P= 𝐴2 /2 , so tha A=√2𝑃 this equation( ) can be written as

S(t)= √2𝑃 cos2πf c t R R 0<t<T

= √𝑃𝑇�2/𝑇 cos2πf c t 0 < t < T


R R

=√𝐸 �2/𝑇cos2πf c t 0 < t <


R R

4
Chapter Two
constellation diagram of the BASK signals is shown in Figure 2.1.

Figure 2.1: BASK signal constellation diagram.

Figure 2.2 shows the BASK signal sequence generated by the binary sequence
0 1 0 1 0 0 1. The amplitude of a carrier is switched or keyed by the binary signal
m(t). This is sometimes called on-off keying (OOK).

Figure 2.2: (a) Binary modulating signal and (b) BASK signal.

5
Chapter Two

The Fourier transform of the BASK signal s(t) is

S(f)=(A/2)*M(f-fc)+(A/2)*M(f+fc)
The effect of multiplication by the carrier signal Acos 2πf c t is simply to shift the
spectrum of the modulating signal m (t) to f c . Figure shows the amplitude spectrum
of the BASK signals when m(t) is a periodic pulse train.

Figure 2.3: (a) Modulating signal, (b) spectrum of (a), and (c) spectrum of BASK
signals.

Since we define the bandwidth as the range occupied by the baseband signal m(t)
from 0 Hz to the first zero-crossing point, we have B Hz of bandwidth for the
baseband signal and 2B Hz for the BASK signal. Figure shows the modulator and a
possible implementation of the coherent demodulator for BASK signals.

6
Chapter Two

Figure 2.4: (a) BASK modulator and (b) coherent demodulator.

2.1.2 M-ary Amplitude-Shift Keying (M -ASK)


An M-ary amplitude-shift keying (M-ASK) signal can be defined by

A i cos 2π f c t 0<t <T


s(t) =
0 elsewhere
Where

A i = A[2i - (M - 1)]

E i = P i T is the energy of s(t) contained in a symbol duration for i = 0, 1, ...,


M - 1. Figure 2.5 shows the signal constellation diagrams of M -ASK and 4-ASK signals

Figure 2.5: (a) M-ASK and (b) 4-ASK signal constellation diagrams.

7
Chapter Two
Figure shows the 4-ASK signal sequence generated by the binary sequence 00 01 10 11.

Figure 2.6: 4-ASK modulation: (a) binary sequence, (b) 4-ary signal, and (b) 4-ASK
signal.

8
Chapter Two

Figure 2.7 shows the modulator and a possible implementation of the coherent
demodulator for M-ASK signals.

Figure 2.7: (a) M-ASK modulator and (b) coherent demodulator.

9
Chapter Two

2.2 Frequency-Shift Keying (FSK) Modulation


U

Frequency-shift keying (FSK) is a frequency modulation scheme in which digital


0T 0T 0T 0T 0T 0T

information is transmitted through discrete frequency changes of a carrier wave. 0T 0T

The simplest FSK is binary FSK (BFSK). BFSK uses a pair of discrete frequencies to
0T 0T 0T 0T 0T 0T 0T 0T 0T 0T 0T 0T

transmit binary (0s and 1s) information


2.2.1 Binary Frequency-Shift Keying (BFSK)
U

A binary frequency-shift keying (BFSK) signal can be defined by

where A is a constant, f 0 and f 1 are the transmitted frequencies, and T is the bit
R R R R

duration. The signal has a power P = A2/2, so that A = 2P . Thus equation can be P P

written as

where E = PT is the energy contained in a bit duration. For orthogonality, f 0 = m/T R R

and f 1 = n/T for integer n > integer m and f 1 - f 0 must be an integer multiple of
R R R R R

2 2 th
1 / 2 T. We can take φ 1 ( t) = cos 2π f 0 t and φ 2 ( t ) =
R R sin 2π f 1 t as e R R R R R R

T T
orthonormal basis functions . The applicable signal constellation diagram of the
orthogonal BFSK signal is shown in Figure 2.8.

10
Chapter Two

Figure 2.8: Orthogonal BFSK signal constellation diagram.

Figure 2.9: (a) Binary sequence, (b) BFSK signal, and (c) binary modulating and
BASK signals.

11
Chapter Two
It can be seen that phase continuity is maintained at transitions. Further, the BFSK
signal is the sum of two BASK signals generated by two modulating signals m 0 (t)
and m 1 (t). Therefore, the Fourier transform of the BFSK signal s(t) is

An alternative representation of the BFSK signal consists of letting f 0 = f c - f and f 1

= f c + f. Then

f1 - f0 = 2 f

and

s(t) = Acos2π( f c + f)t

where f c is the carrier frequency, f = β B is the frequency deviation, β is the


modulation index, and B = 1/T is the bandwidth of the modulating signal. When
f >> 1/T, we have a wideband BFSK signal. The bandwidth is approximately equal
to 2 f. When f << 1/T , we have a narrowband BFSK signal. The bandwidth is
approximately equal to 2B.
12
Chapter Two

Figure 2.10 shows the modulator and coherent demodulator for BFSK signals.

Figure 2.10: (a) BFSK modulator and (b) coherent demodulator

13
Chapter Two

1.2.2M-ary Frequency-Shift Keying (M -FSK)

An M-ary frequency-shift keying (M-FSK) signal can be defined by

for i = 0, 1, ..., M - 1. Here, A is a constant, f i is the transmitted frequency, θ' is the


initial phase angle, and T is the symbol duration. It has a power P = A2/2, so that
A = 2P. Thus equation (24.6) can be written as

where E = PT is the energy of s(t) contained in a symbol duration for i = 0, 1, ...,


M - 1. For convenience, the arbitrary phase angle θ' is taken to be zero. functions.
Figure 2.11 shows the signal constellation diagram of an orthogonal 3-FSK signal.

Figure 2.11: Orthogonal 3-FSK signal constellation diagram.


14
Chapter Two

Figure 2.12 shows the 4-FSK signal generated by the binary sequence 00 01 10 11.

Figure 2.12: 4-FSK modulations: (a) binary signal and (b) 4-FSK signal.

15
Chapter Two

Figure 2.13: (a) M-FSK modulator and (b) coherent demodulator.

16
Chapter Two

2.3 Phase-Shift Keying (PSK) Modulation


Phase-shift keying (PSK) is a digital modulation scheme that conveys data by
changing, or modulating, the phase of a reference signal (the carrier wave). Any
digital modulation scheme uses a finite number of distinct signals to represent
digital data

2.3.1Binary Phase-Shift Keying (BPSK)

A binary phase-shift keying (BPSK) signal can be defined by

s(t) = A m(t) cos 2πf c t, 0<t<T

where A is a constant, m (t) = +1 or -1, f c is the carrier frequency, and T is the bit
duration. The signal has a power P = A2/2, so that A = 2P .

Figure 2.14: BPSK signal constellation diagram.

17
Chapter Two

Figure 2.15: (a) Binary modulating signal, and (b) BPSK signal.

Figure 2.16 (a) Modulating signal, (b) Spectrum of (a), and (c) spectrum of BPSK
signals.

18
Chapter Two

2.3.2 M-ary Phase-Shift Keying (M - PSK)

An M-ary phase-shift keying (M-PSK) signal can be defined by

for i = 0, 1, ..., M - 1. Here, A is a constant, f c is the carrier frequency, θ' is the initial
phase angle, and T is the symbol duration. By expanding equation (23.3), we have

where E = PT is the energy of s(t) contained in a symbol duration for i = 0, 1, ...,


M - 1. For convenience, the arbitrary phase angle θ' is taken to be zero. If we take
φ 1 (t) = 2 cos 2πf c t and φ 2 (t) = - 2 sin 2πf c t as the orthonormal basis functions,
T T
the applicable signal constellation diagrams of the M-PSK and 4-PSK signals are
shown in Figure 2.17.

Figure 2.17: (a) M-PSK and (b) 4-PSK signal constellation diagrams.

Figure 2.18 shows the 4-PSK signal sequence generated by the binary sequence 00
01 10 11.
19
Chapter Two

Figure 2.18: 4-PSK modulation: (a) binary sequence and (b) 4-PSK signal.

20
Chapter Two

Figure 2.19 shows the modulator and a possible implementation of the coherent
demodulator for M-PSK signals [3, 4].

Figure 2.19: (a) M-PSK modulator, and (b) coherent demodulator.

21
Chapter Three
Modeling of Digital
Communication System
Chapter Three

3.1. Modeling using Matlab m-file


Using Matlab Code for modeling the modulation process and Bit Error Rate performance

3.1. BASK Modulation


The output of the Matlab code for BASK modulation shown in figure (3.1) has the following
parameters: Carrier frequency=8 with Message frequency=4

Figure 3.1: BASK Modulation

3.1.2. BFSK Modulation


The output of the Matlab code for BFSK modulation shown in figure (3.2) has the following
parameters: 1st Carrier frequency=16, 2nd Carrier frequency=8 with Message frequency=4

Figure 3.2: BFSK Modulation

22
Chapter Three

3.1.3. BPSK Modulation


The output of the Matlab code for BPSK modulation shown in figure (3.3) has the following
parameters: Carrier frequency=8 with Message frequency=4

Figure 3.3: BPSK Modulation

3.1.4. QPSK Modulation


The output of the Matlab code for QPSK modulation shown in figure (3.4) has the following
parameters: Carrier frequency=8

Figure 3.4: QPSK Modulation

23
Chapter Three

3.1.5. 8PSK Modulation


The output of the Matlab code for 8PSK modulation shown in figure (3.5) has the following
parameters: Carrier frequency=8 with Message input= [0 2 5 1 6 3 4 7]

Figure 3.5: 8PSK Modulation

24
Chapter Three

Bit Error Rate (BER) Using Matlab m-file


3.1.6. BPSK BER
The output of the Matlab code for BPSK BER shown in figure (3.6) has the following
parameters: SNR from 1 to 20, Number of Bit=1000000 and Energy Bit=1

Figure 3.6: BPSK Bit Error Rate

3.1.7. QPSK BER


The output of the Matlab code for QPSK BER shown in figure (3.7) has the following
parameters: SNR from 1 to 20 , Number of Bit=1000000 and Energy Bit=1

Figure 3.7: QPSK Bit Error Rate

25
Chapter Three

3.1.8. 8PSK BER


The output of the Matlab code for 8PSK BER shown in figure (3.8) has the following
parameters: SNR from 1 to 20 , Number of Bit=1000000 and Energy Bit=1

Figure 3.8: 8PSK Bit Error Rate

26
Chapter Three

3.2 . Modeling using Matlab Simulink


Using Matlab Simulink for modeling the modulation process and Bit Error Rate
performance by using the following block parameter showing in table 3.1

Name of the block Name of the parameter BPSK | QPSK | PSK


Random Integer M-ary Number 2|4|8
Generator Initial Seed 37
Sample Time 1
Sample per Frame 1e6
Output data type Double

BPSK modulator M-ary Number 2 | 4| 8


Baseband Phase offset (rad) Pi/2 | Pi/4 | Pi/8
Constellation ordering Binary
Input Type Integer
Output Type Double

AWGN Channel Initial Seed 37


Mode Signal to Noise Ratio
Eb/No (dB) (Eb/No)
Number of bit per Symbol EbNodB
Input Signal Power (Watt) 1
Symbol Period 1

MPSK Demodulator M-ary Number 2|4|8


Baseband Phase offset (rad) Pi/2 | Pi/4 | Pi/8
Constellation ordering Binary
Output Type Integer

Error Rate Receive Delay 0


Calculation Computation Delay 0
Computation Mode Entire Frame
Output Data Workspace
Variable Name BER_DATA
Stop Simulation Checked
Target Number of Errors Inf
Maximum Number of 1e6
Symbols

Table 3.1: Input Parameter Table of the Matlab Simulink Block

27
Chapter Three

3.2.1. BPSK Simulink


The Matlab Simulink block diagram of the for BPSK shown in figure (3.9) with transmitted
and received bits in figure (3.10) and the BER performance in figure (3.11)

Figure 3.9: BPSK Block Diagram

Figure 3.10: BPSK Transmitted and Received Bits

Figure 3.11: BPSK BER Performance

28
Chapter Three

3.2.2. QPSK Simulink


The Matlab Simulink block diagram of the for QPSK shown in figure (3.12) with transmitted
and received bits in figure (3.13) and the BER performance in figure (3.14)

Figure 3.12: QPSK Block Diagram

Figure 3.13: QPSK Transmitted and Received Bits

Figure 3.14: QPSK BER Performance


29
Chapter Three

3.2.3. 8PSK Simulink


The Matlab Simulink block diagram of the for QPSK shown in figure (3.15) with transmitted
and received bits in figure (3.16) and the BER performance in figure (3.17)

Figure 3.15: 8PSK Block Diagram

Figure 3.16: 8PSK Transmitted and Received Bits

Figure 3.17: 8PSK BER Performance

30
Chapter Three

3.2.4. TCM
The Matlab Simulink block diagram of the for TCM shown in figure (3.18) with the BER
performance in figure (3.19)

Figure 3.18: TCM Block Diagram

Figure 3.19: TCM BER Performance

31
Chapter Three

3.3. Convolutional Encoder TCM


A Convolutional encoder accepts a sequence of n bits and it produces at its output 𝑙
binary coded digits at any time. In general, a convolutional encoder with a memory
of L bits may be considered as a finite-state machine (or finite memory system
rather than memory less system, as in the case of the block encoder) with 2𝑙
possible states. The state of the encoder at any time instant is determined by the
contents of its store (delay unit) at that time instant.

Let the n input digits form the n-component vector

𝑎𝑖 = [𝑎𝑖,1 𝑎𝑖,2 . . . . . . . . . 𝑎𝑖,𝑛 ] . . . . . . (3.1)

And let the 𝑙 output digits form the 𝑙-component vector

𝛽𝑖 =[ 𝛽𝑖,0 𝛽𝑖,1 . . . . . . . . .𝛽𝑖,𝑙−1] . . . . . . (3.2)

Also let the state of the encoder be defined as the L-component vector

𝜇𝑖 =[ 𝜇𝑖,0 𝜇𝑖,1 . . . . . . . . .𝜇𝑖,𝐿−1 ] . . . . . . (3.3)

Where the binary digits 𝛼𝑖,ℎ ,𝛽𝑖,ℎ and 𝜇𝑖,ℎ may take any one of their two possible
values 0 and 1.

The operation of the convolutional encoder may now be described as follows: for
each input sequence 𝛼𝑖 ,the encoder generates the sequence 𝛽𝑖 at its output ,while
changing its state from 𝜇𝑖 to its next state 𝜇𝑖+1 .since for every n input bits , 𝑙 bits are
produced by the encoder ,so the rate of the convolutional encoder is R=n/ 𝑙.

As an example, Figure (3.20) shows a 4-state convolutional the minimum squared


Euclidean distance sometime called the free Euclidean distance is defined as

𝑑12 =𝑀𝑖𝑛𝑖=𝑗 . |𝑆𝑖 -𝑆𝑗 |2 for all I,j . . . . . .(3.4)

Where 𝑆𝑖 and 𝑆𝑗 assume all valid pairs of coded sequences that the convolutional
encoder/modulator combination can produce and excludes all the cases whrer the
two sequences are identical . and |𝑆𝑖 -𝑆𝑗 | is the unitary distance between the two
sequences 𝑆𝑖 and 𝑆𝑗

The asymptotic coding gain of the coded system over the corresponding uncoded
system is given by

𝐺𝑐 (dB)=10𝐿𝑜𝑔10 (𝑑𝑓2 /𝑑𝑢𝑛


2
) . . . . . . (3.5)

32
Chapter Three

Where 𝑑𝑓 is given by Eq. 3.4, and 𝑑𝑢𝑛 is the minimum Euclidean distance of the
uncoded system .Here Eq.3.5 assume that the average transmitted signal energy of
the coded and uncoded system is the same.

For an example to find the 𝑑𝑓 and 𝐺𝑐 for a coded 4-PSK signal with signal
constellation (M=4) .let us consider the encoder in Figure (3.21) and its state-
transition diagram in Figure(3.22).

The 𝑑𝑓 can be calculated by assuming the correct state as the all-zero state.

𝑑𝑓2 =𝑑 2 (0,3)+ 𝑑 2 (0,0)+ 𝑑 2 (0,2) . . . . . . (3.6)

=2+0+4=6

Where 𝑑2 (i,j) is the square Euclidean distance between the signal points i and j ,
and I (or j) is the decimal representation of the output coded digits.

The asymptotic coding gain of the coded 4-PSK ( in this example) over the uncoded
2
2-PSK with 𝑑𝑢𝑛 =4 is

𝐺𝑐 = 10 𝐿𝑜𝑔10 (6/4)=1.7609 dB . . . . . . (3.7)

Thus an advantage of about 1.76 dB in tolerance to AWGN can be obtain with coding

3.3.2. Viterbi Decoder


The Viterbi decoding technique is one approach to the maximum likelihood
detection of convolutional codes In general, the Viterbi decoder operates by tracing
through a trellis identical to that at the encoder in an attempt to emulate the
encoder’s behavior. At any given instant the decoder does not know the state of the
encoder and does not try to decode this immediately . The decoder examines all
possible branches to each state in the trellis stage. For each state .it computes a
likelihood score, known as the branch cost (branch metric), from the received data
and the data corresponding to each branch.

Each state has associated with it accost, which is the sum of the surviving
branches cost up to that state (the surviving branches are the branches which
produce the smallest new state cost). To determine the surviving branches, the
branches cost is added to the state cost in the previous stage of the trellis.

After evaluating a number of stages of the trellis the surviving paths in the
latest stage will originate (with a high probability) from a single state in the first

33
Chapter Three

stage of the trellis. After this. The most likely state of the encoder in the first stage
will be known, and hence it can be deduced the original input data, even though a
decision has not yet been made for the latest

Figure 3.20: Four-State, rate ½ convolutional encoder

Figure3.21: General Structure of TCM

34
Chapter Three

State at Input at Output at State at


time iT time iT time iT Time(i +1)T
𝜇𝑖 𝛼𝑖 𝛽𝑖 𝜇𝑖+1
0 0 0 0
1 3 1
1 0 0 2
1 3 3
2 0 1 1
1 2 0
3 0 1 3
1 2 2

Table3.2: Truth Table of the convolutional encoder

Figure 3.22: State-transition diagram of the encoder i

Figure 3.23: Model of combined encoding and modulation

35
Chapter Three

Figure3.24: calculation the minimum free distance of the encoder in Figure (3.20)

Figure 3.25: Trellis diagram of the encoder assuming the initial and terminal states
are zero

36
Chapter Three

3.4. Integrating Matlab with C# GUI

37
Chapter Three

38
Chapter Three

39
Chapter Three

40
Chapter Four
Conclusion
Chapter Four

Conclusion

In this project presents, error performance of modulation


techniques with AWGN channel are analyzed and BER is
calculated. Based on numerical calculation, the BER of BPSK,
QPSK, 8PSK and TCM was graphically plotted and compared.
The real measurements have achieved the results which have
accepted. According to this work, a performance of different
modulation techniques and channel coding is analyzed on the
basis of BER over AWGN channel. From the analysis of
different modulation techniques, we can say BPSK gives better
performance with compared to QPSK and 8PSK over AWGN
channel. Also we have limitation to increase Eb/No ratio.
Hence, for a fixed value of Eb/No, we have to use some kind of
coding to improve quality of the transmitted signal by using
Trellis Coded Modulation TCM which gives better BER
performance compared to uncoded modulation methods.

41
References

[1] B.P. Lathi: Modern Digital and Analog Communication, Oxford University
Press, New York, 1998

[2] Wayne Tomasi: Electronics Communications System, Prentice Hall, New


Jersey, 2004

[3] Madhow: Fundamentals of Digital Communication, Cambridge University


Press, New York, 2008

[4] Amos Gilat: MATLAB Introduction with Applications, Third Edition,


Department of Mechanical Engineering, The Ohio State University, Third
Edition,2008

[5] O. Beucher and M.Weeks. Introduction to MATLAB & Simulink: A Project


Approach, Third Edition, 2006

[6] Data transmission by trellis coded modulation using convolution codes


ISBN: 978-960-474-316-2, Martin Papez and Matej Cico,The Tomas Bata
University

42

View publication stats

You might also like