A boundary sample enhancement method and system for power grid transient stability evaluation

By generating and enhancing boundary samples in the power grid transient stability assessment model, the problem of low assessment accuracy caused by insufficient samples is solved, and higher assessment accuracy is achieved.

CN122451471APending Publication Date: 2026-07-24SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2026-06-26
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing power grid transient stability assessment models, there is a lack of samples located near the decision boundary, which leads to insufficient assessment accuracy.

Method used

By constructing an initial training sample set, filtering boundary samples, and using a masked autoencoder generative adversarial network to generate new unlabeled boundary samples, and combining power flow calculation and time-domain simulation techniques to obtain sample labels, these labels are added to the training sample set to enhance the boundary samples.

Benefits of technology

It effectively improves the ability of the transient stability assessment model to fit the decision boundary and increases the assessment accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122451471A_ABST
    Figure CN122451471A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of power grid transient stability evaluation, and specifically discloses a boundary sample enhancement method and system for power grid transient stability evaluation, which comprises the following steps: training a transient stability evaluation model by using an initial training sample set, predicting the initial training sample by using the trained transient stability evaluation model, and screening boundary samples based on the obtained prediction probability; calculating the local density of all non-boundary stable samples, and performing undersampling on the non-boundary samples; training a mask autoencoder generative adversarial network by using the screened boundary samples, generating new boundary samples without labels, obtaining sample labels by using a time domain simulation technology, and adding the new samples that pass the test to the training sample set after undersampling to realize boundary sample enhancement. The application can effectively identify the samples near the classification decision boundary of the transient stability evaluation model, and provides reliable training data basis for boundary sample generation and enhancement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid transient stability assessment technology, and in particular to a boundary sample enhancement method and system for power grid transient stability assessment. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Transient stability refers to the ability of a power system to recover to a normal and stable operating state after being subjected to a large disturbance. In order to ensure the safe and stable operation of the system, transient stability assessment technology is needed to quickly assess the safety risks of the power system under a given operating mode and anticipated faults.

[0004] Existing technologies widely employ data-driven transient stability assessment methods. These methods utilize artificial intelligence techniques such as machine learning to construct assessment models, which directly fit the mapping relationship between input features and system transient stability labels. After model training, this approach can significantly improve assessment efficiency. However, the assessment accuracy of transient stability assessment models is closely related to the quality of the training sample set. Therefore, a high-quality training sample set is crucial for improving the accuracy of transient stability assessments.

[0005] Existing methods for generating training sample sets typically employ techniques such as random fluctuations in source-load power, Monte Carlo sampling, stratified sampling, and data based on historical power grid operation to generate samples reflecting the power grid's operating mode, and then use time-domain simulation techniques to obtain transient stability labels. However, the samples generated by these methods are often far from the classification boundary of the transient stability assessment model, while samples near the model's decision boundary play a crucial role in ensuring the model's accuracy. If the number of boundary samples is insufficient, the model's accuracy is difficult to guarantee. Summary of the Invention

[0006] To address the aforementioned issues, this invention proposes a boundary sample enhancement method and system for power grid transient stability assessment. Based on the initial training sample set, more boundary samples located near the model decision boundary are effectively generated and added to the training sample set to improve the transient stability assessment model's ability to fit the decision boundary, thereby enhancing the assessment accuracy.

[0007] In some implementations, the following technical solutions are adopted: A boundary sample augmentation method for power grid transient stability assessment includes: Based on historical operating data and day-ahead forecast data of new energy sources and loads, an initial training sample set is constructed to be required for training the transient stability assessment model. The transient stability assessment model is trained using the initial training sample set. The trained transient stability assessment model is then used to predict the transient stability state of the initial training samples to obtain the predicted probability of each sample's transient stability state. Boundary samples are then selected based on the predicted probabilities. The local density of all non-boundary stable samples is calculated based on the high-order features of the samples. Based on the local density, the roulette wheel selection method is used to undersample the non-boundary samples. The selected boundary samples are used to train the masked autoencoder generative adversarial network to generate new unlabeled boundary samples. The new boundary samples are tested by power flow calculation, and the sample labels are obtained by time-domain simulation technology. The new samples that pass the test are added to the training sample set after undersampling to achieve boundary sample enhancement.

