# Evolving Machine Learning Methods for Density Estimation of Liquid Alkali Metals over the Wide Ranges

Authors: Tao Lin; Amir Seraj
Journal: International Journal of Chemical Engineering
 (2022)

---

## Abstract

Alkali metals are widely used as industrial materials in products such as electrochemical cells because of their properties that make them suited to high temperatures. In this study, three computational approaches including gene expression programming (GEP), least squares support vector machine (LSSVM), and adaptive neuro fuzzy inference system (ANFIS) have been suggested to estimate density of different liquid alkali metals in extensive ranges of pressure and temperature. An experimental databank involving 595 experimental alkali metals’ densities has been gathered to prepare and test the models. The mathematical and visual comparisons of these models’ outputs and real density values are used to assess capacities of GEP, LSSVM, and ANFIS models in prediction of alkali metals’ density. The determined R-squared values for GEP, LSSVM, and ANFIS are 0.9999, 1, and 1, respectively. The MSE values are estimated to be 0.9184, 0.815, and 0.154 for GEP, ANFIS, and LSSVM, respectively. According to these results, these models can be suggested as simple and accurate ways for determining alkali metals’ properties. Results showed that LSSVM has the best performance in comparison with GEP and ANFIS. Moreover, the parametric analysis of input parameters is carried out to show the impact of them on alkali metals’ density. According to this analysis, the amount of lithium can be the most effective parameter on the mixture density.


---

## Body

## 1. Introduction

The investigation of alkali metals’ properties is one of the interesting topics for many researchers because of their desirable and impressive advantages in high-temperature conditions. These specific properties such as good thermal stability, high thermal conductivity, high boiling point, and low vapor pressure can be applicable in low-pressure performance of coolant systems at high radiation fluxes and temperatures [1–5]. The production of magneto-hydrodynamic and thermionic converters and high-energy electrochemical cells is highly dependent on alkali metals. Liquid form of alkali metals can be used as coolant for nuclear power plants [6]. Typically, the applicable temperatures for the industries mentioned above are higher than those for which liquid metal's physical properties can be experimentally studied. Determination of properties of alkali metals at high-temperature conditions by experimental methods is so difficult because of their high level of chemical reactivity. The atmosphere components such as water vapor, carbon dioxide, and oxygen can easily react with them, so it is hard to obtain materials with high grade of purity. In addition to this, researchers have become interested in the benefits of computing works in predicting alkali metal properties by developing a reliable and user-friendly approach [7–11]. Mousazadeh and Marageh proposed the perturbed Lennard-Jones chain (PLJC) equation of state for prediction of liquid density of these metals [12]. Ghatee et al. developed the linear exp-6 isotherm and virial-like equation to estimate thermodynamic properties of alkali systems [13, 14]. Eslami used the Parsafar equation of state to estimate isothermal compressibility, isobaric expansion, and density of liquid metals in high temperature and pressure [15]. Sabzevari and Mousavi predicted the density of these liquids by using artificial neural network and a new equation of state in different operational conditions [16, 17].Machine learning approaches have wide applications in different issues such as prediction of CO2 diffusion coefficient [18], CO2 viscosity [19], CO2 adsorption, pressure loss [20, 21], performance of low salinity flooding [22], and interfacial tension [23, 24]. Due to this ability, using machine learning methods becomes an interesting topic for prediction of alkali metals’ density. In the current work, three novel models including GEP, LSSVM, and ANFIS methods are implemented to forecast density of liquid alkali metals or their mixtures. Furthermore, the accuracy of the collected dataset is evaluated based on an outlier detection method. Moreover, a new analysis is proposed to identify effects of different parameters on density of liquid alkali metals.


## 2. Methodology

### 2.1. Experimental Dataset

