Hybrid Simulation Models for Embedded Applications: A Modelica and eFMI approach
Hybrid simulation models combine physics equations withtrainable components to improve simulation results andperformance. Physics-enhanced neural ordinary differentialequations (PeN-ODE) are a promising type of hybrid modelsthat combine artificial neural networks (NN) with thedifferential equations of a dynamic system. Dynamicalsimulation models are often part of embedded controlalgorithms of cyber-physical systems (CPS); compliance withthe safety and real-time requirements of such embeddedenvironments is, however, challenging.In this work, we propose a workflow to incorporate trainedNNs in Modelica models to form hybrid simulation modelsthat are PeN-ODEs. We thereby focus on the transformationsteps from equation-based trained PeN-ODEs in Modelicatowards causal solutions suited for the embedded domain --up to and including MISRA C:2023 compliance checks andfinal software-in-the-loop (SiL) tests of generatedproduction code in the modeling environment -- for which weleverage eFMI standard compliant tools (Dymola and SoftwareProduction Engineering). It is of particular interest, howthe trained NNs of the hybrid model are implemented. Wepresent two approaches: (1) generation of C code usingexisting Open Neural Network Exchange (ONNX) tooling and(2) pure Modelica code with the tensor-flow represented asmulti-dimensional equations. Both approaches are discussed,highlighting why (2) is, in the long run, a better optiongiven the eFMI technology space.
Authors
- Christoff Bürger
- Jonathan Brembeck (ORCID: https://orcid.org/0000-0002-7671-5251)
- Tobias Kamp (ORCID: https://orcid.org/0009-0006-5584-2928)
- Johannes Rein
Institutions
- Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR) (DE)
- Dassault Systèmes (France) (FR)
Publication Details
- Journal
- Linköping electronic conference proceedings
- Published
- 2025-10-24
- DOI
- https://doi.org/10.3384/ecp218555
- Primary Topic
- Modeling and Simulation Systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- ITEA
- Bundesministerium für Bildung und Forschung