The Functional Mock-up Interface (FMI) is a tool-independent standard for model exchange and co-simulation. It enables the seamless integration of simulation models across different tools, supporting:- Co-Simulation (CS)
FMU type that contains its own solver or scheduler. - Model Exchange (ME)
FMU type that externalizes the ODE/DAE solver to allow tightly coupling multiple FMUs and avoid co-simulation delays. - Scheduled Execution (SE) FMI 3.0
FMU type that externalizes the scheduler to run model partitions, potentially synchronized between more than one FMU and exchanging input and output variables accordingly.
Key Features of FMI
- Standardized Interface: Unified XML schema and C API.
- Binary Compatibility: Cross-platform executable FMUs.
- Version Evolution: FMI 2.0 introduced co-simulation refinements, while FMI 3.0 expanded capabilities with:
- Structured parameters for better configuration.
- Clocks to support hybrid systems.
- Enhanced scalability for large-scale simulations.
- Support for additional numeric types (e.g., 32-bit, 16-bit, and 8-bit floats and integers) to improve precision.
- Binary type support to handle non-numeric data, such as complex sensor data.
- Extension of variables to arrays, allowing efficient and natural handling of non-scalar variables.
- Early return from fmi3DoStep calls in Co-Simulation mode, improving performance and control.
History of FMI
- 2011: Release of FMI 1.0
- 2013: Release of FMI 2.0
- 2021: Release of FMI 3.0
FMI for Co-Simulation
The Co-Simulation interface is designed both for the coupling of simulation tools, and the coupling of subsystem models, exported by a modeling environment together with their solvers as runnable code.
Schematic view of data flow between user, the co-simulation algorithm of the importer and the FMU for Co-Simulation. FMI for Model Exchange
The Model Exchange interface exposes an ODE to an external solver of an importer. Models are described by differential, algebraic and discrete equations with time-, state- and step-events. That integration algorithm of the importer, usually a ODE/DAE solver, is responsible for advancing time, setting states, handling events, etc.
Schematic view of data flow between user, the solver of the importer and the FMU for Model Exchange. FMI for Scheduled Execution
The Scheduled Execution interface exposes individual model partitions. A scheduler provided by the importer can control the execution of each model partition separately. In some ways the Scheduled Execution interface has similarities to the Model Exchange interface: SE externalizes a scheduling algorithm usually found in a controller algorithm and ME externalizes the ODE/DAE solver.
Schematic view of data flow between user, the scheduler of the importer and model partitions of the FMU for Scheduled Execution.