⛄一、 车载网络

现如今,汽车的功能越来越多,不再是单纯的交通工具,其数字媒体、辅助驾驶、主动安全、联网通讯等辅助功能也不断出现,推动了整个汽车产业的进步和革新[1]。相信在不久的将来,机器视觉就能代替驾驶员识别道路信息,智能算法能帮助执行简单的驾驶操作,而多媒体娱乐设备能够为出行提供更温馨舒适的氛围,汽车会更智能、安全和舒适。

支撑这一切进步和改革的基础,主要是信息技术的硬件和软件,这其中很重要的一项是数据通讯,也就是人们常说的车载网络。最初的汽车设备通讯通过金属线和继电器等传输,成本高而且稳定性不好[2]。从20世纪60、70年代,电子元件在汽车中开始使用并且占据的比重越来越大,汽车电子元件占整车成本比从1990年的8%左右,提高到2010年的39%左右,相应的各种车载电子设备的故障诊断、状态检测数据也越来越庞大,带来的数据通讯压力越来越大[3]。从20世纪80年代以来,以BOSCH为首的众多汽车厂商,陆续开发了CAN、LIN、MOST、Ethernet、Flex-Ray等通讯协议,以适应不断增加的数据传输压力。

现阶段,车载网络采用了多种通讯协议混合,CAN网络负责总通讯、OBD、电控发动机、ABS等部分,LIN线主要用在车身电器、车窗等低速通讯领域,MOST用来传递多媒体数据,Flex-Ray用在主动安全等方面,以太网协议在近几年被引进到车载网络中,以期替代CAN作为主干网络,来满足毫米波雷达、车联网等技术对通讯速度的更高要求。

⛄二、部分源代码

function out = PSOSearch(param, position)

% Import trace file(SUMO)

filename = param.filename;

filename_obj = param.filename_obj;

filename_connec = param.filename_connec;

% Number of vehicles available in the dataset(SUMO)

nVehicle = param.nVehicle; % Have to change according to the trace file

niter =param.niter;

% Infrastructure Position

pos = position; % Have to change according to the trace file

infRadius = 500;

% Reading table

T = readtable(filename);

T_obj = readtable(filename_obj);

T_connec = readtable(filename_connec);

% Number of rows in the table

n_rows_obj = height(T_obj);

% Finding minimum and maximum of Position X and Y

minPosX = min(T{:,4});

minPosY = min(T{:,5});

maxPosX = max(T{:,4});

maxPosY = max(T{:,5});

% Vehicle template

empty_vehicle.id = [];

empty_vehicle.Position = [];

empty_vehicle.angle = [];

% Creating templates for storing Previous connectivity history of vehicles

empty_pre_conection.id = [];

empty_pre_conection.id1 = [];

empty_pre_conection.t1 = 0;

empty_pre_conection.id2 = [];

empty_pre_conection.t2 = 0;

empty_pre_conection.id3 = [];

empty_pre_conection.t3 = 0;

empty_pre_conection.id4 = [];

empty_pre_conection.t4 = 0;

empty_pre_conection.id5 = [];

empty_pre_conection.t5 = 0;

% Create vehicles connections history array

pre_conection = repmat(empty_pre_conection, nVehicle, 1);

% Create vehicles array

object_vehicle = repmat(empty_vehicle, nVehicle, 1);

for i=1:n_rows_obj

for j=1:nVehicle

if strcmp(T_obj{i,1},['veh' num2str((j-1),'%d')])

object_vehicle(j).id = T_obj{i,1};

object_vehicle(j).angle = T_obj{i,2};

object_vehicle(j).Position = [T_obj{i,3}, T_obj{i,4}];

end

end

end

⛄三、运行结果

⛄四、matlab版本及参考文献

1 matlab版本 2014a

2 参考文献 [1]马华伟,王天晓,胡笑旋.带时间窗的多无人机航迹规划两阶段启发式算法[J].火力与指挥控制. 2014,39(08)

3 备注 简介此部分摘自互联网,仅供参考,若侵权,联系删除

参考链接

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: