1 Introduction

With the recent rapid rates of industrialization and urbanization, the rates of fossil fuel consumption and global warming are increasing. Accordingly, demands for renewable energy development and utilization are also increasing [1]. Soil has the potential to store energy but requires further development before it can be applied. Accurate measurement of the thermal conductivity of geotechnical materials is an important part of geotechnical engineering temperature field analysis and energy pile design. The thermal conductivity of soil is a complex parameter that is mainly dependent on the soil type, saturation, grain size and packing density. The type of soil is considered to be the most important influence on its thermal resistance [2,3,4,5]. Thermal conductivity is one of the most important thermophysical properties of soils, inasmuch it is directly connected with the heat transfer mechanism by conduction in materials [6].

In recent years, there has been much research on soil heat conduction and many predictive models have been proposed. Kersten [7] measured the thermal conductivity of 19 different types of soil using vertical heating from a single-column heat source. They analysed the influences of moisture content and dry density on thermal conductivity, proposed an empirical relationship model for predicting silt, clay and sandy soil. Coté and Konrad [8] measured the thermal conductivity of more than 650 soil samples and improved Johansen [9] normalized model, establish the κ-Sr relationshiped with κ as variable defined in par.6, and used κ to reflect the influence of the type of soil on its thermal conductivity. Based on the measured thermal conductivity of clay, silt, silty sand and fine sand, Erzin et al. [10] proposed predictive models for single samples and specific types of samples, respectively, using on an artificial neural network. Wang et al. [11] measured the thermal conductivity and electrical resistivity of 57 soil samples and found a linear relationship between them, although soil saturation was not considered. Based on published thermal conductivity data of 257 unsaturated soils, Zhang et al. [12] used dry density, porosity, saturation, quartz content, sand content and clay content as input to an artificial neural network predictive model. They found that the model can comprehensively consider the influences of these parameters and provide good predictions. Bi et al. [13] proposed a general model for calculating the thermal conductivity of frozen soil with consideration of soil composition and frost heave. The model is a function of unfrozen water content, frost heave effect, porosity and initial water content. In summary, predictions of soil thermal conductivity are commonly made using empirical relationship models, theoretical calculation models and artificial neural network models. Some authors assert that empirical models give much better accuracy than theoretical models [14]. Theoretical calculation models of soil thermal conductivity involve many parameters and the calculation process is complicated, leading to a difficult practical application. Artificial neural network models can consider the most factors and have the highest accuracy in predicting the thermal conductivity of soil.

The aim of this paper is to establish a predictive model of soil thermal conductivity. Firstly, the main factors influencing soil thermal conductivity are identified, then an artificial neural network model, fuzzy neural network model and support vector machine model are used to predict soil thermal conductivity. The results of the three models are compared with traditional empirical relationship models to verify their effectiveness. Robustness is an important indicator for evaluating intelligent computing models. Monte Carlo simulations are used to evaluate the robustness of prediction models. The research results are of great significance for discussing heat transfer mechanism of soil, and provide a new idea for accurately predicting soil thermal conductivity.

2 Factors influencing soil thermal conductivity

Thermal conductivity is an important soil thermophysical property. It is closely related to many factors, such as mineral composition, saturation, particle size distribution, dry density and porosity, among which mineral composition has the greatest influence [15]. In the present section the influence of soil geotechnical parameters on thermal conductivity is explored.

Moisture content is the most basic parameter describing the physical properties of soil and is also one of the main factors affecting soil heat transfer. Unsaturated soil is composed of a three-phase medium, and changes in water content mainly affect the proportions of liquid and gas in the soil. An increase in water content increases the proportion of water phase in the soil, while the proportion of gas phase decreases. Since the thermal conductivity of water is significantly greater than that of air, heat transfer through water films on particle surfaces and water bridges increases, so increasing the effective thermal conductivity of the soil [7, 8]. As the water content increases, the thermal conductivity eventually reaches a maximum and doesn't increase any more, at a specific water content [16]. Soil with a greater dry density has closer interparticle contact, resulting in greater interparticle heat transfer and higher thermal conductivity.

