Integration of PV Distributed Generators into Electrical Networks for Investment and Energy Purchase Costs Reduction by Using a Discrete–Continuous Parallel PSO

: The problem of optimally integrating PV DGs into electrical networks to reduce annual costs (which include energy purchase and investment costs) was addressed in this research by presenting a new solution methodology. For such purpose, we used a Discrete–Continuous Parallel Particle Swarm Optimization method (DCPPSO), which considers both the discrete and continuous variables associated with the location and sizing of DGs in an electrical network and employs a parallel processing tool to reduce processing times. The optimization parameters of the proposed solution methodology were tuned using an external optimization algorithm. To validate the performance of DCPPSO, we employed the 33- and 69-bus test systems and compared it with ﬁve other solution methods: the BONMIN solver of the General Algebraic Modeling System (GAMS) and other four discrete–continuous methodologies that have been recently proposed. According to the ﬁndings, the DCPPSO produced the best results in terms of quality of the solution, processing time, and repeatability in electrical networks of any size, since it showed a better performance as the size of the electrical system increased.


General Context
Due to the accelerated population growth, the current energy crisis, and the pressing need to use renewable energy resources, numerous industries and researchers worldwide are working on proposing methodologies for the optimal integration of clean energy technologies into electrical systems [1]. Particularly, Photovoltaic (PV) systems have emerged as one of the most widely used distributed generation technologies in the past decade thanks to their low operation and maintenance costs and the abundant energy produced by the sun [2].
The integration of PV Distributed Generators (DGs) into electrical networks has been extensively studied in the specialized literature and the electric power industry. In such studies, different technical, financial, and environmental aspects have been considered, including power losses, voltage profile stability, network loadability, energy purchase and investment costs, and reduction in CO 2 emissions from fossil fuel use [3]. Selecting an objective function in real life often depends on the needs of the electrical network's users, owner, or operator [4]. However, financial aspects such as investment and operation costs are currently the main focus around the world. Thus, the primary goals of integrating PV DGs into electrical networks by using economic indices include minimizing energy purchase or production costs and, with these savings, paying for the investment and maintenance costs associated with such integration [5]. With the aim to obtain the aforementioned financial improvements and meet all technical and operating requirements for electrical grids under a distributed generation scenario, the literature proposes mathematical models that consider all of the previously mentioned information [3,5]. These mathematical models allow identifying the impact of different configurations for siting and sizing PV DGs in electrical systems on the objective function and its constraints. However, due to the fact that this problem is non-convex and non-linear, it is necessary to use high-level optimization algorithms and tools to find its solution with the best possible performance.
According to various studies published in recent years, the positive or negative impact generated by the integration of PV DGs into electrical networks on the economic conditions of the grid depend on the methodologies employed for such integration, which is why adequately selecting the solution methodology is vital [6]. Furthermore, the location and sizing (nominal power installed) of the PV DGs in the electrical grids affect the effectiveness of the energy management strategies implemented after the integration [7,8]. Thereupon, researchers have set out to develop new methodologies for solving the aforementioned problem, with the aim to obtain the best economic impact for the owner or operator of the electrical network, ensuring that the algorithm provides the best possible solution with short processing times every time it is executed and that it can consider real scenarios to meet the needs of both public and private contracts.

