Short-term power load prediction method and system based on TCN-LSTM + XGB hybrid model

By combining power and meteorological data with the TCN-LSTM+XGB hybrid model, the problems of insufficient utilization of meteorological data and single model in existing power load forecasting are solved, and higher prediction accuracy and stability are achieved, which is suitable for accurate load forecasting of power grid operation.

CN120632344APending Publication Date: 2025-09-12TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510702184.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing power load forecasting methods cannot effectively utilize meteorological data and have a single model structure, resulting in insufficient prediction accuracy and unable to meet the high precision and timeliness requirements of power grid operation.

Method used

The TCN-LSTM+XGB hybrid model is used to combine power load and meteorological data. Through correlation analysis, preprocessing and hyperparameter optimization, a hybrid model is constructed to perform short-term power load forecasting.

Benefits of technology

The accuracy and applicability of power load forecasting are improved, the stability of the model is enhanced, and it can better cope with the diversity and complexity of power load data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632344A_ABST
    Figure CN120632344A_ABST
Patent Text Reader

Abstract

The invention discloses a short-term power load prediction method and system based on a TCN-LSTM + XGB hybrid model, and relates to the technical field of signal generator circuit design, and the method comprises the steps: collecting power load data and meteorological data, and carrying out the correlation analysis; and based on a correlation analysis result, performing short-term power load prediction by using the constructed TCN-LSTM + XGB hybrid model. According to the method, the accuracy of existing power load prediction is improved, the stability performance of an existing prediction model is enhanced through the designed hybrid model, and the method can be popularized in the field of power load prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of signal generator circuit design, and in particular to a short-term power load forecasting method and system based on a TCN-LSTM+XGB hybrid model. Background Art

[0002] Power load forecasting is fundamental to power system operation and management, crucial for ensuring grid security, improving energy efficiency, and achieving economic dispatch. With the continuous expansion of power systems and the increasing complexity of load structures, grid operations are placing higher demands on the accuracy and timeliness of load forecasts. Accurate short-term load forecasts not only help power dispatch centers rationally plan power generation, reduce reserve capacity, and improve system economics, but also provide a scientific basis for power market transactions, price setting, and demand response strategies. Furthermore, as renewable energy sources increasingly dominate the grid, load forecasting results are becoming crucial for coordinating the grid integration of fluctuating energy sources such as wind power and photovoltaics.

[0003] Power load forecasting refers to the process of estimating and predicting the load demand of the power system within a certain future time period by utilizing historical power load data and methods such as statistics, machine learning, and deep learning. Existing research load forecasting methods can be categorized into traditional statistical models, machine learning models, deep learning models, and hybrid models. However, a single forecasting principle has significant limitations and cannot cope with the diversity and complexity of power load data patterns, resulting in low forecast accuracy in some cases. Time series forecasting algorithms have evolved from statistical methods to machine learning and then to deep learning. However, existing power load forecasts are all predictions for a single point in time and cannot utilize meteorological data. The model structure is limited in practice and therefore has significant limitations. Summary of the Invention

[0004] In order to solve the above problems, the purpose of the present invention is to provide a short-term power load forecasting technology based on the TCN-LSTM+XGB hybrid model to solve the problems of being unable to use meteorological data, the single model structure and the insufficient accuracy that cannot be used in practical applications, aiming to make up for the limitations and improve the accuracy and applicability of the overall prediction.

[0005] To achieve the above technical objectives, this application provides a short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model, including:

[0006] Collect power load data and meteorological data for correlation analysis;

[0007] Based on the correlation analysis results, the constructed TCN-LSTM+XGB hybrid model is used to perform short-term power load forecasting.

[0008] Preferably, before performing the correlation analysis, the collected power load data and meteorological data are preprocessed, including using the box plot method to identify missing values ​​and outliers in the power load data and meteorological data, and using the cubic spline interpolation method to fill and correct the missing values ​​and outliers, and normalizing the power load data and meteorological data based on the minimum and maximum normalization methods.

[0009] Preferably, when performing correlation analysis, the three correlation coefficients of Pearson, Spearman and Kendall are used to calculate the relationship between the characteristic index and the power load. The average value of the three correlation coefficients is used to screen the characteristic index with a strong correlation coefficient and combine it with the load sequence to generate the correlation analysis result.

[0010] Preferably, when constructing a TCN-LSTM+XGB hybrid model, a TCN-LSTM model is constructed by fusing a temporal convolutional network and a long short-term memory network; then, the extreme gradient boosting tree XGB is used to mine the nonlinear relationships and feature interactions in the data through a decision tree integration method, thereby constructing a TCN-LSTM+XGB hybrid model.

[0011] Preferably, when constructing the TCN-LSTM model, the number of convolution kernels, convolution kernel size, learning rate, batch size and maximum number of iterations in the TCN-LSTM model are hyperparameter optimized by the cuckoo algorithm.

[0012] Preferably, when constructing the TCN-LSTM+XGB hybrid model, the minimum number of leaves and maximum depth in the XGB model are hyperparameter optimized using the cuckoo algorithm.

[0013] Preferably, when performing short-term power load forecasting, the weighted addition of the prediction values ​​of the TCN-LSTM model and the XGB model is used as the prediction result of the CN-LSTM+XGB hybrid model, wherein the weight of the prediction value is determined based on the TCN-LSTM model validation set error and the XGB model validation set error.

[0014] The present invention provides a short-term power load forecasting system based on a TCN-LSTM+XGB hybrid model. The system is used to implement the above-mentioned short-term power load forecasting method based on a TCN-LSTM+XGB hybrid model. The system includes:

[0015] Data acquisition module, used to collect power load data and meteorological data;

[0016] Data analysis module, used to perform correlation analysis based on power load data and meteorological data;

[0017] The load forecasting module is used to perform short-term power load forecasting based on the correlation analysis results using the constructed TCN-LSTM+XGB hybrid model.

[0018] The present invention discloses the following technical effects:

[0019] The present invention combines meteorological data to predict power load, improves the accuracy of existing power load prediction, enhances the stability of the prediction model, and can be promoted in the field of power load prediction. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 This is a step diagram of the TCN-LSTM+XGB hybrid model short-term power load forecasting method based on multidimensional data of the present invention;

[0022] Figure 2 This is a schematic diagram of the power load of the present invention;

[0023] Figure 3 This is a correlation analysis diagram of the TCN-LSTM+XGB hybrid model short-term power load forecasting method based on multidimensional data of the present invention;

[0024] Figure 4 This is a weight allocation principle diagram of the TCN-LSTM+XGB hybrid model short-term power load forecasting method based on multidimensional data of the present invention;

[0025] Figure 5 This is a structural diagram of the TCN-LSTM model of the present invention;

[0026] Figure 6 1 is a structural diagram based on the TCN model of the present invention;

[0027] Figure 7 This is a schematic diagram of the dilated convolution principle based on the TCN model of the present invention.

[0028] Figure 8 The figure is a flowchart of the short-term power load forecasting based on the TCN-LSTM model of the present invention.

[0029] Figure 9 It is a structural diagram based on the XGB model of the present invention.

[0030] Figure 10Schematic diagram of the hyperparameter optimization steps based on SSA of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.

[0032] like Figures 1-10 As shown, the present invention provides a short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model, comprising the following steps:

[0033] S1. Collecting raw data sets to obtain power load and meteorological data, and preprocessing the power load and meteorological data;

[0034] In step S1, preprocessing the power load data and meteorological data includes the following steps: using the box plot method to identify missing values ​​and outliers in the power load data and meteorological data, and using the cubic spline interpolation method to fill and correct the missing values ​​and outliers, and normalizing the power load data and meteorological data based on the minimum and maximum normalization methods.

[0035] S2. Perform correlation analysis on the original power load and meteorological data to form a load sequence with multiple characteristic indicators;

[0036] In step S2, the correlation analysis of the original power load and meteorological data includes the following steps: using the three correlation coefficients of Pearson, Spearman and Kendall to calculate the relationship between the characteristic index and the power load, calculating the average value of the three correlation coefficients, screening the characteristic index with strong correlation coefficient and combining it with the load series.

[0037] X=[x,w1,w2,...,w n ]

[0038] Among them, x is the power load sequence, w1 is the first characteristic index, w2 is the second characteristic index, and w n is the nth characteristic index.

[0039] S3: Build a TCN-LSTM+XGB hybrid model. Use TCN-LSTM to capture load sequence information at different time scales and train a deep learning model. Use XGB to train a machine learning model for multi-step load forecasting and use the SSA algorithm to optimize hyperparameters.

[0040] In step S3, a TCN-LSTM+XGB hybrid model is constructed. The TCN-LSTM model efficiently captures the complex dynamic changes in power load by integrating a temporal convolutional network and a long-short-term memory network. The extreme gradient boosting tree utilizes a decision tree ensemble approach to mine nonlinear relationships and feature interactions in the data.

[0041] The TCN dilated convolution formula is:

[0042]

[0043] Among them, y TCN (t) is the output result, x(t) is the input data, f(i) is the weight of the convolution kernel, k is the size of the convolution kernel, and d is the expansion rate;

[0044] The calculation formula of the long short-term memory neural network LSTM output layer is:

[0045]

[0046] Among them, t is the output gate state, C t To memorize information.

[0047] The hybrid model prediction result formula is:

[0048] y=W TCN-LSTM y TCN-LSTM +W XGB y XGB

[0049] Among them, y is the output result of the hybrid model, y TCN-LSTM Output result of TCN-LSTM prediction model, y XGB Output result of XGB model, W TCN-LSTM is the TCN-LSTM prediction model weight, W XGB is the XGB model weight;

[0050] In step S3, the Cuckoo algorithm is used to optimize the hyperparameters such as the number of convolution kernels, convolution kernel size, learning rate, batch size, and maximum number of iterations in the TCN-LSTM model, and to optimize the hyperparameters such as the minimum number of leaves and maximum depth in the XGB model.

[0051] S4. Assign weights in the TCN-LSTM+XGB hybrid model and finally obtain the short-term power load forecast results.

[0052] In step S4, the errors of the TCN-LSTM model and the XGB model on the validation set are judged. If the error difference is large, the model with the smaller error is selected as the final prediction model. If the error between the two models is less than a certain threshold, the two models are weighted and combined, and the final prediction result is equal to the weighted sum of the prediction values ​​of the two models.

[0053] The hybrid model weight calculation formula is:

[0054]

[0055] Among them, E TCN-LSTM is the TCN-LSTM model validation set error, E XGB is the validation set error of the XGB model.

[0056] Example: The present invention provides a short-term power load forecasting method based on TCN-LSTM+XGB hybrid model, such as Figure 1 As shown, the following steps are included:

[0057] S1. Collecting raw data sets to obtain power load and meteorological data, and preprocessing the power load and meteorological data;

[0058] S2. Perform correlation analysis on the original power load and meteorological data to form a load sequence with multiple characteristic indicators;

[0059] S3: Build a TCN-LSTM+XGB hybrid model. Use TCN-LSTM to capture load sequence information at different time scales and train a deep learning model. Use XGB to train a machine learning model for multi-step load forecasting and use the SSA algorithm to optimize hyperparameters.

[0060] S4. Assign weights in the TCN-LSTM+XGB hybrid model and finally obtain the short-term power load forecast results.

[0061] In step S1, the original power load data and meteorological data need to be integrated, including using the box plot method to identify missing values ​​and outliers in all data, and using the cubic spline interpolation method to fill in the missing values ​​and outliers. The data is further mapped to the range of 0-1 using the maximum and minimum normalization methods, and all normalized data are divided into training sets, validation sets, and test sets. At this point, the data preprocessing work is completed; step S2 includes correlation analysis of meteorological data and power load data, and the correlation coefficients are Pearson, Spearman, and Kendall. The average of the three correlation coefficients is taken as the final correlation coefficient for feature index screening. The feature indicators retained by the screening and the power load sequence constitute a load sequence with multiple features; step S3 includes constructing a TCN-LSTM deep learning model and an XGB machine learning model, using a load sequence with multiple features to train the model, and also includes using the sparrow search algorithm (SSA) to optimize the hyperparameters within the model; step S4 determines the weight distribution of the hybrid model through validation set training, and the final hybrid model prediction result is the weighted sum of the TCN-LSTM model and the XGB model.

[0062] like Figure 2 The figure shows the original power load dataset, with a time interval of 1 hour and a time range of one week. It should be noted that the load data includes a training set, a validation set, and a test set, with a total length of 365 days.

[0063] like Figure 3 As shown in FIG, 20 meteorological data including temperature, humidity, wind speed and date are correlated with power load. The correlation coefficient is the mean coefficient of Pearson, Spearman and Kendall.

[0064] The Pearson correlation coefficient calculation formula:

[0065]

[0066] Among them, X i and Y i is the i-th observation in the dataset, and is the mean of the data sets X and Y, and n represents the total number of data points;

[0067] The Spearman correlation coefficient calculation formula:

[0068]

[0069] Among them, Rank(X i ) and Rank(Y i ) are the rankings of the i-th data point in the two variables X and Y data points respectively.

[0070] The Kendall correlation coefficient calculation formula is:

[0071]

[0072] Where C(X,Y) is the number of consistent pairs in the data, and D(X,Y) is the number of inconsistent pairs in the data.

[0073] like Figure 4 As shown in the figure, the prediction process steps include:

[0074] Input a sample sequence consisting of power load data and other characteristic indicators for the day to be predicted, and combine the sample sequence into a time series matrix. Perform data preprocessing operations on the time series matrix, including data filling, outlier detection, data normalization, correlation coefficient calculation, characteristic indicator selection, and data set partitioning.

[0075] Set up the SSA optimization algorithm, set the initial values ​​of the hyperparameters in the initialization phase, and set upper and lower limits for the value range of the hyperparameters. During the optimization process, set a fixed number of iterations to fully tune the hyperparameters.

[0076] The training set is used during the model training process to help the model learn and fit parameters from the data. The validation set is used to adjust the structure and hyperparameters during the training process, evaluate the model's performance on unknown data, and prevent overfitting. While the optimization algorithm is searching for the optimal hyperparameters for the model, the error of the validation set on the model is recorded, for both ETCN-LSTM and EXGB.

[0077] The errors of different models on the validation set are evaluated. If the difference between the two models is significant, the model with the smaller validation set error is selected as the final model. If the validation set error between the two models is less than a certain threshold, the two models are weighted and combined. The final prediction result is the weighted sum of the predictions of the two models, with the weights being WTCN-LSTM and WXGB, respectively.

[0078] The prediction results need to be compared with the actual values ​​to evaluate the accuracy of the model, and the prediction results need to be analyzed on different typical days. The formulas for the MSE, RMSE, MAE, MAPE, and R2 prediction evaluation indicators are:

[0079]

[0080]

[0081] Among them, y i is the output value of the mixed model, is the test set data.

[0082] Table 1

[0083] Model MAE MAPE MSE RMSE <![CDATA[R 2 ]]> Comprehensive indicators LSTM 48.55 6.96% 3342.68 57.82 0.67 0.69 TCN 38.84 5.65% 2363.03 48.61 0.77 0.81 XGB 35.05 5.17% 1862.09 43.15 0.82 0.88 TCN-LSTM 28.86 3.98% 1459.02 38.20 0.86 0.95 LSTM+XGB 30.34 4.11% 1765.19 42.01 0.83 0.92 TCN-LSTM+XGB 25.39 3.47% 1160.18 34.06 0.89 1.00

[0084] The comprehensive prediction evaluation index is obtained by MSE, RMSE, MAE, MAPE and R2 through the entropy weight method. Table 1 is a comparison table between this model and the existing mainstream single prediction model.

[0085] like Figure 5-Figure 6 As shown in the figure, the TCN-LSTM prediction model structure combines the advantages of temporal convolutional networks and long short-term memory networks. First, the TCN module constructed by multi-layer causal convolution and dilated convolution extracts local time series features and long-term dependencies from the input data; then the extracted feature sequence is passed to the LSTM module, and its gating mechanism is used to capture the nonlinear dynamic changes in the data. Finally, the fully connected layer integrates information and outputs the prediction results, thereby achieving efficient processing and accurate prediction of complex time series data.

[0086] like Figure 7 As shown in the figure, TCN uses dilated convolution to quickly expand the receptive field of view, enabling the network to capture time-scale dependencies. At the same time, TCN introduces residual connections to alleviate the gradient vanishing problem in deep networks and ensure the stability and efficiency of the training process.

[0087] The dilated convolution formula is:

[0088]

[0089] Among them, y TCN (t) is the output result, x(t) is the input data, f(i) is the weight of the convolution kernel, k is the size of the convolution kernel, and d is the expansion rate;

[0090] like Figure 8 As shown in the figure, the load data is preprocessed and partitioned into training, validation, and test sets. The training set is then trained in the constructed TCN-LSTM model. The TCN convolutional layer extracts load parameters. The input data passes through multiple causal convolutional layers, each using dilated convolutions to capture features at different time scales. Each convolution layer is followed by an activation function and normalization to prevent overfitting. The feature sequence extracted by the TCN is then fed into the LSTM layer, which uses a gating mechanism to further capture the dynamics of the sequence. Multiple layers of LSTM enhance the model's complexity. The final sequence output of the LSTM passes through a fully connected layer, and the result is mapped to the target load dimension. Error metrics are calculated using the validation set, and backpropagation is used to update the model's hyperparameters. Finally, after the model reaches the maximum number of training cycles, it is applied to actual power load forecasting, and its performance is evaluated using the test set.

[0091] like Figure 9 As shown in the figure, XGB uses a combination of multiple decision trees to build an accurate prediction model. In each iteration, a new decision tree is created to fit the gradient information of the residual prediction of the previous model.

[0092] like Figure 10 As shown in Figure 2, the Cuckoo SSA optimization algorithm treats power load data as a population, subjecting locations with low fitness to large-scale random fluctuations. Fitness is integrated to form a new population, retaining the global optimal solution. If the termination criteria are met, the optimal individual is output as the optimal solution to the problem. The optimized hyperparameters are shown in Table 2.

[0093] Table 2

[0094]

[0095] The present invention uses correlation coefficients to analyze the degree of correlation between power load data and meteorological data, and constructs a power load sequence containing characteristic indicators. This method effectively extracts the impact of meteorological factors on power load and enhances the key features in power load data.

[0096] The present invention builds a TCN-LSTM deep learning model and an XGB machine learning model, and uses power load data for simultaneous training. It uses TCN dilated convolution to achieve a large receptive field of view to extract long-term dependent features, and uses LSTM to identify short-term dynamic changes, thereby improving the ability of the power load forecasting model to handle complex time series tasks. The hybrid model improves the prediction accuracy and practical applicability.

[0097] The present invention adopts the Cuckoo Optimization Algorithm (SSA) to optimize the model hyperparameters, which can more comprehensively search for better parameter combinations, thereby improving the stability of the prediction model.

[0098] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0099] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0100] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model is characterized by: include: Collect power load data and meteorological data for correlation analysis; Based on the correlation analysis results, the constructed TCN-LSTM+XGB hybrid model is used to perform short-term power load forecasting.

2. The short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model according to claim 1 is characterized by: Before conducting correlation analysis, the collected power load data and meteorological data are preprocessed, including using the box plot method to identify missing values ​​and outliers in the power load data and meteorological data, and using the cubic spline interpolation method to fill and correct the missing values ​​and outliers, and normalizing the power load data and meteorological data based on the minimum and maximum normalization methods.

3. The short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model according to claim 2 is characterized by: When performing correlation analysis, the three correlation coefficients of Pearson, Spearman and Kendall are used to calculate the relationship between the characteristic indicators and the power load. The average value of the three correlation coefficients is used to screen the characteristic indicators with strong correlation coefficients and combine them with the load sequence to generate the correlation analysis results.

4. The short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model according to claim 3 is characterized by: When constructing the TCN-LSTM+XGB hybrid model, the TCN-LSTM model is constructed by fusing the temporal convolutional network and the long short-term memory network; then, the extreme gradient boosting tree XGB is used to mine the nonlinear relationships and feature interactions in the data through the decision tree integration method, thereby constructing the TCN-LSTM+XGB hybrid model.

5. The short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model according to claim 4 is characterized by: When building the TCN-LSTM model, the cuckoo algorithm is used to optimize the number of convolution kernels, convolution kernel size, learning rate, batch size, and maximum number of iterations in the TCN-LSTM model.

6. The short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model according to claim 5 is characterized by: When constructing the TCN-LSTM+XGB hybrid model, the cuckoo algorithm is used to optimize the minimum number of leaves and the maximum depth in the XGB model.

7. The short-term power load forecasting method based on the TCN-LSTM+XGB hybrid model according to claim 6 is characterized by: When performing short-term power load forecasting, the weighted addition of the prediction values ​​of the TCN-LSTM model and the XGB model is used as the prediction result of the CN-LSTM+XGB hybrid model, wherein the weight of the prediction value is determined based on the validation set error of the TCN-LSTM model and the validation set error of the XGB model.

8. The short-term power load forecasting system based on the TCN-LSTM+XGB hybrid model is characterized by: include: Data acquisition module, used to collect power load data and meteorological data; a data analysis module, configured to perform correlation analysis based on the power load data and the meteorological data; The load forecasting module is used to perform short-term power load forecasting based on the correlation analysis results using the constructed TCN-LSTM+XGB hybrid model.