Three-Phase Symmetric Distribution Network Fast Dynamic Reconﬁguration Based on Timing-Constrained Hierarchical Clustering Algorithm

: This paper develops a novel dynamic three-phase symmetric distribution network reconﬁguration (DNR) approach based on hierarchical clustering with timing constraints, which can divide the time period according to the time-varying symmetric load demand and symmetric distributed generations (DGs) output condition for a given time interval. The signiﬁcance of the proposed technique is that by approximating the cluster center as the load status and DGs output status of the corresponding period, in this way, the intractable dynamic reconﬁguration problem can be recast as multiple single-stage static three-phase symmetric DNR problems, which can effectively reduce the complexity of the three-phase symmetric dynamic reconﬁguration. Furthermore, an improved ﬁreworks algorithm considering heuristic rules (H-IFWA) is proposed and investigated to efﬁciently manage each single-stage static three-phase symmetric DNR problem. In order to avoid trapping into a local optimum or to facilitate the computational performance, the power moment method and the coding method based on heuristic rules are employed to reduce the solution space. The effectiveness of the proposed H-IFWA is validated on the IEEE 33, 119-bus system and a practical-scale Taiwan power company (TPC) 84-bus test system with DGs.


Introduction
Distribution network reconfiguration (DNR) is the process of changing the topology of a network by switching the status of the tie switch and the section switch for the purpose of reducing the network loss, balancing load and improving voltage quality, and it is of great significance to improve the safe and economic operation of distribution networks (DNs) [1][2][3]. DNR is usually divided into two types [4]: DNR in the normal operation status and DNR after an accident [5]. DNR in the normal operation status further consists of two types: static reconfiguration [6,7] and dynamic reconfiguration [8][9][10]. The former optimizes the section switches and tie switches of the distribution network based on the premise that the load does not change [11]. The latter performs the overall dynamic optimization of the distribution network during the operation periods [12], which needs to consider the time-varying load demand and the constraints of the distribution network operation for a given time interval [13]. Considering the time-varying system condition in the real distribution system, this paper focuses on dynamic DNR in the normal operation status. Furthermore, symmetry in DNR means that the power source and load are the threephase circuit, and both of them are symmetrical in the reconfigured distribution network.
Renewable energy sources have been actively applied to distribution networks and microgrids for better energy management, including residential buildings [14], logistics 2 of 19 facilities [15], and network reconfiguration [16]. Nevertheless, the deepening penetration of renewable distributed generations (DGs), such as wind and solar resources, has significantly changed the characteristics of distribution networks. The traditional one-way power flow three-phase symmetric distribution network analysis method cannot be applied to the current two-way power flow three-phase asymmetric active distribution network with multiple distributed renewable sources, which makes the DNR problem face more complex challenges on the power flow calculation [17], fault recovery [5,18], and optimal reconfiguration [19][20][21] of distribution networks. Therefore, dynamic DNR considering the massive integration of DGs is of great significance to develop the operation level of the distribution network and the utilization efficiency of DGs. Dynamic DNR takes into account such factors as power loss, switching times, and comprehensive cost within a certain period, which can effectively adjust the topology of the distribution network in real time with the time-varying load demand and DGs output condition. Therefore, the research on dynamic DNR has become the current research hotspot.
In recent years, many studies have addressed the ever-increasing concern for solving the dynamic DNR problem. In [22], a mixed-integer nonlinear programming method was presented to solve the problem of dynamic reconfiguration and optimal allocation of capacitors, but the time period division method was not involved. As an extension of the fascinating DNR method, [23] considered the time-varying intermittence of DGs, but the restrictions of switching operation times were not taken into account. In [24], a gradual approaching method was developed for dynamic DNR to minimize the energy loss. In [25], an evolutionary method to determine optimal time intervals was proposed, and the genetic algorithm was applied to perform optimal dynamic DNR. These methods have considered both the time-varying load demand and DGs power output condition in a given time interval. In [26], a real-time dynamic reconfiguration method using load power analysis and the analytic hierarchy process (AHP) to generate multi-criteria decision-making was proposed; however, the limitation of switching operation times was not considered. In [27], the optimal solution in each period, respectively, was determined, and then rules were formulated to obtain a globally optimal solution, but the solution process was complicated and it was difficult to guarantee the speed of optimization. In [28], an optimal fuzzy Cmeans clustering was employed to divide time periods, but the rationality of the partition results may be insufficient, which may restrict the accuracy of the solution and produce large errors.
To handle the aforementioned challenges, in this paper, considering the output condition of DGs and load status, a time-division method based on an improved hierarchical clustering with timing constraints (IHCTC) algorithm is firstly proposed. According to the load status and DGs output of each period, the time is divided by adding the timing constraints to the Euclidean distance between data points in hierarchical clustering. In this way, the dynamic DNR problem is recast as a multiple single-stage static DNR problems, and it satisfies the switching number constraints. Then, an improved fireworks algorithm considering heuristic rules (H-IFWA) is developed to handle single-stage static DNR for the clustering center. Finally, case studies are carried out on the modified IEEE 33, IEEE 119 and a practical scale TPC 84-bus test systems to validate the effectiveness of the proposed method. The main contributions are summarized as follows: (1) A novel time-division method based on hierarchical clustering with timing constraints, which can ensure the rationality of the time-division method, is firstly proposed to solve the statics of the dynamic reconfiguration problem. (2) An improved fireworks algorithm considering heuristic rules (H-IFWA), for the first time, is presented, which can both improve the solving speed of DNR and avoid falling into a local optimum or producing many infeasible solutions.
The remainder of the paper is organized as follows. An improved hierarchical clustering with timing constraints method is described in Section 2. Then, a three-phase symmetric dynamic reconfiguration model with the objective of minimizing the total active power loss is formulated in Section 3. Section 4 introduces the H-IFWA method. Several case studies are conducted in Section 5 to demonstrate the superior performance of the proposed H-IHCTC and IFWA algorithms, and the conclusions are drawn in Section 6.

