Research in Model-Based Product Development at PELAB in the MODPROD Center

Similar documents
int a; class x { public int a; class x { float b; Asda ad public int a; Asa asad Aac sdscfcc c a

Research in Model-Based Product Development at PELAB in the MODPROD Center

Integrated Modeling of CPS including Requirements: Open Source MBSE Tools Based on Modelica and UML

4th Annual OpenModelica Workshop Feb 6, 2012

Modelica Environments and OpenModelica

1st Annual OpenModelica Workshop Feb 2, 2009

MODPROD'2014 8th International Workshop on Model-Based Product Development

3rd Annual OpenModelica Workshop Feb 7, 2011

Increasing programmability

5th Annual OpenModelica Workshop Feb 4, 2013

Simulation and Benchmarking of Modelica Models on Multi-core Architectures with Explicit Parallel Algorithmic Language Extensions

Parallel Computing Using Modelica

To All Participants!

Technical Overview of OpenModelica and its Development Environment

ModelicaML: Getting Started Issue April 2012

Vice Chairman of Modelica Association Director of Open Source Modelica Consortium

Technical Overview of OpenModelica and its Development Environment

9th Annual OpenModelica Workshop Feb 6, 2017

Technical Overview of OpenModelica and its Development Environment

OpenModelica Environment and Modelica Overview

Technical Overview of OpenModelica and its Development Environment

EXPRESSING REQUIREMENTS IN MODELICA

Dynamic Load Balancing in Parallelization of Equation-based Models

Technical Overview of OpenModelica and its Development Environment

Prototype P4.26, Report R4.25 Parallelization with increased performance based on model partitioning with TLM-couplings

OpenModelica Development Environment with Eclipse Integration for Browsing, Modeling, and Debugging

Towards Unified System Modeling with the ModelicaML UML Profile

Proceedings of the 4th International Modelica Conference, Hamburg, March 7-8, 2005, Gerhard Schmitz (editor)

An Eclipse-based Integrated Environment for Developing Executable Structural Operational Semantics Specifications

and its Development Environment

AUTOMATIC PARALLELIZATION OF OBJECT ORIENTED MODELS ACROSS METHOD AND SYSTEM

Automatic Parallelization of Mathematical Models Solved with Inlined Runge-Kutta Solvers

Enhancing the RAMSAS method for Systems Reliability Analysis through Modelica

OpenModelica Compiler (OMC) Overview

OpenModelica Compiler (OMC) Overview

Institutionen för datavetenskap Department of Computer and Information Science

45-year CPU Evolution: 1 Law -2 Equations

Out-of-Order Parallel Simulation of SystemC Models. G. Liu, T. Schmidt, R. Dömer (CECS) A. Dingankar, D. Kirkpatrick (Intel Corp.)

Towards Unified System Modeling and Simulation with ModelicaML: Modeling of Executable Behavior Using Graphical Notations

An Overview of the SysML-Modelica Transformation Specification

A Model Driven Approach for Requirements Engineering of Industrial Automation Systems

Towards Run-time Debugging of Equation-based Object-oriented Languages

ADMINISTRATIVE MANAGEMENT COLLEGE

On the link between Architectural Description Models and Modelica Analyses Models

Execution of UML State Machines Using Modelica

Institutionen för datavetenskap Department of Computer and Information Science

Performance of computer systems

The OpenModelica Modeling, Simulation, and Development Environment

Automating Model Composition for Design Verification

An Easy-to-use Generic Model Configurator for Models in Multiple Tool Formats

Task-Graph-Based Parallelization of Modelica-Simulations. Tutorial on the Usage of the HPCOM-Module

Contributions to Parallel Simulation of Equation-Based Models on Graphics Processing Units

Compositional Model Based Software Development

Introduction to parallel computers and parallel programming. Introduction to parallel computersand parallel programming p. 1

Accelerating Implicit LS-DYNA with GPU

Higher Level Programming Abstractions for FPGAs using OpenCL

Practical Model-based Testing With Papyrus and RT-Tester

OpenCL Overview. Shanghai March Neil Trevett Vice President Mobile Content, NVIDIA President, The Khronos Group

CIM 2 Modelica Factory

Serial. Parallel. CIT 668: System Architecture 2/14/2011. Topics. Serial and Parallel Computation. Parallel Computing

Dr. Yassine Hariri CMC Microsystems

State Machines in OpenModelica

Parallel Computer Architecture Concepts

Using GPUs for unstructured grid CFD

Model-Based Dynamic Optimization with OpenModelica and CasADi

CUDA PROGRAMMING MODEL Chaithanya Gadiyam Swapnil S Jadhav

Trends and Challenges in Multicore Programming

CS 590: High Performance Computing. Parallel Computer Architectures. Lab 1 Starts Today. Already posted on Canvas (under Assignment) Let s look at it

Parallel Code Generation in MathModelica / An Object Oriented Component Based Simulation Environment

THE COMPARISON OF PARALLEL SORTING ALGORITHMS IMPLEMENTED ON DIFFERENT HARDWARE PLATFORMS

MDD with OMG Standards MOF, OCL, QVT & Graph Transformations

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

Online Course Evaluation. What we will do in the last week?

6.1 Multiprocessor Computing Environment

Parallel Programming Principle and Practice. Lecture 9 Introduction to GPGPUs and CUDA Programming Model

Fault Tolerance Analysis using OpenModelica with Figaro Extensions for Modelica

Available online at Procedia Computer Science 16 (2013 )

Modeling Kernel Language (MKL)

Investigation of System Timing Concerns in Embedded Systems: Tool-based Analysis of AADL Models

Dynamic Cuda with F# HPC GPU & F# Meetup. March 19. San Jose, California

Computer and Information Sciences College / Computer Science Department CS 207 D. Computer Architecture. Lecture 9: Multiprocessors

Parallel Processors. The dream of computer architects since 1950s: replicate processors to add performance vs. design a faster processor

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

OpenModelica OMShell and OMNotebook Introduction and Exercises

Performance Benefits of NVIDIA GPUs for LS-DYNA

OpenACC 2.6 Proposed Features

The Art of Parallel Processing

Profiling and Debugging OpenCL Applications with ARM Development Tools. October 2014

SPOC : GPGPU programming through Stream Processing with OCaml

High Performance Computing on GPUs using NVIDIA CUDA

Tooled Process for Early Validation of SysML Models using Modelica Simulation

An innovative compilation tool-chain for embedded multi-core architectures M. Torquati, Computer Science Departmente, Univ.

Requirement Formalization in Modelica. Lena Buffoni, Linköping University (with material from Wladimir Schamai)

AutoTune Workshop. Michael Gerndt Technische Universität München

GMF Tooling 3.0 Vision, Architecture, Roadmap

Oracle Developer Studio 12.6

Outline Marquette University

TOOLS FOR IMPROVING CROSS-PLATFORM SOFTWARE DEVELOPMENT

Kaisen Lin and Michael Conley

DEPARTMENT OF COMPUTER SCIENCE

Transcription:

class x { public int a; class x { float b; public int func (int a,int b); int a; class x { Asa asad float b; public Asda ad int func int a; Asd (int ad a,int cc b); class x { Asa asad float b; Aac sdscfcc c a public Asda ad int func (int a,int Ascccv b); ca int a; Asd ad Asa asad Ascc cac float b; Aac sdscfcc Asda ad } c a int func Asd (int ad a,int Ascccv cc b); ca Asa asad Ascc cac Aac sdscfcc c a Asda ad } Ascccv ca Asd ad Ascc cac Aac sdscfcc } c a Ascccv ca Ascc cac } Research in Model-Based Product Development at PELAB in the MODPROD Center Presentation at MODPROD'2012 PELAB Programming Environment Laboratory Department of Computer and Information Science Linköping University 2012-02-07 Peter Fritzson

Examples of Complex Systems in Engineering Robotics Automotive Aircraft Mobile Phone Systems Business Software Power plants Heavy Vehicles Process industry 2 Peter Fritzson

Vision of Integrated Model-Based Product Development Business Process Control Requirements Capture Model-Driven Design (PIM) Feedback Compilation &Code Gen (PSM) System Simulation Process models Requirements models Product models Platform models Software & Syst Product Unified Modeling: Meta-modeling& Modelica& UML & OWL Vision of unified modeling framework for model-driven product development from platform independent models (PIM) to platform specific models (PSM) 3 Peter Fritzson

Open Source Modelica Consortium Open Source Effort 4 Peter Fritzson

The OpenModelica Open Source Enviroment www.openmodelica.org Advanced Interactive Modelica compiler (OMC) Supports most of the Modelica Language Basic environment for creating models OMShell an interactive command handler OMNotebook a literate programming notebook MDT an advanced textual environment in Eclipse OMEdit graphic Editor OMOptim optimization subsyste ModelicaML UML Profile MetaModelica extension ParModelica extension 5 Peter Fritzson 5

OSMC International Consortium for Open Source Model-based Development Tools, 40 members Feb 2012 Founded Dec 4, 2007 Open-source community services Website and Support Forum Version-controlled source base Bug database Development courses www.openmodelica.org Code Statistics 6 Peter Fritzson Industrial members (22) ABB Corp Research, Sweden Bosch Rexroth AG, Germany Siemens PLM, California, USA Siemens Turbo, Sweden CDAC Centre, Kerala, India Creative Connections, Prague DHI, Aarhus, Denmark Evonik, Dehli, India Equa Simulation AB, Sweden Fraunhofer FIRST, Berlin Frontway AB, Sweden IFP, Paris, France InterCAX, Atlanta, USA ISID Dentsu, Tokyo, Japan MathCore Engineering/ Wolfram, Sweden Maplesoft, Canada TLK Thermo, Germany Sozhou Tongyuan, China VI-grade, Italy VTI, Linköping, Sweden VTT, Finland XRG Simulation, Germany University members (18) Linköping University, Sweden TU Berlin, Institute of UEBB, Germany FH Bielefeld, Bielefeld, Germany TU Braunschweig, Institute of Thermodynamics, Germany TU Dortmund, Proc. Dynamics, Germany Technical University Dresden, Germany Université Laval, modeleau, Canada Georgia Institute of Technology, USA Ghent University, Belgium Griffith University, Australia Hamburg Univ. Technology/TuTech, Institute of Thermo- Fluid, Germany University of Ljubljana, Slovenia University of Maryland, Inst. Systems Engineering, USA University of Maryland, CEEE, USA Politecnico di Milano, Italy Ecoles des Mines, ParisTech, CEP, France Mälardalen University, Sweden Telemark University College, Norway

OpenModelica Connection Editor OMEdit Supports MSL 3.1 Easy to use First released fall Dec 2010 Implemented in C++ Qt library 7 Peter Fritzson

New OpenModelica MDT Debugger (Eclipse-based) Using Japanese Characters 8 Peter Fritzson

OpenModelica Optimization Subsystem OMOptim Parameter optimization Currently using genetic optimization algorithms in OMOptim 0.9. Work on more parameter optimization Work on dynamic optimization using multi-core computers 9 Peter Fritzson

Web Server Based Teaching/Learning Subsystem OMWeb Runs on ordinary web server Teachers provide modeling exercises Students send in solutions Text-based models; soon graphic models. Running of simulations through server Lila EU project 10 Peter Fritzson

Research Modeling-Language Design Model-based Optimization Fault Analysis Bayesian Networks Debugging Modeling Support Environments 11 Peter Fritzson

Important Questions Design of modeling languages for modeling complex (physical) systems (Modelica) including precise semantics, extensibility, etc. How to engineer complex engineering systems of both hardware and software in a consistent and safe manner? Compilation of models for efficient (real-time) execution on multi-core architectures Traceability from requirements to models to implementation 12 Peter Fritzson

Modeling Language and Tool Research How can a modeling language be designed with precise semantics to avoid errors? Can the language be made extensible? Can it model itself (meta-modeling)? How should a user-supportive modeling environment be designed? 13 Peter Fritzson

Approach to Modelica 4 Simplify and generalize language features Partly Library-based definition Define many Modelica language features by modeling the language features in a Core Library This needs core language extensions symbolic recursive data structures (trees, lists) pattern matching for transformations some higher-order language features. Ongoing design work in Modelica Association Advantages improved correctness language modularity and extensibility 14 Peter Fritzson

Language Features and Symbolic Data Structures Needed for Modelica 4 More higher-order functions (function arguments to functions, returning functions, etc.) Subtyping polymorphism Recursive data structures (trees, lists, etc.) Pattern-matching for model transformations Such language features have been designed in the MetaModelica language extension One version implemented in the OpenModelica compiler Bootstrapping Paper in Modelica conference, March 2011 Innovative application, Paper Debugging Symbolic Transformations in Equation Systems, EOOLT, Sept 2011. 15 Peter Fritzson

OpenModelica Compiler Performance Compiled Using Itself Large application for symbolic operations, the OpenModelica compiler, >150 000 lines Very large (and difficult) test model! First object-oriented equation-based language compiler that compiles itself = bootstrapping Flattening small models Task MMC OMC Factor drmodelica, 104 flattening 2.136s 2.049s 0.96x tests mofiles, 548 flattening 12.770s 13.409s 1.05x tests msl 1.5, 60 flattening tests 1.726s 1.578s 0.91x mosfiles, 120 simulation test 110.67s 107.96s 1.03x OMC compiling itself Task MMC OMC Factor Translate sources to C 98.8s 49.7s 0.50x Compile C, gcc O3 233.3s 152.0s 0.65x Executable size 18.7MB 5.43MB 0.29x Compile C, gcc Os 218.9s 102.8s 0.47x Executable size 10.3MB 5.10MB 0.50x Debug version, gcc g O3 1405s 152.5s 0.11x Executable size 125MB 25MB 0.20x 16 Peter Fritzson

Efficient Traceable Model-Based Dynamic Optimization EDOp Research Project Integrated modeling & optimization in OpenModelica Equation oriented tool, generation of efficient parallel code Based on OpenModelica, cooperation with Open-Source Consortium Including model error traceability and localization Efficient solution methods for model-based optimization problems Methods can exploit structure of the problem and their equations Exploit models for parallel computing Utilize equations to analytically compute gradients and hessians, faster search routines Optimized Heavy Industrial Applications Trucks (Scania), Wheel Loaders (Volvo CE) Bearing applications in mechanical systems (e.g. wind power, SKF) Siemens: Gas turbines, Frontway: Process industry 17 Peter Fritzson

Bayesian Network Based Fault and Failure Analysis Cooperation with Scania, Mattias Nyberg Developing a Fault and Failure analysis tool for the engineers, containing the following features: Modelica/UML/SysML-like intuitive GUI design interface with simulation Functionality Generate Failure Mode and Effect Analysis, FMEA table Generate Fault Tree, FTA table Answer to Queries Probability of hazards Root cause of hazards Infer hazards, given the root cause 18 Peter Fritzson

Bayesian Network Based Fault and Failure Analysis Association of Services to the Components Legend 19 Peter Fritzson

Bayesian Network Based Fault and Failure Analysis Illustration of the Work-Flow Modelica Model Model Parser Equation Type Equations System Reference Systems struct Interfacing Evaluate Parsed Model and Generate the Causal Network SMILE & GeNIe Interfacing 20 Peter Fritzson Bayesian Network FMEA FTA

The new MDT Debugger for Large Algorithmic Modelica/MetaModelica algorithmic codes MDT (Modelica Development Tooling) is the integrated development environment. The new debugger is implemented as a debug plugin within MDT. 21 Peter Fritzson 21

Breakpoint Support in the Debugger 22 Peter Fritzson 22

Equation Model Transformation Debugger Complicated to understand source of some errors Trace transformations through the compiler 0 = y + der(x * time * z); z = 1.0; (1) subst: y + der(x * (time * z)) => y + der(x * (time * 1.0)) (2) simplify: y + der(x * (time * 1.0)) => y + der(x * time) (3) expand derivative (symbolic diff): y + der(x * time) => y + (x + der(x) * time) (4) solve: 0.0 = y + (x + der(x) * time) => der(x) = ((-y) - x) / time time <> 0 23 Peter Fritzson

Integrated Hardware-Software Modeling ModelicaML UML Profile for Modelica SysML-Modelica Integration 24 Peter Fritzson

Using ECLIPSE as Integration Platform OpenUP/Basic Capacity Sub- Process Areas UML-Modelica Plug-in OpenModelica MDT ECLIPSE Process Framework (EPF) Composer Specific components Graphical Modeling Framework ECLIPSE Modeling Framework ECLIPSE Rich Client Platform (RCP) Runtime Java runtime C/C++ runtime OpenModelica runtime MetaModelica runtime 25 Peter Fritzson

ModelicaML UML Profile for Modelica 1st Generation (2006-2008) Extension of SysML subset Features: Supports Modelica constructs Modelica generic class modeling Modelica syntax in definitions Equation-based modeling Simulation modeling 26 Peter Fritzson

ModelicaML UML Profile, 2nd Generation SysML/UML to Modelica OMG Standardization (with Wladimir Schamai, 2009 Now) ModelicaML is a UML Profile for SW/HW modeling Applicable to pure UML or to other UML profiles, e.g. SysML Standardized Mapping UML/SysML to Modelica Defines transformation/mapping for executable models Being standardized by OMG ModelicaML Defines graphical concrete syntax (graphical notation for diagram) for representing Modelica constructs integrated with UML Includes graphical formalisms (e.g. State Machines, Activities, Requirements) Which do not exist in Modelica language Which are translated into executable Modelica code Is defined towards generation of executable Modelica code Current implementation based on the Papyrus UML tool + OpenModelica 27 Peter Fritzson

ModelicaML: Graphical Notation Structure Requirements Behavior 28 Peter Fritzson

Example: Representation of System Structure Interconnections Inheritance Components 29 Peter Fritzson

Example: Representation of System Behavior State Machine of the Controller State Machine of the Tank Conditional Algorithm (Activity Diagram) 30 Peter Fritzson

Example: Representation of System Requirements Textual Requirement Formalized Requirement 31 Peter Fritzson

Example: Simulation and Requirements Evaluation Req. 001 is instantiated 2 times (there are 2 tanks in the system) tank-height is 0.6m Req. 001 for the tank2 is violated Req. 001 for the tank1 is not violated 32 Peter Fritzson

vvdr virtual Verification of Design Requirements vvdr Roles and Tasks Requirements Analyst -1. Select requirements to be verified using simulations (or logic tools) -2. Formalize textual requirements System Designer - Support Requirements Analyst in selecting requirements -3. Create system design models to be verified against requirements - Support System Tester in deciding which requirements are to be verified using which test cases - Support System Tester in linking requirement properties to design model properties System Tester - 4. Create test modes including test cases and decide which requirement are to be verified using which test cases -5. Link requirements to design models -6. Simulate and observe requirement violations -7. Analyze simulation results and create a Simulation Summary Report 33 Peter Fritzson

Parallel Execution Compilation to MultiCore 34 Peter Fritzson

Towards High-Level Parallel Modeling and Simulation Simulations are time-consuming Moore s Law : (since 1965) #devices per chip area doubles every 18 months CPU clock rate also doubled every 18 months until 2003, then: heat and power issues, limited ILP,... superscalar technology has reached its limits, only (thread-level) parallelism can increase throughput substantially The consequence: Chip multiprocessors (+ clusters) Multi-core, PIM,... (for general-purpose computing) Need parallel programming/modeling/parallelization Automatic parallelization Explicit parallel modeling and parallel programming Log2 Speedup 16.0 14.0 12.0 10.0 8.0 6.0 4.0 2.0 0.0 Single-processor Performance Scaling Throughput incr. 55%/year Source: Doug Burger, UT Austin 2005 Limit: RISC ILP Limit: Clock rate 1984 1986 1988 1990 1992 1994 1996 1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 2020 90 nm Device speed Pipelining RISC/CISC CPI 2006 Parallelism Assumed increase 17%/year possible 65 nm 45 nm 32nm 22nm 35 Peter Fritzson

Integrating Parallelism and Mathematical Models Three Approaches Automatic Parallelization of Mathematical Models (ModPar) Parallelism over the numeric solver method. Parallelism over time. Parallelism over the model equation system... with fine-grained task scheduling Coarse-Grained Explicit Parallelization Using Components The programmer partitions the application into computational components using strongly-typed communication interfaces. Co-Simulation, Transmission-Line Modeling (TLM) Explicit Parallel Programming Providing general, easy-to-use explicit parallel programming constructs within the algorithmic part of the modeling language. NestStepModelica 36 Peter Fritzson

Modelica Simulations Parallelization Approach Simulation = solution of (hybrid) DAEs from models g( X, X, Y, t) 0 h( X, Y, t) 0 In each step of numerical solver: Calculate in g (and Y in h) X Parallelization approach: perform the calculation of in parallel Called parallelization over the system. X Drawback: Numeric solver might become bottle-neck 37 Peter Fritzson

Example Task Graphs and Parallelized Application 2 1 0 0 4 1 1 5 2 0 5 2 3 2 0 6 2 Speedup 3 2.5 2 1.5 1 0 7 10 8 0 1 1 0.5 1 2 4 8 16 # Proc Clustered Task Graph Thermofluid Pipe Application 38 Peter Fritzson

ParModelica Modelica Parallel Algorithmic Programming Here: parglobal and parlocal Variables; Execution on GPUs Modelica + OpenCL = ParModelica function parvar Integer m = 1024; Integer A[m]; Integer B[m]; parglobal Integer pm; parglobal Integer pn; parglobal Integer pa[m]; parglobal Integer pb[m]; parlocal Integer ps; parlocal Integer pss[10]; algorithm B := A; pa := A; B := pa; pb := pa; pm := m; n := pm; pn := pm; end parvar; //copy to device //copy from device //copy device to device Memory Regions Global Memory Constant Memory Local Memory Accessible by All work-items in all workgroups All work-items in all workgroups All work-items in a workgroup 39 Peter Fritzson 39 Private Memory Priavte to a work-item 2012-

ParModelica Matrix Multiplication using Kernel function Gained speedup Intel Xeon E5520 CPU (16 cores) 26 NVIDIA Fermi-Tesla M2050 GPU (448 cores) 115 Speedup comparison to sequential algorithm on Intel Xeon E5520 CPU 4,36 13,41 0,61 4,61 Speedup CPU E5520 GPU M2050 35,95 24,76 26,34 64 128 256 512 Parameter M (Matrix sizes MxM) 114,67 512 256 128 64 32 16 8 4 2 1 0,5 0,25 0,125 0,0625 32 64 128 256 512 CPU E5520 (Serial) 0,093 0,741 5,875 58,426 465,234 Simulation Time (second) CPU E5520 (Parallel) 0,137 0,17 0,438 2,36 17,66 GPU M2050 (Parallel) 1,215 1,217 1,274 1,625 4,057 40 Peter Fritzson 40 2012-

New Scalable OpenModelica Parallel Code Generator Ongoing work Both task parallelism and data parallelism Handling non-expanded arrays efficiently Includes use of TLM-partitioning for more parallelism OPENMP based parallelization prototype for equationbased models in OpenModelica ParModelica - Generating OpenCL code for platform independence Template based code generator 41 Peter Fritzson

Summary of MODPROD Research at PELAB Modeling language design (semantics, type systems, meta-modeling, extensibility) Model-based efficient optimization (multi-core) Fault estimation & traceability; Bayesian networks Modelica-UMLSysML integration Requirements traceability Debugging of models Compilation to multi-core platforms Compilation and performance measurements for real-time simulation 42 Peter Fritzson