State-of-the-Art
The problem of optimally integrating PV DGs into electrical networks has traditionally been divided into two sub-problems: (i) the optimal location of the PV DGs and (ii) their optimal sizing. In the specialized literature, the first sub-problem has been traditionally solved using a codification composed of discrete variables that assign a particular node in the electrical system for locating a DGs, as shown in Figure 1a. In the example illustrated in such figure, a vector of size 1 × 3 is used to locate three PV DGs in an electrical system composed of 33 buses. According to this vector, the three PV DGs should be located at buses 4, 19, and 29. As observed in this example, the variables that represent the problem under analysis are discrete numbers between 1 and the maximum number of buses in the electrical system. The second sub-problem, related to the sizing of PV DGs located in the first sub-problem, has traditionally been solved using a continuous codification that establishes the nominal power for each DG to be installed in the electrical grid, as presented in Figure 1b. In the example shown in such figure, a vector of size 1 × 3 is used to define the size of three PV DGs installed in a network. According to this vector, the power of the PV DGs located at buses 4, 19, and 29 should be 0.11 kW, 1.18 kW, and 2 kW, respectively. Importantly, the power limits employed in a continuous codification are chosen between the maximum and minimum power allowed for the electrical network. These bounds are related to the energetic potential of the Sun in the area where the electrical system is located [9].
To solve the problem of optimally integrating PV DGs into electrical networks using the codification illustrated in Figure 1a,b, multiple master-slave methodologies that combine optimization algorithms have been proposed in the specialized literature. In such methodologies, the master stage solves the location problem, while the slave stage solves the sizing problem. For instance, in [10], the authors also used a master-slave methodology. Their proposed methodology combines the Chu and Beasly GA and the PSO algorithm to solve the problem of optimally integrating DGs into electrical networks. The main problem with their proposed solution methodology is that the authors did not analyze the impact of the solution in terms of processing time and standard deviation. Currently, it is essential to analyze these two parameters in order to offer high-quality solution methodologies that require short processing times and guarantee a good performance each time they are executed. Furthermore, in the mathematical model used, the authors did not consider the branch currents and voltage profile limits of the electrical systems, which is why the solution obtained is not representative of real life. In [11], the authors presented a Mixed-Integer Nonlinear Programming (MINLP) model to solve the problem of optimally locating and sizing DGs in radial distribution networks using the BONMIN solver of the General Algebraic Modeling System (GAMS). They used the 27, 33, and 69-bus test systems to locate PV DGs and considered the power capacity in Colombia during a normal day, employing seven comparison methods reported in the literature in order to demonstrate the effectiveness and robustness of the proposed methodology: particle swarm optimization and genetic algorithms [10], an optimization technique based on teaching-learning [12], the harmony search algorithm [13], the symbiotic organism search algorithm [14], and a heuristic methodology based on a loss-sensitive factor [15]. The results showed that the proposed methodology achieved the best results in all test scenarios. However, this technique requires specialized software, which increases its complexity, as it implies special requirements for installation and implementation and costs associated to the acquisition of specialized tools. Furthermore, the authors did not analyze the repeatibility and the processing times required by the proposed methodology. In [6], the authors proposed a master-slave methodology, in which the master stage employs the Genetic Algorithm (GA), the Monte Carlo method (MC), and a Loss Sensitive Factor (LSF), and the slave stage uses the Particle Swarm Optimization (PSO) algorithm; by generating in this way three different master-slave methodologies. Further, they employed a parallel processing tool to reduce the processing time required by the proposed methodology. In said study, the authors compared the results obtained by all the methods under analysis in terms of the quality of the solution, standard deviation, and processing times by using two test systems with 33 and 69 buses. They were able to demonstrate the excellent performance of the GA/Parallel PSO and found that all methodologies require longer processing times, whereas the hybrid methodologies between the LSF/PSO and MC/SO sometimes become stuck in local optima. The main limitation of this paper is that it did not analyze the standard deviation in order to evaluate the repeatability of the solutions offered by the studied methodologies.
Aside from the papers mentioned above, there are numerous studies in the specialized literature that employed master-slave methodologies to solve the problem of optimally integrating DGs into electrical networks [16][17][18]. Such methodologies share the same characteristics: (i) they are methodologies based on sequential programming that avoid the need for specialized software, (ii) they consider technical and financial aspects as their objective function and evaluate performance in terms of processing time and repeatability, and (iii) they require longer processing times to solve the problem under study. Identifying in this way the current needs of the master-slave methodologies proposed for solving the problem of optimal integration of PV DGs in AC grids.
In recent years, several authors have used a discrete-continuous codification to solve the problem under analysis jointly, as shown in Figure 1c. This single codification combines the discrete and continuous variables associated with the location and sizing problems and allows to modify continuous optimization methods to solve the problem under study by using a unique optimization method. To perform this modification, a vector with a size 1X2Ng is used, where Ng corresponds to the number of PV distributed generators located on electric grid. The adaptation made to the codification used for the continuous algorithms consists of forcing the first half of the vector to turn the continuous variables into discrete variables between 1 and the maximum number of buses in the electrical system, thus proposing a possible solution for the location problem. The remaining positions of the vector are associated with the sizing of the PV distributed generators located in the first half of the vector. As an example, in Figure 1c, it can be observed that, as in the master-slave codification, albeit using a unique vector, the PV DGs were located at buses 4, 19, and 29, with nominal powers of 0.11 kW, 1.18 kW, and 2 kW, respectively.
There are different works in the literature that take advantage of the discrete-continuous codifications explained herein. An example of this was reported in [19], where the authors employed the BONMIM solver of GAMS and a discrete-continuous version of the Chu and Beasley Genetic Algorithm (DCCBGA) to solve the problem of optimally integrating PV units into electrical networks, identifying that a commercial solver such as BONMIN becomes stuck in local optima as the nonlinearities and complexities of the problem increase, particularly regarding variations in power demand and PV generation for an average day in Colombia. The authors considered a financial objective function, whose aim was to reduce the energy purchase costs and those related to the installation of the PV DGs. The results they obtained demonstrated effectiveness and robustness of their proposed methodology. The authors, however, did not evaluate the repeatability of the obtained solution and the currents through the branches, which prevents the solution from being implemented. Despite these drawbacks, the mathematical model developed by the authors has served as the foundation to design new discrete-continuous methodologies for solving the problem of optimally integrating PV DGs into electrical networks.
Another work that takes advantage of discrete-continuous codification is presented in [20], where the authors propose a Modified Arithmetic Optimization Algorithm (MAOA) for reducing the annual costs related to energy purchasing and PV DG investment costs. Furthermore, their mathematical model included all constraints associated to the operation of AC grids within a distributed generation environment, considering the constraint associated to the maximum current allowed through the branches, which is often neglected in research and of great importance for electrical analysis. This research employed four methods for comparison: three methodologies based on metaheuristics, i.e., the DCCBGA [19], a discrete-continuous version of the Newton-Metaheuristic Algorithm (NMA) [21], and the Arithmetic Optimization Algorithm (AOA) [22]; as well as the aforementioned BONMIN solver of the GAMS software. After evaluating all solution methodologies in the 34-bus test system, the proposed methodology obtained excellent results in terms of quality of the solution but failed to evaluate the standard deviation of the solution and processing times. Using the same mathematical model, the authors of [3] proposed a discrete-continuous version of the vortex search algorithm to solve the problem of optimally integrating PV DGs into Alternating Current (AC) networks. The authors of such study reported excellent results in terms of quality of the solution and standard deviation, with an important improvement in processing times.
Finally, using the same mathematical model, in [5], the authors developed a generalized normal distribution optimization method, which outperforms the other discrete-continuous methods mentioned above in terms of the quality of the solution. However, these authors reported a considerable increase in processing times and failed to evaluate the standard deviation of the obtained solution. By comparing the results of the works that use discrete-continuous codification to those that employ master-slave methodologies, it is possible to observe a notable reduction in processing times for discrete-continuous methodologies, as well as in the standard deviation values. Additionally, these new methodologies showed the best impact on the economic indices used; they showed a tendency towards effectiveness regarding the solution, repeatability, and processing times.

