liu.seSearch for publications in DiVA
Change search
Link to record
Permanent link

Direct link
Publications (9 of 9) Show all publications
Tinnerholm, J. (2025). Dynamic and Variable-Structure System Modeling for Equation-Based Languages: Applications, Methods and Tools. (Doctoral dissertation). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>Dynamic and Variable-Structure System Modeling for Equation-Based Languages: Applications, Methods and Tools
2025 (English)Doctoral thesis, monograph (Other academic)
Abstract [en]

Modeling and simulation are used to solve real-world problems safely and efficiently. For example, we can conduct simulations and analyze the results by constructing digital models of cyber-physical systems to make informed decisions. The field of Modeling and Simulation has recently grown and is tackling systems with increased complexity and size. Hence, modeling and simulating cyber-physical systems are becoming increasingly complex, requiring traditional modeling languages and tools to adapt. Modelica is an open-standard declarative equation-based object-oriented language used to model various systems. Existing tools allow modelers to model and simulate large, complex systems. However, the language and existing tooling cannot express some concepts, such as radical structural changes to the components or the behavior of systems during simulation. We propose several language extensions to support modeling variable-structure systems (VSS), that is, systems in which the system’s structure may radically change during simulation. To achieve these goals, we have developed a new modeling framework that supports the language itself alongside several extensions. The proposed extensions can handle explicit and implicit modeling of VSS by new operators and, consequently, new semantics for the language. Furthermore, we introduce and investigate additional features in terms of operators and semantics to aid VSS modeling and simulation.

One such extension is dynamic-overconstrained connectors (DOCC), which are helpful, for instance, when modeling AC transmission systems, particularly large ones. In the thesis we provide a technique to better handle such models by relaxing existing modeling constraints. Another extension is the inclusion of a experimental operator for inline integration and investigating the practical benefits of its introduction. The environment has been used to develop a new language that merges aspects of Context-Oriented Programming and declarative equation-based modeling, utilizing the introduced primitives. Furthermore, we have also validated the framework by using it to simulate relvant and recent climate models.

Explicit VSS modeling is based on extensions, which provide the possibility of switching configuration at runtime between model definitions resolved at compile time. 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 to existing state-of-the-art tooling on models with over 100,000 equations.

The results show that the extensions, framework and methods are viable for simulating both regular models and models with structural variability. We demonstrate that the Modelica language can be extended to support systems with variable structures by providing additional operators and enhanced runtime system support.

Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2025. p. 288
Series
Linköping Studies in Science and Technology. Dissertations, ISSN 0345-7524 ; 2491
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-219400 (URN)10.3384/9789181183375 (DOI)9789181183368 (ISBN)9789181183375 (ISBN)
Public defence
2025-12-10, Ada Lovelace, B-building, Campus Valla, Linköping, 13:15 (English)
Opponent
Supervisors
Note

Funding Agencies: The research presented in this thesis has been supported by Vinnova in the European ITEA3 research project OpenCPS, the ITEA3 EMPHYSIS Project, the EMISYS project, the ITEA3 EMBrACE project, and the ITEA4 OpenScaling Project. Support has also been recvieved from the European Union HUBCAP Project. Furthermore, support has been received from the Swedish Government in the ELLIIT Cloud Tooling for CPS Project. Support has also been received from Stiftelsen för Strategisk forskning in the LARGEDYN Project. The Open Source Modelica Consortium supports the continuous development of the OpenModelica framework and we are grateful for their support.

Available from: 2025-11-12 Created: 2025-11-12 Last updated: 2025-11-17Bibliographically approved
Birath, B., Ernstsson, A., Tinnerholm, J. & Kessler, C. (2024). High-Level Programming of FPGA-Accelerated Systems with Parallel Patterns. International journal of parallel programming, 52, 253-273
Open this publication in new window or tab >>High-Level Programming of FPGA-Accelerated Systems with Parallel Patterns
2024 (English)In: International journal of parallel programming, ISSN 0885-7458, E-ISSN 1573-7640, Vol. 52, p. 253-273Article in journal (Refereed) Published
Abstract [en]

