2025-07-25 –, Lawrence Room 104 - Function Room
SciML bridges the gap between scientific modeling and Machine Learning (ML). It has revolutionised simulation, if used properly when designing and calibrating complex acausal systems. Julia, with ModelingToolkit.jl (MTK) has some of the most advanced simulation capabilities, but how does one make use of ML methods with it? This talk will focus on how to utilise an existing neural network as a component in MTK and seamlessly integrate it back into the first principles system
Modeling and Simulation covers a vast array of problem types, and is heavily utilised in modern engineering. ModelingToolkit.jl (MTK) is a framework for defining high performance acausal systems in Julia. Scientific Machine Learning (SciML) leverages MTK's transparent design philosophy and Julia's excellent composition capabilities, to be able to train data driven physics informed models to accelerate otherwise computationally expensive simulations, or fit for missing physics from the first principles model.
This talk focusses on how one can actually incorporate a Machine Learning component in an existing ODESystem defined using MTK. We demonstrate training a surrogate of a dynamical system, and then converting it into a usable component which MTK can consume. We will also discuss some methods for setting up the surrogatization problem properly.
We will discuss how to prevent MTK from looking into the inference code to maintain speed. We will demonstrate how to properly setup a ML component and show how to replace the first-principle component we created a surrogate for. We will demonstrate the speedups we can observe with this surrogate and finally discuss alternate ways to "export" a ML model as a Functional Mockup Unit (FMU) which can also be used by other simulation platforms. We will also demonstrate the ModelingToolkitNeuralNets.jl package which allows creating neural network blocks which can generate MTK compatible components that can also be directly used.
I am a Senior Software Engineer at JuliaHub working on JuliaSim AI. My interests lie in the design and use of scientific machine learning methods for modeling and simulation.