Functional Mockup Interface 2.0: the Standard for Tool Independent Exchange of Simulation Models

Functional Mockup Interface 2.0: the Standard for Tool Independent Exchange of Simulation Models

Functional Mockup Interface 2.0: The Standard for Tool independent Exchange of Simulation Models Blochwitz, Torsten; Otter, Martin; Åkesson, Johan; Arnold, Martin; Clauss, Christoph; Elmqvist, Hilding; Friedrich, Markus; Junghanns, Andreas; Mauss, Jakob; Neumerkel, Dietmar; Olsson, Hans; Viel, Antoine Published in: Proceedings of the 9th International Modelica Conference DOI: 10.3384/ecp12076173 2012 Link to publication Citation for published version (APA): Blochwitz, T., Otter, M., Åkesson, J., Arnold, M., Clauss, C., Elmqvist, H., Friedrich, M., Junghanns, A., Mauss, J., Neumerkel, D., Olsson, H., & Viel, A. (2012). Functional Mockup Interface 2.0: The Standard for Tool independent Exchange of Simulation Models. In Proceedings of the 9th International Modelica Conference (pp. 173-184). The Modelica Association. https://doi.org/10.3384/ecp12076173 Total number of authors: 12 General rights Unless other specific re-use rights are stated the following general rights apply: Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal Read more about Creative commons licenses: https://creativecommons.org/licenses/ Take down policy If you believe that this document breaches copyright please contact us providing details, and we will remove access to the work immediately and investigate your claim. LUND UNIVERSITY PO Box 117 221 00 Lund +46 46-222 00 00 Download date: 27. Sep. 2021 Functional Mockup Interface 2.0: The Standard for Tool independent Exchange of Simulation Models T. Blochwitz1, M. Otter2, J. Akesson3, M. Arnold4, C. Clauß5, H. Elmqvist6 M. Friedrich7, A. Junghanns8, J. Mauss8, D. Neumerkel9, H. Olsson6,, A. Viel10 Germany: 1ITI GmbH, Dresden; 2DLR Oberpfaffenhofen; 4University of Halle, 5Fraunhofer IIS EAS, Dresden; 7SIMPACK, Gilching; 8QTronic, Berlin;9Daimler AG, Stuttgart; Sweden: 6Dassault Systèmes, Lund; 3Modelon, Lund; France: 10LMS Imagine, Roanne Abstract The Functional Mockup Interface (FMI) is a tool independent standard for the exchange of dynamic models and for Co-Simulation. The first version, FMI 1.0, was published in 2010. Already more than Figure 1: Improving model-based design between OEM and 30 tools support FMI 1.0. In this paper an overview supplier with FMI. about the upcoming version 2.0 of FMI is given that combines the formerly separated interfaces for Mod- The MODELISAR project ended in Dec. 2011. The el Exchange and Co-Simulation in one standard. maintenance and further development is now per- Based on the experience on using FMI 1.0, many formed by the Modelica Association in form of the small details have been improved and new features Modelica Association Project FMI (see introduced to ease the use and increase the perfor- https://www.modelica.org/projects). FMI was initiat- mance especially for larger models. Additionally, a ed and organized by Daimler AG with the goal to free FMI compliance checker is available and FMI improve the exchange of simulation models between models from different tools are made available on suppliers and OEMs. The further FMI development the web to simplify testing. is performed by 16 companies and research institutes (see Annex). The FMI project is open for FMI inter- Keywords: Simulation; Co-Simulation, Model Ex- ested persons1 and for (Modelica and non-Modelica) change; Functional Mockup Interface (FMI); Func- tool vendors supporting FMI. tional Mockup Unit (FMU); In this article an overview about the upcoming version 2.0 of FMI is given. This new version com- bines the formerly separated interfaces for Model 1 Introduction Exchange and Co-Simulation in one standard. The specification document was clarified which increases The Functional Mockup Interface (FMI) standard the compatibility of implementations. New features version 1.0 (see [1]) was published in 2010 as one ease the use and increase the performance especially result of the ITEA2 project MODELISAR, see Fig- for larger models. ure 1. In a short time after this first release several modeling and simulation tools started to support FMI. Today, more than 30 tools support FMI 1.0, and it is heavily used in industrial and scientific pro- jects, not only in the automotive sector. 1 Members of the MA project FMI need not be Modelica As- sociation members, with exception of the project leader. 2 The Functional Mock-Up Interface tems are solved independently from each other by their individual solver. Master algorithms 2.1 Main Design Ideas control the data exchange between subsystems and the synchronization of all slave simulation The FMI 2.0 standard consists of two main parts: solvers. The interface allows standard, as well as advanced master algorithms, e.g., the usage of 1. FMI for Model Exchange: variable communication step sizes, higher order The intention is that a modeling environment can signal extrapolation, and error control. generate C-Code of a dynamic system model in the form of an input/output block, see Figure 2, tt00,pv ,inital values (a subset of ( )) v that can be utilized by other modeling and simu- Enclosing Model lation environments. Models (without solvers) are described by differential, algebraic and dis- t time crete equations with time-, state- and step- p parameters of type T events. u inputs of type T u v all exposed variables y 2. FMI for Co-Simulation: y outputs of type T The intention is to couple two or more models T Real, Integer, Boolean, or String with solvers in a co-simulation environment. The FMU instance data exchange between subsystems is restricted (model exchange or co-simulation) to discrete communication points. In the time be- tween two communication points, the subsys- Figure 2: Data flow between the environment and the FMU Blue/red arrows: Information provided by/to the FMU. Figure 3: Complete XML schema of upcoming FMI 2.0 (but without attributes and without time synchronization). 2.2 Distribution 2.4 C-Interface A component which implements the FMI is called The execution interface of FMI 2.0 consists of three Functional Mockup Unit (FMU). It consists of one header files that define the C-types and –interfaces. zip-file with extension “.fmu” containing all neces- The header file “fmiTypesPlatform.h” contains all sary components to utilize the FMU either for Model definitions that depend on the target platform: Exchange, for Co-Simulation or for both: #define fmiTypesPlatform "standard32" 1. An XML-file contains the definition of all varia- #define fmiTrue 1 bles of the FMU that are exposed to the envi- #define fmiFalse 0 ronment in which the FMU shall be used, as well #define fmiUndefinedValueReference (fmiValueReference)(-1) as other model information. It is then possible to run the FMU on a target system without this in- typedef void* fmiComponent; formation, i.e., with no unnecessary overhead. typedef void* fmiComponentEnvironment; typedef void* fmiFMUState; 2. A set of C-functions is provided to execute mod- typedef unsigned int fmiValueReference; el equations for the Model-Exchange case and to typedef double fmiReal ; setup and run the slaves for the Co-Simulation typedef int fmiInteger; case. These C-functions can either be provided typedef char fmiBoolean; in source and/or binary form. Binary forms for typedef const char* fmiString ; different platforms can be included in the same typedef char fmiByte; model zip-file. The underlined, blue type definitions have been new- ly introduced into FMI 2.0. This header file must be 3. Further data can be included in the FMU zip-file, used both by the FMU and by the target simulator. If especially a model icon (bitmap file), documen- the target simulator has different definitions in the tation files, maps and tables needed by the mod- header file (e.g., “ ” in- el, and/or all object libraries or DLLs that are typedef float fmiReal utilized. stead of “typedef double fmiReal”), then the FMU needs to be re-compiled with the header file 2.3 Description Schema used by the target simulator. The header file plat- form, for which the model was compiled, as well as All information about a model and a co-simulation the version number of the header files, can be in- setup that is not needed during execution is stored in quired in the target simulator with FMI functions. an XML-file called “modelDescription.XML”. The The type fmiValueReference defines a handle benefit is that every tool can use its favorite pro- for the value of a variable: The handle is unique at gramming language to read this XML-file (e.g., C, least with respect to the corresponding base type C++, C#, Java, Python) and that the overhead, both (such as fmiReal) besides alias variables that can in terms of memory and simulation efficiency, is re- have the same handle. All structured entities, such as duced. The XML-file is defined by an XML-schema records and arrays, are “flattened” into a set of scalar file called “fmiModelDescription.xsd”. In FMI 2.0, values of type fmiReal, fmiInteger etc. A the XML-file contains the information both for fmiValueReference references one such scalar. Model-Exchange and for Co-Simulation. The coding of fmiValueReference does not need In Figure 2, the complete XML schema definition to be exposed by the modeling environment that is shown. All parts are the same for the two FMI- generated the model. The data exchange is per- cases, with exception of the elements “Mod- formed using the functions fmiSetXXX(...) and elExchange” and “CoSimulation” that contain defini- fmiGetXXX(...).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us