A micro-grid parameter identification method and system based on a physical information neural network

By combining a physical information neural network approach with attack detection and microgrid physical equations, the accuracy and robustness issues of microgrid parameter identification under network attacks are solved, achieving high-precision parameter identification and dynamic updating in attack environments.

CN122332829APending Publication Date: 2026-07-03OCEAN UNIV OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
OCEAN UNIV OF CHINA
Filing Date
2026-06-02
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In a cyberattack environment, traditional microgrid parameter identification methods are easily affected by abnormal and malicious attack data, leading to distorted identification results and making it difficult to simultaneously meet the requirements of accuracy, robustness, and physical consistency.

Method used

A physical information neural network-based approach is adopted. By constructing an attack detection model and a joint loss function, parameter identification is performed using measurement data with labeled credibility. Constraints and corrections are applied in conjunction with the physical equations of the microgrid. A physical information neural network is then established for parameter identification.

Benefits of technology

It improves the accuracy, robustness, and physical consistency of microgrid parameter identification results, enabling effective parameter identification under network attack environments without affecting power quality and providing dynamic response capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332829A_ABST
    Figure CN122332829A_ABST
Patent Text Reader

Abstract

This application relates to the fields of power system automation and network security technology, and discloses a method and system for microgrid parameter identification based on a physical information neural network. The method includes: collecting real-time electrical measurement data from multiple nodes in the microgrid and preprocessing it; using an attack detection model to perform attack detection on the processed measurement data, identifying whether the processed measurement data is affected by network attacks, and outputting measurement data with labeled credibility; constructing a physical information neural network and a joint loss function, the joint loss function including data fitting loss and physical residual loss; training the physical information neural network using the joint loss function until the physical information neural network converges; and extracting the physical parameters of the microgrid to be identified from the network weights of the physical information neural network. This improves the accuracy, physical consistency, and reliability of microgrid parameter identification results under network attack environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of power system automation and network security technology, and for example to a microgrid parameter identification method and system based on physical information neural networks. Background Technology

[0002] As an important form of efficient utilization of distributed energy resources, the dynamic characteristics of microgrids are highly dependent on accurate line parameters, filter electrical parameters, and control parameters. These parameters not only directly affect the power flow distribution, stability analysis, and controller design of the microgrid, but also relate to the effectiveness of functions such as state estimation, protection setting, optimized operation, and coordinated control. Furthermore, the accurate acquisition of key parameters is equally important during microgrid operation mode switching, fault diagnosis, energy management, and distributed power source coordinated control. Therefore, accurate identification of key parameters in microgrids is a crucial foundation for ensuring their safe and stable operation.

[0003] Microgrid parameter identification typically relies on real-time measurement data such as node voltage and current. However, with the opening of the communication layer, microgrids face severe cybersecurity threats. Attackers can tamper with sensor, actuator, and communication network data (such as voltage and current), causing the data upon which the identification algorithm is based to deviate from the actual operating state, resulting in distorted parameter identification results and affecting the correctness of subsequent control, protection, and operational decisions. Especially under spoofed data injection attacks, the attack signals are often highly concealed, capable of bypassing conventional anomaly detection mechanisms, causing the identification model to output parameter results that deviate from the true values ​​based on erroneous data. In this situation, traditional parameter identification methods based on measurement data are easily interfered with by abnormal and malicious attack data, posing significant challenges to their identification accuracy and robustness.

[0004] Traditional parameter identification methods can be divided into active and passive approaches: active methods infer parameters by injecting disturbance signals to obtain responses, which can affect power quality; passive methods fit historical data, but are less robust when the data is corrupted, making it difficult to guarantee the accuracy and reliability of the identification results. Especially in a network attack environment, if the identification method cannot effectively identify and suppress the influence of attacked measurement data, the obtained parameter results often deviate from the true values.

[0005] In recent years, deep neural networks have been used for microgrid modeling, enabling them to learn complex nonlinear mapping relationships using large amounts of data and improving identification efficiency to some extent. However, purely data-driven models lack physical constraints, and when subjected to cyberattacks, their identification results often violate physical laws, resulting in insufficient reliability. In other words, when the input measurement data is attacked by spoofed data injection, the model is prone to overfitting abnormal data, leading to identification results that are inconsistent with the actual physical mechanism. Furthermore, purely data-driven models are usually highly dependent on the distribution of training data. When there are differences between the actual operating conditions and the distribution of training samples, their generalization ability and stability will also be affected. Relying solely on traditional data fitting methods or purely data-driven methods makes it difficult to simultaneously meet the comprehensive requirements of accuracy, robustness, and physical consistency for microgrid parameter identification under cyberattack environments.

