A hybrid lstm power grid load forecasting method

By combining dynamic regularization and attention mechanisms, a hybrid LSTM method is used to solve the problems of high computational complexity and low prediction accuracy of LSTM models in smart grid load forecasting, achieving more efficient and accurate load forecasting, especially with improvements under nonlinear and non-stationary data.

CN120657744BActive Publication Date: 2026-04-14LESHAN NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LESHAN NORMAL UNIV
Filing Date
2025-06-13
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing LSTM models have high computational complexity and long training time in smart grid load forecasting, making it difficult to effectively capture short-term dynamic changes. Furthermore, their prediction accuracy is limited, and they cannot effectively adapt to the complex fluctuations and noise in grid load data.

Method used

A hybrid LSTM method is adopted, combining dynamic regularization and attention mechanisms. By randomly initializing weights and bias vectors, the model is trained using a sliding window and optimized using dynamic regularization parameters. The attention mechanism is used to assign different weights to key time points in the time series, thereby improving the model's adaptability and robustness.

Benefits of technology

It effectively improves the accuracy and efficiency of smart grid load forecasting, especially when dealing with nonlinear and non-stationary data, significantly improving the accuracy and stability of forecasts and reducing noise interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_94
    Figure SMS_94
  • Figure SMS_95
    Figure SMS_95
  • Figure QLYQS_1
    Figure QLYQS_1
Patent Text Reader

Abstract

The application belongs to the field of smart grids. The application provides a hybrid LSTM power grid load prediction method. The method combines a dynamic regularization mechanism and an attention mechanism, effectively improving the performance of the LSTM model in smart grid load prediction. The dynamic regularization mechanism can adaptively adjust the regularization strength according to the dynamic characteristics of the data, avoiding the overfitting or underfitting problems caused by the fixed regularization parameter in traditional methods, and has a significant advantage in long-term dependence modeling. At the same time, the attention mechanism assigns different weights to key time points in the time series, so that the model pays more attention to data points that have a greater impact on the prediction results, effectively capturing short-term changes and reducing noise interference. It can effectively improve the accuracy and efficiency of smart grid load prediction, especially when dealing with nonlinear and non-stationary power grid load data, showing stronger adaptability and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart grids, specifically relating to a hybrid LSTM grid load forecasting method. Background Technology

[0002] As a crucial component of modern power systems, smart grids enable automated management and optimized dispatch of electricity. With the increasing proportion of renewable energy and the rapid growth in electricity demand, smart grids face increasingly complex load forecasting challenges. Accurate load forecasting not only helps optimize power resource allocation and improve the economics of the power system but also ensures the stability and reliability of power supply. However, the load data of smart grids typically exhibits complex characteristics such as non-stationarity, posing numerous challenges to load forecasting.

[0003] Existing methods for smart grid load forecasting mainly include traditional statistical methods and deep learning methods based on machine learning. Traditional methods, such as autoregressive (AR) and autoregressive moving average (ARMA) models, have certain advantages in handling linear and stationary data. However, as the complexity of grid load data increases, the adaptability and prediction accuracy of these methods decrease significantly. Furthermore, deep learning methods based on neural networks, such as Long Short-Term Memory (LSTM) networks and Convolutional Neural Networks (CNN), have been widely applied to time series forecasting in recent years. However, the application of existing deep learning models such as LSTM in smart grid load forecasting still faces several challenges. First, traditional LSTM models suffer from high computational complexity and long training times, especially on large-scale datasets, resulting in low training efficiency. Second, LSTM models have a weak ability to capture short-term dynamic changes and struggle to effectively handle complex nonlinear variations, leading to limited prediction accuracy. Therefore, existing technologies cannot effectively balance short-term and long-term dependencies, nor can they effectively adapt to the complex fluctuations and noise in grid load data, resulting in low prediction accuracy and impacting the scheduling and operational efficiency of the smart grid. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a hybrid LSTM power grid load forecasting method that can effectively improve the accuracy and efficiency of smart grid load forecasting.

