Experiment: Modeling and Simulation of a Multipath Fading Channel
Experiment: Modeling and Simulation of a Multipath Fading Channel
Aim
This experiment uses MATLAB to model and simulate a
Multipath Fading Channel
Theory
Multipath fading happens when a radio signal travels from a transmitter to a receiver via multiple paths, such as reflections from buildings, hills, or other objects
This phenomenon can cause a variety of problems, including:
Signal distortion
4 Phase distortion
5 Inter-symbol interference
6
Because of these potential issues, it's important to account for multipath fading when designing a radio communications system
Processing a Fading Channel Signal in MATLAB
To process a signal using a fading channel, you follow these steps
Create a channel System object: This is a MATLAB variable that contains information about the channel, such as the maximum Doppler shift
9 .Adjust properties: Modify the System object's properties as needed to model your specific channel
10 .Apply the channel model: Call the System object like a function to generate random path gains and filter the input signal
11 .
Program
% Rayleigh PDF
% Input section
N = 1000000; % Number of samples to generate
variance = 0.2; % Raleigh feeding envelope with the desired variance
x = randn(1, N);
y = randn(1, N);
r = sqrt(variance * (x.^2 + y.^2));
% Define bin steps and range for histogram plotting
step = 0.1;
range = 0:step:3;
% Get histogram values and approximate it to get the PDF curve
h = hist(r, range);
approxPDF = h / (step * sum(h));
% Simulation of PDF from the X and Y Samples
% Theoretical PDF from the Rayleigh fading equation
theoritical = (range / variance) .* exp(-range.^2 / (2 * variance));
% Plot the simulated and theoretical PDFs
plot(range, approxPDF, 'b', range, theoritical, 'r');
title('simulated and theoritical Rayleigh PDF from variance = 0.5');
legend('simulated PDF', 'Theoritical PDF');
xlabel('r...>');
ylabel('p(r)...>');
grid;
% PDF of phase of the Rayleigh envelope
theta = atan(y./x);
figure(2);
hist(theta); % Plot Histogram of the Phase
% Approximate the histogram of the phase part to a nice PDF curve
[counts, range] = hist(theta, 100);
step = range(2) * range(1);
approxPDF = counts / (step * sum(counts));
% Plot the simulated PDF from x and y samples
bar(range, approxPDF, 'b');
hold on;
plotHandle = plot(range, approxPDF, 'r');
set(plotHandle, 'Linewidth', 3.5);
axis([-2 2 0 max(approxPDF) + 0.2]);
hold off;
title('simulated PDF of phase of Rayleigh Distribution');
xlabel('theta...>');
ylabel('p(theta)...>');
grid;
Procedure
Start the MATLAB program
12 .Open a new M-file
13 .Type the program code
14 .Save the file in the current directory
15 .Compile and run the program
16 .View the output in the command window or figure window
17 .Stop the program
18 .
Result
The experiment successfully modeled and simulated a Multipath Fading Channel using MATLAB
Comments
Post a Comment