Power distribution network fault self-healing method based on neural network and multi-agent cooperation
By using neural networks and multi-agent collaboration, self-healing of distribution network faults was achieved. The closed loop from fault detection to self-healing decision-making solved the problems of disconnect between detection and recovery and insufficient coordination, thus improving the real-time response capability and robustness of the distribution network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID (SUZHOU) URBAN ENERGY RES INST CO LTD
- Filing Date
- 2026-04-20
- Publication Date
- 2026-06-26
Smart Images

Figure CN122051987B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distribution network fault detection and self-healing control technology, and in particular to a distribution network fault self-healing method based on neural networks and multi-agent cooperation. Background Technology
[0002] With the increasing scale and complexity of power distribution networks, coupled with the large-scale integration of distributed energy resources, equipment failures are prone to causing power outages and safety risks. Traditional fault handling relies on protection devices and manual operation, which is a reactive, post-event approach. This approach suffers from low automation levels, slow recovery speeds, and insufficient global coordination capabilities, failing to meet the needs of new power distribution networks for rapid sensing, autonomous decision-making, and adaptive recovery. Therefore, there is an urgent need to conduct research on efficient fault detection and self-recovery technologies.
[0003] Existing power distribution network fault self-recovery technologies are developing towards informatization and intelligence. They primarily rely on traditional protection and manual dispatching to achieve fault isolation and power supply, optimize recovery schemes through network reconstruction, and utilize intelligent algorithms such as machine learning to improve fault identification and location accuracy. Improved methods such as causal analysis, multi-objective optimization, regional partitioning, large-scale models, and deep reinforcement learning have also emerged. However, existing technologies have significant drawbacks: first, fault detection and recovery decisions are independent, lacking an end-to-end integrated framework; second, they often employ centralized control, which carries the risk of single-point failures and has poor scalability; third, the multi-agent collaborative mechanism in high-dimensional scenarios is imperfect, resulting in insufficient autonomous recovery capabilities; furthermore, some methods suffer from limited applicability, complex control, weak topology adaptability, and difficulty in guaranteeing real-time performance.
[0004] There are currently no effective solutions to the problems of disconnect between detection and recovery, and insufficient control and coordination in the self-recovery methods for power distribution network faults in related technologies. Summary of the Invention
[0005] The present invention provides a method for self-healing of distribution network faults based on neural networks and multi-agent collaboration, which at least solves the problems of disconnection between detection and recovery, and insufficient control and coordination in related technologies for self-recovery of distribution network faults.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] The first aspect of this invention provides a method for self-healing faults in a distribution network based on neural networks and multi-agent collaboration. The method includes: collecting real-time operational data from each node of the distribution network and integrating it to form corresponding raw data matrices; inputting each raw data matrix into a fault detection model, which outputs fault type probabilities and embedding vectors for each node; wherein the embedding vectors include electrical state and topological context information; the fault detection model is trained on a graph neural network model with the objective of minimizing the classification error of the fault type probabilities; constructing fault feature vectors for each node based on the difference between the embedding vectors and the baseline embedding vectors for normal operation of the corresponding nodes; inputting the embedding vectors and fault feature vectors into a fault self-healing decision model, which outputs corresponding fault self-healing action instructions to each distributed agent; wherein the fault self-healing decision model is trained on a multi-agent reinforcement learning model based on an adaptive reward function and a differential reward function; the adaptive reward function is constructed based on dynamic weight coefficients generated from the fault feature vectors; and the differential reward function is constructed based on the marginal contribution of each agent to the fault self-healing effect of the distribution network.
[0008] Preferably, before inputting each of the original data matrices into the fault detection model, the method includes: collecting historical operating data corresponding to each node, labeling them with corresponding fault type tags, and integrating them to form historical data matrices corresponding to each node; inputting each of the historical data matrices into a graph neural network model, and having the graph neural network model output the fault type probability and embedding vector corresponding to each node; calculating the classification error based on the difference between the fault type probability and the corresponding fault type tag; and iteratively optimizing the weight parameters of the graph neural network model with the goal of minimizing the classification error, to obtain a trained fault detection model.
[0009] Preferably, inputting each of the historical data matrices into a graph neural network model, and having the graph neural network model output the fault type probability and embedding vector corresponding to each of the nodes, includes: inputting each of the historical data matrices into an attention-enhanced graph neural network model; performing nonlinear transformation processing on the historical data matrices through the attention-enhanced graph neural network model to extract the electrical and topological features of each of the nodes; calculating the corresponding attention weights and inter-node feature propagation matrices based on the electrical and topological features through the attention-enhanced graph neural network model; and performing attention-weighted feature enhancement on the electrical and topological features based on the attention weights and inter-node feature propagation matrices through the attention-enhanced graph neural network model to output the fault type probability, electrical state, and topological context information corresponding to each of the nodes.
[0010] Preferably, the training of the fault detection model is achieved by iteratively optimizing the weight parameters of the graph neural network model with the goal of minimizing the classification error. This includes: using the artificial hummingbird algorithm, each weight parameter of the graph neural network model is used as an optimization individual, with the goal of minimizing the classification error, and global search and local adjustment are performed iteratively to optimize each individual; until a preset number of iterations is reached, the loop terminates, and the training of the fault detection model is obtained.
[0011] Preferably, based on the difference between the embedded vector and the baseline embedded vector of the corresponding node operating normally, a fault feature vector corresponding to each node is constructed, including the following steps: comparing each embedded vector with the baseline embedded vector of the corresponding node operating normally, and calculating the fault activation intensity and state offset of each node; normalizing each state offset to obtain the corresponding detection uncertainty; and constructing the fault feature vector corresponding to each node based on the fault activation intensity, the state offset, and the detection uncertainty.
[0012] Preferably, the formula for calculating the fault feature vector is: ; ; ; ;in, For the first Fault feature vectors of each agent; For the first The fault activation intensity of each node; For the first The state offset of each node; For the first The detection uncertainty of each node; It is a three-dimensional real number space; For the first The node is detected by the fault detection model. The embedding vector output after layer graph propagation; The mean of the L2 norm of the baseline embedding vector; It is an L2 norm; It is the set of real numbers; For the first The baseline embedding vector for each node to operate normally; Output layer dimensions for the fault detection model; Output the total number of categories for the fault detection model; The first output of the fault detection model The node Probability of fault state; Normalization factor; It is the natural logarithm.
[0013] Preferably, before inputting the embedding vectors and fault feature vectors into the fault self-healing decision model, the method includes: generating corresponding dynamic weight coefficients based on each fault feature vector, and performing a weighted summation with each reward component to construct an adaptive reward function for each node; wherein the dynamic weight coefficients are generated by a trainable linear network model based on the fault feature vectors; the trainable linear network is jointly trained and optimized with a multi-agent reinforcement learning model with the objective of maximizing the total benefit of distribution network fault self-healing; based on the marginal contribution of each agent to the distribution network fault self-healing effect, combined with the adaptive global total reward and the temporal difference results of the agent's state-action value, a differential reward function is constructed for each node; wherein the adaptive global total reward is the sum of the adaptive reward values calculated by the global agent based on the adaptive reward function at the corresponding time; and iteratively training the multi-agent reinforcement learning model based on each adaptive reward function and the corresponding differential reward function to obtain the fault self-healing decision model for each node.
[0014] Preferably, based on the dynamic weight coefficients generated from the fault feature vectors, a weighted summation of each reward component is performed to construct an adaptive reward function. This includes: inputting each fault feature vector into a trainable linear network model, performing end-to-end joint training with the multi-agent reinforcement learning model with the objective of maximizing the total benefit of distribution network fault self-healing, to generate corresponding basic weight coefficients; wherein, the basic weight coefficients include: load recovery weight, fault penalty weight, voltage penalty weight, and switching operation weight; dynamically adjusting the fault penalty weight and the voltage penalty weight based on the detection uncertainty corresponding to the fault feature vectors to obtain uncertainty-adjusted fault penalty weight and uncertainty-adjusted voltage penalty weight; dynamically adjusting the load recovery weight based on the fault activation intensity corresponding to the fault feature vectors to obtain fault-aware load recovery weight; and weighting the corresponding reward components of each agent in the distribution network fault self-healing process based on the fault-aware load recovery weight, the uncertainty-adjusted fault penalty weight, the uncertainty-adjusted voltage penalty weight, and the switching operation weight to construct the adaptive reward function.
[0015] Preferably, the expression for the adaptive reward function is: ; ; ;in, For the first The agent in the th... The adaptive reward function value of the step; For the first The load recovery weight of the step; This is the fault activation intensity adjustment coefficient; For the first The fault activation intensity of each node; As a load recovery reward component; For the first The fault penalty weight of the step; For the first The detection uncertainty of each node; This is the penalty component for failures; For the first Voltage penalty weighting for each step; This is a voltage deviation penalty component; Weights for switching operations; Cost component for switching operation; For the first Voltage over-limit penalty for each agent; This is the voltage over-limit penalty coefficient; For node voltage limits; For the first The actual voltage value of the node corresponding to each intelligent agent; The normalized activation function; This is the weight matrix of a trainable linear network model; For the first Fault feature vectors of each agent; This is the bias vector for a trainable linear network model; This is the weight scaling factor.
[0016] Preferably, based on the marginal contribution of each agent to the self-healing effect of the distribution network fault, and combining the adaptive global reward and the temporal difference results of the agent's state-action value, a differential reward function for each node is constructed, including: constructing a corresponding differential reward signal based on the adaptive global total reward of each agent in the current state and the next state; using each differential reward signal as a benchmark, weighting the maximum state-action value of the corresponding next state through a discount factor, and subtracting it from the state-action value of the corresponding current state to generate a corresponding temporal differential reward; weighting each temporal differential reward with a learning rate, iteratively updating the corresponding state-action value, and constructing the differential reward function corresponding to each node.
[0017] Preferably, the expression for the differential reward function is: ; ;in, For the first An agent is in the current state Current action State-action value function under the following conditions; For assignment operators, use The calculation results on the right side update the state-action value on the left side; The learning rate; For the first The agent in the th... The differential reward signal for each step; Discount factor; For the first The agent in the next state Next action Maximum state-action value; For the first The adaptive global total reward for each step; For the first Step to remove the first The adaptive global total reward after each agent.
[0018] A second aspect of the present invention provides an electronic device, comprising: a processor, and a memory storing a program, the program including instructions that, when executed by the processor, cause the processor to perform the aforementioned self-healing method for power distribution network faults based on neural networks and multi-agent cooperation.
[0019] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:
[0020] This invention provides a self-healing method for distribution network faults based on neural networks and multi-agent collaboration. It employs a graph neural network fault detection model trained to minimize the probability classification error of fault types. The model outputs an embedding vector containing electrical state and topological context information. A fault feature vector is constructed by comparing this embedding vector with the normal baseline embedding vector of a node. This directly transforms fault detection information into supporting data for self-healing decisions, forming a closed loop from fault perception to self-healing execution. This avoids information transmission delays and inconsistencies, significantly improving the system's real-time response capability. Simultaneously, it allows agents to obtain embedding representations containing the coupling relationships of the entire network, ensuring... The local decision-making process aligns with the global optimal recovery objective. Based on this, an adaptive reward function based on the dynamic weight coefficients of the fault feature vector and a differential reward function based on the self-healing marginal contribution of each agent are used to train a multi-agent reinforcement learning decision-making model. This effectively resolves the problems of agent action coupling and credit allocation, allowing the model training process to converge smoothly and avoid oscillations. It achieves fault isolation and load transfer under decentralized distributed collaboration, and each distributed agent can complete online decision-making without complete global state information, significantly improving the system's robustness and scalability. This makes it suitable for new distribution network scenarios with high renewable energy penetration and dynamic topology changes. Attached Figure Description
[0021] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other embodiments based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating a method for self-healing of power distribution network faults based on neural networks and multi-agent collaboration, according to an embodiment of the present invention.
[0023] Figure 2 It is a voltage curve diagram before and after implementing the SR-MAN framework of the present invention when a distribution network fault occurs.
[0024] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0025] Embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0026] To address the issues of disconnect between detection and recovery, and insufficient control and coordination in existing power distribution network fault self-healing methods, this invention provides a power distribution network fault self-healing method based on neural networks and multi-agent collaboration.
[0027] Among them, such as Figure 1 As shown, the embodiment of the present invention provides a self-healing method for power distribution network faults based on neural networks and multi-agent cooperation, including the following steps S1 to S4.
[0028] Step S1: Collect real-time operating data from each node of the power distribution network and integrate them to form the corresponding raw data matrix.
[0029] Step S2: Input each original data matrix into the fault detection model, and the fault detection model outputs the fault type probability and embedding vector of each node; wherein, the embedding vector includes electrical state and topological context information; the fault detection model is trained on a graph neural network model with the goal of minimizing the classification error of the fault type probability.
[0030] Step S3: Based on the difference between the embedded vector and the baseline embedded vector of the corresponding node during normal operation, construct the fault feature vector corresponding to each node.
[0031] Step S4: Input each embedding vector and fault feature vector into the fault self-healing decision model, and the fault self-healing decision model outputs the corresponding fault self-healing action instructions to each distributed agent; wherein, the fault self-healing decision model is obtained by training a multi-agent reinforcement learning model based on an adaptive reward function and a differential reward function; the adaptive reward function is constructed based on the dynamic weight coefficients generated from the fault feature vector; the differential reward function is constructed based on the marginal contribution of each agent to the fault self-healing effect of the distribution network.
[0032] Distribution network nodes refer to network nodes within the distribution network used for electrical connection, power transmission, and status sensing. They generally include: line nodes, switch nodes, substation nodes, load nodes, and distributed power source access nodes.
[0033] Real-time operational data refers to the real-time collection of operational status data of distribution network nodes, which may include: voltage, current, power flow, switch status, fault indication, etc. Real-time operational data can be collected in real time from various nodes of the distribution network through distribution network sensing and acquisition equipment, distribution automation terminals, or edge intelligent sensing units.
[0034] Based on real-time operational data, the original data matrix corresponding to each node can be formed through data integration and feature splicing, which is generally a two-dimensional matrix.
[0035] Step S1 of the present invention can acquire the full-domain operating status data of each node in the power distribution network, thus providing basic data input for subsequent fault detection.
[0036] Graph neural network models can specifically include basic graph convolutional neural networks (GCN), basic graph attention networks (GAT), GraphSAGE networks, or attention-enhanced graph neural networks (Att-EGNN).
[0037] When training the graph neural network model, historical operating data of distribution network nodes and fault labeling data are used as training datasets. With the goal of minimizing the classification error of fault type probability, the parameters of the graph neural network model are iteratively optimized according to the model training rules to obtain the fault detection model.
[0038] Fault type probability is a quantitative result output by the fault detection model, representing the likelihood of a node experiencing a corresponding fault type. Electrical state refers to the real-time electrical operating parameters of the node, such as voltage, current, and power flow. Topological context information refers to the connection relationships of nodes in the distribution network and the network topology association information.
[0039] Since graph neural network models can extract node electrical features and topological association features from the original data matrix, the fault detection model obtained after training can simultaneously complete fault type classification and node feature encoding. Therefore, it can simultaneously output fault type probability and embedding vector that integrates electrical state and topological context information.
[0040] Step S2 of the present invention can complete the identification of node fault types, output fault detection results and embedding vectors containing core state information, and establish a data link from fault perception to decision-making.
[0041] The baseline embedding vector is the standard embedding vector output by the fault detection model when the node is in normal operation of the distribution network. It can be obtained by collecting the original data matrix of the node during normal operation and inputting it into the fault detection model, or by statistical fitting based on the normal operation samples.
[0042] The fault feature vector is a feature vector that characterizes the degree of fault anomaly of a node. It is constructed by extracting the difference features by calculating the difference between the current embedding vector and the corresponding normal baseline embedding vector of the node.
[0043] Step S3 of the present invention can quantify the abnormal state of node faults, generate fault characteristics that adapt to self-healing decisions, and provide fault basis for the decision model.
[0044] Multi-agent reinforcement learning models can be either multi-agent deep Q-network models (MA-DQN) or multi-agent policy gradient reinforcement learning models.
[0045] An adaptive reward function is a reward function that can dynamically adjust the reward weight according to the fault state. It is constructed by integrating various reward and penalty indicators in the self-healing process through dynamic weight coefficients generated from fault feature vectors. It can dynamically adapt to fault scenarios and guide the agent to make the optimal self-healing decision.
[0046] The differential reward function is a reward function that characterizes the self-healing contribution of a single agent. It can be constructed by calculating the marginal contribution of a single agent to the global self-healing effect, or by using the difference between the global reward and the reward after removing the agent.
[0047] During training, the multi-agent reinforcement learning model uses the embedding vectors, fault feature vectors, and self-healing action samples in the power distribution network fault scenario as the training dataset. It uses the adaptive reward function as the global training guide and the differential reward function as the training signal for a single agent to iteratively optimize the parameters of the multi-agent reinforcement learning model.
[0048] Since the embedding vector contains node electrical and topological information, and the fault feature vector contains node fault state information, the multi-agent reinforcement learning model, after training, can map the two types of input features into self-healing action instructions such as fault isolation and load recovery that are adapted to each distributed agent. This enables the trained fault self-healing decision model to output corresponding fault self-healing action instructions to each distributed agent based on the input embedding vector and fault feature vector.
[0049] Step S4 of the present invention can drive distributed intelligent agents to collaboratively perform self-healing operations and complete the autonomous self-healing of power distribution network faults.
[0050] This invention provides a self-healing method for distribution network faults based on neural networks and multi-agent collaboration. It employs a Self-Recovery Multi-Agent Neural Network Framework (SR-MAN), a graph neural network fault detection model trained to minimize the fault type probability classification error. The model outputs embedding vectors containing electrical state and topological context information. Fault feature vectors are constructed by comparing these embedding vectors with the normal baseline embedding vectors of nodes, directly transforming fault detection information into supporting data for self-healing decisions. This forms a closed loop from fault perception to self-healing execution, avoiding information transmission delays and inconsistencies, significantly improving the system's real-time response capability. Simultaneously, it allows agents to obtain embedding representations containing the coupling relationships across the entire network, ensuring that local decisions remain consistent with the global optimal recovery objective.
[0051] Based on this, the embodiments of the present invention employ an adaptive reward function based on the dynamic weight coefficients of fault feature vectors and a differential reward function based on the self-healing marginal contribution of each agent to train a multi-agent reinforcement learning decision model. This effectively resolves the problems of agent action coupling and credit allocation, allowing the model training process to converge smoothly and avoid oscillations. It achieves fault isolation and load transfer under decentralized distributed collaboration, and each distributed agent can complete online decision-making without complete global state information, greatly improving the system's robustness and scalability. It can adapt to new distribution network scenarios with high renewable energy penetration and dynamic topology changes.
[0052] Furthermore, the method provided in the embodiments of the present invention further includes, before step S2: collecting historical operating data corresponding to each node, labeling the corresponding fault type, and integrating them to form a historical data matrix corresponding to each node; inputting each historical data matrix into a graph neural network model, and having the graph neural network model output the fault type probability and embedding vector corresponding to each node; calculating the classification error based on the difference between the fault type probability and the corresponding fault type label; and iteratively optimizing the weight parameters of the graph neural network model with the goal of minimizing the classification error, to obtain a trained fault detection model.
[0053] Specifically, when constructing the fault detection model, historical operating data of each node in the distribution network is first collected and labeled with corresponding fault type labels, and integrated to form a historical data matrix. Then, the historical data matrix is input into the graph neural network model, which extracts the electrical features and topological correlation features of the nodes, and outputs the fault type probability and node embedding vector simultaneously. Based on the difference between the output fault type probability and the labeled label, the classification error is calculated. With minimizing the classification error as the optimization objective, the weight parameters of the graph neural network model are iteratively updated and optimized, and finally the trained fault detection model is obtained.
[0054] The method provided by the embodiments of the present invention, by using historical data with fault type labels for supervised training and iteratively optimizing model weights to minimize classification error, can accurately identify various node faults in the distribution network, effectively reduce the probability of false or missed faults, improve the model's adaptability to complex fault scenarios and weak fault signals, ensure the reliability and stability of the fault detection process, and help the distribution network to handle faults quickly and accurately.
[0055] Furthermore, the method described above in the embodiments of the present invention, which involves inputting various historical data matrices into a graph neural network model and having the graph neural network model output the fault type probability and embedding vector corresponding to each node, includes: inputting various historical data matrices into an attention-enhanced graph neural network model; performing nonlinear transformation processing on the historical data matrices through the attention-enhanced graph neural network model to extract the electrical and topological features of each node; calculating the corresponding attention weights and inter-node feature propagation matrices based on the electrical and topological features through the attention-enhanced graph neural network model; and performing attention-weighted feature enhancement on the electrical and topological features based on the attention weights and inter-node feature propagation matrices through the attention-enhanced graph neural network model to output the fault type probability, electrical state, and topological context information corresponding to each node.
[0056] Specifically, the attention-enhanced graph neural network model, namely Att-EGNN, includes: a linear transformation layer, a multi-layer graph propagation network layer, a semantic transformation and weighting layer, and a classification layer.
[0057] When each historical data matrix is input into the attention-enhanced graph neural network model, the historical data matrix is first processed by a nonlinear transformation layer. Based on the principle of feature mapping and dimension alignment, the heterogeneous data such as voltage, current and topological connections scattered in the historical data matrix are mapped to a unified feature space. At the same time, the potential correlation between data is mined, and the electrical and topological features of each node can be extracted.
[0058] Nonlinear transformation methods can include activation functions, kernel function mapping, and multilayer perceptron (MLP) transformations. The preferred embodiment of this invention uses the ReLU activation function to perform nonlinear transformation processing on the historical data matrix. This effectively alleviates gradient vanishing, accelerates model convergence, preserves key fault features, suppresses noise interference, adapts to the sparse and heterogeneous characteristics of the running data, improves feature extraction accuracy and efficiency, and ensures stable and reliable fault detection.
[0059] Next, attention-guided inter-node feature propagation is performed through a multi-layer graph propagation network based on electrical and topological features. The inter-node feature propagation matrix is combined to capture node interaction relationships and fault propagation paths. Attention weights are calculated using cosine similarity and node information is preserved by relying on a self-loop mechanism. After multi-layer iterative updates, node hidden features that integrate global topological dependencies are obtained.
[0060] Subsequently, through transformation and weighting layers, based on the node hidden features, semantic transformation and independent attention weighting enhancement processing are performed to filter out irrelevant and redundant features, resulting in a weighted feature representation that focuses on key fault information.
[0061] Finally, through the Softmax classification layer, the classification weights trained independently by this layer are used to perform linear mapping and exponential normalization on the weighted feature representation, transforming the high-dimensional feature vector into a fault type discrimination result that conforms to the probability distribution characteristics. At the same time, the electrical state and topological context information contained in the features are preserved, and finally the fault type probability, electrical state and topological context information corresponding to each node are output.
[0062] The method provided in the embodiments of the present invention extracts the electrical and topological features of nodes by using an attention-enhanced graph neural network model, calculates the attention weights and the feature propagation matrix between nodes, and performs attention-weighted feature enhancement. This enables accurate output of fault type probability, electrical state, and topological context information, thereby improving fault detection accuracy and feature representation effectiveness.
[0063] Furthermore, the method described above in the embodiments of the present invention, which aims to minimize classification error and iteratively optimize the weight parameters of the graph neural network model to obtain a trained fault detection model, includes: using the artificial hummingbird algorithm to perform global search and local adjustment iteratively on each individual weight parameter of the graph neural network model as an optimization unit, with the goal of minimizing classification error; until a preset number of iterations is reached, the loop terminates, and a trained fault detection model is obtained.
[0064] The Artificial Hummingbird Algorithm (AHA) is a novel intelligent optimization algorithm that simulates the foraging, movement, and energy compensation behaviors of hummingbirds. It combines global search with local fine-tuning capabilities, achieving high optimization accuracy and avoiding getting trapped in local optima. This invention employs the Artificial Hummingbird Algorithm to iteratively optimize the weight parameters of a graph neural network model, aiming to minimize classification error.
[0065] Furthermore, by using the artificial hummingbird algorithm, each weight parameter of the graph neural network model is treated as an optimization individual, an optimization population containing all weight parameters is constructed. The optimization objective is to minimize the classification error between the fault type probability output by the graph neural network model and the fault type label. At the same time, the classification error is introduced as a fitness evaluation function to judge the quality of each individual weight parameter.
[0066] The process iteratively executes global search and local adjustment steps: In the global search phase, the behavior of a hummingbird foraging over a wide area is simulated, and the search space of weight parameters is randomly traversed to discover individuals with potentially optimal parameters; in the local adjustment phase, the behavior of a hummingbird foraging at close range is simulated, and the individuals with the best current fitness weight parameters are finely adjusted in a small range to optimize parameter accuracy.
[0067] After each iteration, the optimal weight parameter individual is updated according to the fitness function. The individual weight parameters are continuously optimized iteratively until the preset number of iterations is reached, at which point the loop terminates, and the corresponding graph neural network model is taken as the trained fault detection model.
[0068] The preset number of iterations can be 100, which can fully optimize the weight parameters and reduce the classification error, while avoiding the problems of model overfitting and excessive training time caused by excessive iteration. It balances the accuracy of parameter optimization and the efficiency of model training, and keeps the performance and training speed of the fault detection model in a reasonable balance.
[0069] Based on the above-mentioned artificial hummingbird algorithm for weight optimization of attention-enhanced graph neural networks, the present invention creates an embodiment that represents the resulting optimized fault detection model as AHA-Att-EGNN.
[0070] The method provided in the embodiments of the present invention iteratively optimizes the weight parameters of the graph neural network model using the artificial hummingbird algorithm, which enables the configuration of the model weight parameters to better fit the actual needs of power distribution network fault classification, effectively reduces the model fault type classification error, improves the global optimal fit of the model weight parameters, and makes the training process of the graph neural network model more stable and convergent, thereby significantly improving the classification accuracy and generalization ability of the fault detection model.
[0071] Furthermore, step S3 of the method provided in the present invention preferably includes: comparing each embedding vector with the reference embedding vector of the corresponding node in normal operation, and calculating the fault activation intensity and state offset of each node; normalizing each state offset to obtain the corresponding detection uncertainty; and constructing the fault feature vector corresponding to each node based on the fault activation intensity, state offset and detection uncertainty of each node.
[0072] Specifically, when calculating the fault activation intensity, the difference in amplitude between the embedding vector of the node at the time of detection and the reference embedding vector of the node in the normal state can be quantified first, and then the mean of the reference amplitude in the normal state can be used to complete the normalization process to unify the measurement standard, so as to obtain the fault activation intensity.
[0073] The formula for calculating the baseline embedding vector is:
[0074] , .
[0075] in, For the first The baseline embedding vector for each node to operate normally; For the first The set of uptime for each node; For the first Each node at time... Real-time embedding vector; Output layer dimensions for the fault detection model; for A real space of dimensions.
[0076] Since a single benchmark embedding vector is susceptible to fluctuations in normal samples, taking the average L2 norm of embeddings from all normal time periods can comprehensively and stably characterize the embedding amplitude features when the node is healthy, avoiding the impact of single-point anomalies on benchmark accuracy.
[0077] time Within the corresponding sliding window, the first The formula for calculating the real-time L2 norm mean of the embedding vectors of each node is:
[0078] .
[0079] in, For a moment Within the corresponding sliding window, the first The real-time L2 norm mean of the embedding vectors of each node; The duration of the sliding window; For time index within the window, covering forward One time step; For the nth node in time index The real-time embedding vector output by the fault detection model at the corresponding moment.
[0080] Furthermore, the formula for calculating the fault activation intensity is:
[0081] .
[0082] in, For the first The fault activation intensity of each node; For the first The node is detected by the fault detection model. The embedding vector output after layer graph propagation; Let L2 norm mean of the baseline embedding vector be . The statistical mean of the sequence; It is an L2 norm; It is the set of real numbers.
[0083] like If the node activation strength is abnormally high, it indicates a fault; If so, the node is within the normal operating range.
[0084] The calculation formula for the fault activation intensity provided in the embodiments of the present invention is obtained by calculating the first... The node is detected by the fault detection model. Embedding vectors output after layer graph propagation The L2 norm is then calculated by subtracting the mean L2 norm of the reference embedding vectors in the normal node state from this norm. The difference is obtained, and finally, this difference is divided by the mean of the L2 norm of the reference embedding vector. By performing normalization, the fault activation intensity in the real number domain can be obtained, and its magnitude can intuitively reflect the degree of activation of the node fault characteristics.
[0085] The embodiments of this invention calculate the fault activation intensity using the above formula, which can accurately quantify the deviation of the state characteristics of a node after graph propagation from the normal baseline. At the same time, the normalization process eliminates the influence of the inherent characteristic amplitude differences of different nodes, making the fault judgment standard more uniform and robust, and effectively improving the sensitivity and accuracy of node fault identification.
[0086] Furthermore, state offset is a quantitative indicator that measures the degree of state difference between the current embedding vector of a node and the normal operating baseline embedding vector. It is used to reflect the extent to which the electrical state and topological context of a node deviate from the normal operating state.
[0087] When calculating the state offset, the similarity value between the node's current embedding vector and the reference embedding vector when the node is running normally is calculated to quantify the degree of matching between the two. Then, the similarity value is subtracted from 1 to intuitively quantify the deviation of the node's current running state from the normal reference state, thus obtaining the state offset.
[0088] Furthermore, the formula for calculating the state offset is:
[0089] .
[0090] in, For the first The state offset of each node.
[0091] The calculation formula for the state offset provided in the embodiments of the present invention calculates the inner product of the node's current embedding vector and the normal operation reference embedding vector. At the same time, calculate the L2 norm of the two vectors and take their norm product. Then, divide the inner product result by the norm product to obtain the cosine similarity between the current state vector and the reference state vector; finally, subtract the cosine similarity from 1 to obtain the state offset of the target node, which ranges from [0,2]. The closer the value is to 0, the closer the current state of the node is to the normal operating reference state. The closer the value is to 2, the greater the deviation of the node state from the normal operating state.
[0092] The method provided by the embodiments of the present invention calculates the state offset using the above formula, which can accurately quantify the deviation of the node's operating state, and improve the accuracy of state assessment by integrating electrical and topological features; the index values are standardized, which facilitates multi-dimensional state comparison, provides highly identifiable features for fault early warning and location, and is computationally efficient.
[0093] Furthermore, detection uncertainty is a quantitative indicator that measures the reliability of the detection results of abnormal node states. It is used to characterize the degree of confidence when determining whether a node is faulty based on state offset. The higher the value, the stronger the uncertainty of the detection results and the lower the reliability.
[0094] When calculating the detection uncertainty, the state offset of each node is used as input. First, the state offset of all nodes is normalized to eliminate the scale difference of offsets of different nodes and uniformly map them to the relative confidence of node state anomalies. Then, based on the normalized confidence distribution, the fuzziness of state determination is quantified, and finally the detection uncertainty is obtained, which is used to evaluate the credibility of the current anomaly detection result.
[0095] Furthermore, the formula for calculating the detection uncertainty is:
[0096] .
[0097] .
[0098] in, For the first The detection uncertainty of each node; Output layer dimensions for the fault detection model; Output the total number of categories for the fault detection model; The first output of the fault detection model The node Probability of fault state; Normalization factor; It is the natural logarithm; for The Middle The first type of fault state 1D feature components; Index for fault status categories, This is an index for traversing all fault categories; For the first The absolute value of the feature component, i.e., the original confidence level; For the first The node is through the first After layer graph propagation, the dimensions corresponding to all fault categories in the embedded vector are... Sum of the absolute values of the eigenvalues.
[0099] when Approaching 0 indicates concentrated embedding capabilities and clear state judgments; when Approaching 1, the embedding capability is dispersed, and the state judgment is uncertain.
[0100] The formula provided in the embodiments of this invention decodes the abstract embedded vector, which cannot be directly interpreted after graph propagation, into an engineering-understandable fault state probability distribution through L1 normalization: the absolute value proportion of each dimension feature is mapped to the fault state probability of the corresponding fault category, which not only preserves the state information after the model aggregates topological and electrical features, but also achieves the interpretability of fault determination.
[0101] Therefore, the first The fault feature vector of an agent can be represented as: The fault feature vector can be represented as: .
[0102] The method provided by the embodiments of the present invention quantifies the fault activation intensity and state offset by comparing the real-time embedded vector of the node with the corresponding normal operation reference vector, obtains the detection uncertainty after normalization, and constructs a multi-dimensional fault feature vector by fusing three types of features. This achieves accurate quantification of abnormal states of distribution network nodes and effective characterization of detection reliability, and greatly improves the accuracy, reliability and engineering practicality of fault detection, location and diagnosis.
[0103] Further, prior to step S4 of the method provided in the embodiments of the present invention, the method preferably includes: generating corresponding dynamic weight coefficients based on each fault feature vector, and performing a weighted summation with each reward component to construct an adaptive reward function for each node; wherein, the dynamic weight coefficients are generated by a trainable linear network model based on the fault feature vectors; the trainable linear network is jointly trained and optimized with a multi-agent reinforcement learning model with the objective of maximizing the total benefit of distribution network fault self-healing; based on the marginal contribution of each agent to the distribution network fault self-healing effect, combined with the adaptive global total reward and the temporal difference results of the agent's state-action value, a differential reward function for each node is constructed; wherein, the adaptive global total reward is the sum of the adaptive reward values calculated by the global agent based on the adaptive reward function at the corresponding time; based on each adaptive reward function and the corresponding differential reward function, the multi-agent reinforcement learning model is iteratively trained to obtain the fault self-healing decision model for each node.
[0104] Specifically, the dynamic weight coefficient is a reward weight that is automatically adjusted according to the current fault state of the node. It is used to weight and fuse different reward components so that the reward function is more in line with the actual self-healing goal.
[0105] Trainable linear network models are linear learning models used to map fault feature vectors to dynamic weight coefficients. With the goal of maximizing the total benefit of self-healing of distribution network faults, after joint training and optimization with multi-agent reinforcement learning models, they can automatically learn the optimal matching relationship between fault states and reward weights, improve the adaptability of reward signals to actual self-healing scenarios, and make multi-agent decision guidance more accurate and model training more stable and efficient.
[0106] During joint training, the linear network model has fully learned the inherent mapping relationship between fault features such as fault activation intensity, state shift, and detection uncertainty and various reward weights. It can directly output dynamic weight coefficients that are adapted to the current fault state based on the input node fault feature vector.
[0107] Reward weighting is an independent quantitative indicator that measures the benefits and costs of different decision objectives in the self-healing process of distribution network faults. It typically includes indicators directly related to the self-healing effect, such as load restoration, fault penalty, voltage penalty, and switching operation costs.
[0108] The adaptive reward function is a reinforcement learning reward function formed by dynamically adjusting the reward weights based on the real-time fault status of the node. It is constructed by weighting and summing the dynamic weight coefficients with each reward component, which allows the reward signal to match the fault degree of the node and the detection reliability in real time, and accurately guides the agent to make the optimal decision that fits the actual self-healing needs.
[0109] The differential reward function takes the marginal contribution of each agent to fault self-healing as its core. First, it obtains the differential reward signal based on the adaptive global total reward before and after the agent's state switching. Then, it combines the temporal differential result of state-action value and iteratively optimizes the value function through discount factor and learning rate. Finally, it forms a differential reward function that can accurately allocate global rewards and incentivize individual agents to make efficient decisions.
[0110] With the dual constraints of ensuring optimal global self-healing benefits through an adaptive reward function and achieving precise matching of incentives for individual agents through a differential reward function, the multi-agent reinforcement learning model is iteratively trained. The agent decision-making strategy and the linear network weight generation logic are optimized simultaneously, ultimately resulting in a decision model that can adapt to the fault states of each node and achieve efficient fault self-healing in the distribution network.
[0111] The multi-agent reinforcement learning model in this invention embodiment is preferably a multi-agent deep Q-network model (MA-DQN), which has the advantages of simple structure and stable training, and is suitable for discrete action decision-making and multi-node collaborative scenarios in power distribution networks. Its joint training with a trainable linear network solves the problem of fixed traditional reward functions. Through adaptive and differential reward constraints, it improves fault self-healing efficiency and load recovery rate, reduces losses, and can adapt to different fault scenarios, possessing engineering practicality.
[0112] The method provided in the embodiments of this invention achieves dynamic reward adaptation and precise individual incentives by generating adaptive rewards, constructing differential rewards, and collaboratively training a multi-agent reinforcement learning model. This improves decision-making and training effects, making the self-healing of power distribution network faults more efficient and more in line with actual operating scenarios.
[0113] Furthermore, the method provided in the embodiments of the present invention, which generates dynamic weight coefficients based on fault feature vectors and constructs an adaptive reward function by weighted summation of various reward components, preferably includes: inputting each fault feature vector into a trainable linear network model, performing end-to-end joint training with a multi-agent reinforcement learning model with the objective of maximizing the total benefit of distribution network fault self-healing, to generate corresponding basic weight coefficients; wherein, the basic weight coefficients include: load recovery weight, fault penalty weight, voltage penalty weight, and switching operation weight; dynamically adjusting the fault penalty weight and voltage penalty weight based on the detection uncertainty corresponding to the fault feature vector to obtain uncertainty-adjusted fault penalty weight and uncertainty-adjusted voltage penalty weight; dynamically adjusting the load recovery weight based on the fault activation intensity corresponding to the fault feature vector to obtain fault-aware load recovery weight; and weighted summation of the corresponding reward components of each agent in the distribution network fault self-healing process based on the fault-aware load recovery weight, uncertainty-adjusted fault penalty weight, uncertainty-adjusted voltage penalty weight, and switching operation weight to construct an adaptive reward function.
[0114] Specifically, the formula for calculating the basic weighting coefficient is as follows:
[0115] .
[0116] in, For the first The load recovery weight of the step; For the first The fault penalty weight of the step; For the first Voltage penalty weighting for each step; Weights for switching operations; For a trainable linear network model, It is a 4x3 matrix space composed of real numbers; This is the bias vector for a trainable linear network model; , It is a 4-dimensional vector space composed of real numbers; This is the weight scaling factor. , These are scaling factors corresponding to load restoration, fault penalty, voltage penalty, and switching operation weights, respectively. This is the normalized activation function.
[0117] The present invention creates an embodiment that, through the above formula, achieves... and This forms a trainable linear mapping network that incorporates a 3D fault feature vector that reflects the comprehensive state of node fault severity and detection reliability. The original weight signal is linearly transformed into four dimensions; then it is normalized to a relative weight distribution with a sum of 1 using the softmax function; finally, it is calculated using a scalable coefficient. Adjusting the overall weighting magnitude, the final output includes four basic weighting coefficients corresponding to load restoration, fault penalty, voltage penalty, and switching operation. , , and .
[0118] Fault penalty weights for uncertainty adjustment The calculation formula is:
[0119] .
[0120] Uncertainty-adjusted voltage penalty weight The calculation formula is:
[0121] .
[0122] when When it approaches 1, and When the value approaches 0, the agent adopts a conservative strategy and does not rely on unreliable fault information; when When it approaches 0, and Approaching 1, the agent fully retains the fault penalty signal.
[0123] The method provided in this invention adjusts the fault penalty weight and voltage penalty weight in real time based on the detection uncertainty. When the detection result is unreliable, the penalty is automatically reduced to guide the agent to adopt a conservative strategy, avoiding misjudgment that interferes with decision-making. When the detection result is reliable, the full penalty intensity is retained to accurately constrain undesirable behavior. This effectively improves the robustness and stability of decision-making in complex environments, avoids the imbalance of rewards and penalties caused by fixed weights, and significantly enhances the accuracy and reliability of self-healing decision-making in distribution network faults.
[0124] The formula for calculating the load recovery weight for fault detection is:
[0125] .
[0126] in, For load recovery weights in fault perception; The fault activation intensity adjustment coefficient is a trainable scalar.
[0127] when If the fault activation intensity is high, the load recovery reward weight is increased, driving the agent to prioritize the recovery of the fault-affected area; when The node is normal. The rewards will be restored to the baseline level.
[0128] The method provided by the embodiments of the present invention dynamically adjusts the load recovery weight by fault activation intensity to obtain the load recovery weight for fault perception. It can adjust the load recovery priority in real time according to the fault degree of the node, drive the agent to prioritize the recovery of the fault area, improve the pertinence and efficiency of fault self-healing, and optimize the decision guidance effect of multi-agent.
[0129] The expression for the adaptive reward function is:
[0130] .
[0131] .
[0132] in, For the first The agent in the th... The adaptive reward function value of the step; As a load recovery reward component; This is the penalty component for failures; This is a voltage deviation penalty component; Cost component for switching operation; For the first Voltage over-limit penalty for each agent; This is the voltage over-limit penalty coefficient; For node voltage limits; For the first The actual voltage value of the node corresponding to each agent.
[0133] The adaptive reward function expression provided in the embodiments of this invention constructs an adaptive reward function by fusing multi-dimensional reward components with dynamic weights: based on four core self-healing indicators—load recovery, fault penalty, voltage deviation penalty, and switching operation cost—differentiated weighting is performed using load recovery weight for fault perception, fault / voltage penalty weight for uncertainty adjustment, and switching operation weight. At the same time, a voltage limit violation penalty term is superimposed to strengthen voltage safety constraints. Finally, the weighted fusion yields the adaptive reward function value for each agent's corresponding self-healing step, realizing dynamic matching between reward signals and node fault states and detection reliability.
[0134] The embodiments of this invention provide the above adaptive reward function, which achieves precise self-healing guidance by dynamically adapting to node fault states and detection reliability. It relies on multi-dimensional reward components to ensure the global optimal self-healing target, and combines dual voltage constraints to enhance the safe operation level of the distribution network. At the same time, it effectively optimizes the training process of multi-agent reinforcement learning, and significantly improves the model convergence, decision robustness and engineering applicability.
[0135] Furthermore, the method provided in the embodiments of the present invention, which constructs a differential reward function for each node based on the marginal contribution of each agent to the self-healing effect of the distribution network fault, combined with the adaptive global reward and the temporal differential result of the agent's state-action value, preferably includes: constructing a corresponding differential reward signal based on the adaptive global total reward of each agent in the current state and the next state; using each differential reward signal as a benchmark, weighting the maximum state-action value of the corresponding next state through a discount factor, and subtracting it from the state-action value of the corresponding current state to generate a corresponding temporal differential reward; weighting each temporal differential reward with a learning rate, iteratively updating the corresponding state-action value, and constructing the differential reward function corresponding to each node.
[0136] The formula for calculating the adaptive global total reward is as follows:
[0137] .
[0138] In the formula, For adaptive global total reward; This represents the total number of intelligent agents participating in fault self-healing in the distribution network.
[0139] The aforementioned adaptive global total reward, by summing the node-level adaptive rewards of all agents, aggregates the local self-healing benefits into the global total reward of the distribution network, providing a unified global optimization objective for multi-agent reinforcement learning, aligning local decisions with the global self-healing objective, avoiding global suboptimal results caused by individual optimism, and providing a global benchmark for the construction of differential reward functions, thereby improving the convergence of model training and the global optimality of fault self-healing.
[0140] The expression for the differential reward function is:
[0141] .
[0142] .
[0143] in, For the first An agent is in the current state Current action State-action value function under the following conditions; For assignment operators, use The calculation results on the right side update the state-action value on the left side; The learning rate; For the first The agent in the th... The differential reward signal for each step; Discount factor; For the first The agent in the next state Next action Maximum state-action value; For the first The adaptive global total reward for each step; For the first Step to remove the first The adaptive global total reward after each agent.
[0144] The differential reward function expression provided in the embodiments of this invention is constructed by marginal contribution quantification and temporal differential iteration: the differential reward signal is calculated by the difference between the current adaptive global total reward and the global total reward after removing the target agent, accurately quantifying the marginal contribution of the agent to fault self-healing; then, based on the temporal differential principle, the next state-action value weighted by the discount factor is fused, and the state-action value function of the agent is iteratively updated with the learning rate to complete the construction of the differential reward function.
[0145] The method provided by the embodiments of the present invention, by providing the above differential reward function, can achieve accurate credit allocation of global rewards, effectively solve the problems of imbalance in global reward credit allocation and mismatch between individual contributions and rewards in multi-agent training, strengthen the decision incentive of individual agents, improve the iteration efficiency of value function and model convergence speed, ensure that multi-agent decisions are highly consistent with the global self-healing goal, and significantly enhance the synergy, global optimality and training stability of distribution network fault self-healing.
[0146] The following are specific embodiments of a power distribution network fault self-healing method based on neural networks and multi-agent cooperation provided by the present invention, which are implemented in the IEEE-33 node power distribution network frame and under three load scenarios.
[0147] Specifically, in Scenario 1 (100% rated load), closing the tie switch 33 achieved a load recovery rate of 98.26%, but with a power loss of 142.8 kW. Scenario 2 employed a segmented recovery strategy, implementing recovery in stages under 130% load conditions, ultimately achieving a load recovery rate of 96.74%, with voltage remaining stable but power loss reaching 156.3 kW. Scenario 3, applying a load transfer mechanism under 160% load conditions, still successfully restored 93.12% of the load, indicating that the MA-DQN agent has achieved effective collaboration. All experimental results are summarized in Table 1.
[0148] Table 1: Recovery performance of IEEE 33 bus network under three load scenarios
[0149]
[0150] As shown in Table 1, the proposed method can achieve efficient fault recovery in distribution networks under different load conditions ranging from 100% to 160%. The load recovery rate decreases slightly and steadily with increasing load, but always maintains a high recovery level of over 93%. Power loss increases reasonably with increasing load, and the number of switching operations is precisely matched with the recovery strategy, achieving a good balance between load recovery effect, number of operations, and power loss. The method can still stably complete load recovery under heavy load scenarios, fully demonstrating the effectiveness of MA-DQN multi-agent collaborative decision-making and the strong adaptability of the proposed method to different load scenarios.
[0151] Next, the voltage curves of the IEEE 33-node distribution network model before and after the implementation of the SR-MAN framework were analyzed using the method of the present invention.
[0152] Multiple nodes experienced undervoltage below 0.9 reactive power units (pu), with the lowest undervoltage reaching 0.872 pu, indicating poor power quality. After adopting the SR-MAN framework, the lowest voltage increased to 0.956 pu, the highest voltage stabilized at 1.041 pu, and the voltage fluctuation range decreased to 1.4%. In contrast, the scheme using only the EGNN benchmark had a lowest voltage of 0.914 pu and a deviation rate of 3.1%, which fully demonstrates the significant advantages of the SR-MAN system in improving the overall network load recovery capability and power quality. The test results of voltage stability indicators are summarized in Table 2 and... Figure 2 .
[0153] Table 2: Voltage Stability Indicators – Comparison Before and After Fault Recovery
[0154]
[0155] Figure 2 In this context, V_min represents the lower limit of the voltage amplitude, 0.9 pu (per unit), and V_max represents the upper limit of the voltage amplitude, 1.1 pu.
[0156] From Table 2 and Figure 2 It is known that under fault conditions, the voltage at multiple nodes in the distribution network is severely below the acceptable lower limit of 0.9 pu, with the minimum voltage being only 0.872 pu, and the voltage deviation of the entire network reaching 6.8%. Although the EGNN benchmark model can improve the voltage level to some extent, it still suffers from problems such as low node voltage and insufficient stability. After fault self-healing optimization, the proposed method stabilizes the voltage of all busbars within the acceptable range of 0.9 pu to 1.1 pu, increases the minimum voltage to 0.956 pu, controls the maximum voltage at 1.041 pu, and the voltage deviation of the entire network is only 1.4%. This represents a significant optimization compared to both the fault condition and the benchmark model, fully verifying the significant advantages and effectiveness of the proposed method in improving voltage stability after distribution network fault recovery.
[0157] To verify the multi-agent collaborative mechanism, Table 3 compares MA-DQN with interactive querying and centralized decision-making mechanisms. Interactive querying achieved a 95.63% load recovery rate under non-stationary learning conditions, with a recovery time of 5.8 seconds. While the centralized decision-making mechanism improved the load recovery rate to 96.72% and shortened the recovery time to 5.1 seconds, it suffers from single-point-of-failure risk and insufficient scalability. MA-DQN outperforms both alternatives, demonstrating that decentralized collaborative learning mechanisms possess stronger robustness and efficiency advantages.
[0158] Table 3: Fault Isolation and Load Restoration – Comparison of MA-DQN with Other Control Methods
[0159]
[0160] As shown in Table 3, the interactive query mechanism can achieve a load recovery rate of 95.63% under non-stationary learning conditions, but the fault recovery time is relatively long (5.8 seconds). Although the centralized decision-making method improves the load recovery rate to 96.72% and shortens the recovery time to 5.1 seconds, it has inherent defects such as single-point failure risk and insufficient scalability. The MA-DQN multi-agent collaborative decision-making method adopted in this invention is superior to the above two schemes in all four core indicators: fault detection accuracy, load recovery rate, recovery time, and power loss. With a detection accuracy of 97.34%, a high load recovery rate of 98.26%, a fast response of 3.9 seconds, and a low power loss of 142.8kW, it fully verifies the stronger robustness, operational efficiency, and engineering practicality of the decentralized collaborative learning mechanism in the self-healing scenario of distribution network faults.
[0161] In summary, the embodiments of this invention provide a self-healing method for distribution network faults based on neural networks and multi-agent collaboration. Through a self-healing multi-agent neural network framework (SR-MAN), it organically integrates an attention-enhanced graph neural network (AHA-Att-EGNN) driven by an artificial hummingbird algorithm with a multi-agent deep Q-network (MA-DQN), forming an integrated closed-loop self-healing mechanism for fault detection, isolation, and load restoration. Addressing the main shortcomings of existing technologies, it brings the following significant technical effects:
[0162] (1) It realizes the close connection between fault detection and recovery decision. AHA-Att-EGNN directly outputs the fault type probability and activation intensity after processing data such as real-time voltage, current and network status to MA-DQN. Combined with the adaptive reward mechanism of uncertainty awareness, it forms a closed loop from perception to execution, avoids the problem of information transmission delay and inconsistency between modules, and significantly improves the real-time response capability of the system.
[0163] (2) Fully exploit global topology and multi-source information to achieve full utilization of global information. AHA-Att-EGNN captures the fault propagation dependency between nodes through attention-guided multi-layer graph propagation and independent attention mechanism. At the same time, it introduces artificial hummingbird algorithm to optimize network parameters, so that the agent is no longer limited to local observation, but obtains an embedded representation containing the coupling relationship of the whole network, thereby ensuring that local decision-making is consistent with the global optimal recovery goal.
[0164] (3) Significantly enhances the multi-agent collaboration capability and solves the problem of high difficulty in multi-agent collaboration. MA-DQN adopts a differential reward mechanism, removes the marginal contribution after individual agent contribution as the training signal, and combines it with a collaborative reward sharing device to effectively resolve the problems of action coupling and credit allocation. At the same time, through uncertainty adjustment and dynamic enhancement of activation intensity, the training process is made to converge smoothly and avoid oscillations, thus realizing fault isolation and load transfer under decentralized distributed collaboration.
[0165] (4) Effectively addresses the high-dimensional action space and operational constraints, solving the problems of large action space and limited solution efficiency. The action decomposition strategy and adaptive weighted global reward function transform the high-dimensional control space into sub-problems that can be solved efficiently; the basic weighting coefficients are dynamically generated by a trainable linear network, and through Softmax normalization and dimensional scaling, ensure that constraints such as radial operation, voltage stability, branch capacity, and priority recovery of important loads are met simultaneously, taking into account the recovery effect, safety, and economy.
[0166] (5) The fully distributed multi-agent architecture is adopted, which eliminates the single point of failure risk and poor scalability of centralized control. Each network component acts as an independent agent and achieves collaboration through local Q network and global reward sharing. It can make decisions online without complete global state information, which greatly improves the robustness and scalability of the system and is suitable for new distribution network scenarios with high renewable energy penetration and dynamic topology changes.
[0167] Embodiments of the present invention also provide a non-transitory machine-readable medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of the present invention.
[0168] Embodiments of the present invention also provide a computer program product, including a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform the method of an embodiment of the present invention.
[0169] An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform the method of the embodiment of the present invention.
[0170] refer to Figure 3 The present invention will now describe a structural block diagram of an electronic device that can serve as an embodiment of the present invention, serving as an example of a hardware device applicable to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0171] like Figure 3 As shown, the electronic device includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in ROM (Read-Only Memory) 502 or loaded from storage unit 508 into RAM (Random Access Memory) 503. RAM 503 can also store various programs and data required for the operation of the electronic device. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An I / O interface (Input / Output Interface) 505 is also connected to bus 504.
[0172] Multiple components in the electronic device are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information into the electronic device. Input unit 506 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. Output unit 507 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, disks and optical discs. Communication unit 509 allows the electronic device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, and / or wireless communication transceivers, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0173] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a CPU (Central Processing Unit), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing units, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the method embodiments of the present invention can be implemented as a computer program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on an electronic device via ROM 502 and / or communication unit 509. In some embodiments, the computing unit 501 can be configured to perform the methods described above by any other suitable means (e.g., by means of firmware).
[0174] Computer programs for implementing the methods of embodiments of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0175] In the context of embodiments of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, or infrared systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0176] It should be noted that the term "comprising" and its variations used in the embodiments of this invention are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The modifications of "one" and "a plurality" mentioned in the embodiments of this invention are illustrative and not restrictive, and those skilled in the art should understand that unless explicitly indicated otherwise in the context, they should be understood as "one or more".
[0177] The steps described in the method embodiments provided by the present invention can be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of protection of the present invention is not limited in this respect.
[0178] The term "embodiment" in this specification refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily imply the same embodiment, nor does it imply independence or alternativeity from other embodiments. The various embodiments in this specification are described in a related manner, with reference to each other for similar or identical parts. In particular, for apparatus, device, and system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, and relevant details are referred to in the description of the method embodiments.
[0179] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A method for self-healing of distribution network faults based on neural networks and multi-agent cooperation, characterized in that, The method includes: Collect real-time operating data from each node of the power distribution network and integrate them to form the corresponding raw data matrix; Each of the original data matrices is input into the fault detection model, which outputs the fault type probability and embedding vector of each node; wherein, the embedding vector includes electrical state and topological context information; the fault detection model is obtained by training a graph neural network model with the goal of minimizing the classification error of the fault type probability; Based on the difference between the embedded vector and the baseline embedded vector of the corresponding node during normal operation, a fault feature vector corresponding to each node is constructed. Each of the embedded vectors and the fault feature vectors is input into the fault self-healing decision model, which then outputs corresponding fault self-healing action instructions to each distributed agent. The fault self-healing decision model is obtained by training a multi-agent reinforcement learning model based on an adaptive reward function and a differential reward function. The adaptive reward function is constructed based on dynamic weight coefficients generated from the fault feature vectors. The differential reward function is constructed based on the marginal contribution of each agent to the fault self-healing effect of the distribution network.
2. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 1, characterized in that, Before inputting the respective raw data matrices into the fault detection model, the method includes: Historical operational data corresponding to each node is collected, and after labeling the corresponding fault type, it is integrated to form a historical data matrix corresponding to each node. Each of the historical data matrices is input into a graph neural network model, and the graph neural network model outputs the fault type probability and embedding vector corresponding to each node. The classification error is calculated based on the difference between the probability of the fault type and the corresponding fault type label; With the goal of minimizing the classification error, the weight parameters of the graph neural network model are iteratively optimized to obtain the trained fault detection model.
3. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 2, characterized in that, Each of the historical data matrices is input into a graph neural network model, which outputs the fault type probability and embedding vector corresponding to each node, including: Each of the historical data matrices is input into an attention-enhanced graph neural network model, and the historical data matrices are subjected to nonlinear transformation processing by the attention-enhanced graph neural network model to extract the electrical and topological features of each node. Based on the electrical features and the topological features, the corresponding attention weights and inter-node feature propagation matrices are calculated using the attention-enhanced graph neural network model. Based on the attention weights and the feature propagation matrix between nodes, the electrical and topological features are enhanced by attention-weighted features through the attention-enhanced graph neural network model, and the fault type probability, electrical state, and topological context information corresponding to each node are output.
4. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 2, characterized in that, With the goal of minimizing the classification error, the weight parameters of the graph neural network model are iteratively optimized to obtain a trained fault detection model, including: The artificial hummingbird algorithm is used to optimize each individual by taking each weight parameter of the graph neural network model as an individual and minimizing the classification error as the optimization objective. The algorithm iteratively optimizes each individual by performing global search and local adjustment in a loop. The loop terminates after reaching the preset number of iterations, resulting in a successfully trained fault detection model.
5. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 1, characterized in that, Based on the difference between the embedded vector and the baseline embedded vector of the corresponding node during normal operation, a fault feature vector corresponding to each node is constructed, including the following steps: Each of the aforementioned embedding vectors is compared with the baseline embedding vector of the corresponding node during normal operation, and the fault activation intensity and state offset of each of the aforementioned nodes are calculated. The state offsets are normalized to obtain the corresponding detection uncertainties; Based on the fault activation intensity, state offset, and detection uncertainty corresponding to each node, a fault feature vector corresponding to each node is constructed.
6. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 5, characterized in that, The formula for calculating the fault feature vector is: ; ; ; ; in, For the first Fault feature vectors of each agent; For the first The fault activation intensity of each node; For the first The state offset of each node; For the first The detection uncertainty of each node; It is a three-dimensional real number space; It is a real number; For the first The node is detected by the fault detection model. The embedding vector output after layer graph propagation; The mean of the L2 norm of the baseline embedding vector; It is an L2 norm; It is the set of real numbers; For the first The baseline embedding vector for each node to operate normally; Output layer dimensions for the fault detection model; Output the total number of categories for the fault detection model; The first output of the fault detection model The node Probability of fault state; Normalization factor; It is the natural logarithm.
7. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 1, characterized in that, Before inputting the respective embedding vectors and the fault feature vectors into the fault self-healing decision model, the method includes: Based on each of the fault feature vectors, corresponding dynamic weight coefficients are generated and weighted and summed with each reward component to construct the adaptive reward function for each node; wherein, the dynamic weight coefficients are generated by a trainable linear network model based on the fault feature vectors; the trainable linear network is jointly trained and optimized with a multi-agent reinforcement learning model with the objective of maximizing the total benefit of self-healing of distribution network faults; Based on the marginal contribution of each agent to the self-healing effect of the distribution network fault, and combining the adaptive global total reward and the temporal difference results of the agent's state-action value, a differential reward function is constructed for each node; wherein, the adaptive global total reward is the sum of the adaptive reward values calculated by the global agent based on the adaptive reward function at the corresponding time. Based on each of the adaptive reward functions and the corresponding differential reward functions, the multi-agent reinforcement learning model is iteratively trained to obtain the fault self-healing decision model for each node.
8. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 7, characterized in that, Based on the dynamic weight coefficients generated from the fault feature vector, a weighted sum is performed on each reward component to construct an adaptive reward function, including: Each of the aforementioned fault feature vectors is input into a trainable linear network model. With the goal of maximizing the total benefit of distribution network fault self-healing, the model is jointly trained end-to-end with the multi-agent reinforcement learning model to generate corresponding basic weight coefficients. The basic weight coefficients include: load recovery weight, fault penalty weight, voltage penalty weight, and switching operation weight. Based on the detection uncertainty corresponding to the fault feature vector, the fault penalty weight and the voltage penalty weight are dynamically adjusted to obtain the uncertainty-adjusted fault penalty weight and the uncertainty-adjusted voltage penalty weight. Based on the fault activation intensity corresponding to the fault feature vector, the load recovery weight is dynamically adjusted to obtain the fault-aware load recovery weight. Based on the load recovery weight of fault perception, the fault penalty weight of uncertainty adjustment, the voltage penalty weight of uncertainty adjustment, and the switching operation weight, the corresponding reward components of each agent in the distribution network fault self-healing process are weighted and summed to construct the adaptive reward function.
9. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 8, characterized in that, The expression for the adaptive reward function is: ; ; ; in, For the first The agent in the th... The adaptive reward function value of the step; For the first The load recovery weight of the step; This is the fault activation intensity adjustment coefficient; For the first The fault activation intensity of each node; As a load recovery reward component; For the first The fault penalty weight of the step; For the first The detection uncertainty of each node; This is the penalty component for failures; For the first Voltage penalty weighting for each step; This is a voltage deviation penalty component; Weights for switching operations; Cost component for switching operation; For the first Voltage over-limit penalty for each agent; This is the voltage over-limit penalty coefficient; For node voltage limits; For the first The actual voltage value of the node corresponding to each intelligent agent; The normalized activation function; This is the weight matrix of a trainable linear network model; For the first Fault feature vectors of each agent; This is the bias vector for a trainable linear network model; This is the weight scaling factor.
10. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 7, characterized in that, Based on the marginal contribution of each agent to the self-healing effect of the distribution network faults, and combining the adaptive global reward and the temporal difference results of the agent's state-action value, a differential reward function is constructed for each node, including: Based on the adaptive global total reward of each agent in the current state and the next state, a corresponding differential reward signal is constructed; Based on each differential reward signal, the maximum state-action value of the corresponding next state is weighted by a discount factor and subtracted from the state-action value of the corresponding current state to generate the corresponding temporal differential reward. The learning rate is used to weight each of the temporal differential rewards, and the corresponding state-action value is iteratively updated to construct the differential reward function for each node.
11. The self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to claim 10, characterized in that, The expression for the differential reward function is: ; ; in, For the first An agent is in the current state Current action State-action value function under the following conditions; For assignment operators, use The calculation results on the right side update the state-action value on the left side; The learning rate; For the first The agent in the th... The differential reward signal for each step; Discount factor; For the first The agent in the next state Next action Maximum state-action value; For the first The adaptive global total reward for each step; For the first Step to remove the first The adaptive global total reward after each agent.
12. An electronic device, comprising: A processor and a memory storing a program, characterized in that the program includes instructions that, when executed by the processor, cause the processor to perform the self-healing method for distribution network faults based on neural networks and multi-agent cooperation according to any one of claims 1 to 11.