MATLAB and Simulink for Automated Driving Systems

Automotive engineers use MATLAB® and Simulink® to design automated driving system functionality including computer vision, path planning, and sensor fusion and controls development. With MATLAB and Simulink, you can:

  • Develop perception systems using prebuilt algorithms, sensor models  and apps for computer vision, lidar and radar processing, and sensor fusion.  
  • Design control systems and model vehicle dynamics in a 3D environment using fully assembled reference applications.
  • Test and verify systems using driving scenario authoring with roads, actors, and vehicle definitions, synthetic sensor models, and visualizations
  • Use automated driving-specific visualizations, including a bird’s-eye-view of sensor coverage, detections, and tracks
  • Plan driving paths by designing and using vehicle costmaps, and motion-planning algorithms
  • Ensure your systems comply with industry standards like ISO26262.
  • Automatically generate C code for rapid prototyping and HIL testing using code generation products

“MATLAB is my preferred tool because it speeds algorithm design and improvement. I can do the data analysis, algorithm development, algorithm visualization, and simulation in one place and then generate C code that is reliable, efficient, and easy for software engineers to integrate within a larger system.”

Liang Ma, Delphi

Using MATLAB for Automated Driving Systems

Perception System Design 

With MATLAB, you can use prebuilt algorithms and sensor models for computer vision, lidar processing, radar, and sensor fusion. Perform sensor fusion using a library of tracking and data association techniques including point and extended object trackers.  Simulate measurements from inertial and GPS sensors, and design fusion and localization algorithms to estimate vehicle position and orientation.

Use deep learning and machine learning to develop algorithms for pedestrian detection, lane detection, and drivable path estimation.

With the Ground Truth Labeling app, you can test perception system performance by comparing ground truth data against algorithm outputs.  

Control Systems Design 

Develop controllers for automated driving functions such as Automatic Emergency Braking (AEB), Lane Keeping Assist (LKA), Automatic Cruise Control (ACC), and automated parking valet. You can design model predictive controllers specifically for automated driving applications with prebuilt features and blocks for scenarios like adaptive cruise control, lane-keeping assist, and obstacle avoidance.

Test automated driving algorithms using authored scenarios and synthetic detections from radar and camera sensor models. You can define road networks, actors, and sensors using the Driving Scenario Designer App. Import prebuilt EURO NCAP tests and OpenDRIVE® road networks. 

Reference Examples

Path Planning 

Plan driving paths by using vehicle costmaps and motion-planning algorithms.  You can also access path planning techniques from ROS using interfaces in the Robotics System Toolbox™.  

Simulation-Based Testing  

Start testing your automated driving algorithms using the Driving Scenario Designer app, which lets you build scenarios or load prebuilt ones-- including EuroNCAP. Generate detections from your statistical radar and camera models and analyze the output in MATLAB or Simulink.

You can also use the 3D environment provided with the reference applications to develop your own virtual test ground for ADAS and automated driving features. For example, the vehicle models come with a virtual camera that sends images back to Simulink during the simulation. You can analyze the signals in Simulink to test your lane detection algorithm. Customizing the scenes in the Unreal Engine editors gives you additional flexibility to create and simulate scenarios that fully exercise your ADAS and automated driving features.

Visualization 

MATLAB provides automated driving-specific visualizations, including a bird’s-eye-view of sensor coverage, detections, and tracks; 3D scenario chase views; Lidar point cloud viewers; and video overlays for lane markers and vehicle detections.

To track moving objects, you can use constant-velocity or constant-acceleration motion models, or you can define your own models.