Hierarchical Clustering with Timing Constraints
Hierarchical clustering (HC) creates a hierarchical nested clustering tree in light of the similarity calculation between different categories of data points. The basic steps are as follows. The basic steps are described in our previous work [29].
Step 1: Regard each data point as a class, and calculate the minimum distance between any two classes.
Step 2: Seek the smallest distance between the two classes, and then combine them into a new class.
Step 3: Repeat Step 1 to obtain the distance between the new class and all remaining classes.
Step 4: Repeat Step 2 and Step 3, terminate the calculation, and output the result when all the classes are merged into a single class.
Here, we use Euclidean distance to calculate the similarity of data points [29]. The load of the distribution system at different times affects the quality of operation indexes such as network loss to a great extent, which is also an important basis for DNR operation. Therefore, we take the load data of each natural period of the day (one hour) as sample points for hierarchical clustering. The daily load data of the three-phase symmetric distribution network in a certain area are clustered, and the results are shown in Figure  1a. If the number of clusters is 3, the corresponding three categories are {1-6, 18-24}, {7-8, 17}, and {9-16}, respectively. Obviously, except for the last category, which is continuous in time, the other two are not continuous, so it is difficult to apply it to the time-division problem of dynamic reconfiguration. The remainder of the paper is organized as follows. An improved hierarchical clustering with timing constraints method is described in Section II. Then, a three-phase symmetric dynamic reconfiguration model with the objective of minimizing the total active power loss is formulated in Section III. Section IV introduces the H-IFWA method. Several case studies are conducted in Section V to demonstrate the superior performance of the proposed H-IHCTC and IFWA algorithms, and the conclusions are drawn in Section VI.

