Power load forecasting method based on load mining and LSTM neural network

By using load mode mining and periodically enhancing LSTM neural network in short-term power load prediction, the problem of inaccurate power short-term power load prediction in the prior art is solved, and higher prediction accuracy and optimized utilization of power system equipment are achieved. .

CN115549082BActive Publication Date: 2025-02-07POWER ECONOMIC RESEARCH INSTITUTE OF JILIN ELECTRIC POWER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211316020.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-02-07
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

The prior art has inaccurate problems in the short-term power load prediction, which has affected the utilization and scheduling performance of power system equipment.

Method used

The power load prediction method based on load mode mining and periodically enhanced LSTM neural network is adopted. By obtaining historical load data, data preprocessing and dimensionality reduction, the number of load modes is determined, and the improved FCM clustering method is used for clustering to build periodically enhanced LSTM Neural network model, using load data from the previous day for prediction.

Benefits of technology

It improves the accuracy of short-term power load prediction, enhances the utilization and scheduling performance of power system equipment, and can effectively process the complexity and periodic characteristics of power load data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115549082B_ABST
    Figure CN115549082B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting electric load based on load mining and LSTM neural network, including: dividing the acquired historical load data set into a test set and a training set; constructing a new matrix, clustering by using an improved FCM clustering method, and constructing K* subsets; respectively constructing K* load predictors based on improved LSTM; and building an improved periodic enhanced LSTM neural network model; and training the improved periodic enhanced LSTM neural network; obtaining a predicted value through the trained periodic enhanced LSTM neural network model, according to the load curve of the day before the test day, the meteorological data of the day to be tested, and the determined prediction period. Aiming at the complex characteristics of electric load data, the present invention establishes an electric load prediction model combining clustering and deep learning, proposes a periodic enhanced LSTM neural network, and realizes accurate prediction of the load of the next day by using the information of the previous day.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power data analysis, and in particular to a power load prediction method, device, terminal equipment and storage medium based on load pattern mining and periodically enhanced LSTM neural network. Background Art

[0002] The main purpose of power load forecasting is to estimate the development trend of load. It needs to be based on the fluctuations of the power grid system itself and the factors affecting the load, and combined with the historical load data of the power system, the operating characteristics of the power grid, the change law of the load itself and natural conditions, to build a mathematical forecasting model. Power load forecasting usually includes four types: long-term, medium-term, short-term and ultra-short-term. Among them, short-term forecast refers to daily forecast, which is usually directly related to the operating status and dispatch planning of the power system; the higher the forecast accuracy, the better the utilization and dispatch performance of power system equipment. The fluctuation of short-term power load will be affected by many factors, which are nonlinear, with significant complexity and lag, which leads to randomness in the time series of load; it has a great impact on the results of load forecasting; in addition, massive, mixed and irregular data also affect the efficiency and real-time performance of load forecasting.

[0003] Therefore, the existing technology still needs to be improved and developed. Summary of the invention

[0004] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a method, device, terminal equipment and storage medium for power load forecasting based on load pattern mining and periodically enhanced LSTM neural network are provided, aiming to solve the problem of inaccurate short-term power load forecasting in the prior art.

[0005] The technical solution adopted by the present invention to solve the problem is as follows:

[0006] A method for power load forecasting based on load mining and LSTM neural network, wherein the method comprises:

[0007] S1. Obtain historical load data set;

[0008] S2, dividing the acquired historical load data set into a test set and a training set; combining the load curves of two consecutive days in the training set into one as a new training set, thereby constructing a new matrix, and then performing dimensionality reduction processing on the new matrix to obtain a feature matrix after dimensionality reduction;

[0009] S3. Based on the feature matrix after dimension reduction, determine the load pattern quantity interval, use the improved FCM clustering method for clustering, use the clustering effectiveness index to determine the optimal clustering result, and construct K* subsets to determine K* load patterns;

[0010] S4, input the obtained K* load patterns into K* LSTM layers respectively, and construct K* load predictors based on improved LSTM respectively;

[0011] S5. An improved cycle-enhanced LSTM neural network model is built by constructing K* load forecasters based on improved LSTM; and the optimal clustering result determined by using the FSI index and the calendar features of the day to be tested and the day before are input into the improved cycle-enhanced LSTM neural network for training to obtain a trained cycle-enhanced LSTM neural network;

[0012] The improved periodic enhanced LSTM neural network model constructed includes two LSTM layers and two fully connected layers. Each LSTM layer contains 24 LSTM modules, corresponding to 24 hours in a day. The fully connected layer incorporates the load value of 24 hours before the time to be tested. The model input is the load value and temperature value from h-1 to h-24, and outputs the load forecast value at the hth time. The mean square error is used as the objective function of the model, and the model is trained by minimizing the mean square error (MSE);

[0013] S6. Obtain a predicted value by enhancing the trained periodic LSTM neural network model according to the load curve of the day before the test day, the meteorological data of the test day, and the determined prediction period.

[0014] The power load forecasting method based on load mining and LSTM neural network, wherein after step S6, further includes:

[0015] Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error for model evaluation.

[0016] The power load forecasting method based on load mining and LSTM neural network, wherein the acquired historical load data set is divided into a test set and a training set; and the load curves of two consecutive days of the training set are combined into one as a new training set, thereby constructing a new matrix, and then the new matrix is ​​subjected to dimensionality reduction processing, and the steps of obtaining the feature matrix after dimensionality reduction include:

[0017] The acquired historical load data set is preprocessed, the historical load data set is divided into a test set and a training set, and a load training set is determined; wherein the training set includes load curves for H days, and each day includes 24 load sampling values;

[0018] Combine the load curves of two consecutive days into one as a new training set sample, thereby constructing a new matrix with a dimension of (N-1)×48, recorded as Y;

[0019] The new matrix is ​​clustered and analyzed by using a clustering algorithm to obtain several load patterns for two consecutive days. The load data of the previous day is used as input, and the load curve of the test day is predicted by using an LSTM neural network.

[0020] The new matrix is ​​subjected to dimensionality reduction processing by using principal component analysis to obtain a feature matrix after dimensionality reduction.

[0021] The power load forecasting method based on load mining and LSTM neural network, wherein the principal component analysis is used to reduce the dimension of the new matrix to obtain the reduced dimension feature matrix, including:

[0022] The new matrix is ​​reduced in dimension using principal component analysis, and the first m features with a contribution of not less than 90% are selected for subsequent cluster analysis; finally, a reduced feature matrix with a dimension of (N-1)×m is obtained, denoted as X (N-1)×m .

[0023] The power load forecasting method based on load mining and LSTM neural network, wherein the steps of determining the load mode quantity interval based on the feature matrix after dimension reduction, clustering using the improved FCM clustering method, determining the optimal clustering result using the clustering effectiveness index, constructing K* subsets, and determining K* load modes, include:

[0024] Based on the reduced dimension feature matrix, the load pattern quantity interval is determined as [k min , k max ], using the improved principal component analysis (FCM) algorithm to analyze the feature matrix X (N-1)×m Conduct cluster analysis;

[0025] If k < k max , the k value is increased by 1 to continue the principal component analysis (FCM) clustering, otherwise the clustering effectiveness index (FSI index) is used to determine the optimal clustering result, and finally the k * subsets to determine K* load patterns, providing k load patterns for the subsequent LSTM-based prediction model. * A class.

[0026] The power load forecasting method based on load mining and LSTM neural network, wherein the cycle-enhanced LSTM neural network model trained, obtains the forecast value according to the load curve of the day before the test day, the meteorological data of the test day and the determined forecast period, including:

[0027] Determine the power load pattern for each pair of consecutive two days in the test set to determine the predictor to be utilized;

[0028] For two consecutive days in the test set, the load pattern labels of all samples in the training set with the same dates as the two consecutive days are counted, and the load pattern of the two consecutive days is determined by majority voting;

[0029] The power load data and temperature data of the day before the day to be tested are input into the predictor of the corresponding load pattern of the trained period-enhanced LSTM neural network model to obtain the power load curve of the day to be tested.

[0030] The power load forecasting method based on load mining and LSTM neural network, wherein the predicted value is calculated based on the obtained predicted value and the true value to obtain the mean absolute percentage error for model evaluation, including:

[0031] Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error; it is defined as:

[0032]

[0033] Where, L i and Represent the load value and predicted value at the i-th moment respectively, and n represents the number of load samples per day for model evaluation.

[0034] A power load forecasting device based on load mining and LSTM neural network, wherein the device comprises:

[0035] Acquisition module, to obtain historical load data set;

[0036] A new matrix construction module is used to divide the acquired historical load data set into a test set and a training set; and combine the load curves of two consecutive days of the training set into one as a new training set, thereby constructing a new matrix, and then performing dimensionality reduction processing on the new matrix to obtain a feature matrix after dimensionality reduction;

[0037] The load pattern determination module is used to determine the load pattern quantity interval based on the feature matrix after dimension reduction, clustering is performed using the improved FCM clustering method, and the optimal clustering result is determined using the clustering effectiveness index, thereby constructing K* subsets to determine K* load patterns;

[0038] The load predictor construction module is used to input the obtained K* load patterns into K* LSTM layers respectively, and construct K* load predictors based on improved LSTM respectively;

[0039] An improved cycle-enhanced LSTM neural network model building and training module is used to build an improved cycle-enhanced LSTM neural network model by constructing K* load forecasters based on improved LSTM; and input the optimal clustering result determined by using the FSI index and the calendar features of the day to be tested and the day before it into the improved cycle-enhanced LSTM neural network for training to obtain a trained cycle-enhanced LSTM neural network;

[0040] The improved periodic enhanced LSTM neural network model constructed includes two LSTM layers and two fully connected layers. Each LSTM layer contains 24 LSTM modules, corresponding to 24 hours in a day. The fully connected layer incorporates the load value of 24 hours before the time to be tested. The model input is the load value and temperature value from h-1 to h-24, and outputs the load forecast value at the hth time. The mean square error is used as the objective function of the model, and the model is trained by minimizing the mean square error (MSE);

[0041] A prediction module, used to enhance the LSTM neural network model through the training cycle, obtain a prediction value according to the load curve of the day before the test day, the meteorological data of the test day and the determined prediction period;

[0042] The evaluation module is used to calculate the mean absolute percentage error between the predicted value and the true value based on the obtained predicted value to perform model evaluation.

[0043] A terminal device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, including the method for executing any one of the methods described.

[0044] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute any one of the methods described above.

[0045] Beneficial effects of the present invention: In view of the complex characteristics of power load data, the present invention establishes a power load prediction model combining clustering and deep learning, considers the periodic characteristics of the load curve, proposes a periodic enhanced LSTM neural network, and uses the information of the previous day to achieve accurate prediction of the load of the next day; the present invention discloses a short-term power load prediction method based on load pattern mining and periodic enhanced LSTM neural network, which can accurately predict the load curve of the day to be tested by using the load data of the day before the day to be tested, and the model of the present invention is also of reference value for the prediction of other time series with periodic changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 It is a flow chart of a method for power load forecasting based on load mining and LSTM neural network provided in an embodiment of the present invention.

[0048] Figure 2 It is a structural diagram of a periodically enhanced LSTM model of a power load forecasting method based on load mining and LSTM neural network provided in an embodiment of the present invention.

[0049] Figure 3 It is a schematic diagram of the clustering effect of the model of the power load forecasting method based on load mining and LSTM neural network provided by an embodiment of the present invention on the GEFCom2014 data set.

[0050] Figure 4 It is a 2D scatter plot of two data set samples obtained by t-SNE dimensionality reduction of the power load forecasting method based on load mining and LSTM neural network provided by an embodiment of the present invention, and determines the minimum ellipse schematic diagram covering at least 90% of the samples of a certain load mode.

[0051] Figure 5 It is a box diagram of MAPE values ​​of prediction results of different models of the power load forecasting method based on load mining and LSTM neural network provided in an embodiment of the present invention on the GEFCom2014 test set.

[0052] Figure 6 It is a schematic diagram of the absolute difference between the predicted peak value and the true peak value of different models of the power load forecasting method based on load mining and LSTM neural network provided in an embodiment of the present invention in the GEFCom2014 test set.

[0053] Figure 7 It is a schematic diagram of the clustering effect of the model of the power load forecasting method based on load mining and LSTM neural network provided by an embodiment of the present invention on the NA data set.

[0054] Figure 8 It is a schematic diagram of the absolute difference between the predicted peak value and the true peak value of different models of the power load forecasting method based on load mining and LSTM neural network provided in an embodiment of the present invention in the NA test set.

[0055] Fig. 9It is a box-line diagram of the MAPE of each month of the model of the power load forecasting method based on load mining and LSTM neural network provided by an embodiment of the present invention on the GEFCom2014 test set.

[0056] Fig.10 It is a schematic diagram of the MAPE box lines of each month of the model of the power load forecasting method based on load mining and LSTM neural network provided in an embodiment of the present invention on the NA test set.

[0057] Fig.11 It is a two-dimensional scatter plot of the coding value of the corresponding load mode in a certain month and its average MAPE value and its correlation analysis diagram of the power load forecasting method based on load mining and LSTM neural network provided by an embodiment of the present invention.

[0058] Fig.12 It is a principle block diagram of an electric load prediction device based on load mining and LSTM neural network provided in an embodiment of the present invention.

[0059] Fig.13 It is a block diagram of the internal structure principle of the terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0061] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0062] The difficulty of power load forecasting lies in the high uncertainty of the power system. There are two main solutions to this problem: 1) Use clustering or decomposition methods to divide power load data into several subsets, and then establish a prediction model for each subset; 2) Use the powerful nonlinear fitting and modeling capabilities of deep learning to develop a load forecasting method based on deep learning. The present invention combines the above two ideas and discloses a short-term power load forecasting model based on load pattern mining and period-enhanced LSTM neural network. The model uses the load data of the day before the test day to accurately predict the load curve of the test day. Among them, the long short-term memory neural network (LSTM) is a special recurrent neural network (RNN) that is suitable for processing and predicting important events with relatively long intervals and delays in time series.

[0063] In order to solve the problems of the prior art, the present invention provides a power load forecasting method based on load mining and LSTM neural network. Aiming at the complex characteristics of power load data, the present invention establishes a power load forecasting model combining clustering and deep learning, considers the periodic characteristics of the load curve, proposes a periodic enhanced LSTM neural network, and uses the information of the previous day to achieve accurate prediction of the load of the next day; the present invention uses the load data of the day before the day to be tested to accurately predict the load curve of the day to be tested, and the model of the present invention is also of reference value for the prediction of other time series with periodic changes.

[0064] Exemplary Methods

[0065] like Figure 1 As shown in, an embodiment of the present invention provides a power load forecasting method based on load mining and LSTM neural network, and provides a power load forecasting method based on FCM clustering and improved long short-term memory network (long short-term memory, LSTM), which can be applied to the field of power data analysis technology. In an embodiment of the present invention, the power load forecasting method based on load mining and LSTM neural network includes the following steps:

[0066] Step S100, obtaining a historical load data set;

[0067] In the embodiment of the present invention, it is necessary to obtain historical load data before specific implementation, such as load data of the day before the test date, to facilitate power load prediction in the subsequent steps;

[0068] Step S200, the acquired historical load data set is divided into a test set and a training set; and the load curves of two consecutive days in the training set are combined into one as a new training set, thereby constructing a new matrix, and then performing dimensionality reduction processing on the new matrix to obtain a feature matrix after dimensionality reduction;

[0069] In this step, the acquired historical load data set is preprocessed, the historical load data set is divided into a test set for testing and a training set for training, and a load training set is determined; wherein the training set contains load curves for N days, and each day contains 24 load sampling values;

[0070] Combine the load curves of two consecutive days into one as a new training set sample, thereby constructing a new matrix with a dimension of (N-1)×48, recorded as Y;

[0071] Then, a clustering algorithm is used to perform cluster analysis on the new matrix to obtain several load patterns for two consecutive days. The load data of the previous day is used as input, and the LSTM neural network (long short-term neural network, also called periodic neural network) is used to predict the load curve of the test day. Among them, cluster analysis is also called group analysis. It is a statistical analysis method for studying (sample or indicator) classification problems, and it is also an important algorithm for data mining.

[0072] The new matrix is ​​subjected to dimensionality reduction processing by principal component analysis to obtain a reduced-dimensional feature matrix. The present invention can use PCA to reduce the dimension to obtain a reduced-dimensional feature matrix; wherein the full name of PCA is principal component analysis, i.e., principal component analysis, which is used for dimensionality reduction.

[0073] For example, the new matrix is ​​reduced in dimension using principal component analysis, and the first m features with a contribution of not less than 90% are selected for subsequent cluster analysis; finally, a reduced feature matrix with a dimension of (N-1)×m is obtained, which is recorded as X (N-1)×m .

[0074] Step S300: Based on the feature matrix after dimension reduction, determine the load mode quantity interval, use the improved FCM clustering method to perform clustering, use the clustering effectiveness index (FSI index) to determine the optimal clustering result, and construct K* subsets to determine K* load modes;

[0075] This step mainly implements clustering-based power load pattern mining. Based on the feature matrix after dimensionality reduction, the load pattern quantity interval is determined as [k min , k max ], using the improved principal component analysis (FCM) algorithm to analyze the feature matrix X (N-1)×m Conduct cluster analysis;

[0076] If k < k max , the k value is increased by 1 to continue the principal component analysis (FCM) clustering, otherwise the clustering effectiveness index (FSI index) is used to determine the optimal clustering result, and finally the k * subsets to determine K* load patterns, providing k load patterns for the subsequent LSTM-based prediction model. * A class.

[0077] The FCM algorithm is a data clustering method based on the optimization of the objective function. The clustering result is the degree of membership of each data point to the cluster center, which is represented by a numerical value. The algorithm allows the same data to belong to multiple different classes.

[0078] Step S400, input the obtained K* load patterns into K* LSTM layers respectively, and construct K* load predictors based on improved LSTM respectively;

[0079] In this embodiment, the LSTM layer is an LSTM layer of an LSTM neural network (long short-term neural network, also called a periodic neural network). In this step, the obtained K* load modes are input into K* LSTM layers respectively, and K* load predictors based on improved LSTM are constructed respectively, that is, a historical load data set is divided into a test set and a training set, the test set is pre-processed, and clustered using the FCM algorithm, k* load modes are determined, and then for each load mode, a load predictor based on improved LSTM is constructed respectively.

[0080] Step S500, building an improved cycle-enhanced LSTM neural network model by constructing K* load forecasters based on improved LSTM; and inputting the optimal clustering result determined by using the FSI index and the calendar features of the day to be tested and the day before it into the improved cycle-enhanced LSTM neural network for training, to obtain a trained cycle-enhanced LSTM neural network;

[0081] In the present invention, Figure 2 As shown, an improved cycle-enhanced LSTM neural network model is built by constructing K* load forecasters based on improved LSTM; and the optimal clustering result determined by the FSI indicator and the calendar features of the day to be tested and the day before are input into the improved cycle-enhanced LSTM neural network for training to obtain a trained cycle-enhanced LSTM neural network.

[0082] Among them, Figure 2 As shown, the improved periodic enhanced LSTM neural network model constructed includes two LSTM layers and two fully connected layers, each LSTM layer includes 24 LSTM modules, corresponding to 24 hours in a day; the fully connected layer incorporates the load value 24 hours before the test time. The fully connected layer of the present invention considers the load value 24 hours before the test time, which can enhance the model's ability to extract periodic features. Figure 2 In, L i and T i Represent the load value and temperature value at the i-th moment respectively. Assume that the time to be measured is h, the model input is the load value and temperature value from h-1 to h-24, and the output is the load forecast value at the h-th moment The mean square error is used as the objective function of the model, and the model is trained by minimizing the mean square error (MSE); the improved periodic enhanced LSTM neural network model of the present invention is used for short-term power load forecasting, and the forecasting effect is more accurate.

[0083] Step S600, obtaining a predicted value by enhancing the LSTM neural network model through the training cycle, according to the load curve of the day before the test day, the meteorological data of the test day and the determined prediction period.

[0084] In the present invention, the power load pattern for each pair of two consecutive days in the test set is determined to determine the predictor to be utilized;

[0085] For two consecutive days in the test set, the load pattern labels of all samples in the training set with the same dates as the two consecutive days are counted, and the load pattern of the two consecutive days is determined by majority voting;

[0086] The power load data and temperature data of the day before the day to be tested are input into the predictor of the corresponding load pattern of the trained period-enhanced LSTM neural network model to obtain the power load curve of the day to be tested.

[0087] In a further embodiment, the power load forecasting method based on load mining and LSTM neural network of the present invention further includes the following steps after step S600:

[0088] Step S700: Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error for model evaluation.

[0089] Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error for model evaluation, including:

[0090] Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error; it is defined as:

[0091]

[0092] Where, L i and Represent the load value and predicted value at the i-th moment respectively, and n represents the number of load samples per day for model evaluation.

[0093] In the embodiment of the present invention, 1) regarding model evaluation:

[0094] First, the power load pattern of each pair of consecutive days in the test set is determined to determine the predictor to be used. For a pair of consecutive days in the test set, the load pattern labels of all samples in the training set with the same date as the two consecutive days are counted, and the load pattern of the two consecutive days is determined by majority voting.

[0095] Then, the power load data and temperature data of the day before the day to be measured are input into the predictor corresponding to the load mode to obtain the power load curve of the day to be measured.

[0096] Finally, the mean absolute percentage error (MAPE) between the predicted value and the true value is calculated and is defined as:

[0097]

[0098] Where, L i and Represent the load value and predicted value at the i-th moment, respectively, and n represents the number of load samples per day. The smaller the MAPE value, the smaller the error between the predicted value and the true value, that is, the better the model prediction effect.

[0099] II) Specific steps for power load prediction in the embodiment of the present invention:

[0100] (1) Assume that the training set contains N days, and each day contains 24 load sampling values. Therefore, the dimension of the load training set is N×24. The load curves of two consecutive days are combined into one to construct a new training set with a dimension of (N-1)×48. Then, PCA (principal component analysis) is performed to reduce the dimension. The feature matrix after dimension reduction is (N-1)×m.

[0101] (2) Determine the load mode quantity interval as [k min , k max ], using the improved FCM clustering method, if k < k max , k=k+1 otherwise use FSI index to determine the optimal clustering result and construct k * subsets;

[0102] (3) The period-enhanced LSTM neural network consists of two LSTM layers and two fully connected layers. Each LSTM layer contains 24 LSTM modules, corresponding to 24 hours in a day. The fully connected layer considers the load value 24 hours before the test time to enhance the model's ability to extract periodic features. The mean square error (MSE) is used as the objective function of the model, and the model is trained by minimizing the MSE.

[0103] (4) First, determine the power load pattern for each pair of consecutive days in the test set to determine the predictor to be used. For a pair of consecutive days in the test set, count the load pattern labels of all samples in the training set with the same date as the two consecutive days, and determine the load pattern of the two consecutive days by majority voting. Then, input the power load data and temperature data of the day before the test day into the predictor of the corresponding load pattern to obtain the power load curve of the test day. Finally, calculate the mean absolute percentage error (MAPE) between the predicted value and the true value.

[0104] The present invention is further described in detail below through specific application examples:

[0105] 1) Regarding the construction of historical load data sets; the embodiment of the method of the present invention uses the 2014 Global Energy Forecasting Competition data set and the load data set of a certain region of the earth to evaluate the performance of the load forecasting model proposed by the method of the present invention, and compares it with several methods. The above two data sets are represented by GEFCom2014 and NA respectively. The GEFCom2014 data set contains 69 months of power load data and temperature data from January 1, 2005 to September 30, 2010, with a sampling period of 1 hour. The training set contains data from January 1, 2005 to December 31, 2008, and the remaining data is used as a test set. The NA data set contains power load data and temperature data from January 1, 1985 to October 12, 1992, with a sampling period of 1 hour. For the convenience of comparison, the training set and test set of the method of the present invention are completely consistent with those of the existing methods. The data of the last two years are the test set, and the remaining data are the training set.

[0106] 2) Regarding the GEFCom2014 dataset, first, the load pattern mining results in the training set of the GEFCom2014 dataset are described. The clustering algorithm is run with different numbers of clusters, and the FSI index value of each result is calculated, such as Figure 3 As shown in (a), 5 is determined as the optimal number of clusters with the minimum value, that is, there are 5 load modes in the GEFCo2014 dataset. Figure 3 (bf) shows five load patterns for two consecutive days. Each curve in the figure represents the load curve of a certain load pattern for two consecutive days. It can be seen that there is a large dissimilarity between the five load patterns found. The method of the embodiment of the present invention uses the t-SNE toolkit in MATLAB to reduce the dimension of the training set samples, and draws a 2D scatter plot of the training set samples according to the clustering labels, as shown in FIG. Figure 4 (a) is shown. The method of the specific embodiment of the present invention further counts the monthly distribution of samples in the five load modes. Mode 1 (c1) contains a total of 480 samples, mainly from June to September; the samples in mode 2 (c2) are evenly distributed from January to April, November and December, with a total of 303 samples: Mode 3 (c3) and Mode 4 (c4) contain 206 and 179 samples respectively, mainly from January to March, November and December; Mode 5 (c5) contains 292 samples from April, May, September to November.

[0107] The test set of the GEFCom2014 data set is input into the power load forecasting model based on load mining and LSTM neural network, generalized regression neural network (GRNN), traditional LSTM neural network and LSTM+clustering model constructed by the method of the present invention, and the average MAPE value of each day in the prediction results of each model is calculated respectively. The distribution of MAPE values ​​of different models is compared using box plots. The results are shown in Figure 2. Figure 5 (a). It can be seen that the model of the method of the present invention is superior to the other models under the MAPE indicator. Table 1 lists the overall average MAPE values ​​of the above models on the test set. The overall average MAPE value of the model of the method of the present invention is 9.49% and 3.34% lower than that of the GRNN and LSTM models, respectively. In addition, it is worth noting that by adding a clustering link to the traditional LSTM neural network model, the overall average MAPE value is reduced by 2.63%, thereby effectively improving the prediction accuracy of the traditional LSTM neural network model.

[0108] Table 1

[0109]

[0110] Table 1 shows the overall average MAPE value of the prediction results of different models on the GEFCom2014 test set

[0111] In addition, the performance of the model of the present invention in predicting the daily load peak is evaluated. The MAPE value between the predicted peak value and the actual peak value for each day is calculated, and the box plot is shown in Figure 5 As shown in (b), it can be seen that the model of the method of the present invention is also better than other models in predicting load peak. Table 1 lists the average MAPE values ​​of the peak prediction results of the above models. The average MAPE value of the model of the method of the present invention is 8.62% and 4.87 lower than that of the GRNN and traditional LSTM models, respectively. In order to describe the results more intuitively, the absolute value of the difference between the predicted peak value and the actual peak value for each day is calculated. Figure 6 The absolute differences of all dates on the test set are plotted, and it can be seen that the absolute difference level of the model of the proposed method is smaller than that of other models.

[0112] 3) Prediction results of NA dataset:

[0113] Firstly, the model proposed by the method of the present invention is used to mine the load patterns of the training set of the NA data set. Figure 7 (a) The FSI index values ​​with different numbers of clusters are plotted. It can be seen that the FSI is the smallest when k = 5, indicating that there are five typical load modes in this data set. Figure 7(b) to (f) are the load curves of five load modes for two consecutive days. From the profiles of the five load modes, load modes 3 and 4 are quite different from the other modes, and load modes 1, 2 and 5 have certain differences in load peak distribution. Figure 4 (b) depicts the 2D spatial distribution of samples in the dataset.

[0114] Secondly, the model of the method of the present invention is used to predict the load of the test set of the NA data set, and the performance is compared with several load prediction models. Table 2 lists the average MAPE values ​​of each model on the NA data set. It can be seen that the prediction error of the model of the method of the present invention is the smallest. Compared with the traditional LSTM model and the improved residual network, the average MAPE value of the model of the method of the present invention is reduced by 5.48% and 0.04% respectively.

[0115] Table 2

[0116]

[0117] Table 2 shows the overall average MAPE value of the prediction results of different models on the NA test set

[0118] In addition, the absolute difference between the predicted peak value and the true peak value for each day in the prediction results of the traditional LSTM neural network and the model of this method is calculated respectively, as shown in Figure 8 As shown, it can be seen that the prediction performance of the model of the method of the present invention on the peak load on the NA data set is also better than that of the traditional LSTM neural network. The third column of Table 2 lists the average MAPE values ​​of the two models for peak load prediction. The prediction error of the model of the method of the present invention is 0.56%, which is much smaller than 8.54% of the traditional LSTM neural network.

[0119] 4) Further discussion on the prediction performance of this method

[0120] First, the prediction performance of the model of the method of the present invention in different months is evaluated. To this end, this section statistics the MAPE distribution of the model of the method of the present invention in each month on the two test sets, as shown in the figure below: Figure 3 and 4 As shown. It can be seen that the prediction accuracy of the model of the method of the present invention is different in different months. For example, on the GEFCom2014 dataset, the prediction accuracy of the model of the present method from June to August is better than that of December; on the NA dataset, the prediction accuracy of the model of the present method in August is better than that in September.

[0121] Secondly, the reasons why the performance of the model of this method fluctuates with the month are analyzed. To this end, the clustering results of samples from 12 months in the two test sets are statistically analyzed, that is, the number of days in each load mode in each month, as shown in Tables 3 and 4. The method of the present invention introduces the indicators of the information theory to evaluate the degree of "chaos" corresponding to each load mode in each month. The larger the shoulder value of a month, the more evenly the proportion of each load mode in that month is. Fig.11 A two-dimensional scatter plot of the shoulder value and its average MAPE value for each month in the test set was drawn. The two were further correlated. The correlation coefficients on the two test sets were 0.8 and 0.64, respectively, and the p values ​​were both less than 0.05, indicating a strong positive correlation between the two. If most of the dates in a month belong to the same load pattern, then the prediction performance of this method model in that month is better; vice versa. It can be inferred that the performance of this method model is related to the load pattern mining effect based on the clustering algorithm.

[0122] Table 3

[0123]

[0124] Table 3 shows the statistics of the number of days per month belonging to each load mode in the GEFCom2014 test set

[0125] Table 4

[0126]

[0127] Table 4 Statistics of the number of days belonging to each load mode per month in the NA test set.

[0128] It can be seen from the above that an embodiment of the present invention provides an electric load forecasting method based on load mining and LSTM neural network. Aiming at the complex characteristics of electric load data, the present invention establishes an electric load forecasting model combining clustering and deep learning, considers the periodic characteristics of the load curve, proposes a periodic enhanced LSTM neural network, and uses the information of the previous day to achieve accurate prediction of the load of the next day; the present invention discloses a short-term electric load forecasting method based on load pattern mining and periodic enhanced LSTM neural network, which can accurately predict the load curve of the day to be measured by using the load data of the day before the day to be measured. The model of the present invention is also of reference value for the prediction of other time series with periodic changes.

[0129] Exemplary Devices

[0130] like Fig.12 As shown in, an embodiment of the present invention provides a power load prediction device based on load mining and LSTM neural network, the device comprising:

[0131] An acquisition module 510 is used to acquire a historical load data set;

[0132] A new matrix construction module 520 is used to divide the acquired historical load data set into a test set and a training set; and combine the load curves of two consecutive days in the training set into one as a new training set, thereby constructing a new matrix, and then performing dimensionality reduction processing on the new matrix to obtain a feature matrix after dimensionality reduction;

[0133] The load pattern determination module 530 is used to determine the load pattern quantity interval based on the feature matrix after dimension reduction, perform clustering using the improved FCM clustering method, determine the optimal clustering result using the clustering effectiveness index, and construct K* subsets to determine K* load patterns;

[0134] A load predictor building module 540 is used to input the obtained K* load patterns into K* LSTM layers respectively, and build K* load predictors based on improved LSTM respectively;

[0135] The improved cycle-enhanced LSTM neural network model building and training module 550 is used to build an improved cycle-enhanced LSTM neural network model by constructing K* load forecasters based on improved LSTM; and input the optimal clustering result determined by using the FSI index and the calendar features of the day to be tested and the day before it into the improved cycle-enhanced LSTM neural network for training to obtain a trained cycle-enhanced LSTM neural network;

[0136] The improved periodic enhanced LSTM neural network model constructed includes two LSTM layers and two fully connected layers. Each LSTM layer contains 24 LSTM modules, corresponding to 24 hours in a day. The fully connected layer incorporates the load value of 24 hours before the time to be tested. The model input is the load value and temperature value from h-1 to h-24, and outputs the load forecast value at the hth time. The mean square error is used as the objective function of the model, and the model is trained by minimizing the mean square error (MSE);

[0137] Prediction module 560, used to enhance the LSTM neural network model through the training cycle, obtain the prediction value according to the load curve of the day before the test day and the meteorological data of the test day and the determined prediction period;

[0138] The evaluation module 570 is used to calculate the mean absolute percentage error between the predicted value and the true value based on the obtained predicted value to perform model evaluation, as described above.

[0139] Based on the above embodiments, the present invention further provides a terminal device, whose principle block diagram can be shown as follows: Fig.13As shown. The terminal device includes a processor, a memory, a network interface, a display screen, and a temperature sensor connected through a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for predicting power load based on load mining and LSTM neural network is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen.

[0140] Those skilled in the art will understand that Fig.13 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0141] In one embodiment, a terminal device is provided, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations:

[0142] Obtain historical load data sets;

[0143] The acquired historical load data set is divided into a test set and a training set; and the load curves of two consecutive days in the training set are combined into one as a new training set, thereby constructing a new matrix, and then the new matrix is ​​subjected to dimensionality reduction processing to obtain a feature matrix after dimensionality reduction;

[0144] Based on the feature matrix after dimension reduction, the load pattern quantity interval is determined, and the improved FCM clustering method is used for clustering. The clustering effectiveness index is used to determine the optimal clustering result, and K* subsets are constructed to determine K* load patterns.

[0145] The obtained K* load patterns are input into K* LSTM layers respectively, and K* load predictors based on improved LSTM are constructed respectively;

[0146] An improved cycle-enhanced LSTM neural network model is built by constructing K* load forecasters based on improved LSTM; and the optimal clustering result determined by using the FSI index and the calendar features of the day to be tested and the day before are input into the improved cycle-enhanced LSTM neural network for training to obtain a trained cycle-enhanced LSTM neural network;

[0147] The improved periodic enhanced LSTM neural network model constructed includes two LSTM layers and two fully connected layers. Each LSTM layer contains 24 LSTM modules, corresponding to 24 hours in a day. The fully connected layer incorporates the load value of 24 hours before the time to be tested. The model input is the load value and temperature value from h-1 to h-24, and outputs the load forecast value at the hth time. The mean square error is used as the objective function of the model, and the model is trained by minimizing the mean square error (MSE);

[0148] The predicted value is obtained by enhancing the LSTM neural network model through the training cycle according to the load curve of the day before the test day, the meteorological data of the test day and the determined prediction period;

[0149] Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error for model evaluation.

[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0151] In summary, the present invention discloses a method, device, terminal equipment and storage medium for predicting electric load based on load mining and LSTM neural network. Aiming at the complex characteristics of electric load data, the present invention establishes an electric load prediction model combining clustering and deep learning, considers the periodic characteristics of the load curve, proposes a periodic enhanced LSTM neural network, and uses the information of the previous day to realize accurate prediction of the load of the next day; the present invention discloses a short-term electric load prediction method based on load pattern mining and periodic enhanced LSTM neural network, which can accurately predict the load curve of the day to be tested by using the load data of the day before the day to be tested, and the model of the present invention is also of reference value for the prediction of other time series with periodic changes.

[0152] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A power load forecasting method based on load mining and LSTM neural network, characterized in that: The method comprises: S1. Obtain historical load data set; S2, dividing the acquired historical load data set into a test set and a training set; combining the load curves of two consecutive days in the training set into one as a new training set, thereby constructing a new matrix, and then performing dimensionality reduction processing on the new matrix to obtain a feature matrix after dimensionality reduction; S3. Based on the feature matrix after dimension reduction, determine the load pattern quantity interval, use the improved FCM clustering method for clustering, use the clustering effectiveness index to determine the optimal clustering result, and construct K* subsets to determine K* load patterns; S4, input the obtained K* load patterns into K* LSTM layers respectively, and construct K* load predictors based on improved LSTM respectively; S5. An improved cycle-enhanced LSTM neural network model is built by constructing K* load forecasters based on improved LSTM; and the optimal clustering result determined by using the FSI index and the calendar features of the day to be tested and the day before are input into the improved cycle-enhanced LSTM neural network for training to obtain a trained cycle-enhanced LSTM neural network; The improved periodic enhanced LSTM neural network model constructed includes two LSTM layers and two fully connected layers. Each LSTM layer contains 24 LSTM modules, corresponding to 24 hours in a day. The fully connected layer incorporates the load value of 24 hours before the time to be tested. The model input is the load value and temperature value from h-1 to h-24, and outputs the load forecast value at the hth time. The mean square error is used as the objective function of the model, and the model is trained by minimizing the mean square error; S6, obtaining a predicted value by using the trained cycle-enhanced LSTM neural network model according to the load curve of the day before the test day, the meteorological data of the test day, and the determined prediction period; The steps of determining the load mode quantity interval based on the feature matrix after dimension reduction, clustering using the improved FCM clustering method, determining the optimal clustering result using the clustering effectiveness index, and constructing K* subsets to determine K* load modes include: Based on the reduced dimension feature matrix, the load pattern quantity interval is determined as [k min , k max ], using the improved principal component analysis (FCM) algorithm to analyze the feature matrix X (N-1)×m Conduct cluster analysis; If k < k max , the k value is increased by 1 to continue the principal component analysis clustering, otherwise the clustering effectiveness index is used to determine the optimal clustering result, and finally the k * subsets to determine K* load patterns, providing k load patterns for the subsequent LSTM-based prediction model. * A class.

2. The power load forecasting method based on load mining and LSTM neural network according to claim 1 is characterized in that: After step S6, the following steps are also included: Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error for model evaluation.

3. The power load forecasting method based on load mining and LSTM neural network according to claim 1 is characterized in that: The steps of dividing the acquired historical load data set into a test set and a training set; combining the load curves of two consecutive days in the training set into one as a new training set, thereby constructing a new matrix, and then performing dimensionality reduction processing on the new matrix to obtain the feature matrix after dimensionality reduction include: The acquired historical load data set is preprocessed, the historical load data set is divided into a test set and a training set, and a load training set is determined; wherein the training set includes load curves for N days, and each day includes 24 load sampling values; Combine the load curves of two consecutive days into one as a new training set sample, thereby constructing a new matrix with a dimension of (N-1)×48, recorded as Y; The new matrix is ​​clustered and analyzed by using a clustering algorithm to obtain several load patterns for two consecutive days. The load data of the previous day is used as input, and the load curve of the test day is predicted by using an LSTM neural network. The new matrix is ​​subjected to dimensionality reduction processing by using principal component analysis to obtain a feature matrix after dimensionality reduction.

4. The power load forecasting method based on load mining and LSTM neural network according to claim 3 is characterized in that: The principal component analysis is used to perform dimension reduction processing on the new matrix to obtain a feature matrix after dimension reduction, including: The new matrix is ​​reduced in dimension using principal component analysis, and the first m features with a contribution of not less than 90% are selected for subsequent cluster analysis; finally, a reduced feature matrix with a dimension of (N-1)×m is obtained, denoted as X (N-1)×m .

5. The power load forecasting method based on load mining and LSTM neural network according to claim 1 is characterized in that: The cycle-enhanced LSTM neural network model trained is used to obtain a predicted value according to the load curve of the day before the test day, the meteorological data of the test day, and the determined prediction period, including: Determine the power load pattern for each pair of consecutive two days in the test set to determine the predictor to be utilized; For two consecutive days in the test set, the load pattern labels of all samples in the training set with the same dates as the two consecutive days are counted, and the load pattern of the two consecutive days is determined by majority voting; The power load data and temperature data of the day before the day to be tested are input into the predictor of the corresponding load pattern of the trained period-enhanced LSTM neural network model to obtain the power load curve of the day to be tested.

6. The power load forecasting method based on load mining and LSTM neural network according to claim 2 is characterized in that: Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error for model evaluation, including: Based on the obtained predicted value, the predicted value and the true value are calculated to obtain the mean absolute percentage error; it is defined as: Where, L i and Represent the load value and predicted value at the i-th moment respectively, and n represents the number of load samples per day for model evaluation.

7. A power load forecasting device based on load mining and LSTM neural network, characterized in that: The device comprises: Acquisition module, to obtain historical load data set; A new matrix construction module is used to divide the acquired historical load data set into a test set and a training set; and combine the load curves of two consecutive days of the training set into one as a new training set, thereby constructing a new matrix, and then performing dimensionality reduction processing on the new matrix to obtain a feature matrix after dimensionality reduction; The load pattern determination module is used to determine the load pattern quantity interval based on the feature matrix after dimension reduction, clustering is performed using the improved FCM clustering method, and the optimal clustering result is determined using the clustering effectiveness index, thereby constructing K* subsets to determine K* load patterns; The load predictor construction module is used to input the obtained K* load patterns into K* LSTM layers respectively, and construct K* load predictors based on improved LSTM respectively; An improved cycle-enhanced LSTM neural network model building and training module is used to build an improved cycle-enhanced LSTM neural network model by constructing K* load forecasters based on improved LSTM; and input the optimal clustering result determined by using the FSI index and the calendar features of the day to be tested and the day before it into the improved cycle-enhanced LSTM neural network for training to obtain a trained cycle-enhanced LSTM neural network; The improved periodic enhanced LSTM neural network model constructed includes two LSTM layers and two fully connected layers. Each LSTM layer contains 24 LSTM modules, corresponding to 24 hours in a day. The fully connected layer incorporates the load value of 24 hours before the time to be tested. The model input is the load value and temperature value from h-1 to h-24, and outputs the load forecast value at the hth time. The mean square error is used as the objective function of the model, and the model is trained by minimizing the mean square error; A prediction module, used to enhance the LSTM neural network model through the training cycle, obtain a prediction value according to the load curve of the day before the test day, the meteorological data of the test day and the determined prediction period; An evaluation module, configured to calculate the mean absolute percentage error between the predicted value and the true value based on the obtained predicted value, so as to perform model evaluation; The steps of determining the load mode quantity interval based on the feature matrix after dimension reduction, clustering using the improved FCM clustering method, determining the optimal clustering result using the clustering effectiveness index, and constructing K* subsets to determine K* load modes include: Based on the reduced dimension feature matrix, the load pattern quantity interval is determined as [k min , k max ], using the improved principal component analysis (FCM) algorithm to analyze the feature matrix X (N-1)×m Conduct cluster analysis; If k < k max , the k value is increased by 1 to continue the principal component analysis clustering, otherwise the clustering effectiveness index is used to determine the optimal clustering result, and finally the k * subsets to determine K* load patterns, providing k load patterns for the subsequent LSTM-based prediction model. * A class.

8. A terminal device, characterized in that: The device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include being used to execute the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Short-term load prediction method for household electricity utilization

    CN113743668A

  • Electric vehicle charging load prediction method and system based on FCM clustering and LSTM

    CN113988426A