Functional Mockup Interface for Model Exchange and Co-Simulation

Similar documents
The Functional Mockup Interface for Tool independent Exchange of Simulation Models

Functional Mockup Interface for Tool and Model Interoperability

Functional Mockup Interface (FMI) A General Standard for Model Exchange and Simulator Coupling

The Functional Mockup Interface for Tool independent Exchange of Simulation Models

INTEROPERABILITY WITH FMI TOOLS AND SOFTWARE COMPONENTS. Johan Åkesson

Functional Mock-up Interface for Model Exchange MODELICA Association Project FMI

POTENTIAL AND BENEFITS OF FUNCTIONAL MOCK-UP INTERFACE - FMI FOR VIRTUAL VEHICLE INTEGRATION

Functional Mockup Interface 2.0: The Standard for Tool independent Exchange of Simulation Models

Experiences with the new FMI Standard Selected Applications at Dresden University

SIMULATOR TO FMU: A PYTHON UTILITY TO SUPPORT BUILDING SIMULATION TOOL INTEROPERABILITY

Improving Interoperability of FMI-supporting Tools with Reference FMUs

Decoupling Test Cases from Real and Virtual Test Systems with ASAM HIL API

Generic FMI-compliant Simulation Tool Coupling

Generation of Functional Mock-up Units from Causal Block Diagrams

How to Improve FMI Compliance

Release Presentation ASAM AE XIL-MA Generic Simulator Interface for Simulation Model Access 2016 / 02 / 22

Simulation-based development of automotive control software with Modelica

Yosuke Ogata 1) Bruno Loyer 2) Antoine Viel 3)

Development of Custom Workflows for Simulation and Analysis of Functional Mock-up Units

MA-Project System Structure and Parameterization Current Status and Plans

FMI Kit for Simulink version by Dassault Systèmes

ASAM AE XIL-MA v2.1 Release Presentation. Dr. Rainer Rasche, dspace GmbH

Real-time transient stability simulation tool

From versatile analysis methods to interactive simulation with a motion platform based on SimulationX and FMI

Simulation-based development of automotive control software with Modelica

SysML and FMI in INTO-CPS

Modelica-Association-Project System Structure and Parameterization Early Insights

Multi-Physics RecurDyn Style Interoperability

Multi-core Simulation of Internal Combustion Engines using Modelica, FMI and xmod

Vision of Building Simulation

Master for Co-Simulation Using FMI

Anticipatory Shifting Optimization of a Transmission Control Unit for an Automatic Transmission through Advanced Driver Assistance Systems

Dymola Dynamic Modeling Laboratory

EFFICIENT DEVELOPMENT OF COMPLEX SYSTEMS USING A UNIFIED MODULAR APPROACH

Real-Time Simulation of Modelica-based Models

FMI to NI VeriStand & LabVIEW Add-on. User Guide

On Extending JGrafchart with Support for FMI for Co-Simulation

Dymola Dynamic Modeling Laboratory

Exploitable Results by Third Parties

FMI for physical models on automotive embedded targets

Extending the IPG CarMaker by FMI Compliant Units

Consistent Simulation Environment with FMI based Tool Chain

Automatic Regression Testing of Simulation Models and Concept for Simulation of Connected FMUs in PySimulator

Software-Entwicklungswerkzeuge

Software-Entwicklungswerkzeuge. Modelica Overview. Contents. 1. Modelica Introduction. 2. Modelica Users View. 3. Modelica Libraries

Applying the ASAM ODS Data Format in the CoCo-80

Importing Models from Physical Modeling. Tools Using the FMI Standard

1 Although other ways of exporting like using the 2 s 1

CLOSING THE DESIGN CYCLE LOOP WITH EXECUTABLE REQUIREMENTS AND OSLC

ASAM XIL. Datasheet. Generic Simulator Interface AE. Title Category Current Version Release Date Download Application Areas

On the integration of HLA and FMI for supporting interoperability and reusability in distributed simulation