Hierarchical Clustering with Timing Constraints
Hierarchical clustering (HC) creates a hierarchical nested clustering tree in light of the similarity calculation between different categories of data points. The basic steps are as follows. The basic steps are described in our previous work [29].
Step 1: Regard each data point as a class, and calculate the minimum distance between any two classes.
Step 2: Seek the smallest distance between the two classes, and then combine them into a new class.
Step 3: Repeat Step 1 to obtain the distance between the new class and all remaining classes.
Step 4: Repeat Step 2 and Step 3, terminate the calculation, and output the result when all the classes are merged into a single class.
Here, we use Euclidean distance to calculate the similarity of data points [29]. The load of the distribution system at different times affects the quality of operation indexes such as network loss to a great extent, which is also an important basis for DNR operation. Therefore, we take the load data of each natural period of the day (one hour) as sample points for hierarchical clustering. The daily load data of the three-phase symmetric distribution network in a certain area are clustered, and the results are shown in Figure 1a. If the number of clusters is 3, the corresponding three categories are {1-6, 18-24}, {7-8, 17}, and {9-16}, respectively. Obviously, except for the last category, which is continuous in time, the other two are not continuous, so it is difficult to apply it to the time-division problem of dynamic reconfiguration. To keep each category continuous in time, we redefine the Euclidean distance di,j between data points as: where n represents data points' dimension and D denotes all data points' set.
The abovementioned definition means that only two adjacent data points can be grouped into one cluster, so that the time sequence constraints of time-division can be To keep each category continuous in time, we redefine the Euclidean distance d i,j between data points as: where n represents data points' dimension and D denotes all data points' set.
The abovementioned definition means that only two adjacent data points can be grouped into one cluster, so that the time sequence constraints of time-division can be considered. According to the definition, HCTC is implemented for the same daily load data, and the result is shown in Figure 1b  However, when the clustering number takes other values, undesired results may be obtained through HCTC. For example, when the number of clusters is 5, the clustering results are {1-6}, {7-8}, {9-16}, {17}, and {18-24}. When DNR is performed according to the clustering result, there will be two reconfiguration operations between 16 h and 18 h, which is obviously unreasonable and will lead to frequent switch actions.
To solve the above problems, an IHCTC method is proposed. The basic idea is to view the clustering process as an optimization problem, and its objective function is: where F depicts the inner-distance of class, T max and T min are the maximum and minimum number of periods, T d means divided periods' number, H t represents hours' number in period t, H min describes the shortest duration allowed for each period, and d t h,avi represents the proposed Euclidean distance from the h-th hour during period t to the clustering center, which can be expressed as: where X t denotes the clustering center of the t-th period.
Considering that the abovementioned optimization problem is a single variable discrete optimization problem in a finite interval, the enumeration method is adopted to solve it. As illustrated in Table 1, based on the IHCTC method, the same daily load data are analyzed. It can be seen from Table 1 that, as T d increases, the inner-distance F decreases gradually, and there are no isolated data points. When DNR is performed according to the clustering result, there will be no problem of frequent switch action.

Three-Phase Symmetric Dynamic DNR Model
The DNR optimization goal is the minimum total network losses in the optimization period, which can be expressed as: where N L represents the branches' set, r l represents branch resistance, V l,t represents the voltage amplitude of the terminal node of branch l at period t, and P l,t and Q l,t are the active power and reactive power at the end of branch l at period t, respectively. To ensure that the solution of the DNR problem is feasible, the following constraints need to be considered.
(1) Power balance constraint where S i,t and S i,t are the complex power of the start node and the end node of branch i in period t, respectively, S L,i,t is the load power of the end node of branch i in period t, S G,i,t is the injection power of the DG connected to the end node of branch i in period t, S i,j,t is the complex power of the j-th out-branch of the end node of branch i in period t, and ∆S i,t is the complex power consumed by branch i.
(2) Node voltage constraints The voltage of node i in any period t should meet: where N B represents nodes' number in the distribution network, and V min /V max are the allowable minimum/maximum values of node voltage, respectively.
(3) Branch capacity constraint Limited by the maximum allowable carrying capacity, the power S i,t of branch i in any period t should meet: where S max i represents the rated capacity of branch i. (4) Network topology constraints The reconstructed network should meet [8]: where α k is the 0-1 variable that reflects the status of branch k; α k = 1 indicates that the branch is connected. Otherwise, the branch is opened. β represents the node child-parent correlation matrix, in which the elements are all binary variables; if β(i, j) = 1, it means that the node i is the parent node of node j. Ω(i) represents a collection of all nodes connected to node i.