Motivations, Contributions, and Scope
From the information presented in the State-of-the-Art section, we identified the importance of considering a financial objective function when addressing the issue of integrating PV DGs into electrical networks. Such an objective function should guarantee the minimization of operating costs and allow the investment costs associated with these technologies to be covered. It should also satisfy the entire set of constraints that represent the behavior of electrical networks in a distributed generation environment. Furthermore, it is crucial to propose an efficient solution technique that improves the quality of the solution and reduces processing times and the standard deviation every time they are executed. it is important to observe the growing trend in the use of discrete-continuous methodologies for achieving the aforementioned goals.
In light of this, this paper presents the discrete-continuous optimization methodology for solving the problem of optimal integration of PV DGs in electrical networks; by implementing a Discrete-Continuous Parallel version of the Particle Swarm Optimization (DCPPSO) method with the aim to reduce the annual costs and the processing times required for solving the problem under study.This solution strategy has, as the objective function, the reduction in the annual costs of electrical systems, which include the energy purchase or production costs and the investment costs associated with the installation of the PV DGs.
The selection of the DCPPSO for solving the problem of optimal integration of PV DGs in AC electrical networks was based on the excellent results reported in the literature for the PSO algorithm in solving electrical problems such as the optimal power flow, the optimal sizing of distributed generators, and the optimal operation of energy storage systems, among others [23][24][25]. Another important reason to use this optimization algorithm is related to the fact that this optimization algorithm works with a population within its iterative process, making it possible to apply parallel processing tools in order to improve its effectiveness in terms of processing times [26]. Furthermore, the literature review demonstrated that the implementation of a discrete-continuous codification allows solving problems with discrete and continuous variables such as the optimal PV DG integration problem addressed in this work, thus improving the solution along with its repeatability and processing times. Therefore, the authors of this work decided to use a discrete version of the PSO in order to solve the problem regarding the optimal integration of PV DGs in AC grids, including parallel processing techniques with the aim to reduce the processing times. This resulted in the the DCPPSO, which, to the best of the authors' knowledge, has not been used to solve the problem studied on our work.
The academic contributions made by this research are as follows: i. A detailed description of the mathematical model that represents the problem of optimally integrating PV DGs into electrical systems. This model establishes, as its objective function, the minimization of the annual costs of the network, and it considers the entire set of constraints that represent the behavior of electrical networks in a distributed generation environment. ii. A new application for the discrete-continuous parallel PSO method that allows solving problems related to PV DG integration and combines discrete (location) and continuous variables (sizing).
iii. An efficient methodology (DCPPSO) in terms of the quality of the solution, processing times, and standard deviation to solve the problem of optimally integrating PV DGs into electrical networks while considering variations in power generation and demand.
Finally, the industrial contributions of this paper are presented below: i. A new methodology for the optimal integration of DGs in AC networks that pays for the investment costs associated with the use of these technologies by making use of the energy saving costs, thus obtaining an annual costs reduction of about 27%. ii. A method for siting and sizing PV DGs that considers all operating and technical constraints posed by AC grids within an environment of distributed generation. iii. A new methodology that allows evaluating multiple PV power technologies, electrical systems, and power demand and generation scenarios with short processing times and guarantees standard deviation values lower than 0.26%. This methodology will allow electrical companies to provide multiple electrical designs in the periods of time set by both public and private contracts.

Structure of the Paper
This paper consists of six sections. Section 1 provides an introduction to the subject matter. Section 2 introduces the set of equations that compose the mathematical model that represents the problem under study. Section 3 describes the discrete-continuous optimization methodology proposed here to solve the problem of optimally integrating PV DGs into electrical networks. Section 4 presents the test systems, methods used for comparison, and aspects considered to evaluate the effectiveness, repeatability, and robustness of the proposed methodology. Section 5 analyzes and discusses the simulation results. Finally, Section 6 draws the conclusions and outlines future lines of work.

Mathematical Formulation
This section presents the mathematical model of the problem of optimally locating and sizing PV DGs into AC networks, whose aim is to reduce the associated investment, maintenance, and energy purchase costs. This mathematical model only considers the active power injected by the PV DGs installed in the electrical network, as is customary in the literature [5].
PV units were chosen as the distributed generation technology for this mathematical formulation because they are the most widely used distributed generation technology around the world. This is because it has demonstrated the best growth in terms of performance and integration complexity in recent decades and has led to reductions in investment and maintenance costs over time [27]. Additionally, we selected an objective function based on financial aspects: the need to minimize the operating costs of electrical networks and to cover the investment costs associated with PV technologies [28]. The next sub-section describes the mathematical formulation employed in order to address the problem of optimal placement and sizing of renewable energy sources based on PV generators for distribution system applications.

Objective Function
The mathematical structure of the objective function that represents the problem of the optimal integration of PV generation sources in distribution grids is presented in Equation (1).
Note that the proposed objective function in (1) is composed of two components, i.e., the annual investment ( f 1 ) and the operating costs of the electrical network ( f 2 ). The components of the objective function and the multiplying factors are presented from (2) to (5).
Equation (2) presents the function that can be used to calculate the costs of the energy purchased or produced by the conventional generators installed in the electrical network during the useful life of the PV DGs. In this equation, C kWh represents the costs (per kWh) of the energy purchased or produced by the conventional generators. Since the model works with annual values, and the aim is to estimate the total energy purchase or production costs over a year of operation, parameter T in this equation denotes the number of days in an ordinary year (i.e., 365 days). Moreover, p cg i,h is the active power supplied by each conventional generator installed at bus i during time period h, and ∆h is the time during which power is supplied by the generator located at bus i.
To annualize the costs of the energy purchased during the useful life of the PV DGs, we used two annuity factors. The first factor (F a ), which is described in Equation (3), integrates the energy purchase costs per year during the useful life of the PV DGs. In this equation, t a denotes the fixed return rate on the investments made by the owner or operator of the network over the planning horizon, and N t is the number of years that the project lasts. The second factor (F c ), which is presented in Equation (4), represents the annual increase in power demand during the planning horizon. In (4), t e denotes the percentage rise in energy purchase costs during the planning horizon. Finally, Ω N , Ω H , and Ω T are the set of buses in the electrical system, the time periods analyzed in a one-day operation, and the number of years in the useful life of the PV DGs, respectively.
Equation (5) can be employed to calculate the annual investment costs associated with the installation of the PV DGs in the electrical network, as well as their maintenance costs. In this equation, C pv denotes the cost per kW for the PV DGs; p pv i , the total PV power integrated into the electrical network; C pv OandM , the maintenance costs per kW produced by the PV DGs. In addition, Ω pv is the set that contains all the buses where the DGs were installed.

Set of Constraints
The proposed mathematical model considers all the constraints associated with the operation of an electrical network in a PV distributed generation environment. The equations that represent the technical and operating conditions of a network are presented from (6) to (13) and are described below.
∑ i∈Ω pv Equation (6)  Equation (11) establishes the maximum number of PV DGs (N avail pv ) available to be integrated into the electrical network. Finally, Equations (12) and (13), which represent the voltage and current limits allowed for the electrical network, can be used to evaluate the impact of distributed generation on the operating conditions of the network. In these equations, v min i and v max i are the minimum and maximum voltage profiles allowed at bus i, while I ij,h and I max ij denote the estimated and maximum current, respectively, allowed at the line that connects buses i and j.
The parameters used in the proposed mathematical formulation to calculate the annual investment and operating costs are presented in Table 1 and were taken from [3]. The parametrization of the test feeders used for numerical validations in this research are described in Section 4.

Proposed Methodology
This manuscript presents a new methodology for solving the problem of optimally locating and sizing PV DGs in AC and DC networks. This methodology uses a discrete-continuous codification and parallel processing to improve the trade-off between quality of the solution, processing time, and repeatability of the obtained solution every time it is executed. The proposed methodology, which corresponds to a new discrete-continuous parallel version of the PSO algorithm, is presented in Figure 2 and described below. START 1. Read the electrical system's data, the power generation and demand curves, and the parameters of the optimization method.
2. Generate de initial particle swarm using the discrete-continuous codification.
3. Solve the hourly power flow for each particle in the swarm using parallel processing.
4. Select the solution and position obtained by each particle as the best particle solution and position.
9. Have the stopping criterion been met?
5. Select the best solution of the particle swarm and its associated position as the incumbent solution to the problem. Solve the hourly power flow for particle 2.
Solve the hourly power flow for particle n.
6. Calculate the velocity vector and update the position of the particle swarm.
7. Solve the hourly power flow for each particle in the swarm using parallel processing.

Parallel proccessing
8. Update the best particle solution and position, as well as the incumbent solution to the problem. The proposed methodology consists of ten steps, which can be used to find a solution to the problem of optimally locating and sizing PV DGs in AC and DC current networks to reduce annual investment and operating costs. In step 1, the electrical system's data, the power generation and demand curves, and the parameters of the optimization methods are loaded.
In this work, we employed two curves that depict the typical behavior of PV generation and power demand in a region of Colombia during a normal day (see Figure 3) [19]. Such curves were selected with the intention of including, in the operating costs, the variations in PV generation and power demand, which allows the problem under analysis to be represented in a more realistic manner. It is important to highlight that, when these average curves were obtained by the referenced authors, with the aim to represent the energetic behavior in a particular region of Colombia, they considered the uncertainties in power demand and generation associated with both the users and the PV generators (radiance and temperature). The DCPPSO was tuned using the PSO algorithm [23], and the following parameters were obtained: a cognitive and social component of 1.93 and 1.79, respectively; a maximum and minimum velocity of 0.1 and −0.1, respectively; a range of inertia between 0.7 and 0.001; a maximum number of iterations of 219; a maximum number of non-improvement iterations of 50.
In step 2, the initial particle swarm is generated using the discrete-continuous codification presented in Figure 1c. Since the traditional PSO algorithm works with continuous variables, the variables associated with the location of the PV DGs must be discretized, guaranteeing at all times that the maximum number of buses in the electrical system under analysis is respected. The variables associated with the sizing of the PV DGs are created in the traditional manner, according to the power limits set for these devices (see Equation (10)).
In step 3, the Hourly Power Flow (HPF) is solved for each particle in the swarm using parallel processing in order to evaluate the objective function and the set of constraints. This power flow is responsible for assessing the energy purchase costs associated with the behavior of the power demand and PV generation during a normal day, as well as the investment in the PV DGs and their maintenance costs. The aim is to estimate the annual costs of these expenses over the planning horizon determined by the useful life of the PV DGs. To that end, we used an adapted version of the power flow method reported in [29], which employs successive approximations to calculate the voltages at the load terminals. In such adapted version, the location and sizing of the PV generators proposed by each particle in the swarm is assessed, taking into account the variation in power demand and PV generation in each period of the time horizon (24 h). Figure 4 describes the HPF process implemented in this research to evaluate the objective function of the problem under analysis. The algorithm starts by reading the electrical data (buses, lines, etc.) and power flow parameters (number of iterations, convergence error, and initial voltages). Then, the data on the power demanded by the loads and the power produced by the PV DGs every hour in the time horizon (24 h, i.e., a one-day operation) are loaded. These data are employed in the HPF to solve the power flow problem using the power flow method based on Successive Approximations (SA) [29]. Then, the HPF evaluates Equation (2) and validates the constraints for each hour in the period of analysis. This process is repeated until all hours in the time horizon (24 h, in this case) have been evaluated. Subsequently, the values obtained for each hour using Equation (2) are summed to calculate the overall costs of the energy purchased or produced by the conventional generators installed in the electrical network during the useful life of the PV DGs. Afterward, the annual investment costs associated with the installation of the PV DGs in the electrical network are estimated by including their maintenance costs using Equation (5). Finally, the value of the objective function is calculated and stored using Equation (1).   Step 3 is the step of the algorithm that takes up the majority of the total processing time. For this reason, and in order to improve the performance of the proposed methodology, we used parallel processing. This tool allowed us to simultaneously evaluate multiple individuals in the population and, thus, reduce the time required by step 3. Equation (14) can be used to calculate the processing time required to evaluate the entire particle swarm using parallel processing, i.e., the Parallel Processing Time (PPT). In this equation, n denotes the number of particles in the swarm; W, the number of workers in the computer; and MTPR, the longest time required to evaluate all the particles using parallel processing [30]. Moreover, function CEIL in this equation makes it possible to obtain the integer of the ratio between the number of particles (n) and the number of workers (W); this in order to determine the number of times that the MTPR is required depending on the n and W selected or used.
The remaining steps of the DCPPSO method are similar to those in the conventional PSO algorithm. In step 4, the solution and position obtained by each particle in the swarm is chosen as the best particle solution and position. In step 5, the best solution of the particle swarm and its associated position is selected as the incumbent solution to the problem. In step 6, the velocity vector is calculated, and the position of the particle swarm is updated. In step 7, the HPF is solved for each particle using parallel processing. In step 8, the best particle solution and position are updated, as well as the incumbent solution to the problem. In step 9, the stopping criteria defined for the DCPPSO algorithm are evaluated. In this case, we used the maximum number of iterations and the maximum number of non-improvement iterations as the stopping criteria. If the stopping criteria are met, the DCPPSO algorithm stops; otherwise, it begins another iteration starting from step 6.

