Transient stability evaluation method and system based on self-adaptive early exit

By constructing an adaptive early retreat transient stability evaluation method, using the sample data and feature matrix normalization of the power system database, combined with multi-exit network and loss function training model, the problem of weak classification capabilities in the transient stability evaluation of the power system is solved, and higher identification accuracy and system efficiency are achieved.

CN120281002APending Publication Date: 2025-07-08GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510176484.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing power system transient stability evaluation model has weak classification capabilities and it is difficult to effectively identify the alert state and instability state samples in extreme cases.

Method used

A transient stability evaluation method for adaptive early retreat is constructed. By obtaining the security domain and stable domain sample data of the power system database, a two-dimensional and three-dimensional matrix is formed, feature matrix normalization and multi-exit network feature extraction is performed, and the model is trained in combination with cross entropy and focus loss functions to improve recognition accuracy.

Benefits of technology

It improves the accuracy and efficiency of the transient stability assessment of the power system, ensures the safety and reliability of the power grid, and reduces economic losses and social impacts in extreme cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281002A_ABST
    Figure CN120281002A_ABST
Patent Text Reader

Abstract

The invention discloses a transient stability evaluation method and system based on self-adaptive early quit, and relates to the technical field of power system transient stability evaluation, and the method comprises the steps: building a model, carrying out simulation calculation, obtaining power system data, recording bus voltage data, forming a two-dimensional matrix, carrying out transient simulation, and setting fault parameters and load conditions. The method comprises the following steps: recording stability domain sample data, forming a three-dimensional matrix for storage, unifying time dimensions of double-domain samples, normalizing a feature matrix, building a multi-outlet network, extracting spatio-temporal features, classifying the spatio-temporal features, dividing a data set, carrying out model training by utilizing a training set, and carrying out stability evaluation by utilizing a trained model. And testing the model by using the test set, and evaluating the evaluation capability of the model. According to the method, through accurate model simulation calculation, full-process automation of transient stability evaluation is realized, so that the efficiency and reliability of transient stability evaluation of the power system are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system transient stability assessment, and particularly to a method and system for transient stability assessment based on adaptive early exit. Background Art

[0002] With the continuous expansion of the scale of power systems and the increasing complexity of the power supply and demand relationship, the accurate identification and monitoring of the operating state of power systems have become crucial. Power system state identification refers to the process of inferring and determining the operating state and health status of a power system by collecting, integrating, and analyzing various data and information of the power system. In the current state identification of power systems, it mainly involves the acquisition and processing of power system operating state data, the establishment and optimization of models, and state identification.

[0003] In the actual operation of the power grid, it is often difficult to obtain data under extreme conditions. The power system is mostly in a safe state in the safe domain and a stable state in the stable domain, and the number of samples is sufficient. It is relatively simple for the model to identify categories with sufficient sample quantities. Therefore, the samples in the safe state and the stable state can be regarded as simple samples. However, the time in the alert state and the unstable state is very short, resulting in difficult identification of samples in these two states. Therefore, the samples in these two states can be regarded as difficult samples. To obtain a larger number of fault state samples, generally, simulation is used to complete data acquisition in the standard international test case IEEE-68 system or IEEE-118 system, and data cleaning is performed to obtain high-quality samples. The model completed through the above training is used to perform real-time estimation of the power system operating state, and corresponding measures are taken for sorting and management to ensure the normal operation of the power system. Summary of the Invention

[0004] In view of the above existing problems, the present invention provides a method and system for transient stability assessment based on adaptive early exit to solve the problem of weak classification ability of the overall model in the prior art.

[0005] To solve the above technical problems, a method for transient stability assessment based on adaptive early exit is proposed, including,

[0006] Construct a model and perform simulation calculations to obtain the sample data in the safe domain of the power system database, record the bus voltage data to form a two-dimensional matrix for transient simulation, set the fault parameters and load conditions, record the sample data in the stable domain, and store it in the form of a three-dimensional matrix; unify the time dimension of the dual-domain samples, extend the time dimension of the safe domain data, sample the time dimension of the stable domain data, and perform feature matrix normalization, build a multi-exit network to extract spatio-temporal features and perform classification; divide the data set, use the training set to train the model, use the trained model to perform stability assessment, and use the test set to test the model to evaluate the evaluation ability of the model.

