Transient stability prevention and control method and device based on proxy model

By adopting a transient stability prevention and control method based on agent model in the power system, and calculating generator sensitivity using Transformer architecture and integral gradient algorithm, the problem that the transient stability prevention and control strategy in the existing technology cannot adapt to the new power system, achieving more efficient transient stability analysis and prevention and control.

CN119513754AActive Publication Date: 2025-02-25ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +2

Patent Information

Application Number
CN202411454684.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-25
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the prior art, the power system's transient stability prevention and control strategy cannot adapt to the engineering needs of new power systems. The transient stability analysis model implemented by traditional neural networks has poor parallelism, high sample requirements and does not meet the online control needs.

Method used

Using a transient stability prevention and control method based on the agent model, the sensitivity of the generator is calculated by inputting the power system operation data into the transient stability analysis model, and based on this, the adjustment strategy for the initial active power of the generator is determined. This method uses deep learning neural networks of Transformer architecture for training, and combines the integral gradient algorithm to calculate sensitivity.

Benefits of technology

The analysis and prediction of the transient stability of the power system has been realized, and the generation of transient stability prevention and control strategies through artificial intelligence technology has been assisted, which has improved the safe and stable operation capabilities of the power system and supported the prevention of large-scale grid accidents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513754A_ABST
    Figure CN119513754A_ABST
Patent Text Reader

Abstract

The invention provides a transient stability prevention and control method and device based on an agent model, and the method comprises the steps: inputting a plurality of operation data of a power system into a pre-constructed transient stability analysis model, and obtaining a transient stability analysis result of each operation data outputted by the transient stability analysis model, each operation data comprises the initial active power of the generator; according to the transient stability analysis result, determining transient instability operation data, and calculating the sensitivity of each generator in the transient instability operation data through an integral gradient algorithm; determining an adjustment strategy for the initial active power of each generator based on the sensitivity; according to the invention, a feasible solution is provided for monitoring of the stability situation of the power system and control decision after instability, the safe and stable operation capability of the power system is further improved, and support is provided for preventing large-scale accidents of a power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of transient stability of power systems, and in particular to a transient stability preventive control method and device based on an agent model. Background Art

[0002] Transient stability analysis of power systems can be divided into two categories: one is to predict transient stability based on the system trajectory when a system fault occurs or under a predicted fault, and the other is to establish the relationship between the transient stability after the fault and the power flow distribution before the fault before the system fault.

[0003] Transient stability preventive control of power systems refers to changing the system's power flow operation mode by adjusting the active output of generators, parallel reactive compensation, etc. before a potential power system fault occurs, so that the system can continue to operate safely and stably.

[0004] Under the engineering requirements of transient stability prevention and control of new power systems, the transient stability analysis model implemented by traditional neural networks has shortcomings such as poor parallelism, high sample requirements, and failure to meet online control requirements. In order to overcome the difficulties of traditional neural networks in transient stability prevention and control, a new generation of transient stability analysis model is used.

[0005] In view of the new generation of transient stability analysis models, it is urgent to adjust the existing power system transient stability prevention and control strategies. Summary of the invention

[0006] The present invention provides a transient stability preventive control method and device based on an agent model, which is used to solve the defect that the transient stability preventive control strategy of the power system in the prior art cannot adapt to the engineering needs of the transient stability preventive control of the new power system, and completes the generation of the preventive control strategy by adjusting the active output of the generator.

[0007] The present invention provides a transient stability preventive control method based on an agent model, comprising the following steps: Inputting a plurality of operation data of the power system into a pre-built transient stability analysis model to obtain a transient stability analysis result of each operation data output by the transient stability analysis model, wherein each operation data includes an initial active power of a generator; Determine transient instability operation data according to the transient stability analysis result, and calculate the sensitivity of each generator in the transient instability operation data by using an integral gradient algorithm; Based on the sensitivity, an adjustment strategy for the initial active power of each of the generators is determined.

[0008] According to the transient stability preventive control method based on the agent model provided by the present invention, the transient stability analysis model is obtained by training a deep learning neural network of a Transformer architecture based on sample data with transient stability and sample data with transient instability.

[0009] According to the transient stability preventive control method based on the proxy model provided by the present invention, the transient stability analysis model includes multiple encoders of the Transformer architecture and a decoder; The encoders of each Transformer architecture are used to extract features from the power system operation data grouped according to physical attributes to obtain feature vectors of each operation data; and feature concatenate the feature vectors; the encoders of each Transformer architecture are trained by a supervised contrastive learning algorithm; The decoder is used to process the feature vector after feature splicing and output the transient stability analysis result of the power system.

[0010] According to the transient stability preventive control method based on the agent model provided by the present invention, the step of calculating the sensitivity of each generator in the transient instability operation data by using the integral gradient algorithm specifically includes: Select the transient stable operation point in the sample space where the difference between the initial active power of the generator and the transient instability sample point is the smallest as the reference point; Based on the reference point, calculating the integral value of the gradient between each of the transient instability sample points and the reference point; The integral value is used as the sensitivity of each generator in the transient instability operation data.

[0011] According to the transient stability preventive control method based on the agent model provided by the present invention, the formula for calculating the integral value of the gradient between each of the sample points and the reference point is: ; in, represents the reference point sample; Represents the current input state of the neural network; Indicates from arrive A path where , ; Represents a neural network model; No. Input features; Represents the total number of input features; Indicates the path right The derivative of Represents a neural network model exist Input gradient.

