MATLAB 和 Simulink 在自动驾驶系统中的应用

汽车工程师使用 MATLAB® 和 Simulink® 设计自动驾驶系统功能,包括传感、路径规划以及传感器融合与控制。借助 MATLAB 和 Simulink,您能够:

  • 使用针对计算机视觉、激光雷达和雷达处理以及传感器融合的预置算法、传感器模型和应用程序来开发感知系统。
  • 使用组装完备的参考应用,在三维环境中设计控制系统并对车辆动态进行建模。
  • 使用合成传感器模型创建驾驶场景,用以测试和验证系统。
  • 使用专为自动驾驶设计的可视化。
  • 通过设计和使用车辆代价地图和运动规划算法来规划驾驶路径。
  • 减少为实现 ISO 26262 合规所需的工程投入。
  • 使用代码生成产品自动生成 C 代码,以便进行快速原型设计和 HIL 测试。

“MATLAB 是我的首选工具,因为它可以加速算法的设计与改进。我能够在同一工具内集中完成数据分析、算法开发、算法可视化和仿真,然后生成可靠、高效的 C 代码,让软件工程师轻松将其集成到系统中。”

Liang Ma, Delphi

2020 MathWorks中国 汽车年会

将 MATLAB 用于自动驾驶系统

感知设计和测试

MATLAB 提供了用于计算机视觉、激光雷达处理、雷达以及传感器融合的预置算法和传感器模型。您可以使用各种跟踪和数据关联技术(包括点目标和扩展目标跟踪器)来执行传感器融合。您还可以对来自 IMU/GPS 传感器的测量结果进行仿真,并设计融合和定位算法以估算车辆位置和方向。

使用深度学习和机器学习开发算法,用于行人检测、车道检测和可行驶路径估算。

使用 Ground Truth Labeling 应用程序,通过对比真值数据与算法输出来测试感知系统性能。


Access, Visualize, and Label Data

You can access live and recorded driving data using MATLAB interfaces for CAN and ROS. Using built-in tools, you can also visualize and label imported data. For example, the ground truth labeler app provides an interface to visualize and label multiple signals interactively, or you can automatically label these signals and export the labeled data to your workspace.

To access and visualize geographic map data, you can use HERE HD Live Maps and OpenStreetMap®.


Simulate Driving Scenarios

You can use cuboid and Unreal Engine® simulation environments with MATLAB to develop and test algorithms in virtual scenarios.

The cuboid environment represents actors as simple graphics and uses probabilistic sensor models. You can use this environment for controls, sensor fusion, and motion planning.

Using the Unreal Engine environment, you can develop algorithms for perception and the cuboid-environment use-cases. RoadRunner lets you design scenes to use with simulators, including CARLA, Vires VTD, and NVIDIA Drive Sim®, as well as MATLAB and Simulink. RoadRunner also supports export to industry standard file formats like FPX and OpenDRIVE®.


Design Planning and Control Algorithms

Using MATLAB and Simulink, you can develop path planning and control algorithms. You can design vehicle control systems using lateral and longitudinal controllers that enable autonomous vehicles to follow a planned trajectory.

You can also test your algorithms synthetically using sensor models and vehicle dynamics models, along with 2D and 3D simulation environments.


Design Perception Algorithms

You can develop perception algorithms such as using data from camera, lidar, and radar. Perception algorithms include detection, tracking, and localization, which you can use for applications like automatic braking, steering, map building, and odometry. 

You can implement these algorithms as part of ADAS applications like emergency braking and steering.

Using MATLAB, you can develop algorithms for sensor fusion, simultaneous localization and mapping (SLAM), map building, and odometry.


Deploy Algorithms

You can deploy perception, planning, and control algorithms to hardware using code generation workflows. Supported code generation languages include C, C++, CUDA®, Verilog®, and VHDL®.

You can also deploy algorithms to service-oriented architectures like ROS and AUTOSAR.

Using auto-generated code, you can connect sensors with other ECU components. Several deployment targets are supported, including hardware from NVIDIA, Intel®, ARM®, and more.


Integrate and Test

You can integrate and test your perception, planning, and control systems. Using Simulink Requirements™, you can capture and manage your requirements. You can also use Simulink Test™ to run and automate test cases in parallel.


控制设计和测试

为自动驾驶功能(如自动紧急制动 (AEB)、车道保持辅助 (LKA)、自动巡航控制 (ACC) 和自动代客泊车)开发控制器。使用针对 ACC、LKA 和障碍规避等场景的预置功能和模块,为自动驾驶应用设计专门的模型预测控制器。

创建测试场景,使用来自雷达和摄像机传感器模型的合成检测结果来测试自动驾驶算法。使用 Driving Scenario Designer 应用程序来定义路网、行为体和传感器。导入预置的 EURO NCAP 测试和 OpenDRIVE® 路网。 


路径规划和定位 

您可以使用车辆代价地图和运动规划算法来规划驾驶路径。借助 ROS Toolbox™ 提供的接口,您还可以使用 ROS 中的路径规划技术。使用来自 IMU 和 GPS 传感器的数据估算车辆位置和方向。


基于仿真的测试  

您可以使用 Driving Scenario Designer 测试自动驾驶算法,该应用程序支持构建场景和加载预置场景(包括 EuroNCAP)。从雷达和摄像机统计模型生成检测结果,并在 MATLAB 或 Simulink 中分析输出。

使用参考应用和三维环境为 ADAS 和自动驾驶功能开发虚拟测试路况。车辆模型附带虚拟摄像机,可在仿真过程中将图像发回 Simulink。在 Simulink 中分析信号以测试车道检测算法。在“虚幻”引擎 (UE) 编辑器中自定义场景,从而更加灵活地创建和仿真场景,以全面演练 ADAS 和自动驾驶功能。