Dynamic Machine Learning for Modeling and Simulation

Written by Ryan Dudgeon

September 3, 2024
dynamic machine learning simulation

Incorporating Dynamic Metamodeling Simulation

To save computational time, engineers are persistently trying to speed up physical models, and some situations absolutely require faster simulation speeds. These situations might include more advanced co-simulation tasks, performing model-based optimization on a slower physical model, or the need to have a surrogate model for XiL (X-in-the-Loop) applications or to flash onto a microcontroller, ECU, or other low-power (meaning low-memory and low-CPU) device. Machine learning (ML) models, or metamodels, are an obvious choice for creating fast surrogate models, but many ML model frameworks only work with “static” datasets consisting of scalar values. These metamodels are sufficient for datasets consisting of steady-state data, but to capture transient, inertial effects (whether they be flow, thermal, electrical, chemical, or other types), more advanced ML frameworks are needed. 

GT-SUITE has recently enhanced its Machine Learning Assistant to support the import of time series datasets and training them to transient neural networks. These metamodels allow the output prediction to depend on previous time steps, thereby providing the capacity to capture dynamic, inertial effects.  The schematic below (Figure 1) shows the structure of a neural network where the output from two previous time steps, along with the previous time step of input #2, serve as inputs.   

 

neural network structure

Figure 1: Neural network structure

In addition, because neural networks are fast executing, these machine learning models can be exported as C-code, then compiled and run on microcontrollers and other low-power devices.   

Real World Use Cases for Dynamic Machine Learning Modeling – CASE #1: Battery Modeling  

One application that greatly benefits from dynamic machine learning is for battery modeling. The state of charge (SOC) is an internal state variable that affects the voltage, and therefore static ML models are insufficient for predicting voltage as a function of common inputs such as current, power request, and cell temperature.   

Consider a battery undergoing hybrid pulse power characterization testing to determine its dynamic performance. In this test, a square step signal is applied to the current at different temperatures to evaluate the voltage response. With a detailed battery simulation tool such as GT-AutoLion, the SOC can be saved and used to help predict the voltage response.  

A Design of Experiments (DOE) was run to vary the current level, initial SOC, and initial temperature. The input variable to the transient neural network was the current, and the outputs were voltage, SOC, and temperature. The voltage and SOC results from one time-series dataset not used for training is shown below (Figure 2).   

Transient neural network predictions of voltage and state of charge (SOC)

Figure 2: Transient neural network predictions of voltage and state of charge (SOC) as the current cycles on and off

Real World Use Cases for Dynamic Machine Learning Modeling – CASE #2: Vehicle Thermal Management

Vehicle thermal management is another application that can benefit from dynamic machine learning, as thermal inertial behavior cannot be captured by static metamodels. Consider a model of a battery module containing 280 cells, each of whose thermal solution is calculated with a finite element mesh. The thermal performance of this module is characterized by running it through 82 different drive cycles where the initial temperature, inlet coolant temperature, and initial SOC are varied (see Figure 3). Along with these three variables, the power request is also used as a metamodel input. 

battery call model simulation

Figure 3: Battery module containing 280 cells testing thermal performance of initial temperature, inlet temperature, and initial SOC

The time-resolved maximum, average, and minimum temperatures within the module are the key transient results, along with the transient outlet coolant temperature. These four temperature variables are trained to a single transient neural network, where 15% of the drive cycle simulations are set aside for testing. The following plots show the metamodel predictions vs. the simulation data for one of the test cases that the metamodel had not been used during training (Figure 4). 

metamodel predictions of battery thermal performance simulation

Figure 4: Results of metamodel predictions of battery module thermal performance vs. the simulation data for one of the test cases that the metamodel had not used during training

Real World Use Cases for Dynamic Machine Learning Modeling – CASE #3: Exhaust Gas Aftertreatment

Another application that can benefit from dynamic machine learning is the modeling of exhaust gas aftertreatment reactors. Outlet emissions cannot be predicted with a static ML model because they strongly depend on the internal states of the reactors, such as catalyst storage (coverage) and wall temperature which evolve slowly over long time scales. 

A combination of dynamic and static ML has been applied to a selective catalytic reduction (SCR) reactor, where training data was created by simulating a physics-based SCR model using real driving conditions (Figure 5). Additionally, validation and testing datasets are generated using different standard test cycles. A dynamic neural network was used to predict the ammonia coverage, average reactor wall temperature, and outlet gas temperature from the inlet flow variables.  Then these three predicted variables were fed, along with the inlet flow variables, to a static neural network to predict the outlet NH3, NO, and NO2 concentrations. 

dynamic and static neural networks

Figure 5: Schematic of dynamic and static neural networks to replicate a physics-based SCR model

The plots below highlight the predicted vs. target stored ammonia coverage and NO outlet mass flow rate for the test dataset, which was unused during training the ML models (Figure 6). 

predicted vs. target stored ammonia coverage and NO outlet mass flow rate

Figure 6: Plot highlighting the predicted vs. target stored ammonia coverage and NO outlet mass flow rate for the test dataset, which was unused during training the ML models

Ready to Learn More About Machine Learning? 

If you are interested in learning more about how you can implement machine learning in GT-SUITE, see our productivity abilities. You can also contact us here. 

If you’re curious to learn more about our static machine modeling capabilities, read this two-part blog series on enhancing model accuracy by replacing GT-SUITE’s lookup maps with machine learning models and optimizing neural networks for modeling and simulation! 

Citations

  1. B. Sarkar, S.R. Gundlapally, P. Koutsivitis, S. Wahiduzzaman, Performance evaluation of neural networks in modeling exhaust gas aftertreatment reactors, Chemical Engineering Journal 433 (2022)