#### Abstract

Service restoration of distribution networks in contingency situations is one of the highly investigated and challenging problems. In the conventional service restoration method, utilities reconfigure the topological structure of the distribution networks to supply the consumer load demands. However, the advancements in renewable distributed generations define a new dimension for developing service restoration methodologies. This paper proposes a hierarchical service restoration mechanism for distribution networks in the presence of distributed generations and multiple faults. The service restoration problem is modeled as a complicated and hierarchical program. The objectives are to achieve the maximization of loads restored with minimization of switch operations while simultaneously satisfying grid operational constraints and ensuring a radial operation configuration. We present the service restoration mechanism, which includes the dynamic topology analysis, matching isolated islands with renewable distributed generations, network reconfiguration, and network optimization. A new code scheme that avoids feasible solutions is applied to generate candidate solutions to reduce the computational burden. We evaluate the proposed mechanism on the IEEE 33 and 69 systems and report on the collected results under multitype fault cases. The results demonstrate the importance of the available renewable distributed generations in the proposed mechanism. Moreover, simulation results verify that the proposed mechanism can obtain reasonable service restoration plans to achieve the maximization of loads restored and minimization of switching operations under different faults.

#### 1. Introduction

Forced and scheduled outages are inevitable in distribution networks due to a wide variety of possible causes, such as bad weather conditions, equipment failure, intentional cyber-attacks, and other threats [1]. The damage caused by supply interruption results in serious consequences. The recent largest historical blackout is the India blackout which has affected over 300 million people [2]. The main reason for the incident is circuit breaker tripping. In such an incidence, performing effective and timely service restoration (SR) in a distribution network (DN) has become a major concern for utilities. The common practice of the SR problem is to transfer deenergized loads in the out-of-service areas via network reconfiguration. However, the growing expansion of structure in DN makes the SR problem time-limited and complex. With the implementation of public policies, the use of renewable energy has become increasingly prevalent for distributed generation. The integration of renewable distributed generation (RDG) could lead to a more flexible and efficient restoration solution in dealing with changing market conditions. Hence, an effective and reasonable SR plan should include switches operation sequence and RDG dispatching that the decision-maker can be followed to restore the affected loads.

The distribution network is designed as a meshed structure operating as a radial topology to ensure power supply reliability and economic savings. After a failure occurs in a DN, the fault is isolated by corresponding protection devices. Due to the isolation of the faulted section, the healthy area downstream to the fault place will get disconnected and remain unsupplied. The aim of the SR plan is to restore the healthy loads in the out-of-service area [3]. In order to achieve this goal, one action is to transfer the deenergized loads to healthy neighboring feeders by altering the open/close status of sectionalizing and tie switches [4]. Due to the status of the switches and operational constraints, the SR procedure is defined as a complicated combinatorial and nondifferentiable constrained network reconfiguration problem. Furthermore, the integration of RDGs leads to an increase in the complexity of the SR problem.

Several restoration techniques have been conducted to deal with the SR problem, such as Genetic Algorithm (GA) [5], mixed-integer linear programming (MILP) [6], Particle Swarm Optimization (PSO) [7], and so on. Among these techniques, RDGs in the network are considered as negative loads and automatically disconnected in case of a severe disturbance. In practice, RDGs can operate in synchronism mode with a network or in isolated mode by creating a microgrid. IEEE Standard 1547 suggests that power supply companies for restoring loads in the out-of-service area by creating microgrid [8]. The SR problem aims to develop a service restoration model for the DN, taking into account the existence of RDG and its operating mode. Rajkumar and Khatod [9] present a restoration model and an analytical method to study the optimal sizing and siting of RDGs under single branch fault. The authors in [10, 11] propose a heuristic approach based on an expert system to solve SR problems considering dispersed RDGs. However, the presented studies are oriented toward the placement of the RDGs rather than the availability and usage of the RDGs. The SR problem through the multiagent system method in the DN is also studied by Sharma et al. in [12]. The authors propose to form self-supported areas with RDGs during the restoration procedure. Another approach for an island with all RDGs and priority loads is presented in [13]. The authors in [14] propose a branch-and-bound algorithm to restore the out-of-service loads using RDGs. However, the works have focused on obtaining the islanding strategy using the RDGs in a radial DN.

Considering the variable characteristics of the RDGs operation mode, the application of a cooperative multiagent method for planning the SR problem is proposed in [15]. The study is limited to service restoration and does not consider detection and isolation of fault branches. The authors in [16] present an analytical approach to improve the grid resiliency and restore the out-of-service loads with RDGs. However, the approaches in [15, 16] for the SR problem fail to represent partial restoration scenarios and operating mechanisms. For addressing the situation, Prim’s algorithm is proposed to achieve a near-optimal restoration solution [17]. In this method, we obtain an optimal configuration for power loss reduction via network reconfiguration. Based on the optimal configuration, a feasible SR plan is determined by altering the status of switches. Recently, a decentralized multiagent system has been deployed as a technology for the control and service restoration of DNs with RDGs [18]. The need for a high-performance central agent is a distinct disadvantage of the method. The presented restoration methods in [17, 18] only analyzed the single point fault. Based on the optimal configuration of minimizing power loss, the method in [19] proposes a multifault service restoration method to find the SR plan. According to the method in [20], the restoration problem is divided into two stages which are referred to as reconfiguration problem and load pickup problem. In the method, the postfault restoration topology is determined by using a heuristic search process firstly. And then, the restored loads and the output power of sources are given while fixing the network topology to the one obtained in the first stage. The method could lead to no feasible solution or a solution very far from the optimal one. Other methods in [21, 22] account for the multistage service restoration to determine an SR plan. The above methods have ignored the postfault initial topology variation. The obtained solutions for a given sequence are not influenced by the future sequences during the rest of the restoration process. Moreover, the asynchronous fault and node fault are not involved in the methods. In this paper, we emphasize that a sequence of feasible control switches operations to reach the final SR scheme must be provided. Hence, we propose the main idea of the hierarchical service restoration problem, which is to find the appropriate supply power path by coordinating the results of every layer [23].