As a result of frequency and power limitations, multi-core processors and accelerators are becoming more and more prevalent in today's systems. To fully utilize such systems, heterogeneous parallel programming is needed, but this introduces new complexities to the development. High-level frameworks such as SkePU have been introduced to help alleviate these complexities. SkePU is a skeleton programming framework based on a set of programming constructs implementing computational parallel patterns, while presenting a sequential interface to the programmer. Using the various skeleton backends, SkePU programs can execute, without source code modification, on multiple types of hardware such as CPUs, GPUs, and clusters. This paper presents the design and implementation of a new backend for SkePU, adding support for FPGAs. We also evaluate the effect of FPGA-specific optimizations in the new backend and compare it with the existing GPU backend, where the actual devices used are of similar vintage and price point. For simple examples, we find that the FPGA-backend's performance is similar to that of the existing backend for GPUs, while it falls behind in more complex tasks. Finally, some shortcomings in the backend are highlighted and discussed, along with potential solutions.

Place, publisher, year, edition, pages
SPRINGER/PLENUM PUBLISHERS, 2024
Keywords
Algorithmic skeletons; Reconfigurable computing; FPGA; Single-source heterogeneous programming
National Category
Other Electrical Engineering, Electronic Engineering, Information Engineering
Identifiers
urn:nbn:se:liu:diva-204318 (URN)10.1007/s10766-024-00770-3 (DOI)001232114600001 ()2-s2.0-85194550594 (Scopus ID)
Note

Funding Agencies|Linkping University; ELLIIT; Swedish National Graduate School in Computer Science (CUGS); NSC

Available from: 2024-06-11 Created: 2024-06-11 Last updated: 2025-01-14Bibliographically approved
Tinnerholm, J. (2022). A Composable and Extensible Environment for Equation-based Modeling and Simulation of Variable Structured Systems in Modelica. (Licentiate dissertation). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>A Composable and Extensible Environment for Equation-based Modeling and Simulation of Variable Structured Systems in Modelica
2022 (English)Licentiate thesis, monograph (Other academic)
Abstract [en]

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.

Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2022. p. 107
Series
Linköping Studies in Science and Technology. Licentiate Thesis, ISSN 0280-7971 ; 1937
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-185460 (URN)10.3384/9789179293680 (DOI)9789179293673 (ISBN)9789179293680 (ISBN)
Presentation
2022-06-10, Alan Turing, E-building, Campus Valla, Linköping, 13:15 (English)
Opponent
Supervisors
Note

Funding agencies: This work has been supported by the Swedish Government in the ELLIIT project andby Vinnova in the ITEA3 EMBRACE project. Support has also been received from the Swedish Strategic Research foundation (SSF) in the LargeDyn project. The development of OpenModelica is supported by the Open Source Modelica Consortium.

ISBN has been corrected in the PDF-version. 2022-06-03

Available from: 2022-06-03 Created: 2022-05-31 Last updated: 2022-06-21Bibliographically approved
Tinnerholm, J., Pop, A. & Sjölund, M. (2022). A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability. Electronics, 11(11), Article ID 1772.
Open this publication in new window or tab >>A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
2022 (English)In: Electronics, E-ISSN 2079-9292, Vol. 11, no 11, article id 1772Article in journal (Refereed) Published
Abstract [en]

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. 

Place, publisher, year, edition, pages
Basel, Switzerland: MDPI, 2022
Keywords
modeling and simulation; Modelica; Julia; multi-mode; variable structure systems; JIT
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-185557 (URN)10.3390/electronics11111772 (DOI)000808792600001 ()
Funder
Swedish Foundation for Strategic Research, LargedynVinnova, ITEA EMBRACEELLIIT - The Linköping‐Lund Initiative on IT and Mobile Communications
Note

Funding: Swedish Government via the ELLIIT project; Vinnova via the ITEA3 EMBRACE project; Swedish Strategic Research foundation (SSF)

Available from: 2022-06-07 Created: 2022-06-07 Last updated: 2022-08-01Bibliographically approved
Tinnerholm, J., Casella, F. & Pop, A. (2022). Towards Modeling and Simulation of Dynamic Overconstrained Connectors in Modelica. In: Prof. Tielong Shen, Dr. Rui Gao and Dr. Yutaka Hirano (Ed.), Proceedings of Asian Modelica Conference 2022, Tokyo, Japan, November 24-25, 2022: . Paper presented at Asian Modelica Conference 2022, Tokyo, Japan, November 24-25, 2022 (pp. 35-44). Linköping University Electronic Press
Open this publication in new window or tab >>Towards Modeling and Simulation of Dynamic Overconstrained Connectors in Modelica
2022 (English)In: Proceedings of Asian Modelica Conference 2022, Tokyo, Japan, November 24-25, 2022 / [ed] Prof. Tielong Shen, Dr. Rui Gao and Dr. Yutaka Hirano, Linköping University Electronic Press, 2022, p. 35-44Conference paper, Published paper (Refereed)
Abstract [en]

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.

