Power grid SCR (Selective Catalytic Reduction) prediction method and equipment based on few-label data adversarial network, and medium

By constructing an adversarial network based on few labeled data, the problems of nonlinear complex mapping and data scarcity in SCR estimation are solved, and accurate SCR estimation under different operating conditions is achieved, adapting to complex power grid environments.

CN121562425APending Publication Date: 2026-02-24NANJING JUNHAI DIGITAL ENERGY TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202610069579.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing technologies face challenges in SCR estimation due to nonlinear and complex mapping relationships and data scarcity, resulting in insufficient feature extraction and inadequate model generalization ability, making it difficult to achieve accurate SCR estimation.

Method used

An adversarial network based on few labeled data is constructed. A sample set is built by collecting control error data. The adversarial network is then used for feature extraction and classification to achieve SCR estimation.

Benefits of technology

It achieves accurate SCR estimation with limited data, adapts to different operating conditions, reduces computational load, and meets control requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121562425A_ABST
    Figure CN121562425A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid SCR prediction method and device based on a few-mark data adversarial network and a medium, and the method comprises the steps: collecting control error data of a power grid system from a grid-connected or off-grid moment to a stable moment under different SCRs and different load grid-connected and off-grid working conditions in a historical time period, calculating an evaluation index through the control error data, and constructing a sample set; training and verifying the SCR estimation network by using the obtained sample set to obtain a trained SCR estimation network; the input of the SCR estimation network is each group of data in the sample set, namely ISE, ISTE, IAE, ISAE and load after weight factors are introduced, and the output of the SCR estimation network is a predicted SCR value; a trained SCR estimation network is deployed in simulation, an evaluation index is calculated according to data collected in real time, the evaluation index and a load are input into the trained SCR estimation network for real-time network training, and the purpose of outputting an SCR estimation value at any moment is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid SCR estimation technology, and in particular to a power grid SCR prediction method, device and medium based on a few-label data adversarial network. Background Technology

[0002] Traditional methods for estimating the Short-Circuit Ratio (SCR) can be divided into offline and online detection methods. Commonly used offline measurement methods include load switching, short-circuit thyristor method, and harmonic signal injection method. The load switching method involves switching purely capacitive, purely inductive, and general loads. This method is easy to implement, but because the injected harmonic current is uncontrollable, some frequency bands may have missing harmonics, affecting the accuracy of the grid impedance measurement. The short-circuit thyristor method utilizes the controllable characteristics of thyristors to measure impedance, and its structure is relatively simple. However, it cannot control the frequency of the injected harmonics, resulting in lower impedance measurement accuracy. The harmonic signal injection method is the most widely used frequency sweep method. The harmonic signal injection method has high measurement accuracy, but because it can only measure the grid impedance at one frequency point at a time, obtaining grid impedance information over a wide frequency range requires a long measurement time. Furthermore, the harmonic injection method generally requires power amplifiers, transformers, and other injection devices, making it relatively complex to implement.

[0003] Online detection methods are generally divided into active online measurement methods and passive online measurement methods. Active online measurement methods periodically inject one or more disturbance signals into the system under test, measuring grid impedance by stimulating the response of the PCC point voltage and grid-connected current. Passive online measurement methods do not require additional disturbance signals; they only utilize the inherent parameters of the power system or the excitation of its own load changes to measure grid impedance. The measurement accuracy of passive online measurement methods is closely related to the power parameters of the grid-connected system itself. When the inherent harmonics or other power parameters of the grid-connected system are not significant, the measurement accuracy of grid impedance will be greatly reduced. Furthermore, passive online measurement methods based on mathematical algorithms involve a large computational load and are relatively complex to implement. Active online measurement methods mainly achieve grid impedance measurement by superimposing disturbance signals on the control of the grid-connected inverter to stimulate the grid response.

[0004] With the large-scale grid connection of new energy power generation systems, grid strength assessment has become a key issue in ensuring the stable operation of the power system. As a core indicator for measuring grid strength, accurate SCR estimation is crucial for optimizing controller parameters, preventing system oscillations, and ensuring power quality at grid connection points. However, in practical engineering applications, SCR estimation faces two major challenges: first, grid-connected / off-grid operating conditions are complex and variable, and the system's dynamic characteristics exhibit strong nonlinearity; second, field measurement data is scarce, making it difficult to fully train traditional data-driven models.

[0005] While traditional neural networks have achieved some success in parameter estimation, they generally suffer from problems such as insufficient feature extraction and inadequate model generalization ability when the amount of data is limited and the feature coupling is complex, which can easily lead to overfitting or a decrease in estimation accuracy.

[0006] In summary, the problems existing in the current technology are as follows: 1. The dynamic responses of the SCR and converter exhibit a complex mapping relationship characterized by strong nonlinearity and multivariable coupling under different grid-connected / off-grid modes and a wide range of load disturbances. Changes in grid impedance not only alter the zero-pole distribution of the system transfer function but also induce non-monotonic changes in the control loop gain margin and phase margin, resulting in drastically different dynamic trajectories for the same load disturbance under different SCR operating conditions. This coupling characteristic makes it impossible to directly observe the SCR using traditional linearization methods or single-state variables, and field measurements often face engineering constraints such as high sensor configuration costs and time-varying grid topologies. Therefore, it is necessary to design an evaluation index system that can quantify the system's dynamic performance and indirectly reflect the characteristics of the SCR. 2. In practical engineering, it is difficult to obtain a large amount of SCR measured data covering all operating conditions. Traditional methods, adapting to various operating conditions such as grid-connected and off-grid operation, suffer a significant performance degradation when faced with shifts in operating conditions, especially within a wide range of SCR (2~20) and load (0~500kW). Traditional neural networks, due to limited samples, suffer from insufficient feature learning, poor model generalization ability, and are prone to overfitting. They cannot establish an accurate mapping between the system's dynamic response and SCR. Furthermore, the lack and difficulty in obtaining labeled data limit the feature extraction capabilities of deep learning. Summary of the Invention

[0007] Technical objective: To address the shortcomings of existing technologies, this invention discloses a power grid SCR prediction method, device, and medium based on a few-labeled data adversarial network. By constructing and training an SCR estimation network, it can achieve both online and offline SCR estimation effects.

[0008] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution.

[0009] A power grid SCR prediction method based on adversarial networks with few labeled data includes the following steps: Step 1: Collect control error data of the power grid system from the moment of grid connection or disconnection to the moment of stability under different SCRs and different load grid-connected and off-grid conditions within a historical time period. That is, the difference between the actual output and the expected output. Calculate evaluation indicators using the control error data, including the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, and the integral of time multiplied by absolute error, and construct a sample set. Each set of data in the sample set includes: integral of squared error, integral of time multiplied by squared error, integral of absolute error, integral of time multiplied by absolute error, and load, with the corresponding SCR as the label. At the same time, introduce weighting factors into each set of data in the sample set to construct the input data for the SCR estimation network. Step 2: Construct the SCR estimation network. Use the acquired sample set to train and validate the SCR estimation network to obtain the trained SCR estimation network. The SCR estimation network is an adversarial network, including a feature extractor, a generator, and a classifier. The input of the SCR estimation network is each set of data in the sample set, i.e., ISE, ISTE, IAE, ISAE and load after introducing weight factors, and the output is the predicted SCR value. Step 3: Deploy the trained SCR estimation network in the simulation. Calculate the integral of squared error, integral of time multiplied by squared error, integral of absolute error, and integral of time multiplied by absolute error based on the real-time collected data. Input the integral of squared error, integral of time multiplied by squared error, integral of absolute error, integral of time multiplied by absolute error, and load into the trained SCR estimation network for real-time network training, so as to achieve the goal of outputting the SCR estimate at any time.

[0010] Preferably, the evaluation indicators are calculated by introducing weighting factors. , The formula for calculating the number of data points in a set of input data in the sample set includes: , in, The number of data points collected corresponds to the integral of the squared error. The number of data points collected corresponds to the integral of time multiplied by the squared error. The number of data points collected corresponds to the integral of the absolute error. The number of data points collected is the time multiplied by the integral of the absolute error. These represent the weights of the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, and the integral of time multiplied by absolute error, respectively.

[0011] Preferably, the feature extractor structure includes a CNN convolutional neural network, which comprises two convolutional layers and two pooling layers, wherein the first convolutional layer, the first pooling layer, the second convolutional layer, and the second pooling layer are connected sequentially. The input to the CNN is each set of data in the sample set, namely, the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, the integral of time multiplied by absolute error, and the load. The CNN is used to extract features from the input data and output them to the generator. The generator and classifier have the same structure, both including a fully connected layer, an activation function layer, a batch normalization layer, and an output layer connected in sequence. The generator is used to receive the extracted features from the feature extractor, generate data similar to the distribution of real data, and output it to the classifier. The classifier is used to receive the data output by the generator, determine the authenticity of the data, and output the predicted SCR.

[0012] Preferably, the SCR estimation network is trained using the acquired sample set, including: Initialize the weights and biases of the feature extractor, generator, and classifier; With fixed weights for the feature extractor and generator, the classifier's weights are optimized and updated to perform gradient descent training in a way that minimizes the loss function; With fixed classifier weights and biases, the weights of the feature extractor and generator are optimized and updated to perform gradient descent training in a manner that minimizes the loss function.

[0013] Preferably, each set of data in the sample set includes: integral of squared error, integral of time multiplied by squared error, integral of absolute error, integral of time multiplied by absolute error, and load, with the corresponding SCR as a label; wherein, the load ranges from 0KW to 500KW, with a step size of 1KW, and is calibrated per unit; the SCR ranges from 2 to 20, with a step size of 1, the SCR per unit value is 20, the load per unit value is 500KW, and the per unit values ​​of integral of squared error, integral of time multiplied by squared error, integral of absolute error, and integral of time multiplied by absolute error are calibrated with the maximum value.

[0014] The present invention also discloses an electronic device, the device comprising: a memory for storing a computer program; and a processor for executing the computer program to enable the device to perform any of the above-described power grid SCR prediction methods based on a few-labeled data adversarial network.

[0015] The present invention also discloses a computer storage medium on which a computer program is stored. When the computer program is run, the device running the computer program implements any of the above-described power grid SCR prediction methods based on a few-labeled data adversarial network.

[0016] Beneficial effects: This invention constructs and trains an SCR estimation network that can achieve both online and offline SCR estimation. It utilizes the real-time estimated SCR for subsequent related control, and employs only a small amount of labeled data, thus solving the problem of difficult and cumbersome labeling in actual operating conditions. This invention also introduces weighting factors, allowing for the free allocation of the amount and proportion of data input to the network according to control indicators, reducing computational load while meeting different control requirements. Attached Figure Description

[0017] Figure 1 This is a flowchart of a power grid SCR prediction method based on a few-labeled data adversarial network according to the present invention; Figure 2 This is a data sampling diagram according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the calculation of the average index of the present invention; Figure 4 This is a schematic diagram of the SCR estimation network structure according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the SCR estimation network training process according to an embodiment of the present invention. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0019] Example As attached Figure 1 As shown in this embodiment, a power grid SCR prediction method based on a few-labeled data adversarial network includes: Step 1: Collect control error data of the power grid system from the moment of grid connection or disconnection to the moment of stability under different SCRs and different load grid-connected and off-grid conditions within a historical time period. That is, the difference between the actual output and the expected output. Calculate evaluation indicators using the control error data, including the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, and the integral of time multiplied by absolute error, and construct a sample set. Each set of data in the sample set includes: integral of squared error, integral of time multiplied by squared error, integral of absolute error, integral of time multiplied by absolute error, and load, with the corresponding SCR as the label. At the same time, introduce weighting factors into each set of data in the sample set to construct the input data for the SCR estimation network. The evaluation indicators are calculated by introducing weighting factors. ; In this embodiment, for different SCRs and different load grid-connected and off-grid operating conditions, and combined with the error integral criterion in linear control theory to measure system performance, the evaluation is carried out by the integral function of the deviation between the actual output and the expected output of the system. Four evaluation indicators, including square error integral ISE, time multiplied by square error integral ITSE, absolute error integral IAE, and time multiplied by absolute error integral ISAE, are designed as network inputs.

[0020] The integral of squared error (ISE) criterion has the following specific form: ,in, This represents the deviation between the actual output and the expected output, where t is time. In control engineering, this criterion represents using energy consumption as an evaluation of system performance. Control systems designed according to this criterion often have fast response speeds and large oscillations, resulting in relatively poor stability.

[0021] The time-squared error integral (ITSE) criterion is in the form of: The characteristic of this criterion is that it focuses on the error that occurs in the later stage of the transient response, and gives less consideration to the large initial error in the response.

[0022] The absolute error integral (IAE) criterion is in the form of: ,in express The absolute value of the value. Systems designed based on this criterion have appropriate damping and good transient response, but the drawback is that the performance indicators do not show significant changes when different system parameters are selected.

