Distributed PV Location Selection Based on Hierarchical Optimization and Improved Genetic Algorithm

With the rapid development of Distributed Photovoltaic (DPV), the photovoltaic installed capacity of 10 kV and below is gradually increasing, and location selection and capacity planning are required to reduce the impact on the distribution network after the photovoltaic grid connection. Aiming at the access problem of distributed PV in distribution lines, the location and the capacity of DPV are optimized with the idea of layered optimization. The upper level uses improved GA to optimize regional DPV capacity, and the lower layer uses Matlab and OpenDSS to combine multi-objective optimization with minimum network loss and voltage offset and timing power flow calculation to optimize the location and capacity of the DPV within the region. A 10 kV line in Hainan is taken as an example to verify the feasibility of the model.


Introduction
In recent years, the penetration ratio of DPV in the distribution network has been increasing with the continuous promotion of projects such as clean energy venues and PV rooftops.However, PV occupies a large region, and its power output is intermittent and random.In urban distribution networks, if DPV planning is unreasonable, it will not only affect the economic and safe operation of the distribution system, such as node overvoltage and line loss increase, but also increase construction costs.
In [2], the concept of clustering division and two-layer optimization was introduced, the distribution network was divided according to the grid structure and load characteristics, and then particle swarm optimization was used to optimize the DPV location and constant capacity.In [4], four major factors that currently influence the siting and capacity of DPVs were summarized.In [10], a DPV siting and capacity optimization model with the objectives of voltage quality, network loss, and investment cost was established.In [5], a genetic algorithm-based optimization model-solving method and process is proposed to solve the voltage deviation problem caused by DPV high-density multipoint access to the distribution network.In [11], a detailed idea of genetic algorithms for optimization in DPV configurations is introduced.
In this paper, we will optimize the siting and capacity determination of distributed PV in distribution lines from both electrical and non-electrical factors for the total capacity determination in a hierarchical manner, adding the occupancy region cost factor in the upper layer and considering both voltage and line loss effects in the lower layer.Based on the traditional single-objective and multiobjective genetic algorithms, the algorithms are improved to improve the convergence speed and convergence accuracy for the characteristics of DPV and distribution networks, and hybrid simulations are performed using Matlab computing power and OpenDSS fast timing tide calculation.Finally, the accuracy and effectiveness of the algorithm in this paper are verified using actual arithmetic examples.

Reasons for Layering
Siting and capacity are two of the most critical issues in DPV planning.Siting determines the central point of the impact of DPV on the distribution network, while capacity determines the scope and capacity of the DPV's impact on the distribution network.However, due to the large number of access nodes in the distribution network and a large amount of calculation in the optimization process, the idea of hierarchical coordination was introduced [2], non-electrical factors and electrical factors were considered in layers, and non-electrical factors were used to split the complicated distribution network, simplifying the calculation process.

Overview of upper and lower layers
With the current decreasing PV subsidies and commercialization of investments, how to reduce investment costs has become the focus of attention.Under the condition of determining the total capacity of DPV access, the minimum annualized input cost is set as the objective of the upper-level optimization.Since the installed capacity of DPV is limited by the developable region and urban land resources are scarce, the developable region is used as a constraint for the model.In recent years, land prices have been increasing, and the cost of the occupied region has become a major factor affecting the cost of DPV allocation [12], so it is used as a sub-objective for cost optimization.To ensure the proper operation of DPV equipment, it needs to be maintained, but DPVs are more decentralized and have higher average maintenance costs than centralized PVs, so maintenance costs are also considered as a sub-objective for cost optimization.
The lower layer considers only electrical influences and performs multi-objective optimization in a single region divided by the upper layer.In view of the instability of the PV output, it will cause the surrounding nodes to produce a voltage offset, so the variance and minimum value of voltage offset of all nodes in the region are set as the optimization objective.Due to the high line loss of the distribution network, if the DPV is far from the load, it will produce a large amount of unnecessary line loss, so the line loss of electricity and minimum is set as the second optimization objective in the lower level.

Upper-level planning model
The upper-level planning is based on the total DPV access capacity P determined for a line, and the optimal DPV access capacity for each region is solved to minimize the annual operating cost by using the region as the basic unit.

Objective function. m in
(1) CA in Formula (3) is the annual operating cost of the DPV in the region, including the annual cost of the occupied region of the DPV Cl, the annual maintenance cost of the DPV Cm, due to the fixed cost of the DPV hardware, will not have an impact on the cost, fixed not included in the scope of consideration.The specific formula for calculating each of these costs is as follows.
 Photovoltaic footprint cost where Mi is the annual cost per occupied region in region i; Pi is the DPV access capacity in kW in region i; S1 is the occupied region per DPV, taken as 10 m 2 /kW, and N is the total number of regions. Regional PV hardware cost Csi * (1,2,..., ) where Mp is the unit cost of DPV.
where  is the maintenance cost factor, which represents the annual maintenance cost as a percentage of the DPV hardware cost, expressed as Formula ( 7).

Constraint conditions
Constraint constraints include total DPV capacity constraints, available region constraints, and branch consumption constraints.
 DPV total capacity constraint 1 0, ( Pi is the DPV access capacity of region i. ) SDis-i indicates the region available in region i.  Bypass consumption constraint Pi-load indicates the maximum load value in region i.The installed capacity of the branch DPV does not exceed 30% of the maximum load in the region.

Lower-level planning model
The lower-level planning model solves for the optimal DPV capacity of each node to minimize the voltage offset and line loss within the region on a node-by-node basis.

Objective function
The voltage objective function Fi of the lower planning model is the sum of the voltage offset variance in the i th zone over 24 h.The line loss objective function Li is the line loss summation in the i th zone over 24 h: In Formula (11), Ni indicates the number of nodes in the region I; t indicates the moment; Ut-ij indicates the voltage minimum value of node j in region i at the moment t; and Up.u.indicates the voltage minimum value 1.
In Formula (12), Oi denotes the number of line segments in region i; Pt-il-loss denotes the line loss power of the l th segment of the line in region i at time t.

Conditions
This includes the tidal current constraint, the DPV capacity constraint assigned to the region by the upper layer, the inverter efficiency constraint, and the PV active output constraint.
 Tidal Constraint The principle of OpenDSS tide calculation is shown in 3. 2 above.
Formula (13) indicates that the sum of the DPV capacities hooked up within the region does not exceed the total DPV capacity Pi allocated to each region by the upper layer optimization.Formula (14) indicates that the node hookup DPV capacity must not be negative.
 PV inverter efficiency constraint, PV active output constraint * * (1, 2,..., ) (1, 2,..., ) Pt-ij-fact is the actual DPV output of node j in region i at time t; δtem is the temperature efficiency factor of DPV; and δinv is the inverter efficiency factor of DPV.After entering the corresponding reference coordinates in OpenDSS, the system automatically forms the δtem-temperature curve and δinv-DPV output curve [14].

Model solving algorithm
In this paper, based on the idea of simplifying and streamlining complex problems, the multivariate problem of siting and fixing the capacity of multi-node DPVs in distribution lines is decomposed into a process of first upper and lower level partition optimization and then intra-regional optimization.The algorithm flow is shown in Figure 1.

Upper-layer calculation flow
Regional divisions: regions are divided according to the unit annual occupancy cost Mi, and the maximum available area SDis-i in each zone is counted at the same time as the initial data.
The characteristics of the improved genetic algorithm are summarized as follows.
 Fitness: Sek/CA is used as the upper-level optimization fitness.Sek is the control coefficient to control the value of fitness. Variation: In order to satisfy Formula (8), two regions in the progeny are randomly selected during the variation, one of which randomly increases the proportion value C, while the other decreases the same proportion value C, and is restricted by Formula (13).
  In Formula (17), δ indicates that the variation step size is 1 kW.In Formula (16), ∆P represents the maximum variation value, that is, the variation range is [0~∆P kW]; k represents the number of current iterations; and γ represents the fixed mutation probability coefficient.With the increase of iteration number k, the variation range becomes smaller and smaller, and the convergence accuracy increases.The following is an example of the upper layer data, ∆P is set at 50, γ is set at 500, and the evolution curve when the variation value C is Formula (16) and is fixed is compared, the evolution curve is shown in Figure 2. It can be seen that when C is 0.05, the early convergence speed is fast, but the precision is low.When C=0.005, the precision performance is acceptable, but the convergence rate is too slow.When Formula ( 16) is adopted for C, and iteration number k is set to 500, the value range of C is (0, 0.0287), the early iteration number is small, the value of C is large, and the convergence speed is fast; the later iteration number is larger, the value of C is smaller, and the accuracy is improved.Therefore, the variable function C set in this paper is better than the fixed value C.
