Digital Communication
Digital Communication
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
Course & Semester T.E. (ETRX) – Sem. V Subject Name Digital Communication
Laboratory
Aim of Experiment :
To perform simulation of ASK, FSK and PSK and observe the output signal waveform for randomly
Theory:
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
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
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.
1 +1V +1V 0V
0 -1V 0 +1V
Mapped CO:
CO4: Code and decode the digital data using different coding techniques.
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=[Ik:P], where Ik 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].
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.
FR. CONCEICAO RODRIGUES COLLEGE OF ENGINEERING
Department of Electronics Engineering
Department of Electronics Engineering
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)
i) Compare the Euclidean distance, hence noise immunity of 16-QAM with that of 16-
ary PSK signal.
DC PPT BY 8251,8123,8260