*Article* **Random Forest Slurry Pressure Loss Model Based on Loop Experiment**

**Zengjia Wang 1, Yunpeng Kou 2,\*, Zengbin Wang 3,\*, Zaihai Wu <sup>1</sup> and Jiaren Guo <sup>1</sup>**


**Abstract:** A reasonable arrangement of filling pipelines can solve the problems of low line magnification, a high flow rate, large pipe pressure, etc., in deep well filling slurry transportation. The transportation pressure loss value of filling slurry is the main parameter for the layout design of filling pipelines. At present, pressure loss data are mainly obtained through the loop pipe experiment, which has problems such as a large amount of labor, high cost, low efficiency, and a limited amount of experimental data. In this paper, combined with a new generation of artificial intelligence technology, the random forest machine learning algorithm is used to analyze and model the experimental data of a loop pipe to predict the pressure loss of slurry transportation. The degree of precision reaches 0.9747, which meets the design accuracy requirements, and it can replace the loop pipe experiment to assist with the filling design.

**Keywords:** pipe transportation system test; pressure loss; random forest algorithm; filling-aided design

#### **1. Introduction**

The filling mining method is one of the most effective methods to ensure the safety of deep mining [1,2]. In the design of a deep well filling system, designing a reasonable arrangement of the underground filling pipeline is the main difficulty. The properties of tailings, the transportation conditions, and the pressure loss value of slurry transportation are different in different mines. At present, the theoretical calculation of the pressure loss of a high-concentration filling slurry is generally based on the Bingham rheological model, but there is a certain difference between the pressure loss value obtained when using slurry yield stress and plastic viscosity and the experimental value of the loop [3]. The main reasons for this are that the cross-sectional flow velocity is different during the transportation of high-concentration filling slurry, the flow velocity near the pipe wall is close to zero, the shear stress decreases with the increase in the shear rate, It is thixotropic and the flow curve is hysteretic [4,5]. For this reason, most designers need to master the pressure loss data of filling slurry while using the loop pipe experiment method. However, there are problems such as a large amount of labor and a long experimental period, and experimental variable parameters cannot fully simulate industrial filling pipelines.

In the filling and conveying theory, it is difficult to establish a transport model that can be used to calculate the pressure drop of the slurry by theoretical methods. With the development of artificial intelligence technology, methods to build predictive models based on existing data have gradually emerged. Abroad, Kumar et al. used the integral flow model to predict the pressure drop of multi-scale solid–liquid flow [4], but there is a problem in that the reverse analysis of the input limit parameters of numerical modeling and the generalization ability of curve fitting are poor. In China, Qi Chongchong of Central South University and others took the lead in proposing a "machine learning-assisted

**Citation:** Wang, Z.; Kou, Y.; Wang, Z.; Wu, Z.; Guo, J. Random Forest Slurry Pressure Loss Model Based on Loop Experiment. *Minerals* **2022**, *12*, 447. https://doi.org/10.3390/ min12040447

Academic Editors: Longjun Dong, Yanlin Zhao, Wenxue Chen and Yo-soon Choi

Received: 18 February 2022 Accepted: 31 March 2022 Published: 6 April 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

filling design" [6,7], And a variety of backfill system design prediction models have been established to promote the development of the traditional backfill field towards intelligence.

In this paper, the artificial intelligence random forest algorithm is used to analyze the experimental data of a loop pipe, establish the pressure loss prediction model of the filling slurry, and verify the feasibility of the proposed random forest model in the pressure loss prediction. This model can replace the traditional loop pipe experiment-aided filling piping system design.

#### **2. Acquisition of Experimental Data of Loop Pipe**

#### *2.1. Construction of Loop Pipe Experiment System*

The backfill engineering laboratory has an indoor loop test system. The test pipeline system is shown in Figure 1. P1–P2 is the pressure drop of the straight pipe section, P3–P4 is the pressure drop of the vertical section plus 90◦ elbow, and P5–P6 is the pipeline pressure drop of the inclined pipe section.

