Power system missing data reconstruction method and system based on physical deviation correction

By constructing a physical observer and jointly training an adversarial generative network, missing power system data generated by the generator is dynamically corrected, solving the problem that data reconstruction in existing technologies does not conform to physical laws, and achieving high-quality power system data reconstruction.

CN121808207APending Publication Date: 2026-04-07STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively incorporate physical laws in the reconstruction of missing power system data, resulting in generated data that may violate physical rules and lack a real-time deviation feedback mechanism, affecting the accuracy and reliability of data reconstruction.

Method used

By constructing a physical observer based on radial basis function neural networks, the physical compliance threshold of power system data is obtained. Combined with generative adversarial networks, the physical deviation matrix is ​​used for dynamic correction, forming a generator to generate data that conforms to the physical constraints of the power system.

Benefits of technology

It ensures that the physical constraints of the data are met and the data is accurate during the reconstruction of missing data in the power system, ensuring that the reconstructed data conforms to the physical laws of the power system and provides high-quality, complete data to support power dispatch and load forecasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121808207A_ABST
    Figure CN121808207A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power system missing data reconstruction method and system based on physical deviation correction. The method comprises the following steps: acquiring original electric power system data; generating a compliance sample corresponding to the original power system data according to the power flow physical constraint equation; constructing a physical observer based on a radial basis function neural network, and training the physical observer by applying the compliance sample to output a physical compliance threshold value; obtaining a physical deviation matrix between the target missing data and the physical reasonable threshold, taking the physical deviation matrix and the original power system data as the input of the generative adversarial network, and outputting the probability value of the reconstructed power system data; and carrying out joint training on the physical observer and the generative adversarial network until the physical deviation matrix meets an error standard, and obtaining reconstructed power system data by applying the trained physical observer and generative adversarial network. According to the invention, high-quality complete data guarantee is provided for subsequent power dispatching, load prediction and other applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of machine learning and power system technology, specifically to a method and system for reconstructing missing power system data based on physical bias correction. Background Technology

[0002] Missing data reconstruction is a specific scenario that addresses missing values, outlier markers, and other missing information in a dataset to restore data integrity. The core is to eliminate the interference of missing values ​​on subsequent analysis and modeling while preserving the original distribution characteristics of the data, thus ensuring the accuracy of the results.

[0003] Generative Adversarial Networks (GANs) consist of two network models: a generator (G) and a discriminator (D). The goal of a GAN is to train the generator to produce new data with the same distribution as the sample data. Training a GAN involves an adversarial game between the generator and the discriminator. During training, the discriminator receives sample data and the generator's generated data and determines whether the input data comes from the sample data or the generated data. If the discriminator correctly determines the source, the generator needs further optimization; its parameters are adjusted to make the generated data more similar to the sample data. If the discriminator incorrectly determines the source, its parameters are adjusted to avoid future errors. Ultimately, the goal is to obtain a generator capable of producing new data with the same distribution as the sample data. The generator's input is a random vector, and its output is generated samples. The discriminator's inputs are the generator's generated samples and real data, and its output is a score of the input data to determine whether it comes from generated samples or real data.

[0004] During system operation, certain constraints exist between power data within the power system. Kirchhoff's laws state that the current-voltage-power balance principle must always be satisfied during system operation: the sum of all currents entering a node equals the sum of all currents leaving that node; and the algebraic sum of the potential differences (voltages) across all components along a closed loop equals zero. The power balance principle can be derived through simple derivation. Since a power grid consists of nodes and lines, power balance can be divided into two types: node power balance and line power balance. For nodes, the power directly related to the node satisfies the principle that the total power injected into the node equals the total power output from the node. For lines, the difference in actual power between the two ends is the power loss of the branch. To make the data generated by the generator meaningful, the data must satisfy the aforementioned voltage, current, and power balance principles; therefore, the generative adversarial network (GAN) must be adjusted and constrained.

[0005] Patent application CN119295765A discloses an RTU data reconstruction method, apparatus, and medium based on generative adversarial networks. This method achieves data compression by encoding power grid data into a binary image, while preserving key information. Furthermore, it enhances high-frequency details in the power grid data through optimized upsampling reconstruction processing of the data reconstruction model. However, it only implicitly preserves electrical characteristics through image structure, without explicitly incorporating physical equations. This may result in generated data that violates physical rules, and the lack of a real-time deviation feedback mechanism prevents dynamic correction of physically irregular data during the generation process.

[0006] The paper "Research on Reconstruction of Missing Measurement Data in Distribution Network Based on Improved LSGAN Model" transforms the physical constraints of the power grid into "spatial texture features" on a grayscale image. The grayscale image is used as part of the initial dataset, and the generative adversarial network learns these texture features to learn the physical laws. This is equivalent to adding physical constraints to the training material. It does not involve the generative adversarial network learning based on physical laws in each deviation correction during the training process, so as to form a model in which the data generated by the generator conforms to the physical constraints through real-time deviation correction.

[0007] Patent application CN114022311A discloses a data compensation method for integrated energy systems based on temporal conditional generative adversarial networks. This method considers the unique data coupling characteristics of integrated energy systems during network training, adding physical constraints for the electricity, heat, and gas systems to make the compensated data more consistent with the operational data characteristics of integrated energy systems. However, the physical constraints in this patent are static hard constraints, meaning the generator cannot generate data that does not conform to physical laws, but it does not tell the generator "how far" its generated data is from conforming data. The generator can only conform to physical constraints by chance. Patent application CN119884628A discloses an intelligent power flow data filling method based on spatiotemporal coupling. This patent designs a multi-physical constraint generative adversarial network (Phy-GAN) through generator physical constraints and a multi-scale discriminator. The multi-physical constraint generative adversarial network adds a physical constraint layer after the generator output layer, including dynamic and algebraic constraints. However, this patent adds a physical constraint layer as part of the discriminator after the generator's output layer. The discriminator determines both the authenticity and whether it conforms to physical laws. Generated data that does not conform to physical laws or "does not look like" the original data will result in a low authenticity score from the discriminator, prompting the generator to optimize and improve. However, the generator does not know the specific reason for the low score. Summary of the Invention

[0008] The technical problem to be solved by this invention is to provide a method for reconstructing missing data in a power system based on dynamic correction and improvement of generative adversarial networks with physical deviation feedback.

[0009] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0010] A method for reconstructing missing power system data based on physical deviation correction includes:

[0011] Obtain raw power system data; and generate compliance samples corresponding to the raw power system data based on the power flow physical constraint equations.

[0012] Construct a physical observer based on a radial basis function neural network, train it with compliant samples, and output a physical compliance threshold.

[0013] Obtain the physical deviation matrix between the target missing data and the physical reasonable threshold, and use it together with the original power system data as input to the adversarial generative network, outputting the probability value of the reconstructed power system data;

[0014] The physical observer and the generative adversarial network are jointly trained until the physical bias matrix meets the error criteria. The trained physical observer and generative adversarial network are then used to obtain the reconstructed power system data.

[0015] In this embodiment, generating compliance samples corresponding to the original power system data includes:

[0016] Define input features F k =[i k ,t k ,S k ];

[0017] The physical constraint equations for power flow include the nodal work balance equations: P i,in =P i,load +P i,loss Voltage constraint equation: U i =f(P i,load Z ij ), based on the input features F of the defined compliant samples k Obtain the physical compliance threshold Y for the k-th sample. k =[P k,min ,P k,max U k,min U k,max ];

[0018] Input features F k With the corresponding physical compliance threshold Y k The resulting mapping group serves as a compliance sample.

[0019] Among them, F k Let i be the input feature of the k-th sample. k Let t be the node number corresponding to the k-th sample. k S represents the time step corresponding to the k-th sample. k Let P be the topological feature of the k-th sample. i,in P represents the total active power injected into the node. i,load P supplies power to the loads within the node's power supply range. i,loss U is the heat loss caused by line resistance during power transmission. i Let Z be the node voltage, f(·) be the voltage constraint function, and Z be the node voltage. ij Y is the impedance between the i-th node and the j-th node. k P is the physical compliance threshold. k,min P k,max For node i k In t k Minimum load and maximum load at any given time, U k,min U k,max For node i k In t k The minimum and maximum voltage at any given time.

[0020] In this embodiment, a physical observer based on a radial basis function neural network is constructed, including:

[0021] A radial basis function neural network is constructed using multiple quadratic radial basis functions. The output formula of the radial basis function neural network is as follows:

[0022]

[0023] Using compliant samples, solve for the parameter λ in the output formula of the radial basis function neural network. k α0, α d ;

[0024] The obtained parameter λ k α0, α d Substituting the formula for the output of the radial basis function neural network, we obtain the physical observer;

[0025] in, λ represents the physical compliance threshold output by the physical observer, M is the total number of compliant samples, and λ is the physical compliance threshold. k Let φ(r) be the interpolation coefficient of the radial basis kernel corresponding to the k-th sample. k ) is a quadratic radial basis function, r k Let α0 be the Euclidean distance between the input feature and the feature of the k-th sample, where α0 is a constant term, D is the dimension of the input feature, and d∈D. d F represents the coefficients of the polynomial terms. d The d-th dimension of the input feature vector is the feature value.

[0026] In this embodiment, the network architecture of the generator in the adversarial generative network includes an input layer, a feature embedding layer, a residual layer, a physical attention layer, and an output layer;

[0027] Input layer:

[0028] From the target missing dataset X target Collect samples containing missing parts and extract the effective shape X. tgt-valid ;

[0029] Extract input features F for each sample containing missing data. target,i,t =[i,t,S target,i ];

[0030] Input features F target,i,t Input the data into the already trained physics observer to obtain the physics compliance threshold.

[0031] Effective shape X tgt-valid With physical compliance threshold Subtraction to obtain the physical deviation matrix

[0032] The splicing noise, the flattened effective data, and the flattened physical deviation matrix form the generator's input. gen ;

[0033] Where i is the node number, t is the time step, and S target,i Let be the topological feature of the i-th node. Let X be the average load compliance value of the i-th node at time t, output by the physical observer. tgt-valid,i,t The effective load of the i-th node at time t;

[0034] Feature embedding layer:

[0035] Input gen Perform a linear transformation and apply it to the ReLU function activation to output the embedded feature Feat. embed ;

[0036] Residual layer:

[0037] Two layers of residual blocks are set up, and the feature feed is embedded. embed As input to the residual layer, the output enhances the embedded features. res2,out ;

[0038] Physical attention layer:

[0039] Based on enhanced embedding features Feat res2,out Calculate attention weights Attn weight And apply attention weights Attnweight Enhanced embedding features Feat res2,out Weighting, obtaining weighted features. attn ;

[0040] Output layer:

[0041] Weighted features attn First, normalized data is obtained through linear transformation. Then reverse normalization to obtain the actual load range

[0042] In this embodiment, the loss function of the adversarial generative network is:

[0043] L total =L GAN +0.7×L phys ;

[0044]

[0045] In the formula, L total To counteract the total loss of the generative network, L GAN To combat the losses, L phys Let B be the physical bias loss, and B be the total number of samples containing missing values, where b ∈ B, and P is the loss due to physical bias. D To resist the probability value output by the discriminator in the generative network, X valid,b For the payload of the b-th sample, Let N be the reconstructed power system data corresponding to the b-th sample, where N is the total number of distribution network nodes, T is the total number of time steps, and E is the physical deviation matrix.

[0046] In this embodiment, joint training of the physical observer and the generative adversarial network includes:

[0047] Collect samples containing missing data, extract input features, input them into the physical observer, and then calculate the physical deviation matrix;

[0048] The physical deviation matrix, noise, and samples with missing data are concatenated and then input into the generator of the generative adversarial network to obtain the reconstructed power system data.

[0049] Discriminator update against generative networks:

[0050] The freeze generator takes the reconstructed power system data, including missing samples, as input, calculates the adversarial loss, and updates the discriminator parameters.

[0051] Generator update:

[0052] Freeze the discriminator, output the physical bias loss and the total loss of the adversarial generative network, and update the generator parameters;

[0053] The physics observer is dynamically updated:

[0054] The physical observer is dynamically updated based on compliant samples.

[0055] In this embodiment, the expression for obtaining the reconstructed power system data by applying the trained physical observer and generative adversarial network is as follows:

[0056]

[0057] In the formula, This is the power system data reconstructed at time t for the final i-th node. For the final output of the generator at time t of the i-th node, P i,t,min Let P be the minimum load at time t for the i-th node. i,t,max Let be the maximum load of the i-th node at time t.

[0058] This invention also provides a power system missing data reconstruction system based on physical deviation correction, comprising:

[0059] The observer sample module is used to acquire raw power system data and generate compliant samples corresponding to the raw power system data based on the power flow physical constraint equations.

[0060] The compliance threshold module is used to build a physical observer based on a radial basis function neural network, which is trained with compliance samples to output a physical compliance threshold.

[0061] The data reconstruction and discrimination module is used to obtain the physical deviation matrix between the target missing data and the physical reasonable threshold, and uses it together with the original power system data as input to the adversarial generative network, and outputs the probability value of the reconstructed power system data.

[0062] The training and application module is used to jointly train the physical observer and the generative adversarial network until the physical bias matrix meets the error criteria. The trained physical observer and generative adversarial network are then used to obtain reconstructed power system data.

[0063] In this embodiment, a physical observer based on a radial basis function neural network is constructed, including:

[0064] A radial basis function neural network is constructed using multiple quadratic radial basis functions. The output formula of the radial basis function neural network is as follows:

[0065] Using compliant samples, solve for the parameter λ in the output formula of the radial basis function neural network. k α0, α d ;

[0066] The obtained parameter λ k α0, α dSubstituting the formula for the output of the radial basis function neural network, we obtain the physical observer;

[0067] in, λ represents the physical compliance threshold output by the physical observer, M is the total number of compliant samples, and λ is the physical compliance threshold. k Let φ(r) be the interpolation coefficient of the radial basis kernel corresponding to the k-th sample. k ) is a quadratic radial basis function, r k Let α0 be the Euclidean distance between the input feature and the feature of the k-th sample, where α0 is a constant term, D is the dimension of the input feature, and d∈D. d F represents the coefficients of the polynomial terms. d The d-th dimension of the input feature vector is the feature value.

[0068] In this embodiment, the network architecture of the generator in the adversarial generative network includes an input layer, a feature embedding layer, a residual layer, a physical attention layer, and an output layer;

[0069] Input layer:

[0070] From the target missing dataset X tar get Collect samples containing missing parts and extract the effective shape X. tgt-valid ;

[0071] Extract input features F for each sample containing missing data. target,i,t =[i,t,S target,i ];

[0072] Input features F target,i,t Input the data into the already trained physics observer to obtain the physics compliance threshold.

[0073] Effective shape X tgt-valid With physical compliance threshold Subtraction to obtain the physical deviation matrix

[0074] The splicing noise, the flattened effective data, and the flattened physical deviation matrix form the generator's input. gen ;

[0075] Where i is the node number, t is the time step, and S target,i Let be the topological feature of the i-th node. Let X be the average load compliance value of the i-th node at time t, output by the physical observer. tgt-valid,i,t The effective load of the i-th node at time t;

[0076] Feature embedding layer:

[0077] Input genPerform a linear transformation and apply it to the ReLU function activation to output the embedded feature Feat. embed ;

[0078] Residual layer:

[0079] Two layers of residual blocks are set up, and the feature feed is embedded. embed As input to the residual layer, the output enhances the embedded features. res2,out ;

[0080] Physical attention layer:

[0081] Based on enhanced embedding features Feat res2,out Calculate attention weights Attn weight And apply attention weights Attn weight Enhanced embedding features Feat res2,out Weighting, obtaining weighted features. attn ;