The mineral composition of soil plays an important role in its thermal conductivity. The solid particles of soil are mainly composed of minerals such as quartz, feldspar and mica [17]. The thermal conductivity of quartz is about 7.69 Wm−1 K−1, while that of other minerals is usually between 1.25–4 Wm−1 K−1. The thermal conductivity of quartz is significantly higher than that of other minerals, so soils with a high quartz content have significantly higher thermal conductivity [18]. Therefore, the thermal conductivity of soil depends on its mineral composition, especially the quartz content.

The anisotropy of soils also influences their thermal conductivity. Macaulay et al. [19] tested the thermal conductivity of Australian siltstone and found that the bedding-direction angle of siltstone began to increase and its thermal conductivity also increased. The thermal conductivity of siltstone varies smoothly with the increase in bedding-direction angle at angles > 40°. This conclusion is consistent with Popov et al.’s [20] research on sedimentary rocks.

Many factors can affect the thermal conductivity of soils, such as particle-size distribution, particle size, particle shape and temperature [21,22,23]. The particle-size distribution changes the interparticle contact area, thus affecting thermal conductivity [24], as heat conducts more rapidly through particles than between them. At a given dry density, the smaller the particle size is, the more interparticle contact points and the lower the thermal conductivity of soil are [9]. Additionally, temperature affects the thermal motion of molecules. Mitchell and Soga [25] found that the thermal conductivity of all crystalline minerals decreases with increasing temperature. However, the thermal conductivity of soil water increases slightly as temperature increases. Furthermore, increases in temperature significantly increase the thermal conductivity of the air in soils, although some researchers have reached the opposite conclusion. Therefore, the influences on soil thermal conductivity are complex and require further study to more clearly understand them.

3 Artificial intelligence computing model

Artificial intelligence technology has developed rapidly and has recently been applied to the field of geotechnical engineering. It can accurately calculate engineering parameters in a time and cost-effective manner so that projects can be completed in less time and at lower cost. For this purpose, in this paper there different algorithms are described and tested in calculating the thermal conductivity of soils: an artificial neural network model (ANN), an adaptive neural network-based fuzzy inference system (ANFIS) and a support vector machine model (SVM).

3.1 Artificial neural network analysis

Artificial neural network models are based on an information processing system that mimics the structure and function of the human brain [26, 27]. An ANN is a complex network composed of many neurons that can process and learn a large amount of input data. Many neural network algorithms have been developed, such as the Levenberg–Marquardt algorithm, conjugate gradient algorithm and Bayesian regularization algorithm [28,29,30]. A neural network model consists of an input layer, one or more hidden layers and an output layer. The layers are composed of many neurons. The number of hidden layers depends on the complexity of the problem. For general geotechnical engineering, one hidden layer is enough effective [31]. The function of the input layer is to obtain input data, filter and pass them to the hidden layer. The main function of the hidden layer node function is to receive data from the input layer and learn from them to construct a training model. The output layer performs the final step of processing the data and deriving calculated values [32]. Artificial neural networks have been effectively applied to geotechnical engineering problems such as foundation pit support, tunnel monitoring, slope treatment and prediction of soil thermal conductivity [33,34,35,36,37,38,39]. Figure 1 shows a typical neural network structure, where N1, N2 and Nk are input parameters and Y is an output parameter. The advantage of ANN models is that there is no need to restrict the input data. The model only needs to learn the given input data and then calculate the result.

Fig. 1
figure 1

The recurrent neural network architecture

This paper trains an established neural network model based on the Bayesian regularization algorithm, which uses ridge regression to convert nonlinear regression problems into statistical ones. The advantage of this method is that it has better performance than other backpropagation algorithms because an ANN based on a Bayesian regularization algorithm does not need to use cross-validation in the verification process, which can simplify model training and reduce calculation time.

3.2 Fuzzy inference system based on adaptive neural network

The adaptive neural network-based fuzzy inference system (ANFIS) is a new type of fuzzy inference system structure that organically combines fuzzy logic and neural networks. It uses a hybrid algorithm of backpropagation and least squares to adjust the first trial and conclusion parameters, and automatically generates If–Then rules. A fuzzy reasoning system is very suitable for expressing fuzzy experience knowledge but lacks an effective learning mechanism. Although neural networks have a self-learning function, they cannot express the reasoning function of the human brain well. ANFIS organically combines a neural network and fuzzy reasoning. It not only exerts the advantages of both but also makes up for their shortcomings. ANFISs are hybrid models in which multiple nodes related to direction connections can estimate the fuzzy parameters of the model. This paper uses a subtractive clustering algorithm to train the ANFIS model, which can automatically estimate the number of clusters and their locations. The main process of the subtractive clustering algorithm is that it 1) selects the data most likely to be the first cluster centre and then 2) deletes all the data located around the first cluster centre that affects the radius definition. Finally, the process is repeated until all the data fall within the radius of the cluster centre [40].