[0007] As a preferred solution of the transient stability assessment method based on adaptive early exit according to the present invention, wherein: the acquisition of security domain sample data includes building an international standard case model and performing simulation calculations using simulation software, and obtaining security domain sample data through power flow calculation.

[0008] The global sample data includes the bus voltage amplitude of the power system, the bus voltage phase angle, the bus active power, the bus reactive power, and the current state of the power system.

[0009] As a preferred solution of the transient stability assessment method based on adaptive early exit according to the present invention, wherein: the transient simulation includes obtaining security domain sample data from the power system database through power flow calculation, forming a two-dimensional matrix for storage, and updating the voltage amplitude and voltage phase angle.

[0010] The power flow calculation includes analyzing the steady-state operation of the power grid under given load conditions by solving a set of nonlinear algebraic equations, and the formula is expressed as:

[0011]

[0012] where, P i is the active power of bus i, Q i is the reactive power of bus i, V i is the voltage amplitude of bus i, θ i is the voltage phase angle of bus i, V j is the voltage amplitude of bus j, θ j is the voltage phase angle of bus j, G ij is the real part of the admittance matrix between bus i and bus j, B ij is the imaginary part of the admittance matrix between bus i and bus j, n is the total number of buses, and i and j are variable indices.

[0013] The formed two-dimensional matrix is expressed as:

[0014]

[0015] where, V1, V2... V n are voltage amplitudes, θ1, θ2... θ n are voltage phase angles, P1, P2... P n are active powers, Q1, Q2... Q n are reactive powers, S1, S2... S n are bus states.

[0016] As a preferred solution of the method for transient stability assessment based on adaptive early exit according to the present invention, wherein: the updating of the voltage amplitude and voltage phase angle includes using the Newton-Raphson method for iteration, selecting the initial voltage amplitude and phase angle values, linearizing the power flow equation and constructing the Jacobian matrix, calculating the power imbalance vector, and using the Jacobian matrix to solve for the voltage amplitude increment and voltage phase angle increment, and updating the voltage amplitude and voltage phase angle.

[0017] The construction of the Jacobian matrix is expressed as:

[0018]

[0019] Where P is the active power, Q is the reactive power, θ is the voltage phase angle, |V| is the voltage amplitude, and J is the Jacobian matrix.

[0020] The formula for calculating the power imbalance vector is:

[0021] ΔP = P 计算 - P 设定

[0022] ΔQ = Q 计算 - Q 设定

[0023] Where P 计算 is the calculated active power, P 设定 is the set active power, Q 计算 is the calculated reactive power, Q 设定 is the set reactive power, ΔP is the active power change, and ΔQ is the reactive power change.

[0024] The formula for solving the increment is:

[0025]

[0026] Where Δθ is the voltage phase angle change, Δ|V| is the voltage amplitude change, ΔP is the active power change, ΔQ is the reactive power change, and J is the Jacobian matrix.

[0027] The formula for updating the voltage amplitude and voltage phase angle is:

[0028] θ 新 = θ 旧 + Δθ

[0029] V| 新 = |V| 旧 + Δ|V

[0030] Where θ 新 is the updated voltage phase angle, |V| 新 is the updated voltage amplitude, θ 旧is the voltage phase angle before update, |V| 旧 is the voltage phase angle before update, Δθ is the change in voltage phase angle, and Δ|V| is the change in voltage amplitude.

[0031] As a preferred solution of the transient stability assessment method based on adaptive early exit according to the present invention, wherein: the forming of the three-dimensional matrix for storage includes setting fault parameters and fault types and locations, recording the simulation duration and data, storing the recorded data in the form of a three-dimensional matrix, and obtaining the adjacency matrix through the topological relationship between buses.

[0032] The setting of the fault parameters includes considering 6 cases where the output of the generator set increases from 0% to 100% in 20% steps, and 5 cases where the bus load increases from 80% to 120% in 10% steps, and introducing a 5% load random perturbation.

[0033] The fault types and locations include setting the fault as a three-phase short-circuit fault of the line, with a duration of 5 seconds, and the fault location is set at 10%, 30%, 50%, 70%, and 90% of the line length.

[0034] The recording of the simulation duration and data includes that each simulation duration is 60 seconds, and the bus voltage amplitude, voltage phase angle, active power, reactive power, and system state are recorded every 0.5 seconds.

[0035] The unifying of the time dimension of the unified double-domain samples includes unifying the time dimension of the data, continuously sampling the three-dimensional data in the stable domain in the time dimension, and performing feature matrix normalization.

[0036] The unifying of the time dimension includes expanding the data in the safety domain, adding a time dimension and replicating it 32 times in the dimension.

[0037] The formula for the feature matrix normalization is:

[0038]

[0039] where, X' ij is the element in the i-th row and j-th column of the normalized feature matrix, X ij is the element in the i-th row and j-th column of the original feature matrix, X min,j is the minimum value of feature j, X max,j is the maximum value of feature j, and i and j are variable indices.

[0040] As a preferred solution of the transient stability assessment method based on adaptive early exit of the present invention, wherein: the construction of a multi-exit network to extract spatio-temporal features includes inputting the adjacency matrix and feature matrix of topological nodes, performing feature extraction on the input matrix, executing empty convolution to capture the correlation of time and space, and mapping the high-dimensional features after convolution to the dimension matching the classification task, and performing redundant classification in each fully connected layer.

[0041] The redundant classification includes safe, stable, unstable, and warning. Each category is responsible for identifying the situation of the power system in different states, and redundant categories are added between each exit.

[0042] As a preferred solution of the transient stability assessment method based on adaptive early exit of the present invention, wherein: the model training includes dividing the data set into a training set, a validation set, and a test set, inputting the training set into the model, selecting the cross-entropy loss function and the focal loss function to handle the classification task and sample imbalance, using the Adam optimizer for parameter optimization, and ensuring the stable convergence of the model through the cosine annealing learning rate strategy.

[0043] The cross-entropy loss function is expressed as:

[0044]

[0045] where is the cross-entropy loss, is the predicted probability of the model for the i-th class, C is the total number of classes, y i is the true label of the sample, and i is the variable index.

[0046] The focal loss function is expressed as:

[0047]

[0048] where is the focal loss function, α i ∈[0,1], is the predicted probability of the model for the i-th class, γ is the adjustment factor, and i is the variable index.

[0049] The model testing includes inputting samples on the test set, the model making class predictions for each sample, the output class being the class with the highest probability considered by the model, comparing the true labels of the samples in the test set with the model prediction results, and evaluating the model prediction results using the accuracy formula, and selecting the model with the highest accuracy in the test set as the final model.

[0050] The accuracy formula is expressed as:

[0051]

[0052] Among them, F is the accuracy rate, H is the number of correct predictions, and Z is the total number of samples.

[0053] Another object of the present invention is to provide a transient stability assessment system based on adaptive early exit, which optimizes the accuracy and efficiency of power system transient stability assessment and ensures the safety of the power grid; through functions such as fault simulation and stability analysis, stable domain sample data generation, risk assessment, system optimization, decision support, prediction and prevention, and education and training, the system of the present invention improves the accuracy and efficiency of power system transient stability assessment, ensures the reliability and safety of the power grid, helps operators quickly respond to faults, optimize the system structure, prevent potential risks, thereby reducing the economic losses and social impacts caused by unstable operation, and providing strong technical support for the stable operation and sustainable development of the power system.

[0054] As a preferred embodiment of the transient stability assessment system based on adaptive early exit of the present invention, it is characterized by including a data preparation and simulation module, a data processing module, a multi-exit network construction and feature extraction module, a model training module, and a model testing and evaluation module.

[0055] The data preparation and simulation module is used to construct an international standard case model, perform simulation calculations using simulation software, obtain safety domain sample data from the power system database through power flow calculations, form a two-dimensional matrix for storage, set fault parameters and load conditions, perform transient simulations, record stable domain sample data, form a three-dimensional matrix for storage, update the voltage amplitude and voltage phase angle, and perform iterative solutions using the Newton-Raphson method.

[0056] The data processing module is used to expand the safety domain data in the time dimension, continuously sample the three-dimensional data of the stable domain in the time dimension, perform feature matrix normalization, and obtain the adjacency matrix through the topological relationship between buses.

[0057] The multi-exit network construction and feature extraction module is used to perform feature extraction, execute spatio-temporal convolution operations, capture the correlation in time and space, and map the convolved high-dimensional features to dimensions matching the classification task.

[0058] The model training module is used to handle classification tasks and sample imbalance through the cross-entropy loss function and the focal loss function.

[0059] The model testing and evaluation module is used to compare the true labels of the samples in the test set with the model prediction results, and evaluate the model prediction results using the accuracy formula.

