Short-Term Electricity Consumption Forecasting Based on the EMD-Fbprophet-LSTM Method

Short-term electricity consumption data reflects the operating efficiency of grid companies, and accurate forecasting of electricity consumption helps to achieve refined electricity consumption planning and improve transmission and distribution transportation efficiency. In view of the fact that the power consumption data is nonstationary, nonlinear, and greatly influenced by the season, holidays, and other factors, this paper adopts a time-series prediction model based on the EMD-Fbprophet-LSTM method to make short-term power consumption prediction for an enterprise’s daily power consumption data. .e EMD model was used to decompose the time series into a multisong intrinsic mode function (IMF) and a residual component, and then the Fbprophet method was used to predict the IMF component. .e LSTMmodel is used to predict the short-term electricity consumption, and finally the prediction value of the combined model is measured based on the weights of the single Fbprophet and LSTM models. Compared with the single time-series prediction model, the time-series prediction model based on the EMD-Fbprophet-LSTM method has higher prediction accuracy and can effectively improve the accuracy of short-term regional electricity consumption prediction.


Introduction
In the new electricity market, the members of the electricity market need to remain stable in the market in order to make the highest possible profit, and this profit is closely related to the accurate forecasting of electricity consumption [1]. e demand for electricity consumption by customers is affected by many uncertainties, and an accurate forecasting model has an important role in improving the operation and planning of the power system, the main purpose of which is to help plan future power consumption and power load, so that a balance is achieved between power consumption and power production in order to reduce operating costs and resource waste [2]. In order to build a reasonably sized, safe, and reliable power system, electricity sales companies or agency platforms are now allowed to sell electricity to industrial or residential customers, optimizing the grid structure, enabling spatial segmentation of the electricity consumption market, and ensuring reliability of supply [3].
By improving the accuracy and reliability of short-term electricity consumption prediction, the response speed of the grid to unexpected situations can be improved, the operational efficiency of the transmission and distribution network can be improved, the power consumption planning of the grid can be refined, and daily maintenance costs can be reduced [4].
Current forecasts of electricity consumption are generally divided into short-term forecasts, medium-term forecasts, and long-term forecasts, with the medium-term and long-term forecasts mainly focusing on monthly and above time scales of electricity demand, while the short-term forecasts are for demand within a day [5]. Traditional forecasting methods are based on mathematical methods, such as regression analysis, ARIMA model, and exponential smoothing [6]. e autoregressive moving model (ARIMA) is often applied to short-term time series with strong regularity and periodicity, and literature [7] adopts the ARIMA model for short-term prediction and evaluation of a month's power load data in Dayton, and, by comparing the relative errors, the prediction value of the model is found to be more accurate. Reference [8] applied the exponential smoothing method for medium-term and long-term demand forecasting, which is suitable for large areas with relatively little uncertainty, and some seasonal factors can also be included in the model. ese methods are simple and easy to use, but when encountering nonlinear and unstable electricity consumption data, the forecast results are not highly accurate and prone to various problems [9]. Artificial intelligence methods have been proposed, which will effectively solve the accuracy problem in load forecasting, including BP neural networks (ANNs) [10] and support vector machines (SVMs) [11]. Reference [12] adopts the support vector machine (SVM) model to forecast the medium-term and long-term electricity consumption in Jibei region, taking into account the economic environment and the downstream environment of the industrial chain, through which the complexity of the calculation is reduced, the speed of the calculation is accelerated, and the accuracy of the prediction is improved. Reference [13] proposes an improved BP neural network prediction model, which effectively improves the convergence and prediction accuracy by batch-processing the data. Although a single intelligent algorithmic model has good adaptability to nonlinear and unstructured electricity consumption data and the accuracy of prediction can be improved to some extent by deeply mining the inherent patterns of electricity consumption data, its prediction results are difficult to promote the use, so many scholars use combinatorial models to improve the robustness of the model and the accuracy of prediction [14]. Reference [15] proposes a model for predicting regional electricity consumption based on gray prediction and stochastic forest combination method, which considers the interaction between electricity consumption and economic indicators. Reference [16] constructs a prediction model based on random forest (RF) and deep belief network (DBN) to simplify the structure of electricity prediction model by unbiased optimization identification of variables, which helps to improve the training rate and generalization ability of the model. Combinatorial forecasting method is greatly influenced by random factors, and multiple factors work together on electricity consumption, so preprocessing of data is needed before forecasting, and the fluctuating characteristics of electricity consumption data can be well analyzed by decomposition. Reference [17] proposed a short-term load prediction model based on GM (1, 1) and EMD combinatorial model, which better adapts to the randomness and periodicity of load and significantly improves the accuracy of prediction. In literature [18], the time series is decomposed by wavelet function, and different models are built for predicting the time series on different scales, and the complete prediction result is obtained by sequence reconstruction, which improves the prediction accuracy and the modeling efficiency. Reference [19] proposes a prediction model based on the combination of EMD and LSTM, which can be predicted by modeling each component and is more suitable for nonlinear electricity consumption prediction than the traditional single model.
Based on the shortcomings of existing studies, such as the complexity of processing complex data and the lack of general applicability of prediction results, this paper proposes a combined prediction model to predict short-term electricity consumption. Since short-term electricity consumption data is a nonlinear, nonstationary series consisting of multiple frequency superpositions, the volatility of electricity consumption data is the focus of research and is affected by a variety of external factors, such as daily, weekly, and seasonal cyclicality [20,21]. e previously proposed methods and models have greater complexity and uncertainty in predicting this type of data, so there is still a need for a more accurate method to target and obtain more valuable results. To this end, this paper proposes a new EMD-Fbprophet-LSTM short-term electricity consumption prediction model, which firstly uses the LSTM method to predict short-term electricity consumption and secondly uses the Fbprophet time-series model to predict electricity consumption based on the decomposition of electricity consumption by EMD. As a new and more advanced hybrid model, the EMD-Fbprophet-LSTM model takes into account the unique fluctuating characteristics of electricity demand on different time scales and the influence of factors such as weather on customer demand and provides lower forecast errors and better results when forecasting short-term electricity consumption of customers.
is study is a time-series forecast of short-term electricity consumption, with a forecast lead time of one day, taking full account of the temporal correlation between dynamic electricity consumption data. e LSTM has strong generalization ability, good learning ability for both large and small data sets, and strong advantages for the processing of nonlinear data, which can improve the accuracy of short-term power consumption prediction. e empirical mode decomposition (EMD) [22] is based on the different waveform data obtained from the electricity consumption data, and, according to the time series of the waveform data itself, it can smoothly decompose the nonlinear and nonstationary time series, which is usually decomposed into a small number of embedded mode function components (intrinsic mode functions, IMF) and a residual component, thus reducing the nonstationarity of the original data and the complexity of the time series even more, so that the periodicity and trend of the original data series can be revealed. Using the Fbprophet time-series model [23] to implement the prediction of the IMF component, the prediction results can be obtained quickly and accurately, the outliers in the time series can be handled effectively, and the seasonal and holiday factors in the time series can be taken into account. e final empirical evidence shows that the prediction of electricity consumption by combining the Fbprophet and LSTM method has a high accuracy, and the simulation results verify that it is an effective method for short-term electricity consumption prediction.
Based on the above, the important questions can be summarized as follows: (1) Disaggregation of the original short-term electricity consumption data using the EMD method (2) e Fbprophet forecasting model is used to forecast each part of the IMF, taking into account the effects of holidays and other factors, in order to obtain valid electricity consumption forecasts (3) Adopt LSTM model to forecast the short-term electricity consumption (4) Construct a combined EMD-Fbprophet-LSTM model to forecast short-term electricity consumption and compare the forecast results with those of ARIMA model and single Fbprophet model, LSTM model, and EMD-Fbprophet model to prove the validity of the model proposed in this paper e rest of the paper is presented as follows. Section 2 introduces the algorithmic principles of EMD, Fbprophet, and LSTM and constructs the EMD-Fbprophet-LSTM model proposed in this paper. Section 3 selects the electricity consumption data of an enterprise in Province Z for empirical study and compares and verifies the results to prove the accuracy of the prediction results. Section 4 gives the conclusion of this paper.

Principle of EMD Algorithm.
Empirical mode decomposition (EMD) is an adaptive time-series decomposition method that smooths the nonlinear time series x(t) into feature components with different feature scales, namely, the intrinsic mode function (IMF) component, and the residual component r(t). e decomposed resulting IMF represents the fluctuating components of different time scales implicit in the raw electricity consumption data, and its values and waveforms can well reflect the characteristics of the raw electricity consumption data. e residual term, on the other hand, represents the trend of the forecast series [24,25]. e basic steps are as follows: (1) Find the maximum and minimum points of the original signal x(t), fit the upper and lower envelope lines e max (t) and e min (t) of x(t), and calculate the mean values of e max (t) and e min (t), m(t): (2) Calculate the difference between the raw data and the mean of the envelope lines, d(t): (3) Determine the nature of d(t); if it is satisfied that the numbers of zero crosses and extreme points in d(t) are the same and the local maxima and minimal values, respectively, form envelope lines that are zero-mean, then d(t) is an IMF component. Otherwise, the above steps need to be repeated for screening. (4) Define residuals r(t):

Principles of the Fbprophet Algorithm.
e Fbprophet model is a time-series prediction tool proposed by Facebook in 2017, which carries out time-series prediction through time-series-based decomposition and machine learning fitting [26]. e Fbprophet prediction process consists of four parts: model building, evaluation of predictions, problem solving, and manual checking, which work in a sequential loop until a suitable predictive model is obtained.
e Fbprophet algorithm decomposes the time series y t into three parts, as shown in the following equation: where g t is the trend term, which represents the trend of the time series on a nonperiodic basis; s t is the seasonal term (period term); h t is the holiday term; and ε t is the error. By fitting these three items through the submodel, it can be reasonably applied to a variety of time-series predictions with regularity and can identify and adjust the anomalies in the data, effectively dealing with the jump points and periodicity of the time series, while the Fbprophet algorithm also takes into account the seasonal and holiday effects that are of concern to the prediction model and is a convenient and efficient time-series prediction tool.

Principle of LSTM Algorithm. LSTM (Long Short-Term
Memory) consists of an input layer, a hidden layer, and an output layer [27], which can effectively solve the problem of gradient disappearance or explosion due to the long time span of dependencies between information, learn and predict based on historical information, balance the temporal and nonlinear relationships of electricity consumption data, and obtain better prediction results. Figure 1 shows the network structure of LSTM.

Oblivion Gate.
e forgetting gate f t determines how much information can be passed from the previous cell state to the current cell state, with an output of 1 indicating that all information from the previous moment is retained and an output of 0 indicating that all information from the previous moment is discarded.
where f t is the oblivion gate, σ is the excitation function, taking values between [0, 1], w is the weight matrix, and b f is the deviation vector.

Input
Gate. e input gate i t updates the candidate information in the memory cell by activating the function σ to filter new input information and add it to the memory cell.

Mathematical Problems in Engineering
where i t and g t are the input gate, x t is the input vector, and b i and b c are the deviation vectors.

Update Cell
State. e output of the forgetting gate f t and the old cell state c t−1 of the previous moment form part of the updated cell state c t , while the other part consists of the output of the input gate i t and the memory cell candidate state.
where c t is the updated cell state and c t−1 is the old cell state at the previous moment.

Input Gates and Hidden Layer
Outputs. e output gate o t can be obtained by the excitation function σ. e output vector h t can be obtained by compressing and updating the cell state c t .
where o t is the output gate and h t is the output vector.

Model
Integration. e construction of a combined prediction model can combine the advantages of each single model and improve the prediction accuracy. In this paper, the weights of the models are determined using the variance method and are calculated as follows.
Calculate the variance corresponding to each prediction model.
Get the weights from the variance.
After deriving the weights, the respective predictions are multiplied by the corresponding predictions to obtain the combined predictions.
where F indicates the predicted result. F 1 , F 2 denote the separate predictions of the LSTM model and the EMD-Fbprophet model, respectively.

Model Construction.
After decomposing the time series by EMD method, the resulting IMF component can simplify the time-series forecasting model with a high degree of fit, but the lower-order IMF component is still highly volatile and cannot be simply discarded for noise reduction as it retains some of the information from the time series. Since short-term electricity consumption forecasts are influenced by complex external market factors, the Fbprophet model relies only on historical time series, it is difficult to utilize other external information related to the forecast target, and if used alone it will not achieve the desired forecast level due to insufficient information. Since the prediction accuracy of LSTM is affected by the selection of key parameters and the size of the dataset, for the predictive analysis of nonlinear time series, this paper proposes a combined LSTM-Fbprophet model for short-term electricity consumption prediction. Based on the advantages of LSTM neural network for long-time problem processing and EMD-Fbprophet algorithm for mutation point and periodic problem processing, the combined LSTM-Fbprophet algorithm can effectively improve the prediction accuracy. e modeling process is shown in Figure 2.
(1) e decomposition of the original time series into a number of IMF components and a residual component r(t) using EMD highlighting the local characteristics of the original data, which can well reflect the periodicity, trend, randomness, and other characteristics of the original data (2) Preprocessing the load data of the decomposed subseries to normalize the data  integrating the prediction results, and obtaining the final prediction results

Data Description.
e dataset used in this paper is for the installation of smart meters at an enterprise in Province Z between January 1, 2019, and September 27, 2019. e sum of the users' daily electricity consumptions is 270 data samples (the data have been desensitized). To test the predictive power of the model, this paper splits the dataset into a training data sample and a predictive test data sample, using the former daily. e electricity consumption data trained the model and predicted the daily electricity consumption for the last 7 days. e mean absolute percentage error (MAPE), root mean square error (RMSE), and mean absolute error (MAE) were used as the indicators to assess the effectiveness of predictive models, comparative analysis of the Fbprophet model, and EMD-Fbprophet predicted results of the model.

Mathematical Problems in Engineering
In this paper, all algorithms of the proposed technique are implemented in Python 3.7.9 software.

Descriptive Analysis and Data Preprocessing.
As can be seen in Figure 3, there is a large volatility in regional daily electricity consumption data, and there are more external factors affected by changes in daily electricity consumption. Holidays have a greater impact on electricity consumption, and, during special holidays, such as around Chinese New Year, there is a significant trough in electricity consumption. Electricity consumption is significantly higher than weekend consumption, showing a cyclical variation on a weekly basis.
For missing data and anomalies, the average of the valid data before and after two weeks is used to fill in the missing and anomalous data. e preprocessing of the data does not remove data points such as holidays which cause significant changes in electricity consumption.

Experimental Results.
is paper uses the front part of the dataset as a training sample to predict the daily electricity consumption for the last 7 days; in order to prove the validity of the proposed model in the prediction model, this paper will longitudinally compare the prediction performances of ARIMA, LSTM, Fbprophet model, and the proposed LSTM-Fbprophet model to analyze the daily electricity consumption. e EMD method is used to decompose the short-term electricity consumption data after preprocessing to obtain waveforms formed by six different intrinsic modal functions (IMF) and a residual component (see Figure 4).
In Figure 4, the six IMFs are sorted according to their frequencies to show some of the periodicity of factors affecting the time series, reflecting the impact of noninfluential factors on the electricity consumption data at different scales. e higher frequency of the components in IMF1 and IMF2 can be seen as the high-frequency component of the original series and the more pronounced periodicity of the components in IMF3, which can be seen as the periodic component of the original series. e component frequencies in IMF4, IMF5, and IMF6 are low and can be considered as low-frequency components. e residual component Res, on the other hand, represents the long-term trend of the electricity consumption series.
In order to better test the accuracy of the proposed model, the ARIMA model, LSTM model, Fbprophet model, and the proposed model are used to predict the daily electricity consumption data for the last 7 days of an enterprise, respectively. e predicted results are shown in Table 1 and Figure 5. Among them, the error is positive when the predicted value is larger than the actual electricity consumption and it is negative when the predicted value is smaller than the actual electricity consumption.
Model prediction accuracy indicators used are MAPE, RMSE, and MAE, where MAPE reflects the overall level of deviation between the model prediction value and the actual value of the prediction test data sample, and the smaller the value of MAPE, the higher the prediction accuracy; RMSE reflects the degree of dispersion of error, and the smaller the value of RMSE, the better the prediction stability; MAE is the average absolute error, and the smaller the value, the higher the prediction accuracy. e models MAPE, RMSE, and MAE were obtained (see Table 2).
rough the comparison of the actual and predicted values and the statistical analysis of the error indicators, the following conclusions can be drawn.
First, the proposed model's MAPE, RMSE, and MAE are the smallest, which means that the model has better average forecast accuracy and stability than the ARIMA, LSTM, Fbprophet, and EMD-Fbprophet models.
Second, the RMSE value of ARIMA is the largest among the several models, indicating a moderate prediction performance. Fbprophet and EMD-Fbprophet models are more stable than ARIMA, and the LSTM model is second only to the model proposed in this paper in terms of accuracy. e prediction trend of the proposed model is basically consistent with the actual value, which has the highest stability and accuracy, and can better grasp the daily electricity consumption trend.

Conclusion
In this paper, a short-term electricity consumption prediction model based on the combination of EMD-Fbprophet and LSTM method is proposed. Firstly, the EMD method is used to decompose the raw data of regional daily electricity consumption, the subseries and residual series of low frequency and high frequency are obtained, and the influence of different components is distinguished to reduce the complexity, randomness, and nonstationarity of the raw data. e Fbprophet method is used to model predictions for each component. en short-term electricity consumption is predicted by a single LSTM model. Finally, the prediction results of the combined EMD-Fbprophet-LSTM prediction model are measured based on the weights obtained from the variance. In addition, in order to prove the validity and optimality of the EMD-Fbprophet-LSTM prediction model proposed in this paper, the EMD-Fbprophet-LSTM model and the prediction results of the traditional ARMA method with a single Fbprophet and LSTM model are compared and analyzed in the empirical analysis. e experimental results show that the fluctuations of the EMD-Fbprophet-LSTM optimized prediction model errors are relatively smaller, and, by distinguishing the effects of different components, the complexity, randomness, and nonstationarity of the raw data are reduced, which can effectively improve the prediction accuracy and precision, reduce the prediction errors, and have a good ability to accurately predict the short-term nonlinear electricity consumption data. Since short-term electricity consumption data are nonlinear data with strong volatility and instability and the EMD-Fbprophet-LSTM prediction model proposed in this paper can predict data with strong holiday effects and seasonal fluctuations well and can also handle outliers well, it can effectively reduce the prediction error and improve the prediction accuracy. erefore, the model can effectively forecast short-term electricity consumption, which is conducive to balancing demand-side management, guaranteeing basic electricity consumption, and helping power companies to rationally allocate power resources and providing them with more accurate decision support.
Data Availability e data were from State Grid Zhejiang Economic Research Institute and have been desensitized.

Conflicts of Interest
ere are no conflicts of interest regarding the publication of this paper.