3.3 Support vector machine model

The support vector machine (SVM) model is a generalized linear classifier that performs binary classification of data with a supervised learning method. Its theory is to establish a hyperplane to divide a dataset into different categories [41]. The SVM uses a hinge-loss function to calculate the empirical risk and adds a regularization term to the solution system to optimize the structural risk, and then determines the optimal hyperplane by optimizing the boundary. The support vector is determined as the training point closest to the optimal plane. SVM is widely used in geotechnical engineering, such as for landslide calculation, because it is the most accurate and precise modelling technique [42].

4 Thermal conductivity databases

The data used in this paper comes from 40 types of Canadian field soil [43,44,45]. Among them, 22 species are fine-grained soil (sand content < 40%) and 18 are coarse-grained soil (sand content > 40%). The measurements were carried out on moderately compacted samples at room temperature, and over a full range of degree of saturation ranging from dryness to full saturation, a total of 240 test data. The physical properties of the 40 Canadian soils are shown in Table 1. Their moisture content, dry density, clay content, powder content, sand content and quartz content were used as input parameters for the predictive model, with soil thermal conductivity as the output parameter. Table 2 lists the boundary values of the input and output parameters of the predictive model. In addition, the input and output parameters of all models are normalized to make them range between 0 and 1. The normalization equation is [10]:

$${x}_{norm}=\frac{x-{x}_{\mathrm{min}}}{{x}_{\mathrm{max}}-{x}_{\mathrm{min}}}$$
(1)

where xmax and xmin are the maximum and minimum values of the variable x, respectively, xnorm is the normalized value.

Table 1 Physical properties 40 Canadian
Table 2 The boundary values of the input and output parameters of the predictive model

5 Establishment and performance testing of the intelligent calculation model

5.1 Establishment of the intelligent calculation model

The ANN, ANFIS and SVM were used to establish an intelligent calculation model for predicting soil thermal conductivity. According to the analysis of the factors affecting the thermal conductivity of soil (Sect. 2), the input parameters for all calculation models were water content, dry density, clay content, powder content, sand content and quartz content, with the output parameter being soil thermal conductivity. In this paper, the Bayesian regularization algorithm was used to train the developed neural network calculation model. An ANN based on the Bayesian regularization algorithm is a mathematical calculation process that uses ridge regression to convert nonlinear regression into a statistical problem [30]. This method is better than other backpropagation methods because the verification process does not need to use cross-validation technology, which can save calculation time. The data was divided into two parts: 70% for training and 30% for testing. The training part uses the data to update the weights of neurons, while model verification uses the test data. The number of hidden layer neurons in the ANN model increases from 1, and the optimal number of hidden layers and hidden layer neurons is obtained through training. We tried different activation functions during training, such as sigmoid, tanh and Relu, and achieved the best performance with the sigmoid activation function. The number of neural network training periods was 1000. We used the following standard procedures to model the artificial lift network [12, 46]:

  1. (1)

    The input and output parameters are normalized so that they range between 0 and 1.

  2. (2)

    By taking Nk inputs, the sigmoid activation function of each node in the hidden layer can be calculated as:

    $${H}_{k}=sigmoid\left(\sum\limits_{i=1}^{N}{w}_{x,ji}{N}_{k}+{b}_{x,j}\right),\;\; \mathrm{where}\ sigmoid=\left(\frac{1}{1+\mathrm{exp}(-x)}\right)$$
    (2)

    where Hk, wx,ji, and bx,j are the predicted value, weighting factor, and bias factor at the jth hidden node, respectively.

  3. (3)

    Calculation of the output layer nodes of the ANN is as follows:

    $${Y}_{n}=\sum_{j=1}^{M}{w}_{y,j}{H}_{k}+{b}_{y}$$
    (3)

    where wy,j is the weighting factor for the jth hidden node and by is the bias factor in the output layer.

  4. (4)

    Inverse normalization of output data:

    $$Y={Y}_{n}\left[{x}_{\mathrm{max}}-{x}_{\mathrm{min}}\right]+{x}_{\mathrm{min}}$$
    (4)

