SPSO Based Optimal Integration of DGs in Local Distribution Systems under Extreme Load Growth for Smart Cities

Renewable energy-based distributed generators (DGs) are gaining more penetration in modern grids to meet the growing demand for electrical energy. The anticipated techno-economic benefits of these eco-friendly resources require their judicious and properly sized allocation in distribution networks (DNs). The preeminent objective of this research is to determine the sizing and optimal placing of DGs in the condensed DN of a smart city. The placing and sizing problem is modeled as an optimization problem to reduce the distribution loss without violating the technical constraints. The formulated model is solved for a radial distribution system with a non-uniformly distributed load utilizing the selective particle swarm optimization (SPSO) algorithm. The intended technique decreases the power loss and perfects the voltage profile at the system’s nodes. MATLAB is used for the simulation, and the obtained results are also validated by the Electrical Transient Analysis Program (ETAP). Results show that placing optimally sized DGs at optimal system nodes offers a considerable decline in power loss with an improved voltage profile at the network’s nodes. Distribution system operators can utilize the proposed technique to realize the reliable operation of overloaded urban networks.


Introduction
Electrical power demand is exponentially growing due to more urbanization, commercialization and industrial development. This exponential growth in demand poses operational challenges in power utilities [1][2][3]. The current infrastructure is insufficient to support such immense power demand. The congestion in transmission lines may lead to instability in the power system [4,5]. The main goal of power system operation is to encounter the request at all locations within the existing power network, both as economically and reliably as possible. However, the surge in power demands has originated several threats to the operation of distribution networks (DNs) [6]. It is a big challenge for the existing power system to handle extra demand requirements due to excessive population growth and smart cities projects for rural areas extensions.
Electricity generation in the traditional power grid is generally from fossil, hydro, nuclear resources, etc. Inherent needs of the conventional plants require their construction at remote areas far-off from the load center [7]. An adequate transmission network (may be hundreds of kilometers long) is then required to supply this generated energy to the load side. Since the existing lines are congested, and the installation of new lines requires huge investment. Therefore, researchers are looking for ways to defer this investment without compromising the stable grid operation. Moreover, lengthy lines originate more power losses and voltage drops. The high voltage drops, and power losses result in overheating and damaging of equipment [8]. It has been explored that transmission and distribution losses have a significant contribution to total power system losses. However, distribution losses are less than transmission line losses in power systems [9].
The development of technologies related to the internet of things (IoT), artificial intelligence (AI), blockchain and big data encourages power system operators to modernize power grid and smart city development [10][11][12]. It is always significant to have an efficient power system as greater losses distress the overall economy [13][14][15]. An efficient power system that meets demand uncertainties is helpful to generate deferent flexible options to initiate demand response (DR) actions [16,17]. To handle uncertainties in demand, modifications in the existing power system are required. Due to the effective amendment in the power system, private firms will be interested in investing in the supply system to encounter the active power request at each node and make it profitable for the whole community [18]. One better way of decreasing the losses is to incorporate the distributed generators (DGs) at appropriate locations in the distribution system [19]. Optimal DGs allocations are helpful in achieving improved voltage profile, reduced power losses and defer investments in transmission infrastructure [20,21]. DGs may be traditional or nontraditional and are usually connected in DNs near load centers [22]. Based on power injection, these are classified into four categories [23]: DGs, especially based on renewable energy resources (RERs), are more emerging than centralized power generation. When appropriately installed, DGs decline power loss considering power stability, voltage profile and environmental conditions [24,25]. So, optimal placement of DG is crucial; otherwise, it can further increase the power loss and originate more pronounced voltage fluctuations. This paper proposes a new selective particle swarm optimization (SPSO) approach to find optimal DGs size and location. This approach aims to catch all bus voltages within acceptable limits with minimum deviation and minimum total power loss in the system based on economic and operational objectives from the DGs and grid side. The effectiveness of the proposed method is validated using data of a real 11 kV feeder with a non-uniform load growth characteristic, which is a part of the Gujranwala electric power company (GEPCO), Pakistan. The feeder is also simulated on ETAP using optimal DGs sizes and locations obtained by SPSO, and results validate the effectiveness of the proposed method.
The rest of the paper's organization is as follows: Section 2 presents the review of research work related to the DGs sizing and siting problem. Section 3 describes the mathematical formulation of the problem and explains the proposed methodology for its solution using SPSO. Section 4 presents the distribution network used for the case study, and various SPSO simulation parameters of SPSO are presented. Section 5 contains simulation results for different cases with relevant discussion. The last Section 6 concludes the paper.

