ForecastingNatural Gas Consumption in theUSPower Sector by a Randomly Optimized Fractional Grey System Model

Natural gas is one of the main energy resources for electricity generation. Reliable forecasting is vital to make sensible policies. A randomly optimized fractional grey system model is developed in this work to forecast the natural gas consumption in the power sector of the United States. +e nonhomogeneous grey model with fractional-order accumulation is introduced along with discussions between other existing grey models. A random search optimization scheme is then introduced to optimize the nonlinear parameter of the grey model. And the complete forecasting scheme is built based on the rolling mechanism. +e case study is executed based on the updated data set of natural gas consumption of the power sector in the United States. +e comparison of results is analyzed from different step sizes, different grey system models, and benchmark models. +ey all show that the proposed method has significant advantages over the other existing methods, which indicates the proposed method has high potential in short-term forecasting for natural gas consumption of the power sector in United States.


Introduction
Electricity facilitates the development of the national economy and promotes the progress of the industrial society in the present age. Electricity, as high-performance clean energy, has one shortcoming that its sources are too extensive. Among plenty of ways to produce electricity, natural gas is the best choice as a clean fuel, which is better than coal combustion in terms of pollution and more convenient than nuclear energy in resource acquisition [1]. As the world's largest industrial country, among the primary energy sources used by the United States to produce electricity in 2020, natural gas accounted for 38%, coal accounted for 27%, nuclear energy accounted for 20%, and traditional hydropower accounted for 12% [2]. With the closure of many coal plants and nuclear power plants in the United States, natural gas has become the primary electricity production source in the United States [3]. erefore, it is of great significance to study natural gas consumption in the US power sector. In the early natural gas prediction methods, Hubbert model is one of the earliest established tools [4], and it has been proved to achieve a pleasing effect in the prediction of fossil fuels [5]. Jiang et al. took China's policies as the driving factor to establish MARKAL, an economic optimization model for predicting natural gas consumption, and applied it to the energy forecast of three major regions in China [6]. Li et al. used the system dynamics model to predictthe natural gas consumption [7]. Szoplik built an artificial neural network to predict natural gas consumption, considering many factors that may influence natural gas consumption, such as calendar and weather, and got effective results [8]. A recent method that combines weather forecasting with artificial intelligence to predict a short-term gas consumption has also been developed [9]. Svoboda et al. established a time series prediction method based on machine learning to study natural gas consumption [10]. In Wang et al.'s work, the multiperiod Hubbert model and the rolling grey model were used to forecast and evaluate the natural gas consumption, respectively [11]. As early as 2012, in the work of Soldo, the Hubbert model and grey forecasting model would become the main tool in forecasting by predicting gas consumption [12]. In the grey model, natural gas consumption prediction as a time series has achieved satisfactory results [13,14].
Grey prediction technology is an essential branch of grey system theory proposed by Professor Deng [15]. Because it can provide a feasible and effective method to deal with uncertainty, grey forecasting model is often used in the research of energy, environment, industry, economy, and other fields [16][17][18][19]. Besides, compared with other prediction models, the grey model is better at conducting small samples experiments. erefore, the grey model is often used for short-term prediction and provides corresponding decisions to deal with future trends according to the obtained forecasting results. Grey prediction technology is widely used in energy prediction. Qian and Sui designed a discrete grey model that can adapt to any periodic time series and applied it to renewable energy systems [20]. Huang et al. constructed a multivariate interval grey model and further applied it to the prediction of clean energy with the method of fractional connotation prediction [21]. Zhao and Lifeng proposed an adjacent cumulative, discrete grey model to improve the utilization rate of new data, and it demonstrates the effectiveness on nonrenewable energy [22]. e grey prediction model is more mature and feasible in energy application. However, in most studies, there are no applications with large changes in data characteristics.
In the development of the grey model, to solve this problem, Wu et al. proposed a new accumulation method, replacing the first-order accumulation with fractional-order accumulation, which eliminated the randomness of the original data series [23]. A large number of pieces of literature show that the model can obtain better prediction performance when the original data is processed by fractional-order accumulation [24,25]. With the introduction of new information priority accumulation, the grey model has more choices to process the original data [26]. However, with the introduction of nonlinear parameters, approximating the required parameters of the model has become a new problem.
Many scholars adopt random search algorithm to solve this problem. Bergstra and Bengio et al. applied the random search algorithm to solve the hyperparameter of the model and verified the simplicity and effectiveness of random search in the same field. Compared with other search methods, the application of random search for parameters can quickly and efficiently find equally good or even better models [27]. e random search algorithm has shown some advantages of its algorithm in various fields [28,29].
According to the literature study, this paper uses the random search to optimize the fractional nonlinear parameters in the nonhomogeneous grey model and designs an application of natural gas consumption in the US power sector which uses the rolling forecast mechanism to forecast the results. e rest of this paper is organized as follows. Section 2 presents the theory and concept of a nonlinear grey model which needs to be optimized. In Section 3, the concept of the random search algorithm to optimize nonlinear parameters is given. e rolling forecast mechanism and case study of forecasting natural gas consumption in the US power sector are presented in Section 4, and the conclusions are given in Section 5.

The Fractional Nonhomogeneous Grey
Model and Related Models is section first presents the construction of fractional nonhomogeneous grey model (FNGM), of which the fractional order is the parameter to be optimized [23]. en description of other related models is presented briefly, which is used to compare the prediction performance of the models in the case study.

e Fractional Nonhomogeneous Grey Model.
e raw data sequence is X (0) (k) � x (0) (1), x (0) (2), . . . , x (0) (n) , and its fractional-order accumulation generation sequence is X (r) (k) � x (r) (1), x (r) (2), . . . , x (r) (n) , r is the fractional parameter, and (1) e first-order differential equation of the FNGM is where α is the grey development coefficient and βk is the grey action quantity. e discrete differential equation of (2) is where z (r) (k) � (x (r) (k) + x (r) (k + 1))/2 is the sequence mean generated of consecutive neighbors of x (r) (k). Set en the least squares estimation of the FNGM satisfies e solution of the first-order differential equation (2) is e forecasting results of the FNGM were obtained according to the inverse accumulation operation:

Relationship between the Fractional Nonhomogeneous Grey Model and Other Existing Grey Models.
Several transformationsof the FNGM are givento compare the model forecasting performance: When the discrete differential equation (3) of the FNGM is changed to the FNGM model degenerates to the basic fractional grey model (FGM) [23]. By differencing operation, the FGM can be rewritten as which is the fractional discrete grey model (FDGM) [30]. e equation is called the fractional nonhomogeneous discrete grey model (FNDGM) [31]. e FNDGM will also be used for comparisons. When the fractional parameter r � 1, the fractionalorder accumulation is reduced to the first-order accumulation, which is defined by and within it, the above four models yeild the grey model (GM), the nonhomogeneous grey model (NGM), the discrete model (DGM), and the nonhomogeneous discrete grey model (NDGM) with the firstorder accumulation [23]. When the new information priority accumulation is used to replace the first-order accumulation to process the original sequence, which is then the new information priority accumulation method for the above four models, the new information priority grey model (NIPGM), the new information priority nonhomogeneous grey model (NIPNGM), the new information priority discrete grey model (NIPDGM), and the new information priority nonhomogeneous discrete grey model (NIPNDGM) can be obtained [26].
In the following content, we will compare the performances of the models in the same case study with the same evaluation metrics.

Parameter Optimization Based on Random Search
After the fractional-order accumulation operator is selected, how to set the fractional-order parameters of the model becomes vital to make accuracte forecasting. e simplicity and global optimality of random search make it competitive in parameter optimization. e following part of this section introduces the main steps of random search for parameter optimization of grey models.