The ANFIS model uses a Gaussian membership function and subtractive clustering technology with an influence range of 0.7 for training. The SVM model is constructed by a cubic polynomial kernel function, the regularization constant c of the selection box constraint is 0.112, and the ε parameter of the SVM model is 0.0111. Figure 2 compares measurements of soil thermal conductivity with estimates of the intelligent calculation model (training set).

Fig. 2
figure 2

Comparison of measurements of soil thermal conductivity with estimates of the training parts of the ANN (a); ANFIS (b) and SVM (c)

It can be seen from Fig. 2 that each intelligent calculation model accurately calculates the thermal conductivity of soil based on the training dataset. There were linear correlations between the predicted and measured results (Fig. 2). The best training effect was exhibited by the ANN model (R2 = 0.9614), followed by the SVM model (R2 = 0.9551), while the ANFIS model performed worst (R2 = 0.9212). The slopes of the linear equations fitted to the ANN, ANFIS and SVM models are 0.9786, 0.8475 and 0.9551, respectively. Hence, the fits to the ANN and SVM cases are close to perfect (y = x). This shows that the deviations between the measured values and those predicted by the ANN and SVM are small.

5.2 Performance test of prediction model

The correlation coefficient (R2), root mean square error (RMSE), average absolute error (MAE) and variance account for (VAF) were used to test the performance of the calculation models. An important indicator of correlation between the calculated and measured values is the correlation coefficient R2. Three important indicators of the model, RMSE, MAE and VAF, were used to quantify the numerical differences between the calculated and measured values [47,48,49]. Their equations are:

$$RMSE=\sqrt{\frac{\sum\limits_{i=1}^{N}{({y}_{0}-{y}_{p})}^{2}}{N-M}}$$
(5)
$$MAE=\frac{1}{N}\sum_{i=1}^{N}\left|{y}_{0}-{y}_{p}\right|$$
(6)
$$VAF=\left[1-\frac{\mathrm{var}({y}_{0}-{y}_{p})}{\mathrm{var}({y}_{0})}\right]\times 100$$
(7)

where M is the number of parameters evaluated by the same regression process, N is the sample number, y0 is the measured value, yp is the predicted value, and var represents the variance. If VAF = 100% and RMSE = 0, the model is perfect. Table 3 shows the performance index values of each predictive model. Figure 3 compares the predicted and measured values of soil thermal conductivity λ.

Table 3 Predictive model performance indicators
Fig. 3
figure 3

Comparison of measured values and those calculated by the testing part of the ANN (a); ANFIS (b) and SVM (c)

It can be seen from Table 3 and Fig. 3 that each model has high accuracy in predicting the soil thermal conductivity λ. The ANN model performs best, second is the SVM model, while the ANFIS model has the lowest accuracy. It can be seen from Fig. 3b that the predicted values deviate greatly from the measured values and the data present a relatively large spread. The slopes of the linear equations fitted to the ANN, ANFIS and SVM models are 0.9452, 0.8197 and 0.9594, respectively, indicating that the fits of the ANN and SVM models to data are closest to the y = x line.

The function of a sample index comparison of predicted and measured values is shown in Fig. 4. It can be seen from Fig. 4 that the ANN and SVM calculated values are in good agreement with the measured values, while they deviate obviously from the predicted values of the ANFIS model. In order to analyse the error between the predicted and measured values, the error distributions of the predictive models are shown in Fig. 5. It can be seen from Fig. 5 that in the training and testing datasets, the error distribution of each model is mainly concentrated between − 0.3 (Wm−1 K−1) and 0.3 (Wm−1 K−1). The calculation errors of each model are very small; the error of the ANN model is the smallest; next is the SVM model and then the ANFIS model. However, it can be seen from Table 4 that the SVM model performs best in terms of RMSE (0.1333 Wm−1 K−1), while the RMSEs of the ANN and ANFIS models are 0.1338 (Wm−1 K−1) and 0.2105 (Wm−1 K−1), respectively when applied to the test dataset. The above analysis shows that the ANN model has the best performance. The results show that the weights and deviations of the ANN model based on Bayesian regularization improve its performance. The ANFIS and SVM models also predict the thermal conductivity of soil well.

