0% found this document useful (0 votes)
125 views3 pages

Kathmandu University: School of Engineering

This document contains the source code to plot the bit error rate (BER) versus Eb/N0 for various digital modulation schemes including BPSK, QPSK, M-PSK, DPSK, DQPSK and M-QAM. The code calculates the theoretical BER expressions for each modulation and plots log10(BER) versus Eb/N0 from -4 to 24 dB. A legend and labels are added to the plot.

Uploaded by

sujeet.jha.311
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
125 views3 pages

Kathmandu University: School of Engineering

This document contains the source code to plot the bit error rate (BER) versus Eb/N0 for various digital modulation schemes including BPSK, QPSK, M-PSK, DPSK, DQPSK and M-QAM. The code calculates the theoretical BER expressions for each modulation and plots log10(BER) versus Eb/N0 from -4 to 24 dB. A legend and labels are added to the plot.

Uploaded by

sujeet.jha.311
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

KATHMANDU UNIVERSITY

SCHOOL OF ENGINEERING
DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

Assignment – 7
ETEG 432

Submitted by Submitted to
Sujeet Kumar Jha Annand Gacchadar
Group :- EEC Department of EEE
Roll no.:- 42009
Level: - UNG
4th year/2nd Semester

July 2017
1. Probability of BER Error log10(Pb) Vs Eb/N0 of modulation scheme BPSK, QPSK ,and QAM.

Source code
%biteerror rate nikalne bpskqpsk and qam
clc;
close all;
EbN0dB=-4:1:24;
EbN0lin=10.^(EbN0dB/10);
colors={'k-*','k-o','k-h','k-s','k-s','k-*','k-p','k:s','k:d','k:p'};
index=1;
%BPSK
BPSK = 0.5*erfc(sqrt(EbN0lin));
plotHandle=plot(EbN0dB,log10(BPSK),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
hold on;
index=index+1;
%M-PSK
m=2:1:5;
M=2.^m;
for i=M,
k=log2(i);
berErr = 1/k*erfc(sqrt(EbN0lin*k)*sin(pi/i));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
index=index+1;
end
%Binary DPSK
Pb = 0.5*exp(-EbN0lin);
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
index=index+1;
%Differential QPSK
a=sqrt(2*EbN0lin*(1-sqrt(1/2)));
b=sqrt(2*EbN0lin*(1+sqrt(1/2)));
Pb = marcumq(a,b)-1/2.*besseli(0,a.*b).*exp(-1/2*(a.^2+b.^2));
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
index=index+1;
%M-QAM
m=2:2:6;M=2.^m;
for i=M,
k=log2(i);
berErr = 2/k*(1-1/sqrt(i))*erfc(sqrt(3*EbN0lin*k/(2*(i-1))));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
index=index+1;
end
legend('BPSK','QPSK','8-PSK','16-PSK','32-PSK','D-BPSK','D-QPSK','4-QAM','16-
QAM','64-QAM');
axis([-4 24 -8 0]);
set(gca,'XTick',-4:1:24);
ylabel('Probability of BER Error - log10(Pb)');
xlabel('Eb/N0 (dB)');
title('Probability of BER Error log10(Pb) Vs Eb/N0');
OuTPUT

You might also like