Short-term power load prediction method based on MIC algorithm and LSTM-ITCN model
By adopting MIC algorithm screening features and LSTM-ITCN model extraction features in short-term power load prediction, combined with the self-attention mechanism to give feature weights, solve the lack of accuracy and efficiency of existing methods, and achieve higher load predictions Accuracy and efficiency.
Patent Information
- Application Number
- CN202411439084.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-31
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-28
AI Technical Summary
The existing short-term power load prediction methods have insufficient accuracy and efficiency. Most methods only consider historical load data and weather data, ignoring the correlation between load data and other characteristic data and the intrinsic connection between each characteristic data.
Using a short-term power load prediction method based on the MIC algorithm and the LSTM-ITCN model, through pre-processing and correlation analysis of the original data, the characteristics of the characteristics of the load data are selected as the input, and the self-pretention pay attention The force mechanism gives different weights to the input features, combined with the LSTM and ITCN network extracting short-term and long-term sequential features, and finally constructed the LSTM-ITCN prediction model.
Effectively extracted the short -term and long -term features of data, improved the accuracy of load prediction, solved the model's overfitting risk, and improved the efficiency of load prediction.
Smart Images

Figure CN119382095A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of short-term load forecasting methods, and specifically is a method for short-term power load forecasting based on a MIC algorithm and an LSTM-ITCN model. Background Art
[0002] As the total amount of electricity consumed by electrical equipment within a certain period of time, power load forecasting is not only related to historical power load data, but also has an intrinsic connection with social, economic and meteorological factors. Short-term power load forecasting (STLF) refers to making accurate and scientific predictions of power load usage in the future under the premise of ensuring a certain degree of accuracy. The main purpose of short-term power load forecasting (STLF) is to improve the accuracy and management efficiency of power dispatching, narrow the gap between power generation and demand, reduce power loss, and improve the economy, safety and stability of the power grid system. With the urgency of environmental pollution and the depletion of fossil energy, different renewable energy sources such as wind power and solar energy are being incorporated into the power system. However, due to the extremely high uncertainty of renewable energy, the current power system is more complex than the traditional one. As the power system becomes more complex, achieving accurate and reliable short-term power load becomes a major challenge.
[0003] Initially, short-term power load was mainly predicted by time series models, such as linear regression, autoregressive moving average model and Kalman filter, etc. However, due to the simple structure of the model and poor nonlinear mapping ability, the power load could not be accurately predicted. With the emergence and development of various deep learning algorithms in recent years, the current short-term power load is mainly predicted by deep learning methods. For example, Kaur et al. proposed the use of support vector regression (SVR) and variational mode decomposition (VMD) to realize the application of electric vehicle charging load prediction. Sheng et al. proposed a neural network framework based on improved deep residual network (DRN) and long short-term memory (LSTM). The experimental results show that the framework improves the accuracy of short-term load prediction. Zang et al. proposed a prediction method combining long short-term memory neural network (LSTM) and self-attention mechanism (SAM) to predict residential load, and used historical load data and meteorological data as input features to improve the prediction accuracy. Massaoudi et al. proposed a short-term load prediction method combining light gradient booster (LGBM), extreme gradient booster and multi-layer perceptron (MLP). The simulation results show that this method has high prediction accuracy, but it takes a long time and has a heavy computational burden. Huang et al. proposed a short-term load forecasting method that combines convolutional neural network (CNN) with load range discretization. The results show that this method obtains a more reliable and clearer load probability distribution, which is beneficial to various decision-making activities in the power system. In order to improve the accuracy of short-term load forecasting, Javed et al. proposed a short-term load forecasting model of dilated causal convolution (SRDCC) network and bidirectional long short-term memory (BiLSTM) network. Wan et al. proposed a short-term power load forecasting method that combines CNN, LSTM and attention mechanism to solve the problem of information loss caused by too long input time series data. However, the accuracy of these load forecasting methods is usually limited, so in many cases they only rely on historical load data. However, the accuracy of short-term load forecasting is not only related to historical load data, but also has a certain relationship with meteorological characteristics, electricity prices and date characteristics. Accurate analysis of the intrinsic relationship between various characteristics helps to improve the accuracy of short-term load forecasting. For example, Wang et al. proposed a forecasting method that combines temporal convolutional network (TCN) and lightweight gradient boosting machine (LightGBM) to forecast the power load of industrial customers. The input of the model takes into account factors such as historical load data, meteorological data and date characteristics. Simulation results show that this method has high prediction accuracy. Niu et al. proposed a short-term energy load forecasting method based on the attention mechanism optimization of the convolutional neural network-bidirectional gated recurrent unit (CNN-BiGRU) model, which takes into account the impact of multiple energy sources and achieves excellent forecasting performance.In order to fully extract the correlation between metering and load data, Jahani et al. proposed a fixed hybrid sequence pattern mining-long short-term memory network (SPM-LSTM) short-term load forecasting method. The proposed method uses past consumption, temperature, humidity and wind speed data as input features to improve the prediction efficiency. Ma et al. proposed a combined prediction method combining discrete wavelet transform (DWT), temporal convolutional network (TCN) and support vector regression based on particle swarm optimization (PSO_SVR) to predict railway traction load and take weather factors into account. In order to improve the accuracy of short-term load forecasting, Hua et al. took temperature, humidity and historical load data into account and proposed a short-term load forecasting method based on parallel convolutional neural network (CNN) and gated recurrent unit (GRU) with improved residual neural network (iResNet). Although the prediction accuracy of this method is improved, the prediction time is increased.
[0004] With the continuous application of deep learning algorithms in the field of load forecasting, there are more and more short-term load forecasting methods. However, most of these forecasting methods only consider the use of historical load data or other weather data, but ignore the correlation between load data and other feature data and the correlation between each feature data. They do not deeply analyze the intrinsic connection between the data and use more or less feature data, resulting in poor prediction accuracy and low prediction efficiency. Summary of the invention
[0005] In order to solve the above-mentioned technical problems of poor power load prediction accuracy and low prediction efficiency, the purpose of the present invention is to provide a method for short-term power load prediction based on the MIC algorithm and the LSTM-ITCN model, preprocess the collected raw data, introduce the MIC algorithm to perform correlation analysis on the feature data preprocessed in step one, screen out features with greater correlation with the load data features as the input of the model, construct a data set with the feature data screened in step two, input the training set after weighting in step three into the LSTM network to extract short-term time series features, and then extract long-term time series features through the ITCN network, and make predictions, and continuously adjust the hyperparameters of the LSTM-ITCN prediction model constructed in step four during model training to obtain the optimal model, and input the test set after the Self-Attention mechanism in step five into the optimal model obtained in step five for prediction to obtain the final load prediction value, which has the effect of analyzing multiple external features on the power load, and effectively extracts the short-term and long-term features of the data, improves the prediction accuracy of the power load, solves the risk of model overfitting, and effectively improves the load prediction efficiency.
[0006] The technical solution adopted by the present invention to achieve the above technical purpose is as follows: Step 1: First, the collected raw data is preprocessed, and the preprocessing method includes data cleaning, interpolation of missing values, repair of outliers and data normalization operations; Step 2: Introduce the MIC algorithm to perform correlation analysis on the feature data preprocessed in Step 1, and screen out the features with greater correlation with the load data features as the input of the model; Step 3: Construct a data set with the feature data screened in Step 2, 80% of the data set is used as a training set, and 20% is used as a test set, and the feature data in the training set and the test set are analyzed using the Self-Attention mechanism. Different weights are assigned according to the weights; Step 4: Input the training set assigned weights in Step 3 into the LSTM network to extract short-term time series features, and then extract long-term time series features through the ITCN network, and make predictions, where the input data is the feature data screened out in Step 2, and the output is the load forecast value; Step 5: Continuously adjust the hyperparameters of the LSTM-ITCN prediction model constructed in Step 4 during training to obtain the optimal model; Step 6: Input the test set in Step 5 that has passed the Self-Attention mechanism into the optimal model obtained in Step 5 for prediction to obtain the final load forecast value.
[0007] Further optimization, the original data in step 1 includes eight characteristic data including historical load, temperature, humidity, rainfall, dew point, wind speed, month and atmospheric pressure, and each characteristic is sampled at intervals of 1 hour.
[0008] Further optimization, the preprocessing of the data set in step 1 first cleans the data; secondly, a clustering-based method is used to detect missing and outlier values. If the object does not belong to any cluster, the object is regarded as an outlier, and then the outlier is regarded as a missing value and interpolated using the Lagrange interpolation method; finally, the "Min Max Scaler" method is used to normalize the data to a range between 0 and 1.
[0009] For further optimization, the eight characteristic data of historical load, temperature, humidity, rainfall, dew point, wind speed, month and atmospheric pressure collected in step 2 are used to calculate the MIC value between the characteristics using a formula; then the calculated MIC value is plotted into a heat map; finally, the characteristics whose MIC value with the load data exceeds 0.3, indicating a strong correlation with the load data, are used as input features of the model.
[0010] Further optimization, in step three, the self-attention output matrix of the five input features of temperature, dew point, atmospheric pressure, month and historical load is calculated respectively according to the output matrix of the self-attention mechanism and the normalization function; then, different weight coefficients are assigned to different features according to the correlation between the features and the load data to highlight the key features; finally, the weighted self-attention output matrix is spliced into a comprehensive feature vector and input into the prediction model.
[0011] Further optimization, the basic unit of LSTM in step 3 includes a forget gate, an input gate, and an output gate. The forget gate determines whether the past state information is discarded. The calculation formula is: t =σ(ω f ·[h t-1 ,x t ]+b f ), where x t is the information input at the current time t, h t-1 is the result of the last output, ω f and b f is the forget gate weight matrix and bias vector, σ is the sigmiod function, f t is the activation vector of the forget gate; the input gate and the forget gate play a decisive role in whether the LSTM network can remember long-term dependent data. The calculation formula of the input gate is i t =σ(ω i ·[h t-1 ,x t ]+b i ), the current memory unit calculation formula is is the current memory unit, where ω i and ω c is the weight matrix, i t is the activation vector of the input gate, where C t For the new memory unit, is the current memory unit, b i and b c is the bias vector of the input gate, tanh is the hyperbolic tangent activation function; after determining the information, the output gate will output to the external state, and the output gate calculation formula is as follows, o t =σ(ω o ·[h t-1 ,x t ]+b o ), where ω o is the weight matrix, b o is the bias vector, o t is the activation vector of the output gate.
[0012] For further optimization, the five input data of dew point, temperature, atmospheric pressure, month and load data in step 4 are first input into the LSTM network after being weighted by the self-attention mechanism to extract the features of the data in the short time dimension.
[0013] Further optimization, in the step 4, first, ITCN removes the TCN multi-residual block structure and only retains one residual block, thereby improving the computational efficiency by reducing the number of residual blocks; secondly, the first ReLu function in the residual block is changed to a Leaky ReLu function; finally, the second ReLu function in the residual block is changed to two parallel activation functions, thereby increasing the nonlinear transformation capability of the entire model and improving the prediction accuracy of the model.
[0014] Further optimization, the causal convolution in step 4 ensures the causal relationship of the extracted features, that is, the output y at time t t The dilated causal convolution of a TCN that depends only on the input before time t is calculated as: Where x is the input sequence, d is the dilation factor, k is the convolution kernel size, f(i) is the i-th element in the convolution kernel, and x s-d·i Convolutions that only represent past states.
[0015] For further optimization, in step 5, the Adam optimizer is used to continuously adjust the model's hyperparameters when training the model to achieve the target error and obtain the optimal model.
[0016] Compared with the prior art, the present invention has the following beneficial effects:
[0017] 1) The present invention constructs an LSTM-ITCN prediction model to select several characteristic factors with high correlation with historical load data as input, thereby reducing the waste of resources, effectively extracting the short-term and long-term characteristics of the data, and improving the load prediction accuracy;
[0018] 2) The present invention analyzes the correlation between various features, including load data features, meteorological features, and date features, through the MIC algorithm, selects characteristic factors with greater correlation with load data features as inputs of the prediction model, and introduces a self-attention mechanism to assign different weights to the input features, making full use of the correlation between the input features and solving the risk of model overfitting;
[0019] 3) The present invention removes multiple residual block structures of TCN, retains only one residual block, and improves the activation function structure therein into a parallel structure, thereby effectively improving the load forecasting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of short-term load forecasting based on MSLIT of the present invention;
[0021] Figure 2 It is a short-term load forecasting framework diagram based on MSLIT of the present invention;
[0022] Figure 3 This is a heat map of the MIC correlation analysis of the present invention;
[0023] Figure 4 This is a structural diagram of the self-attention mechanism of the present invention;
[0024] Figure 5 It is a schematic diagram of the LSTM structure of the present invention;
[0025] Figure 6 Figures 1 and 2 are the TCN structure (a) and ITCN structure (b) of the present invention;
[0026] Figure 7 It is a diagram of the prediction results of different models in the experiment of the present invention;
[0027] Figure 8 is a histogram of prediction errors of different models in the experiment of the present invention;
[0028] Fig. 9 It is a graph showing the calculation time variation of different models in the experiment of the present invention;
[0029] Fig.10 These are the prediction results of different models for the Luoyang city data set in the experiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments that can be easily changed or replaced by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The structures, proportions, sizes, etc. illustrated in the drawings of the specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. Any modification of the structure, change of the proportional relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0031] At the same time, it should be noted that, unless otherwise specified, "multiple" means two or more; the directions or positional relationships indicated by the terms "upper", "lower", "left", "right", "front end", "rear end", etc. are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention. Changes or adjustments in their relative relationships shall also be regarded as the scope of the implementation of the present invention without substantially changing the technical content.
[0032] A method for short-term power load forecasting based on MIC algorithm and LSTM-ITCN model, such as Figure 1 As shown in the figure, step 1: first pre-process the collected raw data, and the pre-processing method includes data cleaning, interpolation of missing values, repair of outliers and data normalization operations; step 2: introduce the MIC algorithm to perform correlation analysis on the feature data pre-processed in step 1, and select features with greater correlation with load data features as the input of the model; step 3: construct a data set with the feature data selected in step 2, 80% of the data set as the training set, and 20% as the test set, and use the Self-Attention mechanism to assign different weights to the feature data in the training set and the test set; step 4: input the training set with weights assigned in step 3 into the LSTM network to extract short-term time series features, and then extract long-term time series features through the ITCN network, and make predictions, wherein the input data is the feature data selected in step 2, and the output is the load forecast value; step 5: the LSTM-ITCN prediction model constructed in step 4 continuously adjusts the model's hyperparameters during the training model to obtain the optimal model; step 6: input the test set after the Self-Attention mechanism in step 5 into the optimal model obtained in step 5 for prediction, and obtain the final load forecast value. The present invention proposes a new hybrid method MSLIT for short-term load forecasting, analyzes the influence of multiple external features on load forecasting, and constructs an LSTM-ITCN forecasting model for the first time, effectively extracts the short-term and long-term features of the data, and improves the load forecasting accuracy; introduces the MIC algorithm to analyze the correlation between various features, including load data features, meteorological features, and date features, screens out feature factors with greater correlation with load data features as inputs of the forecasting model, and introduces a self-attention mechanism to assign different weights to the input features, fully utilizes the correlation between the input features, and solves the risk of model overfitting; in view of the problem of low TCN prediction efficiency, the present invention improves the TCN network structure, removes multiple residual block structures of TCN, retains only one residual block, and improves the activation function structure therein into a parallel structure, effectively improving the load forecasting efficiency.
[0033] In step 3, the self-attention output matrix of the five input features of temperature, dew point, atmospheric pressure, month and historical load is calculated according to the self-attention mechanism output matrix and the normalization function; then, different weight coefficients are assigned to different features according to the correlation between the features and the load data to highlight the key features; finally, the weighted self-attention output matrix is spliced into a comprehensive feature vector and input into the prediction model. The structure of the self-attention mechanism is as follows: Figure 4 As shown, the calculation formula is as follows: Among them, Attention(Q,K,V) is the output matrix of the self-attention mechanism; softmax(·) represents the softmax function; Q represents the query vector matrix, which is used to measure the correlation between each element in the input and other elements, representing the position or element to be queried; K represents the correlation feature matrix, which is used to represent each element in the input and is used to measure the relationship between the query vector and the input element; V represents the semantic feature matrix, which contains the information of each element in the input and is used to generate the fused feature vector according to the weighted calculation of the attention weight; d k is the scaling factor; T is the matrix transpose symbol. The softmax function in the above formula is a normalization function, and the softmax calculation formula is as follows: Where z represents an n-dimensional vector; i and j are the i-th and j-th elements of vector z. The self-attention mechanism output matrix and normalization function respectively calculate the self-attention output matrix of the five input features of temperature, dew point, atmospheric pressure, month and historical load. These matrices contain the complex dependencies within and between each feature; then, according to the correlation between the feature and the load data, different weight coefficients are assigned to different features to highlight the key features; finally, the weighted self-attention output matrix is spliced into a comprehensive feature vector and input into the prediction model to select several feature factors with high correlation with historical load data as input, which reduces the waste of resources and helps to improve the accuracy of short-term load forecasting.
[0034] like Figure 5 As shown, the basic unit of LSTM in step 3 includes a forget gate, an input gate, and an output gate. The forget gate determines whether the past state information is discarded. The calculation formula is: t =σ(ω f ·[h t-1 ,x t ]+b f ), where x t is the information input at the current time t, h t-1 is the result of the last output, ω f and b f is the forget gate weight matrix and bias vector, σ is the sigmiod function, ft is the activation vector of the forget gate; the input gate and the forget gate play a decisive role in whether the LSTM network can remember long-term dependent data. The calculation formula of the input gate is i t =σ(ω i ·[h t-1 ,x t ]+b i ), the current memory unit calculation formula is is the current memory unit, where ω i and ω c is the weight matrix, i t is the activation vector of the input gate, where C t For the new memory unit, is the current memory unit, b i and b c is the bias vector of the input gate, tanh is the hyperbolic tangent activation function; after determining the information, the output gate will output to the external state, and the output gate calculation formula is as follows, o t =σ(ω o ·[h t-1 ,x t ]+b o ), where ω o is the weight matrix, b o is the bias vector, o t is the activation vector of the output gate, o t is the activation vector of the output gate. The closer its value is to 0, the smaller the external state h t The more you can get from memory unit C t The five input data, dew point, temperature, atmospheric pressure, month and load data, are first input into the LSTM network after being weighted by the self-attention mechanism to extract the features of the data in the short time dimension.
[0035] Example 1
[0036] A method for short-term power load forecasting based on MIC algorithm and LSTM-ITCN model, such as Figure 1 and Figure 2 As shown, the raw data in step 1 includes eight characteristic data, namely, historical load, temperature, humidity, rainfall, dew point, wind force, month and atmospheric pressure, and each characteristic is sampled at intervals of 1 hour. Before constructing the data set, a large amount of data is first collected. In order to better improve the prediction accuracy, a variety of influencing factors are comprehensively considered, and eight characteristic data including historical load, temperature, humidity, rainfall, dew point, wind force, month and atmospheric pressure are selected. Each characteristic is sampled at intervals of 1 hour, with 24 data values per day, totaling 8760 data values.
[0037] The preprocessing of the data set in step 1 first cleans the data; secondly, a clustering-based method is used to detect missing and outlier values. If the object does not belong to any cluster, the object is regarded as an outlier, and then the outlier is regarded as a missing value and interpolated using the Lagrange interpolation method; finally, the "Min Max Scaler" method is used to normalize the data to a range between 0 and 1. The calculation formula of "Min Max Scaler" is as follows: Where x is the measured value, x scaled is the scaling value, x max and x min It is the maximum and minimum value of the data. The preprocessed data can not only prevent the data with high value range from dominating, but also improve the calculation speed and convergence speed of the prediction model in the training stage.
[0038] Example 2
[0039] This embodiment is an improved solution based on the embodiment 1. Its main structure is the same as that of the embodiment 1. The improvement is as follows: Figure 3 As shown, the eight characteristic data of historical load, temperature, humidity, rainfall, dew point, wind speed, month and atmospheric pressure collected in step 2 are used to calculate the MIC value between the characteristics using a formula; then the calculated MIC value is plotted into a heat map; finally, the characteristics with a MIC value of more than 0.3 with the load data are used as the input features of the model, indicating a strong correlation with the load data. The MIC algorithm can effectively detect the linear or other functional relationship between two variables. The calculation formula of the MIC algorithm is as follows: Where h x and h y are the values of the input sequences x and y respectively; F(·) is the mutual information function; p(·) is the probability density distribution function; a and b are h x and h y The number of discretizations in the direction; F MIC (x,y) is the MIC value of input sequence x and y.
[0040] from Figure 3From the heat map, it can be seen that the correlation strength between each feature data and the load data is different. The MIC values of temperature, dew point and load data are 0.43 and 0.37 respectively, indicating that they have a strong nonlinear correlation with the load data and are very important features; the MIC values of atmospheric pressure and month and load data also reach 0.32 and 0.35, indicating that they also have a strong correlation with the load data; while the MIC value of humidity and wind speed and load data is only 0.29, and the correlation with the load data is weak, so it can not be used as an input feature; the MIC value of rainfall and load data is only 0.11, and the correlation is very weak, and it is not suitable as a model input. In summary, this paper selects temperature, dew point, atmospheric pressure, month and historical load as the input features of the model. These features have a strong nonlinear correlation with the load data, which is conducive to improving the prediction accuracy of the model. At the same time, this feature selection can also avoid introducing too many redundant features and reduce the computational complexity of the model.
[0041] Example 3.
[0042] This embodiment is an improved solution based on the embodiment 1. Its main structure is the same as that of the embodiment 1. The improvement is as follows: Figure 3 and Figure 6 As shown in the figure, the five input data of dew point, temperature, atmospheric pressure, month and load data in step 4 are first input into the LSTM network after being weighted by the self-attention mechanism to extract the features of the data in the short time dimension. The output of LSTM is used as the input of ITCN to continue to extract the long time series features of the five feature data and make the final prediction.
[0043] like Figure 6As shown in the figure, in step 4, first, ITCN removes the TCN multi-residual block structure and only retains one residual block, thereby improving the computational efficiency by reducing the number of residual blocks; secondly, the first ReLu function in the residual block is changed to a Leaky ReLu function; finally, the second ReLu function in the residual block is changed to two parallel activation functions, thereby increasing the nonlinear transformation ability of the entire model and improving the prediction accuracy of the model. TCN is an improved network model based on convolutional neural network (CNN), with a unique dilated causal convolution structure, which is more suitable for solving long time series problems. The TCN structure consists of multiple residual blocks, each residual module includes a dilated causal convolution layer, a weight normalization layer, a ReLU activation function layer and a Dropout layer. The weight normalization layer eliminates the problem of gradient disappearance or explosion, the ReLU activation function makes the TCN network nonlinear, and the Dropout layer prevents overfitting and can achieve a regularization effect. The residual tensor dimension is adjusted differently through 1×1 convolution. However, the TCN structure consists of multiple residual blocks, which causes the TCN network to consume a large amount of memory during calculation, increase calculation time, and have the problem of low prediction efficiency.
[0044] like Figure 6 As shown, the causal convolution in step 4 ensures the causal relationship of the extracted features, that is, the output y at time t t The dilated causal convolution of a TCN that depends only on the input before time t is calculated as: Where x is the input sequence, d is the dilation factor, k is the convolution kernel size, f(i) is the i-th element in the convolution kernel, and x s-d·i A convolution that only represents past states. In a dilated causal convolution layer, the dilated convolution takes the input of the previous layer and expands it to extract features from data at a longer interval. The causal convolution ensures the causal relationship of the extracted features, that is, the output y at time t t Depends only on the input before time t.
[0045] The two activation functions use the PReLu function and the Tanh function respectively. These two activation functions have stronger nonlinear transformation capabilities than the ReLu function, and the PReLu function has an adjustable hyperparameter α, which can flexibly adjust the nonlinear transformation capability of the model.
[0046] In step 5, the Adam optimizer is used to continuously adjust the hyperparameters of the model when training the model so that the target error is achieved and the optimal model is obtained. The Adam optimizer can quickly and accurately minimize the loss function and improve the training effect and generalization ability.
[0047] To evaluate the performance of the model, the present invention uses mean absolute error (MAE), root mean square error (RMSE) and R 2The three evaluation indicators are used to evaluate the prediction results of different models. RMSE is more sensitive to outliers, and MAE is better at explaining the model. The smaller the values of RMSE and MAE, the better the prediction effect and the more accurate the model prediction. 2 The closer the value is to 1, the stronger the model's ability to explain the target variable. The indicator formula is as follows: Among them, y t is the actual observed value. is the predicted value. is the mean of the observed values. n is the number of test data.
[0048] In order to verify the effectiveness of the proposed method, the LSTM-ITCN (Proposed model) model proposed in this invention is simulated on the same data set with CNN-BIGRU, CNN-LSTM, CNN-GRU-IResNet and LSTM-TCN models, and the prediction results are analyzed. Among them, the learning rate lr of the prediction model is 0.0008, the dropout is 0.2, the batch size is 64, the Adam algorithm is used to train the hyperparameters, and the maximum number of iterations is 600. Table 1 shows the evaluation index values of different models.
[0049] Table 1 Prediction error index values of different models
[0050] It can be seen from the model evaluation index values in Table 1 that the prediction model proposed in this invention has lower RMSE and MAE than other prediction models. Among them, the RMSE and MAE of the model proposed in this article are 28.51KW and 16.80KW respectively. Compared with the CNN-GRU-IResNet, CNN-LSTM, CNN-BIGRU, and LSTM-TCN models, the RMSE of the LSTM-ITCN model is reduced by 2.18, 5.0, 3.01 and 2.51KW respectively, and the MAE is reduced by 1.05, 1.76, 1.31 and 1.21KW respectively. The simulation results show that the LSTM-ITCN model proposed in this article has higher load prediction accuracy than other prediction models. The prediction model proposed in this article has higher load prediction accuracy than other prediction models. 2The value is also at the maximum value, which shows that the LSTM-ITCN model has better explanatory power for the target variable than other prediction models. Compared with the TCN network, the ITCN network removes a large number of residual blocks and only retains a residual structure, which makes the improved temporal convolutional network more computationally efficient. The newly designed activation function structure in the ITCN network not only makes up for the problem of reduced prediction accuracy caused by fewer residual blocks, but also improves the load prediction accuracy. From the data in Table 1, it can be seen that the prediction accuracy of the LSTM-ITCN model is 8.8% higher than that of the LSTM-TCN model.
[0051] like Figure 7 As shown, the prediction result diagrams of different models show that each model can fit the actual load value well in the rising and falling stages. It shows that these models can accurately predict the future load change trend, which has important reference value for the operation and planning of the power system. However, compared with the deviation of other models at the peak or trough of the actual load, the model proposed in the present invention can better fit and capture the trend of the actual load. The peak and trough are not only the turning points of the curve, but also the most difficult position for the model to predict. The peak of the power load indicates the increase of residential activities and factory productivity, which will be subject to various interferences. Between the falling and rising stages, the time range of the trough of the power load is usually very short. In this case, some factors are unpredictable events, such as sudden changes in load, etc. These factors will inevitably increase the difficulty of load prediction. For this reason, the prediction method proposed in the present invention takes into account a variety of feature influencing factors, makes full use of the correlation between each feature, effectively extracts the time features in the sequence, and improves the accuracy of load prediction.
[0052] like Figure 8 As shown in the figure, the prediction error histograms of different models. From the sub-graphs (a) and (b) in the figure, it can be intuitively seen that the prediction model proposed in this paper has a smaller prediction error value. The simulation results further prove that the short-term load forecasting method based on MSLIT proposed in this paper effectively improves the accuracy of power load forecasting and is a feasible power load forecasting method.
[0053] Table 2 Computation time of different models
[0054] As shown in Table 2, the calculation time of each model shows that compared with the LSTM-TCN model, the calculation time of the LSTM-ITCN model is reduced by 178.41%, which shows that the improved TCN network has higher calculation efficiency than the TCN network; compared with CNN-LSTM, CNN-GRU-IResNet and CNN-BIGRU, the calculation time of LSTM-ITCN is reduced by 12.33%, 41.49% and 25.64% respectively.
[0055] like Fig. 9 As shown in the figure, the change process of the calculation time of different models increases with the number of iterations. It can be seen intuitively from the figure that the model proposed in the present invention has always been in a shorter calculation time. As the number of iterations increases, the calculation time of each model also increases. It can be seen from the figure that the more complex the model structure is, the more calculation time it requires. The LSTM-ITCN model proposed in the present invention removes multiple residual block structures of the TCN network, making it more concise, thereby having higher calculation efficiency, and the improved TCN network activation function structure allows it to have higher prediction accuracy. The simulation results further prove that the short-term load forecasting method based on MSLIT proposed in this paper has high prediction accuracy and calculation efficiency, and has broad application prospects.
[0056] Table 3 Prediction error index values of different models
[0057] As shown in Table 3, the prediction error index values of different models show that the model proposed in the present invention has the smallest RMSE and MAE, and the largest R 2 Compared with the four models of CNN-GRU-IResNe, CNN-LSTM, CNN-BIGRU and LSTM-TCN, the RMSE of the LSTM-ITCN model was reduced by 7.35, 17.87, 15.23 and 11.22KW, and the MAE was reduced by 1.87, 8.93, 5.58 and 3.80KW, respectively. The results show that the prediction performance and generalization ability of the LSTM-ITCN model are significantly better than those of other prediction models; Compared with the four models of CNN-GRU-IResNe, CNN-LSTM, CNN-BIGRU and LSTM-TCN, the R 2 The values are increased by 0.818%, 7.877%, 4.228% and 2.495% respectively. The results show that the model proposed in this paper has better fitting ability.
[0058] like Fig.10 As shown, the prediction result of the model proposed in the present invention is closest to the true value curve and has good prediction performance.
[0059] Table 4 Computation time of different models for Luoyang city dataset
[0060] As shown in Table 4, the model proposed in this invention uses the least computation time and has higher prediction efficiency. Compared with the CNN-LSTM, CNN-GRU-IResNet, CNN-BIGRU and LSTM-TCN models, the LSTM-ITCN computation time is reduced by 21.70%, 40.81%, 8.39% and 82.43% respectively. The simulation results further prove that the short-term load forecasting method based on MSLIT proposed in this paper has high prediction accuracy and prediction efficiency and good generalization ability, and is a feasible power load forecasting method.
[0061] It should be noted that the MIC algorithm and LSTM-ITCN model described in the present invention are not limitations of the present invention. Based on this purpose, technicians in this field can effectively extract short-term and long-term characteristics of data through other similar MIC algorithms and LSTM-ITCN model methods to improve the load forecasting accuracy.
[0062] The above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Those skilled in the art should understand that the specific implementation modes of the present invention may be modified or replaced by equivalents with reference to the above embodiments. Any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention are within the scope of protection of the claims of the present invention.
Claims
1. A method for short-term power load forecasting based on MIC algorithm and LSTM-ITCN model, characterized by: Step 1: First, preprocess the collected raw data. The preprocessing methods include data cleaning, interpolation of missing values, repair of outliers and data normalization operations; Step 2: Introduce the MIC algorithm to perform correlation analysis on the feature data preprocessed in step 1, and select features with greater correlation with load data features as the input of the model; Step 3: Use the feature data selected in step 2 to construct a data set, with 80% of the data set used as a training set and 20% used as a test set. Use the Self-Attention mechanism to assign different weights to the feature data in the training set and the test set. Step 4: Input the training set with weights assigned in step 3 into the LSTM network to extract short-term time series features, and then extract long-term time series features through the ITCN network, and make predictions. The input data is the feature data selected in step 2, and the output is the load forecast value. Step 5: When training the LSTM-ITCN prediction model constructed in step 4, continuously adjust the model's hyperparameters to obtain the optimal model; Step 6: Input the test set that has passed the Self-Attention mechanism in step 5 into the optimal model obtained in step 5 for prediction to obtain the final load forecast value.
2. According to claim 1, a method for short-term power load forecasting based on MIC algorithm and LSTM-ITCN model is characterized by: The original data in step 1 includes eight characteristic data including historical load, temperature, humidity, rainfall, dew point, wind speed, month and atmospheric pressure, and each characteristic is sampled at intervals of 1 hour.
3. The method for short-term power load forecasting based on the MIC algorithm and the LSTM-ITCN model according to claim 1 is characterized in that: In the step 1, the preprocessing of the data set first cleans the data; secondly, a clustering-based method is used to detect missing and outlier values. If the object does not belong to any cluster, the object is regarded as an outlier, and then the outlier is regarded as a missing value and interpolated using the Lagrange interpolation method; finally, the "Min Max Scaler" method is used to normalize the data to a range between 0 and 1.
4. The method for short-term power load forecasting based on the MIC algorithm and the LSTM-ITCN model according to claim 1 is characterized in that: The eight characteristic data of historical load, temperature, humidity, rainfall, dew point, wind speed, month and atmospheric pressure collected in the step 2 are used to calculate the MIC value between the characteristics using a formula; then the calculated MIC value is plotted into a heat map; finally, the characteristics whose MIC value with the load data exceeds 0.3, indicating that they have a strong correlation with the load data, are used as input features of the model.
5. The method for short-term power load forecasting based on the MIC algorithm and the LSTM-ITCN model according to claim 1 is characterized in that: In the step three, the self-attention output matrix of the five input features of temperature, dew point, atmospheric pressure, month and historical load is calculated respectively according to the output matrix of the self-attention mechanism and the normalization function; then, different weight coefficients are assigned to different features according to the correlation between the features and the load data to highlight the key features; finally, the weighted self-attention output matrix is spliced into a comprehensive feature vector and input into the prediction model.
6. The method for short-term power load forecasting based on the MIC algorithm and the LSTM-ITCN model according to claim 5 is characterized in that: The basic unit of LSTM in step 3 includes a forget gate, an input gate, and an output gate. The forget gate determines whether the past state information is discarded. The calculation formula is: t =σ(ω f ·[h t-1 ,x t ]+b f ), where x t is the information input at the current time t, h t-1 is the result of the last output, ω f and b f is the forget gate weight matrix and bias vector, σ is the sigmiod function, f t is the activation vector of the forget gate; the input gate and the forget gate play a decisive role in whether the LSTM network can remember long-term dependent data. The calculation formula of the input gate is i t =σ(ω i ·[h t-1 ,x t ]+b i ), the current memory unit calculation formula is is the current memory unit, where ω i and ω c is the weight matrix, i t is the activation vector of the input gate, where C t For the new memory unit, is the current memory unit, b i and b c is the bias vector of the input gate, tanh is the hyperbolic tangent activation function; after determining the information, the output gate will output to the external state, and the output gate calculation formula is as follows, o t =σ(ω o ·[h t-1 ,x t ]+b o ), where ω o is the weight matrix, b o is the bias vector, o t is the activation vector of the output gate.
7. The method for short-term power load forecasting based on the MIC algorithm and the LSTM-ITCN model according to claim 1 is characterized in that: In the step 4, the five input data of dew point, temperature, atmospheric pressure, month and load data are first input into the LSTM network after being weighted by the self-attention mechanism to extract the features of the data in the short time dimension.
8. The method for short-term power load forecasting based on the MIC algorithm and the LSTM-ITCN model according to claim 1 is characterized in that: In the step 4, first, ITCN removes the TCN multi-residual block structure and only retains one residual block, thereby improving the computational efficiency by reducing the number of residual blocks; secondly, the first ReLu function in the residual block is changed to the LeakyReLu function; finally, the second ReLu function in the residual block is changed to two parallel activation functions, thereby increasing the nonlinear transformation capability of the entire model and improving the prediction accuracy of the model.
9. The method for short-term power load forecasting based on the MIC algorithm and the LSTM-ITCN model according to claim 8 is characterized in that: The causal convolution in step 4 ensures the causal relationship of the extracted features, that is, the output y at time t t The dilated causal convolution of a TCN that depends only on the input before time t is calculated as: Where x is the input sequence, d is the dilation factor, k is the convolution kernel size, f(i) is the i-th element in the convolution kernel, and x s-d·i Convolutions that only represent past states.
10. The method for short-term power load forecasting based on the MIC algorithm and the LSTM-ITCN model according to claim 1 is characterized in that: In step 5, the Adam optimizer is used to continuously adjust the hyperparameters of the model when training the model so that the target error is achieved and the optimal model is obtained.
Citation Information
Cited By
Hybrid LSTM power grid load prediction method
CN120657744A
Power load prediction method and device, and electronic equipment
CN120749738A