You are on page 1of 7

ECE 4001 – Digital Communication Systems

Lab Task – 5

Name: Harshith C S

Reg No: 18BEC0585

Slot: L35+36
Title: Probability of Error Analysis – BASK, BPSK, BFSK
Date: 28/09/2020

Aim: To analyze the probability of error for different modulation technique for random
sequence of 10,000 symbols.

Theory:

In a binary transmission system, binary digits are represented by two pulse levels. The
binary digit 0 is represented by a signal of level 0 for the duration T of the transmission,
and the digit 1 is represented by the signal level A.

In the event of a noisy Gaussian channel (with high bandwidth) the signal at the receiver
may look as follows:

Here the binary levels at the receiver are nominally 0 (signal absent) and A (signal
present) upon receipt of a 0 or 1 digit respectively. The function of a receiver is to
distinguish the digit 0 from the digit 1. The most important performance characteristic of
the receiver is the probability that an error will be made in such a determination. This is
called probability of error.
1. BASK
Program:
clc
clear all
close all
%%BASK probablity of error
%%Initial
N=10^5;
SNR_db=[-15:2:5];
SNR=10.^(SNR_db/10);
SP=1;
NP=SP./SNR;
%%
symbols=rand(1,N)>0.5;
BASK_symb=sqrt(SP)*(symbols);
%AWGN NOISE
for i=1:length(SNR_db)
noise=1/sqrt(2)*(randn(1,N)+j*randn(1,N));
%%RECIEVER
y=BASK_symb+sqrt(NP(i))*noise;
symbols_hat=real(y)>0.5;
err=xor(symbols,symbols_hat);
nerr(i)=sum(err);
end
BER_sim=nerr/N;
BER_th=(1/2)*erfc(sqrt(SNR/4));

figure (1)
semilogy(SNR_db,BER_th,'m-','linewidth',3);
hold on
semilogy(SNR_db,BER_sim,'gs','MarkerSize',12, 'MarkerFaceColor','g');
grid on
legend('BER (Theoretical)', 'BER (Simulation)');
xlabel('SNR (dB)');
ylabel('Bit Error Rate (BER)');
title('Bit error rate (BER) in AWGN channels for BASK');
xlim([-15 5]);
Output:

2. BPSK
Program:
clc
clear all
close all
%%BPSK
%%Initial
N=10^5;
SNR_db=[-15:2:5];
SNR=10.^(SNR_db/10);
SP=1;
NP=SP./SNR;
%%
symbols=rand(1,N)>0.5;
BPSK_symb=sqrt(SP)*(2*symbols-1);
%AWGN NOISE
for i=1:length(SNR_db)
noise=1/sqrt(2)*(randn(1,N)+j*randn(1,N));
%%RECIEVER
y=BPSK_symb+sqrt(NP(i))*noise;
symbols_hat=real(y)>0;
err=xor(symbols,symbols_hat);
nerr(i)=sum(err);
end
BER_sim=nerr/N;
BER_th=qfunc(sqrt(2*SNR));

figure (1)
semilogy(SNR_db,BER_th,'m-','linewidth',3);
hold on
semilogy(SNR_db,BER_sim,'gs','MarkerSize',12, 'MarkerFaceColor','g');
grid on
legend('BER (Theoretical)', 'BER (Simulation)');
xlabel('SNR (dB)');
ylabel('Bit Error Rate (BER)');
title('Bit error rate (BER) in AWGN channels for BPSK');
xlim([-15 5]);

Output:

3. BFSK
Program:
clc
clear all
close all
%%BFSK
%%Initial
N=10^5;
SNR_db=[-12:2:6];
SNR=10.^(SNR_db/10);
SP=1;
NP=SP./SNR;
%%
symbols=rand(1,N)>0.5;
for k=1:length(symbols)
if symbols(k)==1
BFSK_symb(k)=1;
else
BFSK_symb(k)=1j;
end
end
%AWGN NOISE
for i=1:length(SNR_db)
noise=1/sqrt(2)*(randn(1,N)+j*randn(1,N));
%%RECIEVER
y=BFSK_symb+sqrt(NP(i))*noise;
symbols_hat=real(y)>imag(y);
err=xor(symbols,symbols_hat);
nerr(i)=sum(err);
end
BER_sim=nerr/N;
BER_th=(1/2)*erfc(sqrt(SNR/2));

figure (1)
semilogy(SNR_db,BER_th,'m-','linewidth',3);
hold on
semilogy(SNR_db,BER_sim,'gs','MarkerSize',12, 'MarkerFaceColor','g');
grid on
legend('BER (Theoretical)', 'BER (Simulation)');
xlabel('SNR (dB)');
ylabel('Bit Error Rate (BER)');
title('Bit error rate (BER) in AWGN channels for BFSK');
xlim([-12 6]);

Output:
Result: Analyzed the probability of error for different modulation technique for random
sequence of 10,000 symbols using MATLAB simulation

Verification Signature

You might also like