1. Introduction
Nitrous oxide (N
2O) is a greenhouse gas which can cause global warming. Although the concentration of N
2O in the atmosphere is lower than that of CO
2, N
2O has a 298-fold higher single-molecule warming potential than carbon dioxide (CO
2). N
2O can also damage the ozone layer, cause the ozone hole to expand, and expose human beings to solar ultraviolet radiation [
1]. The harm caused by N
2O concerns researchers [
2,
3,
4]. Different methods are used to capture and remove N
2O from waste gases [
5,
6], among which the application of a suitable green solvent is crucial [
7,
8].
Ionic liquids (ILs) are green solvents which are widely applied in waste gas removal. Much research [
9,
10,
11,
12] has been carried out on gas removal using ionic liquids, such as CO
2 and H
2S. The solubilities of gases in ionic liquids [
13,
14,
15,
16,
17] can be determined via experimental analysis. However, laboratory-based methods are usually associated with high costs and toxic exposure. In addition, theoretically, there could be up to 1 trillion types of ionic liquids, meaning that laboratory analyses are not comprehensive enough. A computer model is required for ionic liquid screening. In recent years, machine learning has proved promising in applications related to the environment and chemistry [
18,
19,
20,
21,
22,
23]. Ahmadi et al. [
24] utilized a least square support vector machine (LSSVM) model to accurately estimate the efficiency of chemical flooding in an oil reservoir. Moosavi et al. [
25] applied an artificial-neural-network-based (ANN-based) model to predict the performance of CO
2-foam flooding on a laboratory scale, aiming to improve the oil recovery. In a study by Hamzehie et al. [
26], an artificial neural network was used to forecast the capture of CO
2 and H
2S in 32 distinct types of ionic liquids. A “single decision tree” and an “ensemble random forest” were utilized by Venkatraman et al. [
27] to forecast the solubility of CO
2 in various ionic liquids. Numerous studies using machine learning have demonstrated precise predictions of CO
2 and H
2S capture in various ionic liquids [
26,
27,
28,
29,
30,
31,
32].
Compared with CO
2, much less modeling work has been carried out on N
2O capture using ionic liquids. To estimate the solubility of N
2O in various ionic liquids, Shaahmadi et al. [
33] employed three machine learning algorithms; they found that the predictions derived from machine learning models were consistent with laboratory-based results. The support vector machine (SVM) method, in particular, performed better than the other two models. Four artificial intelligence (AI) strategies were also utilized by Amirkhani et al. [
34] to forecast the solubility of acid gases in various ionic liquids. With an absolute relative deviation of 8.7%, the coupled simulated annealing–least squares support vector machine technique was shown to perform the best. In a study performed by Amar et al. [
35], the solubility of N
2O in 13 different types of ionic liquids was predicted using three intelligent computing methods. They discovered that the cascaded forward neural network (CFNN) model achieved the highest accuracy. Modeling work on N
2O is still scarce; therefore, which model is superior? Are the models suitable for CO
2 and H
2S suitable for N
2O? More work needs to be carried out to validate the performance of machine learning in the prediction of N
2O capture in ionic liquids.
In this study, the solubility of N
2O gas in seven different kinds of ionic liquids was modeled based on three machine learning methods. In our previous study [
36], the solubility of CO
2 and H
2S in ionic liquids was predicted using twelve machine learning techniques. The voting method performed better in that study; therefore, we also transferred it onto the N
2O–IL system to further validate the generalizability of the voting method in different systems. In addition, the linear regression method was applied to fit a function, and the two-layer feed-forward neural network (TLFFNN) was utilized for comparison in this study to achieve the most accurate model. Then, the solubility of N
2O in various ionic liquids was predicted using models over a broad range of pressures and temperatures to determine the influence of the thermodynamic and molecular properties of ionic liquids on N
2O capture. This article is presented as follows:
Section 2 describes the details of the three models in this study;
Section 3 depicts datasets and metrics in modeling;
Section 4 discusses the accuracy of the models and the effects of the thermodynamic and molecular properties of ionic liquids;
Section 5 presents the conclusions and recommendations for models and components of ionic liquids in capturing nitrous oxide.
2. Models
Our aim was to discover the best model for this purpose. The solubility of N
2O in different ionic liquids was predicted by employing three machine learning techniques. These were linear regression, voting, and a two-layer feed-forward neural network. The formulation for the model training procedure was as follows:
where
Tc,
Pc,
ω,
T, and
P are input variables that denote temperature, pressure, critical temperature, critical pressure, and acentric factor, respectively.
S represents the output variable solubility.
2.1. Linear Regression Method
For the case of the linear regression method, a linear model was trained, which denoted the correlation of variables, including
T,
P,
Tc,
Pc, and
ω, with coefficients
θ = (
θ0, …,
θ5). In this study, a linear model was expressed using the following function:
The modeling procedure used for the linear regression method in this study is summarized in
Figure 1. This training procedure was used with the aim of learning the coefficients
θ = (
θ0, …,
θ5), after which, the linear regression model could be acquired.
2.2. Voting Method
As an ensemble algorithm, the voting algorithm combines various machine learning methods to achieve a final prediction by averaging the individual predictions. In this study, five common algorithms—bagging [
37], random forest [
38,
39], GradientBoosting [
40], neural network multi-layer perceptron (NN-MLP) [
41], and adaptive boosting (AdaBoost) [
41]—were combined in the voting method as shown in
Figure 2; in our previous research, we found that these five algorithms performed well in modeling the capture of acid gases in several ionic liquids [
36]. Uniform weights were assigned over the five algorithms to balance out the weakness of each algorithm and achieve a more accurate result, which was finally obtained using a simple majority vote. The voting algorithm in our study can be mathematically illustrated as follows:
where a voting ensemble
comprises a set of predictors represented by
. The ensemble predictor is represented as
. The weighting function,
, will vary depending on the feature values,
.
In this voting combination, the base estimator of the bagging algorithm [
37] was based on decision tree, which made it 1000. In the random forest algorithm [
38,
39], the parameter was the number of trees, which was 1000. In the GradientBoosting algorithm [
40], the maximum depth in each regression predictor was set to 5, and the number of boosting stages was adjusted to 1000. The iteration epoch was modified to 5000 for the NN-MLP algorithm [
41], the “lbfgs” solver was selected for weight optimization, and “relu” was chosen as the activation function in the hidden layer, which had a size of 100. The decision tree also functioned as the base_estimator with a value of 1000 for the Adaboost algorithm [
42].
2.3. Two-Layer Feed-Forward Neural Networks (TLFFNNs)
Feed-forward neural networks are the oldest types of artificial neural networks. Information in this type of network only travels in one direction, from input node to output node, passing through the hidden node along the way. There is no loop in the network topology, and the neural network learns by modifying the threshold of each functional neuron and the weights between neurons based on training data.
In this study, the hidden layer and output layer of a two-layer network were selected. It also has the following equations for a single unit of a neural network.
where
Y is the output,
Z is the weighted input, and
σ(
Z) is the activation function, which stands for the sigmoid function. The inputs are
X1 and
X2. The coefficient weights for each input are
ω1 and
ω2;
B is the bias.
The transfer function sigmoid characterized the hidden layer, while the linear transfer function described the output layer. Five features (
T,
P,
Tc,
Pc, and
ω) functioned as inputs, and solubility functioned as the output. “W1, b1” and “W2, b2” were weights and biases for the hidden layer and output layer, respectively. The size of the hidden layer was 10, which meant that the number of neurons was 10. The Levenberg–Marquardt algorithm was utilized to train the neural network, and the target epoch was 1000. An illustration of the two-layer feed-forward neural network is shown in
Figure 3.
4. Results and Discussion
4.1. The Learning Loss Curve during Training
The relationship between the number of samples and the empirical loss function is known as the learning curve. Through the learning curve, we determined the learning process and effect of the model, judged whether the training was over-fitting or under-fitting, and further tweaked the learning parameters to increase the model’s accuracy.
In this study, in the linear regression and voting methods, mean square error (MSE) functioned as the loss scoring. The learning curves for these methods are plotted in
Figure 4a,b. From the fluctuation in the training loss curve and the tenfold cross-validation loss curve, it can be seen that the training loss decreased to a stable point.
The validation loss also dropped to a stable point, with a very small gap between the training loss. This shows that the models were trained well, without over-fitting and under-fitting.
Figure 4c depicts the learning curve for the two-layer feed-forward neural network. The MSEs during training, validation, and testing all descended gradually to a stable value, which indicates that the modeling process was sufficient.
4.2. Solubility Prediction of N2O in Ionic Liquids via the Linear Regression Method
A linear function could be fitted for each N
2O−IL system after training using the linear regression method; this empirical correlation, which is expressed in Equation (2), has six coefficients. The coefficients for Equation (2) are presented in
Table 3.
The proposed function was also evaluated for each N
2O–IL system; the metrics during the testing stages are shown in
Table 4. As can be seen, this model is accurate in predicting the solubility of N
2O in some kinds of ionic liquids, such as [BMIM][Tf
2N]; it had an MSE of 6.770 × 10
−4, an RMSE of 2.602 × 10
−2, an MAE of 2.296 × 10
−2, and an R
2 of 0.9541; this performance was determined to be acceptable. However, for some ionic liquids, the result was not satisfactory, such as for [(ETO)
2IM][Tf
2N]; the model had an MSE of 1.303 × 10
−2, an RMSE of 1.142 × 10
−1, an MAE of 8.233 × 10
−2, and an R
2 of 0.3349. The average metrics for the training sets, test sets, and all datasets are shown in the following section; the overall MSE, RMSE, MAE, and R
2 were 3.397 × 10
−3, 5.017 × 10
−2, 3.934 × 10
−2, and 0.7924, respectively. Overall, the linear regression method was shown to be weak in predicting N
2O solubility.
In order to better understand the model, cross plots are presented in
Figure 5. We took two ionic liquids as examples, and for both training and testing rounds, the predicted solubility of N
2O was contrasted with the experimental data. As illustrated in
Figure 5, most predicted data were similar to the experimental data. However, significant deviations were identified in both training and testing phases, which indicates the weak ability of the linear regression model in N
2O solubility prediction. This result could have been due to the limited number of datasets for N
2O solubility; only a few dozen can be collected from the available literature for most kinds of ionic liquids.
4.3. Solubility Prediction of N2O in Ionic Liquids via the Voting Method
The modeling results obtained via the voting method during the testing stages are presented in
Table 5. As shown, the voting method achieved a more satisfactory result. For most of the ionic liquids, the solubility of N
2O could be accurately predicted with the models developed using the voting technique. In particular, in [BMIM][Tf
2N], it had a very small MSE value of 3.115 × 10
−5, an RMSE of 5.581 × 10
−3, an MAE of 4.042 × 10
−3, and a high R
2 value of 0.9979. These metrics are acceptable in intelligent model prediction. However, for the particular case of [DMIM][MP], the prediction was not accurate, with an MSE of 2.861 × 10
−3, an RMSE of 5.349 × 10
−2, an MAE of 4.962 × 10
−2, and an R
2 of 0.5697. Different algorithm combinations can avoid this kind of inaccuracy in particular cases.
The overall metrics for the training sets, test sets, and all datasets are shown in
Table 6. The voting method had an average MSE of 6.582 × 10
−4, an average RMSE of 1.873 × 10
−2, an average MAE of 1.519 × 10
−2, and an average R
2 of 0.9405. This performance was better than that of the linear regression method.
Cross plots of the model prediction and experimental values derived via the voting method are shown in
Figure 6. For the two ionic liquids we chose to use as examples, [BMIM][Tf
2N] and [(ETO)
2IM][Tf
2N], the predictions of N
2O solubility closely matched the experimental values in both the training and testing stages. From the visual results, we can also see that the voting method was a reliable method of determining how N
2O could dissolve in the majority of ionic liquids. This algorithm can utilize the advantages of various algorithms to construct a more accurate model. In our previous research [
36], we showed that the voting method also had satisfactory performance in the prediction of CO
2 and H
2S solubility, which indicates that this algorithm has good generalizability and could be applied to different systems in gas solubility prediction.
4.4. Solubility Prediction of N2O in Ionic Liquids via TLFFNN Method
The accuracy of the model trained using the TLFFNN method on test sets is presented in
Table 7. As the table shows, the models exhibited superior performance. For example, for [BMIM][Tf
2N], it had a very low MSE value of 5.06 × 10
−6 and a very high R
2 value of 0.9996. In the case of [DMIM][MP], the values of MSE and R
2 were 3.46 × 10
−5 and 0.9978, respectively. The averaged metrics for the training sets, test sets and all datasets are also shown in
Table 6. The averaged values of MSE, RMSE, and R
2 were 2.37 × 10
−5, 4.23 × 10
−3, and 0.9984, respectively, which were superior values. We showed that the model trained using the TLFFNN method could accurately predict N
2O solubility in all the ionic liquids involved in this study, even with a very limited dataset. It was the most accurate method used in this research.
Comparisons of predicted solubility and experimental values are plotted in
Figure 7, consisting of two ionic liquids, [(ETO)
2IM][Tf
2N] and [BMIM][Tf
2N]. The laboratory value and forecast solubility were very consistent for both the training and testing stages. This visual evaluation clearly highlights the models’ outstanding accuracy and reliability levels. By adjusting the weights and biases, the TLFFNN method could effectively overcome the problem of insufficient datasets. It could also be used to forecast how soluble N
2O would be in ionic liquids.
The discrepancy between the outputs and the objectives is visualized in the error histogram.
Figure 8 shows the error between the model predictions and experimental values of N
2O solubility in [BMIM][Tf
2N] via the TLFFNN method. The abscissa “Errors” represents the D-value of experimental values and predictions; the ordinate represents the number of instances with corresponding errors. As shown in
Figure 8, the errors were very small. In the histogram, most instances are gathered near the zero error line, and the histogram is distributed normally around the zero-error line. This error histogram proves that the TLFFNN model was highly coordinated with experimental values in determining how soluble N
2O would be in various ionic liquids.
4.5. Trends and Comparisons of Different Models
Further analyses were carried out to validate the performances of the suggested models. The trends in N
2O solubility versus input variables are plotted in
Figure 9 for each model in this study; two ionic liquids, [BMIM][Tf
2N] and [(ETO)
2IM][Tf
2N], were selected. As shown in
Figure 9, in all the models in this study, N
2O was more soluble in the two ionic liquids when the pressure was increased, but it was less soluble when the temperature was raised. Regarding the linear regression method, the data points and trends in model prediction exhibited obvious deviations with the experimental values. Meanwhile, when using the voting method, the prediction and experiment values were consistent in terms of both the data points and trends, with only a very tiny deviation. In the case of the TLFFNN method, the two trend curves of prediction and experiment were almost overlapping, which indicated the high reliability of the TLFFNN method.
The TLFFNN model was the most superior model in this study; the values derived using it were highly consistent with the laboratory values. It could accurately predict N2O capture in various ionic liquids against different temperatures and pressures.
Comparisons of previous research and our results are shown in
Table 8. The MSE, RMSE, and R
2 values of different models on test sets were compared. As seen in this table, the TLFFNN model had lower values of MSE and RMSE than other models from the recent literature, which means that it performed better in predicting N
2O capture in various ionic liquids.
4.6. Effect of the Thermodynamic and Molecular Properties of Ionic Liquids
Based on the most accurate and validated model trained by the TLFFNN algorithm, the solubility of N
2O in seven different ionic liquids was predicted over a large range of temperature and pressure values. As shown in
Figure 10a,b, when the pressure was under 10 bar, the [(OH)
2IM][Tf
2N], [BMIM][Tf
2N], and [BMIM][AC] ionic liquids performed better than other ionic liquids in absorbing N
2O, but when the pressure was over 40 bar, the [(ETO)
2IM][Tf
2N] ionic liquid demonstrated an excellent ability to absorb N
2O. The solubility of N
2O in [(ETO)
2IM][Tf
2N] continued to grow as the pressure increased, while for other ionic liquids, after reaching their maximal values, the solubility did not increase with the pressure.
The effects of the anions and cations of the ionic liquids were also analyzed. As shown in
Figure 10c,d, four ionic liquids had the same cations ([BMIM]) but different anions. As the pressure increased, the solubility curve of [BMIM][AC] first reached a peak and then remained unchanged; then, the curves of [BMIM][Tf
2N] and [BMIM][BF
4] reached a higher peak. Additionally, the curve of [BMIM][SCN] was stable at the highest peak. From these figures, we can see that anions of ionic liquids play an important role in capturing N
2O, and the performance of anions in absorbing N
2O was [AC] > [Tf
2N] > [BF
4] > [SCN] when the pressure was below 10 bar. However, when the pressure was over 80 bar, the results were reversed, and performance of anions became [SCN] > [Tf
2N] > [BF
4] > [AC].
Cations also play an important role in N
2O capture. The solubility levels of N
2O in three different ionic liquids with the same anion ([Tf
2N]) are presented in
Figure 10e,f. When the pressure was low, i.e., 10 bar, and performances of cations in absorbing N
2O were [(OH)
2IM] > [BMIM] > [(ETO)
2IM]. However, as the pressure increased, the situation reversed; when the pressure was higher than 40 bar, and performance of the cations was [(ETO)
2IM] > [(OH)
2IM] > [BMIM].
According to our examination of thermodynamic and molecular properties, the solubility of N2O in ionic liquids will not always grow as the pressure increases. In most cases, it will be stable at a peak value and no longer increase. The question is how high the pressure should be raised to reach the peak solubility. In our case, in the low-pressure zone (under 10 bar), the cation [(OH)2IM] and anion [AC] were the best at absorbing N2O; in the high-pressure zone (over 80 bar), the best absorbents were the cation [(ETO)2IM] and anion [SCN]. Due to their enormous capacity for N2O capture with rising pressure, the [(ETO)2IM] cation and [SCN] anion are favored when synthesizing new ILs. Our model can also be used to estimate the solubility of N2O in a new IL at various pressures and temperatures so that its potential capability can be assessed before it is synthesized.
5. Conclusions
In this study, intelligent predictions of N2O capture in several different ionic liquids were proposed by implementing three machine learning algorithms: the linear regression, voting, and TLFFNN methods. T, P, ω, Tc, and Pc were considered as the inputs, while solubility functioned as the output. The models were assessed by employing R2, RMSE, MSE, and MAE. We showed that the voting model was able to precisely predict the solubility in most cases, with individual exceptions. However, by adjusting the combinations of different algorithms, the voting method could overcome the weakness of every model and achieve strong generalizability, which means it has a broadly promising future in gas solubility prediction for various systems. Among all three models in this study, the TLFFNN model was the most accurate; it could produce highly consistent predictions with experimental data for all kinds of ionic liquids involved in this study. The TLFFNN model had a much higher R2 of 0.9981 and a much lower MSE of 0.00002 compared with values reported in the literature. The TLFFNN technique may be trusted to accurately forecast N2O solubility in various ionic liquids at various pressures and temperatures. Then, the analysis of thermodynamic and molecular properties of ionic liquids showed that, under different pressure ranges, the anions and cations of ionic liquids differed greatly in their absorption of N2O. The [(OH)2IM] cation and [AC] anion performed best in capturing N2O in the low-pressure zone (under 10 bar), while the [(ETO)2IM] cation and [SCN] anion performed best in the high-pressure zone (over 80 bar). As far as we know, this is the first study to report this peculiar phenomenon, which will provide guidance for applications of ionic liquids in the removal of N2O. Due to their enormous capacity for N2O capture with rising pressure, the [(ETO)2IM] cation and [SCN] anion are favored when synthesizing new ILs.