Sunteți pe pagina 1din 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

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 2 of 34

EXPERIMENT:-1
(A) Explain Measurement of information-Entropy?

1.1OBJECTIVE: Measurement of information and Entropy of a signal


Information Theory is a branch of probability theory which may be applied to the study of the
communication system. Information theory deals with mathematical modeling and analysis of a
communication system rather than with physical sources and physical channels. Entropy is a
measurement of uncertainty and average information content per source symbol. It is a way to
assign a score of uncertainty to a stochastic variable. Entropy is a key component of information
theory, a branch of mathematics designed to quantify information. Information entropy is a
concept from information theory. It tells how much information there is in an event. In general,
the more uncertain or random the event is, the more information it will contain. The concept of
information entropy was created by mathematician Claude Shannon. The information content of
the information source is known as the entropy of the source and is denoted by H(X).Sometimes
it is called average information content.Term Entropy is taken from thermodynamics. It is a
measure of average content per symbols emitted from the source.

Mathematical expression of entropy is:

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 )

Where, H ( X ) is referred as the entropy of the source X.

I ( x i ) is referred as the information content of a symbol xi .

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 3 of 34

(B)What do you understand by Channel model & Channel capacity?

1.2 OBJECTIVE: - Define Channel model & Channel capacity


Channel

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:

existence of line of sight path between the antennas

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

The signal attenuation as it travels through the medium

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).

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 4 of 34

In frequency domain, the convolution operation becomes multiplication operation

Channel model

Lossless channel:-it can be defined as the channel matrix with only one non-zero element in
each column of the matrix.

Figure 1: Lossless Channel

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

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 5 of 34

A 1 p p
[ P ( )]
B p 1 - p

Figure -2: Binary symmetric channel

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

However for other types of noise, the expression is modified.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 6 of 34

(C) How analog modulations differ from digital modulation techniques?

1.3 OBJECTIVE: Difference analog modulations and digital modulation techniques


Modulation: Modulation is a process through which audio, video, image or text information is
added to an electrical or optical carrier signal to be transmitted over a telecommunication or
electronic medium. Modulation enables the transfer of information on an electrical signal to a
receiving device that demodulates the signal to extract the blended information . We can
modulate the information bearing signal into two types namely. These are called Modulation
Techniques.

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.

There are three main types of analog modulation:

(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.

Figure - 3: 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.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 7 of 34

Figure - 4: 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.

Figure 5: Phase modulation


DIGITAL MODULATION
When the carrier amplitude is varied in proportion to message signal m(t). We have the
modulated carrier m(t)coswct where coswct is the carrier signal. As the information is an on-off
signal the output is also an on-off signal where the carrier is present when information is 1 and
carrier is absent when information is 0. Thus this modulation scheme is known as on-off keying
(OOK).
There are three digital modulation techniques

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.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 8 of 34

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


information is transmitted through discrete frequency changes of a carrier wave. The simplest
one is binary frequency shift keying.

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.

Figure 6: wave of ask, fsk, psk,

ANALOG MODULATION DIGITAL MODULATION


The techniques such as AM, FM and PM falls The techniques such as Ask, FSk , PSk and
under this modulation. QAM falls under this form of modulation.
More noise immunity with low security less noise immunity with high security
Transmission error detection and correction is Transmission error detection and correction is
so complex. simple.
Analog modulation is a continuous modulator Digital modulation are discrete time modulator
which represents physical measurements. generated by digital modulation.
Analog modulation consumes less bandwidth. Digital modulation consumes more bandwidth.
Low cost and portable Cost is high and not easily portable

(D) What do you understand by channel coding systems? Explain its types?

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 9 of 34

1.4 OBJECTIVE: Define channel coding system with its types


Channel Coding

Channel coding is a technique used in digital communications to ensure a transmission is


received with minimal or no errors. The various coding methods that can be employed are
achieved by interweaving additional binary digits into the transmission. When decoded on the
receiving end, the transmission can be checked for errors that may have occurred and, in many
cases, repaired. Other times, the recipient simply asks for the transmission again. Channel
Coding is a method to replace 'original data bits' with 'some other bits (normally longer than the
original bits)'. In communication system, we usually call 'the original data' as a 'message' and call
the encoded data as 'Code word'. In all encoding process, the length of Code word is greater than
the length of 'message', in means that in coding process some additional bits are added to the
original data and this additional bits are called 'redundancy bits'

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.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 10 of 34

Figure 7: Shannon-Fano coding