As a continuation of the method in [23], this paper addresses the SR problem for the distribution networks with RDGs in the presence of multiple faults. The aim of the mechanism is to find the restoration paths at the maximization of out-of-service load restoration and preserve distribution network operation. We propose a hierarchical service restoration mechanism that provides a feasible switches sequence for fault restoration of distribution networks. The main contributions of the paper are summarized as follows:(1)The SR problem of the DN is modeled as a hierarchical restoration problem, at the maximization of out-of-service load restoration and the use of RDGs with accounting for the minimization number of switch operations. Compared to existing SR methods, the hierarchical restoration framework is more flexible through executing the different stages such as dynamic topology analysis, island partition strategies of RDGs, network reconfiguration, and network optimization.(2)We introduce a presentation of the dynamic topology analysis format DN model. It is used to track the changes of real-time topological parameters and detect the faulted areas quickly.(3)An optimal islanding partition scheme is proposed to determine the isolated islands quickly according to the RDGs availability.(4)During the stage of network optimization, a new encoding scheme is employed to generate the feasible candidate solutions with avoiding tedious mesh checks.(5)Validation of the hierarchical restoration mechanism on different multitypes faults. The proposed mechanism can handle multiple out-of-service areas and outputs a feasible sequence of switches to reach the final SR plan.

The rest of the paper is set out as follows. In Section 2, the problem formulation for the service restoration model for the DN with RDGs is described. Section 3 presents the methodology of the hierarchical SR mechanism to obtain the appropriate SR plans. In Section 4, the various case studies are given and then interesting findings are discussed. Finally, major contributions and conclusions are summarized in Section 5.

#### 2. Problem Formulation

##### 2.1. Restoration Objective Functions

The SR problem of the DN can be defined as the process by which the network is reenergized following an outage. The aim of the DN restoration is to find the optimal SR strategy in terms of minimizing the out-of-service area and the use of RDGs while accounting for the minimization number of switch operations. There are potentially many different objectives of DN restoration. In this section, the restoration objective is restoring maximum loads in the out-of-service area. The restoration problem can be formulated as follows:where *i* and *j* are the index of the node number, *b* is the set of energized nodes before fault, B is the set of energized nodes that are restored, P_{LDi} and P_{LDj} are the active power of nodes, and N_{as} is the total number of operation switches.

##### 2.2. Constraints

Distribution network restoration can be expressed as a constrained, nondifferentiable multiobjective problem subject to power constraints, topology constraints, the availability of RDGs, the system frequency, and so on. Several constraints associated with the proposed SR problem are described and are categorized as follows.(1)*Power Flow Constraints*. Power flow equations guarantee the matching of Kirchhof’s laws and the Ohm law in the DN. The restored network should be satisfied by the power flow equation to operate stably. The basic power flow equations are usually formulated for each node in terms of powers [24]. where P_{si} and Q_{si} are the active and reactive power injected on node *i*, P_{LDi} and Q_{LDi} are the active and reactive power of load demand at node *i*, *z*_{l} represents the binary nature of branch *l* of the network connecting nodes *i* and *j*, and *b*_{l} are the conductance and susceptance of branch *l*, N is the set of nodes in the network. Due to the introduction of RDG, power flow calculation should handle the RDG nodes on the right approach. According to reference [25], the common handling approach of different types of RDG nodes is to simplify it as a negative load. In this paper, the RDG nodes are regarded as negative charges in power flow calculation if they are operated in synchronism mode with a network. If the RDG integrates into node *i*, the power flow balance equations for the restored distribution network are modified as follows: where P_{RDGi} and Q_{RDGi} are the active and reactive power of RDG at node *i*. The topological structure would change once the network was restructured. Based on the power flow equation constraints, it is necessary to continuously calculate the network power flow using appropriate calculation methods. In this paper, we have adopted the forward-backward sweep method to calculate the network power flow. The detailed process of the method is given in [25]. Constraint (4) denotes the voltage limit of node *i* for the restored network. where *V*_{i} is the voltage amplitude of node *i*, V_{imin}, and V_{imax} are the lower limit and upper limit of node voltage.(2)Radial topology constraint: the constraint is defined to ensure that the restored network or optimized network is connected and operates in a radial topology in view of operational requirements. According to the definition in [26], a radial topology is a graph that connects all the nodes and contains no cycles. For a candidate topology of the distribution network, the relationship of the number of branches and nodes is expressed as follows: Generally, each branch is equipped with a switch. For example, in a DN with 33 nodes, the number of branches is 32. However, to ensure the reliability of system operation, the number of branches in the DN is 37 if all the switches are closed. It is necessary to open five switches to maintain the radial configuration. Therefore, the topology of the DN depends on the number of open switch positions. Due to the labels of the open switches being selected randomly, the possible number of switches combinations is large and most of them violated the radial topology. We assume that there are *n* nodes and *m* branches in a DN. A necessary condition for the radial network is to open (*m* – *n* + 1) switches, but this is not a sufficient one. In this paper, the detailed discrimination of the radial topology is given in Figure 1. Thus, the radial topology constraint is expressed as follows: where and T_{Gr} are the restored network topology and the set of radial topologies for the real-time DN, which are represented by the label of the opened switches.(3)Operational constraints: These constraints are defined that ensure the desired operational attributes for the restored network. If RDGs are operated in synchronism mode with the network, they are regarded as active loads in the radial restored network. Constraint (6) implies that the loads powered by a feeder *f*_{l} should be less than the capacity margin of feeder *f*_{l}. where G_{fl} is the set of nodes by feeder *f*_{l} in the radial restored network *G*, *S*_{i} and S_{RDGi} are apparent load powers and RDG power of node *i* in *G*, S_{flmax} is the upper limit of the apparent power of feeder *f*_{l}. *σ*_{i} is a binary variable representing the access status of RDGs. If the restored network *G* is an island, the total restored loads should be less than the total capacity of RDGs. Moreover, constraint (8) implies that the apparent power flow of branch *l* for the restored network should be less than the capacity margin of branch *l*. where *S*_{l} and S_{lmax} are the apparent and upper limit of apparent power in branch *l*.(4)RDG constraints: These constraints define the set of RDGs operational conditions for the restored network. Constraint (9) characterizes that the output of the RDGs should be in the specified range.where P_{RDGk} and Q_{RDGk} are the active and reactive power of k-RDG, P_{RDGkmin} and Q_{RDGkmin} are the minimum of active and reactive power, P_{RDGkmax} and Q_{RDGkmax} are the maximum of active and reactive power.

Constraint (10) indicates that the loads restored by the islanding strategy should not exceed the limit of the dynamical capacity of the RDGs in the out-of-service area.where *N*_{G} is the set of RDGs in an island.

Constraint (11) indicates that the restored island should maintain the v-f or droop control model of RDGs.where *f*_{k} is the frequency of k-RDG, f_{kmin} and f_{kmax} are the minimum and maximum of frequencies, respectively.

#### 3. Methodology

##### 3.1. Process of Service Restoration

After a fault on some section in a DN, several factors such as availability of power generating units and supply quality are taken into consideration to reduce the gap between the power demand and the supply. A novel decomposition method is proposed to address the SR problem named hierarchical restoration mechanism, which can restore the maximization of the power supply in the outage area. The mechanism combines planning of island partition, network reconfiguration, and network optimization to obtain the appropriate SR plan based on operational constraints. In this regard, the RDG is operated in two ways during the SR procedure. The first way is to join with the network if the RDG is outside the faulted zone. Another way is that the RDG is allowed to continuously support the loads in out-of-service areas. Due to the isolated operation mode being more vulnerable than the way of synchronism mode with a network, the priority SR mechanism is to restore the deenergized loads by closing tie switches. That is, the RDG is operated in synchronizing mode with the network. The isolated mode will be considered only if the deenergized loads cannot be restored by network reconfiguration. The proposed SR mechanism architecture is shown in Figure 2.

The hierarchical SR mechanism for the DN with RDGs is composed of four layers according to the circumstances that may arise. Upon detection of a failure, the first task aims to identify the faulted zone, determine the restoration scheme, and track the postfault network structure. In this layer, we propose a dynamic topology analysis to achieve the goals. If the restoration of deenergized loads lies on RDGs supplies power, the RDGs would be activated to form microgrids. Prior to activating RDGs, the load power that can be restored by RDGs should be carefully calculated using the modified searching algorithm. If the deenergized loads can be transferred by network reconfiguration, the mechanism executes the restoration of the network connectivity via valid tie switches. After then, whether the network optimization is implemented or not depends on the violation of the power flow in the system.

##### 3.2. Dynamic Topology Analysis

A DN is described as a topological graph that contains branches and nodes [27]. The employed analysis methods of topological features in conventional approaches [28–30] can be classified into tree order method and branch order method. Most of these methods have focused on the analysis of the radial DN. However, the DN has a meshed structure usually. In addition to this, the main drawback of the methods is that they need renumbering of the nodes due to a change in configuration of the DN. Hence, these methods are not suitable to analyze the topological structure rapidly if a fault occurs on some section of the network. In order to overcome the drawbacks of the previous approaches, a dynamic topology analysis method has been developed. The main advantage of the method is that it considers the characteristics of the meshed structure and radial operation topology in the DN. Whatever fault in the network topology is identified, the method can be used to track the changes by modifying the parts of structure parameters. The detailed process of dynamic topology analysis is developed as follows.

Let the DN be represented as a connected graph G(V,E) with n ∈ V number of nodes and l ∈ E distribution line branches. The DN usually has a meshed structure. But most of them operate radially to ensure economic savings and reliability. The branches in the DN are equipped with switches. The branch energized/deenergized state is identical to the state of the installed switch. The time to implement a SR plan and dynamic topology analysis depends on the number of switches operations and the time to implement switches actions. However, the installed switches are manually controlled and remotely controlled in the DN. The time needed for the operation of each manually controlled switch is much longer than the remotely controlled switch [3]. To enable prompt service restoration and dynamic topology analysis, we assume that the DN is equipped with enough remotely controlled switches. Based on this concept, the topological structure can be changed by altering the status of normally closed (sectionalizing) and normally open (tie) switches. The connectivity of the topology G(V,E) can be represented as a connected tree *S*_{G}. The set of nodes for a connected tree *S*_{G} is defined as an electrical island *S*_{D}. According to the topological characteristics, the closed loop vectors are constructed when sectionalizing and tie switches are closed. Here, loop matrix L_{op} represents the loop network characteristic of the DN. For the DN with n_{op} tie switches, there are n_{op}×m_{op} row-column assignment variables, where m_{op} is the number of switches in a loop. The row elements represent the labels of the switches that belong to the current loop vector. The first column elements are the labels of the tie switches in a loop vector. To obtain these parameters, we take the following steps:(1)Each DN can represent an abstract topology G(V,E). We select the source node as the first node in the initial DN. The topology includes some basic parameters such as nodes, sectionalizing switches, and tie switches.(2)Initialize connected tree S_{Gk} (*S*_{Gk} _{=} [ ]), electrical island S_{Dk} (*S*_{Dk} _{=} [ ]), topology island number *k* (*k* = 1), root matrix *R* (R _{=} [ ]), and root node ( = 1).(3)Generate the original adjacency matrix *A*=(a_{ij})_{n×n} of G. In matrix A, a variable must take only binary values, and *a*_{ij} = 1 shows that branch l_{ij} is an edge connecting to nodes and .(4)Search the paths between root node and any node (*i*=(2,…,m)). According to matrix A, is said to be marked and saved to S_{Gk} if there is a path joining nodes and . Otherwise, is said to be a root node and saved to *R*.(5)Check the network connectivity. The connectivity of the network depends on the connectivity of the electrical island. For the electrical island S_{Dk}, if S_{Dk} contains all the nodes, go to the next step. Otherwise, go to step (7).(6)Extract the loops. Based on step (4), we obtain the paths between root node and any node . From these paths, we extract the paths from the root node to both ending nodes of a tie switch. Let the first intersection node of the two paths be the starting node. A closed path is formed from the starting node, passing through a set of nodes and returning to the starting node. All the closed paths result in a loop matrix L_{op}.(7)Estimate whether all nodes have been marked or not. If so, then output the new topological parameters. Otherwise, update the root node , set *k* = *k*+1, and return to (4).

With these steps, a set of initial topological parameters of a DN is obtained through closing the sectionalizing switches and opening the tie switches. Following a failure in the topology, once it is isolated, the faulty branch is removed and the corresponding switch is opened. As a special case, the faulty branches include all the branches connecting the nodes if a permanent fault occurs on a node. Due to the corresponding controlled switches being opened to isolate the fault, the downstream loads and the RDGs are disconnected from the network. The proposed mechanism is interested in detecting the out-of-service areas and updating the real-time topological parameters as soon as possible. Considering the switches are divided into loop switches and nonloop switches, the topological parameter changes will consist of the basic alternations below.

The first scenario is that a loop branch occurs as a permanent fault. The switch installed on the loop branch is opened to isolate the faulty branch. This action would not affect the electrical island of the network. From the initial loop matrix, we obtain the loop vectors, including the corresponding switch of the faulty branch. We determine the opened loop vector i_{op} with a minimum number of switches by comparing the length of the loop vectors. It means that the loads in the out-of-service area can be restored by closing the tie switches in i_{op} loop. Thus, the tie switch in i_{op} loop is changed into a sectionalizing switch. After then the new topological parameters (loop matrix, connected island, and electrical island) of the real-time network are searched following the steps previously mentioned.

Another scenario is that a nonloop switch is opened to isolate the faulty branch. Let the ending node of the nonloop branch at the side of fault downstream take itself as a faulty root node, and treat the valid end layer nodes of the initially connected tree as boundaries, and then search from the faulty root node to identify an isolated island. The real-time topological parameters are updated by deleting the isolated nodes and switches.

As discussed formerly, the switch *e*_{x} of the faulty branch is detected by the protection device. The switch attributes of the faulty branch determine the restoration strategy in the out-of-service area. If *e*_{x} is the element of the initial loop matrix L_{op}, the deenergized loads can be restored by transferring the loads from one feeder to another. If *e*_{x} is a nonloop switch, the deenergized loads can be restored by RDGs island partition when the RDGs are accessed into the out-of-service areas. After then we update the real-time topological parameters, including sectionalizing switches set, tie switches set, electrical island S’_{Dk}, loop matrix L’_{op}, and connected tress S’_{Gk.}

##### 3.3. Match Islanding Schemes

In case of a fault, IEEE Standard 1547 suggests the implementation of intentional islands powered by RDGs to assist service restoration [31]. Several islanding techniques have been investigated to determine the intentional island ranges to be restored in the DN, such as depth traversal search method [22], branch-and-bound method [14], weighted graph method [32], decentralized multiagent system technique [12], and so on. These islanding schemes have focused on the radial network without the tie branches in the DN. Based on [33], the author proposes an islanding partition scheme that considers the effect of tie branches in detecting fault zone and formating the islanding scheme.