[0023] The time-integral-absolute-error (ISAE) criterion is in the form of: Control systems designed according to this criterion exhibit low transient response oscillation and good parameter selectivity. The drawback is that analytical calculations are very difficult.

[0024] This invention introduces weighting factors to adapt to different identification requirements. These represent the weights of the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, and the integral of time multiplied by absolute error, respectively. N represents the number of data points collected for each indicator. The resulting formula is as follows: , in, The number of data points collected corresponds to the integral of the squared error. The number of data points collected corresponds to the integral of time multiplied by the squared error. The number of data points collected corresponds to the integral of the absolute error. The number of data points collected is the product of time and the integral of the absolute error. This represents the number of data points in a set of input data in the sample set.

[0025] In this invention, the weight values ​​corresponding to different indicators are set according to the actual situation. If the weights of the four evaluation indicators are the same, then... All are 0.25. If the control architecture used in the inverter prioritizes operational stability and minimizes overshoot, then γ = 0.1, α = 0.5, β = 0.1, and μ = 0.3; if the control architecture has an extremely fast response speed, then γ = 0.6, α = 0.1, β = 0.1, and μ = 0.2. The simulation used for data acquisition in this invention has a fast response speed due to the presence of a phase-locked loop; therefore, the weighting coefficients are γ = 0.5, α = 0.1, β = 0.2, and μ = 0.2, respectively. , As attached Figure 3 As shown, in this embodiment, the time from grid connection (t=1s) to entering steady state (t=1.6s) is first recorded. The difference between the actual output active power P and the rated power Pref is calculated to obtain the control error e(t). The square of the error, the absolute value of the error, time multiplied by the square of the error, and time multiplied by the absolute value of the error are calculated respectively. The four values ​​are then integrated over time to obtain ISE, IAE, ITSE, and ITAE. Based on the above four variables, ISE, ITSE, IAE, and ISAE are collected under different SCR and different load conditions. Data is collected for SCR from 2 to 20 with a step size of 1, and for load from 0KW to 500KW with a step size of 1KW, and then calibrated to per unit. The per-unit value of SCR is 20, the per-unit value of load is 500KW, and the per-unit values ​​of the other four variables are calibrated to the maximum value to obtain the raw data of the network input. The first five columns of data—ISE, ISTE, IAE, ISAE, and load—are all independent variables. The variable to be identified is the SCR value, which is the dependent variable. Data is labeled in the last column. A diagram illustrating the data collection process is shown below. Figure 2 As shown.

[0026] Step 2: Construct the SCR estimation network. Use the acquired sample set to train and validate the SCR estimation network to obtain the trained SCR estimation network. In this invention, the SCR estimation network is an adversarial network, including a connected feature extractor, generator, and classifier. The input of the SCR estimation network is each set of data in the sample set, i.e., ISE, ISTE, IAE, ISAE, and load after introducing weight factors. The output is the predicted SCR value, and the label is the SCR corresponding to each set of data. 80% of the data in the sample set is used during network training, and the remaining 20% ​​of the dataset is used as the validation set after network training to verify and revise the network training effect.

[0027] Because the sample set in step one contains a relatively small amount of data, this invention designs an adversarial network to achieve SCR estimation for different input variables using a limited amount of data. An adversarial network is a combination of two networks: one network generates simulated data (the generator network), and the other network determines whether the generated data is real or simulated (the discriminator network). The generator network continuously optimizes its generated data to make the discriminator network unable to distinguish the data source, while the discriminator network optimizes its parameters to make the discrimination more accurate. Adversarial training can be viewed as a two-player game. When a Nash equilibrium is reached, the adversarial process ends, at which point neither player can further reduce their cost in the Nash equilibrium. Through adversarial training, the generator network can learn the mapping relationship between noise and samples.