Test Systems
Two of the most widely used test systems in the specialized literature were employed in this document in order to evaluate the effectiveness and robustness of the solution methodologies proposed to solve the problem of integrating DGs into electrical networks: the 33-and 69-bus test systems [10,31]. The next sub-sections describe both test systems.

33-Bus Test System
This test system is a radial distribution network that consists of 33 buses and 32 lines. The schematic configuration of the IEEE 33-bus grid is depicted in Figure 5.  Table 2 presents the electrical parameters of this test system. From left to right, this table specifies the sending bus (bus i), the receiving bus (bus j), the resistance and admittance of the line that connects buses i and j, and the active and reactive power demanded at node j. This test system uses a base power of 100 kw and a base voltage of 12.66 kV. To ensure a secure operation of the distribution network, the voltage limits were set to ±10% of the nominal voltage, and a maximum current of 380 A was considered, which is associated with the use of a 400-kcmil electrical conductor. We used the same electrical conductor for all the lines (a nontelescopic topology). This maximum current value was obtained by running a power flow at the hour of peak power demand, without considering the DGs installed in the electrical system. This test system consists of 69 buses and 68 lines. Its electrical diagram is illustrated in Figure 6, and its electrical parameters, which are described in [10], are presented in Table 3.  The same base power, base voltage, and voltage limits used for the 33-bus were employed in 69-bus test system. By using these values, we obtained a maximum current for this test system of 430 A, which is associated with the use of a 500-kcmil conductor. This maximum current value was obtained by running a power flow at the hour of peak power demand, without considering the DGs installed in the electrical network.

Methods Used for Comparison
To compare our proposed solution methodology, the following five optimization methods were employed (some based on commercial software and some on sequential programming): the BONMIM solver of the GAMS, the Discrete-Continuous version of the Chu and Beasly Genetic Algorithm (DCCBGA) [19], the discrete-continuous version of the Newton Metaheuristic Algorithm (DCNMA) [21], the Discrete-Continuous version of the Vortex Search Algorithm (DCVSA) [3], and the Discrete-Continuous version of the Generalized Normal Distribution Optimization (DCGNDO) method [5]. These methodologies were selected because they are the most widely used in the specialized literature and have yielded excellent results in terms of the quality of the solution, repeatability, and processing times. Moreover, the studies in which such solution methodologies were introduced employed the same test scenarios and mathematical model as those presented in Section 2 of this manuscript.

Considerations
The following are the main aspects considered in order to find a solution to the problem under analysis and assess the effectiveness of the DCPPSO: • The maximum number of DGs to be integrated into the electrical network was three, and their power limits were set to 0-2.4 p.u. [3]. • The parameters of the DCPPSO, as well as the power generation and demand curves used for all comparison methodologies were as described in Section 3. • The parameters employed for the successive approximation power flow method used in the HPF were taken from [29]. • With the aim to test the methods used for comparison, the optimization parameters were employed as reported by their authors. These used tuning methodologies to find the computational parameters for each solution methodology, thus allowing to obtain the best performance in terms of the quality of the solution and processing times. • In order to assess the repeatability and precision of the studied solution methodologies, each of them was executed 100 times, evaluating the obtained standard deviation and mean values. • All simulations were performed using Matlab 2020 in a Dell Precision T7600 Workstation with an Intel(R)Xeon(R) CPU ES-2670 @ 2.50 GHz processor and 32 GB of RAM.

