Johannes Rein


Session

09-10
10:05
25min
Hybrid Simulation Models for Embedded Applications: AModelica and eFMI approach
Tobias Kamp, Christoff Bürger, Johannes Rein, Jonathan Brembeck

Hybrid simulation models combine physics equations with trainable components to improve simulation results and performance. Physics-enhanced neural ordinary differential equations (PeN-ODE) are a promising type of hybrid models that combine artificial neural networks (NN) with the differential equations of a dynamic system. Dynamical simulation models are often part of embedded control algorithms of cyber-physical systems (CPS); compliance with the safety and real-time requirements of such embedded environments is, however, challenging.

In this work, we propose a workflow to incorporate trained NNs in Modelica models to form hybrid simulation models that are PeN-ODEs. We thereby focus on the transformation steps from equation-based trained PeN-ODEs in Modelica towards causal solutions suited for the embedded domain -- up to and including MISRA C:2023 compliance checks and final software-in-the-loop (SiL) tests of generated production code in the modeling environment -- for which we leverage eFMI standard compliant tools (Dymola and Software Production Engineering). It is of particular interest, how the trained NNs of the hybrid model are implemented. We present two approaches: (1) generation of C code using existing Open Neural Network Exchange (ONNX) tooling and (2) pure Modelica code with the tensor-flow represented as multi-dimensional equations. Both approaches are discussed, highlighting why (2) is, in the long run, a better option given the eFMI technology space.

FMI for Embedded Systems and Virtual Prototyping
Audi-Midi