Main Content

Reduced Order Model of a Jet Engine Turbine Blade from Data

This example demonstrates how to create a reduced order model (ROM) using existing data from a high-fidelity simulation of a jet engine turbine blade. You can use the workflow in this example when you do not have access to the original high-fidelity model or when you do not have time to collect data by running simulations. You can also use this workflow with data generated by third-party computational fluid dynamics (CFD) or finite element analysis (FEA) tools and imported into MATLAB®.

In this example, you use the Reduced Order Modeler app to:

  • Import simulation data generated by a high-fidelity model into the app.

  • Examine the imported data.

  • Train an AI-based surrogate model from the imported data using preconfigured ROM templates.

Turbine blade image.

This example describes the complete workflow to create a ROM. To use a ROM that was pretrained by following the steps in this example, begin at the Use Trained ROM step.

This example requires the Reduced Order Modeler for MATLAB add-on, which you can install using the instructions in Get and Manage Add-Ons.

For more information, see Reduced Order Modeling (Simulink).

Load Data

Load the turbineBlade_data.mat file.

load('turbineBlade_data.mat')

The file contains two data sets, each containing data from one simulation of a high-fidelity model of a jet engine turbine blade. The data consists of ambient temperature, coolant temperature and pressure input signal values and maximum blade displacement output signal value at different time points during the simulation. In this example, you import both these data sets into the app.

First, view the timetable, data1.

head(data1)
     Time     AmbientT    CoolingT     Pressure      maxDisp 
    ______    ________    ________    __________    _________

    0 sec        1000         150          5e+05      0.00165
    5 sec      1081.9      68.725     5.0485e+05    0.0016517
    10 sec     1081.9      68.725     5.0485e+05    0.0016543
    15 sec     1081.9      68.725     5.0485e+05    0.0016571
    20 sec     1081.9      68.725     5.0485e+05      0.00166
    25 sec     1081.9      68.725     5.0485e+05     0.001663
    30 sec     1081.9      68.725     5.0485e+05     0.001666
    35 sec     1081.9      68.725     5.0485e+05    0.0016691

Launch the Reduced Order Modeler App

To launch the Reduced Order Modeler app, use the reducedOrderModeler command with the input argument data1.

reducedOrderModeler(data1)

Figure Import Data contains an object of type uigridlayout.

An Import Data dialog box opens along with the app. Use this dialog box to configure the data you are importing into the app.

Import Data dialog box opened along with Reduced Order Modeler app showing data1.

The dialog box shows the variables in data1. Set the Type of AmbientT, CoolingT, and Pressure as Input and the Type of maxDisp as Output.

Import Data dialog box with the Type column specified.

Click Import. The selected input and output ports appear in the Inputs/Outputs pane in the app.

Inputs/Outputs and Experiments panes in the Reduced Order Modeler app.

Import the second data set, data2. In the app, on the Reduced Order Modeler tab, click Import Data. The Import Data dialog box opens.

Import Data dialog box with the input and output ports fixed.

The input and output ports are already configured and fixed, that is, you cannot change the entries in the Name and Type columns. In the Data to import menu, select data2 and click Add. The app automatically assigns the imported data to the input and output ports. You can reassign the data, but for this example, keep the default assignment.

Import Data dialog box showing data2.

To import data2, click Import.

View Imported Data

In the app, in the Experiments pane, select both sets of imported data. To view the data, on the Reduced Order Model tab, click Open Results.

Reduced Order Modeler app showing the simulation results.

Train NSS Model Using Imported Data

Use the imported data to create a neural state-space (NSS) model to capture the system dynamics and predict maximum displacement based on the values of ambient temperature, cooling temperature, and pressure.

  • On the Reduced Order Model tab, in the Create Model gallery, select Neural State Space as the model type.

  • To fit an NSS model using the imported data, in the Export Results dialog box, select all experiments and signals and click OK.

  • In the Create Experiment dialog box, select New Project, click OK, and save the experiment project. The Experiment Manager app opens.

Experiment Manager creates an experiment to train NSS models using the imported data. To view experiment information such as the high-fidelity system, ROM model type, and test data percentage in Experiment Manager, view the Description text box on the Experiment1 tab.

Set the Hyperparameters Strategy to Exhaustive Sweep. Experiment Manager sweeps over different hyperparameters to train different models, then determines which models work best. Set the NSS hyperparameters:

  • NumberInputLags — [0 1]

  • NumberOutputLags — [0 1 2]

  • NumberLayers — [2 3]

  • HiddenLayerSize — [16 32 64]

  • SampleRate — [0.2]

  • WindowSize — 50

  • Overlap — 0

The general form of an NSS model is

x[k+1]=f(x[k],u[k]),

where x[k] represents the states and u[k] represents the inputs. This model has zero lags and the outputs are the states themselves. If a system has fewer measured outputs than states, you augment the states of the NSS model with additional lagged states. The NSS model will then take the form