[0012] According to the transient stability preventive control method based on the agent model provided by the present invention, the step of determining the adjustment strategy for the initial active power of each generator based on the sensitivity specifically includes: Sort the generators in descending order of the absolute value of sensitivity; Select multiple engines with larger absolute values ​​as control engines, and select multiple engines with smaller absolute values ​​as balance engines; Determine the adjustment amount of the initial active power of each of the control engines and each of the balancing engines according to the sensitivity calculated by the integral gradient and the upper and lower limits of the output of the generator; Adjusting each of the control engines and each of the balancing engines according to each of the adjustment amounts to obtain a new active output of the generator; The active output of the new generator is verified. If the verification fails, the adjustment amounts are updated and then the verification is repeated until the verification passes, thereby obtaining the final adjustment amount.

[0013] The present invention also provides a transient stability preventive control device based on an agent model, comprising the following modules: An analysis module, used for inputting a plurality of operation data of the power system into a pre-built transient stability analysis model, and obtaining transient stability analysis results of each operation data output by the transient stability analysis model, wherein each of the operation data includes an initial active power of a generator; A sensitivity calculation module, used to determine transient instability operation data according to the transient stability analysis result, and calculate the sensitivity of each generator in the transient instability operation data by an integral gradient algorithm; An adjustment module is used to determine an adjustment strategy for the initial active power of each of the generators based on the sensitivity.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the transient stability preventive control method based on the agent model as described above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the transient stability preventive control method based on the agent model as described in any one of the above is implemented.

[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned transient stability preventive control methods based on the agent model.

[0017] The transient stability prevention and control method and device based on the proxy model provided by the present invention obtains the transient stability analysis results of each operating data output by the transient stability analysis model by inputting multiple operating data of the power system into a pre-built transient stability analysis model, wherein each operating data includes the initial active power of the generator; according to the transient stability analysis results, the transient instability operating data is determined, and the sensitivity of each generator in the transient instability operating data is calculated by an integral gradient algorithm; based on the sensitivity, the adjustment strategy for the initial active power of each generator is determined. The present invention uses a transient stability analysis model to analyze and predict the transient stability of the power system, and further assists in the generation of transient stability prevention and control strategies for the power system based on artificial intelligence technology, providing feasible solutions to problems such as monitoring the stability of the power system and control decisions after instability, further improving the safe and stable operation capabilities of the power system, and providing support for preventing large-scale power grid accidents. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of the transient stability preventive control method based on the agent model provided by the present invention.

[0020] Figure 2 A schematic diagram of the structure of a transient stability analysis model based on a Transformer architecture provided in an embodiment of the present invention.

[0021] Figure 3 A schematic diagram of the structure of an encoder provided in an embodiment of the present invention.

[0022] Figure 4 A schematic diagram of the structure of a decoder provided in an embodiment of the present invention.

[0023] Figure 5 A structural comparison diagram of the model before and after using the multi-channel feature extraction method provided in an embodiment of the present invention.

[0024] Figure 6 A schematic diagram of a structure for performing separate training on a feature extractor provided in an embodiment of the present invention.

[0025] Figure 7 A diagram of the encoder pre-training process provided by an embodiment of the present invention.

[0026] Figure 8 A schematic diagram of fine-tuning a model provided in an embodiment of the present invention.

[0027] Fig. 9 Schematic diagram of the overall process of preventive control provided by an embodiment of the present invention

[0028] Fig.10 A schematic diagram of a power angle curve of a sample provided in an embodiment of the present invention.

[0029] Fig.11 A schematic diagram of a voltage curve of a sample provided by an embodiment of the present invention.

[0030] Fig.12 A schematic diagram of an active power curve of a sample provided in an embodiment of the present invention.

[0031] Fig.13 A graph showing the change in loss function of the improved model provided in an embodiment of the present invention.

[0032] Fig.14 The power angle curve of the sample i1 before adjustment provided by the embodiment of the present invention.

[0033] Fig.15 The power angle curve of the adjusted sample i1 provided in the embodiment of the present invention.

[0034] Fig.16 The power angle curve of the sample i2 before adjustment provided by the embodiment of the present invention.

[0035] Fig.17 The power angle curve of the adjusted sample i2 provided in the embodiment of the present invention.

[0036] Fig.18 It is a structural schematic diagram of the transient stability preventive control device based on the agent model provided by the present invention.

[0037] Fig.19 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] The present invention is described in detail below in conjunction with the accompanying drawings of the specification. The specific operating method in the method embodiment can also be applied to the device embodiment or the system embodiment. In the description of the present invention, unless otherwise specified, "at least one" includes one or more. "Multiple" refers to two or more. For example, at least one of A, B and C includes: A exists alone, B exists alone, A and B exist at the same time, A and C exist at the same time, B and C exist at the same time, and A, B and C exist at the same time. In the present invention, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a kind of association relationship that describes the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0040] The present invention will be described in detail below in conjunction with specific implementation modes.

[0041] In some specific embodiments of the present invention, Figure 1 As shown, this scheme provides a transient stability preventive control method based on an agent model, comprising the following steps: Step 100: Input multiple operation data of the power system into a pre-built transient stability analysis model to obtain transient stability analysis results of each operation data output by the transient stability analysis model, wherein each operation data includes the initial active power of the generator; Step 200: Determine transient instability operation data according to the transient stability analysis result, and calculate the sensitivity of each generator in the transient instability operation data by using an integral gradient algorithm; Step 300: Determine an adjustment strategy for the initial active power of each generator based on the sensitivity.

