Reconfiguration of Distribution Networks with Distributed Generation Using a Dual Hybrid Particle Swarm Optimization Algorithm

This paper proposes a reconfiguration strategy of distribution network with distribution generation (DG) based on dual hybrid particle swarm optimization algorithm. By the network structure simplification and branches grouping, network loss was selected as objective function, an improved binary particle swarm optimization algorithm (IBPSO) was used in branch group search, and the proposed group binary particle swarm optimization search algorithmwas used in searching within the group to improve search efficiency and avoid earlymaturing.Theproposed algorithmwas tested on the IEEE 33-bus distribution power systemand compared with other existing literature methods. The influence on the power flow of distribution network by DG position and capacity was studied. Simulation results illustrate that the proposed algorithm can get the optimal configuration results and significantly reduce system energy losses with fast convergence rate. In order to control the smart grid, using a dual hybrid particle swarm optimization algorithm to reconstruct a model, the result of simulation verifies the validity of the model. At the same time, the distributed power grid after reconstruction after optimization can effectively reduce the network loss and improve power supply quality.


Introduction
As clean and renewable energy sources, DG (distributed generation), such as photo voltaic and wind power, serves as mostly distributed and independent small power supply installed near the load or user [1,2]. With the powerful support by governments and the development of smart grid construction, the application of distributed power technology in power grids has been vigorously promoted.
Distributed power supply is a small generating unit directly arranged in distribution networks or users nearby to meet the specific requirements and support economic operation of distribution networks with environmental compatibility. And its power ranges from a few kilowatts to fifty megawatts [3][4][5]. Reconfiguration of distribution network refers to the change of network switch combination and adjustment of the structure of network operation by closing or opening the disconnected sectional switches and tie switches with constraints satisfied [4][5][6]. Its purpose is to prevent overload of transmission lines, balance the equilibrium electricity of users, reduce the power loss of the system, and maintain a good electrical quality. The optimization of the network with DG is intrinsically a multiple objective, noncontinuous, and multiple stage hybrid searching process where subgoals and constraints are mutually restricted, resulting in a kind of Nondeterministic Polynomial problem in mathematics [7]. The grid-connected of DG has a great influence on the distribution network, including the voltage distribution, power flow distribution, network line loss, power quality, and short circuit current, which cannot be ignored [8,9].
The performance and efficiency of distribution network reconfiguration are largely dependent on an efficient search algorithm. Particle swarm optimization algorithm (PSO) is a swarm intelligence optimization algorithm. The principle of PSO is simple, robust, easy to achieve, and so on [10]. 2 Mathematical Problems in Engineering This paper proposes a reconfiguration strategy of distribution network with DG. The influences on power flow and voltage quality by the location, capacity, quantity, and type of the DG were analyzed. The improvements of particle swarm optimization algorithm and the static reconfiguration method were also analyzed. Distribution network simplification with DG was studied.

Problem Representation
Based on certain constraints, distribution network reconfiguration is to ensure that the network topology is radial and determine the distribution network achieving a certain indicator or a number of indicators to achieve the best operation state of the distribution network [11].
Distribution Network Reconfiguration with DG is a nonlinear, multiobject, discrete, multistage planning problem [12,13]. In this paper the objective function is to minimize active power loss of the whole distribution network. (1) is branch number, is total branch numbers, is the state of switch (0 means open state and 1 means close state), is the resistor of branch , and are the active and reactive power of branch , and is the up-layer node voltage of branch .
The constraint conditions are as follows.

(1) Power Flow Constraint Conditions
( cos + sin ) and are the active and reactive power into node , and are active and reactive power of node load, DG and DG are DG's active and reactive power into node , and are voltage of nodes and , and are admittance matrixes, and is the phase difference between nodes and .

3) Branch Active Power Constraint Condition
line is actual active power between nodes and , and line ,max is the maximum active power between nodes and .

(5)
DG, and DG, are active and reactive power of DG .
(5) Network Topological Constraint. The network topology of the distribution network is radial.
,max is the maximum value for the complex power injection branch . This is the branch capacity constraint condition.

