Artificial Intelligence

Apply machine learning and deep learning

Introducing the Reduced Order Modeler App: How to Interactively Create AI-Based Reduced Order Models (ROMs)

The following blog post is from Melda Ulusoy, Principal Product Marketing Manager at MathWorks, and Kishen Mahadevan, Senior Product Manager at MathWorks.
Reduced order modeling is a collection of computational techniques for reducing the complexity of a computer model while preserving the expected fidelity. To help interactive creation of AI-based reduced order models we launched the Reduced Order Modeler app. The app enables users to design experiments, use the experiments to generate input-output data from a full-order model, train a reduced order model (ROM) using this data, and then export the resulting ROM for further use to Simulink, as illustrated below.
The Reduced Order Modeling (ROM) workflow includes designing experiments, running experiments, training the ROM, and exporting.
Figure 1: ROM development workflow
 
Before diving into how to create an AI-based ROM using the Reduced Order Modeler app, let us look at why engineers want to create ROMs.
 

Why Engineers Use ROMs

Engineers use Simulink for control system design and system level simulation. Simulation performance is important as faster simulations enable engineers to quickly iterate on their designs. Models of complex systems often consist of many components. Sometimes models of some components have already been created by design teams with Computational Fluid Dynamics (CFD) / Finite Element Analysis (FEA) / Computer-Aided Engineering (CAE) tools. These full-order high-fidelity models, while being useful for detailed component design, are too slow and therefore impractical for system-level simulation and control design.
The models can take hours or even days to simulate! Imagine having to wait that long just to run a single simulation—slowing down the entire design process. So, does this mean you have to create an entirely new, faster simulating model from scratch? Not at all. This is where reduced order modeling (ROM) steps in, offering a way to reuse these high-fidelity models to create faster-running, lower-fidelity approximations suitable for system-level simulation and control design. Engineers also use ROMs for virtual sensor modeling, Hardware-in-the-Loop (HIL) testing, and digital twin generation.
Let’s now explore how to create a ROM using the Reduced Order Modeler app. More specifically, I‘ll walk you through the steps of the ROM development workflow (Figure 1) using a jet engine turbine blade example.
 

Design Experiments

The jet engine turbine blade model (Figure 2) is a high-fidelity full-order model that computes the maximum displacement of the blade when subjected to ambient temperature, cooling temperature, and pressure. This involves solving partial differential equations, making the full-order model computationally intensive and unsuitable for system-level simulation and control design. To tackle this, we start with the design of experiments to create a ROM.
Simulink model of the high-fidelity model of a jet blade turbine
Figure 2: High-fidelity full order model of a jet engine blade turbine
In this step, you define the simulation inputs as well as ROM inputs and outputs by selecting the relevant signals in the Simulink model and specifying their I/O types (Figure 3). You can set up experiments to inject perturbation signals at the specified simulation inputs to the high-fidelity model to then collect the corresponding ROM I/O data. For this example, the simulation inputs include ambient temperature, cooling temperature, and pressure signals, where random pulses are injected. The ROM inputs are the filtered versions of these signals, where the ROM inputs now represent physically realistic changes to the ambient temperature, cooling temperature, and pressure signals, and the ROM output is the maximum displacement signal.
UI to select ROM inputs and ouputs
Figure 3: Specifying I/O types for simulation inputs, and ROM input and outputs
After selecting and specifying the signals, you can view the coverage of the input design space (Figure 4), and further optimize it by adjusting the default values of the experiment settings such as the signal injection mode, signal type, pulse width, number of pulses, and pulse amplitude ranges.
Designing experiments for the collecting ROM input and output data
Figure 4: Configure experiment settings for collecting ROM I/O data
 

Run Experiments

Once the experiments are configured, you can run simulations with the click of a button. You can also choose to run these simulations in parallel, enhancing efficiency. Once simulations are completed, you can view experiment results as shown below.
Waveforms of generated ROM input and output data from the experiments
Figure 5: Generated ROM I/O data from experiments
 

Train ROM

The next step is to train a ROM using the collected I/O data. Depending on the nature of the collected output data - time dependent (dynamic) or time independent (static) - for training, you can choose from:
  • Static ROMs like multilayer perceptron networks and scattered interpolants, for speeding up design optimization and design exploration workflows, or
  • Dynamic ROMs like LSTM, nonlinear ARX, and neural state space models for system-level analysis, control design, and HIL testing.
This example uses a neural state space model to effectively capture the dynamics of the jet engine turbine blade system. When you click on the corresponding training template (in this case, the neural space model) in the Reduced Order Modeler app, it automatically launches the Experiment Manager app, which lets you train different models by sweeping through a range of hyperparameter values, allowing you to evaluate and compare performance of each trained model.
Hyperparameters of the neural state space models trained with ROM input and output data
Figure 6: Training neural state space models using ROM I/O data
Upon training completion, you can assess and compare the trained models using performance metrics such as Loss, TrainingMSE, and TestMSE. The metrics TrainingMSE and TestMSE are the mean-squared errors computed using simulation outputs with the original training data and test data, respectively. You can sort the trained models by TestMSE in ascending order. Models that exhibit low TestMSE, with TrainingMSE values that are comparably low, along with minimal loss are good candidates. You can similarly train other dynamic ROM models such as LSTMs and nonlinear ARX models and compare their results.
 

Export ROM

The last step is to export your trained ROM to the MATLAB workspace, and then bring it into the Simulink model using the Neural State Space block (Figure 7) for comparison with the original high-fidelity model.
Simulink model with ROM (instead of high-fidelity model)
Figure 7: Bringing trained ROM into the Simulink model for comparison to the original high-fidelity model
As demonstrated by the results (Figure 8), the trained neural state space model closely captures the system dynamics of the original high-fidelity model. The trained ROM simulates in 0.03 seconds making it highly suitable for system level simulation and control design, in contrast to the full order model, which takes 30,000 seconds to simulate.
Comparison of simulation results between ROM and high-fidelity model
With your ROM ready, you can leverage it for various purposes such as use in Simulink for control design and hardware-in-the-loop testing or export it for use outside of Simulink through FMUs (functional mock-up units).
 

Next Steps

Try the Reduced Order Modeler app today for your applications by downloading the support package here!
To dive deeper into the world of reduced order modeling and see its practical applications, check out our comprehensive video series on ROM and a recording of the webinar AI with Model-Based Design: Reduced Order Modeling.
|
  • print

댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.