betaFeedback

WorksComputer Science

Two-stage Residual Learning for Modelling Strength-Informed Optimisation of Thermal Systems

Abstract

Aggregate performance metrics do not identify local modelling inaccuracies in machine learning (ML) surrogates used for thermal-system optimisation. This study assesses local modelling strength through validation-based reliability screening and post-optimisation residual assessment. A two-stage residual learning (TSRL) framework, built on artificial neural networks (ANNs), is developed for modelling-strength-informed and domain-constrained optimisation of thermal systems. Within the TSRL framework, a base ANN predicts the process output, and a residual ANN learns the signed residuals left by the base ANN. The TSRL framework is implemented on two case studies of thermal systems, including 817 simulation observations of a crude distillation unit and operating records from a 395 MW industrial gas turbine. The TSRL framework reduces the test root mean square error (RMSE) from 10.3 g/s to 4.7 g/s for Fuel Oil in the refinery dataset and from 151 kJ/kWh to 105 kJ/kWh for turbine heat rate (THR). The base ANNs trained within TSRL are embedded in domain-constrained optimisation problems, and the modelling strength at each computed solution is assessed using the locked residual-score threshold. Each computed solution receives a good modelled region (GMR) or weak modelled region (WMR) label to inform ML model-based decision-making for safety-critical operation of thermal systems.

Nomenclature

Symbol or acronymMeaning
AGOAtmospheric gas oil
AHAmbient humidity
ANNArtificial neural network
APAmbient pressure
ATAmbient temperature
AUCArea under the ROC curve
CDPCompressor discharge pressure
CDTCompressor discharge temperature
DMD_MMahalanobis distance
bbHalf-range used to truncate indicator-band perturbations
δ\deltaMahalanobis-distance limit
eie_iAbsolute base-model error for observation ii
ϵk\epsilon_kkkth sampled indicator-band perturbation
FGTFuel gas temperature at the combustion-chamber inlet
GFFRGas fuel flow rate
GMRGood modelled region
LB,LR\mathcal{L}_B, \mathcal{L}_RBase- and residual-ANN training losses
MAEMean absolute error
MLPMultilayer perceptron
MSEMean squared error
NNNumber of observations in the relevant data split
NrefN_{\mathrm{ref}}Number of refinery modelling observations (817)
PHGOTPerformance-heater gas outlet temperature
rir_iSigned base-model residual for observation ii
RMSERoot mean square error
ROCReceiver operating characteristic
sis_iResidual score (predicted residual magnitude) for observation ii
σR\sigma_RNormal scale used for indicator-band sampling
SiLUSigmoid linear unit
TEThermal efficiency
THRTurbine heat rate
TSRLTwo-stage residual learning
TeT_eObserved-error threshold
TsT_sResidual-score threshold
WMRWeak modelled region
x,x~x,\tilde{x}Scaled and physical-scale process-input vectors
wj,wijw_j,w_{ij}Crude blend fractions
zijz_{ij}Raw Latin hypercube design coordinate
y,y^,yˉy,\hat{y},\bar{y}Observed output, model prediction, and split mean
yCO2capy_{\mathrm{CO_2}}^{\mathrm{cap}}CO2_2 ceiling in refinery optimisation
xtargetx_{\mathrm{target}}Prescribed scaled input target
y^B\hat{y}^{B}Base-model prediction
y^R\hat{y}^{R}Residual-model prediction
y^C\hat{y}^{C}Residual-corrected prediction
θB,θR\theta_B,\theta_RTrainable parameter vectors of the base and residual ANN

Table 9.

Introduction

Optimising the operation of thermal systems determines operating decisions that improve a defined objective while satisfying equipment, material, energy, and safety constraints [1]. Surrogate-based optimisation [2, 3] reduces the computational cost of model-based decision-making by replacing repeated calls to a detailed model with an approximation that can be evaluated quickly. In refinery-wide energy optimisation, artificial neural networks (ANNs) replace high-fidelity first-principles process models [4]. ANN-based models are also used for the data-driven design of cooling systems [5]. An ANN is a nonlinear continuous function approximator supported by universal approximation theory [6]. Its differentiable form suits surrogate-based optimisation, including thermal-power studies that use machine-intelligence models in constrained operation [7]. The explicit algebraic form of a trained ANN can be embedded in a mathematical programme. Deterministic global optimisation [8], the OMLT toolkit [9], and a recent gas-turbine simulation platform [10] evaluate trained networks inside constrained optimisation. Misener and Biegler Misener and Biegler [11] identify robustness to uncertainty and accurate extrapolation as essential conditions for surrogates used in process optimisation. Parameter estimation, model selection, and final evaluation require separate data to avoid optimistic error estimates from reusing selection data [12, 13]. Root mean square error (RMSE), mean absolute error (MAE), and the coefficient of determination (R2R^{2}) summarise split-level performance, but do not locate modelling errors within the learned input–output mapping.

Limited information about local modelling accuracy at given input conditions restricts the use of surrogate-based optimisation in the operational control of thermal systems. The optimiser searches for favourable predictions and may return a point with high local modelling error. Kahrs and Marquardt Kahrs and Marquardt [14] bounded the optimisation of hybrid models by a validity domain built from the training inputs. Schweidtmann et al. Schweidtmann et al. [15] combined topological data analysis with one-class support vector machines and convex hulls, and encoded the data domain as optimisation constraints. Meyer and Pebesma Meyer and Pebesma [16] introduced an area of applicability for spatial prediction models with a cross-validation-derived threshold to identify regions where predictive errors are expected to be comparable to cross-validation errors. Recent gas-turbine studies [10, 17] use a Mahalanobis constraint to retain the multivariate input combinations represented in plant data. These methods restrict surrogate evaluation to observed input combinations, but satisfying a domain constraint does not establish local prediction accuracy.

Domain restrictions can be complemented by predictive uncertainty estimates from Monte Carlo dropout [18] and deep ensembles [19]. Gawlikowski et al. Gawlikowski et al. [20] reviewed their assumptions, computational cost, and performance. Cajahuaringa et al. Cajahuaringa et al. [21] applied Monte Carlo dropout to a nonlinear autoregressive model of a 215 MW gas turbine and reported the uncertainty of the predicted rotational speed. The study addressed predictive uncertainty but did not carry the uncertainty into surrogate-based operational optimisation of the gas turbine system. Yang et al. Yang et al. [22] trained an ensemble of ReLU networks on resampled training sets, approximated the ensemble with a mixture density network, and solved a chance-constrained mixed-integer programme. These approaches require repeated training or stochastic forward passes. When used in optimisation, the uncertainty model enters the problem and changes its size and form. The resulting spread measures disagreement among networks or samples, rather than a decision threshold calibrated against observed errors of the deployed surrogate.

Residual learning offers a direct connection to observed errors. In stagewise function fitting [23], each new learner is fitted to the errors left by the preceding model. Computer-model calibration [24] treats model discrepancy as a term separate from the simulator response. Hybrid semi-parametric models [25, 26] use a data-driven component to correct a mechanistic model. In these studies, the residual learner improves prediction accuracy. The size of the learned correction is not used as a reliability signal. Lahou et al. Lahou et al. [27] trained a secondary predictor of the pointwise error of a main model as a measure of epistemic uncertainty. Their method was developed for active learning, sequential model optimisation, and exploration in reinforcement learning. It returns a continuous uncertainty estimate. It does not lock a decision threshold on held-out data, and it does not label the solutions of a constrained nonlinear programme.

This work calibrates a residual score against observed base-model errors on a validation split, then assesses solutions of domain-constrained optimisation without adding an uncertainty model to its formulation. Refinery and gas-turbine surrogates are embedded in optimisation studies [4, 10, 17], yet the reported operating points do not carry a point-specific measure of modelling strength before they reach the operator.

This work develops a two-stage residual learning (TSRL) framework for assessing local modelling strength in surrogate-based optimisation. In the first stage, a base ANN is fitted for each process output. In the second stage, the base parameters are fixed and a residual ANN learns the signed base-model error. The signed residual gives a point correction. Its magnitude gives a residual score, which remains available at an operating point where the true output is unknown. Validation data link the score to the observed base error and determine two percentile thresholds by maximising F1F_{1}. The thresholds are locked before test evaluation and before any optimisation solution is scored. Only the base ANN is embedded in the optimisation problem. The residual score then labels each returned solution as lying in a good modelled region (GMR) or a weak modelled region (WMR).

The TSRL framework is examined on two thermal systems with different sources of modelling error. The first case uses 817 simulated observations of a crude distillation unit, with seven inputs that cover varied crude blends and utility conditions. The second case uses operating records of a 395 MW industrial gas turbine [7], where the measurements carry variability from operating dynamics and sensor noise. Gas-turbine studies [10, 17, 28] report ML-based prediction and optimisation of plant performance without a point-specific check of modelling strength at new input conditions. TSRL adds local reliability assessment to surrogate-based optimisation through three main contributions.

  • The TSRL framework uses a residual ANN to correct the base surrogate and its predicted residual magnitude to score reliability at unseen operating points.

  • Residual scores are calibrated by cross-matching percentile labels of observed base error and residual score for each validation observation. The threshold pair is selected by F1F_1, and both thresholds are locked before testing.

  • Computed solutions are assessed after optimisation while retaining the original optimisation problem. Base ANNs are embedded in Mahalanobis-constrained nonlinear programmes, and each solution receives a GMR or WMR label from TSRL after convergence. Many solutions of the refinery case study satisfy the domain constraints and yet fall in the WMR.

The rest of the paper is organised as follows. Section 2 defines the models, calibration procedure, and optimisation formulation. Section 3 presents the refinery and gas turbine studies. Section 4 summarises the findings, limitations, and directions for further work.

Methods

The TSRL framework separates surrogate fitting, residual correction, reliability calibration, and optimisation, as illustrated in Figure 1. For each process output, a base ANN is fitted and its prediction, y^B(x)\hat{y}^{B}(x), is used as the surrogate response in the optimisation problem. After the base-network parameters are fixed, a residual ANN receives the same input vector xx and predicts the signed base-model error, y^R(x)\hat{y}^{R}(x). The corrected response is y^C(x)=y^B(x)+y^R(x)\hat{y}^{C}(x) = \hat{y}^{B}(x) + \hat{y}^{R}(x), while the magnitude ∣y^R(x)∣\lvert\hat{y}^{R}(x)\rvert is retained separately as a residual score. This score remains available at a proposed operating point where the true process output is unknown.

TSRL information flow diagram

Figure 1. TSRL information flow. The data contain process inputs xx and observed output yy, while the base and residual ANNs predict y^B\hat{y}^{B} and y^R\hat{y}^{R}, respectively. The residual target is ri=yi−y^iBr_i = y_i - \hat{y}^{B}_i. Validation labels based on absolute base error and residual score fix TeT_e and TsT_s before testing. Only the base ANN enters the optimisation problem, and ∣y^R(x∗)∣|\hat{y}^{R}(x^*)| assigns a GMR or WMR label after convergence.

Each validation observation has an observed absolute base error and a residual score. A percentile search applies an error threshold to the first quantity and a score threshold to the second quantity. The two resulting labels are cross-matched sample by sample to calculate validation precision, recall, and F1F_1 for each threshold pair. The pair that maximises validation F1F_1 fixes the observed-error threshold TeT_e and residual-score threshold TsT_s. Both thresholds are locked before test evaluation [12, 13]. The domain-constrained optimisation then embeds only the base ANN and returns an operating solution x∗x^*. The residual score at x∗x^* is compared with the locked TsT_s to assign a GMR or WMR label.

Data partition, scaling, and evaluation

Each dataset of the two case studies is divided randomly into 70% training observations, 15% validation observations, and 15% test observations. The training split is used to estimate network parameters. The validation split guides hyperparameter selection, early stopping, output selection for detailed reliability analysis, and threshold calibration. The test split is evaluated once after modelling choices have been fixed. Each input is normalised to the interval [0,1][0,1] by min-max scaling,

xij=x~ij−x~jmin⁡x~jmax⁡−x~jmin⁡,(1)x_{ij} = \frac{\tilde{x}_{ij} - \tilde{x}^{\min}_{j}}{\tilde{x}^{\max}_{j} - \tilde{x}^{\min}_{j}}, \tag*{(1)}

where ii indexes an observation and jj indexes an input variable. x~ij\tilde{x}_{ij} is the physical-scale value of input jj at observation ii, while x~jmin⁡\tilde{x}^{\min}_{j} and x~jmax⁡\tilde{x}^{\max}_{j} are the lower and upper values used to scale that input. The resulting xijx_{ij} is dimensionless and lies in [0,1][0,1]. The same limits are used for all splits and to convert an optimisation solution between scaled and physical input values.

The modelling performance of each ANN is evaluated using RMSE, MAE, and R2R^2,

RMSE=1N∑i=1N(yi−y^i)2,MAE=1N∑i=1N∣yi−y^i∣,R2=1−∑i=1N(yi−y^i)2∑i=1N(yi−yˉ)2.(2)\begin{aligned} \mathrm{RMSE} &= \sqrt{\frac{1}{N}\sum_{i=1}^{N}(y_i-\hat{y}_i)^2},\\ \mathrm{MAE} &= \frac{1}{N}\sum_{i=1}^{N}\lvert y_i-\hat{y}_i\rvert,\\ R^2 &= 1-\frac{\sum_{i=1}^{N}(y_i-\hat{y}_i)^2}{\sum_{i=1}^{N}(y_i-\bar{y})^2}. \tag*{(2)} \end{aligned}

For the evaluated split, NN is the number of observations and yˉ\bar{y} is its mean output, while y^i\hat{y}_i denotes the model prediction being assessed.

Base and residual surrogate models

The base and residual ANNs use a multilayer perceptron (MLP) architecture for nonlinear input–output modelling [6, 28, 29]. A separate multi-input single-output network is fitted for every process output. Each network has one hidden layer and a linear output. The hidden units use the sigmoid linear unit (SiLU) activation [30], with SiLU⁡(u)=u/(1+exp⁡(−u))\operatorname{SiLU}(u) = u/(1 + \exp(-u)). The base surrogate is written as

y^B=WoutSiLU⁡(Winx+bin)+bout.(3)\hat{y}^{B} = W_{\mathrm{out}} \operatorname{SiLU}(W_{\mathrm{in}}x + b_{\mathrm{in}}) + b_{\mathrm{out}}. \tag*{(3)}

WinW_{\mathrm{in}} and WoutW_{\mathrm{out}} contain the input-to-hidden and hidden-to-output network weights, while binb_{\mathrm{in}} and boutb_{\mathrm{out}} contain the corresponding bias vectors. This differentiable expression can be embedded in a nonlinear programme [8, 10]. The base-ANN loss combines mean squared error (MSE) with an L1 penalty,

LB=1N∑i=1N(yi−y^iB)2+λ1,B∥θB∥1.(4)\mathcal{L}_{B} = \frac{1}{N}\sum_{i=1}^{N}(y_i-\hat{y}_i^{B})^2+\lambda_{1,B}\lVert\theta_B\rVert_1. \tag*{(4)}

Regularisation is applied to the base-network parameter vector θB\theta_B. The coefficient λ1,B\lambda_{1,B} weights the L1 norm ∥θB∥1\lVert\theta_B\rVert_1. The L2 coefficient (λ2,B)(\lambda_{2,B}) is applied through Adam weight decay. The learning rate, L1 coefficient, L2 coefficient, and hidden-layer size are tuned in 50 trials for each network using Hyperopt [31] with the tree-structured Parzen estimator [32] over the search space in Table 1. The candidate with the lowest validation RMSE is retained.

HyperparameterSearch rangeSampling type
Learning rate10−510^{-5} to 10−110^{-1}Log continuous
L1 coefficient10−710^{-7} to 10−110^{-1}Log continuous
L2 coefficient10−710^{-7} to 10−110^{-1}Log continuous
Hidden-layer neurons2 to 32Discrete in steps of 2

Table 1. Hyperparameter search space used independently for the base and residual ANNs.

Training uses the Adam optimiser [33] in PyTorch [34] with mini-batch gradients, a maximum of 5000 epochs, and validation-based early stopping after 200 successive epochs without improvement in RMSE [35].

After fitting the base ANN, θB\theta_B is fixed and the signed residual target for the second stage is computed as [23]

ri=yi−y^iB,(5)r_i = y_i - \hat{y}_i^B, \tag*{(5)}

where a positive rir_i indicates underprediction by the base ANN. A second network uses the same process inputs to predict rir_i. Its hyperparameters are selected independently from the same ranges. The residual prediction and corrected response are

y^iR=FR(xi),y^iC=y^iB+y^iR.(6)\hat{y}_i^R = F_R(x_i), \qquad\hat{y}_i^C = \hat{y}_i^B + \hat{y}_i^R. \tag*{(6)}

