A short-term load prediction method, device, electronic device and storage medium
The N-beats network optimized by variational mode decomposition and permutation entropy analysis combined with SSA solves the problems of insufficient nonlinear mapping capabilities and high model complexity in short-term power load forecasting, improves forecast accuracy and model stability, and achieves More efficient short-term load forecasting.
Patent Information
- Application Number
- CN202210270575.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing short-term power load forecasting methods have problems such as insufficient nonlinear mapping capabilities, loss of time series information, and disordered data structure information when processing complex nonlinear load data, resulting in low prediction accuracy, high model complexity, and hyperparameters. Optimization is highly subjective.
The historical load data is decomposed into modal components through variational empirical mode decomposition, and the components are analyzed and reconstructed using permutation entropy. The N-beats network optimized by SSA is used for prediction to reduce estimation errors and improve prediction accuracy.
The accuracy and model complexity of short-term load forecasting are improved, the forecasting time is reduced, and network parameters are optimized through objective methods, which reduces subjectivity and achieves higher forecasting accuracy.
Smart Images

Figure CN114819267B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a short-term load forecasting method, device, electronic equipment and storage medium. Background Art
[0002] As the basic supporting industry of the national economy, the power industry is one of the important cornerstones for realizing the people's happy life and realizing the modernization of my country's industry. Research on scientific and reasonable intelligent prediction of power load has become a hot topic in related fields today. Extracting information from historical data for better energy prediction is crucial for building energy planning and optimization. Accurate short-term load forecasting can not only help the system operate safely and reliably, but also reduce resource waste and improve economic benefits. Therefore, load forecasting has become an important research field in power grid operation and management.
[0003] At present, the methods of short-term power load forecasting are mainly divided into three categories: short-term power load forecasting based on traditional statistics, short-term power load forecasting based on machine learning, and short-term power load forecasting based on deep learning.
[0004] Based on the traditional mathematical statistical model, it has the advantages of simple structure, small amount of calculation and high simple linear prediction accuracy. However, its nonlinear mapping ability is insufficient. For nonlinear load data with high complexity, it is difficult to make accurate predictions due to the poor robustness of the statistical algorithm and poor generalization ability of unknown data, and it is difficult to meet the actual prediction needs.
[0005] With the development of artificial intelligence technology, machine learning has been widely used in the field of power load forecasting. Machine learning algorithms can effectively handle nonlinear problems. However, there is still a problem of time series information loss, and there is still room for improvement in prediction accuracy.
[0006] Thanks to the rapid development of artificial intelligence, deep learning algorithms have been widely used in power load forecasting in recent years with their powerful nonlinear mapping and adaptive capabilities, and have achieved excellent results. Among them, the long short-term memory network and GRU network improved based on RNN have made outstanding contributions in the processing of long time series problems. In addition, the CNN network can effectively improve the feature extraction of data by using convolution pooling. However, when facing long time series or multi-dimensional input data, the single CNN network and LSTM network still have problems such as loss of sequence feature information, disordered structural information between data, and insufficient multi-dimensional feature mining. Summary of the invention
[0007] Based on this, the present invention provides a short-term load prediction method, device, electronic device and storage medium. This application predicts the hourly load data of the next day by acquiring historical load data, decomposes the historical load data into several modal components using variational empirical mode decomposition, and uses permutation entropy to perform complexity analysis on each modal component, reconstruct each modal component to capture internal factors and reduce the accumulation of estimation errors. Using the N-beats network optimized by SSA for prediction has better results than other models.
[0008] According to a first aspect of some embodiments of the present application, a short-term load forecasting method is provided, comprising the following steps:
[0009] Obtain historical load data before the time point to be predicted;
[0010] Performing filling preprocessing on missing values in the historical load data;
[0011] Performing variational modal decomposition on the preprocessed historical load data to obtain multiple modal components;
[0012] Calculating the permutation entropy of the plurality of modal components, and dividing the plurality of modal components into three modal component groups according to the size of the permutation entropy, and superimposing the modal components in each modal component group to obtain three reconstructed components;
[0013] Normalizing each of the reconstructed components and inputting them into the SSA-optimized N-beats network for prediction to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two sequentially connected first stacks and second stacks;
[0014] Each of the sub-prediction values is superimposed to obtain the prediction value of the time point to be predicted.
[0015] Furthermore, historical load data before the time point to be predicted is obtained, including:
[0016] Obtain the historical load data of the area in the previous year at the time point to be predicted, with a sampling period of once every hour.
[0017] Furthermore, variational modal decomposition is performed on the preprocessed historical load data to obtain multiple modal components, including:
[0018] Determine the number of modal components obtained by decomposition through the center frequency observation method;
[0019] Perform Hilbert transform on each modal component and obtain the single-sided spectrum of the analytical signal
[0020] Transform the spectrum to baseband by multiplying the spectrum by an exponential signal estimated at the center frequency:
[0021] By demodulating the signal H 1 Gaussian smoothing estimates the bandwidth, and its constrained variation problem can be expressed as:
[0022]
[0023] To solve the constrained variational problem of formula (1), we introduce the quadratic penalty factor α and the Lagrange multiplier λ(t) to transform it into an unconstrained variational problem for solution. The formula is as follows:
[0024]
[0025] Update u using the alternating direction multiplier method n ,ω n The value of is as follows:
[0026]
[0027]
[0028] Where δ(t) is the unit pulse signal, n is the nth modal component obtained after signal decomposition, N is the total number of modal decompositions, and k is the number of iterations; w n is the center frequency of the mode, is the partial derivative operator symbol, α is the penalty factor, j is the unit of the imaginary number, is the convolution operator, λ is the Lagrange multiplier, f(ω) is the Fourier transform of f(t), u n (ω) is u n Fourier transform of (t), λ is ω n (t) is the Fourier transform of
[0029] Furthermore, the calculation formula of permutation entropy is as follows:
[0030]
[0031] Among them, H(m) represents the permutation entropy, m represents the embedding dimension, K is the number of different symbol sequences mapped in the m-dimensional phase space, and P j represents the probability of a sequence of symbols.
[0032] Further, each of the reconstructed components is normalized and input into the SSA-optimized N-beats network for prediction to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two sequentially connected first stacks and second stacks, including:
[0033] Inputting the normalized reconstructed component into the first stack to obtain a first stack prediction value and a stack remainder;
[0034] inputting the stack remainder into the second stack to obtain a second superposition prediction value;
[0035] The first superimposed prediction value and the second superimposed prediction value are superimposed to obtain the sub-prediction value.
[0036] Further, the first stack includes three basic blocks connected in sequence, and the reconstructed component after normalization is input into the first stack to obtain a first superposition prediction value and a stack remainder, including the following steps;
[0037] Inputting the normalized reconstructed components into the basic block to obtain backcast output and forecast output respectively;
[0038] The backcast output of each basic block is subtracted from the input of the current basic block, and the result is used as the input of the next basic block until it is used as the output of the first stack to obtain the stack remainder, and the forecast output of each basic block is directly added as the output of the first stack to obtain a first superposition prediction value;
[0039] The second stack includes three basic blocks connected in sequence, and the stack remainder is input into the second stack to obtain a second superposition prediction value, including:
[0040] The stack remainder is input into the basic block, and the forecast output of each basic block is directly added as the output of the second stack to obtain a second superimposed prediction value.
[0041] Further, SSA optimizes the N-beats network, comprising the following steps:
[0042] Initialize SSA parameters, including: maximum number of iterations, number of sparrows;
[0043] Generate a spatial search matrix according to the parameters of the N-beats network to be optimized and the number of sparrows, wherein the parameters include: learning rate l, number of iterations k, number of neurons n;
[0044] Calculate the fitness value of each sparrow and sort them to get the maximum value;
[0045] Update the positions of the discoverer, joiner, and scout, obtain the global optimal position, and update the optimal fitness value;
[0046] Determine whether SSA meets the iteration termination condition. If so, the iteration is completed and the optimal solution is output. Otherwise, continue to iterate to find the optimal solution.
[0047] According to a second aspect of some embodiments of the present application, a device for predicting short-term load is provided, characterized by comprising:
[0048] A historical load data acquisition module is used to acquire historical load data before the time point to be predicted;
[0049] A preprocessing module, used for filling in missing values in the historical load data;
[0050] A variational modal decomposition module is used to perform variational modal decomposition on the preprocessed historical load data to obtain multiple modal components;
[0051] A permutation entropy reconstruction module, used to calculate the permutation entropy of the multiple modal components, and divide the multiple modal components into three modal component groups according to the size of the permutation entropy, and superimpose the modal components in each modal component group to obtain three reconstructed components;
[0052] A sub-prediction value acquisition module, used for inputting each of the reconstructed components into the SSA-optimized N-beats network for prediction after normalization processing, to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two first stacks and a second stack connected in sequence;
[0053] The prediction value acquisition module is used to superimpose each of the sub-prediction values to obtain the prediction value of the point to be predicted.
[0054] According to a third aspect of some embodiments of the present application, there is provided an electronic device, including:
[0055] at least one memory and at least one processor;
[0056] The memory is used to store one or more programs;
[0057] When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of a short-term load forecasting method as described in any one of the first aspects.
[0058] According to a fourth aspect of some embodiments of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method as described in any one of the first aspects are implemented.
[0059] The present application first improves the integrity of historical load data by preprocessing the missing values of historical load data. Secondly, the historical load data is decomposed by variational modal analysis, and the historical load data with strong volatility is decomposed into relatively stable modal components, thereby improving the stability of the data. Furthermore, the relatively stable modal components are subjected to complexity analysis by permutation entropy and the data is reorganized to capture internal factors, reduce the accumulation of estimation errors, and obtain reconstruction components of different complexity. Finally, the N-beats network is optimized by SSA, and the parameters of the N-beats network are determined by an objective method, so that the network has better effects than other models and improves the accuracy of prediction. The SSA-optimized N-beats network proposed in the present application has higher prediction accuracy and lower complexity compared to the general decomposition-integration combination model.
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A flowchart of a short-term load forecasting method in an embodiment of the present application;
[0062] Figure 2 It is a schematic diagram of the modal components of the historical load data after the variational modal decomposition in the embodiment of the present application;
[0063] Figure 3 A schematic diagram of the structure of each basic block in the embodiment of the present application;
[0064] Figure 4 A schematic diagram of the structure of each stack in the embodiment of the present application;
[0065] Figure 5 This is a schematic diagram of the structure of the N-beats network in an embodiment of the present application;
[0066] Figure 6 Schematic diagram of the process of optimizing the N-beats network for SSA;
[0067] Figure 7 It is a schematic diagram of the structure of a short-term load forecasting device in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0069] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
[0070] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0071] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.
[0072] In addition, in the description of this application, unless otherwise specified, "multiple" means two or more. "And / or" describes the association relationship of the associated human bodies, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated human bodies before and after are in an "or" relationship.
[0073] The decomposition method in the prior art involved in the background technology will greatly increase the complexity of the model and require more time for prediction. The existing algorithms have not yet been able to fully meet the accuracy required for actual needs. The hyperparameters of the prediction model have a great influence on the final experimental results. They are generally determined manually based on experience, which is subjective.
[0074] This application provides a short-term load forecasting method, see Figure 1 , the method comprises the following steps:
[0075] Step S1: Obtain historical load data before the time point to be predicted.
[0076] The historical load data is the historical data in a time period continuous with the time point to be predicted, and the time period can be a historical week or a historical month. The historical load data has a fixed sampling period, and the sampling period can be set according to demand. The load data at the time point to be predicted can be determined based on the historical load data continuous with it, so as to accurately process the data.
[0077] In a preferred embodiment, when it is necessary to obtain the historical load data of the previous year for the area where the time point to be predicted is located, the sampling period can be set to sample once every hour.
[0078] Step S2: pre-processing the missing values in the historical load data by filling them.
[0079] The historical load data obtained may be incomplete or erroneous, so it is necessary to perform filling preprocessing. The specific filling method is to obtain two values of the missing value vector and use the average of the two values as the filling value to ensure the integrity of the data.
[0080] Step S3: performing variational modal decomposition on the preprocessed historical load data to obtain multiple modal components.
[0081] Historical load data is highly complex and random. If it is predicted directly, it is difficult for general prediction models to fully grasp the rules, resulting in poor final prediction results. Therefore, variational mode decomposition can be used to reduce the complexity of the data and shorten the prediction time of the prediction model.
[0082] Step S4: calculating the permutation entropy of the plurality of modal components, and dividing the plurality of modal components into three modal component groups according to the size of the permutation entropy, and superimposing the modal components in each modal component group to obtain three reconstructed components.
[0083] Permutation Entropy (PE) is an indicator used to measure the complexity of time series. It introduces the idea of permutation when calculating the complexity between reconstructed subsequences. The smaller the permutation entropy, the more regular the corresponding time series; the larger the permutation entropy, the more complex the corresponding time series.
[0084] Specifically, after calculating the permutation entropy of each modal component, the complexity of multiple modal components can be analyzed according to the size of the permutation entropy, and divided into three modal component groups of high complexity, medium complexity and low complexity according to the complexity. The modal components in each group are superimposed to obtain high complexity reconstruction components, medium complexity reconstruction components and low complexity reconstruction components respectively.
[0085] The calculation formula of permutation entropy is as follows:
[0086]
[0087] Among them, H(m) represents the permutation entropy, m represents the embedding dimension, K is the number of different symbol sequences mapped in the m-dimensional phase space, and P j Represents the probability of the th symbol sequence. Specifically, the embedding dimension in this application can be set to 3.
[0088] Step S5: normalize each of the reconstructed components and input them into the SSA-optimized N-beats network for prediction to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two sequentially connected first stacks and second stacks.
[0089] The N-beats network predicts the time series of future moments by using the time series of historical data through a given time series. Specifically, the first stack in the network is used to fit the trend, and the second stack is used to fit the periodicity.
[0090] By inputting high-complexity reconstruction components, medium-complexity reconstruction components and low-complexity reconstruction components into the optimized N-beats network, the corresponding high-complexity sub-prediction values, medium-complexity sub-prediction values and low-complexity sub-prediction values can be obtained. Recombining modal components of different complexity and inputting them into the N-beats network is beneficial to the accuracy of the network prediction.
[0091] Step S6: superimpose each of the sub-prediction values to obtain the prediction value of the time point to be predicted.
[0092] In a specific example, the predicted value at the time point to be predicted may be hourly load data within one day at the time point to be predicted.
[0093] This application first improves the integrity of historical load data by preprocessing the missing values of historical load data. Secondly, the historical load data is decomposed by variational modal analysis, and the historical load data with strong volatility is decomposed into relatively stable modal components, thereby improving the stability of the data. Furthermore, the complexity analysis of the relatively stable modal components is performed by permutation entropy and the data is reorganized to capture internal factors, reduce the accumulation of estimation errors, and obtain reconstructed components of different complexity. Finally, the N-beats network is optimized by SSA, and the parameters of the N-beats network are determined by an objective method, so that the network has better effects than other models and improves the accuracy of prediction.
[0094] In a specific embodiment, see Figure 2, which is a schematic diagram of modal components of historical load data after variational modal decomposition in an embodiment of the present application. Variational modal decomposition is performed on the preprocessed historical load data to obtain multiple modal components, including:
[0095] Determine the number of modal components obtained by decomposition through the center frequency observation method;
[0096] Perform Hilbert transform on each modal component and obtain the single-sided spectrum of the analytical signal
[0097] Transform the spectrum to baseband by multiplying the spectrum by an exponential signal estimated at the center frequency:
[0098] By demodulating the signal H 1 Gaussian smoothing estimates the bandwidth, and its constrained variation problem can be expressed as:
[0099]
[0100] To solve the constrained variational problem of formula (1), we introduce the quadratic penalty factor α and the Lagrange multiplier λ(t) to transform it into an unconstrained variational problem for solution. The formula is as follows:
[0101]
[0102] Update u using the alternating direction multiplier method n ,ω n The value of is as follows:
[0103]
[0104]
[0105] Where δ(t) is the unit pulse signal, n is the nth modal component obtained after signal decomposition, N is the total number of modal decompositions, and k is the number of iterations; w n is the center frequency of the mode, is the partial derivative operator symbol, α is the penalty factor, j is the unit of the imaginary number, is the convolution operator, λ is the Lagrange multiplier, f(ω) is the Fourier transform of f(t), u n (ω) is u n The Fourier transform of (t), λ is w n (t) is the Fourier transform of
[0106] In a preferred embodiment, each of the reconstructed components is normalized and then input into the SSA-optimized N-beats network for prediction to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two sequentially connected first stacks and second stacks, and includes the following steps:
[0107] The normalized reconstructed components are input into the first stack to obtain a first stack prediction value and a stack remainder.
[0108] Specifically, the first stack includes three sequentially connected basic blocks, and obtaining a first superposition prediction value and a stack remainder includes the following steps;
[0109] Inputting the normalized reconstructed components into the basic block to obtain backcast output and forecast output respectively;
[0110] The backcast output of each basic block is subtracted from the input of the current basic block, and the result is used as the input of the next basic block until it is used as the output of the first stack to obtain the stack remainder. The forecast output of each basic block is directly added as the output of the first stack to obtain a first superimposed prediction value.
[0111] The stack remainder is input into the second stack to obtain a second superposition prediction value.
[0112] Specifically, the second stack includes three basic blocks connected in sequence to obtain a second superposition prediction value, including:
[0113] The stack remainder is input into the basic block, and the forecast output of each basic block is directly added as the output of the second stack to obtain a second superimposed prediction value.
[0114] The first superimposed prediction value and the second superimposed prediction value are superimposed to obtain the sub-prediction value.
[0115] See also Figure 3-Figure 5 , which is a schematic diagram of the structure of the N-beats network. Specifically, the N-beats network includes a first stack and a second stack, and each stack includes three basic blocks.
[0116] like Figure 3As shown in the figure, each basic block includes a four-layer fully connected layer, and the last fully connected layer is connected to two new fully connected layers, and the new fully connected layers are connected to FC and g respectively. Each basic block will eventually get two outputs, backcast output and forecast output. The forecast output of each basic block is directly added as the output of a stack. The backcast output of each basic block is subtracted from the original input, and the result is used as the input of the next basic block.
[0117] like Figure 4 As shown, it can be seen from the internal structure of the stack that the forecast outputs of the three basic blocks are superimposed as the output of a stack, then the first stack obtains the first superimposed prediction value through the basic blocks inside it, and the second stack obtains the second superimposed prediction value through the basic blocks inside it.
[0118] like Figure 5 As shown, the stack remainder output by the first stack is used as the input of the second stack, and is input to the second stack; the first superimposed prediction value output by the first stack and the second superimposed prediction value output by the second stack are added and output to the N-beats network to obtain a sub-prediction value. Specifically, the sub-prediction value includes a high-complexity sub-prediction value, a medium-complexity sub-prediction value, and a low-complexity sub-prediction value.
[0119] Since the existing algorithms cannot fully meet the accuracy required in practice, and the hyperparameters of the prediction model have a great impact on the final experimental results, they are generally determined by human experience and are subjective. Therefore, a method is needed to objectively determine the parameters and obtain an algorithm that can converge quickly to optimize the hyperparameters.
[0120] SSA is the sparrow search algorithm, which has the advantages of strong optimization ability and fast convergence speed. By optimizing the parameters of the N-beats network through the SSA algorithm, the optimal solution can be found in the process of dynamic change of the parameters, thereby improving the accuracy of the network. In SSA, the finder with a better fitness value will be given priority in the search process. During the foraging process, some joiners will always monitor the finder. Once they realize that the finder has found better food, they will immediately leave their current position to compete for food until they obtain the optimal fitness value.
[0121] In a preferred embodiment, see Figure 6 , SSA optimizes the N-beats network, including the following steps:
[0122] Initialize SSA parameters, including: maximum number of iterations and number of sparrows.
[0123] The number of sparrows is used to indicate the number of parameters to be optimized in the N-beats network. Sparrows may include: discoverers, joiners, and scouts.
[0124] A spatial search matrix is generated according to the parameters of the N-beats network to be optimized and the number of sparrows, wherein the parameters include: a learning rate l, a number of iterations k, and a number of neurons n.
[0125] Specifically, the number of sparrows can be set to 10, the ratio of discoverers, joiners and scouts is 1:3:1, and the N-beats network parameter initialization range is: learning rate [0.001, 0.01], number of neurons [1, 100], and number of iterations [1, 100].
[0126] Calculate the fitness value of each sparrow and sort them to get the maximum value.
[0127] The position of each sparrow is used to indicate the parameters of the N-beats network, and the fitness value of each sparrow is used to indicate the root mean square error of the parameters of each N-beats network. The smaller the error, the better the position of the sparrow, and the more accurate the parameters corresponding to the sparrow's position.
[0128] Specifically, the N-beats network is trained separately according to the position of each sparrow (i.e., the parameters of the N-beats network). For example, if there are S sparrows, the N-beats network needs to be trained S times in each iteration, and their respective root mean square errors are calculated as fitness values.
[0129] Update the positions of the discoverer, joiner, and scout, obtain the global optimal position and update the optimal fitness value.
[0130] Determine whether SSA meets the iteration termination condition. If so, the iteration is completed and the optimal solution is output. Otherwise, continue to iterate to find the optimal solution.
[0131] Specifically, if the fitness value of the next iteration does not change much from that of the current iteration, or the change is very small, it is considered as the condition for the iteration to terminate. When the fitness value of the sparrow is optimal, its position is the global optimal, and the parameters of the N-beats network corresponding to the position of the sparrow are optimal.
[0132] Corresponding to the above short-term load forecasting method, such as Figure 7 As shown, the present application also provides a short-term load forecasting device 700, comprising:
[0133] The historical load data acquisition module 701 is used to acquire the historical load data before the time point to be predicted;
[0134] A preprocessing module 702 is used to perform filling preprocessing on missing values in the historical load data;
[0135] A variational modal decomposition module 703 is used to perform variational modal decomposition on the preprocessed historical load data to obtain multiple modal components;
[0136] The permutation entropy reconstruction module 704 is used to calculate the permutation entropy of the multiple modal components, and divide the multiple modal components into three modal component groups according to the size of the permutation entropy, and superimpose the modal components in each modal component group to obtain three reconstructed components;
[0137] A sub-prediction value acquisition module 705 is used to input each of the reconstructed components into the N-beats network optimized by SSA for prediction, so as to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two first stacks and a second stack connected in sequence;
[0138] The prediction value acquisition module 706 is used to superimpose each of the sub-prediction values to obtain the prediction value of the point to be predicted.
[0139] In an optional example, the sub-prediction value acquisition module 705 includes:
[0140] A first stack prediction unit, configured to input the normalized reconstructed component into the first stack to obtain a first stack prediction value and a stack remainder;
[0141] A second stack prediction unit, configured to input the stack remainder into the second stack to obtain a second superposition prediction value;
[0142] A sub-prediction acquisition unit is used to superimpose the first superimposed prediction value and the second superimposed prediction value to obtain the sub-prediction value.
[0143] In an optional example, the first stack includes three basic blocks connected in sequence, and the first stack prediction unit includes:
[0144] An output acquisition component, used for inputting the reconstructed component after normalization into the basic block to obtain backcast output and forecast output respectively;
[0145] The first superposition prediction value acquisition element is used to subtract the backcast output of each basic block from the input of the current basic block, and obtain the result as the input of the next basic block until it is used as the output of the first stack to obtain the stack remainder. The forecast output of each basic block is directly added as the output of the first stack to obtain the first superposition prediction value.
[0146] In an optional example, the second stack includes three basic blocks connected in sequence, and the second stack prediction unit includes:
[0147] The second superposition prediction value acquisition element is used to input the stack remainder into the basic block, and the forecast output of each basic block is directly added as the output of the second stack to obtain a second superposition prediction value.
[0148] In an optional example, an optimization module for SSA optimization of N-beats network is also included, and the module includes:
[0149] The parameter initialization unit is used to initialize SSA parameters, including: maximum number of iterations, number of sparrows, and number of discoverers.
[0150] The spatial search matrix generating unit is used to generate a spatial search matrix according to the parameters of the N-beats network to be optimized and the number of sparrows, wherein the parameters include: learning rate l, number of iterations k, number of neurons n.
[0151] The fitness calculation unit is used to calculate the fitness value of each sparrow and sort them to get the maximum value.
[0152] The update unit is used to update the positions of the discoverer, joiner, and scout, obtain the global optimal position, and update the optimal fitness value.
[0153] The optimal solution output unit is used to determine whether SSA meets the iteration termination condition. If so, the iteration is completed and the optimal solution is output. Otherwise, the iteration continues to find the optimal solution.
[0154] Corresponding to the above-mentioned short-term load forecasting method, the present application also provides an electronic device, including at least one memory and at least one processor;
[0155] The memory is used to store one or more programs;
[0156] When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of any one of the above-mentioned short-term load forecasting methods.
[0157] The implementation process of the functions and effects of each component in the above-mentioned device is specifically detailed in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here. For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0158] Corresponding to the above-mentioned short-term load forecasting method, the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.
[0159] The present disclosure may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0160] The present application first improves the integrity of historical load data by preprocessing the missing values of historical load data. Secondly, the historical load data is decomposed by variational modal analysis, and the historical load data with strong volatility is decomposed into relatively stable modal components, thereby improving the stability of the data. Furthermore, the relatively stable modal components are subjected to complexity analysis by permutation entropy and the data is reorganized to capture internal factors, reduce the accumulation of estimation errors, and obtain reconstruction components of different complexity. Finally, the N-beats network is optimized by SSA, and the parameters of the N-beats network are determined by an objective method, so that the network has better effects than other models and improves the accuracy of prediction. The SSA-optimized N-beats network proposed in the present application has higher prediction accuracy and lower complexity compared to the general decomposition-integration combination model.
[0161] It should be understood that the embodiments of the present application are not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the embodiments of the present application is limited only by the appended claims. The above-described embodiments only express several implementation methods of the embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limitations on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the embodiments of the present application, and these all belong to the scope of protection of the embodiments of the present application.
Claims
1. A short-term load forecasting method, characterized in that: The following steps are involved: Obtain historical load data before the time point to be predicted; Performing filling preprocessing on missing values in the historical load data; Performing variational modal decomposition on the preprocessed historical load data to obtain multiple modal components; Calculating the permutation entropy of the plurality of modal components, and dividing the plurality of modal components into three modal component groups according to the size of the permutation entropy, and superimposing the modal components in each modal component group to obtain three reconstructed components; Each of the reconstructed components is normalized and then input into the SSA-optimized N-beats network for prediction to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two sequentially connected first stacks and second stacks; Superimposing each of the sub-prediction values to obtain the prediction value of the time point to be predicted; The pre-processed historical load data is subjected to variational modal decomposition to obtain multiple modal components, including: Determine the number of modal components obtained by decomposition through the center frequency observation method; Perform Hilbert transform on each of the modal components and obtain the single-sided spectrum of the analytical signal Transform the spectrum to baseband by multiplying the spectrum by an exponential signal estimated at the center frequency: By demodulating the signal H 1 Gaussian smoothing estimates the bandwidth, and its constrained variation problem can be expressed as: To solve the constrained variational problem of formula (1), we introduce the quadratic penalty factor α and the Lagrange multiplier λ(t) to transform it into an unconstrained variational problem for solution. The formula is as follows: Update u using the alternating direction multiplier method n ,ω n The value of is as follows: Where δ(t) is the unit pulse signal, n is the nth modal component obtained after signal decomposition, N is the total number of modal decompositions, and k is the number of iterations; w n is the center frequency of the mode, is the partial derivative operator symbol, α is the penalty factor, j is the unit of the imaginary number, is the convolution operator, λ is the Lagrange multiplier, f(ω) is the Fourier transform of f(t), u n (ω) is u n Fourier transform of (t), λ is ω n Fourier transform of (t); The calculation formula of the permutation entropy is as follows: Among them, H(m) represents the permutation entropy, m represents the embedding dimension, K is the number of different symbol sequences mapped in the m-dimensional phase space, and P j represents the probability of a sequence of symbols; Each of the reconstructed components is normalized and then input into the SSA-optimized N-beats network for prediction to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two sequentially connected first stacks and second stacks, including: Inputting the normalized reconstructed component into the first stack to obtain a first stack prediction value and a stack remainder; inputting the stack remainder into the second stack to obtain a second superposition prediction value; Superimposing the first superimposed prediction value and the second superimposed prediction value to obtain the sub-prediction value; The first stack includes three sequentially connected basic blocks, and the reconstructed component after normalization is input into the first stack to obtain a first superposition prediction value and a stack remainder, including the following steps: Inputting the normalized reconstructed components into the basic block to obtain backcast output and forecast output respectively; The backcast output of each basic block is subtracted from the input of the current basic block, and the result is used as the input of the next basic block until it is used as the output of the first stack to obtain the stack remainder, and the forecast output of each basic block is directly added as the output of the first stack to obtain a first superposition prediction value; The second stack includes three basic blocks connected in sequence, and the stack remainder is input into the second stack to obtain a second superposition prediction value, including: Input the stack remainder to the basic block, and directly add the forecast output of each basic block as the output of the second stack to obtain a second superimposed forecast value; The N-beats network is optimized by the following steps: Initialize SSA parameters, including: maximum number of iterations, number of sparrows; Generate a spatial search matrix according to the parameters of the N-beats network to be optimized and the number of sparrows, wherein the parameters include: learning rate l, number of iterations k, number of neurons n; Calculate the fitness value of each sparrow and sort them to get the maximum value; Update the positions of the discoverer, joiner, and scout, obtain the global optimal position and update the optimal fitness value; Determine whether SSA meets the iteration termination condition. If so, the iteration is completed and the optimal solution is output. Otherwise, continue to iterate to find the optimal solution.
2. A short-term load forecasting method according to claim 1, characterized in that: Obtain historical load data before the time point to be predicted, including: Obtain the historical load data of the area in the previous year at the time point to be predicted, with a sampling period of once every hour.
3. A device for predicting short-term load, characterized in that: include: A historical load data acquisition module is used to acquire historical load data before the time point to be predicted; A preprocessing module, used for filling in missing values in the historical load data; A variational modal decomposition module is used to perform variational modal decomposition on the preprocessed historical load data to obtain multiple modal components; A permutation entropy reconstruction module, used to calculate the permutation entropy of the multiple modal components, and divide the multiple modal components into three modal component groups according to the size of the permutation entropy, and superimpose the modal components in each modal component group to obtain three reconstructed components; A sub-prediction value acquisition module, used for inputting each of the reconstructed components into the SSA-optimized N-beats network for prediction after normalization processing, to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two first stacks and a second stack connected in sequence; A prediction value acquisition module, used for superimposing each of the sub-prediction values to obtain the prediction value of the time point to be predicted; The pre-processed historical load data is subjected to variational modal decomposition to obtain multiple modal components, including: Determine the number of modal components obtained by decomposition through the center frequency observation method; Perform Hilbert transform on each of the modal components and obtain the single-sided spectrum of the analytical signal Transform the spectrum to baseband by multiplying the spectrum by an exponential signal estimated at the center frequency: By demodulating the signal H 1 Gaussian smoothing estimates the bandwidth, and its constrained variation problem can be expressed as: To solve the constrained variational problem of formula (1), we introduce the quadratic penalty factor α and the Lagrange multiplier λ(t) to transform it into an unconstrained variational problem for solution. The formula is as follows: Update u using the alternating direction multiplier method n ,ω n The value of is as follows: Where δ(t) is the unit pulse signal, n is the nth modal component obtained after signal decomposition, N is the total number of modal decompositions, and k is the number of iterations; w n is the center frequency of the mode, is the partial derivative operator symbol, α is the penalty factor, j is the unit of the imaginary number, is the convolution operator, λ is the Lagrange multiplier, f(ω) is the Fourier transform of f(t), u n (ω) is u n Fourier transform of (t), λ is ω n Fourier transform of (t); The calculation formula of the permutation entropy is as follows: Among them, H(m) represents the permutation entropy, m represents the embedding dimension, K is the number of different symbol sequences mapped in the m-dimensional phase space, and P j represents the probability of a sequence of symbols; Each of the reconstructed components is normalized and then input into the SSA-optimized N-beats network for prediction to obtain a sub-prediction value of each of the reconstructed components, wherein the N-beats network includes two sequentially connected first stacks and second stacks, including: Inputting the normalized reconstructed component into the first stack to obtain a first stack prediction value and a stack remainder; inputting the stack remainder into the second stack to obtain a second superposition prediction value; Superimposing the first superimposed prediction value and the second superimposed prediction value to obtain the sub-prediction value; The first stack includes three sequentially connected basic blocks, and the reconstructed component after normalization is input into the first stack to obtain a first superposition prediction value and a stack remainder, including the following steps: Inputting the normalized reconstructed components into the basic block to obtain backcast output and forecast output respectively; The backcast output of each basic block is subtracted from the input of the current basic block, and the result is used as the input of the next basic block until it is used as the output of the first stack to obtain the stack remainder, and the forecast output of each basic block is directly added as the output of the first stack to obtain a first superposition prediction value; The second stack includes three basic blocks connected in sequence, and the stack remainder is input into the second stack to obtain a second superposition prediction value, including: Input the stack remainder to the basic block, and directly add the forecast output of each basic block as the output of the second stack to obtain a second superimposed forecast value; The N-beats network is optimized by the following steps: Initialize SSA parameters, including: maximum number of iterations, number of sparrows; Generate a spatial search matrix according to the parameters of the N-beats network to be optimized and the number of sparrows, wherein the parameters include: learning rate l, number of iterations k, number of neurons n; Calculate the fitness value of each sparrow and sort them to get the maximum value; Update the positions of the discoverer, joiner, and scout, obtain the global optimal position and update the optimal fitness value; Determine whether SSA meets the iteration termination condition. If so, the iteration is completed and the optimal solution is output. Otherwise, continue to iterate to find the optimal solution.
4. An electronic device, characterized in that: include: at least one memory and at least one processor; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the at least one processor implements the steps of a short-term load forecasting method as described in any one of claims 1 to 2.
5. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a short-term load forecasting method as claimed in any one of claims 1 to 2 are implemented.