[0006] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0007] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.

[0008] This disclosure provides a microgrid parameter identification method and system based on a physical information neural network to improve the accuracy, physical consistency, and reliability of microgrid parameter identification results under network attack environments.

[0009] In some embodiments, the microgrid parameter identification method based on a physical information neural network includes: S10, collecting real-time electrical measurement data from multiple nodes in the microgrid, and preprocessing the real-time electrical measurement data to obtain processed measurement data; wherein, the real-time electrical measurement data includes: node voltage and current; S20, establishing an attack detection model trained based on a fake data injection attack model, using the attack detection model to perform attack detection on the processed measurement data, identifying whether the processed measurement data is affected by a network attack, and outputting measurement data with labeled credibility; wherein, the attack detection model is used to perform attack detection on the processed measurement data, including: inputting the processed measurement data into the attack detection model, and the attack detection model outputting voltage prediction values ​​and current prediction values ​​for the DC microgrid; wherein, the attack detection model includes: an input layer, a multi-layer LSTM, an attention mechanism layer, and an output layer; based on the voltage prediction values ​​and current prediction values... The process involves several steps: S1) Predicting values ​​and determining whether the processed measurement data has been subjected to spoofing attacks; labeling the credibility based on the judgment result; where a higher value indicates less credible data; S2) Constructing a physical information neural network (PIN), which takes the labeled credibility measurement data as input and outputs node electrical state quantities; where the node electrical state quantities include: voltage prediction values, current prediction values, and bus voltage prediction values ​​of distributed generation units; S3) Constructing a joint loss function, which includes: data fitting loss and physical residual loss; where the labeled credibility measurement data is used as the training set of the PSN and is used to adjust the credibility weights in the data fitting loss; S4) Training the PSN using the joint loss function until the PSN converges; S50) After convergence, extracting the microgrid's unidentified physical parameters from the network weights of the PSN.

[0010] In some embodiments, the microgrid parameter identification system based on a physical information neural network includes: a data acquisition and preprocessing module, configured to acquire real-time electrical measurement data from multiple nodes in the microgrid, and preprocess the real-time electrical measurement data to obtain processed measurement data; wherein the real-time electrical measurement data includes node voltage and current; and an attack detection and credibility labeling module, configured to establish an attack detection model trained based on a fake data injection attack model, use the attack detection model to perform attack detection on the processed measurement data, identify whether the processed measurement data is affected by a network attack, and output measurement data labeled with credibility; wherein the attack detection model is used to perform attack detection on the processed measurement data, including: inputting the processed measurement data into the attack detection model, and the attack detection model outputting voltage prediction values ​​and current prediction values ​​for the DC microgrid; wherein the attack detection model includes: an input layer, a multi-layer LSTM, an attention mechanism layer, and an output layer; and based on the voltage prediction values ​​and the current prediction values... The system is configured to: determine whether the processed measurement data has been subjected to a spoofed data injection attack; label the credibility based on the judgment result; wherein, the larger the value of the judgment result, the less credible the data; a PINN construction module, configured to construct a physical information neural network, wherein the physical information neural network takes the labeled credibility measurement data as input and the node electrical state quantities as output; wherein, the node electrical state quantities include: voltage prediction values, current prediction values, and bus voltage prediction values ​​of distributed generation units; a loss function construction module, configured to construct a joint loss function, wherein, the joint loss function includes: data fitting loss and physical residual loss; wherein, the labeled credibility measurement data is used as the training set of the physical information neural network and is used to adjust the credibility weights in the data fitting loss; a training module, configured to train the physical information neural network using the joint loss function until the physical information neural network converges; and a parameter extraction module, configured to extract the physical parameters to be identified of the microgrid from the network weights of the physical information neural network after training convergence.

[0011] The present disclosure provides a microgrid parameter identification method and system based on a physical information neural network, which can achieve the following technical effects: Strong resistance to attacks: This method utilizes the physical equations of the microgrid to construct a physical constraint mechanism. Even if sensors, actuators, and communication networks are subjected to spoofed data injection attacks, the physical information neural network can still constrain and correct the parameter identification process using uncontaminated physical relationships. Compared to purely data-driven deep neural network methods, this method exhibits stronger robustness and higher identification reliability in network attack environments, thereby improving the physical consistency of microgrid parameter identification results under network attack conditions.

[0012] No additional disturbance required: This method is based on passive measurement data for parameter identification, which does not inject additional disturbance signals into the microgrid, does not affect power quality, has good engineering applicability, and thus improves the reliability of microgrid parameter identification results under network attack environment.