Here FR(⋅)F_R(\cdot) denotes the residual ANN mapping. The residual loss is expressed as

LR=1N∑i=1N(ri−y^iR)2+λ1,R∥θR∥1.(7)\mathcal{L}_R = \frac{1}{N}\sum_{i=1}^{N}(r_i-\hat{y}_i^R)^2+\lambda_{1,R}\lVert\theta_R\rVert_1. \tag*{(7)}

The residual-network parameter vector is θR\theta_R, and λ1,R\lambda_{1,R} weights its L1 penalty. L2 weight decay λ2,R\lambda_{2,R} is applied during training. The corrected prediction is evaluated without updating the base network.

For each case study, one output is carried forward for detailed residual-score assessment. The selection uses the relative validation improvement,

Δval=RMSEvalB−RMSEvalCRMSEvalB,(8)\Delta_{\mathrm{val}} = \frac{\mathrm{RMSE}_{\mathrm{val}}^B-\mathrm{RMSE}_{\mathrm{val}}^C}{\mathrm{RMSE}_{\mathrm{val}}^B}, \tag*{(8)}

where RMSEvalB\mathrm{RMSE}_{\mathrm{val}}^B and RMSEvalC\mathrm{RMSE}_{\mathrm{val}}^C are the validation RMSE values of the base and corrected predictions, respectively. A positive Δval\Delta_{\mathrm{val}} means that residual correction lowers validation RMSE. The selected output has the largest positive Δval\Delta_{\mathrm{val}} among the outputs for which training RMSE also decreases. This rule is applied before any test result is examined.

Residual-score calibration and reliability classification

The validation split supplies the empirical link between observed base-model error and the residual score. For each validation observation,

ei=∣yi−y^iB∣,si=∣y^iR∣.(9)e_i = \lvert y_i-\hat{y}_i^B\rvert,\qquad s_i=\lvert\hat{y}_i^R\rvert. \tag*{(9)}

The observed absolute base error eie_i requires a known output yiy_i, while the residual score sis_i is also available at a new operating point. Both quantities are calculated for the same validation observation before threshold calibration. Spearman rank correlation is calculated between eie_i and sis_i.

The continuous quantities are converted to reference and predicted classes with percentile thresholds,

Te(pe)=Ppe(e),zitrue=I[ei≥Te(pe)],T_e(p_e)=P_{p_e}(e),\qquad z_i^{\mathrm{true}}=\mathbb{I}[e_i\geq T_e(p_e)],
Ts(ps)=Pps(s),zipred=I[si≥Ts(ps)].(10)T_s(p_s)=P_{p_s}(s),\qquad z_i^{\mathrm{pred}}=\mathbb{I}[s_i\geq T_s(p_s)]. \tag*{(10)}

Here, Pp(⋅)P_p(\cdot) denotes the empirical pth percentile, pep_e and psp_s are the candidate error and score percentiles, and TeT_e and TsT_s are the resulting numerical thresholds. I[⋅]\mathbb{I}[\cdot] is an indicator function that equals one when its condition is met and zero otherwise. Thus, zitrue=1z_i^{\mathrm{true}}=1 identifies a validation observation with high observed base error, while zipred=1z_i^{\mathrm{pred}}=1 identifies an observation with a high residual score. The candidate grids are pe,ps∈{80,81,…,95}p_e,p_s \in\{80,81,\ldots,95\}. For every pair, these two labels are cross-matched for the same validation observations, and precision, recall, and F1F_1 are computed as

Precision⁡=TPTP+FP,Recall⁡=TPTP+FN,F1=2Precision⁡Recall⁡Precision⁡+Recall⁡.(11)\operatorname{Precision}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FP}},\qquad\operatorname{Recall}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}},\qquad F_1=\frac{2\operatorname{Precision}\operatorname{Recall}}{\operatorname{Precision}+\operatorname{Recall}}. \tag*{(11)}

In these expressions, TP is the number of observations labelled high by both zitruez_i^{\mathrm{true}} and zipredz_i^{\mathrm{pred}}, FP is the number labelled high by the score but not by the observed error, and FN is the number labelled high by the observed error but not by the score. The pair with the highest validation F1F_1 is selected. Receiver operating characteristic (ROC) curves and their area under the curve (AUC) are calculated from the validation labels and residual scores.

The selected TeT_e and TsT_s are fixed before test evaluation. A point with s(x)<Tss(x)<T_s is assigned to GMR. A point with s(x)≥Tss(x)\geq T_s is assigned to WMR. GMR and WMR locate a point’s residual score relative to the locked validation threshold.

The high-error reference class is also defined from validation percentiles, so F1F_1 measures agreement with a relative error label. Where an accepted process-error limit is available, it can replace the percentile definition of TeT_e within the same calibration procedure.

Constrained optimisation and local assessment

Pyomo [36] is used to write the fitted base networks, process constraints, and objective as one nonlinear programme. The trained surrogate is evaluated within the optimisation problem [8, 10]. The general problem is formulated as

max⁡xJ(x)subject toyqLB≤y^qB(x)≤yqUB,q∈PDM2(x~)≤δ20≤xj≤1,j∈X,(12)\begin{aligned} \max_x\quad&J(x)\\ \text{subject to}\quad&y_q^{\mathrm{LB}}\leq\hat{y}_q^{B}(x)\leq y_q^{\mathrm{UB}},\quad q\in\mathcal{P}\\ &D_M^2(\tilde{x})\leq\delta^2\\ &0\leq x_j\leq1,\quad j\in\mathcal{X}, \tag*{(12)} \end{aligned}

where J(x)J(x) is the case-specific objective and P\mathcal{P} is the set of constrained outputs indexed by qq. y^qB(x)\hat{y}_q^{B}(x) is the base-ANN prediction for output qq, and yqLBy_q^{\mathrm{LB}} and yqUBy_q^{\mathrm{UB}} are its lower and upper permitted values. X\mathcal{X} indexes the process inputs. Mahalanobis distance [37] accounts for covariance when measuring separation from a multivariate reference distribution. Recent gas-turbine formulations [10, 17] use this distance to restrict data-driven optimisation to correlated plant-input combinations. The squared distance is written as

DM2(x~)=(x~−μ)TΣ+(x~−μ).(13)D_M^2(\tilde{x})=(\tilde{x}-\mu)^\mathsf{T}\Sigma^+(\tilde{x}-\mu). \tag*{(13)}

The mean vector μ\mu and covariance matrix Σ\Sigma are calculated from the reference inputs. The Moore-Penrose pseudoinverse [38], denoted by Σ+\Sigma^+, is used when the covariance matrix is singular. The empirical limit δ\delta restricts the search to a covariance-aware input region represented by the data. This excludes input combinations that satisfy individual bounds but are poorly represented jointly [16, 39].

The nonlinear programme is solved with IPOPT through the GAMS solver interface. IPOPT implements an interior-point filter line-search method [40] and returns a locally optimal constrained solution. The base surrogate remains in the objective and constraints so that residual assessment does not change the optimisation problem. After a solution x∗x^* has been returned, the residual network is evaluated at x∗x^*. Its score is s(x∗)=∣y^R(x∗)∣s(x^*)=\lvert\hat{y}^{R}(x^*)\rvert and is compared with the fixed TsT_s.

A residual-informed indicator band is centred on the corrected prediction. Its scale is defined as

b=∣y^R(x∗)∣2,σR=b1.96.(14)b=\frac{\left|\hat{y}^{R}(x^*)\right|}{2},\qquad\sigma_R=\frac{b}{1.96}. \tag*{(14)}

The half-range bb equals half the residual score and bounds the sampled perturbations. σR\sigma_R is the standard deviation of the normal distribution before truncation. Five hundred values are sampled from the zero-centred normal distribution and restricted to [−b,b][-b,b],

ϵk∼N(0,σR2),−b≤ϵk≤b,y^(k)=y^C(x∗)+ϵk,k=1,…,500,(15)\epsilon_k \sim\mathcal{N}(0,\sigma_R^2), \qquad-b \le\epsilon_k \le b, \qquad\hat{y}^{(k)} = \hat{y}^{C}(x^*) + \epsilon_k, \qquad k=1,\ldots,500, \tag*{(15)}

The 2.5th and 97.5th empirical percentiles of y^(k)\hat{y}^{(k)} form the reported band. The indicator band visualises sampled perturbations around the corrected prediction for comparison among solutions, with its width set by the residual score.

Results and Discussion