[0060] A computer device includes a memory and a processor. The memory stores a computer program. It is characterized in that when the processor executes the computer program, the steps of the method for transient stability assessment based on adaptive early exit are implemented.

[0061] A computer-readable storage medium stores a computer program thereon. It is characterized in that when the computer program is executed by a processor, the steps of the method for transient stability assessment based on adaptive early exit are implemented.

[0062] The beneficial effects of the present invention: By constructing a model and performing simulation calculations, the present invention realizes the accurate acquisition of sample data of the security domain of the power system database, records the bus voltage data to form a two-dimensional matrix, and provides fine data support for transient simulation; unifying the time dimension of the dual-domain samples and updating the voltage parameters improves the data processing efficiency and the accuracy of power flow calculation, laying a solid foundation for evaluation, forming a three-dimensional matrix to store the responses of different fault scenarios, enriching the model training samples, and enhancing the generalization ability; building a multi-exit network to extract spatio-temporal features, and training the model in combination with the cross-entropy and focal loss functions, improves the recognition accuracy and robustness. The full automation of the system process greatly improves the transient stability assessment efficiency, reduces the risk of manual intervention, and provides a strong technical guarantee for the safe operation of the power system. Description of the Drawings

[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings, where:

[0064] Figure 1 It is the overall flowchart of the method for transient stability assessment based on adaptive early exit provided by an embodiment of the present invention.

[0065] Figure 2 It is the schematic diagram of the unification of the security domain and stability domain data of the method for transient stability assessment based on adaptive early exit provided by an embodiment of the present invention.

[0066] Figure 3 It is the schematic diagram of the construction of the multi-exit network of the method for transient stability assessment based on adaptive early exit provided by an embodiment of the present invention.

[0067] Figure 4 It is the system scheme flowchart of the system for transient stability assessment based on adaptive early exit provided by an embodiment of the present invention. Detailed Embodiments

[0068] To make the above objects, features, and advantages of the present invention more apparent and understandable, the following provides a detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0069] In the following description, many specific details are set forth to facilitate a thorough understanding of the present invention. However, the present invention may be practiced in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the spirit of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0070] Secondly, the so-called "one embodiment" or "embodiment" herein refers to specific features, structures, or characteristics that may be included in at least one implementation manner of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they embodiments that are mutually exclusive of other embodiments individually or selectively.

[0071] The present invention is described in detail in conjunction with schematic diagrams. When detailing the embodiments of the present invention, for the convenience of explanation, the cross-sectional views showing the device structure will be enlarged locally in a non-general proportion, and the schematic diagrams are only examples and should not limit the scope of protection of the present invention herein. In addition, in actual production, three-dimensional spatial dimensions of length, width, and depth should be included.

[0072] At the same time, in the description of the present invention, it should be noted that the orientation or positional relationships indicated by terms such as "upper, lower, inner, and outer" are based on the orientation or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention. In addition, the terms "first, second, or third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0073] Unless otherwise clearly defined and limited in the present invention, the terms "mounted, connected, and coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can also be a mechanical connection, an electrical connection, or a direct connection, and can also be indirectly connected through an intermediate medium, or can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0074] Example 1, referring to Figures 1 - 3 , which is the first embodiment of the present invention. This embodiment provides a method for transient stability assessment based on adaptive early termination, including:

[0075] S1: Build a model and perform simulation calculations to obtain sample data of the security domain of the power system database, record the bus voltage data to form a two-dimensional matrix for transient simulation, set the fault parameters and load conditions, record the sample data of the stability domain, and store it in a three-dimensional matrix.

[0076] The obtaining of the sample data of the security domain includes building an international standard example IEEE-68 model and using the simulation software DPS to perform simulation calculations, and obtaining the sample data of the security domain through power flow calculations.

[0077] The global sample data includes the amplitude of the bus voltage in the power system, the phase angle of the bus voltage, the active power of the bus, the reactive power of the bus, and the current state of the power system.

[0078] Furthermore, the transient simulation includes obtaining the sample data of the security domain in the power system database through power flow calculations, storing it in a two-dimensional matrix, and updating the voltage amplitude and voltage phase angle.

[0079] The power flow calculation includes analyzing the steady-state operation of the power grid under given load conditions by solving a set of nonlinear algebraic equations, and the formula is expressed as:

[0080]

