Power grid admittance parameter reverse inference method based on physical constraint deep learning

By employing a physical constraint-based deep learning approach, utilizing co-tree theory and the PhyG-Mamba model, we have addressed the computational complexity and physical law violations in reverse inference of admittance parameters in large-scale power grids. This approach enables efficient and accurate reverse inference of admittance parameters, supporting power grid security assessment and privacy protection.

CN122021908APending Publication Date: 2026-05-12SHANGHAI CHENWENHAO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI CHENWENHAO TECHNOLOGY CO LTD
Filing Date
2026-02-02
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing methods for inferring grid admittance parameters in reverse are computationally complex in large-scale grid scenarios or the inference results do not conform to physical laws. Furthermore, they lack explicit requirements on the amount of data, making it difficult to protect grid security and privacy.

Method used

A physical constraint-based deep learning approach is adopted. Data is filtered through cotree theory in graph theory, and a PhyG-Mamba model is constructed. Combined with hybrid head attention and selective state space model, the total loss function is constructed using DC power flow equations to achieve efficient inverse inference of admittance parameters.

Benefits of technology

It achieves efficient inference with small samples, ensures the physical consistency and computational efficiency of the inference results, provides power grid operators with a tool to assess privacy risks, and supports power grid security protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122021908A_ABST
    Figure CN122021908A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid admittance parameter reverse inference method based on physical constraint deep learning. The power grid admittance parameter reverse inference method comprises the following steps: step 1, data acquisition and theoretical screening; step 2, feature extraction and construction; step 3, a PhyG-Mama inference model is constructed; 4, performing physical constraint optimization training; 5, reverse inference is carried out; according to the method, on the basis of the Cotree theory in the graph theory, it is strictly proved that the minimum data volume required by the maximum deduction threat is LN + 1 (N is the number of nodes, and L is the number of lines) from the mathematical level, and the data lower bound of reverse deduction of the power grid admittance parameters is defined for the first time; by screening the minimum complete data set when the remaining tree lines are respectively congested, the method does not need to depend on massive historical data, solves the problem that a traditional mathematical optimization method is large in data demand, reduces the data collection cost and storage overhead, and achieves efficient inference in a small sample scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart grid network security technology, specifically a method for inverse inference of grid admittance parameters based on physical constraint deep learning. Background Technology

[0002] With the increasing transparency of the electricity market, system operators (ISOs) typically release market data such as nodal marginal prices (LMP) and shadow prices to the public to ensure fairness and transparency in electricity market transactions. However, related research indicates that attackers could potentially use this publicly available data to reverse engineer a crucial and sensitive physical parameter in the power grid—the admittance matrix. The admittance matrix contains detailed information about the power grid's topology and line parameters. If this matrix information is leaked, attackers could use it to launch False Data Injection Attacks (FDIA) or cascading failure attacks, posing a serious threat to the safe and stable operation of the power grid.

[0003] Current reverse engineering methods suffer from two main types of significant drawbacks. One type consists of traditional mathematical optimization methods, such as least squares. These methods require large amounts of data and suffer from extremely high computational complexity when dealing with large-scale power grid problems, often facing the "curse of dimensionality," which severely limits their application in real-world large-scale power grid scenarios. The other type comprises ordinary data-driven methods, such as convolutional neural networks (CNNs) and long short-term memory networks (LSTMs). While these methods are relatively fast, they lack adherence to the physical laws of power systems. Parameters inferred through these methods often violate Kirchhoff's laws, such as exhibiting negative resistance, which contradicts actual physical characteristics. Furthermore, these methods do not theoretically define the "minimum amount of data required to reach the maximum inferred threat," making it difficult for power grid operators to accurately assess the cost of related attacks and the threat boundaries to power grid data privacy, hindering the formulation and implementation of power grid data privacy protection strategies. Summary of the Invention

