Method for forecasting regional electricity load in the future considering multi-source distributed new energy storage
By constructing a power load forecasting model with multi-layer encoders and decoders, combined with adaptive frequency domain filtering and frequency adaptive decomposition, the problem of power load forecasting in the development of new energy in Liaoning Province was solved, and efficient and accurate power load forecasting was achieved, supporting the stable operation of the power system and the rational planning of new energy.
Patent Information
- Application Number
- CN202411835370.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-13
AI Technical Summary
How to ensure the stability of the power system during the development of new energy in Liaoning Province, especially how to scientifically predict future electricity load to guide the scale and layout of new energy installations and ensure the efficient absorption of new energy in the power system.
A power load forecasting model with multi-layer encoders and decoders is constructed, which combines adaptive frequency domain filtering module, frequency adaptive decomposition module and adaptive frequency domain normalized attention module. The global and local dependencies of time series are captured through adaptive frequency filtering and frequency adaptive decomposition, and the model parameters are optimized to improve the prediction accuracy.
It improves the accuracy and computational efficiency of electricity load forecasting, can effectively capture long-term and short-term trends and cyclical changes, enhances the model's adaptability and generalization capabilities to diverse load data, and supports intelligent scheduling and energy planning of power systems.
Smart Images

Figure CN119784174B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to electricity load forecasting technology, in particular to a method for regional electricity load long-term forecasting taking into account multi-source distributed new energy storage. Background Art
[0002] In the context of global efforts to address climate change and promote energy transformation, countries have elevated the development and utilization of renewable energy to a strategic level in their energy policies. The gradual depletion of fossil fuels and the resulting increasingly severe environmental burden have made optimizing the energy mix a key issue for global sustainable development. Clean energy sources such as wind and solar, due to their inexhaustible supply, are gradually replacing traditional fossil fuels and becoming a significant force in adjusting the global energy mix. This energy transformation not only directly contributes to the effective control of carbon emissions but also provides a strong guarantee for global energy security by improving energy efficiency and promoting green economic growth.
[0003] Against the backdrop of this global energy transformation, Liaoning Province, as an energy powerhouse in Northeast China, boasts a natural advantage for large-scale development of renewable energy, drawing on its abundant natural resources, particularly in wind and solar energy. Liaoning's vast land area and diverse climatic conditions provide a unique foundation for large-scale development of wind and solar energy. Simultaneously, national and local governments have intensively introduced a variety of policies, from fiscal subsidies and technological R&D support to market innovation, to encourage and promote the development and application of renewable energy. These policies have not only injected strong momentum into the development of Liaoning's new energy industry, but also laid a solid foundation for the region's strategic position in the national energy restructuring.
[0004] However, the development of renewable energy has not been without challenges. While renewable energy sources like wind and solar offer the advantages of cleanliness and sustainability, their intermittent and volatile nature presents unprecedented challenges to the scheduling and operation of power systems. Power systems must maintain a dynamic balance between real-time generation and consumption. The instability of renewable energy sources makes this balance difficult to maintain, posing significant risks to the safe operation of the power grid. Therefore, ensuring the stability of the power system while developing renewable energy has become a core issue that Liaoning Province must address in its efforts to promote renewable energy development.
[0005] To achieve this goal, accurate electricity load forecasting is crucial. The effective utilization of renewable energy, especially the rational planning of its installed capacity and layout, must be based on accurate forecasts of future electricity load. The future scale and layout of renewable energy development in Liaoning Province will be influenced not only by policies and resource conditions but also, to a large extent, by scientific forecasts of future electricity load. Such forecasts not only provide data support for power system planning and scheduling but also guide the rational layout and large-scale development of renewable energy projects, ensuring their efficient absorption and application in future power systems.
[0006] Therefore, scientifically predicting Liaoning Province's future electricity load has become a key step in ensuring the effective implementation of Liaoning's new energy development strategy. This requires developing an algorithm that can accurately predict electricity load through in-depth analysis of residents' electricity usage habits and precise grasp of future electricity consumption data. Summary of the Invention
[0007] The purpose of this invention is to provide an accurate and efficient electricity load forecasting algorithm and to construct an electricity load forecasting model based on it to provide support for the scientific planning of the future new energy installed capacity.
[0008] To achieve the above object, the present invention provides the following solutions:
[0009] A method for forecasting regional electricity load prospects taking into account multi-source distributed new energy storage includes the following steps:
[0010] Constructing an electricity load forecasting model for a power system, the electricity load forecasting model includes a feature encoding part and a feature decoding part; the feature encoding part includes a multi-layer encoder, and the feature decoding part includes a multi-layer decoder;
[0011] Get sample data The sample data It is the time series data of electricity load data;
[0012] Where H is the number of input data and W is the dimension of input data;
[0013] In the feature encoding part, the time series data is encoded into output features;
[0014] The output features of the l-th layer encoder
[0015] Where l∈{1,2,…,N} represents the lth layer of the encoder output, and N is the total number of encoder layers. Encoder(·) is defined as:
[0016]
[0017] Where, represents the i-th layer decomposition component in the l-th layer encoder, represents the output of the l-1th layer encoder, AFF(·) represents the adaptive frequency domain filtering module, and FADecomp(·) represents the frequency adaptive decomposition module;
[0018] The steps in the feature decoding part are:
[0019] Where, is the stationary component characteristic, is the seasonal component characteristic, is the trend component feature, l∈{1,2,…,M} represents the lth layer of the decoder output, M is the total number of decoder layers, and decoder(·) is defined as:
[0020]
[0021] Where, Respectively represent the stationary component features, seasonal component features, and trend component features of the i-th layer in the l-th layer decoder, represents the output features of the frequency adaptive decomposition module of the i-th layer of the l-th layer decoder, Represents the output component features and trend component features of the l-1 layer decoder, AFF att (·) represents the adaptive frequency domain normalization attention module, W l,i ,i∈{1,2,3} represents the trend feature of the i-th layer The weight matrix of
[0022] The prediction result is the output component feature of the frequency adaptive decomposition module of the feature decoding part. and trend component characteristics The sum of is defined as:
[0023]
[0024] Among them, W X for The projection matrix, Y is the output result of the power load forecasting model;
[0025] It also includes the optimization of the network model, the steps include:
[0026] To train the electricity load forecasting model, the model parameters are initialized and then optimized using the loss function.
[0027] There are two optimization goals, one is the mean square loss It is used to measure the gap between the model's predicted value and the true value, and is expressed as follows:
[0028]
[0029] Where, is the output result of the power load forecasting model, y i ∈Y H×W is the real power load data, i={1,2,...,n};
[0030] Another optimization objective is the regularization loss It is used to prevent the model from overfitting; by introducing an additional constraint term △ into the loss function of the electricity load forecasting model to control the complexity of the model, the regularization loss is recorded as:
[0031]
[0032] Among them, the constraint λ is the regularization strength, ω is the regularization coefficient matrix;
[0033] In order to optimize the stationary features Seasonal characteristics In the learning process, we will guide the loss For model optimization, it is defined as:
[0034]
[0035] Prediction with prior guidance can be considered as a multi-task optimization problem, where Ensure g θ Accurately predict stationary frequency characteristics Ensure that the feedforward neural network FF(·) accurately predicts seasonal characteristics Ensure that the power load forecasting model is optimized along the overall forecast accuracy.
[0036] In the above technical solution, the present invention has the following beneficial effects:
[0037] By incorporating the adaptive frequency filtering module (AFF) for frequency domain filtering, not only the global dependence of time series is effectively captured, but also different frequency components can be adaptively extracted from the input data. First, the input data is converted from time domain to frequency domain through Fourier transform or other frequency conversion techniques. The purpose of this step is to decompose the time series into different frequency components, each representing the changes of different time scales in the input data. In the frequency domain, different frequency components have different importance for the prediction task. Adaptive frequency feature extraction can automatically identify and enhance those frequency components that are most relevant to the prediction task by dynamically adjusting the parameters of the filter. Through adaptive filtering, the model can selectively amplify or suppress certain frequency components to ensure that the model captures more accurate key features. Adaptive frequency feature extraction not only involves simple frequency selection, but also includes weighting processing of different frequency components. By assigning different weights to each frequency component, the model can aggregate useful information in the frequency domain to form a more predictive global feature representation. This weighted fusion can ensure that the model can capture both short-term changes and long-term trends.
[0038] The present application uses an adaptive frequency filtering module (AFF) to replace the self-attention mechanism in the Transformer, which has higher computational efficiency. Since the computational complexity of the self-attention mechanism is O(n 2 ), when processing long sequences, it needs to perform pairwise calculations between each input and all other positions, which will result in high computational cost, especially for long time series data. AFF reduces the computational complexity to linear or near-linear complexity O(nlog(n)) through frequency domain operations, greatly reducing the demand for computing resources. For large-scale power load forecasting tasks, using AFF can significantly improve computational efficiency. In addition, AFF can more flexibly separate short-term fluctuations (high-frequency components) and long-term trends (low-frequency components) by performing adaptive frequency filtering in the frequency domain, thereby providing the model with more refined feature decomposition and processing capabilities. This enables AFF to capture more accurate features in time series prediction, especially when dealing with time series with complex periodicity and trend.
[0039] The frequency-adaptive decomposition module decomposes stationary, seasonal, and trend features in electricity load data. Electricity load data typically exhibits significant cyclical fluctuations (such as daytime peaks and valleys, and weekend-weekday differences) and long-term trends (such as seasonal variations and annual growth in electricity demand). It may also exhibit high-frequency fluctuations, such as those caused by unexpected events, weather fluctuations, or economic activity. The frequency-adaptive decomposition module separates stationary and non-stationary features, removing unimportant high-frequency noise during preprocessing while retaining the important cyclical fluctuations and long-term trend information. After removing stationary factors, the expert decomposition module further decomposes these components into seasonal and trend terms, more accurately capturing long-term electricity demand trends and short-term fluctuations. This allows the model to better identify potential growth trends and change patterns in future electricity load data. Furthermore, electricity load data can exhibit significant differences across regions, time periods, and seasons. The introduction of the frequency-adaptive decomposition module allows the model to dynamically decompose features in different scenarios, improving its adaptability and generalization to diverse load data.
[0040] Adaptive frequency-domain normalized attention module. For medium- and long-term electricity load forecasting tasks, short-term fluctuations and noise in time-domain data may affect the model's ability to capture global trends. By performing cross-attention calculations entirely in the frequency domain, the model focuses on the main frequency features, reducing sensitivity to time-domain noise and short-term instability. Frequency-domain-based cross-attention allows the model to operate directly on frequency components without increasing complexity, eliminating the complexity of processing local dependencies in the time domain and focusing on the long-term dependencies and global patterns of time series. In addition, frequency features often directly reflect the periodic patterns of time series, such as daily and seasonal variations. Placing attention calculations in the frequency domain can more accurately identify and amplify these periodic features, making the model more adaptable and expressive when processing data with strong periodicity and trends, such as climate data and electricity load data. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0042] Figure 1 A schematic diagram of the overall flow of the prediction method provided by the present invention;
[0043] Figure 2 This is the overall architecture diagram of the power load forecasting model provided by the present invention;
[0044] Figure 3This is a structural diagram of the adaptive frequency domain filtering module provided by the present invention;
[0045] Figure 4 This is a structural diagram of the frequency adaptive decomposition module provided by the present invention;
[0046] Figure 5 This is a structural diagram of the adaptive frequency domain normalized attention module provided by the present invention. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] Figure 1-5 The present invention provides a method for forecasting regional power load prospects taking into account multi-source distributed new energy storage in an embodiment, comprising the following steps:
[0050] Step 1: Construct an electricity load forecasting model for the power system. The electricity load forecasting model includes a feature encoding part and a feature decoding part; the feature encoding part includes multiple layers of encoders, and the feature decoding part includes multiple layers of decoders.
[0051] The power system load forecasting model FANet proposed in the present invention consists of two major parts: feature encoding (Encoder) and feature decoding (Decoder). Both parts contain multi-layer structures, namely multi-layer encoders and decoders. The encoder of each layer mainly includes an adaptive frequency filtering module and a two-layer frequency adaptive decomposition module; the decoder of each layer includes an adaptive frequency domain filtering module, a three-layer frequency adaptive decomposition module and a frequency adaptive enhanced attention module. The frequency adaptive enhanced attention module is located between the frequency adaptive decomposition module of one layer and the frequency adaptive decomposition modules of the other two layers.
[0052] Step 2: Obtain sample data Sample data It is the time series data of electricity load data.
[0053] Where H is the number of input data and W is the dimension of the input data.
[0054] Step 3: In the feature encoding part, the time series data is encoded into output features.
[0055] The output features of the l-th layer encoder
[0056] Where l∈{1,2,…,N} represents the lth layer of the encoder output, N is the total number of encoder layers, H and W are Dimension; when l = 1, is the input of the encoder of the first layer, is the input time series data, H and W are dimension.
[0057] Encoder(·) is defined as:
[0058]
[0059] Where, represents the i-th layer decomposition component in the l-th layer encoder, represents the output of the l-1th layer encoder, AFF(·) represents the adaptive frequency domain filtering module, and FADecomp(·) represents the frequency adaptive decomposition module; is the output feature of the l-th layer encoder.
[0060] The steps in the feature decoding part are:
[0061] Where, is the stationary component characteristic, is the seasonal component characteristic, is the trend component feature, l∈{1,2,…,M} represents the lth layer of the decoder output, M is the total number of decoder layers, and decoder(·) is defined as follows:
[0062]
[0063] Where, Respectively represent the stationary component features, seasonal component features, and trend component features of the i-th layer in the l-th layer decoder, represents the output features of the frequency adaptive decomposition module of the i-th layer of the l-th layer decoder, Represents the output features and trend features of the l-1 layer decoder, AFF att (·) represents the adaptive frequency domain normalization attention module, W l,i ,i∈{1,2,3} represents the trend feature of the i-th layer The weight matrix of .
[0064] The prediction result is the output component feature of the frequency adaptive decomposition module of the feature decoding part and trend component characteristics The sum of is defined as:
[0065]
[0066] Among them, WX for The projection matrix of , Y is the output result of the power load forecasting model.
[0067] Specifically, the encoder includes an adaptive frequency domain filtering module and two layers of frequency adaptive decomposition modules with the same structure.
[0068] To achieve more lightweight and efficient global information capture, this paper proposes a power load data feature extraction module that uses adaptive frequency filtering and hybrid feature fusion. This module analyzes the sequence in the frequency domain to capture features at different frequencies, enabling it to process long-term and short-term dependencies in historical load data.
[0069] The steps in the adaptive frequency domain filtering module include:
[0070] Step 1: Construct input data The input data is time series electricity load data, where H is the number of sample data and W is the dimension of the sample data.
[0071] Step 2: Perform a fast Fourier transform on the input data to convert the data from the time domain to the frequency domain, and express it as follows:
[0072]
[0073] Where, Represents the frequency domain features after Fourier transformation, h, w represent the number and dimension index of input data, u, v represent the frequency domain features X after Fourier transformation F The number and dimension index of , i = h × w;
[0074] Step 3: Use a learnable frequency domain filter The frequency domain characteristics of the dot product input are expressed as follows:
[0075]
[0076] Where, It is a learnable frequency domain filter with the same shape as the frequency domain feature; It consists of a linear layer with a 1×1 convolutional layer, a ReLU activation function, and another 1×1 convolutional linear layer; X F 'For the learned frequency domain filter The result after dot multiplication of the input frequency domain features;
[0077] Step 4: Convert the filtered frequency domain features back to spatial domain features through inverse fast Fourier transform:
[0078]
[0079] is also equivalent to:
[0080]
[0081] Mathematically, it is equivalent to using large kernel dynamic convolution as the weight of the feature mixer to obtain the output result of the adaptive frequency domain filtering module. is the spatial feature after fast Fourier transformation.
[0082] This paper uses an adaptive frequency-domain filtering module for frequency-domain analysis, capturing the global dependencies between different elements in the input time-series electricity load data. Furthermore, the model automatically adapts to the characteristics of different frequencies and can efficiently process signals or data with varying periodicity, particularly smoothing the transition between long-term and short-term dependencies.
[0083] To more flexibly decompose the stationary and non-stationary information of input features and preserve the seasonal characteristics of time series, this paper proposes a frequency-adaptive feature decomposition module. This module can dynamically process complex frequency features in the data, such as short-term fluctuations and abnormal behavior, through adaptive normalization of the frequency domain. It also allows the model to make optimal decomposition in different scenarios by adaptively adjusting the frequency bandwidth. The steps in the frequency-adaptive decomposition module include:
[0084] Step 1: The spatial features after fast Fourier transformation The sum of the input of the adaptive frequency domain filtering module is used as the input of the frequency adaptive decomposition module
[0085] in,
[0086]
[0087] Step 2: Input to the first-layer frequency adaptive decomposition module Perform frequency residual learning: The input features are converted to the frequency domain through discrete Fourier transform, and the K frequency components with the largest amplitude in each input feature are identified and set as non-stationary components
[0088]
[0089] In the formula, frequency residual learning is performed by one-dimensional discrete Fourier transform on each input feature X t Implemented and expressed as DFT(·); TopK(·) selects the frequency set with the largest amplitude before K and calculates it with Amp(·) function; Filter represents the frequency set with the largest amplitude from Z t K filtered out tFrequency operation, in order to reduce the impact of non-stationary signals, frequency residual learning uses IDFT(·) to restore the first K frequency components to non-stationary components
[0090] Step 3: Calculate seasonal components Calculating trend components From X t Remove Calculate the stationary component X res :
[0091]
[0092] Where F(·) is a set of average pooling filters, softmax(L(x non )) is the weight of the trend component feature, is the stable component, is the non-stationary component, For seasonal components, is the trend component;
[0093] Step 4: Use the prediction backbone model g with a normalization layer θ Get the stationary component characteristics after adaptive decomposition It can be expressed as follows:
[0094]
[0095] The normalization layer makes the prediction backbone model g θ Can focus on the stationary component of the input X res Dynamic changes in
[0096] Step 5: Use feedforward neural network to analyze the seasonal component of the input Perform a nonlinear transformation:
[0097]
[0098] Where FF(·) represents the feedforward neural network, is the seasonal component feature after learning by the feedforward neural network;
[0099] Step 6: Trend component Directly recorded as trend feature
[0100] Step 7: Pass the stationary features of the prediction model and seasonal characteristics after nonlinear transformation Weighted fusion is performed to obtain the output of the first-layer frequency adaptive decomposition module:
[0101]
[0102] in, is the output of the first-layer frequency adaptive decomposition module in the encoder;
[0103] Step 8: The steps in the second-layer frequency adaptive decomposition module are the same as those in the first layer, including
[0104]
[0105] in, is the output of the second-layer frequency adaptive decomposition module in the encoder.
[0106] The first or second frequency-adaptive decomposition module of the encoder extracts and separates stationary and non-stationary features (such as seasonality and trend changes) from the input sequence through frequency domain decomposition. Through adaptive frequency selection and weighted fusion, the model can dynamically adjust the focus of different frequency features and enhance the modeling capabilities of these features through feedforward neural networks and backbone prediction models, enabling the model to better handle non-stationary and stationary time series and improve the prediction accuracy of complex time series power load data. The frequency-adaptive decomposition module of the decoder works in a similar way to the encoder and will not be described in detail.
[0107] Preferably, the decoder comprises a serially connected adaptive frequency domain filtering module, a first-layer frequency adaptive decomposition module, an adaptive frequency domain normalized attention module, a second-layer frequency adaptive decomposition module and a third-layer frequency adaptive decomposition module;
[0108] The first-layer frequency adaptive decomposition module, the second-layer and the third-layer frequency adaptive decomposition modules have the same structure as the frequency adaptive decomposition module of the encoder, and the adaptive frequency domain filtering module of the decoder has the same structure as the adaptive frequency domain filtering module of the encoder.
[0109] The present invention uses the same adaptive frequency domain filtering module as the encoder to perform feature decomposition and processing.
[0110] In the adaptive frequency domain filtering module, the input data of the decoder is Perform frequency domain conversion and map the input data from the time domain to the frequency domain. The output is:
[0111]
[0112] Where, when l=1,
[0113] The decoder's adaptive frequency-domain filtering not only preserves global trends and seasonality but also effectively captures local variations. By weightedly fusing frequency components, the decoder dynamically adjusts its focus on each frequency feature, ensuring that the generated sequence accurately captures global features while reflecting local dynamics in the time series data. This is crucial for complex time series forecasting.
[0114] The frequency adaptive decomposition module applied to the encoder is extended and applied to the decoder. In the first layer of the frequency adaptive decomposition module, the frequency adaptive decomposition mechanism is used to adjust the time series power load characteristics output by the adaptive frequency domain filter module. Perform layer-by-layer decomposition, where t represents the frequency adaptive filter module of the decoder. Separate different frequency features, including high-frequency stationary component features Seasonal component characteristics of the intermediate frequency and low-frequency trend component characteristics As shown in the formula:
[0115]
[0116] The stationary component characteristics and seasonal component characteristics Weighted fusion obtains the input features of the adaptive frequency domain normalized attention module
[0117]
[0118] Among them, the stationary component characteristics Can capture short-term fluctuations and seasonal component characteristics Reflects seasonal characteristics and trend component characteristics Corresponding to long-term trend characteristics.
[0119] Similar to the processing in the encoder, the frequency adaptive decomposition module in the decoder adaptively adjusts the processing of these features, ensuring a balance between long-term and short-term features during the decoding generation process. This design enables the decoder to not only process long-term trends when generating sequences, but also dynamically capture short-term changes, thus providing greater flexibility in dealing with non-stationary time series. Finally, by effectively fusing stationary and seasonal features, the generated sequence ensures that it contains both short-term fluctuations and captures long-term trends, improving the accuracy of power load forecasting.
[0120] The steps in the adaptive frequency domain normalized attention module are as follows: Step 1: Use regular transformation expressions to extract feature representations that are more suitable for frequency domain processing. The input is q comes from the decoder, k and v come from the encoder,
[0121]
[0122] Where w q ,w k ,w v are the three learnable weights corresponding to q, k, and v, and q is the lth layer feature of the decoder After w q The weighted results, k, v are the lth layer features of the encoder After w k ,w v Weighted results;
[0123] Step 2: Use Fourier transform to transform q, k, and v to capture input features and The periodic patterns and the frequency information of long-term and short-term characteristics in are expressed as follows:
[0124]
[0125] Step 3: Obtain the output features of the adaptive frequency domain normalized attention module through the learnable frequency domain filter and inverse Fourier transform
[0126]
[0127] Where, It consists of a linear layer followed by a 1×1 convolutional layer, a ReLU activation function, and another 1×1 convolutional linear layer.
[0128] Dynamically capture input features through attention mechanism in frequency domain and The model adaptively adjusts the model's focus on different frequency features to ensure effective modeling of global trends and local fluctuations, thereby improving forecast accuracy.
[0129] The steps in the second-layer frequency adaptive decomposition module are:
[0130] The steps in the second and third frequency adaptive decomposition modules are:
[0131] In the last two layers of the decoder’s frequency adaptive decomposition module, the input of the adaptive frequency domain normalized attention module is With output The weighted value is used as the input of the second-layer frequency adaptive decomposition module in the decoder and is recorded as It can be expressed as follows:
[0132]
[0133] After the last two layers of the decoder frequency adaptive decomposition module, the output features are
[0134] Preferably, the method further includes optimizing the network model, and the steps include:
[0135] To train the electricity load prediction model, the model parameters are initialized and then optimized through the loss function. To train a model that can accurately predict the electricity load, the present invention first sets the model parameters and then optimizes the model parameters through the loss function.
[0136] There are two optimization goals, one is the mean square loss It is used to measure the gap between the model's predicted value and the true value, and is expressed as follows:
[0137]
[0138] Where, is the output result of the power load forecasting model, y i ∈Y H×W is the real power load data, i={1,2,...,n}, representing the i-th sample;
[0139] Another optimization objective is the regularization loss It is used to prevent the model from overfitting. By introducing an additional constraint term △ into the model's loss function, the complexity of the model is controlled, and the model is encouraged to learn simpler and smoother parameters, thereby improving the model's generalization ability. The regularization loss is recorded as:
[0140]
[0141] Among them, the constraint λ is the regularization strength, ω is the regularization coefficient matrix;
[0142] In order to optimize the stationary features Seasonal characteristics In the learning process, we will guide the loss For model optimization, it is defined as:
[0143]
[0144] Prediction with prior guidance can be considered as a multi-task optimization problem, where Ensure g θ Accurately predict stationary frequency characteristics Ensure that the feedforward neural network FF(·) accurately predicts seasonal characteristics Ensure that the power load forecasting model is optimized along the overall forecast accuracy. Seasonal characteristics The subscript t indicates that the encoder and decoder are common, which can be understood as t = {en, de}
[0145] By combining regularization loss and mean square error (MSE), the present invention achieves accurate prediction of electricity load. Mean square loss is used to measure the error between the model's predicted value and the actual value, helping the model to minimize the prediction deviation, especially for data with a long time span, it can effectively reduce the prediction error. By minimizing the square difference between the predicted result and the true value, the model can ensure accuracy in the regression task. Regularization loss controls the complexity of the model by introducing additional constraints in the loss function, avoiding overfitting of the model to noise or specific data features during the training process. Regularization effectively improves the generalization ability of the model, ensuring that the model not only performs well on training data, but also maintains a high prediction accuracy on unseen test data.
[0146] The combination of these two loss functions ensures the model's accurate fit to historical power load data while also enhancing its adaptability to future changes through regularization, particularly potential periodic fluctuations and sudden changes in load data. This optimization strategy enables the model to strike a balance between accuracy and stability when dealing with complex, nonlinear power load data, thereby improving its ability to predict future power loads and providing important support for intelligent scheduling and energy planning in power systems.
[0147] The above description is merely illustrative of certain exemplary embodiments of the present invention. It goes without saying that those skilled in the art will be able to modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the scope of protection of the claims.
Claims
1. A method for forecasting regional electricity load prospects taking into account multi-source distributed new energy storage, characterized in that: The steps include: Constructing an electricity load forecasting model for a power system, the electricity load forecasting model includes a feature encoding part and a feature decoding part; the feature encoding part includes a multi-layer encoder, and the feature decoding part includes a multi-layer decoder; Get sample data Sample data It is the time series data of electricity load data; Where H is the number of input data and W is the dimension of input data; In the feature encoding part, the time series data is encoded into output features; The output features of the l-th layer encoder Where l∈{1,2,…,N} represents the lth layer of the encoder output, and N is the total number of encoder layers. Encoder(·) is defined as: Where, represents the i-th layer decomposition component in the l-th layer encoder, represents the output of the l-1th layer encoder, AFF(·) represents the adaptive frequency domain filtering module, and FADecomp(·) represents the frequency adaptive decomposition module; The steps in the feature decoding part are: Where, is the stationary component characteristic, is the seasonal component characteristic, is the trend component feature, l∈{1,2,…,M} represents the lth layer of the decoder output, M is the total number of decoder layers, and decoder(·) is defined as: Where, Respectively represent the stationary component features, seasonal component features, and trend component features of the i-th layer in the l-th layer decoder, represents the output features of the frequency adaptive decomposition module of the i-th layer of the l-th layer decoder, Represents the output component features and trend component features of the l-1 layer decoder, AFF att (·) represents the adaptive frequency domain normalization attention module, W l,i ,i∈{1,2,3} represents the trend feature of the i-th layer The weight matrix of Get the prediction result, which is the output component feature of the frequency adaptive decomposition module of the feature decoding part and trend component characteristics The sum of is defined as: Among them, W X for The projection matrix, Y is the output result of the power load forecasting model; It also includes the optimization of the network model, the steps include: To train the electricity load forecasting model, the model parameters are initialized and then optimized using the loss function. There are two optimization goals, one is the mean square loss It is used to measure the gap between the model's predicted value and the true value, and is expressed as follows: Where, is the output result of the power load forecasting model, y i ∈Y H×W is the real power load data, i={1,2,...,n}; Another optimization objective is the regularization loss It is used to prevent the model from overfitting; by introducing an additional constraint term △ into the loss function of the electricity load forecasting model to control the complexity of the model, the regularization loss is recorded as: Among them, the constraint λ is the regularization strength, ω is the regularization coefficient matrix; In order to optimize the stationary features Seasonal characteristics In the learning process, we will guide the loss For model optimization, it is defined as: Prediction with prior guidance can be considered as a multi-task optimization problem, where Ensure g θ Accurately predict stationary frequency characteristics Ensure that the feedforward neural network FF(·) accurately predicts seasonal characteristics Ensure that the power load forecasting model is optimized along the overall forecast accuracy.
2. The method for regional electricity load forecasting taking into account multi-source distributed new energy storage according to claim 1 is characterized in that: The encoder comprises in sequence an adaptive frequency domain filtering module and a frequency adaptive decomposition module with two identical layers; The steps in the adaptive frequency domain filtering module include: Step 1: Construct input data Step 2: Perform a fast Fourier transform on the input data to convert the data from the time domain to the frequency domain, and express it as follows: Where, Represents the frequency domain features after Fourier transformation, h, w represent the number and dimension index of input data, u, v represent the frequency domain features X after Fourier transformation F The number and dimension index of , i = h × w; Step 3: Use a learnable frequency domain filter The frequency domain characteristics of the dot product input are expressed as follows: Where, It is a learnable frequency domain filter with the same shape as the frequency domain feature; It consists of a linear layer with a 1×1 convolutional layer, a ReLU activation function, and another 1×1 convolutional linear layer; X F ' is the learned frequency domain filter The result after dot multiplication of the input frequency domain features; Step 4: Convert the filtered frequency domain features back to spatial domain features through inverse fast Fourier transform: is also equivalent to: Mathematically, it is equivalent to using large kernel dynamic convolution as the weight of the feature mixer to obtain the output result of the adaptive frequency domain filtering module. is the spatial feature after fast Fourier transformation; The steps in the frequency adaptive decomposition module include: Step 1: The spatial features after fast Fourier transformation The sum of the input of the adaptive frequency domain filtering module is used as the input of the first layer frequency adaptive decomposition module in, Step 2: Input to the first-layer frequency adaptive decomposition module Perform frequency residual learning: The input features are converted to the frequency domain through discrete Fourier transform, and the K frequency components with the largest amplitude in each input feature are identified and set as non-stationary components In the formula, frequency residual learning is performed by one-dimensional discrete Fourier transform on each input feature X t Implemented and expressed as DFT(·); TopK(·) selects the frequency set with the largest amplitude before K and calculates it with Amp(·) function; Filter represents the frequency set with the largest amplitude from Z t Filter out K t Frequency operation, in order to reduce the impact of non-stationary signals, frequency residual learning uses IDFT(·) to restore the first K frequency components to non-stationary components Step 3: Calculate seasonal components Calculating trend components From X t Remove Calculate the stationary component X res : Where F(·) is a set of average pooling filters, softmax(L(x non )) is the weight of the trend component feature, is the stable component, is the non-stationary component, For seasonal components, is the trend component; Step 4: Use the prediction backbone model g with a normalization layer θ Get the stationary component characteristics after adaptive decomposition It can be expressed as follows: The normalization layer makes the prediction backbone model g θ Can focus on the stationary component of the input X res Dynamic changes in Step 5: Use feedforward neural network to analyze the seasonal component of the input Perform a nonlinear transformation: Where FF(·) represents the feedforward neural network, is the seasonal component feature after learning by the feedforward neural network; Step 6: The trend component Directly recorded as trend feature Step 7: Pass the stationary features of the prediction model and seasonal characteristics after nonlinear transformation Weighted fusion is performed to obtain the output of the first-layer frequency adaptive decomposition module: in, is the output of the first-layer frequency adaptive decomposition module in the encoder; Step 8: The steps in the second-layer frequency adaptive decomposition module are the same as those in the first layer, including: in, is the output of the second-layer frequency adaptive decomposition module in the encoder.
3. The method for regional electricity load forecasting taking into account multi-source distributed new energy storage according to claim 2, characterized in that: The decoder sequentially comprises an adaptive frequency domain filtering module, a first-layer frequency adaptive decomposition module, an adaptive frequency domain normalized attention module, a second-layer frequency adaptive decomposition module, and a third-layer frequency adaptive decomposition module; The first-layer frequency adaptive decomposition module, the second-layer frequency adaptive decomposition module, and the third-layer frequency adaptive decomposition module have the same structure as the frequency adaptive decomposition module of the encoder, and the adaptive frequency domain filtering module of the decoder has the same structure as the adaptive frequency domain filtering module of the encoder; In the adaptive frequency domain filtering module, the input data of the decoder is Perform frequency domain conversion and map the input data from the time domain to the frequency domain. The output is: In the first layer of frequency adaptive decomposition module, the frequency adaptive decomposition mechanism is used to adjust the time series power load characteristics output by the adaptive frequency domain filter module. Perform decomposition operations to separate different frequency features, including high-frequency stationary component features Seasonal component characteristics of the intermediate frequency and low-frequency trend component characteristics As shown in the formula: The stationary component characteristics and seasonal component characteristics Weighted fusion obtains the input features of the adaptive frequency domain normalized attention module The steps in the adaptive frequency domain normalization attention module are: Step 1: Use regular transformation expressions to extract feature representations that are more suitable for frequency domain processing. The input is q comes from the decoder, k and v come from the encoder, Where w q ,w k ,w v are the three learnable weights corresponding to q, k, and v, and q is the lth layer feature of the decoder After w q The weighted results, k, v are the lth layer features of the encoder After w k ,w v Weighted results; Step 2: Use Fourier transform to transform q, k, and v to capture input features and The periodic patterns and the frequency information of long-term and short-term characteristics in are expressed as follows: Step 3: Obtain the output features of the adaptive frequency domain normalized attention module through the learnable frequency domain filter and inverse Fourier transform Where, It consists of a linear layer with a 1×1 convolutional layer, a ReLU activation function, and another 1×1 convolutional linear layer; The steps in the second and third frequency adaptive decomposition modules are: In the last two layers of the decoder’s frequency adaptive decomposition module, the input of the adaptive frequency domain normalized attention module is With output The weighted value is used as the input of the second-layer frequency adaptive decomposition module in the decoder and is recorded as It can be expressed as follows: After the last two layers of the decoder frequency adaptive decomposition module, the output features are
Citation Information
Patent Citations
Long-term power load prediction method based on hierarchical residual self-attention neural network
CN114529051A
Power grid load prediction method and system based on multi-source data fusion
CN117856240A