[0081] where, P i is the active power of bus i, Q i is the reactive power of bus i, V i is the voltage amplitude of bus i, θ i is the voltage phase angle of bus i, V j is the voltage amplitude of bus j, θ j is the voltage phase angle of bus j, G ij is the real part of the admittance matrix between bus i and bus j, B ij is the imaginary part of the admittance matrix between bus i and bus j, n is the total number of buses, and i and j are variable indices.

[0082] The formed two-dimensional matrix is expressed as:

[0083]

[0084] where, V1, V2... V n are the voltage amplitudes, θ1, θ2... θ n are the voltage phase angles, P1, P2... P n are the active powers, Q1, Q2... Q n are the reactive powers, S1, S2... S n are the bus states.

[0085] It should be noted that the updated voltage amplitude and voltage phase angle include using the Newton-Raphson method for iteration, selecting the initial voltage amplitude and phase angle values, linearizing the power flow equation and constructing the Jacobian matrix, calculating the power imbalance vector, and using the Jacobian matrix to solve for the voltage amplitude increment and voltage phase angle increment, and then updating the voltage amplitude and voltage phase angle.

[0086] The construction of the Jacobian matrix is expressed as:

[0087]

[0088] Where P is the active power, Q is the reactive power, θ is the voltage phase angle, |V| is the voltage amplitude, and J is the Jacobian matrix.

[0089] The formula for calculating the power imbalance vector is:

[0090] ΔP = P 计算 - P 设定

[0091] ΔQ = Q 计算 - Q 设定

[0092] Where P 计算 is the calculated active power, P 设定 is the set active power, Q 计算 is the calculated reactive power, Q 设定 is the set reactive power, ΔP is the active power change, and ΔQ is the reactive power change.

[0093] The formula for solving the increment is:

[0094]

[0095] Where Δθ is the voltage phase angle change, Δ|V| is the voltage amplitude change, ΔP is the active power change, ΔQ is the reactive power change, and J is the Jacobian matrix.

[0096] The formula for updating the voltage amplitude and voltage phase angle is:

[0097] θ 新 = θ 旧 + Δθ

[0098] V| 新 = |V| 旧 + Δ|V

[0099] Where θ 新 is the updated voltage phase angle, |V| 新 is the updated voltage amplitude, θ 旧 is the voltage phase angle before update, |V|旧 θ is the voltage phase angle before update, Δθ is the change in voltage phase angle, and Δ|V| is the change in voltage amplitude.

[0100] It should be further noted that the formation of a three-dimensional matrix for storage includes setting fault parameters, fault types and locations, recording the simulation duration and data, storing the recorded data in the form of a three-dimensional matrix, and obtaining an adjacency matrix through the topological relationship between buses.

[0101] The setting of fault parameters includes considering 6 cases where the output of the generating unit increases from 0% to 100% with a step size of 20%, and 5 cases where the bus load increases from 80% to 120% with a step size of 10%, and introducing a 5% load random perturbation.

[0102] The fault types and locations include setting the fault as a three-phase short-circuit fault on the line with a duration of 5 seconds, and the fault locations are set at 10%, 30%, 50%, 70%, and 90% of the line length.

[0103] The recording of the simulation duration and data includes that each simulation duration is 60 seconds, and the bus voltage amplitude, voltage phase angle, active power, reactive power, and system state are recorded every 0.5 seconds.

[0104] As Figure 2 , the time dimension of the unified dual-domain samples includes unifying the time dimension of the data, continuously sampling the three-dimensional data in the stable domain in the time dimension, and normalizing the feature matrix.

[0105] The unification of the time dimension includes expanding the data in the safety domain, adding a time dimension and replicating it 32 times in the dimension.

[0106] The formula for normalizing the feature matrix is:

[0107]

[0108] Where, X' ij is the element in the i-th row and j-th column of the normalized feature matrix, X ij is the element in the i-th row and j-th column of the original feature matrix, X min,j is the minimum value of feature j, X max,j is the maximum value of feature j, and i and j are variable indices.

[0109] S2: Unify the time dimension of the dual-domain samples, expand the time dimension of the data in the safety domain, sample the time dimension of the data in the stable domain, and normalize the feature matrix, build a multi-exit network to extract spatio-temporal features and classify them.

[0110] As Figure 3, the construction of a multi - exit network to extract spatio - temporal features includes inputting the adjacency matrix and feature matrix of topological nodes, extracting features from the input matrices, performing empty convolution to capture temporal and spatial correlations, and mapping the convolved high - dimensional features to dimensions matching the classification task, and performing redundant classification in each fully - connected layer.