This study utilizes 595 measured liquid density points of alkali metals and their alloys to prepare and validate the models. This collection of alkali density data has been gathered from reliable sources [25–27]. These data points are divided into two sets with size of 446 and 149 points for training and testing, respectively. The summary of these experimental conditions is given in Table 1.Table 1
Details of experimental data.
SystemRange of temperature (K)Range of pressure (MPa)Li500–200010–100Na400–200010–100K400–180010–100Rb400–160010–100Cs400–160010–100Na + K400–12002.23 × 10−7–0.409K + Cs350–13001.499 × 10−8–1.1


### 2.2. Least Squares Support Vector Machine (LSSVM)

A machine learning strategy used in classification and recognition of regression pattern is called support vector machine [28, 29]. In order to tackle drawbacks of SVM algorithm, a new version of this approach named LSSVM is suggested. This algorithm applied regression error to constraints of optimization. In other words, LSSVM solves and determines the regression error. The following expression defines the main function in this approach:(1)QLSSVM=12wTw+γ∑k=1Nek2,in which γ and T point to regression errors’ summation and transpose matrix. The following constraint is related to previous equation:(2)yk=wT∅xk+b+ek,k=1,2,…,N,in which, b, y, T, ek, and w are bias, output vector, transpose matrix, regression error, and regression mass, respectively. Furthermore, the following equation formulates mass coefficient:(3)w=∑k=1Nαk∅xk,in whichαk=2γek.Rewriting the above equation based on the LSSVM approach, we get(4)w=∑k=1NαkxkTx+b.Thus, the multipliers of Lagrange can be expressed as follows:(5)ak=yk−bxkTx+2γ−1.The aforementioned linear regression equation is changed by applying kernel function:(6)fx=∑k=1NαkKxi,xj+b,in which Kxi,xj points to kernel function which is determined by the succeeding formulation [30]:(7)Ωij=∅xi∅xj=Kxi,xj.In the current paper, the radial basis kernel function is employed:(8)Kxi,xj=e−xi−xj2/σ2.Particle swarm optimization (PSO) is used to optimize LSSVM algorithm as shown in Figure1. The kernel parameter (σ2) and regularization index (γ) are 0.759 and 8063.72, respectively.Figure 1
Training of LSSVM algorithm.


### 2.3. Adaptive Neuro Fuzzy Inference System

Jang introduced a new artificial intelligence method called ANFIS which usually has five layers. A typical form of ANFIS algorithm is prepared by utilizing optimization approaches. Actually, ANFIS applies the abilities of neural network and fuzzy logic approaches. The scheme of ANFIS is shown in Figure2. The first layer is defined as follows [31]:(9)Oi1=βx=e−x−Z2/2σi2,where Z and σ denote Gaussian parameters and x represent input parameters. The Gaussian function is used as a membership function for this approach. There are several constant nodes and weighted terms in second layer:(10)Oi2=βAixβBiy,∀i∈1,2.Figure 2
Scheme of ANFIS algorithm.The weight averages are determined by the following formulation in the third layer:(11)Oi3=ω¯i=ω1ω1+ω2,∀i∈1,2.In the fourth layer, the weight averages and their associated functions are multiplied as follows:(12)Oi4=ω¯ifi=ω¯ipix+qiy+ri,∀i∈1,2,where r, p, and q point to resulting parameters. Finally, the output is determined as follows in the last layer [32]:(13)Oi5=∑iω¯ifi=∑iωifi∑iωi.


### 2.4. Gene Expression Programming Method

The first algorithm of genetic-based approaches is genetic algorithm (GA). For long time, this approach has extensively been applied as a useful tool for solving various problems in petroleum and chemical industries. Afterwards, a new version of this method called GP was developed. Based on the scheme of this new form, the solutions of problem are suggested in terms of function type instead of considering them as fixed length binary systems. Nonlinear parse trees systems are chosen as solution functions in this method [33, 34]. After that, Ferreira proposed the GEP approach as a new scheme of GP [35]. In the new approach, the limitations of previous GA and GP algorithms were modified dramatically by achieving best solutions in regression issues. The GP method uses expression trees (ETs) to indicate population individuals. In contrast to the GP approach, linear chromosomes which express the population individuals will be altered to the genotype and phenotype [36, 37]. These alterations represent expression parse trees. According to above explanations, ET and chromosome are known as the most important components of GEP algorithm. Moreover, it is necessary to mention that the chromosomes have the potential of being encoded solutions and can be changed to actual solutions in form of ETs. The main parts of chromosomes are terminals and functions. These functions are composed of several genes and terminals are made up of two types of elements including variables and constants. For each functional gene, a head and a length can be found in its structure. In order to determine gene’s tail, equation (1) is applied [38]:(14)t=1+n−1h,where n and h are the largest function and head function, respectively, and t denotes the tail of gene. Figure 3 shows a common type of two-gene chromosome which has four functions of /, × √, and + and also three forms of terminals a, b, and c. [37].Figure 3
A common form and mathematical expression of two-gene chromosome.