All of the out-of-service load is not guaranteed to be restored using alternative paths via closing the tie switch. If the fault is isolated by opening the nonloop switch, the deenergized loads could be potentially energized by local RDGs independently. This is based on the assumption that RDGs are operated in islanded mode and capable of providing local power support without depending on an external power source from the grid. The islanding scheme is the basis of forming stable reenergizing isolated deenergized loads. For purposes of this development, the RDGs in the out-of-service areas are found and activated by traversing the access nodes of RDGs. The loads in the isolated island would be picked up in their optimal sequence according to the island partition behavior. In this behavior, we present the optimal islanding partition scheme for a minimum number of switching operations and maximum availability of RDGs.(1)Determination of the number *N*_{G} of RDGs and node set *V*_{G} in the out-of-service areas. The RDGs in each out-of-service area will supply power to the deenergized loads.(2)Set root node and generate adjacency matrix of out-of-service area. For each out-of-service area, the access point of RDG_{l} is regarded as the root node . We derive the adjacency weighted matrix A of out-of-service area. The weight value is equal to a load of each node.(3)Initialize the vectors *S*_{T} and *E*_{T}. Here, *S*_{T} and *E*_{T} are used to store the nodes and switches of the isolated island. The root node is stored in *S*_{T}.(4)Search node connecting with node . According to matrix A, if the node has a minimum weight, it is selected as the recoverable load with the active power P_{LDj}. The total active power of the restored loads is calculated by the following: Moreover, suppose that the node vj is connected with RDGx, the total active power of the RDGs is given by the following:(5)Check the load violation in the isolated island. For the node , a variable *z*_{j} is defined as follows: If *z*_{j} = 0, the root node is updated = , the value of and is stored in the tables. And node and corresponding switches *e*_{j} are stored in *S*_{T} and *E*_{T}. After that, return to Step (4). If *z*_{j} = 1 , stop the search process, and the restored load power is calculated by the following:(6)Traverse all RDGs. If all of RDGs are reversed, output the optimal islanding scheme. Otherwise, return to step (2).

The RDG provides additional help and strategies to restore the power to the areas affected by the faults. To implement the islanding strategies, the utilities need to well use the RDG from frequency and phase angles. Several control strategies such as the v-f or droop control model have been developed to avoid unwanted situations like unnecessary energizing [18]. Hence, the isolated islands can be stable with reasonable control strategies.

##### 3.4. Restore the Network Connectivity with RDGs

Utilities have flexible strategies to restore the loads in out-of-service areas. The deenergized loads would be restored by islanding schemes or network reconfiguration. If the deenergized loads can be transferred to backup feeders by closing tie switches, the mechanism should decide the closed tie switches. According to the procedure of the dynamic topology analysis, the tie switch in i_{op} loop is identified to restore the network connectivity. The closed tie switch is converted to a sectionalizing switch and updated with new topological parameters. The RDGs maintain its interconnection to the DN after fault clearance. Moreover, the RDGs are regarded as negative loads to participate in system operation. We should check the violation of network operation constraints during power flow calculation.

##### 3.5. Network Optimization

Network optimization represents one of the most important measures which can improve the performance in the operation of a DN. In conventional works, many objectives were considered independently or together, such as the power loss minimization [34], the minimization of the voltage nodes deviation [35], and the load balancing [36]. In the process of service restoration, the node voltage would fluctuate greatly and even exceed the operational constraints because of fault isolation and load transfer. Hence, network optimization should be executed to improve the performance of the system when the operational constraints are violated. The optimization subobjective is to maximize the node voltage amplitude which is presented as follows:

The topology of the DN is dynamically changing due to load demands. Engineering studies need to be adopted network optimization to solve these changes. Network optimization is the topological structure of feeders by swapping the open or closed status of switches with satisfying the optimization objectives while maintaining radially of DN. In order to deal with the optimization problem, numeric intelligent methods have been studied. Among these methods are harmony search algorithm [22], evolutionary programming [37], genetic algorithm [38], and particle swarm optimization (PSO) [39]. The topology encoding scheme plays a vital role in applying these methods. A complex scheme could increase considerably the convergence time, but a simple scheme does not allow an effective exploration of the search space. The key problem with these methods is that they could fail to find an existing feasible solution in a reasonable time. Hence, an ideal encoding scheme should consider the characteristics of nonredundancy, validity, and completeness. To meet these goals, we present an interesting encoding scheme to obtain feasible candidate solutions. The pseudocode for generating the candidate solutions is shown in Figure 2.

The proposed encoding scheme is used to generate candidate solutions for the intelligence algorithm. In this paper, PSO search for the optimal solutions of an objective optimization problem by manipulating sets of candidate solutions. Based on the PSO theory, the proposed encoding scheme is employed to generate the initial feasible particle population. The mutation process is used to randomly change each branch of the initial particles. Moreover, the new particles feasibility is implicitly guaranteed. The computational efficiency of the PSO will be improved because the population particles avoid infeasible solutions without tedious mesh checks.

#### 4. Simulation Results and Discussion

This section presents the application of the proposed restoration mechanism for the SR problem. It was applied for two test networks named IEEE 33-bus system and 69-bus system. We analyze different types of fault occurrences. For both systems, the base power and the maximum branch capacity are assumed to be 1 MW and 5000kVA, respectively. The upper and lower limits of voltage magnitude are set, respectively, to 0.90 and 1.05p.u. We consider the RDGs such as photovoltaic and wind generations, which are modeled as active power injection units and reactive power components. To implement the algorithm, an analytical software tool has been developed in the MATLAB R2021 environment to run load flow and identify an appropriate SR plan.

##### 4.1. IEEE 33-Bus System

The graph topology of the 33-bus system is shown in Figure 3. The detailed configuration system data are taken from [38]. It includes 32 sectionalizing switches, 5 tie switches, and 33 nodes. According to the dynamic topology analysis, the initially connected tree is *S*_{G} = [e1-e32] and the loop matrix L_{op} is described as equation (17). Four RDGs on nodes 6, 10, 27, and 33 have 60 kW, 100 kW, 200 kW, and 200 kW active power, respectively.

