Power system sample imbalance correction method based on correction gradient direction

By correcting the gradient direction and adjusting the synthetic gradient direction of the power system sample set, the evaluation tendency problem of the power system transient stability assessment model is solved, and higher accuracy and shorter training time are achieved.

CN120654558APending Publication Date: 2025-09-16FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510748461.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing power system transient stability assessment models have evaluation bias problems due to sample imbalance, and traditional methods such as data resampling, threshold adjustment and cost-sensitive methods have defects.

Method used

By correcting the gradient direction, the synthetic gradient direction of the sample set is adaptively adjusted. The direction propagation during the training process of the stacked sparse autoencoder is used to calculate the synthetic gradients of stable and unstable samples, and adjust them to the bisection direction. Backpropagation is then performed to correct the model evaluation tendency.

Benefits of technology

It effectively reduces the impact of sample set imbalance on model evaluation tendency, improves model accuracy and training efficiency, and avoids the defects of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120654558A_ABST
    Figure CN120654558A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power system sample imbalance correction method based on a correction gradient direction, and the method comprises the steps: 1), obtaining a large number of training samples through PSD-BPA software simulation, extracting the power angle and speed deviation of each generator in an electric power system as characteristic quantities, and constructing an original transient stability evaluation sample set with the stability of the samples as labels; 2) constructing stable samples and unstable samples into a sample set according to a set proportion, and standardizing the samples in the sample set; 3) according to the direction propagation process in the training process of the stacked sparse automatic encoder, respectively calculating the synthetic gradients of the stable sample, the unstable sample and the total sample; and 4) adjusting the total gradient direction to the bisecting gradient direction of the stable sample and the unstable sample, and then carrying out a back propagation process. According to the method, the tendency problem of TSA model evaluation caused by different unbalance degrees can be adaptively corrected, and compared with a traditional method, the method has a better correction effect and is suitable for further popularization and application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to a method for correcting power system sample imbalance based on correcting gradient direction. Background Art

[0002] With the widespread use of PMUs and the rapid development of WAMS, operational data from power systems can be rapidly collected by PMUs and uploaded to the power system's big data center. This provides a solid foundation for data-driven transient stability assessment of power systems. However, due to the robustness of power systems, the number of unstable samples is far less than the number of stable samples. Transient stability assessment (TSA) models trained using such unbalanced datasets will suffer from serious bias in their assessments.

[0003] Existing imbalance correction methods include data resampling, threshold adjustment, and cost-sensitive methods. However, data resampling methods can generate unreasonable samples and impose a heavy training burden. Threshold adjustment methods rely on selecting a reasonable threshold, but can easily reduce the accuracy of samples with high thresholds. Cost-sensitive methods achieve imbalance correction by assigning different weights to samples of different categories, but finding an appropriate cost coefficient is difficult.

[0004] By analyzing the backpropagation process based on deep learning, it is found that correcting the direction of the synthetic gradient can effectively correct sample imbalance. Therefore, the present invention constructs a method for correcting power system sample imbalance based on correcting the gradient direction, which can adaptively correct the assessment model's assessment bias under different sample imbalance conditions. Summary of the Invention

[0005] Due to the robustness of power systems, transient stability samples far outnumber transient instability samples. Using an unbalanced sample set to train a data-driven transient stability assessment (TSA) model can lead to biased evaluations. To address this issue, the present invention proposes an imbalance correction method based on correcting the gradient direction to mitigate the impact of sample set imbalance on the TSA model's evaluation bias.

[0006] In order to achieve the above technical objectives, the technical solution adopted by the present invention is: a method for correcting power system sample imbalance based on correcting gradient direction, comprising:

[0007] 1) A large number of training samples are obtained through PSD-BPA software simulation. The power angle and speed deviation of each generator in the power system are extracted as feature quantities, and the stability of the samples is used as the label to construct the original transient stability assessment sample set;

[0008] 2) Stable samples and unstable samples are constructed into a sample set according to a set ratio, and the samples in the sample set are standardized;

[0009] 3) According to the directional propagation process during the training of the stacked sparse autoencoder, the synthetic gradients of stable samples, unstable samples and total samples are calculated respectively;

[0010] 4) Adjust the total gradient direction to the gradient direction that divides the stable sample and the unstable sample equally, and then perform the back propagation process.

[0011] As a possible implementation, further, step 1) specifically includes:

[0012] Set different power system fault conditions and obtain a large number of training samples through PSD-BPA software simulation;

[0013] The power angle and angular velocity deviations of each generator in the system are extracted as feature quantities, and the moment of fault clearing and the subsequent three cycles as well as the stability of the samples are used as raw data.

[0014] As a possible implementation manner, further, the power system fault condition includes a power system load level, a fault location, a fault duration, and a fault type.

[0015] As a possible implementation, further, in step 2), a sample set is constructed by combining stable samples with unstable samples in a ratio of 1:5, and the samples in the sample set are standardized.

[0016] As a possible implementation, further, step 3) specifically includes:

[0017] A fully connected network with three hidden layers is constructed. The number of neurons in the hidden layers is 100, 50, and 25 respectively. The last hidden layer is connected to the output layer with only one neuron. The activation function of the model is the sigmoid function as shown in the following formula (1):

[0018]

[0019] The forward propagation process is shown in the following formulas (2) and (3):

[0020] h i =σ(w i x+b i ) (2)

[0021] y=σ(w i h i +b i ) (3)

[0022] Among them, h iis the neuron vector of the i-th hidden layer, w i is the weight vector of the neurons in the i-th layer, b i is the bias vector of the i-th layer neuron, and y is the output of the output layer;

[0023] During the model training process, the binary cross entropy loss function BCE is used as the loss function for model training. BCE is shown in the following formula (4):

[0024]

[0025] Among them, l i is the label of the i-th sample, x i is the i-th sample, N is the number of samples;

[0026] The back propagation process of the model realizes the update of model parameters through the chain derivation method. The process of model parameter update is shown in the following formula (5):

[0027]

[0028] Among them, θ′ is the updated model parameter, θ is the model parameter before the update, Lr is the learning rate, is the derivative of the loss function with respect to the model parameters;

[0029] The updated gradient of the output weight of the last hidden layer in the back propagation process of a single sample is shown in the following formula (6):

[0030]

[0031] Among them, w3 is the weight vector from the hidden layer to the output layer, and h3 is the output of the third hidden layer;

[0032] The synthetic gradient of the stable sample to the output weight of the last hidden layer is shown in the following formula (7):

[0033]

[0034] in, is the updated gradient of stable sample synthesis, n is the number of stable samples, x i To stabilize the sample characteristics, stabilize the sample l i =1;

[0035] The synthetic gradient of the unstable sample on the output weight of the last hidden layer is shown in the following formula (8):

[0036]

[0037] in, is the updated gradient of unstable sample synthesis, m is the number of unstable samples, x jis the unstable sample feature, the unstable sample l j =0;

[0038] The total composite gradient of all samples is shown in the following formula (9):

[0039]

[0040] As a possible implementation, further, step 4) specifically includes:

[0041] By normalizing the synthetic gradient of stable samples and the synthetic gradient of unstable samples, the unit vectors of the two types of samples are obtained, which only retain the direction information of the synthetic gradient. The synthetic gradient unit vectors of stable samples and unstable samples are shown in the following formulas (10) and (11):

[0042]

[0043] Among them, ||·|| represents the modulus of the vector;

[0044] By adding the unit vectors of the synthetic gradients of the stable sample and the unstable sample, the bisection vector of the synthetic gradient is calculated as shown in the following formula (12):

[0045]

[0046] The gradient used for model back propagation is shown in the following formula (13):

[0047]

[0048] By calculating ▽L during each round of model training and replacing the gradient originally used for back propagation It is possible to correct the TSA model evaluation bias caused by the imbalance of the sample set.

[0049] As a possible implementation, the power system sample imbalance correction method based on the correction gradient direction further includes: 5) performing stability assessment on the power system state using a transient stability assessment model with a corrected assessment tendency.

[0050] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art:

[0051] 1. The tendency correction method for transient stability assessment of power systems proposed in this invention can adaptively correct the tendency problems existing in TSA model assessment caused by different degrees of imbalance by changing the direction of the total synthetic gradient. Compared with traditional methods, it has a better correction effect.

[0052] 2. Compared with traditional generation methods, the present invention does not increase the training burden of the model during the model training process; compared with cost-sensitive methods, it does not require pre-training to determine the appropriate cost coefficient, the model training time is shorter, and it has advantages in the subsequent model update process. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in 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 only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0054] Figure 1 It is a simplified flow chart of the present invention;

[0055] Figure 2 This is the wiring diagram of the IEEE 39-node system. DETAILED DESCRIPTION

[0056] The present invention will be described in further detail below with reference to the accompanying drawings and examples. It is particularly noted that the following examples are intended only to illustrate the present invention and are not intended to limit the scope of the present invention. Similarly, the following examples are only some embodiments of the present invention and are not intended to be exhaustive. All other embodiments obtained by those of ordinary skill in the art without creative effort are intended to fall within the scope of protection of the present invention.

[0057] Refer to the attached Figure 1 As shown, the present invention provides a method for correcting power system sample imbalance based on correction gradient direction, comprising:

[0058] 1) A large number of training samples are obtained through PSD-BPA software simulation. The power angle and speed deviation of each generator in the power system are extracted as feature quantities, and the stability of the samples is used as the label to construct the original transient stability assessment sample set;

[0059] 2) Stable samples and unstable samples are constructed into a sample set according to a set ratio, and the samples in the sample set are standardized;

[0060] 3) According to the directional propagation process during the training of the stacked sparse autoencoder, the synthetic gradients of stable samples, unstable samples and total samples are calculated respectively;

[0061] 4) Adjust the total gradient direction to the gradient direction that divides the stable samples and the unstable samples equally to balance the learning effect of the model on the two types of samples. Then perform the backpropagation process to correct the TSA model evaluation tendency problem caused by sample imbalance.

[0062] 5) Use the transient stability assessment model with modified assessment tendency to conduct stability assessment on the power system state.

[0063] This method can adaptively correct the tendency problems in TSA model evaluation caused by different degrees of imbalance, and can effectively reduce the impact of sample set imbalance on the tendency of TSA model evaluation.

[0064] Example 1

[0065] This embodiment provides a method for correcting power system sample imbalance based on correction gradient direction, which specifically includes the following steps:

[0066] 1) A large number of training samples are obtained through PSD-BPA software simulation according to different power system load levels, fault locations, fault durations, and fault types. The power angle and angular velocity deviations of each generator in the system are extracted as feature quantities, and the fault clearing moment and the subsequent three cycles as well as the stability of the samples are used as raw data.

[0067] 2) The sample set is constructed with a ratio of stable samples to unstable samples of 1:5, and the samples in the sample set are standardized.

[0068] 3) Build a fully connected network with three hidden layers, where the number of neurons in the hidden layers is 100, 50, and 25 respectively. The last hidden layer is connected to an output layer with only one neuron.

[0069] The activation function of the model is the sigmoid function as shown in the following formula (1):

[0070]

[0071] The forward propagation process is shown in the following formulas (2) and (3):

[0072] h i =σ(w i x+b i ) (2)

[0073] y=σ(w i h i +b i ) (3)

[0074] Among them, h i is the neuron vector of the i-th hidden layer, w i is the weight vector of the neurons in the i-th layer, b i is the bias vector of the i-th layer neuron, and y is the output of the output layer.

[0075] During the model training process, the binary cross entropy loss function (BCE) is used as the loss function for model training. BCE is shown in the following formula (4):

[0076]

[0077] Among them, l i is the label of the i-th sample; x i is the i-th sample; N is the number of samples.

[0078] The back propagation process of the model realizes the update of model parameters through the chain derivation method. The process of model parameter update is shown in the following formula (5):

[0079]

[0080] Among them, θ′ is the updated model parameter, θ is the model parameter before the update, Lr is the learning rate,

[0081] is the derivative of the loss function with respect to the model parameters.

[0082] Since the model back propagation process is a chain derivation, it is only necessary to correct the updated gradient propagated from the output layer to the last hidden layer neurons to correct the evaluation tendency of the entire model. The updated gradient of the output weight of the last hidden layer in the back propagation process of a single sample is shown in the following formula (6):

[0083]

[0084] Among them, w3 is the weight vector from the hidden layer to the output layer; h3 is the output of the third hidden layer.

[0085] The synthetic gradient of the stable sample to the output weight of the last hidden layer is shown in the following formula (7):

[0086]

[0087] in, is the updated gradient of the stable sample synthesis; n is the number of stable samples; x i is the stable sample feature; stable sample l i =1.

[0088] The synthetic gradient of the unstable sample on the output weight of the last hidden layer is shown in the following formula (8):

[0089]

[0090] in, is the updated gradient synthesized by the unstable sample; m is the number of unstable samples; x jis the unstable sample feature; unstable sample l j =0.

[0091] The total composite gradient of all samples is shown in the following formula (9):

[0092]

[0093] 4) By normalizing the synthetic gradient of stable samples and the synthetic gradient of unstable samples, the unit vectors of the two types of samples are obtained, retaining only the direction information of the synthetic gradient. The synthetic gradient unit vectors of stable samples and unstable samples are shown in the following formulas (10) and (11):

[0094]

[0095] Here, ||·|| represents the modulus of the vector.

[0096] The bisector vector of the synthetic gradient is calculated by adding the unit vectors of the synthetic gradient of the stable sample and the unstable sample as shown in the following formula (12):

[0097]

[0098] The direction of the gradient vector used for model back propagation is determined by the bisector vector v of the synthetic gradient, and the modulus of the gradient vector used for model back propagation is determined by the total synthetic gradient modulus of all samples. Therefore, the gradient used for model back propagation is shown in the following formula (13):

[0099]

[0100] By calculating during each round of model training And replace the gradient originally used for back propagation It is possible to correct the TSA model evaluation bias caused by the imbalance of the sample set.

[0101] 5) Use the transient stability assessment model with modified assessment tendency to conduct stability assessment on the power system state.

[0102] The following provides a specific application example:

[0103] The simulation software uses PSD-BPA, and the test system uses the IEEE-39 node system (see attached Figure 2(As shown in the figure). The system operates under five load levels: 90%, 95%, 100%, 105%, and 110%. Faults occur at 10%, 50%, and 90% of each line. All faults are three-phase short circuits. The fault duration ranges from 6 cycles to 18.5 cycles, increasing in 0.5-cycle intervals, for a total of 26 types. A total of 15,012 samples were generated in the IEEE-39 node system, of which 7,821 were stable and 7,191 were unstable.

[0104] 1000 stable samples and 5000 unstable samples were extracted from 15012 fault samples in a ratio of 1:5 to form a training set. At the same time, 1000 stable samples and 1000 unstable samples were extracted to form a test set. The correction effects of the uncorrected, random undersampling (RUS), random oversampling (ROS), synthetic minority oversampling technology (SMOTE) adaptive synthetic sampling (ADASYN), traditional cost-sensitive method (CCS), cost-sensitive method based on the ratio of the mean of loss functions (CSBLF) and the sample imbalance correction method based on the corrected gradient direction proposed in this invention on the model tendency were compared under the condition of imbalanced sample sets. Five training sets and test sets were randomly selected to verify the effectiveness of the imbalance correction method. The average value of the five experiments was used as the final result. The effects of different imbalance correction methods are shown in Table 1.

[0105] Table 1 Effects of different imbalance correction methods

[0106]

[0107]

[0108] As can be seen from Table 1, the imbalance correction method based on correcting the gradient direction provided by the present invention achieves the best correction effect. The model corrected by this method has the highest accuracy, and its evaluation tendency is significantly corrected.

[0109] The above descriptions are only some embodiments of the present invention and do not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for correcting power system sample imbalance based on correcting gradient direction, characterized in that: include: 1) A large number of training samples are obtained through PSD-BPA software simulation. The power angle and speed deviation of each generator in the power system are extracted as feature quantities, and the stability of the samples is used as the label to construct the original transient stability assessment sample set; 2) Stable samples and unstable samples are constructed into a sample set according to a set ratio, and the samples in the sample set are standardized; 3) According to the directional propagation process during the training of the stacked sparse autoencoder, the synthetic gradients of stable samples, unstable samples and total samples are calculated respectively; 4) Adjust the total gradient direction to the gradient direction that divides the stable sample and the unstable sample equally, and then perform the back propagation process.

