Ultra-short-term power load prediction method and device

By combining the CEEMDAN and TSFormer neural network methods, the problem of insufficient time-dependent capture in ultra-short-term power load prediction is solved, and higher prediction accuracy and adaptability are achieved, which is suitable for real-time operation and management of the power grid.

CN119010006AActive Publication Date: 2024-11-22SHANDONG ELECTRIC GRP DIGITAL TECH CO LTD +1

Patent Information

Application Number
CN202411166922.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-22
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

The prior art is difficult to accurately capture the short-term and long-term time dependence of data in ultra-short-term power load prediction, resulting in insufficient prediction accuracy and adaptability, especially in extreme weather or emergencies.

Method used

Using a method based on complete integrated empirical model decomposition (CEEMDAN) and TSFormer neural network, the power load data is decomposed and reconstructed, the spatiotemporal features are extracted, and the long-term dependencies in the time series data are captured through the self-attention mechanism to construct short-term loads. Predictive model.

Benefits of technology

It improves the accuracy, adaptability and real-time prediction, can more accurately reflect the load change trend, and enhances the response speed and economic operation efficiency of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119010006A_ABST
    Figure CN119010006A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power load prediction, in particular to an ultra-short-term power load prediction method. The method comprises three parts: decomposing a time sequence, reconstructing the decomposed sequence based on sample entropy, and predicting the reconstructed sequence by using a neural network. The CEEMDAN is adopted to decompose the time sequence, the CEEMDAN can adapt to the local features of data, an internal oscillation mode is automatically extracted from a complex signal, IMFs obtained through decomposition can be directly used for feature engineering, and establishment of a more accurate prediction model is supported. An ultra-short-term load prediction model adopts a TSFormer neural network, and a TSFormer architecture can effectively capture a long-term dependency relationship in time sequence data through a self-attention mechanism, which is particularly critical for accurately predicting a power load. Compared with the traditional RNN and LSTM, the Transformer can process all time steps in parallel, and the training efficiency and the prediction performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system load forecasting, and in particular to an ultra-short-term power load forecasting method based on complete ensemble empirical mode decomposition (CEEMDAN) and TSFormer neural network. Background Art

[0002] Power load forecasting is the basis of grid operation management, dispatching and planning. With the adjustment of industrial structure and the implementation of sustainable development policies, load forecasting for large industrial users has become a key focus of power supply companies. In the management and optimization of park power systems, accurate forecasting of power load is crucial to ensure power supply stability, optimize power resource allocation and reduce energy costs. Especially with the increasing liberalization of power markets and the increasing complexity of power grids, ultra-short-term forecasting of power load (usually forecasting within index hours or one day) has become particularly critical. Effective ultra-short-term load forecasting can help power companies dynamically adjust power generation and power purchase strategies, improve the response speed and economic operation efficiency of power grids. Time series analysis (such as ARIMA models): These models are widely used in load forecasting and rely on historical data to predict future loads. However, they are mainly applicable to linear patterns of data and have limited effect on nonlinear and non-stationary data processing. However, they cannot effectively respond to sudden changes and non-periodic fluctuations in power load data, especially in extreme weather or emergencies, and the prediction accuracy is greatly reduced. About support vector machines (SVMs), decision trees and random forests: These methods can handle nonlinear problems, but usually require a lot of data preprocessing and feature selection, and the model training and parameter adjustment process is complex and time-consuming. The disadvantage is that they require a large amount of labeled data and have poor adaptability to unknown patterns. In ultra-short-term prediction scenarios, these models are often not applicable due to their slow response time.

[0003] In recent years, with the rise of deep learning, many algorithms related to deep learning have greatly promoted the improvement of the accuracy of short-term power load forecasting. Although traditional neural networks and deep learning networks can learn complex patterns in data, these networks do not adequately capture the intrinsic time dependency of time series data. However, when processing time series data, it is difficult to balance long-term memory and short-term input, which may lead to the neglect of important historical information or the inability to effectively respond to recent data changes in practical applications. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide an ultra-short-term power load forecasting method based on CEEMDAN and TSFormer neural networks, which captures the short-term and long-term time dependencies of ultra-short-term data so that the forecast results accurately reflect the load change trend, thereby improving the accuracy, adaptability and real-time performance of the forecast.

[0005] In order to solve the technical problem, the technical solution adopted by the present invention is: an ultra-short-term power load forecasting method, comprising the following steps: S01) Decompose the original load sequence using the synchronous extension of the fully integrated empirical mode decomposition, decompose multiple IMF component sequences from the nonlinear and non-stationary power data, and extract the spatiotemporal characteristics synchronously; S02), based on the sample entropy reconstruction step S01), the IMF component sequence decomposed is obtained to obtain two new sequences, namely the fluctuation sequence F1 and the trend sequence F2; S03), the fluctuation sequence F1 and the trend sequence F2 are input into the short-term load forecasting model composed of the TSFormer network. The TSFormer network includes an input layer, an encoder layer and an output layer. The input layer performs feature embedding and position encoding on the input sequence. Feature embedding is to convert the input sequence into an embedding vector in a high-dimensional space. Position encoding is to add position encoding to the embedding vector to retain time information; the encoder layer is stacked by multiple sub-encoding layers, each of which includes a self-attention layer and a feedforward network. The self-attention layer converts the embedded vector after position encoding through different query, key and value matrices, and then performs scaled dot product attention calculation to obtain the final attention output. Each self-attention layer is followed by a feedforward network, and the feedforward network independently applies the same fully connected layer to the output of each position for linear transformation and activation; the output layer is located after the encoder layer, and performs the final prediction through one or more fully connected layers to predict the power load values ​​at the next few time points or a certain moment.

[0006] Furthermore, the self-attention layer adopts a multi-head self-attention mechanism, that is, the position-encoded embedding vector is transformed in parallel on multiple sets of different query, key, and value matrices, and the output results are concatenated and linearly transformed again to obtain the final attention output.

[0007] Furthermore, feature embedding is implemented through a fully connected layer, which maps the features of each time point to a vector of fixed size.

[0008] Furthermore, the position encoding is learned via a static cosine function.

[0009] Furthermore, the output of each sub-coding layer is added to the input of the layer and then normalized and residually connected.

[0010] Furthermore, the feedforward network uses two layers of linear transformation with a ReLU activation function in the middle.

[0011] Furthermore, step S01) is specifically as follows: S11), add Gaussian noise, add a limited number of adaptive Gaussian white noises to the original load sequence, and the expression formula is: (1); in represents the original load sequence, represents the sequence obtained by adding Gaussian white noise to the original load sequence for the i-th time, represents the noise factor, represents the Gaussian white noise added for the i-th time; S12), find the first IMF component, use the average value of the first IMF component to Perform EMD decomposition as shown in formula (2): (2), in is the first IMF obtained after the original load sequence is decomposed after adding Gaussian white noise for the i-th time, M is the number of Gaussian white noise decompositions, and then the original load sequence is used Subtract IMF1 to get the first residual sequence, as shown in formula (3): (3); in is the obtained residual sequence; S13) Find the second IMF, Perform EMD decomposition to obtain the second IMF component, as shown in formula (4): (4), in , They represent the j-th EMD decomposition of the corresponding signal and the extraction of the j-th IMF components. Represents the weight coefficient after adding Gaussian white noise; S14) Find the final sequence of residuals and repeat formula (5) to obtain the remaining IMF components. (5); Where k is the total number of IMF components, , represents the kth and k-1th residual sequences, is the kth IMF component, represents the weight coefficient associated with the k-th operation, , Respectively represent the EMD decomposition of the corresponding signals; The final residual sequence is (6), Where res is the final residual sequence.

[0012] Furthermore, the input of the short-term load forecasting model also includes weather data and date type.

[0013] Furthermore, the decomposition result of step S01) includes multiple IMF component sequences and a residual, and each IMF component sequence corresponds to a specific frequency component in the original load signal.

[0014] An ultra-short-term power load forecasting device comprises a processor and a memory storing program instructions, wherein the processor is configured to execute the ultra-short-term power load forecasting method based on SEEMDAN and TSFormer neural network as described above when running the program instructions.

[0015] Beneficial effects of the present invention: 1. CEEMDAN can adapt to the local characteristics of the data and automatically extract the intrinsic oscillation modes (called intrinsic mode functions, IMFs) from complex signals, which is crucial for nonlinear and non-stationary data analysis.

[0016] 2. The decomposed IMFs can be directly used for feature engineering, supporting the establishment of more accurate forecasting models. In power load forecasting, different IMFs can correspond to different load fluctuation patterns, which helps to build forecasting models that reflect these patterns.

[0017] 3. The TSFormer architecture can effectively capture long-term dependencies in time series data through the self-attention mechanism, which is particularly critical for accurately predicting power load. Compared with traditional RNN and LSTM, Transformer can process all time steps in parallel, improving training efficiency and prediction performance.

[0018] 4. Due to the design of its self-attention layer, the TSFormer model can achieve high parallelism when processing sequence data, significantly reducing the required computing time, which is especially important for real-time or near real-time load forecasting systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a flow chart of the method described in Example 1. DETAILED DESCRIPTION

[0020] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0021] Example 1 This embodiment discloses an ultra-short-term load forecasting method based on CEEMDAN and TSFormer, which is specially designed to process and forecast complex power load data, especially ultra-short-term power load forecasting. Ultra-short-term power load forecasting needs to consider the time series characteristics of the data, including short-term and long-term time dependencies. Many machine learning models fail to effectively capture this dependency when processing time series data, resulting in the prediction results not accurately reflecting the load change trend. Although the existing technology has made certain progress in the field of power load forecasting, there are still problems with insufficient prediction accuracy and reliability, especially when predicting load peaks or troughs in the short term, which is the main technical problem that needs to be solved.

[0022] This embodiment proposes a power load forecasting model based on the combination of time series decomposition and sample entropy sequence RNN prediction, which mainly includes three parts: time series decomposition, reconstruction of the decomposed sequence based on sample entropy, and prediction of the reconstructed sequence using a neural network. Figure 1 As shown, the method comprises the following steps: S01), time series decomposition, using the complete integrated empirical mode decomposition synchronous extension (CEEMDAN) to decompose the original load series. This method can effectively decompose multiple IMF component sequences from nonlinear and non-stationary power data, and simultaneously extract spatiotemporal features, thereby improving the quality and structure of the data, laying the foundation for the next step of feature extraction and load forecasting. The extracted IMF component sequence reveals the different frequency components and trends of the data, which helps to better understand and predict the changes in power load. The decomposition results include several IMFs and a residual, each IMF corresponding to a specific frequency component in the original signal.

[0023] S02), reconstruct the IMF component sequence based on sample entropy. Sample entropy is a method used to measure the complexity of non-stationary time series. The advantages of other methods are that it does not depend on the length of data and has good consistency. The value of sample entropy is positively correlated with the degree of self-similarity of the sequence. In the second stage, we used four different sets of parameters to reconstruct the decomposition sequence based on sample entropy, and found that different parameters had little effect on the changing trend of the sample entropy value results. Based on the sample entropy value, we reconstructed the previous IMF component sequence and obtained two new sequences, namely the fluctuation sequence F1 and the trend sequence F2.

[0024] S03) Build a short-term load forecasting model based on TSFormer network, input the fluctuation sequence F1 and trend sequence F2 into the short-term load forecasting model, and perform ultra-short-term power load forecasting.

[0025] The core of TSFormer design is to use the self-attention mechanism of Transformer to capture long-distance dependencies in time series data. Compared with traditional RNN and LSTM, Transformer can process sequence data in parallel and learn complex patterns in sequences more effectively, which is particularly important for predicting short-term and ultra-short-term loads of power systems.

[0026] In this embodiment, step S01) is specifically: S11), add Gaussian noise, add a limited number of adaptive Gaussian white noises to the original load sequence, and the expression formula is: (1); in represents the original load sequence, represents the sequence obtained by adding Gaussian white noise to the original load sequence for the i-th time, represents the noise factor, represents the Gaussian white noise added for the i-th time; S12), find the first IMF component, use the average value of the first IMF component to Perform EMD decomposition as shown in formula (2): (2), in is the first IMF obtained after the original load sequence is decomposed after adding Gaussian white noise for the i-th time, M is the number of Gaussian white noise decompositions, and then the original load sequence is used Subtract IMF1 to get the first residual sequence, as shown in formula (3): (3); in is the obtained residual sequence; S13) Find the second IMF, Perform EMD decomposition to obtain the second IMF component, as shown in formula (4): (4), in , They represent the j-th EMD decomposition of the corresponding signal and the extraction of the j-th IMF components. Represents the weight coefficient after adding Gaussian white noise; S14) Find the final sequence of residuals and repeat formula (5) to obtain the remaining IMF components. (5); Where k is the total number of IMF components, , represents the kth and k-1th residual sequences, is the kth IMF component, represents the weight coefficient associated with the k-th operation, , Respectively represent the EMD decomposition of the corresponding signals; The final residual sequence is (6), Where res is the final residual sequence.

[0027] In the above description, , Both represent EMD decomposition of the corresponding signals, but the operation objects are different. Indicates an operation on a specific object or expression, emphasizing the process of applying the operation. It indicates an operation on a set or with specific conditions, emphasizing the integrity or scope of the operation. The superscript j is the number of operations. The specific number j is a step in a cycle or iteration process, representing the current jth EMD processing.

[0028] In this embodiment, step S02) is specifically as follows: S21), sample entropy sequence formation, the sequence is formed into multiple vectors X with a dimension of m m (1), X m (2),…,X m (N–m+1), (7); in represents the i-th IMF component obtained by decomposition, and N represents the number of samples in the time series; S22), vector distance calculation, the distance between vectors Xm(i) and Xm(j) can be calculated as follows: (8); S23) Calculation of Bi: For any Xm(i), we calculate the distance between Xm(i) and Xm(j) less than or equal to r. The number of is denoted as Bi, and Bi is defined as follows: (9), Then the calculation formula of Bi is: (10), Where r represents the similarity threshold, which is used to determine whether two sequences are similar. When the embedding dimension is m, the number of similar sequences of subsequence x(i) is represents the average similarity of sequences with embedding dimension m in the entire time series; S24) Calculation of Si: After increasing the dimension to m+1, the number of distances between Xm(i) and Xm(j) that are less than or equal to r is represented as Si, which is defined as follows: (11), Then the calculation formula of Si is: (12), in represents the number of similar sequences of subsequence x(i) when the embedding dimension is m, Represents the average similarity of the entire time series when the embedding dimension is m; S25), sample entropy value calculation, calculate the value of sample entropy, as follows: (13), When N is finite, SampEn is estimated as follows: (14).

[0029] The short-term load forecasting model based on the TSFormer network described in this embodiment includes an input layer, an encoder layer and an output layer. The input layer receives the sequence reconstructed by sample entropy. When inputting, the time series data first needs to be converted into a format suitable for neural network processing. Usually this includes embedding the numerical features of the time series and adding position encoding to maintain time information.

[0030] Feature embedding is the process of converting time series data into an embedded vector in a high-dimensional space. This is usually achieved through a fully connected layer that maps the features of each time point to a vector of fixed size.

[0031] Since the Transformer structure itself does not have the ability to capture position information in the sequence, it is necessary to add position encoding to the embedding vector to provide time order information. The position encoding is learned through a static cosine function.

[0032] The encoder layer is composed of multiple stacked sub-encoder layers, each of which includes a self-attention layer and a feed-forward network.

[0033] The self-attention layer allows the model to consider information at different positions in the sequence when making predictions, enhancing the model's ability to handle long-distance dependencies. The specific operation is to transform the embedding vector (position-encoded) through different query (Q), key (K), and value (V) matrices, and then perform scaled dot product attention calculations. The self-attention layer uses a multi-head attention mechanism, that is, the position-encoded embedding vector is transformed in parallel on multiple sets of different query, key, and value matrices, and the output results are concatenated and linearly transformed again to obtain the final attention output.

[0034] Each self-attention layer is connected to a feed-forward network, which applies the same fully connected layer to the output of each position independently. The common structure is two layers of linear transformation with a ReLU activation function in the middle.

[0035] The output of each sub-coding layer is added to the input of this layer and then passed through layer normalization and residual connection, which helps to avoid the gradient vanishing problem that occurs in deep networks.

[0036] After passing through a series of encoder layers, the output of the short-term load forecasting model usually passes through one or more fully connected layers to make the final prediction, predicting the power load value at the next few time points. For power load forecasting, the output layer directly predicts the load at a certain moment in the future.

[0037] In this embodiment, the short-term load forecasting model needs to be trained first, and the training process is: S41): Data division: Before training, the dataset needs to be divided into training set, validation set and test set. The training set is used for model learning, the validation set is used to adjust hyperparameters and prevent model overfitting, and the test set is used to finally evaluate the performance of the model.

[0038] S42): Batch processing and data loading: Data is usually processed in small batches. Using the right batch size can balance training speed and memory usage. Small batches of data can also help model learning be more stable. Use data loaders (PyTorch's DataLoader) to automatically handle batching, shuffling, and parallel loading of data.

[0039] S42): Loss calculation: The loss is calculated based on the predicted results and the true labels. The loss function is the mean square error (MSE).

[0040] S43): Parameter optimization: The optimization algorithm Adam is used to update the model parameters according to the gradient. The optimizer usually includes momentum and adaptive learning rate techniques to accelerate the training process and improve the convergence speed of the model.

[0041] S5: Verify the accuracy of the prediction model Verifying the accuracy of a forecasting model is a critical step to ensure that the model can work reliably in real-world applications. The following are several commonly used methods and metrics to evaluate and verify the accuracy of a time series forecasting model.

[0042] S51): Performance evaluation indicators: Mean Squared Error (MSE): Measures the average of the squares of the differences between the predicted values ​​and the actual values. Root Mean Squared Error (RMSE): The square root of the MSE, providing the error size in the same units as the original data. Mean Absolute Error (MAE): This is another measure of forecast accuracy, which represents the average of the absolute values ​​of the differences between the predicted values ​​and the actual values. Mean Absolute Percentage Error (MAPE): This is a commonly used proportional indicator used to measure the degree to which the predicted values ​​deviate from the actual values.

[0043] S52): Cross Validation: Time Series Cross-Validation: For time series data, cross-validation needs to be handled appropriately to preserve the temporal order. This typically involves a rolling or rolling window approach, where the model is trained on a fixed-size time window and the window is incrementally moved forward.

[0044] S53): Residual analysis: Examination of residuals: Analyzing the prediction residuals (i.e., the difference between the predicted and actual values) can reveal whether there are systematic biases or patterns in the model. Ideally, the residuals should appear randomly distributed, with no obvious patterns or trends.

[0045] After ensuring that the model performance meets the requirements, deploy it to the production environment to predict power load in real time. Continue to monitor the actual performance of the model and make fine-tuning as needed.

[0046] In this embodiment, the input of the ultra-short-term load forecasting model includes, in addition to the original load sequence, power usage, time information (such as date and time), environmental factors (such as temperature, humidity), etc.

[0047] This embodiment combines the efficient data decomposition capability of CEEMDAN and the powerful time series modeling capability of TSFormer to provide a highly accurate and reliable power load forecasting system for the park. This not only enhances the operational efficiency of the power grid, but also provides valuable decision support for the park to participate in power market transactions.

[0048] The above description is only the basic principle and preferred embodiments of the present invention. Improvements and substitutions made by those skilled in the art based on the present invention belong to the protection scope of the present invention.

Claims

1. A method for ultra-short-term power load forecasting, characterized in that: The following steps are involved: S01) Decompose the original load sequence using the fully integrated empirical mode decomposition synchronous extension, decompose multiple IMF component sequences from the nonlinear and non-stationary power data, and extract the spatiotemporal characteristics synchronously; S02), based on the sample entropy reconstruction step S01), the IMF component sequence decomposed is obtained to obtain two new sequences, namely the fluctuation sequence F1 and the trend sequence F2; S03), the fluctuation sequence F1 and the trend sequence F2 are input into the short-term load forecasting model composed of the TSFormer network. The TSFormer network includes an input layer, an encoder layer and an output layer. The input layer performs feature embedding and position encoding on the input sequence. Feature embedding is to convert the input sequence into an embedding vector in a high-dimensional space. Position encoding is to add position encoding to the embedding vector to retain time information; the encoder layer is stacked by multiple sub-encoding layers, each of which includes a self-attention layer and a feedforward network. The self-attention layer converts the embedded vector after position encoding through different query, key and value matrices, and then performs scaled dot product attention calculation to obtain the final attention output. Each self-attention layer is followed by a feedforward network, and the feedforward network independently applies the same fully connected layer to the output of each position for linear transformation and activation; the output layer is located after the encoder layer, and performs the final prediction through one or more fully connected layers to predict the power load values ​​at the next few time points or a certain moment.

2. The ultra-short-term power load forecasting method according to claim 1, characterized in that: The self-attention layer adopts a multi-head self-attention mechanism, that is, the position-encoded embedding vector is transformed in parallel on multiple sets of different query, key, and value matrices, and the output results are concatenated and linearly transformed again to obtain the final attention output.

3. The ultra-short-term power load forecasting method according to claim 1, characterized in that: Feature embedding is achieved through a fully connected layer, which maps the features of each time point to a vector of fixed size.

4. The ultra-short-term power load forecasting method according to claim 1, characterized in that: The position encoding is learned via a static cosine function.

5. The ultra-short-term power load forecasting method according to claim 1, characterized in that: The output of each sub-coding layer is added to the input of the layer and then normalized and connected by residuals.

6. The ultra-short-term power load forecasting method according to claim 1, characterized in that: The feedforward network uses two layers of linear transformation with a ReLU activation function in the middle.

7. The ultra-short-term power load forecasting method according to claim 1, characterized in that: Step S01) is specifically: S11), add Gaussian noise, add a limited number of adaptive Gaussian white noises to the original load sequence, and the expression formula is: (1); in represents the original load sequence, represents the sequence obtained by adding Gaussian white noise to the original load sequence for the i-th time, represents the noise factor, represents the Gaussian white noise added for the i-th time; S12), find the first IMF component, use the average value of the first IMF component to Perform EMD decomposition as shown in formula (2): (2), in is the first IMF obtained after the original load sequence is decomposed after adding Gaussian white noise for the i-th time, M is the number of Gaussian white noise decompositions, and then the original load sequence is used Subtract IMF1 to get the first residual sequence, as shown in formula (3): (3); in is the obtained residual sequence; S13) Find the second IMF, Perform EMD decomposition to obtain the second IMF component, as shown in formula (4): (4), in , They represent the j-th EMD decomposition of the corresponding signal and the extraction of the j-th IMF components. Represents the weight coefficient after adding Gaussian white noise; S14) Find the final sequence of residuals and repeat formula (5) to obtain the remaining IMF components. (5); Where k is the total number of IMF components, , represents the kth and k-1th residual sequences, is the kth IMF component, represents the weight coefficient associated with the k-th operation, , Respectively represent the EMD decomposition of the corresponding signals; The final residual sequence is (6), Where res is the final residual sequence.

8. The ultra-short-term power load forecasting method according to claim 1, characterized in that: The input of the short-term load forecasting model also includes weather data and date type.

9. The ultra-short-term power load forecasting method according to claim 1, characterized in that: The decomposition result of step S01) includes multiple IMF component sequences and a residual, and each IMF component sequence corresponds to a specific frequency component in the original load signal.

10. An ultra-short-term power load forecasting device, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the short-term power load forecasting method according to any one of claims 1 to 9 when running the program instructions.

Citation Information

Patent Citations

  • Power load prediction method based on empirical mode decomposition and long-short-term memory network

    CN112488415A

  • GRU-NN power load level prediction method based on EMD-SVR-MLR and attention mechanism

    CN112766078A

  • Power plant generating capacity prediction method based on hybrid prediction framework

    CN118157129A

Cited By

  • Thermal load prediction method based on iTransform

    CN120181326A

  • An iTransformer-based thermal load prediction method

    CN120181326B