Solution Space
Due to the fact that the proposed three-phase symmetric dynamic DNR model is a nonlinear integer programming problem, a heuristic method is employed to solve it to improve the solution efficiency. Motivated by this, we first describe the solution space of the model. Considering the characteristics of the open-loop DN operation, one switch in each loop must be in the open status (tie switch), and the other switches are in the closed status (section switch). When the status of the tie switch and a section switch is reversed, a new radial topology is obtained. Therefore, we use the loop as the unit and use a matrix to describe the topology of the DN. Take the 16-bus system [30] shown in Figure 2 as an example.
Selecting one branch from each row of Sp0, and taking the corresponding switches as the tie switches and the other switches as the section switches, then a three-phase symmetric distribution network topology can be obtained, so the matrix Sp0 can be regarded as the solution space of DNR.
Because there are repeated elements between the rows of the basic loop matrix Sp0, the random selection of branches may lead to invalid solutions. For example, when selecting {5, 5, 1}, that is, branch B5 and branch B1 are opened and other branches are closed, the corresponding network topology is a loop network, which does not meet the constraints (10)~ (14), so the solution is invalid. Hence, we use the power moment method [31] to filter the repeated elements of each row in the matrix Sp0 so as to obtain the compressed solution space p S  .
In addition, some studies [32] have shown that for a certain loop of the three-phase symmetric distribution network, opening the branch connected to the lowest voltage point and closing the original tie switch can most effectively reduce the active power loss of the loop. To further compress the solution space without losing the optimal solution as much as possible, a heuristic rule is proposed, which selects the z nodes with the lowest voltage in each loop, and then the branch set of the loop network is replaced by the branches connected to these nodes in the loop matrix, thereby effectively compressing the solution space.
Taking the system shown in Figure 2 as an example, we close the switches B14, B15, and B16 and perform power flow calculation. The voltage of each node can be calculated and sorted from low to high as: 12 9 11 5 7 8 6 16 10 15 14 4 13 3 2 1   (17) Then, we set z = 2; in other words, we select the two lowest voltage nodes in each loop and find their adjacent branches, as illustrated in Table 2.
Selecting one branch from each row of S p0 , and taking the corresponding switches as the tie switches and the other switches as the section switches, then a three-phase symmetric distribution network topology can be obtained, so the matrix S p0 can be regarded as the solution space of DNR.
Because there are repeated elements between the rows of the basic loop matrix S p0 , the random selection of branches may lead to invalid solutions. For example, when selecting {5, 5, 1}, that is, branch B5 and branch B1 are opened and other branches are closed, the corresponding network topology is a loop network, which does not meet the constraints (10)~ (14), so the solution is invalid. Hence, we use the power moment method [31] to filter the repeated elements of each row in the matrix S p0 so as to obtain the compressed solution space S p .
In addition, some studies [32] have shown that for a certain loop of the three-phase symmetric distribution network, opening the branch connected to the lowest voltage point and closing the original tie switch can most effectively reduce the active power loss of the loop. To further compress the solution space without losing the optimal solution as much as possible, a heuristic rule is proposed, which selects the z nodes with the lowest voltage in each loop, and then the branch set of the loop network is replaced by the branches connected to these nodes in the loop matrix, thereby effectively compressing the solution space.
Taking the system shown in Figure 2 as an example, we close the switches B14, B15, and B16 and perform power flow calculation. The voltage of each node can be calculated and sorted from low to high as: Then, we set z = 2; in other words, we select the two lowest voltage nodes in each loop and find their adjacent branches, as illustrated in Table 2. It can be seen from Table 2 that the branches that are not in the corresponding loop are removed. For example, in the branch set {B6, B8, B9}, B9 is not in loop 1, so it should be removed. Then, the branch matrix (solution space) can be obtained.
The solution space is obviously reduced compared to S p . According to [30], the optimal solution of the symmetric distribution network is {B8, B7, B16}, which is still in S p . The essence of this heuristic rule is to find the most promising branch for reducing the power loss in each loop, thereby filtering out numerous poor solutions.