Calculation:

Xi P(Xi) Step1 Step2 Step3 Step4 Coad Lengt


h
X1 0.03 0 0 00 2
X2 0.25 0 1 01 2
X3 0.20 1 0 10 2
X4 0.12 1 1 0 110 3
X5 0.08 1 1 1 0 1110 4
X6 0.05 1 1 1 1 1111 4
5

H(X)= p ( xi ) log 2 p(xi) =2.36 b/symbol


i=1

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

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 11 of 34

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.

1.5 OBJECTIVE: Application with use of digital modulation technique


Wireless communications is the best example of digital modulation technique. Digital
modulation schemes contribute to the evolution of communications by increasing the capacity,
speed as well as the quality of the wireless network. In communication, the concept of
modulation is a prime factor, available bandwidth, permissible power and inherent noise level of
the system are the constraints which should be considered while developing the communication
systems. Due to error-free capability in digital modulation, it is preferred over the analogue
modulation techniques. Applications

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 12 of 34

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.

Pulse code modulation is used in mobile phones, normal telephones etc.

Remote controlled cars, planes, trains use pulse code modulations

Figure 8: Basic block diagram of digital modulation application


1.6 CONCLUSION:
An overview of the information and calculate the entropy of the information. Every
message in our daily life has some information. Information is related with the
probability of occurrence of event.
Channel model is a path of transfer of information from one end to another end. Capacity
is the transfer rate of bit per second.
In analog there is a need of extra carrier signal and it has so many loss in our daily life in
reference to digital modulation technique like response, economically. Digital modulation

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 13 of 34

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.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 14 of 34

Figure - 9: Free space Path loss


The FSPL path loss calculation only look at the path itself and do not contain any factors relating
to the transmitter power, antenna gains or the receiver sensitivity levels.

Free space path loss formula

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

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 15 of 34

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

Pt and Pr are the transmitted and received power, in same units

Gt and Gr are the transmit and receive antenna gains, dimensionless quantities

is the signal wavelength (in meter).

d is the distance between transmitter and receiver (in meter).

Assuming gain as unity, the free space path loss is

2 2
P 4d 4df
FSPL t
Pr c

Decibel version of free space path loss equation

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

FSPL(dB ) 20 log 10 (d ) 20 log 10 ( f ) 32.44

Where

D is the distance of the receiver from the transmitter (Km)

F is the frequency (MHz)

Effect of antenna gain on path loss equation

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

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 16 of 34

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.

FSPL(dB ) 20 log 10 (d ) 20 log 10 ( f ) 32.44 Gt Gr

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

Gt = Gain of the transmitter antenna

Pt = Transmitted power

Gr = Gain of the received antenna

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

2.5 Matlab program

clc; % to clear command window

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 17 of 34

clear all; % to clear command window

close all; % to deletes all figures

d=0:0.1:4; % distance

f=input('Enter the Value of Frequency (MHz) =') %input frequency

Pt=input('Enter the Value of Transmitted Power =')%input transmitted power

Gt=input('Enter the Value of Transmitter Gain =') % input transmitter gain

Gr=input('Enter the Value of Receiver Gain =') % input receiver gain

fprintf('The free space path loss') % print on command window

FSPL=((20*log10(d))+(20*log10(f))+32.44) % FSPL formula

fprintf('The received Power') % print on command window

Pr=Pt+Gt+Gr-FSPL % power received formula

plot(d,Pr) % graph between pr and d

title('Received Power') % title of graph

xlabel('distance') % label distance

ylabel('Power') % label power

grid('on') % grid representation

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 18 of 34

2.6 Result

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 19 of 34

Figure - 11: Obtained Graph

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.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 20 of 34

EXPERIMENT:-3
3.1OBJECTIVE: MATLAB code for BPSK, QPSK, & 16QAM digital modulation schemes.

3.2 THEORY:

Binary Phase-shift keying (BPSK)


Binary Phase-shift keying (BPSK) is a digital modulation scheme that conveys data by changing,
or modulating, two different phases of a reference signal (the carrier wave). This gives maximum
phase-separation between adjacent points and thus the best immunity to corruption. They are
positioned on a circle so that they can all be transmitted with the same energy. It is digital
modulation technique. As mentioned in the constellation diagram binary 1 and binary 0 are
represented by different carrier phases each is 180 degree apart. The simplest BPSK scheme uses
two phases to represent the two binary digits and is known as binary phase-shift keying.

Figure 12: BPSK