Several fault contingency cases are conducted to evaluate the effectiveness of the proposed restoration mechanism in the two test DNs. Once an electrical fault occurs, the protection devices should cut off the fault immediately. The utilities obtain a reasonable SR plan by automatically performing the steps of the hierarchical restoration mechanism. For the test systems, we consider multitypes of faults: single branch fault, double-branch fault, node fault, simultaneous fault, and asynchronous fault. Through these scenarios, the restored loads are used to evaluate the quality of the restoration solution. In the 33-bus system, the simulation results for each case are shown in Table 1.

###### 4.1.1. Case I: e26 Fault

This case is defined where a permanent single branch fault occurs on the line connecting nodes 26 and 27 in the test network, as shown in Figure 3. The faulty branch will be isolated, opening the sectionalizing switch (OS) e26 to the fault place. The load at nodes 27–33 lost power and formed the faulted zone. The total active power of deenergized loads (D_{Load}) is 860 kW. We assume that a remotely controlled switch is available to maintain the radial topology for the restored networks. Due to the opened switch being a loop switch, the out-of-service loads can transfer to neighboring feeders by closing the tie switch. The restoration solutions obtained from the proposed mechanism are reported in Table 1. The active power of restored loads is described as R_{Load} which is equal to deenergized loads.

For the purpose of comparison, the methods in [19, 40] are applied to solve the SR problem. To illustrate the performance of the proposed mechanism, all the methods were repeatedly solved 50 times. The best solution and the average number of iterations and average computational time of these 50 times are listed in Table 2. The final opened switches (FS) are used to describe the obtained SR plan. The switch operation times (N_{as}), the average number of iterations (I_{ter}), and average computational time (*A*_{T}) are used to measure the convergence speed and complexity of the methods.

From Table 2, we obtain the switch operation sequence of SR plan. After detecting the faulty switch e26, the method in [19] obtains the optimal configuration of the DN without RDGs, firstly which is represented as opened switch combination [e7, e14, e9, e32, e37]. And then, the RDGs operate synchronized to the optimal configuration. Finally, The SR plan is obtained by closing the tie switches (CS) e37. In [40], the method determines the optimal configuration [e33, e14, e10, e31, e25] of the DN with RDGs. Under the configuration, the switch e26 is opened and the deenergized loads are restored by closing the switch e25. In our mechanism, the steps of dynamic topology analysis and restoring connectivity are executed to deploy an appropriate solution on the DN. The loads in the out-of-service area are resupplied through closing tie switch e37. Figure 4(a) depicts the voltage profile of the reconfigured system. The restored system is operated in normal condition because the minimum value of node voltage (*V*_{min}) is 0.9384p.u at node 31. Although *V*_{min} in [19, 40] are at the forefront of the list, the proposed mechanism outperforms them in terms of the parameters of N_{as}, I_{ter}, and *A*_{T}. Our mechanism reaches the appropriate SR plan 2 times, instead of the methods presented in [19, 40], which demand 10 times. The obtained SR plan of methods in [19, 40] requires 67 and 75 iterations on average, whereas our mechanism does not perform the iteration process. Thus, the average computational time *A*_{T} taken by the processor is only 0.0137s, which is less than the other methods with 5.6317s and 6.9253s.

**(a)**

**(b)**

###### 4.1.2. Case II: e16 and e22 Fault

In this case, the restoration problem is solved for the test DN shown in Figure 3, where two branches’fault occurs simultaneously on lines 16–17 and 22–23. The fault branches are identified and isolated by opening switches e16 and e22, respectively. Dynamic topology analysis is used to detect the out-of-service area, which includes nodes 17, 18, 23, 24, and 25. As reported in Table 1, the active power of the deenergized loads is 1080 kW. Because the faulty branches belong to the loop matrix, the deenergized loads can be restored by closing the tie switches e36 and e37. Then the RDGs connecting to four nodes are synchronized to the network. The power of the RDGs is injected into the system. After the network completely restores connectivity, the system power flow is calculated and analyzed. The minimum value of nodal voltage is 0.8922p.u which is less than 0.90p.u. The proposed mechanism executes the final stage to optimize the service restoration path. It should be noted that the final SR plan is closed tie switch set [e33, e34, e35, e36, e37] and opened switch set [e6, e14, e10, e16, e22]. Along with the result, Figure 4(b) provides the voltage profile of the final SR plan. Most of the nodes have improved in view of voltage profile except nodes 19, 20, and 21. This is because the power flow distribution has changed by altering the topological structure. It creates long lateral branches that contain fifteen nodes. The long lateral branches lead to a voltage drop of nodes 19, 20, and 21. Although the voltage profile of these nodes is reduced, they would not be lower than 0.90p.u under the operational constraints. As illustrated in Figure 4(b), the minimum value of voltage is improved 0.9087p.u, which is higher than that reported by references [19, 40] but with a less computational burden. The best convergence rate for the 50 runs of the proposed mechanism compared with that of the methods in [19, 40] is depicted in Figure 5. It can be seen that the proposed mechanism has a relatively fast convergence performance compared to other methods. Simulations are carried out for 150 iterations and the SR plan is obtained after 9 iterations, whereas other methods require 44 and 55 iterations.

We have recorded the elapsed time, which contains three parts: topology update time, restoring connectivity time, and optimization time. The SR plan of the case using the proposed mechanism is 0.9727s, whereas the conventional methods are 6.9953s and 7.7249s, respectively. Owing to the new encoding scheme that can avoid infeasible solutions during network optimization, the performance of the proposed mechanism is better than that of the other methods in terms of average time.