[0111] The redundant classification includes safety, stability, instability, and warning. Each category is responsible for identifying the power system in different states, and redundant categories are added between each exit.

[0112] S3: Divide the dataset, use the training set to train the model, use the trained model for stability evaluation, and use the test set to test the model to evaluate the evaluation ability of the model.

[0113] Furthermore, the model training includes dividing the dataset into a training set, a validation set, and a test set, inputting the training set into the model, selecting the cross - entropy loss function and the focal loss function to handle classification tasks and sample imbalance, using the Adam optimizer for parameter optimization, and ensuring the stable convergence of the model through the cosine annealing learning rate strategy.

[0114] The cross - entropy loss function is expressed as:

[0115]

[0116] Among them, is the cross - entropy loss, is the predicted probability of the model for the i - th class, C is the total number of classes, y i is the true label of the sample, and i is the variable index.

[0117] The focal loss function is expressed as:

[0118]

[0119] Among them, is the focal loss function, α i ∈[0,1], is the predicted probability of the model for the i - th class, γ is the adjustment factor, and i is the variable index.

[0120] Even further, the model testing includes inputting samples on the test set, the model making class predictions for each sample, the output class being the class with the highest probability considered by the model, comparing the true labels of the samples in the test set with the model prediction results, and evaluating the model prediction results using the accuracy formula, and selecting the model with the highest accuracy in the test set as the final model.

[0121] The accuracy formula is expressed as:

[0122]

[0123] Among them, F is the accuracy rate, H is the number of correct predictions, and Z is the total number of samples.

[0124] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not restrictive. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

[0125] Embodiment 2 is an embodiment of the present invention, which provides a method for transient stability assessment based on adaptive early exit. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.

[0126] The simulation results are shown in the following table. When the model iterates more than 50 times, the accuracy rates of the training set and the test set both tend to be stable, and the accuracy rate of the test set is as high as 99.7%. Furthermore, it proves the feasibility of introducing the multi-exit early exit mechanism and the redundant category mechanism in power system state identification.

[0127] This technology is mainly applied to the real-time monitoring and early warning system of the power system. This system is a power system monitoring and early warning platform integrating computing technology, data processing technology, and artificial intelligence technology; it is deployed in the data center of the power company and is connected to the actual operation data of the power system, and can receive, process, and analyze various parameters of the power system in real time, including bus voltage, current, active power, reactive power, etc.; this technology can judge the current state of the power system in real time according to the input data, including "safe", "warning", "stable", and "unstable", and output the corresponding confidence level. By introducing this real-time monitoring and early warning system of the power system, the power company can achieve real-time monitoring and early warning of the power system, discover and handle potential risk points in time, and improve the stability and reliability of the power system; at the same time, this system can also provide decision-making support for operators, help them quickly make correct adjustment measures, and ensure the safe operation of the power system; in addition, by continuously optimizing and iterating the model, the accuracy and generalization ability of this system will be continuously improved, providing more powerful support for the intelligent operation of the power system.

[0128] Training set accuracy Test set accuracy 99.7% 97.9%

[0129] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

[0130] Embodiment 3, referring to Figure 4 , which is the third embodiment of the present invention. This embodiment provides a transient stability assessment system based on adaptive early exit, including a data preparation and simulation module 100, a data processing module 200, a multi-exit network construction and feature extraction module 300, a model training module 400, and a model testing and evaluation module 500.

[0131] The data preparation and simulation module 100 is used to construct an international standard case model, perform simulation calculations using simulation software, obtain safety domain sample data from the power system database through power flow calculations, form a two-dimensional matrix for storage, set fault parameters and load conditions, perform transient simulations, record stable domain sample data, form a three-dimensional matrix for storage, update voltage amplitudes and voltage phase angles, and perform iterative solutions using the Newton-Raphson method.

[0132] The data processing module 200 is used to perform time dimension expansion on the safety domain data, continuously sample the three-dimensional data of the stable domain in the time dimension, perform feature matrix normalization, and obtain an adjacency matrix through the topological relationship between buses.

[0133] The multi-exit network construction and feature extraction module 300 is used to perform feature extraction, execute spatio-temporal convolution operations, capture the correlations in time and space, and map the convolved high-dimensional features to dimensions matching the classification task.