Analysis of the Radial Power Distribution Network.
To ensure the high quality electrical energy in faults state, the distribution network was designed as a ring structure, which performs radial topology on grid operation state [14]. Due to the complexity of the distribution network reconfiguration, there are plenty of switch state combinations, leading to "ring" or "island" scenario that will damage the distribution network power supply and lose electrical power charge [15].
The isolated island is a subsystem which is not connected with the root node of the distribution system and is separated from the main power grid. The ring network means that there are a number of paths from the root node, resulting in a loop in the distribution system. The existence of isolated island or ring network shows that the switch combination is a unfeasible solution. Excessive unfeasible solutions can restrain optimization speed and reduce the efficiency of the search process of the reconfiguration algorithm [16,17].
In this paper, the matrix method is adopted to judge the radial topological condition of distribution network. The main definition and theorem are as follows.
Then we call the matrix as the reachable matrix of graph . The reachable matrix shows whether there is a path between any two nodes in the distribution network. Then, it can be concluded that the reachable matrix of the network is = (+) 2 (+) 3 (+) ⋅ ⋅ ⋅ (+) , where (+) is the Boolean sum.

Theorem 3. Suppose
= ⟨ , ⟩ is a simple directed graph with no self-loop and is its reachable matrix. Then the necessary and sufficient condition for the strong connectivity of the graph is that the elements of are 1 except diagonal elements.
The indirect graphs can be seen as a special case of directed graph when every side in indirect graph is equivalent to two sides which have opposite directions. Therefore, the connectivity of indirect graphs can be identified by the strong connection criterion of directed graphs. The distribution system is radial network only when the number of rings is equal to the number of the contact switches. That is, the number of disconnected branches is − CS = (total network branch) − (effective node number) + 1 [18].
The flow chart to identify the connectivity of distribution network is shown in Figure 1.

Distribution Network Simplification.
In the reconfiguration of distribution network, the value of the particle position in every dimension is random between 0 and 1, resulting in a large number of unfeasible solutions. Therefore, it is necessary to reduce the particle encoding dimension, simplify the structure of the distribution network, and improve the search efficiency. The IEEE 33 nodes network was shown in Figure 2(a). The network can be simplified according to the rules as follows: the branches with the nodes whose degree (the number of edges adjacent to the node) is 2 is merged into a group and numbered, and the number greater than 2 is retained, as shown in Figure 2(b). Then renumber nodes and branches, as shown in Figure 2(c). Each branch group contains a number of branches; for example, the branch group 6 was composed of the branches 12-13, 13-14, and 14-15. Hence the coding dimension is greatly reduced and the dimension of solution vector is simplified from 37 to 13. Many unfeasible solutions were avoided and efficiency of the algorithm was improved.
In addition, assuming that there are branches in the network topology, the particle optimization coding dimension of the branch groups is . Each particle code is a vector composed of 0 and 1, which represents a kind of topology structures of distribution network.
And the particle encoding needs to satisfy is total number of branches, and is effective node number.
In this way, the number of branch groups disconnected in the reconfiguration of distribution network with DG is the basic mesh number. When we break a branch which belongs to a disconnected branch group, it must satisfy the radial topological condition, avoid the production of the infeasible solutions, and thus improve the search efficiency of the algorithm.

Particle Swarm Optimization.
Particle Swarm Optimization (PSO) is a kind of global optimization algorithm based on social group behavior, which is derived from the simulation of bird foraging process [19]. Suppose a population consists of particles, which is generally 20 in the distribution network reconfiguration. Each particle in the population is searching for optimal solutions in a -dimensional space with a finite speed as the real problem solution is -dimension [20]. The particle of in the population is composed of three -dimensional vectors, that is, respectively, the individual optimal location in history = ( 1 , 2 , . . . , ), the current position = ( 1 , 2 , . . . , ), and particle velocity V = (V 1 , V 2 , . . . , V ) = 1, 2, . . . , . The position of each particle will be calculated and evaluated before next iteration according to the actual problem represented. If the current position is superior to the individual or the best record of population position in history, this position will be deemed as the best position. Otherwise, the location will not be updated.
For each individual in the population, the iteration formula of the velocity and position is where 1 and 2 are the individual learning factor and social learning factor. Their values are nonnegative and range from 0 to 4, which are usually assigned to 2. They can approach to the global optimum by learning by themselves and the experience  of the population. rand is a uniform random number between [0, 1]. V max is the maximum velocity of the particle, and the range of , which is usually the range of particle value per dimension.

