Facilitating the use of Physics-Based Simulations on Embedded Devices by running FMUs from MicroPython
DOI:
https://doi.org/10.3384/ecp218535Keywords:
Physics-Based Simulation, FMI, FMU, eFMI, MicroPythonAbstract
Physics-based simulations (PBS) are increasingly valuablefor real-time applications in embedded systems, yetintegrating them on resource-constrained devices remainschallenging. This paper presents ufmu, a lightweightframework that enables execution of FMI 2.0-compliantFunctional Mock-up Units (FMUs) within the MicroPythonenvironment, targeting platforms such as the ESP32. Theproposed approach translates FMU model descriptions into Cstructures, integrates them into MicroPython firmware, andexposes a minimal Python API for simulation control,enabling model-based computations on-device without clouddependencies. We evaluate the framework using a standardFMU model, comparing performance across ESP32, Unix, andplain C environments in terms of memory usage, executiontime, and firmware size. Despite the ESP32's hardwarelimitations, the results demonstrate that meaningfulsimulations can be achieved efficiently, with minimalmemory overhead. All code, documentation, and experimentinstructions are freely available under an MIT license,supporting reproducibility and adoption in education,prototyping, and embedded research.This work also lays the foundation for future integrationwith eFMI and the FMI 3.0 standard.Downloads
Published
2025-10-24
Issue
Section
Papers
License
Copyright (c) 2025 Tom Reynaud, Erfan Enferad, Maxime Lefrancois

This work is licensed under a Creative Commons Attribution 4.0 International License.