1. |
- Tinnerholm, John, 1992-
(author)
-
A Composable and Extensible Environment for Equation-based Modeling and Simulation of Variable Structured Systems in Modelica
- 2022
-
Licentiate thesis (other academic/artistic)abstract
- Modeling and Simulation are usually used to solve real-world problems safely and efficiently by constructing digital models of Cyber-Physical Systems. The models can be simulated and analyzed with respect to requirements, and decisions about their design can be based on this analysis. In the latest years, the field of Modeling and Simulation has grown massively and is tackling systems with increased complexity. Thus, the process of modeling and simulating Cyber-Physical systems is becoming more and more complex. This increase requires modeling languages that can express systems with increasing complexity.Modelica is an open-standard declarative equation-based object-oriented language used to model various systems expressed using equations. Modelica tools can read the models, process them, and simulate them. However, the Modelica language and tools cannot express some concepts such as structural changes to the components or behavior of Cyber-Physical Systems during Simulation.In this thesis, we propose extensions of the Modelica language to support modeling so-called variable structure systems, that is, systems where the structure of the system varies during Simulation. The full Modelica language and the new extensions are supported by a novel composable programming environment framework called OpenModelica.jl written in the Julia language. The proposed Modelica language extensions can handle explicit and implicit modeling of variable structure systems by introducing new operators and, consequently, new semantics to the Modelica language.The explicit modeling is based on extensions that switch at runtime between continuous modes of operations with operators similar to the ones used in the specification of Modelica state-machines. The implicit modeling supports reconfiguration during runtime via recompilation. A Just-in-time compiler was implemented to handle the new semantics using the symbolic-numeric programming language Julia.We investigate the performance of our new framework and compare it with existing state-of-the-art Modelica tools on models with thousands of equations and variables. The results show that our extensions and proposed runtime framework is viable for simulating both usual Modelica models and models with variable structure systems.The conclusion is that the Modelica language can be extended further to support systems with variable structures with the addition of a few operators and JIT enhanced runtime system support. Based on the result of this thesis, we propose several directions for future work.
|
|
2. |
- Tinnerholm, John, 1992-, et al.
(author)
-
A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
- 2022
-
In: Electronics. - Basel, Switzerland : MDPI. - 2079-9292. ; 11:11
-
Journal article (peer-reviewed)abstract
- Nowadays, industrial products are getting increasingly complex, and time-to-market is significantly shorter. Modeling and simulation tools for cyber-physical systems need to keep up with the increased complexity. This paper presents OpenModelica.jl, a modular and extensible Modelica compiler framework in Julia targeting ModelingToolkit.jl and supporting Variable Structured Systems. We extended the Modelica language with three new operators to support continuous-time mode-switching and reconfiguration via recompilation at runtime. Therefore, our compiler supports the Modelica language and variable structure systems via the aforementioned extensions. To our knowledge, there are no other Modelica tools available that support both standard Modelica and variable structure systems. We evaluated our framework using a standardized benchmark suite, in terms of simulation, compilation and recompilation performance. The results concerning compilation and simulation time performance were compared with the results of running the existing OpenModelica compiler with the same set of models. A custom benchmark was devised to estimate the cost in terms of recompilation when simulating variable structure systems. The performance experiments showed that OpenModelica.jl is currently about four times slower in terms of compilation time when compiling a transmission line model with tens of thousands of equations and variables. The difference in simulation performance between the two compilers was negligable. Furthermore, the impact of recompilation during the simulation was usually small compared with the simulation time for long simulations. The results are promising for a prototype, and we outline approaches to further improve both compilation and simulation performance as future research.
|
|
3. |
- Tinnerholm, John, 1992-, et al.
(author)
-
Towards Modeling and Simulation of Dynamic Overconstrained Connectors in Modelica
- 2022
-
In: Proceedings of Asian Modelica Conference 2022, Tokyo, Japan, November 24-25, 2022. - : Linköping University Electronic Press. - 9789179295783 ; , s. 35-44
-
Conference paper (peer-reviewed)abstract
- Cyber-Physical Systems are ever-increasing in complexity and new methods and tools for developing them are needed. To support these highly dynamic systems, increasing the flexibility of the modeling languages is desirable. This paper proposes and examines a Modelica language extension to support dynamic overconstrained graphs with reconfiguration at runtime. Two applications of this new feature are also discussed: synchronous AC power systems and incompressible fluid networks. Reported findings suggest that supporting dynamic overconstrained graphs might yield performance benefits and provide the possibility of simulating systems that can not currently be simulated in existing Modelica tools.
|
|