How to Model Vehicle-to-Vehicle channels using Rayleigh fading and Rician fading at different speeds?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm trying to model fading channels at different speeds (eg. 0, 20, 50 kph). I have the following V2V models as shown below but im not sure how to adapt them for specific vehicle speeds.
These are the parameters i use to initialize my model:
function chan = initchan(maxdop, kfactor, ChanChoice, fs)
%% Create channel objects for each vehicle
pathDelays = [0 117 183 333]*1e-9;
% avgPathGains = [0 -10 -15 -20];
% avgPathGains = [0 -8 -10 -15];
avgPathGains = [0 -1.5 -1.4 -3.6];
dopplerShifts = [0 maxdop maxdop*cosd(30) maxdop*cosd(100)];
numPaths = length(pathDelays);
RicianFactor = [kfactor zeros(1, length(pathDelays) - 1)];
% Maximum Doppler shift for all paths (identical)
fd = max(abs(dopplerShifts));
% Initialize Doppler spectrum cell
doppler_spec = cell(size(dopplerShifts));
% First tap is static (zero offset)
doppler_spec{1} = doppler('Asymmetric Jakes', [-.02 .02]);
% Remaining taps follow an Asymmetiric Jakes distribution (or "Half-Bathtub")
for ii = 2:length(dopplerShifts)
if fd ~= 0
doppler_spec{ii} = doppler('Asymmetric Jakes', sort([0 dopplerShifts(ii)/fd]));
else
doppler_spec{ii} = doppler("Asymmetric Jakes");
end
end
%%
if ChanChoice == "Rician"
chan = comm.RicianChannel();
chan.SampleRate = fs;
chan.NormalizePathGains = false;
chan.PathDelays = pathDelays;
chan.AveragePathGains = avgPathGains - [0 200*zeros(1, numPaths-1)];
chan.KFactor = RicianFactor;
chan.DopplerSpectrum = doppler_spec;
chan.MaximumDopplerShift = fd; % dopplerShift; % not sure if i need
chan.DirectPathDopplerShift = zeros(size(RicianFactor)); %110 at 20kph
chan.DirectPathInitialPhase = zeros(size(RicianFactor));
chan.PathGainsOutputPort = false;
chan.RandomStream = "mt19937ar with seed";
chan.Seed = 22;
return
end
if ChanChoice == "Rayleigh"
chan = comm.RayleighChannel();
chan.SampleRate = fs;
chan.NormalizePathGains = false;
chan.PathDelays = pathDelays;
chan.AveragePathGains = avgPathGains - [0 200*zeros(1, numPaths-1)];
chan.DopplerSpectrum = doppler_spec; % [{doppler('Jakes')}, dopplerSpectrum];
chan.MaximumDopplerShift = maxdop;
chan.PathGainsOutputPort = false;
chan.RandomStream = "mt19937ar with seed";
chan.Seed = 22;
return
end
if ChanChoice == "MIMO_Rician"
chan = comm.MIMOChannel();
chan.FadingDistribution = "Rician";
chan.KFactor = RicianFactor;
chan.SampleRate = fs;
chan.NormalizePathGains = false;
chan.PathDelays = pathDelays;
chan.AveragePathGains = avgPathGains - [0 200*zeros(1, numPaths-1)];
chan.DopplerSpectrum = doppler_spec; % [{doppler('Jakes')}, dopplerSpectrum];
chan.MaximumDopplerShift = maxdop;
chan.DirectPathDopplerShift = zeros(size(RicianFactor));
chan.DirectPathInitialPhase = zeros(size(RicianFactor));
chan.PathGainsOutputPort = false;
% chan.NumTransmitAntennas = 1;
% chan.NumReceiveAntennas = 1;
chan.TransmitCorrelationMatrix = eye(1);
chan.ReceiveCorrelationMatrix = eye(1);
chan.RandomStream = "mt19937ar with seed";
chan.Seed = 22;
end
if ChanChoice == "AWGN"
chan = [];
return
end
end
Any guidance would be appreciated
2 comentarios
Walter Roberson
el 30 de Sept. de 2023
It is not clear what your MATLAB question is? It looks more like you have an algorithm question ?
Respuestas (1)
Abhimenyu
el 13 de Oct. de 2023
Hi Matthew,
I understand that you want to incorporate vehicle speeds in your channel model. You can adapt your fading channel model based on the doppler shift associated with the vehicle’s speed which is given by the following formula mentioned below:
fd=(v/c)∗fc
Please refer to the following code changes that can be made to achieve the results:
- Updating the function input parameters to include the vehicle speed “speed_kph” and carrier frequency “carrier_frequency”. The parameter “maxdop” was removed to include the doppler shift of the vehicle speed.
function chan = initchan(speed_kph, kfactor, ChanChoice, fs, carrier_frequency)
- Calculating doppler shift using the formula mentioned above:
% Speed of Light (m/s)
speed_of_light = 3e8;
% Convert vehicle speed from kph to m/s
speed_mp = (speed_kph * 1000) / 3600;
% Calculate Doppler Shift
doppler_shift = (speed_mps / speed_of_light) * carrier_frequency;
- Updating the Doppler shifts based on the calculated value:
dopplerShifts = [0 doppler_shift doppler_shift*cosd(30) doppler_shift*cosd(100)];
- The rest of the function definition remains same. Please refer to the code below for the example usage of the “initchan” function,
carrier_frequency = 2.4e9; % Example carrier frequency (2.4 GHz) and other input parameters can be defined
chan_0_kph = initchan(0, kfactor, "Rician", fs, carrier_frequency);
chan_20_kph = initchan(20, kfactor, "Rician", fs, carrier_frequency);
chan_50_kph = initchan(50, kfactor, "Rician", fs, carrier_frequency);
I hope this will help you in solving the query!
Thank you,
Abhimenyu.
Ver también
Categorías
Más información sobre Propagation and Channel Models en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!