Model performance and residual-score screening are evaluated before computed optimisation solutions are labelled GMR or WMR. The refinery simulation is considered first because its controlled input variation provides a direct test of approximation error. The gas turbine study then applies the TSRL framework to sensor-based industrial records that contain measurement variation and a less uniform operating history.

Case Study 1. Oil Refinery

Rigorous process model

The refinery case study is built on a steady-state Aspen HYSYS model of an industrial crude distillation unit (CDU) that replicates an operating unit with a design throughput of 291.7 t/h. The flowsheet comprises the crude preheat train, the fired heater, and the atmospheric column with its side strippers and pump-around circuits, and delivers the product slate of the real unit, including fuel gas, LPG, stabilised naphtha, heavy naphtha, Kerosene, gas oil, and atmospheric residue (fuel oil). The four crude oils are characterised in the HYSYS Oil Manager from their laboratory assays (true-boiling-point curves, light-ends compositions, and gravity data), and vapour–liquid equilibrium is described using an equation of state (EOS). The model was validated against plant operating data in earlier work [41]. The flow rates and product draw temperatures match plant records to within a few percent, and the simulated ASTM D86 5–95% gaps between adjacent cuts reproduce the measured separation quality. Throughout this work, this validated model is treated as the ground-truth response function whose input–output behaviour is learned by TSRL, with local modelling strength assessed for the resulting surrogates.

Crude blend input space and sampling design

The operational degrees of freedom are the blend fractions of four commercially traded crudes, namely Basrah, Arab Heavy, Arab Medium, and Kuwait, spanning the light-to-heavy API range processed by the unit. The total feed rate is held at the design throughput, so a blend is fully specified by the fraction vector w=(w1,…,w4)\mathbf{w}=(w_1,\ldots,w_4) with wj≥0w_j \ge0 and ∑j=14wj=1\sum_{j=1}^{4} w_j=1. Design points are generated by Latin hypercube sampling (LHS), selected for its stratified marginal coverage at moderate sample sizes [42, 43]. A raw design in the four-dimensional unit hypercube was drawn with the scipy.stats.qmc implementation under a fixed random seed for reproducibility, and each point was projected onto the simplex by normalisation,

wij=zij∑ℓ=14ziℓ,j=1,…,4.(16)w_{ij} = \frac{z_{ij}}{\sum_{\ell=1}^{4} z_{i\ell}}, \qquad j=1,\ldots,4. \tag*{(16)}

The projection does not preserve the strict one-dimensional stratification of the hypercube design, and the normalised fractions concentrate mildly towards the simplex centroid relative to a uniform (flat Dirichlet) distribution. However, it retains the space-filling character of LHS over the feasible blend space while guaranteeing that every sample satisfies the unit-sum constraint exactly. No crude was constrained away from zero, allowing near-vertex blends (one crude dominant) and near-centroid blends.

Automated simulation campaign

The sampling campaign was executed through a programmatic Python–HYSYS interface using an object-model approach to integrate Python with the process simulator [44]. The simulator is driven over the ActiveX/COM automation layer (pywin32), and a HYSYS Spreadsheet operation embedded in the flowsheet serves as the single input–output interface. Its input cells are linked to the four blend fractions and its output cells import the monitored flowsheet variables, so the Python driver does not address individual unit operations directly. This design decouples the sampling logic from the flowsheet topology and makes the driver reusable across model revisions.

For each design point the driver executes a hold–write–release cycle. The solver is paused (Solver.CanSolve = False), the four blend fractions are written to the spreadsheet input cells, and the solver is released, after which the flowsheet re-converges from the previous solution as a warm start. The output cells are then read back before the driver proceeds to the next sample.

Data description

The refinery modelling dataset contains Nref=817N_{\mathrm{ref}} = 817 simulation observations. The seven inputs are the Basrah, Arab Heavy, Arab Medium, and Kuwait crude flow rates, reboiler duty, and two condenser loads. The seven outputs are Light Naphtha, Gases, Heavy Naphtha, Kerosene, AGO, Fuel Oil, and carbon dioxide (CO2\mathrm{CO}_2). Table 2 reports the retained ranges. The crude rates span near-zero values to about 56–65 kg/s, which permits wide blend variation. The full reboiler-duty range, in contrast, is about 3.5% of its mean. The gas stream is zero or near zero for much of the dataset and has a small number of larger observations. This imbalance affects its regression metrics.

VariableMeanSDMinimumMedianMaximum
Basrah (kg/s)20.2411.020.0120.1055.71
Arab Heavy (kg/s)19.879.920.1220.3158.18
Arab Medium (kg/s)20.5010.980.0620.7658.33
Kuwait (kg/s)20.4110.840.0421.0964.82
Reboiler duty (kW)35,297.00193.0034,638.0035,300.0035,860.00
Condenser 1 (kW)6,399.96239.554,850.556,417.137,021.43
Condenser 2 (kW)13,314.49439.5310,230.6713,316.2914,629.20
Light Naphtha (kg/s)5.240.144.805.235.63
Gases (kg/s)0.00310.01790.00000.00000.3245
Heavy Naphtha (kg/s)2.920.162.442.913.40
Kerosene (kg/s)12.250.3011.5112.2513.26
AGO (kg/s)11.700.1511.2611.7112.13
Fuel Oil (kg/s)46.160.5844.2046.1647.65
CO2_2 (kg/h)8,354.8845.718,198.818,355.578,488.15

Table 2. Descriptive statistics for the refinery variables. Values use two decimal places except the low-flow gas stream, which uses four.

Figure 2(a) presents four representative bivariate relations. Kerosene rises with Arab Medium flow, while Light Naphtha falls as Arab Heavy increases. The corresponding Spearman correlations in Figure 2(c) are 0.92 and −0.88 for the two pairs respectively. Figure 2(c) also associates Arab Medium with Fuel Oil at −0.90 and Arab Heavy with Fuel Oil at 0.65. Meanwhile, Figure 2(b) compares the relative crude contributions represented in each product stream. Figure 2(c) further indicates that reboiler duty is positively associated with Kerosene at 0.78 and CO2\mathrm{CO}_2 at 1.00, while its correlation with Fuel Oil is −0.80.

Data characteristics for the crude distillation unit

Figure 2. Data characteristics for the crude distillation unit. Panel (a) shows kerosene increasing with Arab Medium flow while Light Naphtha decreases with Arab Heavy flow. Panel (b) shows relative crude contributions to product streams. Panel (c) shows the Spearman correlation map of the input and output variables.

Surrogate performance and residual screening

Figure 3 presents the base-ANN parity plots on the training, validation, and test splits. Figure 3(a)–(Figure 3d), (Figure 3f), and (Figure 3g) place Light Naphtha, Heavy Naphtha, Kerosene, Fuel Oil, CO2\mathrm{CO}_2, and AGO close to the one-to-one line. Figure 3(b) gives a test R2R^2 of 0.98 for Heavy Naphtha, while Figure 3(a), (Figure 3c), (Figure 3d), (Figure 3f), and (Figure 3g) each give a value greater than 0.99. The corresponding test RMSE values are 21.2 g/s for Heavy Naphtha in Figure 3(b), 10.3 g/s for Fuel Oil in Figure 3(d), and 0.78 kg/h for CO2\mathrm{CO}_2 in Figure 3(f). The six non-gas prediction errors are small relative to the observed response ranges. In contrast, Figure 3(e) shows a poor fit for the gas stream. For the gas stream, the zero median and occasional larger flows make a small RMSE insufficient evidence of a useful fit. The test R2R^2 of −2.17-2.17 in Figure 3(e) confirms that the model does not explain the variation among the less frequent non-zero observations and is less informative than the test-mean baseline.

Base-model parity plots across training, validation, and test data for Light Naphtha, Heavy Naphtha, Kerosene, Fuel Oil, Gases, CO2, and AGO

Figure 3. Base-model parity plots across training, validation, and test data for (a) Light Naphtha, (b) Heavy Naphtha, (c) Kerosene, (d) Fuel Oil, (e) Gases, (f) CO2_2, and (g) AGO. The six non-gas surrogates provide reasonable simulator approximations within the sampled range.

Table 3 shows that the effect of residual correction depends on the output. Corrections make only small changes to Heavy Naphtha, Kerosene, and AGO, but increase Light Naphtha test RMSE from 10.9 to 18.7 g/s. The Gases test R2R^2 remains negative at −2.02, despite residual correction. For CO2_2, validation RMSE falls from 0.91 to 0.66 kg/h, while test RMSE rises from 0.78 to 2.55 kg/h. Fuel Oil shows the largest validation gain, with RMSE decreasing from 7.4 to 4.1 g/s, and its training RMSE also falls from 10.5 to 4.9 g/s. Fuel Oil is selected for the detailed reliability analysis under the rule in Equation (8). Its test RMSE falls from 10.3 to 4.7 g/s, a reduction of about 54%.

