Introduction

Ionic liquids (ILs), unlike most salts, are substances that are liquid at temperatures lower than 373.15 K. As a result of various combinations of cations and anions, numerous ILs with tunable properties can be obtained1,2. ILs have become commonly used in different industries due to their various appealing properties, such as thermal stability, non-flammability, and various electrical and ionic conductivity. Therefore, many ILs have been synthesized for various purposes in recent decades3,4. The implementation of effective solvents is critical in the battle to conserve the environment and eliminate dangerous atmospheric concentrations5,6. ILs are one of the most prominent eco-friendly solvents. ILs might be regarded as attractive compounds with various potential industrial uses because of these exceptional properties5,6,7. Recent works on ILs have concentrated on structure–property correlations to intelligently develop ILs for special purposes. The structure–property interactions related to gas solubility in IL are of considerable importance. The application of ILs in separation processes highlights the relevance of gas solubility in ILs. Acknowledging the dissolution process of substances in ILs and how they might investigate the key structural properties of the solvent seems to be a more basic objective8,9. For many purposes, employing ILs to absorb the major components of natural gas has been a popular study subject. Primarily, such information is required to investigate the natural gas sweetening operation, which involves the separation of acid gases from methane. This technique is important not only for ecological reasons, but also for preventing subsequent process issues including equipment corrosion and pipeline clogging5,10. Furthermore, such information is useful for a variety of operations, including supercritical fluid extraction and homogeneous interactions in ILs, as well as purification of steam converting or gas-shift processes3,5. Since ILs are structurally heterogeneous on a very small scale, the solubility of substances may differ from that of molecular liquids. The solubility of pure gaseous hydrocarbons is also a promising topic for investigating the performance of nonpolar component solvation in the ILs. While some experimental researches of gaseous hydrocarbons solubility in ILs have been conducted, the majority of these researches have relied on gas solubility in ILs based on thermodynamic properties8.

Therefore, the study of the solubility of various gases, especially gaseous hydrocarbons in ILs is of special importance. There are various methods such as laboratory tests and the employment of equations of state to measure the solubility of gaseous hydrocarbons in ILs. Many studies have been performed on the solubility of methane5,11, ethane12,13, normal butane and isobutene8, and other gaseous hydrocarbons in various ILs. Ahsan Jalal14 calculated the solubilities of C4-hydrocarbons in various imidazolium-type ILs using the Conductor-like Screening Model for Realistic Solvents (COSMO-RS) computations. The COSMO-RS data for each hydrocarbon was then examined utilizing semi-empirically determined molecular descriptors of ILs and machine learning technologies such as association rule mining and decision tree categorization. The most essential characteristics for defining the propensity of ILs towards C4-hydrocarbons are the polarizabilities of both cation and anion, as well as the anion's CPK (space-filling model) area. Zhen Song15 used COSMO-RS to forecast the solubilities of 220 imidazolium-based ILs in seven fuel hydrocarbon samples with varying IL and hydrocarbon properties. The nitrogen analyzer was used to measure the solubilities of five typical ILs in the examined hydrocarbons, revealing COSMO-RS's adequate capacity to forecast IL-in-hydrocarbon solubilities. AlSaleem16 investigated the solubility of three halogenated hydrocarbons in 12 hydrophobic ILs at temperatures ranging from 25 to 45 °C. Piperidinium, pyrrolidinium, and ammonium-based cations coupled with [TF2N] anion were studied for their chemical structure and alkyl chain length impact. Carbon tetrachloride and bromoform are somewhat miscible in all of the ILs tested, although chloroform is fully miscible. The solubility of ammonium-based ionic liquids rises as the cation molecular weight and alkyl chain length increase. Hamedi et al.5 calculated the solubility of methane in ILs using two equations of state including modified Sanchez and Lacombe (SL) and cubic-plus-association (CPA). Comparison of the results showed that the mentioned methods have good accuracy in predicting the solubility of methane in ILs. Owing to the very non-ideal reactions, thermodynamic analysis of gas solubility in ILs is a difficult undertaking. Typical EOSs, on the other hand, overlook the influence of several essential non-ideal molecular interactions, like hydrogen bonds and polar interactions, and so are unreliable in predicting gas solubility in ILs5,17. This demands the evaluation of more powerful EOSs, which are capable of adequately modeling the system across a broad temperature and pressure range and have reasonable conformance with the real performance of the system. Recently, machine learning-based approaches have widely been received attention for predicting properties of ILs18,19,20,21,22,23,24. The excellent results of previous studies further demonstrate the reliability and applicability of these methods. Other advantages of these methods are their high accuracy in predicting the solubility of gases in ILs and reducing time and cost. Ferreira et al.25 conducted a study on binary systems of ionic liquids and liquid hydrocarbons and their modeling by COSMO-RS. The results showed that COSMO-RS can be a useful and practical predictive tool. The employment of intelligent methods to predict the solubility of various gases such as N2O26, SO227,28, H2S24,29, and CO230 in ILs has received much attention in the last decade, and the results confirm the reliability of these methods. Using the thermodynamic properties of ILs and 728 experimental data, Baghban et al.31 developed a multi-layer perceptron (MLP) model and an adaptive neuro-fuzzy interference system (ANFIS) to predict the solubility of CO2 in ILs and then compared the results with the equations of state. The results showed that the MLP model had the best performance with mean square error (MSE) and coefficient of determination (R2) values of 0.000133 and 0.9972, respectively. Ahmadi et al.32 did the same work by developing artificial neural networks optimized with backpropagation (BP) and particle swarm optimization (PSO) algorithms to predict the solubility of H2S in ILs. The mean square error (MSE) and R2 values for PSO-ANN were 0.00025 and 0.99218, respectively, which indicated the better performance of this model than BP-ANN. Song et al.33 predicted the solubility of CO2 in various ILs by using a very large database containing 10,116 experimental data points. In this study, artificial neural networks and support vector machine (SVM) were used to develop the group contribution (GC) method. The results showed that the ANN-GC model had the best performance with MSE and R2 values of 0.0202 and 0.9836, respectively. In 2021, Moosanezhad-Kermani et al.34 developed a group method of data handling method for prediction CO2 solubility in ILs. In 2022, Mohammadi et al.35 predicted SO2 solubility in ILs using four intelligent models and equations of state.

