Main Content

3D Simulation for Vehicle Dynamics Blockset

Vehicle Dynamics Blockset™ provides a co-simulation framework that models driving algorithms in Simulink® and visualizes their performance in a 3D environment. This 3D simulation environment uses the Unreal Engine® from Epic Games®.

Simulink blocks related to the 3D simulation environment can be found in the Vehicle Dynamics Blockset > Vehicle Scenarios > Sim3D block library. These blocks provide the ability to:

  • Configure prebuilt scenes in the 3D simulation environment.

  • Place and move vehicles within these scenes.

  • Set up cameras the vehicles.

  • Simulate camera outputs based on the environment around the vehicle.

This simulation tool is commonly used to supplement real data when developing, testing, and verifying the vehicle performance of automated driving algorithms. In conjunction with a vehicle model, you can use these blocks to perform realistic closed-loop simulations that encompass the entire automated driving stack, from perception to control.

For more details on the simulation environment, see How 3D Simulation for Vehicle Dynamics Blockset Works.

3D Simulation Blocks


To configure a model to co-simulate with the 3D simulation environment, add a Simulation 3D Scene Configuration (Automated Driving Toolbox) block to the model. Using this block, you can choose from a set of prebuilt 3D scenes where you can test and visualize your vehicle performance. The following image is from the Virtual Mcity scene.

The toolbox includes these scenes.

Straight Road

Straight road segment

Curved Road

Curved, looped road

Parking Lot

Empty parking lot

Double Lane Change

Straight road with barrels and traffic signs that are set up for executing a double lane change maneuver

Open Surface

Flat, black pavement surface with no road objects

US City Block

City block with intersections, barriers, and traffic lights

US Highway

Highway with cones, barriers, traffic lights, and traffic signs

Large Parking Lot

Parking lot with parked cars, cones, curbs, and traffic signs

Virtual Mcity

City environment that represents the University of Michigan proving grounds (see Mcity Test Facility); includes cones, barriers, an animal, traffic lights, and traffic signs

If you have the Vehicle Dynamics Blockset Interface for Unreal Engine 4 Projects support package, then you can modify these scenes or create new ones. For more details, see Customize 3D Scenes for Vehicle Dynamics Simulations.

Vehicles, Tractors, and Trailers

To define a virtual vehicle in a scene, add a Simulation 3D Vehicle with Ground Following, Simulation 3D Vehicle, Simulation 3D Tractor, or Simulation 3D Trailer block to your model. Using the blocks, you can control the movement of the vehicle by supplying the X, Y, and yaw values that define its position and orientation at each time step.

You can also specify the color and type of vehicle. The toolbox includes these vehicle types:


You can define virtual sensors and attach them at various positions on the vehicles. The toolbox includes these sensor modeling and configuration blocks.

Simulation 3D Camera Get

Provides an interface to an ideal camera in the 3D visualization environment. The image output is a red, green, and blue (RGB) array.

Simulation 3D Actor Transform Get

Gets the actor translation, rotation, and scale for the Simulink simulation environment.

Simulation 3D Actor Transform Set

Sets the actor translation, rotation, and scale in the Unreal Engine 3D visualization environment

Simulation 3D Message Get

Retrieves data from the Unreal Engine 3D visualization environment.

Simulation 3D Message Set

Sends data to the Unreal Engine 3D visualization environment.

Algorithm Testing and Visualization

Vehicle Dynamics Blockset Interface for Unreal Engine 4 Projects 3D simulation blocks provide the tools for testing and visualizing path planning, vehicle control, and perception algorithms.

Closed-Loop Systems

After you design and test a perception system within the 3D simulation environment, you can then use it to drive a control system that actually steers a vehicle. In this case, rather than manually set up a trajectory, the vehicle uses the perception system to drive itself. By combining perception and control into a closed-loop system in the 3D simulation environment, you can develop and test more complex algorithms, such as lane keeping assist and adaptive cruise control.

Related Topics