[0013] Dynamic response: This method can update and dynamically identify microgrid parameters online based on real-time measurement data and attack detection results, thereby effectively tracking parameter drift caused by changes in operating conditions, environmental changes or network attacks, and providing a basis for adaptive protection and fault-tolerant control under attack, thus improving the accuracy of microgrid parameter identification results under network attack environment.

[0014] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0015] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein: Figure 1 This is a schematic diagram of a microgrid parameter identification method based on a physical information neural network provided in an embodiment of this disclosure; Figure 2 This is a schematic diagram of the attack detection model provided in the embodiments of this disclosure; Figure 3 This is a simulation diagram of parameter identification based on a physical information neural network provided in this embodiment of the disclosure; Figure 4 This is a schematic diagram of the experimental results based on the least squares method; Figure 5 This is a schematic diagram of the experimental results based on the present invention. Detailed Implementation

[0016] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.

[0017] The terms "first," "second," etc., used in the specification and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0018] Unless otherwise stated, the term "multiple" means two or more.

[0019] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0020] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0021] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.

[0022] Combination Figure 1 As shown, this disclosure provides a microgrid parameter identification method based on a physical information neural network, including: S10, Data Acquisition and Preprocessing. Real-time electrical measurement data from multiple nodes in the microgrid is acquired and preprocessed to obtain processed measurement data. The real-time electrical measurement data includes node voltage and current. Specifically, it includes: S11 deploys sensors for each distributed generation unit to collect real-time electrical measurement data with millisecond-level accuracy: time , No. Voltage of each distributed generation unit Current and bus voltage And it is transmitted to the cloud via the MQTT protocol.

[0023] S12, the cloud platform receives the uploaded real-time electrical measurement data, then parses it and extracts key fields such as device ID, timestamp, measurement value, unit, etc.

[0024] S13, validate the format of key fields to determine if the data structure conforms to preset rules. First, perform a field integrity check, verifying the existence of required fields such as device ID, timestamp, measurement value, and unit. If any are missing, discard the data. Next, check if the field values ​​are of the correct type; for example, measurement values ​​should be floating-point numbers, and units should be strings. Otherwise, conversion is required. Finally, perform a timestamp validity check, verifying if the timestamp is in a valid time format and the time difference is within a reasonable range. If it is not in a valid time format and / or the time difference is not within a reasonable range, discard the data. In this way, the data structure is processed to conform to preset rules.

[0025] S14 sets fixed minimum and maximum values ​​for the sensor. Based on the physical properties of the distributed power generation unit, such as the voltage, the reasonable detection range is set to 0~220V. The data is then filtered, and data outside the detection range is discarded.

[0026] In step S15, the retained reasonable data is processed using a data window, with the data window size set to 6. The data is then normalized and stored in a time-series database to improve the convergence speed of the neural network in the attack detection and parameter identification modules.

[0027] S20, Attack Detection and Credibility Labeling. An attack detection model trained on a fake data injection attack model is established. This model is used to detect attacks on processed measurement data, identifying whether the processed measurement data has been affected by network attacks, and outputting measurement data labeled with credibility. Specifically, this includes: S21, establish three fake data injection attack models, including: ① The first attack model characterizing the situation where the sensor is attacked: , in, Indicates time; The designation of the distributed generation unit; Indicates the first Damage status signal of a distributed generation unit; This indicates an attack signal injected into the sensor; This indicates that the sensor has been attacked; otherwise, it is 0. Indicates the first Status signals of each distributed generation unit.

[0028] ② A second attack model representing the situation where the actuator is attacked: , in, Indicates the first Damage control signal for a distributed generation unit; This indicates an attack signal injected into the actuator; This indicates that the executor has been attacked; otherwise, it is 0. Indicates the first Control signals for each distributed generation unit.

[0029] ③ A third attack model characterizing attacks on communication networks: , in, Indicates the first Each distributed generation unit received Damage status signal; Indicates injection arrive Attack signals on the communication link; This indicates that the communication link has been attacked; otherwise, it is 0. Indicates the first Each distributed generation unit received The status signal.

[0030] S22, an LSTM network attack detection model based on an attention model is established and trained using the three attack models mentioned above. The problem of False Data Injection (FDIA) attack detection is modeled as a time series anomaly detection problem, and a prediction-then-judgment method is used for detection. Specifically, combining... Figure 2 As shown, the attack detection model includes: ① Input layer: The input time series data is obtained through the data acquisition and preprocessing module, and the input width is set to 6.

[0031] ② Multilayer LSTM: LSTM includes a forgetting gate, a memory gate, and an output gate to obtain the cell state. and output signal The task of the forget gate is to receive the output signal from the previous time step. and Input signal at time The retention and forgetting are determined by a sigmoid function. A part of it.