[0082] Output layer:

[0083] Weighted features attn First, normalized data is obtained through linear transformation. Then reverse normalization to obtain the actual load range

[0084] Compared with the prior art, the beneficial effects of the present invention are:

[0085] To address the requirement that power data reconstruction must conform to physical laws, we first use RBF to capture the physical constraints of power grid operation (such as load and voltage compliance ranges), then use generative adversarial networks to fit the real data distribution. At the same time, we dynamically update the RBF sample library every 100 rounds to adapt to topology changes, avoiding the problem of "compliant but distorted" or "distorted but non-compliant" reconstructed data, thus providing high-quality and complete data assurance for subsequent power dispatching, load forecasting and other applications.

[0086] This invention proposes an improved GAN-based method for reconstructing missing power system data based on physical deviation feedback correction. The method trains an RBF (Real-Based Physical Observer) physical observer using a compliant sample library containing explicit physical rules (voltage, power balance). An improved GAN generator receives noise, valid data, and the physical deviation matrix output in real time by the RBF observer. The reconstructed data is dynamically corrected by a physical deviation attention layer, and then a authenticity discriminator verifies the data distribution matching degree. Combined with the RBF deviation mean threshold, a closed loop of "generation-observation-correction-distribution verification" is formed, ultimately achieving the reconstruction of missing power system data.

[0087] This invention trains an RBF observer to make the data generated by the generator conform to physical constraints through real-time bias correction. It applies physical laws to the generative adversarial network to learn during each bias correction in the training process. Attached Figure Description

[0088] Figure 1 This is a flowchart of a method for reconstructing missing power system data based on physical deviation correction, according to an embodiment of the present invention.

[0089] Figure 2 This is a flowchart of a power system missing data reconstruction system based on physical deviation correction, according to an embodiment of the present invention.

[0090] Figure 3 This is a block diagram of a power system missing data reconstruction system based on physical deviation correction, according to an embodiment of the present invention. Detailed Implementation

[0091] To facilitate understanding of the technical solution of the present invention by those skilled in the art, the technical solution of the present invention will now be further described in conjunction with the accompanying drawings.

[0092] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0093] Please see Figure 1 , 2 As shown, this invention provides a method for reconstructing missing power system data based on physical deviation correction, comprising:

[0094] S10: Obtain raw power system data; and generate compliance samples corresponding to the raw power system data based on the power flow physical constraint equations.

[0095] In this embodiment, the raw power system data acquisition targets the node operation data and grid topology characteristics of the distribution network.

[0096] In this embodiment, the matrix X composed of the collected node load data is... raw ∈R N×T The matrix U formed by the node voltage data raw ∈R N×T Where N is the total number of distribution network nodes, T is the total number of time steps, and R is a real number. X raw [i,t] represents the original load value of the i-th node at time t, and the location of missing data is marked as X. missThe valid data location is marked as X. valid Here, X represents the load, i.e., the demand for consuming or absorbing electrical energy, and its physical unit and laws are the same as those for power. U raw [i,t] represents the original voltage value of the i-th node at time t, and the missing data location is marked as U. miss The valid data location is marked as U valid .

[0097] In this embodiment, power grid topology features are collected. Here, only topology parameters strongly correlated with node physical constraints are collected, including: node connection lines K. i (If node 3 connects to 4 lines, then K3 = 4); line impedance parameter Z ij =R ij +jX ij In the formula, Z ij R is the impedance between the i-th node and the j-th node. ij Let X be the resistance between the i-th node and the j-th node. ij Let be the reactance between the i-th node and the j-th node, where j is the imaginary unit.

[0098] In one embodiment of the present invention, generating a compliance sample corresponding to the original power system data includes:

[0099] S11, Define the input features F k =[i k ,t k ,S k ]. Among them, F k Let i be the input feature of the k-th sample. k Let t be the node number corresponding to the k-th sample. k S represents the time step corresponding to the k-th sample. k Let be the topological features of the k-th sample, which refers to partial topological features such as node connection lines.

[0100] S12, the physical constraint equations for power flow include the nodal work balance equations: P i,in =P i,load +P i,loss Voltage constraint equation: U i =f(P i,load Z ij ), based on the input features F of the defined compliant samples k Obtain the physical compliance threshold Y for the k-th sample. k =[P k,min ,P k,max U k,min U k,max ]. Among them, P i,in P represents the total active power injected into the node.i,load P supplies power to the loads within the node's power supply range. i,loss U is the heat loss caused by line resistance during power transmission. i Let Z be the node voltage, f(·) be the voltage constraint function, and Z be the node voltage. ij Y is the impedance between the i-th node and the j-th node. k P is the physical compliance threshold. k,min P k,max For node i k In t k Minimum load and maximum load at any given time, U k,min U k,max For node i k In t k The minimum and maximum voltage at any given time.

[0101] In this embodiment, the power flow calculation module in PSASP (Power System Analysis Software) is used to calculate the physical constraint equations of power flow.

[0102] S13, input feature F k With the corresponding physical compliance threshold Y k The resulting mapping group serves as a compliance sample.

[0103] Furthermore, outlier samples that failed to converge in the PSASP simulation were removed, and the remaining valid samples were stored for training the physics observer, thus generating M sets of compliant samples with "input features - physical compliance threshold".

[0104] S20: Construct a physical observer based on a radial basis function neural network, train it with compliant samples, and output a physical compliance threshold.

