1 Introduction

The safety management of coal mining activities is critical in the coal production system. However, gas disasters have always been an important factor affecting safe mining activities. Coal seam gas emission quantity prediction plays a key role in preventing and controlling methane-related disasters in coal seams (Wen et al. 2023; Lu et al. 2009; Mijał et al. 2018; Zhou et al. 2022). In recent years, numerous methods have been proposed to predict gas emission quantity from coal mines. To predict underground gas emissions quantity in various stages of the coal mine life cycle, Lunarzewski proposed a method involving the envelope parameter method for estimating the instantaneous release from potential gas sources (Lunarzewski 1998). Kirchgessner developed a multiple linear regression equation prediction method that relies on coal bed methane content, coal production, and coal mine gas emissions quantity (Kirchgessner et al. 1993). After reviewing various methods for estimating gas emissions, Creedy found that the most effective and reliable method for predicting gas emissions from coal-related sources is based on direct measurement (Creedy 1993). The gas emissions quantity prediction mainly adopts the different-source forecast method and mining statistical method specified by AQ 1018-2006 of the State Administration of Work Safety in China, and the different-source forecast method is the most commonly used (Wei et al. 2015). With the increased demand for mine intelligence, it has become necessary to adopt a complete set of gas emission prediction software. The accurate prediction of gas emission quantity not only lays the foundation for coal mine gas control and extraction but also affects the safety and investment cost of the coal mine (Qin et al. 2020; Zhao et al. 2022, 2020). Methane Control and Prediction (MCP) software is well-established internationally. However, MCP is not suitable for the gas emission prediction of China's coal mines as different methods and regulations are used.

The different-source forecast method requires many parameters and the calculation of a large amount of field data. Currently, there is no relatively simple and fast method to process field data quickly. Manual calculation errors are inevitable. To cope with these challenges, Chinese coal companies need coal mine gas emission quantity prediction software that adapts to domestic regulations, reduces errors, and improves computational efficiency (Wei et al. 2015). The core objective of this technical note is to develop a software for calculating coal mine gas emissions quantity based on the different-source forecast method and to apply it to actual projects on the engineering site.

2 Technical implementation

2.1 Design logic

When calculating gas emissions quantity using the different-source forecast method, the gas sources are divided into two parts. The first part is the gas emissions of the production mining area and the second part is the gas emissions of the mined-out area in the mined area. The gas in the production mining area mainly comes from the gas emissions of the mining workings face, the mined-out area in the working face, and the excavation face. In the excavation face, the gas comes from coal wall emissions and coal falling emissions. It is worth noting that the gas emission from the excavation work layer, the surrounding rock, and the adjacent layer, as well as the gas emission rate from the adjacent layer, have corresponding functions with the layer spacing (Chen et al. 2016).

In summary, the formula (Yu and Cheng 2012) for calculating gas emissions quantity is as follows:

$$\left\{ {\begin{array}{*{20}l} {q_{1i} = K_{1} \cdot K_{2} \cdot K_{3} \cdot K_{\text{f}} \cdot \left( {W_{0} - W_{c} } \right)} \hfill \\ {q_{1j} = K_{1} \cdot K_{2} \cdot K_{3} \cdot \frac{m}{M} \cdot \left( {W_{0} - W_{c} } \right)} \hfill \\ {q_{2} = \sum\nolimits_{i = 1}^{n} {\left( {W_{0i} - W_{\text{c}i} } \right)} \cdot \frac{m}{M} \cdot \eta_{i} } \hfill \\ {q_{0} = 0.026\left[ {0.0004\left( {V^{r} } \right)^{2} + 0.16} \right] \cdot W_{0} } \hfill \\ {q_{3} = D \cdot \nu \cdot q_{0} \cdot \left( {2\sqrt {\frac{L}{\nu }} - 1} \right)} \hfill \\ {q_{4} = S \cdot \nu \cdot \gamma \cdot \left( {W_{0} - W_{c} } \right)} \hfill \\ {q_\text{a} = \tfrac{{K^{\prime}\sum\nolimits_{i = 1}^{n} {q_{\text{m}i} A_{i} + 1440\sum\nolimits_{i = 1}^{n} {q_{\text{d}} } } }}{{A_{0} }}} \hfill \\ {q_\text{m} = \tfrac{{K^{\prime\prime}\sum\nolimits_{i = 1}^{n} {q_{\text{a}i} A_{\text{o}i} } }}{{\sum\nolimits_{i = 1}^{n} {A_{\text{o}i} } }}} \hfill \\ \end{array} } \right.$$
(1)

The number of coal seams involved is dictated by the practical conditions of the coal mine. Technical software incorporates interactive functions to enhance the practicality of the software. The users can fill in data for each coal seam, and the background automatically calls the parameters and converts them into a i × j matrix (number of parameters) for iteration. As shown in Fig. 1, the software generates a i × j matrix and fills into the position of the corresponding table component for data visualization after the user input of all coal seam parameters. The “n” in Fig. 1 denotes the number of input coal seam parameters.

Fig. 1
figure 1

Matrix of data

Excessive amounts of coal seams will cause inconvenience to calculate cumulative emissions. Therefore, a new variable is required to receive the results of each data iteration and summation. Equation (2) is decomposed into two parts. The first and second parts (i.e., A and B) are used for the cumulative summation calculation, while the other parts are used for direct algebraic operations. The optimized calculation process is shown in Eq. (3):

Before decomposition:

$$q_\text{a} = \tfrac{{K^{\prime}\sum\nolimits_{i = 1}^{n} {q_{\text{m}i} A_{i} + 1440\sum\nolimits_{i = 1}^{n} {q_{\text{d}} } } }}{{A_{0} }}$$
(2)

After decomposition:

$$\left\{ {\begin{array}{*{20}l} {A = \sum\limits_{i = 1}^{n} {q_{\text{m}i} } A_{i} ,\;B = \sum\limits_{i = 1}^{n} {q_\text{d} } } \hfill \\ {q_\text{a} = \frac{{K^{\prime}A + 1440B}}{{A_{0} }}} \hfill \\ \end{array} } \right.$$
(3)

The software uses a table to display the data entered by the user. It can layer the data of multiple coal seams for comparison. The software generates a statistical table of the corresponding parameters and automatically processes the data in the background. The absolute and relative gas emission quantities are presented in tables and graphs for further analysis.

2.2 Output architecture

The software uses the Axes component to generate bar charts. Since the Axes component relies on numeric vector values to create the scale names on the X-axis, the bar chart must be created using the categorical values on the X-axis. Subsequently, the bar(x) function is used to draw the bar chart.

The MATLAB application designer typically utilizes individual components or parts as classes, where the parameters of each class are generally private. However, the results of these classes need to be used when forming the final statistics table. It is necessary to use the global to handle private variables. After that, the calculation result can be called across the class and output to the statistics table. This process is shown in Fig. 2.

Fig. 2
figure 2

Variable processing and output architecture

2.3 UI interface

The UI interface is shown in Fig. 3, and the main menu structure consists of four calculation panels and one statistics panel. Four calculation panels are responsible for calculating the gas emissions quantity of the mining working face, the extraction face, the production mining area, and the coal mine. In addition to the corresponding bar charts, the statistics section includes tables of the absolute and relative gas emission quantities.

Fig. 3
figure 3

Software UI interface

3 Field application

This technical note selects the #5 minable coal seam of Hulonggou Coal Mine (located in the southwest of Datong Coalfield, Shanxi Province) to carry out gas emission quantity prediction work. The strata relationship between the #5 coal seam and adjacent layers, as well as the relevant input parameters, are shown in Fig. 4. The correlation coefficient will be selected based on the AQ1018-2006 (The predicted method of mine gas emission rate).

Fig. 4
figure 4

Case and input parameters

The software predicts that the q1 is 1.91 m3/t, q2 is 0.21 m3/t, q3 is 0.87 m3/min, q4 is 0.27 m3/min, qm is 2.12 m3/t, qd is 1.14 m3/min, qa is 4.35 m3/t and qp is 5.00 m3/t, as shown in Table 1.

Table 1 Summary of the relative and absolute value of gas emission

The qm, qd, and qp of gas emission quantity measured on-site in Hulonggou Coal Mine are 3.20 m3/t, 0.83 m3/min, and 4.38 m3/t, respectively. The actual measured gas emission quantity of various parts of Hulonggou Coal Mine (the data are from the gas emission measurement report of Hulonggou Coal Mine in 2022) were compared with the gas emission quantity predicted by the software. As shown in Fig. 5, the actual measured value of gas emission quantity is less different from the predicted value. However, it cannot be ignored that there is a difference between the actual measured value and the predicted value of gas emission quantity. For qm, the selection of correlation coefficients (i.e., K1, K2, K3, and Kf) directly affects the predicted value of gas emission quantity in the mining working face. The selection of excavation face parameters is based on the actual digging situation of the coal mine. Therefore, the predicted value of gas emission quantity (qd) in the excavation face is close to the measured value. The predicted value of coal mine gas emission quantity is closely related to the output of coal mines, and the small fluctuation of output will lead to a cross-magnitude increase in coal mine gas emission quantity. This situation is likely to lead to errors in the prediction of gas emissions. There is a lack of understanding of the situation of the coal mine site and the reserve of basic knowledge of gas emission, the prediction of gas emission is carried out rashly. This will be inevitable that prediction curve 1 will be changed to prediction curve 2, and the error zone will be further expanded, as shown in Fig. 5.

Fig. 5
figure 5

Comparison between measured and predicted values of gas emission

In addition, there is a distinct difference between thick and thin coal seams solely when calculating q1. Therefore, when predicting the gas emission quantity from coal seams with different thicknesses, it is necessary to manually distinguish and pay attention to the parameter selection differences between thick and thin coal seams. Equation (1) illustrates the parameter value range that influences coal mine gas emission quantity calculation results (Wang et al. 2022). To evaluate three of these parameters, two quasi-Monte Carlo methods (Sobol 1993; Kucherenko et al. 2017) are employed to simulate them individually. K1 and K″ represent the dominant parameters that contribute to model outputs in Eq. (1), while K′ exerts comparatively limited influence.

4 Discussion

This study utilizes the different-source forecast method as its foundational logic, utilizing MATLAB software to develop an efficient, rapid, and visually intuitive tool for gas emission calculation. This technical software hinges upon the accurate and effective collection of field data to predict gas emissions quickly. It was successfully deployed for predicting gas emission quantity in the Hulonggou Coal Mine, facilitating the rapid, precise computation of both relative and absolute gas emission quantities in various mine sectors, encompassing the mining working face, excavation face, and production mining area. Observations from measured and predicted gas emissions in the Hulonggou Coal Mine indicate a significant impact of the chosen correlation coefficient of the relative gas emission quantity (qm) on the mining working face gas emission prediction accuracy. The predicted gas emission quantity from the excavation face (qd) tends to be more accurate based on actual mining conditions. Accurate coal mine output determination is critical for reliable predictions of coal mine gas emissions. Moreover, the numerical evaluation of the effectors of coal mine gas emissions reveals that K1 and K″ substantially influence the calculation model output, whereas K′ has relatively negligible impact. Notably, the usage of this software relies heavily on a thorough understanding of coal mine technical parameters by technical personnel. This is not only a constraint imposed by the software's inherent design logic, but also a requisite for ensuring the reliability of the software's output through accurate parameter input. Consequently, this software is not suitable for newly established coal mines or coal mines where mining engineering and gas geological data are inaccessible. Future versions will strive to enhance repeated gas component detection, among other features, and include a consultation module based on individual gas content. Simultaneously, it will also be demonstrated in more application examples to prove its wide applicability.