Abstract
Distribution system restoration (DSR) has become increasingly challenging due to frequent topology changes and complex nodal interactions, especially in systems with a high penetration of distributed energy resources (DERs). Existing deep reinforcement learning (DRL) methods remain limited in representing inter-nodal relationships and incorporating domain prior knowledge. Therefore, this paper proposes a graph attention-based coupling-aware reinforcement learning method. From a non-Euclidean spatial perspective, the proposed method uses the distribution power transfer factor (DPTF) to quantify the strength of electrical coupling between nodes. The resulting coupling strengths are embedded as entries of the graph adjacency matrix, allowing the model to capture complex nodal interactions driven by power transfer. An aware graph attention network (AGAT) is further developed, where adjacency matrix with prior knowledge is introduced as a bias term in the attention coefficient calculation. This design guides GAT to generate differentiated node representations enriched with physical information. Based on the extracted graph features, proximal policy optimization (PPO) is employed to determine restoration decisions. Case studies on the IEEE 34-bus system demonstrate that the proposed method outperforms benchmark algorithms in training convergence, restored power, and online decision efficiency, enabling fast and effective distribution system restoration.
1. Introduction
Distribution systems serve as the critical interface between the power system and end users, and their reliability has a direct impact on residential life, industrial production, and public services. In recent years, climate-related extreme events have become more frequent, causing distribution system faults to exhibit more abrupt and spatially concentrated characteristics [1]. Given the large number of branches and the geographically dispersed switching devices in distribution systems, any delay in fault isolation and network reconfiguration may result in more widespread interruptions to load supply. As a result, distribution system restoration (DSR) has become an essential technical measure for enhancing power supply reliability and system resilience. The core objective of DSR is to rapidly determine an appropriate reconfiguration scheme according to the fault location, network topology, and available switch states, so that outage areas can be restored as much as possible through backup paths or local power sources [2].
With the continued integration of distributed energy resources (DERs) on the distribution side, the operating conditions for fault restoration are undergoing substantial changes. These controllable resources can support local loads after a fault and thereby improve the flexibility of distribution network restoration [3,4]. Meanwhile, the increasing penetration of DERs is gradually transforming conventional single source radial distribution networks into active distribution networks (ADNs) [5,6] with multiple coupled power sources. During restoration, switching operations alter network connectivity, while the locations and capacities of DERs reshape power flow transfer paths, leading to more complex interactions among nodes [7]. Therefore, accurately characterizing the electrical relationships among nodes and using this information to identify effective supply restoration paths have become critical issues in DSR for distribution networks with DERs.
In early research on DSR, optimization methods based on exact mathematical models played a dominant role. Mathematical programming approaches [8,9,10] have been widely used because of their rigorous formulations and reliable convergence properties. Although such model-based methods can yield optimal or near optimal restoration solutions, their scalability, computational tractability, and suitability for real-time decision making become increasingly limited as network size grows and DER penetration increases. Heuristic and metaheuristic algorithms [11,12] offer a more flexible way to search for restoration strategies through individual-based or population-based mechanisms, depending on the complexity of the problem. However, these methods are often sensitive to the search process and may converge to local optima.
With the rapid development of artificial intelligence, deep reinforcement learning (DRL) has gained increasing attention and has been widely explored in power system applications [13,14,15,16,17,18]. In contrast to conventional optimization methods, DRL does not rely on an exact mathematical model of the system. Instead, the restoration problem is formulated as a Markov decision process (MDP), where an agent interacts with the environment to generate training samples and gradually learns an optimal policy from these interactions. Once trained, the policy can be directly deployed in practical test systems to make autonomous real-time decisions at the millisecond level, showing strong scalability and generalization capability [19]. Recent studies have therefore begun to apply DRL to power system restoration problems [20,21,22,23,24]. For cascading failures in power systems, Wu et al. [20] adopted classical Q learning to derive optimal sequential restoration decisions. However, Q learning stores state action values in a tabular form, making it susceptible to the curse of dimensionality. To overcome this limitation, Ref. [21] incorporated deep neural networks into Q learning and applied a deep Q-network (DQN) to distribution network restoration after major blackouts while accounting for the asynchronous arrival of information. Monte Carlo tree search was also used to accelerate the training process. Ref. [22] introduced double Deep Q-network (DDQN), a variant of DQN, to handle the large state space caused by distribution network faults and to determine the optimal states of all switches during network reconfiguration. Du et al. [23] introduced the deep deterministic policy gradient (DDPG) algorithm to handle high-dimensional continuous action spaces and developed a two-stage learning framework, in which learning from demonstrations was used to assist in identifying optimal restoration strategies.
However, most of the above studies treat power grid states as flattened vectors and feed them into fully connected neural networks for policy learning, overlooking the topological structure and spatial characteristics of distribution networks. In essence, a distribution network can be naturally represented as a graph that encodes both nodal operating information and the spatial relationships among buses. Introducing graph-based learning into fault restoration can therefore enhance the ability of the agent to exploit network structural information. For example, Ref. [25] developed an attention-based graph reinforcement learning framework, in which the graph structure was used to characterize the cooperative relationships among agents in the restoration area. Ref. [26] combined meta learning with graph convolutional networks to improve the adaptability of restoration strategies across different operating scenarios. Nevertheless, both studies describe nodal relationships only through simple binary adjacency matrices, which represent physical connectivity alone. Zhao et al. [27] formulated distribution network restoration as a sequential decision-making problem, divided the area supplied by each distributed generator into a unit, and used graph convolutional networks to extract topological features of the power network. However, the graph structure in this work only captures the connections among units and cannot represent the coupling relationships among individual nodes within each unit.
For distribution networks with high penetrations of DERs, the supply capability during restoration is not determined solely by topological connections. It is also closely related to power flow transfer paths, the locations and capacities of DER support, and the strength of electrical coupling among nodes. Therefore, using simple connectivity as the only basis for information propagation in graph neural networks may prevent the feature aggregation process from accurately identifying critical supply paths and strongly coupled nodes. This limits the ability of the restoration policy to perceive complex operating states and ultimately degrades decision making performance.
To address these issues, this paper proposes a graph-aware reinforcement learning (GARL) method, which incorporates electrical prior knowledge into the decision-making process of DSR. Specifically, the distribution power transfer factor (DPTF) is introduced to enhance the representation of nodal coupling in the graph structure, enabling the agent to identify more effective restoration paths and make improved decisions under extreme fault scenarios. The main contributions of this paper are as follows:
- (1)
- The proposed method models strongly and weakly coupled node pairs from a non-Euclidean spatial perspective. The DPTF tailored to distribution systems is calculated from the current network topology and branch parameters and is subsequently used to quantify the coupling strengths between nodes. Then this prior knowledge is incorporated into the graph construction, enabling the model to capture the spatial structure and the electrical and physical characteristics of the system and to discern how complex power-transfer-driven nodal interactions affect restoration decisions.
- (2)
- An aware graph attention network (AGAT) is incorporated into the reinforcement learning framework for nodal feature extraction and aggregation. The adjacency matrix enriched with prior knowledge is introduced as a bias term in the attention score calculation, guiding the adaptive optimization of nodal weights. In this way, AGAT can generate differentiated node representations enriched with physical information, and the attention mechanism can be guided by power correlation information while retaining its data-driven learning capability.
- (3)
- The proposed method uses the proximal policy optimization (PPO) framework for DSR. By combining the stable policy update capability of PPO with the coupling graph representation of the distribution system, the policy can explicitly exploit nodal interaction information. This helps improve the training efficiency of the agent and its online restoration performance under complex fault scenarios.
2. DSR Problem Formulation and Proposed GARL Method
2.1. The DSR Problem
After a fault occurs in a distribution system, restoration is typically performed by adjusting switch states to isolate the faulted area and reconfigure an energizable network topology. For active distribution networks with DERs, restoration decisions should account not only for the load transfer capability of upstream feeders, but also for the local support provided by DERs, so that outage loads can be restored as much as possible through available supply paths [28]. Since switching actions directly change network connectivity and power flow distribution, the restoration process is essentially a combinatorial optimization problem that involves topology reconfiguration, load restoration, and power allocation.
In this section, the DSR problem is formulated with the objective of maximizing the restored power. Voltage, power flow, and DER operating constraints are incorporated to ensure that the obtained restoration scheme is physically feasible and operationally practical. Based on the above considerations, the DSR problem can be formulated as follows.
- (1)
- Objective function
For the DSR problem, the objective function is defined as maximizing the service restoration ratio of the distribution system:
where denotes the active power demand of load node i, denotes the set of load nodes, denotes the load restoration status of node i. It is not a decision variable generated by the agent, but is determined by the environment after reconstructing the network topology according to the switch states and faulted-line states. In the reconstructed topology, is set to 1 only if load node i and either the upstream grid or an available grid-forming DER belong to the same energized connected region, and node i satisfies all operational constraints. Otherwise, is set to 0. Therefore, the load restoration status is jointly determined by the switching configuration, network connectivity, availability of power sources, and electrical operating conditions. This also ensures the network connectivity of the restored loads.
- (2)
- Nodal power balance constraints
During load restoration and topology reconfiguration, the power balance constraint must be satisfied at each node, which can be expressed as follows:
where and denote the active and reactive power injected into node i by the upstream source, respectively. and denote the active and reactive power injected by the DER at node i, respectively. and denote the active and reactive power demand at node i, respectively. and denote the active and reactive power flows on line (i,j), respectively. denotes the set of lines, and denotes the set of all nodes.
- (3)
- Line thermal limit constraints
During fault restoration, switch reconfiguration changes the distribution of line power flows. To avoid line overloads, a thermal limit constraint is imposed on each energized line, requiring that the apparent power transmitted through the line does not exceed its allowable capacity:
where denotes the maximum allowable apparent power of line (i,j).
- (4)
- Voltage constraints
To ensure the quality of restored supply, the voltage magnitudes of all energized nodes should remain within the allowable range. The nodal voltage constraint can be expressed as follows:
where denotes the voltage magnitude at node i. and denote the lower and upper voltage magnitude limits, respectively.
- (5)
- DER output constraints
DER can provide power support to local loads during fault restoration, but their outputs are limited by equipment capacity, availability, and inverter capacity. Therefore, the active and reactive power outputs of DERs should satisfy the following constraints:
where denotes the maximum available active power output of the DERs. and denote the lower and upper limits of reactive power output, respectively.
2.2. MDP Formulation on Graph
The above DSR problem is formulated as an MDP with a graph structured state representation. As shown in Figure 1, once a fault occurs, the agent observes the current operating state of the distribution system and selects a restoration action . The environment then applies the action and updates the network topology, node states, and load supply status, producing the next state and an immediate reward . The agent is trained to maximize the expected cumulative reward, thereby learning an optimal restoration policy. The MDP can be defined as (, , , ), where is the state space, is the action space, is the state transition function, and is the reward function.
Figure 1.
The interaction framework between agent and environment.
- (1)
- State space
The state space describes the operating states through which the agent interacts with the environment. It is defined as follows:
where denotes the adjacency matrix of the distribution system topology, and denotes the power flow on branch l.
- (2)
- Action space
The actions for DSR mainly consist of switching operations. The action space is defined as follows:
where denotes the switching action of sectionalizing switches, is the number of sectionalizing switches, denotes the switching action of tie switches, and is the number of tie switches. A switch action equal to 1 indicates that the switch is closed, whereas 0 indicates that the switch is open. Under normal operating conditions, sectionalizing switches are closed and tie switches are open.
- (3)
- State transition function
The state transition function describes how the distribution system state changes after the agent executes an action. It can be expressed as follows:
After the agent executes action in state , the environment updates the corresponding system states according to the switching action and generates the next state . This transition process is governed by the state transition function.
- (4)
- Reward function
The reward function provides feedback to the agent after an action is executed and is used to evaluate the quality of the selected action. In this study, the objective of DSR, namely maximizing the service restoration ratio of the distribution system, is used as the reward term:
where represents the positive reward received by the agent during training.
To guide the agent toward improving load restoration while avoiding significant constraint violations, physical constraints are incorporated into the reward function in the form of penalty terms. The penalty terms are defined as follows:
where denotes the power flow non-convergence penalty, denotes the nodal voltage violation penalty, and denotes the DER output violation penalty. With regard to the power flow non-convergence penalty , it should be noted that post-fault switching operations may partition the distribution system into multiple islands. If an island contains only loads or grid-following DERs and has no grid-forming DER with black-start capability and independent voltage support, the resulting network will become ill-conditioned, and nodal power balance cannot be achieved within the prescribed tolerance. The power flow therefore fails to converge, and the corresponding penalty is imposed through the reward function.
It should be noted that if the topology resulting from a switching action causes any energized line to exceed its thermal limit, the topology is regarded as electrically infeasible and is not included as a valid restoration result.
Accordingly, the final reward function can be expressed as:
where , , represent the weight coefficients of each penalty term, which are set to 2, 1, 2 and are used to adjust the impact of different constraint violations on the reward function.
In addition, to maintain radial operation during the restoration process, the topology resulting from each switching action is considered infeasible and is not accepted as a valid restoration state if any energized lines form a closed loop.
2.3. Graph-Aware Reinforcement Learning Framework
This section proposes the GARL method to solve the above MDP for restoration decision making in distribution systems with DERs. The key idea is to incorporate power coupling information among distribution system nodes into the reinforcement learning agent. In this way, the actor network makes decisions not only from nodal operating states, but also from the nodal coupling relationships jointly shaped by network topology and power flow transfer.
The overall framework is shown in Figure 2 and consists of three main components. First, the DPTF is used to calculate the coupling strength between nodes, thereby characterizing the influence of one node on the power flow response of another. Second, an AGAT is developed to extract distribution system features. Third, the PPO algorithm is employed for policy updates.
Figure 2.
Overall framework of the proposed GARL method.
2.3.1. Calculation of Nodal Coupling Strength
During DSR, switching operations continuously change the network topology and power transfer paths. If the adjacency matrix is constructed only from physical connectivity, it is difficult to capture the different levels of influence among nodes during power transfer. To address this issue, this paper introduces the DPTF, which is derived from the conventional PTDF used in transmission networks. The DPTF accounts for the AC power flow characteristics and high R/X ratios of distribution networks. It is used to characterize the impact of nodal power injection variations on line power flow responses, based on which the power coupling strength between nodes can be calculated. Figure 3 illustrates the principle of calculating nodal coupling strength using the DPTF.
Figure 3.
Schematic of nodal coupling strength calculation based on DPTF.
First, the nodal admittance matrix Y is constructed according to the current network topology and branch parameters of the distribution system. The nodal impedance matrix Z is then obtained. Since distribution systems usually have high R/X ratios, the admittance matrix can be ill conditioned to some extent. Directly inverting the admittance matrix to obtain the impedance matrix is therefore not appropriate. In this study, a direct solver based on sparse LU factorization is used to obtain the required elements of the nodal impedance matrix. Specifically, the row and column corresponding to the reference node, namely the source node, are first removed to form the reduced nodal admittance matrix . The nodal impedance matrix Z is then obtained by solving the following sparse linear system:
For each column of Z, this can be written as:
where I is the identity matrix and is the unit vector.
The DPTF is then calculated. It is defined as the ratio of the magnitude of the power-flow variation on branch l = (m, n) caused by a power injection perturbation at node i to the magnitude of the nodal power perturbation :
In the vicinity of the base operating point, for a sufficiently small power perturbation, the power variation at node i can be approximated as . Combining this approximation with the nodal impedance relationship , the voltage variations at nodes m and n can be obtained as:
where and denote the transfer impedance terms between nodes m and i and between nodes n and i, respectively. For branch l = (m, n), the corresponding current perturbation is given by:
where denotes the impedance of branch l. The power variation on branch l can then be expressed as:
Therefore,
In the system considered in this study, the voltage magnitudes of all energized nodes are expressed in per-unit values and generally remain within a similar range. Assuming that , the DPTF can ultimately be expressed as:
This expression measures the relative strength of the power flow response on branch l caused by a power perturbation at node i. A larger value indicates that the power variation at node i has a more pronounced influence on the power flow of this branch. It should be noted that the magnitude of the entire complex ratio in the above equation is taken, rather than only its real or imaginary component. This treatment fully accounts for the high R/X ratios of distribution systems without neglecting the effect of resistance. The resulting DPTF values are nonnegative real numbers. Taking the magnitude preserves the relative strength of the response of the corresponding line to a nodal injection perturbation, while eliminating the effects of the complex phase angle and the sign of the response on the subsequent construction of the graph adjacency matrix.
After the DPTF is obtained, it is further aggregated to derive the coupling strength between nodes. For a given node pair i and j, the coupling strength from node i to node j is defined as the aggregate effect of the power perturbation at node i on the power flow responses of all branches connected to node j, namely:
where denotes the set of branches directly connected to node j. This coupling strength characterizes the electrical association between nodes i and j formed through power transfer paths.
To remove numerical differences caused by heterogeneous line parameters, the nodal coupling strength is normalized as follows:
2.3.2. Aware Graph Attention Network
This section develops an AGAT to extract nodal feature representations during distribution system restoration. Conventional GAT adaptively computes attention weights according to the similarity between node features. In the DSR problem, however, the importance of one node to another depends not only on feature similarity, but also on power transfer paths and the strength of nodal correlations. If the attention coefficients are learned entirely by the neural network, the model may require a longer training process to identify critical supply paths and strongly correlated areas. Therefore, the nodal coupling strength derived from the DPTF is embedded into the attention coefficient calculation as a prior bias, allowing the attention mechanism to be guided by power correlation information while learning from data.
When a GAT is used for graph structured feature extraction, the input graph typically consists of a node feature matrix X and an adjacency matrix A. For a distribution system with nodes, the nodal feature matrix X is defined as:
where denotes the feature vector of each node, including . The nodal feature matrix has dimensions . It should be noted that the system contains several single-phase and two-phase nodes. For these nodes, only the phases physically present are considered. Missing phases are not simply assigned zero voltage values or treated as de-energized, thereby avoiding possible misinterpretation. All nodes therefore retain a consistent five-dimensional feature representation.
The adjacency matrix A is an matrix that is commonly used to describe the physical connectivity of a distribution system. In a conventional setting, the element corresponding to nodes i and j is set to 1 if the two nodes are physically connected, and to 0 otherwise. In this study, however, the adjacency matrix is no longer defined using simple binary values. Instead, the nodal coupling strength is used as the matrix element, which can be expressed as follows:
The matrix element does not indicate whether a physical line exists between two nodes. Instead, it characterizes the strength of the power transfer influence between the nodes induced by power injection. A larger value of indicates stronger electrical coupling between nodes i and j. Consequently, during subsequent GAT-based feature aggregation and extraction, information from node i exerts a greater influence on the representation of node j. Therefore, the proposed adjacency matrix provides structural information for feature extraction that is more consistent with the operating characteristics of distribution systems.
It is worth noting that the coupling strength represents the aggregate influence of a change in power injection at node i on the responses of the lines connected to node j, whereas represents the aggregate influence of a change in power injection at node j on the responses of the lines connected to node i. Therefore, , and consequently, . Accordingly, the adjacency matrix constructed in this study is asymmetric.
Some weak coupling relationships between node pairs may introduce redundant information and increase the training burden of the model. To address this issue, a threshold is introduced to sparsify weak coupling terms:
The value of is determined by considering the tradeoff between training efficiency and restoration performance. When is too small, excessive weakly coupled node pairs are retained, which may introduce noise and increase the computational burden during training. When is too large, some critical coupling relationships may be removed, which can reduce the ability of GAT to identify effective restoration paths and load support relationships.
For a distribution system with L branches, the branch power-flow vector can be expressed as:
The dimension of this vector is L.
Accordingly, the state space of the MDP can be rewritten as:
Based on the graph structure defined above, AGAT is employed to extract nodal features, with {X, A} as its input. This network computes attention coefficients from nodal features while also introducing the adjacency matrix A as a bias term in the attention calculation, thereby guiding the GAT to focus more on nodes with stronger coupling relationships.
Specifically, for node i and its neighboring node j, the original node features are first projected into a latent space through a linear transformation:
where W is a learnable weight matrix, and denotes the hidden representation of node i. When calculating the attention coefficient from node j to node i, AGAT further introduces the adjacency matrix element as a bias term:
where is a learnable attention vector, denotes vector concatenation, and is the activation function. The parameter is learnable and controls the extent to which the DPTF-based coupling strength affects the attention calculation. A larger indicates a stronger power correlation between nodes i and j, so the bias term increases the initial importance of the corresponding edge in the attention score. Since both and the attention parameters are trainable, the model can adapt the information aggregation weights to the restoration objective, rather than relying solely on fixed physical priors.
To make the attention weights among different neighboring nodes comparable, the attention coefficients are normalized as follows:
where denotes the set of neighboring nodes of node i. The normalized coefficient indicates the importance of the features of node j during the information aggregation process of node i.
Based on the attention weights above, the output feature of node i can be expressed as:
where denotes a nonlinear activation function. To further improve the expressive capability and training stability of the model, a multi head attention mechanism is adopted. The features obtained from multiple attention heads are then concatenated as follows:
where K denotes the number of attention heads, and and denote the attention weight and feature transformation matrix of the k-th attention head, respectively.
The output features of AGAT are subsequently flattened according to a fixed node order and concatenated with the branch power-flow features:
The resulting fused feature is used as the input to both the actor network and the critic network.
2.3.3. Proximal Policy Optimization
To enable stable learning of restoration policies under complex fault scenarios, PPO is adopted to train the agent. PPO is a widely used reinforcement learning algorithm based on actor and critic networks. The actor network generates restoration actions according to the current system state, while the critic network estimates the long-term return associated with that state. Compared with conventional policy gradient methods, PPO improves training stability by limiting the policy update between successive iterations. This property makes PPO well suited to DSR problems, where the action space is large and the system state changes dynamically during restoration.
The actor network in PPO is denoted as , where represents the policy parameters. Based on the current system state , the network determines the probability distribution of action , from which the switching actions are selected. Specifically, the actor network first outputs the logits for all switching actions. The probability of each action is then calculated from its corresponding logit using the function . If the probability of an action is greater than 0.5, the corresponding switch is closed. For a faulted switch, an action-masking mechanism is applied to prevent the agent from executing an invalid closing action. The corresponding logit is set to negative infinity, causing the closing probability of that switch to approach zero and thereby preventing it from being closed.
The critic network is denoted as , where represents the critic network parameters. It estimates the long-term cumulative return of the current state and provides a state value baseline for policy update.
During training, the agent interacts with the environment using the policy and collects a set of trajectories:
Based on the sampled trajectories, the discounted cumulative return from time step t is calculated as:
where is the discount factor. To evaluate the return of action relative to the value estimate of state , the generalized advantage function is defined as:
where denotes the temporal difference error. The advantage function is used to guide the policy update. When , it means action produces a higher return than the value estimated for state , and the actor network should increase the probability of selecting this action. Otherwise, the probability of selecting this action should be reduced.
For the actor network, PPO defines the probability ratio between the new and old policies as . To prevent excessively large policy updates, PPO clips this probability ratio and constructs the objective function for training the actor network as follows:
where is the clipping coefficient, and is the clipping function, which constrains the probability ratio within the interval . The actor network is trained by maximizing this objective, so that actions with larger advantages are assigned higher selection probabilities, while the change between the new policy and the old policy is kept within a limited range.
For the critic network, the objective is to accurately estimate the long-term cumulative return of the current state. Therefore, the critic network is trained using the mean squared error loss:
Finally, the parameter updates of the actor network and the critic network can be expressed as:
where and denote the learning rates of the actor network and the critic network, respectively.
3. Results and Discussion
3.1. Experimental Setup
- (1)
- Test network and platform configuration
To verify the effectiveness of the proposed GARL method, case studies are conducted on a modified IEEE 34-bus system, as shown in Figure 4. The total system load is 1.769 MW. To simulate the operating conditions of an ADN with DERs, grid-forming DERs with capacities of 200 kW, 144 kW, and 146 kW are connected at buses 816, 844, and 890, respectively. In addition, a grid-following DER with a capacity of 96 kW is connected at bus 820.
Figure 4.
Modified IEEE 34-bus system.
The case studies were conducted on a computing platform equipped with an NVIDIA Quadro P4000 GPU, a 3.40 GHz CPU, and 32 GB of RAM. All algorithms were implemented in Python 3.8. The reinforcement learning algorithms were developed using PyTorch 1.12.1+cu113 and OpenAI Gym 0.21.0. The MILP model was solved using Gurobi 11.0.
- (2)
- Data description
The reinforcement learning environment is developed based on OpenDSS to perform power flow calculations and update the system operating states. During training, a large number of fault scenarios are generated randomly. Specifically, a node is first randomly selected from the test system, and a circular region is then defined using the selected node as the center and a randomly sampled radius that is smaller than the maximum radius of the test system. A subset of lines within this region is subsequently selected at random and disconnected to simulate line faults with different spatial extents and severity levels. The proportion of faulted lines is randomly varied between 20% and 50%. The load data are randomly sampled from the annual load profiles provided by OpenDSS.
- (3)
- Baseline methods
The proposed method is compared with the following algorithms. (1) DQN: it uses the basic vanilla DQN algorithm for training [21]. (2) PPO: it uses the standard PPO algorithm for training, with a fully connected neural network adopted for feature extraction [29]. (3) GRL: it is also trained using PPO, but employs a basic GAT for feature extraction without embedding nodal coupling information [30]. (4) MILP: its restoration objective is consistent with that defined in Section 2.1, and it imposes the same physical operating constraints as those used in the proposed GARL. The nonlinear AC power-flow constraints are approximated using a linearized DistFlow model, while the line thermal-limit constraints are linearized using a diamond-shaped inner approximation. The model is solved using Gurobi, with the relative optimality tolerance set to .
- (4)
- Implementation details
The proposed method mainly consists of two parts, AGAT-based feature extraction and PPO-based policy training. In the AGAT module, a single-layer multi-head graph attention network is adopted. The number of attention heads is set to 4, and the hidden dimension of each attention head is 32, resulting in a 128-dimensional nodal representation after concatenation. In the PPO framework, the actor network uses a four-layer hidden structure of 128, 256, 256, and 128 neurons, while the critic network uses a two-layer hidden structure of 256 and 256 neurons. The learning rates of both networks are set to , the discount factor is 0.99, the clipping ratio of PPO is 0.2, the batch size is 64, and the rollout length is 176. Training is performed with parallel environments, and the number of parallel environments is set to 12.
3.2. Training Performance
To evaluate the training effectiveness of the proposed GARL method, the training performance of different reinforcement learning methods is compared on the IEEE 34-bus system. The compared methods include DQN, PPO, GRL, and the proposed GARL method. Each method is trained for 80,000 steps using five different random seeds, namely [0, 1, 42, 123, 1234].
Figure 5 presents the reward curves obtained during training. In Figure 5, the solid lines represent the mean training rewards, while the shaded regions indicate the corresponding standard deviations. Table 1 reports the mean and standard deviation of the final converged reward for each method.
Figure 5.
Training curves of different RL methods.
Table 1.
Mean and standard deviation of the final converged rewards obtained by different methods.
As shown in Figure 5 and Table 1, all methods exhibit an overall upward trend in reward across multiple training runs and eventually converge to stable values. DQN and PPO converge to the lowest reward values, with DQN exhibiting the slowest overall improvement. This is mainly because both methods rely on conventional vectorized state representations and do not explicitly capture the network topology of the distribution system. As a result, the agent explores the action space less efficiently in the early training stage, which weakens the overall training performance. Compared with PPO, GRL introduces GAT for feature extraction and therefore achieves better training performance, with a faster increase in reward and a higher converged reward. However, this method still cannot distinguish the varying influence strengths among nodes during power transfer, which limits its performance. Compared with these baseline methods, the proposed method uses the DPTF-based nodal coupling strength to provide the agent with more explicit guidance on power correlations during training. This enables the agent to identify critical supply paths and strongly coupled nodes that are important for load restoration more efficiently. Consequently, the proposed method shows the fastest overall increase in mean reward, achieves the highest converged reward of 0.645, and yields the smallest standard deviation, indicating greater training stability.
3.3. Restoration Performance
3.3.1. Tests Under Typical Line-Outage Scenarios
To further verify the restoration decision making capability of the proposed GARL method under typical fault scenarios, three representative fault scenarios are tested on the IEEE 34-bus system, with the corresponding fault locations shown in Figure 4. The compared methods include DQN, PPO, GRL, GARL, and MILP. Unlike the training stage, where fault scenarios are randomly generated, the faulted lines in the testing stage are selected according to practical considerations. The load data are no longer randomly sampled from the annual load profiles, but are obtained by multiplying the original standard load data by fixed factors to define the operating points. In addition, the DER configuration differs from that used during training. In the testing stage, the DERs originally located at buses 820, 890, and 844 are moved to buses 860, 888, and 848, respectively, while the remaining settings are kept unchanged. By changing the DER locations, the generalization capability of the trained model can be evaluated.
Figure 6 presents the switching decisions obtained by different methods under the three fault scenarios. The raised blocks indicate closed switches, while the recessed blocks indicate open switches. It should be noted that this study adopts a global restoration decision framework, in which all switching decisions are generated simultaneously and then implemented through stepwise validation and execution. Specifically, the switches of the faulted lines are first ensured to remain open throughout the restoration process. The switch-opening operations required by the target restoration scheme are then performed first to prevent the temporary formation of closed loops, followed by the switch-closing operations one at a time. After each switching operation, the current network topology is reconstructed, and the fault isolation status, network radiality, and availability of power sources within each energized connected region are verified in sequence. Once the topology checks are passed, OpenDSS is used to perform a new power-flow calculation, followed by checks of line capacity limits. A switching operation is executed only if it passes above safety checks. Otherwise, it is reordered or rejected. Since the voltage and DER output limits are handled through soft penalty terms in the reward function, loads at nodes that violate either limit are excluded from the restored power calculation.
Figure 6.
Switching decisions under the three fault scenarios.
Figure 7 shows the nodal voltage distributions obtained by the GARL method under the three fault scenarios. Some nodes are not energized, and their voltage magnitudes are therefore not displayed in the figure. Table 2 reports the restored power of different methods under the three fault scenarios, with the unit given in kW.
Figure 7.
Nodal voltage profiles of GARL under three fault scenarios.
Table 2.
Restored power of different methods under the three fault scenarios.
MILP is based on a mathematical model and can generally obtain the optimal restoration solution. Therefore, its testing results are used as the reference benchmark. In Scenarios 1 and 3, the line faults are relatively mild, and the overall restoration performance is satisfactory. As shown in Figure 6, most switching decisions made by the proposed method are consistent with those obtained by MILP. Meanwhile, the restored power achieved by the proposed method is only slightly lower than that of MILP and is the highest among all reinforcement learning-based methods.
It should be noted that, in Scenario 1, the line between buses 834 and 860 is disconnected, which corresponds to switch sw2. However, DQN incorrectly closes this switch. Similarly, in Scenario 3, the disconnected line between buses 860 and 836 corresponds to switch sw3, but PPO incorrectly closes this switch. This indicates that using only vectorized state inputs while neglecting the distribution network topology and the power correlation among nodes may lead to unreasonable switching operations. The proposed method does not issue any closing commands for faulted switches, which also demonstrates, to some extent, the effectiveness of the action-masking mechanism. In addition, in Scenario 3, the disconnection of lines 850 to 816 and 816 to 824 forms an islanded area containing buses 816, 818, 820, and 822. Due to the change in DER locations, this islanded area is supplied only by the grid-forming DER at bus 816. Since the DER has limited capacity and regulation capability, it cannot fully match the local load demand, resulting in voltage violations at some nodes, as shown in Figure 7. Except for these nodes, the other nodes and the other fault scenarios maintain normal voltage magnitudes within the range of 0.9 to 1.1 p.u. It should be noted that the restored power reported in Table 2 includes only loads at nodes that are normally supplied and satisfy all constraints. In Scenario 3, voltage violations occur at several nodes within the islanded region. Although these nodes are energized, their associated loads are excluded from the restored power metric.
In Scenario 2, the disconnection of line 808 to 812 cuts off the connection between the upstream source and most nodes, making it a relatively severe extreme fault scenario. As shown in Figure 7, a large number of nodes remain unenergized in this scenario. Table 2 also shows that the restored power of all methods decreases significantly. Nevertheless, the proposed method, similar to MILP, still restores more than 600 kW of load, which is considerably higher than the restored power achieved by the other reinforcement learning algorithms. This demonstrates the superiority of the proposed restoration strategy.
3.3.2. Tests Under Compound Fault Scenarios
To further evaluate the robustness and generalization capability of the model, this section considers multiple types of compound fault scenarios. The tests are still conducted on the IEEE 34-bus system, with the following three additional conditions superimposed on the line outages in Fault Scenario 1. (1) Scenario 4: the critical DER at bus 888 is taken out of service. (2) Scenario 5: the proportion of constant-power loads in the test system is increased from the original 31% to approximately 50%. (3) Scenario 6: the DER penetration of the test system is reduced from the original 33% to approximately 20%. In all cases, the trained models are directly used for decision making without retraining, in order to evaluate their restoration performance under a broader range of unseen and complex fault scenarios.
Table 3 and Table 4 report the restored power, in kW, and the voltage violation rates obtained by the different methods under Scenarios 4, 5, and 6, respectively. As shown in the tables, the proposed method achieves the highest restored power across all three complex and extreme fault scenarios. In Scenario 5, despite the increased proportion of constant-power loads, it still restores more than 1000 kW of load. Moreover, the proposed method maintains a voltage violation rate of 0% in all three scenarios. Overall, the results indicate that the proposed method retains a certain degree of generalization capability and robustness under complex unseen fault scenarios.
Table 3.
Restored power of different methods under the three compound fault scenarios.
Table 4.
Voltage violation rate of different methods under the three compound fault scenarios.
3.4. Effect of Electrical Prior Knowledge on Model Performance
3.4.1. Effect of the Sparsification Threshold on Model Performance
In this study, the value of directly determines the elements of the adjacency matrix, which further affects the graph structure and the subsequent feature extraction process. Therefore, comparative experiments are conducted with different threshold values to analyze the effect of the sparsification threshold on model performance. By examining the coupling strengths of all node pairs, is set to 0, 0.05, 0.10, 0.15, and 0.20, respectively. Models corresponding to different are trained using five random seeds and subsequently tested under the six fault scenarios described above. The average retained edges and average restored power obtained under different threshold values are then compared in Table 5.
Table 5.
Comparison of model performance under different .
As shown in Table 5, when is set to 0.10, the model achieves the highest restored power. Meanwhile, the graph connectivity remains at a moderate level. It can also be observed that an excessively large or small value of makes the graph structure either too sparse or too dense, which in turn degrades the restoration performance of the model.
3.4.2. Ablation Study of the Prior Bias Term in AGAT
To further examine the effectiveness of embedding electrical prior knowledge into the attention calculation of AGAT, an ablation study is conducted on the bias term in the attention coefficient. Specifically, the adjacency matrix is introduced into the attention coefficient calculation of AGAT through a learnable parameter . Therefore, different settings of this parameter are used to evaluate the impact of electrical prior knowledge on model performance. Three configurations are considered: (1) : the adjacency matrix is not introduced as a bias term in the GAT calculation; (2) : the adjacency matrix is used as a fixed bias term; (3) Learnable : the parameter is learnable, which corresponds to the proposed method. Models corresponding to the three settings are trained using five random seeds and tested under the six fault scenarios described above. The average restored power and average voltage violation rate of each model are compared, with the results presented in Table 6.
Table 6.
Comparison of model performance under different .
As shown in Table 6, the proposed setting with a learnable parameter achieves the highest restored power and the lowest voltage violation rate. This indicates that the adaptive bias mechanism helps the actor network identify effective supply paths and DER supported areas more accurately, thereby improving the adaptability and restoration performance of the model. It also reduces the voltage violation rate of the restoration solution.
3.5. Computational Efficiency for Training and Online Decision Making
To further evaluate the computational efficiency of different methods for practical deployment and to demonstrate the computational advantage of the proposed GARL method, this study records the number of training steps required for convergence, the training convergence time, and the average decision time under three typical fault scenarios on the IEEE 34-bus system. The results are presented in Table 7. It should be noted that the same convergence criterion is applied to all methods when determining the number of training steps required for convergence. Specifically, a model is considered to have converged when the moving-average reward over a window of 2500 training steps first reaches 95% of the final stabilized reward and remains at or above this level for 5000 consecutive training steps.
Table 7.
Comparison of computational efficiency.
As shown in Table 7, compared with the other reinforcement learning algorithms, the proposed GARL method requires the fewest training steps to reach convergence and achieves the shortest convergence time, converging in only 0.11 h. This substantially reduces the training time of the model. The results indicate that embedding electrical prior knowledge provides more effective structural guidance for graph attention-based feature aggregation, enabling the agent to identify critical supply paths and strongly coupled nodes more quickly during training. As a result, ineffective exploration is reduced, and the training efficiency is significantly improved.
In terms of average decision time, GRL and GARL require slightly longer decision times than DQN and PPO because they incorporate graph neural networks. Nevertheless, their decision times remain at the millisecond level, satisfying the real time requirements of online restoration decision making. By contrast, the model-based MILP method requires 0.9645 s for decision making, which is much less efficient than the reinforcement learning based methods.
4. Conclusions
This paper proposes a GARL method for restoration in distribution systems with a high penetration of DERs. By incorporating electrical prior knowledge into the graph reinforcement learning framework, the proposed method improves the restoration decision performance of the agent. The method is validated on a modified IEEE 34-bus system, and the main findings are summarized as follows.
The proposed method achieves the highest converged reward during training. In the testing stage, it delivers substantially better restoration performance than the other reinforcement learning algorithms under unseen extreme fault scenarios, demonstrating good adaptability and robustness within the tested IEEE 34-bus system and the considered range of operating conditions. The ablation studies on the sparsification threshold and the attention bias parameter further show that electrical coupling information should be properly retained and its influence should be adaptively adjusted to improve the overall performance of the model. In addition, the proposed method exhibits strong computational efficiency. It achieves the fastest training convergence while maintaining millisecond level decision speed, which satisfies the real time requirements of online restoration decision making.
This work also has several limitations. The proposed method has only been validated on the IEEE 34-bus system. Future work will evaluate its cross-network generalization capability on larger distribution systems with different network topologies. In addition, strict safety guarantees during the restoration process remain limited. Future studies may incorporate safety layers, real-time power flow verification, or advanced constrained reinforcement learning methods to further improve the reliability of restoration strategies.
Author Contributions
Conceptualization, Y.F. and H.W.; software, Y.F.; validation, Y.F.; formal analysis, Y.F.; resources, H.W.; data curation, Y.F.; writing—original draft preparation, Y.F.; writing—review and editing, H.W.; visualization, Y.F.; supervision, H.W.; funding acquisition, H.W. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Smart Grid-National Science and Technology Major Project, grant number 2025ZD0805900.
Data Availability Statement
Data are contained within the article.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Hanif, S.; Mukherjee, M.; Poudel, S.; Yu, M.G.; Jinsiwale, R.A.; Hardy, T.D.; Reeve, H.M. Analyzing At-Scale Distribution Grid Response to Extreme Temperatures. Appl. Energy 2023, 337, 120886. [Google Scholar] [CrossRef] [Scilit]
- Paul, S.; Poudyal, A.; Poudel, S.; Dubey, A.; Wang, Z. Resilience Assessment and Planning in Power Distribution Systems: Past and Future Considerations. Renew. Sustain. Energy Rev. 2024, 189, 113991. [Google Scholar] [CrossRef] [Scilit]
- Younesi, A.; Shayeghi, H.; Wang, Z.; Siano, P.; Mehrizi-Sani, A.; Safari, A. Trends in Modern Power Systems Resilience: State-of-the-Art Review. Renew. Sustain. Energy Rev. 2022, 162, 112397. [Google Scholar] [CrossRef] [Scilit]
- Smith, E.J.; Robinson, D.A.; Elphick, S. DER Control and Management Strategies for Distribution Networks: A Review of Current Practices and Future Directions. Energies 2024, 17, 2636. [Google Scholar] [CrossRef] [Scilit]
- Miah, M.S.; Shah, R.; Amjady, N.; Islam, S. Interactions between Active Distribution and Transmission Networks: State of the Art and Opportunities. Energy 360 2025, 3, 100024. [Google Scholar] [CrossRef] [Scilit]
- Mousa, H.H.H.; Mahmoud, K.; Lehtonen, M. A Comprehensive Review on Recent Developments of Hosting Capacity Estimation and Optimization for Active Distribution Networks. IEEE Access 2024, 12, 18545–18593. [Google Scholar] [CrossRef] [Scilit]
- Silva, B.L.M.; Peixoto, M.G.M.; Gonçalves, M.C. Impacts of Distributed Renewable Energy Source Integration on the Reliability of Distribution Networks: A Bibliometric Review. Energies 2025, 19, 75. [Google Scholar] [CrossRef] [Scilit]
- Macedo, L.H.; Muñoz-Delgado, G.; Contreras, J.; Romero, R. Optimal Service Restoration in Active Distribution Networks Considering Microgrid Formation and Voltage Control Devices. IEEE Trans. Ind. Appl. 2021, 57, 5758–5771. [Google Scholar] [CrossRef] [Scilit]
- Chen, B.; Ye, Z.; Chen, C.; Wang, J.; Ding, T.; Bie, Z. Toward a Synthetic Model for Distribution System Restoration and Crew Dispatch. IEEE Trans. Power Syst. 2019, 34, 2228–2239. [Google Scholar] [CrossRef] [Scilit]
- Li, Y.; Xiao, J.; Chen, C.; Tan, Y.; Cao, Y. Service Restoration Model with Mixed-Integer Second-Order Cone Programming for Distribution Network with Distributed Generations. IEEE Trans. Smart Grid 2019, 10, 4138–4150. [Google Scholar] [CrossRef] [Scilit]
- Zidan, A.; El-Saadany, E.F. Incorporating Load Variation and Variable Wind Generation in Service Restoration Plans for Distribution Systems. Energy 2013, 57, 682–691. [Google Scholar] [CrossRef] [Scilit]
- Zadsar, M.; Haghifam, M.R.; Miri Larimi, S.M. Approach for Self-healing Resilient Operation of Active Distribution Network with Microgrid. IET Gener. Transm. Distrib. 2017, 11, 4633–4643. [Google Scholar] [CrossRef] [Scilit]
- Mu, C.; Liu, Z.; Yan, J.; Jia, H.; Zhang, X. Graph Multi-Agent Reinforcement Learning for Inverter-Based Active Voltage Control. IEEE Trans. Smart Grid 2024, 15, 1399–1409. [Google Scholar] [CrossRef] [Scilit]
- Jiang, C.; Liu, C.; Yuan, Y.; Lin, J.; Shao, Z.; Guo, C.; Lin, Z. Emergency Voltage Control Strategy for Power System Transient Stability Enhancement Based on Edge Graph Convolutional Network Reinforcement Learning. Sustain. Energy Grids Netw. 2024, 40, 101527. [Google Scholar] [CrossRef] [Scilit]
- Bai, Y.; Chen, S.; Zhang, J.; Xu, J.; Gao, T.; Wang, X.; Wenzhong Gao, D. An Adaptive Active Power Rolling Dispatch Strategy for High Proportion of Renewable Energy Based on Distributed Deep Reinforcement Learning. Appl. Energy 2023, 330, 120294. [Google Scholar] [CrossRef] [Scilit]
- Zhang, J.; Li, Y.; Wu, Z.; Rong, C.; Wang, T.; Zhang, Z.; Zhou, S. Deep-Reinforcement-Learning-Based Two-Timescale Voltage Control for Distribution Systems. Energies 2021, 14, 3540. [Google Scholar] [CrossRef] [Scilit]
- Sheida, K.; Seyedi, M.; Afridi, M.A.; Ferdowsi, F.; Khattak, M.J.; Gopu, V.K.; Rupnow, T. Resilient Reinforcement Learning for Voltage Control in an Islanded DC Microgrid Integrating Data-Driven Piezoelectric. Machines 2024, 12, 694. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Tao, F.; Zhu, L.; Wang, N.; Fu, Z. An Energy Management Strategy for FCHEVs Using Deep Reinforcement Learning with Thermal Runaway Fault Diagnosis Considering the Thermal Effects and Durability. Machines 2025, 13, 962. [Google Scholar] [CrossRef] [Scilit]
- Alobaidi, A.H.; Fazlhashemi, S.S.; Khodayar, M.; Wang, J.; Khodayar, M.E. Distribution Service Restoration with Renewable Energy Sources: A Review. IEEE Trans. Sustain. Energy 2023, 14, 1151–1168. [Google Scholar] [CrossRef] [Scilit]
- Wu, J.; Fang, B.; Fang, J.; Chen, X.; Tse, C.K. Sequential Topology Recovery of Complex Power Systems Based on Reinforcement Learning. Phys. A Stat. Mech. Its Appl. 2019, 535, 122487. [Google Scholar] [CrossRef] [Scilit]
- Bedoya, J.C.; Wang, Y.; Liu, C.-C. Distribution System Resilience Under Asynchronous Information Using Deep Reinforcement Learning. IEEE Trans. Power Syst. 2021, 36, 4235–4245. [Google Scholar] [CrossRef] [Scilit]
- Bui, V.-H.; Su, W. Real-Time Operation of Distribution Network: A Deep Reinforcement Learning-Based Reconfiguration Approach. Sustain. Energy Technol. Assess. 2022, 50, 101841. [Google Scholar] [CrossRef] [Scilit]
- Du, Y.; Wu, D. Deep Reinforcement Learning from Demonstrations to Assist Service Restoration in Islanded Microgrids. IEEE Trans. Sustain. Energy 2022, 13, 1062–1072. [Google Scholar] [CrossRef] [Scilit]
- Liu, Y.; Liao, P.; Wang, Y. Using Graph-Enhanced Deep Reinforcement Learning for Distribution Network Fault Recovery. Machines 2025, 13, 543. [Google Scholar] [CrossRef] [Scilit]
- Fan, B.; Liu, X.; Xiao, G.; Kang, Y.; Wang, D.; Wang, P. Attention-Based Multiagent Graph Reinforcement Learning for Service Restoration. IEEE Trans. Artif. Intell. 2024, 5, 2163–2178. [Google Scholar] [CrossRef] [Scilit]
- Fan, B.; Liu, X.; Xiao, G.; Yang, X.; Chen, B.; Wang, P. Enhancing Adaptability of Restoration Strategy for Distribution Network: A Meta-Based Graph Reinforcement Learning Approach. IEEE Internet Things J. 2024, 11, 25440–25453. [Google Scholar] [CrossRef] [Scilit]
- Zhao, T.; Wang, J. Learning Sequential Distribution System Restoration via Graph-Reinforcement Learning. IEEE Trans. Power Syst. 2022, 37, 1601–1611. [Google Scholar] [CrossRef] [Scilit]
- Mishra, S.; Anderson, K.; Miller, B.; Boyer, K.; Warren, A. Microgrid Resilience: A Holistic Approach for Assessing Threats, Identifying Vulnerabilities, and Designing Corresponding Mitigation Strategies. Appl. Energy 2020, 264, 114726. [Google Scholar] [CrossRef] [Scilit]
- Zhang, X.; Wang, Q.; Bi, X.; Li, D.; Liu, D.; Yu, Y.; Tse, C.K. Mitigating Cascading Failure in Power Grids with Deep Reinforcement Learning-Based Remedial Actions. Reliab. Eng. Syst. Saf. 2024, 250, 110242. [Google Scholar] [CrossRef] [Scilit]
- Dan, Y.; Zhong, H.; Wang, C.; Wang, J.; Fei, Y.; Yu, L. A Graph Deep Reinforcement Learning-Based Fault Restoration Method for Active Distribution Networks. Energies 2025, 18, 4420. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






