Abstract
The speed of sound is of particular importance in determining the physical and chemical properties of gas mixtures. Given the importance of this parameter in hydrogen transport and the high speed and accuracy of machine learning methods compared to traditional methods such as equations of state, this study estimates the speed of sound in hydrogen/cushion gas mixtures. For this purpose, 665 data sets of sound speed in hydrogen/cushion gas mixtures were collected from previous studies, and then 4 machine learning methods were used, including Linear Regression (LR), Extra Trees Regressor (ETR), Extreme Gradient Boosting (XGBoost), Support Vector Regression (SVR), and K-Nearest Neighbor (KNN). The hyperparameters of these models were optimized using the Bayesian algorithm, and fivefold cross-validation was used to prevent overfitting. The ETR method had the best performance with R(2) = 0.9996 and RMSE = 6.2775 m/s, followed by the KNN method with R(2) = 0.9996 and RMSE = 7.0540 m/s. Also, the weakest performance belonged to the Linear method with R(2) = 0.8104. Also, the ETR method was able to estimate 64.81% of the data with an error of less than 0.0001%. Also, sensitivity analysis was performed using SHapley Additive exPlanations (SHAP) method, and based on its results, the hydrogen mole fraction had the greatest effect on the speed of sound, and at low values, this effect was inverse, and at high values, this effect was direct. After the hydrogen mole fraction, pressure was the second most effective parameter, which showed a behavior similar to the hydrogen mole fraction (inverse relationship at low values and direct at high values). Also, the methane mole fraction had the least effect on the speed of sound in the gas mixture. The developed machine learning models not only demonstrate outstanding predictive performance for sound speed in hydrogen-based mixtures but also offer valuable insight into the acoustic behavior of multicomponent gas systems. These findings can support the design and control of hydrogen energy infrastructures, where real-time monitoring and compositional analysis are critical.