A Synchronous-based Code Generator For Explicit Hybrid Systems Languages

Scicos/Modelica for modeling and simulation

What s new in ASAM AE HIL API V1.0.0?

Design Approach for a Generic and Scalable Framework for Parallel FMU Simulations

Modelica for Embedded Systems

Experience with Industrial In-House Application of FMI

Getting Started with the MapleSim FMI Connector

Nonlinear State Estimation with an Extended FMI 2.0 Co-Simulation Interface

Modelica. Language, Libraries, Tools, Workshop and EU-Project RealSim

Adapting Functional Mockup Units for HLA-compliant Distributed Simulation

TERRA support for architecture modeling. K.J. (Karim) Kok. MSc Report. C e Dr.ir. J.F. Broenink Z. Lu, MSc Prof.dr.ir. A. Rensink.

Grid Services and the Globus Toolkit

Modeling and Simulation for Heterogeneous systems

QUARTERLY PROGRESS REPORT

Requirements for the Simulation of Complex Heterogeneous Systems

D6.1 INITIAL SIMULATION ENVIRONMENT

This is the published version of a paper presented at IEEE PES General Meeting 2013.

Analog Mixed Signal Extensions for SystemC

BACnet. Certification Handbook. Version 4.0. Valid as of ( )

Silver + TestWeaver Tools for Simulation-Based Design System Test and Validation

AUTOMATED TEST OF CVT CONTROL SOFTWARE, USING FMI AND MODELICA MODELS

SIMPACK - A Tool for Off-Line and Real- Time Simulation

AltiumLive 2017: Novel Thermal Analysis Tool for Altium Designer

HSA foundation! Advanced Topics on Heterogeneous System Architectures. Politecnico di Milano! Seminar Room A. Alario! 23 November, 2015!

THE DESIGN ENVIRONMENT FOR HETEROGENEOUS SYSTEMS

Flight Systems are Cyber-Physical Systems

Modeling Technical Systems [ ] Mag MA MA Schweiger Gerald TU Graz Spring 2017

AVS: A Test Suite for Automatically Generated Code

Compass4D Working towards deployment of C-ITS. Pierpaolo Tona, Project Manager

Modelica Association Project Distributed Co-Simulation Protocol. Martin Krammer DCP MAP Leader

HSA Foundation! Advanced Topics on Heterogeneous System Architectures. Politecnico di Milano! Seminar Room (Bld 20)! 15 December, 2017!

FMI Toolbox User's Guide 2.3

Introduction to Simulink. Todd Atkins

Release Presentation. ASAM Common MDF Version Measurement Data Format. Release Date: 2014 / 06 / 11

Using SPARK as a Solver for Modelica. Michael Wetter Philip Haves Michael A. Moshier Edward F. Sowell. July 30, 2008

SYSTEMC AMS ARCHITECTURE EXPLORATION FOR MIXED SIGNAL SYSTEMS

A MATLAB Toolbox for Distributed and Parallel Processing

car=1700 FS gear=13.5 Wind: cw=0.33 AutoGear ThrottlePos JMotorPump=0.28 TS Jturbine=0.034 TS 1 Engine converter ECU ControlBox

Generic Requirements Management and Verification Process for Ground Segment and Mission Operations Preparation

Introduction to Adams/Solver C++ Jose L Ortiz, PhD. Adams User Meeting Munich - May 18, 2011

VeriStand. FMI to NI VeriStand Add-on. User Guide

A Modular Technique for Automotive System Simulation

Under the Hood of Implicit LS-DYNA

Global Solution of Mixed-Integer Dynamic Optimization Problems

SLHC-PP DELIVERABLE REPORT EU DELIVERABLE: Document identifier: SLHC-PP-D v1.1. End of Month 03 (June 2008) 30/06/2008

Third public workshop of the Amsterdam Group and CODECS C-ITS Deployment in Europe: Common Security and Certificate Policy

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Distributed transactions (quick refresh) Layers of an information system