## 2.1. Experimental Dataset

This study utilizes 595 measured liquid density points of alkali metals and their alloys to prepare and validate the models. This collection of alkali density data has been gathered from reliable sources [25–27]. These data points are divided into two sets with size of 446 and 149 points for training and testing, respectively. The summary of these experimental conditions is given in Table 1.Table 1
Details of experimental data.
SystemRange of temperature (K)Range of pressure (MPa)Li500–200010–100Na400–200010–100K400–180010–100Rb400–160010–100Cs400–160010–100Na + K400–12002.23 × 10−7–0.409K + Cs350–13001.499 × 10−8–1.1


## 2.2. Least Squares Support Vector Machine (LSSVM)

A machine learning strategy used in classification and recognition of regression pattern is called support vector machine [28, 29]. In order to tackle drawbacks of SVM algorithm, a new version of this approach named LSSVM is suggested. This algorithm applied regression error to constraints of optimization. In other words, LSSVM solves and determines the regression error. The following expression defines the main function in this approach:(1)QLSSVM=12wTw+γ∑k=1Nek2,in which γ and T point to regression errors’ summation and transpose matrix. The following constraint is related to previous equation:(2)yk=wT∅xk+b+ek,k=1,2,…,N,in which, b, y, T, ek, and w are bias, output vector, transpose matrix, regression error, and regression mass, respectively. Furthermore, the following equation formulates mass coefficient:(3)w=∑k=1Nαk∅xk,in whichαk=2γek.Rewriting the above equation based on the LSSVM approach, we get(4)w=∑k=1NαkxkTx+b.Thus, the multipliers of Lagrange can be expressed as follows:(5)ak=yk−bxkTx+2γ−1.The aforementioned linear regression equation is changed by applying kernel function:(6)fx=∑k=1NαkKxi,xj+b,in which Kxi,xj points to kernel function which is determined by the succeeding formulation [30]:(7)Ωij=∅xi∅xj=Kxi,xj.In the current paper, the radial basis kernel function is employed:(8)Kxi,xj=e−xi−xj2/σ2.Particle swarm optimization (PSO) is used to optimize LSSVM algorithm as shown in Figure1. The kernel parameter (σ2) and regularization index (γ) are 0.759 and 8063.72, respectively.Figure 1
Training of LSSVM algorithm.


## 2.3. Adaptive Neuro Fuzzy Inference System

Jang introduced a new artificial intelligence method called ANFIS which usually has five layers. A typical form of ANFIS algorithm is prepared by utilizing optimization approaches. Actually, ANFIS applies the abilities of neural network and fuzzy logic approaches. The scheme of ANFIS is shown in Figure2. The first layer is defined as follows [31]:(9)Oi1=βx=e−x−Z2/2σi2,where Z and σ denote Gaussian parameters and x represent input parameters. The Gaussian function is used as a membership function for this approach. There are several constant nodes and weighted terms in second layer:(10)Oi2=βAixβBiy,∀i∈1,2.Figure 2
Scheme of ANFIS algorithm.The weight averages are determined by the following formulation in the third layer:(11)Oi3=ω¯i=ω1ω1+ω2,∀i∈1,2.In the fourth layer, the weight averages and their associated functions are multiplied as follows:(12)Oi4=ω¯ifi=ω¯ipix+qiy+ri,∀i∈1,2,where r, p, and q point to resulting parameters. Finally, the output is determined as follows in the last layer [32]:(13)Oi5=∑iω¯ifi=∑iωifi∑iωi.