[0008] As a further solution, the method for constructing the initial training sample set is as follows: Based on historical operating data and day-ahead forecast data of new energy sources and loads, the output of synchronous generators is adjusted according to the net load level and the upper and lower limits of synchronous generator output to perform power flow calculations and generate multiple sets of system operation scenarios with power flow convergence; for preset fault scenarios, time-domain simulation is used to obtain the transient stability label of the system. Using the preset steady-state operation characteristics of the power system as sample features, the sample features and the corresponding transient stability labels are combined to form the initial training samples.

[0009] As a further solution, the transient stability assessment model is an assessment model based on deep learning technology; the assessment model first uses a deep network to extract high-order features of the samples, and then outputs the predicted probability of the sample label being stable or unstable through the terminal classification layer.

[0010] As a further approach, boundary samples are selected based on the predicted probabilities, specifically as follows: The upper bound of the boundary interval is determined based on the predicted probability of the misclassified samples. T u and the lower realm T l ; The predicted probability is located in [ T l , T u Samples within the specified interval are selected as boundary samples.

[0011] As a further approach, the local density of all non-boundary stable samples is calculated based on the higher-order features of the samples, specifically: ; in, For the first iLocal density of a sample; d ij For the first i The first sample and the first j Euclidean distance of higher-order features of each sample in the feature space; d c The cutoff distance is adaptively determined based on the distribution of distances between samples.

[0012] As a further approach, based on local density, a roulette wheel selection method is used for undersampling of non-boundary samples, specifically: The local density of a sample is mapped to the probability of the sample being deleted, and sampling is performed based on this probability to select the deleted samples; the specific probability of the sample being deleted is as follows: ; in, P i For the first i The probability that a sample is deleted. For the first i Local density of a sample; M ns This represents the total number of non-boundary stable samples in the initial training sample set.

[0013] As a further embodiment, the mask autoencoder generative adversarial network includes: a random mask generator, a GAN generator, and a GAN discriminator; wherein the GAN generator is composed of a mask autoencoder. During the pre-training phase, the selected boundary samples are used as input, and some features of the boundary samples are randomly masked. The mask information and the masked samples are input into the encoder to extract abstract feature representations. The feature representations are combined with random noise and input into the decoder to output complete boundary sample features. During the adversarial training phase, the GAN discriminator outputs a realism score of the generated samples based on the Wasserstein distance, which is used to reflect the difference between the generated samples and the real samples.

[0014] As a further solution, the loss function of the GAN generator is composed of a weighted average of adversarial loss, mask reconstruction loss, and boundary constraint loss; wherein, the boundary constraint loss is specifically: ; in, T u , T l These are the upper and lower bounds of the predicted probability used to filter boundary samples, respectively. This refers to the predicted probability output after the newly generated boundary samples are input into the trained transient stability evaluation model.

[0015] This represents the expected value of the boundary constraint loss corresponding to the generated samples, where the generated samples... The sample distribution follows the output of the generator. .

[0016] In other embodiments, the following technical solutions are adopted: A boundary sample augmentation system for power grid transient stability assessment includes: The initial training sample set construction module is used to construct the initial training sample set required for training the transient stability assessment model based on historical operating data and day-ahead forecast data of new energy sources and loads. The boundary sample filtering module is used to train the transient stability assessment model using the initial training sample set, use the trained transient stability assessment model to predict the initial training samples, obtain the predicted probability of the transient stable state of each sample, and filter boundary samples based on the predicted probability. The sample undersampling module is used to calculate the local density of all non-boundary stable samples based on the high-order features of the samples. Based on the local density, the roulette wheel selection method is used to undersample the non-boundary samples. The boundary sample generation module is used to train the masked autoencoder generative adversarial network using the selected boundary samples to generate new unlabeled boundary samples. The boundary sample enhancement module is used to perform power flow calculation verification on the new boundary samples, and to obtain sample labels using time-domain simulation technology. The new samples that pass the verification are added to the undersampled training sample set to achieve boundary sample enhancement.

[0017] In other embodiments, the following technical solutions are adopted: A terminal device includes a processor and a memory, the processor being used to implement instructions; the memory being used to store multiple instructions adapted to be loaded and executed by the processor to perform the boundary sample augmentation method for power grid transient stability assessment described above.

[0018] Compared with the prior art, the beneficial effects of the present invention are: This invention employs a boundary sample screening method based on model output prediction probability, which can effectively identify samples located near the classification decision boundary of the transient stability evaluation model, providing a reliable training data foundation for boundary sample generation and enhancement.

[0019] This invention generates boundary samples based on a masked autoencoder generative adversarial network (MAEGAN). By pre-training through mask reconstruction, the generator can learn the correlation between power system sample features when generating samples, thereby improving the rationality of the generated samples.

[0020] Other features and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0021] Figure 1 This is a flowchart of the boundary sample enhancement method for power grid transient stability assessment in an embodiment of the present invention; Figure 2 This is a schematic diagram of the undersampling process for non-boundary stable samples in an embodiment of the present invention; Figure 3 This is a schematic diagram of the masked autoencoder generative adversarial network structure in an embodiment of the present invention. Detailed Implementation

