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

NAME: MEHERZAD AIBARA ROLL NO:8251

DIGITAL COMMUNICATION
Index
1. To simulate ASK in Matlab
2 To simulate FSK in Matlab
3 To simulate PSK in Matlab
4 To simulate Linear Block Code in Matlab
5 To simulate scatterplot in QAM
6. Assignment 1
7. Assignment 2
8 Seminar report

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
FR. CONCEICAO RODRIGUES COLLEGE OF ENGINEERING  
Department of Electronics Engineering  

NAME: MEHERZAD AIBARA ROLL No: 8251

​Course, Subject & Experiment Details

Academic Year 2020 – 2021 Estimated Time 02 Hours

Course & Semester T.E. (ETRX) – Sem. V Subject Name Digital Communication
Laboratory

Unit No. 04 Chapter Title Digital Modulation Techniques

Experiment Type MATLAB Simulation

Aim of Experiment :

To perform simulation of ASK, FSK and PSK and observe the output signal waveform for randomly

generated input digital data bit patterns

Theory:

Amplitude shift keying (ASK) ​- is a modulation process, which imparts to a sinusoid


two or more discrete amplitude levels. These are related to the number of levels
adopted by the digital message. For a binary message sequence there are two levels, one
of which is typically zero.
The data rate is a sub-multiple of the carrier frequency. Thus, the modulated
waveform consists of bursts of a sinusoid. One of the disadvantages of ASK,
compared with FSK and PSK, for example, is that it has not got a constant envelope.
This makes its processing (e.g. power amplification) more difficult, since linearity
becomes an important factor.

Frequency-shift keying (FSK) ​is a frequency modulation scheme in which digital information is
transmitted through discrete frequency changes of a carrier wave.
The simplest FSK is binary FSK (BFSK). BFSK uses a pair of discrete frequencies to
transmit binary (0s and 1s) information. With this scheme, the "1" is called the mark
frequency and the "0" is called the space frequency.
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).
PSK uses a finite number of phases; each assigned a unique pattern of binary digits.
Usually, each phase encodes an equal number of bits. Each pattern of bits forms the symbol
that is represented by the particular phase.
The demodulator, which is designed specifically for the symbol-set used by the
modulator, determines the phase of the received signal and maps it back to the symbol
it represents, thus recovering the original data. The following diagram shows ASK, FSK
and PSK waveforms

A​mplitude Shift Keying (ASK):

pi=3.14;

f=10;

f2=5;

phi=pi;

x=[1 0 1 1 0 1 1 1 0 1];

nx=size(x,2);

i=1;
while i<=nx

t = i:0.01:i+1;

if x(i)==1

aask=sin(2*pi*f*t);

else

aask=0;
end

subplot(3,1,1);

plot(t,aask);

hold on;

grid on;

axis([1 10 -2 2]);

i=i+1;

end

Frequency-Shift Keying:

pi=3.14;

f=10;

f2=5;
phi=pi;

x=[1 0 1 1 0 1 1 1 0

1]; nx=size(x,2);

i=1;

while i<=nx

t = i:0.01:i+1;

if x(i)==1

fsk=sin(2*pi*f*t);
else

fsk=sin(2*pi*f2*t);

end

subplot(3,1,2);

plot(t,fsk);

hold on;

grid on;

axis([1 10 -2 2]);

i=i+1;

end

Phase Shift Keying (PSK):


pi=3.14;

f=10;

f2=5;

phi=pi;

x=[1 0 1 1 0 1 1 1 0 1];

nx=size(x,2);

i=1;

while i<=nx

t = i:0.01:i+1;
if x(i)==1

psk=sin(2*pi*f*t);

else

psk=sin(2*pi*f*t+phi);

end
subplot(3,1,1);

plot(t,psk);

hold on;

grid on;

axis([1 10 -2 2]);

i=i+1;

end

Conclusion:
In conclusion, we observe 3 different types of shift keying techniques, with amplitude, phase and
frequency. We notice how change is noticeable due to variations in amplitude, phase and
frequency.
Post lab questions

1. Explain the difference between DPSK and BPSK with suitable waveforms.

Ans.

2.Draw the transmitter of BFSK and Explain in brief.


i) In BFSK, frequency of the carrier is shifted according to binary symbol phase which is
unaffected.
ii) The level shifter shifts binary voltage.
iii) Due to the inverter, at any instant, output of only one multiplier will be present.
Hence, at adder output, we will get one output of only one oscillator at a time.
b(t) d(t) P​H​(t) P​L(​t)

1 +1V +1V 0V

0 -1V 0 +1V

The multiplier outputs are added to get BFSK signal.

V​BFSK​(t) = ​√​2P​S​cos [ ​ω​c​(t) + d(t) ​Ω​t]

Ω​=frequency shift of transmitted signal will have frequency of F​H​ ​+ F​L


FR. CONCEICAO RODRIGUES COLLEGE OF
ENGINEERING
Department of Electronics Engineering

Expt 4: MATLAB Simulation of Linear Block Codes

