AEB算法开发(基于Matlab driving Toolbox)

本节采用matlab自动驾驶工具箱开发AEB算法,首先建立仿真场景并添加传感器,在传感器融合得到障碍物信息之后,搭建AEB算法模块进行仿真测试;

测试效果图:

cef00c07628a48648d602e2ffad6f77e.gif

1. 场景搭建及传感器信息处理

AEB(Autonomous Emergency Braking)算法是一种用于自动驾驶和车辆安全系统的算法,旨在帮助减少碰撞风险并减轻碰撞的严重程度。AEB系统通过使用传感器和算法来监测车辆前方的障碍物,并在检测到潜在碰撞的情况下自动触发制动系统,以减少车辆的速度或完全停车,从而避免或减轻碰撞的后果。算法整体框图如下:

80bd41a05d184075bfe501073511523e.png

1.1 场景搭建与导出

打开matlab→APP→driving  scenario design,创建一个新场景:

4353cc1d06f543d6a0faf40df37a69fc.png

在创建的场景中,可以查看鸟瞰图,我们创建一个主车触发AEB减速避让行人的场景,其中,行人的速度为1.5m/s,主车的行驶速度为10m/s;在设置仿真场景后,在主车上配置传感器,此处选择装一个毫米波雷达和一个相机,右图橙色点即为毫米波雷达扫描到的障碍物信息:

4d9f9b210952479baa953f2d4b16480a.png

在搭建场景结束后,点击右上角的explore将本场景导出为.m脚本:

% function [allData, scenario, sensors] = AEBscenario()
%创建场景
[scenario, egoVehicle] = createDrivingScenario;
%创建传感器
[sensors, numSensors] = createSensors(scenario);
allData = struct('Time', {}, 'ActorPoses', {}, 'ObjectDetections', {}, 'LaneDetections', {}, 'PointClouds', {}, 'INSMeasurements', {});
running = true;
while running
    % 生成车辆
    poses = targetPoses(egoVehicle);
    time  = scenario.SimulationTime;

    objectDetections = {};
    laneDetections   = [];
    ptClouds = {};
    insMeas = {};
    isValidTime = false(1, numSensors);

    % Generate detections for each sensor
    for sensorIndex = 1:numSensors
        sensor = sensors{sensorIndex};
        [objectDets, isValidTime(sensorIndex)] = sensor(poses, time);
        numObjects = length(objectDets);
        objectDetections = [objectDetections; objectDets(1:numObjects)]; %#ok<AGROW>
    end

    % Aggregate all detections into a structure for later use
    if any(isValidTime)
        allData(end + 1) = struct( ...
            'Time',       scenario.SimulationTime, ...
            'ActorPoses', actorPoses(scenario), ...
            'ObjectDetections', {objectDetections}, ...
            'LaneDetections', {laneDetections}, ...
            'PointClouds',   {ptClouds}, ... %#ok<AGROW>
            'INSMeasurements',   {insMeas}); %#ok<AGROW>
    end

    % Advance the scenario one time step and exit the loop if the scenario is complete
    running = advance(scenario);
end

% Restart the driving scenario to return the actors to their initial positions.
restart(scenario);

% Release all the sensor objects so they can be used again.
for sensorIndex = 1:numSensors
    release(sensors{sensorIndex});
end

%%%%%%%%%%%%%%%%%%%%
% Helper functions %
%%%%%%%%%%%%%%%%%%%%

% Units used in createSensors and createDrivingScenario
% Distance/Position - meters
% Speed             - meters/second
% Angles            - degrees
% RCS Pattern       - dBsm

function [sensors, numSensors] = createSensors(scenario)
% createSensors Returns all sensor objects to generate detections

% 设置传感器
profiles = actorProfiles(scenario);
sensors{1} = drivingRadarDataGenerator('SensorIndex', 1, ...
    'MountingLocation', [3.7 0 0.2], ...
    'RangeLimits', [0 120], ...
    'TargetReportFormat', 'Detections', ...
    'RangeRateLimits', [-120 120], ...
    'ReferenceRange', 120, ...
    'Profiles', profiles);
sensors{2} = visionDetectionGenerator('SensorIndex', 2, ...
    'SensorLocation', [1.9 0], ...
    'DetectorOutput', 'Objects only', ...
    'ActorProfiles', profiles);
numSensors = 2;
end
function [scenario, egoVehicle] = createDrivingScenario
% createDrivingScenario Returns the drivingScenario defined in the Designer

% Construct a drivingScenario object.
scenario = drivingScenario;

% Add all road segments
roadCenters = [-9.8 10 0;
    34.6 9.9 0];
laneSpecification = lanespec(2);
road(scenario, roadCenters, 'Lanes', laneSpecification, 'Name', 'Road');

% Add the ego vehicle
egoVehicle = vehicle(scenario, ...
    'ClassID', 1, ...
    'Position', [-9.88904986904784 11.5712861699397 0], ...
    'Mesh', driving.scenario.carMesh, ...
    'Name', 'Car');
waypoints = [-9.88904986904784 11.5712861699397 0;
    34.6 12.1 0];
speed = [10;10];
trajectory(egoVehicle, waypoints, speed);

% Add the non-ego actors
pedestrian = actor(scenario, ...
    'ClassID', 4, ...
    'Length', 0.24, ...
    'Width', 0.45, ...
    'Height', 1.7, ...
    'Position', [25.8676788564176 6.41940907360563 0], ...
    'RCSPattern', [-8 -8;-8 -8], ...
    'Mesh', driving.scenario.pedestrianMesh, ...
    'PlotColor', [0.929 0.694 0.125], ...
    'Name', 'Pedestrian');
waypoints = [25.8676788564176 6.41940907360563 0;
    26 14 0];
speed = [1.5;1.5];
trajectory(pedestrian, waypoints, speed);
plot(scenario);
end

在最后一行的plot(scenario)可直接画出本场景,因此,我们可以通过写m脚本的方式,无需打开driving design scenario也可绘图,运行结果如下:

b93ff458306c45d0901589d76805c439.png

1.2 场景中传感器数据导入到simulink中