[0004] In order to overcome the shortcomings of the prior art, this invention provides a method for inverse inference of power grid admittance parameters based on physical constraint deep learning, which effectively solves the problems raised in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for inverse inference of power grid admittance parameters based on physical constraint deep learning, comprising the following steps: Step 1: Data Collection and Theoretical Screening Collect publicly available data on the power system, including local marginal price (LMP) at nodes, line shadow price, and grid topology; construct a homogeneous linear equation system based on the DC power flow model; and use the Cotree theory in graph theory to select the minimum electricity price data that maximizes the rank of the coefficient matrix of the equation system from historical data to construct a training dataset. Step 2: Feature Extraction and Construction Node features and edge features are extracted from the filtered dataset; the node features include the congestion component (MCC) and topology information in LMP, and the edge features include line shadow prices; Step 3: Construct the PhyG-Mamba inference model A deep neural network model is constructed, which includes an improved encoder and a Mamba module. The improved encoder adopts a hybrid head attention (MDR) mechanism to dynamically route and encode node features. The Mamba module is based on a selective state space model to process sequence data that integrates node encoded features and edge features, and captures global dependencies. Step 4: Physical Constraint Optimization Training Substitute the predicted admittance matrix output by the model into the DC power flow equation to calculate the physical constraint loss, construct the total loss function by combining the predicted numerical error, and iteratively update the model parameters. Step 5: Reverse Inference Using a pre-trained PhyG-Mamba model, the system takes publicly available power data for the time period to be tested as input and outputs the admittance matrix parameters of the target power grid.

[0006] Preferably, the homogeneous linear equations constructed based on the DC power flow model in step 1 are as follows: Where A is the node-line incident matrix, Let be the congestion component vector at time t. Let X be the shadow price vector at time t, and let X be the reciprocal vector of the line reactance to be inferred.

[0007] Preferably, the specific method for filtering data using the co-tree theory in step 1 includes: For a power grid topology containing N nodes and L lines, determine the remainder tree corresponding to any spanning tree, where the remainder tree contains L−N+1 lines; Electricity price data for L−N+1 lines in the remaining tree at different times when congestion occurs are selected as the minimum complete dataset that makes the coefficient matrix of the equation system full rank.

[0008] Preferably, the improved encoder in step 3 employs a hybrid head attention (MDR) mechanism, specifically including: The hybrid head attention MDR mechanism comprises h attention heads and a router. The router activates Top-k attention heads for each token. The h attention heads are divided into... A shared header and One routing header; The router calculates a routing score for each input token. ; The weighted sum of the shared header and the activated route header is calculated as the output. The output calculation formula is: in The projection matrix represents the routing score only when the i-th head is activated. Not zero.

[0009] Preferably, the Mamba module in step 3 is based on a selective state-space model, and its specific features include: A selection mechanism is introduced to make the parameters Δ, B, and C of the state-space model change dynamically with the input X(t). The specific calculation is as follows: The continuous parameters are discretized using the zero-order hold method, and a parallel correlation scan algorithm is used to achieve linear time complexity sequence modeling to process long-sequence power grid characteristic data.

[0010] Preferably, the total loss function L in step 4 is constructed as follows: in, This is the admittance matrix predicted by the model. The true admittance matrix, For line power flow based on predictive admittance calculation, For line power flow calculation based on real admittance, These are the weighting coefficients.

