Dominant instability mode sample enhancement and improvement CWGAN method considering diversity and transient curve global features

By introducing improved CWGAN method of diversity and global characteristics of transient curves in the power system, combining self-attention mechanism and gradient penalty terms, high-quality DIM samples are generated, and the imbalance of transient DIM sample generation in the power system is solved. , improves identification accuracy and reliability.

CN119202702APending Publication Date: 2024-12-27STATE GRID CHONGQING ELECTRIC POWER CO ELECTRIC POWER RES INST +3
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410911401.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The prior art transient DIM sample generation method in power systems cannot fully capture the coupling relationship between the voltage/power angle curve, and there is a risk of pattern collapse, resulting in insufficient identification accuracy and reliability.

Method used

A method of improving CWGAN that takes into account the global characteristics of diversity and transient curves is proposed. By obtaining the key curve vectors of the DIM dataset, a generative adversarial network model is built and optimized, and a self-attention mechanism and gradient penalty term are introduced. , generate high-quality DIM samples, and build an identification model based on two-dimensional convolutional neural network.

Benefits of technology

Effectively solve the problem of DIM sample imbalance, the generated samples have higher diversity and quality, significantly improve the identification accuracy of transient mixing instability of the power system, reduce sample labeling costs, and adapt to the uncertainty of the new power system. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202702A_ABST
    Figure CN119202702A_ABST
Patent Text Reader

Abstract

The invention discloses a dominant instability mode sample enhancement and improvement CWGAN method considering diversity and transient curve global features, and the method comprises the following steps: 1) building a DIM enhancement and improvement CWGAN model considering diversity and transient curve global features, and carrying out the optimization of the DIM enhancement and improvement CWGAN model; 2) utilizing the optimized DIM to enhance the improved CWGAN model to generate a DIM sample Xgen; 3) training a DIM identification model by using the DIM data set key curve vector and the DIM sample Xgen; and 4) obtaining to-be-identified DIM data, inputting the to-be-identified DIM data into the DIM identification model, and identifying the operation state of the power system. According to the method, by capturing the key voltage / power angle curve global features and the time sequence long-distance dependency relationship, it is ensured that the generated DIM samples can better reflect the characteristics of a real system, and the requirements of DIM recognition for sample quality and diversity are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power systems, and in particular to a method for enhancing a dominant instability mode sample by considering diversity and global characteristics of transient curves. The method provides a conditional wasserstein generative adversarial network (CWGAN). Background Art

[0002] With the construction of new power systems and the access of a high proportion of new energy sources, the uncertainty factors in the operation status of power systems have increased significantly, and stability issues such as voltage, power angle and frequency have become increasingly prominent.

[0003] DIM (Dominant Instability Mode) identification based on transient stability simulation data can determine the preventive control plan in advance, ensuring that the corresponding control measures can be implemented in a timely and effective manner when a power system failure occurs. Current research usually assumes that the DIM identification basic model can learn enough transient DIM samples from the training set. However, due to the robustness of the power system and the efficiency of relay protection devices, the actual power grid can generally return to normal operation after a large disturbance. Therefore, the samples that can be used for data-driven DIM identification methods are very limited.

[0004] To address the DIM sample imbalance problem, explorations have been conducted from both the algorithm and data levels. At the algorithm level, although ensemble learning and cost-sensitive methods have been proposed, their generalization capabilities are insufficient and they are difficult to adapt to the complex and changing power grid environment; at the data level, traditional oversampling or undersampling methods are prone to information loss or overfitting.

[0005] Although the sample generation method based on generative adversarial network (GAN) has improved the scalability of sample generation to some extent, the uncontrollability of generated samples is still a problem: the existing GAN-based sample enhancement method cannot fully capture the coupling relationship of the voltage / power angle curve, and there is a risk of mode collapse when generating DIM samples.

[0006] Therefore, there is an urgent need for more effective methods to enhance power system transient DIM samples to improve the accuracy and reliability of DIM identification. Summary of the invention

[0007] The purpose of the present invention is to provide a dominant instability mode sample enhancement improved CWGAN method considering diversity and global characteristics of transient curves, comprising the following steps:

[0008] Obtain a data-driven dominant instability mode DIM data set and extract key curve vectors of the DIM data set; the DIM data set at least includes transient voltage, power angle curves, and power system operation status labels;

[0009] Build a DIM-enhanced improved generative adversarial network (CWGAN) model that considers diversity and global characteristics of transient curves, and optimize the DIM-enhanced improved CWGAN model;

[0010] Generate DIM samples X using the optimized DIM enhancement to improve the CWGAN model gen ;

[0011] Using the DIM dataset key curve vector and DIM sample X gen Construct a DIM recognition model;

[0012] Obtain the DIM data to be identified and input it into the DIM identification model to identify the operating status of the power system;

[0013] DIM enhancement improves the objective function of CWGAN model As shown below:

[0014]

[0015] Where P r represents the data distribution of the real DIM sample; x represents the sample; P g Indicates the generated sample The data distribution of ; D(x|y) represents the discriminator output; λ is the gradient penalty coefficient, It is along P r and P g The straight line sampling data between . represents expectation. ▽ represents gradient; Represents straight line sampling data Data distribution; Indicates When is the input, the output of the discriminator.

[0016] Furthermore, the DIM dataset includes N samples, where the jth sample x ori,j =[x in,j ,y j ]; x in,j ,y j Indicates input characteristics and power system operation status labels; power system operation status includes stability, voltage-dominated instability, and power angle-dominated instability;

[0017] Input feature x in,j As shown below:

[0018] x in,j=[U1,...,U B ; δ1,...,δ M ] (2)

[0019] Where U i , δ i They are the i-th transient voltage and power angle curves respectively; B represents the number of bus voltage curves; M represents the number of generator power angle curves.

[0020] Furthermore, the method of extracting the key curve of the DIM data set includes a key curve selection strategy based on K-means;

[0021] The extracted key curves of the DIM data set are shown below:

[0022] X=[x1,…,x N ]=[U rank ,δ rank ] (3)

[0023] Among them, U rank , δ rank are the key transient voltage and power angle curve sets obtained by the key curve selection strategy based on K-means; X is the key curve vector of the DIM data set; x1, x N These are the 1st and Nth DIM data set key curves.

[0024] Furthermore, the linear sampling data As shown below:

[0025]

[0026] In the formula, ε represents the parameter that satisfies the uniform distribution U. x represents the sample; P r represents the data distribution of the real DIM sample; P g Indicates the generated sample data distribution.

[0027] Furthermore, the DIM enhanced improved CWGAN model introduces a self-attention mechanism;

[0028] The operation process of the self-attention mechanism is as follows:

[0029] Through different linear transformations, the data features output by the previous hidden layer are transformed Transform to two different feature spaces f(χ), g(χ), namely:

[0030] f(χ)=W f χ (5)

[0031] g(χ)=W g χ (6)

[0032] In the formula, is a learnable weight matrix; is the number of channels; C is the number of channels of data feature χ; k is a constant;

[0033] Calculate the attention score s between all positions in the feature space ij ,Right now:

[0034] s ij =f(χ i ) T g(χ j ) (7)

[0035] In the formula, f(χ i )、g(χ j ) is the data feature χ i The feature space of

[0036] Score the attention ij Converted into attention weight β ji ,Right now:

[0037]

[0038] Where N is the number of data features;

[0039] According to the attention weight, the data feature χ is weighted and summed to obtain the output feature o j ,Right now:

[0040]

[0041] Among them, h(χ i )=W h χ i is the data feature χ i Linear transformation, W h is the weight matrix.

[0042] Update the generated feature y i ,Right now:

[0043] y i =αo i +χ i (10)

[0044] Among them, α is a learnable parameter.

[0045] Furthermore, when optimizing the DIM enhanced CWGAN model, the loss function used is as follows:

[0046]

[0047] Where λ is the gradient penalty coefficient, It is along P r and P g The straight line between them samples the data. L(G) and L(D) are the loss functions of the generator G and the discriminator D.

[0048] Further, the DIM recognition model is a DIM recognition model based on a two-dimensional convolutional neural network;

[0049] The two-dimensional convolutional neural network includes a convolution layer, a pooling layer, a flattening layer and a fully connected layer.

[0050] The system for improving the CWGAN method based on the dominant unstable mode sample enhancement considering diversity and global characteristics of transient curves includes:

[0051] Data acquisition unit: acquires the DIM data set and extracts the key curve vector of the DIM data set; the DIM data set at least includes transient voltage, power angle curve, and power system operation status label;

[0052] Model building unit: build and optimize the DIM enhanced improved CWGAN model considering diversity and global characteristics of transient curves;

[0053] DIM sample generation unit: Generate DIM samples X using the optimized DIM enhancement improved CWGAN model gen ;

[0054] DIM recognition model building unit: using DIM dataset key curve vector and DIM sample X gen Construct a DIM recognition model;

[0055] Power system operation status identification unit: obtains the DIM data to be identified and inputs it into the DIM identification model to identify the power system operation status;

[0056] DIM enhancement improves the objective function of CWGAN model As shown below:

[0057]

[0058] Where P r represents the data distribution of the real DIM sample; x represents the sample; P g Indicates the generated sample The data distribution of ; D(x|y) represents the discriminator output; λ is the gradient penalty coefficient, It is along P r and P g The straight line sampling data between .

[0059] An electronic device comprises: a memory, a processor and a data bus, wherein the memory stores all machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the data bus, and the method described in the process of executing the machine-readable instructions when the processor is running.

[0060] A computer-readable storage medium stores a computer program, which is executed by a processor to execute the method.

[0061] The technical effect of the present invention is undoubted, and the beneficial effects of the present invention are as follows:

[0062] 1) The present invention uses the key transient voltage / power angle curves as input features at the same time, and can generate DIM samples with specified labels to solve the problem of unbalanced DIM samples.

[0063] 2) The present invention ensures the diversity and quality of generated DIM samples by constraining the discriminator to limit its variation range and calculating the correlation between each position of the key curve and other positions.

[0064] 3) The present invention solves the problem of DIM sample imbalance in different power systems by injecting a small number of labeled topology change samples, significantly reduces the sample annotation cost, effectively supports the intelligent analysis of transient hybrid instability in power systems, and better copes with the uncertainty challenges of new power systems.

[0065] In summary, the present invention ensures that the generated DIM samples can better reflect the characteristics of the real system and meet the requirements of DIM identification on sample quality and diversity by capturing the global characteristics of key voltage / power angle curves and long-distance timing dependencies. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 Flowchart for the strategy selection of key transient voltage curves based on K-means;

[0067] Figure 2 This is the CGAN structure diagram;

[0068] Figure 3 This is the module structure diagram of the self-attention mechanism;

[0069] Figure 4 Block diagram of the DIM-enhanced improved CWGAN method considering diversity and global characteristics of transient curves;

[0070] Figure 5 It is a DIM recognition model based on 2D-CNN;

[0071] Figure 6 It is a DIM recognition model based on MultiRocket;

[0072] Figure 7 A DIM recognition framework based on sample enhancement to improve the CWGAN method. DETAILED DESCRIPTION

[0073] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.

[0074] Embodiment 1:

[0075] join Figures 1 to 7 , the dominant instability mode sample enhancement improved CWGAN method considering diversity and global characteristics of transient curves includes the following steps:

[0076] Obtain a data-driven dominant instability mode DIM data set and extract key curve vectors of the DIM data set; the DIM data set at least includes transient voltage, power angle curves, and power system operation status labels;

[0077] Build a DIM-enhanced improved generative adversarial network (CWGAN) model that considers diversity and global characteristics of transient curves, and optimize the DIM-enhanced improved CWGAN model;

[0078] Generate DIM samples X using the optimized DIM enhancement to improve the CWGAN model gen ;

[0079] Using the DIM dataset key curve vector and DIM sample X gen Construct a DIM recognition model;

[0080] Obtain the DIM data to be identified and input it into the DIM identification model to identify the operating status of the power system;

[0081] DIM enhancement improves the objective function of CWGAN model As shown below:

[0082]