[0105] In one embodiment of the present invention, constructing a physical observer based on a radial basis function neural network includes:

[0106] S21, a radial basis function neural network is constructed using multiple quadratic radial basis functions. The output formula of the radial basis function neural network is:

[0107] in, λ represents the physical compliance threshold output by the physical observer, M is the total number of compliant samples, and λ is the physical compliance threshold. k Let φ(r) be the interpolation coefficients of the radial basis kernel corresponding to the k-th sample, with dimension M×1, to be solved. k ) is a plurality of quadratic radial basis functions. ∈=0.8, r k Let α0 be the Euclidean distance between the input feature and the feature of the k-th sample, α0 be a constant term (global bias correction coefficient, dimension 1×1, to be solved), D be the dimension of the input feature, d∈D, specifically D=3, corresponding to ik ,t k ,S k α d The coefficients of the polynomial terms are 3×1, and F is to be solved. d The d-th dimension of the input feature vector is the feature value.

[0108] In this embodiment, a radial basis neural network is constructed using multiple quadratic radial basis functions to achieve "simplified input feature F → physical compliance threshold". The mapping of "". And, Wherein, F1 = i k F2 = t k F2 = S k .

[0109] S22, Using compliant samples, solve for the parameter λ in the output formula of the radial basis function neural network. k α0, α d .

[0110] In this embodiment, PSASP sample fitting constraints are used. Construct a system of linear equations and solve for λ. k α0, α d The system of linear equations is as follows:

[0111]

[0112] In the formula, Φ is the RBF (Radial Basis Function) kernel matrix, 1 M Let F be a column vector of dimension M×1, where each element is 1. M This is the PSASP sample feature matrix, with dimensions M×3, where each row corresponds to [i k ,t k ,S k ], 1 M transpose, For F M The transpose of Y, where Y is the physical analytical solution for all PSASP samples. k The matrix formed by stacking rows has a dimension of M×4, that is:

[0113]

[0114] λ is obtained by solving the system of equations using the alternating direction multiplier method. k α0, α d Save the parameters of the physical observer.

[0115] S23, the obtained parameter λ k α0, α dSubstituting the formula into the output formula of the radial basis function neural network, we obtain the physical observer.

[0116] S30: Obtain the physical deviation matrix between the target missing data and the physical reasonable threshold, and use it together with the original power system data as input to the adversarial generative network, outputting the probability value of the reconstructed power system data.

[0117] In one embodiment of the invention, the generative adversarial network includes a generator and a discriminator. The generator's network architecture includes an input layer, a feature embedding layer, a residual layer, a physical attention layer, and an output layer.

[0118] S311, Input Layer:

[0119] S311-1, from the target missing dataset X target Collect samples containing missing parts and extract the effective shape X. tgt-valid .

[0120] In this embodiment, data is collected from the target missing dataset X. target B = 32 samples containing missing values ​​were collected, and the effective shape X was extracted. tgt-valid (B×20×120, flattened to B×2400), can be understood as forming a dataset.

[0121] S311-1, Extract input features F for each sample containing missing data. target,i,t =[i,t,S target,i ].

[0122] Where i is the node number, t is the time step, and S is the time step. target,i Let F be the topological feature of the i-th node, where i = 1 to 20 and t = 1 to 120. S311-1, input feature F... target,i,t Input the data into the already trained physics observer to obtain the physics compliance threshold.

[0123] In this embodiment, Specifically, it is the average load value, used to calculate the physical deviation matrix.

[0124] S311-1, the effective shape X tgt-valid With physical compliance threshold Subtraction to obtain the physical deviation matrix

[0125] In this embodiment, the physical deviation matrix reflects the difference between the valid data and the compliance range output by the physical observer, in terms of dimension and X. tgt-valid Consistent. Among them, Let X be the average load compliance value of the i-th node at time t, output by the physical observer. tgt-valid,i,tLet be the effective load of the i-th node at time t.

[0126] S311-1, the splicing noise, flattened effective data, and flattened physical deviation matrix form the generator's input. gen .

[0127] In this embodiment, Input gen =concat(z,X) valid,flat E flat );

[0128] In the formula, concat is the concatenation function, z is the noise vector, B×100, and X... valid,flat For the effective data to be flattened, B×2400, E flat The flattened deviation matrix is ​​B×2400.

[0129] S312, Feature Embedding Layer:

[0130] Input gen Perform a linear transformation and apply it to the ReLU function activation to output the embedded feature Feat. embed .

[0131] In this embodiment, the input vector is subjected to a linear transformation and ReLU activation, mapping the dimension to 64. The core formula is as follows:

[0132] Feat embed =ReLU(W1×Input) gen +b1);

[0133] In the formula, W1 is the weight matrix (effective shape 4900×64), and b1 is the bias vector with an effective shape of 1×64 (each dimension corresponds to a bias value).

[0134] S313, Residual Layer:

[0135] Two layers of residual blocks are set up, and the feature feed is embedded. embed As input to the residual layer, the output enhances the embedded features. res2,out In one embodiment of the present invention, the first layer residual:

[0136] Feat res1 =ReLU(W2×Feat) embed +b2);

[0137] Feat res1,out =Feat res1 +Feat embed ;

[0138] Second layer residual:

[0139] Feat res2 =ReLU(W3×Feat) res1,out +b3);