[0011] Compared with the prior art, the beneficial effects of the present invention are: 1. Defining the lower bound of data to achieve efficient inference with small samples: Based on the cotree theory in graph theory, this invention rigorously proves from a mathematical perspective that the minimum amount of data required for the maximum inference threat is L−N+1 (N is the number of nodes, L is the number of lines), thus defining for the first time the lower bound of data for inverse inference of power grid admittance parameters; by selecting the minimum complete dataset when cotree lines are congested respectively, it does not need to rely on massive historical data, solving the pain point of "large data requirements" of traditional mathematical optimization methods, reducing data collection costs and storage overhead, and achieving efficient inference in small sample scenarios; 2. Improve inference accuracy and ensure physical consistency. This invention innovatively introduces the power flow equation of the power system into the loss function and constructs a total loss function that includes physical constraints. By minimizing this loss function, the model is forced to learn physical laws such as Kirchhoff's laws during training, which fundamentally avoids the problem of inference parameters violating physical characteristics (such as negative resistance) in ordinary data-driven methods (such as CNN and LSTM), and ensures the physical consistency of the inference results. 3. Optimizing the model architecture to balance computational efficiency and global dependency capture: The PhyG-Mamba model designed in this invention integrates the advantages of the Hybrid Head Attention (MDR) mechanism and the Mamba module. The MDR mechanism dynamically activates the Top-k attention heads through routers, reducing computational redundancy while capturing node topology dependencies. The Mamba module, based on a selective state-space model, achieves long sequence processing with a linear time complexity of O(n) through dynamic parameter adjustment and parallel scanning algorithms, efficiently capturing the global nonlinear mapping relationship between electricity price data and admittance parameters. Compared with traditional sequence models such as LSTM, this model significantly improves computational efficiency in large-scale power grid scenarios and is adaptable to different scale power grid systems such as IEEE 300-Bus and Case 2000, exhibiting good scalability. 4. Supporting privacy risk assessment and assisting in power grid security protection: This invention provides power grid operators with theoretical tools and technical means to quantify the risks of data disclosure by simulating the process of attackers using publicly available data to reverse-engineer sensitive parameters of the power grid. Power grid operators can use this method to assess the security of existing data disclosure strategies, identify privacy leakage risk points, and then optimize the scope of data release, delay the release time, or de-identify sensitive data, thereby ensuring the safe and stable operation of the smart grid. Attached Figure Description

[0012] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0013] In the attached diagram: Figure 1 This is a schematic diagram of the overall process of the method of the present invention; Figure 2 This is a schematic diagram based on the theory of co-trees; Figure 3 This is a diagram of the overall network architecture of the PhyG-Mamba model; Detailed Implementation

[0014] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0015] Depend on Figures 1-3 This invention relates to a method for inverse inference of power grid admittance parameters based on physical constraint deep learning, comprising the following steps: Step 1: Data Acquisition and Data Filtering Based on Co-tree Theory Publicly available data on the power system is collected, specifically including nodal local marginal prices (LMP), line shadow prices, and grid topology. To maximize threat inference with minimal data usage, this step constructs a homogeneous linear equation system relating electricity price and admittance based on a DC power flow model. Where A is the node-line incident matrix, Let be the congestion component vector at time t. Let X be the shadow price vector at time t, and let X be the reciprocal vector of the line reactance to be inferred.

[0016] Using cotree theory from graph theory for data filtering, for a power grid topology containing N nodes and L lines, we first identify the cotree corresponding to its spanning tree, which contains L−N+1 lines. The rank of the coefficient matrix of the homogeneous linear equation system constructed above reaches its maximum if and only if the L−N+1 lines in the cotree experience congestion in L−N+1 different time periods. Based on this filtering condition, we select the minimum electricity price data combination that achieves full rank for the equation system, and use this as the maximum inferred threat dataset, i.e., the training dataset.

[0017] Step 2: Feature Extraction and Construction Feature vectors are extracted from the filtered training dataset. Specifically, the congestion component (MCC) and topological connectivity information of each node are extracted as node features. The node features are used to characterize the economic and physical states of the node; the shadow price of the line is extracted as the edge feature. This edge feature is used to characterize the degree of congestion of the line and the impact of the line on the price.

[0018] Step 3: Construct the PhyG-Mamba inference model A deep neural network model containing an improved encoder and a Mamba module is constructed. The specific structure of the model is as follows: The improved encoder employs a Hybrid Head Attention (MDR) mechanism to encode node features. The MDR mechanism consists of h attention heads and a router. The router activates the Top-k attention heads for each token. These h attention heads are divided into... A shared header and Each input token has a routing header. The router calculates a routing score for each input token. Then calculate and output according to the formula: in This is the projection matrix. This hybrid head attention (MDR) mechanism effectively captures node topological dependencies while reducing computational redundancy.