[0042] It should be noted that the existing transient stability preventive control schemes cannot meet the engineering requirements of transient stability preventive control of new power systems. Under the engineering requirements of transient stability preventive control of new power systems, the transient stability analysis model implemented by traditional neural networks has shortcomings such as poor parallelism, high sample requirements and failure to meet online control requirements.

[0043] Therefore, the present invention uses the transient stability analysis model for transient stability analysis and preventive control of the power system, and then calculates the sensitivity of the active output of the generator corresponding to the system stability according to the integral gradient algorithm, guides the adjustment of the active output of the generator, and thus realizes transient stability preventive control.

[0044] Specifically, the direct method for solving the transient stability preventive control algorithm of the power system alternately performs transient stability analysis and updates the operating point until a new operating point that satisfies the transient stability constraints is obtained. The updating process of the operating point is mainly based on the sensitivity index. Compared with traditional analysis methods, artificial intelligence technologies such as deep learning have speed advantages in transient stability preventive control of power systems. Therefore, the present invention uses a pre-built improved transient stability analysis model to formulate a preventive control plan.

[0045] In some possible implementations of the present invention, the transient stability analysis model is obtained by training a deep learning neural network of a Transformer architecture based on sample data with transient stability and sample data with transient instability.

[0046] Specifically, this embodiment provides an implementation method of a transient stability analysis model, using a new generation of Transformer model for transient stability analysis and preventive control of power systems, overcoming the difficulties of traditional neural networks in transient stability analysis and transient stability preventive control.

[0047] Specifically, traditional transient stability analysis methods, such as time domain simulation, are highly accurate but require large amounts of computation, making it difficult to meet real-time or near-real-time analysis requirements. Neural networks, due to their excellent nonlinear mapping capabilities and fast computing advantages, are increasingly being used to build transient stability assessment models in order to achieve fast and accurate stability judgments.

[0048] Therefore, the transient stability analysis model in this embodiment focuses on the transient stability analysis problem under the concept of stable domain, combines the encoder-decoder architecture and attention mechanism of the Transformer model, and constructs a neural network model for the analysis of transient stability of the power system.

[0049] It is understandable that an important application of neural network models is classification, and transient stability analysis is to determine whether a power system operation sample is stable, so this can be regarded as a binary classification problem.

[0050] In a possible embodiment, if Figure 2 As shown, Figure 2The overall structure of the transient stability analysis model based on the Transformer architecture, the encoder-decoder architecture and the multi-head self-attention mechanism based on the Transformer model are shown. This embodiment constructs a transient stability analysis model, which is also divided into two parts: an encoder and a decoder. The encoder part is a feature extractor, and its purpose is to extract and represent the input dynamic features of the power system and project them into a high-dimensional stable feature space, so as to strengthen the representation of features that are more closely related to the transient stability of the power system; the decoder part is a classifier implemented by a multi-layer perceptron, and its purpose is to transform each feature in the high-dimensional stable feature space through nonlinear transformation of multiple hidden layers and finally reach the output layer for binary classification operation, so as to obtain an evaluation of transient stability.

[0051] Specifically, the model input is where n is the dimension of the input feature and T is the length of the input feature. First, a linear embedding layer is used to transform the input into , Represents the dimension of the model vector. The main purpose of the linear embedding layer is to ensure that the model can perform standardized preprocessing on input data of various shapes and improve the application range of the model.

[0052] Although the multi-head attention mechanism in the Transformer model can extract the dependencies between the nodes of the input data, it cannot extract the absolute position or relative position relationship of the nodes of the time series data. If the order of keys and values ​​is disrupted, the obtained Attention result will not change, which is not conducive to obtaining information of time series data such as the input feature trajectory of the power system. Therefore, in order to solve the above problem, position encoding is added to retain the time series information. By numbering each position of the input feature, each number is represented by a vector, and the vector is added to the feature data at the corresponding position, the time series information is introduced.

[0053] The multi-head attention sublayer is a core component of the Transformer model, which allows the model to learn information in parallel in different representation subspaces, increasing the model's ability to process different types of information and improving the model's expressiveness.

[0054] The Position-wise Feed-Forward Networks (FFN) in the encoder layer is a sublayer that implements nonlinear activation and contains two fully connected layers and a ReLU activation function. The FFN layer can introduce nonlinearity through the ReLU activation function to enhance the nonlinear expression ability of the model, thereby helping the model learn complex data patterns.

[0055] In order to increase the expressiveness of the model, residual connections and layer normalization operations are performed after each sublayer. The role of residual connections is to solve the problem of network degradation and prevent problems such as gradient disappearance or gradient explosion. Layer normalization is to stabilize the network training process, unify the distribution of different features, and improve the generalization ability of the model.

[0056] A complete Transformer encoder is constructed by stacking n such encoder layers. The calculation formula is as follows: (1)

[0057] in, (·) represents a Transformer encoder with n encoder layers stacked, represents the input after the dimension is changed by the linear embedding layer, PE represents the position encoding, Represents the output of the Transformer encoder, and has .