Related Work
Researchers have analyzed the problem of precise and accurate optimal placement of DG in the DNs to realize reduced losses and stable voltages utilizing different approaches. Various artificial intelligence and hybrid techniques have been proposed in the literature in addition to traditional approaches.
In References [10,[21][22][23][24][25], the authors implemented several approaches for optimal DGs location. In References [26,27], an analytical method based on generalized reduced gradient was used to an analytical method based on generalized reduced gradient was used to locate DGs optimally in a meshed network for maximum benefits. Authors in [28,29] determined the level of penetration of photovoltaic (PV) units in a distribution network using the linear programming (LP) optimization technique. Various DG assessment measures such as improvement of voltage profile, line-losses and environmental aspects using multiobjective functions applicable to single or multiple DGs had been investigated in [30]. Using metaheuristics or AI, researchers have strived to find practical solutions in the best possible way for energy management and integration of DGs [31][32][33]. Genetic Algorithm (GA) is the popular metaheuristic approach developed by Holland. Its search procedure is based on natural selection and genetics principles. The theory of natural evolution inspires it, and its various steps include selection, crossover, mutation and inheritance. In Reference [34], the optimal allocation of DG under load and generation uncertainties was studied through evolutionary approaches. The 33-node IEEE test network was used for the evaluation. The authors achieved excellent results of voltage stability and loss reduction using GA in [31], improved extended GA, a combination of GA and analytical methods in [35,36], respectively.
In literature, Particle Swarm Optimization (PSO) has been extensively used for optimal DG locating and sizing [37]. Eberhart and Kennedy developed this valuable technique in 1995 and found it useful in optimizing multidirectional functions [23]. Authors in [3,[38][39][40] implemented PSO to achieve the economic dispatch of multiple units. Due to parallel search capability, PSO can approach faster in accomplishing a global solution. Several research works have used PSO in combination with other techniques to gain more precise and accurate results. Hybrid GA-PSO [41], PSO and Linearized AC load flow [39], PSO-Compromise Programming [42], fuzzy approach and PSO [43] and discrete PSO-OPF [44] are some of the hybrid approaches. More comprehensive reviews on the DGs optimization problem can be observed in [45,46], where different algorithms and methods have been discussed.
From the literature review, it is evident that the optimized DG allocation and sizing problem remained the focus of researchers for multiple benefits at an economical cost. Traditional analytical approaches are nearly obsolete, and the modern trend is to use various variants of meta-heuristic techniques due to their simplicity, less computational effort and fast convergence. Therefore, a metaheuristic SPSO technique is proposed in this work to solve the DG placement and sizing problem.

Problem Formulation and Proposed Solution
This study's primary objective is to reduce total DN power loss and the deviation of voltage from nominal voltage while meeting the equality and inequality constraints. The DG allocation and sizing problem is modeled as a multivariate optimization problem to realize the efficient operation of DN without compromising its voltage stability. Description of the proposed mathematical model and solution technique is presented in this section.

Mathematical Model
Let's assume that N is the total number of buses, P I and Q I are the real and reactive power flows from bus I to bus I + 1, where bus voltage at the bus I is V I and resistance of the line connecting the bus I and I + 1 is depicted as R I+1 . Now the objective function is given by (1) where f 1 and f 2 represent the objectives related to real power loss P L and voltage deviation (V ID ), respectively.
Here W 1 and W 2 are weighting factors acting as priority setters for enhancement of voltage stability and decrease of power loss, respectively. B represents the total system's branches.

Inequality Constraints
The supply voltages of the system must be within the permissible limits to avoid derating of the equipment.
V min So, the minimum and maximum voltages are 0.95 V REF and 1.05 V REF , respectively, as per IEEE international standards [47] for the voltage drop in the DN for the proper safe operation of sensitive electrical equipment.
DG output is also constrained to remain within the permissible limits of reactive power (Q DG ), apparent power (S DG ), active power (P DG ) and voltages (V DG ) as represented in (8) So, the size of DG is also pre-selected between 10-60% of the total system demand. The power factor (P.F. DG ) is the preceding but not the least essential quantity, which is previously established to operate at a practical value, which is 0.85.

Equality Constraints
These constraints are used to ensure power balance. For secure operation, the total power produced in a system must be equal to the amount of power demanded by the load plus the losses throughout the power system network. These constraints are reproduced in (13) and (14).
Here P DG J and Q DG J are real and reactive power of DG J. K is the total number of DGs that are two in our cases. P Load I and Q Load I are the real and reactive power loads at bus I, respectively, whereas P L and Q L are the net active and reactive powers loss, respectively. P Grid and Q Grid denote the values of active and reactive powers drawn from the grid.
The total P and Q injected in the bus I are given in (15) and (16).
Here V I and V J are the voltage magnitudes of bus I and J, whereas θ I and θ J are the voltage angles of bus I and J, respectively, as depicted in Figure 1. g I J and b I J are the real and imaginary parts of admittance between bus I and J. The values of P, Q and V in the main function are computed by the utilization of power flow algorithm for radial distribution networks that conduct forward and backward sweeps to calculate the branch current and node voltages in the distribution system.

Proposed SPSO Algorithm
The voltage at each bus of distribution feeders must be within reference voltage ± 5% according to IEEE standards. General procedures to find optimal placement and sizes of DGs merely rely on permissible voltage limits while neglecting the accumulative power loss of the DN. In the proposed technique, we aim to find a solution in which all buses have acceptable voltages with minimum possible deviation from nominal values and minimum accumulative power loss.
To meet the stated objective, we have devised a PSO-based technique. PSO is a bird flocking and fish schooling influential optimization approach based on population, helpful in optimizing complex multidimensional problems. The algorithm initiates a population of swarm particles with assigned random velocity and position. Each swarm particle represents a solution set. The swarm particles moved in the search space to fulfill the requirements of objective function while satisfying constraints. Each particle must be evaluated by the output of the objective function against the fitness value by using a load flow algorithm. In each iteration, particles update their velocity to have a better solution according to the best-fit particle. Identifying the best-fit particle, if local fitness (p) gives better results than the current best (pbest) value, then replaced the current fitness (pbest) with local fitness (p). If current fitness is better than the global best, then set gbest = pbest. This process continues by updating the velocity and position of particles until the stopping criteria are reached, and gbest will be the optimal solution.
SPSO algorithm flowchart is depicted in Figure 2. In the beginning, system parameters are loaded in the simulation system. If some system configuration file is not available, parameters of DN under consideration can be input manually. After loading the system's parameters, values of different parameters associated with the SPSO technique such as population size, dimensions of particles and their constraint limits, number of iterations, etc. are initialized. Then a random population of the particles is initialized with random velocity and positions. Due to the inherent nature of SPSO, these swarm particles acquire random positions in search space of selected dimension D as given in (17).
Here D is the dimension of search space. S D1 is the position of particles for dimension one, S D2 is the position of particles for dimension two, similarly, the further positions of particles up to S DN represents the positions for remaining dimensions. In a distributed network, the number of loops formed equals the number of dimensions by closing all the tie-switches. Branches of a loop have constituted the search space of a dimension. However, the branches of the network which do not belong to any loop are not in any search space. Therefore, these branches are not considered in the optimization process. The SPSO can be applied to find the optimal solution after specifying the number of dimensions and the search space for each dimension. DN denotes total selected random positions in dimension D and S D reflects its collection in dimension D. S D selects the best position from the different position vectors from S D1 to S DN . In SPSO, the fitness function nature of the conventional PSO is replaced with logistic sigmoid function sig (V K+1 iD ) because respective D dimensions taken from DN positions are mapped with S D . So, the position of respective swarms in dimension D is altered from being a point in real value to selected space. The logistic sigmoid function is given by (18).
By applying sigmoid transformation to binary PSO, the velocities are confined to range of [0,1]. It must be ensured that particle position values are either 1 or 0.
The local and global best (gbest) values are updated after evaluating the fitness function. Then termination criteria regarding the number of iterations are checked at the end of each iteration. If the criteria are not met, then the positions and velocities of the particles in the swarm are updated using (20)- (22). The ith swarm position in the respective D dimension is updated by (20).
V min represents the minimum possible velocity and V max maximum velocity. For each iteration velocity of swarms updated avoids invariability in the velocity of ith swarms, velocity is updated by (22).
The same process is repeated until the termination criteria are met. The optimal solution is the value stored in gbest.

Case Study
One 11 kV radial distribution feeder of subdivision GEPCO is used for evaluation. The considered feeder is Rajewala distribution feeder which is 120 km long and comes from 132 kV Eimnabad grid station. This feeder has 506 nodes, and it supplies a total load of 14,740 kVA including domestic, industrial, and commercial loads. Results of field inspection about various parameters of this feeder such as load at each bus, segment length, resistance, inductance, impedance, etc. are depicted in Table 1. A one-line diagram of the original feeder based on the field survey is given in Figure 3. For illustration, the distribution feeder is divided into small segments within the specified nodes. Accumulating inspection data, 506 nodes are compressed to 40 nodes as depicted in the simplified diagram shown in Figure 4. It is perceived that generalization of the feeder's data will not have any influence on outcomes. The same calculations can be prepared on actual data without generalizing it to acquire approximately identical results. The only difference will be that calculations will grow complex and longer. The SPSO algorithm proceeds through all possible iterations. SPSO parameters such as swarm = 500, number of iterations = 3000, W min = 0.4, W max = 0.9 are the inertia weights. SPSO simulation is performed using MATLAB R2018Ra installed on a personnel computer with Intel Core i5-4200u processor, 1.60 GHz, 4GB RAM, x64-bit based Windows platform. The results obtained through MATLAB are also verified through ETAP.

Simulation Results and Discussion
Different simulation cases are carried out on a simplified real distribution feeder, and a comparison is made among the output results of all cases in order to validate the effectiveness of the proposed SPSO approach. Simulated cases are the following: A.
Evaluation of objective parameters without DGs B.
Evaluation of objective parameters with DGs through SPSO C.
Evaluation of objective parameters with DGs through ETAP D.
Comparison of proposed SPSO outcomes with other approaches

Evaluation of Objective Parameters without DGS
In this section, the load flow analysis is presented without DGs with the actual feeder parameters. The objective func tion values are calculated, which are then compared with the objective function values when DGs will be connected with the distribution feeder later on. The feeder retains its inherent radial nature, with current flowing in a single direction from the primary source end to the load. Without the intrusion of DGs and the network is passive. The objective of this experiment is to show that the node voltages violate the permissible limits in the case of a sole grid source supplying a whole load of a lengthy feeder with a non-uniform load growth nature. This experiment also shows that the accumulative power loss is high without DGs. Table 2 shows the load flow analysis results and objective function values. It shows that without DGs' integration, the voltages within limits are confined to the first 10 buses near to source end. After that, the voltage starts dipping to lower limits. This decrease in node voltages prevails to the last node 40 where the minimum voltage 0.77 p.u. is observed. Total voltage drops and power loss in the network are 2520.365 V and 1175.935 kW correspondingly in this case. The per-unit value of the bus voltage is shown in Figure 5.

Evaluation of Objective Parameters with DGs through SPSO
In this section, the effective optimal DG application is carried out through SPSO. The objective of this simulation is to reduce the accumulative power loss in the system and voltage profile improvement by integrating DGs through the proposed technique. Node voltages in per-unit (p.u.) values are shown in Figure 6.
SPSO parameters are such as swarm particles and iterations (K) are 500 and 3000, minimum and maximum acceleration factors are 0.4 and 0.9, respectively. Two DGs are decided to be connected with the distribution feeder. Equations (1)- (14) provide objective functions and constraints. MATLAB R2018a is employed for algorithm simulations. Figure 7 shows the convergence process of SPSO.  After running the algorithm, the optimal positions obtained for DG1 and DG2 are at bus numbers 17 and 30, respectively. The optimal sizes for DG1 and DG2 are 5802 kVA and 5232 kVA, respectively. Table 3 shows the objective function values obtained by these optimal positions and sizes of DGs after load flow analysis. With the effective implementation of DGs through the proposed SPSO, the voltages at all the nodes are now within the standard limits, and accumulative power loss is considerably reduced from 1175.935 kW to 92.444 kW. The supply from the main power grid is reduced due to the handling of excessive load by DG. Due to which less current flows in transmission lines, resulting in reduced active power loss and voltage drop. The optimal results are achieved when DGs are integrated at accurate positions.

Evaluation of Objective Parameters with DGs through ETAP
In this section simulations to validate the use of SPSO algorithm to find the positions for distributed generators are presented. The actual feeder circuit is simulated in ETAP software and DGs are connected at the optimal location with optimal size obtained from SPSO. Figure 8 shows the load flow analysis by using ETAP. This figure represents the node voltages as the percentage of nominal voltage (11 kV) in red color at each node. It can be visualized that these node voltages are within limits. Load flow analysis is conducted and obtained results through ETAP are given in Table 4. The total voltage drops, and power losses are 531.975 V and 93.720 kW, respectively. The outcomes are identical to results through SPSO implemented in MATLAB R2018a, which validate the effectiveness of the proposed technique for DG integration.  Comprehensive comparisons among the accumulative power loss and voltage drop without DG, with DGs through SPSO and ETAP are given in Figures 9 and 10, respectively. Percentage reductions in power loss and voltage drop are given in Table 5. Figures 9 and 10 show a significant improvement in voltage profile at each node with power loss reduction.  The experiment proves that the devised technique for the effective implementation of multiple DG sources under extreme load growth conditions worked efficiently.

Comparison of Proposed SPSO Outcomes with Other Approaches
In this section, the proposed SPSO algorithm for optimal DGs location has been compared with other approaches in the literature. It has been observed that SPSO algorithm optimal DGs size as compared to ABC optimization algorithm, crow search optimization algorithm (CSOA), polar bear optimization algorithm (PBOA), GA-PSO and discrete PSO (DPSO). It has been analyzed that CSOA and BPOA have given lower active power loss of about 95.80 kW and 97.10 kW, respectively. In contrast, the highest active power loss has been noticed for ABC and PSO-GA that are 105.54 kW and 101.15 kW, respectively. In addition, for reactive power loss, CSOA and PSO-GA have given lower values of about 112.572 kVAR and 115.594 kVAR, respectively. In comparison, the highest reactive power loss has been observed in DPSO and ABC, which are about 128.077 kVAR and 119.054 kVAR, respectively. However, the proposed SPSO approach gives a lower active power loss of 94.44 kW and a reactive power loss of about 109.615 kVAR. Furthermore, each method has been run for 100 times to observe the computational efficiency. The DGs optimal size with location, active power loss, reactive power loss and different computational time indicators for different methods have been summarized in Table 6. It has been explored that the execution time taken by SPSO has the lowest value of 40.06 sec compared to other approaches, which confirms the proposed strategy is computationally reasonable.

Conclusions
Optimum siting of properly sized DGs in DNs can resolve their various operational issues. On the other side, inappropriate sizing and siting can magnify voltage drops and power loss. In this work, an SPSO-based algorithm is proposed for the optimal sizing and placement of multiple DGs in DN. The node voltages can violate the permissible limits without proper DG placement. After integrating optimal DGs, the voltage profile is significantly improved, and all the node voltages remain within limits. About 78% reduction in accumulated voltage drop in the system's branches is observed as compared to the case where no DG is connected. The results are confirmed by ETAP as well. It is observed that active power loss with DGs is reduced by 92%. Initializing DGs lessens the current from the main source; therefore, voltage drop, and power loss are also declined. Installation of RER-based DGs can be beneficial for both electric utilities and consumers compared to fossil fuel-based sources. These support generation, transmission, and distribution systems cost-effectively in an eco-friendly manner. Their optimal installment is of considerable importance for energy management in smart cities. In the future, the integration of wind and PV in the existing power system can be observed with various load control mechanisms. Different protection schemes and the impact of transients in the power system can be explored. Furthermore, the demand side flexibility can be computed to initiate demand response actions in the power system integrated with DGs.