Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Technologies for Creating Easily Maintainable Component.

Slides:



Advertisements
Similar presentations
Start Presentation October 11, 2012 Thermodynamics Until now, we have ignored the thermal domain. However, it is fundamental for the understanding of physics.
Advertisements

Start of presentation Mathematical Modeling of Physical Systems © Prof. Dr. François E. Cellier September 20, 2012 Object Oriented Modeling The aim of.
Cosmos Motion User Interface
Start of Presentation Mathematical Modeling of Physical Systems © Prof. Dr. François E. Cellier September 20, D Mechanical Systems In this lecture,
Start Presentation November 8, 2012 Bond Graphs for Mechanical Systems We shall look today in a bit more detail at the modeling of 1D mechanical systems.
Start Presentation September 27, 2012 The Structural Singularity Removal Algorithm by Pantelides This lecture deals with a procedure that can be used to.
PLANAR KINETICS OF A RIGID BODY: CONSERVATION OF ENERGY
System Analysis through Bond Graph Modeling Robert McBride May 3, 2005.
The robot structure model design 2 Curse 5. Modeling: the robot AcTrMStTk V(t) T(t)  (t) q(t) x(t)
Martin Otter: The New MultiBody Library, July 18, The New Modelica MultiBody Library Martin Otter Deutsches Zentrum für Luft- und Raumfahrt (DLR)
Start Presentation Conference 2008 © Prof. Dr. François E. Cellier March 4, 2008 World3 in Modelica: Creating System Dynamics Models in the Modelica Framework.
An Open-Source, Object-Oriented General Cartographic Transformation Program (GCTP) Michael S. Williams, Michael P. Finn*, and Robert A. Buehler** United.
Start Presentation November 8, 2012 Planar Mechanics We shall now look at a first application of multi- bond graphs: planar mechanics. We shall notice.
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
The Dymola Bond Graph Library
Start Presentation ICSC 2005: Beijing October 25, 2005 Object-oriented Modeling in the Service of Medicine François E. Cellier, ETH Zürich Àngela Nebot,
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Start of Presentation Mathematical Modeling of Physical Systems © Prof. Dr. François E. Cellier Electrical CircuitsI This lecture discusses the mathematical.
Impulse-Bond Graphs Authors: Dirk Zimmer and François E. Cellier, ETH Zürich, Institute of Computational Science, Department of Computer Science Bondgraphic.
Wrapping Multi-bond Graphs: A Structured Approach to Modeling Complex Multi-body Dynamics François E. Cellier and Dirk Zimmer ETH Zürich.
Start Presentation Conference 2008 © Prof. Dr. François E. Cellier March 4, 2008 Support for Dymola in the Modeling and Simulation of Physical Systems.
Dirk Zimmer François E. Cellier Institute of Computational Science Department of Computer Science ETH Zürich A bondgraphic modeling tool and its application.
Start Presentation Eurosim 2007, Ljubljana September 10, 2007 Electronic Circuit Modeling and Simulation in Modelica François E. Cellier ETH Zürich, Switzerland.
Object-oriented Modeling of Mechatronics Systems in Modelica Using Wrapped Bond Graphs François E. Cellier and Dirk Zimmer ETH Zürich.
François E. Cellier and Matthias Krebs
© Dirk Zimmer, February 2006, Slide 1 Master Thesis: A Modelica Library for Multibond Graphs and its Application in 3D-Mechanics Author: Dirk Zimmer Adviser:
CASE Tools CIS 376 Bruce R. Maxim UM-Dearborn. Prerequisites to Software Tool Use Collection of useful tools that help in every step of building a product.
Combinational Logic Design
Start Presentation November 15, th Homework In this homework, we shall exercise the model wrapping technique. To this end, we shall create a mini-library.
Start Presentation November 29, th Homework – Solution In this homework, we shall attempt the modeling of a planar mechanical system. We shall.
Your Interactive Guide to the Digital World Discovering Computers 2012.
VIRTUAL PROTOTYPING of ROBOTS DYNAMICS E. Tarabanov.
CS 8532: Adv. Software Eng. – Spring 2007 Dr. Hisham Haddad Tuesday Class will start momentarily. Please Stand By … CS 8532: Advanced Software.
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
Start Presentation November 22, th Homework In this homework, we shall attempt the modeling of a planar mechanical system. We shall do so once.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Media and Fluid Draft Adrian Pop & Martin Sjölund
Start Presentation October 25, 2012 Thermal Modeling of Buildings This lecture deals with the model of a space heating system of a building by means of.
Start Presentation November 15, th Homework - Solution In this homework, we shall model and simulate a mechanical system as well as exercise the.
Start PresentationSeptember 21, 2009 Modeling Chemical Reactions in Modelica By Use of Chemo-bonds Prof. Dr. François E. Cellier Department of Computer.
CHAPTER TEN AUTHORING.
Start Presentation December 6, th Homework – Solution In this homework, we shall model and simulate a 3D mechanical system with proper animation.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Start Presentation November 24, th Homework In this homework, we shall exercise the model wrapping technique. To this end, we shall create a mini-library.
Start Presentation October 25, th Homework - Solution In this homework, we shall exercise the modeling of a simple electrical circuit using bond.
Start Presentation December 6, 2012 Chemo-bond Graphs In this lecture, we shall introduce a fourth bond graph library, the ChemBondLib. It is very similar.
Extracting binary signals from microarray time-course data Debashis Sahoo 1, David L. Dill 2, Rob Tibshirani 3 and Sylvia K. Plevritis 4 1 Department of.
Start Presentation November 1, th Homework In this homework, we shall model and simulate a discontinuous system as well as train the incorporation.
Start Presentation November 8, th Homework  Solution In this homework, we shall model and simulate a discontinuous system as well as train the.
THE IMPORTANCE OF DISCRETE MATHEMATICS IN COMPUTER TECHNOLOGY.
The Hashemite University Computer Engineering Department
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Multi-bond Graphs We shall today look at vectors of bonds, called multi-bonds. Especially when dealing with 2D and 3D mechanics, the d’Alembert principle.
Systems Development Lifecycle
WS 9-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. February 27, 2009 Inventory # Workshop 9 Taylor Impact Test – “What if” Study.
WS1-1 ADM , Workshop 1, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 1 INTRODUCTION.
SysML and Modelica Integration Working Group Meeting 3/11/09 Peter Fritzson Wladimir Schamai.
Interface Concepts Modeling Core Team
WORKSHOP 1 introduction
8th Homework In this homework, we shall model and simulate a mechanical system as well as exercise the state selection algorithm. We shall first model.
Software life cycle models
ME457: Mechatronic System Modeling and Simulation
CPE 528: Lecture #3 Department of Electrical and Computer Engineering University of Alabama in Huntsville.
CS 8532: Advanced Software Engineering
UNIT 5 EMBEDDED SYSTEM DEVELOPMENT
UNIT 5 EMBEDDED SYSTEM DEVELOPMENT
Chapter 8 Software Evolution.
Lab 8: GUI testing Software Testing LTAT
Presentation transcript:

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Technologies for Creating Easily Maintainable Component Model Libraries of Complex Physical Systems François E. Cellier Department of Computer Science ETH Zurich Switzerland

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 The Modelica Standard Library (SL) is growing at an amazing pace. Whereas originally, the SL was meant as a small add-on created for the convenience of the end user, the library is now growing faster in terms of number of lines of code than the Modelica compilers themselves. Fairly soon, the SL will be larger in size than the compilers managing it. Maintaining such a large library has become a daunting task, especially since this is a highly distributed endeavor, i.e., there are many researchers contributing regularly to the SL. The developers of Modelica environments have long recognized this problem, and they are meanwhile offering quite sophisticated library management tools, such as version control, scripts for automated upgrading of libraries from one version of Modelica to the next, etc.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Yet, tools for managing potentially bad models offer only a partial answer to the problem. More important are tools that minimize the complexity of the individual model codes and that support the modeler in making sure that his or her models are correctly reflecting the physics of the underlying physical system to be modeled. This presentation offers a discussion of such methodologies.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, Graphical Modeling Modeling systems graphically is better than modeling them by means of equations. Graphical models are two-dimensional, whereas equations are one-dimensional. Hence missing connections can be identified more easily. The maintenance of graphical models is considerably easier than that of equation models.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Graphical modeling forces the modeler to structure his or her models such that each of them fits entirely onto one screen. Some graphical modeling environments offer a virtual canvas over which the physical screen can be shifted. Don’t use it! It’s a mistake. A model that doesn’t fit on a screen needs to be restructured. A Modelica environment that doesn’t offer a full- fledged graphical front end is not competitive.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, Bond Graph Modeling Bond graphs represent the lowest-level graphical model interface that is still fully object oriented. Bond graph modeling enables the modeler to model graphically further down than any other graphical modeling methodology. This minimizes the need for using equations, thereby making the so-built libraries easier maintainable. Bond graphs do not necessarily offer the best suited GUI for the end user.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, Model Wrapping Library designers should make use of the best suited graphical modeling methodology for representing their models to the end user. However, models can use more than one graphical layer. There is no need to implement the top graphical layer directly using equation models. Model wrapping enables the library designer to interpret one graphical modeling methodology in terms of another lower-level graphical modeling approach, such as a bond graph.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 A Crane Crab Let us look at the following crane crab model: Prismatic Joint Revolute Joint Rod Mass 2 Mass 1

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Multi-body System Representation

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Crane Crab Simulation Results The animation needs to be associated with the MBS layer, and not with the bond graph layer. Individual bonds cannot be animated. Consequently, the multi-bond graph is not suitable as a user interface.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Model Wrapping II Wrapped models contain wrapper models that convert the upper-layer connectors to the lower- layer connectors, and vice-versa. They use the protected keyword to hide the internal lower-layer variables from the simulation. In this way, the set of variables offered for display in the simulation window is identical in both libraries. This is called wrapping the model tight. The state select algorithm is used to ensure that the flattened Modelica model will employ the same state variables in both libraries.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 An Example Given the following mechanical system:

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 An Example II Using the translational sub-library of the mechanics library of the BondLib library, this system can be modeled as follows:

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 The Sliding Mass Model Let us look at the model of a sliding mass. The two state variables are the f variable of the inductor model and the output of the internal integrator of the q sensor.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 The Sliding Mass Model II The natural state variables of this model are the internal variables I.f and sAbs.Integrator1.y. This is inconvenient. The user of the model would prefer to use the local variables v and s of the mass model as state variables. Modelica can be told to modify the equations such that, if possible, the desired variables are being used as state variables, i.e., show up in the simulation code with a der() operator.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 The Sliding Mass Model IV One question that remains is for which variables we now have to specify the initial conditions. Do we do it for the new state variables s and v, or do we still do it for the natural state variables? It turns out that we can do either or, but not both. Modelica will use the specified values as start values of an iteration and iterate on the unknown initial values of the new state variables, until it finds a set of initial conditions that is consistent with the information that has been specified by the user.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Wrapping Tightly – Protected Variables Let’s now look at the expanded view of the equation layer of the spring model. I manually placed the keyword protected in front of the declarations of variables to the inside of the wrapper models. The effect of this measure is to prevent these variables from being displayed in the simulation window. In this way, the model parameters will look exactly the same in the simulation window as using the corresponding model of the standard library. The model has been wrapped tightly.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 An Example III The initial conditions were calculated correctly. Due to information hiding (protected variables), only those variables external to the wrapper models are visible.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, D Simulation of 1D Models II Prismatic joints need to accompany the masses in order to limit their degrees of freedom to one. BondLib MultiBondLib

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Translation Logs Wrapped 1D mechanical bond graph model Wrapped 2D mechanical bond graph model

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Simulation Logs

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Simulation Results

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Efficiency Considerations The following table compares the efficiency of the simulation code obtained using the multi-body library contained as part of the standard Modelica library with that obtained using the 3D mechanics sub-library of the multi-bond graph library.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 BondLib Beside from the standard 1D bond graph elements, BondLib offers additionally wrapped sub-libraries for electrical analog circuits; for mechanical 1D translational and rotational motions; a heat transfer sub-library; and a small hydraulics sub-library. The electrical sub-library contains in addition a full implementation of Spice.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Multiple Modeling Interfaces in BondLib

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Thermal Modeling in BondLib (Biosphere 2)

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Spice Implementation in BondLib

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 MultiBondLib Beside from the standard 2D and 3D mechanical multi-bond graph elements, MultiBondLib offers additionally wrapped sub-libraries for planar mechanical motions and for 3D mechanical motions including fully automated animation. These wrapped sub-libraries are equivalent in power and efficiency to the multi-body system library contained as part of the Modelica standard library. In addition, MultiBondLib offers separate sub-libraries for planar mechanics; the possibility to model elastic and inelastic impacts between 3D bodies; as well as the possibility of modeling gravitational pools, such as needed for the simulation of planetary systems. These features are not currently available in the Modelica standard library.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Multiple Interfaces in MultiBondLib

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 ThermoBondLib The ThermoBondLib library was designed for modeling convective flows (simultaneous flows of mass, volume, and heat) using thermo-bond graphs. There are currently no wrapped thermo-bond graph sub-libraries available yet. In the future, such wrapped sub-libraries will be added to replicate features of the media and fluid sub-libraries of the Modelica standard library.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Graphical Modeling in ThermoBondLib

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, Multiple Implementations We can never be absolutely sure that our libraries don’t contain errors, or that neither the model compiler nor the simulation engine contain bugs. To reduce the likelihood of such errors, it is useful to have multiple implementations available. By comparing the simulation results of the standard library with those of the three bond graph libraries, we can verify the correctness of the libraries. By comparing the simulation results of e.g. Dymola with those of OpenModelica, we can verify the correctness of the model compilers and simulation engines.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, Unit Checking It is now possible to declare correct measurement units in Modelica. This feature helps dramatically in debugging models of physical systems. Bond graph models are generic (multi-domain), and therefore cannot declare measurement units. For this reason, it must be possible to inherit measurement units downwards from the higher to the lower layers of the model architecture. It is important that OpenModelica support unit checking in order to be competitive.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, Derived Data Types In newer versions of Modelica, it is possible to declare derived data types, such as variables with a reduced range. It is important that OpenModelica verifies that such constraints aren’t being violated during the simulation.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, Assertions In newer versions of Modelica, it is possible to declare assertions, representing a generalization of the derived data types mentioned earlier. It is important that OpenModelica verifies that also these constraints aren’t being violated during the simulation.

Start of Presentation © Prof. Dr. François E. Cellier 3 rd MODPROD Workshop – Keynote February 4, 2009 Conclusions In this presentation, I have looked at a number of features that can help create safer models: 1.graphical modeling 2.bond graph modeling 3.model wrapping 4.multiple implementations 5.derived data types 6.assertions Together they offer means for creating Modelica libraries that are safer to use and easier to maintain.