[0140] Feat res2,out =Feat res2 +Feat res1,out ;

[0141] Where W2 and W3 are the weights of the two residual blocks (64×64); b2 and b3 are the biases of the two residual blocks (1×64).

[0142] S314, Physical Attention Layer:

[0143] Based on enhanced embedding features Feat res2,out Calculate attention weights Attn weight And apply attention weights Attn weight Enhanced embedding features Feat res2,out Weighting, obtaining weighted features. attn .

[0144] In one embodiment of the present invention, the attention weight Attn weight Obtain it using the following formula:

[0145] Attn weight =Softmax(W4×Feat) res2,out +b4);

[0146] In the formula, Attn weight b is the attention weight (B×6400) after Softmax normalization. Each element takes a value in the range of (0, 1), and the sum of the 2400 weights of the same batch of samples is 1. Softmax is the normalization exponential function, W4 is the trainable weight matrix (64×2400), and b4 is the trainable bias vector (1×2400).

[0147] The weighted features are obtained using the following formula: Among them, Feat attn It is a weighted result of higher-order features and attention weights.

[0148] S315, Output Layer:

[0149] Weighted features attn First, normalized data is obtained through linear transformation. Then reverse normalization to obtain the actual load range

[0150] In this embodiment, the normalized output is:

[0151] Inverse normalization output:

[0152] Where W5 is the trainable weight matrix (2400×2400); b5 is the trainable bias matrix (1×2400); P max With P min The maximum and minimum values ​​of the actual load are defined, and the range of the actual load is specified. This represents the actual load range, which is also the power system data after being flattened and rebuilt (B×2400).

[0153] In one embodiment of the present invention, a discriminator is used to determine authenticity. The network architecture of the discriminator is as follows:

[0154] Input layer: Actual load range Or real data X valid ;

[0155] Intermediate layers: Three 2D convolutional layers (kernel = 3×3, stride = 2, output channels 32→64→128) + two fully connected layers (output 64→1).

[0156] Output layer: P D (X) = [0,1], which is the probability value used to determine the authenticity of the data distribution.

[0157] In one embodiment of the present invention, the loss function of the adversarial generative network is:

[0158] L total =L GAN +0.7×L phys ;

[0159]

[0160] In the formula, L total To counteract the total loss of the generative network, L GAN To combat the losses, L phys Let B be the physical bias loss, and B be the total number of samples containing missing values, where b ∈ B, and P is the loss due to physical bias. D To resist the probability value output by the discriminator in the generative network, X valid,b For the payload of the b-th sample, Let N be the reconstructed power system data corresponding to the b-th sample, where N is the total number of distribution network nodes, T is the total number of step sizes, and E is the physical deviation matrix.

[0161] S40, jointly trains the physical observer and the adversarial generative network until the physical bias matrix meets the error criteria, and then uses the trained physical observer and adversarial generative network to obtain the reconstructed power system data.

[0162] In this embodiment, joint training of the physical observer and the generative adversarial network includes:

[0163] S41, generator forward propagation in adversarial generative networks, discriminator update in adversarial generative networks, updating the generator and updating the physical observer based on the loss function of adversarial generative networks.

[0164] Generator forward propagation:

[0165] First, sample B = 32 samples containing missing data, and then extract X. valid,b Then, for each sample b, extract the simplified input features F. b,i,t =[i,t,S b ](S b Input the number of node connections for sample b into the physical observer to calculate the physical deviation matrix E. b ; Generate noise z b splicing z b X valid,b E b The input generator is obtained (Temporary reconstructed data during training).

[0166] Discriminator Update:

[0167] Freeze generator, input X valid,b Calculate L GAN Update the discriminator parameters.

[0168] Generator update:

[0169] Freeze discriminator, output L phys and L total Update the generator parameters.

[0170] The physics observer is dynamically updated:

[0171] First, 100 sets of topology change data (such as line maintenance and node addition) are extracted from the validation set, and new samples containing only [i,t,S,Y] are generated using PSASP. Then, these samples are added to the RBF sample library, the equation system Y is solved again, and the physical observer parameters are updated.

[0172] In one embodiment of the present invention, missing data is reconstructed:

[0173] Target data preprocessing:

[0174] Read the target missing dataset X target (20×120), marked X target With X miss Extract simplified features F target,i,t =[i,t,S target,i](S target,i (Number of connection lines to the target data nodes).

[0175] Real-time physical deviation matrix calculation:

[0176] Enter F target,i,t To the physics observer, output P target,i,t,min / P target,i,t,max ;

[0177] Fill X miss Average of compliance range Physical deviation matrix;

[0178] Generator iteration correction and outlier correction:

[0179] Repeat the process of "calculating generator output → calculating physical deviation matrix → feedback correction" until the physical deviation matrix is ​​<0.5MW; the trained generator output... Again Each data point is evaluated and corrected to obtain the final reconstruction result.

[0180]

[0181] In the formula, This is the power system data reconstructed at time t for the final i-th node. For the final output of the generator at time t of the i-th node, P i,t,min Let P be the minimum load at time t for the i-th node. i,t,max Let be the maximum load of the i-th node at time t.

[0182] Please see Figures 1 to 3 As shown, the present invention also provides a power system missing data reconstruction system based on physical deviation correction, comprising:

[0183] The observer sample module is used to acquire raw power system data and generate compliant samples corresponding to the raw power system data based on the power flow physical constraint equations.

[0184] The compliance threshold module is used to build a physical observer based on a radial basis function neural network, which is trained with compliance samples to output a physical compliance threshold.

[0185] The data reconstruction and discrimination module is used to obtain the physical deviation matrix between the target missing data and the physical reasonable threshold, and uses it together with the original power system data as input to the adversarial generative network, outputting the probability value of the reconstructed power system data.

[0186] The training and application module is used to jointly train the physical observer and the generative adversarial network until the physical bias matrix meets the error criteria. The trained physical observer and generative adversarial network are then used to obtain reconstructed power system data.

[0187] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.

[0188] The above embodiments are merely examples of implementation methods of the invention. The scope of protection of the present invention is not limited to the above embodiments. For those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention.

Claims

1. A method for reconstructing missing power system data based on physical deviation correction, characterized in that, include: Obtain raw power system data; Based on the physical constraint equations of power flow, compliance samples corresponding to the original power system data are generated; Construct a physical observer based on a radial basis function neural network, train it with compliant samples, and output a physical compliance threshold. Obtain the physical deviation matrix between the target missing data and the physical reasonable threshold, and use it together with the original power system data as input to the adversarial generative network, outputting the probability value of the reconstructed power system data; The physical observer and the generative adversarial network are jointly trained until the physical bias matrix meets the error criteria. The trained physical observer and generative adversarial network are then used to obtain the reconstructed power system data.

2. The method for reconstructing missing power system data based on physical deviation correction according to claim 1, characterized in that, Generate compliance samples corresponding to the original power system data, including: Define input features F k =[i k ,t k ,S k ]; The physical constraint equations for power flow include the nodal work balance equations: P i,in =P i,load +P i,loss Voltage constraint equation: U i =f(P i,load Z ij ), based on the input features F of the defined compliant samples k Obtain the physical compliance threshold Y for the k-th sample. k =[P k,min ,P k,max U k,min U k,max ]; Input features F k With the corresponding physical compliance threshold Y k The resulting mapping group serves as a compliance sample. Among them, F k Let i be the input feature of the k-th sample. k Let t be the node number corresponding to the k-th sample. k S represents the time step corresponding to the k-th sample. k Let P be the topological feature of the k-th sample. i,in P represents the total active power injected into the node. i,load P supplies power to the loads within the node's power supply range. i,loss U is the heat loss caused by line resistance during power transmission. i Let Z be the node voltage, f(·) be the voltage constraint function, and Z be the node voltage. ij Y is the impedance between the i-th node and the j-th node. k P is the physical compliance threshold. k,min P k,max For node i k In t k Minimum load and maximum load at any given time, U k,min U k,max For node i k In t k The minimum and maximum voltage at any given time.

3. The method for reconstructing missing power system data based on physical deviation correction according to claim 1, characterized in that, Constructing a physical observer based on radial basis function neural networks includes: A radial basis function neural network is constructed using multiple quadratic radial basis functions. The output formula of the radial basis function neural network is as follows: Using compliant samples, solve for the parameter λ in the output formula of the radial basis function neural network. k α0, α d ; The obtained parameter λ k α0, α d Substituting the formula for the output of the radial basis function neural network, we obtain the physical observer; in, λ represents the physical compliance threshold output by the physical observer, M is the total number of compliant samples, and λ is the physical compliance threshold. k Let φ(r) be the interpolation coefficient of the radial basis kernel corresponding to the k-th sample. k ) is a quadratic radial basis function, r k Let α0 be the Euclidean distance between the input feature and the feature of the k-th sample, where α0 is a constant term, D is the dimension of the input feature, and d∈D. d F represents the coefficients of the polynomial terms. d The d-th dimension of the input feature vector is the feature value.

4. The method for reconstructing missing power system data based on physical deviation correction according to claim 1, characterized in that, The network architecture of the generator in Generative Adversarial Networks includes an input layer, a feature embedding layer, a residual layer, a physical attention layer, and an output layer. in, Input layer: From the target missing dataset X target Collect samples containing missing parts and extract the effective shape X. tgt-valid ; Extract input features F for each sample containing missing data. target,i,t =[i,t,S target,i ]; Input features F target,i,t Input the data into the already trained physics observer to obtain the physics compliance threshold. Effective shape X tgt-valid With physical compliance threshold Subtraction to obtain the physical deviation matrix The splicing noise, the flattened effective data, and the flattened physical deviation matrix form the generator's input. gen ; Where i is the node number, t is the time step, and S target,i Let be the topological feature of the i-th node. Let X be the average load compliance value of the i-th node at time t, output by the physical observer. tgt-valid,i,t The effective load of the i-th node at time t; Feature embedding layer: Input gen Perform a linear transformation and apply it to the ReLU function activation to output the embedded feature Feat. embed ; Residual layer: Two layers of residual blocks are set up, and the feature feed is embedded. embed As input to the residual layer, the output enhances the embedded features. res2,out ; Physical attention layer: Based on enhanced embedding features Feat res2,out Calculate attention weights Attn weight And apply attention weights Attn weight Enhanced embedding features Feat res2,out Weighting, obtaining weighted features. attn ; Output layer: Weighted features attn First, normalized data is obtained through linear transformation. Then reverse normalization to obtain the actual load range 5. The method for reconstructing missing power system data based on physical deviation correction according to claim 4, characterized in that, The loss function for adversarial generative networks is: L total =L GAN +0.7×L phys ; In the formula, L total To counteract the total loss of the generative network, L GAN To combat the losses, L phys Let B be the physical bias loss, and B be the total number of samples containing missing values, where b ∈ B, and P is the loss due to physical bias. D To resist the probability value output by the discriminator in the generative network, X valid,b For the payload of the b-th sample, Let N be the reconstructed power system data corresponding to the b-th sample, where N is the total number of distribution network nodes, T is the total number of time steps, and E is the physical deviation matrix.

6. The method for reconstructing missing power system data based on physical deviation correction according to claim 1, characterized in that, Joint training of the physical observer and the generative adversarial network includes: Collect samples containing missing data, extract input features, input them into the physical observer, and then calculate the physical deviation matrix; The physical deviation matrix, noise, and samples with missing data are concatenated and then input into the generator of the generative adversarial network to obtain the reconstructed power system data. Discriminator update against generative networks: The freeze generator takes the reconstructed power system data, including missing samples, as input, calculates the adversarial loss, and updates the discriminator parameters. Generator update: Freeze the discriminator, output the physical bias loss and the total loss of the adversarial generative network, and update the generator parameters; The physics observer is dynamically updated: The physical observer is dynamically updated based on compliant samples.

7. The method for reconstructing missing power system data based on physical deviation correction according to claim 1, characterized in that, The expression for obtaining the reconstructed power system data by applying a trained physical observer and a generative adversarial network is as follows: In the formula, This is the power system data reconstructed at time t for the final i-th node. For the final output of the generator at time t of the i-th node, P i,t,min Let P be the minimum load at time t for the i-th node. i,t,max Let be the maximum load of the i-th node at time t.

8. A power system missing data reconstruction system based on physical deviation correction, characterized in that, include: The observer sample module is used to acquire raw power system data; Based on the physical constraint equations of power flow, compliance samples corresponding to the original power system data are generated; The compliance threshold module is used to build a physical observer based on a radial basis function neural network, which is trained with compliance samples to output a physical compliance threshold. The data reconstruction and discrimination module is used to obtain the physical deviation matrix between the target missing data and the physical reasonable threshold, and uses it together with the original power system data as input to the adversarial generative network, and outputs the probability value of the reconstructed power system data. The training and application module is used to jointly train the physical observer and the generative adversarial network until the physical bias matrix meets the error criteria. The trained physical observer and generative adversarial network are then used to obtain reconstructed power system data.

9. The power system missing data reconstruction system based on physical deviation correction according to claim 8, characterized in that, Constructing a physical observer based on radial basis function neural networks includes: A radial basis function neural network is constructed using multiple quadratic radial basis functions. The output formula of the radial basis function neural network is as follows: Using compliant samples, solve for the parameter λ in the output formula of the radial basis function neural network. k α0, α d ; The obtained parameter λ k α0, α d Substituting the formula for the output of the radial basis function neural network, we obtain the physical observer; in, λ represents the physical compliance threshold output by the physical observer, M is the total number of compliant samples, and λ is the physical compliance threshold. k Let φ(r) be the interpolation coefficient of the radial basis kernel corresponding to the k-th sample. k ) is a quadratic radial basis function, r k Let α0 be the Euclidean distance between the input feature and the feature of the k-th sample, where α0 is a constant term, D is the dimension of the input feature, and d∈D. d F represents the coefficients of the polynomial terms. d The d-th dimension of the input feature vector is the feature value.

