Research on forecasting coal bed methane demand and resource allocation system based on time series

The mining area is the main place for the development and utilization of Coalbed Methane (CBM), and there are a series of systems for the development and utilization of CBM. However, owing to lack of a clear understanding of demand-side gas consumption rules and a reasonable resource allocation system, a large amount of CBM resources in the mining area are wasted. In order to predict the demand for CBM dynamically, the Seasonal Auto Regressive Integrated Moving Average (SARIMA) model, Additive Holt-Winters (AHW) model and Multiplicative Holt-Winters (MHW) model based on time series are used to predict the monthly demand for CBM in Yangquan Mine Area in 2020, respectively. Then the predicted results are evaluated by using the prediction model parameters combined with the characteristics of actual demand for CBM. Finally, a resource allocation system under different supply and demand conditions is built to reduce the waste of resources. In this paper, it is found that the information of the actual data is not sufficiently extracted in the MHW model while the SARIMA model can reflect the cyclical trend of monthly demand for CBM under ideal conditions. Furthermore, the AHW model can reasonably predict the demand for CBM under the influence of COVID-19, with a mean relative error of 0.099. The supply and demand distribution system built based on the proposed models can solve the problem of seasonal unevenness of CBM demand in mining areas and ensure the economic benefits of mining areas.


Introduction
Coal occupies an important position in the world's energy consumption structure, and gas disasters are an important limiting factor that endangers the safe production in coal mining countries Brodny, 2019a, 2019b;Wang et al., 2019Wang et al., , 2020. Furthermore, a large amount of gas emissions can cause the greenhouse effect and pollute the environment. For rational utilization of resources as well as realization of energy conservation and emission reduction, the development and utilization plan of coal mine gas extraction has clearly been formulated in China's "Thirteenth Five-Year Plan" to achieve the goal, CBM gradually becomes an important energy source in China (Tao et al., 2019;Wen et al., 2019).
Yangquan Coal Mine is the largest anthracite production base in China. Due to the long coal-forming time of anthracite, a large amount of gas is contained in the complex porefracture structures, and a large amount of gas is released during the mining process (Cai and Hu, 2019;Jia et al., 2019;Liu et al., 2018), which endangers the safety of underground production. To alleviate this hazard, a gas extraction system is built in the mining area to pump gas to the ground. The factories on the ground can use gas to meet the needs of production and life in the mining area. However, during the development and utilization of CBM, lack of understanding of the demand side has led to inefficient CBM resource allocation, resulting in resource waste and environmental pollution. Moreover, in China, gas extracted from many coal mines is used in mining areas, and the same phenomenon exists. Therefore, it is of strategic significance to take reasonable measures to predict the CBM demand for rational allocation of resources as well as energy conservation and emission reduction.
However, there is relatively little research on the prediction of the demand for CBM, and current research is mainly focused on the prediction of the demand for natural gas (Ji et al., 2018;Pradhan et al., 2017;Zeng, 2017). Natural gas refers to the gas with its methane content greater than 90%. It can be obtained by purification of coal mine gas. Because the use of CBM is similar as that of natural gas, the prediction method of CBM demand can be based on that of natural gas demand. Magdalena and Jarosław (2019) built a prediction model based on the MLP (Multi-Layer Perceptron) network to predict the methane emissions and utilization of Hard Coal Mines by 2025. Faheemullah shaikh et al. (Shaikh and Ji, 2016;Shaikh et al., 2017) constructed a grey Verhulst model and a nonlinear grey Bernoulli model based on the optimized nonlinear grey theory, and predicted China's natural gas demand in 2020. Furthermore, they predicted China's natural gas demand in 2020-2035 through the logistic and logistic-population model. Ding (2018) designed an adaptive grey prediction model with a non-linear optimized initial value, and fitted China's 2002-2014 demand data to predict China's natural gas demand in 2015-2020. Szoplik (2015) developed a MLP model considering calendar and weather factors, and successfully predicted the natural gas consumption in Szczecin (Poland). In addition, some other researchers built various prediction models to predict the demand for natural gas through the method of machine learning (Beyca et al., 2019;Ghoddusi et al., 2019;He et al., 2016;Muñoz et al., 2018;Wu et al., 2019), and achieved impressive results, which can provide a reference for the prediction of the demand for CBM. Nevertheless, the above models are not well applicable because the demand for CBM varies in different seasons and periods. To take seasonal and periodic factors into account, time series models are adopted to predict the demand for CBM. Time series (Kalashnikov et al., 2010;Kan et al., 2020) can reflect the trend of one or some random variables changing over time. The core of time series prediction is to find the law from the data and use it to make predictions about future data. Han and Li (2019) built a variety of prediction models based on the Auto Regressive Integrated Moving Average (ARIMA) model and the traditional grey model to predict the energy consumption in East Africa, and evaluated their prediction models using mean relative errors. Craig and Feng (2016) proved the relationship between climate variability and total power generation by constructing the Seasonal ARIMA (SARIMA) and seasonal simple exponentially smoothed models. Akpinar and Yumusak (2016) used the Holt-Winters exponential smoothing and ARIMA methods to predict the urban natural gas demand and believed that seasonality and single variable impacts reinforce forecasts. The above researchers used time-series algorithms to predict the demand for energy, and they built prediction models based on exponential smoothing models, ARIMA models, etc. with the seasonal factors of demand taken into account, and realized periodic prediction of energy demand. However, they do not give a reasonable plan for resource allocation according to the prediction results. In actual situations, the related supporting policies and the reasonable allocation of resources are important factors that limit the development of CBM.
In order to predict the demand for CBM more accurately and formulate a reasonable resource allocation plan, the SARIMA prediction model, Additive Holt-Winters (AHW) model, and Multiplicative Holt-Winters (MHW) model are used to predict the monthly demand for CBM in Yangquan Mine Area in 2020 with the seasonality of the CBM demand taken into account. The optimal prediction model is selected by considering the parameters and CBM demand development trend. Finally, the variation trend of the demand for CBM in the mining area is analyzed based on the actual values and prediction results, and a reasonable resource allocation plan is formulated.

ARIMA prediction model
The ARIMA (p, d, q) model is also called the integrated autoregressive moving average model. This model is based on the correlation measurement at different periods in the series. It is widely used for prediction and analysis in economic and social aspects, and it can make short-term predictions with high accuracy (Wang et al., 2018). The basic idea of the ARIMA model is: the data series formed by the predicted object over time can be regarded as a random series probably including volatility, periodic trends and seasonal factors, and after technical processing a certain mathematical model can be used to describe this series approximately (Deb et al., 2017). Once the model is constructed, future values can be predicted from past and present values of the time series.
The ARIMA model mainly includes the following two sub-models (Aasim et al., 2019;Fattah et al., 2018): 1) Auto Regressive (AR) model, which can be described by the time series y t that satisfies: where y t is the linear combination of the observed values at previous p periods and the random error term e t , e t is a series of independent and identically distributed random variables with the homogeneity of variance satisfied and the expectation of 0.
2) Moving Average (MA) model, which uses the observed value y t as the dependent variable and the prediction error generated during prediction of y t as the independent variable. The basic form of the model is The MA model means that any observed value in the time series is a linear combination of the current and the previous q random errors and that the moving average process is unconditionally stationary.
When the time series has the characteristics of both the AR model and the MA model, it can be described by the ARIMA model. The basic expression for the ARIMA model is as follows: where p and q are the order of the AR model and the MA model, respectively, u i (i ¼ 1, 2,. . . p), h j (j ¼ 1, 2. . . q) are the undetermined coefficients of this model, e t is the error, and y t is a stationary time series. Moreover, this model can also be used for the time series with significant seasonal effects. According to whether the seasonal effects can be easily extracted, it can be divided into two types: a simple seasonal model and a multiplicative seasonal model. In the simple seasonal model, additive relationship is adopted for various effects. If the effects of the time series are complicated and the simple seasonal model cannot fully reflect the relationship between them, the multiplicative seasonal model needs to be selected (Makananisa and Erero, 2018). The construction idea for this model is: short-term correlation is extracted through a loworder ARMA (p, q) model and seasonal correlation is extracted through an ARMA (P, Q) model with a period step S, and thus the model structure is ARIMA (p, d, q) Â (P, D, Q) with a multiplicative relationship between the two aspects.

Holt-Winters exponential smoothing model
The basic idea of the Holt-Winters exponential smoothing model is: make smooth estimates of long-term trends, trend increments, and seasonal changes for the time series with linear trends, seasonal changes, and random changes, and then build a prediction model and extrapolate the predicted values (Ferbar Tratar and Strm cnik, 2016;Makananisa and Erero, 2018). This method can handle both trends and seasonal changes, and it can also filter out the effects of random fluctuations appropriately. Therefore, it is particularly applicable for the prediction of the time series containing trends and seasonal changes. This model includes an additive model, a multiplicative model, and a seasonless model. In this study, the additive model and the multiplicative model are used for prediction.
The MHW model (Koehler et al., 2001) is suitable for the series with linear trends and multiplicative seasonal changes. The smoothed seriesŷ tþ1 for y t is given by the following equation: where a represents the intercept; b represents the trend; S t is the seasonal factor, and S is the length of the seasonal period (monthly S ¼ 12, quarterly S ¼ 4); t ¼ 1, 2, . . ., T; k is the number of backward smoothing periods, k > 0.
The initial value of the first year for the seasonal factor, as well as the initial values of the intercept and slope, needs to be given for this model. The calculation equations for a, b, S are as follows: The AHW model (Puah et al., 2016) is suitable for the series with linear trends and seasonal effects that do not change with time. The equations for this model are as follows: where a, b, c are the smoothing coefficients between 0 and 1; y t S tÀS is the trend value at the period t excluding seasonal factors, and y t S tÀS and the trend value a tÀ1 þ b tÀ1 at the previous period are smoothed with the weight of a and 1-a, respectively, to obtain the smoothed series a t excluding seasonal factors and including the trend component and the random component; the difference a t À a tÀ1 between the trend at the period t and the previous period t-1 is the linear component of the current period, and a t À a tÀ1 and the linear component b tÀ1 at the previous period are smoothed with the weight of b and 1-b, respectively, to obtain the smoothed value of the linear component b t ; y t a t is the seasonal component excluding the trend component, and y t a t and the previous seasonal component S t-S are smoothed with weight of c, 1-c, respectively, to obtain the smoothed value of the seasonal exponential S t .
The predicted value is calculated by the following equation: where S tþk-S uses the seasonal factor of the last year.

Data source
The data of this research comes from the CBM Development and Utilization Branch of Yangquan Coal Group. This CBM monthly usage data in 2016-2019, a total of 48 months, is the total gas consumption for civil use, power generation (high and low concentration gas power generation), and industry use (gas boilers, industrial alumina roasting, and slime drying).

Prediction model construction
The ARIMA model prediction includes the following three steps. 1) Series stationarity. It is mainly realized through the difference method. The test methods include ADF test and observation of the autocorrelation plot of difference series. 2) Model order identification. It is to determine the values of p and q by technical methods. If it is a seasonal model, it is necessary to determine the seasonal parameters P and Q. 3) Model diagnosis. It is usually performed by the method of observing the autocorrelation plot of the residual series to determine whether it is a white noise series. The model construction process is shown in Figure 1. The series stationarity can be obtained through observation. The time series plot of the history data is shown in Figure 2. From this figure, it can be observed that users' gas consumption in each year shows an overall trend of first decrease and then increase, i.e., the gas consumption is relatively small in summer and large in cold winter, and thus the series stationarity is poor. Furthermore, the Auto-Correlation Function (ACF) and Partial Auto-Correlation Function (PACF) plots can also be used to determine whether the series stationarity is poor. From the ACF and PACF plots of the series (Figure 3), it can be seen that the autocorrelation plot shows a sinusoidal fluctuation trend, and thus the series can be determined to be a non-stationary series.
If the series is non-stationary, it is necessary to make the series stationary through the difference or seasonal difference. Then the values of d and D for the model is determined according to the order of the difference and seasonal difference, and the p, q, P, Q values of the model is obtained by the ACF and PACF plots. In this study, the software SPSS16.0 is used to construct the ARIMA seasonal model to predict the monthly CBM demand data.  The Expert Modeler program in this software is applied to make stationary the data required by the ARIMA model, and the optimal order and model parameters are automatically selected. Finally, the optimal model is determined to be ARIMA (0,0,0)Â(0,1,0) 12 .
The AHW model and MHW model are also constructed by the software SPSS, and the three-parameter additive and multiplicative exponential smoothing model is used to predict the CBM demand from January to December in 2020.

Comparison and analysis of model prediction results
The fitting results of the SARIMA prediction model, MHW model, and AHW model shown in Figure 4 indicate that all three prediction models can fit well for the trend of demand. The SARIMA model has a good fit for the data in 2018 and 2019, the smooth exponential model fits the actual values well in 2016-2019, and the AHW model has the best fitting effect.
In order to evaluate the fitting effects of the three models quantitatively, the statistical parameters for the goodness of fit of the three models are calculated and shown in Table 1. For the SARIMA prediction model, the determination coefficients R 2 and stationary R 2 are 0.61 and 0.481, respectively, indicating that this fitting model can explain 61% of the information in the actual series and the model series after stationary processing can explain 48.1% of the information. Furthermore, the MAE of this model is 8486042, the RMSE is 11017282, the MAPE is 9.24%, the Ljung-Box Q statistics is 14.244, and the significance is 0.713. For the MHW, the determination coefficients R 2 and stationary R 2 are 0.462 and 0.235, respectively, indicating that this fitting model can explain 46.2% of the information in the actual series, and the model series after stationary processing can explain 23.5% of the information. Furthermore, the MAE of this model is 8425526, the RMSE is 12580957, the MAPE is 8.790%, the Ljung-Box Q statistics is 31.643, and the significance is 0.007. For the AHW model, the determination coefficients R 2 and stationary R 2 are 0.662 and 0.634, respectively, indicating that this fitting model can explain 66.2% of the information in the actual series and the model series after stationary processing can explain 63.4% of the information. Furthermore, the MAE of this model is 6741973, the RMSE is 9966736, the MAPE is 7.306%, the Ljung-Box Q statistics is 31.0.68, and the significance is 0.009, which means that the observed values of the Ljung-Box Q statistics are significant. Comprehensive comparison of the fitting parameters of the three models, the AHW model has the highest fitting degree and the smallest error, and thus the AHW model has the best fitting effect, followed by the SARIMA model. The MHW model has the lowest fitting degree and the highest RMSE, so its prediction effect is poor.  As shown in Figure 5, the residual ACF and PACF plots of the SARIMA and AHW prediction models show that the absolute values of the ACF coefficient and PACF coefficient of the residual series are both within the 95% confidence interval, which do not exceed the range of the random interval, and thus the series is stationary, i.e., the residual series is a white noise series and the model information is fully extracted. For the MHW model, the PACF coefficient is not within the 95% confidence interval, which exceeds the range of the random interval. This indicates that the model information is not extracted fully. Therefore, the prediction results of the MHW model can be excluded because of its large residual ACF and PACF. Based on the above-mentioned model prediction parameters in Table 2, it can be preliminarily considered that the AHW prediction results are the best, followed by the SRIMA prediction results. Table 3 and Figure 6 show the prediction results of the three prediction models for the CBM demand in 2020 and the variation trend of the demand in 2016-2019. Table 3 indicates that the prediction result of the annual total demand by the SARIMA model is the largest, and that the predicted results in each month and in total by the AHW model and the MHW model are similar. Furthermore, the prediction results in the first half of 2020 from the SARIMA model are significantly higher than those from the other two models, and there is not much difference in the prediction results of in the second half  of 2020 from the three models. In addition, the actual CBM consumption is in the range of 120,000,000-130,000,000 m 3 in 2018 and early 2019, and only the prediction results of the SARIMA model are within this range. As shown in Figure 6,    The above are the predicted results under ideal conditions. However, considering the impact of COVID-19 in 2020, economic operations around the world have suffered losses, and thus the actual use of CBM may be reduced. In this study, the data for the actual demand of CBM in mining areas from January 2020 to June 2020 are collected, as shown in Table 4. The actual value is compared with the predicted value of the models to further evaluate the prediction accuracy of the models under the influence of COVID-19. The RE (relative errors) of the three prediction models from January to June are shown in Figure 7. The relative error of the AHW model prediction is small, and its Mean Relative Error (MRE) is 0.099. Therefore, the AHW model has a better prediction effect under the influence of COVID-19.

Demand trend analysis
Under ideal conditions, the demand for CBM in the mining area shows an increasing trend, and the predicted results of the SARIMA prediction model are reasonable. However, with the economic downturn in 2020 due to the impact of COVID-19 considered, the predicted results of the AHW model are reasonable. Figure 8 shows the change trend of CBM demand in Yangquan mining area from 2016 to 2019, the monthly change trend of CBM demand in 2018 and 2019, and the monthly demand predicted by SARIMA and AHW models in 2020. As indicated in this figure, under ideal conditions (SARIMA model), the demand for CBM in the mining area shows a continuously increasing trend, and the demand will reach 1,276,431,541 m 3 in 2020. Moreover, the monthly demand   Figure 6. Prediction values of CBM demand in 2020 by three models. changes in 2018 and 2019 show a similar periodic variation trend: in January and February, the demand for CBM, mainly used for power generation and heating, is largest in the year because it is cold in these two months and the Chinese New Year is during this time; as time goes by, the demand for CBM is gradually decreasing because it gets warm gradually and residents' demand for heating is reduced; it keeps decreasing until the demand gradually stabilizes from July to October when it is minimum in the year; in November and December, the demand for CBM gradually increases again as it turns cold again. However, under actual conditions affected by COVID-19, the actual demand for CBM in mining areas is lower than the ideal demand. Based on the above analysis, the AHW forecast results can reasonably predict this trend. The prediction result of the model shows that the CBM demand in mining areas in 2020 is 1,120,294,795 m 3 , which is 15.2% lower than the ideal CBM demand (result of SARIMA model). In the first half of the year, the demand for CBM is significantly affected by COVID-19, and it gradually returns to normal from August.

Research on CBM resource allocation system
According to the analysis results of time series, it can be concluded that the demand for CBM has obvious time characteristics, that is, the demand in winter is large, while the demand in summer is small, so it will lead to the phenomenon of resource surplus in summer and resource shortage in winter, which seriously limits the development and utilization of CBM resources. The supply and demand relationship of CBM in the mining area can be divided into three types: balance of supply and demand, oversupply, and short supply. This study considers three modes of transportation costs, with transportation costs as the objective function, while ensuring the economic and social benefits of the mining area, and constructing a reasonable CBM resource allocation model. There are m producing areas and n demanding areas in the mining area. The output of producing area A i is a i (i ¼ 1, 2. . .m); the demand of demanding area B j is b j (j ¼ 1, 2. . .n). The transportation price of the unit for transporting materials from the A i to the B j is C ij , and the transportation volume from the origin A i to the demand location B j is X ij , as shown in the following Table 5.
Under the condition of satisfying the balance of supply and demand, that is X m i¼1 a i ¼ X n j¼1 b j , the minimum mathematical model that can be established for transportation costs is: Under the condition of oversupply, that is X m i¼1 a i ! X n j¼1 b j , the mathematical model that can be established is: For the above model, there are mn variables and m þ n constraints, so it does not meet the requirements of the solution and needs to add constraints. In the case of balance of supply and demand and oversupply, the configuration is based on the principle of optimizing transportation costs, that is, the supply priority will meet the location with the lowest freight demand, and will be allocated in sequence until all configuration tasks are completed, and the remaining CBM will be stored through the storage and distribution station. When supply is in short supply, the government and production units shall be given priority to ensure the gas demand according to the principle of maximizing social and economic benefits, and then allocate resources according to the principle of optimizing transportation costs. The overall configuration system is shown in Figure 9.

Conclusions
In this paper, the SARIMA model, AHW model and MHW model are used to analyze and predict the consumption of CBM in Yangquan Mine Area. Furthermore, the prediction models for the CBM demand are compared and the reasonable models are selected. In addition, the monthly CBM demand in 2020 is predicted. Based on the prediction results, a CBM allocation system was constructed. Finally, the following conclusion is drawn: 1. After the analysis of the CBM consumption data, it is found that the demand for CBM in Yangquan Mine Area has a clear periodicity. By the comparison of the fitting parameters, it is indicated that the SARIMA model and the AHW model can predict the demand for CBM in mining areas. The SARIMA model can predict the demand for CBM under ideal conditions, while the AHW model can reflect the demand for CBM under the influence of COVID-19. 2. The consumption of CBM in the mining area increases gradually in 2016-2019. As the prediction results from the SARIMA model indicate, the CBM demand in 2020 is in a steady rise, the annual total demand in the mining area is 1,276,431,541 m 3 , and the variation trend of monthly demand is basically the same as that in 2018 and 2019. The demand for CBM under the influence of COVID-19 in 2020 is expected to be 1,120,294,795 m 3 , which is 15.3% lower than the ideal demand. 3. According to the seasonal characteristics of CBM demand, the peak of gas consumption is in winter, and the gas consumption is relatively small in summer. To this end, a mathematical model of resource allocation under the conditions of balance of supply and demand, oversupply and short supply is constructed to achieve a reasonable allocation of CBM resources.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This study was supported by the "Thirteen-Five" National Science and Technology Major Issues of Special Tasks of China (2016ZX05045-006-002), the key projects of Science and Technology Innovation and Entrepreneurship Fund of Tiandi Technology Co., Ltd (2019-TD-ZD004), the key projects of China Coal Science and Industry Group Chongqing Research Institute Co., Ltd (2018ZDXM06).