Improved Fireworks Algorithm
The fireworks algorithm [33,34] shows excellent global optimization performance and computational efficiency in solving complex optimization problems. The number of sparks produced by the fireworks explosion is negatively correlated with the explosion radius. Based on the enlightenment of this relationship, the FWA seeks the optimal solution space iteratively. First of all, in the solution space, we randomly select the initial solution as the fireworks and evaluate its fitness. It is considered that the fireworks with small explosion radius and more sparks are regarded as good; otherwise, the fitness is poor. The sparks that do not meet the constraints should be modified. After comprehensive evaluation, a new generation of fireworks is obtained, and the abovementioned steps are performed in turn. In each iteration, we select the fireworks that have the best fitness as the optimal fireworks, and the best fireworks y(k) are selected through k iterations, which is the optimal solution.
Dynamic DNR is a nonlinear, discrete and multi-constrained NP problem, and based on this, we propose an IFWA. According to Equation (4), the fitness function of the fireworks algorithm is taken as the DN active power loss. It is assumed that the fitness of the optimal fireworks of the k-th iteration is y(k).
where Z is a set of integers greater than 0. The adaptive coefficient β is defined to represent the survival generations of the optimal fireworks under the current iteration. When the optimal fitness of the first iteration or two adjacent iterations is different, the survival generation is 0. When the optimal fitness of two adjacent iterations is equal, the survival generation is increased by one. Therefore, β is an adaptive coefficient, which can better reflect the search status of the current algorithm.
The explosion operator is an important part of the fireworks algorithm that determines the search range and search granularity of the algorithm. To further facilitate the optimization ability of the fireworks algorithm, the explosion radius is improved by the adaptive coefficient in the iterative process. On the one hand, to promote the local search capability, A opt of the optimal fireworks decreases gradually with the increase in β. On the other hand, to avoid falling into the local optimization, with the increase in β, the explosion radius A other of non-optimal fireworks is gradually increased. The above process can be expressed as: where M is a constant, A opt and A other are the optimal and non-optimal fireworks explosion radius before improvement, respectively, and A opt and A other are the optimal and nonoptimal fireworks explosion radius after improvement, respectively. When the explosion radius is decreased to a very small value, the rounded solution is the same as the original solution, that is, there is an invalid variation. To avoid this case, the explosion radius given by Equation (22) is further adjusted, and the explosion radius is set to an integer that is not less than 1.
where A and A are the fireworks explosion radius before and after rounding, respectively. round () is the rounding function.
In the FWA, while iteration times reach the maximum, the algorithm ends and the optimal fireworks are selected as the final solution. If the optimal fireworks obtained after k iterations (not the maximum number of iterations) continuously survive a certain generation C that is large enough, then the optimal fireworks can be considered as the final solution. To ensure the rapidity and accuracy of optimization, it is assumed that C is a large termination constant. So, the improved termination strategy is: With the progress of the iterative process, when the explosion radius is reduced to a certain extent, each explosion may produce a large number of the same sparks, thus affecting the search ability of the algorithm. Inspired by this, we implement a small mutation strategy that performs an explosion in each dimension for current optimal fireworks R opt , thus a new spark is generated and the other dimensions remain unchanged during the operation. The spark R j generated on the j-th dimension can be expressed as: where n represents the dimension of fireworks, λ depicts an arbitrary constant, and N j denotes the feasible range of fireworks in dimension j. Through the small mutation operation of the optimal fireworks, a large number of different new solutions can be obtained nearby the current optimal solution, and this effectively promotes the algorithm's local search capability. Figure 3, and the detailed steps are as follows.

Dynamic DNR based on IHCTC and H-IFWA is demonstrated in
Symmetry 2021, 13, 1479 9 of 19 explosion radius is modified according to the adaptive coefficient.
Step 9: The explosion operation is performed on each dimension of the current optimal spark according to the small mutation strategy of the optimal fireworks.
Step 10: Select the individuals with good adaptability as the next generation of fireworks.
Step 11: If the termination conditions are met, output all feasible solutions. Otherwise, proceed to the next iteration.

Case Studies
To validate the calculated performance of the presented heuristic rule, the IHCTC and H-IFWA algorithm and the modified IEEE 33, IEEE 119 and a practical scale TPC 84bus test systems are verified as examples on a PC with AMD R7-5800H, 3.2GHz CPU, and a 64-bit operating system. Finally, in the same configuration environment, the H-IFWA method is compared with the ideal dynamic reconfiguration (IDR) and the dynamic reconfiguration method in the literature [35]. Step 1: Reading data of DN include distribution lines, transformers, DGs, and loads, etc.
Step 2: Based on the day-ahead load forecasting data and the active power of DGs, the hierarchical clustering method considering timing constraints is proposed to divide the time of the day into several reconfiguration periods, and the load status of the corresponding period is expressed according to the data of the clustering center.
Step 3: According to the operation characteristics and topological structure of the three-phase symmetric distribution network, the basic loop matrix S p0 is formulated.
Step 4: Using the power moment method to filter the repeated elements of each row in the matrix S p0 , the compressed solution space S p is obtained.
Step 5: Open the branch connected to the lowest voltage point and close the original tie switch, and calculate the voltage of each node.
Step 6: Choose z nodes with the lowest voltage in each loop based on the heuristic rules, and then the branch set of the loop network is replaced by the branches connecting to these nodes in the basic loop matrix to further compress the solution space.
Step 7: Select the initial solution randomly as fireworks in the solution space, and evaluate its fitness.
Step 8: It is assumed that the explosion radius is an integer of not less than 1, and the explosion radius is modified according to the adaptive coefficient.
Step 9: The explosion operation is performed on each dimension of the current optimal spark according to the small mutation strategy of the optimal fireworks.
Step 10: Select the individuals with good adaptability as the next generation of fireworks.
Step 11: If the termination conditions are met, output all feasible solutions. Otherwise, proceed to the next iteration.