[0058] A pooling layer is added after the output of the Transformer encoder. The purpose is to make the model pay more attention to the global information of the features through dimensionality reduction and facilitate the calculation of subsequent classifiers. Commonly used pooling methods include maximum pooling and average pooling. Here, average pooling is selected in the length dimension of the input.

[0059] The structure of the entire model encoder is as follows Figure 3 shown.

[0060] The encoder encodes the model's input and outputs it. The encoder can be expressed as follows: (2)

[0061] in Represents the input of the encoder, that is, the input of the entire model, Encoder(·) represents the encoder, represents the output of the encoder. And , .

[0062] The decoder of the model consists of a multi-layer perceptron with an MLP as the classifier. The features encoded by the encoder are transformed through multiple hidden layers of nonlinearity and finally reach the output layer for binary classification, thereby obtaining an assessment of transient stability.

[0063] In a possible embodiment, the structure of the decoder is as follows Figure 4 As shown, the input and output of each neuron in the MLP network satisfy the following relationship: (3)

[0064] in: are weights and biases respectively, is a non-linear activation function.

[0065] The MLP network has two hidden layers with dimensions of 128 and 64 respectively. The dimension of the input layer is the same as the dimension of the encoder output, which is The dimension of the output layer is 2, which is a binary classification result considering whether the output is transiently stable or not. Represents the probability of classification category 0, i.e. transient stability, represents the probability of classification category 1, i.e. transient instability, and .Pick and The larger one between is taken as the prediction result of transient stability, or it is determined according to the result of binary classification. In this case, there are: (4)

[0066] The entire decoder can be expressed as follows: (5)

[0067] in, represents the output of the decoder, Represents a decoder, Represents the input of the decoder, which is also the output of the encoder.

[0068] When training the transient stability analysis model, the supervised learning method is used, and the Adam (Adaptive Moment Estimation) optimization algorithm is applied to update the parameters of the neural network by back-propagating the error, thereby gradually reducing the error.

[0069] For all N samples of input , all the above operations are performed, which is regarded as a training step. Until the maximum number of training steps is reached or the loss function has dropped to a certain range, the model is considered to have completed training.

[0070] In some possible implementations of the present invention, the transient stability analysis model includes multiple Transformer architecture encoders and a decoder; The encoders of each Transformer architecture are used to extract features from the power system operation data grouped according to physical attributes to obtain feature vectors of each operation data; and feature concatenate the feature vectors; the encoders of each Transformer architecture are trained by a supervised contrastive learning algorithm; The decoder is used to process the feature vector after feature splicing and output the transient stability analysis result of the power system.

[0071] Specifically, this embodiment provides a specific implementation of a transient stability analysis model, which is based on a self-attention mechanism and an encoder-decoder architecture to build a transient stability analysis model; the model is optimized by building a multi-channel feature extraction framework and using a supervised contrastive learning method. The improved model has improved performance and stronger learning ability.

[0072] It is understandable that a neural network power system transient stability analysis model constructed by combining the encoder-decoder architecture and attention mechanism of the Transformer model, although the model shows good learning ability on the data set, still has the problem of overfitting, and the performance indicators such as the model's accuracy, false positive rate and missed positive rate still have a lot of room for improvement.

[0073] Therefore, this embodiment focuses on optimizing the architecture design and training method of the transient stability analysis model, in order to enhance the expression and generalization capabilities of the model, alleviate the overfitting phenomenon, and improve the model performance.

[0074] Specifically, this embodiment adopts multi-channel feature extraction, and the operating characteristics of the power system can be divided into multiple attributes according to physical properties. For example, the generator power angle, node voltage amplitude, and active transmission power of the line selected when constructing the data set in the previous embodiment. Different types of features have different impacts on the stability of the power system. Therefore, it is not perfect for the encoder constructed in this embodiment to use the same Transformer encoder to extract features from different types of input features. Here, a multi-channel feature extraction method is used to replace the method of using a single encoder for feature extraction in the model constructed in the previous embodiment. Considering the different impacts of different types of features, a Transformer encoder is constructed separately to perform feature extraction, thereby improving the learning efficiency of the model.

[0075] The mathematical description of the multi-channel feature extraction method is as follows: For a given set of power system characteristics , where the feature subset Represents the feature of the i-th type. There are M different types of feature subsets that constitute the feature set. The problem of transient stability analysis of power system based on neural network with multi-channel feature extraction can be expressed by the following formula: (6)

[0076] in, are M features that describe the characteristics of the power system, and they belong to feature subsets . It is the model's prediction of whether the system is transiently stable or not. Represents the feature extractor constructed for the i-th type of feature, Represents the parameters corresponding to the i-th feature extractor. It is a network that uses all the features extracted by the feature extractor to predict transient stability. The corresponding parameters are .

[0077] The structure comparison between the transient stability analysis model using multi-channel feature extraction and the original model is shown in Figure 2. Figure 5 As shown, Represents the feature vector obtained by projecting the i-th type of feature into a high-dimensional stable feature space. TransformerEncoder #i represents the Transformer encoder constructed for the i-th type of feature, i.e., the feature extractor.

[0078] During the training process, the output of each feature extractor A separate MLP is also used for training to enhance the semantic features of S that are strongly related to transient stability classification. The training process is as follows Figure 6 As shown in the figure, after each feature extractor is trained, the features extracted by different feature extractors are concatenated as the input of the model MLP to obtain the transient stability prediction results. The information obtained by different feature extractors forms a complementary relationship, which is conducive to reducing the complexity of model parameters and improving the learning efficiency of the model.