This is regarded as the most robust digital modulation technique and is used for long distance
wireless communication. BPSK modulation technique in most of the adaptive modulation
technique adopted in cellular communication.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 21 of 34

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

When n=1, the phase shift is 45 degrees.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 22 of 34

Figure - 13: QPSK

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.

S(t)= d1(t) cos(2*pi*fc*t)+ d2(t) sin(2*pi*fc*t)


Quadrature amplitude modulation is widely used in many digital data radio communications and
data communications applications. A variety of forms of QAM are available and some of the
more common forms include 16 QAM, 32 QAM, 64 QAM, 128 QAM, and 256 QAM.

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.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 23 of 34

Figure 14: Graphical presentation of 16 QAM

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 24 of 34

3.3 ALGORITHM:

Start MATlab

Click on Editor Window called as new script

Write MATlab code in editor window

Save and run the program

If error is found, cross check the program

Run MAT lab code and get desired result

3.4 MATLAB CODE:


% BPSK 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]

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 25 of 34

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');

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 26 of 34

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');

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 27 of 34

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);

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 28 of 34

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)

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 29 of 34

no_of_bits = 100000; % total no of bits = 100,000


EbNo = 10; %dBs
Fs=2; %output message sampling frequency
% The Transmitter%
x = randint(no_of_bits,1); % 100,000 random binary 1's and 0's
figure;
subplot(211);
stem(x(1:40)) ;% a stem of first 60 bits.
title('(1st 40 out of 100,000) Message Bits');%defining title of the graph
xlabel('Bits-->'); %defining x-axis
ylabel('Bit value'); %defining y-axis
% symbol generation
r=reshape(x,k,length(x)/k)';
xsym=bin2dec(num2str(r));
% Stem of first 10 Symbols
subplot(212);
stem(xsym(1:10));
title('(1st 10 out of 25,000)Message Symbols'); %defining title of the graph
xlabel('Symbols-->'); %defining x-axis
ylabel('Magnitude'); %defining y-axis
% 16-QAM %
t_x = dmodce(xsym,1,Fs, 'qask',M); %the transmitted signal, s(t)
%the Channel%
SNR = EbNo + 10*log10(k);
r_x = awgn(t_x,SNR,'measured'); % the received Signal, r(t)=s(t)+no_of_bits(t)
% Scatter Plot of received signal
h = scatterplot(r_x,1,1);
grid
title('Received Signal Constellation');
axis([-5 5 -5 5]);

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

Figure 15: Graph of the BPSK signal


The graph of the QPSK signal

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 30 of 34

Figure 16: Graph of QPSK


The graph of the 16QAM signal

(1st 40 out of 100,000) Message Bits


1
Bit value

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-->

Figure 17: 16 QAM

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 31 of 34

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.2 DETAILED THEORY:


Constant envelope modulations such as FSK, GFSK, MSK, GMSK and nonlinearly filtered ISI-
free modulations offer not only enhanced spectral efficiency in systems, they also provide an
inherent transmitted power advantage. All constant envelope modulations allow a transmitters
power amplifiers to operate at or near saturation levels. On the other hand, standard BPSK,
QPSK, QAM and even /4-DCQPSK modulations contain AM components in the modulated
envelope, which require from 3 to 6 dB of back off (from saturation) in the output power
amplifier to reduce or eliminate spectrum splatter of sideband components that might cause
Adjacent Channel Interference(ACI).

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 32 of 34

4.3 ALGORITHM

Start MATlab

Click on Editor Window called as new script

Write MATlab code in editor window

Save and run the program

If error is found, cross check the program

Run MAT lab code and get desired result

4.4 MATLAB CODE


clc;
clear all;
close all;
echo on
T=1;
M=8
Es=T/2;
fc=6/T;
N=100;
delta_T=T/(N-1);
t=0:delta_T:T;
u0=sqrt(2*Es/T)*cos(2*pi*fc*t);
u1=sqrt(2*Es/T)*cos(2*pi*fc*t+2*pi/M);
u2=sqrt(2*Es/T)*cos(2*pi*fc*t+4*pi/M);
u3=sqrt(2*Es/T)*cos(2*pi*fc*t+6*pi/M);

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 33 of 34

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:

Figure 18: Graph of 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.

Level 3 Asia Pacific Institute of Information Technology 2016


CE00036-3-Data Communication Systems Individual Assignment Page 34 of 34

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]

Level 3 Asia Pacific Institute of Information Technology 2016

S-ar putea să vă placă și