Simulation Accelerator Toolbox

An abstraction layer that can be put in front of our Subset Simulation Toolbox to simplify setup and speed up model evaluations.
Updated 25 Jan 2023
This project contains adapter code to interface with Simulink models when using the subset simulation toolbox at https://gitlab.com/tum-fsd/subsetsim.
Since Simulink models usually execute slower than native C/C++ binaries, the standard approach would be to use the (rapid) accelerator mode in Simulink to increase simulation speed for many parameter samples in Monte Carlo Simulations. However we found this to have an unnecessarily large computational overhead when data is transferred between the simulation model on a deferred worker thread and the coordinator on the host. Instead, this project allows to generate and build C code that minimizes data transfer to make Monte Carlo parameter studies much faster.
In the main toolbox folder, you can find a subfolder demo/01-delay:
metric = tulrfsd.mcmc.Metric("biased_signal", "<", 1)
scenario = tulrfsd.mcmc.CompiledScenario("DelayModel")
parameters = tulrfsd.mcmc.Parameter({
% parameter % distribution model % mapping function
"delay", makedist("norm", 0, 300), @abs
})
study = tulrfsd.mcmc.Study(scenario, metric, parameters)
% estimate the failure probability that the metric is violated
[P_f, cause, subsets] = study.probability()
This snippet configures the three interface parts, metric, scenario and parameters, that are needed to setup a study. Then the toolbox will configure the underlying subset simulation algorithm and return the estimated failure probability.

Cite As

Schwaiger, Florian, et al. “Acceleration Framework to Quantify the Influence of Uncertain Parameters on Simulation Models Using Matlab and Simulink.” AIAA Scitech 2021 Forum, American Institute of Aeronautics and Astronautics, 2021, doi:10.2514/6.2021-1980.

View more styles
MATLAB Release Compatibility
Created with R2020b
Compatible with R2020b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!