Timeline (3) Understanding (4) Neatness (3) Total (10)

Name and Roll No. of the Student​: MEHERZAD AIBARA; 8251


Academic Year 2020 – 2021 Estimated Time​

mester T.E. (ETRX) – Digital Communication


ect Name Laboratory

Unit No. 05 Chapter Title Error Control Codes

Experiment Type MATLAB Simulation

Mapped CO:
CO4: Code and decode the digital data using different coding techniques.

Aim & Objective of Experiment​:


To design and implement encoder for Linear Block Codes.

Apparatus:  
MATLAB 7.0 or higher version

Theoretical Description:  

In coding theory a linear code is an error-correcting code for which any linear combination of
codewords is also a codeword. Linear codes allow for more efficient encoding and decoding
algorithms than other codes. Linear codes are used in forward error correction and are
applied in methods for transmitting symbols (e.g., bits) on a communications channel so
that, if errors occur in the communication, some errors can be corrected or detected by the
recipient of a message block. The codewords in a linear block code are blocks of symbols
that are encoded using more symbols than the original value to be sent. These basis
codewords are often collated in the rows of a matrix G known as a generating matrix for the
code ​C​. When G has the blockmatrixformG=[I​k​:P], where I​k ​denotes the(​kx​ ​k​) 
identity matrix and P is (​k)​x​(n-k) ​parity matrix, then we say G is in standard form. The
code words are generated using the relation, c=[M]*[G].

Experimental Procedure​ :  

i) Write MATLAB code to generate the codewords using Parity Matrix. G =

[ 1000101; 0100110; 0010101; 0001011 ];

m1 = input( 'Enter The Message One = ' )

m2 = input( 'Enter The Message Two = ' )

m3 = input( 'Enter The Message Three = ' )

m4 = input( 'Enter The Message Four = ' )

c1 = xor(m1,m2);

cb1 = xor(c1,m3);

display( cb1 )

cb2 = xor(m2,m4);

display( cb1 )

c3 = xor(m1,m3);

cb3=xor(c3,m4);

display(cb3)
Conclusion:  
We’ve written a suitable MATLAB code such that we generate code words using Parity Matrix by 
xoring the message bits to produce our desired outputs.  

Post Lab Questions:  


1. For a (7,4) linear block code generate all possible code words for the following :-
p​1​=m​1​+m​2​+m​3​,p​2​=m​1​+m​3​+ m​4, ​p3​ ​=m​1​+m​2​+ m​4
2. ​Explain what do you mean by systematic block code & non-systematic block code?

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
FR. CONCEICAO RODRIGUES COLLEGE OF ENGINEERING  
Department of Electronics Engineering  
Department of Electronics Engineering

Course, Subject & Experiment Details


Timeline (3) Understanding (4) Neatness (3) Total (10)

N​ ame and Roll No. of the Student​: ​MEHERZAD AIBARA , 8251


Academic Year 2020 – 2021 Estimated Time

SSemester- T.E. (ETRX) – Sem. Subject Name- Digital Communication


Laboratory

Unit No. 03 Chapter Title Digital Modulation


Techniques

Experiment Type Software


Performance

Aim & Objective of Experiment​ :


To observe the constellation diagram of QAM using MATLAB

Theoretical Description:
The Quadrature Amplitude Modulation is a digital modulation where the information is
contained into the phase as well as the amplitude of transmitted carrier. In the 8 QAM the data are
divided into the group of 3 bits (tribit). One of which varies the amplitude of carrier, the rest two
the phase. The modulated signal can take 4 different phases and 2 different amplitudes, for a total
of 8 different states.

A generator of 8 QAM signals for 3 bit symbol is shown in Figure 1. For 8 QAM the main
data source is divided into 3 bits called I bit, Q bit and C bit. These 3 bits are called TRIBIT.
These tribits together generate a symbol. We can have 8 possible symbols. Among the 3 bits I & Q
bit is responsible for phase modulation and the last bit (C bit) performs the amplitude modulation.
The effect of each symbol on the final QAM signal is shown in the table below.
Binary Input 8-QAM outputs

I Q C Amplitude Phase
0 0 0 2V 180

0 0 1 4V 180

0 1 0 2V 90

0 1 1 4V 90

1 0 0 2V 270

1 0 1 4V 270

1 1 0 2V 0

1 1 1 4V 0

Experimental Procedure​ :

Write Matlab program to generate constellation diagram for 16 symbols and 256 symbols

For 16 Symbols:

M = 16;
x = (0:M-1)';

y = qammod(x,M);

scatterplot(y)

For 256 Symbols:


​M = 256;
x = (0:M-1)';
y = qammod(x,M);
scatterplot(y)
Figure 1: QAM Transmitter and Receiver block diagram with connections

Figure 2: QAM Modulator


Post Lab Questions:

i) Compare the Euclidean distance, hence noise immunity of 16-QAM with that of 16-
ary PSK signal.
DC PPT BY 8251,8123,8260

You might also like