A Machine Learning Surrogate for Fuel Anti-Knock Resistance Calculation

Replacing a Legacy Calculation Bottleneck in Combustion Engine Analytics with a Machine Learning Surrogate Model

1. Executive Summary

This case study describes a Random Forest surrogate model that replaced a legacy, single-case calculation tool used to estimate a fuel's resistance to uncontrolled combustion (knock) based on its composition. The surrogate reduced batch calculation time from several minutes to a few seconds, a 60 to 75x speedup, reproduced the legacy tool's output with R2 greater than 0.990 and error within a fraction of a percent, and eliminated the runtime bottleneck that made iterative or repeated analysis impractical.

2. Context

A fuel's resistance to uncontrolled combustion is a critical parameter for configuring and operating internal combustion engines, directly affecting knock resistance and combustion behavior across varying fuel compositions. In operation, a physical sensor on the plant already supplies this value directly to the engine controller. For engineering analysis, however, such as retrospective studies, configuration reviews, and reporting, calculating this resistance parameter required a legacy software tool built on closed C code, accessible only via manual single-case entry or a batch wrapper.

Even using the wrapper, a full batch run of the available dataset, several thousand fuel composition states, took several minutes. This was tolerable for a one-off calculation, but a hard constraint on any workflow requiring repeated or iterative use.

3. Opportunity

Two structural limitations motivated a machine learning approach rather than reimplementation:

Given these constraints, a surrogate model trained to approximate the legacy tool's input-output mapping was the most viable path to removing the runtime bottleneck without altering the tool's underlying calculation behavior.

4. Implementation

A Random Forest Regressor was trained on real field-measured fuel compositions, using resistance values calculated by the legacy tool as ground-truth labels. Of the full set of composition variables accepted by the legacy tool, a feature importance analysis identified a small subset responsible for the large majority of predictive power, and the final model was trained on this reduced feature set with no measurable loss in accuracy.

4.1 Technical Stack

4.2 Key Technical Challenges

5. Impact

6. Model Scope and Limitation

The model was trained and validated on real field-measured fuel compositions, meaning its accuracy reflects the range of operating conditions actually observed, not the full theoretical composition space. Within this range, the model shows strong agreement with the legacy tool.

Predictions for fuel compositions significantly outside this observed range should be treated with caution, since extrapolation performance has not been validated. In practice, the model is recommended for interpolation within the training domain, with periodic retraining as new field measurements expand that range over time.

7. Key Insights