“ EMPOWERMENT THROUGH TECHNOLOGICAL EXCELLENCE ”
GENBA SOPANRAO MOZE COLLEGE OF ENGINEERING
Balewadi, Pune- 411 045.
Department of Electronics and Telecommunications
Experiment No. – 4
Subject: - Mobile Computing
Name of the Student: Roll No.
Date: Marks & Signature:
-
Subject Teacher
Tittle: Simulate BER Performance over Rayleigh Fading wireless channel with BPSK Transmission
Problem Statement:
Simulate BER Performance over Rayleigh Fading wireless channel with BPSK Transmission for SNR 0 to
60 db..
Objectives:
What is a Rayleigh Fading
Study of BPSK transmission
Software Requirements:
Windows 7/10/11
Matlab
THEORY:
In this experiment, we will derive the theoretical equation for bit error rate (BER) with Binary Phase Shift
Keying (BPSK) modulation scheme in Additive White Gaussian Noise (AWGN) channel. The BER results
obtained using Matlab/Octave simulation scripts show good agreement with the derived theoretical
results.
With Binary Phase Shift Keying (BPSK), the binary digits 1 and 0 maybe represented by the analog
levels and respectively. The system model is as shown in the Figure below.
Channel Model
The transmitted waveform gets corrupted by noise , typically referred to as Additive White Gaussian
Noise (AWGN).
Additive : As the noise gets ‘added’ (and not multiplied) to the received signal
White : The spectrum of the noise if flat for all frequencies.
Gaussian : The values of the noise follows the Gaussian probability distribution
function, with and .
Computing the probability of error
Using the derivation provided
The received signal,
when bit 1 is transmitted and
when bit 0 is transmitted.
The conditional probability distribution function (PDF) of for the two cases are:
.
Figure: Conditional probability density function with BPSK modulation
Assuming that and are equally probable i.e. , the threshold 0 forms the
optimal decision boundary.
if the received signal is is greater than 0, then the receiver assumes was transmitted.
if the received signal is is less than or equal to 0, then the receiver assumes was transmitted.
i.e.
and
Probability of error given was transmitted.
With this threshold, the probability of error given is transmitted is (the area in blue region):
,
where,
Probability of error given was transmitted
Similarly the probability of error given is transmitted is (the area in green region):
.
Total probability of bit error
Given that we assumed that and are equally probable i.e. , the bit error
probability is,
Simulation model
Matlab /Octave source code for computing the bit error rate with BPSK modulation from theory
andsimulation. The code performs the following:
(a) Generation of random BPSK modulated symbols +1′s and -1′s
(b) Passing them through Additive White Gaussian Noise channel
(c) Demodulation of the received symbol based on the location in the constellation
(d) Counting the number of errors
(e) Repeating the same for multiple Eb/No value.
Matlab Code:
clear
N = 10^6 % number of bits or symbols
rand('state',100); % initializing the rand() function
randn('state',200); % initializing the randn() function
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
s = 2*ip-1; % BPSK modulation 0 -> -1; 1 -> 1
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % white gaussian noise, 0dB variance
Eb_N0_dB = [-3:10]; % multiple Eb/N0 values
for ii = 1:length(Eb_N0_dB)
% Noise addition
y = s + 10^(-Eb_N0_dB(ii)/20)*n; % additive white gaussian noise
% receiver - hard decision decoding
ipHat = real(y)>0;
% counting the errors
nErr(ii) = size(find([ip- ipHat]),2);
end
simBer = nErr/N; % simulated ber
theoryBer = 0.5*erfc(sqrt(10.^(Eb_N0_dB/10))); % theoretical ber
% plot
close all
figure
semilogy(Eb_N0_dB,theoryBer,'b.-');
hold on
semilogy(Eb_N0_dB,simBer,'mx-');
axis([-3 10 10^-5 0.5])
grid on
legend('theory', 'simulation');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('Bit error probability curve for BPSK modulation');
Result:
Conclusion: