Nirmala

03/24/2025

Physical modeling offers predictive capabilities and a deeper understanding of system behavior through fundamental physics. However, in some cases, achieving lower computational costs or faster processing is more desirable. These use cases can benefit from hybrid modeling—a method that combines models with different traits, such as physics-based components and data-driven techniques. Reduced Order Modeling (ROM) plays a crucial role in this approach by simplifying complex models while maintaining accuracy, enabling faster simulations and real-time optimizations.

Introducing the Proper Hybrid Models for Smarter Vehicles (PHyMoS) Project 

In the last three years, Modelon has been proud to work on a government-funded research project in Germany. This project is called PHyMoS, which stands for Proper Hybrid Models for Smarter Vehicles. We worked with other industry and research partners on this project.

The project focused on accelerating the development of smarter vehicles and, therefore, being able to model the dynamic behavior of these vehicles in a fast and efficient manner was key. We looked into ways to create data-driven models using Artificial Intelligence. We focused on a few different use cases. Physics-based modeling provided the data for these models. The project aimed to find the best balance between accuracy and manual effort.

Group photo of PHyMoS partners at the final meeting in Munich  

As part of the project outcome, Modelon demonstrated a partially automated workflow in Modelon Impact to generate a reduced-order Modelica model based on selected (sub)systems and key variables. In the next section, we will walk through this step by step using an example of an automotive fuel cell system model.

Reduced-order modeling workflow in Modelon Impact

Reduced Order Modeling (ROM) enables faster simulations without compromising accuracy within a defined operating range—critical for the PHyMoS project.

By simplifying complex models, ROM allows engineers to perform rapid design iterations, sensitivity analyses, and real-time optimizations. This is particularly beneficial when integrating data-driven techniques, as it streamlines computational workloads while maintaining predictive reliability.

Our workflow is considered a ROM technique that simplifies models using a data-driven approach, primarily leveraging neural networks. To support this, we developed a custom app written in Python as a Jupyter Notebook and rendered through Voila, providing a user-friendly interface with intuitive widgets for ease of use.

Neural Network App GUI overview

Selecting a component to be ‘reduced’

We start by selecting a subsystem/component we would like to use. The ROM technique retains subsystem/component behavior in a pre-determined operating range while speeding up simulation time. In the example below, we have a system model of an electric car driving cycle, and we want to simplify the fuel cell module in this case. Let’s assume we are interested in how the power load, ambient pressure, and temperature affect hydrogen consumption and, therefore, getting rid of the complexity of geometry, heat transfer, etc.

Fuel cell module selected for reduced-order modeling

Data generation for neural network training

After we identify the key input/output of our fuel cell module, we create a manual wrapper around it to expose the selected key variables and prepare a test bench to generate data from this physical model by means of batch simulation. This data will be used afterward to train the neural network model.  

Neural networks require lots of simulation data for proper training. By leveraging simulation data in this development process and eliminating bottlenecks like manual meshing and long solver times, we are able to contribute a stream of quality data. This approach can accelerate neural network training and unlock greater potential for a hybrid modeling approach.  

The plot below shows the result of 100 simulations, sweeping the input within the given range:  
Target power: 100kW to 150kW  
Ambient temperature: 293K to 303K  
Ambient pressure: 1 bar to 1.1 bar

Physical data on how fuel flow is affected by power setpoint and ambient temperature and pressure  

The neural network model

There are two parts to creating the neural network model.

First, the custom app employs TensorFlow/Keras package for creating a Feed-Forward Neural Network (FFNN) structure. The user can adjust the number of layers, the number of neurons for each layer as well as the activation function used. Once the structure is ready, the app will use the physical data from earlier to train the network, generating what we call weights and biases, which determine how the model behaves. The following plots depict the neural network prediction against the physical model output (note that the values shown are normalized values).

Neural network predictions on fuel flow based on power setpoint and ambient temperature

Second, we transfer the generated weights and bias values and package them into a Modelica-based model using components from an open-source NeuralNetwork library. The following figures show how the neural network fuel cell model is validated against the original module. Given the same variations of power setpoint and ambient conditions over a period of T=1000s, hydrogen consumption is deduced.

Test bench validation against the physical fuel cell module

In the simple test bench above, a significant speed-up from 29.18s elapsed simulation time to 0.047s is observed. The plotted key output, which is the hydrogen mass flow rate, shows similar values. Some discrepancies come from the initialization stage and the fuel cell’s dynamic response due to the changing power setpoint. 

Further applications of neural network methodologies

During the project, we used this integrated workflow for other parts, like heat exchangers. Overall, we saw a 29.13-second improvement in performance while keeping acceptable accuracy. 

In this test bench, simulation time decreased by 99.8%, from 29.18 seconds to just 0.047 seconds.

The custom app’s neural network methodology offers far more development potential. Other algorithms and frameworks can be explored to capture the dynamics behavior better, e.g., physics-informed neural networks (PINNs) enabling users to embed physical laws to guide the learning process. Researchers can also consider future work to fully automate the reduced-order modeling process.

Thank you to our partners in Innovation

We truly value the teamwork and knowledge of our respected partners in the PHyMoS project. These partners include:

ESI Germany 
LTX Simulation 
The Robert Bosch Group
TLK-Thermo
XRG Simulation
University of Augsburg
Technical University of Braunschweig
Bielefeld University of Applied Sciences and Arts

Their contributions advance physics-based modeling and simulation for sustainable mobility. This project is instrumental in driving groundbreaking research and technological advancements in this field.

Related publication:
Hübel, Moritz, Nirmala Nirmala, Michael Deligant, and Lixiang Li, 2022. “Hybrid physical-AI based system modeling and simulation approach demonstrated on an automotive fuel cell.”, Asian Modelica Conference, pp. 157-163. 2022. https://doi.org/10.3384/ecp193157

Nirmala

Simulation Engineer