TargetMetricTraining BaseTraining CorrectedValidation BaseValidation CorrectedTest BaseTest Corrected
Light Naphtha (kg/s)RMSE0.02180.02430.02090.02050.01090.0187
Light Naphtha (kg/s)R2R^20.97450.96830.97340.97430.99450.9838
Gases (kg/s)RMSE0.01970.01950.01820.01810.00860.0083
Gases (kg/s)R2R^2−0.0336−0.01710.07020.0814−2.1670−2.0193
Heavy Naphtha (kg/s)RMSE0.01920.01930.01950.01940.02120.0214
Heavy Naphtha (kg/s)R2R^20.98600.98590.98500.98520.98190.9816
Kerosene (kg/s)RMSE0.00480.00480.00580.00520.00370.0038
Kerosene (kg/s)R2R^20.99970.99970.99960.99970.99980.9998
AGO (kg/s)RMSE0.00380.00350.00390.00360.00340.0033
AGO (kg/s)R2R^20.99940.99950.99930.99940.99960.9996
Fuel Oil (kg/s)RMSE0.01050.00490.00740.00410.01030.0047
Fuel Oil (kg/s)R2R^20.99970.99990.99980.99990.99970.9999
CO2_2 (kg/h)RMSE10.37316.53860.91250.65670.78152.5496
CO2_2 (kg/h)R2R^20.95030.98020.99960.99980.99970.9966

Table 3. Base and residual-corrected performance for the crude distillation unit.

Fuel Oil residual reliability diagnostic The selected Fuel Oil surrogate is examined for local modelling strength (Table 3). Figure 4(a) compares predicted and true signed residuals. The RMSE and MAE values are 4.9 and 3.8 g/s for training, 4.1 and 3.4 g/s for validation, and 4.7 and 3.7 g/s for testing. The similar errors across the splits indicate that the correction model retains its point-prediction performance on unseen data. Figure 4(b) places most test correction errors near zero, although a small number of observations extend beyond 10 g/s in either direction. On the validation split, the absolute base error and the residual score have a Spearman correlation of 0.59. The calibration selects the 94th percentile of observed absolute base error and the 93rd percentile of residual score, which gives the 11.92 g/s residual-score threshold drawn in Figure 4(d). Figure 4(c) gives a validation AUC of 0.99. Figure 4(d) then applies the locked thresholds to the test split and gives 110 true negatives, 10 true positives, 2 false positives, and 1 false negative. These counts correspond to a precision of 0.83, recall of 0.91, and F1F_{1} of 0.87. The score detects 10 of the 11 high-error Fuel Oil observations in the test split.

Fuel Oil residual and reliability-screening analysis

Figure 4. Fuel Oil residual and reliability-screening analysis showing (a) predicted and true signed residuals, (b) 50-bin test correction-error distribution, (c) validation ROC curve, and (d) residual-score classification profile on the test split with the locked threshold.

Optimisation Cases

CO2CO_{2}-constrained production study The refinery objective adds the normalised product predictions and subtracts the three scaled utility inputs. The optimisation problem is written as

max⁡xJref(x)=∑p∈Prefy^pB(x)−ypmin⁡ypmax⁡−ypmin⁡−xDuty−xC1−xC2subject to80≤∑j∈Cx~j≤82−2≤∑j∈Cx~j−∑p∈Prefy^pB(x)≤2ypLB≤y^pB(x)≤ypUB,p∈PrefyCO2LB≤y^CO2B(x)≤yCO2capDM2(x~)≤δref20≤xj≤1,j∈X.(17)\begin{aligned} \max_{x}\quad J_{\mathrm{ref}}(x) &= \sum_{p\in\mathcal{P}_{\mathrm{ref}}} \frac{\hat{y}^{B}_{p}(x)-y^{\min}_{p}}{y^{\max}_{p}-y^{\min}_{p}}-x_{\mathrm{Duty}}-x_{\mathrm{C1}}-x_{\mathrm{C2}}\\ \text{subject to}\quad80 &\le\sum_{j\in\mathcal{C}}\tilde{x}_{j}\le82\\ -2 &\le\sum_{j\in\mathcal{C}}\tilde{x}_{j}-\sum_{p\in\mathcal{P}_{\mathrm{ref}}}\hat{y}^{B}_{p}(x)\le2\\ y^{\mathrm{LB}}_{p} &\le\hat{y}^{B}_{p}(x)\le y^{\mathrm{UB}}_{p},\qquad p\in\mathcal{P}_{\mathrm{ref}}\\ y^{\mathrm{LB}}_{\mathrm{CO}_{2}} &\le\hat{y}^{B}_{\mathrm{CO}_{2}}(x)\le y^{\mathrm{cap}}_{\mathrm{CO}_{2}}\\ D^{2}_{M}(\tilde{x}) &\le\delta_{\mathrm{ref}}^{2}\\ 0 &\le x_{j}\le1,\qquad j\in\mathcal{X}. \tag*{(17)} \end{aligned}

The refinery objective Jref(x)J_{\mathrm{ref}}(x) is dimensionless. ypmin⁡y^{\min}_{p} and ypmax⁡y^{\max}_{p} are the limits used to normalise each product prediction. The terms xDutyx_{\mathrm{Duty}}, xC1x_{\mathrm{C1}}, and xC2x_{\mathrm{C2}} are the scaled utility decisions. The set C\mathcal{C} contains the four crude feeds, and x~j\tilde{x}_{j} is the physical flow of feed jj. The product set Pref\mathcal{P}_{\mathrm{ref}} contains Light Naphtha, Gases, Heavy Naphtha, Kerosene, AGO, and Fuel Oil. Throughput is held between 80 and 82 kg/s. The approximate balance allows a difference of at most 2 kg/s between total crude feed and predicted product flow. yCO2LBy^{\mathrm{LB}}_{\mathrm{CO}_{2}} is the lower bound on predicted CO2_2, yCO2capy^{\mathrm{cap}}_{\mathrm{CO}_{2}} is the selected CO2_2 ceiling, and δref\delta_{\mathrm{ref}} is the refinery Mahalanobis-distance limit. The objective assigns unit weights to the six scaled product predictions and three scaled utility penalties.

Figure 5 is a parallel-coordinate comparison of the grey refinery simulation observations and the coloured solutions obtained under different CO2_2 ceilings. It compares the joint changes in crude blend, utility inputs, predicted emissions, and product rates while the input-domain constraint is maintained. The numerical solution values and residual assessments are given in Table 4.

CO2_2 limit (kg/h)Base-model CO2_2 (kg/h)Corrected Fuel Oil (kg/s)Residual score (g/s)Band half-width (g/s)Model region
8,198.88,198.844.2113.106.30WMR
8,240.28,235.244.2226.1012.60WMR
8,281.58,276.544.2335.1017.50WMR
8,322.88,317.844.2549.7023.60WMR
8,364.28,359.244.2665.7032.90WMR
8,405.58,400.544.2884.3041.10WMR
8,446.88,441.844.30101.5049.40WMR
Unconstrained8,198.844.2113.106.30WMR

Table 4. Fuel Oil model-region assessment for the refinery CO2_2 sweep. The band is centred on corrected Fuel Oil, and its half-width is given in g/s. CO2_2 is rounded to one decimal place and the remaining quantities to two.

Parallel-coordinate comparison of grey refinery simulation observations and coloured optimisation solutions under different CO2 ceilings

Figure 5. Parallel-coordinate comparison of grey refinery simulation observations and coloured optimisation solutions under different CO2_2 ceilings. The figure relates the crude blend and utility inputs to the predicted emissions and product rates for solutions that satisfy the imposed input-domain constraint.

All solutions in Table 4 exceed the locked Fuel Oil residual-score threshold of 11.92 g/s and are labelled WMR. The score is 13.1 g/s at the tightest CO2_2 limit of 8,198.8 kg/h and rises to 101.5 g/s at 8,446.8 kg/h. The indicator half-width increases from 6.3 to 49.4 g/s over the same range. The first solution lies close to the threshold, whereas the remaining scores move progressively farther above it. These domain-compliant solutions have high Fuel Oil residual scores.

Arab Heavy contract sensitivity In this case, the Arab Heavy operating level is held near a prescribed scaled target while the remaining variables are re-optimised. Mathematically, this constraint is written as