[0022] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0023] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0024] Example 1 To address the problem of insufficient model accuracy in transient stability assessment, specifically the scarcity of samples near the decision boundary, as mentioned in the background section, sample augmentation methods are used. This involves generating more boundary samples to add to the training sample set, thereby improving model accuracy. Generative adversarial networks (GANs) and their variants, such as deep convolutional generative adversarial networks (DCGANs), Wasserstein generative adversarial networks with gradient penalty (WGAN-GP), and least squares generative adversarial networks (LSGANs), can learn the deep distribution characteristics of existing sample data during adversarial training between the generator and discriminator, thus generating new samples similar to existing samples. These methods are widely used in sample augmentation. However, due to the spatiotemporal correlation between renewable energy output and load power, complex statistical correlations exist between power system sample features. Traditional GANs often fail to fully learn these statistical correlations, resulting in an inability to effectively generate high-quality boundary samples that improve the accuracy of the assessment model.

[0025] Based on this, in one or more embodiments, a boundary sample enhancement method for power grid transient stability assessment is disclosed, combining... Figure 1 Specifically, it includes the following process: S101: Based on historical operating data and day-ahead forecast data of new energy sources and loads, construct the initial training sample set required for training the transient stability assessment model.

[0026] The data-driven transient stability assessment problem of power systems can be viewed as a classification problem, and boundary samples play a crucial role in constructing the classification decision boundary of the model. To achieve boundary sample augmentation, it is necessary to generate an initial training sample set, select boundary samples from the initial training sample set, and use the selected boundary samples to train a GAN, thereby achieving boundary sample augmentation.

[0027] In this embodiment, the process of generating the initial training sample set is as follows: S1011: Based on historical operating data and day-ahead forecast data of new energy sources and loads, the output of synchronous generators is adjusted according to the net load level and the upper and lower limits of synchronous generator output to perform power flow calculations and generate multiple sets of system operation scenarios with power flow convergence.

[0028] For anticipated fault scenarios, such as a three-phase short circuit in the line, time-domain simulation is used to obtain the transient stability label of the system.

[0029] The steady-state operation characteristics of the power system, such as source load power and bus voltage, are extracted as sample features. The sample features and the corresponding transient stability labels are combined to form the initial training samples, and then the initial training sample set is constructed.

