Skip to content

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

10 watching

Forks

Latest commit

 

History

61 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FMI Beginner's tutorial

FMI-tutorial-logo

This repository contains the agenda and materials for the FMI Beginner's tutorial presented at the 16th International Modelica & FMI Conference.

A Video Recording is available on YouTube

Agenda

Time Topic
13:30 Introduction to the FMI (Christian Bertsch)
14:15 Working with FMUs (Claudio Gomes)
14:45 Break
15:15 Connecting Multiple FMUs (Maurizio Palmieri)
16:00 Outlook to FMI 3.0 (Christian Bertsch)
16:20 Q&A
16:30 End Tutorial

Part 1: Introduction to the FMI (45 min)

by Christian Bertsch

Presentation covering

Prerequisites

Schedule

  1. the motivation and history of FMI
  2. general technical concepts
  3. tool support
  4. an outlook on FMI 3.0
  5. FMU export (in Dymola: open MODELICA_Demo.Drive export it as a source code FMU)
  6. FMU import in MATLAB/Simulink

Part 2: Working with FMUs (30 min)

by Claudio Gomes

Prerequisites

Schedule

Live demo + Jupyter notebook

  1. Validation of FMUs on the Website
  2. Validate and simulate FMUs with fmusim
  3. work with FMUs in FMPy
  4. set up FMPy (with mambaforge)
  5. open GUI, create file association, create desktop shortcut
  6. view the model info
  7. view the documentation
  8. simulate the Drive FMU and plot the result
  9. create an input CSV file
  10. set the stop time, parameters, output interval (loadInertia1.J = 10)
  11. validate the Drive FMU
  12. compile platform binary for the Drive FMU
  13. log debug info and FMI calls + short discussion of FMI calling sequence
  14. generate a Jupyter notebook from the FMU and run it

Part 3: Connecting and simulating Multiple FMUs (40 min)

Prerequisites

  1. Optional requisites for following along in the live demo:
    1. fmpy
    2. Have a Google account that you can use for Google Colab.

Schedule

  1. Create a Container FMU with fmpy
  2. Simulate the container FMU in fmpy or fmusim
  3. Using Google Colab, run the Jupyter notebook found in part3/tutorial_multiple_FMUs
  4. Measure Accuracy of the Co-simulation Wrt to Baseline
    1. Co-simulation Scenario with Baseline
    2. Impact of Step Size on the Accuracy

Part 4: Outlook to FMI 3.0 (15 min)

by Christian Bertsch

Slides can be downloaded here.

FMI 3.0 examples:

Open In Colab

Schedule

  1. Outlook on FMI 3.0 Features
  2. Synchronous Clocks Example

Copyright and License

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.

Acknowledgments

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).

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

10 watching

Forks

Releases

Packages

Contributors

Languages