## 2.4. Gene Expression Programming Method

The first algorithm of genetic-based approaches is genetic algorithm (GA). For long time, this approach has extensively been applied as a useful tool for solving various problems in petroleum and chemical industries. Afterwards, a new version of this method called GP was developed. Based on the scheme of this new form, the solutions of problem are suggested in terms of function type instead of considering them as fixed length binary systems. Nonlinear parse trees systems are chosen as solution functions in this method [33, 34]. After that, Ferreira proposed the GEP approach as a new scheme of GP [35]. In the new approach, the limitations of previous GA and GP algorithms were modified dramatically by achieving best solutions in regression issues. The GP method uses expression trees (ETs) to indicate population individuals. In contrast to the GP approach, linear chromosomes which express the population individuals will be altered to the genotype and phenotype [36, 37]. These alterations represent expression parse trees. According to above explanations, ET and chromosome are known as the most important components of GEP algorithm. Moreover, it is necessary to mention that the chromosomes have the potential of being encoded solutions and can be changed to actual solutions in form of ETs. The main parts of chromosomes are terminals and functions. These functions are composed of several genes and terminals are made up of two types of elements including variables and constants. For each functional gene, a head and a length can be found in its structure. In order to determine gene’s tail, equation (1) is applied [38]:(14)t=1+n−1h,where n and h are the largest function and head function, respectively, and t denotes the tail of gene. Figure 3 shows a common type of two-gene chromosome which has four functions of /, × √, and + and also three forms of terminals a, b, and c. [37].Figure 3
A common form and mathematical expression of two-gene chromosome.


## 3. Results and Discussion