Case Studies
To validate the calculated performance of the presented heuristic rule, the IHCTC and H-IFWA algorithm and the modified IEEE 33, IEEE 119 and a practical scale TPC 84-bus test systems are verified as examples on a PC with AMD R7-5800H, 3.2GHz CPU, and a 64-bit operating system. Finally, in the same configuration environment, the H-IFWA method is compared with the ideal dynamic reconfiguration (IDR) and the dynamic reconfiguration method in the literature [35].

IEEE-33 Test System
The IEEE-33 test system is shown in Figure 4, and the specific data of the system can be referred to [36]. The DGs are, respectively, installed at node 7 and node 24, and related data are described in Table 3.

IEEE-33 Test System
The IEEE-33 test system is shown in Figure 4, and the specific data of the system can be referred to [36]. The DGs are, respectively, installed at node 7 and node 24, and related data are described in Table 3. S7 S8 S9 S10 S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 S21

. Solution Spaces
To validate that the heuristic rules in the proposed H-IFWA algorithm can effectively reduce the solution spaces, we assume that z = 3, and S p can be obtained, and this, compared with the results based on the fundamental loop matrix, is displayed in Table 4. As can be observed from Table 4, in comparison with the solution space S p0 , S p is also significantly reduced, which is due to the fact that the heuristic rule excludes some infeasible solutions so as to reduce the range of solution spaces.

H-IFWA Performance
To demonstrate the superior performance of the proposed H-IFWA algorithm, the comparative analysis results by using the H-IFWA, MILP, FWA [37] and improved harmony search algorithm (IHSA) [38] for 100 times are shown in Table 5  As can be inferred from Table 5, the identical optimal solution can be obtained by four algorithms, and the average power loss of MILP and H-IFWA is the lowest. However, MILP has the best performance in average convergence time. The main reason is that the linearization technology can simplify the DNR solution process. In addition, both IHSA and FWA use the fundamental loop-based coding method, which has a large solution space and contains numerous invalid solutions. The H-IFWA method greatly reduces the range of the solution space by virtue of heuristic rules, which contains only the most potential branch collection. Therefore, in the IEEE 33-bus system, both MILP and H-IFWA have shown better advantages in convergence performance.

Sensitivity Analysis
To verify the sensitivity of the H-IFWA algorithm proposed in this paper under different load levels, three different load levels are selected to compare the results before and after performing DNR. Here, we take the load levels during three time periods, i.e., 14 h, 19 h, and 21 h, as a case study-this is shown in Figure 5, and the optimization results are illustrated in Table 6.    As can be seen from Table 6, under three different load levels, the original network loss of three cases is 110.29 kWh, 143.86 kWh, and 176.95 kWh, respectively. After the DNR activity is implemented, the network loss employed in the proposed H-IFWA algorithm is 81.58 kWh, 105.52 kWh, and 128.55 kWh, respectively, which is 26.03%, 26.65%, and 27.35% lower than that of the original scheme. Moreover, the lowest voltage after reconfiguration is higher than that before reconfiguration, so the node voltage level after DNR is obviously improved. Therefore, under three cases by inputting different load values, the H-IFWA method proposed in this paper can effectively reduce power loss and voltage fluctuation in DNR.

TPC 84-Bus and IEEE 119-Bus System
The TPC 84-bus system is shown in Figure 6, and the related parameters can be obtained according to [36].  Figure 6. Modified TPC 84-bus system.

Solution Spaces
To further validate the necessity of heuristic rules in the proposed H-IFWA algorithm, we assume that z = 3, and the solution space p S can be obtained, and this, compared with the results solved by the fundamental loop matrix, is illustrated in Table 7.