[0028] The network input of the adversarial network designed in this invention consists of the five columns of independent variables designed above, and the label is a column of SCR data; As attached Figure 4 As shown, the feature extractor structure includes a CNN convolutional neural network, which comprises two convolutional layers and two pooling layers. The first convolutional layer, the first pooling layer, the second convolutional layer, and the second pooling layer are connected sequentially. The input to the CNN is each set of data in the sample set, namely, the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, the integral of time multiplied by absolute error, and the load. The CNN is used to extract features from the input data and output them to the generator network. In this invention, five columns of independent variables are input into a CNN (Convolutional Neural Network) for feature extraction. The CNN contains two convolutional layers and two pooling layers. In the CNN, a sliding window, also called a convolutional kernel or filter, slides across the input data, calculating the weighted sum of elements within the window and their corresponding kernel elements, including bias terms, to generate an output feature map. Pooling is a downsampling operation in a CNN. It defines a spatial neighborhood and performs statistical processing on the features within that neighborhood, such as taking the maximum or average value, to generate a new feature map. Pooling operations typically follow convolutional layers. By reducing the size of the feature map, pooling reduces the computational cost and number of parameters in subsequent convolutional layers, thus improving computational efficiency. Furthermore, the CNN can further extract features from the input data, enabling it to learn more abstract and high-level feature representations. Pooling operations reduce the dimensionality and number of parameters in the feature map, lowering the model's complexity and thus preventing overfitting to some extent.

[0029] The generator and classifier have the same structure, both including a fully connected layer, an activation function layer, a batch normalization layer, and an output layer connected in sequence. The generator is used to receive the extracted features from the feature extractor, generate data similar to the distribution of real data, and output it to the classifier. The classifier is used to receive the data output by the generator, determine the authenticity of the data, and output the predicted SCR. In this embodiment, the generator is a neural network that receives extracted features from the feature extractor and attempts to generate data similar to the real data distribution. The generator designed in this embodiment consists of the following layers: 1. Fully Connected Layer (Dense Layer): The generator consists of two fully connected layers, each followed by an activation function. The main function of the fully connected layer is to learn complex mappings of the input data. In deep learning, fully connected layers can capture the non-linear relationships in the input data.

[0030] 2. Activation Function: The generator uses the ReLU (Rectified LinearUnit) activation function, which introduces non-linearity, enabling the network to learn complex patterns. The output layer uses the sigmoid activation function, compressing the output values ​​to between 0 and 1, i.e., the predicted SCR per-unit value.

[0031] 3. Batch Normalization: The batch normalization layer is used to normalize the output of the normalization layer, which helps to speed up the training process and improve the stability of the model. It normalizes the data by subtracting the mean and dividing by the standard deviation.

[0032] 4. Output layer: The generator's output layer uses the sigmoid activation function, which ensures that the generated data values ​​are between 0 and 1, suitable for predicting probabilities or proportions in regression tasks.

[0033] The classifier is designed with the same structure as the generator. Its function is to determine the authenticity of the generated data, distinguishing between real input data and fake data generated by the generator, and iteratively updating the network weights to finally output the predicted SCR. Network training ends when the classifier can no longer distinguish between real and fake data. The corresponding network structure is... Figure 4 It is displayed in the middle.

[0034] In this step, the SCR estimation network is trained using the acquired sample set, including: Initialize the weights and biases of the feature extractor, generator, and classifier; With fixed weights for the feature extractor and generator, the classifier's weights are optimized and updated to perform gradient descent training in a way that minimizes the loss function; With fixed classifier weights and biases, the weights of the feature extractor and generator are optimized and updated to perform gradient descent training in a manner that minimizes the loss function.

[0035] In this embodiment, the network training process is as follows: Figure 5 As shown, X1 represents the first five columns of input variables, namely ISE, ITSE, IAE, ISAE, and load; Y1 is set as the label of the sixth column of input variables, namely SCR; Net1 is the feature extractor; Net2 is the generator; and Net3 is the classifier.

[0036] First, the weights and biases of the convolutional neural network (CNN), generator, and classifier are randomly initialized. The weights of the feature extractor (CNN) and generator are fixed, and the classifier weights are optimized and updated. Gradient descent training is then performed to minimize the loss function. Second, the classifier weights and biases are fixed again, and the weights of the first CNN and generator are updated. Training is also performed using gradient descent to minimize the loss function. The generator and classifier are trained alternately; the generator attempts to deceive the classifier, while the classifier tries to improve its recognition ability. This adversarial training process continues until the data generated by the generator is realistic enough that the classifier cannot distinguish between real and fake data.

[0037] In the sample set, the training and validation datasets are designed to be 80%:20%, meaning that 80% of the input data is randomly selected for network training, and the remaining 20% ​​of real data is used to validate the generation of the data. To evaluate the generator's performance on the validation set, this is typically done by calculating the statistical distance (such as mean squared error, MSE) between the generated data and the real data.

[0038] , The root mean square error is designed to evaluate the error between the labels of the final estimated data and the actual data labels, in the formula... Labels indicating estimates This represents the true label of the data. The loss functions designed in the network are shown in Table 1. The classifier and generator are designed with the error between the predicted label and the actual label, and the loss function of the feature extractor is designed with the root mean square error.

[0039] Table 1 Loss Function Design

[0040] Where m is the number of input data; Loss d Let the loss function of the classifier be . Loss is the difference between the classifier output value and the label value. g1 Loss is the loss function of the generator. g2The loss function of the feature extractor. This is the difference between the output value and the label value.

[0041] Step 3: Deploy the trained SCR estimation network in the simulation. Calculate the integral of squared error, integral of time multiplied by squared error, integral of absolute error, and integral of time multiplied by absolute error based on the real-time collected data. Input the integral of squared error, integral of time multiplied by squared error, integral of absolute error, integral of time multiplied by absolute error, and load into the trained SCR estimation network for real-time network training, so as to achieve the goal of outputting the SCR estimate at any time.

[0042] This embodiment experimentally verifies the training effect with and without per-unit scales, different data dimensions, and different input data lengths. In the experiment, because the initial weights and biases are random, the initial training effect is not good, but the training effect gradually improves with the number of iterations. To obtain the same output result, the weights from this training iteration need to be saved; in the next training iteration, only the corresponding weights need to be imported to obtain the same training result.

[0043] Experiments demonstrate that the data dimensionality of input variables, whether input values ​​are per unit, and the choice of step size all affect training results. For training with an input load of 100KW step size, a total data volume of 114 sets, and unperformed input variables, the final estimation results are highly scattered and inaccurate. Insufficient training data prevents the feature extractor from fully extracting the features of the input variables, hindering learning. The choice of the number of iterations is positively correlated not only with training time but also with the final training effect. The scale and range of features also affect the model's training performance. If the value range of features varies greatly, normalization or standardization may be necessary to ensure effective model learning. The five input variables selected in this invention have a large numerical range; without per unit, the network model cannot fully learn the data features. Therefore, the SCR baseline value chosen here is 20, which is normalized to 0.1-1 after per-unit scaling, with a step size of 0.05; the load baseline value is 500KW, which is normalized to 0.002-1 after per-unit scaling, with a step size of 1KW and a step size of 0.002. The data volume is large and the coverage is wide. In this invention, to highlight the advantages of limited data and adversarial networks, the SCR step size is increased to 0.1, which is equivalent to reducing the data volume by half. Furthermore, only 80% of the data in the training set is randomly selected for training, and the remaining 20% ​​is used for SCR estimation verification. If the final training result is similar to or better than the training result using full-coverage data, then the advantage of the adversarial network selected in this scheme can be proven.

[0044] Furthermore, the impact of different loss functions on the final estimation performance of the network was verified. Commonly used loss functions for networks include mean squared error, root mean square error, absolute error, relative error, and binary cross-entropy. Here, in order to select the optimal network loss function, the loss functions of the classifier, generator, and feature extractor were modified respectively, and the prediction results are shown in Table 2.

[0045] Table 2 Combination of Loss Functions

[0046] The results demonstrate that the method of this invention can effectively estimate the SCR value, and achieves the same effect with a small amount of labeled data as with a large amount of labeled data. This proves that the selected feature metrics and adversarial network achieve the expected SCR estimation effect. Furthermore, the loss function designed in this scheme is the optimal combination best suited for estimating SCR using this method.

[0047] The present invention also discloses an electronic device, the device comprising: a memory for storing a computer program; and a processor for executing the computer program to enable the device to perform the aforementioned power grid SCR prediction method based on a few-labeled data adversarial network.

[0048] The present invention also provides a computer storage medium on which a computer program is stored. When the computer program is run, the device running the computer program implements the aforementioned power grid SCR prediction method based on a few-labeled data adversarial network.