Data Set Division.
Set the raw data set as Firstly, the data set is divided into two parts: modelling subset and prediction subset, denoted as respectively, where X model is a subset of the established model and X test is a test set to evaluate the final performance of the model and does not participate in establishment of the model. Secondly, the subset of the modelling part e training subset X train is used to estimate model parameters. e validation subset X valid is used to test the out-of-sample accuracy of the model, which aims to improve the generality of the model. e flowchart of this process is shown in Figure 1.

Optimization Problem Structure.
Taking the nonhomogeneous grey model with fractional-order accumulation as an example, the fractional order r in the FNGM is the parameter that needs to be optimized, in which r determines the way to process the original data. e objective is to reach the minimum average absolute error on the validation set X valid with respect tor, and within this, the FNGM can obtain excellent prediction performance. erefore, the optimization problem of fractional order r can be written by the following equation:

e Randomized Parameter Optimization.
For the nonlinear programming problem expressed in (13), traditional mathematical methods are usually difficult to use. Intelligent computing has become the mainstream of the current era, and the method of a random search for optimized parameters can solve this problem with low time consumption.
In the random search algorithm, it takes random sampling in the parameter space as the benchmark, generates evenly distributed random numbers in the interval, calculates the objective function value, and preserves the sampling points with good results by comparing the objective function value. e approximate optimal solution of the optimization problem can be obtained within limited iterations.
is paper uses a random search algorithm to search the optimal fractional order r of the FNGM. e algorithm is summarized in Algorithm 1.

Complexity Analysis.
e number of training set samples, validation set samples, and algorithm iteration times are defined as n train , n valid , and n iter . And the process of obtaining the optimal model is divided into five parts in the following paragraph.
For particular cases, if r � 1, there are no binomial coefficients in the accumulation. So, the time complexity T 1 (n) of fractional-order accumulation is

Least Squares.
For (5), the operation of Θ T Θinvolves a matrix with shape 2 × 2; it needs 4(n train − 1) multiplications. e inverse(Θ T Θ) − 1 requires 4 3 multiplications, and this value is independent of n train ; the operation Θ T ς means multiplying one matrix by another in which their shapes are 2 × n train and n train × 1, respectively; the multiplications are 2(n train − 1); similarly, the multiplications of matrixes (Θ T Θ) − 1 and Θ T ς need 4 multiplications. So, the complexity of the least squares is the sum of the total number of multiplications, 6n train − 63. And the time complexity is

Time Response Function.
Consider the number of multiplications in (6); the time complexity T 3 (n) for time response function is

Fractional-Order Inverse Accumulation.
e time complexity T 4 (n) of inverse accumulation operation is similar to the fractional-order accumulation, and it can be expressed as

Random Search Algorithm. Every iteration includes
one construction of the model, and the algorithm actually excutes a cyclic process. So, the total time complexity T(n) of the optimal model is According to (19), it indicates that the total time complexity of obtaining the optimal model is related to n train , n valid , and n iter , but in our small sample time series forecasting work, the number of n train and n valid is much smaller than n iter , so the time complexity of the entire work is mainly determined by n iter .

Case Study
In this section, we use the data set of natural gas consumption in the US power sector to verify the FNGM optimized by the random search algorithm. In this case, we will compare the results obtained by the models mentioned in Section 2 and the prediction method given in Section 4.2. In the first subsection of this part, several indicators for evaluating model performance are given to facilitate the measurement of prediction accuracy between models. e forecasting results are discussed in the last section.

Forecasting
Method. 44 months of data on natural gas consumption in the US power sector (from Jan 2017 to Aug 2020) are collected. e results of the analysis of the data are shown in Figure 2, and it can be seen that the data presents a clear quarterly trend. e consumption is the most in the autumn period of each year, and it shows an upward trend year by year. Under the influence of this quarter, the traditional direct modelling and forecasting method obviously cannot achieve better results. In our work, we use a rolling forecasting method for time series data [33]. e specific process is shown in Figure 3. Such methods are widely used in the research of various forecasting models.
To illustrate the forecasting method represented by this figure, we label the data set of natural gas consumption in the US power sector as X � x(1), x(2), . . . , x(n), n � 44 { }, set τ � 12 as the number of rolling window for rolling forecasting, and divide X into group n − τ data subsets: the first subset is T 1 � x(1), x(2), . . . , x(τ) { }, the second subset is T 2 � x(2), x(3), . . . , x(τ + 1) { }, and the last subset is T n−τ � x(n − τ), x(n − τ + 1), . . . , x(n − 1) { }. In each forecasting step, the first ten data points are included in the training subset, and the last two data points form the validation subset. In each subset T i (i � 1, 2, . . . , n − τ), last time series node x n in the original data set X is predicted by the randomly optimized model. e first step time node of each subset is used to form the one-step forecasting result of the rolling forecast, and the second step time node of each subset prediction corresponds to the result of the two-step prediction, and so on. According to the above description, the forecasting result of each step is a prediction value composed of n − τ + 1 − ζ step subsets of model parameters adjusted by random search.
With the forecasting method, the overall prediction scheme in this work is shown in Figure 4

Forecasting Results of FNGM with Different
Steps. In this section, the forecasting results of the first three steps of the FNGM after random search and tuning parameters are used for comparative analysis, as shown in Table 2. e MAE, MAPE, and RMSE of the one-step forecasting are 24.45, 2.58%, and 35.26, and all of them are smaller than other step forecasting. It is worth noting that the metrics values of onestep forecasting are smaller than two-step forecasting, and (1) Input the original data sequence X, need to search for the optimal parameter model mdl, parameter optimization interval S, iteration number n iteration (2) Divide the data set into two parts: training set X train and validation set X valid (3) Define the objective function min W x j ∈X valid (4) Initialize the objective function judgment value as MAE min (5) for i � 1; i ≤ n iteration ; i � i + 1 do (6) For mdl, randomly select a set of parameter values value params with uniform distribution in the interval S (7) Pass the training set X training into this model to train the mdl and predict the time series node where the validation set X validation is located to get the forecast result X (8) Calculate MAE of the forecast result X and the verification set X validation as MAE validation (9) if (MAE validation < MAE min ) do (10) params � value params (11) Update judgment value MAE min � MAE validation (12) end (13) end (14) return params (15) Output optimal parameter params ALGORITHM 1: e process of optimizing parameters by random search algorithm.  Mathematical Problems in Engineering the metrics values of two-step forecasting is smaller than three-step forecasting. We compared the forecasting results under different step sizes in Table 2, and detailed plots are shown in Figure 5 which illustrate thatthe forecasted curve are farther from the original data with the step sizes increasing. It can be concluded that the shorter the step size, the higher the prediction accuracy obtained in the rolling prediction mechanism.

Forecasting Results in Comparison with Other Grey System
Models. In order to further evaluate the accuracy of the rolling forecast of the FNGM with random search, we selected the remaining 11 models mentioned in Section 3 for comparative analysis. It should be mentioned that the GM, NGM, DGM, and NDGM are used for forecasting with the rolling forecasting without optimized nonlinear parameters.
In such 12 forecasting models, the prediction performances of the FNGM, FGM, FDGM, NIPGM, and NIPDGM are better than others. e forecasting results of these five models are shown in Figure 6. And it includes the prediction comparison of three kinds of different step sizes. It can be clearly observed that the forecasting results represented by the FNGM are better than the other four models in every step size.
To visually show the prediction performance of the rolling prediction mechanism after random search, the evaluation metrics mentioned in Section 4.2 are used to quantify the effectiveness of the forecasting results of the models. Table 3 shows the different evaluation metrics of all models in the first three steps of prediction. In the one-step x (τ) x (n -τ -1) x (τ -1) x (n -4) x (n -3) x (n -3) x (n -2) x (n -2) x (n -1) x (τ -1) x (τ + 1) x 1,1 (τ + 1) x 2,1 (τ + 2) x 2,2 (τ + 3) x n-1,1 (n -1) x n-1,2 (n) x n,1 (n) x n-1,2 (τ + 2) x 1,n-τ-1 (n -1) x 2,n-τ-1 (n) Divide the original data into nτ data subsets Forecast a er training the model parameters for each subset based on RandomizedSearchCV forecasting, all the metrics of the FNGM are smaller than other models' one-step results, the MAPE values of several models are slightly smaller, such as FGM, FDGM, and NIPDGM, but are still much greater than three times that of FNGM. And the prediction results of the FNGM with other steps are also reliable. In particular, the performance of FNGM in three-step performance is better than other models' one-step performance.
Considering the prediction results obtained by different accumulation, in the forecasting results of the NGM under three accumulations, the FNGM achieves the best prediction effect but the prediction accuracy of the NGM and NIPNGM  Figure 4: e process of the application of natural gas consumption in the US power sector. is not good enough. It illustrates that the fractional-order accumulation forecasting models are suitable in the application of natural gas consumption in the US power sector. In addition, results in Table 3 indicated that the longer the step size is, the worse the prediction accuracy is.