Solution Spaces
To further validate the necessity of heuristic rules in the proposed H-IFWA algorithm, we assume that z = 3, and the solution space S p can be obtained, and this, compared with the results solved by the fundamental loop matrix, is illustrated in Table 7. It can be concluded from Table 7 that, in comparison with S p0 , S p derived from the proposed H-IFWA method is also significantly reduced. Thus, the solving speed of DNR is accelerated. After reconfiguration, the set of open switches is {B55 B7 B86 B72 B13 B89 B90 B83 B92 B39 B34 B42 B62}.

H-IFWA Performance
More importantly, to further explain the superior performance of H-IFWA in the actual TPC 84-bus system, a comparison is made between the proposed H-IFWA, MILP, simulated annealing (SA) [39] and GA for 200 times, and the comparison results are displayed in Table 8. As can be observed from Table 8, in terms of the convergence speed, the H-IFWA method is the best. The main reason is that the solution space of H-IFWA is small and does not require too many iterations, which verifies that H-IFWA has a faster convergence speed. As is shown Table 5, compared with H-IFWA, the solution efficiency of MILP is higher than that in the 33-bus system. However, the number of MILP constraints will gradually increase as the system scale expands, which will increase the constraint processing time and solution time. Therefore, the computation time of MILP is longer than that of H-IFWA in the actual TPC 84-bus system.
Finally, the IEEE 119-bus system [40] is tested to further illustrate the effect of the H-IFWA method compared with the improved tabu search (ITS) [41], harmony search algorithm (HSA) [42], and MILP [40]. The comparison results are listed in Table 9. As illustrated in Table 9, the performance of H-IFWA is better than HSA and ITS. The optimal reconfiguration scheme of H-IFWA is {B22 B26 B34 B39 B42 B51 B58 B71 B74 B95 B97 B109 B122 B129 B130}, which is the same as that of MILP. From the comprehensive analysis of Tables 5, 8 and 9, it can be concluded that when dealing with a large-scale DNR problem, H-IFWA has a significant improvement in computational efficiency compared to other algorithms. To sum up, our proposed method has better solving efficiency than existing algorithms, and the reconfiguration scheme is relatively stable.

Comparison with IDR and MPTI Method
DNR is carried out on the IEEE-33 test system by using the daily load data in [43]. In this process, DGs are considered, in which the photovoltaic is connected to node 7 and the wind farm is connected to node 24. The active power of both is illustrated in Figure 7.

Comparison with IDR
To demonstrate the difference between the H-IFWA method proposed in this paper and the ideal dynamic reconfiguration (IDR) method more clearly, according to the combination of single-stage static reconfiguration schemes during 24 periods, an IDR scheme is obtained without considering the limit of switch operation times. The comparison results are shown in Figure 8 and Table 10, respectively.

Comparison with IDR
To demonstrate the difference between the H-IFWA method proposed in this paper and the ideal dynamic reconfiguration (IDR) method more clearly, according to the combination of single-stage static reconfiguration schemes during 24 periods, an IDR scheme is obtained without considering the limit of switch operation times. The comparison results are shown in Figure 8 and Table 10, respectively.