Fig. 4
figure 4figure 4

Thermal conductivity of soil in function of sample index for the training part of ANN (a); ANFIS (b) and SVM (c); for the testing part of ANN (d); ANFIS (e) and SVM (f)

Fig. 5
figure 5

Error distribution of measured − predicted thermal conductivity for (a) training data and (b) testing data (with a resolution of 0.2)

Table 4 Statistics of Monte Carlo simulation results

5.3 Robustness analysis of forecasting model

When using AI models for complex geotechnical engineering prediction, the Monte Carlo method is often used to analyse the robustness of the model by varying the model parameters [50]. Figure 6 shows the basic principle of the Monte Carlo method used to show the variability of parameters. It reproduces the output result multiple times by randomly varying the input parameters [51]. These random fluctuations propagate to the output solution, supplying different values of output quantities, and from them it is possible to quantitatively evaluate their probability density function.

Fig. 6
figure 6

Schematic diagram of Monte Carlo method basic principle

The Monte Carlo method is widely used to evaluate the robustness of computational models because it can deal with irregular functions or complex models, especially ANNs. In this paper, the Monte Carlo method is used to propagate the input variability to the output. In order to study the robustness of the predictive models in calculating soil thermal conductivity λ, the results were statistically analysed. The optimal number of Monte Carlo simulation iteration was derived from the following equation [52]:

$$f=\frac{1}{m}\sum_{j=1}^{m}{S}_{j}$$
(8)

where m is the number of Monte Carlo iterations and S is the actual random variable considered. The optimal value of m represents the minimum number of iterations which is increased doesn't change any more the results. To evaluate the robustness of the models, 70% of the training data were randomly combined as a new input dataset, and 300 Monte Carlo simulations were generated. We then calculated the deviations between the calculated values of each model and the measured values. Each AI calculation model supplied 300 values of R2, RMSE and MAE, so their average and variance and distribution can be calculated.

These probability distributions are shown in Fig. 7 while Table 4 show the percentiles of the distributions. Again it is confirmed that the SVM model presents the best robustness, followed by the ANN and ANFIS models.

Fig. 7
figure 7

Monte Carlo simulation test parameter probability distribution of (a) R2; (b) RMSE and (c) MAE

6 Predictive model performance evaluation

At present, the predictions of soil thermal conductivity is mainly based on theoretical and empirical models. Many parameters and requirements are involved in theoretical models of soil thermal conductivity, making them complicated. Empirical models calculate soil thermal conductivity, in a simpler way, so this method is commonly used in engineering design. In this paper the Johansen, Cote and Lu models are chosen and their results compared with those of the described AI models. The Johansen model [9] is an empirical relationship model based on the definition of normalized thermal conductivity. It can calculate the thermal conductivity of frozen and unfrozen soil as shown:

$$\lambda =({\lambda }_{\mathrm{sat}}-{\lambda }_{\mathrm{dry}}){K}_{\mathrm{e}}+{\lambda }_{\mathrm{dry}}$$
(9)

where λsat and λdry are the thermal conductivities of saturated and dry soil, respectively, and Ke is the normalized thermal conductivity of the soil. When the soil saturation Sr > 0.05, Ke for coarse soils is given by:

$${K}_{\mathrm{e}}=0.7\ \mathrm{log}\ {S}_{\mathrm{r}}+1$$
(10)

When Sr > 0.1, Ke again for coarse soils is:

$${K}_{\mathrm{e}}=\mathrm{log}\ {S}_{\mathrm{r}}+1$$
(11)

Johansen improved the thermal conductivity model of De Vries [53] and proposed the following equation for dry soils:

$${\lambda }_{\mathrm{dry}}=\frac{0.137\ {\rho}_{\mathrm{d}}+64.7}{2650-0.947\ {\rho}_{\mathrm{d}}}$$
(12)

where ρd is the dry density. In the calculation of the thermal conductivity of saturated soils, the following equation proposed by Sass [54] is widely used:

$${\lambda }_{\mathrm{sat}}={\lambda }_{\mathrm{water}}^{n}{\lambda }_{\mathrm{solid}}^{1-n}$$
(13)