Forecasting Results in Comparison with Different
Benchmarking Models. To further validate the performance of fractional nonhomogeneous grey model in the application of natural gas consumption, the autoregressive model (AR) [34] and artificial neural networks (ANN) [35] are selected as the benchmarking models to compare with FNGM. e metrics are calculated by the forecasting results illustrated in Figure 7. e MAE, MAPE, and RMSE of AR are 839.91, 90.23%, and 1172.76; they are much worse than the FNGM, and this shows that the AR is not appropriate for this application. Although the ANN has achieved satisfactory prediction results, the FNGM still retains its superiorities in short-term prediction.
4.6. Brief Summary. According to the above results, first of all, the FNGM is more complex than the other fractional- order accumulation model because it is nonhomogeneous withfractional-order accumulation. Such properties of FNGM make it nonlinear and more flexible. e flexibility of the model can be reflected in the more general form of FNGM described in Section 2.2. ese improvements make the model have a stronger description ability for complex data.
On the generalization performance of the model, the in-sample cross-validation improves the fitting performance, so the effective prediction results can be obtained. But for other grey system models, they may not have better formulation or adopt a better optimization algorithm. For the benchmarking models, they may not have the in-sample cross-validation to improve the performance.
To sum up, the model used in this paper is more flexible and has stronger nonlinear properties; the use of data division and verification set makes it have stronger generalization performance; random optimization enables FNGM to obtain fully accurate nonlinear parameters. According to the description of the application results, the FNGM has the best prediction performance on the data sets of natural gas consumed by the US power sector. It implies that the research in this paper can be extended to similar natural gas energy prediction.

Conclusions
is paper uses a random search algorithm to estimate the parameters of the forecasting model and applies the rolling  Mathematical Problems in Engineering forecasting modelling mechanism to achieve accurate forecasting of time series data. First, we transform the optimization parameter problem into a nonlinear programming problem by constructing the nonlinear objective function reflecting the performance of the proposed model on the validation subset. Secondly, the rolling forecast modelling mechanism is used to forecast the natural gas consumption of the US power sector. By comparing the other eleven forecasting models, the results show that the step size influences the forecasting accuracy, and the accuracy becomes lower with more forecasting steps. e FNGM obtained by random search has an excellent performance in forecasting natural gas consumption, which illustrates that the FNGM can be used as a reliable tool for studying clean energy consumption.
Limitations of this work should also be mentioned. First, the random optimization only has weak convergence, and thus the preconditions (such as initial points and bound for the variables) may require more prior knowledge. However, such limitations widely exist in the heuristic algorithms. Second, the structure of the fractional nonhomogeneous grey system model is not complicated enough, which may limit its flexibility to deal with more complex time series.

Data Availability
All the data sets are available in the manuscript.

Conflicts of Interest
e authors declare that they have no conflicts of interest.