2.2. Selection of the Sample Data
The accuracy and reliability of the first weighting prediction depend on the understanding of the roof pressure theory. Before mining, the coal seam is balanced with the strata in all directions. After excavating the cut hole, the rock will be deformed due to the destruction of the original stress balance, and a new stress balance will be generated, resulting in the formation of a temporarily balanced rock loosening circle above the roof. The roof weighting refers to the pressure of the hydraulic support supporting the circle. Two main factors affect the roof pressure of the working face: the geological conditions and mining process parameters. The geological conditions mainly include the lithology and thickness of the direct roof and basic roof of the working face, the inclination, and the depth of coal seam and other parameters. The mining technological parameters mainly include the support pattern, the length, width, and mining height of the working face, and the advance speed [
22,
23,
24,
25,
26].
There is a nondeterministic relationship between the first weighting and the various influencing factors in the coal mine roof, and the influence degree of each factor on the output results is also different. Too many input parameters will affect the speed of the neural network training and bring about some difficulties in data acquisition. Therefore, a correlation analysis of various factors is needed to select the appropriate sample parameters. The gray correlation analysis method is adopted in this paper to analyze the relationships between various factors, which applies to nonlinear problems with complex structures and can be used to conduct a quantitative comparative analysis of a series of dynamic data [
27]. The initial sample input parameters chosen are the depth and dip of the coal seam and their varying rates, the length and width of the working face, the thickness of the coal seam, main roof and immediate roof, mining height, advance speed, and roof condition. The output parameters are selected as the initial pressure and periodic pressure. Because the data for the mining height, dip, and coal thickness are only average values and are changing, a simple average value cannot reflect the change of the values, so this paper introduces the rate of change of the mining height ∆
S, the rate of change of the dip ∆
β, and the rate of change of the coal thickness ∆
M.
where
,
, and
are the minimum, maximum, and average values, respectively, of the buried depth;
,
, and
are the minimum, maximum, and average values, respectively, of the coal seam pitch; and
,
, and
are the minimum, maximum, and average values, respectively, of the coal thickness.
Table 1 represents a portion of the original data.
Because the dimensions and orders of magnitude of each input parameter are different, the input parameters must be dimensionless before conducting the gray correlation analysis [
28], and the formula used is Equation (4):
where
is the
kth dimensionless value of the
ith input parameter,
is the
kth value of the
ith input parameter, and
m is the total of the
ith input parameter. The following formulas are used to analyze the gray correlation degree:
where
is the relative difference between the comparison curve
and the reference curve
at time
k, and
is the correlation degree of
.
Table 2 shows the correlation degree table of the first weighting and related influencing factors.
By analyzing the correlation degree of the factors in the above table, it can be concluded that, apart from the working face length, which has little impact on the mine pressure, the other factors have a significant impact. Therefore, the width of the working face, mining height, advance speed, roof condition of the coal seam, burial depth, thickness and dip of the coal seam, change rate of the inclination angle, burial depth and coal thickness, direct top thickness, and thickness of the main roof are selected as the input parameters for the model training and prediction. The first weighting strength and interval are taken as the output values of the training and prediction of the neural network model.
2.3. Model Parameters
According to the relevant theoretical research on the BP neural network and roof pressure of the working face, we determine the BP neural network model parameters in this paper, including the number of hidden layers, number of hidden layer neurons, initial weights, activation function, expected error, learning rate, and learning times.
- (1)
The number of hidden layers
Robert Hecht-Nielson proved that a three-layer BP neural network containing only one hidden layer can perform any nonlinear mapping, which can be a mapping from the n dimension to the m dimension. Therefore, the BP neural network prediction model established in this paper is a three-layer BP neural network with only a single hidden layer.
- (2)
The number of hidden layer neurons
The suitable empirical formula for a BP neural network with a single hidden layer to determine the number of neurons in the hidden layer is shown as follows:
where
p and
q represent the number of nodes in the input layer and output layer, respectively, and
a is a constant whose value range is (1,10).
According to the above analysis of the gray correlation degree, the number of input data characteristic values is 12, and the number of output results is 1. Therefore,
, and the initial number of neurons in the hidden layer of the BP neural network model established in this paper is 5. After repeated tests, the graph of the relationship between the number of hidden layer nodes and absolute relative errors is shown in
Figure 2. The absolute relative error can be obtained from formula 10. It can be seen from the figure that when the number of hidden layer nodes reaches 15, the network output error is minimized.
where
is the absolute relative error;
and
represent the measured results and training results, respectively.
- (3)
The initial weights
To avoid the saturation region of the activation function, the weighted sum output value will be near to 0 as much as possible, which can increase the weight adjustment range. Therefore, the initial connection weights are usually random numbers between (−1,1) or (0,2), so that the network will not be greatly affected.
- (4)
The activation function
The activation function of the hidden layer in this paper is the tansig function, which is found in the MATLAB toolbox, whose value range is (−1,1), which also conforms to the normalized data falling between (−1,1). The output layer selects the purelin function from the MATLAB toolbox, which is linear to increase the value range of the output value. The tansig function is shown below:
where
is the base of the natural log function.
- (5)
The learning rate
According to practical experience, the value range of the learning rate in the BP neural network model is generally between 0.01 and 0.08. In this paper, based on the sample data collected at present, it is concluded by repeated training that when the learning rate is adopted, the performance of the established roof pressure prediction model based on the BP neural network is better.
- (6)
The expected error
In this paper, the mean square error function is selected in the construction of the BP neural network, and the formula is as follows:
where
m represents the number of neurons in the output layer,
p is the number of samples,
is the true value, and
represents the output value of each training iteration.
2.4. Training Results of the BP Model
It can be seen from the above analysis that the number of nodes in the input layer of the model is 12. The input parameters are the inclined length of the working face, advance speed, roof condition of the coal seam, mining height, coal thickness, change rate of the inclination angle, direct top thickness, basic top thickness, burial depth, change rate of the burial depth, coal thickness change rate, and coal seam inclination angle; through repeated tests in this paper, the number of nodes in the hidden layer of the model was determined to be 15; and according to the requirements, the number of nodes in the output layer of the model is set to 1. Sixty sets of data collected from the Datong mining area were selected to establish the model, among which 50 sets were used as training samples and 10 sets were used as prediction samples. The BP neural network model is trained and evaluated by predicting the initial compressive strength and periodic compressive strength of the roof. MATLAB is used in this paper to train the sample data and validate the model. Due to the instability of the BP neural network, the results of each training session are different, so the pressure of the initial weighting and periodic weighting are taken as the target output for 30 training sessions, and the optimal training results are selected as the model obtained by training.
- (1)
The first roof weighting strength
Figure 3 shows the comparison between the predicted value and the real value of the first roof weighting strength predicted by the BP prediction model, which is the best result of the curve fitting between the predicted value and true value in 30 training sessions, with a maximum determination coefficient of 0.8807. The determination coefficient is derived from Equation (13) [
29]. The larger the determination coefficient, the better the fit is.
where
N is the number of predicted samples,
is the predicted value,
is the true value, and
is the determinant.
- (2)
Predicting the first roof weighting interval
Figure 4 shows the comparison between the predicted value and the real value of the first roof weighting interval predicted by the BP prediction model, which is the best result of the curve fitting between the predicted value and true value in 30 training sessions, with a maximum determination coefficient of 0.8756.
It can be concluded from the above diagram that, although the BP neural network model can predict the first weighting strength and first weighting interval of the coal mine roof, the training determination coefficient is small, which indicates that this model is not stable and has a large error. Therefore, this prediction model needs to be optimized.