[0005] The technical solution adopted by this invention to solve its technical problem is as follows: the hybrid LSTM power grid load forecasting method includes the following steps:

[0006] A. Obtain the power grid load time series dataset from the current time t back a certain historical period. ;

[0007] B. Randomly initialize the weight matrix from the input layer to the hidden layer. and the bias vector of the hidden layer ;

[0008] , ;

[0009] in yes The elements are from a uniform distribution. Obtained by random sampling;

[0010] , ;

[0011] in yes The elements are from a uniform distribution. Obtained by random sampling; express The value space of ; N represents the number of hidden layer nodes; d represents the dimension of the input time series;

[0012] C. Initialize the window;

[0013] Initialize the input data for the first window and target tags :

[0014] ;

[0015] ;

[0016] in Indicates the window size of the sliding window;

[0017] D. Calculate the initial output matrix H0 of the hidden layer;

[0018] ;in, Indicates the activation function;

[0019] E. Calculate the initial weight matrix from the hidden layer to the output layer. ;

[0020] ;in yes Moore-Penrose pseudo-inverse;

[0021] F. The optimized weight matrix from the input layer to the hidden layer is obtained as follows: and the bias vector of the optimized hidden layer ;

[0022] , ,in Indicates the learning rate;

[0023] , ;

[0024] in , Represents a vector whose elements are all 1s; ,in It is a mask matrix. It is the Hadamard product;

[0025] G. The updated weight matrix from the input layer to the hidden layer is obtained through the following training method. Bias vector of hidden layer Weight matrix from hidden layer to output layer The specific training methods are as follows:

[0026] Set the starting position of the sliding window Set the maximum number of sliding windows. Slide the window in sequence Repeat steps G01 to G02.

[0027] G01, Sliding window update;

[0028] Update input data and target tags :

[0029] ;

[0030] ;

[0031] G02, Training Parameters and The inner loop;

[0032] Set the number of iterations for the inner loop. For each internal iteration Repeat steps G021 to G022.

[0033] G021: Calculate the updated weight matrix from the hidden layer to the output layer. :

[0034] ;

[0035] in, This represents the dynamic regularization parameter. ; These are the model coefficients of the dynamic regularization parameters; where , , It contains all data from the beginning to the current window; This indicates that the variance of this data column has been calculated;

[0036] This represents the output of the weighted hidden layer. , Indicates attention weights, ; Represents the variance of the sliding window. ;

[0037] This represents the output matrix of the hidden layer. ;

[0038] G022: Calculating and updating the input-to-hidden-layer weight matrix based on dynamic regularization. The updated bias vector of the hidden layer ;

[0039] ;

[0040] ;

[0041] in, , ;

[0042] ;

[0043] H. Calculate the grid load value at time t+1 using the following formula. ;

[0044] , ;

[0045] in, express The space of values; It is the transpose of H. The dimension is ;

[0046] in, This represents the updated weight matrix from the input layer to the hidden layer. This represents the bias vector of the updated hidden layer. .

[0047] The beneficial effects of this invention are as follows: The hybrid LSTM power grid load forecasting method described in this invention combines a dynamic regularization mechanism and an attention mechanism, effectively improving the performance of the LSTM model in smart grid load forecasting. The dynamic regularization mechanism can adaptively adjust the regularization strength according to the dynamic characteristics of the data, avoiding the overfitting or underfitting problems caused by fixed regularization parameters in traditional methods, especially showing significant advantages in long-term dependency modeling. At the same time, the attention mechanism assigns different weights to key time points in the time series, making the model pay more attention to data points that have a greater impact on the prediction results, thereby effectively capturing short-term changes and reducing noise interference. It can effectively improve the accuracy and efficiency of smart grid load forecasting, especially when dealing with nonlinear and non-stationary power grid load data, showing stronger adaptability and robustness. Detailed Implementation

[0048] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0049] The ETTh dataset is an authoritative dataset in the field of smart grid load data. This invention uses the publicly available smart grid load dataset ETTh from the Kaggle platform to obtain high-voltage, medium-voltage, and low-voltage side load and oil temperature information of two power transformers from July 2016 to July 2018, with a sampling frequency of once per hour. The method of this invention selects transformer oil temperature (OT) as the target variable for prediction. OT is a key indicator reflecting the operating status of the transformer, and its changing trend directly affects the health of the equipment and the stability of the power grid. By analyzing historical OT data, future oil temperature changes can be effectively predicted, thus providing important information for equipment maintenance and power grid dispatching.

[0050] The hybrid LSTM power grid load forecasting method of the present invention includes the following steps:

[0051] A. The obtained time series data consists of the first 100 data points from the ETTh dataset. The first 99 data points are used as training data, and the 100th data point is used for prediction and validation. The obtained time series data is shown in Table 1.

[0052] Table 1 OT Time Series Data

[0053]

[0054] The parameter settings involved in this embodiment are shown in Table 2:

[0055] Table 2 Parameter Settings

[0056]

[0057] B. Randomly initialize the weight matrix from the input layer to the hidden layer. and the bias vector of the hidden layer ;

[0058] , ;

[0059] in yes The elements are from a uniform distribution. Obtained by random sampling;

[0060] , ;

[0061] in yes The elements are from a uniform distribution. Obtained by random sampling; express The value space of ; N represents the number of hidden layer nodes; d represents the dimension of the input time series;

[0062] This embodiment initializes the weight matrix from the input layer to the hidden layer. and the bias vector of the hidden layer As shown below:

[0063] ;

[0064] ;

[0065] C. Initialize the window;

[0066] Initialize the input data for the first window and target tags :

[0067] ;

[0068] ;

[0069] in Indicates the window size of the sliding window;

[0070] This embodiment initializes the input data for the first window. and target tags As shown below:

[0071] ;

[0072] D. Calculate the initial hidden layer output matrix H.0;

[0073] ;in, Indicates the activation function;

[0074] The output matrix H0 of the initial hidden layer is calculated in this embodiment as follows:

[0075]

[0076] E. Calculate the initial weight matrix from the hidden layer to the output layer. ;

[0077] ;in yes Moore-Penrose pseudo-inverse;

[0078] The weight matrix from the hidden layer to the output layer is calculated in this embodiment. As shown below:

[0079] ;

[0080] F. The optimized weight matrix from the input layer to the hidden layer is obtained as follows: and the bias vector of the optimized hidden layer ;

[0081] , ,in Indicates the learning rate;

[0082] , ;

[0083] in , Represents a vector whose elements are all 1s; ,in It is a mask matrix. It is the Hadamard product;

[0084] The optimized weight matrix from the input layer to the hidden layer in this embodiment is obtained. and the bias vector of the optimized hidden layer As shown below:

[0085] ;

[0086] ;

[0087] G. The updated weight matrix from the input layer to the hidden layer is obtained through the following training method. Bias vector of hidden layer Weight matrix from hidden layer to output layer The specific training methods are as follows:

[0088] Set the starting position of the sliding window Set the maximum number of sliding windows. Slide the window in sequence Repeat steps G01 to G02.

[0089] G01, Sliding window update;

[0090] Update input data and target tags :

[0091] ;

[0092] ;

[0093] G02, Training Parameters and The inner loop;

[0094] Set the number of iterations for the inner loop. For each internal iteration Repeat steps G021 to G022.

[0095] G021: Calculate the updated weight matrix from the hidden layer to the output layer. :

[0096] ;

[0097] in, This represents the dynamic regularization parameter. ; These are the model coefficients of the dynamic regularization parameters; where , , It contains all data from the beginning to the current window; This indicates that the variance of this data column has been calculated;

[0098] This represents the output of the weighted hidden layer. , Indicates attention weights, ; Represents the variance of the sliding window. ;

[0099] This represents the output matrix of the hidden layer. ;

[0100] G022: Calculating and updating the input-to-hidden-layer weight matrix based on dynamic regularization. The updated bias vector of the hidden layer ;

[0101] ;

[0102] ;

[0103] in, , ;

[0104] ;

[0105] In this embodiment, the updated weight matrix from the input layer to the hidden layer is obtained through training. Bias vector of hidden layer Weight matrix from hidden layer to output layer As shown below:

[0106] ;

[0107] ;

[0108] ;

[0109] H. Calculate the grid load value at time t+1 using the following formula. ;

[0110] , ;

[0111] in, express The space of values; It is the transpose of H. The dimension is ;

[0112] in, This represents the updated weight matrix from the input layer to the hidden layer. This represents the bias vector of the updated hidden layer. After inputting the 89th to 99th data points, the prediction is obtained. =28.9129, the actual value of the 100th data point is 28.9130, and the prediction relative error is... .

[0113] Therefore, the hybrid LSTM power grid load forecasting method described in this invention combines dynamic regularization and attention mechanisms, effectively improving the performance of LSTM models in smart grid load forecasting. The dynamic regularization mechanism can adaptively adjust the regularization strength according to the dynamic characteristics of the data, avoiding overfitting or underfitting problems caused by fixed regularization parameters in traditional methods, especially showing significant advantages in long-term dependency modeling. At the same time, the attention mechanism assigns different weights to key time points in the time series, making the model pay more attention to data points that have a greater impact on the prediction results, thereby effectively capturing short-term changes and reducing noise interference. It can effectively improve the accuracy and efficiency of smart grid load forecasting, especially when dealing with nonlinear and non-stationary power grid load data, showing stronger adaptability and robustness.

[0114] The embodiments described above merely illustrate the implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A hybrid LSTM power grid load forecasting method, characterized in that, Includes the following steps: A. Obtain the power grid load time series dataset from the current time t back a certain historical period. ; B. Randomly initialize the weight matrix from the input layer to the hidden layer. and the bias vector of the hidden layer ; , ; in yes The elements are from a uniform distribution. Obtained by random sampling; , ; in yes The elements are from a uniform distribution. Obtained by random sampling; express The value space of ; N represents the number of hidden layer nodes; d represents the dimension of the input time series; C. Initialize the window; Initialize the input data for the first window and target tags : ; ; in Indicates the window size of the sliding window; D. Calculate the initial output matrix H0 of the hidden layer; ;in, Indicates the activation function; E. Calculate the initial weight matrix from the hidden layer to the output layer. ; ;in yes Moore-Penrose pseudo-inverse; F. The optimized weight matrix from the input layer to the hidden layer is obtained as follows: and the bias vector of the optimized hidden layer ; , ,in Indicates the learning rate; , ; in , Represents a vector whose elements are all 1s; ,in It is a mask matrix. It is the Hadamard product; G. The updated weight matrix from the input layer to the hidden layer is obtained through the following training method. Bias vector of hidden layer Weight matrix from hidden layer to output layer The specific training methods are as follows: Set the starting position of the sliding window Set the maximum number of sliding windows. Slide the window in sequence Repeat steps G01 to G02. G01, Sliding window update; Update input data and target tags : ; ; G02, Training Parameters and The inner loop; Set the number of iterations for the inner loop. For each internal iteration Repeat steps G021 to G022. G021: Calculate the updated weight matrix from the hidden layer to the output layer. : ; in, This represents the dynamic regularization parameter. ; These are the model coefficients of the dynamic regularization parameters; where , , It contains all data from the beginning to the current window; This indicates that the variance of this data column has been calculated; This represents the output of the weighted hidden layer. , Indicates attention weights, ; Represents the variance of the sliding window. ; This represents the output matrix of the hidden layer. ; G022: Calculating and updating the input-to-hidden-layer weight matrix based on dynamic regularization. The updated bias vector of the hidden layer ; ; ; in, , ; ; H. Calculate the grid load value at time t+1 using the following formula. ; , ; in, express The space of values; It is the transpose of H. The dimension is ; in, This represents the updated weight matrix from the input layer to the hidden layer. This represents the bias vector of the updated hidden layer. .

Citation Information

Patent Citations

  • Short-term power load prediction method and system

    CN118137492A

  • Power load prediction method and device of power system and electronic equipment

    CN118157115A