[0083] Where P r represents the data distribution of the real DIM sample; x represents the sample; P g Indicates the generated sample The data distribution of ; D(x|y) represents the discriminator output; λ is the gradient penalty coefficient, It is along P r and P g The straight line sampling data between . Express expectations. represents the gradient; Represents straight line sampling data Data distribution; Indicates When is the input, the output of the discriminator.

[0084] The DIM dataset consists of N samples, where the jth sample x ori,j =[x in ,j,y j ]; x in,j ,y j Indicates input characteristics and power system operation status labels; power system operation status includes stability, voltage-dominated instability, and power angle-dominated instability;

[0085] Input feature x in,j As shown below:

[0086] x in,j =[U1,...,U B ; δ1,...,δ M ] (2)

[0087] Where U i , δ i They are the i-th transient voltage and power angle curves respectively; B represents the number of bus voltage curves; M represents the number of generator power angle curves.

[0088] The methods for extracting key curves of DIM dataset include key curve selection strategy based on K-means;

[0089] The extracted key curves of the DIM data set are shown below:

[0090] X=[x1,…,x N ]=[U rank ,δ rank ] (3)

[0091] Among them, U rank , δ rank are the key transient voltage and power angle curve sets obtained by the key curve selection strategy based on K-means; X is the key curve vector of the DIM data set; x1, x N These are the 1st and Nth DIM data set key curves.

[0092] Linear sampling data As shown below:

[0093]

[0094] In the formula, ε represents the parameter that satisfies the uniform distribution U. x represents the sample; Pr represents the data distribution of the real DIM sample; P g Indicates the generated sample data distribution.

[0095] The DIM enhanced improved CWGAN model introduces a self-attention mechanism;

[0096] The operation process of the self-attention mechanism is as follows:

[0097] Through different linear transformations, the data features output by the previous hidden layer are transformed Transform to two different feature spaces f(χ), g(χ), namely:

[0098] f(χ)=W f χ (5)

[0099] g(χ)=W g χ (6)

[0100] In the formula, is a learnable weight matrix; is the number of channels; C is the number of channels of data feature χ; k is a constant;

[0101] Calculate the attention score s between all positions in the feature space ij ,Right now:

[0102] s ij =f(χ i ) T g(χ j ) (7)

[0103] In the formula, f(χ i )、g(χ j ) is the data feature χ i The feature space of

[0104] Score the attention ij Converted into attention weight β ji ,Right now:

[0105]

[0106] Where N is the number of data features;

[0107] According to the attention weight, the data feature χ is weighted and summed to obtain the output feature o j ,Right now:

[0108]

[0109] Among them, h(χ i )=W h χi is the data feature χ i Linear transformation, W h is the weight matrix.

[0110] Update the generated feature y i ,Right now:

[0111] y i =αo i +χ i (10)

[0112] Among them, α is a learnable parameter.

[0113] When optimizing the DIM enhanced CWGAN model, the loss function used is as follows:

[0114]

[0115] Where λ is the gradient penalty coefficient, It is along P r and P g The straight line between them samples the data. L(G) and L(D) are the loss functions of the generator G and the discriminator D.

[0116] The DIM recognition model is a DIM recognition model based on a two-dimensional convolutional neural network;

[0117] The two-dimensional convolutional neural network includes a convolution layer, a pooling layer, a flattening layer and a fully connected layer.

[0118] The system for improving the CWGAN method based on the dominant unstable mode sample enhancement considering diversity and global characteristics of transient curves includes:

[0119] Data acquisition unit: acquires the DIM data set and extracts the key curve vector of the DIM data set; the DIM data set at least includes transient voltage, power angle curve, and power system operation status label;

[0120] Model building unit: build and optimize the DIM enhanced improved CWGAN model considering diversity and global characteristics of transient curves;

[0121] DIM sample generation unit: Generate DIM samples X using the optimized DIM enhancement improved CWGAN model gen ;

[0122] DIM recognition model building unit: using DIM dataset key curve vector and DIM sample X gen Construct a DIM recognition model;

[0123] Power system operation status identification unit: obtains the DIM data to be identified and inputs it into the DIM identification model to identify the power system operation status;

[0124] DIM enhancement improves the objective function of CWGAN model As shown below:

[0125]

[0126] Where P r represents the data distribution of the real DIM sample; x represents the sample; P g Indicates the generated sample The data distribution of ; D(x|y) represents the discriminator output; λ is the gradient penalty coefficient, It is along P r and P g The straight line sampling data between .

[0127] Embodiment 2:

[0128] The improved CWGAN method by enhancing the dominant unstable mode samples considering diversity and global characteristics of transient curves includes the following steps:

[0129] 1) Obtain the DIM data set and extract the key curve vector of the DIM data set;

[0130] 2) Build a DIM-enhanced CWGAN model that considers diversity and global characteristics of transient curves, and optimize the DIM-enhanced CWGAN model;

[0131] 3) Generate DIM sample X using the optimized DIM enhancement to improve the CWGAN model gen ;

[0132] 4) Using the DIM dataset key curve vector and DIM sample X gen Construct a DIM recognition model;

[0133] 5) Obtain the DIM data to be identified and input it into the DIM identification model to identify the operating status of the power system.

[0134] Embodiment 3:

[0135] The dominant instability mode sample enhancement improved CWGAN method considering diversity and global characteristics of transient curves has the same technical content as embodiment 2. Furthermore, the DIM data set includes N samples, where the jth sample x ori,j =[x in,j ,y j ]; x in,j ,y jIndicates input characteristics and power system operation status labels; power system operation status includes stability, voltage-dominated instability, and power angle-dominated instability;

[0136] Input feature x in,j As shown below:

[0137] x in,j =[U1,...,U B ; δ1,...,δ M ] (1)

[0138] Where U i , δ i They are the i-th transient voltage and power angle curves respectively; B represents the number of bus voltage curves; M represents the number of generator power angle curves.

[0139] Embodiment 4:

[0140] The dominant instability mode sample enhancement improved CWGAN method considering diversity and global characteristics of transient curves, the technical content is the same as any one of embodiments 2-3, and further, the method for extracting key curves of the DIM data set includes a key curve selection strategy based on K-means;

[0141] The extracted key curves of the DIM data set are shown below:

[0142] X=[x1,…,x N ]=[U rank ,δ rank ] (2)

[0143] Among them, U rank , δ rank are the key transient voltage and power angle curve sets obtained by the key curve selection strategy based on K-means; X is the key curve vector of the DIM data set; x1, x N These are the 1st and Nth DIM data set key curves.

[0144] Embodiment 5:

[0145] The dominant instability mode sample enhancement and improved CWGAN method considering diversity and global characteristics of transient curves has the same technical content as any one of embodiments 2-4. Further, the objective function of the DIM enhanced improved CWGAN model As shown below:

[0146]

[0147] Where P r represents the data distribution of the real DIM sample; x represents the sample; P g Indicates the generated sample The data distribution of ; D(x|y) represents the discriminator output; λ is the gradient penalty coefficient, It is along P r and P g The straight line sampling data between

[0148] Among them, the straight line sampling data As shown below:

[0149]

[0150] Where ε represents the parameter that satisfies the uniform distribution U.

[0151] Embodiment 6:

[0152] The dominant instability mode sample enhancement and improved CWGAN method considering diversity and global characteristics of transient curves has the same technical content as any one of embodiments 2-5. Furthermore, the DIM enhanced improved CWGAN model introduces a self-attention mechanism;

[0153] The operation process of the self-attention mechanism is as follows:

[0154] s1) Through different linear transformations, the data features output by the previous hidden layer are transformed Transform to two different feature spaces f(χ), g(χ), namely:

[0155] f(χ)=W f χ (5)

[0156] g(χ)=W g χ (6)

[0157] In the formula, is a learnable weight matrix; is the number of channels; C is the number of channels of data feature χ; k is a constant;

[0158] s2) Calculate the attention score s between all positions in the feature space ij ,Right now:

[0159] s ij =f(χ i ) T g(χ j ) (7)

[0160] s3) The attention score s ij Converted into attention weight β ji ,Right now:

[0161]

[0162] s4) According to the attention weight, the data feature χ is weighted and summed to obtain the output feature oj ,Right now:

[0163]

[0164] Among them, h(χ i )=W h χ i is the data feature χ i Linear transformation, W h is the weight matrix.

[0165] s5) Update the generated feature y i ,Right now:

[0166] y i =αo i +χ i (10)

[0167] Among them, α is a learnable parameter.

[0168] Embodiment 7:

[0169] The dominant instability mode sample enhancement improved CWGAN method considering diversity and global characteristics of transient curves has the same technical content as any one of Examples 2-6. Further, when optimizing the DIM enhanced improved CWGAN model, the loss function used is as follows:

[0170]

[0171] Where λ is the gradient penalty coefficient, It is along P r and P g The straight line between them samples the data. L(G) and L(D) are the loss functions of the generator G and the discriminator D.

[0172] Embodiment 8:

[0173] The dominant instability mode sample enhancement improved CWGAN method considering diversity and global characteristics of transient curves has the same technical content as any one of embodiments 2-7, and further, the DIM recognition model is a DIM recognition model based on a two-dimensional convolutional neural network;

[0174] The two-dimensional convolutional neural network includes a convolution layer, a pooling layer, a flattening layer and a fully connected layer.

[0175] Embodiment 9:

[0176] The system for improving the CWGAN method by enhancing the dominant instability mode samples considering diversity and global characteristics of transient curves according to any one of embodiments 1-8 comprises:

[0177] Data acquisition unit: obtains the DIM data set and extracts the key curve vector of the DIM data set;

[0178] Model building unit: build and optimize the DIM enhanced improved CWGAN model considering diversity and global characteristics of transient curves;

[0179] DIM sample generation unit: Generate DIM samples X using the optimized DIM enhancement improved CWGAN model gen ;

[0180] DIM recognition model building unit: using DIM dataset key curve vector and DIM sample X gen Construct a DIM recognition model;

[0181] Power system operation status identification unit: obtains the DIM data to be identified and inputs it into the DIM identification model to identify the power system operation status.

[0182] Embodiment 10:

[0183] An electronic device comprises: a memory, a processor and a data bus, wherein the memory stores all machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the data bus, and the machine-readable instructions are executed by the processor to execute the method described in any one of Examples 1-8.

[0184] Embodiment 11:

[0185] A computer-readable storage medium stores a computer program, which executes the method described in any one of embodiments 1-8 when executed by a processor.

[0186] Embodiment 12:

[0187] The CWGAN method is improved by enhancing the dominant unstable mode samples considering diversity and global characteristics of transient curves. First, in order to solve the problem that the existing sample enhancement methods based on generative adversarial networks only focus on the single-point power angle sampling value and ignore the coupling characteristics between voltage / power angle, a DIM sample enhancement method based on CWGAN is proposed. The key transient voltage / power angle curve is used as input features at the same time, and the DIM sample label is regarded as the corresponding condition information. It can not only fully capture the key transient voltage / power angle complete curve sampling values ​​and their coupling characteristics, but also generate samples of specified DIM. Secondly, in order to solve the risk of mode collapse when CWGAN generates specified DIM samples, a DIM sample enhancement CWGAN method with GP (gradient penalty) is proposed. GP limits the discriminator gradient to avoid excessive sensitivity to local samples, so that it pays more attention to the entire DIM data distribution more evenly, and ensures the diversity and quality of generated DIM samples. Then, in order to solve the problem that the CWGAN based on convolutional neural network has weak ability to capture the global features of key transient voltage / power angle curves, a DIM sample enhancement method with self-attention mechanism is further proposed to improve the CWGAN method, calculate the correlation between each position of the key transient voltage / power angle curve and other positions, effectively capture the time series long-distance dependency and global trend of the curve, and at the same time, the model dynamically adjusts the weight according to the correlation, paying more attention to the important parts of the curve. Finally, case analysis is carried out on the 36-node system of China Electric Power Research Institute and the 8897-node system of an actual power grid. The results verify that the proposed method can effectively enhance the unbalanced DIM samples, thereby ensuring the accuracy of DIM recognition. This technological innovation is conducive to the improvement of transient stability analysis, control strategy formulation and power grid planning of power systems.

[0188] The specific steps are as follows:

[0189] 1. DIM sample enhancement method based on CWGAN

[0190] In the research fields of power system transient stability assessment and DIM identification, although both face the common challenge of sample imbalance, there are significant differences in the essential methods and requirements for solving this problem.

[0191] The research focus of temporary stability assessment is usually on whether the power system can recover to a stable state after a large disturbance. This process focuses on the state judgment of the system at a certain instant or critical moment, such as evaluating the stability of the system by analyzing the power angle value at a specific moment. Therefore, when enhancing the sample, it is only required that the generator G can generate an unstable sample consisting of a single-point power angle sampling value. However, in the DIM identification problem, it is not only necessary to judge whether the system is stable, but also to identify the types of different DIMs. This puts higher requirements on the sample enhancement model, that is, the model is required to fully capture the voltage / power angle complete curve sampling values ​​and their changes and coupling characteristics in time series, so as to generate the voltage / power angle curve data required by the DIM identification model and solve the sample imbalance problem in DIM identification.

[0192] In this regard, the present invention proposes to use the key transient voltage / power angle curve as the input feature of the sample enhancement model. Specifically, a DIM data set X consisting of transient voltage / power angle curves and their labels is collected. ori , the data set consists of N samples, the jth sample x ori,j From the input feature x in,j and sample label y j (where the labels are [0], [1], and [2], representing stability, voltage-dominated instability, and power-angle-dominated instability, respectively), that is, x ori,j =[x in,j ,y j ], where the input feature x in,j It includes B bus voltage curves and M generator power angle curves, as follows:

[0193] x in,j =[U1,...,U B ; δ1,...,δ M ] (1)

[0194] Where U i , δ i They are the i-th transient voltage and power angle curves respectively.

[0195] Secondly, Figure 1 Taking the key transient voltage curve selection strategy as an example (the key transient power angle curve selection strategy is the same), the key curve data set X is obtained by adopting the key curve selection strategy based on K-means, as shown in formula (2):

[0196] X=[x1,…,x N ]=[U rank ,δ rank ] (2)

[0197] Among them, U rank , δ rankThey are respectively the key transient voltage and power angle curve sets obtained by the key curve selection strategy based on K-means.

[0198] At the same time, in order to enable the sample enhancement model to generate DIM samples with specified labels, the present invention proposes a DIM sample enhancement method based on CGAN, which regards the DIM sample label as the corresponding condition information and serves as the input of the discriminator D and the generator G, so that the model can effectively learn the difference between different label DIMs during the training process. N ]) is composed of the sample labels of the DIM samples, where stability, voltage-dominated instability, and power angle-dominated instability are represented by [0], [1], and [2], respectively.

[0199] The training process of GAN involves a game between two adversarial networks, the generator G and the discriminator D. The generator G is committed to improving the authenticity of the generated DIM samples, and the discriminator D is committed to accurately distinguishing true and false DIM samples. The two conduct a minimum-maximum game as shown in formula (3), continuously optimizing their own performance to achieve a dynamic balance of the adversarial network:

[0200]

[0201] Among them, P r represents the data distribution of the real DIM sample, and the generator G receives random noise z (which conforms to the prior distribution P z (also called implicit distribution)) as input and maps it to sample x, that is, x = G(z), so that the generated DIM sample conforms to the generated data distribution P g The discriminator D aims to maximize the probability of correctly distinguishing the real DIM samples from the DIM samples generated by the generator G, and the generator G aims to minimize or

[0202] To enable the DIM sample enhancement model to generate DIM samples with specified labels, such as Figure 2 As shown in Figure 2, the DIM sample label y is regarded as the corresponding conditional information and used as the input of the generator G and the discriminator D to form CGAN, and its objective function is:

[0203]

[0204] Among them, P r and P g Same meaning as in GAN.

[0205] CGAN is an extension of the GAN model. Both use the Jensen-Shannon (JS) divergence as shown in formula (5) as the metric for generating DIM samples:

[0206]

[0207] Where KL is the Kullback-Leibler divergence, P m Yes (P r +P g ) / 2 mixture.

[0208] However, under the (nearly) optimal discriminator D, minimizing the generator loss is equivalent to minimizing P r With P g The JS divergence between r With P g There is hardly any non-negligible overlap between the support sets of , so no matter how far apart they are, the JS divergence is a constant log2, which eventually leads to the vanishing gradient. In addition, the asymmetry of the KL divergence makes the generator G more inclined to pursue the accuracy of DIM sample generation at the expense of diversity, which may lead to the problem of mode collapse.

[0209] In this regard, in P g and P r When there is little or no non-negligible overlap between the support sets of the two distributions, the Wasserstein distance can still reflect the distance between the two distributions and has a smoother property. Therefore, the present invention introduces the Wasserstein distance as a measure of the data distribution P of the real DIM sample based on CGAN. r and the data distribution P that generates the DIM samples g The distance between them is measured and a DIM sample enhancement method based on CWGAN is proposed. Specifically, the Wasserstein distance is defined as follows:

[0210]

[0211] Where inf represents the lower bound; П(P r ,P g ) is P r and P g The Wasserstein distance is the optimal cost required to transmit γ(x,y), W(P r ,P g ) is to convert P r Transformed to P g The minimum transmission cost.

[0212] Due to inf γ∈П(Pr,Pg) It is impossible to solve it directly, so the Kantorovich-Rubinstein duality is applied to reconstruct the Wasserstein distance, as shown in formula (7):

[0213]

[0214] Here, f comes from the K-Lipschitz continuous function family, and K is the Lipschitz constant of function f.

[0215] The objective functions of the generator G and the discriminator D in CWGAN are as follows:

[0216]

[0217] In summary, from the perspective of transient DIM identification, the DIM sample enhancement model based on CWGAN can comprehensively capture the complete sampling values ​​of the key transient voltage / power angle curve and its coupling characteristics, and use conditional information to control the generation of samples of specified DIM, synthesize and simulate DIM samples that have not been simulated, and increase the number of scarce DIM samples.

[0218] 2. Improved CWGAN method based on DIM sample enhancement considering diversity and global characteristics of transient curves

[0219] Although the above-mentioned CWGAN-based DIM sample enhancement method can effectively generate DIM samples with specified labels, it usually uses weight reduction to limit the parameter range of the discriminator D. This method still has some problems: First, weight reduction may cause the discriminator D to learn an overly simple mapping function, making it difficult to capture the complex characteristics of the data distribution during training, resulting in the discriminator D's sensitivity to small differences between different DIM samples being reduced, thereby increasing the risk of mode collapse and ultimately reducing the diversity of generated DIM samples; second, adjusting the threshold of weight reduction requires balancing the risks of gradient attenuation and gradient explosion, which may lead to difficulty in adjusting parameters and affect the convergence and training efficiency of the model.

[0220] In this regard, this section proposes a DIM sample enhanced CWGAN method that introduces GP. The discriminator gradient is limited by gradient penalty to avoid excessive sensitivity to local samples, so that it pays more attention to the entire DIM data distribution more evenly, ensures the diversity and quality of generated DIM samples, and reduces the complexity of parameter adjustment to improve the stability and convergence speed of training. The objective function and the loss functions of the generator G and the discriminator D are as follows:

[0221]

[0222] Among them, λ is the gradient penalty coefficient, It is along P r and P g The straight line sampling between is as follows:

[0223]

[0224] Among them, U is a uniform distribution.

[0225] Although the aforementioned DIM sample enhancement CWGAN method that introduces GP has achieved certain results in the diversity of DIM sample generation, it relies on CNN and uses a fixed-size convolution kernel, resulting in a weak ability to capture the global features of the voltage / power angle curve. Therefore, the present invention further proposes an improved CWGAN method for DIM sample enhancement that introduces a self-attention mechanism to calculate the correlation between each position of the key transient voltage / power angle curve and other positions, so that the generator G and the discriminator D can effectively capture the temporal long-distance dependency and global trend of the voltage / power angle curve. At the same time, the model can dynamically adjust the weights according to the correlation, pay more attention to the important parts of the key curve, and thus improve the quality of the generated DIM samples. Its structural block diagram is shown as follows: Figure 3 shown.

[0226] First, the self-attention mechanism transforms the data features output by the previous hidden layer into (C is the number of channels, N is the number of feature positions in the previous hidden layer) converted to two different feature spaces f, g to calculate attention:

[0227] f(χ)=W f χ (12)

[0228] g(χ)=W g χ (13)

[0229] in ( is the number of channels, and In the present invention, k is taken as 8) as a learnable weight matrix. Through this step, the original data features are mapped to a new feature space, so that the features at different positions of the key transient voltage / power angle curve can be compared and the correlation calculated, thereby capturing the relationship between each position in the transient key voltage / power angle curve.

[0230] Second, calculate the attention score s between all positions ij , which represents the relationship between position i and position j:

[0231] s ij =f(χ i ) T g(χ j ) (14)

[0232] This step aims to quantify the similarity between different positions of the key curves and ensure that the generated DIM samples are consistent in global features. In particular, for key turning points in the voltage / power angle curve (such as voltage / power angle recovery when fault removal) and patterns, this global correlation calculation can ensure that the generated DIM samples contain important actual features.

[0233] Next, the attention score s ij Converted into attention weight β through softmax function ji , ensuring that for each position j, all position weights sum to 1:

[0234]

[0235] This step converts the similarity into a probability distribution through the softmax function, so that the model can dynamically adjust the weight β ji , ensuring that the model focuses more on the important features in the key curves.

[0236] Then, the input features are weighted and summed according to the attention weights to obtain the output feature o j :

[0237]

[0238] Among them, h(χ i )=W h χ i is the input feature χ i Linear transformation, W h is the weight matrix of the science department.

[0239] Finally, generate feature y i Will be updated by the following formula:

[0240] θ i =αo i +χ i (17)

[0241] Among them, α is a learnable parameter, which is used to adjust the balance between the attention features and the original features, ensuring that the features processed by the self-attention mechanism retain the information of the original features while enhancing the focus on key features.

[0242] In summary, if Figure 4 As shown, the sample enhancement method proposed in the present invention ensures that the generated DIM samples can better reflect the characteristics of the real system and meet the requirements of DIM identification for sample quality and diversity by capturing the global characteristics of the key voltage / power angle curves and the long-distance dependencies of the timing.

[0243] 3. DIM recognition model based on sample enhancement to improve CWGAN method

[0244] The present invention constructs DIM recognition models based on two-dimensional convolutional neural network (2D-CNN) and multi-random convolutional kernel transform (MultiRocket), and compares the DIM recognition accuracy before and after sample enhancement, so as to fully verify that the method proposed in the present invention can effectively solve the sample imbalance problem faced by DIM recognition.

[0245] like Figure 5 As shown in Figure 1, 2D-CNN consists of convolutional layers, pooling layers, flattening layers, and fully connected layers. Specifically, 2D-CNN mainly uses the parameter sharing and translation invariance characteristics of the convolution kernel to identify key features at different positions of the key voltage / power angle curve, enhance the model's understanding of the input data, and thus ensure the accuracy of DIM identification in the power system.

[0246] In addition, in order to further verify the universality of the method proposed in the present invention, the present invention constructs Figure 6 The MultiRocket-based DIM identification model of the structure shown in the figure. MultiRocket can analyze important features such as the instability position, instability duration, and instability trend of the key voltage / power angle curve, fully exploit the timing characteristics, improve the accuracy of DIM identification, and thus achieve high-precision DIM identification in the power system.

[0247] According to the proposed DIM sample enhancement improved CWGAN method considering diversity and global characteristics of transient curves, and the DIM recognition model construction, a DIM recognition framework based on the sample enhancement improved CWGAN method is constructed. The process is as follows Figure 7 As shown, the specific steps are as follows:

[0248] Step 1: DIM data set acquisition and key curve selection. First, obtain the transient voltage / power angle curve and its label to form the DIM data set X ori ; Secondly, based on the key curve selection strategy of K-means, the corresponding key curve set X is obtained and the training set X is divided train With the test set X test .

[0249] Step 2: DIM enhancement improves CWGAN model training. First, follow Figure 4 Build a DIM enhanced improved CWGAN architecture that considers diversity and global characteristics of transient curves; secondly, define the objective function and loss function; finally, use optimization algorithms such as RMSProp to train the DIM sample generator G, thereby obtaining the generated DIM sample X gen .

