Generation method and device of transient stability simulation sample of power system
By acquiring initial samples of the power system, extracting steady-state features and fault vectors, and using the ACGAN model to generate and merge samples, the problem of insufficient sample diversity and balance in power system transient stability analysis is solved, providing high-quality simulation sample support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the diversity and distribution balance of sample generation in power system transient stability analysis are insufficient, resulting in poor usability of samples in the analysis.
By acquiring initial samples under different operating scenarios of the power system, extracting steady-state feature vectors and preset fault vectors, determining the generated sample type and fault type based on transient stability quantification indicators, generating corresponding transient stability simulation samples using the ACGAN model, and merging them with the initial samples to ensure the diversity and balance of sample distribution.
It enables the generation of targeted power system transient stability simulation samples, solves the problem of uneven coverage in traditional sample libraries, and provides high-quality sample data to support system transient stability analysis.
Smart Images

Figure CN121809221A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power grid technology, specifically to a method and apparatus for generating transient stability simulation samples of power systems. Background Technology
[0002] Transient stability analysis is a crucial function in power system analysis and control. With the increasing availability of new energy sources and the continuous expansion of power grids, the difficulty of power system transient stability analysis is constantly rising, making the use of artificial intelligence methods a key focus for researchers. However, due to the safety requirements of actual power system operation, the available simulation samples are often stable, leading to data imbalance. Furthermore, due to the complexity of power systems, the number of possible combinations of power system operating scenarios explodes, making it difficult to generate transient stability simulation samples with specific transient stability margins or balanced feature distributions.
[0003] In related technologies, there are existing methods for generating power system fault samples and building models based on transfer learning. These methods obtain transient stable samples based on fault boundary time. However, these methods suffer from time-consuming calculations of fault boundary time and do not specifically consider the diversity of sample generation. There are also key transient sample enhancement methods and systems based on diffusion models. These methods determine key samples by pre-setting sensitive regions of transient stability assessment classification boundaries and enhance samples using a diffusion model guided by a classifier. However, these methods do not take into account the balance of sample distribution. Summary of the Invention
[0004] This application aims to at least address the technical problem in related technologies that the lack of consideration for the diversity of sample generation and the insufficient consideration for the balance of sample distribution leads to poor usability of the generated samples in power system transient stability analysis.
[0005] To address the aforementioned technical problems, embodiments of this application provide a method for generating transient stability simulation samples of a power system, comprising:
[0006] Acquire initial samples under different operating scenarios of the power system, wherein the initial samples include initial feature vectors and transient stability quantification indicators;
[0007] Extract the steady-state feature vector and the preset fault vector from the initial feature vector;
[0008] Based on the steady-state feature vector and the transient stability quantification index, determine the type of generated sample to be generated;
[0009] The preset fault type of the sample to be generated is determined based on the preset fault vector.
[0010] Input the generated sample type and the preset fault type into the preset generator model to generate the corresponding first transient stability simulation sample;
[0011] The first transient stable simulation sample is merged with the initial sample to obtain the second transient stable simulation sample.
[0012] In some embodiments, based on the steady-state feature vector and the transient stability quantization index, the type of generated sample to be generated is determined, including:
[0013] The initial sample is divided into grids based on the steady-state feature vector, and the statistical results of the samples within the grids are determined based on the transient stability quantification index.
[0014] The required sample category labels are determined based on the statistical results of the samples.
[0015] The type of the generated sample is determined based on the sample category label.
[0016] In some embodiments, before performing grid division on the initial sample, the method further includes:
[0017] The steady-state feature vector is preprocessed to obtain a standardized standard steady-state feature vector;
[0018] The standard steady-state feature vector is reduced in dimensionality using the principal component analysis algorithm, transforming it into a two-dimensional feature vector.
[0019] In some embodiments, the steady-state feature vector is preprocessed, including:
[0020] Perform mean-variance standardization on all steady-state feature vectors in the initial sample;
[0021] Based on the mean-variance standardization results of each steady-state feature vector, the standardized steady-state feature vector is obtained.
[0022] In some embodiments, the initial samples are divided into grids based on the steady-state feature vectors, and the statistical results of the samples within the grids are determined based on the transient stability quantization index, including:
[0023] The space of the two-dimensional feature is divided into a grid;
[0024] After the statistical grid is divided, the total number of samples in each sample interval of the initial sample and the variance of the transient stability quantification index are obtained.
[0025] Based on the preset sample size threshold and the preset variance threshold, sample statistics are performed to determine the target samples to be generated and the sample interval in which they are located.
[0026] In some embodiments, the method further includes constructing the generator model based on the ACGAN model, wherein the construction of the generator model includes:
[0027] Obtain a training sample set, wherein the training sample set includes a preset number of training samples;
[0028] The generated sample type of the training samples is one-hot encoded and concatenated with the one-hot encoding of the fault location to obtain a joint condition vector.
[0029] The joint conditional vector and Gaussian noise are determined as the inputs to the generator of the ACGAN model, and the output of the generator is determined as the steady-state feature vector;
[0030] The input of the discriminator of the ACGAN model is determined to be the candidate features of the power system operation scenario, and the output of the discriminator is the probability distribution of the true and false samples and the probability distribution of the category label of the sample. The candidate features include the steady-state feature vector.
[0031] The ACGAN model is trained using the training sample set and a preset number of candidate feature sets to obtain the generator model.
[0032] In some embodiments, the generated sample type and the preset fault type are input into a preset generator model to generate a corresponding first transient stability simulation sample, including:
[0033] The generated sample type and the preset fault type are respectively one-hot encoded and then concatenated to obtain a joint condition vector;
[0034] The Gaussian noise and the joint conditional vector are input into the generator, and a first steady-state feature vector is output, wherein the first steady-state feature vector is a feature vector for the preset fault type and the generated sample type;
[0035] The first steady-state eigenvector is denormalized to obtain the second steady-state eigenvector;
[0036] Power flow calculation is performed based on the second steady-state feature vector to obtain the first transient stability simulation sample;
[0037] The first transient stable simulation sample and the initial sample are merged to obtain the second transient stable simulation sample.
[0038] In some embodiments, power flow calculation is performed based on the second steady-state feature vector to obtain a first transient stability simulation sample, including:
[0039] If the power flow calculation converges, transient simulation is performed based on the second steady-state feature vector to obtain the transient stability quantification index.
[0040] The transient stability simulation sample is obtained based on the transient stability quantification index.
[0041] In some embodiments, obtaining transient stability quantitative indicators under different operating scenarios of the power system includes:
[0042] Based on power flow calculation and transient stability simulation, the transient stability of the power system after a preset fault occurs under different operating scenarios is simulated.
[0043] The transient stability quantification index is determined based on the maximum relative power angle difference between the generators during the transient stability simulation.
[0044] This application embodiment also provides a device for generating power system transient stability simulation samples, including:
[0045] The acquisition module is configured to acquire initial samples under different operating scenarios of the power system, wherein the initial samples include initial feature vectors and transient stability quantification indicators.
[0046] The extraction module is configured to extract the steady-state feature vector and the preset fault vector from the initial feature vector;
[0047] The first determining module is configured to determine the type of generated sample based on the steady-state feature vector and the transient stability quantification index.
[0048] The second determining module is configured to determine the preset fault type of the sample to be generated based on the preset fault vector;
[0049] The generation module is configured to input the generated sample type and the preset fault type into a preset generator model to generate the corresponding first transient stable simulation sample.
[0050] The merging module is configured to merge the first transient stable simulation sample with the initial sample to obtain a second transient stable simulation sample.
[0051] This application also provides an electronic device, which includes at least a processor and a memory. The memory stores a computer program, and the processor executes the computer program in the memory to implement the above-described method for generating power system transient stability simulation samples.
[0052] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for generating power system transient stability simulation samples.
[0053] The method and apparatus for generating power system transient stability simulation samples provided in this application obtain initial samples under different operating scenarios of the power system. The initial samples include initial feature vectors and transient stability quantification indicators. Steady-state feature vectors and preset fault vectors are extracted from the initial feature vectors. Based on the steady-state feature vectors and the transient stability quantification indicators, the required sample generation type is determined. Based on the preset fault vectors, a preset fault type for the required sample generation is determined. The sample generation type and the preset fault type are input into a preset generator model to generate a corresponding first transient stability simulation sample. The first transient stability simulation sample is merged with the initial sample to obtain a second transient stability simulation sample. The sample generation comprehensively considers the diversity of sample generation and the balance of sample distribution. By inputting initial samples containing preset fault types and sample generation types into the generator model, the attributes of the generated samples can be precisely controlled, and the required power system transient stability simulation samples can be generated specifically. This effectively solves the problem of unbalanced coverage in traditional sample libraries, ensuring that the samples have a balanced distribution in both feature and category, and providing reliable, high-quality sample data for system transient stability analysis. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a flowchart illustrating the method for generating power system transient stability simulation samples according to an embodiment of this application;
[0056] Figure 2 This is a flowchart illustrating the construction process of the generator model for the power system transient stability simulation sample generation system according to an embodiment of this application.
[0057] Figure 3 This is a schematic diagram of the structure of the device for generating power system transient stability simulation samples according to an embodiment of this application. Detailed Implementation
[0058] Various embodiments and features of this application are described herein with reference to the accompanying drawings.
[0059] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.
[0060] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0061] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.
[0062] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application, which have the features described in the claims and are therefore all within the scope of protection defined herein.
[0063] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.
[0064] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.
[0065] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.
[0066] Example 1
[0067] Figure 1 A flowchart illustrating a method for generating power system transient stability simulation samples according to an embodiment of this application is shown. Figure 1 As shown in the embodiment of this application, a method for generating transient stability simulation samples of a power system includes:
[0068] S101: Obtain initial samples under different operating scenarios of the power system. The initial samples include initial feature vectors and transient stability quantification indicators.
[0069] The initial feature vector is a multi-dimensional data set describing the operating state and fault conditions of the power system. It is an input variable characterizing the core attributes of the sample and directly determines the initial state of the transient process. The transient stability quantification index is a quantitative evaluation parameter that measures whether the power system can maintain synchronous operation and restore steady state after a fault disturbance. It is the core output label of the sample (used to judge the transient stability state and stability degree of the system).
[0070] Specifically, for a power system with N generators and M loads, K operating scenarios are randomly set based on the historical operation of the power system and load forecasts. For example, in one embodiment of this application, a 10-generator 39-node system is used, with N=10 generators, M=30 loads, and K set to 20000.
[0071] Obtain initial feature vectors for K operating scenarios, including steady-state feature vectors and preset fault vectors. The steady-state feature vectors contain 2(N+M) features, including: the active power and terminal voltage of N generators, and the active power and reactive power of M loads.
[0072] The preset fault vectors are encoded using one-hot encoding. In one embodiment of this application, there are a total of 80 initial feature vectors, and the preset fault vectors contain 34 types of faults.
[0073] One-hot encoding is a common encoding method for categorical variables. Its core is to convert discrete features with n different categories into a binary vector of length n (with only one element being 1 and the rest being 0).
[0074] Optionally, in step S101, the transient stability quantitative indicators under different operating scenarios of the power system are obtained, including:
[0075] S201: Simulate the transient stability of the power system after a preset fault occurs under different operating scenarios based on power flow calculation and transient stability simulation calculation;
[0076] S202: Based on the maximum relative power angle difference between each generator during the transient stability simulation, determine the transient stability quantification index.
[0077] Specifically, power system simulation calculations based on power flow calculations and transient stability simulations are used to analyze power system performance. K The transient stability after a preset fault occurs under a certain operating scenario is simulated. The transient stability quantification index is calculated based on the maximum relative power angle difference between generators during the simulation. k Transient stability quantitative indicators under various operating scenarios η k :
[0078]
[0079] Among them, |Δ δ | max_k Indicates the first k The maximum absolute value of the power angle difference between any two generators under a given operating scenario.
[0080] S102: Extract the steady-state feature vector and the preset fault vector from the initial feature vector.
[0081] Specifically, in step S101, an initial feature vector is obtained, including a steady-state feature vector and a preset fault vector. The steady-state feature vector and the preset fault vector are extracted respectively to complete the determination of the subsequent generated sample type and preset fault type.
[0082] S103: Based on the steady-state feature vector and the transient stability quantification index, determine the type of generated sample to be generated.
[0083] In this step, the steady-state feature vector extracted in step S102 is first preprocessed to convert it into two-dimensional data; then, through grid partitioning, each dimension is divided into... n A total of intervals were obtained. n × n The system first divides the data into several intervals and then calculates the total number of samples and the variance of the transient stability quantification index in each interval. Next, by setting a sample size threshold and a variance threshold, the system compares these values to determine the number of samples that need to be generated. f One interval; finally, f The samples in one interval are labeled as follows f One generated sample type.
[0084] Among them, the type of sample to be generated is... f A sample from one interval.
[0085] S104: Determine the preset fault type of the sample to be generated based on the preset fault vector.
[0086] Specifically, a preset fault type is obtained based on the category of the preset fault vector extracted in step S102, and the number of samples is set as one of the inputs to the preset generator model.
[0087] S105: Input the generated sample type and the preset fault type into the preset generator model to generate the corresponding first transient stable simulation sample.
[0088] In this step, the generated sample type and the preset fault type obtained in steps S103 and S104 are concatenated to obtain a joint condition vector, which is then input into the preset generator model to generate the first transient stable simulation sample.
[0089] S106: Merge the first transient stable simulation sample with the initial sample to obtain the second transient stable simulation sample.
[0090] In this step, the first transient stable simulation sample obtained in step S105 is merged with the initial sample to finally obtain the second transient stable simulation sample.
[0091] The method for generating power system transient stability simulation samples provided in this application involves acquiring initial samples under different operating scenarios of the power system. These initial samples include initial feature vectors and transient stability quantification indicators. The method extracts steady-state feature vectors and preset fault vectors from the initial feature vectors. Based on the steady-state feature vectors and the transient stability quantification indicators, it determines the type of sample to be generated. Based on the preset fault vectors, it determines the preset fault type of the sample to be generated. The method inputs the generated sample type and the preset fault type into a preset generator model to generate a corresponding first transient stability simulation sample. The first transient stability simulation sample is merged with the initial sample to obtain a second transient stability simulation sample. This method comprehensively considers the diversity of sample generation and the balance of sample distribution during sample generation. By inputting initial samples containing preset fault types and generated sample types into the generator model, it can precisely control the attributes of the generated samples, specifically generating the required power system transient stability simulation samples. This effectively solves the problem of unbalanced coverage in traditional sample libraries, ensuring that the samples have a balanced distribution in both feature and category, and providing reliable, high-quality sample data for system transient stability analysis.
[0092] In some embodiments, step S103, based on the steady-state feature vector and the transient stability quantization index, determines the type of generated samples to be generated, including:
[0093] S1031: The initial sample is divided into grids based on the steady-state feature vector, and the statistical results of the samples within the grids are determined based on the transient stability quantification index;
[0094] S1032: Determine the required sample category labels based on the sample statistical results;
[0095] S1033: Determine the type of the generated sample based on the sample category label.
[0096] In this step, firstly, the initial samples are divided into grids based on the steady-state feature vectors; then, the statistical results of the samples within the grids are determined based on the transient stability quantization index; finally, the required generated samples are determined based on the sample statistical results. f One sample category label is used to determine the type of sample to be generated.
[0097] In this embodiment, by gridding the sample space and performing statistical analysis, key areas with sparse sample distribution or unclear transient stability characteristics are accurately identified, thereby intelligently determining the types of samples that need to be generated.
[0098] In some embodiments, before performing grid division on the initial sample in step S1031, the method further includes:
[0099] S301: Preprocess the steady-state feature vector to obtain a standardized standard steady-state feature vector;
[0100] S302: The standard steady-state feature vector is reduced in dimensionality based on the principal component analysis algorithm, transforming the standard steady-state feature vector into a two-dimensional feature.
[0101] Specifically, the steady-state feature vector is preprocessed to obtain a standardized steady-state feature vector. Principal component analysis is then performed on the standardized steady-state feature vector based on the principal component analysis algorithm to transform the standardized steady-state feature vector into a two-dimensional feature vector.
[0102] In this embodiment, standardization is the foundation of dimensionality reduction, ensuring the data quality of principal component analysis (PCA). PCA dimensionality reduction optimizes grid partitioning, reducing complexity while preserving the essential structure of the data. This preprocessing workflow lays a reliable data foundation for subsequent grid-based sample statistics and sample category label determination.
[0103] In some embodiments, step S301 involves preprocessing the steady-state feature vector, including:
[0104] S401: Standardize the mean and variance of all steady-state feature vectors in the initial sample;
[0105] S402: Based on the mean and variance standardization results of each steady-state feature vector, the standardized steady-state feature vector is obtained.
[0106] First, the mean and variance of all steady-state feature vectors in the initial sample are standardized sequentially, where the i-th feature vector in the j-th running scenario is... The standardized calculation formula is as follows:
[0107]
[0108] in, This represents the mean of the i-th feature in the steady-state feature vector across all K operating scenarios. This represents the variance of the i-th feature in the steady-state feature vector across all K operating scenarios. This represents the result of standardizing the i-th feature in the j-th running scenario.
[0109] Finally, the standardized steady-state feature vector is obtained based on the results of standardizing all features.
[0110] In some embodiments, step S1031, dividing the initial sample into grids based on the steady-state feature vector and determining the sample statistical results within the grids based on the transient stability quantization index, includes:
[0111] S501: Divide the space of the two-dimensional feature into a grid;
[0112] S502: After the statistical grid is divided, the total number of samples in each sample interval of the initial sample and the variance of the transient stability quantification index;
[0113] S503: Perform sample statistics based on the preset sample quantity threshold and the preset variance threshold to determine the target sample to be generated and its sample interval.
[0114] Specifically, firstly, the two-dimensional feature space is divided into a grid, with each dimension divided into... n A total of intervals were obtained. n × n There are several intervals, among which n The value is set manually, as in one embodiment of this application. n Set the value to 5;
[0115] Then, the total number of samples and the variance of the transient stability quantification index are calculated for each interval of the initial sample, where the total number of samples in the l-th interval is... The variance of the sample transient stability quantification index in the l-th interval is ;
[0116] Set a threshold for the number of samples and Set variance threshold The number of samples in each interval is then... With sample size threshold and Comparison, if the number of samples in the l-th interval satisfy or the variance of the transient stability quantitative indicator satisfy The above intervals correspond to regions with insufficient sample coverage, excessive sample concentration, and high uncertainty in stability assessment, respectively.
[0117] Finally, the samples in the l-th interval are designated as the samples that need to be generated, resulting in... f One interval allows for targeted follow-up... f Sample expansion was carried out in one key area.
[0118] In some embodiments, such as Figure 2 As shown, the method further includes constructing the generator model based on the ACGAN model, wherein the construction of the generator model includes:
[0119] S601: Obtain a training sample set, wherein the training sample set includes a preset number of training samples;
[0120] S602: The generated sample type of the training sample is one-hot encoded and concatenated with the one-hot encoding of the fault location to obtain a joint condition vector.
[0121] S603: Determine the joint conditional vector and Gaussian noise as the input to the generator of the ACGAN model, and determine the output of the generator as the steady-state feature vector;
[0122] S604: Determine that the input of the discriminator of the ACGAN model is the candidate features of the power system operation scenario, and the output of the discriminator is the probability distribution of the true and false samples and the probability distribution of the category label to which the sample belongs. The candidate features include the steady-state feature vector.
[0123] S605: Train the ACGAN model using the training sample set and a preset number of candidate feature sets to obtain the generator model.
[0124] ACGAN (Auxiliary Classifier Generative Adversarial Network) is an improved version of Generative Adversarial Network (GAN). Its core innovation is the introduction of an "auxiliary classifier," which forces the model to learn category information while generating samples, thereby precisely controlling the attributes of the generated samples. It is particularly suitable for scenarios that require "directed generation of samples of a specific category."
[0125] Specifically, first, a training sample set is obtained, including generated sample types and preset fault types, wherein the training sample set includes a preset number of training samples; second, the samples to be generated are... f One-hot encoding of the sample category label is performed, and then concatenated with the one-hot encoding of the fault location to obtain a joint conditional vector. c Then, set up the generator for the ACGAN model. The generator has a structure where the input to the generator is Gaussian noise z and a joint condition vector. c Through multiple stacked fully connected neural network layers, the output is a standardized steady-state feature vector. X G Next, configure the discriminator for the ACGAN model. The structure and discriminator are based on candidate features from the real scene.X Or candidate features of the synthetic scene (such as the steady-state feature vector mentioned above) X G The output consists of two predictions: the probability distribution of whether a sample is real or fake, and the probability distribution of the category label to which the sample belongs. The discriminator needs to determine whether the input features are real or generated, and also needs to identify the category label to which the input features belong. Finally, the ACGAN model is trained using the original sample set and the candidate feature set C to obtain the generator and discriminator. This is the generator used subsequently to generate samples with labels for the specified sample categories.
[0126] In some embodiments, in step S105, the generated sample type and the preset fault type are input into a preset generator model to generate a corresponding first transient stability simulation sample, including:
[0127] S1051: After performing one-hot encoding on the generated sample type and the preset fault type respectively, they are concatenated to obtain a joint condition vector;
[0128] S1052: Input the Gaussian noise and the joint condition vector into the generator and output a first steady-state feature vector, wherein the first steady-state feature vector is a feature vector for the preset fault type and the generated sample type;
[0129] S1053: Perform inverse normalization on the first steady-state eigenvector to obtain the second steady-state eigenvector;
[0130] S1054: Perform power flow calculation based on the second steady-state feature vector to obtain the first transient stability simulation sample;
[0131] S1055: Merge the first transient stable simulation sample and the initial sample to obtain the second transient stable simulation sample.
[0132] Specifically, firstly, the preset fault types and generated sample types are one-hot encoded separately and then concatenated to obtain a joint condition vector. Secondly, this vector is fed into the generator model. enter W The generator outputs a Gaussian noise z and a joint conditional vector. W A feature vector is generated for different preset faults and different sample types, wherein the first steady-state feature vector is a feature vector for the preset fault type and the generated sample type. Then, the feature vector is de-standardized to obtain... W One steady-state eigenvector, wherein the second steady-state eigenvector is obtained. W One steady-state eigenvector. Then, based on... WOne steady-state eigenvector is used for power flow calculation, and convergence is determined to obtain... W Two transient stability simulation samples are obtained, where the first transient stability simulation sample is the one obtained. W Two transiently stable simulation samples. Finally, W The two transient stable simulation samples are merged with the initial sample to obtain the final transient stable simulation sample, wherein the second transient stable simulation sample is... W The final transient stable simulation sample is obtained by merging the two transient stable simulation samples and the initial sample.
[0133] In some embodiments, step S1054 involves performing power flow calculations based on the second steady-state feature vector to obtain a first transient stability simulation sample, including:
[0134] S701: If the power flow calculation converges, transient simulation is performed based on the second steady-state feature vector to obtain the transient stability quantification index;
[0135] S702: Obtain the transient stability simulation sample based on the transient stability quantification index.
[0136] Specifically, based on W One steady-state eigenvector is used for power flow calculation. If the power flow does not converge, it indicates that the scenario itself is unreasonable, and transient simulation is discontinued. If the power flow calculation converges, it proves that the initial steady-state scenario conforms to the basic laws of power system operation, and transient simulation is meaningful. In this case, transient simulation is continued to obtain transient stability quantification indicators, ultimately yielding... W Two transiently stable simulation samples.
[0137] In this embodiment, by judging the convergence of the power flow, non-convergent scenarios are directly discarded and no further calculations are performed, thus avoiding meaningless transient simulations under invalid or erroneous initial conditions and significantly improving the efficiency of the overall sample generation process.
[0138] In summary, this application utilizes an ACGAN (Generative Adversarial Network for Auxiliary Classifiers) conditional generative model, combined with principal component analysis, grid partitioning, and statistics, to specifically generate power system transient stability simulation samples. This method, through principal component analysis dimensionality reduction, grid partitioning, and statistical screening, accurately identifies regions in the original sample set that are "insufficiently representative" (few samples) and "highly uncertain" (large variance of transient stability quantification indicators), enabling the subsequent ACGAN model to specifically generate the most needed and valuable samples. Furthermore, the ACGAN model used in this application precisely controls the attributes of the generated samples by inputting a joint conditional vector containing preset fault types and generated sample types. Moreover, users can specify the fault type and the grid distribution of the samples to directionally expand the samples under specific conditions.
[0139] Example 2
[0140] Figure 3 This is a schematic diagram of the structure of the device for generating power system transient stability simulation samples according to an embodiment of this application. Figure 3 As shown in the figure, this application embodiment provides a device for generating power system transient stability simulation samples, including:
[0141] The acquisition module 10 is configured to acquire initial samples under different operating scenarios of the power system, wherein the initial samples include initial feature vectors and transient stability quantification indicators;
[0142] Extraction module 20 is configured to extract the steady-state feature vector and the preset fault vector from the initial feature vector;
[0143] The first determining module 30 is configured to determine the type of generated sample based on the steady-state feature vector and the transient stability quantification index.
[0144] The second determining module 40 is configured to determine the preset fault type of the sample to be generated based on the preset fault vector;
[0145] The generation module 50 is configured to input the generated sample type and the preset fault type into a preset generator model to generate the corresponding first transient stable simulation sample.
[0146] The merging module 60 is configured to merge the first transient stable simulation sample with the initial sample to obtain a second transient stable simulation sample.
[0147] In some embodiments, the acquisition module 10 is further configured to:
[0148] Based on power flow calculation and transient stability simulation, the transient stability of the power system after a preset fault occurs under different operating scenarios is simulated.
[0149] The transient stability quantification index is determined based on the maximum relative power angle difference between the generators during the transient stability simulation.
[0150] In some embodiments, the first determining module 30 is further configured to:
[0151] The initial sample is divided into grids based on the steady-state feature vector, and the statistical results of the samples within the grids are determined based on the transient stability quantification index.
[0152] The required sample category labels are determined based on the statistical results of the samples.
[0153] The type of the generated sample is determined based on the sample category label.
[0154] In some embodiments, the first determining module 30 is further configured to:
[0155] The steady-state feature vector is preprocessed to obtain a standardized standard steady-state feature vector;
[0156] The standard steady-state feature vector is reduced in dimensionality using the principal component analysis algorithm, transforming it into a two-dimensional feature vector.
[0157] In some embodiments, the first determining module 30 is further configured to:
[0158] Perform mean-variance standardization on all steady-state feature vectors in the initial sample;
[0159] Based on the mean-variance standardization results of each steady-state feature vector, the standardized steady-state feature vector is obtained.
[0160] In some embodiments, the first determining module 30 is further configured to:
[0161] The space of the two-dimensional feature is divided into a grid;
[0162] After the statistical grid is divided, the total number of samples in each sample interval of the initial sample and the variance of the transient stability quantification index are obtained.
[0163] Based on the preset sample size threshold and the preset variance threshold, sample statistics are performed to determine the target samples to be generated and the sample interval in which they are located.
[0164] In some embodiments, the method further includes constructing the generator model based on the ACGAN model, wherein the generator model is configured as follows:
[0165] Obtain a training sample set, wherein the training sample set includes a preset number of training samples;
[0166] The generated sample type of the training samples is one-hot encoded and concatenated with the one-hot encoding of the fault location to obtain a joint condition vector.
[0167] The joint conditional vector and Gaussian noise are determined as the inputs to the generator of the ACGAN model, and the output of the generator is determined as the steady-state feature vector;
[0168] The input of the discriminator of the ACGAN model is determined to be the candidate features of the power system operation scenario, and the output of the discriminator is the probability distribution of the true and false samples and the probability distribution of the category label of the sample. The candidate features include the steady-state feature vector.
[0169] The ACGAN model is trained using the training sample set and a preset number of candidate feature sets to obtain the generator model.
[0170] In some embodiments, the generation module 50 is further configured to:
[0171] The generated sample type and the preset fault type are respectively one-hot encoded and then concatenated to obtain a joint condition vector;
[0172] The Gaussian noise and the joint conditional vector are input into the generator, and a first steady-state feature vector is output, wherein the first steady-state feature vector is a feature vector for the preset fault type and the generated sample type;
[0173] The first steady-state eigenvector is denormalized to obtain the second steady-state eigenvector;
[0174] Power flow calculation is performed based on the second steady-state feature vector to obtain the first transient stability simulation sample;
[0175] The first transient stable simulation sample and the initial sample are merged to obtain the second transient stable simulation sample.
[0176] In some embodiments, the generation module 50 is further configured to:
[0177] If the power flow calculation converges, transient simulation is performed based on the second steady-state feature vector to obtain the transient stability quantification index.
[0178] The transient stability simulation sample is obtained based on the transient stability quantification index.
[0179] The device for generating power system transient stability simulation samples provided in this application corresponds to the method for generating power system transient stability simulation samples in the above embodiments. Any option in the embodiments of the method for generating power system transient stability simulation samples is also applicable to the embodiments of the device for generating power system transient stability simulation samples, and will not be repeated here.
[0180] Example 3
[0181] This application also provides an electronic device, which includes at least a memory and a processor. The memory stores a computer program, and the processor executes the computer program in the memory to implement the above-described method for generating power system transient stability simulation samples.
[0182] In some embodiments, the processor executing a computer program may be a processing device that includes one or more general-purpose processing devices, such as a microprocessor, a central processing unit (CPU), a graphics processing unit (GPU), etc. More specifically, the processor may be a complex instruction set computing (CISC) microprocessor, a reduced instruction set computing (RISC) microprocessor, a very long instruction word (VLIW) microprocessor, a processor that runs other instruction sets, or a processor that runs a combination of instruction sets. The processor may also be one or more special-purpose processing devices, such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), system-on-a-chip (SoCs), etc.
[0183] The memory may be a read-only memory (ROM), random access memory (RAM), phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), electrically erasable programmable read-only memory (EEPROM), other types of random access memory (RAM), flash drives or other forms of flash memory, cache, registers, static memory, optical disc read-only memory (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape cassette or other magnetic storage devices, or any other possible non-transitory medium used to store information or instructions that can be accessed by computer equipment.
[0184] The electronic devices in this application embodiment may include, but are not limited to, fixed terminal devices such as servers, desktop computers, and digital TVs, as well as mobile terminal devices such as in-vehicle devices (e.g., head-up displays), handheld devices (e.g., mobile phones, tablets, etc.), and wearable devices (e.g., smartwatches, smart bracelets, etc.).
[0185] Example 4
[0186] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for generating power system transient stability simulation samples.
[0187] The computer-readable storage medium in this application embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. In this application embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device; for example, it can be the aforementioned memory.
[0188] The computer programs of embodiments of this application can be organized into one or more computer-executable components or modules. Various aspects of this application can be implemented with any number and combination of such components or modules. For example, aspects of this application are not limited to the specific computer-executable instructions or specific components or modules shown in the drawings and described herein. Other embodiments may include different computer-executable instructions or components having more or fewer functions than those shown and described herein.
[0189] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for generating transient stability simulation samples of a power system, characterized in that, include: Acquire initial samples under different operating scenarios of the power system, wherein the initial samples include initial feature vectors and transient stability quantification indicators; Extract the steady-state feature vector and the preset fault vector from the initial feature vector; Based on the steady-state feature vector and the transient stability quantification index, determine the type of generated sample to be generated; The preset fault type of the sample to be generated is determined based on the preset fault vector. Input the generated sample type and the preset fault type into the preset generator model to generate the corresponding first transient stability simulation sample; The first transient stable simulation sample is merged with the initial sample to obtain the second transient stable simulation sample.
2. The method for generating power system transient stability simulation samples according to claim 1, characterized in that, Based on the steady-state feature vector and the transient stability quantization index, the type of generated samples is determined, including: The initial sample is divided into grids based on the steady-state feature vector, and the statistical results of the samples within the grids are determined based on the transient stability quantification index. The required sample category labels are determined based on the statistical results of the samples. The type of the generated sample is determined based on the sample category label.
3. The method for generating power system transient stability simulation samples according to claim 2, characterized in that, Before performing grid division on the initial sample, the method further includes: The steady-state feature vector is preprocessed to obtain a standardized standard steady-state feature vector; The standard steady-state feature vector is reduced in dimensionality using the principal component analysis algorithm, transforming it into a two-dimensional feature vector.
4. The method for generating power system transient stability simulation samples according to claim 3, characterized in that, The steady-state eigenvector is preprocessed, including: Perform mean-variance standardization on all steady-state feature vectors in the initial sample; Based on the mean-variance standardization results of each steady-state feature vector, the standardized steady-state feature vector is obtained.
5. The method for generating power system transient stability simulation samples according to claim 3, characterized in that, The initial samples are divided into grids based on the steady-state feature vectors, and the statistical results of the samples within the grids are determined based on the transient stability quantification index, including: The space of the two-dimensional feature is divided into a grid; After the statistical grid is divided, the total number of samples in each sample interval of the initial sample and the variance of the transient stability quantification index are obtained. Based on the preset sample size threshold and the preset variance threshold, sample statistics are performed to determine the target samples to be generated and the sample interval in which they are located.
6. The method for generating power system transient stability simulation samples according to claim 1, characterized in that, The method further includes constructing the generator model based on the ACGAN model, wherein the construction of the generator model includes: Obtain a training sample set, wherein the training sample set includes a preset number of training samples; The generated sample type of the training samples is one-hot encoded and concatenated with the one-hot encoding of the fault location to obtain a joint condition vector. The joint conditional vector and Gaussian noise are determined as the inputs to the generator of the ACGAN model, and the output of the generator is determined as the steady-state feature vector; The input of the discriminator of the ACGAN model is determined to be the candidate features of the power system operation scenario, and the output of the discriminator is the probability distribution of the true and false samples and the probability distribution of the category label of the sample. The candidate features include the steady-state feature vector. The ACGAN model is trained using the training sample set and a preset number of candidate feature sets to obtain the generator model.
7. The method for generating power system transient stability simulation samples according to claim 6, characterized in that, Inputting the generated sample type and the preset fault type into a preset generator model generates the corresponding first transient stability simulation sample, including: The generated sample type and the preset fault type are respectively one-hot encoded and then concatenated to obtain a joint condition vector; The Gaussian noise and the joint conditional vector are input into the generator, and a first steady-state feature vector is output, wherein the first steady-state feature vector is a feature vector for the preset fault type and the generated sample type; The first steady-state eigenvector is denormalized to obtain the second steady-state eigenvector; Power flow calculation is performed based on the second steady-state feature vector to obtain the first transient stability simulation sample; The first transient stable simulation sample and the initial sample are merged to obtain the second transient stable simulation sample.
8. The method for generating power system transient stability simulation samples according to claim 7, characterized in that, Power flow calculations are performed based on the second steady-state eigenvector to obtain the first transient stability simulation sample, including: If the power flow calculation converges, transient simulation is performed based on the second steady-state feature vector to obtain the transient stability quantification index. The transient stability simulation sample is obtained based on the transient stability quantification index.
9. The method for generating power system transient stability simulation samples according to claim 1, characterized in that, Obtain transient stability quantitative indicators for different operating scenarios of the power system, including: Based on power flow calculation and transient stability simulation, the transient stability of the power system after a preset fault occurs under different operating scenarios is simulated. The transient stability quantification index is determined based on the maximum relative power angle difference between the generators during the transient stability simulation.
10. A device for generating transient stability simulation samples of a power system, characterized in that, include; The acquisition module is configured to acquire initial samples under different operating scenarios of the power system, wherein the initial samples include initial feature vectors and transient stability quantification indicators. The extraction module is configured to extract the steady-state feature vector and the preset fault vector from the initial feature vector; The first determining module is configured to determine the type of generated sample based on the steady-state feature vector and the transient stability quantification index. The second determining module is configured to determine the preset fault type of the sample to be generated based on the preset fault vector; The generation module is configured to input the generated sample type and the preset fault type into a preset generator model to generate the corresponding first transient stable simulation sample. The merging module is configured to merge the first transient stable simulation sample with the initial sample to obtain a second transient stable simulation sample.