Compliance Verification Process for Ethernet ECUs

Topics in Object-Oriented Design Patterns

Transcription:

Functional Mockup Interface for Model Exchange and Co-Simulation Torsten Blochwitz (ITI Dresden, FMI MAP Project Leader) Members of the FMI Modelica Association Project

Motivation Problems / Needs Component development by supplier Integration by OEM Many simulation tools involved supplier1 supplier2 supplier3 supplier4 supplier5 OEM? Solution supplier1 supplier2 supplier3 supplier4 supplier5 Reuse of supplier models by OEM: DLL (model exchange) and/or Tool coupling (co-simulation) Protection of model IP of supplier tool 1 tool 2 tool 3 tool 4 tool 5 FMI OEM Added Value Early validation of design supplier1! OEM Increased process quality Higher efficiency and quality supplier2 slide from Nick Suyam, Daimler (adapted) supplier3 Modelisar ITEA 2 2

Motivation No standards available for: Model interface based on C or binaries Co-simulation between simulation tools Lots of proprietary interfaces: Simulink: S-function Modelica: external function, external object interface QTronic Silver: Silver-Module API SimulationX: External Model Interface NI LabVIEW: External Model Interface, Simulation Interface Toolkit Simpack: uforce routines ADAMS: user routines Modelisar ITEA 2 3

Modelisar Project Developed within EU project Modelisar (2008-2011) Cooperation of European tool vendors and users Proof of concept in industrial use cases Supported by ca. 27 tools (planned by 7) After 2011: Continue development as Modelica Association Project Modelica Association changed its bylaws in order to become an umbrella organization for projects related with modeling and simulation MODELISAR (ITEA 2 ~ 07006) Partners ARMINES Arsenal Research ATB AVL Berata Daimler Dassault Systèmes David DLR Dynasim Extessy FhG First, IIS EAS, SCAI Geensys Halle University IFP Imagine INSPIRE SIMPACK AG ITI LMS International QTronic Schneider Electric Trialog Triphase TWT Verhaert Volkswagen Volvo Modelisar ITEA 2 4

Agenda Motivation Modelisar Project FMI Main Design Idea XML Model Description C-Interface FMI for Model Exchange FMI for Co-Simulation History and Future Development process FMI 2.0 Organizational Future of FMI Conclusion Modelisar ITEA 2 5

FMI Main Design Idea FMI for Model Exchange Tool Solver FMI Slave FMU Model Model Solver Version 1.0: January 2010 FMI for Co-Simulation Tool Master FMI Slave FMU Model Solver Slave Version 1.0: October 2010 FMI 2.0 for Model Exchange and Co-Simulation is under development Modelisar ITEA 2 6

FMI Main Design Idea A component which implements the interface is called Functional Mockup Unit (FMU) Separation of: Description of interface data (XML file) Functionality (C code or binary) An FMU is a zipped file (*.fmu) containing: XML description file, Implementation in source and/or binary form Additional data and functionality can be included Interface specification: www.functional-mockup-interface.org Modelisar ITEA 2 7

XML Model Description Information not needed for execution is stored in one xml-file: Complex data structures give still simple interface. Reduced overhead in terms of memory. Definition of display units Definition of type defaults Default stop time, tolerances Tool specific data Variable names and attributes Modelisar ITEA 2 8

Example <?xml version="1.0" encoding="utf8"?> <fmimodeldescription fmiversion="1.0" modelname="modelica.mechanics.rotational.examples.friction" modelidentifier="modelica_mechanics_rotational_examples_friction" guid="{8c4e810f-3df3-4a00-8276-176fa3c9f9e0}"... numberofcontinuousstates="6" numberofeventindicators="34"/> <UnitDefinitions> <BaseUnit unit="rad"> <DisplayUnitDefinition displayunit="deg" gain="57.2957795130823"/> </BaseUnit> </UnitDefinitions> <TypeDefinitions> <Type name="momentofinertia"> <RealType quantity="inertia" unit="kgm^2"/> </Type> </TypeDefinitions> <ModelVariables> <ScalarVariable name="inertia1.j" valuereference="16777217" description="moment of inertia" variability="parameter"> <Real declaredtype= "MomentOfInertia" start="1"/> </ScalarVariable>... </ModelVariables> </fmimodeldescription> Modelisar ITEA 2 9