10. The power system missing data reconstruction system based on physical deviation correction according to claim 8, characterized in that, The network architecture of the generator in Generative Adversarial Networks includes an input layer, a feature embedding layer, a residual layer, a physical attention layer, and an output layer. in, Input layer: From the target missing dataset X target Collect samples containing missing parts and extract the effective shape X. tgt-valid ; Extract input features F for each sample containing missing data. target,i,t =[i,t,S target,i ]; Input features F target,i,t Input the data into the already trained physics observer to obtain the physics compliance threshold. Effective shape X tgt-valid With physical compliance threshold Subtraction to obtain the physical deviation matrix The splicing noise, the flattened effective data, and the flattened physical deviation matrix form the generator's input. gen ; Where i is the node number, t is the time step, and S target,i Let be the topological feature of the i-th node. Let X be the average load compliance value of the i-th node at time t, output by the physical observer. tgt-valid,i,t The effective load of the i-th node at time t; Feature embedding layer: Input gen Perform a linear transformation and apply it to the ReLU function activation to output the embedded feature Feat. embed ; Residual layer: Two layers of residual blocks are set up, and the feature feed is embedded. embed As input to the residual layer, the output enhances the embedded features. res2,out ; Physical attention layer: Based on enhanced embedding features Feat res2,out Calculate attention weights Attn weight And apply attention weights Attn weight Enhanced embedding features Feat res2,out Weighting, obtaining weighted features. attn ; Output layer: Weighted features attn First, normalized data is obtained through linear transformation. Then reverse normalization to obtain the actual load range

Citation Information

Patent Citations

  • Integrated energy system data compensation method based on time sequence condition generative adversarial network

    CN114022311A

  • RTU data reconstruction method and device based on generative adversarial network and medium

    CN119295765A

  • Intelligent filling method for power flow data based on space-time coupling

    CN119884628A