TR2021-114

Composing Modeling and Simulation with Machine Learning in Julia


    •  Rackauckas, C., Anantharaman, R., Edelman, A., Gowda, S., Gwozdz, M., Jain, A., Laughman, C.R., Ma, Y., Martinuzzi, F., Pal, A., Rajput, U., Saba, E., Shah, V., "Composing Modeling and Simulation with Machine Learning in Julia", 14th International Modelica Conference, Martin Sjölund, Lena Buffoni, Adrian Pop, and Lennart Ochel, Eds., DOI: 10.3384/​ecp2118197, September 2021, pp. 97-107.
      BibTeX TR2021-114 PDF
      • @inproceedings{Rackauckas2021sep,
      • author = {Rackauckas, Chris and Anantharaman, Ranjan and Edelman, Alan and Gowda, Shashi and Gwozdz, Maja and Jain, Anand and Laughman, Christopher R. and Ma, Yingbo and Martinuzzi, Francesco and Pal, Avik and Rajput, Utkarsh and Saba, Elliot and Shah, Viral},
      • title = {Composing Modeling and Simulation with Machine Learning in Julia},
      • booktitle = {14th International Modelica Conference},
      • year = 2021,
      • editor = {Martin Sjölund, Lena Buffoni, Adrian Pop, and Lennart Ochel},
      • pages = {97--107},
      • month = sep,
      • publisher = {Linköping Electronic Press},
      • doi = {10.3384/ecp2118197},
      • issn = {1650-3740},
      • isbn = {978-91-7929-027-6},
      • url = {https://www.merl.com/publications/TR2021-114}
      • }
  • MERL Contact:
  • Research Areas:

    Machine Learning, Multi-Physical Modeling, Optimization

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.