Agent-Based Modeling and Simulation of Connected and Automated Vehicles Using Game Engine: A Cooperative On-Ramp Merging Study

Ziran Wang, BaekGyu Kim, Hiromitsu Kobayashi, Guoyuan Wu, Matthew J. BartharXiv 2018

Introduction

On-ramp merging represents one of the most complex maneuvers in modern traffic management, requiring high-speed coordination and precise timing. While Connected and Automated Vehicles (CAVs) offer a pathway to optimize these interactions through Vehicle-to-Everything (V2X) communication, validating these systems in the real world is costly and risky. Traditional traffic simulators often lack the physical fidelity or the interactive "human-in-the-loop" capabilities necessary for comprehensive testing. This study explores the use of the Unity3D game engine as a high-fidelity platform for simulating cooperative on-ramp merging protocols.

Methodology

The researchers developed an Agent-Based Modeling and Simulation (ABMS) framework within Unity3D, utilizing its built-in Nvidia PhysX engine for realistic vehicle dynamics.

Environment and Control Protocol

The simulation environment is a digital twin of a highway segment in Mountain View, California. The core of the system is a distributed consensus-based longitudinal control protocol.

Schematic of the cooperative on-ramp merging protocol showing V2I communication and control logic.

As vehicles approach the merging zone, they communicate with Roadside Units (RSUs) to establish a merging sequence based on estimated arrival times. Each vehicle then adjusts its acceleration by monitoring its "predecessor" in the sequence. To facilitate cross-lane coordination, the system employs a "ghost vehicle" technique, where a virtual representation of a ramp vehicle is projected onto the highway lane, allowing the automated controller to maintain safe gaps as if the vehicles were in the same lane.

Simulation Fidelity

A key advantage of using a game engine like Unity3D is the ability to simulate complex sensor data alongside vehicle physics.

Top-down view of the Unity3D simulation environment featuring high-fidelity sensor modeling.

The simulation includes a "fail-safe" layer where local radar/lidar data takes precedence over V2X communication if a collision is imminent, ensuring robustness against network latency.

Results and Discussion

The study compared the automated cooperative protocol against human-driven baselines using a physical driving simulator. The results demonstrated significant improvements across all key performance indicators:

  • Mobility: Average travel time decreased by 6.61%.
  • Energy Efficiency: Total energy consumption was reduced by 7.82%.
  • Environmental Impact: Carbon Monoxide (CO) and Nitrogen Oxides (NOx) emissions dropped by 58.37% and 42.03%, respectively, due to the elimination of stop-and-go "shockwaves" common in human-driven traffic.
  • Safety: The CAV protocol maintained consistent safety margins, whereas human drivers frequently created high-risk scenarios during aggressive merging.

Conclusion

This research highlights the potential of game engines as powerful tools for autonomous vehicle research. By providing a balance of physical realism, visual fidelity, and interactive testing, platforms like Unity3D enable the validation of complex cooperative protocols. Future work will focus on integrating lateral control for lane-changing maneuvers and developing higher-fidelity vehicle models to further bridge the gap between simulation and reality.

Summary updated

BibTeX
@misc{wang2018agent,
  author = {Ziran Wang and BaekGyu Kim and Hiromitsu Kobayashi and Guoyuan Wu and Matthew J. Barth},
  title = {{Agent-Based Modeling and Simulation of Connected and Automated Vehicles Using Game Engine: A Cooperative On-Ramp Merging Study}},
  year = {2018},
  eprint = {1810.09952},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.09952},
}
Figure