Transient stability assessment method based on topological structure and closed neural network
By using a method based on topological structure and closed neural network, combined with differential equations and neural circuit strategies, the problem that existing models are difficult to capture continuous-time dynamic characteristics in power systems and the accuracy decreases after topology changes is solved, and efficient and accurate transient power angle stability assessment is achieved.
Patent Information
- Application Number
- CN202510959553.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-07-11
AI Technical Summary
Existing machine learning models have difficulty in accurately capturing the continuous-time dynamic characteristics of power systems in transient stability assessments, and the model accuracy decreases after topology changes, resulting in unsatisfactory assessment results.
A method based on topological structure and closed neural network is adopted. By introducing a set of differential equations to simulate the continuous-time nonlinear dynamics of the power system, combined with closed continuous-time neural network and neural circuit strategy, the topological structure is explicitly modeled, the connection structure of the neural network is optimized, and the power system steady-state criterion is used for training and updating.
The evaluation accuracy and computational efficiency of the model after power system topology changes are improved, the interpretability and training efficiency of the model are enhanced, and efficient transient power angle stability evaluation is achieved.
Smart Images

Figure CN120805705A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of new energy and power system technology, in particular to the field of power system transient power angle stability analysis technology, and specifically to a transient stability evaluation method based on topological structure and closed-form neural network. BACKGROUND
[0002] With the increasing problems of energy shortage and environmental pollution, countries around the world have begun to promote the construction of low-carbon energy systems. When a large amount of new energy is connected to the power grid, new requirements are placed on the safety and stability of the power grid. If transient instability is not detected in time and measures are not taken, it can lead to the collapse of the power system and even cause widespread power outages. It can also cause damage to key equipment such as generators, transformers, and transmission lines in the power system. Therefore, it is increasingly important to quickly and accurately evaluate the transient power angle stability of the power system to prevent and reduce transient power angle stability problems caused by system failures and improve the safety and stability of system operation.
[0003] Traditional transient power angle stability evaluation methods include time-domain simulation and direct methods. Time-domain simulation is the most accurate evaluation method, but its calculation process is complex and time-consuming, making it unsuitable for real-time transient power angle stability evaluation analysis. Direct methods include transient energy function method and limit area method, which are faster to calculate, but the evaluation process requires simplification of the power system model, resulting in suboptimal evaluation accuracy and conservative evaluation results. Therefore, data-driven models based on machine learning have been widely used in transient power angle stability evaluation. However, these machine learning models, such as the Stability analysis of discrete-time recurrent neural networks, use an improved RNN network to implement transient stability evaluation. Although it considers the time sequence characteristics of the power system, it is still a discrete time step. In addition, CNN, GRU, and Transformer models are also used for transient stability evaluation. However, most of these models are end-to-end discrete-time models and were originally designed for non-electrical problems. The explanation of the reasons for using such neural networks, the number of neurons, and the number of network layers has always been vague, making the power system network dynamics modeling process ambiguous and difficult to interpret. How to model and learn the continuous-time nonlinear dynamics and structural dependence of the power system is a problem that has not been fully studied.
[0004] Therefore, the present application proposes a transient stability evaluation method based on topological structure and closed-form neural network, which uses a system of differential equations to establish a nonlinear relationship between the transient power angle stability state and the power dynamic variables, and introduces an adjacency matrix to represent the topological structure of the power system, to solve the problems of ambiguous power system network dynamics modeling and complex calculations. SUMMARY
[0005] The present application aims to solve the technical problems that the existing machine learning model is difficult to accurately capture the continuous-time dynamic characteristics of the power system in transient stability evaluation, and the model accuracy decreases after the topology changes. Specifically, most of the existing machine learning transient power angle stability evaluation methods adopt an end-to-end discrete time step training method, which makes it difficult to accurately capture the continuous-time dynamic characteristics of the power system, and the interpretability is weak. After the topology of the power system changes, the accuracy of the model often decreases significantly. In view of the above technical problems, the present application is proposed.
[0006] To solve the above technical problems, the technical scheme adopted by the present application is as follows: A transient stability evaluation method based on topology structure and closed neural network, comprising the following steps: Step S1: Introducing a target differential equation to simulate the continuous-time nonlinear dynamics on the complex topology structure of the power system; Step S2: Using a closed continuous-time neural network to solve the differential equation in step S1; Step S3: Using machine learning to continuously learn and improve the evaluation method, and parameterizing the transient power angle stability state variables in step S2; Step S4: Introducing a neural loop strategy to simulate the bus adjacency relationship and improve the calculation efficiency; Step S5: Using the criterion of power system steady state to judge the transient power angle stability of the power system, and forming a data set according to the criterion to train the neural network; Step S6: Combining offline training, actual application and online updating; Through the above steps, comprehensive transient power angle stability evaluation is realized.
[0007] In step S1, the transient stability process of the power system can be regarded as a continuous-time nonlinear dynamics on a complex topology structure. A specific differential equation is introduced to simulate this nonlinear process. Under a certain power system topology structure, its dynamics can be simply described as: the state variables of each bus continuously change according to certain dynamic rules under the influence of adjacent buses, and there is a nonlinear relationship between these state variables and the transient power angle stability state of the power system.
[0008] The nonlinear relationship is expressed by the differential equation as: (1); In the formula, is t is the set of transient power angle stability state variables of the power system at time t, represents the i-th bus, ibusbar at time t The state variables, It is a collection of them. To dynamically manage parameters, It is i The electrical dynamic variables of the busbar, It corresponds to the adjacency matrix of the power system topology. f It represents a neural network; The first equation in this formula represents the set of state variables passing through each bus To solve the transient power angle stability of the power system The second formula represents the electrical dynamic variables of the busbar The corresponding topological structure To solve the state variables of each bus .
[0009] To enhance the expressiveness of continuous-time dynamics, an improved form, called the liquid time constant recurrent neural network (LTC), is introduced, modeled after the interaction of neurons through synapses. This structure has been shown to be robust, bounded, and stable. Taking the transient power angle steady-state variable as an example, the improved equation is as follows: (2); Where, It helps the system reach an equilibrium state with a time constant τ, and in order to allow the hidden state flow of the network to be represented by a linear system of differential equations, a nonlinear synapse is introduced. , activating neurons through nonlinear synapses, is the sum of all synaptic inputs that receive external stimuli and input them into the cell (the sum of all variables input into the power system); It depends on the state of all neurons (nodes of the power system), is the external input (the sum of all bus state variables input to the power system); Refers to the power system parameter vector.
[0010] In step S2, the differential equation that originally needs to be solved iteratively is converted into an approximately closed form, so that under given initial conditions, an analytical solution or a high-precision approximate solution of the network state can be obtained directly or through a finite-step calculation.
[0011] The specific solution results are: (3); is the initial state of the power system; In the formula, a second time constant is introduced Then, the transient power angle stability state calculation formula of each time step is: (4); In the formula, α is the transient power angle stability state variable of each time step, and β is the transient power angle stability state variable of each time step. Instead of become a parameter vector, and (D) is the system parameter vector, f is a neural network, and the neural network parameters of the neural network are , represents the weight between and represents the weight between and , represents the bias, is the m-dimensional input of each time step t , is the D-dimensional output of each time step t .
[0012] In step S3, in order to make the training process of the neural network more controllable and efficient, the solution obtained in step S2 is parameterized as a transient power angle stability state variable, so that different types of activation functions and layer structures can be used by adjusting the parameters, and the convergence speed, stability and generalization ability of the model can be optimized, the expression ability of the model can be improved, and finally the performance of the model can be enhanced.
[0013] The formula after parameterizing the transient power angle stability state variable is as follows: (5); In the formula, in order to enhance the flexibility of the model, a trainable neural network and are introduced to replace the parameters and in formula (4); and in order to avoid gradient disappearance of formula (4) during training of the neural network, the exponential decay term is replaced by a reverse sigmoid nonlinear variable (.), which is multiplied by and (1- (.)) to form a time-decaying sigmoid term, which plays a gate control role; finally, , and share the first few layers of neural networks in the form of backbone to speed up and stabilize the learning process. In step S4, a neural circuit strategy is introduced to explicitly model the topology, which is specifically: The input and output are end-to-end, and the output of each neuron is observed (the state variable of each node in the power system). Through the cooperation between neurons, a unique, generalizable and interpretable RNN structure is established to observe the entire learning state of the model, which is reflected in the state variables of each bus Not only by the dynamic variables on this bus But also related to the dynamic variables on the remaining buses And its own state variable Specifically, the neural network parameters are expressed as follows: (6); The directional transmission between neurons, i.e., buses, is realized by multiplying the weight parameters by the sparse mask matrix, and the weight parameters are modified as follows: Wherein represents The weight between And represents The weight between And represents the bias, is a non-trainable sparse mask matrix, reflecting the connection between neurons, i.e., buses, which corresponds to the connection of buses in the power system, and The zero parameters of The parameters will be initialized to zero.
[0014] The improved RNN network has better model interpretability and better stability. Traditional RNN networks only consider the sufficiency of the number of neurons to fit the target data, and rarely consider the interaction between neurons. In contrast, in the neural circuit strategy, neurons are divided into four categories: sensory neurons, interneurons, command neurons and motor neurons, which are characterized by high sparsity. The sensory neurons are responsible for obtaining external environmental information, the internal and command neurons make decisions, and finally the motor neurons control the muscles. Different neurons are connected through synapses to form a meaningful topological structure. Second, using the structure of RNN, the robustness of the model can be improved, which can effectively resist noise and has the ability to prioritize learning for recent scenarios.
[0015] In step S5, a criterion for transient power angle stability is given to evaluate whether the system is stable. The criterion for transient power angle stability is mainly based on the behavior of the power system after a large disturbance. The classification label of stability evaluation is defined by the transient power angle stability index TSI, which is expressed as follows: (7); (8); wherein, denotes the maximum power angle difference between any two generators, if is greater than i.e. <0, the system is judged to be unstable, and the sample is marked as 1; if is less than , the system is stable and the sample is marked as 0.
[0016] Before the past data is imported into the neural network for training, if the order of magnitude of the data is very different, the gradient of different features may be very different, resulting in a slow convergence speed during model training. Normalization can be used to unify the scale of all features, thereby accelerating the convergence speed. The specific formula is as follows: (9); wherein, and are the mean and standard deviation of a single feature.
[0017] In step S6, a transient power angle stability evaluation method is constructed to realize transient power angle stability evaluation, which includes three parts of offline training, actual application and online updating; In the offline training stage, attention should be paid to the length of the sample, which will have a great influence on offline training. Therefore, it is necessary to introduce a training set that can dynamically adjust the length of the sample. In the actual application part, a time self-adaptive strategy is adopted, which avoids the application of a fixed observation window and greatly saves time. In the online updating part, due to factors such as system maintenance, expansion, generator exit and other factors, the topology scene of the monitored power system will change, so the internal parameters need to be adjusted and the data and neural network parameters need to be updated in time; In step S6, the following steps are included: Step 6-1) generate a training data set according to the transient power angle stability evaluation basis in step S5, and normalize the variables according to formula (9) to unify the variable scale; Step 6-2) select a suitable sample length to train the model and obtain the trained model, and generate a transient power angle stability evaluation model; Step 6-3) The present application uses accuracy ACC, average response time ART after fault clearing, false alarm rate FAL and false alarm rate MIS as transient power angle stability evaluation indexes to judge whether the offline training result meets the precision requirement of the power system; if it meets the requirement, step 6-4) is executed, otherwise step 6-5) is executed, and the expressions of the indexes are: (10) (11) (12) (13) and They refer to the number of stable samples evaluated as unstable and the number of unstable samples evaluated as stable, Represents the total number of samples, represent cycle, represent The number of samples in the cycle, represents the maximum evaluation period; Step 6-4) The trained model is deployed to the power system, receiving system data in real time. When a fault occurs, the PMU measurement unit measures the input data into the transient power angle stability assessment model. The data from the fault clearing time to each assessment cycle is then sequentially input to solve the transient power angle stability prediction probability. If the prediction probability for that cycle exceeds the assessment threshold, the result is output as the result. If the threshold is not met, the next cycle is evaluated. This process continues until the maximum assessment cycle is reached. Step 6-5) Adjust the parameters within the transient power angle stability assessment model. The transient power angle stability assessment model will be verified again to ensure that its assessment accuracy meets the requirements. Then jump to step 6-4. Step 6-6) When the grid topology changes, fine-tune the first layer synaptic and neuronal structures to make them consistent with the actual topological changes. If the model fails to recover the original evaluation level, jump to step 6-5); Continuously iterate and optimize through the above steps.
[0018] Compared with the prior art, the present invention has the following technical effects: 1) Previous machine learning models mostly use discrete time step training, which makes it difficult to accurately capture the continuous-time dynamic characteristics of power systems. This paper proposes a data-driven method that combines a system of differential equations with neural networks. This method can not only accurately characterize the dynamic characteristics of power systems through differential equations and enhance model interpretability, but also achieve efficient training and improve computational efficiency through data-driven training. 2) Most previous machine learning assessment methods do not explicitly model the power system topology. This invention uses a neural circuit strategy to adjust the connection structure of neurons to simulate busbar adjacency, enhancing the model's ability to represent system topology. When the grid topology changes, the model can be quickly updated to ensure the assessment accuracy of transient power angle stability after the topology change. 3) The present invention introduces a training set with variable sample length, a time adaptation strategy, and a topology update strategy to achieve an efficient transient power angle stability assessment method. This customized method significantly improves the prediction accuracy and update efficiency of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The present invention will be further described below with reference to the accompanying drawings and examples: Figure 1 The overall flow chart of the present invention; Figure 2 The closed continuous neural structure of the present invention; Figure 3 The structural diagram of the neural circuit strategy of the present invention; Figure 4 Model structure diagram of the present invention; Figure 5 Transient power angle stability assessment flow chart; Figure 6 Time-adaptive strategy graph for online applications; Figure 7 Model structure validity verification diagram; Figure 8 State variable visualization diagram; Figure 9 Parameter sensitivity validation plot. DETAILED DESCRIPTION
[0020] like Figure 1 As shown, a transient stability assessment method based on topological structure and closed neural network includes the following steps: S1, specific differential equations are introduced to model the continuous-time nonlinear dynamics of complex topologies of power systems; S2, using a closed-form continuous-time neural network to solve the differential equation in step S1; S3, using machine learning to continuously learn and improve the evaluation method, parameterizing the solution in step S2 into transient power angle steady state variables; S4, introduces a neural circuit strategy to improve this transient power angle stability assessment method, explicitly model the topology, and improve computational efficiency; S5, using the steady-state criterion of the power system to judge the transient power angle stability of the power system, and forming a data set based on the criterion to train the neural network; S6, combining offline training, practical application and online update to build a comprehensive transient power angle stability assessment method ; ; Specifically: First, the neural differential equations are written to simulate the power system with neuron networks. In this framework, each bus in the power system is regarded as a neuron node in the neural network, which carries the key state information of the power system. The branch lines in the power system are analogous to the synaptic connections between neurons, which not only transmit information but also affect the dynamic characteristics of the entire network. The relationship between neurons and synapses corresponds to the transient power angle stability state and the state variables of each bus in the power system. Specific differential equations are used to simulate the continuous-time nonlinear dynamics on the complex topology of the power system. The bus corresponding to the neuron is taken as the node, and the branch corresponding to the neuron synapse is taken as the edge, and the neural differential equations are listed.
[0021] Then, the differential equations are used as the core tool for modeling. By adjusting these equations, the continuous-time dynamics are enhanced, and their description ability is optimized. This optimization process focuses on building a special neural network model, the liquid time constant recurrent neural network. The network design is inspired by a deep understanding of continuous-time dynamic systems. By introducing time constants as key parameters, the network can more flexibly capture and simulate complex time series data. After establishing the basic architecture of the liquid time constant recurrent neural network, the closed-form continuous-time neural network solving strategy is borrowed, but not directly applied. Instead, the idea of closed-form solution is creatively integrated into the model. This is a more efficient and accurate solving method, which avoids the computational complexity and error accumulation problems that may be caused by traditional numerical methods by constructing an approximately closed neural network mathematical model.
[0022] Next, the network structure is optimized to further improve the training efficiency and performance of the neural network. To achieve this goal, the formula of the approximately closed mathematical model solved earlier is first parameterized. It can not only accurately describe the system dynamics through differential equations and enhance the model's interpretability, but also use data-driven methods to achieve efficient training and improve computational efficiency. The model can automatically adjust parameters through the training process to better adapt to complex data distribution and dynamic changes. Subsequently, the neural circuit strategy is used to guide this optimization process. As the basic unit of information transmission and processing in neural networks, the design and optimization of neural circuits directly affect the performance of the entire network. Through the careful design of the neural circuit strategy, the connection structure of neurons is adjusted to simulate the adjacency relationship of buses, enhancing the model's ability to represent the system topology and promoting effective cooperation and interaction between neurons (each bus). This enables the network to learn more complex and useful feature representations.
[0023] On this basis, a unique, generalizable, and highly interpretable RNN (Recurrent Neural Network) structure is successfully constructed. This structure not only inherits the natural advantages of RNN in handling sequence data, but also overcomes the problems of gradient vanishing or explosion that traditional RNNs may encounter during training through optimization strategies. More importantly, the design of this RNN structure fully considers the practical application requirements of power systems or similar fields, enabling clear interpretation of the internal working mechanism of the network, providing great convenience for subsequent model debugging, improvement, and practical application.
[0024] Finally, a comprehensive and systematic transient power angle stability evaluation framework is constructed, which is carefully divided into three closely connected and mutually supportive components: offline training, practical application, and online updating. The design of this framework aims to ensure the accuracy, practicality, and sustainability of transient power angle stability evaluation.
[0025] First, in the offline training phase, historical data, simulation data, and professional knowledge are used to fully train and verify the previously optimized model. During the training process, close attention is paid to the improvement of evaluation accuracy to ensure that it meets or exceeds the accuracy standards required by power systems for transient power angle stability evaluation. The successful completion of this phase lays a solid foundation for subsequent practical application.
[0026] Subsequently, if the results of offline training meet the accuracy requirements of the power system, the practical application phase is entered. In this phase, the trained model is deployed in the power system, receives real-time system data, and outputs accurate transient power angle stability evaluation results. These evaluation results are of great significance for the stable operation, fault warning, and rapid response of power systems.
[0027] However, considering the complexity and dynamics of power systems, as well as the continuous introduction of new technologies and equipment, the framework needs to be equipped with online updating functions. Once the evaluation accuracy decreases or no longer meets the requirements after the topology changes, the online updating process is immediately started. This process includes changing the model structure to adapt to new data features, adjusting model parameters to optimize performance, or introducing new training data to enhance the generalization ability of the model. After online updating, the model will be verified again to ensure that its evaluation accuracy meets the requirements, and then continue to be applied in practical applications, forming a closed-loop system of continuous iteration and continuous optimization.
[0028] In step S1, the transient power angle stability of the power system can be attributed to a continuous-time nonlinear dynamic problem with a complex topology. While traditional differential equation-based neural network models (such as neural ODEs) have demonstrated strong modeling potential, their practical applications are limited by low training and inference efficiency. This is especially true as the amount of data and task complexity increase, leading to exponentially higher computational costs. To more effectively address this challenge, a closed-form continuous-time neural network was introduced. This network significantly improves processing efficiency by directly solving a system of differential equations describing the interactions between neurons and synapses, leveraging closed-form approximation strategies and effectively circumventing the performance bottlenecks of traditional methods. In the power system, this relationship between neurons and synapses corresponds to the transient power angle stability state and the state variables of each busbar. Specifically, within a given power system topology, its dynamics can be succinctly described as follows: the state variables of each busbar continuously change according to certain dynamic laws under the influence of adjacent buses, and these state variables have a nonlinear relationship with the transient power angle stability state of the power system. Writing differential equations, under a certain power system topology, its dynamics can be concisely described as follows: the state variables of each bus change continuously according to certain dynamic laws under the influence of adjacent buses, and there is a nonlinear relationship between these state variables and the transient power angle stability of the power system. The above can be expressed as a set of differential equations: (1); where is the set of steady-state variables of the transient power angle of the power system at time t, The state variable of the i-th bus at time t, It is a collection of them. To dynamically manage parameters, is the electrical dynamic variable of the i-th bus, The first equation in this formula represents the set of state variables of each bus. To solve the transient power angle stability of the power system The second formula represents the electrical dynamic variables of the busbar The corresponding topological structure To solve the state variables of each bus .
[0029] Secondly, the model is constructed by using differential equations. On the basis of neural differential equations, in order to enhance the expression of continuous-time dynamics, an improved form is introduced, which is called liquid time constant recurrent neural network LTC. The structure is proved to be robust, bounded and stable. Taking the transient power angle stability state variable as an example, an improved differential equation form is introduced: (2); In the formula, is helpful for the system to reach the equilibrium state with time constant τ; in order to let the hidden state flow of the network be represented by a linear differential equation system, a nonlinear is introduced, which activates neurons through nonlinear synapses, is the sum of all synaptic inputs that receive external stimuli and input to the cell (the sum of all state variables input to the power system); is dependent on the state of all neurons (each node of the power system), is the external input (the sum of all bus state variables input to the power system), refers to the power system parameter vector.
[0030] In step S2, the interaction between neurons and synapses is constructed in a closed form, and the depth dimension of static neural network and the time dimension of recurrent neural network are converted into a continuous vector field. The closed-form solution of the continuous neural network is approximated by explicit simulation of time.
[0031] From the mathematical analysis, it is difficult to solve because is a positive, continuous, monotonically increasing, bounded nonlinear function, which is difficult to solve in a closed form; because it depends on the arbitrarily defined input signal X(s) (such as real-world sensory readings). In order to solve this problem, X(s) is discretized into piecewise constant segments, and the integral is discretely approximated in the form of piecewise constant segment sum on the interval to solve the formula in step S1; the specific solution is as follows: (3); represents the initial state of the power system. After introducing the second time constant and the parameter B, the formula becomes more flexible, and the transient power angle stability state calculation formula at each time step is: (4); In the formula instead of becomes a parameter vector, with is a system parameter vector, is a neural network, whose neural network parameters are , is an m-dimensional input at each time step t, is a D-dimensional output at each time step t . Among the neural network parameters, represents the weight between and , represents the weight between and , represents the bias of the neural network; In step S3, in order to make the training process of the neural network more controllable and efficient, the solution obtained in step S2 is parameterized, so that different types of activation functions and layer structures can be used by adjusting the parameters, so as to optimize the convergence speed, stability and generalization ability of the model, improve the expression ability of the model, and finally enhance the performance of the model. The meaning of each variable is consistent with that described in the formula in step S1. After introducing the second time constant and the parameter B, the formula is more flexible, and then the formula after parameterizing the transient angle stability state variable is as follows: (5); Referring to Figure 2 , the closed-form continuous neural network structure of the present application is given, which can better illustrate the structure of the closed-form neural network, and can better explain the above formula. Replace the exponential term in step S2 with , because the exponential term will export the first part of the system (exponential fast) to 0, and the entire hidden state to A. When there is a loop connection, this problem becomes more obvious, and will cause the gradient factor to disappear when training using gradient descent. In order to reduce the influence, replace the exponential decay term with an inverse s-shaped nonlinear . This nonlinear function is approximately 1 at t = 0, and tends to 0 at the limit . However, unlike the exponential decay, its transition occurs more smoothly, and works better in the training of the neural network.
[0032] At the same time, in order to enhance the flexibility of the model, the backbone neural network layer sends the input signal to the three head networks , and . f as the liquid time constant of the network s-type time gating, and construct the nonlinearity of the entire closed-form neural network. Subsequently and Substitute the parameter B with A of the formula in step S2 respectively, and then multiply The s-shaped term representing time decay can play a gating role. In this way, the s-shaped function representing time decay represents the gating mechanism interpolating between the two limits of t .
[0033] In Figure 2 , a multi-branch shared network structure is shown, in which a completely different network structure does not need to be designed for each neural network instance f, g and h, because in the power system, there are complex topological structures, and real-time running data is shared among multiple nodes, and these connection relationships will not change in most cases, so they are selected to share a backbone network, which usually contains some shared first few layers, which are high-level feature extractors in deep neural networks, which can learn common features in input data such as edges, textures and shapes. Sharing these layers can effectively reduce the number of network parameters, reduce the risk of overfitting, and improve training efficiency and generalization performance. Then, the output of the backbone network is branched into three branches, each corresponding to a neural network instance f, g and h. These branch networks usually contain some independent layers, which are designed according to the specific task requirements. During training, different task data can be fed into the corresponding branch network for training, while the parameters of the backbone network and branch network are updated through the backpropagation algorithm. In this way, multiple tasks can be learned simultaneously, and the training efficiency and generalization performance can be improved while ensuring the accuracy of the model.
[0034] In step S4, a neural circuit strategy is introduced to explicitly model the topology. Specifically, by observing the output of each neuron (in the power system, the state variables of each node are observed), a unique, generalizable and interpretable RNN structure is established through the cooperation between neurons, and the entire learning state of the model is observed, which is reflected in the state variables of each bus not only determined by the dynamic variables on this bus , but also related to the dynamic variables on other buses and its own state variables (6). In the formula, each parameter is the same as the formula in step S1, and the directional transmission between neurons (i.e. each bus) is realized by multiplying the weight parameter with the sparse mask matrix, and the weight parameter is modified as: wherein is a non-trainable sparse mask matrix reflecting the connection relationship between neurons (i.e., each bus), and zero parameters of will be initialized to zero. represents the relationship between and , represents the relationship between and , represents the bias of the neural network.
[0035] Referring to Figure 3 , a specific neural circuit strategy structure is shown, in which neurons are divided into four categories: sensory neurons, interneurons, command neurons and motor neurons, which is inspired by the wiring diagram of Caenorhabditis elegans, and is characterized by high sparsity. The first layer of the model is the perception layer, which is a multi-layer CNN network, the second layer is the intermediate layer, which is a sparse neuron network layer, the third layer is the control layer, which is an RNN network with self-connection, and the last layer is the output layer, which outputs the instruction. The main connection mode inside is the feedforward connection from the sensor to the intermediate neuron, the high cycle connection between the intermediate neuron and the command neuron, and the feedforward connection from the command neuron to the motor neuron. This structure is an end-to-end input and output form, and the model has good interpretability. The learning situation of the whole model can be observed by observing the output of each neuron, and the command neural network uses the idea of RNN sequence network, which can short-term memory the network state before, and achieve a certain stability.
[0036] The complex topology structure in the power system can also imitate the connection structure between neurons. The state variables of different buses are determined by the dynamic variables on the remaining buses and their own state variables. Secondly, by using the structure of RNN, the robustness of the model can be stronger, which can effectively resist noise and has the ability to preferentially learn the recent scene.
[0037] In step S5, a criterion for transient power angle stability is given to evaluate whether the system is stable. The judgment of transient power angle stability is mainly based on the behavior of the power system after being disturbed. The classification label of stability evaluation is defined by the transient power angle stability index (TSI), which is specifically expressed as the following formula: (7); (8); wherein represents the maximum power angle difference between any two generators, if is greater than , i.e. <0, the system is unstable, and the sample is marked as 1; if < 0, the system is stable and the sample is marked as 0.
[0038] In this method, the active power, the reactive power, the voltage and the frequency are selected as the dynamic variable inputs of the power system to obtain the state variables, and then the state variables of each bus are used to judge the transient power angle stability of the power system, that is, the state variables of each bus are input into the neural network for learning, and these parameters are indispensable in the transient power angle stability discrimination of the power system. They respectively reflect the stability and performance of the system in different aspects, and can well predict the transient power angle stability of the power system. At the same time, in the model learning process, the loss value is calculated based on the cross-entropy loss function: (9); Where p and y are the predicted value and the true label, when p is equal to y, 0, when p is not equal to y, then it is not 0, and the function can well reflect the error between the predicted value and the true value.
[0039] Before importing the past data into the neural network for training, due to the different measurement units of various features, the feature data is seriously different, which is not conducive to model training, therefore, the original data set needs to be normalized in advance, which leads to a slow convergence speed during model training. The normalization can unify the scales of all features, thereby accelerating the convergence speed, and the specific formula is as follows: (10); Wherein, and are the mean and standard deviation of a single feature; Referring to Figure 4 , the model structure diagram of the present application is shown, in Figure 4 , the model structure is visualized, and the working process of the model is clearly explained. The first layer contains the same number of neurons as the bus of the power system, and the number and connection of synapses are related to branches. In Figure 4 , bus A is connected to buses B, C and D through branches, accordingly, the dynamic variables on buses A, B, C and D will be input into neuron A as synapses, these feature sets are in the parameterized differential equation, and the solution value of neuron A is the state variable . In this way, by structurally solving the state variables of all buses, the structure-dynamic dependency relationship can be fully captured, and the spatial correlation is extracted through the adjacency relationship, which is a common method in graph neural network (GNN), and the structure proposed in the present application is inspired by it.
[0040] The second layer consists of only two neurons, which are used to solve the state variable of transient power angle stability of the power system . Solve by the formula in step S3, and then merge into two single values by average time pooling. Finally, map these single values to [0, 1] by the SoftMax layer, which represents the prediction probability of stability and instability.
[0041] In step S6, a transient power angle stability evaluation framework is constructed to train and apply the method, which includes three parts of offline training, actual application and online updating.
[0042] Referring to Figure 5 , the specific content of the transient power angle stability evaluation framework is shown. First, offline training is performed, the training data set is generated through the transient power angle stability evaluation criteria in step S5, and then the model is trained based on the method proposed in the application to generate the transient power angle stability evaluation model. If the result of offline training meets the accuracy requirement of the power system, it enters the actual application stage for actual application. In the actual application stage, the trained model is deployed in the power system, and real-time system data is received. When a fault occurs, the input data is measured by the PMU measurement unit into the transient power angle stability evaluation model, and then the data from the fault clearing time to each evaluation period is input in turn, which is used to solve the state variable prediction value and the transient power angle stability probability. If the measurement accuracy of this period is greater than the evaluation accuracy, it is output as the result. If the accuracy evaluation is not met, the next period of evaluation is performed. This process continues until the maximum evaluation period. If the topology of the power system changes, online updating is performed. First, it is judged whether the evaluation model after the topology change meets the requirements. If it meets the requirements, it continues to be applied. If it does not meet the requirements, the model structure is modified or the parameters are adjusted. The model after online updating is verified again to ensure that its evaluation accuracy meets the requirements, and then it is put into actual application, forming a closed loop system of continuous iteration and continuous optimization.
[0043] At the same time, in each stage, the corresponding improvement method is proposed to make the framework more accurate and rapid.
[0044] In the offline training phase, the selection of sample length has a great impact on offline training. Too long sample length will lead to unreliable prediction of transient angle stability state variables, while too short sample length will lead to insufficient continuous-time dynamics fitting. Therefore, the sample can be terminated at the moment of system instability to avoid learning unstable dynamic behavior. For stable systems, the sample can be cut off when the system reaches a certain stable state (such as maximum swing angle) to ensure that the sample contains sufficient stable dynamic information. Therefore, a training set with variable sample length is introduced, which is very important in the offline training phase.
[0045] The online update part, due to system maintenance, expansion, generator exit and other factors, the topology scenario of the monitored power system will change, so the parameters in it need to be adjusted at any time. First of all, the synapse and neuron structure can be adjusted to ensure the effectiveness of the continuous-time dynamic topology. At the same time, a data set matching the new topology scenario is established through time domain simulation. If the model cannot restore the original evaluation level, fine-tune or even retrain all parameters.
[0046] In the practical application part, the transient angle stability state is predicted through real-time data. Referring to Figure 6 When the fault is detected and cleared, the real-time data of the PMU is transmitted to the control center. In the control center, the proposed model receives selected data through a time adaptive strategy. From the fault clearing time to each evaluation period, the data is used in turn to solve the state variable prediction value and the transient angle stability probability. The evaluation period is 1 / 60 seconds, which avoids the disadvantages of the application of fixed observation window, greatly saves time, and balances the rapidity and accuracy of transient angle stability evaluation. During the evaluation process, as soon as any one of the stable and unstable prediction probabilities exceeds the reliable threshold, the probability is considered reliable and output as the evaluation result. On the contrary, wait for the latest real-time data and enter the next evaluation period. This process continues until the maximum evaluation period is reached. Then directly output the larger probability value as the result, complete the evaluation of the system, and its formula can be as follows: (11); P represents the probability of transient angle stability state, P represents the probability of transient angle instability state, P represents the maximum evaluation period.
[0047] Embodiment: 1. Data generation The model and method of the present application are demonstrated in IEEE39 nodes and a practical 1648 node system. All programs are performed on a computer equipped with a 2.50GHz Intel Core i5-12500HC CPU and 16GB of memory. The NVIDIA RTX-3080 GPU is configured to support efficient deep learning in Python.
[0048] Three data sets were generated in the IEEE39 line system for performance testing, each with a different specific topology scheme. is the standard sample set, represents the disconnection of branch 2-3 and branch 16-21, represents the disconnection of bus 14. To further test the method, the present application uses a larger 1648 bus system, which contains 1648 buses, 313 generators, 182 shunters and 2294 transmission lines. is the standard sample set, represents the disconnection of branch 25-30 and branch 16-83, represents the disconnection of bus 102. All samples of the transient process of the two systems are simulated using the PSS / E platform. The simulation time after fault removal is set to 10 seconds to ensure correct labeling. The specific configuration is as follows: the fault duration is set to a random value between 0.05s and 0.25s. Most of the loads are random loads, set between 80% and 120% of the system basic load level, and other loads are set between 70% and 130%. It is assumed that three-phase short circuit faults will occur on each transmission line and bus. The data sampling frequency is 120Hz. After simulation and labeling, the data sets are formed by sampling data of different lengths after fault removal. The ratio of training, validation and test data sets is 6:2:2, and the specific number is shown in Table 1.
[0049] Table 1
[0050] The present application uses accuracy ACC, average response time ART after fault removal, false alarm rate FAL and false alarm rate MIS as transient angle stability evaluation indexes, and the formulas of each index are as follows: (12); (13); (14); (15); and respectively represent the number of stable samples evaluated as unstable and the number of unstable samples evaluated as stable, represent the total number of samples, represent periods, represent the number of samples in a period, represent the maximum evaluation period.
[0051] 2. Model performance comparison data sets and are respectively from the normal operation scenarios of IEEE 39-bus system and 1648-bus system, used to verify the performance of transient stability angle state prediction. As shown in Figure 2 , model 1 and model 2 represent whether the model uses a training set with variable sample length for comparison. The results show that the model using the training set with variable sample length has better performance. Compared with other classic data-driven models, deep forest (DF) and convolutional neural network (CNN) with fixed observation window verify the time adaptive strategy, which proves that the time adaptive strategy is advanced and has faster response time. RNN, LSTM and GRU, as discrete time models, are introduced for comparison with continuous time models. The structures of these models are similar to the model structure proposed in the present application, which are both two-layer dense stacking structures. The first layer uses 39 and 1648 neurons, respectively corresponding to the two systems. The hyperparameters and online application settings are the same as the recommendations. The results are shown in Table 2, the proposed model not only takes into account the speed and accuracy, but also achieves the best evaluation performance. Especially in the face of 1648-bus system, it can still maintain 98.87% accuracy and 1.43 response speed, which benefits from the powerful modeling capability of differential equations and the fast response of data-driven form.
[0052] Table 2
[0053] 3. Model structure effectiveness verification The present application adopts a neural circuit strategy to encode the topological information of the power system, so that the differential equation can simulate the topological relationship between each bus. The present application takes the 39-bus system as an example for verification, as shown in Figure 7As shown, compared with the complex topological relationship of the 1648 bus system, the topological relationship of the 39 bus system is clearer, the core topological characteristics are reserved, and the too complex topological relationship is avoided, so that the relationship between the model structure and the topology is better exhibited. Specifically, the connection mode between each neuron in the model imitates the bus connection mode of the IEEE 39 system to better express the topology structure of the power system. In order to compare the topological connection scheme between different neurons, the visualization image of the sparse matrix and the sparsity of the model (that is, the proportion of 0 value parameters to the total parameters) are introduced to describe the range of different topological structures. First, the connection between nodes is adjusted step by step. During the topological expansion process, the connection range of the neuron and the model structure gradually increases, and the connection density continuously improves, until all values of the sparse matrix are 1. The experimental results (such as Figure 7 shown) show that when the sparsity of the proposed topological modeling scheme is the same as the bus sparsity of the IEEE 39 system, the overall performance of the model is the most reliable. In addition, the present application also adopts two kinds of random topological structures, the neuron sparsity of which is the same as that of the IEEE 39 system bus, but the connection between neurons is random, not according to the connection mode of the IEEE 39 system bus. Through the comparison experiment of these random topologies, we prove that under the condition of the same sparsity, the topological structure with ordered connection (consistent with the IEEE 39 bus system) can obtain the best performance. Therefore, the proposed topological modeling scheme simulates the topological structure in the power system and exhibits the most reliable performance.
[0054] 4. Process visualization display Because the state of the data set is high-dimensional, it is difficult to describe the reasoning process of the model through intuitive images. This is not conducive to the interpretability of the model. In order to enhance the transparency of the classification effect, the present application uses the t-SNE nonlinear dimension reduction algorithm to map the original features to a two-dimensional plane so that the data before and after classification can be visually displayed. Because the features and the number of samples of the 1648 bus system are more, the present application takes the 1648 bus system as an example, which is more representative. As shown in Figure 8 , the initial input features , the stable samples and the unstable samples are mixed together, and it is difficult to distinguish them. After the first layer of the model is trained (output ), the distribution of the two types of samples forms a preliminary boundary, but there is still a part of the overlapping area that is difficult to distinguish. After the second layer of the CFC is trained (output ), there is a very obvious boundary between the stable samples and the unstable samples, and there is no overlapping part. The above results verify the effectiveness of the hierarchical feature extraction architecture proposed in this paper. Through double-layer feature extraction, the model can gradually strengthen the class discrimination information. In addition, the data enhancement strategy of variable length time window is introduced, which can effectively learn the features of the samples and improve the classification ability of the model.
[0055] 5. Parameter sensitivity analysis Obviously, due to the time adaptive strategy, that is, according to formula (11) the reliable threshold and the maximum evaluation period Significantly affects the evaluation performance. Under fixed conditions, it is necessary to determine the and The results are as follows Figure 9 As shown in (a)(b). The range is [1, 10] and the step size is 1, The range is [0.5, 0.99] and the step size is 0.01. When , ART should be as small as possible while ensuring the accuracy of the assessment ACC. Figure 9 (b) shows that when the two systems When a certain period is reached, even if Continuing to increase will not bring much performance improvement. In fact, the calculation time of the model will decrease as The calculation time of each evaluation in the online application is preferably shorter than each evaluation cycle. After comprehensive consideration, the 39 busbar system and The value of is set to 4 cycles and 0.62. and The values of are set to 5 periods and 0.67.
[0056] 6. Verification of the practicality of online updates Dataset and The data set represents the branch topology changes of the two systems. and These data sets represent busbar topology changes in two systems. These data sets were used to evaluate the online update capabilities of the transient assessment method proposed in this paper. To address performance degradation under new topologies, we compared two update strategies: fine-tuning some parameters (the approach adopted by this paper) and retraining the entire model. Before the update, the model structure was adjusted based on the topological changes, such as deleting invalid synapses, neurons, and related parameters. The results are shown in Table 3. Table 3
[0057] After the fine-tuning strategy is implemented, the evaluation accuracy of the model is restored to more than 98%. At the same time, compared with the retraining model strategy, the time cost of the method is significantly reduced, and at least twice the iteration number is required for the retraining strategy to restore the accuracy to more than 98%. It can be seen that the online updating method proposed in the application can realize fast and efficient online updating, and the interpretable model structure helps to customize a simpler and more effective online updating strategy.
Claims
1. A transient stability assessment method based on topological structure and closed neural network, characterized in that: The following steps are involved: Step S1: Introduce the target differential equation to simulate the continuous-time nonlinear dynamics of the complex topology of the power system; Step S2: using a closed-form continuous-time neural network to solve the differential equation in step S1; Step S3: Utilize machine learning to continuously learn and improve the evaluation method, and parameterize the transient power angle steady-state variables of the solution in step S2; Step S4: Introducing the neural circuit strategy to simulate the connection structure of the whole neuron to explicitly model the topology and improve the computational efficiency; Step S5: using the steady-state criterion of the power system to judge the transient power angle stability of the power system, and forming a data set according to the criterion to train the neural network; Step S6: combining offline training, practical application and online updating; The above steps can achieve a comprehensive transient power angle stability assessment.
2. The method according to claim 1, characterized in that In step S1, the transient stability process of the power system can be regarded as continuous-time nonlinear dynamics on a complex topological structure. A specific differential equation is introduced to simulate this nonlinear process. Under a certain power system topology, its dynamics can be concisely described as follows: the state variables of each bus change continuously according to certain dynamic laws under the influence of adjacent buses, and there is a nonlinear relationship between these state variables and the transient power angle stability state of the power system.
3. The method according to claim 2, characterized in that The nonlinear relationship is expressed by a differential equation: (1); Where, yes t The set of steady-state variables of the transient power angle of the power system at time , Indicates the i busbar at time t The state variables, It is a collection of them. To dynamically manage parameters, It is i The electrical dynamic variables of the busbar, It corresponds to the adjacency matrix of the power system topology. f It represents a neural network; The first equation in this formula represents the set of state variables passing through each bus To solve the transient power angle stability of the power system The second formula represents the electrical dynamic variables of the busbar The corresponding topological structure To solve the state variables of each bus .
4. The method according to claim 3, characterized in that In order to enhance the expressiveness of continuous-time dynamics, an improved form is introduced, which is modeled after the interaction of neurons through synapses. The improved equation form is as follows: (2); Where, It helps the system reach an equilibrium state with a time constant τ, and in order to allow the hidden state flow of the network to be represented by a linear system of differential equations, a nonlinear synapse is introduced. , activating neurons through nonlinear synapses, is the sum of all synaptic inputs that receive external stimuli and input them into the cell; depends on the state of all neurons, It is external input; Refers to the power system parameter vector.
5. The method according to any one of claims 1 to 4, characterized in that In step S2, the differential equation that originally needs to be solved iteratively is converted into an approximately closed form, so that under given initial conditions, an analytical solution or a high-precision approximate solution of the network state can be obtained directly or through a finite-step calculation.
6. The method according to claim 5, characterized in that The specific solution results are: (3); is the initial state of the power system; In the formula, a second time constant is introduced Then, the transient power angle steady state calculation formula of each time step is: (4); In the formula replace becomes the parameter vector, and (D) is the system parameter vector, f is a neural network whose neural network parameters are , represent and The weight between represent and The weight between Represents the bias, is each time step t m-dimensional input, is each time step t D-dimensional output.
7. The method according to claim 6, characterized in that In step S3, in order to make the training process of the neural network more controllable and efficient, the solution obtained in step S2 is parameterized as a transient power angle steady-state variable. In this way, by adjusting the parameters, different types of activation functions and layer structures can be used to optimize the convergence speed, stability and generalization ability of the model, improve the expressive power of the model, and ultimately enhance the performance of the model.
8. The method according to claim 7, characterized in that The parameterized formula of the transient power angle steady state variable is as follows: (5); In the formula, in order to enhance the flexibility of the model, a trainable neural network is introduced and Replace the parameters in formula (4) respectively and In order to avoid the gradient of Equation (4) disappearing during the training of the neural network, the exponential decay term By an inverse sigmoid nonlinear variable (.) is replaced by and (1- (.)) is multiplied by the time-attenuated s-type term, which plays a gate control role; finally, 、 and The first few layers of the neural network are shared in the form of a backbone to accelerate and stabilize the learning process.
9. The method according to claim 1 or 2 or 3 or 4 or 6 or 7 or 8, characterized in that In step S4, a neural circuit strategy is introduced to explicitly model the topology, specifically: Using an end-to-end input-output format, by observing the output of each neuron and the cooperation between neurons, a unique, generalizable, and interpretable RNN structure is established to observe the entire learning state of the model, which is reflected in the state variables of each bus. Not only the dynamic variables on this bus Determines the dynamic variables on the remaining busbars With its own state variables The specific neural network parameters are shown in the following formula: (6); The directional transmission between neurons, i.e., each busbar, is achieved by multiplying the weight parameter by the sparse mask matrix. The weight parameter is modified as follows: ,in represent and The weight between represent and The weight between represents the bias, It is a non-trainable sparse mask matrix that reflects the connection relationship between neurons, that is, each bus. This connection relationship corresponds to the connection relationship between buses in the power system, and The zero parameter corresponds to The parameters will be initialized to zero.
10. The method according to claim 9, characterized in that The improved RNN network has better model interpretability and better stability. The traditional RNN network only considers the sufficiency of the number of neurons to fit the target data, and rarely considers the interaction between neurons. In contrast, in the neural circuit strategy, neurons are divided into four categories: sensory neurons, interneurons, command neurons and motor neurons, which are characterized by high sparsity. Sensory neurons are responsible for obtaining external environmental information, internal and command neurons make decisions, and finally, motor neurons control muscles. Different neurons are connected through synapses to form a meaningful topological structure; secondly, the RNN structure can make the model more robust, can effectively resist noise, and has the ability to give priority to learning recent scenarios.
Citation Information
Patent Citations
Transient voltage stability monitoring method for alternating current / direct current system based on MBLDA
CN112564090A
Distribution network automation equipment group fault diagnosis method, system, equipment and medium
CN119646582A
Interpreting and improving the processing results of recurrent neural networks
US20210182657A1