[0049] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium. The memory can be various types of memory, such as random access memory, read-only memory, flash memory, etc., such as read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, server, or network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0050] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A power grid SCR prediction method based on a few-labeled data adversarial network, characterized in that, Includes the following steps: Step 1: Collect control error data of the power grid system from the moment of grid connection or disconnection to the moment of stability under different SCRs and different load grid-connected and off-grid conditions within a historical time period. That is, the difference between the actual output and the expected output. Calculate evaluation indicators using the control error data, including the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, and the integral of time multiplied by absolute error, and construct a sample set. Each set of data in the sample set includes: integral of squared error, integral of time multiplied by squared error, integral of absolute error, integral of time multiplied by absolute error, and load, with the corresponding SCR as the label. At the same time, introduce weighting factors into each set of data in the sample set to construct the input data for the SCR estimation network. Step 2: Construct the SCR estimation network. Use the acquired sample set to train and validate the SCR estimation network to obtain the trained SCR estimation network. The SCR estimation network is an adversarial network, including a feature extractor, a generator, and a classifier. The input of the SCR estimation network is each set of data in the sample set, i.e., ISE, ISTE, IAE, ISAE and load after introducing weight factors, and the output is the predicted SCR value. Step 3: Deploy the trained SCR estimation network in the simulation. Calculate the integral of squared error, integral of time multiplied by squared error, integral of absolute error, and integral of time multiplied by absolute error based on the real-time collected data. Input the integral of squared error, integral of time multiplied by squared error, integral of absolute error, integral of time multiplied by absolute error, and load into the trained SCR estimation network for real-time network training, so as to achieve the goal of outputting the SCR estimate at any time.

2. The power grid SCR prediction method based on a few-label data adversarial network according to claim 1, characterized in that: The evaluation indicators are calculated by introducing weighting factors. , The formula for calculating the number of data points in a set of input data in the sample set includes: , in, The number of data points collected corresponds to the integral of the squared error. The number of data points collected corresponds to the integral of time multiplied by the squared error. The number of data points collected corresponds to the integral of the absolute error. The number of data points collected is the time multiplied by the integral of the absolute error. These represent the weights of the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, and the integral of time multiplied by absolute error, respectively.

3. The power grid SCR prediction method based on a few-labeled data adversarial network according to claim 1, characterized in that: The feature extractor's structure includes a CNN (Convolutional Neural Network), which comprises two convolutional layers and two pooling layers. The first convolutional layer, the first pooling layer, the second convolutional layer, and the second pooling layer are connected sequentially. The input to the CNN is each set of data in the sample set, namely, the integral of squared error, the integral of time multiplied by squared error, the integral of absolute error, the integral of time multiplied by absolute error, and the load. The CNN is used to extract features from the input data and output them to the generator. The generator and classifier have the same structure, both including a fully connected layer, an activation function layer, a batch normalization layer, and an output layer connected in sequence. The generator is used to receive the extracted features from the feature extractor, generate data similar to the distribution of real data, and output it to the classifier. The classifier is used to receive the data output by the generator, determine the authenticity of the data, and output the predicted SCR.

4. The power grid SCR prediction method based on a few-label data adversarial network according to claim 1, characterized in that: The SCR estimation network is trained using the acquired sample set, including: Initialize the weights and biases of the feature extractor, generator, and classifier; With fixed weights for the feature extractor and generator, the classifier's weights are optimized and updated to perform gradient descent training in a way that minimizes the loss function; With fixed classifier weights and biases, the weights of the feature extractor and generator are optimized and updated to perform gradient descent training in a manner that minimizes the loss function.

5. The power grid SCR prediction method based on a few-label data adversarial network according to claim 1, characterized in that: Each set of data in the sample set includes: integral of squared error, integral of time multiplied by squared error, integral of absolute error, integral of time multiplied by absolute error, and load, with the corresponding SCR as a label; among them, the load ranges from 0KW to 500KW, with a step size of 1KW, and is calibrated per unit; the SCR ranges from 2 to 20, with a step size of 1, and the SCR per unit value is 20, the load per unit value is 500KW, and the per unit values ​​of integral of squared error, integral of time multiplied by squared error, integral of absolute error, and integral of time multiplied by absolute error are calibrated with the maximum value.

6. An electronic device, characterized in that: The device includes: a memory for storing a computer program; and a processor for executing the computer program to cause the device to perform a power grid SCR prediction method based on a few-labeled data adversarial network as described in any one of claims 1-5.

7. A computer storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is run, the device running the computer program implements a power grid SCR prediction method based on a few-labeled data adversarial network as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Power grid state estimation precision calculation method based on cloud SCADA big data

    CN110490378A

  • Power grid dynamic stability evaluation method based on generative adversarial neural network

    CN115051383A

  • Subsynchronous oscillation data generation method based on multivariable time sequence generative adversarial network

    CN117574760A

  • Method and device for determining short-circuit ratio of new energy multi-station

    CN119757942A

  • Method for grid impedance and dynamics estimation

    WO2021001002A1