Short-term power load prediction method based on improved BI-LSTM combined model
By improving the BI-LSTM combination model, combining feature engineering and particle swarm algorithm optimization parameters, the attention mechanism is used to improve the model performance, solving the limitations of the existing power load prediction methods in dealing with complex factors and improving prediction accuracy, and achieving high-precision short-term power load prediction and power resource scheduling.
Patent Information
- Application Number
- CN202510021256.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing power load prediction methods have limitations in dealing with complex factors and improving prediction accuracy, especially in feature selection and parameter adjustment. The deep learning methods have high requirements for data volume and training time, making it difficult to meet the real-time prediction needs.
The short-term power load prediction method based on the improved BI-LSTM combination model was adopted, and the main features were extracted through feature engineering such as PCA dimensionality reduction and Pearson correlation verification; the model parameters were optimized in combination with the particle swarm algorithm, and the attention mechanism was used to improve the model performance.
High-quality and high-precision load prediction is achieved, and accurate multi-step prediction of the half-hour power load in the next week can help power system operators reasonably dispatch power resources and ensure the reliability and stability of supply.
Smart Images

Figure CN119853013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of short-term power system load forecasting, and is particularly applicable to a short-term power load forecasting method based on an improved BI-LSTM combined model. Background Art
[0002] The current power system cannot store a large amount of electric energy for a long time. The entire production, distribution and consumption process must be completed synchronously, which places high demands on the operation and planning of the power system. The unavoidable problem in the power system dispatching arrangement is how to achieve the balance between power generation and power consumption under the premise of ensuring the needs of people's daily life and social production activities. In general, the power system will predict the power load for a period of time in the future, and formulate the working indicators of various types of generators according to the prediction results to ensure efficient and stable power generation and demand. The research results show that a 1% increase in load forecasting accuracy can save power companies tens of millions of yuan in power generation costs. Therefore, continuously improving the power load forecasting method to improve the accuracy of load forecasting not only plays an important role in ensuring residents' lives and production and saving energy, but also has important significance for enterprises to reduce costs and improve efficiency.
[0003] At present, the methods of power load forecasting mainly include two categories: classical methods and modern forecasting methods. Among them, classical methods include time series method, regression analysis method, trend extrapolation forecasting, etc.; modern forecasting methods include grayscale forecasting, support vector machine, artificial neural network, combined forecasting, etc.
[0004] Classic time series models, such as ARIMA and VAR, are still the main methods for power load forecasting, but their ability to handle complex factors is limited. Machine learning-based methods, such as BP neural network and support vector machine (SVM), can handle nonlinear relationships and have relatively high prediction accuracy, but they have high requirements for feature selection and parameter adjustment. Deep learning methods, such as recurrent neural network (RNN) and long short-term memory network (LSTM), have the ability to process sequence data and can make full use of historical data information, with higher prediction accuracy, but they have high requirements for data volume and training time.
[0005] Related research is constantly trying new methods and technologies to improve the accuracy and reliability of power load forecasting. Summary of the invention
[0006] The purpose of the present invention is to provide a short-term power load forecasting method based on an improved BI-LSTM combined model to process information more comprehensively and filter useful information more accurately, so as to further improve the accuracy and reliability of power load forecasting.
[0007] To achieve the above object, the present invention adopts the following technical solutions: The short-term power load forecasting method based on the improved BI-LSTM combined model of the present invention comprises the following steps: S1, sort and extract sample data of the selected time period; S2, fill missing values, repair outliers, and normalize the sample data, and divide them into training set, validation set, and test set; S3, extract sample data features through feature engineering, use PCA analysis to reduce feature dimensionality, and then use Pearson analysis to verify the correlation of the reduced features to determine the main features; S4, build a short-term power load forecasting model, use the particle swarm algorithm to determine the optimal parameters of the model; use the attention mechanism to improve the model performance and performance; S5, using the optimal parameters, the short-term power load forecasting model is obtained using the training set, the validation set and the test set; S6, predict future power load using short-term power load forecasting model.
[0008] Furthermore, the sample data Furthermore, the missing value filling expression is: in, It is represented by the power load value sampled at time t on day w, It is represented by the power load value sampled at time t+n on day w, It is represented by the power load value sampled at time t+j on day w.
[0009] Furthermore, the normalization processing formula is: in, is the standardized data; is the number of features of the power load data; is the average index of the data feature; is the standard deviation of the data.
[0010] Furthermore, step S3 specifically includes: S3.1, calculate the covariance matrix of the normalized sample data and obtain the corresponding feature matrix; S3.2, calculate the eigenvalues and corresponding eigenvectors of the covariance matrix; S3.3, calculate the proportion of the variance of each eigenvalue, sort the eigenvalues by size, and select the eigenvectors corresponding to the first k eigenvalues as the principal components; S3.4, calculate the Pearson correlation coefficient to verify the correlation between the selected features and the load.
[0011] Furthermore, the S4-step short-term power load forecasting model includes a convolutional neural network, a recurrent neural network, and a long short-term memory neural network.
[0012] The advantage of the present invention is that it uses the feature engineering method of PCA dimensionality reduction to reconstruct and screen features to explore the implicit relationship between feature sequences and eliminate reconstructed features with weak correlation, thereby achieving high-quality and high-precision load forecasting, and realizing accurate multi-step forecasting of power load at the half-hour level for the next week, helping power system operators to reasonably dispatch power resources and ensure the reliability and stability of supply. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 The present invention is a schematic diagram of the application process of the network instant speed-up service in the method of the present invention. DETAILED DESCRIPTION
[0014] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0015] The short-term power load forecasting method based on the improved BI-LSTM combined model of the present invention comprises: S1, constructs a sample data set with year, month, day, hour and minute as the period, and sorts and extracts the sample data of the selected time period.
[0016] S2, fill in missing values and repair outliers in the input data of the sample data; normalize the processed data and divide it into training set, validation set and test set.
[0017] The expression of the missing data filling method is: in, Expressed as w day t The power load value sampled at every moment, Expressed as w day t + n The power load value sampled at every moment, Expressed as w day t + j The power load value sampled at each moment.
[0018] The formula for normalizing the sample data is: in, is the standardized data; is the number of features of the power load data; is the average index of the data feature; is the standard deviation of the data.
[0019] S3, perform feature engineering on the sample data set, use PCA to reduce the dimension of the reconstructed data features, and use the Pearson analysis method to verify the correlation of the reduced data features to determine the main characteristic factors that affect the load.
[0020] The PCA method reduces the dimension of the reconstructed data features by: S3.1, calculate the covariance matrix of the normalized data. Use the covariance matrix to compare the load data and obtain the corresponding characteristic matrix. The calculation formula is: in: ; W is the covariance matrix of the standardized data; is the number of features of the power load data; is each feature; j is the number of features; p is the number of influencing factors of each sequence; feature and The variance calculation formula is: Where: k is the kth sample data; is the variance; n is the number of feature sequences.
[0021] feature and The covariance calculation formula is: The covariance between each feature constitutes the corresponding matrix, which is the covariance matrix, and the calculation formula is: Where: C is the covariance matrix; is the covariance of the first feature in the dataset; represents the covariance of the p-th feature.
[0022] S3.2, the calculation formula for the eigenvalues and corresponding eigenvectors of the covariance matrix is: in, is the covariance matrix, is the characteristic value, is the feature vector.
[0023] S3.3, calculate the proportion of each feature variance, the formula is: in, is the variance of each component.
[0024] S3.4, calculate the Pearson coefficient between two variables, the formula is: in: X , Y is a variable, cov() is the covariance, E is the mathematical expectation, For variables X , Y The correlation coefficient between .
[0025] Select features from the dataset for correlation analysis.
[0026] S4, construct a short-term power load forecasting model, use the particle swarm algorithm to optimize parameters, and use the found optimal parameter combination in the model to forecast power load; The short-term power load forecasting model includes a convolutional neural network, a recurrent neural network, and a long short-term memory neural network. In the model parameter optimization algorithm, the calculation formula of the one-dimensional convolution in the convolutional neural network is: in is the convolution kernel matrix, is the input time series.
[0027] The two-dimensional convolution calculation formula is: in is the convolution kernel matrix, is the input data matrix.
[0028] The recurrent neural network expression is: in, X is the input vector; S is the hidden vector; A and B is the weight matrix; f is the activation function of the hidden layer.
[0029] in: f is the activation function of the hidden layer; w is the weight matrix.
[0030] in, E is the output error; h is the activation function of the output layer; s is the hidden layer state; V Parameters for output results; W is the weight matrix; f is the activation function of the hidden layer.
[0031] in, S is the hidden layer state; X is the input vector.
[0032] The long short-term memory neural network expression is: in: and is the weight matrix; is the bias term; is the sigmoid activation function, and are the input gate and candidate cell states, respectively. For the Gate of Forgetfulness, and are the output gate and the new cell state, respectively. is the Hadamard product.
[0033] The particle swarm algorithm's parameter optimization calculation formula for the short-term power load forecasting model is: The calculation formula for iterative update of particle velocity and position messages is: in, w is the inertia factor; c 1 ,c 2 is the learning factor; r 1 and r 2 is a distributed random number.
[0034] S45. The attention mechanism is expressed as: in, is the hidden layer state vector, h 1 , h 2 , h 3 is the state value of the hidden layer corresponding to the input sequence; a 1 、a 2 is the weight coefficient of each hidden layer state in the new hidden layer state. Indicates time i Hidden layer state The energy value determined by the vector, and is the weight coefficient matrix at time i; is the bias value at time i.
[0035] The weight calculation formula for each feature at the current moment is: in, is the weight of the sutra element; is the bias coefficient; q represents the number of hidden neurons in the last layer of the Bi-LSTM network.
[0036] Use the attention score softmax The calculation formula of the same dimension is: Finally, the current weight is multiplied by the corresponding feature and output Xt : in, Score for attention, is the input sequence.
[0037] S5, using optimal parameters, inputting the training set, validation set and test set as historical feature values into the short-term power load forecasting model for model training, and evaluating the model through the loss function to obtain the model weight that minimizes the overall error of the training samples.
[0038] S6, using the power load data of the area to be tested as input of the short-term power load forecasting model to obtain a forecast result.
Claims
1. A short-term power load forecasting method based on an improved BI-LSTM combined model, characterized in that: The following steps are included: S1, sort and extract sample data of the selected time period; S2, fill missing values, repair outliers, and normalize the sample data, and divide them into training set, validation set, and test set; S3, extract sample data features through feature engineering, use PCA analysis to reduce feature dimensionality, and then use Pearson analysis to verify the correlation of the reduced features to determine the main features; S4, build a short-term power load forecasting model, use the particle swarm algorithm to determine the optimal parameters of the model, and use the attention mechanism to improve the model performance and performance; S5, using the optimal parameters, the short-term power load forecasting model is obtained using the training set, the validation set and the test set; S6, predict future power load using short-term power load forecasting model.
2. According to claim 1, a short-term power load forecasting method based on an improved BI-LSTM combined model is characterized in that: The sample data.
3. The short-term power load forecasting method based on the improved BI-LSTM combined model according to claim 1 is characterized in that: The missing value filling expression is: in, It is represented by the power load value sampled at time t on day w, It is represented by the power load value sampled at time t+n on day w, It is represented by the power load value sampled at time t+j on day w.
4. The short-term power load forecasting method based on the improved BI-LSTM combined model according to claim 1 is characterized in that: The normalization processing formula is: in, is the standardized data; is the number of features of the power load data; is the average index of the data feature; is the standard deviation of the data.
5. The short-term power load forecasting method based on the improved BI-LSTM combined model according to claim 1 is characterized in that: Step S3 specifically includes: S3.1, calculate the covariance matrix of the normalized sample data and obtain the corresponding feature matrix; S3.2, calculate the eigenvalues and corresponding eigenvectors of the covariance matrix; S3.3, calculate the proportion of the variance of each eigenvalue, sort the eigenvalues by size, and select the eigenvectors corresponding to the first k eigenvalues as the principal components; S3.4, calculate the Pearson correlation coefficient to verify the correlation between the selected features and the load.
6. The short-term power load forecasting method based on the improved BI-LSTM combined model according to claim 1 is characterized by: The S4-step short-term power load forecasting model includes convolutional neural network, recurrent neural network and long short-term memory neural network.
Citation Information
Patent Citations
Diversified load interval prediction method and device
CN112734141A