Logo

The 14th International Modelica Conference
Linköping, September 20-24, 2021

[Practical Information] [Tutorials and Vendor Sessions] [Proceedings] [Modelica Libraries] [FMI User Meeting] [Archives] [Journal Special Issue (open for submissions until 2022-07-31)]

Session 1B - Julia

Title: Modia - Equation Based Modeling and Domain Specific Algorithms
Authors: Hilding Elmqvist, Martin Otter, Andrea Neumayr and Gerhard Hippmann
Abstract: A new design of the Modia experimental modeling language based on Julia is presented. It has simple yet powerful syntax and semantics. A unified means of describing the fundamental semantics, which is similar to Modelica, is outlined. Furthermore, it is shown how domain specific algorithms can be combined with equation based modeling. It is demonstrated for multibody systems and will enable more efficient translation and simulation since much repetitive analysis and transformations are avoided. The drive train of a robot model was automatically translated from Modelica to Modia. Modern simulation algorithms from the Julia community allow working with automatic differentiation and uncertainties.
Keywords: Modelica, Julia, Modia, Uncertainties, Multibody
Paper: full paper Creative Commons License
Bibtex:
@InProceedings{modelica.org:Elmqvist:2021,
  title = "{Modia - Equation Based Modeling and Domain Specific Algorithms}",
  author = {Hilding Elmqvist and Martin Otter and Andrea Neumayr and Gerhard Hippmann},
  pages = {73--86},
  doi = {10.3384/ecp2118173},
  booktitle = {Proceedings of the 14th International Modelica Conference},
  location = {Link\"oping, Sweden},
  editor = {Martin Sj\"olund and Lena Buffoni and Adrian Pop and Lennart Ochel},
  isbn = {978-91-7929-027-6},
  issn = {1650-3740},
  month = sep,
  series = {Link\"oping Electronic Conference Proceedings},
  number = {181},
  publisher = {Modelica Association and Link\"oping University Electronic Press},
  year = {2021}
}


Title: Modia and Julia for Grey Box Modeling
Authors: Frederic Bruder and Lars Mikelsons
Abstract: During the process of modelling an existing dynamic physical system, it may be hard to capture some of the phenomena exactly on the basis of only textbook-equations. With measurement data from the real system, approximators like artificial neural networks can help improve the models. However, simulation and machine learning are usually done in different software applications. A unified environment for modeling, simulation and optimization would be highly valuable. We here present a framework within the Julia programming language that encompasses tools for acausal modeling, automatic differentiation rsp. sensitivity analysis involving solvers for differential equations. We use it to build and evaluate an easily interpretable model based on both physics and data.
Keywords: Grey Box Modeling, Hybrid Modeling, Scientific Machine Learning, Modia, Julia
Paper: full paper Creative Commons License
Bibtex:
@InProceedings{modelica.org:Bruder:2021,
  title = "{Modia and Julia for Grey Box Modeling}",
  author = {Frederic Bruder and Lars Mikelsons},
  pages = {87--95},
  doi = {10.3384/ecp2118187},
  booktitle = {Proceedings of the 14th International Modelica Conference},
  location = {Link\"oping, Sweden},
  editor = {Martin Sj\"olund and Lena Buffoni and Adrian Pop and Lennart Ochel},
  isbn = {978-91-7929-027-6},
  issn = {1650-3740},
  month = sep,
  series = {Link\"oping Electronic Conference Proceedings},
  number = {181},
  publisher = {Modelica Association and Link\"oping University Electronic Press},
  year = {2021}
}


Title: Composing Modeling and Simulation with Machine Learning in Julia
Authors: Chris Rackauckas, Ranjan Anantharaman, Alan Edelman, Shashi Gowda, Maja Gwozdz, Anand Jain, Chris Laughman, Yingbo Ma, Francesco Martinuzzi, Avik Pal, Utkarsh Rajput, Elliot Saba and Viral Shah
Abstract: In this paper we introduce JuliaSim, a high-performance programming environment designed to blend traditional modeling and simulation with machine learning. JuliaSim can build accelerated surrogates from component-based models, such as those conforming to the FMI standard, using continuous-time echo state networks (CTESN). The foundation of this environment, ModelingToolkit.jl, is an acausal modeling language which can compose the trained surrogates as components within its staged compilation process. As a complementary factor we present the JuliaSim model library, a standard library with differential-algebraic equations and pre-trained surrogates, which can be composed using the modeling system for design, optimization, and control. We demonstrate the effectiveness of the surrogate-accelerated modeling and simulation approach on HVAC dynamics by showing that the CTESN surrogates accurately capture the dynamics of a HVAC cycle at less than 4\% error while accelerating its simulation by 340x. We illustrate the use of surrogate acceleration in the design process via global optimization of simulation parameters using the embedded surrogate, yielding a speedup of two orders of magnitude to find the optimum. We showcase the surrogate deployed in a co-simulation loop, as a drop-in replacement for one of the coupled FMUs, allowing engineers to effectively explore the design space of a coupled system. Together this demonstrates a workflow for automating the integration of machine learning techniques into traditional modeling and simulation processes.
Keywords: Julia, machine learning, surrogate modeling, acceleration, co-simulation, Functional Mock-up Interface
Paper: full paper Creative Commons License
Bibtex:
@InProceedings{modelica.org:Rackauckas:2021,
  title = "{Composing Modeling and Simulation with Machine Learning in Julia}",
  author = {Chris Rackauckas and Ranjan Anantharaman and Alan Edelman and Shashi Gowda and Maja Gwozdz and Anand Jain and Chris Laughman and Yingbo Ma and Francesco Martinuzzi and Avik Pal and Utkarsh Rajput and Elliot Saba and Viral Shah},
  pages = {97--107},
  doi = {10.3384/ecp2118197},
  booktitle = {Proceedings of the 14th International Modelica Conference},
  location = {Link\"oping, Sweden},
  editor = {Martin Sj\"olund and Lena Buffoni and Adrian Pop and Lennart Ochel},
  isbn = {978-91-7929-027-6},
  issn = {1650-3740},
  month = sep,
  series = {Link\"oping Electronic Conference Proceedings},
  number = {181},
  publisher = {Modelica Association and Link\"oping University Electronic Press},
  year = {2021}
}


Title: OpenModelica.jl: A modular and extensible Modelica compiler framework in Julia targeting ModelingToolkit.jl
Authors: John Tinnerholm, Adrian Pop, Andreas Heuermann and Martin Sjölund
Abstract: This paper presents current work on our Modelica Compiler framework in Julia: OpenModelica.jl. We provide a brief overview of this novel framework and its features, and we also present the latest addition to the possible backend options. We target ModelingToolkit.jl (MTK), a framework for symbolic-numerical computation and scientific machine learning. We evaluated the performance of our new backend using the ScalableTestsuite, a benchmark suite for Modelica Compilers. In our experiment, we demonstrate that MTK can be used as a backend with competitive simulation performance. In addition, using the scientific machine learning features of the Modeling toolkit, we were able to approximate models in the ScalableTestsuite using surrogate techniques and how such techniques can be used to accelerate the solving of nonlinear algebraic loops during tearing.
Based on our experiments, we propose using this new framework to automatically generate surrogate components of a Modelica model during the simulation to increase performance. The experimental work presented here provides one of the first investigations concerning the integration of the symbolic-numerical abilities of Julia within a Modelica tool.
Keywords: Modelica, OpenModelica, Julia, Equation-based modeling, Compiler-construction
Paper: full paper Creative Commons License
Bibtex:
@InProceedings{modelica.org:Tinnerholm:2021,
  title = "{OpenModelica.jl: A modular and extensible Modelica compiler framework in Julia targeting ModelingToolkit.jl}",
  author = {John Tinnerholm and Adrian Pop and Andreas Heuermann and Martin Sj\"olund},
  pages = {109--117},
  doi = {10.3384/ecp21181109},
  booktitle = {Proceedings of the 14th International Modelica Conference},
  location = {Link\"oping, Sweden},
  editor = {Martin Sj\"olund and Lena Buffoni and Adrian Pop and Lennart Ochel},
  isbn = {978-91-7929-027-6},
  issn = {1650-3740},
  month = sep,
  series = {Link\"oping Electronic Conference Proceedings},
  number = {181},
  publisher = {Modelica Association and Link\"oping University Electronic Press},
  year = {2021}
}