[0032] The output value of the forget gate is represented as: , in, , This represents the sigmoid function. Indicates the weight of the forget gate. This indicates the bias of the forget gate. Values ​​close to 0 will be forgotten, while values ​​close to 1 will be retained.

[0033] The memory gate first outputs through the sigmoid function: , in, , and These represent the weights and biases, respectively.

[0034] Then the input is transformed using the tanh function: , in, and These represent the weights and biases, respectively.

[0035] Through the forgetting gate and the remembering gate, the cell state is updated as follows: , in, This indicates element-wise multiplication. The output gate outputs a signal. And use it as the input signal for the next LSTM layer, expressed as: , in, This indicates the amount of output information controlling the LSTM unit. and These represent the weights and biases, respectively.

[0036] ③ Attention Mechanism Layer: The attention mechanism layer is designed to perform weighted summation on the time features extracted by the multi-layer LSTM, further extracting the deep features of the time series data, improving the nonlinear expressive power of the features, and thus improving the accuracy of data prediction.

[0037] First, calculate the weighted score, which is represented as: , in, and For hyperparameters; Represents the attention matrix; Represents the input vector; Indicates the first The first time step The output signal of the LSTM layer.

[0038] The normalized weights are calculated using the softmax function, expressed as follows: , Further solving for the weighted sum, we can express it as: , in, Indicates the number of layers in the LSTM. This represents the total number of layers in the LSTM. Indicates the first The weighting coefficients of the layers, This represents the weighted sum of the output signals of a multilayer LSTM.

[0039] ④ Output layer: This is the fully connected layer. The label width of the data window is set to 1. The output of this layer is the predicted value of the voltage and current of the DC microgrid.

[0040] S23, based on the predicted voltage and current values, determines whether the processed measurement data is susceptible to FDIA attacks. Specifically, this includes: S231, calculate the vector L2 norm corresponding to the difference between the predicted voltage value and the measured voltage value, and the difference between the predicted current value and the measured current value: .

[0041] in, These represent the measured values ​​of voltage and current.

[0042] S232, when the vector's L2 norm is equal to 0, it is determined that no attack has occurred.

[0043] S233, when the second norm of a vector is not equal to 0, it is determined that an attack has occurred.

[0044] S24, ABS is used as a confidence level marker in the measurement data. The higher the ABS value, the less reliable the measurement data. The measurement data with the confidence level marker is then passed to the next module for parameter identification.

[0045] In this way, an attack detection model can be established through S20 to detect attacks on the processed measurement data, identify whether the measurement data has been attacked by the network, and label the measurement data with credibility to reduce the impact of network attacks on the accuracy of microgrid physical parameter identification.

[0046] S30, Construct a physical information neural network. Build a 5-layer deep neural network. , The network input consists of measurement data representing the confidence level of the labeled data. Each layer has 64 neurons, and the activation function is sin. , Indicates the first Measurement time of each distributed generation unit They represent the first Voltage measurements, current measurements, and bus voltage measurements for each distributed generation unit. Represents network parameters, output as , including the Voltage forecast, current forecast, and bus voltage forecast for each distributed generation unit. As trainable variables, they are directly used as learnable parameters (nn.Parameter) in PyTorch models, participating in gradient updates along with network weights. This establishes a mapping relationship between measurement data, node state variables, and microgrid physical parameters.

[0047] S40, Loss Function Construction. Construct a joint loss function, which includes: data fitting loss and physical residual loss. Specifically, the measurement data labeled with confidence levels is used as the training set for the physical information neural network and is used to adjust the confidence weights in the data fitting loss. This includes: S41, Calculate the data fitting loss The mean square error between the predicted values ​​of the neural network and the measured values ​​of the DC microgrid is calculated, and each measurement point is weighted according to the credibility weight of the attack detection model output, thus reducing the weight of attacked data. This weighting method can be regarded as a component weighting mechanism based on data reliability, assigning different weights to each measurement data according to its credibility, thereby reducing the interference of abnormal or attacked data on the overall identification results. Its expression can be written as: , in, Indicates the total number of measurement samples; Indicates the number of measurement samples; Weights representing credibility; Indicates the first The measurement sample number Voltage prediction, current prediction and bus voltage prediction for each distributed generation unit; Indicates the first The measurement sample number Voltage measurements, current measurements, and bus voltage measurements for each distributed generation unit.

[0048] S42, Construct the differential equations for a DC microgrid. Specifically, this includes: S421, Establish the dynamic equations of the DC microgrid: , , in, and They represent the first Voltage derivative and current derivative of a distributed generation unit; and They represent the first Voltage and current of each distributed generation unit; Indicates the bus voltage; Indicates the line resistance; and These represent the electrical parameters of the filter; This indicates the source voltage for power supplied by renewable energy sources; Indicates the first Duty cycle of a buck converter.

[0049] S422, in order to enable each distributed generation unit to achieve grid connection operation in islanded operation mode, a reference voltage is generated through a droop control strategy. : , in, Indicates the nominal voltage setting value; Indicates the first The droop coefficient of each distributed generation unit, and has .

[0050] S423, considering that the circuit's bottom-level control loop uses voltage and current dual closed-loop control, the outer-loop voltage control module is represented as: , in, Indicates a reference value for the line current; and These represent the proportional coefficient and the integral coefficient, respectively. This represents an intermediate variable related to voltage; It represents the derivative of an intermediate variable related to voltage.

[0051] S424 represents the inner loop current control module as follows: , in, and These represent the proportional coefficient and the integral coefficient, respectively. Indicates intermediate variables related to current; It represents the derivative of an intermediate variable related to current.

[0052] S425, the The distributed two-level control strategy for a distributed generation unit is represented as follows: , in, and These represent the voltage and current control coefficients, respectively. Indicates the adjustment coefficient; Indicates the initial time; express Whether or not Connected, if connected then Otherwise ; Indicates the first The droop coefficient of each distributed generation unit; Indicates the first The set of neighbors of a distributed generation unit; Indicates the first The current distribution ratio of each distributed generation unit; This indicates the outer loop voltage control strategy; This indicates the inner loop current control strategy.

[0053] S426, based on the dynamic equations, reference voltage, outer loop voltage control module, inner loop current control module, and distributed secondary control strategy obtained from S421 to S425, will... The system model of a distributed generation unit can be written as a matrix differential equation of the following form: , in, , , , , ; Represents the line inductance; the parameters to be identified include the coefficient matrix. .

[0054] In this way, by establishing the physical differential equations of the microgrid system through S42, the physical information neural network can still constrain and correct the parameter identification process by using the uncontaminated physical relationships, thereby improving the speed and accuracy of parameter identification.

[0055] S43, calculate the physical residual loss. Specifically, this includes: S431, Substitute the nodal electrical state variables into the differential equation and calculate the residuals on both sides of the differential equation. : , S432, based on residual representation of physical residual loss; , in, The number of physical constraint sampling points; This represents the total number of physical constraint sampling points.

[0056] S44, Construct the joint loss function : , in, This represents the data fitting loss; This represents the data fitting loss coefficient; Indicates physical residual loss; This represents the physical residual loss coefficient.

[0057] In summary, by constructing a joint loss function using S40 that includes data fitting loss and physical residual loss, we can ensure that the network output strictly conforms to known physical laws and maintains reasonable prediction behavior even when the parameters are unknown.

[0058] S50, PINN (Physics-Informed Neural Networks) training. PINN training is performed using a joint loss function. and physical parameters to be identified Perform joint training until the training converges. The optimization process can be expressed as: , in, and These represent the optimized physical information neural network and the physical parameters to be identified, respectively.

[0059] In this way, the trained physical information neural network is obtained through S50, so as to further extract the physical parameters to be identified.

[0060] S60, Parameter Extraction. After training convergence, the physical parameters to be identified are extracted from the network weights of the physical information neural network. Because PINN fits both the data and the physical equations during training, even if some data is tampered with by an attacker, it can still approximate the real physical parameters of the microgrid under the combined effect of the credibility weighting mechanism and physical constraints.

[0061] The S70 outputs the identification results to the microgrid energy management system. Combined with the attack detection results, it first constructs a multi-source data fusion engine to classify and extract features and quantify severity. Finally, it models the network topology based on graph neural networks, simulates the propagation path of attacks between devices, and iteratively updates the risk diffusion probability with real-time data to achieve closed-loop linkage between security status assessment and risk prediction. This provides a comprehensive understanding of information such as microgrid operation and network connectivity, and continuously tracks microgrid network attacks for adaptive protection settings and fault-tolerant control under attacks.

[0062] In summary, the microgrid parameter identification method based on physical information neural networks provided in this embodiment can achieve the following beneficial effects: Strong resistance to attacks: This method utilizes the physical equations of the microgrid to construct a physical constraint mechanism. Even if sensors, actuators, and communication networks are subjected to spoofed data injection attacks, the physical information neural network can still constrain and correct the parameter identification process using uncontaminated physical relationships. Compared to purely data-driven deep neural network methods, this method exhibits stronger robustness and higher identification reliability in network attack environments, thereby improving the physical consistency of microgrid parameter identification results under network attack conditions.