where λwater and λsolid are the thermal conductivities of water and soil solid particles, respectively, and n is porosity.

The Cote model is based on the normalized thermal conductivity calculation model proposed by Cote and Konrad [8] according to Johansen [9], who established a generalized normalized prediction model:

$$\lambda =({\lambda }_{\mathrm{sat}}-{\lambda }_{\mathrm{dry}}){K}_{\mathrm{e}}+{\lambda }_{\mathrm{dry}}$$
(14)

where Ke is the normalized thermal conductivity of the soil. Afterwards, the equations for Ke and λdry have been modified as follows:

$${K}_{\mathrm{e}}\mathrm{=}\frac{\kappa {S}_{r}}{1+(\kappa -1){S}_{r}}$$
(15)
$${\lambda }_{\mathrm{dry}}\mathrm{=}\chi ({10}^{-\eta n})$$
(16)

where κ is an empirical parameter used to express the influence of soil type and freezing state on Ke, and χ and η are parameters that describe the influence of the type and shape of granular soil on the thermal conductivity of dry soil.

The model proposed by Lu et al. [55] was established on the base of a large number of thermal conductivity tests on 12 natural soils with different properties under various moisture contents. By fitting to the test data, a simpler thermal conductivity and porosity model of dry soils was obtained. Based on the normalized thermal conductivity model proposed by Johansen, the following empirical equation is proposed:

$$\lambda \mathrm{=}\left[{\lambda }_{\mathrm{water}}^{n}{\lambda }_{\mathrm{solid}}^{1-n}-(b-an)\right]\mathrm{exp}[\alpha (1-{S}_{r}^{\alpha -1.33})]+(b-an)$$
(17)

where a and b are parameters related to dry soil. It is recommended to take a = 0.56 and b = 0.51, respectively; α reflects the influence of soil type on the Kersten variable (0.96 and 0.27 for coarse-grained and fine-grained soils, respectively).

In the present paper the AI model results are compared with the λ values predicted by the Johansen, Cote, and Lu models, as shown in Fig. 8. The relative values are shown in Table 5. Figure 8 shows that the ANN, ANFIS and SVM models predict the thermal conductivity of the soils much better than the Johansen, Cote and Lu models. Even if with λ < 1 Wm−1 K−1, the results of the Cote, Lu and Johansen models present small deviations from the experimental values, when λ > 1 Wm−1 K−1, the predicted values are significantly lower than the measured ones, indicating that the prediction accuracy is low. Also Table 4 demonstrates that the performances of the empirical relationship models are significantly lower than those of the ANN, ANFIS and SVM models.

Fig. 8
figure 8

Comparison of the forecasting models and the empirical relationship models (a) ANN, (b) ANFIS and (c) SVM

Table 5 Performance comparison of the intelligent computing and empirical relationship models

Again it is confirmed that the ANN model has the highest prediction accuracy, followed by SVM and ANFIS, while the empirical relationship models have lower accuracy. For the prediction of soil thermal conductivity, the ANN or SVM models are recommended.

7 Conclusions

This paper explored the prediction of soil thermal conductivity using ANN, ANFIS and SVM models. The following conclusions can be drawn:

  1. (1)

    The factors influencing soil thermal conductivity were determined to be usesd as input parameters for predictive models. The most relevant are moisture content, dry density, clay content, powder content, sand content and quartz content.

  2. (2)

    ANN, ANFIS and SVM models were tested to predict soil thermal conductivity, evaluating their R2, RMSE, MAE and VAF. The results show that the three predictive models give results with high accuracy. Among them, the ANN model was most accurate, with R2 = 0.9535, RMSE = 0.1338, MAE = 0.0952 and VAF = 95.25%. The predictive accuracy of the SVM model was slightly lower, with R2 = 0.9469, RMSE = 0.1333, MAE = 0.0958 and VAF = 95.41%. The ANFIS model performed worst, with R2 = 0.8932, RMSE = 0.2105, MAE = 0.1393 and VAF = 88.97%. The robustness of the prediction models was analysed using Monte Carlo simulation and the SVM model was found to be the best performant.

  3. (3)

    The prediction results of these three models were compared with those of traditional empirical relationship models and found to be significantly higher. The traditional models are only based on moisture content, dry density and soil type. So their estimates greatly deviate from measured values, making them less suited to be used in engineering design.