Place, publisher, year, edition, pages
Linköping University Electronic Press, 2022
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 193
Keywords
dynamic overconstrained connection graph, runtime reconfiguration
National Category
Computer Sciences Energy Engineering
Identifiers
urn:nbn:se:liu:diva-191791 (URN)10.3384/ecp19335 (DOI)9789179295783 (ISBN)
Conference
Asian Modelica Conference 2022, Tokyo, Japan, November 24-25, 2022
Available from: 2023-02-15 Created: 2023-02-15 Last updated: 2023-02-23Bibliographically approved
Tinnerholm, J., Pop, A., Andreas, H. & Sjölund, M. (2021). OpenModelica.jl: A modular and extensible Modelica compiler framework in Julia targeting ModelingToolkit.jl. In: Martin Sjölund, Lena Buffoni, Adrian Pop and Lennart Ochel (Ed.), Proceedings of the 14th International Modelica Conference: . Paper presented at 14th International Modelica Conference, Linköping, Sweden, September 20-24, 2021 (pp. 109-117). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>OpenModelica.jl: A modular and extensible Modelica compiler framework in Julia targeting ModelingToolkit.jl
2021 (English)In: Proceedings of the 14th International Modelica Conference / [ed] Martin Sjölund, Lena Buffoni, Adrian Pop and Lennart Ochel, Linköping: Linköping University Electronic Press , 2021, p. 109-117Conference paper, Published paper (Refereed)
Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2021
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 181
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-180429 (URN)10.3384/ecp21181109 (DOI)
Conference
14th International Modelica Conference, Linköping, Sweden, September 20-24, 2021
Available from: 2021-10-19 Created: 2021-10-19 Last updated: 2021-10-26Bibliographically approved
Fritzson, P., Pop, A., Abdelhak, K., Asghar, A., Bachmann, B., Braun, W., . . . Östlund, P. (2020). The OpenModelica Integrated Environment for Modeling, Simulation, and Model-Based Development. Modeling, Identification and Control, 41(4), 241-295
Open this publication in new window or tab >>The OpenModelica Integrated Environment for Modeling, Simulation, and Model-Based Development
Show others...
2020 (English)In: Modeling, Identification and Control, ISSN 0332-7353, E-ISSN 1890-1328, Vol. 41, no 4, p. 241-295Article in journal (Refereed) Published
Abstract [en]

OpenModelica is a unique large-scale integrated open-source Modelica- and FMI-based modeling, simulation, optimization, model-based analysis and development environment. Moreover, the OpenModelica environment provides a number of facilities such as debugging; optimization; visualization and 3D animation; web-based model editing and simulation; scripting from Modelica, Python, Julia, and Matlab; efficient simulation and co-simulation of FMI-based models; compilation for embedded systems; Modelica-UML integration; requirement verification; and generation of parallel code for multi-core architectures. The environment is based on the equation-based object-oriented Modelica language and currently uses the MetaModelica extended version of Modelica for its model compiler implementation. This overview paper gives an up-to-date description of the capabilities of the system, short overviews of used open source symbolic and numeric algorithms with pointers to published literature, tool integration aspects, some lessons learned, and the main vision behind its development.

Place, publisher, year, edition, pages
Kristiansand, Norway: Norsk Forening for Automatisering, 2020
Keywords
Modelica, OpenModelica, MetaModelica, FMI, modeling, simulation, optimization, development, environment, numeric, symbolic, compilation, embedded system, real-time
National Category
Computer Engineering Computer Sciences Software Engineering
Identifiers
urn:nbn:se:liu:diva-172069 (URN)10.4173/mic.2020.4.1 (DOI)000605964400001 ()2-s2.0-85097216447 (Scopus ID)
Funder
VinnovaSwedish Foundation for Strategic ResearchELLIIT - The Linköping‐Lund Initiative on IT and Mobile Communications
Note

Funding agencies: Vinnova in the ITEA OPENPROD projectVinnova; Vinnova in the ITEA MODRIO projectVinnova; Vinnova in the ITEA OPENCPS projectVinnova; Vinnova in the ITEA EMPHYSIS projectVinnova; Vinnova in the ITEA EMBRACE projectVinnova; Vinnova RTISIM projectVinnova; Vin

