In real-world wireless communication, the direct line-of-sight (LOS) path between transmitter and receiver is often blocked or unavailable. As a result, the transmitted signal experiences Rayleigh fading. This phenomenon arises from multipath propagation, where the signal reaches the receiver through several different paths with varying delays and phase shifts. While constellation diagrams primarily show the effects of Additive White Gaussian Noise (AWGN), multipath fading can heavily distort these diagrams. This distortion impacts the accuracy of symbol detection, leading to increased error rates and degraded system performance. To combat these challenges, communication systems employ techniques such as equalization and diversity methods to reduce the adverse effects of multipath fading.
MATLAB Simulation of Rayleigh Fading Impact on BPSK Constellation
// MATLAB code courtesy of SalimWireless.com
clc; clear; close all;
% Parameters
N = 10000; % Number of symbols
SNR = 20; % Signal-to-Noise Ratio in dB (for AWGN)
M = 2; % Modulation Order (2 for BPSK)
Fs = 100; % Sampling frequency (not used directly, but for clarity)
L = 4; % Oversampling factor
Rayleigh_factor = 0.5; % Rayleigh fading factor (scaling of fading)
% Generate random bits for BPSK
% BPSK Mapping: 0 -> -1 + 0j, 1 -> 1 + 0j (complex-valued with imaginary part 0)
data = randi([0 1], N, 1);
modData = (2*data - 1) + 0i; % Map 0 to -1 + 0j, 1 to 1 + 0j (complex)
% Upsample to simulate higher symbol rate
modData_upsampled = upsample(modData, L);
% Create Rayleigh fading channel (without division)
% Generate random fading gains for Rayleigh fading
rayleigh_fading = [0.8, 0.6];
% Apply Rayleigh fading to the modulated signal (only real part affected by fading)
fadedSignal = modData_upsampled .* rayleigh_fading;
% Assuming fadedSignal is a complex vector/matrix
% Add AWGN noise to both real and imaginary parts
noise = generateComplexGaussianNoise(length(fadedSignal));
% Normalize the noise (to match the noise power based on SNR)
snrLinear = 10^(SNR / 10); % Linear scale of SNR
noise = noise / sqrt(2 * snrLinear); % Normalize the noise
% Add the noise to the faded signal (real and imaginary components)
noisySignal = fadedSignal + noise;
threshold = 0.4;
idx = abs(noisySignal) > -threshold & abs(noisySignal) < threshold; % between -0.1 and 0.1 is just abs < 0.1
noisySignal(idx) = 0;
% Plot the constellation diagram
figure;
scatter(real(noisySignal), imag(noisySignal), '.');
title('Received Signal Constellation for BPSK (Rayleigh Fading + AWGN)');
xlabel('In-Phase');
ylabel('Quadrature');
axis equal;
grid on;
% Function to generate Complex Gaussian Noise
function noise = generateComplexGaussianNoise(size)
u1 = rand(size, 1); % Uniform random variables
u2 = rand(size, 1);
% Box-Muller transform to generate complex Gaussian noise
z1 = sqrt(-2 * log(u1)) .* cos(2 * pi * u2); % Real part
z2 = sqrt(-2 * log(u1)) .* sin(2 * pi * u2); % Imaginary part
noise = complex(z1, z2); % Combine real and imaginary parts
end
web('https://www.salimwireless.com/search?q=fading', '-browser');
Simulation Output
For, channel impulse response, h = [0.8, 0.6]
Fig: Constellation diagram of BPSK signal affected by Rayleigh fading and AWGN noise.
If you adjust the number of multipath components to one by changing the fading vector on line 20 from:
rayleigh_fading = [0.8, 0.6, 0.3];
to
rayleigh_fading = [1];
the output constellation will simplify as shown below:
(Rayleigh fading occurs when there is no direct line-of-sight (LOS) between the transmitter and receiver. For illustration purposes, we consider the channel coefficient , representing a flat fading channel without multipath effects.)
For, channel impulse response, h = [1]
Simplified constellation diagram with a single-path Rayleigh fading (effectively no fading).
You can also experiment by adjusting the SNR parameter in the code to observe how the constellation diagram accuracy changes for Binary PSK under Rayleigh fading conditions.