✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

​智能优化算法​​       ​​神经网络预测​​       ​​雷达通信 ​​      ​​无线传感器​​        ​​电力系统​

​信号处理​​              ​​图像处理​​               ​​路径规划​​       ​​元胞自动机​​        ​​无人机 ​

⛄ 内容介绍

随着汽车行业需求的增长,3GPP正在开发长期演进(LTE)蜂窝技术中的新功能,以专门解决车对所有(V2X)连接,特别是车对车(V2V)直接通信。在涉及安全性,交通管理或信息娱乐的大多数已启用应用程序的基础上,协作意识服务尤为重要,它对应于所有车辆在广播中定期发送的消息,以告知其状态和意图。为了优化无线电资源的使用,需要巧妙地执行数据包分配,遵循目前代表着一个具有挑战性的开放性问题的算法。考虑到解决协作意识时要面对LTE-V2V网络中资源分配的设计和验证,我们实现了一个名为LTEV2Vsim的模拟器,该模拟器将与所有感兴趣的研究人员共享。 LTEV2Vsim用MATLAB编写,可按照简单的模型或更复杂,更实际的输入文件管理车辆的机动性,并根据不同的已实现算法(包括网络控制和自主算法)执行分配。最后,为了演示LTEV2Vsim的可能性,提供了一些示例结果

⛄ 部分代码

% Simplified scenario to use WilabV2Xsim

% Packet size and MCS are set accordingly to utilize the whole channel

% Each transmission uses all the subchannels available.

% NR-V2X is considered for these simulations

% WiLabV2Xsim('help')

close all    % Close all open figures

clear        % Reset variables

clc          % Clear the command window

packetSize=1000;        % 1000B packet size

nTransm=1;              % Number of transmission for each packet

sizeSubchannel=10;      % Number of Resource Blocks for each subchannel

Raw = [50, 150, 300];   % Range of Awarness for evaluation of metrics

speed=70;               % Average speed

speedStDev=7;           % Standard deviation speed

SCS=15;                 % Subcarrier spacing [kHz]

pKeep=0.4;              % keep probability

periodicity=0.1;        % periodic generation every 100ms

sensingThreshold=-126;  % threshold to detect resources as busy

% Configuration file

configFile = 'Highway3GPP.cfg';

%% NR-V2X PERIODIC GENERATION

for BandMHz=[10]

if BandMHz==10

    MCS=11;

elseif BandMHz==20

    MCS=5;

end    

for rho=[100 200 300] % number of vehicles/km

        % Just for visualization purposes the simulations time now are really short,

        % when performing actual simulation, each run should take at least

        % 30mins or one hour of computation time.

    if rho==100

        simTime=10;     % simTime=300

    elseif rho==200

        simTime=5;      % simTime=150;

    elseif rho==300

        simTime=3;      % simTime=100;

    end

% HD periodic

outputFolder = sprintf('Output/NRV2X_%dMHz_periodic',BandMHz);

% Launches simulation

WiLabV2Xsim(configFile,'outputFolder',outputFolder,'Technology','5G-V2X','MCS_NR',MCS,'SCS_NR',SCS,'beaconSizeBytes',packetSize,...

    'simulationTime',simTime,'rho',rho,'probResKeep',pKeep,'BwMHz',BandMHz,'vMean',speed,'vStDev',speedStDev,...

    'cv2xNumberOfReplicasMax',nTransm,'allocationPeriod',periodicity,'sizeSubchannel',sizeSubchannel,...

    'powerThresholdAutonomous',sensingThreshold,'Raw',Raw,'FixedPdensity',false,'dcc_active',false,'cbrActive',true)

end

end

%% PLOT of results

figure

hold on

grid on

for iCycle=1:3

    rho=100*iCycle;

    % Loads packet reception ratio output file

    xMode2_periodic=load(outputFolder + "/packet_reception_ratio_"+num2str(iCycle)+"_5G.xls");

    % PRR plot

    % it takes the first column and the last column

    plot(xMode2_periodic(:,1),xMode2_periodic(:,end),'linewidth',2.5,'displayName',"Mode2, periodic generation, vehicles/km=" + num2str(rho))

end

    legend()

    title("NR-V2X, " + num2str(BandMHz) + "MHz, MCS=" + num2str(MCS))

    legend('Location','southwest')

    xlabel("Distance [m]")

    ylabel("PRR")

    yline(0.95,'HandleVisibility','off');

⛄ 运行结果

【控制】基于Matlab实现5GNR—V2X拥塞控制算法_ide

⛄ 参考文献

G. Cecchini, A. Bazzi, B. M. Masini, A. Zanella, “LTEV2Vsim: An LTE-V2V Simulator for the Investigation of Resource Allocation for Cooperative Awareness”, 5th IEEE International Conference on Models and Technologies for Intelligent Transportation Systems (MT-ITS 2017), Naples (Italy), 26-28 June 2017. (Results obtained with version 1.0)

A. Bazzi, G. Cecchini, M. Menarini, B. M. Masini, A. Zanella, “Survey and Perspectives of Vehicular Wi-Fi Versus Sidelink Cellular-V2X in the 5G Era,” invited paper in Future Internet, 29 May 2019, 11(6), 122. DOI: 10.3390/fi11060122 (Results obtained with version 3.5)

⛄ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料