= sin( * / 2) In Formula (18), Pm represents the variation rate, which is composed of variation range Pk, multiplier factor Px and fixed probability Pl.The multiplier factor Px takes the value of Formula (19).
The multiplier factor Px is set as the increasing function of k, so that the variation rate will narrow the search range with the decrease of variation value C in the later period of variation, and it is necessary to increase the mutation probability to increase the possibility of a successful search.In order to determine Px, taking Pk =0.1 as an example, five increasing functions are selected for comparison: sinusoidal convex function (0-π/2), linear function, sinusoidal concave function (3π/2-2π), quadratic function and fixed value.Taking the actual calculation in this paper as an example, the evolution curve is shown in Figure 3.It can be seen that the evolution process of the sinusoidal convex function is the best, so the sinusoidal convex function (0-π/2) is selected as the multiplier factor Px at last, but the value of Pk needs to be determined according to the actual situation.
Setting the minimum variation probability Pl can increase the convergence rate in the early and middle stages.In order to select the appropriate P1 value and exclude the influence of C on the Pl value, Pk=0.1, C=0.001, 0.005 and 0.01 are set to analyze the relationship between the value of Pl and the convergence.It can be obtained by calculation that when C=0.005 and Pl =0.6, the optimal adaptation is obtained within the minimum number of iterations, and the advantage is not obvious when C=0.01.Therefore, according to Formula (16), when the number of iterations is set to 500 and Pk is taken as 0.1, the range of C is (0, 0.0245).
To ensure the search speed of the later high-precision search, Pl is taken as 0.6, and to avoid errors, the maximum value PiMax in the mutated child vector is updated to the total capacity P minus the sum of all values except the maximum value after the mutation.

Layer multi-objective optimization process
 Initialization: The distribution network base tide parameters are set.Based on the DPV capacity of each region obtained from the upper-level optimization, the initial value of DPV capacity of each node in each selected region, the number of iterations NG, and the number of populations NP are set. Sub-loop writes new DPV capacity at each node, sets OpenDSS to 'Daily' timing tide solving mode, and brings the node timing voltage results and line loss results returned by OpenDSS into Formulas ( 11) and ( 12) to calculate 0.5/Fi and 1.25*10^4/Li as lower layer adaptation degree. The father is determined by the optimal voltage and the mother is determined by the optimal line loss by the roulette wheel.The variation idea is the same as the upper layer, the variation function of the lower layer is slightly different than the upper layer, here γ is taken as 50, ∆P is taken as the average of the capacity of the region divided to each node, and the total capacity also becomes Pi, δ denotes a step size of 1 kW. Loop: The above process is looped until the set number of iterations is reached, and the last generation of the population is selected as the Pareto optimal solution set for the region. All factors are considered together and the optimal solution is selected for the region in the Pareto optimal solution set.

Algorithm data
In order to verify the accuracy of the above algorithm, this paper is based on the actual distribution data of a 10 kV line in Hainan, which has a maximum load of 3.439 MW, and the PV access capacity is now set to 25% of the maximum load, i.e. 870 kW in the calculation example.It is divided into 10 regions based on the annual cost per occupied area.