Simulation Results
This section presents all the numerical validations for the proposed and comparison optimization methods in both test feeders. Table 4 shows the results obtained by each solution methodology in the 33-bus test system. From left to right, this table details the solution methodology implemented, the buses where the PV DGs were located and their installed nominal power, the annual costs (USD/year) obtained by each solution method and their percentage reduction with respect to the base case (whose values are reported in the second row of the table), the required processing time, the standard deviation obtained after 100 executions, the worst voltage profile, and the maximum current obtained in the time horizon under study. Figure 7 shows the improvements obtained by the DCPPSO with respect to the other solution methods in terms of annual costs, processing time, and standard deviation. Regarding annual costs (annual energy purchase costs plus investment costs), the DCPPSO and the DCGNDO provided the same solution (see Table 4), which is why the improvement obtained by the DCPPSO with respect to the DCGNDO was zero. When compared to the other solution methodologies, these two methods obtained an average reduction in annual costs of 0.0165%, 0.0070%, 0.0581%, 0.0150%, and 0.0024% with respect to the BONMIN solver, the DCCBGA, the DCNMA, and the DCVSA, respectively.  As for processing times, the BONMIN solver and the DCCBGA were faster than the proposed solution methodology, as they reduced processing times by 128.57% and 56.98% with respect to the DCPPSO. However, these two methods produced the worst results in terms of quality of the solution and standard deviation when compared to the DCPPSO. Hence, their improvements in processing times are not considered significant, as both methods show a fast convergence to local optima. When compared to the other solution methodologies, the DCPPSO achieved an average reduction in processing times of 83.61%, with a reduction of 58.83%, 95.11%, and 96.90% with respect to the DCNMA, the DCVSA, and the DCGNDO.

33-Bus Test System
Finally, after analyzing the improvements obtained by the DCPPSO in terms of standard deviation, it was found to be superior to the other methods. It obtained an average reduction in standard deviation of 57.45%, with a maximum and minimum reduction of 60.70% (with respect to the DCCVGA) and 42.33% (with respect to the DCNMA), respectively. These improvements obtained by the DCPPSO in the 33-bus test system demonstrate its superiority in terms of quality of the solution, processing time, and repeatability. Therefore, the proposed solution methodology is regarded as the best option to solve the problem of optimally integrating PV DGs into electrical networks to reduce annual costs. Table 5, which is organized in the same way as Table 4, presents the simulation results obtained by the solution methodologies in the 69-bus test system. Based on these results, Figure 8 illustrates the performance of the proposed solution methodology when compared to the other methods. Note that this work did not report on the performance of the BONMIN solver in this test system because it was unable to converge to a solution. This is due to the large size of the solution space, as well as the nonlinear and non-convex nature of the problem under study. When analyzing the results obtained by the DCPPSO in terms of reduction in annual costs, it provided the best results for the 69-bus test system. It showed an improvement of 0.0221%, 0.0372%, 0.0087%, and 2 × 10 −6 % with respect to the DCCBGA, the DCNMA, the DCVSA, and the DCGNDP, respectively, for an average improvement of 0.0170%. Hence, it is regarded as the best algorithm to solve the problem of the optimal integration of DGs in the 69-bus test system.

69-Bus Test System
Regarding processing times, the DCCBGA was the fastest of all the methods, with a processing time of 22.36 s. However, this method yielded the worst results in terms of the quality of the solution and its standard deviation values, which is why, when compared to the other methods, it is not considered to be suitable for solving the problem under analysis. The second-fastest method was the DCPPSO (Figure 8), with an average reduction in processing times of 63.24% when compared to the other solution methodologies.
Finally, as for the standard deviation, the DCPPSO obtained the best results, with a maximum reduction of 89.55% (with respect to the DCGNDO) and a minimum reduction of 71.64% (with respect to the DCVSA). It achieved an average reduction of 80.10% when compared to the other methodologies.
According to these results, the DCPPSO performs better than the other methods as the large electrical network increases. It produced the best results in terms of quality of the solution and repeatability, with excellent processing times. Finally, after analyzing the information in columns 6 and 7 of Table 5, all solution methods were found to meet the voltage profile and current limits established for the 69-bus test system.