[0079] In a possible embodiment, supervised contrast loss is used to expand the number of positive pairs of sample i. Here, all samples with the same label information as sample i are considered as positive pairs. Therefore, the meaning of supervised contrast loss is that the distance between all samples belonging to the same class as sample i is as small as possible, and the distance between samples of different classes as large as possible.

[0080] Therefore, using supervised contrast loss in the training process of transient stability analysis model can shorten the distance between all stable samples and the distance between all unstable samples. In this way, stable samples and unstable samples will be separated as much as possible in the high-dimensional stable feature space, which is convenient for classification.

[0081] In the training process of supervised contrastive learning, the framework of pre-training-fine-tuning is used. First, the encoder is pre-trained. During the pre-training process, supervised contrast loss is used so that the stable samples and unstable samples in the high-dimensional stable feature space obtained by the encoder are separated as much as possible. Then the encoder that has been fully pre-trained is connected to the classifier and trained using the cross entropy loss function. At this time, the main body is the parameter training process of the classifier. At this time, the encoder only needs to be fine-tuned to cooperate with the classifier to obtain a good classification effect.

[0082] The training process using supervised contrastive learning is as follows Figure 7 As shown in Figure 8 shown.

[0083] On this basis, the transient stability preventive control problem can generally be transformed into the optimal power flow considering transient stability constraints (TSCOPF) problem for solution. The TSCOPF model can be described by the following formula:

[0084] (7)

[0085] Where: represents the objective function of the optimization problem; and They represent the state variables and algebraic variables of the power system respectively; and Indicates the initial value; and They represent the relevant equality constraints and inequality constraints that need to be satisfied for the operation of the power system; Represents the dynamic response process of the system; is the initial value constraint; Represents the relevant transient stability index.

[0086] In some possible implementations of the present invention, the step of calculating the sensitivity of each generator in the transient instability operation data by using an integrated gradient algorithm specifically includes: Select the transient stable operation point in the sample space where the difference between the initial active power of the generator and the transient instability sample point is the smallest as the reference point; Based on the reference point, calculating the integral value of the gradient between each of the transient instability sample points and the reference point; The integral value is used as the sensitivity of each generator in the transient instability operation data.

[0087] Specifically, this embodiment provides an implementation method for calculating the sensitivity of the active power of each generator in the transient instability sample data, by obtaining the reference point for integral gradient calculation in the sample space, and obtaining the sensitivity of the active power of each generator based on the integral value of the gradient between each sample point and the reference point.

[0088] Specifically, the interpretability of neural networks refers to understanding and describing how neural networks make decisions. For example, to perform transient stability preventive control and adjust the active output of generators, it is necessary to know the importance of the active output of generators.

[0089] Gradient attribution is a commonly used interpretability algorithm. Neural networks can calculate gradients using the following formula: (8)

[0090] However, using the above method is equivalent to solving only the derivative value of a certain point. However, for a nonlinear function such as a neural network, the gradient value of a point cannot represent the impact of the overall input on the output. Therefore, the direct gradient method shown in formula (7) has certain shortcomings.

[0091] Different from traditional gradient methods, integrated gradient solves the problem of possible saturation or vanishing of gradient by integrating the gradient between the input feature and a reference point.

[0092] In some possible implementations of the present invention, the formula for calculating the integral value of the gradient between each of the sample points and the reference point is: (9)

[0093] in, represents the reference point sample; Represents the current input state of the neural network; Indicates from arrive A path where , ; Represents a neural network model; No. Input features; Represents the total number of input features; Indicates the path right The derivative of Represents a neural network model exist Input gradient.

[0094] Specifically, this embodiment provides an implementation method for calculating the integral value of the gradient between the sample point and the reference point. By solving the integral value of the gradient between the input and the reference point, the overall impact of the input on the output is obtained.

[0095] The above formula obtains the overall impact of the input on the output by solving the integral value of the gradient between the input and the reference point, and the absolute value of each component represents the importance of the input component on the output, as shown in formula (10): (10)

[0096] in, Indicates the Integrated gradient of the input feature.

[0097] In some possible implementations of the present invention, the step of determining an adjustment strategy for the initial active power of each of the generators based on the sensitivity specifically includes: Sort the generators in descending order of the absolute value of sensitivity; Select multiple engines with larger absolute values ​​as control engines, and select multiple engines with smaller absolute values ​​as balance engines; Determine the adjustment amount of the initial active power of each of the control engines and each of the balancing engines according to the sensitivity calculated by the integral gradient and the upper and lower limits of the output of the generator; Adjusting each of the control engines and each of the balancing engines according to each of the adjustment amounts to obtain a new active output of the generator; The active output of the new generator is verified. If the verification fails, the adjustment amounts are updated and then the verification is repeated until the verification passes, thereby obtaining the final adjustment amount.

[0098] Specifically, this embodiment provides an implementation method for determining the active power adjustment strategy of each generator, by sorting the generators according to sensitivity, and then selecting generators that implement the control function and generators that implement the balancing function according to the size of the sensitivity, and determining the final active power adjustment amount based on the verification results of the active output of the adjusted generator.

[0099] Regarding the calculation of sensitivity, the influence of the initial active power of the generator on the system stability can be specifically defined as the integral gradient value of the initial active power of the generator, that is, the sensitivity index of the active power of each generator.