−0.01≤xArabHeavy−xArabHeavytarget≤0.01.(18)-0.01 \le x_{\mathrm{ArabHeavy}} - x^{\mathrm{target}}_{\mathrm{ArabHeavy}} \le0.01. \tag*{(18)}

Here, xArabHeavyx_{\mathrm{ArabHeavy}} is the optimised scaled Arab Heavy input and xArabHeavytargetx^{\mathrm{target}}_{\mathrm{ArabHeavy}} is its prescribed scaled target. Because the physical Arab Heavy range is 0.12 to 58.18 kg/s, a scaled tolerance of 0.01 corresponds to about 0.58 kg/s. This explains the difference between nominal and optimised physical values in Table 5.

Arab Heavy target (kg/s)Optimised Arab Heavy (kg/s)Corrected Fuel Oil (kg/s)Residual score (g/s)Band half-width (g/s)Model region
51.7351.1546.559.204.50GMR
45.2844.6945.9811.005.30GMR
38.8338.2445.6810.405.20GMR
32.3831.7945.417.303.50GMR
25.9325.3445.116.003.00GMR
19.4818.8944.788.704.20GMR
13.0212.4444.4312.306.00WMR
6.577.1644.2114.607.00WMR
0.120.7144.2223.7011.90WMR

Table 5. Fuel Oil model-region assessment for the Arab Heavy sensitivity. The band is centred on corrected Fuel Oil, and its half-width is given in g/s.

The contract sensitivity examines changes in the refinery predictions as Arab Heavy availability varies while the total crude-flow constraint is preserved. Figure 6(a) presents the re-optimised crude blend as the Arab Heavy target decreases from 51.73 to 0.12 kg/s. In Figure 6(a), Arab Medium and Kuwait provide most of the replacement feed, while Basrah remains comparatively small. Figure 6(b) relates the resulting Kerosene and corrected Fuel Oil predictions. In Figure 6(b), Kerosene rises from about 12.2 to 13.1 kg/s, whereas Fuel Oil falls from 46.55 to 44.22 kg/s. These values convey a predicted shift in the product slate towards Kerosene and away from Fuel Oil as Arab Heavy availability is reduced.

Arab Heavy sensitivity results showing re-optimised crude blend and resulting changes in kerosene and corrected Fuel Oil predictions

Figure 6. Arab Heavy sensitivity results showing (a) re-optimised crude blend as the Arab Heavy target falls and (b) resulting changes in kerosene and corrected Fuel Oil predictions. Both panels show a predicted shift towards kerosene as Arab Heavy availability decreases.

For Arab Heavy targets down to 19.48 kg/s, the solutions remain in GMR (Table 5). Lower targets move to WMR as Arab Medium and Kuwait replace more of the Arab Heavy feed under the same throughput constraint. The resulting change in product slate is accompanied by larger predicted Fuel Oil corrections. The score at the 13.02 kg/s target is only 0.38 g/s above TsT_s.

Case Study 2. 395 MW Industrial Gas Turbine System

System and data description

The plant study by Ashraf and Dua [7] provides records from a 395 MW gas turbine unit for the industrial case. Ambient air is compressed before entering the combustion system. Preheated natural gas is mixed with the compressed air and undergoes combustion. The hot combustion products expand through the gas turbine to drive the electrical generator. The exhaust supplies a heat recovery steam generator for the associated steam cycle. The present analysis models the gas turbine at unit level through the variables that describe its air path, fuel path, ambient conditions, and performance.

The selection of input variables follows the source study [7], in which plant process and performance engineers identified variables used during power ramp-up and ramp-down. Compressor discharge pressure (CDP) and compressor discharge temperature (CDT) represent the compressed-air state before combustion. Gas fuel flow rate (GFFR), performance-heater gas outlet temperature (PHGOT), and fuel gas temperature at the combustion-chamber inlet (FGT) describe the fuel-side operating state. Ambient temperature (AT), ambient pressure (AP), and ambient humidity (AH) represent the air conditions of the site. The three output variables to be modelled are unit electrical power generation (Power), thermal efficiency (TE), and turbine heat rate (THR). The descriptive statistics of the dataset [7] are provided in Table 6. The input and output variables cover wide operating ranges, and Power varies from 185.7 to 395.7 MW. These ranges indicate that ramping operation of the gas turbine is represented in the data.

VariableMinimumMedianMaximumMeanSD
Compressor discharge temperature (°F)813.00847.80925.80861.0034.20
Compressor discharge pressure (psi)185.90232.70312.00247.9036.90
Gas fuel flow rate (lb/s)28.5637.8149.8339.205.67
Performance-heater gas outlet temperature (°F)399.50411.20424.90411.202.50
Fuel gas temperature at combustor inlet (°F)484.00517.60534.90513.5014.80
Ambient temperature (°C)20.5025.6034.8026.303.60
Ambient pressure (hPa)982.70988.70991.80988.102.00
Ambient humidity (%)34.2067.6098.0066.4014.10
Thermal efficiency (%)32.4439.0243.0538.962.38
Power (MW)185.70280.30395.70296.4059.50
Turbine heat rate (kJ/kWh)8,363.009,227.0011,099.009,275.00585.00

Table 6. Descriptive statistics for the gas turbine dataset. All values use two decimal places.

Base and corrected surrogate performance

Residual correction is evaluated separately for Power, TE, and THR. Figure 7(a)(Figure 7i) places the Power predictions close to the one-to-one line, with a test RMSE of 1.02 MW over the observed range of 185.7 to 395.7 MW and R2>0.99R^2 > 0.99. Figure 7(a)(iii) gives a TE test RMSE of 0.46 percentage points and R2=0.96R^2 = 0.96. In contrast, Figure 7(a)(ii) shows wider scatter for THR, particularly at higher values, with a test RMSE of 151 kJ/kWh and R2=0.94R^2 = 0.94. Figure 7(b)(Figure 7i)–(iii) compares measured, base, and corrected THR distributions on the training, validation, and test splits. Residual correction lowers THR error across all three splits, with the largest relative validation gain among the gas turbine outputs. Test RMSE falls from 151 to 105 kJ/kWh.

Gas turbine model performance showing base-model parity plots for Power, THR, and TE, alongside density curves of measured, base, and corrected THR on the training, validation, and test splits

Figure 7. Gas turbine model performance showing (a) base-model parity plots for Power, THR, and TE, alongside (b) density curves of measured, base, and corrected THR on the training, validation, and test splits.

The effect of correction differs among the gas turbine outputs (Table 7). Power test RMSE increases from 1.02 to 1.08 MW, while TE test RMSE remains at 0.46 percentage points. THR validation RMSE decreases from 158 to 99 kJ/kWh, which is a 37% improvement. Its test RMSE decreases from 151 to 105 kJ/kWh and test R2R^2 rises from 0.94 to 0.97. THR has the largest validation improvement and is selected for the detailed reliability analysis.

TargetMetricTrainingValidationTest
Power (MW)RMSEBase: 0.90Corrected: 0.79Base: 0.95Corrected: 0.84Base: 1.02Corrected: 1.08
R2R^2Base: 0.9998Corrected: 0.9998Base: 0.9997Corrected: 0.9998Base: 0.9997Corrected: 0.9997
THR (kJ/kWh)RMSEBase: 147.27Corrected: 88.00Base: 158.19Corrected: 99.02Base: 151.08Corrected: 104.86
R2R^2Base: 0.9342Corrected: 0.9765Base: 0.9334Corrected: 0.9739Base: 0.9361Corrected: 0.9692
Thermal efficiency (%)RMSEBase: 0.38Corrected: 0.38Base: 0.39Corrected: 0.39Base: 0.46Corrected: 0.46
R2R^2Base: 0.9739Corrected: 0.9738Base: 0.9740Corrected: 0.9743Base: 0.9636Corrected: 0.9638

Table 7. Gas turbine base and residual-corrected performance.

THR residual reliability diagnostic