###### 4.1.3. Case III: Node 9 Fault

The restoration problem is studied in the case of a permanent fault at node 9 in the test network of Figure 3. Switches e8, e9, and e34 are disconnected because faulty node 9 is isolated. The out-of-service area includes nodes 9 to 18, for which the active power is 675 kW. Most of the loads in the out-of-service area are resupplied through closing tie switch e35. Because of the node fault, node 9 is not supplied in the restoration process. The RDGs are tapped to the distribution network one by one. The synchronization process is controlled by a central controller. After all RDGs are online, the restored total active power is 615 kW, which is 91.11% of the whole out-of-service loads. In this case, both our mechanism and method in [40] achieve the SR plan. Finally, our mechanism indicates the necessity of closing switch e35 and opening switches e8 and e9, which causes the switches operation of 3 times with an average simulation time of 0.0716s. In [40], The switches operation and average simulation time are 13 times and 7.2707s, respectively. Moreover, the minimum voltage magnitude of our mechanism is 0.9299p.u, which is higher 5.77% in [40].

##### 4.2. 69-Bus System

The IEEE69-bus system is tested using different faults to further show the superiority of the hierarchical restoration mechanism in the SR problem. The topology graph of the test system is shown in Figure 5, which consists of 69 nodes, 68 normally closed sectionalizing switches, and 5 normally open tie switches. Each branch is equipped with a remotely controlled switch that can be performed automatically during the SR process. There are tie switches between nodes 11 and 66, nodes 13 and 20, nodes 15 and 69, nodes 27 and 54, nodes 39 and 48, which results in loop configurations. Based on the detailed nodal and branch data in [41], the original loop matrix L_{op} is defined in (18). The network is updated by adding eight RDGs at nodes 15, 25, 32, 41, 48, 56, 61, and 65. Table 3 describes the active power of RDGs and the factors are chosen as 0.9. The proposed restoration mechanism is applied to the test system shown in Figure 6 based on a set of fault simulation scenarios.

###### 4.2.1. Case I: e1 Fault

e1 Fault is the worst permanent single fault in lines 1–2, which interrupts the service in the whole largest feeder of the DN. The faulted zone will be isolated by opening the e1 switch. The procedure of the proposed mechanism in solving the SR problem for the case is depicted in Table 4,. It needs to initiate the first and second stages to restore the out-of-service areas. The islanding schemes obtained using the proposed method are plotted in Figure 7(a). In this case, the switch set [e1 e10 e12 e20 e21 e26 e36 e49 e54] is opened to form four isolated islands (N_{IS}) I1, I2, I3, and I4. The reported excess power for RDGs is only 62.3 kW, therefore, validating the applicability of the matching isolated strategy for the SR problem. The maximum active power of restored loads by all RDGs is equal to 917.7 kW. Furthermore, the proposed mechanism is thoroughly compared with a minimum spanning tree method [41]. The simulation results are shown in Figure 7(b). Since the method in [41] is focused on minimizing the restoration unavailability only, the sharing of energy among RDGs is ignored. As shown in Figure 7(b), although the method in [41] obtains five isolated islands, the restored total active power is only 663.8 kW. In the proposed mechanism, there is an improvement in terms of RDGs utilization, the percentage of RDGs utilization (RDG(%)) from 67.73% to 93.64% in comparison with the method in [41]. The main reason is that the sharing and condition among the RDGs are a key part of our mechanism. In addition, the islanding partition scheme in our mechanism considers the influences of the weighted adjacency matrix and tie switches. These can help in better utilization of the RDG capacities by restoring a large number of nodes. For example, the formation of island I3 allows restoration of the extra nodes, nodes 68 and 69, utilizing the spare power of RDG7 and RDG8. Based on the final SR plan, the decision-maker needs to perform the indicated number of switching actions to restore the service to the affected loads. According to the comparison results, the switching actions decrease from 13 to 9 to minimize the cost of RDG system usage. The effects of RDG availability on restoration load restoration time are studied. The computation time *A*_{T} is when the out-of-service area is determined to when the island is formed. As calculated from Table 4, *A*_{T} required for the proposed method is 0.0405s, which is less than 0.0637s.

**(a)**

**(b)**

###### 4.2.2. Case II: e29 and e37 Simultaneous Fault

In this case, the proposed restoration mechanism is tested under simultaneous fault considering damage in the DN due to a disaster event. Suppose that lines 29–30 and 37–38 occur in simultaneous fault. The node set [3, 12, 14, 30–32, 35, 36] loses power due to the switches e29 and e37 being opened to isolate the fault. The switches operation sequence for the appropriate SR plan is shown in Table 5, which needs to execute all the parts. Nodes 30 to 35 are formed an isolated island in which the RDG at node 32 is the only source of power available during the restoration process. The RDG has total active power in the island of 39.5 kW and the excess power of RDG is 0.5 kW. Nodes 38 and 39 can be restored and connected to the main grid by closing tie switch e73. Other RDGs are informed to be reconnected to the DN based on the synchronization condition. Because of the power flow constraints, network optimization should be carried out to improve the power supply quality, such as node voltage and power loss. The final SR configuration identified by incident open switches is as follows: e9, e14, and e50. The minimum voltage magnitude for the final configuration has increased from 0.8894p.u to 0.9086p.u.