[0100] Specifically, for a transient instability sample operation point, it is necessary to find a reference point in the generated sample space to calculate the integral gradient. The reference point needs to select a transient stable operation point in the sample space where the difference between the initial active power of the generator and the sample point is the smallest. This embodiment considers defining the Euclidean distance as a quantitative indicator of the difference between the two, and then solving the sensitivity of the active power of each generator by the integral gradient algorithm.

[0101] For the control generator selection, the control variable can be determined according to the sensitivity calculated by the integral gradient algorithm. Some generators with larger absolute values ​​of sensitivity are selected as control objects. The corresponding active output changes of these generators are more effective in improving the system stability. The generators are sorted according to the sensitivity, and the first generator is selected first. If the sensitivity is invalid, the second generator is changed, and so on.

[0102] Furthermore, for the selection of balanced generators, in order to maintain power balance, when the active power of the controlled generator changes, the active power of other generators should be adjusted in the opposite direction. These generators are called balanced generators. The selection of balanced generators is also determined by the sensitivity of the transient stability evaluation index. Generators with very small absolute values ​​of sensitivity are insensitive to stability and are therefore selected as balanced generators.

[0103] In a possible embodiment, if Fig. 9 As shown, Fig. 9 The overall flow diagram of the preventive control provided for the embodiment of the present invention first considers the transient stability of the input samples under the expected faults. For the operating points that are transiently unstable after the fault scan, the sensitivity is calculated by the integral gradient algorithm to obtain the target selection of the control generator and the balancing generator. Then, the adjustment amount of the active output of each generator is determined according to the sensitivity calculated by the integral gradient and the upper and lower limits of the generator output. After the new active output of the generator is obtained, the PSOPS simulation tool is connected to perform simulation verification on the adjusted method, including power flow verification and stability verification. For non-convergent power flows, the adjustment amount needs to be changed. After passing the power flow verification, a stability verification is performed. If the stability verification fails, the adjustment amount needs to be increased and recalculated. Until the transient stability preventive control strategy finally obtained has passed the power flow verification and stability verification.

[0104] On the basis of the above embodiments, the effect of the transient stability prevention control method based on the agent model provided by the present invention is further verified in combination with specific example tests and analysis processes.

[0105] In a possible embodiment, for the construction of a transient stability analysis model data set, the open source Py-PSOPS simulation tool is used as a simulation program to generate samples required for model training on an IEEE-39 standard test system. The Py-PSOPS simulation tool is a power system transient simulator that can solve power flows through the Newton-Raphson method and perform transient simulation using the implicit gradient method. The sample generation function is applied to generate samples. Consider the initial topology changes, including the original topology, N-1 and N-2 topologies. The device state is randomly sampled under normal operating conditions, that is, sampling is performed within the upper and lower limits of active and reactive loads, node voltages, and active power generation. The expected fault is a three-phase short circuit fault, and the fault clearing time is randomly selected between 0.08s and 0.20s. The model input curve is a disturbed curve with a length of 0.15s from the occurrence of the fault to the removal, and the length of each curve is 31. The input curves include 5 comprehensive analysis curves, 10 generator power angle curves, 39 node voltage curves and 34 transmission line active power curves, a total of 88. In this way, a data set with strong uncertainty for learning is obtained, which takes into account topological changes, power flow distribution changes, fault location changes and fault duration changes. Initially, 10,000 sets of transient simulation results were generated, of which 5,000 sets simulated transient stability and 5,000 sets simulated transient instability. 80% was used as a training set and 20% as a test set. In subsequent experiments, a data set with a sample size of 80w was used for training and testing, of which 60w sets simulated transient stability and 20w sets simulated transient instability, in order to further improve the performance of the model.

[0106] The power angle curve, voltage curve and active power curve of one sample x are as follows: Fig.10 , 11 , as shown in 12.

[0107] Furthermore, in terms of stability criterion and marking, this embodiment selects the generator power angle based on The transient stability index (TSI) describes the stability of the system. As a criterion for the stability of the system, the index is defined as follows: (11)

[0108] Where: is the maximum power angle difference between any two generators. When , the system is transiently stable; otherwise, the system is unstable. In this paper, in order to ensure a certain transient stability margin, it is determined When , that is, the maximum power angle difference between any two generators is less than 180°, the system is transiently stable.

[0109] When constructing the data set, the power angle curves of each generator in the system are obtained through simulation, and the The value of the indicator, for The sample is labeled as 0, which means it is a transient stable sample. The sample is labeled as 1, which means transient instability.

[0110] On this basis, the supervised contrast algorithm is used to train the transient stability analysis model based on the Transformer architecture. A data set of 800,000 samples is used. After data enhancement, the data set sample size increases to 4 million. Among them, the clip length is 21, the mask rate is 0.5, the translation is 5, and the noise ratio is 0.1. During pre-training, the training step size is 50, the initial learning rate is 0.001, and the fixed step learning rate decay strategy is adopted. The learning rate is multiplied by the decay factor of 0.9 every 5 training steps. In the fine-tuning stage, the training step size epoch is 100, each batch contains 128 samples, the initial learning rate is 0.00008, and the fixed step learning rate decay strategy is adopted. The learning rate is multiplied by the decay factor of 0.9 every 10 training steps. Other hyperparameters are not modified.

