Using FMI (Functional Mock-up Interface) 2.0 or FMI 1.0 for mechatronic simulation
-
Upload
siemens-plm-software -
Category
Technology
-
view
908 -
download
0
Transcript of Using FMI (Functional Mock-up Interface) 2.0 or FMI 1.0 for mechatronic simulation
Using FMI (Functional Mock-up
Interface) 2.0 or FMI 1.0 for
mechatronic simulation
Realize innovation.Unrestricted © Siemens AG 2017
LMS Imagine.Lab Amesim™
A world leading platform for physical
simulation of mechatronic systems
Unrestricted © Siemens AG 2017
2017.01.13Page 2 Siemens PLM Software
.
Overview of FMI in LMS Amesim
History of FMI specifications
Table of content
The FMI 2.0 specification
Consequences of using FMI 2.0 vs. FMI 1.0
Improved quality of FMUs
The advantage of FMI
Going further
Unrestricted © Siemens AG 2017
2017.01.13Page 3 Siemens PLM Software
Simcenter™ Portfolio for Predictive Engineering Analytics
LMS Imagine.Lab
LMS Imagine.Lab Amesim
Openness &
Scalability
Collaboration &
workflowCo-Simulation
Unrestricted © Siemens AG 2017
2017.01.13Page 4 Siemens PLM Software
FMI / FMU in a nutshell
What is FMI?
• A tool-neutral standard to support
both model exchange and
co-simulation of dynamic models
92 tools officially support FMI today, they belong to 8 categories:
0D-1D system simulation | Systems engineering | Multibody simulator | Controls and scientific computation tools | HiL
Hardware and Real-time targets | ECU software development tools | Co-simulation middleware | Integration platforms
https://www.fmi-standard.org/tools
What is FMU?
• A ZIP file used to package the model,
its resources and documentation
• An XML that describes the model
structure and capabilities
Unrestricted © Siemens AG 2017
2017.01.13Page 5 Siemens PLM Software
FMI Use Cases and Motivations
Use Cases to address:
• Collaborative MBSE:
• Between OEMs and suppliers
• Between departments of the same company
• Involving different domains and complexity levels
The solution is:
• Tool neutral software interface
• Open format, with publicly available specifications: https://www.fmi-standard.org/downloads
Many existing and future interfacing possibilities
Numerous suppliers…
1 OEM (system integrator)
1D, 3D FEA/MBS, CFD, Controls, RSM, Real-Time…
Unrestricted © Siemens AG 2017
2017.01.13Page 6 Siemens PLM Software
Summary: 4 ways of coupling LMS Amesim with other FMI compliant tools
Selecting an FMI importing tool
• Depends on preferred
environment for result analysis
• Depends on each tool’s FMI
capabilities (import / export,
co-simulation vs. model
exchange)
Choosing between Model
Exchange or Co-Simulation
• Performance / robustness
compromise
• Tool capabilities
To LMS Amesim (Import) From LMS Amesim (Export)
Mo
del
Exch
an
ge
Co
-Sim
ula
tio
n
Unrestricted © Siemens AG 2017
2017.01.13Page 7 Siemens PLM Software
Summary of current FMI features (LMS Amesim 15.x)
New FMI modes and usability enhancements
• FMI 2.0 for Co-simulation Slave
• FMI 1.0 for Model Exchange Export for
Modelica and native LMS Amesim models
• FMU Export Assistant
• Multiple binaries in the same FMU
• Automatic table embedding in FMUs
FMI for Real-time
• FMI based export workflow
for following RT targets:
• dSPACE SCALEXIO
• ETAS LABCAR (32-bit)
• Concurrent SimWB
(32- and 64-bit)
or
or
or
LMS Amesim 15 FMI compatibility status (June 2016)
Extended New
Unrestricted © Siemens AG 2017
2017.01.13Page 8 Siemens PLM Software
Roadmap of forthcoming FMI features (LMS Amesim 16)
New FMI modes and usability enhancements
• FMI 2.0 for Model Exchange Import
• FMI 2.0 for Model Exchange Export
• Possibility to generate 2.0 FMUs having
both the co-simulation and model
exchange interfaces (to be confirmed)
• Other FMI usability improvements
FMI for Real-time
or
Expected LMS Amesim 16 status: all FMI 1.0 & 2.0 modes
• Support of other RT targets
based on FMI (if available)
or
or
or
Expected
Unrestricted © Siemens AG 2017
2017.01.13Page 9 Siemens PLM Software
.
Overview of FMI in LMS Amesim
History of FMI specifications
Table of content
The FMI 2.0 specification
Consequences of using FMI 2.0 vs. FMI 1.0
Improved quality of FMUs
The advantage of FMI
Going further
Unrestricted © Siemens AG 2017
2017.01.13Page 10 Siemens PLM Software
Timeline of FMI specification releases and context
• FMI 1.0 Specifications designed by the Modelisar consortium, in which LMS—now Siemens
PLM Software—took part; The ITEA2 Modelisar project ended December 2011
• FMI 2.0 designed by the FMI MAP (Modelica Association Project); Siemens PLM Software
is a member of this MAP
• FMI 2.0 Beta 4 Specification document released in August 10th, 2012
• Final FMI 2.0 Specification document initially planned for the end of 2012 but postponed.
Finally released in July 2014.
• Specification documents are publicly available from
http://www.fmi-standard.org
2010 2011 2012 2013
FMI version 1.0 FMI version 2.0
2014
FMI version 2.0 Beta 4
?
Unrestricted © Siemens AG 2017
2017.01.13Page 11 Siemens PLM Software
FMI 1.0 specifications as outcome of the MODELISAR European research
project
https://itea3.org/project/modelisar.html
Siemens PLM Software (LMS) active since Day 1
Unrestricted © Siemens AG 2017
2017.01.13Page 12 Siemens PLM Software
.
Overview of FMI in LMS Amesim
History of FMI specifications
Table of content
The FMI 2.0 specification
Consequences of using FMI 2.0 vs. FMI 1.0
Improved quality of FMUs
The advantage of FMI
Going further
Unrestricted © Siemens AG 2017
2017.01.13Page 13 Siemens PLM Software
The FMI 1.0 & FMI 2.0 specifications
FMI 2.0: the most recent
specification
• Several optional capabilities introduced
• A unified document for both Model
Exchange and Co-Simulation
• FMI 2.0 officially supported by 50 tools
• Most of FMI 2.0 tools also support
FMI 1.0; this might change in the future
FMI 1.0: older specifications
• Simpler to implement (fewer options)
• Better known by end-users,
more maturity
• Officially supported by 85 tools
https://www.fmi-standard.org/downloads
Unrestricted © Siemens AG 2017
2017.01.13Page 14 Siemens PLM Software
The FMI 2.0 specification
• Model Exchange and Co-simulation specifications partially merged
• New variable semantics (including new definitions for variability,
causality, initialization of parameters and variables) and new state
machines
• The specification defines:
• Core concepts that are mandatory (model structure definition, and
synopsis of functions for initializing, getting/setting variables, etc.):
these concepts are functionally equivalent with FMI 1.0
• Optional features that are new with regard to the FMI 1.0
specifications
Main aspects
Unrestricted © Siemens AG 2017
2017.01.13Page 15 Siemens PLM Software
The FMI 2.0 specification
• Tunable parameters: during simulation, some parameters can
have their value updated from the outside on an externally-
generated event. Often useful for Hardware-in-the-Loop simulations
where connected hardware cannot be restarted easily to change a
parameter value.
• Interface for exposing the directional derivatives with regard to
inputs and state variables. Opens the path to frequency analysis of
co-simulated systems and/or to advanced co-simulation.
• Ability to save and restore the state of model or simulator, in a
serialized form. Useful for operator training systems, for instance.
Notable optional features (capability flags)
Unrestricted © Siemens AG 2017
2017.01.13Page 16 Siemens PLM Software
The FMI 2.0 specification
• Model structure (including sparsity information) is fully described,
including state variables for the Model Exchange Interface
• Improved unit definitions, with mapping to the SI base units
• User-defined logging categories
• Some ambiguities of the 1.0 specification fixed (especially for
co-simulation): for example, the path to the inflated FMU is now
explicitly given to the FMU at instantiation, thus allowing it to
access resource files
• Explicit flag for aliased variables removed
• Different namespaces for dynamic object and static objects
Other minor changes
Unrestricted © Siemens AG 2017
2017.01.13Page 17 Siemens PLM Software
.
Overview of FMI in LMS Amesim
History of FMI specifications
Table of content
The FMI 2.0 specification
Consequences of using FMI 2.0 vs. FMI 1.0
Improved quality of FMUs
The advantage of FMI
Going further
Unrestricted © Siemens AG 2017
2017.01.13Page 18 Siemens PLM Software
Consequences of the new FMI 2.0 specification
• Not backward-compatible with 1.0: a 1.0 FMU cannot be loaded by a pure FMI 2.0
environment
• The 1.0 and 2.0 versions are to be considered as two different branches of the
specification rather than an evolution stricto sensu
• The core 2.0 specification (without optional features) allows to generate FMUs that are
functionally equivalent to 1.0 FMUs (model exchange or co-simulation), but not
compatible
• An FMU may expose both a Model Exchange and a Co-simulation interface
• New class of applications allowed, like model-based predictive control
• Frequency analysis is allowed in addition to transient analysis, this can be useful for control
system design for example, or co-simulation numerical stability analysis
• Enhanced implicit/iterative co-simulation methods are allowed through the simulator
save/restore functionality, provided that the importing environment is able to implement
these methods
Unrestricted © Siemens AG 2017
2017.01.13Page 19 Siemens PLM Software
Current tools supporting FMI 2.0 or FMI 1.0
https://www.fmi-standard.org/tools 70% more tools officially supporting FMI 1.0
(85 tools), compared to FMI 2.0 (50 tools)
• FMI aims at building bridges between various technologies and tools, which goes far beyond the
world of the Modelica language.
• Today, Modelica compatible tools (including LMS Amesim) represent less than 10% of all listed FMI
supporting tools, which already illustrates the large success of FMI.
Unrestricted © Siemens AG 2017
2017.01.13Page 20 Siemens PLM Software
FMI 2.0 vs. FMI 1.0 – Take away messages
• Core concepts of FMI 2.0 are functionally equivalent to those of FMI 1.0
• No backward compatibility
• Some FMUs contain both the Model Exchange and the Co-Simulation modes,
which is very interesting for users: the most suitable mode can be selected at import
• 85 tools support FMI 1.0 (at least one coupling mode among the 4 possible modes)
• 50 tools support FMI 2.0. Most of them also support FMI 1.0.
• Most 2.0 FMUs behave the same way as 1.0 FMUs (from a user’s point of view)
• Most of the time, benefiting from a specific FMI 2.0 optional capability requires all the
involved tools to support it (“tunable parameters” is a noticeable exception)
Memo for selecting the most appropriate FMI version for each use case:
• What are the interfacing possibilities (tool combinations) available?
• What is my preference between novelty (FMI 2.0) and maturity (FMI 1.0)?
• Are there any FMI 2.0 optional capabilities I need and for which purpose?
• Do all my tools support the optional capabilities I am interested in?
Unrestricted © Siemens AG 2017
2017.01.13Page 21 Siemens PLM Software
.
Overview of FMI in LMS Amesim
History of FMI specifications
Table of content
The FMI 2.0 specification
Consequences of using FMI 2.0 vs. FMI 1.0
Improved quality of FMUs
The advantage of FMI
Going further
Unrestricted © Siemens AG 2017
2017.01.13Page 22 Siemens PLM Software
In 2012, FMU Compliance Checker is introduced…
https://www.fmi-standard.org/downloads
In 2012, the Modelica Association introduced
the FMU Compliance Checker to improve
the robustness of the FMUs
• FMU passes the Checker ⇒ FMU likely OK (to be confirmed)
• FMU doesn’t pass the Checker ⇒ FMU certainly not OK!
• Quality of FMUs has improved
• All kinds of issues still not detected: cross-
tests between tools are needed
Unrestricted © Siemens AG 2017
2017.01.13Page 23 Siemens PLM Software
In July 2014, stricter rules for FMI cross checks are defined…
• Tighter Cross Check rules to assess FMI compatibility between tools
• Latest Cross Check rules tightened for more reliability
• Easier exchanges of FMUs between tool vendors for testing (e.g. licenses can be removed)
• Sandbox for tests with development versions (FMI should work out of the box when tools are released)
• Orange cell = tool vendor claims to support this FMI mode
• Green cell = tool vendor claims to support this FMI mode & passed the tests
https://www.fmi-standard.org/tools
• Better communication of each tool vendor
on the FMI compatibility level they offer
• Cross-tests on more complex FMUs and/or
real-world use cases often still needed and
encouraged
Unrestricted © Siemens AG 2017
2017.01.13Page 24 Siemens PLM Software
Stricter rules for FMI cross checks (extracts)
https://svn.fmi-standard.org/fmi/branches/public/CrossCheck_Results/FMI_Cross_Check_Rules_v3.1_2015_07.pdf
Unrestricted © Siemens AG 2017
2017.01.13Page 25 Siemens PLM Software
Stricter rules for FMI cross checks (extracts)
https://svn.fmi-standard.org/fmi/branches/public/CrossCheck_Results/FMI_Cross_Check_Rules_v3.1_2015_07.pdf
Stricter rules defined in July
2014. Only the tools proven
to comply with these rules
get a green cell
Unrestricted © Siemens AG 2017
2017.01.13Page 26 Siemens PLM Software
New FMI development process with clear guiding principles
https://svn.fmi-standard.org/fmi/branches/public/docs/DevProcess/FMI_DevelopmentProcess_1.0.pdf
FMI Development Process (extract, April 2015)
Guiding principles for
balancing between innovation
and the stability one can expect
from an industrial standard
As a prominent FMI driver and Steering Committee member, Siemens PLM Software
contributed to this improved development process. Its reinforced guiding principles
and consistent compatibility rules are aimed at boosting the adoption of FMI.
Unrestricted © Siemens AG 2017
2017.01.13Page 27 Siemens PLM Software
.
Overview of FMI in LMS Amesim
History of FMI specifications
Table of content
The FMI 2.0 specification
Consequences of using FMI 2.0 vs. FMI 1.0
Improved quality of FMUs
The advantage of FMI
Going further
Unrestricted © Siemens AG 2017
2017.01.13Page 28 Siemens PLM Software
The FMI advantage
All connected through FMI
LMS Amesim
Unrestricted © Siemens AG 2017
2017.01.13Page 29 Siemens PLM Software
.
Overview of FMI in LMS Amesim
History of FMI specifications
Table of content
The FMI 2.0 specification
Consequences of using FMI 2.0 vs. FMI 1.0
Improved quality of FMUs
The advantage of FMI
Going further
Unrestricted © Siemens AG 2017
2017.01.13Page 30 Siemens PLM Software
FMI examples and dedicated manual in the LMS Amesim online
documentation
LMS Imagine.Lab Amesim 15 online documentation
with ready-to-use examples & dedicated user manual to start with:
• Co-simulation & Model Exchange
• FMU Export and FMU Import
• Offline use and running FMUs on Real-Time targets
Unrestricted © Siemens AG 2017
2017.01.13Page 31 Siemens PLM Software
LMS Amesim enables you to tailor your platform to your specific needs with the App
designer, Plots Python API, application-specific tools for pre-processing and post-
processing as well as customized parameter editing using external executables.
Use advanced LMS Amesim scripting tools for model interaction automation and LMS
Amesim APIs for full command-line building of complete models.
LMS Amesim helps improve your system design with LMS Amesim Design Exploration,
LMS Amesim Export module or the LMS Amesim-Optimus interface.
LMS Amesim enables you to analyze your data and system results with advanced
plotting facilities, dashboard, animation, table editor, linear analysis, activity index and
replay.
LMS Imagine.Lab Amesim comes with unique usability and scalability capabilities with
all the LMS Amesim graphical user interfaces (GUI), interactive help and associated
features such as the supercomponent facility, batch run monitor, experiment manager,
postprocessed variables and Statechart designer.
More about the LMS Imagine.Lab Amesim platform
Platform
facilities
Analysis
tools
Optimization, robustness, design of
experiments
Simulator scripting
Customization
Unrestricted © Siemens AG 2017
2017.01.13Page 32 Siemens PLM Software
LMS Imagine.Lab Amesim supports Modelica, the open standard language for
describing physical systems. The Modelica platform provides the tools you need to
build acausal, multidomain Modelica models and leverage the LMS Amesim platform
features to analyze the resulting system.
LMS Amesim can be coupled with external software applications such as CAE, CAD,
CAM, FEA/FEM and computational fluid dynamics (CFD). Co-simulation provides
coupling between LMS Amesim and CAE tools with predefined setups to ensure good
dialog between the tools and simulation software.
LMS Amesim provides co-simulation capabilities with any software coupled with LMS
Amesim due to the generic co-simulation capability and functional mock-up interface
(FMI), to complete heterogeneous simulations within an unique integration platform.
The LMS Amesim unique integrated platform provides realistic plant models for every
stage of the development cycle, enabling system and control engineers to start
evaluation and validation phases early in the design cycle using model-in-the-loop
(MiL), software-in-the-loop (SiL) and hardware-in-the-loop (HiL) frameworks.
LMS Amesim integrates cutting-edge numerical methods, performance analyzer,
discrete partitioning library for CPU speed-up, a parallel processing feature for
multiprocessor task distribution as well as High Performance Computing (HPC).
More about the LMS Imagine.Lab Amesim platform
Solvers
and numerics
MIL/SIL/HIL
and real-time
Software
interfaces
1D/3D
CAE
Modelica
platform
Unrestricted © Siemens AG 2017
2017.01.13Page 33 Siemens PLM Software
Join us now @ Simcenter Community
ExploreBrowse among our different blogs dedicated to each
solution, read our articles and hear about the latest news.
Share Expose your question in our forum, obtain answers,
exchange with other users and benefit from their experience.
Learn Find the information you need in the knowledge baseand increase your skills.
Click to join us on the
Simcenter Community
www.siemens.com/plm/community/simcenter
Unrestricted © Siemens AG 2017
2017.01.13Page 34 Siemens PLM Software
.
Bruno LOYER, Bruno LACABANNE, Antoine VIEL, Stéphane NEYRATLMS Imagine.Lab Amesim Platform
Siemens Industry Software S.A.SDigital Factory DivisionProduct Lifecycle ManagementSimulation & Test Solutions
siemens.com
Contact