C-Interface Two C-Header Files: Platform dependent definitions (basic types): C-Functions: 18 core functions 6 utility functions Modelisar ITEA 2 10

C-Interface Instantiation: fmicomponent fmiinstantiatexxx(fmistring instancename,...) Returns an instance of the FMU. Returned fmicomponent is an argument of the other interface functions. It is of type void* for the master. The FMU uses it to hold all necessary information. Functions for initialization, termination, destruction Support of real, integer, boolean, and string inputs, outputs, parameters Set and Get functions for each type: fmistatus fmisetreal (fmicomponent c, const fmivaluereference vr[], size_t nvr, const fmireal value[]) fmistatus fmisetinteger(fmicomponent c, const fmivaluereference vr[], size_t nvr, const fmiinteger value[]) Identification by valuereference, defined in the XML description file for each variable Modelisar ITEA 2 11

FMI for Model Exchange Features Model is described by differential-, algebraic-, discrete equations Interface for solution of Ordinary Differential Equations (ODE) Handling of: Time events State events Step events Event iteration Discarding of invalid inputs, state variables No explicit function call for computation of model algorithm FMU decides which part is to be computed, when an fmigetxxx function is called Allows efficient caching algorithms Modelisar ITEA 2 12

FMI for Model Exchange Signals For example: 10 input/output signals (u/y) for connection and 100000 local variables (v) for plotting Modelisar ITEA 2 13

FMI for Model Exchange C-Interface Model is described by differential-, algebraic-, discrete equations with events For each part of the model algorithm different function calls are defined: This complexity is necessary to express functionality which result from multi domain modeling languages like Modelica. Modelisar ITEA 2 14

Co-Simulation Definition: Coupling of several simulation tools Each tool treats one part of a modular coupled problem Data exchange is restricted to discrete communication points Subsystems are solved independently between communication points Motivation Simulation of heterogeneous systems Partitioning and parallelization of large systems Multirate integration Hardware-in-the-loop simulation slave A simula tor A slave B simulator A slave C simulator A simul ator A slave E master si mu lat or A slave G Master slave D slave F Modelisar ITEA 2 15

FMI for Co-Simulation Features State-of-the-Art Co-Simulation: Fixed communication step size To improve accuracy and robustness: Optional variable communication step size Optional higher order approximation of inputs and outputs Optional repetition of communication steps Capabilities of the slave are contained in the XML-file, for example: canhandlevariablecommunicationstepsize caninterpolateinputs Master can decide which coupling algorithm is applicable Asynchronous execution (allows parallel execution) Modelisar ITEA 2 16

FMI for Co-Simulation Signals Status information Derivatives of inputs, outputs w.r.t. time for support of higher order approximation Modelisar ITEA 2 17

FMI for Co-Simulation C-Interface Execution of a time step: fmistatus fmidostep(fmicomponent c, fmireal currentcommunicationpoint, fmireal communicationstepsize, fmiboolean newstep) communicationstepsize can be zero in case of event iteration newstep = fmitrue if last step was accepted by the master It depends on the capabilities of the slave which calling sequences are allowed. Depending on internal state of the slave and the function arguments, slave can decide which action is to be done before the computation Return values are fmiok, fmidiscard, fmierror, fmipending Asynchronous execution is possible Modelisar ITEA 2 18

FMI for Model Exchange and Co-Simulation Sample Code Model Exchange: (One evaluation) Co-Simulation: (One communication step) /* Set inputs*/ fmisetreal(m, id_u1, u1, nu1); fmisettime(m, time); fmisetcontinuousstates(m, x, nx); /* Get results */ fmigetderivatives(m, derx, nx); fmigeteventindicators (m, z, nz); fmigetreal(m, id_u1, u1, nu1); /* Set inputs arguments */ fmisetreal(s, id_u1, u1, nu1); /* Do computation*/ fmidostep(s, tc, hc, fmitrue); /* Get results */ fmigetreal(s, id_u1, u1, nu1); Modelisar ITEA 2 19

FMI for Co-Simulation Use Cases Standalone Execution: Tool Coupling: Modelisar ITEA 2 20

FMI for Co-Simulation Use Cases Distributed: With FMI 2.0 all use cases are possible using FMI for Model Exchange too. Modelisar ITEA 2 21

Berlin Munich Berlin Munich Munich Development Process FMI for Model Exchange Specification Prototypes FMI for Co-Simulation V 1.0 Berlin Bonn Munich Halle Dresden Munich Stuttgart Leuven Munich Dresden Specification Prototypes FMI for Model Exchange and Co-Simulation V 2.0 b 3 V 2.0 b 4 V 2.0 Berlin Dresden Munich V 1.0 Lund Munich Munich Munich Berlin Meeting Webmeeting Milestone Specification Prototypes 2008 2009 2010 2011 2012 Modelisar ITEA 2 22

Roadmap for FMI 2.0 Unification and Harmonization of Model Exchange and Co-Simulation Clarification, Improvements: Instantiation Classification of variables, unit handling Calling sequence New Features: Tunable parameters Save and restore FMU state Detailed dependency information (inputs, outputs, derivatives) Efficient interface to Jacobian matrices Contained in public Beta 3 Improved handling of time events Support of arrays Support of bus/physical connectors Hierarchical data Graphical appearance Under Discussion Modelisar ITEA 2 23

Organizational Future of FMI Modelisar Project ended on Dec, 31 st, 2011 FMI went under the hood of the Modelica Association Modelica Association changed its bylaws to become an umbrella organization hosting several Modelica Association Projects: Modelica Language Development Modelica Standard Library Functional Mockup Interface Modelisar ITEA 2 24

FMI Project Rules Purpose: Development, standardization and promoting the Functional Mockup Interface (FMI) definition. The intention is that dynamic system models of different software systems can be used together for software/model/hardwarein-the-loop simulation, for cyber physical systems, and other applications. Results (documents, C-headers, XML schemas): are published under a free license (similar to Wikipedia license). Project Members (need not to be a member of the Modelica Association): Companies, institutes, universities and other organizations Steering Committee: Voting rights Defines FMI policy, strategy, feature roadmap, and future FMI releases Advisory Committee: Organizational members that have no voting rights Contribute to the design of FMI Have Access to FMI infrastructure (svn, trac, mailing lists, meeting minutes, etc.) Modelisar ITEA 2 25

FMI Project Rules Advisory Committee is open for additional members that proofed to actively support FMI: must have participated at least at two FMI meetings in the last 24 months. Advisory Committee members can become Steering Committee members, if: they participated at least at two FMI meetings in the last 24 months, they either provided the FMI standard or part of it in a commercial or open source tool, and/or must actively use FMI in industrial projects, the members agree with qualified majority FMI meetings are open to the public. Initial Steering Committee: Atego, Daimler, Dassault Systèmes, IFP EN, ITI, LMS, Modelon, QTronic, SIMPACK Initial Advisory Committee: Armines, DLR, Fraunhofer (IIS/EAS First, SCAI), Open Modelica Consortium, TWT, University of Halle Modelisar ITEA 2 26

Conclusions FMI for Model Exchange and Co-Simulation is a promising concept 27 tools currently support FMI, 7 intend to Already used in industry FMI is continued after Modelisar project as Modelica Association project FMI 2.0 will improve: Compatibility of implementations (clarified specification) Usability (tunable parameters, bus and physical connectors) Efficiency and robustness for large models (dependency information, Jacobian matrix) Modelisar ITEA 2 27