Effacer les filtres
Effacer les filtres

How to Model Vehicle-to-Vehicle channels using Rayleigh fading and Rician fading at different speeds?

13 vues (au cours des 30 derniers jours)
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 commentaires
Walter Roberson
Walter Roberson le 30 Sep 2023
It is not clear what your MATLAB question is? It looks more like you have an algorithm question ?
Matthew Main
Matthew Main le 30 Sep 2023
It’s not so much about the algorithm, it’s more about how to configure both channels with regards to the change in the vehicle specific speed.
So for example if a vehicle is traveling at 20kph the Doppler shift is approximately 110Hz.
How would I go about implementing this information into the channel setup because for example the Rician channel has a maximum Doppler as well as a line of sight Doppler shift.

Connectez-vous pour commenter.

Réponses (1)

Abhimenyu
Abhimenyu le 13 Oct 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.
  1 commentaire
Matthew Main
Matthew Main le 16 Oct 2023
Thank you so much for assisting.
I've implemented the code similar to what you've suggested however the results i get are not as expected as shown in the figure below.
Do you perhaps know why my lines potentially cross since the expected result is that the lower order modulation schemes should have a better BER and should follow the order as in the legend of the image?
Any assistance would be appreciated.
Kind regards
Matthew

Connectez-vous pour commenter.

Catégories

En savoir plus sur WLAN Toolbox dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by