In this study, using an extensive data bank including 2145 experimental data points, four intelligent models including Extreme Learning Machine (ELM), Deep Belief Network (DBN), Multivariate Adaptive Regression Splines (MARS), and Boosting-Support Vector Regression (B-SVR) are developed to predict the solubility of gaseous hydrocarbons (CH4, C2H6, C3H8, C4H10, C2H4, C3H6, C4H8, and C6H6) in ILs in a wide range of temperature and pressure. In this regard, intelligent models are trained based on two strategies, including Model (I): based on the thermodynamic properties of ILs and hydrocarbons, and Model (II): based on the chemical structure of ILs and hydrocarbons. In the first method, the critical properties of ILs and hydrocarbons and their molecular weights are considered as input parameters to the model. In the second method, the effect of the substructures that make up ILs and gaseous hydrocarbons are considered. In the development of existing models, the data is divided into an 80/20 ratio for the training and testing stages. Results are compared with previous studies and equations of state to evaluate the precision of the developed model. Furthermore, the solubility trend study is also performed to investigate the effect of different parameters on the solubility of gaseous hydrocarbons in ILs.

Data collection

In this study, 2145 experimental data for the solubility of gaseous hydrocarbons (CH4, C2H6, C3H8, C4H10, C2H4, C3H6, C4H8, and C6H6) in ionic liquids over a wide range of temperature (280–453.15 K) and pressure (0–201.64 bar) have been collected from the literature3,4,12,13,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54. The details of the provided database are summarized in Table 1. In the method based on thermodynamic properties, temperature, pressure, molecular weight, boiling point, and critical properties of ILs and hydrocarbons are considered as input parameters, while in the method based on chemical structure, in addition to the substructures of ILs and hydrocarbons, temperature and pressure are considered as input parameters. The statistical description of the input parameters and a number of substructures used in this study are reported in Table 2 and Table 3, respectively. The data are then divided into an 80/20 ratio in the training and testing stages, respectively. Figure 1 illustrates the chemical structure of anions and cations used in this study.

Table 1 Description of systems of ionic liquids and hydrocarbons used in this study.
Table 2 Statistical description of databank used in the current study.
Table 3 Different substructures of ionic liquids and hydrocarbons.
Figure 1
figure 1

Chemical structure of some of anions and cations studied in this work.

Modeling

Multivariate adaptive regression spline (MARS)

The multivariate adaptive regression spline (MARS), which is comprised of a count of different basis functions, will be used for regressive assessment and the identification of estimation techniques. The MARS model can calculate the enhanced structure of the multiplication of spline basis functions (BFs). The MARS system may choose the count of BFs and the properties related to each one, like the multiplication degree and node positions, autonomously. We might mention recurrent regression as one of the various clustering techniques. To properly describe higher-order responses, the MARS model employs the backward stepwise approach55,56. The MARS concept has several strengths. These benefits provide several items that will be detailed further below. This model's practical property is that the count of parameters in this mathematical equation is reduced, which speeds up the calculation of the body while reducing simulation precision. Conserving computing resources is extremely desired for researchers. This model's clever method of dividing factors into two groups of crucial factors and supplementary factors, which maximize detection accuracy, is another noteworthy aspect. The mathematical look of this concept is one of its most appealing qualities57. The dependent and independent components are identified by the mathematical expression form58. There is no supposition for linking inputs and output among the premises utilized in the MARS system. The purpose of this analysis is to look into the relationship between the output y and inputs {x1,…, xn} based on previous revelations. The following is a description of the data generation system59:

$$y=f\left({x}_{1},\dots ,{x}_{n}\right)+e$$
(1)

e refers to the relative error that matches across the intended region (x1,…, xn) in which the MARS model is generated. A progressive linear regression technique is a frequent model-building approach that MARS employs. MARS employs an automated way to replace major inputs. A succession of comparable splines and their derivatives is created to provide these possibilities. The splines are coupled and form polynomial curves to construct an ideal model. BFs are the name for these polynomials. They can simulate both linear and nonlinear processes. BFs are often split into couples, each piecewise linear or cubic in its own right. They have nodes at a certain place, each of which is related to the inputs. Below equation gives the shape of distributed linear BFs as59:

$${\left(x-t\right)}_{+}=max\left(0,x-t\right)=\left\{\begin{array}{ll}x-t &\quad if \quad x>t\\ 0 &\quad otherwise\end{array}\right. \; \mathrm{and} \quad {\left(t-x\right)}_{+}=max\left(0,t-x\right)=\left\{\begin{array}{ll}t-x &\quad if \quad x<t\\ 0 &\quad otherwise\end{array}\right.$$
(2)

The positive component is denoted by “+”, while the node is denoted by “t”. The MARS model is calculated using the following formula in its standard form59:

$$f\left(X\right)={\beta }_{0}+\sum_{m=1}^{M}{\beta }_{m}{B}_{m}(X)$$
(3)

In the above equation, X is the input vector, and Bm, βm, and β0 are mth BF, coefficient of mth BF, and the constant of the equation, respectively.

For the MARS approach, there are two stages to follow59:

Stage 1: In the targeted area, a collection of BFs is generated. This process begins with a structure that just has the intercept term and adds the phrases one at a time. BFs should be used for the phrases. The forward step can be stopped in two ways: the first is when the maximum number of BFs is reached, and the second is when the regression coefficient of modifications is less than the set value. Several BFs are consecutively utilized, resulting in an overfitting system.

Stage 2: Overfitting is undesired and must be avoided at all costs. Because the system uses a monitoring phrase, it must be condensed by deleting at least one more relevant BF at a time. Then, from among the best systems of any size, the system with the least general cross-validation (GCV) is chosen to complete the system. This procedure concludes with the creation of a final model. GCV is used in the MARS system to eliminate BFs that aren't needed. A GCV expression is as follows60,61:

$$GCV= \frac{{MSE}_{train}}{{\left(1-\frac{enp}{N}\right)}^{2}}$$
(4)

MSEtrain represents the mean square error when utilizing training datasets, N represents the size of observations, and enp indicates the number of factors in the practical circumstance. Figure 2 illustrates the schematic of the MARS model.

Figure 2
figure 2

Schematic of the MARS model.

Extreme learning machine (ELM)

Huang G.B. invented the extreme learning machine (ELM) to minimize time-consuming repeated training and improve segmentation accuracy62,63. The ELM architecture consists of an input layer, a concealed layer, and an output layer. It is a single-hidden-layer feedforward neural network (SLFN). Unlike conventional learning methods (like the Backpropagation), which arbitrarily established all system training variables and quickly build local best solutions, the ELM just adjusts the neurons in the invisible layer, randomizes the weights between the visible and invisible layers, and also the bias of the hidden neurons in the method implementation stage, determines the hidden layer output matrix, and subsequently finds the weights. The ELM provides the prospect of quick learning speed because of its straightforward network architecture and succinct variable calculation operations. Figure 3 depicts the architectural framework of ELM. Figure 3 shows the construction of an extreme learning machine system, which has n input layer neurons, l hidden layer neurons, and m output layer neurons. Given the training set \(\left\{X,Y\right\}=\left\{{x}_{i},{y}_{i}\right\} (i=1, \dots , Q)\), with an input parameter \(X=\left[{x}_{i1} {x}_{i2} \dots {x}_{iQ}\right]\) and an output matrix \(Y=\left[{y}_{i1} {y}_{i2} \dots {y}_{iQ}\right]\) composed of the training set, the matrix X and the matrix Y may be represented as follows64:

$$X=\left[\begin{array}{ccc}{x}_{11}& \cdots & {x}_{1Q}\\ \vdots & \ddots & \vdots \\ {x}_{n1}& \cdots & {x}_{nQ}\end{array}\right] ,Y=\left[\begin{array}{ccc}{y}_{11}& \cdots & {y}_{1Q}\\ \vdots & \ddots & \vdots \\ {y}_{m1}& \cdots & {y}_{mQ}\end{array}\right]$$
(5)

here, n and m are the dimensions of the input and output matrices, respectively.

Figure 3
figure 3

Schematic of the structure of ELM.

The ELM then adjusts the weights between the input and hidden layers at random64:

$$w=\left[\begin{array}{ccc}{w}_{11}& \cdots & {w}_{1n}\\ \vdots & \ddots & \vdots \\ {w}_{l1}& \cdots & {w}_{ln}\end{array}\right]$$
(6)

The weights between the jth input layer neuron and the ith hidden layer neuron are represented by wij.

Third, the ELM makes the following assumptions about the weights between the hidden and output layers64:

$$\beta =\left[\begin{array}{ccc}{\beta }_{11}& \cdots & {\beta }_{1m}\\ \vdots & \ddots & \vdots \\ {\beta }_{l1}& \cdots & {\beta }_{lm}\end{array}\right]$$
(7)

The weights between the jth hidden layer neuron and the kth output layer neuron are represented by \({\beta }_{jk}\).

Fourth, the ELM sets the buried layer neurons' bias at random64:

$$B={\left[{b}_{1} {b}_{2} \dots {b}_{n}\right]}^{T}$$
(8)

Fifth, the ELM selects the g(x) system activation function.

The output matrix T may be represented as follows according to Fig. 3:

$$T={\left[{t}_{1},{t}_{2}, \dots ,{t}_{Q}\right]}_{m\times Q}$$
(9)

The output matrix T's column vectors are as follows64:

$${t}_{j}=\left[\begin{array}{c}{t}_{1j}\\ \vdots \\ {t}_{mj}\end{array}\right]=\left[\begin{array}{c}\sum_{i=1}^{l}{\beta }_{i1}g\left({w}_{i}{x}_{j}+{b}_{i}\right)\\ \vdots \\ \sum_{i=1}^{l}{\beta }_{im}g\left({w}_{i}{x}_{j}+{b}_{i}\right)\end{array}\right],\quad \mathrm{ j}\hspace{0.17em}=\hspace{0.17em}1,\dots ,\mathrm{ Q}$$
(10)

Sixth, have a look at Eqs. (9) and (10) to see what we can come up with:

$$H\beta ={T}^{^{\prime}}$$
(11)

here, \({T}^{^{\prime}}\) is the transpose of T and H is the concealed layer's output. We utilize the least square approach to determine the weight matrix values of \(\beta\)62 to find a particular solution with the least amount of error.

$$\beta ={H}^{+}{T}^{^{\prime}}$$
(12)

We apply a regularization element to the \(\beta\)65 to increase the network's generalization capabilities and make the findings more robust. When the count of concealed layer neurons is smaller than the number of training sets, \(\beta\) can be calculated as:

$$\beta ={{\left(\frac{I}{\lambda }+{H}^{T}H\right)}^{-1}}H^{T}{T}^{^{\prime}}$$
(13)

When the number of concealed layer nodes exceeds the number of training data, \(\beta\) is64:

$$\beta ={H}^{T}{{\left(\frac{I}{\lambda }+{H}^{T}H\right)}^{-1}}^{T}{T}^{^{\prime}}$$
(14)

Support vector regression (SVR)

Smola and Scholkopf66 have written a detailed description of SVR methodology. As a result, this study mainly provides a basic overview of SVR. SVR fits the linear relationship \(y={x}^{T}p+b\) regarding the designation error reduction theory, in which the regression parameters p and b are determined by minimizing the given cost function R67:

$$R= \frac{1}{2}{P}^{T}P+C\frac{1}{J}\sum_{j=1}^{J}{L}_{\varepsilon }\left({d}_{j},{y}_{j}\right)$$
(15)
$${L}_{\varepsilon }\left({d}_{j},{y}_{j}\right)=\left\{\begin{array}{ll}\left|{d}_{j},{y}_{j}\right|-\varepsilon &\quad \left|{d}_{j},{y}_{j}\right|\ge \varepsilon \\ 0 &\quad otherwise\end{array}\right.$$
(16)

here, dj and yj refer to the measured and predicted values of the jth training component, respectively, and J is the count of training components. This cost function aims to minimize both model intricacy (1/2(PTP)) and actual error (\(C\frac{1}{J}\sum_{j=1}^{J}{L}_{\varepsilon }\left({d}_{j},{y}_{j}\right)\)) at the same time. C is a regularization coefficient that controls the model intricacy vs. actual error trade-off. \({L}_{\varepsilon }\left({d}_{j},{y}_{j}\right)\) is the \(\varepsilon\)-insensitive loss function, as stated in Eq. (16). The cost function R is limited in the following scenario when slack parameters ξ are introduced67:

$$R= \frac{1}{2}{P}^{T}P+C\sum_{j=1}^{J}\left({\upxi }_{j},{\upxi }_{j}^{*}\right), \to \left\{\begin{array}{l}{d}_{j}-{x}_{j}^{T}P-b\le \varepsilon +{\upxi }_{j}\\ {-d}_{j}+{x}_{j}^{T}P+b\le \varepsilon +{\upxi }_{j}^{*}\\ {\upxi }_{j}^{*},{\upxi }_{j}\ge 0\end{array}\right.$$
(17)

Therefore, by employing the optimization criteria and inserting Lagrange multipliers \(\left({\alpha }_{j}^{*},{\alpha }_{j}\right)\) linear relationship \(y={x}^{T}p+b\) has the given explicit expression67:

$$y= \sum_{j=1}^{J}\left({\alpha }_{j}-{\alpha }_{j}^{*}\right)\langle {x}_{j},x\rangle +b$$
(18)

By replacing a kernel function \(\mathrm{K}\left({x}_{j},\mathrm{x}\right)\) for the dot product \(\langle {x}_{j},x\rangle\), this linear approach may be extended to nonlinear regression in a direct way. As the kernel function, a variety of functions can be employed. The Gaussian radial basis function \(\mathrm{K}\left({x}_{j},\mathrm{x}\right)=\mathrm{exp}\left(-\Vert {x}_{j}-x\Vert /\left(2{\gamma }^{2}\right)\right)\) is a regularly utilized kernel function67. Figure 4 shows the flowchart of the SVR approach.

Figure 4
figure 4

Flowchart of the SVR model.

Boosting support vector regression (B-SVR)

For the regression problem, many implementations of boosting were utilized, including adaptive boosting for regression68 and Stochastic gradient boosting69. The essential objective of B-SVR is to train a series of SVR systems, each of which is built often using data with high mistakes gained from the prior SVR designs. The following is a description of the technique67.

To begin, all of the data in the initial training dataset are given identical weights \({w}_{j}^{(1)}=1, j=1,\dots ,J\).

Then, for each computation phase t = 1,…,T (where T is the group size or repetition number), do the foregoing:

(First Stage): The probability of drawing the ith input for SVR analysis is67:

$${f}_{j}^{(t)}=\frac{{w}_{j}^{(t)}}{\sum_{j=1}^{J}{w}_{j}^{(t)}}, \quad j=1,\dots ,J.$$
(19)

J samples (sometimes with repetition, i.e., some values that occur several times in the boosting collection) are chosen from the main training samples according to the selection probability functions f(t).

(Second stage): Utilizing boosting dataset, create an SVR network and predict the outputs of the main training data.

(Third stage): Using the given loss function, calculate a loss value for each item in the initial training dataset67:

$${L}_{j}=\frac{\left|{y}_{j}^{(t)}-{d}_{j}\right|}{\mathrm{max}({y}^{(t)}-d)}, \quad j=1,\dots ,J.$$
(20)

(Fourth stage): Determine the mean loss:

$${\overline{L} }_{t}=\sum_{j=1}^{J}{L}_{j}{f}_{j}$$
(21)

(Fifth stage): Consider \({\beta }_{t}=\frac{{\overline{L} }_{t}}{1-{\overline{L} }_{t}}\) and modify the weight of each component in the previous training dataset utilizing67:

$${w}_{j}^{(t+1)}={w}_{j}^{(t)}{\beta }_{t}^{(1-{L}_{j})}$$
(22)

The notation (1 − Lj) indicates that \({\beta }_{t}\) has been increased to the (1 − Lj)th power. This weight-updating technique indicates that if the SVR system generated in the second stage fails to estimate data, its weight will be raised. \({\beta }_{t}\) is a measure of the developed SVR model's reliability. A high \({\beta }_{t}\) suggests that the SVR system has a poor level of certainty. Because the quantity of \({w}_{j}^{(t+1)}\) is required to calculate \({f}_{j}^{(t+1)}\) in the first stage of the next computation phase (t + 1), Eq. (22) yields a transition to the next calculation cycle (t + 1). T is chosen by the training collection's root mean squared error (RMSE)70, and boosting cycle is performed by Drucker71 when the average loss is less than 0.567.

Finally, in terms of estimation, each of the T SVR systems produces a forecasting \({y}_{j}^{(t)}\) for the jth unknown feature and a matching \({\beta }_{t}\). These T forecasts are merged to provide a target variable utilizing the weighted median method, which is calculated as follows:

Arrange these T forecasts, \({y}_{j}^{(t)}\) (t = 1,…, T), in increasing sequence for the jth sample 67:

$${y}_{j}^{(n1)}\le {y}_{j}^{\left(n2\right)}\le \dots \le {y}_{j}^{\left(nJ\right)}$$
(23)

here, nj (j = 1, 2,…, J; J = T) is the initial cycle number t for the jth sample's associated forecast. Consider the case where the biggest predicted value of yi was anticipated by the third computation cycle (t = 3), in which case \({y}_{j}^{(nJ)}\) should equal \({y}_{j}^{(3)}\). From the lowest term n1 to the rth term nr, add the sum of \(\mathrm{log}(\frac{1}{{\beta }_{nj}})\) through j until the following inequality is satisfied67:

$$\sum_{j=1}^{r}\mathrm{log}(\frac{1}{{\beta }_{nj}})\ge \frac{1}{2}\sum_{j=1}^{J}\mathrm{log}\left(\frac{1}{{\beta }_{nj}}\right)$$
(24)

The overall estimate for the jth data is then extracted from the forecast from the nrth SVR system71. Utilizing the same technique as before, group estimates of outputs for additional inputs may also be produced67.

Deep belief network (DBN)

Artificial Neural Networks (ANNs) have been initially suggested in the 1960s and now have grown in prominence in a variety of machine learning approaches, including classification, clustering, regression, and forecasting72. ANNs are flexible analytical approaches that can build complicated associations between real-world information. Among the several types of ANNs, the Back-Propagation (BP) mechanism is one of the most common structures. Although, it should be highlighted that using casual weights at the beginning of the training process is one of the difficulties with BP. As a consequence of this challenge, a unique technique, Deep Belief Network (DBN), for deep network pre-training was devised in 200673, leading to significant advances in machine learning.

A DBN is comprised of several Restricted Boltzmann Machines (RBMs), which are unattended creative prediction model that uses one hidden layer to mimic the presumed distribution of measurable variables. Our DBN uses a series of RBMs to identify relevant architectures, which extract high-level properties from original data. Figure 5 shows a DBN in graphical form74.

Figure 5
figure 5

The DBN algorithm flowchart.

DBN training is divided into three phases75:

  1. 1.

    Conduct unsupervised and hungry layer-wise pre-training utilizing a collection of RBMs.

  2. 2.

    After haphazardly setting the linking weights matrix between the last hidden layer and the output neuron, calculate the error (first fine-tuning stage).

  3. 3.

    As a second fine-tuning stage, use error Back Propagation. The RBM training technique is described as follows:

Restricted Boltzmann machine

The encoder/decoder technique used by the Restricted Boltzmann Machine turns inputs into an increased attributes statement (Fig. 6). The decoder may then retrieve the inputs. RBM growth through the reproduction of inputs is a major feature of DBN because this strategy is unregulated and does not need marked data76.

Figure 6
figure 6

Schematic of the restricted Boltzmann machine.

The RBM is made up of a number of visible, v  {0,1}gv, and concealed units, h  {0,1}gh, the number of which is represented by the gv and gh, respectively. The energy of the joint link {v,h} in RBM, considering bias, is77:

$$E\left(v.h\right)=-{v}^{T}Wh-{b}^{T}v-{c}^{T}h$$
(25)

The vectors of visible units, hidden units, visible unit's bias, and hidden unit's bias are denoted by x, h, b, and c, respectively. The transpose vectors of v, b, and c are denoted by vT, bT, and cT, respectively. The weight matrix is also W. The following formula is used to compute the probability of each possible situation {v,h}v76:

$$P\left(v.h\right)=\frac{1}{Z}\mathrm{exp}\left(-E\left(v.h\right)\right)$$
(26)

here, Z is the normalizing factor and denotes:

$$Z=\sum_{v.h}exp\left(-E(v.h)\right)$$
(27)

In this work, we have used intelligent models based on two different methods. The reason for choosing the thermodynamic properties-based method is to make a model whose inputs are the same as the equations of state so that it is simple and a reasonable comparison can be made. The reason for choosing the method based on chemical structure is to make a model that is more general and can be used for different ionic liquids and operating conditions.

Equations of state (EOSs)

Equations of state (EOSs) are utilized to determine the thermodynamic characteristics of pure substances and mixtures, particularly for processes at pressures higher than 10 bar, since in these circumstances at least one constituent exists in supercritical phase in most cases. The cubic EOSs are the most common types of EOS. The van der Waals EOS, proposed in 187378 as the first model to represent features of both liquid and vapor phases, is the source of these approaches. Numerous EOS have been built on top of the van der Waals EOS in recent decades. For instance, there are over 220 versions and numerous researches that are relevant to parameterization and application to compounds for the widely used Peng–Robinson EOS. Cubic EOS has become quite widespread in the oil and gas industry because they are straightforwardly formulated mathematically and provide good thermodynamic property relationships and forecasts for compounds of different fluids79. In this study, to evaluate the performance of intelligent techniques, the obtained results are compared with equations of state. In this regard, four equations of state including Peng–Robinson (PR), Soave–Redlich–Kwong (SRK), Redlich–Kwong (RK), and Zudkevitch–Joffe (ZJ) have been used. The mathematical relations of the equations mentioned are summarized in Table 4.

Table 4 Equations of state applied in this work.

Results and discussion

Statistical analysis

In this study, the solubility of gaseous hydrocarbons in ILs was predicted using 2145 laboratory data with the four intelligent models already mentioned. For this purpose, two different methods based on thermodynamic properties and the chemical structure of ILs and hydrocarbons have been used. The process of model development and estimation of the solubility values is illustrated in Fig. 7. Statistical criteria comparing the performance of intelligent models are root mean squared error (RMSE) and coefficient of determination (R2), the mathematical relationships of which are defined as follows24,80:

$$RMSE=\sqrt{\frac{1}{n}\sum_{i=1}^{n}{\left({HS}_{i exp}-{HS}_{i pred}\right)}^{2}}$$
(28)
$${R}^{2}=1-\frac{\sum_{i=1}^{n}{\left({HS}_{i exp}-{HS}_{i pred}\right)}^{2}}{\sum_{i=1}^{n}{\left({HS}_{i exp}-{\overline{HS} }_{i exp}\right)}^{2}}$$
(29)

where \({HS}_{i exp}\), \({HS}_{i pred}\), \({\overline{HS} }_{i exp}\), and n refer to experimental hydrocarbon solubility, predicted hydrocarbon solubility, mean value of experimental hydrocarbon solubility, and total number of data points, respectively.

Figure 7
figure 7

Procedure of data preparation and model development for hydrocarbon solubility prediction.

The results of statistical analysis of the developed models are reported in Table 5. According to the obtained results, the DBN model has the best performance in both methods. In the method based on thermodynamic properties, the DBN model has the highest accuracy with R2 and RMSE values of 0.9961 and 0.0054, respectively. The R2 and RMSE values for the DBN model in the chemical structure-based method are 0.9943 and 0.0065, respectively. Generally, the developed models are arranged in the following order of increasing accuracy:

Table 5 Statistical analysis results of developed models.
  • Model (I): MARS < B-SVR < ELM < DBN.

  • Model (II): MARS < B-SVR < ELM < DBN.

Graphical analysis

Plotting the predicted values versus the experimental values obtain a cross plot diagram. In this diagram, the more points that correspond to the X = Y line, the closer the predicted values are to the actual values, so the accuracy of the model will increase. Figure 8 shows a cross-plot diagram for models developed based on thermodynamic properties. As can be seen from Fig. 8, the DBN model has higher density points around the X = Y line, which indicates the higher accuracy of this model than other models, although other models are also in an acceptable situation. Figure 9 shows the cross-plot diagram of the results of the method based on chemical structure, temperature, and pressure. The graphical analysis presented in Fig. 9 also confirms the results of Table 5, and the DBN model has a more appropriate cross plot diagram than the other models.

Figure 8
figure 8

Cross plot diagram of the results of Model (I): (a) DBN model, (b) ELM model, (c) B-SVR model, (d) MARS model.

Figure 9
figure 9

Cross plot diagram of the results of Model (II): (a) DBN model, (b) ELM model, (c) B-SVR model, (d) MARS model.

Figures 10 and 11 illustrate the distribution of the deviation of the predicted values from the actual values for Model (I) and Model (II), respectively. The higher the focus around the zero line, the closer the predicted values are to the actual values and the more accurate the model. Therefore, as can be seen from Figs. 10 and 11, the DBN model is in a better position than the other smart models in both methods.

Figure 10
figure 10

Distribution of deviation of predicted values from actual values for Model (I): (a) DBN model, (b) ELM model, (c) B-SVR model, (d) MARS model.

Figure 11
figure 11

Distribution of deviation of predicted values from actual values for Model (II): (a) DBN model, (b) ELM model, (c) B-SVR model, (d) MARS model.

The Taylor diagram81 was developed in Fig. 12, which integrates a number of statistical variables for a more understandable representation. This illustration depicts all of the smart approaches in respect of how well they forecast gaseous hydrocarbon solubility in various ILs. Three performance parameters [standard deviation (SD), RMSE, and R2] of each network, including DBN, ELM, B-SVR, and MARS, are utilized to quantify the degree of discrepancy between the systems' estimates and the related actual values. The reference point is a distance from the full measure that is used to calculate the centered RMSE. Another reference is the optimal estimation technique, which is denoted by a point with R2 equal to 1. Figure 12a,b show the Taylor diagram of the DBN model for the results of Model (I) and Model (II), respectively. In Fig. 12a, the RMSE and R2 values are 0.0054 and 0.9961, respectively. In Fig. 12b, the RMSE and R2 values are 0.0065 and 0.9943, respectively. Figure 12 depicts the performance parameters of the systems after they have been encapsulated within the Taylor diagram. The Taylor diagram in this picture verifies DBN's dominance by demonstrating that their worldwide performance assessment is the most accurate.

Figure 12
figure 12

Taylor diagram of developed models: (a) Model (I), (b) Model (II).

Equations of state evaluation

Equations of state are one of the conventional methods for calculating the solubility of gases in ILs. Comparing the results of smart models with equations of state can reveal the efficiency and performance of smart models well. For this purpose, four equations of state including Peng–Robinson (PR), Soave–Redlich–Kwong (SRK), Redlich–Kwong (RK), and Zudkevitch–Joffe (ZJ) have been used to calculate the solubility of gaseous hydrocarbons in ILs. Figure 13 shows the results obtained for two systems ([BMIM][PF6]-CH4 and [BMIM][PF6]-C2H6) at 323.15 K. As can be seen from Fig. 13, with increasing pressure, the solubility of gaseous hydrocarbons increases, a trend that can also be seen in the equations of state. Also, the solubility of C2H6 in [BMIIM][PF6] is higher compared to CH4. Another noteworthy point is the very good agreement of the results of the smart models with the experimental data. It can also be found that the equations of state overestimate the solubility and the difference between the calculated values and the experimental data is also significant.

Figure 13
figure 13

Comparison of the results of the DBN models and equations of state; (a) [BMIM][PF6]-CH4, (b) [BMIM][PF6]-C2H6.

Hamedi et al.5 calculated the solubility of methane in ILs using two equations of state including modified Sanchez and Lacombe (SL) and cubic-plus-association (CPA). In this study, 649 experimental data related to 19 ionic liquid and methane systems were used. Figure 14 shows a comparison of current study models and Hamedi et al. results. As can be seen, the accuracy of the intelligent models compared to the equations of state used by Hamedi et al.5 is significant. The advantages of the proposed models in the current study over the work of Hamedi et al. are the use of a wider database (2145 experimental data) including more diverse systems (48 systems) and more advanced general models. Also, the results obtained in this study are more accurate than the research of Hamedi et al.

Figure 14
figure 14

Comparison of the results of the current study models and equations of state used in previous studies.

Trend analysis

Involvement of various parameters such as temperature, pressure, intermolecular interactions, etc. in the solubility of gases in ILs makes it difficult to find physical phenomena affecting the transfer process, but in simpler terms, changing solubility factors (such as Henry's constant) due to changes in physical and chemical properties cause these trends82,83. Enthalpy, entropy, and interactions between gas and ionic liquid are the most important factors affecting the solubility of gases in ILs. Therefore, the effect of changes in pressure, temperature, type of anion and cation on solubility is affected by changes in enthalpy and entropy. In other words, the endothermic or exothermic nature of the dissolution process, which is also depends on the interactions between the gas and the ionic liquid, affects how the gas solubility changes with the increase of each of the mentioned parameters84.

Pressure and anion type effect

Previous studies have shown that although ILs have similar solubility at low pressures85, increasing pressure leads to increasing the solubility of gases in ILs and the rate of increase varies for different ILs86. Figure 15 shows the changes in the solubility of gaseous hydrocarbons with increasing pressure for a number of systems used in this study. As can be seen, increasing the pressure increases the solubility of gaseous hydrocarbons in ILs. The effect of the type of anions existing in the structure of ILs has been studied in many studies86. As mentioned in the literature, the main reasons for changes in the solubility due to changes in pressure and anion type are enthalpy and entropy changes, and the interactions between gas and ILs84. The effect of a number of anions has been investigated for example. Investigation of the systems reported in Fig. 15 shows that the effect of anion type on the solubility of C2H6 in ILs is as follows:

$$\left[ {{\text{BMIM}}} \right]\left[ {{\text{PF}}_{{6}} } \right] \, < \, \left[ {{\text{BMIM}}} \right]\left[ {{\text{TF}}_{{2}} {\text{N}}} \right] \, < \, \left[ {{\text{BMIM}}} \right]\left[ {{\text{eFAP}}} \right].$$
Figure 15
figure 15

Pressure and anion type effect on the solubility of gaseous hydrocarbons in ionic liquids.

Cation effect

In previous studies, the influence of cation type has been investigated43. The reasons for the effect of cation type on solubility are similar to the reasons mentioned for the effect of anion type. In this study, the effect of a number of cations on the solubility of gaseous hydrocarbons in ILs has been studied. Figure 16 examines a number of systems studied in this work. According to the results obtained for the proposed systems, the effect of cation type on the solubility of methane in ILs is as follows:

$$\left[ {{\text{tes}}} \right]\left[ {{\text{TF}}_{{2}} {\text{N}}} \right] \, < \, \left[ {{\text{bmpip}}} \right]\left[ {{\text{TF}}_{{2}} {\text{N}}} \right] \, < \, \left[ {{\text{cprop}}} \right]\left[ {{\text{TF}}_{{2}} {\text{N}}} \right] \, < \, \left[ {{\text{toa}}} \right]\left[ {{\text{TF}}_{{2}} {\text{N}}} \right].$$
Figure 16
figure 16

Cation type effect on the solubility of gaseous hydrocarbons in ionic liquids.

Temperature and alkyl chain length effect

Many researchers have studied the effect of temperature86 and alkyl chain length87 on the solubility of gases in ILs. The results show that increasing the temperature reduces the solubility86. Generally, the dependency of solubility on temperature is thermodynamically related to the enthalpy of dissolution. For example, in exothermic processes (such as dissolution of CO2 in ILs) the solubility of the gas decreases with increasing temperature, and in endothermic processes (such as dissolution of N2 in ILs) the increase in temperature increases the solubility83,84. Also, increasing the alkyl chain length increases the solubility of hydrocarbons in ILs87. The reason for this subject is the increased entropy of solvation for ILs84. According to Fig. 17, although increasing the alkyl chain length does not show a specific trend in ethane solubility in the proposed systems, increasing the temperature has reduced the ethane solubility in the proposed systems.

Figure 17
figure 17

Temperature and alkyl chain length effect on the solubility of gaseous hydrocarbons in ionic liquids.

Effect of the type of hydrocarbon

In order to investigate the effect of hydrocarbon type on the solubility of gaseous hydrocarbons, four different systems have been investigated. Figure 18 shows the trend of solubility changes for these four systems with increasing pressure at 320 K. According to the results, it can be seen that the solubility of proposed hydrocarbons in [BMIM][TF2N] is determined as follows:

$${\text{C}}_{{3}} {\text{H}}_{{6}} < {\text{ C}}_{{3}} {\text{H}}_{{8}} < {\text{ C}}_{{4}} {\text{H}}_{{8}} < {\text{ C}}_{{4}} {\text{H}}_{{{1}0}} .$$
Figure 18
figure 18

Type of hydrocarbon effect on the solubility of gaseous hydrocarbons n ionic liquids.

Therefore, it can be concluded that increasing the molecular weight of hydrocarbons can increase their solubility in ILs.

Therefore, as it was investigated, different parameters can affect the solubility of gaseous hydrocarbons in ionic liquids, and this effect can vary depending on the type of gas and ionic liquid. For example, Ramdin et al.4 reported that although the enthalpy of absorption of CO2 is higher in [amim][dca] than in [thtdp[phos], its solubility is lower in [amim][dca]. On the other hand, this effect was the opposite for CH4, and the solubility of methane in ionic liquids corresponded to the enthalpy of adsorption. Also, its solubility in ionic liquids with longer non-polar alkyl chains is higher. Thus, entropic effects and solvent–solvent interactions prevailed for CO2 and CH4, respectively. The solubility of hydrocarbons in ILs is important in many ways. The selection of ILs as solvents in reactions involving permanent gas and gas storage media is strongly influenced by the degree of gas solubility in ILs and is essential for the development of separation methods. Investigation of the effect of various parameters such as temperature, pressure, etc. is necessary to deal with the separation of CO2 from natural gas as well as the low adsorption of light hydrocarbons in ILs such as methane, ethane and propane. Therefore, evaluating the effect of temperature, pressure, anion and cation type, hydrocarbon type, and alkyl chain length can help researchers to select the appropriate ILs in different operating conditions. The findings of the study also show that ILs are suitable candidates for the solubility of hydrocarbons so they can be used in various operational applications.

Conclusions

In this work, the solubility of gaseous hydrocarbons in ILs was predicted using DBN, ELM, Boost-SVR, and MARS models. In this regard, the thermodynamic properties and chemical substructures of gaseous hydrocarbons and ILs along with temperature and pressure have been used in distinct methods to predict the solubility of gaseous hydrocarbons in ILs. The findings of this study give the following conclusions:

  • In the method based on thermodynamic properties, the DBN model with RMSE and R2 values of 0.0054 and 0.9961, respectively, has the most accurate estimates.

  • In the method based on chemical structure, temperature, and pressure, the DBN model with RMSE and R2 values of 0.0065 and 0.9943, respectively, has the best performance.

  • Comparison of the results of smart models with equations of state shows that the accuracy of the former is much higher than the latter.

  • The study of the effect of different factors on the solubility of gaseous hydrocarbons shows that increasing the pressure and molecular weight of hydrocarbons increases the solubility, while increasing the temperature decreases the solubility of gaseous hydrocarbons in ILs.

  • Investigation of the effect of the type of anion and cation in the structure of ILs shows that the following order have been established for the solubility of the studied systems:

    Order of the solubility of C2H6 in ILs based on the anion type: [BMIM][PF6] < [BMIM][TF2N] < [BMIM][eFAP]

    Order of the solubility of CH4 in ILs based on the cation type: [tes][TF2N] < [bmpip][TF2N] < [cprop][TF2N] < [toa][TF2N]