Comparison with IDR
To demonstrate the difference between the H-IFWA method proposed in this paper and the ideal dynamic reconfiguration (IDR) method more clearly, according to the combination of single-stage static reconfiguration schemes during 24 periods, an IDR scheme is obtained without considering the limit of switch operation times. The comparison results are shown in Figure 8 and Table 10, respectively.  From Figure 8 and Table 10, the total energy loss of H-IFWA is 1012.37 kWh (T = 3) and 1011.76 kWh (T = 4), which is 0.87% and 0.81% higher than the total energy loss of IDR, respectively. At the same time, IDR can save energy up to 590.40 kWh, which is higher than H-IFWA by 8.78 kWh (T = 3) and 8.17 kWh (T = 4), respectively. The total energy loss and saved energy loss of H-IFWA are very close to IDR. On the contrary, the number of switching actions of H-IFWA (8 (T = 3) or 10 (T = 4)) is much lower than IDR (33). From these aspects, it is easy to draw the conclusion that H-IFWA can not only meet the DNR constraints, but also significantly reduce the active power loss. Therefore, H-IFWA shows superior performance. In addition, the computation time of IHCTC is 0.28 s, which can meet the engineering requirements of dynamic reconfiguration.  From Figure 8 and Table 10, the total energy loss of H-IFWA is 1012.37 kWh (T = 3) and 1011.76 kWh (T = 4), which is 0.87% and 0.81% higher than the total energy loss of IDR, respectively. At the same time, IDR can save energy up to 590.40 kWh, which is higher than H-IFWA by 8.78 kWh (T = 3) and 8.17 kWh (T = 4), respectively. The total energy loss and saved energy loss of H-IFWA are very close to IDR. On the contrary, the number of switching actions of H-IFWA (8 (T = 3) or 10 (T = 4)) is much lower than IDR (33). From these aspects, it is easy to draw the conclusion that H-IFWA can not only meet the DNR constraints, but also significantly reduce the active power loss. Therefore, H-IFWA shows superior performance. In addition, the computation time of IHCTC is 0.28 s, which can meet the engineering requirements of dynamic reconfiguration.
Additionally, the lowest voltages of three dynamic DNR schemes in each period are shown in Figure 9. Additionally, the lowest voltages of three dynamic DNR schemes in each period are shown in Figure 9. As is perceived in Figure 9, the voltage level of the original result is the lowest. In the first segment interval (1-8 h) and the third segment interval (22-24 h), the original network voltage magnitude reaches 0.95 p.u or an even higher voltage magnitude, so the effect of reconfiguration on increasing the voltage magnitude during these periods is not obvious. However, in the second segmentation interval (9-16 h), the lowest voltage of the system in the two reconfiguration schemes is greatly increased. This shows that the two As is perceived in Figure 9, the voltage level of the original result is the lowest. In the first segment interval (1-8 h) and the third segment interval (22-24 h), the original network voltage magnitude reaches 0.95 p.u or an even higher voltage magnitude, so the effect of reconfiguration on increasing the voltage magnitude during these periods is not obvious. However, in the second segmentation interval (9-16 h), the lowest voltage of the system in the two reconfiguration schemes is greatly increased. This shows that the two reconfiguration schemes can effectively increase the voltage magnitude.

Comparison with MPTI Method
Furthermore, to validate the superior performance of H-IFWA, DNR is implemented according to the data in [35], in which the membership partition of time intervals (MPTI) method was used, and the comparison results of three schemes are illustrated in Table 11. It is highlighted from Table 11 that the results of the three schemes solved by using the MPTI method in [35] are consistent, which has the same effect as single-stage static reconfiguration. However, the proposed H-IFWA method belongs to dynamic reconfiguration, which can flexibly divide the reconfiguration periods according to actual needs. It is worth mentioning that, with the increase in time-division, the number of reconfiguration schemes also increases, and the energy loss also shows a downward trend. When T = 3, the energy loss is dropped to 1525.78 kWh and the saved energy loss reaches 691.72 kWh. Furthermore, when T = 1, the dynamic reconfiguration result of the H-IFWA method is also better than that of the MPTI method in [35]. Combined with the actual requirements of the distribution network (including power quality and allowable switch operation times), different reconfiguration schemes can be selected appropriately, which further verifies the superiority of the presented algorithm in this paper.

Conclusions
In this paper, an improved hierarchical clustering technique based on timing constraints combined with an improved fireworks algorithm is presented to tackle the dynamic DNR problem. Numerical experiments are carried out on three representative IEEE 33, IEEE 119 and TPC 84-bus test systems to verify the effectiveness of the proposed method. The conclusions can be summarized as follows: (1) IHCTC is developed to divide periods in terms of the load status and the output condition of DGs, and then the improved fireworks algorithm based on heuristic rules is proposed to recast the intractable dynamic reconfiguration problem as multiple single-stage static reconfiguration problems, which reduces the complexity of dynamic reconfiguration. (2) Compared with the advanced algorithms used in the existing literature, the proposed H-IFWA method not only has higher solution efficiency and avoids a large number of invalid solutions, but also can minimize the network loss as much as possible, so it is more suitable for the actual distribution network operation.
However, the practical distribution network usually has voltage-dependent loads, and the uncertainty of DG power can also impact the reconfiguration solutions. Dealing with the uncertainty in a distribution network with voltage-dependent loads and comparing clustering with partitioning methods considered in the solution method [44,45] are the focus of our future research.