This repository contains the agenda and materials for the FMI Beginner's tutorial presented at the Asian Modelica & FMI Conference 2026.
A Video Recording from a similar tutorial at the Modelica and FMI Conference 2025 is available on YouTube
(Work in Progress)
Presentation covering
- MATLAB/Simulink (optional)
- Dymola (optional)
- the motivation and history of FMI
- general technical concepts
- tool support
- an outlook on FMI 3.0
- FMU export (in Dymola: open
MODELICA_Demo.Driveexport it as a source code FMU) - FMU import in MATLAB/Simulink
Live demo + Jupyter notebook
- Validation of FMUs on the Website
- work with FMUs in FMPy
- set up FMPy (with mambaforge)
- open GUI, create file association, create desktop shortcut
- view the model info
- view the documentation
- simulate the Drive FMU and plot the result
- create an input CSV file
- set the stop time, parameters, output interval (loadInertia1.J = 10)
- validate the Drive FMU
- compile platform binary for the Drive FMU
- log debug info and FMI calls + short discussion of FMI calling sequence
- generate a Python notebook from the FMU and run it
- simulate an FMU with created jupyter notebook
- download the Drive FMU
- simulate the Drive model with fmusim using the input file and set a parameter
- dump(fmu)
- inspect results
- Optional requisites for following along in the live demo:
- Java (recommended version 11)
- Install the into-cps application. A full guide can be found in this video: https://youtu.be/HkWh-PubYQo
- Have a Google account that you can use for Google Colab.
- Live demo using the into-cps application (use the slides to follow along):
- Setup
- Pre-requisites: show that java is installed.
- Download intocps application
- Download coe from download manager.
- Launch COE from UI to show that it works.
- Configure a multimodel
- Create new project (created project can be found in part3/example_intocps_app)
- Locate FMUs to be used.
- Move them to new project folder.
- Create multi model
- Configure a co-simulation
- Create cosim configuration.
- Explain the different options.
- Run it.
- Open the results folder
- Exploring alternative co-simulation configurations.
- Create new cosim config, with an increasing step size, and show instability creeping in.
- Summary
- Using Google Colab, run the Jupyter notebook found in part3/tutorial_multiple_FMUs
- Run a co-simulation from the command line
- Run a co-simulation with a single FMU
- Run a co-simulation with multiple FMUs
- Measure Accuracy of the Co-simulation Wrt to Baseline
- Co-simulation Scenario with Baseline
- Impact of Step Size on the Accuracy
Slides can be downloaded here.
FMI 3.0 examples:
- Outlook on FMI 3.0 Features
- Synchronous Clocks Example
Code and documentation copyright (C) 2023 the Modelica Association Project FMI. Code released under the 2-Clause BSD License. Docs released under Attribution-ShareAlike 4.0 International.
This tutorial is based on previous versions of the tutorial given by Claudio Gomes, Maurizio Palmieri and Christian Bertsch. We are thankful to Torsten Sommer for his contributions to this tutorial materials, and to Kenneth Lausdahl as well as the other developers of the INTO-CPS tool and Maestro. In addition, part of this work has been supported by the DIGIT-Bench project (case no. 640222-497272), funded by the Energy Technology Development and Demonstration Programme (EUDP).