[0019] The encoded node features are fused with the edge features, and then the fused features are input into the selective state-space model (Mamba module). A selection mechanism is introduced in the Mamba module, causing the discretization parameters Δ, B, and C to dynamically change with the input X(t). The specific calculation method is as follows: Meanwhile, a parallel scanning algorithm is used to achieve linear time complexity. Sequence modeling is used to efficiently capture the global nonlinear mapping relationship between electricity price data and admittance parameters.

[0020] Step 4: Physical Constraint Optimization Training The model is trained by constructing a loss function that incorporates physical constraints. The predicted admittance matrix output by the model is then used. Substituting into the DC power flow equation Calculate line power flow based on predictive admittance And compare it with line power flow based on real admittance calculation. Compare the results. Construct the total loss function: The first term represents the mean absolute percentage error of the admittance value, and the second term represents the physical power flow constraint error. The weighting coefficients are used. By minimizing this total loss function, the model is forced to learn physical laws related to power systems, such as Kirchhoff's laws, during backpropagation, ensuring that the inferred admittance parameters conform to actual physical characteristics.

[0021] Step 5: Reverse Inference By using a trained PhyG-Mamba model and inputting publicly available power data for the period to be tested into the model, the model will directly output the admittance matrix parameters of the target power grid, thereby completing the inverse inference of the power grid admittance parameters.

[0022] Example 1: Reverse inference of the IEEE 30-node system Step 1: Data Preparation and Theoretical Screening Taking the IEEE 30-node system as an example (where N=30 nodes and L=41 lines), historical node marginal price (LMP) data of this system is collected. Shadow prices And the topological correlation incident matrix A. According to the co-tree theory, the number of co-tree lines is calculated to be L−N+1=41−30+1=12, and these 12 co-tree lines are then identified. From the collected historical data, samples of these 12 lines that experienced congestion at different times (i.e., corresponding shadow prices were non-zero) are selected. These samples together constitute the inference threat dataset, i.e., the training dataset.

[0023] Step 2: Feature Extraction and Construction Extract the congestion component (MCC) and node type for each node to construct a node feature matrix. Extract the shadow price of the line and construct the edge feature vector. .

[0024] Step 3: Model Building and Training. Construct the PhyG-Mamba model with the following settings: number of attention heads h=8, where the shared attention heads... =2. The constructed node features are input into the improved encoder. The router in the encoder calculates the routing score based on the token content, activates the Top-k routing headers, and outputs the encoded node representation. The encoded node representation is concatenated with the edge features (shadow prices) to obtain a fused feature sequence, which is then input into the Mamba layer. The Mamba layer captures the nonlinear mapping relationship between electricity price data and admittance parameters by dynamically selecting the Δ, B, and C parameters.

[0025] Step 4: Physically constrained optimization training model outputs prediction admittance matrix Calculate the numerical loss: in This is the true admittance matrix. Based on the DC power flow equations... Solve for voltage phase angle Then, the line power flow based on the predicted admittance is calculated. Calculate physical loss: in This is the line power flow calculated based on the actual admittance. The total loss function is set as follows: During the training phase, the Adam optimizer was used, and the number of training epochs was set to 100.

[0026] Step 5: Reverse Inference The publicly available power data for the period to be tested is input into the trained PhyG-Mamba model, and the model outputs the admittance matrix parameters of the target power grid to complete the reverse inference.

[0027] Example 2: Testing in IEEE 300-Bus and larger (Case 2000) systems The method of this invention was tested in larger-scale power grid systems such as IEEE 300-Bus and Case 2000. The model parameters were set as follows: the number of hybrid head attention (MDR) layers was set to 4, the number of Mamba layers was set to 2, and the hidden layer dimension was... =256.

[0028] Test results show that in a 57-node system, the mean absolute percentage error (MAPE) of the method described in this invention is 1.32%, significantly better than the 4.43% of convolutional neural networks (CNNs) and the 36.58% of long short-term memory networks (LSTMs); in a Case2000 system, the mean absolute percentage error (MAPE) of the method described in this invention is only 0.57%. These test results fully demonstrate the superiority of the Mamba module in processing long sequence data, and the effectiveness of introducing physical constraints in this invention in improving inference accuracy.

