A robust transient stability assessment model acquisition method based on time series transfer learning
By employing a temporal transfer learning-based approach and utilizing critical curve selection and spatiotemporal importance assessment algorithms, the cross-system applicability of deep learning in power system transient stability assessment is addressed, enabling efficient transient stability assessment across different system scales.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID CHONGQING ELECTRIC POWER CO ELECTRIC POWER RES INST
- Filing Date
- 2024-08-20
- Publication Date
- 2026-07-03
Smart Images

Figure CN118940093B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of power systems and artificial intelligence, and in particular to a method for obtaining a robust transient stability assessment model based on time-series transfer learning. Background Technology
[0002] Ensuring power system stability is a fundamental requirement for grid operation when the system is subjected to significant disturbances. Therefore, power companies must regularly conduct comprehensive simulations to assess system stability under anticipated unforeseen events. Simulation analysis requires examining the stability of numerous transient curves in multivariate time series formats. This places a heavy computational burden on existing manual analysis methods. Furthermore, with the rapid development of highly penetrating renewable energy sources, the stability characteristics of power systems are becoming increasingly complex, leading to a significant increase in the workload and frequency of transient stability simulation analysis. There is an urgent need to improve the efficiency of transient curve evaluation and reduce the workload of simulation analysts.
[0003] Data-driven methods are ideal tools for intelligent simulation analysis by identifying transient curves. Existing data-driven methods can generally be divided into shallow learning and deep learning. Compared with shallow learning methods, deep learning methods have received widespread attention for their ability to extract more abstract and complex features from data. Various deep learning methods, such as deep fully connected neural networks, convolutional neural networks, temporal neural networks, and graph neural networks, have been applied to transient stability analysis. However, the excellent performance of deep learning methods relies on the assumption that the training and test datasets follow the same distribution. In fact, due to the continuous changes in power systems, such as increased load demand and system expansion, this assumption often does not hold. Since the training dataset cannot cover all possible variable operating conditions in the power system, the performance of a well-trained deep model will inevitably deteriorate under new, unlearned operating scenarios. To adapt to new operating scenarios (target domains), a natural approach is to retrain the deep learning model for the new scenarios. However, this is time-consuming and requires a large number of samples from the new scenarios (target samples).
[0004] Transfer learning can leverage knowledge from the original scenario (source domain) to improve retraining efficiency and alleviate the sample requirements of the new operating scenario (target domain), potentially solving the aforementioned problems. Existing feature transfer-based metastability assessment methods mainly rely on distribution alignment based on the maximum mean difference of marginal, conditional, or joint distributions. However, during the transfer process, the temporal characteristics of metastability may be destroyed. Therefore, existing feature transfer methods are only applicable to small-scale cross-system metastability problems or depend on hundreds of new scenario samples. How to preserve temporal characteristics during the transfer process and improve the generalization ability of data-driven metastability analysis requires further in-depth research. Summary of the Invention
[0005] This invention proposes a robust transient stability assessment model acquisition method based on temporal transfer learning, which can effectively preserve the temporal characteristics of transient curves and make the data-driven intelligent transient stability assessment model learned in the source domain applicable to transient stability assessment under different system scales.
[0006] This invention discloses a method for obtaining a robust transient stability evaluation model based on temporal transfer learning, which includes:
[0007] Step 1: In the initial stage, select the key curve set from the training samples of the original scene and use it as the training samples of the data-driven transient stability evaluation model; apply the z-score normalization method to the training samples, input the normalized training samples into the temporal neural network, and pre-train the data-driven transient stability evaluation model by minimizing the classification loss.
[0008] Step 2: In the second stage, the training samples are divided into multiple categories according to the labels. In each category, the training samples are divided into multiple groups by clustering. The comprehensive training loss is obtained by combining the classification loss and the temporal distribution matching loss. The training is carried out by minimizing the comprehensive training loss, and finally the trained transient stability evaluation model is obtained.
[0009] Further, step 2 includes:
[0010] A key curve selection method is adopted to ensure the consistency of input characteristics across power systems of different scales. The training data is divided into multiple categories according to the labels. Within each category, the training samples are divided into multiple groups by clustering to minimize the intra-class distance.
[0011] By leveraging the characteristics of transient time series curves in each hidden layer, the distribution distance between groups of different categories is increased, while the distribution distance between groups of the same category is decreased, thereby enhancing the characteristic representation of transient time series curves.
[0012] A spatiotemporal importance assessment algorithm is adopted to quantify the importance of each neuron in each hidden layer of a temporal neural network for metastability assessment, and a random upsampling method is used to ensure the balance of each group of samples.
[0013] Furthermore, the adoption of the critical curve selection method to ensure the consistency of input characteristics across power systems of different scales includes:
[0014] The transient voltage curves are sorted in descending order of variance, and the transient generator power angle curves are sorted in descending order of maximum absolute value. The top q curves from each sorted set are selected as the key curve set, which serves as the input feature vector for the data-driven transient stability assessment model. Clustering is performed using the inherent features of the transient voltage curves and transient generator power angle curves to unify the dimensionality of the key curve set.
[0015] Furthermore, in each round of the initial training process, random upsampling is used to allow groups with smaller sample sizes to randomly select additional batches based on the maximum batch number among all groups, ensuring that the number of batches is consistent across groups.
[0016] Furthermore, the use of a spatiotemporal importance assessment algorithm to quantify the importance of each neuron in each hidden layer of a temporal neural network for metastability assessment includes:
[0017] Initially, each time state is considered equally important and within the same layer. The value is initialized to the same value 1 / V during training. The value is adaptively adjusted based on the distribution distance of each round; Indicates the first i Group sample and the first j Group samples in neurons t The weights in the state are intended to learn the weights in a temporal neural network. V The relative importance of each hidden layer neuron.
[0018] Furthermore, The adaptive adjustment formula is:
[0019] (8)
[0020] (9)
[0021] In the formula, Let represent the weights of the i-th and j-th samples in round n+1 at neuron state t, and P be the update function for calculating the temporal distribution matching loss at different learning stages. It is the distribution distance of time step t in round n. This is the sigmoid function.
[0022] Furthermore, The expression is:
[0023]
[0024] in, For input The feature representation of the h-th layer neuron in state t. For input Features of neurons in layer h in state t and They are different groups within the same category. For input The feature representation of the h-th layer neuron in state t. For input Features of neurons in layer h in state t and They are different groups within the same category. for and The splicing pattern, For input and The splicing pattern, It is a very small hyperparameter. For distance.
[0025] Furthermore, from equations (8) and (9), it can be seen that if the distribution distance of round n is greater than the distribution distance of round n-1, then the distribution distance will increase. The value of is adjusted to amplify the effect of its enhanced feature representation.
[0026] Furthermore, the expression for the temporal distribution matching loss is:
[0027] (6)
[0028] in, For time-series distribution matching loss, Indicates the first h Hidden layer weights represent the spatial importance between hidden layers. It is a natural exponential function.
[0029] Furthermore, The empirical formula is:
[0030] (7)
[0031]
[0032] in, l This represents the number of hidden layers.
[0033] Because of the adoption of the above technical solution, the present invention has the following advantages:
[0034] 1. This invention proposes a simple and effective method for selecting critical curves, which conforms to the engineering experience of transient stability judgment in actual engineering, and does not require the pre-definition of complex screening rules. It can effectively solve the problem of inconsistent data dimensions in cross-system transient stability assessment.
[0035] 2. This invention considers the temporal characteristics of transient curves during the migration process, which can effectively enhance the feature representation of transient time-series curves, increase the inter-class distance of transient curves and reduce their intra-class differences. It can enhance the generalization performance of data-driven models for power system transient stability assessment at different scales without the need for target domain samples.
[0036] 3. This invention can be widely applied to the transient stability determination of power systems based on artificial intelligence, and is particularly suitable for transient stability assessment under different system scales. It can also be further extended to other time series classification problems. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in the embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0038] Figure 1 This is a flowchart illustrating a method for obtaining a robust transient stability evaluation model based on temporal transfer learning, according to an embodiment of the present invention. Detailed Implementation
[0039] The present invention will be further described in conjunction with the accompanying drawings and embodiments. The described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art should fall within the protection scope of the present invention.
[0040] See Figure 1 This invention provides an embodiment of a method for obtaining a robust transient stability evaluation model based on temporal transfer learning, which includes:
[0041] Step 1: In the initial stage, select the key curve set from the training samples of the original scene and use it as the training samples of the data-driven transient stability evaluation model; apply the z-score normalization method to the training samples, input the normalized training samples into the temporal neural network, and pre-train the data-driven transient stability evaluation model by minimizing the classification loss.
[0042] Step 2: In the second stage, the training samples are first divided into multiple categories according to the labels. Within each category, the training samples are further divided into multiple groups through clustering. The comprehensive training loss is obtained by combining the classification loss and the temporal distribution matching loss. The training is performed by minimizing the comprehensive training loss, and finally, a well-trained transient stability evaluation model is obtained. The classification loss corresponds to formula (4).
[0043] In one embodiment, step 2 includes:
[0044] A key curve selection method is adopted to ensure the consistency of input characteristics across power systems of different scales. The training data is divided into multiple categories according to the labels. Within each category, the training samples are divided into multiple groups by clustering to minimize the intra-class distance.
[0045] By leveraging the characteristics of transient time series curves in each hidden layer, the distribution distance between groups of different categories is increased, while the distribution distance between groups of the same category is decreased, thereby enhancing the characteristic representation of transient time series curves.
[0046] A spatiotemporal importance assessment algorithm is adopted to quantify the importance of each neuron in each hidden layer of a temporal neural network for metastability assessment, and a random upsampling method is used to ensure the balance of each group of samples.
[0047] In this embodiment, a simple key curve selection method is proposed to ensure the consistency of input features across power systems of different scales. The training data is divided into two classes according to the labels. In each class, the training samples are divided into two groups using the k-means method for subsequent intra-class distance minimization. Secondly, the feature representation of the transient time series curves is enhanced by increasing the distribution distance between different classes and decreasing the distribution distance within the same class for the features of the transient time series curves in each hidden layer.
[0048] Furthermore, a spatiotemporal importance assessment algorithm is proposed to quantify the importance of each neuron in each hidden layer of a temporal neural network for metastability assessment, and a random upsampling method is further employed to ensure the balance of each set of samples. Finally, the effectiveness of the proposed method is verified through simulation using a CEPRI-36 node system and its modified version. The specific method steps are as follows:
[0049] (1) Training sample feature partitioning:
[0050] In practical applications, changes in power system size lead to variations in the number of transient voltage and generator power angle curves. Typically, focus is placed on critical transient voltage and generator power angle curves, which exhibit rapid response and significant fluctuations, for transient stability assessment. A method for selecting critical curves is proposed, prioritizing those curves with the largest fluctuations.
[0051] The transient voltage curves are sorted in descending order of variance, and the transient generator power angle curves are sorted in descending order of maximum absolute value. The top q curves from each sorted set are selected as the key curve set, as shown in Equation (1). This key curve set serves as the input feature vector Xin-rank = { , This method utilizes the inherent characteristics of curves for clustering, thereby unifying the dimensionality of the key curve set. This eliminates the need for predefined fixed filtering rules and solves the problem of dimensional inconsistency when migrating data-driven models across power systems of different sizes.
[0052] (1)
[0053] in, , This represents the 1st and qth curves sorted in descending order of transient voltage variance. , This represents the 1st and qth curves of the power angle curves, sorted in descending order of their maximum absolute values.
[0054] To ensure that the training samples are divided into four significantly different groups, the samples are initially classified according to their labels, as shown in Equation (2). To enhance the model's classification ability, the distributions of the two classes of samples should be as different as possible. Since stable and unstable modes are often similar across power systems, the resulting prediction model is expected to exhibit excellent generalization ability.
[0055] (2)
[0056] in, and They are different categories. As a sample, For sample labels.
[0057] Within each category, the training samples are further clustered into two distinct groups using the k-means algorithm. The value of k in the k-means algorithm is fixed at 2. The k-means algorithm is chosen because it is simple and easy to implement. Therefore, the training data can be represented as shown in Equation (3). By tightly clustering the two distinct groups within each category, the performance of the data-driven TAS model can be enhanced.
[0058] (3)
[0059] in, and Clustered by k-means algorithm as follows , and , .
[0060] To address the issue of imbalanced sample sizes among different groups, a random upsampling technique was employed. During each round of training, groups with smaller sample sizes randomly selected additional batches based on the maximum batch size across all groups, ensuring consistent batch numbers across all groups.
[0061] (2) Alignment of transient curve time distribution:
[0062] Given a sample partitioning group, the transient curve time-series distribution alignment module aims to enhance its feature representation by matching the distributions of different groups. Therefore, compared to methods that rely solely on local or statistical information, the learned model M is expected to achieve good generalization in unknown scenarios.
[0063] TDM loss for classification The classification loss, or simply classification loss, can be expressed as equation (4):
[0064] (4)
[0065] Where loss(.,.) is the loss function, such as MSE loss. These are the learnable model parameters.
[0066] However, minimizing equation (4) only facilitates the extraction of predictive knowledge from each group. It cannot simultaneously enhance the distributional diversity between different categories and increase the sample density within a single category. Referring to existing domain adaptation work, a simple solution is to maximize the inter-class scatter among the four groups and minimize the intra-class scatter as a regularization term. However, existing work typically matches distributions on deep representations. Let V represent the V hidden states of the h-th hidden layer in a temporal neural network. Several commonly used distribution matching distances include cosine distance, maximum mean discrepancy (MMD), and adversarial distance. Existing work typically aligns the distribution of features from the last hidden layer of a temporal neural network, which can be formulated as:
[0067] (5)
[0068] In the formula l This represents the hidden layer number; to avoid numerical issues, This is a very small hyperparameter to avoid division by zero; it is typically set to 1×10⁻⁸.
[0069] Since each hidden neuron only contains partial distribution information of the input transient voltage or generator power angle sequence, the above regularization term cannot capture the information of each hidden layer neuron, i.e., it cannot effectively characterize the distribution information of the transient time series curve. Therefore, attention should be paid to each hidden layer neuron in the temporal neural network. Furthermore, to quantify the relative importance of the Vth hidden layer neuron in different layers, this invention proposes a spatiotemporal importance evaluation algorithm. Finally, the proposed temporal distribution matching loss Ltdm is expressed as:
[0070] (6)
[0071] in, For time-series distribution matching loss, Indicates the first h Hidden layer weights represent the spatial importance between hidden layers. It is a natural exponential function. For input The feature representation of the h-th layer neuron in state t. For input Features of neurons in layer h in state t and They are different groups within the same category. For input The feature representation of the h-th layer neuron in state t. For input Features of neurons in layer h in state t and They are different groups within the same category. for and The splicing pattern, For input and The splicing pattern, It is a very small hyperparameter. For distance.
[0072] Generally speaking, deeper feature representations have a greater impact on the results. The empirical formula is:
[0073] (7)
[0074] in, This indicates that the sum of all spatial weights is 1. l This represents the number of hidden layers.
[0075] Each time state was initially considered equally important, within the same layer. The value is initialized to the same value 1 / V. During training, The value can be adaptively adjusted based on the distribution distance of each round; Indicates the first i Group sample and the first j Group samples in neurons t The weights in the state are intended to learn the weights in a temporal neural network. V The relative importance of each hidden layer neuron.
[0076] The adaptive adjustment formula is:
[0077] (8)
[0078] (9)
[0079] In the formula, Let represent the weights of the i-th and j-th samples in round n+1 at neuron state t, and P be the update function for calculating the temporal distribution matching loss at different learning stages. It is the distribution distance of time step t in round n. This is the sigmoid function.
[0080]
[0081] From equations (8) and (9), it can be seen that if the distribution distance of round n is greater than the distribution distance of round n-1, then the distribution distance will increase. The value of is adjusted to amplify the effect of its enhanced feature representation.
[0082] In summary, the training process of the data-driven transient stability intelligent evaluation model based on the proposed method is summarized as follows: In the initial stage, the training samples of the original scene are selected for key curves using equation (1). To solve the numerical problem, the z-score normalization method is applied to the samples. This method only requires the mean and standard deviation of historical statistical data, which is very suitable for unknown scenarios. Compared with other preprocessing techniques (such as the minimization-maximization method), the z-score method better preserves the shape of the input distribution. Then, the normalized samples are input into the temporal neural network, including RNN, LSTM, GRU, TCN and Transformer. The data-driven model M is pre-trained by minimizing equation (4). In the second stage, the normalized samples are first divided into four groups using equations (2)-(3). Combining equations (4) and (6), the comprehensive training loss is obtained as:
[0083] (10)
[0084] in, It is a hyperparameter. The data-driven model M is trained using equation (10). The trained model M can improve computational performance on new scenes while maintaining the performance level on the source scenes.
[0085] For ease of understanding, the present invention provides a more specific embodiment:
[0086] (1) Simulation information and comparison methods
[0087] In this embodiment, the CEPRI-36 node system is used as the source domain system. PSASP was used to generate samples. The parameters for fault type, occurrence time and location, power flow level, and load motor component ratio are set in reference 1 (Zhou Rui, Yang Yan, Yu Juan, et al. A data-driven method for identifying transient-dominant instability modes in power systems adapted to topology changes [J]. Proceedings of the CSEE, online publication, 2024.), resulting in 7800 samples. The target domain includes adding a bus between BUS21 and BUS23 at the CEPRI-36 node, replicating the original generator BUS3 and transformer T2W3, and connecting them to the new bus, named the CEPRI-37 node system. It also includes connecting the CEPRI-37 node system to form a new system, named the CEPRI-74 node system.
[0088] The accuracy of a classifier is typically measured by the following metrics: accuracy, precision, F1 score, and AUC (Area Under Curve).
[0089] (11)
[0090] (12)
[0091] In this context, TP represents a true positive example, TN represents a true negative example, FP represents a false positive example, and FN represents a false negative example.
[0092] (13)
[0093] Where Precision is the accuracy rate and Recall is the recall rate. .
[0094] AUC is the area under the ROC curve. The ROC curve is a curve with the false positive rate (FPR) on the horizontal axis and the true positive rate (TPR, i.e., recall) on the vertical axis. , .
[0095] This invention validates the effectiveness of the proposed method on five common temporal neural networks (RNN, GRU, LSTM, TCN, and Transformer). The proposed feature transfer methods are RNN+TTLF, GRU+TTLF, LSTM+TTLF, TCN+TTLF, and Transformer+TTLF. The performance of the method after training with only source domain samples is compared in different scenarios. Each temporal neural network has four hidden layers, each with 64 neurons. The training batch size is 32, the pre-training epochs are 50, the total training iterations do not exceed 550, the early stopping epochs are 30, and the Adam algorithm is used to train the model.
[0096] (2) Validation of the proposed method
[0097]
[0098] This experiment evaluated the performance of different models in source domain systems (36 nodes) and target domain systems (37 and 74 nodes). In the source domain system, the present invention maintained the performance of traditional models, demonstrating excellent performance in accuracy, precision, F1 score, and AUC. In the more complex target domain system, the present invention showed better performance than traditional models. In the 37-node system, the present invention improved accuracy by 12% and F1 score and AUC by more than 10% compared to RNN. Compared to Transformer, it improved accuracy, F1 score, and AUC by about 5%. In the 74-node system, the present invention showed significant improvement over RNN, with an accuracy improvement of about 14% and an F1 score improvement of more than 20%. It also maintained good performance in other traditional models. The experimental results demonstrate that the present invention performs excellently in transfer learning, maintaining high accuracy and good performance in scenarios of different scales.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for obtaining a robust transient stability evaluation model based on temporal transfer learning, characterized in that, include: Step 1: In the initial stage, select a set of key curves from the training samples of the original scene and use them as training samples for the data-driven transient stability evaluation model. The z-score normalization method is applied to the training samples, and the normalized training samples are input into the temporal neural network. The data-driven transient stability evaluation model is pre-trained by minimizing the classification loss. Step 2: In the second stage, the training samples are divided into multiple categories according to the labels. In each category, the training samples are divided into multiple groups by clustering. The comprehensive training loss is obtained by combining the classification loss and the temporal distribution matching loss. The training is carried out by minimizing the comprehensive training loss, and finally the trained transient stability evaluation model is obtained. Step 2 includes: A key curve selection method is adopted to ensure the consistency of input characteristics across power systems of different scales. The training data is divided into multiple categories according to the labels. Within each category, the training samples are divided into multiple groups by clustering to minimize the intra-class distance. By leveraging the characteristics of transient time series curves in each hidden layer, the distribution distance between groups of different categories is increased, while the distribution distance between groups of the same category is decreased, thereby enhancing the characteristic representation of transient time series curves. A spatiotemporal importance assessment algorithm is adopted to quantify the importance of each neuron in each hidden layer of a temporal neural network for metastability assessment, and a random upsampling method is used to ensure the balance of each group of samples. The critical curve selection method adopted to ensure the consistency of input characteristics across power systems of different scales includes: The transient voltage curves are sorted in descending order of variance, and the transient generator power angle curves are sorted in descending order of maximum absolute value. The top q curves from each sorted set are selected as the key curve set, which serves as the input feature vector for the data-driven transient stability assessment model. Clustering is performed using the inherent features of the transient voltage curves and transient generator power angle curves to unify the dimensionality of the key curve set. The aforementioned spatiotemporal importance assessment algorithm, used to quantify the importance of each neuron in each hidden layer of a temporal neural network for metastability assessment, includes: Initially, each time state is considered equally important and within the same layer. The value is initialized to the same value 1 / V during training. The value is adaptively adjusted based on the distribution distance of each round; Indicates the first i Group sample and the first j Group samples in neurons t The weights in the state are intended to learn the weights in a temporal neural network. V The relative importance of each hidden layer neuron It is the distribution distance of time step t in round n; The expression is: in, For input The feature representation of the h-th layer neuron in state t. For input Features of neurons in layer h in state t and They are different groups within the same category. For input The feature representation of the h-th layer neuron in state t. For input Features of neurons in layer h in state t and They are different groups within the same category. for and The splicing pattern, For input and The splicing pattern, It is a very small hyperparameter. For distance.
2. The method according to claim 1, characterized in that, In each round of the initial training process, random upsampling is used to allow groups with smaller sample sizes to randomly select additional batches based on the maximum batch number among all groups, ensuring that the number of batches is consistent across groups.
3. The method according to claim 1, characterized in that, The adaptive adjustment formula is: In the formula, Let represent the weights of the i-th and j-th samples in round n+1 at neuron state t, and P be the update function for calculating the temporal distribution matching loss at different learning stages. It is the distribution distance of time step t in round n. This is the sigmoid function.
4. The method according to claim 3, characterized in that, If the distribution distance of round n is greater than the distribution distance of round n-1, then increase The value of is adjusted to amplify the effect of its enhanced feature representation.
5. The method according to claim 3, characterized in that, The expression for the temporal distribution matching loss is: in, For time-series distribution matching loss, Indicates the first h Hidden layer weights represent the spatial importance between hidden layers. It is a natural exponential function.
6. The method according to claim 5, characterized in that, The empirical formula is: in, l This represents the number of hidden layers.