Professional Documents
Culture Documents
In the
DEPARTMENT
OF
GAUHATI UNIVERSITY
Submitted by:
Priyanka Dutta(170101004)
INDEX
Page
SI.No Programs No. Date Sign
1.
To generate M-PSK (M=4, 8, 16) modulated signal and observe the
variation in the constellation diagram of the noisy signal 30/06/2020
3-10
2.
To plot the BER of M-PSK (M=2,4,8) signal and compared each with
theoretical plot of BER 30/06/2020
11-17
3.
To generate MPSK (M=2,4,8,16) modulated signal from binary bit
streams and compare the BER plots in AWGN. 30/06/2020
18-22
EXPERIMENT NO.-1
Aim:
To generate M-PSK (M=4, 8, 16) modulated signal and observe the variation in the constellation
Theory:
In binary data transmission, we can send only one of two possible signals during each bit interval Tb. In
M-ary data transmission, we can send one of M possible signals during each signaling interval T. In
almost all applications, M=2n and T=nTb ,where n is an integer. Each of the M signals is called a symbol.
These signals are generated by changing the amplitude, phase, frequency, or combined forms of a
carrier in M discrete steps. Thus, we get MASK,MPSK,MFSK and MQAM.
M-ary phase shift keying or MPSK is a modulation where data bits select one out of M phase shifted
versions of the carrier to transmit the data . Thus, M possible waveforms have the same amplitude,
frequency but different phases. The signal constellations consists of M equally spaced points on a circle.
M=2N
N is the number of bits necessary ,M is the number of conditions, levels, or combinations possible with
N bits.
The term additive white Gaussian noise (AWGN) originates due to the following reasons:
[Additive]- The noise is additive, i.e., the received signal is equal to the transmitted signal plus noise.
This gives the most widely used equality in communication systems.
[White] -Just like the white colour which is composed of all frequencies in the visible spectrum, white
noise refers to the idea that it has uniform power across the whole frequency band. As a consequence,
the Power Spectral Density (PSD) of white noise is constant for all frequencies ranging from −∞ to +∞
[Gaussian] -The probability distribution of the noise samples is Gaussian with a zero mean, i.e., in time
domain, the samples can acquire both positive and negative values and in addition, the values close to
zero have a higher chance of occurrence while the values far away from zero are less likely to appear.
A scatter plot or constellation diagram is used to visualize the constellation of a digitally modulated
signal. A constellation diagram is a representation of a signal modulated by a digital modulation scheme
such as quadrature amplitude modulation or phase-shift keying. It displays the signal as a two-
dimensional xy-plane scatter diagram in the complex plane at symbol sampling instants.We can display
the constellation diagram of the transmitted signal using scatterplot. Since the signal is oversampled at
the filter output, we need to decimate by the number of samples per symbol so that the scatter plot
does not show the transition path between constellation points. If the signal had a timing offset, we
could provide that as an input parameter to display the signal constellation with the timing offset
corrected.
Process diagram:
Algorithm:
5. Repeat steps 1 to 4 for various values of Signal to Noise Ratio and observe result.
Program Code:
clc;
clear all;
close all;
k=log2(M);
data_in=randi([0 M-1],n,1);
%step 2: modulation
data_m=pskmod(data_in,M);
data_ch=awgn(data_m, snr);
%step 4 scatterplot
sc=scatterplot(data_ch)
title(str);
Output:
a)M=2,SNR=10
b) M=4,SNR=15
c)M=8,SNR=20
d)M=16,SNR=25
Conclusion:
Thus the above MATLAB Code was executed and the required results were obtained fulfilling the
objective. We generated M-PSK (M=4, 8, 16) modulated signal and observed the variation in the
constellation diagram of the noisy signal
VIVA Questions:
Ans: A constellation diagram is a diagram that shows how the information in a digital modulation
scheme such as phase shift keying (PSK) is represented in a modulated carrier. It displays the signal as a
two dimensional xy-plane scatter diagram in the complex plane at symbol sampling instants. The angle
of a point, measured counter clockwise from the horizontal axis, represents the phase shift of the carrier
wave from a reference phase.
Ans: At low SNR, noise(denominator) is high. So when additive noise is high, the constellation points
scatter away from the actual value. More the noise, more will be the spread. Hence, constellation
diagram more scattered at lower values of SNR.
EXPERIMENT NO.-2
Aim:
b. To plot the BER of M-PSK (M=2,4,8) signal and compared each with theoretical plot of BER
Theory:
MPSK – It is a modulation where data bits select one of M phase shifted versions of the carrier to
transmit the data. Thus, the M possible waveforms all have the same amplitude and frequency but
different phases. The signal constellations consist of M equally spaced points on a circle.
AWGN - Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to
mimic the effect of many random processes that occur in nature. The modifiers denote specific
characteristics: Additive because it is added to any noise that might be intrinsic to the information
system.
SNR -Signal-to-noise ratio (abbreviated SNR or S/N) is a measure used in science and engineering that
compares the level of a desired signal to the level of background noise. SNR is defined as the ratio of
signal power to the noise power, often expressed in decibels.
BER -The bit error rate (BER) is the number of bit errors per unit time. The bit error ratio (also BER) is the
number of bit errors divided by the total number of transferred bits during a studied time interval. Bit
error ratio is a unitless performance measure, often expressed as a percentage.
Theoritical BER-We can determine the theoretical BER curve by using the berawgn function, berTheory
= berawgn(EbNoVec,'qam',M); Plot the estimated and theoretical BER data. The estimated BER data
points are well aligned with the theoretical curve.
Process Diagram:
Algorithm:
2. Reshape the data into binary k-tuples (k=log2M) and convert to interger using function bi2de
8. Create a loop in the program to obtain BER in the SNR range -10 dB to +10 dB
9. Compare and plot the simulated BER with the theoretical BER. Use berawgn.
Program Code :
clc;
clear all;
close all;
snr = [1:snr];
k=log2(M);
data_in=randi([0 1],n,1);
data_r=reshape(data_in , k,length(data_in)/k);
data_dec=bi2de(data_r');
%step 3: modulation
data_m=pskmod(data_dec,M);
BER=[];
for i=1:length(snr)
data_ch=awgn(data_m,snr(i));
%step 5 demodulation
data_demod=pskdemod(data_ch,M);
data_bin=de2bi(data_demod);
data_out=reshape(data_bin',length(data_in),1);
bb =bb/n;
End
ber=berawgn(snr,'psk',M,'nondiff');
semilogy(snr,BER,'LineWidth',2);
hold on
semilogy(snr,ber,'LineWidth',2);
legend('Simulated','Theoritical');
xlabel('SNR (dB)');
ylabel('BER')
title(scr);
Output:
a)M=2
b)M=4
c)M=8
Conclusion:
Thus the above MATLAB Code was executed and the required results were obtained. BER plot is also
obtained of M-PSK (M=2,4,8) signal and compared each with theoretical plot of BER.
Viva questions:
Ans The bit error ratio (also BER) is the number of bit errors divided by the total number of transferred
bits during a studied time interval. Bit error ratio is a unitless performance measure. The BER is
calculated by comparing the transmitted sequence of bits to the received bits and counting the number
of errors. The ratio of how many bits received in error over the number of total bits received is the BER.
This measured ratio is affected by many factors including: signal to noise, distortion, and jitter. The most
obvious method of measuring BER is to send bits through the system and calculate the BER.
Ans. Higher-order modulation schemes such as 16-QAM and 64-QAM require, in themselves, a higher
receiver Eb/N0 for a given error rate, compared to QPSK. However, in combination with channel coding,
the use of higher-order modulation will sometimes be more efficient, that is, require a lower receiver
Eb/N0 for a given error rate, compared to the use of lower-order modulation such as QPSK. This may,
for example, occur when the target bandwidth utilization implies that, with lower-order modulation, no
or very little channel coding can be applied. In such a case, the additional channel coding that can be
applied by using a higher order modulation scheme such as 16-QAM may lead to an overall gain in
power efficiency compared to the use of QPSK.
The use of rate 1/2 channel coding for 16-QAM obviously reduces the information data rate, and thus
also the bandwidth utilization, to the same level as uncoded QPSK. For a given signal-to-
noise/interference ratio, a certain combination of modulation scheme and channel coding rate is
optimal in the sense that it can deliver the highest bandwidth utilization (within a given bandwidth) for
that signal-to-noise/interference ratio. Thus, with higher order of modulation, BER is also higher.
Ans. With the increase in SNR, the BER decreases since the BER is inversely related to SNR.
e. What is the difference between the functions ‘plot’ and ‘semilogy’ in MATLAB?
Ans. Function ‘plot(X,Y)’ creates a 2-D line plot of the data in Y versus the corresponding values in
X,while ‘semilogy’ plots data with logarithmic scale for the y-axis. It creates a plot using a base 10
logarithmic scale for the y-axis and a linear scale for the x-axis. It plots the columns of Y versus their
index.
EXPERIMENT NO.-3
Aim:
To generate MPSK (M=2,4,8,16) modulated signal from binary bit streams and compare the BER plots in
AWGN.
Theory:
MPSK – It is a modulation where data bits select one of M phase shifted versions of the carrier to
transmit the data. Thus, the M possible waveforms all have the same amplitude and frequency but
different phases. The signal constellations consist of M equally spaced points on a circle.
AWGN- Additive white Gaussian noise (AWGN) is a basic noise model used in information theory to
mimic the effect of many random processes that occur in nature. The modifiers denote specific
characteristics: Additive because it is added to any noise that might be intrinsic to the information
system.
SNR- Signal-to-noise ratio (abbreviated SNR or S/N) is a measure used in science and engineering that
compares the level of a desired signal to the level of background noise. SNR is defined as the ratio of
signal power to the noise power, often expressed in decibels.
BER -The bit error rate (BER) is the number of bit errors per unit time. The bit error ratio (also BER) is the
number of bit errors divided by the total number of transferred bits during a studied time interval. Bit
error ratio is a unitless performance measure, often expressed as a percentage.
Theoritical BER- We can determine the theoretical BER curve by using the berawgn function, berTheory
= berawgn(EbNoVec,'qam',M); Plot the estimated and theoretical BER data. The estimated BER data
points are well aligned with the theoretical curve.
Process Diagram:
Algorithm:
2. Reshape the data into binary k-tuples (k=log2M) and convert to interger using function bi2de
8. Create a loop in the program to obtain BER in the SNR range -10 dB to +10 dB
9. Create a for loop and repeat previous steps to compare the BER for M=2,4,8,16
Program Code :
clc;
clear all;
close all;
M=[2 4 8 16];
for m=1:length(M)
k=log2(M(m));
data_in=randi([0 1],n,1);
data_r=reshape(data_in,k,length(data_in)/k);
data_dec=bi2de(data_r');
%step 3: modulation
data_m=pskmod(data_dec,M(m));
BER=[];
for i=1:length(snr)
data_ch=awgn(data_m,snr(i));
%step 5 demodulation
data_demod=pskdemod(data_ch,M(m));
data_bin=de2bi(data_demod);
data_out=reshape(data_bin',length(data_in),1);
bb=biterr(data_in,data_out);
end
semilogy(snr,BER,'LineWidth',2);
hold on;
BER1(m,:)=BER
end
legend('BPSK','QPSK','8PSK','16PSK');
title(scr);
Output:
FIGURE WINDOW
Conclusion:
The above MATLAB Code was executed thus fulfilling the objective and the required results were
obtained. We have generated MPSK (M=2,4,8,16) modulated signal from binary bit streams and
compared the BER plots in AWGN.
Viva Questions:
Ans. The Bit Error Rate increases with increase in constellation order.
Ans. The use of higher-order modulation provides the possibility for higher bandwidth utilization in
harsh radio environemnt, that is, the possibility to provide higher data rates within a given bandwidth.