[0029] As can be seen from the above embodiments, the present invention can achieve high-precision simulation of stealing the admittance matrix, a core parameter of the power grid, using only a minimal amount of publicly available data. This provides power grid operators with a powerful theoretical tool and technical means to assess the privacy risks that may arise from data disclosure, and helps power grid operators to formulate more scientific and reasonable power grid data privacy protection strategies.

[0030] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0031] Furthermore, the functional units described in the embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0032] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for inverse inference of power grid admittance parameters based on physical constraint deep learning, comprising the following steps: Step 1: Data Collection and Theoretical Screening Collect publicly available data on the power system, including local marginal price (LMP) at nodes, line shadow price, and grid topology; construct a homogeneous linear equation system based on the DC power flow model; and use the Cotree theory in graph theory to select the minimum electricity price data that maximizes the rank of the coefficient matrix of the equation system from historical data to construct a training dataset. Step 2: Feature Extraction and Construction Node features and edge features are extracted from the filtered dataset; the node features include the congestion component (MCC) and topology information in LMP, and the edge features include line shadow prices; Step 3: Construct the PhyG-Mamba inference model A deep neural network model is constructed, which includes an improved encoder and a Mamba module. The improved encoder adopts a hybrid head attention (MDR) mechanism to dynamically route and encode node features. The Mamba module is based on a selective state space model to process sequence data that integrates node encoded features and edge features, and captures global dependencies. Step 4: Physical Constraint Optimization Training Substitute the predicted admittance matrix output by the model into the DC power flow equation to calculate the physical constraint loss, construct the total loss function by combining the predicted numerical error, and iteratively update the model parameters. Step 5: Reverse Inference Using a pre-trained PhyG-Mamba model, the system takes publicly available power data for the time period to be tested as input and outputs the admittance matrix parameters of the target power grid.

2. The method for inverse inference of power grid admittance parameters based on physical constraint deep learning according to claim 1, characterized in that: The homogeneous linear equations constructed based on the DC power flow model in step 1 are as follows: Where A is the node-line incident matrix, Let be the congestion component vector at time t. Let X be the shadow price vector at time t, and let X be the reciprocal vector of the line reactance to be inferred.

3. The method for inverse inference of power grid admittance parameters based on physical constraint deep learning according to claim 1, characterized in that: The specific methods for filtering data using the co-tree theory in step 1 include: For a power grid topology containing N nodes and L lines, determine the remainder tree corresponding to any spanning tree, where the remainder tree contains L−N+1 lines; Electricity price data for L−N+1 lines in the remaining tree at different times when congestion occurs are selected as the minimum complete dataset that makes the coefficient matrix of the equation system full rank.

4. The method for inverse inference of power grid admittance parameters based on physical constraint deep learning according to claim 1, characterized in that: The improved encoder in step 3 employs a hybrid head attention MDR mechanism, specifically including: The hybrid head attention MDR mechanism comprises h attention heads and a router. The router activates Top-k attention heads for each token. The h attention heads are divided into... A shared header and One routing header; The router calculates a routing score for each input token. ; The weighted sum of the shared header and the activated route header is calculated as the output. The output calculation formula is: in The projection matrix represents the routing score only when the i-th head is activated. Not zero.

5. The method for inverse inference of power grid admittance parameters based on physical constraint deep learning according to claim 1, characterized in that: The Mamba module in step 3 is based on a selective state-space model, and its specific features include: A selection mechanism is introduced to make the parameters Δ, B, and C of the state-space model change dynamically with the input X(t). The specific calculation is as follows: The continuous parameters are discretized using the zero-order hold method, and a parallel correlation scan algorithm is used to achieve linear time complexity sequence modeling to process long-sequence power grid characteristic data.

6. The method for inverse inference of power grid admittance parameters based on physical constraint deep learning according to claim 1, characterized in that: The total loss function L in step 4 is constructed as follows: in, This is the admittance matrix predicted by the model. The true admittance matrix, For line power flow based on predictive admittance calculation, For line power flow calculation based on real admittance, These are the weighting coefficients.