[x[k+1];x[k];...]=f(x[k],x[k-1],...,x[k-NumberOutputLags],u[k],u[k-1],...,u[k-NumberInputLags]),

where the first set of states in the augmented state vector are the measured outputs and the additional lagged states are the lagged outputs.

You can also edit the function used to train the NSS model. To open the training function, in the Training Function section, click Edit. This opens the training function, where you can change additional settings, such as the maximum number of epochs to use during training or the network initialization options. For this example, use the default training options.

The Experiment Manager app main window.

Train the models. If you have Parallel Computing Toolbox™ software, you can run multiple trials at the same time or offload your experiment as a batch job in a cluster. To train the models in parallel, on the Experiment Manager tab, in the Execution section, set Mode to Simultaneous. Click Run.

On the Experiment1 | Result1 tab, each row in the results table represents a trained model. The row for each model displays each of its hyperparameter values, as well as model performance information and metrics:

  • TrainingMSE is the mean squared error calculated on the training data set. It is the average squared difference between the output obtained by simulating the original model and the output predicted by the trained model, using the training data values. Because the training data values were used to train the model, TrainingMSE shows how well the model fits the data used to train it.

  • TestMSE is the mean squared error calculated on the test data set. It is the average squared difference between the output obtained by simulating the original model and the output predicted by the trained model, using the test data values. Because the test data values were not used to train the model, TestMSE shows how well the model performs on new data.

  • TrainingLoss is the measure of inaccuracy of the model predictions calculated on the training data set. It shows how the model progresses by learning from the training data.

Sort the trained models by TrainingLoss in ascending order by clicking the arrow on the right of the TrainingLoss column header and selecting Sort in Ascending Order in the list that appears.

The results table in Experiment Manager containing the trained models.

Of the models you trained, export the model with low TestMSE, reasonable TrainingMSE, and low TrainingLoss. To export a model as a workspace variable, first, select its row in the results table. On the Experiment Manager tab, in the Export menu, click Training Output. Name the workspace variable trainingOutput and click OK. Because the experiments that generated the imported data used random pulse sequences for the input signals, model performance might vary.

For more information on hyperparameters and metrics, see Configure Options in Reduced Order Modeler (Simulink).

Use Trained ROM

Note: You can begin at this step by loading a previously trained NSS model, turbineblade_data_trainedModel.mat. This model was trained using the same data in the turbineBlade_data.mat file. To load the model, at the command line, enter:

load('turbineblade_data_trainedModel.mat');

Once you export the trained model to the MATLAB workspace, you can use it from the command line.

The trainingOutput variable stores the trained model.

nssModel = trainingOutput.NSSModel;

The trained network uses lags of the input data. To generate the validation data, modify the original data to include lags.

odata = data2.Variables;
idx = 2:size(odata,1);
lData = [...
    odata(idx,1) odata(idx-1,1), ... %lagged AmbientT
    odata(idx,2) odata(idx-1,2), ... %lagged CoolingT
    odata(idx,3) odata(idx-1,3), ... %lagged Pressure
    odata(idx,4)];
names = {...
    'AmbientT(t)', 'AmbientT(t-1)', ...
    'CoolingT(t)', 'CoolingT(t-1)', ...
    'Pressure(t)', 'Pressure(t-1)', ...
    'maxDisp(t)'};
ldata = array2timetable(lData,'RowTime',data2.Time(idx)-data2.Time(2),'VariableNames',names);

As part of model training, the NSS model normalizes the input and output signals. trainingOutput.Normalization stores the normalization values for the input and output variables. Use these values to normalize the validation data.

mu = trainingOutput.Normalization.Mu.Variables;
sigma = trainingOutput.Normalization.Sigma.Variables;
ndata = (ldata-mu)./sigma;

Compare the results of the trained NSS model with the normalized validation data.

compare(ndata,nssModel)

Figure contains 4 axes objects. Axes object 1 with ylabel maxDisp(t) contains 2 objects of type line. These objects represent Validation data (maxDisp(t)), nssModel: 93.21%. Axes object 2 with ylabel AmbientT(t-1) contains 2 objects of type line. These objects represent Validation data (AmbientT(t-1)), nssModel: 98.89%. Axes object 3 with ylabel CoolingT(t-1) contains 2 objects of type line. These objects represent Validation data (CoolingT(t-1)), nssModel: 98.87%. Axes object 4 with ylabel Pressure(t-1) contains 2 objects of type line. These objects represent Validation data (Pressure(t-1)), nssModel: 97.63%.

The plot shows that the trained NSS model generalizes well to this data set.

You can also use the trained NSS model in Simulink®. For a detailed example, see Reduced Order Model of a Jet Engine Turbine Blade.

See Also

(Simulink) |

Topics