In this work, three artificial intelligence methods including GEP, LSSVM, and ANFIS are used to forecast liquid density of alkali metals. Figure4 gives information about the membership functions of ANFIS algorithm. It shows that all related alkali metals’ density data are normalized in range of [−1, 1]. A new correlation based on the GEP strategy has been designed to estimate density of alkali metals and their alloys. The process of achieving best fitness for the GEP model is shown in Figure 5. In this model, two parameters including number of genes and their P values have great importance, so they are shown in Figure 6. The effect of each node is expressed by the P value so that as the value of this parameter becomes higher, its effectiveness deceases. On the other hand, pop browser implements an optimal model based on its accurate performance and minimal complexity. As depicted in Figure 7, the performance of green point models is better than the blue ones, but the best choice for the model is the red circle one which has less complexity in its scheme. The suggested GEP-based correlation for estimation of density of alkali metals is as follows:(15)density=A+B+C+D,where the parameters A, B, C, and D are predicted as follows:(16)A=0.002047P−0.01846T+5.442Mw−445Cs+12.55expMw/T,B=85.38expCs−6.12logT+0.1568logK+3.906logCs−66.53Mw,C=3.904Cs−0.6169tanhP+146tanhCs−100.9tanhRb+160.9,D=0.2969logMwLi−0.6169PT−83.36Li+KlogT.Figure 4
Trained membership function.Figure 5
Determination of optimum fitness value through the change of generations.Figure 6
The value of gene weight in the GEP process.Figure 7
Pop browser for GEP development.P, T, and Mw are pressure (atm), temperature (K), and molecular weight (g/mol). Cs, Li, K, and Rb represent the amount of these elements in the mixtures.To evaluate performance of these liquid alkali metal density predictors, actual and estimated values are illustrated simultaneously in Figures8 and 9. The predicted densities are located near their experimental values. Additionally, the cross plots of actual liquid metal density versus GEP, ANFIS, and LSSVM outputs are shown in Figures 10 and 11. This graphical analysis shows great accuracy of the models in estimation of liquid alkali metals’ density. The abilities of GEP, ANFIS, and LSSVM algorithms are confirmed in this field.Figure 8
Simultaneous demonstration of GEP output and experimental alkali metals’ density for (a) training and (b) testing.Figure 9
Simultaneous demonstration of predicted and experimental alkali metal densities for (a) ANFIS and (b) LSSVM.
(a)(b)Figure 10
Cross plot of the measured and forecasted alkali densities of the proposed GEP model for training and testing phases.Figure 11
Cross plots of predicted and actual alkali metal densities for (a) ANFIS and (b) LSSVM.
(a)(b)The efficiency of the aforementioned algorithms can be assessed by mathematical criteria including mean squared error (MSE), standard deviation (STD), mean relative error (MRE), R-squared (R2), and root mean square error (RMSE).As shown in Table2, the R2 coefficients for GEP, ANFIS, and LSSVM algorithms are near one which express their high-quality ability in prediction of alkali metals’ density. On the other hand, low values of MSE, STD, MRE, and RMSE for training and testing steps of these models confirm their success.Table 2
The statistical indexes for suggested models.
R2MREMSERMSESTDGEPTrain0.99990.79350.03910.89080.1387Test0.99990.91840.05510.95830.1683Total0.99990.85590.04710.92450.1435ANFISTrain10.7660.0330.18160.1276Test10.8150.03350.18290.1273Total10.7780.03310.18290.1274LSSVMTrain10.1670.00560.0750.0693Test10.1540.00420.06510.0592Total10.1640.00530.06510.0668The correctness of algorithm is highly dependent on the precision of utilized experimental values. The current study implements a large number of experimental data, and it should be considered that some of them may contain measurement errors. Due to this fact, it is necessary to recognize suspected experimental data during training the models. In this paper, the leverage approach is applied to find suspected data. According to the following equation, a hat matrix is constructed after determining residual values [21]:(17)H=XXTX−1XT.Hat matrix is determined in terms ofX matrix m × n which are number of samples and model parameters, respectively. This method is visually demonstrated by a Williams plot which is shown in Figure 12. The critical leverage value (H∗) is determined by the following equation:(18)H∗=3n+1m.Figure 12
Williams plot of (a) ANFIS and (b) LSSVM.
(a)(b)In this analysis, the number of outliers and the overall dataset have acceptable accuracy for training models.On the other hand, the relevancy factor is one of the useful parameters to investigate the impacts of input parameters on target value [21]:(19)r=∑i=1nXk,i−Xk¯Zi−Z¯∑i=1nXk,i−Xk¯2∑i=1nZi−Z¯2,where Xk,i, Zi, Z¯, and Xk¯ are the kth input, the target, the target average, and the input average, respectively. The calculated relevancy factors for each input are shown in Figure 13. According to this analysis, it is worthy to mention that pressure and amount of Li and Na have straight relationship with alkali metals’ density while increasing other parameters causes reduction in target value. Moreover, the amount of lithium can be the most effective parameter on the mixture density.Figure 13
Sensitivity analysis for alkali metals’ density.


## 4. Conclusion

In this study, the estimation ability of three groups of artificial intelligence models has been assessed to calculate the density of alkali metals in wide condition based on a large databank in which 595 data were collected from different research studies. Liquid alkali metals’ density is predicted by considering composition of their alloys, molecular weight, temperature, and pressure as input variables. Furthermore, the training parameters of LSSVM and ANFIS algorithms were determined by PSO, and the GEP equation was introduced. The statistical and visual analyses of the suggested algorithms illustrate very satisfactory estimations compared with actual data. The determined R-squared values for GEP, LSSVM, and ANFIS are 0.9999, 1, and 1, respectively. The MSE values are estimated to be 0.9184, 0.815, and 0.154 for GEP, ANFIS, and LSSVM, respectively. The STD values of GEP, ANFIS, and LSSVM are 0.1683, 0.1273, and 0.0592, respectively. Moreover, the simple and low-cost performance of these algorithms makes them attractive for utilizing in different industries.



---

*Source: 7633865-2022-05-12.xml*