[0111] After adopting the multi-channel feature extraction and supervised contrastive learning method, the loss function of the improved model on the training set and the test set during the training process changes as follows: Fig.13 shown.

[0112] From the change of loss function, after 100 training steps, the model loss on both the training set and the test set decreased and converged to a certain range, which shows that the model has been fully trained. And the overfitting phenomenon of the model on the test set has been well alleviated. This shows that the generalization ability of the model has been greatly improved after adopting the method of multi-channel feature extraction and supervised contrastive learning.

[0113] The confusion matrix and performance indicators of the improved model after full training are shown in Table 1. It can be seen that the model has better performance in terms of accuracy, false positive rate and missed positive rate than the original model, which shows that the performance of the model has been greatly improved after adopting the method of multi-channel feature extraction and supervised contrastive learning.

[0114] Table 1

[0115] This embodiment focuses on optimizing the architecture design and training method of the transient stability analysis model. By constructing a multi-channel feature extraction framework and optimizing the model by using a supervised comparative learning method, the performance of the improved model is improved and the learning ability is stronger.

[0116] In a possible embodiment, for the construction of a transient stability prevention control data set, this embodiment also uses the open source Py-PSOPS simulation tool as a simulation program to generate samples required for model training on the IEEE-39 standard test system. A three-phase short-circuit fault is added to bus No. 12 of the system, and the fault clearing time is selected as 0.10s. The model input curve is a disturbed curve with a length of 0.15s from the occurrence of the fault to the removal, and the length of each curve is 31. The types of input curves include transmission line active power, node voltage amplitude, generator rotor angle, generator active power and comprehensive analysis curves. These five trajectories contain 34, 39, 10, 10 and 5 curves respectively, for a total of 98 curves. Initially, 5000 sets of transient simulation results were generated, of which 2500 sets simulated transient stability and 2500 sets simulated transient instability.

[0117] On this basis, the improved transient stability analysis model is trained for the constructed data set. After solving the integral gradient, preventive control adjustment is performed to adjust the active power of the generator. Two unstable samples are selected to demonstrate the preventive control adjustment strategy. The power angle curve of one unstable sample i1 is as follows: Fig.14 As shown, Fig.14 The power angle curve of the transient instability sample data i1 before adjustment provided by the embodiment of the present invention is as follows: Fig.14 It can be seen that sample i1 is a typical transient instability sample.

[0118] Furthermore, the calculated initial active power and adjustment amount of each generator sensitivity are shown in Table 2: Table 2

[0119] As shown in Table 2, the sensitivity of the transient instability sample is solved under the expected fault. According to the sensitivity, it is very intuitive to see which generators should be adjusted first. After 4 iterations, the following preventive control strategy can be obtained: the active output of generator 8 is increased by 0.38pu, and the active output of generator 9 is reduced by 0.24pu. The corresponding balancing generator 7 is reduced by 0.38pu, and the balancing generator 2 is increased by 0.24pu.

[0120] The transient simulation of the sample after the preventive control strategy is generated, and the power angle curve under the expected fault is obtained as follows: Fig.15 As shown in the figure, after the power flow and transient stability verification, the adjusted system can maintain transient stability under the expected faults, proving that the preventive control strategy is effective.

[0121] The power angle curve before adjustment, the power angle curve after adjustment and the preventive control strategy of the unstable sample i2 are as follows: Fig.16 , Fig.17And Table 3 can be seen.

[0122] Table 3

[0123] This embodiment adopts a direct solution method to solve the transient stability preventive control problem of the power system, applies the integral gradient algorithm to the transient stability analysis model, calculates the sensitivity of the model stability judgment output to the active power of the generator, selects the control generator and the balance generator according to the sensitivity ranking, and calculates the active power adjustment amount. Finally, the transient stability verification is performed through simulation to complete the generation of the preventive control strategy.

[0124] The transient stability preventive control device based on the agent model provided by the present invention is described below. The transient stability preventive control device based on the agent model described below and the transient stability preventive control method based on the agent model described above can be referred to each other.

[0125] In some specific embodiments of the present invention, a transient stability preventive control device based on an agent model is provided, the device comprising: The analysis module 1801 is used to input multiple operation data of the power system into a pre-built transient stability analysis model to obtain transient stability analysis results of each operation data output by the transient stability analysis model, wherein each operation data includes the initial active power of the generator; A sensitivity calculation module 1802 is used to determine transient instability operation data according to the transient stability analysis result, and calculate the sensitivity of each generator in the transient instability operation data by an integral gradient algorithm; The adjustment module 1803 is used to determine an adjustment strategy for the initial active power of each generator based on the sensitivity.

[0126] The transient stability prevention control device provided in the embodiment of the present invention has similar implementation principles and beneficial effects to the implementation principles and beneficial effects of the transient stability prevention control method shown in the above embodiment. Please refer to the implementation principles and beneficial effects of the transient stability prevention control method shown in the above embodiment, and no further details will be given here.

[0127] Fig.19 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.19As shown, the electronic device may include: a processor 1910, a communication interface 1920, a memory 1930 and a communication bus 1940, wherein the processor 1910, the communication interface 1920 and the memory 1930 communicate with each other through the communication bus 1940. The processor 1910 may call the logic instructions in the memory 1930 to execute the transient stability prevention control method based on the agent model, the method comprising: inputting a plurality of operation data of the power system into a pre-built transient stability analysis model, obtaining a transient stability analysis result of each operation data output by the transient stability analysis model, wherein each of the operation data includes the initial active power of the generator; determining transient instability operation data according to the transient stability analysis result, calculating the sensitivity of each generator in the transient instability operation data by an integral gradient algorithm; and determining an adjustment strategy for the initial active power of each generator based on the sensitivity.