2. The power system sample imbalance correction method based on the correction gradient direction according to claim 1, characterized in that: Step 1) specifically includes: Set different power system fault conditions and obtain a large number of training samples through PSD-BPA software simulation; The power angle and angular velocity deviations of each generator in the system are extracted as feature quantities, and the moment of fault clearing and the subsequent three cycles as well as the stability of the samples are used as raw data.

3. The power system sample imbalance correction method based on correction gradient direction according to claim 2, characterized in that: The power system fault conditions include power system load level, fault location, fault duration, and fault type.

4. The method for correcting power system sample imbalance based on corrected gradient direction according to claim 1, characterized in that: In step 2), a sample set is constructed by mixing stable samples with unstable samples in a ratio of 1:5, and the samples in the sample set are standardized.

5. The method for correcting power system sample imbalance based on corrected gradient direction according to claim 1, characterized in that: Step 3) specifically includes: A fully connected network with three hidden layers is constructed. The number of neurons in the hidden layers is 100, 50, and 25 respectively. The last hidden layer is connected to the output layer with only one neuron. The activation function of the model is the sigmoid function as shown in the following formula (1): The forward propagation process is shown in the following formulas (2) and (3): h i =σ(w i x+b i ) (2) y=σ(w i h i +b i ) (3) Among them, h i is the neuron vector of the i-th hidden layer, w i is the weight vector of the neurons in the i-th layer, b i is the bias vector of the i-th layer neuron, and y is the output of the output layer; During the model training process, the binary cross entropy loss function BCE is used as the loss function for model training. BCE is shown in the following formula (4): Among them, l i is the label of the i-th sample, x i is the i-th sample, N is the number of samples; The back propagation process of the model realizes the update of model parameters through the chain derivation method. The process of model parameter update is shown in the following formula (5): Among them, θ′ is the updated model parameter, θ is the model parameter before the update, Lr is the learning rate, is the derivative of the loss function with respect to the model parameters; The updated gradient of the output weight of the last hidden layer in the back propagation process of a single sample is shown in the following formula (6): Among them, w3 is the weight vector from the hidden layer to the output layer, and h3 is the output of the third hidden layer; The synthetic gradient of the stable sample to the output weight of the last hidden layer is shown in the following formula (7): in, is the updated gradient of stable sample synthesis, n is the number of stable samples, x i To stabilize the sample characteristics, stabilize the sample l i =1; The synthetic gradient of the unstable sample on the output weight of the last hidden layer is shown in the following formula (8): in, is the updated gradient of unstable sample synthesis, m is the number of unstable samples, x j is the unstable sample feature, the unstable sample l j =0; The total composite gradient of all samples is shown in the following formula (9):

6. The method for correcting power system sample imbalance based on corrected gradient direction according to claim 5, characterized in that: Step 4) specifically includes: By normalizing the synthetic gradient of stable samples and the synthetic gradient of unstable samples, the unit vectors of the two types of samples are obtained, which only retain the direction information of the synthetic gradient. The synthetic gradient unit vectors of stable samples and unstable samples are shown in the following formulas (10) and (11): Among them, ||·|| represents the modulus of the vector; By adding the unit vectors of the synthetic gradients of the stable sample and the unstable sample, the bisection vector of the synthetic gradient is calculated as shown in the following formula (12): The gradient used for model back propagation is shown in the following formula (13): By calculating during each round of model training And replace the gradient originally used for back propagation 7. The method for correcting power system sample imbalance based on corrected gradient direction according to any one of claims 1 to 6, characterized in that: Also includes: 5) Use the transient stability assessment model with modified assessment tendency to conduct stability assessment on the power system state.