Functional Mock-up Interface (FMI)
The Functional Mock-up Interface (FMI) standard is an open and tool-independent standard for exchange of models between tools. A simulation environment, such as System Modeler, can use the FMI to create a Functional Mock-up Unit (FMU) and simulate it together with your models.
In this tutorial, FMI export and import will be demonstrated by turning a controller in a closed-loop system into an FMU.
MODELS USED IN THIS TUTORIAL |
InvertedPendulum LQControlSystem |
Export
Begin by duplicating the InvertedPendulum model.
Copy of the InvertedPendulum model.
Next, export the controller as an FMU by opening the model of the controller and selecting Export ▶ FMU…. Keep the default settings.
Menu command for exporting model as FMU.
Import
To use the FMU in the closed loop, import it back again by dragging the FMU file onto Model Center, and replace the controller component by an instance of the imported FMU.
Closed-loop system with controller model replaced by instance of imported FMU.