MOBATSim (Model-based Autonomous Traffic Simulation Framework) is a framework based on MATLAB® and Simulink® that allows users to develop automated driving algorithms and assess their safety and performance. By running a traffic simulation, the safety of the implemented component or algorithm can be measured on both the vehicle level and the traffic level, supported by 2D and 3D visualization options.
Consider starring our GitHub Repositories and subscribing to our MOBATSim YouTube Channel to support us!
Autonomous Vehicle Modeling and Simulation in Simulink Tutorials
- Introduction
- Key Features of MOBATSim
- Requirements
- Citation
- Contributing to MOBATSim
- Release Notes
- Getting Started
Automated driving systems tend to be more critical and sophisticated in the nearest future. The functional safety assessment for these systems becomes an urgent necessity for the transition to full autonomy. Testing these functions consisting of decision and control algorithms with many variables and parameters in a unified manner is a daunting task. Threat assessment has to be made for vehicles to avoid hazardous situations actively. This requires analyzing complex operational profiles such as routing, intersection management, and collision prediction in an environment where multiple vehicles are in different positions and traveling at different speeds. There is a need for a comprehensive traffic simulation framework that models the functionality of the vehicles and the interactions between them.
More detailed information about the scientific papers related to MOBATSim can be found on our website,
or you can visit our YouTube Channel where we publish the latest updates with tutorial videos:
- All the scripts, class files, and functions used in MOBATSim are open for editing. Users can control all the vehicles, traffic management algorithms, and the map.
- Each vehicle is considered as an agent, and the traffic is simulated as a closed-loop multi-agent system. The vehicles generate their trajectories during the simulation according to the states and intentions of the other vehicles around in the environment. This feature also allows reactive planning algorithms to be developed and tested.
- Users can either develop an algorithm or a controller for a single vehicle (usually referred to as the ego vehicle) or different implementations for different vehicles simultaneously.
- Full control over all the states regarding the simulation allows for fault injection and error propagation analysis. States can be easily manipulated during the simulation by implementing either Simulink fault injection blocks or code snippets in MATLAB System Block functions.
- MOBATSim can be used for benchmarking control and decision algorithms regarding safety and performance on different abstraction levels such as component level, vehicle level, and traffic level.
- Object-oriented programming structure (MATLAB Classes) combined with a block diagram environment (Simulink) allows a flexible framework suitable for collaboration.
- Data logging can be extended to states and signals of interest other than the default vehicle states used by the post-simulation 3D visualization.
- The compatible data structure allows for various post-simulation visualization options (e.g., Unreal Engine 4 support, Bird's Eye View Scope, or Simulink 3D Animation).
- MOBATSim's compatible map structure allows road network extensions through a user-friendly interface using the Driving Scenario Designer app.
MOBATSim is continuously updated with the latest version of MATLAB®. Therefore the requirement is MATLAB R2021a or MATLAB R2020b. The following toolboxes are required for running MOBATSim:
- Simulink® and Stateflow®
- Automated Driving Toolbox™
- Robotics System Toolbox™
- Control System Toolbox™
- Deep Learning Toolbox™
- Symbolic Math Toolbox™
- Model Predictive Control Toolbox™ (only if MPC-Cruise Controller Block is used)
- Simulink 3D Animation Toolbox™ (only required for the 3D Animation Virtual World)
Main Author: Mustafa Saraoğlu
Contributors: Manuel Schirmer, Johannes Pintscher, Laura Slabon, Qianwei Yang, Qihang Shi, Wenkai Wu, Maoxuan Zhao, Erik Noack, Fabian Hart, Müjdat Korkmaz, Marta Valdes Martin
Message us via the contact form on our website!
Copyright © 2017 MOBATSim.
Saraoglu, M., Morozov, A., & Janschek, K. (2019). MOBATSim: MOdel-Based Autonomous Traffic Simulation Framework for Fault-Error-Failure Chain Analysis. IFAC-PapersOnLine, 52(8), 239–244. Elsevier BV. Retrieved from https://doi.org/10.1016%2Fj.ifacol.2019.08.077
BibTex:
@article{MOBATSim,
title = {{MOBATSim}: {MOdel}-Based Autonomous Traffic Simulation Framework for Fault-Error-Failure Chain Analysis},
journal = "IFAC-PapersOnLine",
volume = "52",
number = "8",
pages = "239 - 244",
year = "2019",
note = "10th IFAC Symposium on Intelligent Autonomous Vehicles IAV 2019",
issn = "2405-8963",
doi = "https://doi.org/10.1016/j.ifacol.2019.08.077",
url = "http://www.sciencedirect.com/science/article/pii/S2405896319304100",
author = "Mustafa Saraoglu and Andrey Morozov and Klaus Janschek",
keywords = "Autonomous driving, Fault injection, Error propagation, Safety analysis, Traffic simulator",
}
If you find MOBATSim useful and you would like to improve it by implementing your own automated driving algorithms:
- "Fork" the repository from the top right corner.
- Go to your forked repository and switch to the development branch.
- Make your changes in the development branch. Make sure your contributions fit the format in terms of coding or input/output properties of the Simulink blocks.
- To make sure that your changes work, you should run
MOBATSimAutoTesting.m
insrc/Scripts
folder and if you getpassed
from all the tests, you should "commit" and then "Push" to your forked repository. - Then if you would like to contribute, send a "Pull Request" to the corresponding branch on the MOBATSim/MOBATSim repository.
- Once it is reviewed, it will be approved or changes will be requested along with the comments of the reviewer regarding the issue with your Pull Request.
We would like to encourage everyone who would like to contribute, so you can also contact us for a more detailed explanation of the structure!
- New ways to visualize your driving scenario: Unreal Engine 4 support via DrivingScenarioDesigner App, Bird's Eye View.
- New vehicle kinematic bicycle models from the Automated Driving Toolbox library.
- A more detailed road structure with actual units as meters and double lane roads.
- New lateral controllers are easily chosen using a variant subsystem: Stanley lateral controller and Pure Pursuit lateral controller with lane-changing capabilities.
- Implementation of the Frenet Coordinate system for local trajectory planning and optimal trajectory generation for maneuvers.
- Implementation of lane-changing maneuver on double lane roads.
- An improved coding structure using superclasses, name-value pairs to also enhance the flexibility of MOBATSim and also code optimization using vectorizations and memory preallocations to increase the performance.
- Detailed documentation for the people who are interested and would like to understand and contribute to MOBATSim
- Bonus content: 3D Animation World with the new Dinosaur Park.
- Vehicles are not allowed to start or finish on the intersection points to avoid congestion.
- Bird's Eye View or DrivingScenarioDesigner APP might work slowly because of the size of the road network.
- Some road merges do not have safety guarantees which means that a vehicle just merging another road at the same time with another vehicle or there is a stopping vehicle at the merging point of the joining road may cause collisions.
- Changing the default sample time value of
0.02
or playing with different Simulink Solver options other thanauto
may cause unexpected behavior.
MOBATSim has a project file that includes the Simulink files and their paths. The project can be opened by double-clicking on MOBATSim.prj
and a GUI will appear, which can be used to start the simulation. Simply click on Start Simulation
and wait for the simulation to start.
First it would be best if you fork the MOBATSim repository and then clone it to your computer. After opening the MOBATSim folder please refer to the live script file GettingStarted.mlx
for more detailed documentation.