Technical Articles and Newsletters

Developing an Autonomous Traffic Simulation Framework for Functional Safety Testing

By Mustafa Saraoğlu, Technische Universität Dresden

While there is a growing need for the functional safety assessment of advanced driver-assistance systems (ADAS) and autonomous vehicle control systems, testing decision and control algorithms with numerous configuration parameters across a wide range of driving conditions is a daunting task. In-vehicle tests can entail hundreds of thousands of hours of driving, and even then, the challenge of reproducing, diagnosing, and retesting problematic scenarios remains. 

I am working with colleagues in the Institute of Automation at Technische Universität Dresden on MOBATSim, a simulation framework that enables engineers to assess autonomous vehicle decision and control algorithms, visualize their performance, and analyze their effects on urban traffic environments (Figure 1). 

Figure 1. The MOBATSim simulation framework for assessing functional safety.

Built entirely with MATLAB® and Simulink®, MOBATSim enables test engineers to evaluate the functional safety of algorithms not only in simple simulations with, say, a lead car and a trailing car, but in a complex environment with multiple vehicles traveling at different speeds and potentially faulty sensors or communication systems. In early design phases, engineers can use MOBATSim as a virtual environment to reduce testing time and cost and as a framework for adopting the ISO 26262 functional safety standard for road vehicles. 

Developing MOBATSim

We began by developing MATLAB algorithms that computed simple longitudinal (acceleration and deceleration) and latitudinal (left and right) vehicle movements. We incorporated these algorithms as MATLAB System blocks into a Simulink model. We added submodels to implement perception, decision-making, and trajectory-planning tasks common to autonomous driving systems (Figure 2). 

Figure 2. Simulink model including perception, decision-making, and trajectory-planning components.

Because MOBATSim has a modular architecture, we can increase the fidelity of individual components—for example, sensor fusion, vehicle dynamics, and inter-vehicle communication—as the project evolves. To speed development of the initial version of MOBATSim, we built simple models of these components; for example, the original longitudinal control model used a straightforward transfer function to relate acceleration to vehicle speed; it did not account for factors such as tire slip or air drag.

Injecting Faults

The ISO 26262 standard recommends the use of fault injection to study the effects of faulty components and error propagation in the system. MOBATSim supports a variety of fault injection options, including sensor noise, stuck-at faults, and network delays in vehicle-to-vehicle (V2V) or vehicle-to-infrastructure (V2I) communications. 

To establish a performance baseline, algorithms are first simulated in MOBATSim under ideal (fault-free) operating conditions. Simulation parameters, such as the number of vehicles, as well as vehicle starting points, ending points, size, and maximum speed, can be specified via a MATLAB file or the MOBATSim interface (Figure 3).

Figure 3. MOBATSim interface for configuring and initiating simulation runs, developed with MATLAB App Designer.

In real-life scenarios, vehicles may experience multiple simultaneous faults of varying severity. With MOBATSim, we can run numerous simulations to assess the safety of autonomous driving systems operating under increasingly difficult conditions and pinpoint where the systems begin to fail. For example, we can steadily increase the noise on the front distance sensor as we vary the duration of the stuck-at fault. After running simulations in Simulink, we visualize the results in MATLAB to identify the conditions under which vehicles fail to maintain safe following distances (Figure 4).

Figure 4. Safe distance violation as a function of stuck-at fault duration and sensor noise.

A MOBATSim Student Project: Intersection Management

I am the primary developer of MOBATSim, but other TU Dresden students also work on the project. Some students improve individual components of the simulation framework, while others use the framework to conduct their own research studies. 

One recent student project focused on autonomous intersection management. Working with MOBATSim, the student developed and simulated a management system that minimized travel times and energy consumption for vehicles passing through busy intersections. Vehicles use V2I communications to signal the intersection management algorithm as they approach the intersection and receive signals back from the algorithm that ensure safe and optimized transit through the intersection.

For most MOBATSim simulations, including those conducted in the intersection management project, it is sufficient to visualize the movement of vehicles using 2D animations. For final presentations, however, we create 3D visualizations with Simulink 3D Animation™, as these provide a more engaging way to demonstrate dynamic system behaviors (Figure 5). 

Figure 5. A simulated driving scenario generated with Simulink 3D Animation.

Recognition and Planned Improvements

MOBATSim placed first in last year’s Simulink Student Challenge, a worldwide competition open to all students who use MATLAB and Simulink. Our long-term goal is for automotive OEMs to adopt MOBATSim for functional safety assessment of autonomous driving systems.

MOBATSim is still under active development, and I continue to work with TU Dresden students on increasing the fidelity of various aspects of the framework to improve overall simulation accuracy. Planned enhancements include the automation of fault injections and the use of parallel computing to accelerate simulations. Our team is also looking into adding new automated driving and vehicle dynamics capabilities, including cosimulation with Unreal Engine® scenes, and replacing some of the algorithms that we have coded specifically for vehicle-following situations with model predictive controllers. We currently use a PID with an outer loop distance control and inner loop speed control, which is fast and effective but not as accurate as a model predictive controller.

We recently created an open-source version of MOBATSim that is available for download on the File Exchange.

About the Author

Mustafa Saraoğlu is a Ph.D. student at the Institute of Automation at TU Dresden. His research focuses on the safety assessment of autonomous vehicles and their components.

Published 2020

View Articles for Related Capabilities

View Articles for Related Industries