Similar to the IEEE33 test system, the methods in [19, 40] are applied to solve the SR problem for the purpose of comparison. From Table 6, it is observed that both methods and the mechanism presented result in the same restored load power. As a result of this simultaneous fault, the final plan in [19, 40] proposes the closure of switches e69, e71, e72, and e73 and opening switches e29, e37, e4, e70, e14, and e50. This configuration has a minimum voltage of 0.8387p.u and switches operation number of 11 times. Using our mechanism of restoration, final switches e29, e37, e9, e70, e14, and e50 are to be opened. The minimum voltage is increased from 0.8387p.u to around 0.9086p.u. It can be seen that the number of switches is reduced by 11 times to 9 times. Furthermore, the number of power flow analyses required for the proposed mechanism is less than the methods in [19, 40]. Figure 8 illustrates how our mechanism has the ability to obtain the final SR plan in iteration 9. In addition, both other methods could approximately reach to plan around iteration 80.

Evaluating the running time, Figure 9 shows the time curve caused of all the methods with running 50 times restoration actions. Note that our mechanism remains at the forefront. The *A*_{T} for the proposed mechanism to obtain the final SR plan is 3.8334s, whereas the methods in [19, 40] demand 10.1998s and 11.3568s, respectively. The reason is that the simulation time of the proposed mechanism is reduced by using the new encoding scheme while avoiding infeasible solutions during the network optimization.

###### 4.2.3. Case III e6 and e29 Asynchronous Fault

The proposed restoration mechanism is tested for the case in which the DN sustains asynchronous fault. At first, an initial failure on the branch connecting nodes 6 and 7 would propagate through the network and the resulting deenergized area includes node set [7–27, 40–58]. After then another fault event on the branch connecting nodes 29 and 30 was detected. The mechanism should reexecute the stage of dynamic topology analysis to identify the out-of-service area that extends to include nodes 29 to 35. In order to restore the power of the out-of-service area, all the stages of the proposed mechanism must be implemented following the indicated order given in Table 5. The loads at node set [7–27, 40–58] are transferred to neighboring feeders, and the loads at nodes 30–35 form an isolated island. Thus, the original network is divided into two subelectrical islands which are the main grid island and isolated island. In the main grid, the option is available for the operator by closing tie switch e73 to restore the network connectivity with RDGs. The power flow constraints of the main grid are violated because the minimum voltage magnitude of 0.8894p.u is less than 0.9p.u. Network optimization should be implemented to optimize the service restoration path. From Table 6, the final SR configuration is obtained by opening switches e70, e14, e50, and e45 and closing tie switches e69, e71, e72, and e73. The final configuration has a minimum voltage magnitude of 0.9536p.u, which is greater than 0.8894p.u. In the isolated island, the integration of RDG of node 32 is modeled as a synchronous generation which is used to restore the loads at nodes 29 to 35. Based on the availability of RDGs, the restored total deenergized active power is 39.5 kW and the excess power of RDGs is 0.5 kW. However, the type of fault is not covered by the conventional methods in references [19, 40].

#### 5. Conclusions

Service restoration plays a major role in fulfilling the self-healing capability of the envisioned smart grid. This results in a huge and intractable problem, especially considering realistically sized grids and multitype faults. A hierarchical restoration mechanism is presented to solve the SR problem for DN under different types of fault. The restoration mechanism includes four layers, namely, dynamic topology analysis, island partition strategies of RDGs, restoring the network connectivity via network reconfiguration, and network optimization. In the first layer, the master problem solves the dynamic topology problem, including detecting the out-of-service areas and determining the service restoration scheme. In the second layer, an optimal islanding strategy is provided for the distribution operator according to switch operation and RDG utilization constraints. After then the connectivity of the main grid can be restored by reconnecting the RDGs and closing the tie switches. Finally, an admissible switch sequence for the restored main grid is determined while the power flow constraints are violated. During network optimization, a new encoding scheme is proposed to relax the computational burden by eliminating infeasible solutions.

The superiority of the proposed mechanism with respect to the integrated approach is illustrated with different fault scenarios on two DNs. The results indicate the functionality of the proposed mechanism in providing, within a short time, an appropriate SR plan for different types of fault restoration problems in the DN. Moreover, the restored topology is able to take both network connectivity and RDG availability into account in coming up with a restoration plan.

In the paper, it is assumed that the DN is equipped with enough remotely controlled switches to improve the performance of restoration in terms of restoration time and magnitude to restored loads. However, the cost of installing remotely controlled switches will increase, which leads to an increase in the investment budget due to the vast extent of DN. Thus, during the service restoration, the investment cost of the remotely controlled switches should be discussed in the future. Considering the uncertainties of load and RDG, another interesting direction for future research is focused on dealing with the influence of uncertainties. In this sense, future work will expand the proposed mechanism considering the uncertainties of load demands and RDG power to minimize outage times and restoration costs.

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this article.

#### Authors’ Contributions

Juan Wen was responsible for methodology and prepared the original draft; Xing Qu, Siyu Lin, and Juan Wen were responsible for software and validating the data. Siyu Lin and Lin Jiang have reviewed the manuscript. All authors have read and agreed to the published version of the manuscript.

#### Acknowledgments

This work was supported by National Natural Science Foundation of China, no. 62003157; Technology Planning Project of Hunan Province, no. 2020JJ5498; Research Foundation of Education Bureau of Hunan Province, no. 21B0434; and Research Fund for the Doctoral Program of University of South China, no. 190XQD128. Also, the authors thank the ACPEE Conference where the main idea of this paper was presented.