Improved Binary Particle Swarm Optimization Algorithm (IBPSO).
Compared with the continuous PSO, the velocity update formula of binary particle swarm optimization algorithm (BPSO) is the same as that of the former, but the position update formula is different. During the initialization of BPSO particle population, the solution of problem is transformed into binary code [13].
In BPSO, the position change of the particle is the probability that the velocity of each dimension is converted to the bit value 1. Assuming V is the velocity of particle , the th is dimension of the th generation, and the probability of the bit value 1 is (V ), so the probability of the bit value 0 is 1 − (V ). Therefore, if the th dimension and ( − 1)th generation of the th particle is 1, then the probability of the occurrence of the th and th generation is 1 − (V ). Similarly, if the th dimension and ( − 1)th generation of the th particle is 0, then the probability of the occurrence of the th dimension and th generation is (V ). If the th dimension and ( − 1)th generation of the th particle is (V −1 ), then the probability of 0 is 1 − (V −1 ). So the probability of occurrence of the th dimension and th generation of the th particle is According to (12), the probability of particle change, the th dimension and th generation, is related to the velocity of the two generations. When the particles' velocities of both generations are close to 0, the probabilities of bit value change and the probability of random search are probable. The probability of particles convergence to the global optimal position is very small. Expression (10) is composed of three parts. Firstly, V is the velocity inertia showing the impact of the particle's history velocity on its current velocity. Secondly, In the latter part of particle swarm search, when V is close to 0, the position of the particle is close to the optimal particle population and the optimal solution, and the particle value should remain intact. When V < 0, the value of the historical optimal solution of the optimal particle in population is equal to 0. At this point, the probability of the particle position is 1, and the position of the particle should be inverted to 0. When V > 0, the value of the historical optimal solution for the population of the optimal particle equals reversely 1.
The relationship between the particle position value and the optimal particle position of the population, according to the above method, can balance the local and global search ability at the later stage and make the result tend to the optimal particle of population and converge to the global optimal particle eventually.

Improvements of the Original BPSO
(1) If Iteration < ×MaxIter, the velocity and position of particles will be updated. If Iteration ≥ × MaxIter, according to (13), (14), and (15), the velocity and position will be updated. (2) When V ≤ 0, When V > 0, Iteration is the number of iterations, and its maximum value is MaxIter.
IBPSO and the standard BPSO are different in the probability mapping function. The goal of the new probability mapping function is that the probability mapping function value is 0 when the velocity tends to 0, so the local optimization efficiency is enhanced. Then, by new probability function, the particle's bit value remains intact when it approximately equals 0. When < 0, the position of the particle is set to 0. And when > 0, it is set to 1. When the velocity is 0, the probability of particle's position change is close to 0, and its local search ability is enhanced. By this way, the particle swarm was converged to global optimal particle finally.

Reconfiguration of Distribution
Network with DG

Distribution Network Reconfiguration Based on Dual Hybrid Particle Swarm Optimization Algorithm.
To finish the distribution network reconfiguration, distribution network simplification, branch groups selection and optimization, branches selection and optimization in branch group, and power flow calculation under constraint conditions, dual hybrid particle swarm optimization algorithm is proposed in this paper. IBPSO was used in branch group search, and the proposed group BPSO was used in searching within the group. This is reconfiguration of distribution network by dual hybrid particle swarm optimization algorithm. Take the IEEE 33 node distribution system as an example. Firstly, determine the matrix , which is the relationship between branch group number and branch within group number, as shown in (16). Secondly, use 0 or 1 to describe branches' states within the group (open or closed) and set the vector of each branch group, as shown in (17). There is only one branch disconnected in every group when updating the speed and location. Thirdly, based on the disconnected branch group number, select the disconnected branch within group. The speed updating formula is given as (18) and the location formula is the same as before. 6 Mathematical Problems in Engineering where V +1 is the speed of particle at + 1th iteration, which in the branch of group , and are particles' history optimal positions and population optimal position, and is connection condition of the branch in group at th iteration.

