Short-term power load prediction method and device
Through the ICEEMD, sample entropy and Transformer model combined with CatBoost's method, the volatility and randomness problems in power load prediction are solved, and a more efficient and accurate short-term power load prediction is achieved.
Patent Information
- Application Number
- CN202510325466.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-04
AI Technical Summary
The existing power load prediction methods have problems such as high volatility, strong randomness and high uncertainty, which affect the stability and safety of power generation planning and power supply.
Improved complementary set empirical modal decomposition (ICEEMD) is used to decompose the historical load into subsequences with different frequencies and eigenmodal functions, and the entropy value of the subsequence is calculated for reconstruction by combining sample entropy. The importance of subsequences is measured by random forests, and prediction is made through the Transformer model, and the residuals are fitted with CatBoost to optimize the prediction results.
Through data noise reduction, dimensionality reduction and dynamic weight allocation, the accuracy and stability of short-term power load prediction are improved, the model calculation amount and overfitting risks are reduced, and the prediction accuracy is improved.
Smart Images

Figure CN120262376A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power prediction, and particularly relates to a short-term power load prediction method and device. Background Art
[0002] For optimal power generation planning, system stability, accurate load estimation, and energy trading are crucial. Power load forecasting scientifically and accurately predicts future power consumption loads based on historical data. Accurate power load forecasting is of great significance. On the one hand, accurate power load forecasting enables power suppliers to better arrange resources, achieve higher efficiency and cost savings, and at the same time ensure the stability and security of power supply. On the other hand, accurate power load forecasting can help producers formulate correct strategies and ensure the normal operation of enterprises. Existing power load forecasting uses time series forecasting methods, which have problems such as large volatility, strong randomness, and high uncertainty. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a short-term power load prediction method and device.
[0004] To achieve the above object, the present invention adopts the following technical solutions:
[0005] A short-term power load prediction method includes:
[0006] Step S1: Obtain subsequences of important feature decomposition of the historical load sequence according to the historical load;
[0007] Step S2: Measure the importance of different influencing factors on the 4 subsequences respectively;
[0008] Step S3: Predict different subsequences;
[0009] Step S4: Fit the residuals of each component by combining CatBoost.
[0010] Preferably, in step S1, the historical load is decomposed into subsequences with different frequencies and intrinsic mode functions through improved complementary ensemble empirical mode decomposition; sample entropy is introduced to calculate the entropy value of the subsequences, and the subsequences with similar entropy values are reconstructed to obtain 4 subsequences of important feature decomposition of the historical load sequence; among them, the subsequences include: random, detail, low-frequency, and trend components.
[0011] Preferably, in step S2, a random forest is used to measure the importance of different influencing factors on the 4 subsequences respectively.
[0012] Preferably, in step S3, the Transformer model predicts different subsequences, and an attention mechanism is introduced to dynamically allocate the weights of influencing factors.
[0013] The present invention also provides a short-term electric load forecasting device, comprising:
[0014] A first calculation module, configured to obtain subsequences of important features of the historical load sequence according to the historical load;
[0015] A second calculation module, configured to measure the importance degrees of different influencing factors on the four subsequences respectively;
[0016] A third calculation module, configured to perform forecasting on different subsequences;
[0017] A fourth calculation module, configured to fit the residual of each component by combining CatBoost.
[0018] Preferably, the first calculation module decomposes the historical load into subsequences with different frequencies and intrinsic mode functions through improved complementary ensemble empirical mode decomposition; introduces sample entropy to calculate the entropy value of the subsequence, and reconstructs the subsequences with similar entropy values to obtain four subsequences of important features of the historical load sequence; wherein, the subsequences include: random, detail, low-frequency and trend components.
[0019] Preferably, the second calculation module uses random forests to measure the importance degrees of different influencing factors on the four subsequences respectively.
[0020] Preferably, the third calculation module performs forecasting on different subsequences through a Transformer model, and introduces an attention mechanism to dynamically allocate the weights of influencing factors.
[0021] The present invention first decomposes the historical load into subsequences with different frequencies and intrinsic mode functions through improved complementary ensemble empirical mode decomposition (ICEEMD); secondly, introduces sample entropy (SE) to calculate the entropy value of the subsequence, and reconstructs the subsequences with similar entropy values to obtain four subsequences of important features of the historical load sequence, namely random, detail, low-frequency and trend components; then uses random forests to measure the importance degrees of different influencing factors on the four subsequences respectively to realize data dimensionality reduction and reduce data redundancy; then, uses a Transformer model to perform forecasting on different subsequences, introduces an attention mechanism to dynamically allocate the weights of influencing factors, and enhances the forecasting performance of the model; finally, fits the residual of each component by combining CatBoost. By adopting the technical solution of the present invention, the problems of large volatility, strong randomness and high uncertainty existing in short-term electric load data are solved. Description of the Drawings
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on the provided drawings.
[0023] Figure 1 It is a flowchart of the short-term power load forecasting method according to the embodiment of the present invention;
[0024] Figure 2 It is a data processing flowchart of the short-term power load forecasting method according to the embodiment of the present invention. Specific Embodiments
[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0026] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] Embodiment 1:
[0028] As Figure 1 , 2 shown, the embodiment of the present invention provides a short-term power load forecasting method, including:
[0029] Step S1: Obtain the important feature decomposition subsequences including the historical load sequence according to the historical load; the subsequences include: random, detail, low-frequency, and trend components;
[0030] Step S2: Measure the importance of different influencing factors for the 4 subsequences respectively;
[0031] Step S3: Forecast different subsequences;
[0032] Step S4: Combine CatBoost to fit the residuals of each component.
[0033] As an implementation manner of an embodiment of the present invention, in step S1, the historical load is decomposed into subsequences with different frequencies and intrinsic mode functions through Improved Complementary ensemble empirical mode decomposition (ICEEMD); secondly, Sample entropy (SE) is introduced to calculate the entropy values of the subsequences, and the subsequences with similar entropy values are reconstructed to obtain four decomposition subsequences containing important features of the historical load sequence. The original load sequence is decomposed into subsequences with different frequencies through the ICEEMD decomposition technology, reducing data noise and reducing the nonlinearity and stationarity of the electricity price sequence. By calculating the sample entropy of the decomposed different subsequences, subsequences with similar complexity are selected for sequence reconstruction, reducing the model calculation amount.
[0034] Aiming at the problems of residual noise and "false" modes generated in the process of decomposing time series, ICEEMD is an improved method proposed based on the decomposition principles of EMD and EEMD. The specific decomposition steps are as follows:
[0035] (1) Let x be the original signal, and the local mean is calculated using EMD:
[0036] x (i) = x + β0H1(w (i) )
[0037] where β0 = ε0std(x) / std(H1(w (i) ))), and ε0 is the reciprocal of the required signal-to-noise ratio between the first signal and the added noise.
[0038] (2) Use EMD to iterate x (i) to calculate the first residual R1 and IMF1:
[0039] IMF1 = x - R1
[0040] R1 = <M(x) (i) >
[0041] In the formula, <·> is the average operator, and M(·) is the operator for calculating the local average of the analytical signal.
[0042] (3) By calculating the local mean of R1 + β1H2(w (i) ), R2 and IMF2 are:
[0043] IMF2 = R1 - R2
[0044] R2 = <M(R1 + β1H2(w (i) ))>
[0045] (4) When \(n = 3, 4, \ldots, m\), calculate the \(n\)th residual as follows:
[0046] r n = <M(r n-1 +β n-1 H n (w (i) ))>
[0047] After the above residuals are calculated, the \(n\)th IMF n component is:
[0048] IMF n = R n-1 -R n
[0049] ICEEMD is used to decompose time series data, adaptively decomposing a complex signal into multiple IMF components from high frequency to low frequency, extracting effective information, and thus improving the prediction effect.
[0050] Sample entropy measures the probability of a system generating new patterns. Starting from the complexity of the time series, the larger the sample entropy value, the more complex the time series and the greater the probability of the system generating new patterns; conversely, the simpler the time series, the smaller the probability. For a given time series \(\{x(n)\}=\{x(1),x(2),\ldots,x(N)\}\) of length \(N\), the calculation steps of sample entropy are as follows:
[0051] (1) Form a vector sequence of dimension \(m\) according to the serial numbers, \(X m (1), X m (2), \ldots, X m (N - m + 1), where \(X m (i)=x m (i),x m (i + 1),\ldots,x m (i + m - 1), (1\leq i\leq N - m + 1).
[0052] (2) Define the distance \(D m between vector \(X m (i)\) and vector \(X ij (j)\) as the absolute value of the maximum difference among their corresponding elements. That is:
[0053]
[0054] Given a threshold \(r\), count the number of \(D ij less than \(r\), denoted as \(B i . That is:
[0055]
[0056] For all calculate its average value, denoted as That is:
[0057]
[0058] Increase the dimension to m + 1 to obtain
[0059] (3) The sample entropy is defined as:
[0060]
[0061] When N is a finite value, the estimated value of Samp En is:
[0062]
[0063] It can be seen from this that Samp En is related to m and r, but the changing trend of the entropy value is not affected by m and r.
[0064] As an implementation manner of the embodiment of the present invention, in step S2, a random forest is used to identify and quantify the key influencing factors of the subsequence after ICEEMD-SE reconstruction, so as to achieve data dimensionality reduction.
[0065] As an implementation manner of the embodiment of the present invention, in step S3, a Transformer integrated deep learning model is selected to model and predict the sequence after ICEEMD-SE reconstruction respectively, so as to achieve short-term electric load forecasting. The Transformer model comprehensively considers historical information and future information, can improve the calculation efficiency of the model, reduce the risk of overfitting, can dynamically allocate weights to different time steps when processing input data, can more effectively capture complex time dependencies, and enhance the robustness of the prediction model. The prediction results of the reconstructed subsequence are de-normalized, and the electric load forecasting results based on the Transformer model are integrated.
[0066] The Transformer model is an efficient sequence modeling method, which uses the self-attention mechanism (Self-Attention) to process the long-term dependencies in time series data. Compared with the traditional BiLSTM model, the Transformer model can improve the training efficiency through parallel computing, and at the same time uses the self-attention mechanism to dynamically focus on the important parts in the sequence, thereby enhancing the modeling ability for complex time-dependent relationships. In electric load forecasting, the Transformer can effectively capture the non-linear patterns in the load sequence, thereby improving the forecasting accuracy.
[0067] In the Transformer, the self-attention mechanism is its key part. For the input sequence X = [x1, x2,..., xn , each element x i will generate three vectors through mapping: the query vector Q, the key vector K, and the value vector V. Their calculation formulas are as follows:
[0068] Q i = XW q , K i = XW k , V i = XW v
[0069] where W q , W k , W v are weight matrices obtained through training. Q i , K i and V i represent the vectors of query, key, and value respectively.
[0070] Next, the Transformer determines the attention weights at each time step by calculating the dot product of the query vector and the key vector. The specific formula is:
[0071]
[0072] where d k is the dimension of the key vector, and the softmax operation is used to normalize these weights so that their sum is 1.
[0073] Through the above self-attention mechanism, the output at each time step is calculated by weighted sum, specifically:
[0074]
[0075] This output reflects the dependencies between each time step in the input sequence and finally extracts the features in the sequence through multiple layers of self-attention and feed-forward neural networks. In the embodiment of the present invention, the Transformer model predicts the subsequences reconstructed by ICEEMD-SE, thereby realizing efficient prediction of short-term power load.
[0076] As an implementation of the embodiment of the present invention, in step S4, CatBoost is used to learn and fit the residuals of the Transformer model, compensate for complex patterns or noises that the Transformer model fails to capture, and further optimize the residuals. This combination enables the power load prediction results to include both the capture of time dependence by the Transformer and the compensation of complex non-linear patterns by CatBoost. By combining the advantages of time series features and complex non-linear relationships, the overall prediction performance of the model is improved. Finally, the sum of the fitting results based on CatBoost and the prediction results of the Transformer model is obtained to get the final power load prediction result. Multiple error metrics of different models are calculated and compared to test and verify the effectiveness and superiority of the model constructed in this paper.
[0077] CatBoost is an implementation of Gradient Boosting Decision Trees (GBDT), which is specifically optimized for handling categorical features. Compared with other boosting algorithms, CatBoost updates the model by fitting the residuals in each iteration. Its advantage lies in automatically handling categorical variables, avoiding the cumbersome process of manual encoding. In short-term power load prediction, CatBoost is used to fit the residuals of the Transformer model prediction results to further improve the accuracy of the model.
[0078] The update process of CatBoost is based on the strategy of gradually optimizing the residuals. In each round of iteration, the initial prediction is set as F0, and the predicted value F is updated according to the residual function h m (X), and the update formula is as follows: m
[0079] F m = F m-1 + η·h m (X)
[0080] Where F m-1 is the prediction result of the previous round, h m (X) is the residual fitted in the m-th round, and η is the learning rate, which controls the amplitude of each update.
[0081] In each round of iteration, the residual r m is calculated as:
[0082] r m = y - F m-1 (X)
[0083] Where y is the actual target value and F m-1 (X) is the model predicted value. By iteratively fitting the residuals, CatBoost can effectively reduce the error of the model.
[0084] The optimization objective of CatBoost is to minimize the loss function, usually the mean squared error (MSE), and its calculation formula is:
[0085]
[0086] where y i is the target value, and F(X i ) is the predicted value of the model. In each iteration, CatBoost minimizes this loss function through the gradient descent method, updates the model parameters, and thus improves the prediction accuracy.
[0087] In the embodiments of the present invention, ICEEMD is first used to decompose the power load sequence to achieve the effect of data denoising, and then the difference between sample entropy values is used for subsequence reconstruction. Finally, the RF method is used to identify the key influencing factors of the reconstructed subsequences respectively, improve the data quality, reduce data redundancy, and reduce the model calculation amount. In the prediction stage, the self-attention mechanism in the Transformer model is used to dynamically adjust the influencing factor weights, capture the complex time dependence of the power load sequence, and enhance the ability of the Transformer model. In the error correction and evaluation stage, CatBoost is used to learn and fit the prediction residuals of the Transformer model to further compensate for the complex patterns or noises missed by the prediction model and make up for the deficiencies of the Transformer model in dealing with complex nonlinear relationships.
[0088] The present invention has the following technical effects:
[0089] (1) Based on the combined data decomposition and reconstruction of ICEEMD-SE, ICEEMD can be used to decompose the power load sequence into subsequences with different frequencies from high frequency to low frequency, and then the sample entropy is used to calculate the complexity of each subsequence and reconstruct it, reducing the calculation amount of the prediction model while achieving data denoising.
[0090] (2) The random forest algorithm is used to measure the influence of different load influencing factors on each reconstructed subsequence respectively, identify the key influencing factors and use them as the prediction input factors of the subsequence, realize data dimensionality reduction, and ensure the quality of the model input data.
[0091] (3) A deep learning prediction model based on Transformer is constructed, and each reconstructed subsequence is modeled separately. The Transformer integrated prediction model can dynamically allocate weights, more accurately capture the long-term dependence relationship in the load sequence, and achieve better prediction results.
[0092] (4) Calculate the error between the predicted value and the true value of the power load prediction result of the Transformer integrated deep learning model. Use the CatBoost model to fit the residuals predicted by the Transformer model to compensate for the complex patterns or noises that the Transformer model fails to capture, and further improve the prediction accuracy.
[0093] Embodiment 2:
[0094] The embodiment of the present invention also provides a short-term power load prediction device, including:
[0095] The first calculation module is used to obtain the subsequences of the important features of the historical load sequence according to the historical load;
[0096] The second calculation module is used to measure the importance of different influencing factors on the 4 subsequences respectively;
[0097] The third calculation module is used to predict different subsequences;
[0098] The fourth calculation module is used to fit the residuals of each component by combining CatBoost.
[0099] As an implementation manner of the embodiment of the present invention, the first calculation module decomposes the historical load into subsequences with different frequencies and intrinsic mode functions through improved complementary ensemble empirical mode decomposition; introduces sample entropy to calculate the entropy values of the subsequences, and reconstructs the subsequences with similar entropy values to obtain 4 subsequences of the important features of the historical load sequence; among them, the subsequences include: random, detail, low-frequency, and trend components.
[0100] As an implementation manner of the embodiment of the present invention, the second calculation module uses random forest to measure the importance of different influencing factors on the 4 subsequences respectively.
[0101] As an implementation manner of the embodiment of the present invention, the third calculation module predicts different subsequences through the Transformer model, and introduces an attention mechanism to dynamically allocate the weights of the influencing factors.
[0102] The above-described embodiments are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A short-term electric load forecasting method, characterized in that, Including: Step S1: Obtain the decomposed subsequences containing the important features of the historical load sequence according to the historical load; Step S2: Measure the importance degrees of different influencing factors on the four subsequences respectively; Step S3: Predict different subsequences; Step S4: Fit the residuals of each component by combining CatBoost.
2. The short-term electric load forecasting method according to claim 1, wherein In Step S1, the historical load is decomposed into subsequences with different frequencies and intrinsic mode functions through improved complementary ensemble empirical mode decomposition; the sample entropy is introduced to calculate the entropy values of the subsequences, and the subsequences with similar entropy values are reconstructed to obtain four decomposed subsequences containing the important features of the historical load sequence; among them, the subsequences include: random, detail, low-frequency, and trend components.
3. The short-term electric load forecasting method according to claim 2, wherein In Step S2, the random forest is used to measure the importance degrees of different influencing factors on the four subsequences respectively.
4. The short-term electric load forecasting method according to claim 3, wherein In Step S3, the Transformer model predicts different subsequences, and the attention mechanism is introduced to dynamically allocate the weights of the influencing factors.
5. A short-term electric load forecasting device, characterized in that, Including: The first calculation module is used to obtain the decomposed subsequences containing the important features of the historical load sequence according to the historical load; The second calculation module is used to measure the importance degrees of different influencing factors on the four subsequences respectively; The third calculation module is used to predict different subsequences; The fourth calculation module is used to fit the residuals of each component by combining CatBoost.
6. The short-term electric load forecasting device according to claim 5, characterized in that The first calculation module decomposes the historical load into subsequences with different frequencies and intrinsic mode functions through improved complementary ensemble empirical mode decomposition; the sample entropy is introduced to calculate the entropy values of the subsequences, and the subsequences with similar entropy values are reconstructed to obtain four decomposed subsequences containing the important features of the historical load sequence; among them, the subsequences include: random, detail, low-frequency, and trend components.
7. The short-term electric load forecasting device according to claim 6, characterized in that, The second calculation module uses the random forest to measure the importance degrees of different influencing factors on the four subsequences respectively.
8. The short-term electric load forecasting device according to claim 7, wherein, The third calculation module predicts different subsequences through the Transformer model, and the attention mechanism is introduced to dynamically allocate the weights of the influencing factors.
Citation Information
Patent Citations
User load probability density prediction method and device based on EMD-QRF and storage medium
CN109726865A
Load prediction method based on complementary set empirical mode decomposition algorithm fused with social factors
CN115271144A
Power load prediction method based on modal decomposition and reconstruction and LSTM-MLR hybrid model
CN116362398A
Deep learning-based short-term power load prediction method
CN117743829A
Short-term power load prediction method, system, equipment and medium
CN118352991A