[0134] The model training module 400 is used to handle classification tasks and sample imbalance through the cross-entropy loss function and the focal loss function.

[0135] The model testing and evaluation module 500 is used to compare the true labels of the samples in the test set with the model prediction results, and evaluate the model prediction results using the accuracy formula.

[0136] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

[0137] Example 4, the fourth example of the present invention, which is different from the previous three examples in that:

[0138] If the described function is implemented in the form of 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, the technical solution of the present invention, in essence, or the part that contributes to the prior art or part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0139] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.

[0140] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber device, and portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or otherwise processing it as necessary, and then storing it in a computer memory.

[0141] It should be understood that each part of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following techniques well known in the art or a combination thereof can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

Claims

1. A method for transient stability assessment based on adaptive early exit, characterized in that: including, building a model and conducting simulation calculations to obtain sample data of the security domain of the power system database, recording the bus voltage data to form a two-dimensional matrix for transient simulation, setting fault parameters and load conditions, recording the sample data of the stability domain, and storing it in the form of a three-dimensional matrix; unifying the time dimension of the dual-domain samples, expanding the time dimension of the security domain data, sampling the time dimension of the stability domain data, and performing feature matrix normalization, building a multi-output network to extract spatio-temporal features and classify them; dividing the dataset, training the model using the training set, evaluating the stability using the trained model, and testing the model using the test set to evaluate the evaluation ability of the model.

2. The method for transient stability assessment based on adaptive early exit as claimed in claim 1, wherein: The obtaining of the sample data of the security domain includes building an international standard example model and conducting simulation calculations using simulation software, and obtaining the sample data of the security domain through power flow calculation; The global sample data includes the bus voltage amplitude, bus voltage phase angle, bus active power, bus reactive power, and the current state of the power system.

3. The method for transient stability assessment based on adaptive early exit according to claim 2, characterized in that: The transient simulation includes obtaining the sample data of the security domain in the power system database through power flow calculation, storing it in the form of a two-dimensional matrix, and updating the voltage amplitude and voltage phase angle; The power flow calculation includes analyzing the steady-state operation of the power grid under given load conditions by solving a set of non-linear algebraic equations, and the formula is expressed as: Among them, P i is the active power of bus i, Q i is the reactive power of bus i, V i is the voltage magnitude of bus i, θ i is the voltage phase angle of bus i, V j is the voltage magnitude of bus j, θ j is the voltage phase angle of bus j, G ij is the real part of the admittance matrix between bus i and bus j, B ij is the imaginary part of the admittance matrix between bus i and bus j, n is the total number of buses, and i and j are variable indices; The formed two-dimensional matrix is expressed as: Among them, V1, V2... V n are the voltage amplitudes, θ1, θ2... θ n are the voltage phase angles, P1, P2... P n are the active powers, Q1, Q2... Q n are the reactive powers, S1, S2... S n is the bus status.

4. The method for transient stability assessment based on adaptive early exit according to claim 3, wherein: The updating of the voltage amplitude and voltage phase angle includes using the Newton-Raphson method for iteration, selecting the initial voltage amplitude and phase angle values, linearizing the power flow equation and constructing the Jacobian matrix, calculating the power imbalance vector, and using the Jacobian matrix to solve for the voltage amplitude increment and voltage phase angle increment, and updating the voltage amplitude and voltage phase angle; The construction of the Jacobian matrix is expressed as: where, P is the active power, Q is the reactive power, θ is the voltage phase angle, |V| is the voltage amplitude, and J is the Jacobian matrix; The formula for calculating the power imbalance vector is: ΔP = P 计算 -P 设定 ΔQ = Q 计算 -Q 设定 Among them, P 计算 is the calculated active power, and P 设定 is the set active power. Q 计算 is the calculated reactive power, and Q 设定 is the set reactive power. ΔP is the change in active power, and ΔQ is the change in reactive power; The formula for solving the increment is: where, Δθ is the change in voltage phase angle, Δ|V| is the change in voltage amplitude, ΔP is the change in active power, ΔQ is the change in reactive power, and J is the Jacobian matrix; The formula for updating the voltage amplitude and voltage phase angle is: θ 新 = θ 旧 + Δθ V| 新 = |V| 旧 + Δ|V Among them, θ 新 is the updated voltage phase angle, |V| 新 is the updated voltage amplitude, θ 旧 is the voltage phase angle before update, |V| 旧 is the voltage phase angle before update, Δθ is the change in voltage phase angle, and Δ|V| is the change in voltage amplitude.