将场景导入到simulink中,采用自动驾驶工具箱提供的simulink接口模块:

2049bea1c02c4492ad93265f313eff05.png

在scenario reader模块中加载预先设定好的场景,对于场景中驾驶员的输入,由于我们采用的egocar的动力学为simulink中的模块,故需要对输入的egocar接口进行配置:

d17074ce74ef4ec599dc02279434cab6.png

数据类型的BusActors,这个Bus类型数据我们在最后一节创建,ego pack函数如下:

function egoActor = packEgo(pos,vel,yaw,yawRate,egoActorID)
egoActor = struct(...
    'ActorID',egoActorID,...
    'Position', [pos(1) pos(2) 0], ...
    'Velocity', [vel(1) vel(2) 0], ...
    'Roll', 0, ...
    'Pitch', 0, ...
    'Yaw', yaw, ...
    'AngularVelocity', [0 0 yawRate]);

需要注意的是,egocar这个结构体是我们自己创建的,需要在explore中手动绑定数据类型:

ed0110f3b5c6425a810a6bf606c2196b.png

关于所有BUS数据类型的创建,都放在最后一节进行,下图为毫米波雷达和相机的输入接口模块:

79c4fd3f3a6a4c439e7c8bcce843f6e9.png

8ad7ed96861249c7ad403c7b60c808f0.png

Detection Concatenation采用默认设置,无需修改,对传感器融合模块的配置如下:

740d541050774b7b9b32b6de1dd84143.png

其中initcvekf为初始化函数,它用于初始化线性卡尔曼滤波观测器,此模块用于对毫米波雷达和相机的数据作融合处理,在融合之,需要将障碍物的信息与主车信息进行数学运算,以确认障碍物与主车之间的相对距离和相对速度:

b50a7b696482431ba70fcca791c32091.png

function [x,vx,mioTrack] = findLeadCar(confirmedTracks, curvature, positionSelector)
numStates = 6;

% 2. The lane is defined using a parabolic model, where y=ax^2+bx+c. a is
%    equal to half the road curvature, b=0, and c is the offset of the lane
%    boundaries relative to the ego car. Overall lane width is assumed to
%    be 3.6m, typical highway lane width.
laneWidth = 3.6;

% 3. The ego car is assumed to be traveling in the middle of its lane, with
%    1.8m on each side of it. So, c=+1.8m for the left lane boundary and
%    -1.8m for the right lane boundary.
halfLaneWidth = laneWidth/2;

% Initialize outputs and parameters
maxX = cast(1000, 'like', confirmedTracks.Tracks(1).State);  % Far enough forward so that no track is expected to exceed this distance
trackID = 1;

for i = 1:confirmedTracks.NumTracks
    position = positionSelector * confirmedTracks.Tracks(i).State;
    x = position(1); % Longitudinal position of the track relative to ego
    y = position(2); % Lateral position of the track relative to ego
    
    if x < maxX && x > 0 % No point checking otherwise
        yleftLane  = polyval([curvature/2, 0,  halfLaneWidth],x); % Half a lane to the left
        yrightLane = polyval([curvature/2, 0, -halfLaneWidth],x); % Half a lane to the right
        
        % Find a new lead car
        if (yrightLane <= y) && (y <= yleftLane)
            maxX = x;
            trackID = i;
        end
    end
end

if trackID>0
    mioState = confirmedTracks.Tracks(trackID).State;
else
    mioState = inf(numStates,1,'like',confirmedTracks.Tracks(1).State);
end

% Output:
x = mioState(1);    % Longitudinal position of the lead car
vx = mioState(2);   % Longitudinal velocity of the lead car
mioTrack = trackID; % Index of the most important track

2.车辆动力学模块

本小节采用matlab自带三自由度动力学模型进行车辆仿真:

82b49da3bf794d92abbf0d54f0d821e5.png

其中,Fx与油门刹车的对应关系如下:

f4cc694d13254b25a099ca2cda7c911f.png

输出量为动力学模型计算得到的X,Y的坐标以及车辆的横摆角速度,航向角和X,Y方向的速度。

3. AEB主算法模块搭建

AEB著算法模块建模如下:

5cd24efb68394ca1bc125b5747f019a0.png

其中转向系的模拟模型如下,用于对驾驶员进行模拟,由道路曲率与车辆横摆角进行修正:

7884bef535e145a08d840400be4444f7.png

AEB主算法如下图:

6ae2061f613748d2ae114927b4cc2b45.png

首先,采用之前得到的相对距离与相对速度计算剩余碰撞时间(ttc):

e918ae707d16448b8634c0cc02951f95.png

计算各个AEB模式下的碰撞时间,由于安全需要冗余,故加上一部分的反应时间:

51ee814247b3484e9053397a95a7fa2f.png

AEB的状态机调度如下,最终输出的为车辆的减速度:

e860bb7ab22a4e629bd43e289b65ddc0.png

此外,车辆的速度控制器模型如下:

1de7d082f77743b8a6900fe00a7092eb.png

此模型实时对车速进行控制,当AEB不触发时,采用此速度控制器控制车速,当AEB触发时,将油门踏板置为0:

58bf83e29af042dfb8a0183cce5f1c93.png

4.采用m脚本管理数据并进行测试

最后,采用m脚本对文中的总线数据和结构体数据进行管理,脚本如下:

clc
clear
% 速度控制器数据字典
SpeedController.v_set=5.5;%设定的速度
SpeedController.Kp=1.1;%PID控制器参数
SpeedController.Ki=0.1;%PID控制器参数
SpeedController.Amax=3;%速度控制器限幅
SpeedController.Amin=-3;%速度控制器限幅
% AEB主算法数据字典
AEB.PB1_decel=3.8;%AEB轻制动的制动减速度
AEB.PB2_decel=5.3;%AEB重制动的制动减速度
AEB.FB_decel=9.8;%AEB全制动的制动减速度
AEB.timeMargin=0;%AEB剩余碰撞时间时间裕值
AEB.headwayOffset=6.7;%相对距离安全裕值
%FCW功能数据字典
FCW.driver_decel=4;
FCW.timeToReact=1.2;
% 定义bus对象的属性
BusActors = Simulink.Bus;
BusActors.Description = '';
BusActors.DataScope = 'Auto';
BusActors.HeaderFile = '';
BusActors.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
saveVarsTmp{1}.Name = 'NumActors';
saveVarsTmp{1}.Complexity = 'real';
saveVarsTmp{1}.Dimensions = [1 1];
saveVarsTmp{1}.DataType = 'double';
saveVarsTmp{1}.Min = [];
saveVarsTmp{1}.Max = [];
saveVarsTmp{1}.DimensionsMode = 'Fixed';
saveVarsTmp{1}.SamplingMode = 'Sample based';
saveVarsTmp{1}.DocUnits = '';
saveVarsTmp{1}.Description = '';
saveVarsTmp{1}(2, 1) = Simulink.BusElement;
saveVarsTmp{1}(2, 1).Name = 'Time';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [1 1];
saveVarsTmp{1}(2, 1).DataType = 'double';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
saveVarsTmp{1}(3, 1) = Simulink.BusElement;
saveVarsTmp{1}(3, 1).Name = 'Actors';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [1 1];
saveVarsTmp{1}(3, 1).DataType = 'Bus: BusActorsActors';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';
BusActors.Elements = saveVarsTmp{1};
clear saveVarsTmp;
%创建BusActorsActors的BUS数据类型
BusActorsActors = Simulink.Bus;
BusActorsActors.Description = '';
BusActorsActors.DataScope = 'Auto';
BusActorsActors.HeaderFile = '';
BusActorsActors.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
saveVarsTmp{1}.Name = 'ActorID';
saveVarsTmp{1}.Complexity = 'real';
saveVarsTmp{1}.Dimensions = [1 1];
saveVarsTmp{1}.DataType = 'double';
saveVarsTmp{1}.Min = [];
saveVarsTmp{1}.Max = [];
saveVarsTmp{1}.DimensionsMode = 'Fixed';
saveVarsTmp{1}.SamplingMode = 'Sample based';
saveVarsTmp{1}.DocUnits = '';
saveVarsTmp{1}.Description = '';

saveVarsTmp{1}(2, 1) = Simulink.BusElement;
saveVarsTmp{1}(2, 1).Name = 'Position';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [1 3];
saveVarsTmp{1}(2, 1).DataType = 'double';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';

saveVarsTmp{1}(3, 1) = Simulink.BusElement;
saveVarsTmp{1}(3, 1).Name = 'Velocity';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [1 3];
saveVarsTmp{1}(3, 1).DataType = 'double';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';