**Figure 1.** Schematic of the pipe transportation system.

The displacement of the loop pipe experiment system was 76 m3/h, the outlet pressure was 1.5 Mpa, the inner diameter of the test pipe was 80 mm, and the pressure sensor adopted a flat model pressure transmitter with a range of 0–2 Mpa and an accuracy of ±0.25%. Pressure data were displayed and recorded using Wincc host computer software [8,9].

#### *2.2. Relevant Parameter Experimental Data Acquisition*

This loop pipe experiment was carried out with the tailings of Sanshandao Gold Mine; the mixing water was tap water, and the cementing material was the cementing material in use in the mine.

The particle size distribution of tailings was measured by a Malvern laser particle sizer, as shown in Table 1. When using XRD phase test analyzer, it was found that the main components of tailings were quartz and mica, non-toxic minerals, insoluble in water. The fluidity of the tailings backfill slurry and the strength of the backfill had little effect. The content of cementitious material + 80 microns was 9.5%, the initial setting time was 45 min, the final setting time was 8 h, and the specific surface area was 750 m2/kg; thus, the material met the GB175-2007 "General Portland Cement" standard and could be used as a cementing material [10].

**Table 1.** Tailings grain composition.


The viscosity and yield stress of the slurry were tested with a BROOKFIELD RST rheometer in the United States. The test results are shown in Table 2. With an increase in slurry concentration, the plastic viscosity and yield stress also increase accordingly, so viscosity, yield stress, and slurry concentration are dependent variables and independent variables [11,12].

**Table 2.** Slurry rheological parameters.


According to the above analysis, five independent variables, namely, tailings mass concentration, −400 mesh ratio, lime–sand ratio, flow rate, and pipeline structure, were selected for data modeling analysis. Under the premise of ensuring fluidity, the density test was configured with tailing concentrations of 68%, 70%, 72%, and 74%, with a lime–sand ratio of 1:4, 1:10, and 1:20, and the test trailer pump displacement was set to 7%, 13%, 18%, and 25% to record the pressure data of the horizontal section, the vertical section, and the slope section. This experiment obtained 144 sets of experimental data.

After the filling slurry was fully agitated, the loop conveying experiment was carried out. In this experiment, the filling pump is left in its preset speed and then enters the horizontal pipeline (P1–P2), passes through the vertical pipeline (P2–P3), passes through the horizontal pipeline (P3–P4), flows into the mixing tank through the inclined 5◦ slope pipeline (P5–P8), etc.

In order to eliminate the influence of the shear thinning of the slurry on the rheological behavior [13,14], each group of experiments lasted for half an hour. The stable pressure value was recorded when the conveying flow was stable, the pressure difference between the pressure monitoring points was calculated, and the pressure difference was divided by distance and converted to a pressure loss value over a distance of 1 km in Mpa/km. First, the loop transport experiment was carried out using the minimum concentration ratio; then, tailings and cementing materials were added to the stirring system; the ratio was changed; the concentration was increased; and the pump delivery flow was changed so as to change the independent variable parameters of the test slurry concentration, the ratio of tailings to cementitious material, the −400 mesh proportion, and the flow velocity [15]. The pressure loss values under different variable conditions were recorded.

#### **3. Establishment and Analysis of Pressure Drop Prediction Model**

The random forest algorithm was used to establish the relationship between the pressure drop in the slurry pipeline and its related variables. Random forest is an extended variant of bagging [16]. Classification tree is the theoretical basis of random forest. Random forest adopts the Bootstrap resampling method to build a decision tree model for each sample set, which can be used to solve classification and regression problems. It has a strong generalization ability and good noise immunity, and it has been successfully applied in many fields [17,18].

The random forest algorithm is not sensitive to multicollinearity and can reduce the impact of missing data and unbalanced data on the prediction results. The random forest algorithm is currently considered to be one of the optimal algorithms for nonlinear model prediction [19].

