Download presentation
Presentation is loading. Please wait.
Published byBarnard Fitzgerald Modified over 8 years ago
1
SysML and Modelica: Opportunities for Synergy Chris Paredis, Peter Fritzson, Russell Peak Georgia Institute of Technology Linköping University OMG, Santa Clara, December 2008
2
Intent of Presentation Introduce Modelica to SysML community Propose an effort to explore an integration between Modelica and SysML further: Descriptive Modeling in SysML + Formal Executable Modeling for Analyses and Trade Studies in Modelica 2
3
Overview Modelica overview What is Modelica? What makes Modelica so appealing? The Modelica Standard Library The OpenModelica Project SysML – Modelica Synergy SysML – Modelica Correspondence Steps Forward Summary Additional References 3
4
What is Modelica? State-of-the-art Modeling Language for System Dynamics –Differential Algebraic Equations (DAE) –Discrete Events Formal, object-oriented language Ports represent energy flow (undirected) or signal flow (directed) Acausal, equation-based, declarative Multi-domain modeling 4
5
Modelica is Object-Oriented model SlidingMass "Sliding mass with inertia" extends Interfaces.Rigid; import SI = Modelica.SIunits; parameter SI.Mass m = 1 "mass o the sliding mass"; SI.Velocity v "absolute velocity of the component"; SI.Acceleration a "absolute acceleration of the component"; equation v = der(s); a = der(v); m*a = flange_a.f + flange_b.f; end SlidingMass; Class consists of declaration + equations Objects are declared as instances of classes Specify the default value for parameters Equations are non-causal Modelica is case sensitive Use dot-notation to refer to object variables
6
Modelica is Acausal, and Port-based 6 Acausal, equation-based –F = m*a –a = F/m –0 = F – m*a Port-based –Connectors represent energy flow –Undirected connections Semantics of Kirchhoff's laws –E.g., fluid port contains Pressure flow: Mass flow rate Temperature flow: Enthalpy flow rate
7
Textual and Graphical Views 7 model myCircuit annotation (uses(Modelica(version="2.2.1"))); Modelica.Electrical.Analog.Basic.Ground Ground1 annotation (extent=[-62,-44; -42,-24]); Modelica.Electrical.Analog.Basic.Resistor Resistor1 annotation (extent=[0,-14; 20,6], rotation=270); Modelica.Electrical.Analog.Basic.Capacitor Capacitor1 annotation (extent=[-32,6; -12,26]); Modelica.Electrical.Analog.Sources.ConstantVoltage ConstantVoltage1 annotation (extent=[-62,-14; -42,6], rotation=270); equation connect(ConstantVoltage1.p, Resistor1.p) annotation (points=[-52,-24; -52,-14], style(color=3, rgbcolor={0,0,255})); connect(Resistor1.n, Capacitor1.p) annotation (points=[-52,6;-52,16;-32,16], style(color=3, rgbcolor={0,0,255})); connect(Capacitor1.n, ConstantVoltage1.n) annotation (points=[-12,16; 10,16; 10,6], style(color=3, rgbcolor={0,0,255})); connect(ConstantVoltage1.n, Ground1.p) annotation (points=[10,-14; -52,-14], style(color=3, rgbcolor={0,0,255})); end myCircuit; Annotations for visualization, compilation & simulation Do not affect mathematical model
8
What Makes Modelica so Appealing? Symbolic manipulation of equations enables –Causality assignment –Simplification / elimination of algebraic loops –Index reduction –Zero-crossing functions for event detection –Symbolic differentiation for faster root-finding Bottom Line: –Very expressive models –Very efficient simulations 8
9
Example: Stribeck Friction Hybrid model –DAE + discrete events 5 states: 1.locked 2.startForward 3.forward 4.startBackward 5.Backward Dynamically reverses causality when v=0 Avoids typical stiffness at v=0
10
The Modelica Standard Library 10 motor torque
11
The Modelica Standard Library Information about syntax and semantics of Modelica For working with signals & controls: generate waveforms, transfer functions, sampling, logical operators, look-up tables (interpolation) Defines constants: pi, e, G, h, … Motors and generators: DC, (a-)synchronous induction Multiphase power grids, power electronics (thyristors, etc.) Standard Mathematical functions (trig, log, interpolation,…) Mechanical 3D and 1D (for planar motion use 3D) Media = liquids and gasses; no component models Large number of units Simple models for flow of fluids with thermal properties Utilities for printing and file access
12
Other Modelica Libraries Modelica association — 20+ free libs (www.modelica.org) EUROSYSLIB project — 20+ libs under development (http://www.itea2.org/public/project_leaflets/EUROSYSLIB_profile_oct-07.pdf) 12
13
The OpenModelica Project Open source Modelica environment –OMC, The Modelica Compiler/Interpreter –OMShell, The Interactive Session Handler –OMNotebook, DrModelica Simple Electronic notebook –Graphic Model Editor – SimForge (developed by Technical University of Milan) –Modelica Development Tooling (MDT) as Eclipse Plugin –Modelica XML conversion –Debugger for extended subset algorithmic code Supported by the Open Source Modelica Consortium European ITEA2 project OPENPROD –PI: P. Fritzson; 25 Partners; €11M More info: http://www.openmodelica.org 13
14
SysML – Modelica Synergies Modelica = state-of-the-art modeling language for system dynamics 1.Complements SysML Parametrics –Very expressive, formal language for differential algebraic equations and discrete events 2.Is (more or less) Compatible with SysML –Object-oriented, port-based 3.Broad Range of (Open Source) Libraries –Addresses need for domain models in SysML 4.Access to Free, Open Source Solvers 14
15
Overview Modelica overview What is Modelica? What makes Modelica so appealing? The Modelica Standard Library The OpenModelica Project SysML – Modelica Synergy SysML – Modelica Correspondence Steps Forward Summary Additional References 15
16
SysML – Modelica Correspondence: Model Definitions Modelica Class –Has restricted classes: package, record, function,… –"connector" is crucial Connection –For energy-flow, the connections have the semantics of Kirchhoff's laws Equations and Algorithms –Initial equations and algorithms SysML Block or Constraint Block –Modelica connectors could map to flow ports, or a stereotyped constraint property Stereotyped connector or stereotyped binding connector No formal equivalent textual constraint 16
17
SysML – Modelica Correspondence: Model Usage Modelica Component clauses –discrete, constant, parameter indicates time variance –input, output, flow Arrays Modifiers –Change default values –Redeclare type –Arbitrarily deep in hierarchy Visualization annotations SysML Properties (usages) –No equivalents new stereotypes? Multiplicities –Not sufficiently expressive Property-specific types –Somewhat vaguely defined –Not (well) supported by tools Fixed visualization 17 NOTE: this is just an illustration – much work remains
18
Initial Work towards Integration ModelicaML UML profile –Pop, A., and Akhvlediani, D., and Fritzson, P. (2007). "Towards Unified Systems Modeling with the ModelicaML UML Profile." International Workshop on Equation-Based Object-Oriented Languages and Tools. Berlin, Germany, Linköping University Electronic Press. SysML-Modelica profile and mapping –Johnson, T. A., C. J. J. Paredis and R. M. Burkhart (2008). "Integrating Models and Simulations of Continuous Dynamics into SysML." 6th International Modelica Conference, Bielefeld, Germany, March 3-4, Modelica Association, 135-145. –Tool prototype Automated mapping from SysML (MagicDraw) to Modelica Model transformation with MOFLON Model simulation with Dymola 18
19
19 Example: Hydraulic Circuit Diagram Pressure-Compensated, Load-Sensing Excavator—ISO 1219 notation
20
20 SysML Schematic (ibd) — Basic View Pressure-Compensated, Load-Sensing Excavator
21
21 Hydraulics Subsystem Simulation Model bdd
22
22 Excavator Case Study Corresponding Modelica Models Multi-Body System Dynamics Model (linkages,...) Hydraulics Model hydraulics world x y Dig Cycle environment p_amb=101325 T_amb=288.15
23
23 Simulation in Dymola Modelica Lexical Representation (auto-generated from SysML) SimulationResults [Johnson, 2008 - Masters Thesis]
24
How to Move Forward from Here? Further develop and refine SysML-Modelica profile and mapping In parallel with other SysML 2.0 efforts Provide input to future SysML 2.0 submissions Team members: Roger Burkhart, Sandy Friedenthal, Peter Fritzson, Chris Paredis, Russell Peak, … 24
25
Summary Modelica = state-of-the-art modeling language for system dynamics Strong SysML-Modelica synergy –Complements Parametrics –Is (more or less) Compatible with SysML –Broad range of libraries –Access to Free Solvers Good high-level correspondence, but some (minor) differences Team: extensive experience in both Modelica and SysML 25
26
Additional References Modelica Specification: http://www.modelica.org/documents/ModelicaSpec30.pdf Fritzson, P. (2004). Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. New York, NY, Wiley- IEEE Press. öAkhvlediani, D. (2006). Design and implementation of a 'UML profile for Modelica'/SysML. M.S. Thesis. Linköping University. LITH-IDA-EX--06/061—SE. Johnson, T. A. (2008). Integrating Models and Simulations of Continuous Dynamic System Behavior into SysML. M.S. Thesis. G.W. Woodruff School of Mechanical Engineering, Georgia Institute of Technology. Atlanta, GA. Peak, R., McGinnis, L., Paredis, C. Integrating System Design with Simulation and Analysis Using SysML – Phase 1 Final Report, (available from russell.peak@gatech.edu) 26
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.