[0063] No additional disturbance required: This method is based on passive measurement data for parameter identification, which does not inject additional disturbance signals into the microgrid, does not affect power quality, has good engineering applicability, and thus improves the reliability of microgrid parameter identification results under network attack environment.

[0064] Dynamic response: This method can update and dynamically identify microgrid parameters online based on real-time measurement data and attack detection results, thereby effectively tracking parameter drift caused by changes in operating conditions, environmental changes or network attacks, and providing a basis for adaptive protection and fault-tolerant control under attack, thus improving the accuracy of microgrid parameter identification results under network attack environment.

[0065] Next, taking a low-voltage DC microgrid containing multiple distributed generation units as an example, and setting up an attacker to tamper with the voltage and current measurement data of sensors, actuators and communication networks, we will verify the parameter identification capability of this method in a network attack environment.

[0066] (1) Measurement data acquisition and attack detection The data acquisition and preprocessing module obtains and preprocesses measurement data such as voltage and current at the inverter output and related feeder nodes. The attack detection and credibility labeling module performs spatiotemporal correlation analysis on the measurement data and makes predictions. If there is a deviation between the predicted value and the actual value, the module determines that the measurement data may be under attack based on the magnitude of the deviation and automatically adjusts the credibility weight of the data corresponding to that measurement point, thereby reducing the impact of abnormal measurement data on subsequent identification results.

[0067] (2) PINN identification process Running the PINN module, the Physical Information Neural Network predicts the voltage and current states of each node based on the input measurement data. When calculating the data fitting loss term, the impact of abnormal measurement data on the total loss function is ignored because the confidence weights corresponding to the attacked nodes have been significantly reduced. When calculating the physical residual loss term, the output of the Physical Information Neural Network is substituted into the differential equations of the microgrid to check if it conforms to the equations.

[0068] (3) Output of parameter update and identification results Driven by the joint loss function, the neural network parameters and the physical parameters to be identified are jointly optimized. With the attack detection module detecting and labeling the measurement data with confidence levels, the model gradually converges after multiple rounds of training iterations. The estimated values ​​of the parameters to be identified are close to the actual line parameter values, thus effectively eliminating the misleading effect of attack data.

[0069] (4) Explanation of experimental results and effects See Figure 3As shown in the figure, after 4000 training rounds, the estimated curves of all microgrid parameters to be identified coincide with the actual curves. This indicates that the proposed method, based on passive measurement data, combines a confidence-weighted mechanism with a physical constraint mechanism to achieve high-precision and reliable microgrid parameter identification even under network attack environments. Furthermore, this method enables online updating and dynamic identification of microgrid parameters based on real-time measurement data and attack detection results, further improving the accuracy of parameter identification.

[0070] like Figure 4 and Figure 5 As shown in the experimental comparison, in a scenario where 30% of the measurement data is attacked, the identification error of this method is controlled within 5%, which is significantly better than the traditional least squares method (error exceeds 20%). This indicates that this method has stronger robustness and higher identification reliability in network attack environments.

[0071] This disclosure also provides a microgrid parameter identification system based on a physical information neural network, including: The data acquisition and preprocessing module is configured to acquire real-time electrical measurement data from multiple nodes in the microgrid and preprocess the real-time electrical measurement data to obtain processed measurement data; wherein, the real-time electrical measurement data includes: node voltage and current.

[0072] The attack detection and credibility labeling module is configured to build an attack detection model trained on a fake data injection attack model. This model is then used to perform attack detection on the processed measurement data, identifying whether the data has been affected by a network attack, and outputting the measurement data with a credibility label. The step of using the attack detection model to perform attack detection on the processed measurement data includes: The processed measurement data is input into the attack detection model, which outputs predicted voltage and current values ​​for the DC microgrid. The attack detection model includes an input layer, a multi-layer LSTM, an attention mechanism layer, and an output layer. Based on the predicted voltage and the predicted current, determine whether the processed measurement data has been subjected to a spoofing attack. The credibility level is marked according to the judgment result; wherein, the larger the value of the judgment result, the less reliable the data is.

[0073] The PINN construction module is configured to build a physical information neural network. This network takes labeled, confidence-enhanced measurement data as input and outputs node electrical state parameters. These node electrical state parameters include: predicted voltage values, predicted current values, and predicted bus voltage values ​​for distributed generation units.

[0074] The loss function construction module is configured to construct a joint loss function, which includes a data fitting loss and a physical residual loss. Specifically, the measurement data with labeled confidence is used as the training set of the physical information neural network and is used to adjust the confidence weights in the data fitting loss. The training module is configured to train the physical information neural network using a joint loss function until the physical information neural network converges.