Available from: 2020-12-19 Created: 2020-12-19 Last updated: 2022-06-23Bibliographically approved
Tinnerholm, J., Pop, A., Sjölund, M., Heuermann, A. & Abdelhak, K. (2020). Towards an Open-Source Modelica Compiler in Julia. In: Dr. Rui Gao and Dr. Yutaka Hirano (Ed.), Proceedings of Asian Modelica Conference 2020, Tokyo, Japan, October 08-09, 2020: . Paper presented at Asian Modelica Conference 2020, Tokyo, Japan, October 08-09, 2020 (pp. 143-151). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>Towards an Open-Source Modelica Compiler in Julia
Show others...
2020 (English)In: Proceedings of Asian Modelica Conference 2020, Tokyo, Japan, October 08-09, 2020 / [ed] Dr. Rui Gao and Dr. Yutaka Hirano, Linköping: Linköping University Electronic Press, 2020, p. 143-151Conference paper, Published paper (Refereed)
Abstract [en]

Recently the Julia language has become an option for scientific computing. As of 2020, efforts exist to provide libraries that emulate the equation-based modeling features provided by Modelica or otherwise provide such functionality in Julia. The issue with these approaches is that investment in standardization and libraries would be lost unless standard-complacency is guaranteed. We believe that it is possible to combine features from both by implementing such a compiler in Julia. We argue that this approach would open additional opportunities. One such being the handling of variable structure systems (VSS) within the framework of a Modelica standard-compliant compiler. The other being a proposed compiler architecture reminiscent of LLVM for equation-based object-oriented languages. Using the OpenModelica Compiler as a baseline, we verified the fidelity of our implementation by simulating a selected set of models. While there are performance penalties, we argue that improvements to the frontend would mitigate these issues.

Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2020
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 174:17
Keywords
Modelica, OpenModelica, Compilers, Applied computing, Julia, Variable Structure Systems
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-185436 (URN)10.3384/ecp2020174143 (DOI)978-91-7929-775-6 (ISBN)
Conference
Asian Modelica Conference 2020, Tokyo, Japan, October 08-09, 2020
Available from: 2022-05-30 Created: 2022-05-30 Last updated: 2022-05-30
Tinnerholm, J., Sjölund, M. & Pop, A. (2019). Towards introducing just-in-time compilation in a Modelica compiler. In: Association for Computing Machinery (Ed.), EOOLT '19: Proceedings of the 9th International Workshop on Equation-based Object-oriented Modeling Languages and Tools: . Paper presented at EOOLT '19: 9th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Berlin, Germany, November 5, 2019 (pp. 11-19). New York, NY, United States: ACM Press
Open this publication in new window or tab >>Towards introducing just-in-time compilation in a Modelica compiler
2019 (English)In: EOOLT '19: Proceedings of the 9th International Workshop on Equation-based Object-oriented Modeling Languages and Tools / [ed] Association for Computing Machinery, New York, NY, United States: ACM Press, 2019, p. 11-19Conference paper, Published paper (Refereed)
Abstract [en]

We are investigating ways of introducing just-in-time compilation in a standard-compliant Modelica compiler, the Open-Modelica compiler (OMC). The main motivations are enabling extensions to support dynamically varying model structure, faster compilation, and faster recompilation of models after changes. We are investigating two approaches.

The first approach is to adapt the low-level OpenModelica intermediate representation (IR) before code generation to be compatible with LLVM. In that way we can avoid generating intermediate C-code and instead generate LLVM IR in memory for just-in-time compilation (JIT).

The second approach is to translate OMC itself written in MetaModelica to Julia, and thereby gain access to the JIT capabilities of LLVM. Another benefit of the second approach is the access to the Julia ecosystem, including a rich set of libraries for numerical computing.

We have done a preliminary investigation of both approaches, with measurements on a selected sample of algorithms, and discovered that compilation-time of generated Julia code is slower compared to generating LLVM IR directly. We conclude that providing a standard-compliant Modelica compiler which supports a dynamically varying model structure is feasible and possible, and we believe that such a compiler can be provided by using Julia or MetaModelica.

Place, publisher, year, edition, pages
New York, NY, United States: ACM Press, 2019
Series
International Workshop on Equation-based Object-oriented Modeling Languages and Tools
Keywords
OpenModelica, Modelica, LLVM, Julia, MetaModelica
National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:liu:diva-169770 (URN)10.1145/3365984.3365990 (DOI)9781450377133 (ISBN)
Conference
EOOLT '19: 9th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Berlin, Germany, November 5, 2019
Funder
Swedish Foundation for Strategic Research
Available from: 2020-09-18 Created: 2020-09-18 Last updated: 2021-08-18Bibliographically approved
Organisations
Identifiers
ORCID iD: ORCID iD iconorcid.org/0000-0002-7400-4325

Search in DiVA

Show all publications