[0128] In addition, the logic instructions in the above-mentioned memory 1930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0129] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transient computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the transient stability prevention and control method based on the agent model provided by the above-mentioned methods. The method includes: inputting multiple operating data of the power system into a pre-built transient stability analysis model to obtain a transient stability analysis result of each operating data output by the transient stability analysis model, wherein each of the operating data includes the initial active power of the generator; determining transient instability operating data based on the transient stability analysis result, and calculating the sensitivity of each generator in the transient instability operating data by an integral gradient algorithm; and determining an adjustment strategy for the initial active power of each generator based on the sensitivity.

[0130] On the other hand, the present invention also provides a non-transient computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the transient stability prevention and control method based on the agent model provided by the above-mentioned methods, the method comprising: inputting multiple operating data of the power system into a pre-built transient stability analysis model, and obtaining transient stability analysis results of each operating data output by the transient stability analysis model, wherein each of the operating data includes the initial active power of the generator; determining transient instability operating data based on the transient stability analysis results, and calculating the sensitivity of each generator in the transient instability operating data by an integral gradient algorithm; and determining an adjustment strategy for the initial active power of each generator based on the sensitivity.

[0131] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A transient stability preventive control method based on an agent model, characterized in that: include: Inputting a plurality of operation data of the power system into a pre-built transient stability analysis model to obtain a transient stability analysis result of each operation data output by the transient stability analysis model, wherein each operation data includes an initial active power of a generator; Determine transient instability operation data according to the transient stability analysis result, and calculate the sensitivity of each generator in the transient instability operation data by using an integral gradient algorithm; Based on the sensitivity, an adjustment strategy for the initial active power of each of the generators is determined.

2. The transient stability preventive control method based on agent model according to claim 1 is characterized in that: The transient stability analysis model is obtained by training a deep learning neural network of a Transformer architecture based on sample data with transient stability and sample data with transient instability.

3. The transient stability preventive control method based on agent model according to claim 2 is characterized in that: The transient stability analysis model includes multiple Transformer architecture encoders and a decoder; The encoders of each Transformer architecture are used to extract features from the power system operation data grouped according to physical attributes to obtain feature vectors of each operation data; and perform feature splicing on the feature vectors; The encoder of each Transformer architecture is trained by a supervised contrastive learning algorithm; The decoder is used to process the feature vector after feature splicing and output the transient stability analysis result of the power system.

4. The transient stability preventive control method based on agent model according to claim 3 is characterized in that: The step of calculating the sensitivity of each generator in the transient instability operation data by using an integrated gradient algorithm specifically includes: Select the transient stable operation point in the sample space where the difference between the initial active power of the generator and the transient instability sample point is the smallest as the reference point; Based on the reference point, calculating the integral value of the gradient between each of the transient instability sample points and the reference point; The integral value is used as the sensitivity of each generator in the transient instability operation data.

5. The transient stability preventive control method based on agent model according to claim 4 is characterized in that: The formula for calculating the integral value of the gradient between each sample point and the reference point is: ; in, represents the reference point sample; Represents the current input state of the neural network; Indicates from arrive A path where , ; Represents a neural network model; Indicates Input features; Represents the total number of input features; Indicates the path right The derivative of Represents a neural network model exist Input gradient.

6. The transient stability preventive control method based on agent model according to any one of claims 1 to 5, characterized in that: The step of determining an adjustment strategy for the initial active power of each of the generators based on the sensitivity specifically includes: Sort the generators in descending order of the absolute value of sensitivity; Select multiple engines with larger absolute values ​​as control engines, and select multiple engines with smaller absolute values ​​as balance engines; Determine the adjustment amount of the initial active power of each of the control engines and each of the balancing engines according to the sensitivity calculated by the integral gradient and the upper and lower limits of the output of the generator; Adjusting each of the control engines and each of the balancing engines according to each of the adjustment amounts to obtain a new active output of the generator; The active output of the new generator is verified. If the verification fails, the adjustment amounts are updated and then the verification is repeated until the verification passes, thereby obtaining the final adjustment amount.

7. A transient stability preventive control device based on an agent model, characterized in that: include: An analysis module, used for inputting a plurality of operation data of the power system into a pre-built transient stability analysis model, and obtaining transient stability analysis results of each operation data output by the transient stability analysis model, wherein each of the operation data includes an initial active power of a generator; A sensitivity calculation module, used to determine transient instability operation data according to the transient stability analysis result, and calculate the sensitivity of each generator in the transient instability operation data by an integral gradient algorithm; An adjustment module is used to determine an adjustment strategy for the initial active power of each of the generators based on the sensitivity.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the transient stability preventive control method based on the agent model as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the transient stability preventive control method based on an agent model as claimed in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the transient stability preventive control method based on an agent model as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Active power correction control method based on quasi-steady-state sensitivity analysis

    CN108270248A

  • Photovoltaic power station performance monitoring and analyzing method

    CN118032124A

Cited By

  • Electric power system transient stability state and stability margin evaluation method, device and equipment based on Grapher multi-task learning and medium

    CN121093874A