0% found this document useful (0 votes)
301 views

D. Y. Patil College of Engineering, Akurdi. Department of Electronics & Telecommunication

This document describes a MATLAB simulation of BPSK modulation and detection in noise. The simulation generates random binary data, maps it to BPSK symbols with 0 and 180 degree phases, adds noise, and detects the received symbols. It plots the constellations with and without noise and calculates bit error rate versus signal-to-noise ratio by comparing the transmitted and received bits. The simulation results verify that BER decreases with increasing SNR as expected for BPSK.

Uploaded by

Sukanya
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)
301 views

D. Y. Patil College of Engineering, Akurdi. Department of Electronics & Telecommunication

This document describes a MATLAB simulation of BPSK modulation and detection in noise. The simulation generates random binary data, maps it to BPSK symbols with 0 and 180 degree phases, adds noise, and detects the received symbols. It plots the constellations with and without noise and calculates bit error rate versus signal-to-noise ratio by comparing the transmitted and received bits. The simulation results verify that BER decreases with increasing SNR as expected for BPSK.

Uploaded by

Sukanya
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/ 9

DYPOCE, Akurdi

D. Y. Patil College of Engineering, Akurdi.


Department of Electronics & Telecommunication
Name: Sukanya Kale Date: 17/11/2021
Roll No.: TEA110 PRN: 72018160H

Experiment No: 02
Simulation Study of performance of BPSK receiver in presence of noise.

Aim: To write a MATLAB program for Simulation study of performance of BPSK Receiver
in presence of noise.

Software: MATLAB/ OCTAVE

Theory:

In binary phase shift keying (BPSK) phase of the sinusoidal carrier is changed according to
the data bit to be transmitted, the carrier phase is changed between 0° and 180°.It uses two
phases which are separated by 180° and so can also be termed 2-PSK.

For generation of BPSK first the binary data signal (0s and 1s) is converted into a NRZ
signal. The graphical representation of BPSK is as shown in figure 1.

Figure 1

TE E&TC (2019 Pattern) Digital Communication


DYPOCE, Akurdi

Block Diagram:

Transmitter:

Receiver:

TE E&TC (2019 Pattern) Digital Communication


DYPOCE, Akurdi

BPSK Waveform:

Signal Space Representation or Constellation diagram of BPSK:

Signal space representation of signals is a very effective and useful tool in the analysis of
digitally modulated signals. Any set of signals is equivalent to a set of vectors. A set of m
vectors is said to be orthonormal if the vectors are orthogonal and each vector has a unit
norm. With the help of signal space representation it is possible to signals used in
communications can be expressed and visualized graphically.

BPSK Constellation without Noise BPSK Constellation with Noise

TE E&TC (2019 Pattern) Digital Communication


DYPOCE, Akurdi

Algorithm:
1. Generate random input bit pattern.
2. Generate BPSK signal by assigning 0°phase shift to the 0 bit and 180°phase shift to 1
bit.
3. Plot constellation of BPSK signal without noise.
4. Define signal to noise ratio from 0 to 30 dB
5. Calculate sigma value as sqrt(10.0^(-SNR/10.0))
6. Generate noisy BPSK signal using sigma (noise variance)
7. Plot constellation of BPSK signal with noise.
8. To find the number of errors compare the original BPSK signal with the noisy BPSK
signal.
9. Find bit error rate by dividing the number of bits in error by the total number of bits
transmitted.
10. Repeat the process for various values of signal-to-noise ratio.
11. Plot the graph of BER vs SNR.

MATLAB Functions:

MATLAB Program:
clc;
clear all;
close all;
nr_data_bits=10000;

b_data=(randn(1,nr_data_bits))>.5;
b=[b_data];

d=zeros(1,length(b));
for n=1:length(b)
if(b(n)==0)
d(n)=exp(j*2*pi);
end

TE E&TC (2019 Pattern) Digital Communication


DYPOCE, Akurdi

if(b(n)==1)
d(n)=exp(j*pi);
end
end
bpsk=d;

figure(1);
plot(d,'o');
axis([-2 2 -2 2]);
grid on;
xlabel('real');
ylabel('image');
title('BPSK constellation without noise');

SNR=0:30;
BER1=[];
SNR1=[];
for SNR=0:length(SNR);
sigma=sqrt(10.0^(-SNR/10.0));

snbpsk=(real(bpsk)+sigma.*randn(size(bpsk)))+i.*(imag(bpsk)+sigma*randn(size(bpsk)));

figure(2);
plot(snbpsk,'o');
axis([-2 2 -2 2]);
grid on;
xlabel('real');
ylabel('imag');
title('Bpsk constellation with noise');

%receiver
r=snbpsk;

TE E&TC (2019 Pattern) Digital Communication


DYPOCE, Akurdi

bhat=[real(r)<0];
bhat=bhat(:)';
bhat1=bhat;

ne=sum(b~=bhat1);
BER=ne/nr_data_bits;
BER1=[BER1 BER];
SNR1=[SNR1 SNR];
end
figure(3);
semilogy(SNR1,BER1,'-*');
grid on;
xlabel('SNR=Eb/No(db)');
ylabel('BER or SER');
title('Simulation of BER/SER for BPSK with Gray coding');
legend('BER-simulated','SER-simulated');

Screenshots:

1. Editor Widow

TE E&TC (2019 Pattern) Digital Communication


DYPOCE, Akurdi

2. BPSK Constellation without noise

TE E&TC (2019 Pattern) Digital Communication


DYPOCE, Akurdi

3. BPSK Constellation with noise

4. BER Vs SNR plot

TE E&TC (2019 Pattern) Digital Communication


DYPOCE, Akurdi

Conclusion:

In this experiment we studied about performance of BPSK Receiver in presence of noise.

TE E&TC (2019 Pattern) Digital Communication

You might also like