5. The method for transient stability assessment based on adaptive early exit according to claim 4, characterized in that: The storing in the form of a three-dimensional matrix includes setting fault parameters, fault types and positions, recording the simulation duration and data, storing the recorded data in the form of a three-dimensional matrix, and obtaining the adjacency matrix through the topological relationship between the buses; The recording of the simulation duration and data includes that each simulation duration is 60 seconds, and the bus voltage amplitude, voltage phase angle, active power, reactive power, and system state are recorded every 0.5 seconds; The unifying of the time dimension of the dual-domain samples includes unifying the time dimension of the data, continuously sampling the three-dimensional data of the stability domain in the time dimension, and performing feature matrix normalization; The unifying of the time dimension includes expanding the security domain data, adding a time dimension and replicating it 32 times in the dimension; The formula for the feature matrix normalization is: where X' ij is the element at the i-th row and j-th column of the normalized feature matrix, X ij is the element at the i-th row and j-th column of the original feature matrix, X min,j is the minimum value of feature j, X max,j is the maximum value of feature j, and i and j are variable indices.

6. The method for transient stability assessment based on adaptive early exit as claimed in claim 5, wherein: The construction of a multi-exit network to extract spatio-temporal features includes inputting the adjacency matrix and feature matrix of topological nodes, extracting features from the input matrices, performing empty convolution to capture temporal and spatial correlations, and mapping the convolved high-dimensional features to dimensions matching the classification task, and performing redundant classification at each fully connected layer; The redundant classification includes safety, stability, instability, and warning. Each category is responsible for identifying the situation of the power system in different states, and redundant categories are added between each exit.

7. The method for transient stability assessment based on adaptive early exit according to claim 6, wherein: The model training includes dividing the dataset into a training set, a validation set, and a test set, inputting the training set into the model, selecting the cross-entropy loss function and the focal loss function to handle the classification task and sample imbalance, using the Adam optimizer for parameter optimization, and ensuring the stable convergence of the model through the cosine annealing learning rate strategy; The cross-entropy loss function is expressed as: Among them, is the cross-entropy loss, is the predicted probability of the model for the i-th class, C is the total number of classes, y i is the true label of the sample, and i is the variable index; The focal loss function is expressed as: Among them, is the focal loss function, α i ∈[0, 1], is the predicted probability of the model for the i-th class, γ is the adjustment factor, and i is the variable index; The model testing includes inputting samples on the test set, the model making class predictions for each sample, the output class being the class with the highest probability considered by the model, comparing the true labels of the samples in the test set with the model prediction results, and evaluating the model prediction results using the accuracy formula, and selecting the model with the highest accuracy in the test set as the final model; The accuracy formula is expressed as: Where F is the accuracy, H is the number of correct predictions, and Z is the total number of samples.

8. A system adopting the method of transient stability assessment based on adaptive early exit as described in any one of claims 1 to 7, characterized in that: It includes a data preparation and simulation module, a data processing module, a multi-exit network construction and feature extraction module, a model training module, and a model testing and evaluation module; The data preparation and simulation module is used to construct an international standard example model, perform simulation calculations using simulation software, obtain safety domain sample data in the power system database through power flow calculations, form a two-dimensional matrix for storage, set fault parameters and load conditions, perform transient simulations, record stable domain sample data, form a three-dimensional matrix for storage, update the voltage magnitude and voltage phase angle, and perform iterative solution using the Newton-Raphson method; The data processing module is used to expand the safety domain data in the time dimension, continuously sample the three-dimensional data of the stable domain in the time dimension, perform feature matrix normalization, and obtain the adjacency matrix through the topological relationship between buses; The multi-exit network construction and feature extraction module is used to perform feature extraction, perform spatio-temporal convolution operations, capture temporal and spatial correlations, and map the convolved high-dimensional features to dimensions matching the classification task; The model training module is used to handle the classification task and sample imbalance through the cross-entropy loss function and the focal loss function; The model testing and evaluation module is used to compare the true labels of the samples in the test set with the model prediction results, and evaluate the model prediction results using the accuracy formula.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for transient stability assessment based on adaptive early exit described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for transient stability assessment based on adaptive early exit described in any one of claims 1 to 7.