[0250] Step 3: DIM recognition calculation of test samples. First, through the original training set X train With the generated DIM sample X gen , train the DIM recognition model; secondly, the test set X of the DIM to be recognized test The input is given to the trained DIM recognition model to obtain the recognition result, which category it belongs to: stability, voltage-dominated instability, or power angle-dominated instability.

[0251] Embodiment 13:

[0252] The verification of the improved CWGAN method by enhancing the dominant instability mode samples considering diversity and global characteristics of transient curves is as follows:

[0253] In order to verify the effectiveness and accuracy of the method proposed in this invention, case verification analysis was carried out on the 36-node system of China Electric Power Research Institute (CEPRI-36-node system) and the 8897-node system of an actual power grid. The DIM recognition basic model based on 2D-CNN / MultiRocket was built by Scikit-learn / Tensorflow 2.4.1 and Keras 2.4.3 respectively, and the case test platform was: AMD Ryzen 7 5800H with Radeon Graphics@3.20GHz CPU, 16GB RAM, GPUNvidia Geforce RTX 3050.

[0254] For the CEPRI-36 node system, the fault type is set to a three-phase permanent fault, the fault occurrence time is 1s, the duration is 0.1s, 0.2s, 0.25s, 0.3s, the occurrence location is 2%, 20%, 50%, 80%, 98% of all lines excluding the connected transformer, and the power flow level is 115%, 120%. The specific setting parameters are shown in Table 1.

[0255] Table 1 CEPRI-36 node system sample generation fault settings

[0256]

[0257] At the same time, in order to simulate the near-end and far-end tangent behavior of the actual power grid, according to the provisions of the relevant technical specifications of the State Grid for the fault removal time, the protection action time, the intermediate relay time and the circuit breaker full opening time are set. The present invention sets the fault removal action time of the near-end and far-end fault point side according to the above technical specification documents. For example, the near-end and far-end removal time of 200kV is 1.12s, the near-end removal time of 500kV is 1.09s, and the far-end removal time is 1.1s. In order to simulate different working conditions in the actual system, on the basis of this specification, the fault removal time of 0.2s, 0.25s, and 0.3s is added. Finally, a total of 5200 valid samples were obtained, among which the number of stable, voltage-dominated instability, and power angle-dominated instability samples were 2340, 1003, and 1857, respectively, and the training set and the test set were randomly divided into 80% and 20% ratios.

[0258] In actual projects, hybrid instability rarely occurs in power grid systems, and the sample generation and label marking costs are high. To further verify the adaptability of the proposed method to changes in power system topology, a case analysis is conducted on an actual power grid system consisting of 8897 bus nodes and 1098 generators.

[0259] Experts selected the sample generation method that needs to be focused on based on engineering experience: more than a dozen typical operating conditions of power flow levels were selected, and the rest of the settings were the same as described above, and a total of 931 samples were collected as the test set. Among them, the number of samples of stability, voltage-dominated instability, and power angle-dominated instability were 684, 120, and 127, respectively.

[0260] Results and Discussion

[0261] This section uses samples generated by the CEPRI-36 node system to train the DIM sample enhancement improved CWGAN method proposed in this invention that considers diversity and global characteristics of transient curves. After obtaining the generator, voltage and power angle-dominated instability samples are generated, so that the data set after sample enhancement reaches absolute balance, that is, the number of stable, voltage-dominated instability, and power angle-dominated instability samples in the final DIM recognition model training set is equal. The confusion matrix evaluation method is used to clearly show the recognition of different categories of DIM samples by the DIM recognition model, thereby verifying whether the sample enhancement method can effectively improve the accuracy of DIM recognition.

[0262] At the same time, in order to compare with the method proposed in this invention, this section uses common data synthesis methods, including SMOTE, ROS and ADASYN for comparative testing.

[0263] ① Discussion on the results of 36-node system

[0264] As shown in Table 2, the confusion matrix results of the test set are obtained after the DIM recognition model based on 2D-CNN and MultiRocket is trained on the original unbalanced data set. At the same time, the generator obtained by the method proposed in the present invention is used to generate samples, and the DIM recognition model is trained using the training set after sample enhancement, and the confusion results of the test set are shown in Table 1. By comparison, before the method proposed in the present invention is used for sample enhancement, the DIM recognition model based on 2D-CNN and MultiRocket lacks sufficient voltage-dominated instability samples, resulting in the accuracy of the test set correctly identifying the voltage-dominated instability is only 87.73% and 93.18%, respectively. After the sample enhancement is performed by the method proposed in the present invention, the accuracy of the voltage-dominated instability is increased by 7.81% and 3.19%, respectively, which proves that the method proposed in the present invention can effectively solve the problem of DIM sample imbalance and improve the accuracy of DIM recognition.

[0265] In addition, the present invention compares and tests different data synthesis methods and obtains the results shown in Table 2. It can be seen that compared with ROS that only copies samples from the original samples and SMOTE and ADASYN based on linear interpolation, the DIM sample enhancement and improved CWGAN method proposed in the present invention that considers diversity and global characteristics of transient curves has the best effect.

[0266] Table 236 Comparison of indicators of different data synthesis methods of node system

[0267]

[0268]

[0269] ② Discussion on the results of a real power grid with 8897 nodes

[0270] In this section, the samples generated by a real power grid 8897 node system are used as the test set, and injected into the training set according to different proportions of the number of samples in the actual power grid for training (e.g., "10% injection" means that 931*10%≈93 labeled samples are injected into the training set, that is, 30 samples of each type of DIM are randomly selected and injected into the training sample to make the injected samples absolutely balanced). As shown in Table 3, after the DIM recognition model based on 2D-CNN and MultiRocket is trained on the original unbalanced data set, the accuracy of correctly identifying voltage-dominated instability in the test set is only 86.37% and 86.67%, while after the sample enhancement by the method proposed in this paper, the recognition accuracy of voltage-dominated instability is improved by 9.09% and 10.15%, respectively.

[0271] Similarly, this paper compares and tests different data synthesis methods. The DIM sample enhancement improved CWGAN method proposed in this paper that considers diversity and global characteristics of transient curves is better than other data synthesis methods.

