CE00036-3-Data Communication Systems Individual Assignment Page 1 of 34
CE00036-3-Data Communication Systems Individual Assignment Page 1 of 34
CE00036-3-Data Communication Systems Individual Assignment Page 1 of 34
Table of Contents
EXPERIMENT:-1..........................................................................................................................2
1.1OBJECTIVE: Measurement of information and Entropy of a signal....................................2
1.2 OBJECTIVE: - Define Channel model & Channel capacity.................................................3
1.3 OBJECTIVE: Difference analog modulations and digital modulation techniques..............5
1.4 OBJECTIVE: Define channel coding system with its types..................................................8
1.5 OBJECTIVE: Application with use of digital modulation technique..................................11
EXPERIMENT:- 2.......................................................................................................................12
2.1 Aim.......................................................................................................................................12
2.2 Objective..............................................................................................................................12
2.3 Theory..................................................................................................................................12
2.4 Algorithm.............................................................................................................................15
2.5 Matlab program....................................................................................................................16
2.6 Result...................................................................................................................................17
2.7 Conclusion...........................................................................................................................18
EXPERIMENT:- 3.......................................................................................................................19
3.1 OBJECTIVE........................................................................................................................19
3.2 THEORY..............................................................................................................................19
3.3 ALGORITHM:.....................................................................................................................22
3.4 MATLAB CODE:................................................................................................................22
3.5 RESULT:..............................................................................................................................27
3.6 CONCLUSION:...................................................................................................................29
EXPERIMENT:- 4.......................................................................................................................29
4.1 OBJECTIVE........................................................................................................................29
4.2 THEORY..............................................................................................................................29
4.3 ALGORITHM......................................................................................................................30
4.4 MATLAB CODE.................................................................................................................30
4.5RESULT:...............................................................................................................................31
4.6 CONCLUSION:...................................................................................................................31
REFRENCES:-.........................................................................................................................32
EXPERIMENT:-1
(A) Explain Measurement of information-Entropy?
m
H ( X )= P ( x i ) . I ( xi )
i=1
1
I ( x i )=log 2
P ( xi )
So,
m
1
H ( X )= P ( x i ) . log 2
i=1 P ( xi )
The medium between the transmitting antenna and the receiving antenna is generally
termed as channel. In wireless transmission, the characteristics of the signal changes as it
travels from the transmitter to the receiver. The signal characteristics are due to several
phenomena:
reflection, refraction and diffraction of the signal due to the objects in between the
antennas
The relative motion between the transmitter and receiver and the objects in between them
Noise The received signal can be obtained from the transmitter signal if we can
accurately model the channel in between the antennas.
It is quite difficult to model the real world environment. Scientists and engineers have studied
various environments and provide us with a way to model the various medium that approximate
the real world environments. Consider a channel with impulse response h(t) between the
transmitter and receiver antenna. In addition to the channel impulse response, the transmitted
signal x(t) is also corrupted by the additive noise component n(t). The received signal y(t) is
obtained by the convolution of h(t) and x(t) added with the noise component n(t).
Channel model
Lossless channel:-it can be defined as the channel matrix with only one non-zero element in
each column of the matrix.
Deterministic channel: it can be defined as the channel matrix with only one non-zero element
in each row of the matrix.
Noiseless channel: - it can be called as noiseless if it is both lossless and deterministic. The input
and output alphabets are of the same size=n for the noiseless channel.
Binary symmetric channel:-it can be defined as the diagram as shown below and its channel
matris is given by
A 1 p p
[ P ( )]
B p 1 - p
Channel capacity
Information theory channel capacity is the tight upper bound on the rate at
which information can be reliably transmitted over a communications channel. The bandwidth
and the noise power has restriction upon the rate of information that can be transmitted by a
channel.in a channel which is distributed by a white Gaussian noise ,one can transmit the
information at a rate of C bits per second ,where c is known as the channel capacity. It can be
given as
S
C B log 2 (1 )
N
B=channel bandwidth in Hz
S=signal power
N=noise power
1. Analog Modulation
2. Digital Modulation
Analog modulations
Analog modulation refers to the process of transferring an analog baseband (low frequency)
signal, like an audio or TV signal over a higher frequency signal such as a radio frequency band.
(1) Amplitude modulation (AM): The modulation in which the height (i.e., the strength or
intensity) of the signal carrier is varied to represent the data being added to the signal is called
amplitude modulation.
(2) Frequency modulation (FM): The modulation in which the frequency of the carrier waveform
is varied to reflect the frequency of the data is called frequency modulation.
(3) Phase modulation (PM): The modulation in which the frequency of the carrier waveform is
varied to reflect changes in the frequency of the data (similar but not the same as FM) is called
phase modulation.
Amplitude-shift keying (ASK)- It is a form of amplitude modulation that represents digital data
as variations in the amplitude of a carrier wave. ASK uses a finite number of amplitudes, each
assigned a unique pattern of binary digits. Each pattern of bits forms the symbol that is
represented by the particular amplitude.
Phase-shift keying (PSK)- It is a digital modulation scheme that conveys data by changing or
modulating the phase of a reference signal or the carrier wave. Any digital modulation scheme
uses a finite number of distinct signals to represent digital data.
(D) What do you understand by channel coding systems? Explain its types?
Shannon-Fano coding:
ShannonFano coding, named after Claude Elwood Shannon and Robert Fano, is a technique for
constructing a prefix code based on a set of symbols and their probabilities. It is suboptimal in
the sense that it does not achieve the lowest possible expected code word length like Huffman
coding; however unlike Huffman coding, it does guarantee that all code word lengths are within
one bit of their theoretical ideal I(x) = log P(x). In ShannonFano coding, the symbols are
arranged in order from most probable to least probable, and then divided into two sets whose
total probabilities are as close as possible to being equal. All symbols then have the first digits of
their codes assigned; symbols in the first set receive "0" and symbols in the second set receive
"1". As long as any sets with more than one member remain, the same process is repeated on
those sets, to determine successive digits of their codes. When a set has been reduced to one
symbol, of course, this means the symbol's code is complete and will not form the prefix of any
other symbol's code. The algorithm works, and it produces fairly efficient variable-length
encodings; when the two smaller sets produced by a partitioning are in fact of equal probability,
the one bit of information used to distinguish them is used most efficiently. Unfortunately,
ShannonFano does not always produce optimal prefix codes.
Calculation:
p ( xi ) .
5
L= =2.38 b/symbol
i=1
H(X)
n= = 0.99=99%.
L
Huffman coding:
Huffman coding is a lossless data compression algorithm. The idea is to assign variable-length
codes to input characters, lengths of the assigned codes are based on the frequencies of
corresponding characters. The most frequent character gets the smallest code and the least
frequent character gets the largest code. The variable-length codes assigned to input characters
are Prefix Codes, means the codes (bit sequences) are assigned in such a way that the code
assigned to one character is not prefix of code assigned to any other character. A lossless data
compression algorithm which uses a small number of bits to encode common characters.
Huffman coding approximates the probability for each character as a power of 1/2 to avoid
complications associated with using a non-integral number of bits to encode characters using
their actual probabilities. Huffman coding works on a list of weights by building an extended
binary tree with minimum weighted external path length and proceeds by finding the two
smallest s, and , viewed as external nodes, and replacing them with an internal node of
weight . The procedure is them repeated stepwise until the root node is reached
Calculation:
(E)Explain the applications where digital modulation techniques are used with the help of
diagram.
Pulse code modulation is used in telecommunication systems, air traffic control systems
etc.
Pulse code modulation is used in compressing the data that is why it is used in storing
data in optical disks like DVD, CDs etc. PCM is even used in the database management
systems.
has proved its performance over the other two in the area of mobile communication
because of the spectral efficiency.
Channel coding is used to convert the data in code for the fast response and easy
availability of checking the error in the communication system.
Use of digital modulation techniques are being used everywhere like TV and clock and
it is very easy to understand and handle.
EXPERIMENT: - 2
Write a MATLAB program to determine the free space path loss and power received by antenna.
2.1 Aim
To determine the free space path loss and power received by an antenna.
2.2 Objective
The objective is to write a MATLAB program determine the free space path loss and power
received by an antenna using Matlab program.
2.3 Theory
Free space path loss
The free space path loss also known as FSPL is the loss in signal strength that occurs when an
electromagnetic wave travels over a line of sight path in free space. In these circumstances there
are no obstacles that might cause the signal to be reflected, refracted, or that might cause
additional attenuation.
The free space path loss formula or free space path loss equation is quite simple to use. Not only
is the path loss proportional to the square of the distance between the transmitter and receiver,
but the signal level is also proportional to the square of the frequency in use for other reasons
explained in a section below.
Figure - 10
The relation between the transmitter and receiver power is given by Friis free space equations
Pt Gt Gr 2
Pr (d )
(4 d ) 2 L
Where
Gt and Gr are the transmit and receive antenna gains, dimensionless quantities
2 2
P 4d 4df
FSPL t
Pr c
Most RF comparisons and measurements are performed in decibels. This gives an easy and
consistent method to compare the signal levels present at various points.
Accordingly it is very convenient to express the free space path loss formula, FSPL, in terms of
decibles as
Where
The equation above does not include any component for antenna gains. It is assumed that the
antenna gain is unity for both the transmitter and the receiver. In reality, though, all antennas will
have a certain amount of gain and this will affect the overall affect. Any antenna gain will reduce
the loss when compared to a unity gain system.
Where
Gt and Gr are the transmit and receive antenna gains relative to an isotropic source (db)
Power received
[ Pr ] [ Pt ] [Gt ] [G r ] [ PL ]
Where
Pr = Received power
Pt = Transmitted power
2.4 Algorithm
1. Enter the command window of the MATLAB.
2. Create a new M file by selecting File - New M File
3. Start typing the program on the editor window
a. Input value for Distance in km.
b. Input value for Frequency in MHzs
c. Input value for Transmitted Power.
d. Input value for Transmitter Gain.
e. Input value for Receiver Gain.
f. Put formula of free space path loss.
g. Put formula of power transmitted.
4. Save the program
5. Execute the program by pressing Tools Run
6. View the results on the command window
d=0:0.1:4; % distance
2.6 Result
2.7 Conclusion
Free space path loss and power received by an antenna is determined by MATLAB coding and it
is concluded that the received power is always lesser than the transmitted power due to free
space path loss.
EXPERIMENT:-3
3.1OBJECTIVE: MATLAB code for BPSK, QPSK, & 16QAM digital modulation schemes.
3.2 THEORY:
QPSK:
In digital modulation techniques a set of basic functions are chosen for a particular modulation
scheme. Generally the basic functions are orthogonal to each other. Basis functions can be
derived using Gram Schmidt orthorgonalization procedure. Once the basis function are chosen,
any vector in the signal space can be represented as a linear combination of the basic functions.
In Quadrature Phase Shift Keying (QPSK) two sinusoids (sin and cos) are taken as basic
functions for modulation. Modulation is achieved by varying the phase of the basic functions
depending on the message symbols. In QPSK, modulation is symbol based, where one symbol
contains 2 bits. The following equation outlines QPSK modulation technique.
2E s
S 1 (t ) cos( 2f c t (2n 1). / 4)
T
n=1,2,3,4
16QAM:
QAM stands for Quadrature Amplitude Modulation. It is digital modulation technique. This
modulation technique is a combination of both Amplitude and phase modulation techniques.
QAM is better than QPSK in terms of data carrying capacity. QAM takes benefit from the
concept that two signal frequencies one shifted by 90 degree with respect to the other can be
transmitted on the same carrier. For QAM, each carrier is ASK modulated hence at different
phases, further the data can be carried at different amplitudes.
QAM achieves a greater distance between adjacent points in the I-Q plane by distributing the
points more evenly. And in this way the points on the constellation are more distinct and data
errors are reduced. While it is possible to transmit more bits per symbol, if the energy of the
constellation is to remain the same, the points on the constellation must be closer together and
the transmission becomes more susceptible to noise. This results in a higher bit error rate than for
the lower order QAM variants. In this way there is a balance between obtaining the higher data
rates and maintaining an acceptable bit error rate for any radio communications system.
3.3 ALGORITHM:
Start MATlab
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end
message(i,:)=m_s;
bpsk_sig(i,:)=c.*m_s;
subplot(5,1,2);
axis([0 N -2 2]);
plot(t,message(i,:),'r');
title('message signal polar form');
xlabel('time');
ylabel('m(t)');
grid on;
hold on;
subplot(5,1,4);
plot(t,bpsk_sig(i,:));
title('bpsk signal');
xlabel('time');
ylabel('s(t)');
grid on;
hold on;
t1=t1+1.01;
t2=t2+1.01;
end
hold off;
subplot(5,1,1);
stem(m);
title('binary data bits');
xlabel('n');
ylabel('b(n)');
grid on;
subplot(5,1,3);
plot(t,c);
title('carrir signal')
xlabel('time');
ylabel('c(t)');
grid on;
% BPSK Demodulation
t1=0;
t2=Tb;
for i=1:N
t=[t1:.01:t2]
x=sum(c.*bpsk_sig(i,:));
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+1.01;
t2=t2+1.01;
end
subplot(5,1,5);
stem(demod);
title ('demodulated data');
xlabel ('n');
ylabel ('b(n)');
grid on
% QPSK modulation
clc;
clear all;
close all;
Tb=1;
t=0:Tb/100:Tb;
fc=2;
c=sqrt(2/Tb)*sin(2*pi*fc*t);
N=8;
m=rand(1,N);
t1=0;
t2=Tb;
for i=1:N;
t=[t1:.01:t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end
message(i,:)=m_s;
bpsk_sig(i,:)=c.*m_s;
subplot(5,1,2);
axis([0 N -2 2]);
plot(t,message(i,:),'r');
title('message signal polar form');
xlabel('time');
ylabel('m(t)');
grid on;
hold on;
subplot(5,1,4);
plot(t,bpsk_sig(i,:));
title('bpsk signal');
xlabel('time');
ylabel('s(t)');
grid on;
hold on;
t1=t1+1.01;
t2=t2+1.01;
end
hold off;
subplot(5,1,1);
stem(m);
title('binary data bits');
xlabel('n');
ylabel('b(n)');
grid on;
subplot(5,1,3);
plot(t,c);
title('carrir signal')
xlabel('time');
ylabel('c(t)');
grid on;
t1=0;
t2=Tb;
for i=1:N
t=[t1:.01:t2]
x=sum(c.*bpsk_sig(i,:));
if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+1.01;
t2=t2+1.01;
end
subplot(5,1,5);
stem(demod);
title ('demodulated data');
xlabel ('n');
ylabel ('b(n)');
grid on
clc;
clear all;
close all;
Tb=1;
t=0:(Tb/100):Tb; fc=1;
c1=sqrt(2/Tb)*cos(2*pi*fc*t);
c2=sqrt(2/Tb)*sin(2*pi*fc*t);%generate massage signal
N=8;
m=rand(1,N);
t1=0;
t2=Tb;
for i=1:2:(N-1)
t=[t1:(Tb/100):t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end %odd bits modulated signal
odd_sig(i,:)=c1.*m_s;
if m(i+1)>0.5 m(i+1)=1;
m_s=ones(1,length(t));
else
m(i+1)=0;
m_s=-1*ones(1,length(t));
end %even bits modulated signal
even_sig(i,:)=c2.*m_s; %qpsk signal
qpsk=odd_sig+even_sig; %plot the QPSK modulated signal
subplot(3,2,4);plot(t,qpsk(i,:));
title('QPSK signal');
xlabel('t');
ylabel('s(t)');
grid on;
hold on;
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
end
hold off %plot the binary data bits and carrier signal
subplot(3,2,1);
stem(m);
title('binary data bits');
xlabel('n');
ylabel('b(n)');
grid on;
subplot(3,2,2);
plot(t,c1);
title('carrier signal-1');
xlabel('t');
ylabel('c1(t)');
grid on;
subplot(3,2,3);
plot(t,c2);
title('carrier signal-2');
xlabel('t');
ylabel('c2(t)');
grid on; % QPSK Demodulation
t1=0;t2=Tb
for i=1:N-1
t=[t1:(Tb/100):t2]%correlator
x1=sum(c1.*qpsk(i,:));
x2=sum(c2.*qpsk(i,:));%decision device
if(x1>0&&x2<0)
demod(i)=1;
demod(i+1)=1;
elseif(x1>0&&x2<0)
demod(i)=1;
demod(i+1)=0;
elseif(x1<0&&x2<0)
demod(i)=0;
demod(i+1)=0;
elseif(x1<0&&x2>0)
demod(i)=0;
demod(i+1)=1;
end
t1=t1+(Tb+.01);
t2=t2+(Tb+.01);
end
subplot(3,2,5);
stem(demod);
title('qpsk demodulated bits');
xlabel('n');
ylabel('b(n)');
grid on;
% 16QAM Demodulation
clc; %clears all the input and output from the command window display.
clear all; % it removes all the variables from the memory
close all; % it closes all the open files in the window.
M = 16; %possible no. of messages or symbols
k = log2(M); % no of bits per code word (symbol)
3.5 RESULT:-
binary data bits
1
b (n )
0.5
0
1 2 3 4 5 6 7 8
n
message signal polar form
2
m (t)
0
-2
0 1 2 3 4 5 6 7 8
time
carrir signal
2
c (t)
0
-2
7 7.2 7.4 7.6 7.8 8 8.2
time
bpsk signal
2
s (t)
0
-2
0 1 2 3 4 5 6 7 8 9
time
demodulated data
1
b (n )
0.5
0
1 2 3 4 5 6 7 8
n
0.5
0
0 5 10 15 20 25 30 35 40
Bits-->
(1st 10 out of 25,000)Message Symbols
15
10
Magnitude
0
1 2 3 4 5 6 7 8 9 10
Symbols-->
3.6 CONCLUSION:
The graph is all about the modulation of the BPSK modulation technique. The first graph is of
data as source of any information or event. The second graph is of data in polar form. Similarly
for the third graph is of second carrier signal. The fourth graph is of the modulation of the signal
by BPSK modulation technique. The fifth graph is of demodulation of the BPSK signal and get
the same data as input data is given. Another graph shows the behavior of a data with two carrier
signal. The first graph is of data as source of any information or event. The second graph is
between the time and the carrier signal with different value at different time. Similarly for the
third graph is of second carrier signal. The fourth graph is of the modulation of the signal by
QPSK modulation technique. The fifth graph is of demodulation of the QPSK signal and get the
same data as input data is given. Last one graph is of the number of bits and the bit value of the
message signal. The second graph is the relation of the symbol of bits and the magnitude of the
bits value at a particular instant time.
EXPERIMENT:-4
4.1 OBJECTIVE:-Generate the constant-envelope PSK signal waveform for M=8, for
convenience the signal
4.3 ALGORITHM
Start MATlab
u4=sqrt(2*Es/T)*cos(2*pi*fc*t+8*pi/M);
u5=sqrt(2*Es/T)*cos(2*pi*fc*t+10*pi/M);
u6=sqrt(2*Es/T)*cos(2*pi*fc*t+12*pi/M);
u7=sqrt(2*Es/T)*cos(2*pi*fc*t+14*pi/M);
%Plotting Commands Follow%
subplot(8,1,1);
plot(t,u0);
subplot(8,1,2);
plot(t,u1);
subplot(8,1,3);
plot(t,u2);
subplot(8,1,4);
plot(t,u3);
subplot(8,1,5);
plot(t,u4);
subplot(8,1,6);
plot(t,u5);
subplot(8,1,7);
plot(t,u6);
subplot(8,1,8);
plot(t,u7);
4.5 RESULT:
4.6 CONCLUSION:
The graph is of this modulation of the signal at the different value of bit per sample as described
in the formula and get the required value of function at a constant magnitude of 1. Many graph
start from the lower level and some start from higher-level.
REFRENCES-:
Fas.org, (2016). Frequency Modulation. [online] Available at: http://fas.org/man/dod-
101/navy/docs/es310/FM.htm [Accessed 5th April. 2016].
Frenzel, L. (2016). Understanding Modern Digital Modulation Techniques |
Communications content from Electronic Design. [online] Electronicdesign.com.
Available at: http://electronicdesign.com/communications/understanding-modern-digital-
modulation-techniques [Accessed 6th April. 2016].
Physics.tutorvista.com, (2016). Modulation, Modulation Definition, Types of Modulation
| Physics@TutorVista.com. [online] Available at:
http://physics.tutorvista.com/waves/modulation.html [Accessed 7th April. 2016].
Princeton.edu, (2016). Phase modulation. [online] Available at:
http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Phase_modulation.html
[Accessed 8th April. 2016].
Radio-electronics.com, (2016). What is Phase Modulation | Definition Description |
Tutorial. [online] Available at: http://www.radio-electronics.com/info/rf-technology-
design/pm-phase-modulation/what-is-pm-tutorial.php [Accessed 4th April. 2016].
Searchnetworking.techtarget.com, (2016). What is pulse code modulation (PCM)? -
Definition from WhatIs.com. [online] Available at:
http://searchnetworking.techtarget.com/definition/pulse-code-modulation-PCM
[Accessed 5th April. 2016].
Slideshare.net, (2016). Pulse code modulation. [online] Available at:
http://www.slideshare.net/nsihag/pulse-code-modulation-17950725 [Accessed 4th April.
2016].
St-andrews.ac.uk, (2016). Frequency Modulation, Phase Modulation, and FM spectra.
[online] Available at: https://www.st-
andrews.ac.uk/~www_pa/Scots_Guide/RadCom/part12/page1.html [Accessed 5th April
2016]