Additional Comments
After applying the proposed solution methodology based on DCPPSO to determine the optimal sizes and locations of the PV generation units in radial distribution systems and comparing its results with recently developed literature approaches, the numerical results in the IEEE 33-and 69-node test feeders allowed observing that: i.
The proposed DCPPSO approach, as well as the compared methodologies, find adequate results for the studied problem, with small differences between them. However, the proposed DCPPSO approach exhibits better optimization properties regarding the ability to find the best solution for both test feeders. ii. With regard to the processing times of the proposed and comparison approaches, in the IEEE 33-bus grid, it was evidenced that the solution of the exact MINLP model in the GAMS software with the BONMIN tool has lower processing times when compared to metaheuristic techniques. However, the main problem with this solver is that it is stuck in local optimal solutions, unlike all the metaheuristic-based optimization approaches used for comparison. In addition, in the case of the IEEE 69-bus grid, it was observed that the BONMIN solver does not ensure convergence to any feasible solution, which confirms the high complexity of the exact MINLP model. iii. For comparing metaheuristics, a typical approach is based on assessing their numerical performance via standard deviations as presented in Tables 4 and 5. These results confirmed that the proposed DCPPSO is the most effective metaheuristic-based approach to solve the studied problem. However, in the IEEE 33-bus system, the standard deviation of the BONMIN solver is zero, which is not the case of the DCPPSO. This is an understandable result, since the BONMIN solver deals with the MINLP model by using a combination of the Branch and Bound method with interior points, which implies that, for the same inputs, the results will be the same. However, it does not have the ability to escape from local optimal solutions, unlike the proposed DCPPSO approach. This makes the DCPPSO the best solution alternative for the problem analyzed in this research. iv. The numerical performance regarding processing times when comparing the DCCBGA and the proposed DCPPSO showed that, in both test feeders, the first approach takes only a few seconds when compared to our proposal. This situation is explained by the fact that the DCCBGA evaluates the initial population one time, and, at each iteration, only two new individuals are evaluated, i.e., if the population size is N i and the number of iterations is t max , then the total evaluations of the DCCBGA is N i + 2t max ; whereas our proposal is a population-based approach that evaluates N s individuals in each iteration, which implies, after the search process ends, a total of (t max + 1)N s . These evaluations of the potential solutions for both approaches (DCCBGA vs. DCPPSO) clearly demonstrate that the proposed DCPPSO approach requires additional processing times. Nevertheless, this translates into better solutions in comparison with all metaheuristic-based approaches.

Conclusions
This work proposed a new methodology for solving the problem of optimally integrating PV DGs into electrical networks to reduce annual costs (including energy purchase and investment costs). The proposed solution methodology uses the Discrete-Continuous Parallel Particle Swarm Optimization method (DCPPSO), which considers both the discrete and continuous variables associated with the location and sizing of DGs in an electrical network. The optimization parameters of the proposed solution methodology were tuned using the PSO algorithm. To validate the performance of the DCPPSO, we employed the 33and 69-bus test systems and compared it with other five solution methods, one of which uses specialized software and the others employ a discrete-continuous codification.
Regarding the results obtained in the 33-bus test system, the DCPPSO achieved an average reduction in annual costs, processing times, and standard deviation of 0.0165%, 13.0586%, and 57.45%, respectively. This demonstrates its excellent performance in terms of effectiveness and repeatability in small electrical networks. By analyzing the results reported for the 33-bus test system, it is possible to notice that the implementation of metaheuristic algorithms allowed obtaining solutions with an average reduction in annual cost of 0.53% with respect to the commercial software highly used in the literature (the BONMIN solver of GAMS), with a maximum standard deviation value of 0.08%, with the DCPPSO thus being the solution methodology with the best performance. This is due to the fact that the mathematical formulation of the DG location problem includes a non-linearity that prevents exact methods such as the BONMIN solver from obtaining the optimal solution, trapping them in local optima.
As for the 69-bus test system, the authors of this manuscript did not evaluate the performance of the BONMIN solver because it was unable to solve the nonlinear and nonconvex problem associated with this electrical system. This proves that as the size of the electrical system increases, the complexity of the problem under analysis increases too. Regarding the results obtained by the other methods in this test system, the DCPPSO achieved an average reduction in annual costs, processing times, and standard deviation of 0.0170%, 32.56%, and 80.10%, respectively. Hence, the proposed solution methodology presented the best performance and repeatability.
When comparing the results obtained in the 33-and 69-bus test systems, the DCPPSO achieved an average reduction in annual costs, processing times, and standard deviation of 0.0005%, 19.5014%, and 22.65%, respectively. This demonstrates that the larger the solution space, the better the quality of the solution provided by the DCPPSO. Thus, it is possible conclude that the proposed solution methodology is the best option to solve the problem of optimally integrating PV DGs into electrical networks to reduce annual costs.
Future studies should consider using an objective function focused on technical and environmental aspects as well, with the aim of analyzing the financial, technical, and environmental impacts of integrating PV DGs into electrical networks. Furthermore, they could consider integrating energy storage systems in parallel with PV DGs in order to improve the financial impact of distributed generation resources on annual costs and other aspects used as objective functions.