saveVarsTmp{1}(4, 1) = Simulink.BusElement;
saveVarsTmp{1}(4, 1).Name = 'Roll';
saveVarsTmp{1}(4, 1).Complexity = 'real';
saveVarsTmp{1}(4, 1).Dimensions = [1 1];
saveVarsTmp{1}(4, 1).DataType = 'double';
saveVarsTmp{1}(4, 1).Min = [];
saveVarsTmp{1}(4, 1).Max = [];
saveVarsTmp{1}(4, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(4, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(4, 1).DocUnits = '';
saveVarsTmp{1}(4, 1).Description = '';

saveVarsTmp{1}(5, 1) = Simulink.BusElement;
saveVarsTmp{1}(5, 1).Name = 'Pitch';
saveVarsTmp{1}(5, 1).Complexity = 'real';
saveVarsTmp{1}(5, 1).Dimensions = [1 1];
saveVarsTmp{1}(5, 1).DataType = 'double';
saveVarsTmp{1}(5, 1).Min = [];
saveVarsTmp{1}(5, 1).Max = [];
saveVarsTmp{1}(5, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(5, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(5, 1).DocUnits = '';
saveVarsTmp{1}(5, 1).Description = '';

saveVarsTmp{1}(6, 1) = Simulink.BusElement;
saveVarsTmp{1}(6, 1).Name = 'Yaw';
saveVarsTmp{1}(6, 1).Complexity = 'real';
saveVarsTmp{1}(6, 1).Dimensions = [1 1];
saveVarsTmp{1}(6, 1).DataType = 'double';
saveVarsTmp{1}(6, 1).Min = [];
saveVarsTmp{1}(6, 1).Max = [];
saveVarsTmp{1}(6, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(6, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(6, 1).DocUnits = '';
saveVarsTmp{1}(6, 1).Description = '';

saveVarsTmp{1}(7, 1) = Simulink.BusElement;
saveVarsTmp{1}(7, 1).Name = 'AngularVelocity';
saveVarsTmp{1}(7, 1).Complexity = 'real';
saveVarsTmp{1}(7, 1).Dimensions = [1 3];
saveVarsTmp{1}(7, 1).DataType = 'double';
saveVarsTmp{1}(7, 1).Min = [];
saveVarsTmp{1}(7, 1).Max = [];
saveVarsTmp{1}(7, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(7, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(7, 1).DocUnits = '';
saveVarsTmp{1}(7, 1).Description = '';
BusActorsActors.Elements = saveVarsTmp{1};
clear saveVarsTmp;
%创建BusMultiObjectTracker1总线数据类型
BusMultiObjectTracker1 = Simulink.Bus;
BusMultiObjectTracker1.Description = '';
BusMultiObjectTracker1.DataScope = 'Auto';
BusMultiObjectTracker1.HeaderFile = '';
BusMultiObjectTracker1.Alignment = -1;

saveVarsTmp{1} = Simulink.BusElement;
saveVarsTmp{1}.Name = 'NumTracks';
saveVarsTmp{1}.Complexity = 'real';
saveVarsTmp{1}.Dimensions = [1 1];
saveVarsTmp{1}.DataType = 'double';
saveVarsTmp{1}.Min = [];
saveVarsTmp{1}.Max = [];
saveVarsTmp{1}.DimensionsMode = 'Fixed';
saveVarsTmp{1}.SamplingMode = 'Sample based';
saveVarsTmp{1}.DocUnits = '';
saveVarsTmp{1}.Description = '';

saveVarsTmp{1}(2, 1) = Simulink.BusElement;
saveVarsTmp{1}(2, 1).Name = 'Tracks';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [20 1];
saveVarsTmp{1}(2, 1).DataType = 'Bus: BusMultiObjectTracker1Tracks';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
BusMultiObjectTracker1.Elements = saveVarsTmp{1};
clear saveVarsTmp;
%创建BusMultiObjectTracker1总线
BusMultiObjectTracker1 = Simulink.Bus;
BusMultiObjectTracker1.Description = '';
BusMultiObjectTracker1.DataScope = 'Auto';
BusMultiObjectTracker1.HeaderFile = '';
BusMultiObjectTracker1.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
saveVarsTmp{1}.Name = 'NumTracks';
saveVarsTmp{1}.Complexity = 'real';
saveVarsTmp{1}.Dimensions = [1 1];
saveVarsTmp{1}.DataType = 'double';
saveVarsTmp{1}.Min = [];
saveVarsTmp{1}.Max = [];
saveVarsTmp{1}.DimensionsMode = 'Fixed';
saveVarsTmp{1}.SamplingMode = 'Sample based';
saveVarsTmp{1}.DocUnits = '';
saveVarsTmp{1}.Description = '';
saveVarsTmp{1}(2, 1) = Simulink.BusElement;

saveVarsTmp{1}(2, 1).Name = 'Tracks';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [20 1];
saveVarsTmp{1}(2, 1).DataType = 'Bus: BusMultiObjectTracker1Tracks';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
BusMultiObjectTracker1.Elements = saveVarsTmp{1};
clear saveVarsTmp;


%创建BusMultiObjectTracker1Tracks总线
BusMultiObjectTracker1Tracks = Simulink.Bus;
BusMultiObjectTracker1Tracks.Description = '';
BusMultiObjectTracker1Tracks.DataScope = 'Auto';
BusMultiObjectTracker1Tracks.HeaderFile = '';
BusMultiObjectTracker1Tracks.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素TrackID
saveVarsTmp{1} = Simulink.BusElement;
saveVarsTmp{1}.Name = 'TrackID';
saveVarsTmp{1}.Complexity = 'real';
saveVarsTmp{1}.Dimensions = [1 1];
saveVarsTmp{1}.DataType = 'double';
saveVarsTmp{1}.Min = [];
saveVarsTmp{1}.Max = [];
saveVarsTmp{1}.DimensionsMode = 'Fixed';
saveVarsTmp{1}.SamplingMode = 'Sample based';
saveVarsTmp{1}.DocUnits = '';
saveVarsTmp{1}.Description = '';
%创建元素BranchID
saveVarsTmp{1}(2, 1) = Simulink.BusElement;
saveVarsTmp{1}(2, 1).Name = 'BranchID';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [1 1];
saveVarsTmp{1}(2, 1).DataType = 'uint32';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
%创建元素SourceIndex
saveVarsTmp{1}(3, 1) = Simulink.BusElement;
saveVarsTmp{1}(3, 1).Name = 'SourceIndex';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [1 1];
saveVarsTmp{1}(3, 1).DataType = 'uint32';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';
%创建元素UpdateTime
saveVarsTmp{1}(4, 1) = Simulink.BusElement;
saveVarsTmp{1}(4, 1).Name = 'UpdateTime';
saveVarsTmp{1}(4, 1).Complexity = 'real';
saveVarsTmp{1}(4, 1).Dimensions = [1 1];
saveVarsTmp{1}(4, 1).DataType = 'double';
saveVarsTmp{1}(4, 1).Min = [];
saveVarsTmp{1}(4, 1).Max = [];
saveVarsTmp{1}(4, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(4, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(4, 1).DocUnits = '';
saveVarsTmp{1}(4, 1).Description = '';
%创建元素Age
saveVarsTmp{1}(5, 1) = Simulink.BusElement;
saveVarsTmp{1}(5, 1).Name = 'Age';
saveVarsTmp{1}(5, 1).Complexity = 'real';
saveVarsTmp{1}(5, 1).Dimensions = [1 1];
saveVarsTmp{1}(5, 1).DataType = 'uint32';
saveVarsTmp{1}(5, 1).Min = [];
saveVarsTmp{1}(5, 1).Max = [];
saveVarsTmp{1}(5, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(5, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(5, 1).DocUnits = '';
saveVarsTmp{1}(5, 1).Description = '';
%创建元素State
saveVarsTmp{1}(6, 1) = Simulink.BusElement;
saveVarsTmp{1}(6, 1).Name = 'State';
saveVarsTmp{1}(6, 1).Complexity = 'real';
saveVarsTmp{1}(6, 1).Dimensions = [6 1];
saveVarsTmp{1}(6, 1).DataType = 'double';
saveVarsTmp{1}(6, 1).Min = [];
saveVarsTmp{1}(6, 1).Max = [];
saveVarsTmp{1}(6, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(6, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(6, 1).DocUnits = '';
saveVarsTmp{1}(6, 1).Description = '';
%创建元素StateCovariance
saveVarsTmp{1}(7, 1) = Simulink.BusElement;
saveVarsTmp{1}(7, 1).Name = 'StateCovariance';
saveVarsTmp{1}(7, 1).Complexity = 'real';
saveVarsTmp{1}(7, 1).Dimensions = [6 6];
saveVarsTmp{1}(7, 1).DataType = 'double';
saveVarsTmp{1}(7, 1).Min = [];
saveVarsTmp{1}(7, 1).Max = [];
saveVarsTmp{1}(7, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(7, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(7, 1).DocUnits = '';
saveVarsTmp{1}(7, 1).Description = '';
%创建元素ObjectClassID
saveVarsTmp{1}(8, 1) = Simulink.BusElement;
saveVarsTmp{1}(8, 1).Name = 'ObjectClassID';
saveVarsTmp{1}(8, 1).Complexity = 'real';
saveVarsTmp{1}(8, 1).Dimensions = [1 1];
saveVarsTmp{1}(8, 1).DataType = 'double';
saveVarsTmp{1}(8, 1).Min = [];
saveVarsTmp{1}(8, 1).Max = [];
saveVarsTmp{1}(8, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(8, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(8, 1).DocUnits = '';
saveVarsTmp{1}(8, 1).Description = '';
%创建元素TrackLogic
saveVarsTmp{1}(9, 1) = Simulink.BusElement;
saveVarsTmp{1}(9, 1).Name = 'TrackLogic';
saveVarsTmp{1}(9, 1).Complexity = 'real';
saveVarsTmp{1}(9, 1).Dimensions = [1 1];
saveVarsTmp{1}(9, 1).DataType = 'Enum: trackLogicType';
saveVarsTmp{1}(9, 1).Min = [];
saveVarsTmp{1}(9, 1).Max = [];
saveVarsTmp{1}(9, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(9, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(9, 1).DocUnits = '';
saveVarsTmp{1}(9, 1).Description = '';
%创建元素TrackLogicState
saveVarsTmp{1}(10, 1) = Simulink.BusElement;
saveVarsTmp{1}(10, 1).Name = 'TrackLogicState';
saveVarsTmp{1}(10, 1).Complexity = 'real';
saveVarsTmp{1}(10, 1).Dimensions = [1 3];
saveVarsTmp{1}(10, 1).DataType = 'boolean';
saveVarsTmp{1}(10, 1).Min = [];
saveVarsTmp{1}(10, 1).Max = [];
saveVarsTmp{1}(10, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(10, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(10, 1).DocUnits = '';
saveVarsTmp{1}(10, 1).Description = '';
%创建元素IsConfirmed
saveVarsTmp{1}(11, 1) = Simulink.BusElement;
saveVarsTmp{1}(11, 1).Name = 'IsConfirmed';
saveVarsTmp{1}(11, 1).Complexity = 'real';
saveVarsTmp{1}(11, 1).Dimensions = [1 1];
saveVarsTmp{1}(11, 1).DataType = 'boolean';
saveVarsTmp{1}(11, 1).Min = [];
saveVarsTmp{1}(11, 1).Max = [];
saveVarsTmp{1}(11, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(11, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(11, 1).DocUnits = '';
saveVarsTmp{1}(11, 1).Description = '';
%创建元素IsCoasted
saveVarsTmp{1}(12, 1) = Simulink.BusElement;
saveVarsTmp{1}(12, 1).Name = 'IsCoasted';
saveVarsTmp{1}(12, 1).Complexity = 'real';
saveVarsTmp{1}(12, 1).Dimensions = [1 1];
saveVarsTmp{1}(12, 1).DataType = 'boolean';
saveVarsTmp{1}(12, 1).Min = [];
saveVarsTmp{1}(12, 1).Max = [];
saveVarsTmp{1}(12, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(12, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(12, 1).DocUnits = '';
saveVarsTmp{1}(12, 1).Description = '';
%创建元素IsSelfReported
saveVarsTmp{1}(13, 1) = Simulink.BusElement;
saveVarsTmp{1}(13, 1).Name = 'IsSelfReported';
saveVarsTmp{1}(13, 1).Complexity = 'real';
saveVarsTmp{1}(13, 1).Dimensions = [1 1];
saveVarsTmp{1}(13, 1).DataType = 'boolean';
saveVarsTmp{1}(13, 1).Min = [];
saveVarsTmp{1}(13, 1).Max = [];
saveVarsTmp{1}(13, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(13, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(13, 1).DocUnits = '';
saveVarsTmp{1}(13, 1).Description = '';
%创建总线元素ObjectAttributes
saveVarsTmp{1}(14, 1) = Simulink.BusElement;
saveVarsTmp{1}(14, 1).Name = 'ObjectAttributes';
saveVarsTmp{1}(14, 1).Complexity = 'real';
saveVarsTmp{1}(14, 1).Dimensions = [2 1];
saveVarsTmp{1}(14, 1).DataType = 'Bus: BusRadarDetectionsObjectAttributes';
saveVarsTmp{1}(14, 1).Min = [];
saveVarsTmp{1}(14, 1).Max = [];
saveVarsTmp{1}(14, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(14, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(14, 1).DocUnits = '';
saveVarsTmp{1}(14, 1).Description = '';
BusMultiObjectTracker1Tracks.Elements = saveVarsTmp{1};
%创建总线BusRadarDetectionsObjectAttributes
BusRadarDetectionsObjectAttributes = Simulink.Bus;
BusRadarDetectionsObjectAttributes.Description = '';
BusRadarDetectionsObjectAttributes.DataScope = 'Auto';
BusRadarDetectionsObjectAttributes.HeaderFile = '';
BusRadarDetectionsObjectAttributes.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素TargetIndex
saveVarsTmp{1}(1, 1).Name = 'TargetIndex';
saveVarsTmp{1}(1, 1).Complexity = 'real';
saveVarsTmp{1}(1, 1).Dimensions = [1 1];
saveVarsTmp{1}(1, 1).DataType = 'double';
saveVarsTmp{1}(1, 1).Min = [];
saveVarsTmp{1}(1, 1).Max = [];
saveVarsTmp{1}(1, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(1, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(1, 1).DocUnits = '';
saveVarsTmp{1}(1, 1).Description = '';
%创建元素SNR
saveVarsTmp{1}(2, 1).Name = 'SNR';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [1 1];
saveVarsTmp{1}(2, 1).DataType = 'double';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
BusRadarDetectionsObjectAttributes.Elements = saveVarsTmp{1};
%创建总线BusRadar
BusRadar = Simulink.Bus;
BusRadar.Description = '';
BusRadar.DataScope = 'Auto';
BusRadar.HeaderFile = '';
BusRadar.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素NumDetections
saveVarsTmp{1}(1, 1).Name = 'NumDetections';
saveVarsTmp{1}(1, 1).Complexity = 'real';
saveVarsTmp{1}(1, 1).Dimensions = [1 1];
saveVarsTmp{1}(1, 1).DataType = 'double';
saveVarsTmp{1}(1, 1).Min = [];
saveVarsTmp{1}(1, 1).Max = [];
saveVarsTmp{1}(1, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(1, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(1, 1).DocUnits = '';
saveVarsTmp{1}(1, 1).Description = '';
%创建元素IsValidTime
saveVarsTmp{1}(2, 1).Name = 'IsValidTime';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [1 1];
saveVarsTmp{1}(2, 1).DataType = 'Boolean';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
%创建总线元素Detections
saveVarsTmp{1}(3, 1).Name = 'Detections';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [50 1];
saveVarsTmp{1}(3, 1).DataType = 'Bus: BusRadarDetections';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';
BusRadar.Elements = saveVarsTmp{1};
%创建总线BusRadarDetections
BusRadarDetections = Simulink.Bus;
BusRadarDetections.Description = '';
BusRadarDetections.DataScope = 'Auto';
BusRadarDetections.HeaderFile = '';
BusRadarDetections.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素Time
saveVarsTmp{1}(1, 1).Name = 'Time';
saveVarsTmp{1}(1, 1).Complexity = 'real';
saveVarsTmp{1}(1, 1).Dimensions = [1 1];
saveVarsTmp{1}(1, 1).DataType = 'double';
saveVarsTmp{1}(1, 1).Min = [];
saveVarsTmp{1}(1, 1).Max = [];
saveVarsTmp{1}(1, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(1, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(1, 1).DocUnits = '';
saveVarsTmp{1}(1, 1).Description = '';
%创建元素Measurement
saveVarsTmp{1}(2, 1).Name = 'Measurement';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [6 1];
saveVarsTmp{1}(2, 1).DataType = 'double';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
%创建元素MeasurementNoise
saveVarsTmp{1}(3, 1).Name = 'MeasurementNoise';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [6 6];
saveVarsTmp{1}(3, 1).DataType = 'double';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';
%创建元素SensorIndex
saveVarsTmp{1}(4, 1).Name = 'SensorIndex';
saveVarsTmp{1}(4, 1).Complexity = 'real';
saveVarsTmp{1}(4, 1).Dimensions = [1 1];
saveVarsTmp{1}(4, 1).DataType = 'double';
saveVarsTmp{1}(4, 1).Min = [];
saveVarsTmp{1}(4, 1).Max = [];
saveVarsTmp{1}(4, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(4, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(4, 1).DocUnits = '';
saveVarsTmp{1}(4, 1).Description = '';
%创建元素ObjectClassID
saveVarsTmp{1}(5, 1).Name = 'ObjectClassID';
saveVarsTmp{1}(5, 1).Complexity = 'real';
saveVarsTmp{1}(5, 1).Dimensions = [1 1];
saveVarsTmp{1}(5, 1).DataType = 'doubler';
saveVarsTmp{1}(5, 1).Min = [];
saveVarsTmp{1}(5, 1).Max = [];
saveVarsTmp{1}(5, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(5, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(5, 1).DocUnits = '';
saveVarsTmp{1}(5, 1).Description = '';
%创建总线元素MeasurementParameters
saveVarsTmp{1}(6, 1).Name = 'MeasurementParameters';
saveVarsTmp{1}(6, 1).Complexity = 'real';
saveVarsTmp{1}(6, 1).Dimensions = [1 1];
saveVarsTmp{1}(6, 1).DataType = 'Bus: BusRadarDetectionsMeasurementParameters';
saveVarsTmp{1}(6, 1).Min = [];
saveVarsTmp{1}(6, 1).Max = [];
saveVarsTmp{1}(6, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(6, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(6, 1).DocUnits = '';
saveVarsTmp{1}(6, 1).Description = '';
%创建总线元素ObjectAttributes
saveVarsTmp{1}(7, 1).Name = 'ObjectAttributes';
saveVarsTmp{1}(7, 1).Complexity = 'real';
saveVarsTmp{1}(7, 1).Dimensions = [1 1];
saveVarsTmp{1}(7, 1).DataType = 'Bus: BusRadarDetectionsObjectAttributes';
saveVarsTmp{1}(7, 1).Min = [];
saveVarsTmp{1}(7, 1).Max = [];
saveVarsTmp{1}(7, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(7, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(7, 1).DocUnits = '';
saveVarsTmp{1}(7, 1).Description = '';
BusRadarDetections.Elements = saveVarsTmp{1};
%创建总线BusRadarDetectionsMeasurementParameters
BusRadarDetectionsMeasurementParameters = Simulink.Bus;
BusRadarDetectionsMeasurementParameters.Description = '';
BusRadarDetectionsMeasurementParameters.DataScope = 'Auto';
BusRadarDetectionsMeasurementParameters.HeaderFile = '';
BusRadarDetectionsMeasurementParameters.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素Frame
saveVarsTmp{1}(1, 1).Name = 'Frame';
saveVarsTmp{1}(1, 1).Complexity = 'real';
saveVarsTmp{1}(1, 1).Dimensions = [1 1];
saveVarsTmp{1}(1, 1).DataType = 'Enum: drivingCoordinateFrameType';
saveVarsTmp{1}(1, 1).Min = [];
saveVarsTmp{1}(1, 1).Max = [];
saveVarsTmp{1}(1, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(1, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(1, 1).DocUnits = '';
saveVarsTmp{1}(1, 1).Description = '';
%创建元素OriginPosition
saveVarsTmp{1}(2, 1).Name = 'OriginPosition';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [3 1];
saveVarsTmp{1}(2, 1).DataType = 'double';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
%创建元素OriginVelocity
saveVarsTmp{1}(3, 1).Name = 'OriginVelocity';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [3 1];
saveVarsTmp{1}(3, 1).DataType = 'double';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';
%创建元素Orientation
saveVarsTmp{1}(4, 1).Name = 'Orientation';
saveVarsTmp{1}(4, 1).Complexity = 'real';
saveVarsTmp{1}(4, 1).Dimensions = [3 3];
saveVarsTmp{1}(4, 1).DataType = 'double';
saveVarsTmp{1}(4, 1).Min = [];
saveVarsTmp{1}(4, 1).Max = [];
saveVarsTmp{1}(4, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(4, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(4, 1).DocUnits = '';
saveVarsTmp{1}(4, 1).Description = '';
%创建元素IsParentToChild
saveVarsTmp{1}(5, 1).Name = 'IsParentToChild';
saveVarsTmp{1}(5, 1).Complexity = 'real';
saveVarsTmp{1}(5, 1).Dimensions = [1 1];
saveVarsTmp{1}(5, 1).DataType = 'boolean';
saveVarsTmp{1}(5, 1).Min = [];
saveVarsTmp{1}(5, 1).Max = [];
saveVarsTmp{1}(5, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(5, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(5, 1).DocUnits = '';
saveVarsTmp{1}(5, 1).Description = '';
%创建总线元素HasAzimuth
saveVarsTmp{1}(6, 1).Name = 'HasAzimuth';
saveVarsTmp{1}(6, 1).Complexity = 'real';
saveVarsTmp{1}(6, 1).Dimensions = [1 1];
saveVarsTmp{1}(6, 1).DataType = 'boolean';
saveVarsTmp{1}(6, 1).Min = [];
saveVarsTmp{1}(6, 1).Max = [];
saveVarsTmp{1}(6, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(6, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(6, 1).DocUnits = '';
saveVarsTmp{1}(6, 1).Description = '';
%创建总线元素HasElevation
saveVarsTmp{1}(7, 1).Name = 'HasElevation';
saveVarsTmp{1}(7, 1).Complexity = 'real';
saveVarsTmp{1}(7, 1).Dimensions = [1 1];
saveVarsTmp{1}(7, 1).DataType = 'boolean';
saveVarsTmp{1}(7, 1).Min = [];
saveVarsTmp{1}(7, 1).Max = [];
saveVarsTmp{1}(7, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(7, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(7, 1).DocUnits = '';
saveVarsTmp{1}(7, 1).Description = '';
%创建总线元素HasRange
saveVarsTmp{1}(8, 1).Name = 'HasRange';
saveVarsTmp{1}(8, 1).Complexity = 'real';
saveVarsTmp{1}(8, 1).Dimensions = [1 1];
saveVarsTmp{1}(8, 1).DataType = 'boolean';
saveVarsTmp{1}(8, 1).Min = [];
saveVarsTmp{1}(8, 1).Max = [];
saveVarsTmp{1}(8, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(8, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(8, 1).DocUnits = '';
saveVarsTmp{1}(8, 1).Description = '';
%创建总线元素HasVelocity
saveVarsTmp{1}(9, 1).Name = 'HasVelocity';
saveVarsTmp{1}(9, 1).Complexity = 'real';
saveVarsTmp{1}(9, 1).Dimensions = [1 1];
saveVarsTmp{1}(9, 1).DataType = 'boolean';
saveVarsTmp{1}(9, 1).Min = [];
saveVarsTmp{1}(9, 1).Max = [];
saveVarsTmp{1}(9, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(9, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(9, 1).DocUnits = '';
saveVarsTmp{1}(9, 1).Description = '';
BusRadarDetectionsMeasurementParameters.Elements = saveVarsTmp{1};

%创建总线BusVision
BusVision = Simulink.Bus;
BusVision.Description = '';
BusVision.DataScope = 'Auto';
BusVision.HeaderFile = '';
BusVision.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素NumDetections
saveVarsTmp{1}(1, 1).Name = 'NumDetections';
saveVarsTmp{1}(1, 1).Complexity = 'real';
saveVarsTmp{1}(1, 1).Dimensions = [1 1];
saveVarsTmp{1}(1, 1).DataType = 'double';
saveVarsTmp{1}(1, 1).Min = [];
saveVarsTmp{1}(1, 1).Max = [];
saveVarsTmp{1}(1, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(1, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(1, 1).DocUnits = '';
saveVarsTmp{1}(1, 1).Description = '';
%创建元素IsValidTime
saveVarsTmp{1}(2, 1).Name = 'IsValidTime';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [1 1];
saveVarsTmp{1}(2, 1).DataType = 'boolean';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
%创建元素Detections
saveVarsTmp{1}(3, 1).Name = 'Detections';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [20 1];
saveVarsTmp{1}(3, 1).DataType = 'Bus: BusVisionDetections';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';
BusVision.Elements = saveVarsTmp{1};
%创建总线BusVisionDetections
BusVisionDetections = Simulink.Bus;
BusVisionDetections.Description = '';
BusVisionDetections.DataScope = 'Auto';
BusVisionDetections.HeaderFile = '';
BusVisionDetections.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素Time
saveVarsTmp{1}(1, 1).Name = 'Time';
saveVarsTmp{1}(1, 1).Complexity = 'real';
saveVarsTmp{1}(1, 1).Dimensions = [1 1];
saveVarsTmp{1}(1, 1).DataType = 'double';
saveVarsTmp{1}(1, 1).Min = [];
saveVarsTmp{1}(1, 1).Max = [];
saveVarsTmp{1}(1, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(1, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(1, 1).DocUnits = '';
saveVarsTmp{1}(1, 1).Description = '';
%创建元素Measurement
saveVarsTmp{1}(2, 1).Name = 'Measurement';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [6 1];
saveVarsTmp{1}(2, 1).DataType = 'double';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
%创建元素MeasurementNoise
saveVarsTmp{1}(3, 1).Name = 'MeasurementNoise';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [6 6];
saveVarsTmp{1}(3, 1).DataType = 'double';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';
%创建元素SensorIndex
saveVarsTmp{1}(4, 1).Name = 'SensorIndex';
saveVarsTmp{1}(4, 1).Complexity = 'real';
saveVarsTmp{1}(4, 1).Dimensions = [1 1];
saveVarsTmp{1}(4, 1).DataType = 'double';
saveVarsTmp{1}(4, 1).Min = [];
saveVarsTmp{1}(4, 1).Max = [];
saveVarsTmp{1}(4, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(4, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(4, 1).DocUnits = '';
saveVarsTmp{1}(4, 1).Description = '';
%创建元素ObjectClassID
saveVarsTmp{1}(5, 1).Name = 'ObjectClassID';
saveVarsTmp{1}(5, 1).Complexity = 'real';
saveVarsTmp{1}(5, 1).Dimensions = [1 1];
saveVarsTmp{1}(5, 1).DataType = 'double';
saveVarsTmp{1}(5, 1).Min = [];
saveVarsTmp{1}(5, 1).Max = [];
saveVarsTmp{1}(5, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(5, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(5, 1).DocUnits = '';
saveVarsTmp{1}(5, 1).Description = '';
BusVisionDetections.Elements = saveVarsTmp{1};
%创建总线元素MeasurementParameters
saveVarsTmp{1}(6, 1).Name = 'MeasurementParameters';
saveVarsTmp{1}(6, 1).Complexity = 'real';
saveVarsTmp{1}(6, 1).Dimensions = [1 1];
saveVarsTmp{1}(6, 1).DataType = 'Bus: BusVisionDetectionsMeasurementParameters';
saveVarsTmp{1}(6, 1).Min = [];
saveVarsTmp{1}(6, 1).Max = [];
saveVarsTmp{1}(6, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(6, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(6, 1).DocUnits = '';
saveVarsTmp{1}(6, 1).Description = '';
BusVisionDetections.Elements = saveVarsTmp{1};
%创建总线元素ObjectAttributes
saveVarsTmp{1}(7, 1).Name = 'ObjectAttributes';
saveVarsTmp{1}(7, 1).Complexity = 'real';
saveVarsTmp{1}(7, 1).Dimensions = [1 1];
saveVarsTmp{1}(7, 1).DataType = 'Bus: BusVisionDetectionsObjectAttributes';
saveVarsTmp{1}(7, 1).Min = [];
saveVarsTmp{1}(7, 1).Max = [];
saveVarsTmp{1}(7, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(7, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(7, 1).DocUnits = '';
saveVarsTmp{1}(7, 1).Description = '';
BusVisionDetections.Elements = saveVarsTmp{1};
%创建总线BusVisionDetectionsMeasurementParameters
BusVisionDetectionsMeasurementParameters = Simulink.Bus;
BusVisionDetectionsMeasurementParameters.Description = '';
BusVisionDetectionsMeasurementParameters.DataScope = 'Auto';
BusVisionDetectionsMeasurementParameters.HeaderFile = '';
BusVisionDetectionsMeasurementParameters.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素Frame
saveVarsTmp{1}(1, 1).Name = 'Frame';
saveVarsTmp{1}(1, 1).Complexity = 'real';
saveVarsTmp{1}(1, 1).Dimensions = [1 1];
saveVarsTmp{1}(1, 1).DataType = 'Enum: drivingCoordinateFrameType';
saveVarsTmp{1}(1, 1).Min = [];
saveVarsTmp{1}(1, 1).Max = [];
saveVarsTmp{1}(1, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(1, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(1, 1).DocUnits = '';
saveVarsTmp{1}(1, 1).Description = '';
%创建元素OriginPosition
saveVarsTmp{1}(2, 1).Name = 'OriginPosition';
saveVarsTmp{1}(2, 1).Complexity = 'real';
saveVarsTmp{1}(2, 1).Dimensions = [3 1];
saveVarsTmp{1}(2, 1).DataType = 'double';
saveVarsTmp{1}(2, 1).Min = [];
saveVarsTmp{1}(2, 1).Max = [];
saveVarsTmp{1}(2, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(2, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(2, 1).DocUnits = '';
saveVarsTmp{1}(2, 1).Description = '';
%创建元素Orientation
saveVarsTmp{1}(3, 1).Name = 'Orientation';
saveVarsTmp{1}(3, 1).Complexity = 'real';
saveVarsTmp{1}(3, 1).Dimensions = [3 3];
saveVarsTmp{1}(3, 1).DataType = 'double';
saveVarsTmp{1}(3, 1).Min = [];
saveVarsTmp{1}(3, 1).Max = [];
saveVarsTmp{1}(3, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(3, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(3, 1).DocUnits = '';
saveVarsTmp{1}(3, 1).Description = '';
%创建元素HasVelocity
saveVarsTmp{1}(4, 1).Name = 'HasVelocity';
saveVarsTmp{1}(4, 1).Complexity = 'real';
saveVarsTmp{1}(4, 1).Dimensions = [1 1];
saveVarsTmp{1}(4, 1).DataType = 'boolean';
saveVarsTmp{1}(4, 1).Min = [];
saveVarsTmp{1}(4, 1).Max = [];
saveVarsTmp{1}(4, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(4, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(4, 1).DocUnits = '';
saveVarsTmp{1}(4, 1).Description = '';
BusVisionDetectionsMeasurementParameters.Elements = saveVarsTmp{1};
%创建总线BusVisionDetectionsObjectAttributes
BusVisionDetectionsObjectAttributes = Simulink.Bus;
BusVisionDetectionsObjectAttributes.Description = '';
BusVisionDetectionsObjectAttributes.DataScope = 'Auto';
BusVisionDetectionsObjectAttributes.HeaderFile = '';
BusVisionDetectionsObjectAttributes.Alignment = -1;
saveVarsTmp{1} = Simulink.BusElement;
%创建元素TargetIndex
saveVarsTmp{1}(1, 1).Name = 'TargetIndex';
saveVarsTmp{1}(1, 1).Complexity = 'real';
saveVarsTmp{1}(1, 1).Dimensions = [1 1];
saveVarsTmp{1}(1, 1).DataType = 'double';
saveVarsTmp{1}(1, 1).Min = [];
saveVarsTmp{1}(1, 1).Max = [];
saveVarsTmp{1}(1, 1).DimensionsMode = 'Fixed';
saveVarsTmp{1}(1, 1).SamplingMode = 'Sample based';
saveVarsTmp{1}(1, 1).DocUnits = '';
saveVarsTmp{1}(1, 1).Description = '';
BusVisionDetectionsObjectAttributes.Elements = saveVarsTmp{1};
clear saveVarsTmp;

















加速度变化曲线如下: