TCN-BiLSTM-based system equivalent inertia short-term prediction method and device

By using the TCN-BiLSTM model to select input variables and cluster similar days, the problems of inaccurate variable selection and poor model adaptability in the short-term prediction of equivalent inertia of the system are solved, and higher accuracy inertia prediction is achieved.

CN120955600APending Publication Date: 2025-11-14ELECTRIC POWER RES INST STATE GRID SHANXI ELECTRIC POWER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510887640.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

In existing technologies, inaccurate selection of input variables, poor model adaptability, and insufficient extraction of temporal features lead to inaccurate short-term predictions of the system's equivalent inertia.

Method used

The TCN-BiLSTM model is adopted to select target input variables by calculating the correlation coefficient between input variables and the equivalent inertia of the system. The historical data is divided into subsets with similar fluctuation characteristics by combining the similar daily clustering method, and the TCN-BiLSTM model is trained separately for each subset to capture time series features and improve the adaptability and accuracy of the prediction model.

Benefits of technology

It significantly improves the accuracy and adaptability of short-term prediction of the system's equivalent inertia, reduces interference from redundant information, and enhances prediction accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120955600A_ABST
    Figure CN120955600A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power systems, in particular to a TCN-Bi LSTM-based system equivalent inertia short-term prediction method and device and a computer readable storage medium, and the method comprises the steps: obtaining a system equivalent inertia historical data set needed by the system equivalent inertia short-term prediction, and carrying out the data preprocessing; screening a target input variable; clustering similar days, and dividing the historical data set into a plurality of sub-data sets; respectively training a TCN-Bi LSTM model in each sub data set to obtain a plurality of system equivalent inertia short-term prediction models; and predicting by using a plurality of system equivalent inertia short-term prediction models. According to the method, the key problems of inaccurate variable screening, poor model adaptability, insufficient time sequence feature extraction and the like in the traditional inertia prediction can be solved, the short-term prediction precision of the equivalent inertia of the system is improved, and a more reliable solution is provided for the short-term prediction of the equivalent inertia of the power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system technology, and in particular to a method, apparatus and computer-readable storage medium for short-term prediction of system equivalent inertia based on TCN-BiLSTM. Background Technology

[0002] In recent years, the new energy industry has been in a critical stage of accelerated development. However, because new energy power generation equipment is connected to the grid through power electronic converters, the converter side is decoupled from the grid frequency and cannot provide inertia support for the system. As the penetration rate of new energy power generation equipment continues to increase, the equivalent inertia of the power system is constantly decreasing, posing a severe challenge to the system's frequency stability. Therefore, accurately predicting the short-term equivalent inertia of the power system helps grid dispatching departments to formulate corresponding measures in advance when facing weak system inertia, which is of great significance for ensuring the safe and stable operation of the system and improving its anti-disturbance capability and stability.

[0003] Short-term prediction methods for system equivalent inertia can be categorized into three types: physical models, statistical models, and neural network models. While physical and statistical models are relatively mature, they are insufficient in handling the complex time-varying characteristics of system equivalent inertia, resulting in poor prediction performance. With the rapid development of artificial intelligence, neural network models offer a novel solution for short-term prediction of system equivalent inertia. By analyzing large amounts of data to uncover hidden patterns, neural network models demonstrate significant advantages in handling nonlinear problems.

[0004] However, current research on short-term prediction methods for system equivalent inertia based on neural network models is still in its initial exploratory stage, and a complete theoretical system and general method have not yet been formed. The main shortcomings are as follows:

[0005] (1) The prediction of the equivalent inertia of the system involves a variety of influencing factors, including the output of new energy sources, load fluctuations, and meteorological conditions. Existing technologies have failed to fully screen the correlation between the input variables and the equivalent inertia of the system at the time to be predicted, or have only used a single correlation analysis method, which leads to the introduction of redundant or irrelevant variables, increases the complexity of the model and the computational cost, and reduces the accuracy of the prediction.

[0006] (2) Existing methods do not adequately consider the data fluctuation characteristics of the system's equivalent inertia. When dividing the dataset, they mainly rely on subjective experience and lack sufficient theoretical basis and data support. They cannot accurately capture the changing patterns in the data and are difficult to meet the practical application of short-term prediction of the system's equivalent inertia.

[0007] (3) Most existing methods only use a single neural network model and fail to fully consider the temporal and long-term dependencies of time series data, resulting in poor performance and unsatisfactory prediction results when processing data with complex time relationships. Summary of the Invention

[0008] Therefore, the technical problem to be solved by the present invention is to overcome the problems of inaccurate input variable selection, poor model adaptability, and insufficient extraction of time series features in the prior art, which lead to inaccurate short-term prediction of the equivalent inertia of the system.

[0009] To address the aforementioned technical problems, this invention provides a short-term prediction method for the equivalent inertia of a system based on TCN-BiLSTM, comprising:

[0010] Calculate the correlation coefficient between each input variable in the historical dataset of the system's equivalent inertia and the system's equivalent inertia at the time to be predicted; use the correlation coefficient to filter the input variables to obtain the target input variable;

[0011] The system equivalent inertia data of each day in the historical dataset is regarded as a sample, and similar days are clustered to obtain multiple clusters; the samples in each cluster are assigned the cluster label of that cluster.

[0012] The number of samples for each cluster label is counted for each month, and the cluster label with the most samples is used as the cluster label for that month; based on the cluster labels for each month, the historical dataset is divided into multiple subsets.

[0013] Train the TCN-BiLSTM model with the data of the target input variable in each subset of the dataset to obtain the short-term prediction model of the system equivalent inertia corresponding to each cluster label;

[0014] When predicting the equivalent inertia of the system, the short-term prediction model of the equivalent inertia of the system is selected according to the cluster label of the month in which the equivalent inertia of the system is located at the time to be predicted. The data of the target input variable is used as the input of the short-term prediction model of the equivalent inertia of the system to be predicted, and the predicted value of the equivalent inertia of the system at the time to be predicted is obtained.

[0015] Preferably, the system's equivalent inertia historical dataset undergoes data preprocessing, including:

[0016] Identify missing values ​​in the dataset and use the interquartile range method to detect outliers;

[0017] Cubic spline interpolation was used to fill in missing and outlier values.

[0018] Based on the degree of fluctuation of the input variables, the imputed data is normalized, including:

[0019] If the maximum fluctuation of the current input variable does not exceed ±30% of the baseline value, then the minimum-maximum normalization method is applied to the data after the current input variable is filled.

[0020] If the maximum fluctuation of the current input variable exceeds ±30% of the baseline value, then the zero-mean standardization method is applied to the data after imputing the current input variable.

[0021] Preferably, the correlation coefficient between each input variable in the historical dataset and the equivalent inertia of the system at the time to be predicted is calculated, including: calculating the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient between each input variable in the historical dataset and the equivalent inertia of the system at the time to be predicted, and taking the average value.

[0022] Preferably, the input variables are filtered using the correlation coefficient to obtain the target input variables, including:

[0023] If the average value of the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is greater than 0.3, then the input variable is used as the target input variable.

[0024] If the average of the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is less than or equal to 0.3, then the input variable is discarded.

[0025] Preferably, when calculating the correlation coefficient between each input variable in the historical dataset and the equivalent inertia of the system at the time to be predicted, if the input variable is a variable with lag, the data of the current time is replaced by the data of the input variable at a preset time step after the current time to obtain the lag data of the input variable; the correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is calculated using the lag data of the input variable.

[0026] Preferably, the k-means algorithm is used for clustering similar days.

[0027] Preferably, in addition to the target input variables, time-aware variables are added as inputs to the TCN-BiLSTM model; the time-aware variables include: sine and cosine function encodings of the number of hours at each time, binary labels indicating whether each time is during peak or trough load, and binary labels indicating whether each time is a weekday.

[0028] Preferably, the loss function for training the TCN-BiLSTM model is:

[0029]

[0030] Among them, E RMSE Let H be the loss function, N be the total number of training samples in the training batch, and H be the loss function. i H is the predicted value of the equivalent inertia of the system at the time to be predicted for the i-th training sample. isysLet H′ be the true equivalent inertia of the system at the time to be predicted for the i-th training sample. isys Let λ be the true value of the system's equivalent inertia at the time preceding the time to be predicted for the i-th training sample, and let λ be the weighting coefficient.

[0031] The present invention also provides a short-term prediction device for the equivalent inertia of a system based on TCN-BiLSTM, comprising:

[0032] The input variable filtering module is used to calculate the correlation coefficient between each input variable in the historical dataset of system equivalent inertia and the system equivalent inertia at the time to be predicted; and to filter the input variables using the correlation coefficient to obtain the target input variable.

[0033] The clustering module is used to treat the daily system equivalent inertia data in the historical dataset as a sample, perform similar day clustering, and obtain multiple clusters; the samples in each cluster are assigned a cluster label of that cluster;

[0034] The subset partitioning module is used to count the number of samples for each cluster label in each month, and use the cluster label with the most samples as the cluster label for that month; based on the cluster labels of the months, the historical dataset is divided into multiple subsets.

[0035] The training module is used to train the TCN-BiLSTM model with the data of the target input variable in each subset of the dataset, so as to obtain the short-term prediction model of the system equivalent inertia corresponding to each cluster label.

[0036] The prediction module is used to predict the equivalent inertia of the system. It selects the short-term prediction model of the equivalent inertia of the system corresponding to the cluster label of the month in which the equivalent inertia of the system is located at the time to be predicted. The data of the target input variable is used as the input of the short-term prediction model of the equivalent inertia of the system to be predicted, and the predicted value of the equivalent inertia of the system at the time to be predicted is obtained.

[0037] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for short-term prediction of system equivalent inertia based on TCN-BiLSTM.

[0038] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:

[0039] This invention presents a short-term prediction method for system equivalent inertia based on TCN-BiLSTM. It employs correlation coefficient analysis of input variables to accurately select the variables with the greatest impact on system equivalent inertia as the target input variables for the short-term prediction model, effectively reducing redundant information interference. Furthermore, addressing the issue of insufficient consideration of data fluctuation characteristics in traditional methods, this invention introduces a similar-day clustering method. Historical data is divided into subsets with similar fluctuation characteristics in system equivalent inertia, and TCN-BiLSTM models capable of capturing temporal features are trained on these subsets to obtain multiple short-term prediction models for system equivalent inertia. This significantly improves the adaptability and accuracy of the short-term prediction models for system equivalent inertia under different operating conditions. During inference, the characteristics of the system equivalent inertia at the time of prediction are considered to effectively improve prediction accuracy. The TCN-BiLSTM model combines the local feature extraction capability of the TCN model with the ability of BiLSTM to capture long-term dependencies, helping to overcome the limitations of traditional methods in modeling complex temporal relationships and significantly improving the accuracy of short-term prediction of system equivalent inertia. Therefore, this invention can solve key problems in traditional inertia prediction, such as inaccurate variable selection, poor model adaptability, and insufficient extraction of time series features, thereby improving the accuracy of short-term prediction of system equivalent inertia and providing a more reliable solution for short-term prediction of power system equivalent inertia. Attached Figure Description

[0040] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein:

[0041] Figure 1 This is a flowchart of a short-term prediction method for the equivalent inertia of a system based on TCN-BiLSTM according to the present invention.

[0042] Figure 2 This is an SSE curve graph of different numbers of clusters in similar day clustering in an embodiment of the present invention. Detailed Implementation

[0043] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0044] Reference Figure 1 As shown, this invention provides a short-term prediction method for the equivalent inertia of a system based on TCN-BiLSTM, comprising:

[0045] S1: Obtain the historical dataset of the system's equivalent inertia required for short-term prediction of the system's equivalent inertia, and perform data preprocessing.

[0046] Specifically, data preprocessing includes:

[0047] S11: Identify missing values ​​in the dataset and use the interquartile range (IQR) to detect outliers.

[0048] The original data contains three types of missing data: "N / A", "n / e", and outlier consecutive zero values. This embodiment treats these three types of data as missing values ​​and uses the interquartile range method to detect outliers in the remaining data.

[0049] The interquartile range (IVR) is a common outlier detection method that identifies outliers by analyzing the quantiles of the data. The calculation formula is as follows:

[0050] IQR = Q3 - Q1

[0051] a min =Q1-1.5IQR

[0052] a max =Q3 + 1.5IQR

[0053] Where IQR is the interquartile range; Q1 is the first quartile, which is the value at the 25th percentile after sorting the data in ascending order; Q3 is the third quartile, which is the value at the 75th percentile after sorting the data in ascending order; a min and a max The lower and upper bounds of outliers are defined separately.

[0054] If the data point is less than the lower bound a min or greater than the upper bound a max If it is, then it is considered an outlier.

[0055] S12: Use cubic spline interpolation to fill in missing and outlier values.

[0056] After identifying all missing and outlier values, if more than 10 sets of missing or outlier data appear consecutively within a certain time period, that time period is removed from the dataset; otherwise, cubic spline interpolation is used to fill in the missing and outlier values.

[0057] For a given discrete data point, (b1,c1), (b2,c2),...,(b d ,c d ), cubic spline interpolation in each interval [b e ,b e+1 A cubic polynomial Se(b) is constructed to describe the relationship between the data points, and the calculation formula is as follows:

[0058] S e (b)=f e +g e (bb e )+h e (bbe ) 2 +l e (bb e ) 3

[0059] Among them, S e (b) is the difference polynomial for the e-th interval; f e g e h e and l e Let be the coefficient to be solved, b be time, and c be the various input variables in the dataset.

[0060] S13: Normalize the data after filling in all input variables.

[0061] Normalization helps scale data to a uniform range, preventing certain variables from having an excessive impact on the model due to their large dimensions. However, if some variables vary significantly, normalization may lead to information loss. For example, the min-max normalization method compresses data to a fixed range, potentially weakening the instantaneous fluctuations of pumped storage power and causing it to lose its important dynamic response characteristics. Therefore, before normalization, the characteristics of different input variables should be analyzed, and an appropriate method should be selected based on the type and characteristics of the input variables to ensure that their range of variation and importance are properly preserved.

[0062] Therefore, this embodiment normalizes the imputed data based on the degree of fluctuation of the input variables, including:

[0063] If the maximum fluctuation of the current input variable does not exceed ±30% of the baseline value, then the minimum-maximum normalization method is used to map the value of the current input variable to the [0,1] interval to avoid overscaling.

[0064] If the maximum fluctuation of the current input variable exceeds ±30% of the baseline value, the zero-mean standardization method is applied to the data after the current input variable is filled. This method can better preserve the relative position and distribution characteristics of the data.

[0065] S2: Filtering target input variables: Calculate the correlation coefficient between each input variable in the historical dataset of system equivalent inertia and the system equivalent inertia at the time to be predicted; filter the input variables using the correlation coefficient to obtain the target input variables.

[0066] The input variables include electricity demand, real-time power generation, tie-line power, day-ahead power forecast, and real-time system equivalent inertia.

[0067] Preferably, in this embodiment, the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient of each input variable in the historical dataset with the equivalent inertia of the system at the time to be predicted are calculated respectively, and the average value is taken. The input variables with a greater influence on the equivalent inertia of the system are selected as the target input variables.

[0068] Pearson correlation coefficient is suitable for normally distributed continuous data and can accurately measure linear relationships; Spearman correlation coefficient has lower requirements for data distribution and is suitable for non-normally distributed or ordered data, and can identify monotonic relationships; Kendall's correlation coefficient is suitable for data with small sample sizes or outliers, and can stably measure the association between variables. The calculation formula is as follows:

[0069]

[0070] Where r is the Pearson correlation coefficient; ρ is the Spearman correlation coefficient; τ is the Kendall L. correlation coefficient; x j and y j are the data values ​​of input variable X and the equivalent inertia Y of the system at the j-th time, respectively; n is the total number of selected data; and Input the average value of all selected data for variable X and the equivalent inertia Y of the system at the time to be predicted; j The difference between the rankings of the input variable X and the system's equivalent inertia Y at the j-th time step; n c and n d Let X be the number of same-direction pairings and the number of opposite-direction pairings for the input variable X and the equivalent inertia Y of the system at the time to be predicted.

[0071] Since the three correlation coefficient calculation methods each have their advantages, this embodiment comprehensively considers the calculation results of the three and takes their average value as the basis for input variable selection, including:

[0072] If the average value of the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is greater than 0.3, then the variable is considered to have a high correlation with the equivalent inertia of the system at the time to be predicted, and the input variable is used as the target input variable.

[0073] If the average of the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is less than or equal to 0.3, then the input variable is discarded.

[0074] This embodiment combines Pearson, Spearman, and Kendall L correlation coefficients to perform multi-dimensional correlation analysis, accurately selecting the variable with the greatest impact on the system's equivalent inertia as the target input variable for the subsequent short-term prediction model of the system's equivalent inertia, effectively reducing redundant information interference.

[0075] Considering that changes in the equivalent inertia of a system often have a certain lag, such as fluctuations in renewable energy output, start-up and shutdown of pumped storage, or changes in regional load, the actual impact of variables with lag, such as load power, wind power, photovoltaic power, pumped storage, and interconnection channel power, on the system inertia usually gradually becomes apparent after several time steps. Therefore, if only the input variables at the current moment are used for correlation analysis, it may be impossible to capture the complete impact of these factors on the change in inertia.

[0076] Therefore, in a preferred embodiment of the present invention, when calculating the correlation coefficient between each input variable in the historical dataset and the equivalent inertia of the system at the time to be predicted, if the input variable is a variable with lag, the data of the current time is replaced by the data of 1-4 time steps after the current time to obtain the lagged data of the input variable; the correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is calculated using the lagged data of the input variable. This strategy helps the model learn the dynamic trend of inertia change, improving the timeliness and accuracy of inertia prediction.

[0077] S3: Similar Day Clustering: Treat the daily system equivalent inertia data in the historical dataset as a sample and perform similar day clustering.

[0078] Preferably, this embodiment uses the k-means algorithm for clustering similar days, and the specific steps include:

[0079] S31: Treat the daily system equivalent inertia data in the historical dataset as a single sample, containing a total of P samples, denoted as Y = {Y1, Y2, ..., Y...} P}, each sample Y p It consists of the sampled values ​​of the system's equivalent inertia at m time points each day, i.e., Y p ={Y p1 ,Y p2 ,…,Y pm}

[0080] S32: Randomly select k points from P samples as initial cluster centers.

[0081] S33: For each sample Y p Calculate its Euclidean distance to each cluster center, and then transfer the sample Y... p It is assigned to the cluster corresponding to the nearest cluster center. The formula for calculating Euclidean distance is:

[0082]

[0083] Where, q pp′ For sample Y p and sample Y p′ Euclidean distance.

[0084] S34: After all samples have been assigned to their corresponding clusters, recalculate the cluster center for each cluster. The new cluster center is the mean of all samples within that cluster.

[0085] S35: Return to execute S33 until the positions of the k cluster centers no longer change, or the number of iterations reaches the preset maximum value.

[0086] S36: After assigning P samples to k clusters, assign a cluster label to each sample in each cluster. There are a total of k cluster labels.

[0087] S4: Divide the historical dataset into multiple sub-datasets based on the clustering results of similar days.

[0088] The number of samples for each cluster label is counted for each month, and the cluster label with the largest number of samples is used as the cluster label for that month. Based on the cluster labels for each month, the historical dataset is divided into k subsets.

[0089] To address the issue that traditional methods do not adequately consider data fluctuation characteristics, this embodiment introduces a similar day clustering method based on the k-means algorithm to divide the historical dataset into subsets with similar fluctuation characteristics, significantly improving the adaptability and accuracy of the system's equivalent inertia short-term prediction model under different operating conditions.

[0090] S5: Model training.

[0091] The Temporal Convolutional Network and Bi-directional Long Short-Term Memory Network (TCN-BiLSTM) model is trained using the target input variables in each subset of the dataset to obtain the short-term prediction model of the system's equivalent inertia for each cluster label.

[0092] Since traditional single models are difficult to capture both long-term dependencies and local features of time-series data simultaneously, this invention adopts the TCN-BiLSTM model, which combines the local feature extraction capability of TCN with the ability of BiLSTM to capture long-term dependencies, in order to overcome the limitations of traditional methods in modeling complex time-series relationships and significantly improve the accuracy of short-term inertia prediction.

[0093] The TCN-BiLSTM model comprises: First, leveraging the excellent feature extraction capability and convergence efficiency of TCN, the model performs convolutional operations on the input data to extract temporal features, providing a comprehensive feature representation for subsequent models; then, the BiLSTM network is used to further process the features extracted by TCN, learning the complex interaction relationships of the time series through gating mechanisms and memory units; finally, the predicted value of the equivalent inertia of the system at the time to be predicted is output through a fully connected layer.

[0094] The structural parameters of the TCN-BiLSTM model include: the number of TCN network layers, the number of TCN convolutional kernels, the size of the TCN convolutional kernels, the TCN dilation coefficient, the number of BiLSTM neurons, the batch size, the learning rate, and the dropout rate. In this embodiment, the number of iterations is set to 500, the initial learning rate is 0.01, and the model training uses the Adam optimization function. The learning rate is dynamically adjusted according to the training epochs to achieve more effective convergence during training, thereby improving the robustness of the TCN-BiLSTM model. A grid search method is used to select model parameters, traversing various hyperparameter combinations to choose the optimal model parameters.

[0095] Because the equivalent inertia of a power system has a physically gradual change characteristic, meaning that the inertia changes slowly over a short timescale, this embodiment introduces a smoothing regularization term as part of the penalty function based on the root mean square error (RMSE) loss function during model training. Specifically, it adds the square of the first-order difference of the predicted value sequence as a regularization term. The loss function for training the TCN-BiLSTM model in this embodiment is:

[0096]

[0097] Among them, E RMSE Let H be the loss function, n be the total number of training samples in the training batch, and H be the loss function. i H is the predicted value of the equivalent inertia of the system at the time to be predicted for the i-th training sample. isys Let H′ be the true equivalent inertia of the system at the time to be predicted for the i-th training sample. isys Let λ be the true value of the system's equivalent inertia at the previous time step for the i-th training sample at the time to be predicted, and λ be the weighting coefficient. The training sample consists of data for all target input variables at a certain time step, which, after being input into the TCN-BiLSTM model, yields the predicted value of the system's equivalent inertia at the time to be predicted.

[0098] To further enhance the model's ability to learn time-series patterns, this embodiment adds a time-aware variable as input to the TCN-BiLSTM model, based on the target input variable, to guide the model in capturing system operating state features.

[0099] Preferably, this embodiment constructs time-aware variables based on the original input data (including various generator power, interconnection channel power, and load data), specifically including:

[0100] (1) Sine and cosine function encoding of the number of hours (0-23) at each time point to express periodicity;

[0101] (2) Binary labels indicating whether each time period is during peak load (e.g., 07:00–09:00, 17:00–20:00) or trough load (e.g., 00:00–05:00);

[0102] (3) Binary labels for whether each time point is a weekday / weekend.

[0103] The time-aware variables can reflect the typical characteristics of the power grid operation mode. When combined with power-related variables and input into the TCN-BiLSTM model, the model can accurately perceive changes in load characteristics and improve its ability to predict system inertia in a time series.

[0104] After dividing the historical dataset into k subsets according to S3, a time-aware variable is added to each subset. Each subset is further divided into training, validation, and test sets. The training set of each subset is fed into the TCN-BiLSTM model for training. After each training iteration, the model performance is evaluated using the corresponding validation set until the error metric is met, thus obtaining the optimal model parameters. During training, the target input variable and the time-aware variable are used together as inputs to the TCN-BiLSTM model to obtain the predicted value of the system's equivalent inertia at the time to be predicted. After training, the optimal model parameters for each subset are saved, resulting in a short-term prediction model for the system's equivalent inertia corresponding to each cluster label.

[0105] S6: Prediction of equivalent inertia of the system.

[0106] When predicting the equivalent inertia of the system, the short-term prediction model of the equivalent inertia of the system is selected according to the cluster label of the month in which the equivalent inertia of the system is located at the time to be predicted. The data of the target input variable is used as the input of the short-term prediction model of the equivalent inertia of the system to be predicted, and the predicted value of the equivalent inertia of the system at the time to be predicted is obtained.

[0107] In summary, the TCN-BiLSTM-based short-term prediction method for system equivalent inertia described in this invention uses correlation coefficients to perform correlation analysis on input variables, accurately selecting the variables with the greatest impact on system equivalent inertia as the target input variables for the short-term prediction model, effectively reducing redundant information interference. Furthermore, addressing the problem of insufficient consideration of data fluctuation characteristics in traditional methods, this invention introduces a similar-day clustering method, dividing historical data into subsets with similar fluctuation characteristics in system equivalent inertia. TCN-BiLSTM models capable of capturing temporal features are trained on these subsets, resulting in multiple short-term prediction models for system equivalent inertia. This significantly improves the adaptability and accuracy of the short-term prediction models for system equivalent inertia under different operating conditions; and during inference, the prediction accuracy is effectively improved by considering the characteristics of the system equivalent inertia at the time of prediction. The TCN-BiLSTM model combines the local feature extraction capability of the TCN model with the ability of BiLSTM to capture long-term dependencies, helping to overcome the limitations of traditional methods in modeling complex temporal relationships and significantly improving the accuracy of short-term prediction of system equivalent inertia.

[0108] Therefore, this invention can solve key problems in traditional inertia prediction, such as inaccurate variable selection, poor model adaptability, and insufficient extraction of time series features, thereby improving the accuracy of short-term prediction of system equivalent inertia and providing a more reliable solution for short-term prediction of power system equivalent inertia.

[0109] The technical solution claimed in this invention will be further described below through a specific embodiment, which adopts the above-mentioned method for short-term prediction of system equivalent inertia based on TCN-BiLSTM.

[0110] This embodiment uses measured data from the UK National Grid from January 1, 2019 to December 31, 2020, provided by the National Energy and Sustainability Observatory (NESO) and the European Network of Transmission System Operators for Electricity (ENTSO-E), with a data sampling interval of 1 hour. This embodiment selects 8760 data sets from 2019-2020 as the training and validation sets, and 8784 data sets from 2020-2021 as the test set. The input variable set is shown in Table 1.

[0111] Table 1. Input Variable Set

[0112]

[0113] To select variables with a significant impact on the system's equivalent inertia for prediction, this embodiment uses variable data from the entire year of 2019 as a sample. The correlation coefficient between the input variables and the system's equivalent inertia at the time of prediction is calculated, with a prediction timescale of one day. Based on the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall's correlation coefficient, the average of the three is used as the basis for selecting input variables. The results are shown in Table 2.

[0114]

[0115] Table 2 shows that the correlation between transmission system demand, national demand, natural gas power, coal power, pumped storage power, Dutch interconnection power, real-time system equivalent inertia, and the system equivalent inertia at the time of prediction is high, all above 0.3. However, the correlation between photovoltaic power and wind power, as new energy units, and the system equivalent inertia is low and can be ignored because they lack their own inertia support and have fewer virtual inertia devices connected. Based on the above analysis, this embodiment selects seven input variables—transmission system demand, national demand, natural gas power, coal power, pumped storage power, Dutch interconnection power, and real-time system equivalent inertia—as target input variables for short-term prediction of system equivalent inertia.

[0116] This embodiment uses the k-means algorithm for similar-day clustering, employing the cluster size ratio and the sum of squared errors (SSE) to select the number of clusters, k. The cluster size ratio is calculated by dividing the maximum cluster size by the minimum cluster size; a smaller ratio indicates more uniform clustering. SSE refers to the squared distance of each data point from its cluster center; a greater decrease in SSE indicates better clustering performance.

[0117] Using the historical data of the system's equivalent inertia for the entire year of 2019 as the clustering object, the cluster size ratio and SSE curve for different values ​​of k are shown in Table 3 and... Figure 2 As shown.

[0118] Table 3. Clustering results with different values ​​of the number of clusters k

[0119]

[0120]

[0121] As shown in Table 3, when k equals 2, the cluster size ratio is the smallest, the absolute value of the second derivative of SSE is the largest, and the clustering effect is the best. Therefore, k=2 is chosen for clustering the dataset. The clustering results when k=2 are shown in Table 4.

[0122] Table 4. Month Cluster Labels

[0123]

[0124] As shown in Table 4, the data from April to September are mainly concentrated in cluster label 1, while the data from the other months are mainly concentrated in cluster label 2. Therefore, the data from April to September are divided into subset 1, and the data from January to March and October to December are divided into subset 2.

[0125] This embodiment uses 2019 data to train various neural network models. When making predictions in 2020 or 2021, if the inertia is predicted for January, the model trained on subset 2 is used; if the inertia is predicted for May, the model trained on subset 2 is used. After 3 or 5 years, the dataset is re-partitioned to accommodate changes in the power system structure.

[0126] To more comprehensively evaluate the performance of the equivalent inertia short-term prediction model proposed in this invention, this embodiment compares the TCN-BiLSTM model with both the convolutional neural network and long short-term memory network (CNN-LSTM) and ordinary least squares (OLS) prediction models. The input variable selection and similar day clustering results for the three prediction models are kept consistent to ensure the scientific rigor of the experiment.

[0127] The neural network models were trained using data from 2019. After training, the data from April 1 to April 5, 2020 was used as the test set for subset 1 to predict the system equivalent inertia from April 2 to April 6. The error metrics of each prediction model are shown in Table 5. The data from January 1 to January 5, 2020 was used as the test set for subset 2 to predict the system equivalent inertia from January 2 to January 6. The error metrics of each prediction model are shown in Table 6.

[0128] Table 5. Error metrics of different prediction models in subset 1

[0129]

[0130] Table 6. Error metrics of different prediction models in subset 2

[0131]

[0132] Comparing the prediction results of the TCN-BiLSTM model, OLS model, and CNN-LSTM model on two datasets, the TCN-BiLSTM model demonstrates the best prediction performance on both subset 1 and subset 2. This model exhibits the smallest errors in RMSE and MAE, and achieves the best prediction results in R...2 The TCN-BiLSTM dataset exhibits the highest correlation and performs best across all three evaluation metrics. Taking subset 1 as an example, compared to OLS, TCN-BiLSTM significantly reduces RMSE and MAE by 75.05% and 75.71%, respectively, and R... 2 The RSI also improved from 0.88 to 0.995; compared with CNN-LSTM, TCN-BiLSTM significantly reduced RMSE and MAE by 62.61% and 63.46%, respectively. 2 It also increased from 0.95 to 0.995.

[0133] In summary, under the same experimental conditions, the TCN-BiLSTM model exhibits excellent prediction performance, verifying the effectiveness of the method proposed in this invention.

[0134] Based on the above-mentioned method for short-term prediction of system equivalent inertia based on TCN-BiLSTM, this invention also provides a device for short-term prediction of system equivalent inertia based on TCN-BiLSTM, comprising:

[0135] The input variable filtering module is used to calculate the correlation coefficient between each input variable in the historical dataset of system equivalent inertia and the system equivalent inertia at the time to be predicted; and to filter the input variables using the correlation coefficient to obtain the target input variable.

[0136] The clustering module is used to treat the daily system equivalent inertia data in the historical dataset as a sample, perform similar day clustering, and obtain multiple clusters; the samples in each cluster are assigned a cluster label of that cluster;

[0137] The subset partitioning module is used to count the number of samples for each cluster label in each month, and use the cluster label with the most samples as the cluster label for that month; based on the cluster labels of the months, the historical dataset is divided into multiple subsets.

[0138] The training module is used to train the TCN-BiLSTM model with the data of the target input variable in each subset of the dataset, so as to obtain the short-term prediction model of the system equivalent inertia corresponding to each cluster label.

[0139] The prediction module is used to predict the equivalent inertia of the system. It selects the short-term prediction model of the equivalent inertia of the system corresponding to the cluster label of the month in which the equivalent inertia of the system is located at the time to be predicted. The data of the target input variable is used as the input of the short-term prediction model of the equivalent inertia of the system to be predicted, and the predicted value of the equivalent inertia of the system at the time to be predicted is obtained.

[0140] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for short-term prediction of system equivalent inertia based on TCN-BiLSTM.

[0141] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0142] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations 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, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0145] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for short-term prediction of system equivalent inertia based on TCN-BiLSTM, characterized in that, include: Calculate the correlation coefficient between each input variable and the system's equivalent inertia at the time to be predicted in the historical dataset of the system's equivalent inertia. The target input variables are obtained by filtering the input variables using the correlation coefficients. Treating the daily equivalent inertia data in the historical dataset as a single sample, we perform clustering based on similar days. Multiple clusters are obtained; samples in each cluster are assigned a cluster label. The number of samples for each cluster label is counted in each month, and the cluster label with the largest number of samples is used as the cluster label for that month. Based on the cluster labels of the months, the historical dataset is divided into multiple subsets; Train the TCN-BiLSTM model with the data of the target input variable in each subset of the dataset to obtain the short-term prediction model of the system equivalent inertia corresponding to each cluster label; When predicting the equivalent inertia of the system, the short-term prediction model of the equivalent inertia of the system is selected according to the cluster label of the month in which the equivalent inertia of the system is located at the time to be predicted. The data of the target input variable is used as the input of the short-term prediction model of the equivalent inertia of the system to be predicted, and the predicted value of the equivalent inertia of the system at the time to be predicted is obtained.

2. The method for short-term prediction of system equivalent inertia based on TCN-BiLSTM according to claim 1, characterized in that, Data preprocessing is performed on the historical dataset of the system's equivalent inertia, including: Identify missing values ​​in the dataset and use the interquartile range method to detect outliers; Cubic spline interpolation was used to fill in missing and outlier values. Based on the degree of fluctuation of the input variables, the imputed data is normalized, including: If the maximum fluctuation of the current input variable does not exceed ±30% of the baseline value, then the minimum-maximum normalization method is applied to the data after the current input variable is filled. If the maximum fluctuation of the current input variable exceeds ±30% of the baseline value, then the zero-mean standardization method is applied to the data after imputing the current input variable.

3. The method for short-term prediction of system equivalent inertia based on TCN-BiLSTM according to claim 1, characterized in that, Calculate the correlation coefficient between each input variable in the historical dataset and the equivalent inertia of the system at the time to be predicted, including: calculating the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient between each input variable in the historical dataset and the equivalent inertia of the system at the time to be predicted, and taking the average value.

4. The method for short-term prediction of system equivalent inertia based on TCN-BiLSTM according to claim 3, characterized in that, The input variables are filtered using the correlation coefficients to obtain the target input variables, including: If the average value of the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is greater than 0.3, then the input variable is used as the target input variable. If the average of the Pearson correlation coefficient, Spearman correlation coefficient, and Kendall correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is less than or equal to 0.3, then the input variable is discarded.

5. The method for short-term prediction of system equivalent inertia based on TCN-BiLSTM according to claim 1, characterized in that, When calculating the correlation coefficient between each input variable in the historical dataset and the equivalent inertia of the system at the time to be predicted, if the input variable is a variable with lag, the data of the current time is replaced by the data of the input variable at a preset time step after the current time to obtain the lag data of the input variable; the correlation coefficient between the input variable and the equivalent inertia of the system at the time to be predicted is calculated using the lag data of the input variable.

6. The method for short-term prediction of system equivalent inertia based on TCN-BiLSTM according to claim 1, characterized in that, The k-means algorithm is used for clustering similar days.

7. The method for short-term prediction of system equivalent inertia based on TCN-BiLSTM according to claim 1, characterized in that, Based on the target input variables, time-aware variables are added as inputs to the TCN-BiLSTM model; the time-aware variables include: sine and cosine function encodings of the number of hours at each time, binary labels indicating whether each time is during peak or trough load, and binary labels indicating whether each time is a weekday.

8. The method for short-term prediction of system equivalent inertia based on TCN-BiLSTM according to claim 1, characterized in that, The loss function for training the TCN-BiLSTM model is: Among them, E RMSE Let H be the loss function, N be the total number of training samples in the training batch, and H be the loss function. i H is the predicted value of the equivalent inertia of the system at the time to be predicted for the i-th training sample. isys Let H′ be the true equivalent inertia of the system at the time to be predicted for the i-th training sample. isys Let λ be the true value of the system's equivalent inertia at the time preceding the time to be predicted for the i-th training sample, and let λ be the weighting coefficient.

9. A short-term prediction device for the equivalent inertia of a system based on TCN-BiLSTM, characterized in that, include: The input variable filtering module is used to calculate the correlation coefficient between each input variable in the historical dataset of the system's equivalent inertia and the system's equivalent inertia at the time to be predicted. The target input variables are obtained by filtering the input variables using the correlation coefficients. The clustering module is used to treat the daily system equivalent inertia data in the historical dataset as a sample, perform similar day clustering, and obtain multiple clusters; the samples in each cluster are assigned a cluster label of that cluster; The subset partitioning module is used to count the number of samples for each cluster label in each month, and the cluster label with the largest number of samples is used as the cluster label for that month. Based on the cluster labels of the months, the historical dataset is divided into multiple subsets; The training module is used to train the TCN-BiLSTM model with the data of the target input variable in each subset of the dataset, so as to obtain the short-term prediction model of the system equivalent inertia corresponding to each cluster label. The prediction module is used to predict the equivalent inertia of the system. It selects the short-term prediction model of the equivalent inertia of the system corresponding to the cluster label of the month in which the equivalent inertia of the system is located at the time to be predicted. The data of the target input variable is used as the input of the short-term prediction model of the equivalent inertia of the system to be predicted, and the predicted value of the equivalent inertia of the system at the time to be predicted is obtained.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the short-term prediction method for system equivalent inertia based on TCN-BiLSTM as described in any one of claims 1 to 8.