0% found this document useful (0 votes)
12 views6 pages

Bit Error Probability 3.4

Uploaded by

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

Bit Error Probability 3.4

Uploaded by

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

BIT ERROR PROBABILITY

For BPSK Modulation over AWGN and RAYLEIGH Fading Channels

Done By:
NABEEL FARHAN ‘202070232’

Supervisor By:
D. MOHAMMED AL-SARABI
Table of Contents
Table of Contents ......................................................................................1
1. Introduction.........................................................................................2
2. Equations for BPSK Modulation ......................................................2
2.1. AWGN Channel..................................................................................... 2
2.2. Rayleigh Fading Channel ....................................................................... 3
3. Flowchart .............................................................................................3
4. THE MATLAB CODE .......................................................................5

1|Page
1. Introduction
In this project, we will dive into the analysis of Binary Phase Shift
Keying (BPSK) modulation under two typical channel models: Additive
White Gaussian Noise (AWGN) & Rayleigh fading.
Through MATLAB simulations, we aim to illustrate the bit error
probability performance of BPSK modulation, comparing how the signal
withstands the different challenges posed by these channels. This
comparison not only demonstrates the resilience of BPSK modulation
under varying conditions but also showcases the effectiveness of diversity
techniques in managing signal degradation.

FIGURE 3.4: Bit error probability for BPSK modulation over AWGN and Rayleigh fading channels.

2. Equations for BPSK Modulation


Here are the key equations expressing the bit error probability (BEP) for
BPSK modulation under different channel conditions:

2.1. AWGN Channel

𝟏 𝜸𝒃
𝑷𝒃 = (𝟏 − √ )
𝟐 𝟏 + 𝜸𝒃

This equation shows the probability of a bit error in an AWGN


channel, emphasizing how error probability decreases as SNR (𝜸𝒃 )
increases.

2|Page
2.2. Rayleigh Fading Channel
𝟏 𝜸𝒃
𝑷𝒃 = (𝟏 − √ )
𝟐 𝟐 + 𝜸𝒃

Adjusts for Rayleigh fading by considering a reduced effective


SNR, indicating a higher bit error probability under similar
conditions compared to AWGN due to fading effects.
These equations highlight the impact of SNR on communication system
performance, underscoring the challenges posed by noise and fading in
wireless environments.

3. Flowchart
This is the flowchart to guide the MATLAB code for calculating and
plotting the bit error probability for BPSK modulation over AWGN and
Rayleigh fading channels:
1) Start
o Begin the process.
2) Initialize Variables
𝑬𝒃
o Define ( ) range (in dB): This is the range of signal-to-noise
𝑵𝟎

ratio values for which you want to calculate the bit error
probability.
𝑬𝒃
o Convert ( ) from dB to linear scale.
𝑵𝟎

3) Calculate Average SNR per Bit (𝜸𝒃 )


o Use the formula (𝜸𝒃 = 𝟏𝟎(𝑬𝒃 ⁄𝑵𝟎 𝒅𝑩)
).
4) Calculate Bit Error Probability for AWGN
o Use the formula:

𝟏 𝜸𝒃
𝑷𝒃 = (𝟏 − √ )
𝟐 𝟏 + 𝜸𝒃

3|Page
5) Calculate Bit Error Probability for Rayleigh Fading:
o Use the formula:

𝟏 𝜸𝒃
𝑷𝒃 = (𝟏 − √ )
𝟐 𝟐 + 𝜸𝒃

6) Plot Results
𝑬𝒃
o Plot ( ) versus (𝑷𝒃 ) for both AWGN and Rayleigh fading on a
𝑵𝟎

semilogarithmic scale.
o Label the axes and the graph.
7) End

This flowchart outlines the sequence of operations needed to simulate and


visualize the bit error probabilities under the two channel conditions
using MATLAB.

4|Page
4. THE MATLAB CODE
% Parameters
N = 10^6; % Number of bits or symbols
Eb_N0_dB = 0:25; % Range of Eb/N0 values (in dB)

% Generate random BPSK symbols


data = rand(1, N) > 0.5; % Random 0's and 1's
bpskSignal = 2 * data - 1; % Mapping: 0 -> -1; 1 -> 1

% Initialize BER arrays


BER_AWGN = zeros(1, length(Eb_N0_dB));
BER_Rayleigh = zeros(1, length(Eb_N0_dB));

% Simulation over the range of Eb/N0 values


for i = 1:length(Eb_N0_dB)
% AWGN Channel
% Calculate the noise standard deviation for AWGN
noiseStd = 1 / sqrt(2) * 10^(-Eb_N0_dB(i)/20);
noise = noiseStd * randn(1, N); % AWGN noise
receivedAWGN = bpskSignal + noise; % Received signal in AWGN
receivedDataAWGN = real(receivedAWGN) > 0; % Demapping: >0 -> 1, <0 -> 0
BER_AWGN(i) = sum(data ~= receivedDataAWGN) / N; % Calculate BER for AWGN
% Rayleigh Channel
h = 1 / sqrt(2) * (randn(1, N) + 1i * randn(1, N)); % Rayleigh fading
receivedRayleigh = h .* bpskSignal + noise; %Received signal in Rayleigh fading
receivedRayleigh = receivedRayleigh ./ h; % Equalize
receivedDataRayleigh = real(receivedRayleigh) > 0; % Demapping
BER_Rayleigh(i) = sum(data ~= receivedDataRayleigh)/N; % Calculate BER for Rayleigh
end

% Plotting
figure;
semilogy(Eb_N0_dB, BER_AWGN, 'b-', 'LineWidth', 2); hold on;
semilogy(Eb_N0_dB, BER_Rayleigh, 'r--', 'LineWidth', 2);
grid on; % Enable grid
grid minor; % Enhance grid
xlabel('γ_b (dB)', 'FontSize', 12); % X-axis label
ylabel('P_b', 'FontSize', 12); % Y-axis label
legend('AWGN Channel','Rayleigh Fading Channel','Location','northeast');%Add legend
axis([0 25 10^-5 1]); % Set axis limits
hold off; % Release the plot hold

5|Page

You might also like