#### *Building the Original Training Set*

The random forest regression algorithm realizes the pressure loss prediction of the filling slurry pipeline. The random forest regression process is shown in Figure 2. The main steps are as follows:


**Figure 2.** Random forest pressure drop prediction flowchart.

The slurry pressure drop data were obtained through the loop pipe experiment, and some data are shown in Table 3.

**Table 3.** Test sample data.


For cross-validation, the main parameters of the random forest prediction model were the number of trees ntree = 400 and the number of variables of the random forest classification model mtry = 4. The program segment is shown in Figure 3.

**Figure 3.** Random forest program diagram (random classification of sample data).

#### **4. Results and Discussion**

*4.1. Importance and Relevance Calculations*

Random forest can calculate the importance of a single variable [23,24]. The number of data classifications for the classifier is *M*, and the results were compared with the correct classification and the random forest classifier. The number of errors of the statistical classifier is *N*, and the size of the data error can be expressed by Equation (1):

$$\text{errorOB} = \frac{N}{M} \tag{1}$$

According to the variable, x (importance score) can be expressed as:

$$\text{score}\_{\text{i}} = \sum (\text{errorOB}\_{2} - \text{errorOB}\_{1}) / \text{ntree} \tag{2}$$

where erroOB1 is the out-of-bag data error of the decision tree for each lesson; erroOB2 is the out-of-bag data error of feature x after adding noise interference [25–27]; and ntree is the number of decision trees. According to Formula (2), the importance of pressure drop influencing factors is scored; the sum of all importance scores is scaled to 1; and a stacked bar chart is drawn, which clearly reflects the importance scores of each factor as shown in Figure 4.

**Figure 4.** Test variable correlation score map. The abscissa is the weight, and the ordinate is the variable.

Through the analysis, it can be seen that the pipeline structure is the most important variable affecting the pressure drop, and the importance score was 0.402. The pressure drop predicted here is the total pressure drop, which includes the pressure loss pressure drop and the slurry static pressure drop. The importance scores of particle size, cementitious material-to-tailings mass ratio, flow rate, and concentration scores were 0.022, 0.075, 0.126, and 0.375, respectively. Slurry concentration is a secondary pressure drop factor to the pipeline structure, and relatively speaking, the proportion of −400 mesh particle size is the smallest factor.

Through the 5060 multi-function measuring instrument and the self-patented design of the filling pipeline pressure monitoring device, the long-term pressure data of the pipeline pressure during the full tailings filling of the Sanshandao Gold Mine were measured and analyzed. When calculating the pressure distribution of the filling pipeline, the pressure loss of the slurry in the complex area of the pipeline increased by 15% due to bending and joint wear, and the pressure loss of the vertical pipe section of the pipeline increased by 5%.

The correlation between two continuous variables was analyzed by the Pearson correlation coefficient [28,29], and the value range was [−1, 1]. The closer the absolute value of the sample correlation coefficient to 1, the higher the degree of correlation and the closer the relationship, and the correlation of the linear relationship between variables can be reflected by the correlation coefficient. The correlation function is presented as Formula (3):

$$
\rho = \frac{\delta\_{XY}}{\delta\_X \delta\_Y} \tag{3}
$$

where *δ<sup>X</sup>* and *δ<sup>Y</sup>* are the standard deviation of random variables *X* and *Y*, respectively, and *δXY* is the covariance of *X* and *Y*.

The correlation table is used to express the correlation between different influencing factors and the pipeline pressure drop. The calculated correlation results are shown in Figure 5. Blue represents a positive correlation, red represents a negative correlation, and the area of the circle represents the strength of the correlation. It can be seen from the figure that the correlation between the concentration and the pipeline structure and pressure drop is the largest, and the importance score is the highest. The data come from the loop pipe experiment, and the test tailings are taken from the mine, which has guiding significance for the regulation of the mine filling slurry transportation. It is necessary to strengthen the management and control of these key factors during filling. When monitoring and regulating the abnormal state of the filling pipeline, strengthening the control weight of the factors provides a greater correlation [30].