[0030] In this embodiment, the transient stability label can be selected according to actual application requirements, such as using the transient stability index (TSI), i.e.: (1) in, This represents the maximum rotor angle difference between any two synchronous generators in the system during the transient process. This is the rotor angle offset threshold, typically set to 180° or 360°; For transient stability exponent, when When the sample label is stable, it is considered stable; otherwise, it is considered unstable.

[0031] In this embodiment, the deep learning model has a multi-layered network structure, enabling it to learn complex features of samples and mine deeper information from the sample data. It often exhibits higher accuracy in data-driven power system transient stability assessment tasks and has been widely applied. Assessment models based on deep learning technology typically first extract high-order features of samples using deep networks, and then output the predicted probability of a sample being stable or unstable through a final classification layer. The predicted probability reflects not only the sample's category but also its position relative to the model's classification decision boundary. Therefore, this embodiment uses the predicted probability output by the model to select boundary samples.

[0032] It should be noted that the boundary sample selection based on the predicted probability of the model output does not depend on the specific front-end model structure. Therefore, it can be applied to different types of deep learning transient stability evaluation models such as stacked denoising autoencoder (SDAE), convolutional neural network (CNN), and Transformer.

[0033] S102: Train the transient stability assessment model using the initial training sample set, and use the trained transient stability assessment model to predict the initial training samples to obtain the predicted probability of the transient stable state of each sample; select boundary samples based on the predicted probability.

[0034] In this embodiment, the transient stability evaluation model is trained using the generated initial training sample set. After the model training is completed, the initial training sample set is re-evaluated to obtain the predicted probability of the transient stable state for each sample. The upper and lower bounds of the boundary interval can be determined based on the predicted probability of misclassified samples. To avoid the influence of individual outlier samples on the boundary interval division, this invention uses quantile statistics to determine the upper and lower bounds of the boundary interval. (2) (3) in, , These are the lower and upper bounds of the boundary interval, respectively; ( ), These are quantile functions; α and β quantile coefficient, used to control the cutoff ratio of outlier samples on both sides; For the first i The predicted probability of each sample is output by the transient stability assessment model; For the first i The true transient stable label of each sample; The value for the classification boundary is typically 0.5 in binary classification problems.