Upper-layer optimization results
As a comparison, the following three approaches were chosen to validate the upper-layer algorithm: Method 1: Allocation of DPV capacity among 10 regions is performed using an improved genetic algorithm; Method 2: The regions are ranked according to the size of the site cost, disregarding the DPV O&M cost, and priority is given to the region with low cost per unit of use area for allocation; Method 3: Equally proportional allocation is performed according to the value of the proportion of available area to the total area in each region.
For the genetic algorithm used in Method 1, the basic parameters are as follows: The population size NP is set to 200, the number of iterations NG is set to 500, the genetic probability Pc is taken to be 0.8, with the number of iterations around 300 and the fitness stabilized at 8.33.
The results of the capacity allocation and costing for the three methods are shown in Table 1 2, although Method 2 occupies less area cost, the operation and maintenance cost increases by 1.4% compared to Method 1. Method 1 has the lowest combined annual cost because although some areas have high occupancy costs, the capacity advantage allows for a lower percentage of maintenance costs, which can compensate for the disadvantage of its high occupancy costs.Method 3 has neither an occupancy cost advantage nor a reduced maintenance cost share, and has a higher total cost.The comparison of the three methods shows that the optimization result of Method 1 is better.In this paper, five different types of daily load curves for small factories, schools, residential, commercial, and businesses are selected as the basis for the time-series load in each area, and the load curves are shown in Figure 4 for the same transformer capacity.
Since the DPV output on rainy days is small and the impact on node voltage and line loss is small, the typical DPV index on sunny days is taken as the parameter value of output in this paper.In this paper, Region 7 (where the main types of loads are small-scale industrial and residential) is used as an example to demonstrate the lower-level multi-objective optimization process.The vertical coordinates in Figure 5 indicate the voltage and line loss adaptations, respectively.

Optimization Process
The obtained solution set is made with the voltage adaptation as the horizontal coordinate and the line loss adaptation as the vertical coordinate, and the adaptation distribution curve of the solution set is made as shown in Figure 6.From Figure 6 (a), it can be seen that the individuals in the solution set population are clustered toward the central value.The external set of optimal solutions, i.e., the Pareto optimal solution set of Region 7, is taken as shown in Figure 6 (b).The intermediate value of the Pareto optimal solution set (12.23, 2.4119) is now taken as the final result, and its corresponding node DPV distribution data is brought into the tide calculation.

Results Comparison
The optimal solution obtained from the above tide calculation is compared with the single-objective optimization results of voltage optimum and line loss optimum.
As seen in Figure 7, the comparison between the multi-objective optimization and the optimal results of line loss during the DPV output ensures a reduction in the value of the voltage offset variance with a small increase in line loss; compared with the optimal results of voltage, the line loss is reduced by 11.4% with a 1.5% decrease in voltage quality.Combined with the capacity allocation of the upper region, the DPV installation capacity of each node in Regions 1, 2, 4, 5, 6, 7, 9, and 10 can be obtained according to the calculation method of Region 7, as shown in Table 2.

Conclusion
In this paper, on the basis of using the genetic algorithm to optimize the capacity division of regional DPV of distribution lines, the multi-objective optimization of the siting and capacity setting of DPV within the region is carried out by considering voltage offset and distribution network line loss, and a 10 kV line in Hainan is used as an example, and it can be seen from the results that:  This paper optimizes the capacity allocation in upper and lower layers, integrating electrical and non-electrical factors, incorporating practicality and enhancing the credibility of the results. By improving the genetic algorithm for regional capacity allocation optimization, taking into account the cost of the occupied area while adding the optimization of maintenance costs, and taking advantage of the lower price of centralized maintenance, the annual operating cost can be effectively reduced, jumping out of the limitations of a single objective. The multi-objective optimization of voltage quality and line loss is performed within the region under typical DPV conditions of the region, considering the siting and capacity fixing of DPV, and the results prove that the optimization method can achieve an optimal balance between voltage offset and line loss.

Figure 2 .
Figure 2. Corresponding evolution curves of different C values.

Figure 3 .
Figure 3. Evolution curves of different multiplier factors.


Merit selection: The offspring are ranked according to voltage adaptation and line loss adaptation, and the top 50% of each are selected to form the new population for this round of iterations.

Figure 4 .
Figure 4. Various types of load curves of Region 4.
Distribution curve of population fitness after optimization (b) Pareto optimal solution set fitness distribution curve Figure 6.Fitness distribution curve.

Figure 7 .
The optimal solution set fitness distribution curve.

Table 2 .
Lower node capacity allocation result table