[0272] Table 3 Comparison of indicators of different data synthesis methods for a real power grid 8897-node system

[0273]

[0274]

[0275] In summary, the example verification shows that the method proposed in this invention effectively enhances the unbalanced DIM samples and ensures the DIM recognition accuracy.

Claims

1. The CWGAN method is improved by enhancing the dominant unstable mode samples considering diversity and global characteristics of transient curves, characterized by: The following steps are involved: A data-driven dominant instability mode DIM data set is obtained, and key curve vectors of the DIM data set are extracted; the DIM data set at least includes transient voltage, power angle curves, and power system operation status labels. Build a DIM-enhanced improved generative adversarial network (CWGAN) model that considers diversity and global characteristics of transient curves, and optimize the DIM-enhanced improved CWGAN model; Generate DIM samples X using the optimized DIM enhancement to improve the CWGAN model gen ; Using the DIM dataset key curve vector and DIM sample X gen Construct a DIM recognition model; Obtain the DIM data to be identified and input it into the DIM identification model to identify the operating status of the power system; DIM enhancement improves the objective function of CWGAN model As shown below: Where P r represents the data distribution of the real DIM sample; x represents the sample; P g Indicates the generated sample The data distribution of ; D(x|y) represents the discriminator output; λ is the gradient penalty coefficient, It is along P r and P g The straight line sampling data between express expectations; represents the gradient; Represents straight line sampling data Data distribution; Indicates When is the input, the output of the discriminator.

2. The improved CWGAN method for enhancing the dominant unstable mode samples considering diversity and global characteristics of transient curves according to claim 1 is characterized in that: The DIM dataset consists of N samples, where the jth sample x ori,j =[x in,j ,y j ]; x in,j ,y j Indicates input characteristics and power system operation status labels; power system operation status includes stability, voltage-dominated instability, and power angle-dominated instability; Input feature x in,j As shown below: x in,j =[U1,...,U B ;δ1,…,δ M ] (2) Where U i ,δ i They are the i-th transient voltage and power angle curves respectively; B represents the number of bus voltage curves; M represents the number of generator power angle curves.

3. The improved CWGAN method for enhancing dominant unstable mode samples considering diversity and global characteristics of transient curves according to claim 1 is characterized in that: The methods for extracting key curves of DIM dataset include key curve selection strategy based on K-means; The extracted key curves of the DIM data set are shown below: X=[x1,…,x N ]=[U rank ,δ rank ] (3) Among them, U rank ,δ rank are the key transient voltage and power angle curve sets obtained by the key curve selection strategy based on K-means; X is the key curve vector of the DIM data set; x1, x N These are the 1st and Nth DIM data set key curves.

4. The improved CWGAN method for enhancing dominant unstable mode samples considering diversity and global characteristics of transient curves according to claim 1 is characterized in that: Linear sampling data As shown below: In the formula, ε represents the parameter that satisfies the uniform distribution U. x represents the sample; P r represents the data distribution of the real DIM sample; P g Indicates the generated sample data distribution.

5. The improved CWGAN method for enhancing dominant unstable mode samples considering diversity and global characteristics of transient curves according to claim 1, characterized in that: The DIM enhanced improved CWGAN model introduces a self-attention mechanism; The operation process of the self-attention mechanism is as follows: Through different linear transformations, the data features output by the previous hidden layer are transformed Transform to two different feature spaces f(χ), g(χ), namely: f(x)=W f x (5) In the formula, is a learnable weight matrix; is the number of channels; C is the number of channels of data feature χ; k is a constant; Calculate the attention score s between all positions in the feature space ij ,Right now: s ij =f(x i ) T g(x j ) (7) In the formula, f(χ i )、g(χ j ) is the data feature χ i The feature space of Score the attention ij Converted into attention weight β ji ,Right now: Where N is the number of data features; According to the attention weight, the data feature χ is weighted and summed to obtain the output feature o j ,Right now: Among them, h(χ i )=W h X i is the data feature X i Linear transformation, W h is the weight matrix. Update the generated feature y i ,Right now: yes i =αo i +χ i (10) Among them, α is a learnable parameter.

6. The improved CWGAN method for enhancing dominant unstable mode samples considering diversity and global characteristics of transient curves according to claim 1, characterized in that: When optimizing the DIM enhanced CWGAN model, the loss function used is as follows: Where λ is the gradient penalty coefficient, It is along P r and P g The straight line between them samples the data. L(G) and L(D) are the loss functions of the generator G and the discriminator D.

7. The improved CWGAN method for enhancing dominant unstable mode samples considering diversity and global characteristics of transient curves according to claim 1, characterized in that: The DIM recognition model is a DIM recognition model based on a two-dimensional convolutional neural network; The two-dimensional convolutional neural network includes a convolution layer, a pooling layer, a flattening layer and a fully connected layer.

8. A system for improving the CWGAN method based on the dominant instability mode sample enhancement considering diversity and global characteristics of transient curves as described in any one of claims 1 to 7, characterized in that: include: Data acquisition unit: acquires the DIM data set and extracts the key curve vector of the DIM data set; the DIM data set at least includes transient voltage, power angle curve, and power system operation status label; Model building unit: build and optimize the DIM enhanced improved CWGAN model considering diversity and global characteristics of transient curves; DIM sample generation unit: Generate DIM samples X using the optimized DIM enhancement improved CWGAN model gen ; DIM recognition model building unit: using DIM dataset key curve vector and DIM sample X gen Construct a DIM recognition model; Power system operation status identification unit: obtains the DIM data to be identified and inputs it into the DIM identification model to identify the power system operation status; DIM enhancement improves the objective function of CWGAN model As shown below: Where P r represents the data distribution of the real DIM sample; x represents the sample; P g Indicates the generated sample The data distribution of ; D(x|y) represents the discriminator output; λ is the gradient penalty coefficient, It is along P r and P g The straight line sampling data between . Express expectations. represents the gradient; Represents straight line sampling data Data distribution; Indicates When is the input, the output of the discriminator.

9. An electronic device, characterized in that: include: A memory, a processor and a data bus, wherein the memory stores all machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the data bus, and the machine-readable instructions are executed by the processor to execute the method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Electric power system transient DIM identification method

    CN117435944A