[0035] Ultimately, the predicted probability is located at [ , Samples within the specified interval are selected as boundary samples.

[0036] S103: Calculate the local density of all non-boundary stable samples based on the high-order features of the samples, and use the roulette wheel selection method to undersample the non-boundary samples based on the local density.

[0037] Because of the robust structure of the power system grid, the probability of the power system remaining stable after a conventional fault is much greater than the probability of instability. This leads to an imbalance between the number of stable and unstable samples in the initial training sample set, which in turn causes the evaluation model to tend to evaluate unstable samples as stable samples, reducing the model's ability to fit the decision boundary.

[0038] To address this issue, this embodiment first undersamples the non-boundary stable samples in the training set based on the local density of the samples before performing boundary sample augmentation, in order to alleviate the problem of sample imbalance.

[0039] This embodiment uses a deep network of a deep learning transient stability evaluation model to extract high-order features of samples; calculates the Euclidean distance between samples based on the high-order features; and calculates the local density of non-boundary stable samples based on the Euclidean distance between samples. The local density of samples characterizes the degree of aggregation of samples in the feature space.

[0040] The formula for calculating the local density of a sample is: (4) in, For the first i Local density of a sample; For the first i The first sample and the first j The Euclidean distance of sample features in feature space for each sample; The cutoff distance is adaptively determined based on the distribution of distances between samples. For example, the Euclidean distances between samples are sorted from smallest to largest, and the values ​​corresponding to the top 1% of distances are selected as the cutoff distances.

[0041] Because power system samples have high dimensionality and contain redundant information that is weakly relevant to the classification task, directly calculating the Euclidean distance between samples based on these high-dimensional features is not reliable. Therefore, this embodiment uses high-order features extracted from the deep network of a deep learning transient stability assessment model to calculate the Euclidean distance between samples, thereby improving the effectiveness of density estimation.

[0042] This embodiment uses a non-boundary stable sample undersampling method based on local density, as follows: Figure 2 As shown, it specifically includes: After selecting non-boundary stable samples from the initial training sample set using a transient stability evaluation model, the local density of all non-boundary stable samples is first calculated based on their higher-order features. To avoid deleting all samples in high-density regions, which would disrupt the overall distribution of the initial training sample data, a roulette wheel selection method is used to select the samples to be deleted.

[0043] The roulette wheel selection method maps the local density of samples to the probability of a sample being deleted, and then samples are selected based on this probability. This makes samples with a higher probability of deletion more likely to be selected, but they may still be retained. The probability of a sample being deleted is: (5) in, For the first i The probability that a sample is deleted; For the first i Local density of a sample; This represents the total number of non-boundary stable samples in the initial training sample set.

[0044] The undersampling ends when the number of stable and unstable samples in the training sample set is equal.

[0045] This embodiment proposes a non-boundary stable sample undersampling method based on local sample density, which can effectively alleviate the imbalance between the number of stable and unstable samples in the power system while preserving the overall distribution of the initial training sample data, thereby improving the fitting ability of the transient stability assessment model to the decision boundary.

[0046] S104: Use the selected boundary samples to train the masked autoencoder generative adversarial network to generate new unlabeled boundary samples.

[0047] In this embodiment, due to the spatiotemporal correlation between renewable energy output and load power, complex statistical correlations exist among the power system sample features. To learn the statistical correlations among the power system sample features, this embodiment proposes a masked autoencoder generative adversarial network (MAEGAN), the structure of which is as follows: Figure 3 As shown, it specifically includes: a random mask generator, a GAN generator, and a GAN discriminator; wherein, the GAN generator is composed of a masked autoencoder (MAE), which learns the statistical correlation between power system sample features by performing mask reconstruction pre-training on the generator before entering adversarial training; the discriminator outputs the authenticity score of the samples generated by the generator based on the Wasserstein distance, which is used to reflect the difference between the generated samples and the real samples.

[0048] Before entering the adversarial training phase, the generator is first pre-trained, that is, using the mask reconstruction task of MAE, so that the generator can complete the masked features under the condition that some unmasked features are known, thereby learning the correlation between the features of power system samples.

[0049] During the pre-training phase, using the boundary samples selected by the transient stability evaluation model as input, the first step is to randomly mask some features of the boundary samples and then apply the masking information. m and masked samples x masked Input encoder f g Abstract feature representations are extracted. To increase the diversity of generated samples, the extracted feature representations are mixed with random noise. n Combination, input decoder d g Output complete boundary sample features.

[0050] MAE mask reconstruction loss function L m for: (6) in, E For mathematical expectation operators; Features of boundary samples in the initial training sample set; for Data distribution; The dimension of the masked sample features; For the first i The first initial sample j The values ​​of the features masked in the dimension; For the corresponding generated sample, the first j The values ​​of the dimensional features.

[0051] During the adversarial training phase, to improve training stability and alleviate the vanishing gradient problem, the discriminator outputs a authenticity score for the samples generated by the generator based on the Wasserstein distance, reflecting the difference between the generated samples and the real samples. The adversarial losses for the discriminator and generator are defined as follows: (7) (8) in, L D The discriminator loss function; L adv The adversarial loss function for the generator; Features of boundary samples generated by the generator; for Data distribution D ( The score is the discrimination score output by the discriminator. for and Interpolation samples between; The discriminator outputs information about the input samples. x′ The gradient; This represents the gradient penalty coefficient.

[0052] To enable the generator to continuously learn the correlations between features of real samples, the mask reconstruction loss still participates in the joint optimization during the adversarial training phase. Furthermore, to guide the samples generated by the generator to lie within the decision boundary of the transient stability evaluation model, the generated samples are input into the already trained transient stability evaluation model, which outputs predicted probabilities. y gen Construct boundary constraint loss L B : (9) In the formula, T l and T u These are the lower and upper bounds of the boundary interval, respectively.

[0053] The generator's loss function includes adversarial loss, mask reconstruction loss, and boundary constraint loss, which are weighted and combined during training. The adversarial loss guides the generated samples to approximate the data distribution of the true boundary samples; the mask reconstruction loss enhances the generator's ability to learn the statistical correlations between power system sample features; and the boundary constraint loss guides the generated samples to lie near the classification decision boundary of the transient stability assessment model.

[0054] Specifically, the final loss function of the generator is as follows: (10) in, L G The total loss function of the generator; and These are the weight coefficients for the mask reconstruction loss and the boundary constraint loss, respectively. Indicates the mask reconstruction loss. L adv This is the adversarial loss function for the generator.

[0055] This embodiment introduces a boundary constraint-related loss function in the adversarial training phase of MAEGAN, so that the generated samples can be effectively distributed within the classification decision boundary interval of the transient stability evaluation model, thereby improving the fitting ability of the transient stability evaluation model to the decision boundary.

[0056] S105: Perform power flow calculation verification on the new boundary samples, and use time-domain simulation technology to obtain sample labels. Add the new samples that pass the verification to the undersampled training sample set to achieve boundary sample enhancement.

[0057] In this embodiment, the non-boundary samples retained after undersampling, the boundary samples selected from the initial training sample set, and the new boundary samples generated by MAEGAN and verified by power flow calculation and obtained by time-domain simulation to obtain transient stability labels are jointly constructed into a new training sample set. The non-boundary samples selected by undersampling are deleted from the training sample set to alleviate the imbalance between the number of stable and unstable samples in the training sample set.

[0058] Specifically, a transient stability evaluation model is first trained using an initial training sample set, and boundary samples are selected based on the predicted probabilities output by the transient stability evaluation model. Then, the selected boundary samples are used as training data input to MAEGAN, which takes boundary constraint loss into account, and the MAEGAN generator is used to generate new unlabeled boundary samples.

[0059] To ensure that the new boundary samples added to the training sample set satisfy the power flow equation constraints of the power system, power flow calculation methods such as the Newton-Raphson method or PQ decomposition are used to verify the new boundary samples generated by MAEGAN through power flow calculation. New boundary samples with convergent power flow are retained, while those with non-convergent power flow are deleted. For new boundary samples with convergent power flow, time-domain simulation technology is used to obtain their transient stability labels, and new boundary samples with labels are added to the training sample set to achieve sample augmentation.

[0060] The number of new boundary samples added to the training sample set is determined by the hyperparameter. N add Control is determined based on the classification performance of the transient stability assessment model on the validation set. Specifically: (1) A certain number of samples are generated as a validation set using the same method as the method used to generate the initial training sample set.

[0061] (2) For the initial training sample set, firstly, non-boundary stable samples are undersampled based on the local sample density, and then boundary samples are augmented based on MAEGAN, which takes into account the boundary constraint loss. The number of new boundary samples in the training sample set after undersampling is... N add Take multiple sets of different values ​​to construct multiple new training sets.

[0062] (3) Retrain the transient stability evaluation model with multiple new training sample sets respectively, and use the validation set to test the classification performance of the transient stability evaluation model. For example, use accuracy and unstable sample recall as test indicators for comparison.

[0063] (4) Store the transient stability assessment model with the best classification performance on the validation set for online application of power grid transient stability assessment.

[0064] The method in this embodiment can avoid insufficient improvement in the accuracy of the transient stability evaluation model due to too few new boundary samples added to the training sample set, and at the same time, it can avoid the overall data distribution of the training sample set being shifted due to too many new boundary samples added to the training sample set, thereby reducing the evaluation accuracy of the model.

[0065] In the online application phase, future operating modes are generated based on renewable energy output forecast information, load forecast information, and scheduling plans, and a sample set to be evaluated is constructed. The transient stability assessment model, trained and stored offline, is used to quickly evaluate the sample set, outputting transient stability judgment results for dispatchers.

[0066] This embodiment uses power flow calculation to verify the boundary samples generated by MAEGAN, and determines the number of new boundary samples to be added to the training sample set based on the classification performance of the model on the validation set, which can improve the reliability and engineering practicality of the sample augmentation results.

[0067] Example 2 In one or more embodiments, a boundary sample enhancement system for power grid transient stability assessment is disclosed, specifically including: The initial training sample set construction module is used to construct the initial training sample set required for training the transient stability assessment model based on historical operating data and day-ahead forecast data of new energy sources and loads. The boundary sample filtering module is used to train the transient stability assessment model using the initial training sample set, use the trained transient stability assessment model to predict the initial training samples, obtain the predicted probability of the transient stable state of each sample, and filter boundary samples based on the predicted probability. The sample undersampling module is used to calculate the local density of all non-boundary stable samples based on the high-order features of the samples. Based on the local density, the roulette wheel selection method is used to undersample the non-boundary samples. The boundary sample generation module is used to train the masked autoencoder generative adversarial network using the selected boundary samples to generate new unlabeled boundary samples. The boundary sample enhancement module is used to perform power flow calculation verification on the new boundary samples, and to obtain sample labels using time-domain simulation technology. The new samples that pass the verification are added to the undersampled training sample set to achieve boundary sample enhancement.

[0068] It should be noted that the specific implementation methods of the above modules are exactly the same as those in Example 1, and will not be described in detail again.

[0069] Example 3 In one or more embodiments, a terminal device is disclosed, comprising a processor and a memory, wherein the processor is used to implement instructions; and the memory is used to store multiple instructions adapted to be loaded by the processor and executed by the processor for the boundary sample augmentation method for power grid transient stability assessment as described in Embodiment 1.

[0070] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any other conventional processor.

[0071] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, memory may also store information about the device type.

[0072] In the implementation process, each step of the above method can be completed by the integrated logic circuits in the processor hardware or by software instructions.

[0073] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A boundary sample augmentation method for power grid transient stability assessment, characterized in that, include: Based on historical operating data and day-ahead forecast data of new energy sources and loads, an initial training sample set is constructed to be required for training the transient stability assessment model. The transient stability assessment model is trained using the initial training sample set. The trained transient stability assessment model is then used to predict the transient stability state of the initial training samples to obtain the predicted probability of each sample's transient stability state. Boundary samples are then selected based on the predicted probabilities. The local density of all non-boundary stable samples is calculated based on the high-order features of the samples. Based on the local density, the roulette wheel selection method is used to undersample the non-boundary samples. The selected boundary samples are used to train the masked autoencoder generative adversarial network to generate new unlabeled boundary samples. The new boundary samples are tested by power flow calculation, and the sample labels are obtained by time-domain simulation technology. The new samples that pass the test are added to the training sample set after undersampling to achieve boundary sample enhancement.

2. The boundary sample augmentation method for power grid transient stability assessment as described in claim 1, characterized in that, The method for constructing the initial training sample set is as follows: Based on historical operating data and day-ahead forecast data of new energy sources and loads, the output of synchronous generators is adjusted according to the net load level and the upper and lower limits of synchronous generator output to perform power flow calculations and generate multiple sets of system operation scenarios with power flow convergence; for preset fault scenarios, time-domain simulation is used to obtain the transient stability label of the system. Using the preset steady-state operation characteristics of the power system as sample features, the sample features and the corresponding transient stability labels are combined to form the initial training samples.

3. The boundary sample augmentation method for power grid transient stability assessment as described in claim 1, characterized in that, The transient stability assessment model is an assessment model based on deep learning technology. The assessment model first uses a deep network to extract high-order features of the samples, and then outputs the predicted probability of the sample label being stable or unstable through the terminal classification layer.

4. The boundary sample augmentation method for power grid transient stability assessment as described in claim 1, characterized in that, The boundary samples are selected based on the predicted probabilities, specifically as follows: The upper bound of the boundary interval is determined based on the predicted probability of the misclassified samples. T u and the lower realm T l ; The predicted probability is located in [ T l , T u Samples within the specified interval are selected as boundary samples.

5. The boundary sample augmentation method for power grid transient stability assessment as described in claim 1, characterized in that, The local density of all non-boundary stable samples is calculated based on the higher-order features of the samples, specifically as follows: ; in, For the first i Local density of a sample; d ij For the first i The first sample and the first j Euclidean distance of higher-order features of each sample in the feature space; d c The cutoff distance is adaptively determined based on the distribution of distances between samples.

6. The boundary sample augmentation method for power grid transient stability assessment as described in claim 1, characterized in that, Based on local density, a roulette wheel selection method is used for undersampling of non-boundary samples, specifically: The local density of a sample is mapped to the probability of the sample being deleted, and sampling is performed based on this probability to select the deleted samples; the specific probability of the sample being deleted is as follows: ; in, P i For the first i The probability that a sample is deleted. For the first i Local density of a sample; M ns This represents the total number of non-boundary stable samples in the initial training sample set.

7. The boundary sample augmentation method for power grid transient stability assessment as described in claim 1, characterized in that, The mask autoencoder generative adversarial network includes: a random mask generator, a GAN generator, and a GAN discriminator; wherein, the GAN generator is composed of a mask autoencoder. During the pre-training phase, the selected boundary samples are used as input, and some features of the boundary samples are randomly masked. The mask information and the masked samples are input into the encoder to extract abstract feature representations. The feature representations are combined with random noise and input into the decoder to output complete boundary sample features. During the adversarial training phase, the GAN discriminator outputs a realism score of the generated samples based on the Wasserstein distance, which is used to reflect the difference between the generated samples and the real samples.

8. The boundary sample augmentation method for power grid transient stability assessment as described in claim 1, characterized in that, The loss function of the GAN generator is a weighted sum of adversarial loss, mask reconstruction loss, and boundary constraint loss; wherein, the boundary constraint loss is specifically: ; in, T u , T l These are the upper and lower bounds of the predicted probability used to filter boundary samples, respectively. The predicted probability output after the newly generated boundary samples are input into the trained transient stability evaluation model; This represents the expected value of the boundary constraint loss corresponding to the generated samples, where the generated samples... The sample distribution follows the output of the generator. .

9. A boundary sample augmentation system for power grid transient stability assessment, characterized in that, include: The initial training sample set construction module is used to construct the initial training sample set required for training the transient stability assessment model based on historical operating data and day-ahead forecast data of new energy sources and loads. The boundary sample filtering module is used to train the transient stability assessment model using the initial training sample set, use the trained transient stability assessment model to predict the initial training samples, obtain the predicted probability of the transient stable state of each sample, and filter boundary samples based on the predicted probability. The sample undersampling module is used to calculate the local density of all non-boundary stable samples based on the high-order features of the samples. Based on the local density, the roulette wheel selection method is used to undersample the non-boundary samples. The boundary sample generation module is used to train the masked autoencoder generative adversarial network using the selected boundary samples to generate new unlabeled boundary samples. The boundary sample enhancement module is used to perform power flow calculation verification on the new boundary samples, and to obtain sample labels using time-domain simulation technology. The new samples that pass the verification are added to the undersampled training sample set to achieve boundary sample enhancement.

10. A terminal device comprising a processor and a memory, the processor for implementing instructions; the memory for storing multiple instructions, characterized in that, The instructions are adapted to be loaded by a processor and executed as the boundary sample augmentation method for power grid transient stability assessment according to any one of claims 1-8.