THR residual-score screening is evaluated against the high-error reference labels. Figure 8(a) compares predicted and true signed residuals and gives Spearman correlations of 0.80 for training, 0.75 for validation, and 0.72 for testing. Figure 8(a) also reports residual RMSE values of 88, 99, and 105 kJ/kWh and MAE values of 68, 80, and 83 kJ/kWh across the same splits. These values indicate that the model captures much of the direction and ordering of the required correction. The test correction-error distribution is centred near zero but extends from about −300-300 to +300+300 kJ/kWh (Figure 8(b)). Residual correction lowers average THR error, although some individual corrections remain inaccurate. Screening uses the residual magnitude rather than its sign. On the validation split, the Spearman correlation between absolute base error and residual score is 0.35. The calibration selects an observed-error threshold of 208.62 kJ/kWh and a residual-score threshold of 161.32 kJ/kWh, and Figure 8(c) gives a validation AUC of 0.78. Figure 8(d) applies these fixed thresholds to the test split and gives 79 true negatives, 12 true positives, 8 false positives, and 10 false negatives. These counts correspond to a precision of 0.60, recall of 0.55, and F1F_1 of 0.57, which indicates moderate discrimination.

THR residual and reliability-screening analysis

Figure 8. THR residual and reliability-screening analysis showing (a) predicted and true signed residuals, (b) test correction-error distribution, (c) validation ROC curve, and (d) residual-score density and test classification with the locked threshold.

Thermal-efficiency optimisation across fuel-flow targets

The gas turbine study maximises the base-model TE prediction while keeping the three base outputs within their observed ranges. The Mahalanobis limit is set to the 95th percentile of the reference distances. A scaled GFFR target is imposed to examine the solution along the fuel-flow range. The optimisation problem for the gas turbine is written as

max⁡xy^TEB(x)subject toyqLB≤y^qB(x)≤yqUBq∈{TE,Power,THR}DM2(x~)≤δ9520≤xj≤1j∈X−0.01≤xGFFR−xGFFRtarget≤0.01.(19)\begin{aligned} \max_{x}\quad&\hat{y}^{B}_{\mathrm{TE}}(x) \\ \text{subject to}\quad&y^{\mathrm{LB}}_{q} \le\hat{y}^{B}_{q}(x) \le y^{\mathrm{UB}}_{q} && q \in\{\mathrm{TE},\mathrm{Power},\mathrm{THR}\} \\ &D^{2}_{M}(\tilde{x}) \le\delta_{95}^{2} \\ &0 \le x_{j} \le1 && j \in\mathcal{X} \\ &-0.01 \le x_{\mathrm{GFFR}} - x_{\mathrm{GFFR}}^{\mathrm{target}} \le0.01. \tag*{(19)} \end{aligned}

In Equation (19), y^B(x)\hat{y}^{B}(x) is the base-ANN prediction of thermal efficiency and qq indexes the constrained outputs TE, Power, and THR. yqLBy^{\mathrm{LB}}_{q} and yqUBy^{\mathrm{UB}}_{q} are the corresponding output bounds. δ95\delta_{95} is the 95th-percentile Mahalanobis-distance limit, and xGFFRtargetx_{\mathrm{GFFR}}^{\mathrm{target}} is the prescribed scaled GFFR target around which xGFFRx_{\mathrm{GFFR}} may vary by 0.01. The nominal scaled targets are 0.2, 0.4, 0.6, 0.8, and 1.0. Using the observed range of 28.56 to 49.83 lb/s, the operating levels of GFFR correspond to nominal physical targets of 32.81, 37.07, 41.32, 45.58, and 49.83 lb/s. The scaled tolerance of 0.01 permits an adjustment of about 0.21 lb/s. IPOPT solves each case through the GAMS solver interface, after which the THR residual model supplies the signed correction, its magnitude as the score, and the indicator band.

Predicted TE reaches the observed upper bound of 43.05% at the 0.8 GFFR target (Table 6), then falls at the 1.0 target. At the 0.8 target, the TE bound is active and the THR residual score gives the only GMR label. The large negative THR corrections at the three lower GFFR targets shift to a positive correction at the highest target, whose score is only 1.74 kJ/kWh above TsT_{s} (Table 8).

Scaled GFFRNominal GFFR (lb/s)Base-model TE (%)Signed THR residual (kJ/kWh)THR indicator band (kJ/kWh)Model region
0.232.8138.74−462.319, 208.45 ± 224.24WMR
0.437.0741.30−424.978, 727.05 ± 206.14WMR
0.641.3242.94−229.658, 432.24 ± 114.46WMR
0.845.5843.05−106.298, 480.86 ± 50.38GMR
1.049.8342.44163.068, 525.73 ± 81.53WMR

Table 8. Gas turbine optimisation and post-optimisation THR assessment. The THR indicator band is centred on the corrected THR prediction.

Conclusion

ML surrogates can be accurate on their aggregated scores while their predictive accuracy varies across the local input space. The variation in local predictive accuracy limits their use in the decision-making for operation of safety-critical thermal systems. This paper developed the TSRL framework, which attaches a point-specific modelling-strength label (good or weak) to each computed optimal solution, facilitating the decision-making for the operation of thermal systems. As a case study, The TSRL framework is applied to a simulated crude distillation unit and a 395 MW industrial gas turbine and the strength of computed optimal solutions under various operating scenarios is investigated.

Residual correction improved Fuel Oil and THR predictions, although its effect depended on the output. Screening was more effective for Fuel Oil than for THR. All eight solutions of the refinery CO2_{2} sweep satisfied the Mahalanobis constraint but were labelled WMR, and the Arab Heavy sensitivity moved to WMR at the three lowest targets. For the gas turbine, the scaled GFFR target of 0.8 gave the highest predicted TE and the only GMR label among the five targets.

The domain constraints keep the solution search close to the data envelopes, while the residual score distinguishes GMR and WMR within the data-driven domain. The optimal solutions computed through TSRL ensures input-domain compliance and providing the information about the local modelling strength which facilitates the decision-making for the operation of thermal systems.

Limitations and future work

The thresholds are calibrated for one simulated refinery dataset and one gas turbine unit, which limits their transfer across operating regimes. Transfer to another unit will require checking score calibration against its operating data and, where available, an engineering error limit. The present GMR and WMR labels remain relative to validation error percentiles. A single random split was used for each case, leaving sensitivity to alternative partitions and temporal drift unquantified. Repeated and chronological partitions could assess this sensitivity as additional industrial units and operating regimes are tested. Screened optimisation solutions also require independent checks through simulator reruns or controlled plant trials.

Author statement

Talha Ansar: Methodology, Formal Analysis, Writing – Original Draft, Waqar Muhammad Ashraf: Conceptualization, Validation, Data Curation, Methodology, Writing – Review & Editing, Abdulelah S. Alshehri: Methodology, Writing – Review & Editing, Funding Omar Bayomie: Conceptualization, Methodology, Validation, Data Curation, Software, Writing – Review & Editing, Project Supervision.

Acknowledgements

The authors acknowledge that they have used LLMs (Claude - Opus) for improving grammar and enhancing the readability of manuscript. They have thoroughly reviewed the article and take full responsibility of the work. Abdulelah S. Alshehri would like extend his appreciation to King Saud University for funding his research through the Ongoing Research Funding program, (ORF-2026-1455), King Saud University, Riyadh, Saudi Arabia.

Declaration of competing interests

The authors declare no competing financial or non-financial interests.

References

  1. [1]Yogesh Jaluria. Design and Optimization of Thermal Systems: With MATLAB Applications. CRC Press, 3 edition, 2019.DOI
  2. [2]Alexander I. J. Forrester and Andy J. Keane. Recent advances in surrogate-based optimization. Progress in Aerospace Sciences, 45(1–3):50–79, 2009.DOI
  3. [3]Athar Bhosekar and Marianthi Ierapetritou. Advances in surrogate based modeling, feasibility analysis, and optimization: A review. Computers & Chemical Engineering, 108:250–267, 2018.
  4. [4]Taoufiq Gueddar and Vivek Dua. Novel model reduction techniques for refinery-wide energy optimisation. Applied Energy, 89(1):117–126, 2012.DOI
  5. [5]Muhammad Ahmad Jamil, Waqar Muhammad Ashraf, Nida Imtiaz, Ben Bin Xu, Syed M. Zubair, Haseeb Yaqoob, Muhammad Imran, and Muhammad Wakil Shahzad. Machine learning-based process design of a novel sustainable cooling system. Energy Conversion and Management, 319:118941, 2024.DOI
  6. [6]Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural Networks, 2(5):359–366, 1989.DOI
  7. [7]Waqar Muhammad Ashraf and Vivek Dua. Driving towards net-zero from the energy sector: Leveraging machine intelligence for robust optimization of coal and combined cycle gas power stations. Energy Conversion and Management, 314:118645, 2024.DOI
  8. [8]Artur M. Schwindtmann and Alexander Mitsos. Deterministic global optimization with artificial neural networks embedded. Journal of Optimization Theory and Applications, 180(3):925–948, 2019.
  9. [9]Francesco Ceccon, Jordan Jalving, Joshua Haddad, Alexander Thebelt, Calvin Tsay, Carl D. Laird, and Ruth Misener. OMLT: Optimization & machine learning toolkit. Journal of Machine Learning Research, 23(349):1–8, 2022.arxiv.org/abs/2202.02414
  10. [10]Waqar Muhammad Ashraf, Abdulaleh S. Alshehri, Abdulrahman bin Jumah, Ghulam Moeen Uddin, Muhammad Akhtar, and Vivek Dua. Domain-enforced and operator-in-the-loop neural simulation platform for techno-economic performance enhancement of gas turbine system. Computers & Chemical Engineering, 206:109529, 2026.DOI
  11. [11]Ruth Misener and Lorenz Biegler. Formulating data-driven surrogate models for process optimization. Computers & Chemical Engineering, 179:108411, 2023.DOI
  12. [12]Yun Xu and Royston Goodacre. On splitting training and validation set: A comparative study of cross-validation, bootstrap and systematic sampling for estimating the generalization performance of supervised learning. Journal of Analysis and Testing, 2(3):249–262, 2018.DOI
  13. [13]Sudhir Varma and Richard Simon. Bias in error estimation when using cross-validation for model selection. BMC Bioinformatics, 7(1):91, 2006.pubmed.ncbi.nlm.nih.gov/16504092
  14. [14]Olaf Kahrs and Wolfgang Marquardt. The validity domain of hybrid models and its application in process optimization. Chemical Engineering and Processing: Process Intensification, 46(11):1054–1066, 2007.DOI
  15. [15]Artur M. Schweidtmann, Jana M. Weber, Christian Wende, Linus Netze, and Alexander Mitsos. Obey validity limits of data-driven models through topological data analysis and one-class classification. Optimization and Engineering, 23(2):855–876, 2022.
  16. [16]Hanna Meyer and Edzer Pebesma. Predicting into unknown space? estimating the area of applicability of spatial prediction models. Methods in Ecology and Evolution, 12(9):1620–1633, 2021.DOI
  17. [17]Waqar Muhammad Ashraf, Amir H. Keshavarzzadeh, Abdullah S. Alshehri, Abdulrahman bin Jumah, Ramit Debnath, and Vivek Dua. Domain-informed operation excellence of gas turbine system with machine learning. Energy Conversion and Management, 348:120789, 2026.
  18. [18]Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In Proceedings of the 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pages 1050–1059. PMLR, 2016.arxiv.org/abs/1506.02142
  19. [19]Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.arxiv.org/abs/1612.01474
  20. [20]Jakob Gawlikowski, Cedrique Rovile Njiuetcheu Tassi, Mohsin Ali, Jongseok Lee, Matthias Humt, Jianxiang Feng, Anna Kruspe, Rudolph Triebel, Peter Jung, Ribana Roscher, et al. A survey of uncertainty in deep neural networks. Artificial Intelligence Review, 56(Suppl 1):1513–1589, 2023.
  21. [21]Armando Cajahuarigа, Rubén Aquize Palacios, Juan M Mauricio Villanueva, Aurelio Morales-Villanueva, José Machuca, Juan Contreras, and Kiara Rodríguez Bautista. Uncertainty evaluation of a gas turbine model based on a nonlinear autoregressive exogenous model and monte carlo dropout. Sensors, 24(2):465, 2024.
  22. [22]Shu-Bo Yang, Zukui Li, and Wei Wu. Data-driven process optimization considering surrogate model prediction uncertainty: A mixture density network-based approach. Industrial & Engineering Chemistry Research, 60(5):2206–2222, 2021.DOI
  23. [23]Jerome H. Friedman. Greedy function approximation: A gradient boosting machine. The Annals of Statistics, 29(5):1189–1232, 2001.DOI
  24. [24]Marc C. Kennedy and Anthony O’Hagan. Bayesian calibration of computer models. Journal of the Royal Statistical Society. Series B, 63(3):425–464, 2001.DOI
  25. [25]Moritz von Stosch, Rui Oliveira, Joana Peres, and Sebastião Feydo de Azevedo. Hybrid semi-parametric modeling in process systems engineering: Past, present and future. Computers & Chemical Engineering, 60:86–101, 2014.DOI
  26. [26]William Bradley, Jinhyeun Kim, Zachary Kilwein, Logan Blakely, Michael Eydenberg, Jordan Jalvin, Carl Laird, and Fani Boukouvala. Perspectives on the integration between first-principles and data-driven modeling. Computers & Chemical Engineering, 166:107898, 2022.
  27. [27]Salem Lahlou, Moksh Jain, Hadi Nekoei, Victor Ion Butoi, Paul Bertin, Jarrid Rector-Brooks, Maksym Koraбlyov, and Yoshua Bengio. DEUP: Direct epistemic uncertainty prediction. arXiv preprint arXiv:2102.08501, 2021.arxiv.org/abs/2102.08501
  28. [28]Zuming Liu and Iftekhar A Karimi. Gas turbine performance prediction via machine learning. Energy, 192:116627, 2020.DOI
  29. [29]Waqar Muhammad Ashraf and Vivek Dua. Data information integrated neural network (DINN) algorithm for modelling and interpretation performance analysis for energy systems. Energy and AI, 16:100363, 2024.DOI
  30. [30]Stefan Elfwing, Eiji Uchibe, and Kenji Doya. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Networks, 107:3–11, 2018.DOI
  31. [31]James Bergstra, Brent Komer, Chris Eliasmith, Dan Yamins, and David D. Cox. Hyperopt: A Python library for model selection and hyperparameter optimization. Computational Science & Discovery, 8(1):014008, 2015.DOI
  32. [32]James Bergstra, Rémi Bardenet, Yoshua Bengio, and Balázs Kégl. Algorithms for hyper-parameter optimization. In Advances in Neural Information Processing Systems, volume 24, pages 2546–2554. Curran Associates, Inc., 2011.
  33. [33]Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015.arxiv.org/abs/1412.6980
  34. [34]Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshien, Luca Antiga, et al. PyTorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems, volume 32, pages 8024–8035. Curran Associates, Inc., 2019.arxiv.org/abs/1912.01703
  35. [35]Lutz Prechtel. Early stopping—but when? In Genevieve B. Orr and Klaus-Robert Müller, editors, Neural Networks: Tricks of the Trade, pages 55–69. Springer, Berlin, 1998.
  36. [36]Michael L. Bynum, Gabriel A. Hackebeil, William E. Hart, Carl D. Laird, Bethany L. Nicholson, John D. Siirola, Jean-Paul Watson, and David L. Woodruff. Pymoo—Optimization Modeling in Python. Springer, Cham, 3 edition, 2021.DOI
  37. [37]Hamid Ghorbani. Mahalanobis distance and its application for detecting multivariate outliers. Facta Universitatis, Series: Mathematics and Informatics, 34(3):583–595, 2019.DOI
  38. [38]Roger Penrose. A generalized inverse for matrices. Mathematical Proceedings of the Cambridge Philosophical Society, 51(3):406–413, 1955.DOI
  39. [39]Martin Rätz, Patrick Henkel, Phillip Stoffel, Rita Streblow, and Dirk Müller. Identifying the validity domain of machine learning models in building energy systems. Energy and AI, 15:100324, 2024.
  40. [40]Andreas Wächter and Lorenz T. Biegler. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Mathematical Programming, 106(1):25–57, 2006.DOI
  41. [41]Omar S. Bayomie, Omar Y. Abdelaziz, and Mamdouh A. Gadalla. Exceeding pinch limits by process configuration of an existing modern crude oil distillation unit – a case study from refining industry. Journal of Cleaner Production, 231:1050–1058, 2019.DOI
  42. [42]M. D. McKay, R. J. Beckman, and W. J. Conover. Comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics, 21(2):239–245, 1979.
  43. [43]D. Donovan, K. Burrage, P. Burrage, T.A. McCourt, B. Thompson, and E.S. Yazici. Estimates of the coverage of parameter space by latin hypercube and orthogonal array-based sampling. Applied Mathematical Modelling, 57:553–564, 2018.DOI
  44. [44]Anikesh Kumar, Chi Hung Vo, M Shahabuddin, Sushant S Garud, and Iftekhar A Karimi. Integrating coding platforms with process simulators for custom applications. Computers & Chemical Engineering, 201:109247, 2025.DOI

Paper details

vlnc:W_vc6jmmrk
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 5

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Claude Opus (multiple versions)

View statement
Looking for related papers…
Contents