Improved XGBoost model for predicting minimum miscibility pressure in CO2 flooding

Yuxin Yang, Yizhong Zhang, Bowen Qin, Jianhong Guo, Maolin ZhangScientific 2025

Abstract

CO<sub>2</sub>-enhanced oil recovery (EOR) is a key technology to improve oil recovery rates and support carbon capture, utilization, and storage (CCUS). Injecting CO<sub>2</sub> into reservoirs reduces crude oil viscosity, enhancing its mobility. A critical factor in CO<sub>2</sub>-EOR is determining the Minimum Miscibility Pressure (MMP). This study aims to construct an MMP prediction model for pure and impure CO<sub>2</sub>-EOR based on an improved eXtreme Gradient Boosting (XGBoost) algorithm, introducing the critical temperature of the injection gas (T<sub>cm</sub>) as a new research variable to explore its impact on MMP. The data used in this study comprises 218 experimental datasets, totaling 2,398 samples, covering both pure and impure CO<sub>2</sub>-EOR scenarios. Before model construction, important features related to MMP were identified by combining reservoir physical theory with Pearson correlation analysis, and dimensionality reduction was performed using principal component analysis to eliminate redundant information. To optimize the hyperparameters of XGBoost, this study introduced the Particle Swarm Optimization (PSO) algorithm to ensure optimal model parameter configuration. Additionally, Shapley Additive Explanations (SHAP) analysis was employed to evaluate the model's interpretability, resulting in a CO<sub>2</sub>-MMP prediction model with good explanatory capability. The results indicate that the proposed method achieved an RMSE of 0.2347 and an R<sup>2</sup> of 0.9991 for the training set, with an RMSE of 1.0303 and an R<sup>2</sup> of 0.9845 for the testing set, outperforming traditional MMP prediction models in various performance metrics. The proposed methodology enables a transparent, efficient, and generalizable approach to MMP prediction, offering valuable insights for CO<sub>2</sub>-EOR strategy design and supporting more cost-effective and data-driven reservoir development.

Introduction

In $CO_2$-Enhanced Oil Recovery ($CO_2$-EOR), the primary objective is to inject $CO_2$ into a reservoir to reduce oil viscosity and sweep out trapped hydrocarbons. This process is most efficient when the $CO_2$ and oil reach a "miscible" state, which occurs only at or above the Minimum Miscibility Pressure (MMP).

Traditionally, MMP is determined through laboratory "slim-tube" tests. While accurate, these tests are notoriously slow, expensive, and complex to execute. Existing mathematical empirical correlations often fail to provide accurate predictions for complex reservoirs or when the injected $CO_2$ contains impurities like methane or nitrogen. There is a critical need for a fast, accurate, and transparent tool capable of predicting MMP across diverse reservoir conditions and gas compositions.

Methods and Feature Engineering

This study employs a multi-stage machine learning workflow centered on the eXtreme Gradient Boosting (XGBoost) algorithm. XGBoost is an ensemble learning method highly effective at capturing non-linear relationships within small-to-medium datasets. Key innovations in this approach include:

  • Introduction of $T_{cm}$: The researchers introduced the critical temperature of the injection gas ($T_{cm}$) as a novel feature, a variable often overlooked in previous predictive models.
  • Grouped Dimensionality Reduction: Instead of global Principal Component Analysis (PCA), the team performed PCA on specific groups (crude oil composition vs. injection gas composition) to reduce noise while preserving distinct physical characteristics.
  • Particle Swarm Optimization (PSO): To find optimal hyperparameters (such as tree depth and learning rate), the study utilized PSO. This algorithm mimics the social behavior of bird flocks to search for solutions more efficiently than standard grid search methods.
  • Model Explainability: By integrating SHAP (Shapley Additive Explanations), the researchers moved beyond "black box" AI, visualizing how each input variable influences the final MMP prediction.

Dataset and Analysis

The model was developed using a comprehensive dataset compiled from existing literature, ensuring a wide range of physical and chemical conditions were represented.

Summary of the physical properties and composition ranges in the study dataset.

The dataset consists of 2,398 data points across 218 experimental sets, including 51 sets of pure $CO_2$ data and 167 sets of impure $CO_2$ data. Eleven parameters were tracked, including reservoir temperature ($T$), oil molecular weight ($MW_{C5+}$), and various mole fractions of hydrocarbons and impurities.

Key Insights and Results

One of the study's most significant findings was the discovery that the critical temperature of the injection gas ($T_{cm}$) is the most influential predictor of MMP. This provides a vital bridge between theoretical thermodynamics and practical field application.

Pearson correlation matrix showing relationships between reservoir parameters and MMP.

The proposed PSO-XGBoost model significantly outperformed traditional machine learning models such as SVR, KNN, and Random Forest:

  • Accuracy: The model achieved an $R^2$ of 0.9991 on the training set and 0.9845 on the testing set.
  • Error Metrics: The testing set showed a Root Mean Square Error (RMSE) of 1.0303 MPa, demonstrating high precision across the entire pressure range.
  • Computational Efficiency: PSO was not only more accurate but significantly faster to tune (132 seconds) compared to Genetic Algorithms (1,736 seconds) or Grid Search (914 seconds).

Conclusion and Future Work

The PSO-XGBoost methodology provides a transparent, efficient, and generalizable approach to MMP prediction, offering valuable insights for $CO_2$-EOR strategy design. While highly effective, future research could benefit from expanding the dataset with more diverse field-scale information and integrating detailed Pressure-Volume-Temperature (PVT) parameters to further enhance reliability in extreme reservoir conditions.

Summary updated

BibTeX
@inproceedings{yang2025improved,
  author = {Yuxin Yang and Yizhong Zhang and Bowen Qin and Jianhong Guo and Maolin Zhang},
  title = {{Improved XGBoost model for predicting minimum miscibility pressure in CO2 flooding}},
  booktitle = {Scientific},
  year = {2025},
  doi = {10.1038/s41598-025-17802-8},
}
Figure