[0075] The parameter extraction module is configured to extract the physical parameters to be identified in the microgrid from the network weights of the physical information neural network after training convergence.

[0076] The system also includes a situational awareness module, configured to output the identification results to the microgrid energy management system (EMS) and combine the current attack detection results to perform operational situational awareness for adaptive protection setting and fault-tolerant control under attack.

[0077] The specific implementation process of this system can be found in the description of the above method embodiments, and will not be repeated here.

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

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

Claims

1. A method for identifying microgrid parameters based on a physical information neural network, characterized in that, include: S10, collect real-time electrical measurement data from multiple nodes in the microgrid, and preprocess the real-time electrical measurement data to obtain processed measurement data; wherein, the real-time electrical measurement data includes: node voltage and current; S20, establish an attack detection model trained based on a fake data injection attack model, use the attack detection model to perform attack detection on the processed measurement data, identify whether the processed measurement data is affected by network attacks, and output measurement data labeled with confidence level; wherein, The step of using the attack detection model to perform attack detection on the processed measurement data includes: The processed measurement data is input into the attack detection model, which outputs predicted voltage and current values ​​for the DC microgrid. The attack detection model includes an input layer, a multi-layer LSTM, an attention mechanism layer, and an output layer. Based on the predicted voltage and the predicted current, determine whether the processed measurement data has been subjected to a spoofing attack. The credibility level is marked according to the judgment result; wherein, the larger the value of the judgment result, the less reliable the data is; S30, Construct a physical information neural network, wherein the physical information neural network takes measurement data with labeled confidence as input and node electrical state quantities as output; wherein, the node electrical state quantities include: voltage prediction value, current prediction value and bus voltage prediction value of distributed generation unit; S40, Construct a joint loss function, wherein the joint loss function includes: data fitting loss and physical residual loss; wherein the measurement data of the labeled confidence is used as the training set of the physical information neural network and is used to adjust the confidence weight in the data fitting loss; S50, The physical information neural network is trained using the joint loss function until the physical information neural network converges; S60, after training convergence, extract the physical parameters to be identified for the microgrid from the network weights of the physical information neural network.

2. The microgrid parameter identification method based on physical information neural network according to claim 1, characterized in that, The fake data injection attack model includes: The first attack model characterizing the situation where the sensor is attacked: , in, Indicates time; The designation of the distributed generation unit; Indicates the first Damage status signal of a distributed generation unit; This indicates an attack signal injected into the sensor; This indicates that the sensor has been attacked; otherwise, it is 0. Indicates the first Status signals of each distributed generation unit; A second attack model characterizing the situation where the actuator is attacked: , in, Indicates the first Damage control signal for a distributed generation unit; This indicates an attack signal injected into the actuator; This indicates that the executor has been attacked; otherwise, it is 0. Indicates the first Control signals for each distributed generation unit; A third attack model characterizing attacks on communication networks: , in, Indicates the first Each distributed generation unit received Damage status signal; Indicates injection arrive Attack signals on the communication link; This indicates that the communication link has been attacked; otherwise, it is 0. Indicates the first Each distributed generation unit received The status signal.

3. The microgrid parameter identification method based on physical information neural network according to claim 2, characterized in that, The step of determining whether the processed measurement data has been subjected to a spoofing data injection attack based on the predicted voltage and the predicted current includes: Calculate the vector L2 norm corresponding to the difference between the predicted voltage value and the measured voltage value, and the difference between the predicted current value and the measured current value; When the L2 norm of the vector is equal to 0, it is determined that no attack has occurred; When the L2 norm of the vector is not equal to 0, it is determined that an attack has occurred.

4. The microgrid parameter identification method based on physical information neural network according to claim 1, characterized in that, S40 includes: The deviation between the predicted and measured values ​​is weighted based on the confidence level to obtain the data fitting loss. Construct the differential equations of the DC microgrid, and calculate the physical residual loss based on the differential equations and the node electrical state variables; Constructing a joint loss function : , in, This represents the data fitting loss; This represents the data fitting loss coefficient; This represents the physical residual loss; This represents the physical residual loss coefficient.

5. The microgrid parameter identification method based on a physical information neural network according to claim 4, characterized in that, The confidence-based weights are used to weight the deviations between the predicted and measured values ​​to obtain the data fitting loss, which includes: , in, Indicates the total number of measurement samples; Indicates the number of measurement samples; The weight representing the credibility; Indicates the first The measurement sample number Voltage prediction, current prediction and bus voltage prediction for each distributed generation unit; Indicates the first The measurement sample number Voltage measurements, current measurements, and bus voltage measurements for each distributed generation unit.

