The FMI Blockset for Cloud allows co-simulation FMUs to be simulated in the cloud using a REST API. By deploying this as an Amazon Lambda Function we can build powerful and flexible simulation applications that provide a browser based user interface. The goal is to provide a simulation platform where experts can create simulation models and provide access to them to a wider audience of non-simulation experts. As the models are provided as FMUs and the platform allows the simulation expert to control the parameters that can be accessed it is possible to setup models for specific analysis tasks in a well controlled manner and enable non-experts to run their own “what-if” studies.
The FMI Blockset for Cloud essentially consists of two parts:
- The user interface which could be any application that can interact with a REST API. We are creating web browser based interfaces using Angular JS.
- The simulation platform that runs in the Amazon Cloud and is accessed through a REST API provided by the Amazon API Gateway.
The simulation platform is implemented as a series of Amazon Lambda functions built up around the core simulation Lambda Function. This architecture will allow us to extend the types of simulation offered by the platform to allow us to fully leverage the power of the Amazon cloud. The initial version shown below runs a single simulation but through the addition of more Lambda functions, in the future, we will be able to extend the capabilities of the platform to support Design of Experiments (DOE), parameter sensitivity sweeps, design exploration tools, optimisation as well as more complex simulation tasks that might require running multiple models such as a Lap-time simulation.
The simulation platform is supported by a database that enables the trace-ability between simulation parameters and results and to track back through the history of the simulations you’ve run. Access to the platform, including your FMUs and simulation results is secured through the Amazon Cognito service.
Figure 1: FMI Blockset for CloudSim diagram
User Interface
A generic web-browser based user interface has been created using Angular to leverage the latest browser capabilities. This user interface is built around the concept of selecting a simulation task, which points to a specific FMU, and then provides you with access to the model parameters and simulation results.
Whenever a simulation is run a standard report consisting of multiple plots and a table of metrics is generated. This provides quick access to the results that the model developer thinks are the most interesting. Users also have access to all the model variables to be able to create their own custom plots.
Figure 2: Example of results from CoupledClutches in the web-app
Written by: Vesel Haxha – Senior Developer
Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion.