INTEROPERABILITY WITH FMI TOOLS AND SOFTWARE COMPONENTS Johan Åkesson 1
OUTLINE FMI Technology FMI tools Industrial FMI integration example
THE FUNCTIONAL MOCK-UP INTERFACE Problems/needs Component development by supplier Integration by OEM Many different simulation tools supplier1 supplier2 supplier3 supplier4 supplier5 OEM? supplier1 supplier2 supplier3 supplier4 supplier5 Solution Reuse of supplier models by OEM: DLL (model import) and/or Tool coupling (co-simulation) tool 1 tool 2 tool 3 tool 4 tool 5 FMI OEM Added Value Early validation of design Increased process Efficiency and quality supplier1 supplier2! OEM supplier3 From the official FMI presentation (adapted)
FMI - MOTIVATION No standard 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. From the official FMI presentation (adapted)
FMI MAIN DESIGN IDEA FMI for Model Exchange: Tool Solver FMU Model Version 1.0 released in January 2010 FMI for Co-Simulation: Reuses as much as possible from FMI for Model Exchange standard Tool FMU Model Solver Version 1.0 released in October 2010 From the official FMI presentation (adapted)
SUPPORTING TOOLS
FMI 2.0 Significant improvements over FMI-ME 1.0 and FMI-CS- 1.0 Merging of ME and CS specifications - harmonization Strong support for discrete sampled and clocked systems Efficient interface to Jacobian matrices Changeable parameters for interactive simulation etc. Engine with ECU Gearbox with ECU Thermal systems Automated cargo door Chassis components, roadway, ECU (e.g. ESP) functional mockup interface for model exchange and tool coupling courtesy Daimler
WHY DO WE CHOOSE FMI? Tool interoperability is central in our customer projects Heterogenity in tool chains for systems engineering FMI is supported by a large number of modeling and simulation tools Large industrial impact The standard is an excellent complement to Modelica, targeting exchange of compiled models Alternative for distributing Modelica library models in compiled format
MODELON FMI IMPORT STACK End user product Software component FMI Add in for Excel Open source software comp. Open source (Modelica Assoc.) FMI.NET Toolkit FMI C++ Toolkit FMI Toolbox for MATLAB PyFMI FMU Compliance Checker FMI Library FMU FMU FMU
FMI LIBRARY Infrastructure for custom integration of FMI technology in applications Basis for all Modelon s FMI products and in third party products Basis for official FMU compliance checker Supports FMI-ME 1.0 and FMI-CS 1.0 Supports FMI-2.0beta4 Encapsulate FMU interaction ZIP management XML parsing DLL loading Open Source (BSD) Free for anyone to use Part of www.jmodelica.org Road map FMI 2.0 support
FMU COMPLIANCE CHECKER Official FMU Compliance Checker Funded by the Modelica Association Modelon assigned the task in open RFQ process Assure adherence to standard Cross-checking between tools Diagnose FMU compliance issues XML schema compatibility DLL function correctness Simulation forward Euler Windows, Linux, Mac Based on FMI Library >./fmucheck.darwin64 ~/svn_projects/fmilibrary/build/testfolder/bouncingball_me.fmu [INFO][FMUCHK] Will process FMU /Users/jakesson/svn_projects/FMILibrary/build/testfolder/BouncingBall_me.fmu [INFO][FMILIB] XML specifies FMI standard version 1.0 [INFO][FMUCHK] Model name: BouncingBall [INFO][FMUCHK] Model identifier: BouncingBall [INFO][FMUCHK] Model GUID: 123 [INFO][FMUCHK] Model version: [INFO][FMUCHK] FMU kind: ModelExchange [INFO][FMUCHK] The FMU contains: 0 constants 0 parameters 0 discrete variables 7 continuous variables 0 inputs 0 outputs 7 internal variables 0 variables with causality 'none' 4 real variables 1 integer variables 0 enumeration variables 1 boolean variables 1 string variables [INFO][FMUCHK] Printing output file header time;hight;hight_speed;gravity;bounce_cof;logger_test; LOGGER_TEST_INTEGER;LOGGER_TEST_BOOLEAN; [INFO][FMUCHK] Version returned from FMU: 1.0 [ERROR][FMUCHK] Platform type returned from FMU ANY_PLATFORM does not match the checker standard32 Road map FMI 2.0 support (alpha version available) [INFO][Test ME model instance] [INFO][FMU status:ok] ### Initializing component ### [INFO][Test ME model instance] [INFO][FMU status:ok] Init HIGHT=1 [INFO][Test ME model instance] [INFO][FMU status:ok] Init HIGHT_SPEED=4 [INFO][Test ME model instance] [INFO][FMU status:ok] Init GRAVITY= 9.81 [INFO][Test ME model instance] [INFO][FMU status:ok] Init BOUNCE_COF=0.5 [WARNING][LOGGER] Expected value reference in log message here: '[ERROR][FMU status:ok] Bad reference: ' [INFO][Test ME model instance] [ERROR][FMU status:ok] Bad reference: #r 1# [WARNING][LOGGER] Expected terminating '#' in log message here: '[ERROR][FMU status:ok] Bad reference: 1'
FMI FOR PYTHON: PYFMI AND ASSIMULO PyFMI and Assimulo Python packages OSS (LGPL) Part of JModelica.org Easy to use FMU interaction in Python Full access to FMI API, DLL and XML Supports FMI ME and FMI CS 1.0 Several integrators available Derivative free optimization Engine Dynamics Library model of a Volvo truck engine Measurement data from a drive cycle FMU exported from Dymola used as a basis for model calibration Scripting and optimization in Python
TOOLS OpenModelica Functional Mock Up Unit FMI FMI Toolbox for MATLAB Import FMUs in MATLAB/Simulink Export FMUs (2013 Q1) HILS support (2013 Q2) Graphical interface FMI Toolbox for CarMaker Integration of FMUs in CM Graphical User interface FMI Add in for Excel Import FMUs into Excel Batch simulation Parallel simulations
SOLUTIONS AND SOFTWARE COMPONENTS Services Model integration FMI Integration Custom simulators
SUMMARY AND OUTLOOK FMI has made significant industrial impact in short time many supporting tools FMI is central to Modelon s tool integration strategy Modelon offers FMI OSS tools and commercial FMI products