Reconfiguration Flow of Distribution Network with DG.
The IBPSO and BPSO in branch group are core algorithms in distribution network reconfiguration. The branch selection is optimized by IBPSO, while the branch group selection is optimized by BPSO within group. The detailed steps and the specific implementation flow chart of network reconfiguration algorithm are shown in Figure 3.
Step 1. Set the values of particle population number , the number of groups, and all other parameters.
Step 2. According to the simplified structure of distribution network, the nodes and branches of the distribution network are renumbered. Set the internal branch number within branch group, such as the column number of the elements in a matrix . Then, the particle dimension of branch group and dimension of branches within group are determined, and then parameters of the population particles are initialized. Step 3. Update the speed and position of the branch group. If the structure of the distribution network is radial, go to the next step; otherwise, repeat this step.
Step 4. Update disconnected branch location within the group branch organization. According to the matrix , find the power flow calculation in actual disconnected branch number and calculate its fit value.
Step 5. Compare the particle updated fitness value with the optimal particle fitness value in history, as well as the particle swarm optimum fitness value. If the current position is better, the value of current position will be selected as the particle's best individual historical fitness value and the particle swarm optimum fitness value. This position will be selected to update the best position of individual history and the best position of population in history.
Step 6. If the iteration number is less than the predetermined, go back to Step 3.
Step 7. If the iteration number reaches the predetermined, the optimum reconfiguration results are obtained and the program ends.

Case Studies
The proposed algorithms are used on the IEEE 33 node distribution system to verify the validity, convergence, and stability. IEEE 33 nodes network structure was shown in Figure 2(a). Assuming the particle population = 20, the loop termination condition is As shown in Table 1, the active power loss of the network is 139.47 kW after reconfiguration. It is 31.18% lower than the active power loss before reconfiguration which is 202.65 KW. As shown in Figure 4, the overall voltage of the reconfigured network is generally higher than that of the network before reconstruction. The minimum value of node voltage rose from 0.9185 P.U. to 0.9378 P.U.
DG nodes were considered as PQ nodes for computation purpose, as in Table 2. Table 3 shows the reconfiguration results with DG connected into grid by the algorithm in this paper. The active power loss of the network is 112.58 kW, which is 44.44% lower than active power loss before reconfiguration. As   shown in Figure 5, the overall voltage of the reconfigured network is generally higher than that of the network before reconstruction. The minimum value of node voltage rises from 0.9185 P.U. to 0.9448 P.U. The reconfiguration result proves the superiority of the proposed algorithm, which was suitable to the reconfiguration of Distribution Network with DG. Figure 6 shows the active power loss convergence curve of the network, which shows that the network loss converges when the iteration number was greater than 3. This proves that the proposed dual hybrid particle swarm optimization algorithm can quickly jump out of local optimal solution and converge to the optimal switch combination simultaneously.  After 50 times simulations of the example by the computer with Windows 7 operating system, 2.20 GHz Intel CPU, 4.0 G memory, the results are shown in Figure 7, which shows the average number of iterations is 5 times, and the active power loss is about 112 kW.
DG with different types and capacities are selected to verify the validity of the algorithm, as shown in Table 4. Table 5 shows that active power loss of the network is 112.77 kW after reconfiguration. It is 44.35% lower than the active power loss of the network before reconfiguration which is 202.65 KW. The minimum value of node voltage increases from 0.9185 P.U. to 0.9380 P.U. Figure 8 shows that the overall voltage of the reconfigured network is generally higher than that of the network before reconstruction.
After 100 times simulations of the example, the results are shown in Figure 9, and the average number of iterations is 16 times. The above analysis results show that the economy of   the system was improved, and the stability and reliability of the system were enhanced after reconfiguration.

Summary
Based on dual hybrid particle swarm algorithm combined with the network structure simplification and branches grouping, this paper deals with the problem of distribution systems reconfiguration. The proposed algorithm is tested on the IEEE 33-bus distribution power system and compared with other existing literature methods. The simulation results show that the proposed algorithm has a faster optimization speed for the distribution network with DG, which can not only reduce the network loss and support system voltage but also improve the economy and reliability of the system. The proposed algorithm was suitable to search for the best switch combination of distribution network with DG.
Before reconstruction (excluding DG) Before reconstruction (including DG) After reconstruction (including DG)    Distributed power grid connected is an inevitable trend with the development of smart city and modern power grid technology. It is of great significance for energy saving and emission reduction and improving energy structure. In this paper, the reconfiguration of smart grid with distributed generation is studied. From the simulation results, it can be seen that after the reconfiguration of the distributed power grid, it can effectively reduce the loss of distribution network, improve the quality of the power supply voltage, and improve the power quality of the grid. The method of research and development of this paper has certain reference function for the optimization of power grid configuration in the future.

Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.