Short-term day-ahead load forecasting model and method based on SDP-BiLSTM
By using the SDP-BiLSTM model and the SDP attention layer to analyze meteorological and historical load information, the problem of low accuracy in traditional forecasting methods is solved, and the accuracy and stability of short-term power load forecasting are improved.
Patent Information
- Application Number
- CN202411350502.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Traditional short-term day-ahead load forecasting methods suffer from low accuracy and poor stability, failing to meet the needs of complex power systems.
A short-term daytime load forecasting model based on SDP-BiLSTM is adopted. Feature extraction is performed using a two-layer BiLSTM. The model combines an SDP attention layer and an output layer, and analyzes the correlation between meteorological and historical load information through a scaling dot product attention mechanism to improve forecast accuracy.
It improves the accuracy and stability of short-term power load forecasting, significantly improves RMSE, MAE and MAPE indicators, and the forecast results are highly consistent with the actual load values.
Smart Images

Figure CN119202667B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of power system load prediction, and particularly relates to a short-term day-ahead load prediction model based on SDP-BiLSTM. BACKGROUND
[0002] Short-term day-ahead load prediction is a classic and important demand of the power system to ensure power supply and demand balance, guarantee power supply safety and optimize power dispatching, and plays a key role in ensuring the safe and economic operation of regional power grids and improving the utilization efficiency of new energy. Precise day-ahead load prediction is of great significance to the safe, stable and economic operation of the power system.
[0003] Traditional prediction methods have been unable to match the increasingly complex actual situation of the power system, and there is an urgent need for more accurate and stable methods to complete the short-term prediction demand in complex power grid environments. With the development of artificial intelligence, the combination of power load prediction and machine learning has become a popular academic topic, and using machine learning to study short-term power load prediction has become a new idea. SUMMARY
[0004] The purpose of the application is to solve the problem of low prediction accuracy and poor stability of traditional short-term day-ahead load prediction methods; the application provides a short-term day-ahead load prediction model based on SDP-BiLSTM and a prediction method.
[0005] The short-term day-ahead load prediction model based on SDP-BiLSTM includes:
[0006] The feature extraction layer includes two double-layer BiLSTMs, which are respectively used for feature extraction of the prediction date NWP sequence and the historical date power load sequence, and correspondingly obtain feature vectors H nwp and H load .
[0007] The SDP attention layer is used for linear transformation of the feature vector H nwp to convert it into a query vector Q, and is also used for linear transformation of the feature vector H load to convert it into a key vector K and a value vector V; the dot product score matrix is calculated by the dot product of the query vector Q and the key vector K, and the vector omega is obtained by scaling through the softmax function, and the intermediate vector C is calculated by the dot product of the vector omega and the value vector V. The feature vector H nwp is fused in a splicing manner to obtain the feature vector H SDP .
[0008] The output layer is used for feature vector H SDPThe feature extraction and full connection operation are sequentially performed to obtain the power load sequence corresponding to the predicted date.
[0009] Preferably,
[0010] Q = MLP1(H nwp ) = H nwp · W Q ;
[0011] K = MLP 2a (H load ) = H load · W K ;
[0012] V = MLP 2b (H load ) = H load · W V ;
[0013] wherein MLP1(·), MLP 2a (·) and MLP 2b (·) are linear transformations performed by the first to third perceptrophs, respectively, and W Q , W K , W V are scale-matched weight matrices obtained by back propagation of the first to third perceptrophs, respectively.
[0014] Preferably,
[0015]
[0016] wherein, s is a scaling factor, d K is the dimension of the key vector K, and (·) T is transposition.
[0017] Preferably, the feature extraction on the feature vector H SDP is implemented by using an LSTM.
[0018] Preferably, the predicted date NWP sequence is a sequence composed of all-day weather data of the predicted date, and the historical date power load sequence is a sequence composed of power load data corresponding to consecutive historical dates.
[0019] The power load prediction method implemented by using the short-term day-ahead load prediction model based on the SDP-BiLSTM comprises the following steps:
[0020] S1, obtaining a load-weather feature data set, wherein the input data of each sample in the load-weather feature data set is a power load sequence of consecutive historical dates and a NWP sequence of a predicted date, and the output data is a power load sequence corresponding to the predicted date;
[0021] S2, training the load prediction model by using the load-meteorological feature dataset;
[0022] S3, predicting the power load of the to-be-predicted date by using the trained load-meteorological feature dataset.
[0023] Preferably, the implementation of step S1, obtaining the load-meteorological feature dataset, is as follows:
[0024] S11, obtaining a historical load dataset and an NWP dataset;
[0025] S12, preprocessing the historical load dataset;
[0026] S13, determining the length of the sampling time window by decomposing the historical load dataset through a discrete Fourier method, analyzing the historical load dataset and the NWP dataset through a Pearson correlation coefficient analysis method, screening out the NWP dataset that is strongly correlated with the load, and merging the preprocessed historical load dataset to obtain the load-meteorological feature dataset.
[0027] Preferably, the preprocessing method for the dataset is: correcting abnormal values, filling in missing values, and performing normalization processing.
[0028] A power load prediction device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to realize the power load prediction method realized by the short-term day-ahead load prediction model based on the SDP-BiLSTM.
[0029] A computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed to realize the power load prediction method realized by the short-term day-ahead load prediction model based on the SDP-BiLSTM.
[0030] The present application has the following beneficial effects:
[0031] The present application provides a short-term day-ahead load prediction model and method based on SDP-BiLSTM, which introduces a scaled dot product attention mechanism into BiLSTM, so that the model can not only capture the time dependence in sequence data by using the ability of LSTM, but also dynamically analyze the correlation between NWP information and historical load information through the attention mechanism to extract important features, so that the accuracy of short-term power load prediction can be effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1A schematic diagram of the principle of the short-term day-ahead load prediction model based on the SDP-BiLSTM according to the present application;
[0033] Figure 2 A comparison line graph of the prediction result of the prediction model (i.e., the SDP-BiLSTM model) according to the present application and the actual load value. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the protection scope of the present application.
[0035] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0036] Reference is made to Figure 1 In the present embodiment, the short-term day-ahead load prediction model based on the SDP-BiLSTM includes:
[0037] The feature extraction layer includes two double-layer BiLSTMs, which are respectively used for feature extraction of the prediction date NWP sequence and the historical date power load sequence, and correspondingly obtain feature vectors H nwp and H load .
[0038] The SDP attention layer is used for linear transformation of the feature vector H nwp into a query vector Q, and is also used for linear transformation of the feature vector H load into a key vector K and a value vector V in two different scales; the dot product score matrix is calculated by dot product of the query vector Q and the key vector K, and the vector ω is obtained by scaling through the softmax function, and the intermediate vector C is calculated by dot product of the vector ω and the value vector V, and the feature vector H nwp is fused in a splicing manner to obtain a feature vector H SDP .
[0039] The output layer is used for feature extraction and full connection of the feature vector H SDP in sequence to obtain the power load sequence corresponding to the prediction date.
[0040] Specifically, the prediction date NWP sequence is a sequence composed of prediction date all-day weather data, and the historical date power load sequence is a sequence composed of power load data corresponding to consecutive historical dates. The weather data contained in the NWP sequence includes 36 meteorological elements such as temperature, relative humidity, snowfall, precipitation, ground pressure, cloud cover, wind speed, and wind direction; the time resolution of the NWP information is 1 hour.
[0041] In the embodiment, the scaled dot-product attention mechanism is introduced into the BiLSTM, so that the model can not only capture the time dependence in the sequence data by using the ability of the LSTM, but also dynamically analyze the correlation between the NWP information and the historical load information through the attention mechanism, extract important features, and effectively improve the accuracy of short-term power load prediction. The English full name of NWP is Numerical Weather Forecast, and the Chinese translation is numerical weather forecast.
[0042] Specifically, the BiLSTM of the prior art selected by the present application includes two BiLSTMs connected in series, and each BiLSTM includes a forward LSTM layer and a backward LSTM layer. The forward LSTM layer processes the sequence from the first time step, and updates its hidden state and cell state step by step. At each time step, the LSTM layer updates the state through its internal gating mechanism (input gate, forget gate, output gate) and generates output. The backward LSTM layer processes in reverse from the last time step of the sequence, and also updates its hidden state and cell state step by step. The update process of the backward LSTM layer is similar to that of the forward LSTM, but it processes the reverse order of the sequence. At each time step, the outputs of the forward and backward LSTM layers are combined, usually by concatenating the output vectors of the two directions. After passing through the LSTM layer, the combined state can be sent to one or more fully connected layers for the final prediction task, and the parameters of the output layer are also updated during the training process.
[0043] The expression for updating the state and generating the output of the LSTM layer through its internal gating mechanism (input gate, forget gate, output gate) is as follows:
[0044]
[0045] wherein C t is the forget gate, sigma is the sigmoid function, W f , W i , W c , W o are weight coefficients, b f is a bias parameter, [h t-1 , x th t-1 is the output of the last time step, t is a new vector connected by i t is the input gate, is the cell state of the current input, b i , b c , b o is the bias parameter, tanh is the hyperbolic function, C t is the cell state of the current time, C t-1 is the cell state of the last time, o t is the output gate, h t is the output.
[0046] The Bi-LSTM network adds a hidden layer that can backwardly pass information to the original LSTM network, converts the unidirectional LSTM layer into a bidirectional LSTM layer, more effectively learns the load-weather factor features in both directions, and is beneficial to improve the short-term power load prediction accuracy. The formula of the Bi-LSTM output gate is:
[0047] output: h (f&b)t = g(W f h ft + W b h bt + b);
[0048] wherein h ft and h bt represent the load prediction results of the forward and backward LSTM layers at t time; W f and W b are the weight coefficients of the forward and backward LSTM layers, b is the output bias matrix, h (f&b)t is the final output result of the Bi-LSTM weighted and combined by the activation function g.
[0049] Further, the feature extraction of the feature vector H SDP is realized by using LSTM.
[0050] Further, Q = MLP1(H nwp ) = H nwp · W Q ;
[0051] K = MLP 2a (H load ) = H load · W K ;
[0052] V = MLP 2b (H load ) = H load · WV ;
[0053] wherein, MLP1(·), MLP2(·) and MLP3(·) are linear transformations performed by the first to third perception machine layers, respectively, W1, W2 and W3 are weight matrices obtained by back propagation of the first to third perception machine layers, respectively. 2a 2b Q K V
[0054] Further, in order to stabilize the gradient and avoid entering the gradient vanishing region when the softmax function is scaled and normalized subsequently, the expression of the vector ω is:
[0055]
[0056] wherein, s is a scaling factor, d K is the dimension of the key vector K, (·) T is the transpose.
[0057] Specific implementation method two, see Figure 1 The present embodiment adopts the power load prediction method implemented by the short-term day-ahead load prediction model based on SDP-BiLSTM described in the specific implementation method one, and the method comprises the following steps:
[0058] S1, obtaining a load-weather feature data set, wherein the input data of each sample in the load-weather feature data set is a power load sequence of consecutive historical dates and an NWP sequence of a prediction date, and the output data is a power load sequence corresponding to the prediction date;
[0059] S2, training the load prediction model by using the load-weather feature data set;
[0060] S3, performing power load prediction for the prediction date by using the trained load-weather feature data set.
[0061] The NWP sequence of the prediction date is a sequence composed of all-day weather data of the prediction date, and the power load sequence of the historical date is a sequence composed of power load data corresponding to consecutive historical dates. Specifically, the number of consecutive historical dates is preferably 7 days.
[0062] Further, the implementation method of step S1, obtaining the load-weather feature data set, is as follows:
[0063] S11, obtaining a historical load data set and an NWP data set;
[0064] S12, pre-process the historical load dataset; specifically, the pre-processing manner of the dataset is: correcting abnormal values, filling missing values, and performing normalization processing;
[0065] S13, decompose the historical load dataset by a discrete Fourier method to determine a sampling time window length, analyze the historical load dataset and the NWP dataset by a Pearson correlation coefficient analysis method, screen out the NWP dataset strongly correlated with the load, and merge the pre-processed historical load dataset to obtain a load-weather feature dataset. The sampling time window length is a continuous historical date time length of 7 days.
[0066] Specific embodiment three, the power load prediction device described in the embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to realize the power load prediction method realized by the short-term day-ahead load prediction model based on SDP-BiLSTM as described in specific embodiment two.
[0067] Specific embodiment four, the computer-readable storage medium described in the embodiment stores a computer program, and the computer program is executed to realize the power load prediction method realized by the short-term day-ahead load prediction model based on SDP-BiLSTM as described in specific embodiment two.
[0068] Verification test:
[0069] Three evaluation indexes commonly used to evaluate the performance of short-term power load prediction models are used to evaluate the performance of the prediction model (i.e., SDP-BiLSTM model) of the application: root mean squared error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). The historical load-NWP data test set is input into the SDP-BiLSTM model and other 12 control group models to complete the generalization performance of the prediction model and the multi-angle analysis of the prediction results, so as to verify the effectiveness of the application.
[0070] The performance evaluation index results of the prediction model (i.e., SDP-BiLSTM model) and 12 kinds of models are shown in Table 1:
[0071] Table 1 Performance comparison of different models in various indexes
[0072]
[0073]
[0074] As can be seen from Table 1, the SDP-BiLSTM model proposed in the application has better performance than other comparative models in the time series modeling of various evaluation indexes. Specifically, the SDP-BiLSTM model shows a significant positive improvement of 9.36% to 53.49% in the index RMSE, and a significant positive improvement of 9.43% to 55.77% in the index MAE. The RMSE, MAE and 1-MAPE values of the SDP-BiLSTM model are 23.05, 18.05 and 94.49%, respectively, which are obviously better than those of other comparative models, verifying the feasibility and effectiveness of the prediction model of the application in short-term load prediction.
[0075] Figure 2 The historical load data is from a certain prefecture-level city in Heilongjiang Province located in the buffer zone of Xiaoxing'anling and Sanjiang Plain, and the power load data from January to October, 2023,
[0076] By Figure 2 It can be seen that the load prediction result of the load prediction model described in the embodiment has the trend of tracking the original data and high prediction accuracy.
[0077] Although the application is described herein with reference to particular embodiments, it should be understood that these examples are merely illustrative of the principles and applications of the present application. It should therefore be understood that numerous modifications can be made to the illustrative embodiments, and that other arrangements can be devised without departing from the spirit and scope of the application as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways other than the original claims describe. It should also be understood that features described in connection with one embodiment can be used in other described embodiments.
Claims
1. A short-term day-ahead load forecasting model based on SDP-BiLSTM, characterized in that, The load prediction model comprises: The feature extraction layer includes two double-layer BiLSTMs, and the two double-layer BiLSTMs are respectively used for feature extraction on the prediction date NWP sequence and the historical date power load sequence, and corresponding feature vectors H nwp and H load are obtained. SDP attention layer, used to convert the feature vector H nwp into a query vector Q, and also used to convert the feature vector H load into a key vector K and a value vector V through linear transformation of two different scales; the dot product score matrix is calculated by the dot product of the query vector Q and the key vector K, and the vector ω is obtained by scaling through the softmax function, the intermediate vector C is calculated by the dot product of the vector ω and the value vector V, and the final output vector Y is calculated by the dot product of the intermediate vector C and the feature vector H nwp The feature fusion is performed in a splicing manner to obtain the feature vector H SDP ; an output layer for outputting the feature vector H SDP The feature extraction and full connection operations are sequentially performed to obtain the power load sequence corresponding to the predicted date.
2. The SDP-BiLSTM-based short-term day-ahead load prediction model according to claim 1, characterized in that, Q = MLP1(H nwp ) = H nwp · W Q ; K = MLP 2a (H load ) = H load · W K ; V = MLP 2b (H load ) = H load · W V ; Among them, MLP1(·) and MLP 2a (·) and MLP 2b (·) represent the linear transformations performed on the first to third perceptron layers, respectively. Q W K W V The scale-matching weight matrices are obtained by backpropagation from the first to the third perceptron layers, respectively.
3. The SDP-BiLSTM-based short-term day-ahead load prediction model according to claim 1, characterized in that, wherein, s is a scaling factor, d K is the dimension of the key vector K, (·) T is the transpose. 4.The SDP-BiLSTM based short-term day-ahead load forecasting model according to claim 1, wherein, The feature vector H SDP The feature extraction is implemented using an LSTM. 5.The SDP-BiLSTM based short-term day-ahead load forecasting model according to claim 1, wherein, The prediction date NWP sequence is a sequence composed of prediction date all-day weather data, and the historical date power load sequence is a sequence composed of power load data corresponding to consecutive historical dates.
6. The method of claim 1, wherein the method of power load forecasting is implemented by the SDP-BiLSTM based short-term day-ahead load forecasting model. The method comprises the following steps: S1, obtaining a load-weather feature data set, wherein the input data of each sample in the load-weather feature data set is a power load sequence of consecutive historical dates and a NWP sequence of a prediction date, and the output data is a power load sequence corresponding to the prediction date; S2, training a load prediction model by using the load-weather feature data set; S3, predicting the power load of a to-be-predicted date by using the trained load-weather feature data set.
7. The power load forecasting method implemented by the short-term day-ahead load forecasting model based on SDP-BiLSTM according to claim 6, characterized in that, The implementation of step S1, obtaining the load-weather feature data set, is as follows: S11, obtaining a historical load data set and a NWP data set; S12, preprocessing the historical load data set; S13, determining the length of a sampling time window by decomposing the historical load data set by a discrete Fourier method, analyzing the historical load data set and the NWP data set by a Pearson correlation coefficient analysis method, screening out NWP data sets that are strongly correlated with the load, and merging the preprocessed historical load data set and the NWP data sets to obtain the load-weather feature data set.
8. The power load forecasting method implemented by the SDP-BiLSTM-based short-term day-ahead load forecasting model according to claim 7, characterized in that, The preprocessing of the data set is performed by correcting abnormal values, filling missing values, and normalizing the data.
9. An electric power load forecasting apparatus comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized by The processor executes the computer program to implement the power load prediction method using the SDP-BiLSTM-based short-term day-ahead load prediction model according to any one of claims 6 to 8.
10. A computer readable storage medium, characterized in that, The storage medium stores the computer program, and the computer program is executed to implement the power load prediction method using the SDP-BiLSTM-based short-term day-ahead load prediction model according to any one of claims 6 to 8.
Citation Information
Patent Citations
Short-term power load and carbon emission prediction method and system based on DCNN-LSTM-AE-AM
CN115936185A
Lithium ion battery degradation track and residual life prediction method, medium and equipment
CN118294840A