Multi-Domain Modeling and Simulation Have Been Eliminated and All Derivatives Are Language Is Accompanied with the Model- Explicitly Solved For
Total Page:16
File Type:pdf, Size:1020Kb
M Keywords Multi-domain Modeling and Block diagram Differential-algebraic Simulation equation (DAE) system Flow variable Functional Mockup Interface (FMI) Inverse Martin Otter models Modelica Modia Institute of System Dynamics and Control, Object-oriented modeling Potential German Aerospace Center (DLR), Wessling, variable Stream variable Symbolic Germany transformation VHDL-AMS Abstract Introduction One starting point for the analysis and design of a control system is the block diagram Methods and tools for control system analysis representation of a plant. Since it is nontrivial and design usually require an input–output block to convert a physical model of a plant into diagram description of the plant to be controlled. a block diagram, this can be performed Apart from small systems, it is nontrivial to manually only for small plant models. Based derive such models from first principles of on research from the last 40 years, more and physics. Since a long time, methods and tools are more mature tools are available to achieve this available to construct such models automatically transformation fully automatically. As a result, for one domain, for example, a mechanical multi-domain plants, for example, systems model, an electronic, or a hydraulic circuit. These with electrical, mechanical, thermal, and fluid domain-specific methods and tools are, however, parts, can be modeled in a unified way and only of limited use for the modeling of multi- can be used directly as input–output blocks domain systems. for control system design. An overview of the In the dissertation (Elmqvist 1978), a suitable basic principles of this approach is given, and approach for multi-domain, object-oriented it is shown how to utilize nonlinear, multi- modeling has been developed by introducing a domain plant models directly in a controller. modeling language to define models on a high Finally, the low-level “Functional Mockup level based on first principles. The resulting Interface” standard is sketched to exchange differential-algebraic equation (DAE) systems multi-domain models between many different are automatically transformed with proper algo- modeling and simulation environments. rithms in a block diagram description with input and output signals based on ordinary differential equations (ODEs), where the algebraic variables © Springer-Verlag London Ltd., part of Springer Nature 2019 J. Baillieul, T. Samad (eds.), Encyclopedia of Systems and Control, https://doi.org/10.1007/978-1-4471-5102-9 140-2 2 Multi-domain Modeling and Simulation have been eliminated and all derivatives are language is accompanied with the Model- explicitly solved for. ica Standard Library (https://github.com/ In 1978, computers were not powerful enough modelica/ModelicaStandardLibrary)–an to apply this method on systems with more as open-source Modelica library with about 1600 a few hundred equations. In the 1990s the tech- model components and 1350 functions from nology has been substantially improved, many many domains. There are several free and different modeling languages appeared (and also commercial software tools supporting the disappeared), and object-oriented modeling was Modelica language and the Modelica Standard introduced in commercial simulation environ- Library. ments. •TheVHDL-AMS language is a standard from In Table 1, an overview of the most important IEEE (IEEE 1076.1-2017 2017), first released standards, languages, and tools in the year 2019 in 1999. It is an extension of the widely used for multi-domain modeling is given: VHDL hardware description language. This language is especially used in the electronics •TheModelica language is a standard from community. the Modelica Association (2017). The • There are several (proprietary) vendor-specific first version was released in 1997. The modeling languages, notably EcosimPro and Multi-domain Modeling r Environments supporting the Modelica Language Standard (https://www.modelica. and Simulation, Table 1 org/) Multi-domain modeling r and simulation Altair Activate https://solidthinking.com/product/activate environments ANSYSr Twin Builder https://www.ansys.com/products/systems Dymolar https://www.dymola.com/ JModelica.org https://jmodelica.org/ MapleSim https://www.maplesoft.com/products/ maplesim/ MWorks http://en.tongyuan.cc/ OpenModelica https://www.openmodelica.org/ OPTIMICAr Compiler Toolkit https://www.modelon.com/ Simcenterr Amesim https://www.plm.automation.siemens.com SimulationXr https://www.simulationx.com/ Wolfram SystemModeler https://www.wolfram.com/system- modeler/ Environments supporting the VHDL-AMS Standard (https://standards.ieee.org) AMS Designer https://www.cadence.com/ ANSYSr Twin Builder, Simplorerr https://www.ansys.com/products/systems Saber https://www.synopsys.com SMASHr https://www.dolphin-integration.com SystemVisionr https://www.mentor.com/products/sm/ Environments supporting vendor-specific multi-domain modeling languages EcosimPror https://www.ecosimpro.com/ gPROMS https://www.psenterprise.com/products/ gproms Simscape https://www.mathworks.com/products/ simscape 20-sim https://www.20sim.com/ Open-source environments supporting other multi-domain modeling languages Modia https://github.com/ModiaSim Multi-domain Modeling and Simulation 3 gRPOMS for modeling of thermodynamic In section “Modeling Language Principles”, the processes, Simscape from MathWorks as an principles of multi-domain modeling based on extension to Simulinkr, MAST the underlying a modeling language are summarized. In sec- modeling language of Saber (Mantooth and tion “Models for Control Systems”, it is shown Vlach 1992), and the language of 20-sim, how such models can be used not only for sim- which supports bond graphs (Karnopp et al. ulation but also as components in nonlinear con- 2012). Bond graphs are a special graphical trol systems. Finally, in section “The Functional notation to define multi-domain systems based Mockup Interface”, an overview about a low- on energy flows. It was invented in 1959 by level standard for the exchange of multi-domain Henry M. Paynter. systems is described. • Modia and its supporting packages form an open-source prototyping platform based on the Julia programming language (Bezanson Modeling Language Principles et al. 2017). Modia is the name of a Julia package that supports a modeling language Schematics: The Graphical View called “Modia language” as a domain-specific Modelers nowadays require a simple to use extension of Julia and provides algorithms graphical environment to build up models. With to symbolically transform Modia models into very few exceptions, multi-domain environments DAE systems that can be numerically solved define models by schematic diagrams. A typical by standard DAE integrators. The Modia lan- example is given in Fig. 1, showing a simple guage and the new algorithms used in the direct current electrical motor in Modelica. M Modia package are intended as inspiration In the lower left part, the electrical circuit for the development of the next Modelica diagram of the DC motor is visible, consisting generation. mainly of the armature resistance and inductance fixedTemp thermalCond convection degЊC C G=G Gc T=20 const heatCapacitor R=13.8 inductor k=20 resistor L=0.061 gear signalVoltage + k=1.016 motorInertia loadInertia − emf ratio=105 iSensor J=0.00025 J=100 A ground Multi-domain Modeling and Simulation, Fig. 1 Modelica schematic of DC motor with mechanical load and heat losses 4 Multi-domain Modeling and Simulation of the motor, a voltage source, and component consequence, the balance equations and bound- “emf” to model in an idealized way the electro- ary conditions are fulfilled in the overall model motoric forces in the air gap. On the lower right containing all components and all connections. part, the motor inertia, a gear box, and a load In order that a tool can automatically construct inertia are present. In the upper part, the heat the equations at a connection point, every port transfer of the resistor losses to the environment variable needs to be associated to a port variable is modeled with lumped elements. type. In Table 2, some port variable types of A component, like a resistor, rotational inertia, Modelica are shown. Hereby it is assumed that or convective heat transfer, is shown as an icon in u1; u2;:::;un;y;v1;v2;:::;vn;f1;f2;:::, fn, the diagram. On the border of a component, small s1, s2;:::;sn are corresponding port variables rectangular or circular signs are present repre- from different components that are connected senting the “physical ports.” Ports are connected together at the same point P. by lines and model the (idealized) physical or sig- Port variable types “input” and “output” define nal interaction between ports of different compo- the usual signal connections in block diagrams. nents, for example, the flow of electrical current “Potential variables” and “flow variables” are or heat or the rigid mechanical coupling. Com- used to define standard physical connections. For ponents are built up hierarchically from other example, an electrical port contains the electrical components. On the lowest level, components are potential and the electrical current at the port, described textually with the respective modeling and when connecting electrical ports together, the language (see section “Component Equations”). electrical potentials are identical, and the sum of the electrical currents is zero; see Table 2. These Coupling Components by Ports equations correspond exactly to Kirchhoff’s volt- The ports define how a component