6. The microgrid parameter identification method based on a physical information neural network according to claim 4, characterized in that, The differential equations for constructing a DC microgrid include: Establish the dynamic equations of the DC microgrid: , , in, and They represent the first Voltage derivative and current derivative of each distributed generation unit; and They represent the first Voltage and current of each distributed generation unit; Indicates the bus voltage; Indicates the line resistance; and These represent the electrical parameters of the filter; This indicates the source voltage for power supplied by renewable energy sources; Indicates the first The duty cycle of each buck converter; A reference voltage is generated using a droop control strategy. : , in, Indicates the nominal voltage setting value; Indicates the first The droop coefficient of each distributed generation unit, and has ; The outer loop voltage control module is represented as: , in, Indicates a reference value for the line current; and These represent the proportional coefficient and the integral coefficient, respectively. This represents an intermediate variable related to voltage; The derivative of an intermediate variable related to voltage; The inner loop current control module is represented as: , in, and These represent the proportional coefficient and the integral coefficient, respectively. Indicates intermediate variables related to current; The derivative of the intermediate variable related to the current; No. Distributed secondary control strategy for distributed generation units Represented as: , in, and These represent the voltage and current control coefficients, respectively. Indicates the adjustment coefficient; Indicates the initial time; express Whether or not Connected, if connected then Otherwise ; Indicates the first The droop coefficient of each distributed generation unit; Indicates the first The set of neighbors of a distributed generation unit; Indicates the first The current distribution ratio of each distributed generation unit; This indicates the outer loop voltage control strategy; This indicates the inner loop current control strategy; Based on the dynamic equation, the reference voltage, the outer loop voltage control module, the inner loop current control module, and the distributed secondary control strategy, the first... The matrix differential equations of the system model for a distributed generation unit: , in, , , , , ; Represents the line inductance; the parameters to be identified include the coefficient matrix. .

7. The microgrid parameter identification method based on a physical information neural network according to claim 6, characterized in that, The calculation of the physical residual loss based on the differential equation and the nodal electrical state quantities includes: Substitute the nodal electrical state quantities into the differential equation and calculate the residuals on both sides of the differential equation. : , The physical residual loss is represented by the residual; , in, Indicates the number of physical constraint sampling points; This represents the total number of physical constraint sampling points.

8. A method for microgrid parameter identification based on a physical information neural network according to any one of claims 1 to 7, characterized in that, In S10, the preprocessing of the real-time electrical measurement data includes: The real-time electrical measurement data is parsed to extract key fields; The format of the key fields is validated to determine whether the data structure conforms to the preset rules; if not, the data structure is processed to conform to the preset rules. The data is filtered based on the physical properties of the distributed generation units and the detection range of the sensors; The retained reasonable data is processed using data windows and then normalized.

9. A microgrid parameter identification system based on a physical information neural network, characterized in that, include: The data acquisition and preprocessing module is configured to acquire real-time electrical measurement data from multiple nodes in the microgrid and preprocess the real-time electrical measurement data to obtain processed measurement data; wherein, the real-time electrical measurement data includes: node voltage and current; The attack detection and credibility labeling module is configured to establish an attack detection model trained based on a fake data injection attack model, use the attack detection model to perform attack detection on the processed measurement data, identify whether the processed measurement data is affected by network attacks, and output measurement data labeled with credibility; wherein, the attack detection on the processed measurement data using the attack detection model includes: The processed measurement data is input into the attack detection model, which outputs predicted voltage and current values ​​for the DC microgrid. The attack detection model includes an input layer, a multi-layer LSTM, an attention mechanism layer, and an output layer. Based on the predicted voltage and the predicted current, determine whether the processed measurement data has been subjected to a spoofing attack. The credibility level is marked according to the judgment result; wherein, the larger the value of the judgment result, the less reliable the data is; The PINN construction module is configured to build a physical information neural network, which takes measurement data with labeled confidence as input and node electrical state quantities as output; wherein, the node electrical state quantities include: voltage prediction values, current prediction values ​​and bus voltage prediction values ​​of distributed generation units; The loss function construction module is configured to construct a joint loss function, wherein the joint loss function includes: data fitting loss and physical residual loss; wherein the measurement data of the labeled confidence is used as the training set of the physical information neural network and is used to adjust the confidence weight in the data fitting loss; The training module is configured to train the physical information neural network using the joint loss function until the physical information neural network converges. The parameter extraction module is configured to extract the physical parameters to be identified in the microgrid from the network weights of the physical information neural network after training convergence.