**Figure 5.** Correlation graph.

#### *4.2. Pressure Drop Prediction Results*

First, the original data were de-statically processed; the measured data were subtracted from the pressure change in the slurry due to the action of gravity; and the pressure *Pi* of the new data set was obtained by Formula (4), where the density of the test slurry was obtained by Formula (5) [31–33]:

$$P\_l = \Delta P - \rho g h$$

$$\rho = \rho\_0 \times 1 / (\frac{\rho\_0 \mathbb{C}\_\text{W} \cdot (\text{n}\gamma\_\text{s} + \gamma\_\text{c})}{\gamma\_\text{c} \cdot \gamma\_\text{s} (1 + \text{n})} + 1 - \mathbb{C}\_\text{w}) \tag{5}$$

where Δ*P* is the test pressure difference, Pa; ρ is the density of the test slurry, kg/m3; *g* is the acceleration of gravity, m/s2; is the vertical height difference, m; *ρ*<sup>0</sup> is the density of the water, and the industrial value is 1.02 × 103 kg/m3; CW is the slurry mass concentration, %; *n* is the lime–sand ratio; and *γ*<sup>c</sup> is the true density of cementitious materials and the true density of tailings, kg/m3.

A new data set was constructed, 121 sets of data were extracted from it to construct training samples of the random forest model, and the remaining 23 sets of data were test samples. Five eigenvalues were selected, and the Anaconda3 development environment was used to complete the model establishment using Python language [34,35]. First, the model was run using the samples during training, and the trained random forest model was used to perform regression fitting on the test sample set. The prediction result of the regression fitting on the test sample set is shown in Figure 6.

It can be seen in Figure 6 that the prediction accuracy of the pressure drop prediction model based on the random forest algorithm is high. The goodness of fit between the prediction and the actual value in the test set is 0.9747, and the mean square error is 0.0011; the value goodness of fit is 0.983. The value range of goodness of fit is [0, 1]. The larger the value, the higher the degree of fit [36,37], and the closer the mean square error MSE is to 0, indicating that the error between the predicted data and the original data is smaller. The predicted value of the model is very close to the measured value, which verifies the feasibility of the random forest model to predict the slurry pressure drop in the loop experiment [38,39].

#### *4.3. Comprehensive Evaluation of Forecast Results*

In order to further verify the accuracy of the random forest model algorithm in the application of slurry pressure drop loss prediction [40–42], the BP artificial neural network and the polynomial linear fitting method were used for comparison [43], and the goodness of fit R2 and the mean square error MSE were used to determine the prediction accuracy of the model. The obtained error comparison results are shown in Table 4.

**Table 4.** Prediction model error comparison table.


**Figure 6.** Model prediction: (**a**) results of fitting between the predicted values of the test set and the actual values; (**b**) results of fitting between the predicted values of the training set and the measured values.

#### **5. Results**

The following conclusions can be drawn from the analysis of the experimental data of the tailings loop and the established random forest prediction model at this stage:


**Author Contributions:** Conceptualization, Z.W. (Zengjia Wang) and Y.K.; methodology, Z.W. (Zengjia Wang) and Z.W. (Zengbin Wang); software, Z.W. (Zengjia Wang) and Z.W. (Zengbin Wang); validation, Z.W. (Zengbin Wang), Z.W. (Zaihai Wu) and J.G.; formal analysis, Y.K.; investigation, Z.W. (Zengjia Wang) and Z.W. (Zaihai Wu); resources, J.G.; data curation, Z.W. (Zengbin Wang); writing—original draft preparation, Z.W. (Zengbin Wang); Z.W. (Zengjia Wang) and Y.K. serve as directors of the program, and Obtained all necessary funds. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was supported by the National Key R&D Program of the 13th Five-Year Plan (2018YFC0604600) and the Shandong Provincial Major Science and Technology Innovation Project (2019SDZY05).

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

