Transient stability evaluation method of power system and related equipment
By calculating the heterogeneous mask and extracting features from the branches of the power system, and using graph attention networks for weighted feature fusion, the instability problem in the transient stability assessment of the power system is solved, and the accuracy and anti-interference ability of the assessment are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-03-10
AI Technical Summary
Existing methods for assessing the transient stability of power systems suffer from problems such as unstable feature extraction, low assessment accuracy, and insufficient anti-interference capability when facing complex disturbance environments. In particular, they tend to overfit local disturbance features and ignore global topological correlation information in noisy environments.
By acquiring transient data from multiple branches of the target power system, calculating the heterogeneous mask and transient data for each branch, obtaining heterogeneous information, using a graph attention network for feature extraction, and weighted fusion of heterogeneous features to dynamically suppress the influence of branches with high uncertainty, and finally evaluating transient stability based on comprehensive features.
It improves the anti-interference capability and assessment accuracy of power system transient stability assessment, enhances stability and reliability under complex interference environments, and reduces misjudgments and omissions.
Smart Images

Figure CN121637183A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system technology, and in particular to a method and related equipment for evaluating the transient stability of a power system. Background Technology
[0002] As a crucial infrastructure of the national economy, the safe and stable operation of the power system is vital for social production and people's lives. With the large-scale integration of new energy sources, the widespread application of power electronic equipment, and the increasing complexity of power grid structures, the uncertainty of power system operation has significantly increased, making transient stability issues increasingly prominent. Transient stability refers to the ability of a power system to maintain synchronization and recover to a stable operating state after being subjected to faults or disturbances; it is one of the key indicators for ensuring the safe operation of the power grid. Therefore, conducting transient stability assessments of power systems is of great significance in order to identify potential stability risks in advance.
[0003] Traditional transient stability assessment methods mainly include mechanism-based numerical simulation methods and data-driven intelligent assessment methods. The former typically relies on detailed system parameters and fault models, determining system stability by solving transient equations; however, it suffers from high computational overhead and poor real-time performance, making it difficult to meet the online monitoring needs of modern power grids. The latter, by using machine learning models to train and predict system state characteristics, can improve assessment efficiency to some extent. However, in complex disturbance environments, data-driven methods also face numerous challenges.
[0004] First, in actual power grid operation, the transient data collected is often affected by factors such as communication noise, sensor errors, and signal loss, resulting in incomplete or outlier input features. Such missing or abnormal features compromise the integrity of the model input, thus reducing evaluation accuracy. Second, strong correlations or redundant information may exist between different monitoring nodes or measurement channels, making it difficult for the model to effectively distinguish between critical and invalid information during feature extraction, thereby reducing the model's discriminative ability. Third, the operating status of the power system is affected by various random disturbances, such as load fluctuations, unstable wind and solar power output, and line switching. These factors cause dynamic changes in data distribution, making the model prone to failure when facing unseen operating conditions or distribution drift, resulting in insufficient generalization ability.
[0005] Furthermore, most existing methods employ a uniform network structure and fixed feature channels during feature extraction, lacking a dynamic modeling mechanism for the sensitivity of input features and making it difficult to automatically adjust the feature focus region based on the degree of interference. This leads to the model being prone to overfitting local interference features in noisy environments while ignoring global topological correlation information, thus resulting in unstable assessments of the transient stability of power systems. Summary of the Invention
[0006] This application provides a method and related equipment for evaluating the transient stability of a power system, which can solve the problem of instability in evaluating the transient stability of a power system.
[0007] In a first aspect, embodiments of this application provide a method for assessing the transient stability of a power system, the method comprising:
[0008] Acquire transient data from multiple branches of the target power system;
[0009] Calculate the heterogeneity mask for each branch of the target power system, and obtain the heterogeneity information for each branch based on the heterogeneity mask and transient data; the heterogeneity mask is used to describe the degree of difference between the corresponding branch and other branches.
[0010] For each branch, feature extraction is performed on the heterogeneous information of the branch to obtain the heterogeneous features of the branch;
[0011] The heterogeneous features of all branches are weighted and fused to obtain the comprehensive features of the target power system;
[0012] Based on the comprehensive characteristics of the target power system, the transient stability of the target power system is evaluated, and the transient stability evaluation results of the target power system are obtained.
[0013] Optionally, calculate the heterogeneity mask for each branch of the target power system, including:
[0014] Set an initial mask for each branch;
[0015] For each branch, based on the branch's initial mask and transient data, the branch's transient stability is classified to obtain the branch's stability category.
[0016] Calculate the classification loss based on all stability categories, and calculate the mask sparse heterogeneity loss for all branches;
[0017] The classification loss and the mask sparse heterogeneity loss are added together to obtain the mask loss;
[0018] The initial mask of each branch is updated using mask loss to obtain the heterogeneous mask of each branch.
[0019] Optionally, calculate the masked sparse heterogeneous loss for all branches, including:
[0020] Through the formula:
[0021]
[0022]
[0023] Computational mask sparse heterogeneous branch ;
[0024] in, It includes the structural feature directions of all branches. express The identity matrix, Represents a constant. This represents the gain adjustment coefficient. This indicates the sparsity of the first branch. This represents the initial mask after normalization of the first branch. Indicates the first The initial mask after normalization of each branch Indicates the first Sparsity of each branch Represents the sparsity balance offset term:
[0025]
[0026] in, Indicates the first Sparsity of each branch , Representing feature dimension, Indicates the first The initial mask after normalization of each branch.
[0027] Optionally, transient data may include multiple power data points;
[0028] Based on the heterogeneous mask and transient data of each branch, obtain the heterogeneous information of each branch, including:
[0029] For each branch, perform the following steps:
[0030] The heterogeneous mask of the branch is multiplied element-wise with the transient data to obtain the mask element value corresponding to each power data in the transient data;
[0031] For each mask element value, determine whether the mask element value is greater than a preset element value. If it is, retain the power data corresponding to the mask element value; otherwise, remove the power data corresponding to the mask element value.
[0032] By integrating all the retained power data into a single dataset, heterogeneous information about the branches can be obtained.
[0033] Optionally, feature extraction is performed on the heterogeneous information of the branches to obtain the heterogeneous features of the branches, including:
[0034] Graph attention networks are used to extract features from the heterogeneous information of each branch to obtain the initial features of each branch;
[0035] Calculate the feature consistency loss based on all initial features, and train the graph attention network based on the feature consistency loss;
[0036] The trained graph attention network is used to extract features from the heterogeneous information of each branch, resulting in heterogeneous features for each branch.
[0037] Optionally, the feature consistency loss is:
[0038]
[0039] in, This represents the value of feature consistency loss. Indicates the number of branches. Indicates the first The initial characteristics of each branch, Indicates the first Initial characteristics of each branch Topology diagram of the target power system The set of vertices in the , Topology diagram of the target power system The set of edges in, Indicates the first Heterogeneous information of each branch Indicates the first Edge information of each branch, Indicates the first Heterogeneous information of each branch Indicates the first Edge information of each branch.
[0040] Optionally, the heterogeneous features of all branches are weighted and fused to obtain the comprehensive features of the target power system, including:
[0041] For each branch, calculate the free energy and mask coverage of the branch, and calculate the aggregate weight of the branch based on the free energy and mask coverage;
[0042] The heterogeneous features of all branches are weighted and fused based on all aggregation weights to obtain the comprehensive features of the target power system.
[0043] Optional, calculate the free energy of the branch, including:
[0044] Through the formula:
[0045]
[0046] Calculate the first Free energy of each branch ;
[0047] in, Indicates the stable state of the power system. Then it is stable. It is unstable. Indicates the first Each branch for the sample The logits score is used to assess the stability of a power system. This represents the temperature coefficient.
[0048] Optionally, the aggregation weights of the branches are calculated based on free energy and mask coverage, including:
[0049] The relative importance of the free energy of the branches and the relative importance of the mask coverage of the branches are calculated. Using preset hyperparameters, the aggregation weight of the branches is calculated based on the relative importance of the free energy and the relative importance of the mask coverage.
[0050] Secondly, embodiments of this application provide a transient stability assessment device for a power system, comprising:
[0051] The acquisition module is used to acquire transient data from multiple branches of the target power system;
[0052] The calculation module is used to calculate the heterogeneity mask of each branch of the target power system, and obtain the heterogeneity information of each branch based on the heterogeneity mask and transient data of each branch; the heterogeneity mask is used to describe the degree of difference between the corresponding branch and other branches.
[0053] The feature extraction module is used to extract features from the heterogeneous information of each branch to obtain the heterogeneous features of the branch.
[0054] The weighted fusion module is used to weightedly fuse the heterogeneous features of all branches to obtain the comprehensive features of the target power system.
[0055] The evaluation module is used to evaluate the transient stability of the target power system based on its comprehensive characteristics, and obtain the transient stability evaluation results of the target power system.
[0056] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned method for evaluating the transient stability of a power system.
[0057] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for evaluating the transient stability of a power system.
[0058] The above-mentioned solution in this application has the following beneficial effects:
[0059] In the embodiments of this application, transient data of multiple branches of the target power system are acquired, then the heterogeneity mask of each branch of the target power system is calculated, and the heterogeneity information of each branch is obtained based on the heterogeneity mask and transient data of each branch. Then, for each branch, the heterogeneity information of the branch is extracted to obtain the heterogeneity features of the branch. Then, the heterogeneity features of all branches are weighted and fused to obtain the comprehensive features of the target power system. Finally, based on the comprehensive features of the target power system, the transient stability of the target power system is evaluated to obtain the transient stability evaluation result of the target power system. Among these methods, calculating heterogeneous masks can represent the differences between branches. Obtaining heterogeneous information based on heterogeneous masks can encourage attention to key features, reduce redundant information, and ensure the diversity of power system information received between branches, avoiding the predicament of feature homogenization. This improves the feature accuracy of heterogeneous features obtained based on heterogeneous information. Weighted fusion of heterogeneous features can dynamically suppress the influence of branches with high uncertainty during the fusion process, thereby obtaining a more robust global system feature representation. Based on comprehensive features, transient stability assessment of the power system is performed, effectively improving the anti-interference capability, assessment accuracy, and stability of the power system transient stability assessment.
[0060] Other beneficial effects of this application will be described in detail in the following detailed description section. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 A flowchart of a transient stability assessment method for a power system provided in an embodiment of this application;
[0063] Figure 2 A schematic diagram of the structure of a power system transient stability assessment device provided in an embodiment of this application;
[0064] Figure 3 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0065] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0066] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0067] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0068] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0069] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0070] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0071] To address the instability of existing transient stability assessments of power systems, this application provides a transient stability assessment method for power systems. This method acquires transient data from multiple branches of a target power system, calculates a heterogeneous mask for each branch, and obtains heterogeneous information for each branch based on the heterogeneous mask and transient data. For each branch, feature extraction is performed on the heterogeneous information to obtain its heterogeneous features. These features are then weighted and fused to obtain a comprehensive feature of the target power system. Finally, based on this comprehensive feature, the transient stability of the target power system is assessed, yielding the transient stability assessment result. Among these methods, calculating heterogeneous masks can represent the differences between branches. Obtaining heterogeneous information based on heterogeneous masks can encourage attention to key features, reduce redundant information, and ensure the diversity of power system information received between branches, avoiding the predicament of feature homogenization. This improves the feature accuracy of heterogeneous features obtained based on heterogeneous information. Weighted fusion of heterogeneous features can dynamically suppress the influence of branches with high uncertainty during the fusion process, thereby obtaining a more robust global system feature representation. Based on comprehensive features, transient stability assessment of the power system is performed, effectively improving the anti-interference capability, assessment accuracy, and stability of the power system transient stability assessment.
[0072] The transient stability assessment method for power systems provided in this application will be illustrated below.
[0073] like Figure 1 As shown, the transient stability assessment method for power systems provided in this application includes the following steps:
[0074] Step 11: Obtain transient data of multiple branches of the target power system.
[0075] The target power system mentioned above is a power system that requires transient stability assessment. The multiple branches are multiple functional branches of the power system, including power generation, power transmission, and power distribution branches. The branch division can be achieved through learnable masks. That is, by setting a learnable mask for the complete data of all power equipment in the target power system, and then training the mask, different minimized datasets are obtained to achieve branch division. Different branches include different power equipment. For example, the power generation branch includes wind turbines and hydroelectric generators, the power transmission branch includes transformers and transmission cables, and the power distribution branch includes distribution boxes.
[0076] The aforementioned transient data includes multiple power data, such as the amplitude and phase angle of the three-phase voltage at the bus, the amplitude and phase angle of the three-phase current at the transmission line, the generator rotor power angle, the generator rotor speed, the generator excitation voltage, the active and reactive power of the load, and system topology parameters. Among these, the bus voltage and line current are used to characterize the electrical steady-state and transient characteristics of the power grid, the generator-related parameters reflect the dynamic response characteristics of the units, and the load power and system topology information are used to describe the overall power system's operating structure and energy transmission relationships.
[0077] Step 12: Calculate the heterogeneity mask for each branch of the target power system, and obtain the heterogeneity information for each branch based on the heterogeneity mask and transient data.
[0078] The aforementioned heterogeneity mask is used to describe the degree of difference between the corresponding branch and other branches. The heterogeneity information refers to the transient data of the corresponding branch that differs from the transient data of other branches.
[0079] In some embodiments of this application, the steps of calculating the heterogeneity mask of each branch of the target power system and obtaining the heterogeneity information of each branch based on the heterogeneity mask and transient data include:
[0080] The first step is to set an initial mask for each branch.
[0081] For example, an initial mask can be randomly generated for each branch, with the dimension of the initial mask being the same as the dimension of the transient data of the branch.
[0082] The second step is to classify the transient stability of each branch based on its initial mask and transient data to obtain the stability category of the branch.
[0083] Stability categories are used to describe the transient stability of the corresponding branch, such as stable, unstable, severely unstable, etc.
[0084] For example, the initial mask is multiplied element-wise with each power data in the transient data to obtain the processed transient data. The processed transient data can be processed using models such as support vector machines and decision trees to classify the transient stability of the branches and obtain the stability category of the branches.
[0085] The third step is to calculate the classification loss based on all stability categories and the mask sparse heterogeneity loss for all branches.
[0086] For example, the cross-entropy loss function can be used to calculate the classification loss based on all stability categories.
[0087] Through the formula:
[0088]
[0089]
[0090] Computational mask sparse heterogeneous branch .
[0091] in, This represents the structural feature direction of all branches, used to describe the directional distribution and independence of all branches. express The identity matrix is used to ensure matrix invertibility and prevent perfect correlation of features. Represents a constant. This represents the gain adjustment coefficient. This indicates the sparsity of the first branch. This represents the initial mask after normalization of the first branch. Indicates the first The initial mask after normalization of each branch Indicates the first Sparsity of each branch Represents the sparsity balance offset term:
[0092]
[0093] in, Indicates the first Sparsity of each branch , Representing feature dimension, Indicates the first The initial mask after normalization of each branch.
[0094] For example, the initial mask can be normalized using L2 row normalization.
[0095] The fourth step is to add the classification loss and the mask sparse heterogeneity loss together to obtain the mask loss.
[0096] The fifth step is to update the initial mask of each branch using mask loss to obtain the heterogeneous mask of each branch.
[0097] For example, gradient descent, optimizers, or other methods can be used to update the initial mask of each branch using mask loss, resulting in a heterogeneous mask for each branch.
[0098] It's important to note that sparse heterogeneous loss is used to simultaneously constrain the sparsity of each branch mask and enhance the differentiation between branches. When the masks of different branches are too similar in the feature space, the model is prone to redundant learning, causing the multi-branch structure to lose its complementary effect. By introducing sparse heterogeneous loss during training, the masks of different branches can be differentiated along different directions while maintaining their sparsity properties, allowing them to focus on the feature regions most representative of transient stability. Lower sparse heterogeneous loss means that feature selection between branches is more independent, which helps the model form multi-perspective and complementary feature representations under complex perturbation conditions.
[0099] For example, with an input feature dimension of 4, if the masks for the three branches are (1.0, 0.9, 0.1, 0.0), (0.2, 0.1, 1.0, 0.8), and (0.9, 0.8, 0.9, 0.1), respectively, the calculated sparse heterogeneous loss is approximately 2.06, indicating significant differences between branches and good feature complementarity. However, when the mask for the second branch is modified to be more similar to that of the first branch, the loss value increases to approximately 9.24, indicating a decrease in mask differences and an increase in feature overlap. Therefore, the magnitude of the sparse heterogeneous loss can intuitively reflect the degree of differentiation between masks and guide the model to select differential features between branches during the optimization process.
[0100] Step 6: For each branch, perform the following steps:
[0101] The heterogeneous mask of the branch is multiplied element-wise with the transient data to obtain the mask element value corresponding to each power data in the transient data.
[0102] For each mask element value, determine whether the mask element value is greater than a preset element value. If it is, retain the power data corresponding to the mask element value; otherwise, remove the power data corresponding to the mask element value.
[0103] By integrating all the retained power data into a single dataset, heterogeneous information about the branches can be obtained.
[0104] For example, the transient data of a certain branch includes [the rotor power angle of generator A, the speed of generator A, the voltage amplitude of generator B, and the excitation voltage of generator B], branch The mask is [0,1,1,0], and the branch is... The input received by the graph attention network is [ / , the rotational speed of generator A, the voltage amplitude of generator B, and the excitation voltage of generator B]. " / " indicates that the feature is masked.
[0105] When the mask of a branch is initially [0.9, 0.8, 0.1, 0.2, 0.7, 0.3], after multiple rounds of optimization, its value is gradually adjusted to [1.0, 0.95, 0.05, 0.1, 0.9, 0.15]. This indicates that the branch automatically strengthens the weight of key electrical quantities (such as bus voltage and generator speed) through training, and suppresses auxiliary features that have little impact on transient stability, thereby achieving more discriminative feature input.
[0106] Step 13: For each branch, extract features from the heterogeneous information of the branch to obtain the heterogeneous features of the branch.
[0107] In some embodiments of this application, the step of extracting features from the heterogeneous information of branches to obtain the heterogeneous features of branches includes:
[0108] The first step is to use a graph attention network to extract features from the heterogeneous information of each branch, thus obtaining the initial features of each branch.
[0109] The second step is to calculate the feature consistency loss based on all initial features and train the graph attention network based on the feature consistency loss.
[0110] Specifically, the feature consistency loss is:
[0111]
[0112] in, This represents the value of feature consistency loss. Indicates the number of branches. Indicates the first Initial characteristics of each branch Indicates the first Initial characteristics of each branch Topology diagram of the target power system The set of vertices in the , Topology diagram of the target power system The set of edges in, Indicates the first Heterogeneous information of each branch Indicates the first Edge information of each branch, Indicates the first Heterogeneous information of each branch Indicates the first Edge information of each branch.
[0113] For example, gradient descent, optimizers, and other methods can be used to train graph attention networks. (The above topology graph...) Multiple nodes refer to electrical nodes such as power system buses and equipment, and the edges between nodes are the circuits between two electrical nodes.
[0114] For example, if , The global feature vectors obtained by the three branches after applying their respective masks and GAT extractions to the same working condition (same topology and disturbance) are as follows: , , If the squared Euclidean distance between the three is small, the calculated feature difference is close to 0, indicating that the high-order semantic representations are highly consistent, facilitating the sharing of the same classification head and obtaining stable discrimination. Conversely, if the high-order features of the branches differ significantly from each other (e.g., ...), the high-order features of the branches differ significantly from each other (e.g., ...). If the features are biased towards completely different semantic directions, the differences in their features will increase significantly. Due to the instability of the feature space, this will lead to a decrease in model performance.
[0115] The third step is to use the trained graph attention network to extract features from the heterogeneous information of each branch, thus obtaining the heterogeneous features of each branch.
[0116] Specifically, the heterogeneous information of each branch is input into the trained graph attention network for calculation to obtain the heterogeneous features of the branches.
[0117] Step 14: Weighted fusion of the heterogeneous features of all branches to obtain the comprehensive features of the target power system.
[0118] The aforementioned comprehensive features are used to describe the transient information of the target power system as a whole.
[0119] In some embodiments of this application, the step of weighted fusion of the heterogeneous features of all branches to obtain the comprehensive features of the target power system includes:
[0120] The first step is to calculate the free energy and mask coverage of each branch, and then calculate the aggregate weight of the branch based on the free energy and mask coverage.
[0121] Specifically, through the formula:
[0122]
[0123] Calculate the first Free energy of each branch .
[0124] in, Indicates the stable state of the power system. Then it is stable. It is unstable. Indicates the first Each branch for the sample The logits score is used to assess the stability of a power system. This represents the temperature coefficient.
[0125] For example, statistics are performed on the masks related to vertex features and the masks related to edge features in each branch to determine the range and number of activations in their respective dimensions. Combining the known total number of vertices and edges in the power system graph structure, the proportion of activated regions in each branch mask is quantitatively calculated to obtain the mask coverage.
[0126] It should be noted that the steps for calculating the aggregate weights of branches based on free energy and mask coverage are as follows: calculate the relative importance of the free energy and the relative importance of the mask coverage of the branches; and use preset hyperparameters to calculate the aggregate weights of the branches based on the relative importance of free energy and mask coverage. For example, two preset hyperparameters are introduced to control the influence of the two indicators on the weight allocation results, and weighted adjustments are made. After the above adjustments are completed, the results of all branches are normalized to obtain the final aggregate weights of each branch.
[0127] The second step is to perform weighted fusion of the heterogeneous features of all branches based on all aggregation weights to obtain the comprehensive features of the target power system.
[0128] Specifically, the heterogeneous features of all branches are weighted and summed according to all aggregation weights to obtain the comprehensive features of the target power system.
[0129] Step 15: Based on the comprehensive characteristics of the target power system, evaluate the transient stability of the target power system and obtain the transient stability evaluation results of the target power system.
[0130] The above transient stability assessment results are used to describe the transient stability of the target power system. They can be used as a score for transient stability; the higher the score, the higher the transient stability of the target power system.
[0131] For example, models such as fully connected layers and multilayer perceptrons can be used to calculate the comprehensive characteristics and output the transient stability assessment results of the target power system.
[0132] The output features from multiple branches are weighted and fused to obtain the final aggregated feature representation. This aggregated feature, while integrating information from each branch, effectively suppresses the influence of unreliable features through a weight adjustment mechanism, thus obtaining a more robust system state representation. Finally, the aggregated feature is input into the classification head or stability discrimination module to output the power system transient stability assessment result.
[0133] It should be noted that by using a feature aggregation mechanism based on uncertainty weighting, the reliability of features under different operating conditions can be dynamically adapted while ensuring the complementarity of features in multiple branches. This avoids the overall performance from deteriorating due to excessive deviation in one branch, thereby improving the model's discrimination robustness and generalization ability in complex perturbation environments.
[0134] It is worth mentioning that computing heterogeneous masks can represent the differences between branches. Obtaining heterogeneous information based on heterogeneous masks can encourage attention to key features, reduce redundant information, and ensure the diversity of power system information received between branches, avoiding the dilemma of feature homogenization. This improves the feature accuracy of heterogeneous features obtained based on heterogeneous information. Weighted fusion of heterogeneous features can dynamically suppress the influence of branches with high uncertainty during the fusion process, thereby obtaining a more robust global system feature representation. Based on comprehensive features, transient stability assessment of the power system can be performed, effectively improving the anti-interference capability, assessment accuracy, and stability of the power system transient stability assessment.
[0135] Furthermore, by designing a multi-branch learnable heterogeneous mask, different levels of data loss or noise interference can be simulated at the input level, thereby improving the model's generalization ability under complex interference scenarios. Through node-level feature weighted aggregation of the graph attention feature extractor, the dependency between power grid topology and dynamic features can be captured more accurately, improving the discriminativeness of feature representation. By fusing multi-branch features and performing classification prediction, the accuracy and robustness of transient stability assessment can be effectively improved, reducing misjudgments or omissions in noisy environments, thereby improving the reliability and rationality of power system transient stability assessment under complex interference environments.
[0136] The transient stability assessment device for power systems provided in this application is described below as an example.
[0137] like Figure 2 As shown in the figure, this application provides a transient stability assessment device for a power system. The transient stability assessment device 200 includes:
[0138] The acquisition module 201 is used to acquire transient data of multiple branches of the target power system;
[0139] The calculation module 202 is used to calculate the heterogeneity mask of each branch of the target power system, and obtain the heterogeneity information of each branch based on the heterogeneity mask and transient data of each branch; the heterogeneity mask is used to describe the degree of difference between the corresponding branch and other branches.
[0140] The feature extraction module 203 is used to extract features from the heterogeneous information of each branch to obtain the heterogeneous features of the branch.
[0141] The weighted fusion module 204 is used to perform weighted fusion of the heterogeneous features of all branches to obtain the comprehensive features of the target power system;
[0142] Evaluation module 205 is used to evaluate the transient stability of the target power system based on the comprehensive characteristics of the target power system, and obtain the transient stability evaluation result of the target power system.
[0143] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0144] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0145] like Figure 3 As shown, an embodiment of this application provides a terminal device, wherein the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 3 The diagram shows only one processor, a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 executes the computer program D102 to implement the steps in any of the above method embodiments.
[0146] Specifically, when the processor D100 executes the computer program D102, it acquires transient data of multiple branches of the target power system, calculates the heterogeneous mask of each branch of the target power system, and acquires the heterogeneous information of each branch based on the heterogeneous mask and transient data of each branch. Then, for each branch, it extracts features from the heterogeneous information of the branch to obtain the heterogeneous features of the branch. Then, it performs weighted fusion of the heterogeneous features of all branches to obtain the comprehensive features of the target power system. Finally, based on the comprehensive features of the target power system, it evaluates the transient stability of the target power system to obtain the transient stability evaluation result of the target power system. Among these methods, calculating heterogeneous masks can represent the differences between branches. Obtaining heterogeneous information based on heterogeneous masks can encourage attention to key features, reduce redundant information, and ensure the diversity of power system information received between branches, avoiding the predicament of feature homogenization. This improves the feature accuracy of heterogeneous features obtained based on heterogeneous information. Weighted fusion of heterogeneous features can dynamically suppress the influence of branches with high uncertainty during the fusion process, thereby obtaining a more robust global system feature representation. Based on comprehensive features, transient stability assessment of the power system is performed, effectively improving the anti-interference capability, assessment accuracy, and stability of the power system transient stability assessment.
[0147] The processor D100 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0148] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may be an external storage device of the terminal device D10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device D10. Furthermore, the memory D101 may include both internal and external storage units of the terminal device D10. The memory D101 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.
[0149] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0150] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0151] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to the transient stability assessment method device / terminal equipment of the power system, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0152] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0153] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0154] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention.
Claims
1. A method of transient stability assessment of an electric power system, characterized by, The method comprises: acquiring transient data of a plurality of branches of a target power system; calculating a heterogeneous mask of each branch of the target power system, and acquiring heterogeneous information of each branch based on the heterogeneous mask and the transient data of each branch; the heterogeneous mask is used to describe the difference degree between the corresponding branch and other branches; for each branch, feature extraction is performed on the heterogeneous information of the branch to obtain the heterogeneous feature of the branch; all the heterogeneous features of the branches are weighted and fused to obtain the comprehensive feature of the target power system; based on the comprehensive feature of the target power system, the transient stability of the target power system is evaluated to obtain the transient stability evaluation result of the target power system.
2. The transient stability assessment method according to claim 1, wherein, The calculation of the heterogeneous mask of each branch of the target power system comprises: setting an initial mask for each branch; for each branch, transient stability classification is performed on the branch based on the initial mask and the transient data of the branch to obtain the stability category of the branch; based on all stability categories, a classification loss is calculated, and a mask sparse heterogeneous loss of all branches is calculated; the classification loss and the mask sparse heterogeneous loss are added to obtain a mask loss; the initial mask of each branch is updated using the mask loss to obtain the heterogeneous mask of each branch.
3. The transient stability assessment method according to claim 2, wherein, The calculation of the mask sparse heterogeneous loss of all branches comprises: by formula: Computing masked sparse heterogeneous branches ; wherein, a structure feature direction of all branches, denotes an identity matrix, denotes a constant, denotes a coefficient gain adjustment coefficient, denotes a sparsity of the 1st branch, denotes a normalized initial mask of the 1st branch, denotes a normalized initial mask of the 1st branch, denotes a normalized initial mask of the 1st branch, denotes a sparsity of the 1st branch, denotes a sparsity of the 1st branch, denotes a sparsity balance offset term: wherein, denotes the sparsity of the th branch, , denotes the feature dimension, denotes the normalized initial mask of the th branch.
4. The transient stability assessment method according to claim 1, wherein, The transient data comprises a plurality of power data; The acquisition of the heterogeneous information of each branch based on the heterogeneous mask and the transient data of each branch comprises: for each branch, the following steps are performed: multiply the heterogeneous mask of the branch with the transient data element by element to obtain a mask element value corresponding to each power data in the transient data; for each mask element value, it is judged whether the mask element value is greater than a preset element value, if yes, the power data corresponding to the mask element value is retained, otherwise, the power data corresponding to the mask element value is removed; all the retained power data are integrated into one data to obtain the heterogeneous information of the branch.
5. The transient stability assessment method according to claim 1, wherein, The feature extraction of the heterogeneous information of the branch to obtain the heterogeneous feature of the branch comprises: the heterogeneous information of each branch is extracted using a graph attention network to obtain an initial feature of each branch; based on all the initial features, a feature consistency loss is calculated, and the graph attention network is trained according to the feature consistency loss; the heterogeneous information of each branch is extracted using the trained graph attention network to obtain the heterogeneous feature of each branch.
6. The transient stability assessment method according to claim 5, wherein, The feature consistency loss is: wherein, represents a value of a feature consistency loss, represents a number of branches, represents initial features of the first branch, represents initial features of the second branch, represents a set of vertices in a topology graph of the target power system represents a set of edges in a topology graph of the target power system represents a set of edges in a topology graph of the target power system represents heterogeneous information of the first branch, represents edge information of the first branch, represents heterogeneous information of the second branch, represents edge information of the second branch, second branch.
7. The transient stability assessment method according to claim 6, wherein, The weighted fusion of all the heterogeneous features of the branches to obtain the comprehensive feature of the target power system comprises: for each branch, the free energy and the mask coverage of the branch are calculated, and the aggregation weight of the branch is calculated based on the free energy and the mask coverage; all the heterogeneous features of the branches are weighted and fused according to all the aggregation weights to obtain the comprehensive feature of the target power system.
8. The transient stability assessment method according to claim 7, wherein, The calculating the free energy of the branch comprises: The calculating the free energy of the branch comprises: calculating the free energy of the individual branches ; wherein, represents a stable state of the power system, is stable, is unstable, represents the first branch for the sample , the logits score evaluating whether the power system is stable, represents a temperature coefficient.
9. The transient stability assessment method according to claim 8, wherein, The calculating the free energy of the branch comprises: The calculating the free energy of the branch comprises:
10. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor implements the transient stability evaluation method of the power system according to any one of claims 1-9 when executing the computer program.