Optimal Allocation of Large-Capacity Distributed Generation with the Volt/Var Control Capability Using Particle Swarm Optimization

: Widespread interest in environmental issues is growing. Many studies have examined the effect of distributed generation (DG) from renewable energy resources on the electric power grid. For example, various studies efﬁciently connect growing DG to the current electric power grid. Accordingly, the objective of this study is to present an algorithm that determines DG location and capacity. For this purpose, this study combines particle swarm optimization (PSO) and the Volt/Var control (VVC) of DG while regulating the voltage magnitude within the allowable variation (e.g., ± 5%). For practical optimization, the PSO algorithm is enhanced by applying load proﬁle data (e.g., 24-h data). The objective function (OF) in the proposed PSO method considers voltage variations, line losses, and economic aspects of deploying large-capacity DG (e.g., installation costs) to transmission networks. The case studies validate the proposed method (i.e., optimal allocation of DG with the capability of VVC with PSO) by applying the proposed OF to the PSO that ﬁnds the optimal DG capacity and location in various scenarios (e.g., the IEEE 14- and 30-bus test feeders). This study then uses VVC to compare the voltage proﬁle, loss, and installation cost improved by DG to a grid without DG.


Introduction
An international agreement was signed in Paris to maintain the global temperature increase below 2 • C. Countries worldwide are increasing the number of distributed renewable energy resources to reduce greenhouse gas emissions. Thus, many studies have been conducted to design a reliable and stable connection between distributed renewable energy resources and the system. For example, a study found that connecting distributed generation (DG) to the system could reduce line losses [1]. Such a reduction in line losses creates economic benefits for the entire system. Accordingly, studies based on technical and economic considerations have been conducted on optimizing DG capacity and location [2]. In these studies, it is efficiently feasible to use DG that has a positive effect on the system [3][4][5][6][7].
In various DG types, some generations are difficult to control the amount of power generated by itself such as photovoltaic (PV) and wind power generation. As these generators increase in the grid, they start to impact on grid operations because they need to gain power grid flexibility that deals with their variability and uncertainty. One of the suggested solutions is reactive power control. Reactive power control has been studied in various directions [8][9][10][11]. In this paper, Volt/Var control (VVC) was adopted as a method of controlling reactive power and applied to the system. VVC usually operates through an inverter installed in each DG and supplies or consumes reactive power depending on the voltage of the bus on which DG is installed [12]. This process stabilizes the grid voltage and increases its flexibility. In this paper, we place importance on the operation

Contributions and Findings
This study solves a DG optimization problem (e.g., the capacity and placement of DG) using PSO, one of the meta-heuristic methods. PSO has the advantage of being faster and requires relatively few parameters than other heuristic methods. Therefore, in this paper, PSO is used to solve the optimal allocation problem of DG. The difference between previous studies and this study is that the proposed PSO algorithm has not only a VVC function added to stabilize the voltage on the grid but also a load profile (e.g., 24-h data) that increases the feasibility of DG allocation. Additionally, it shows the difference from the previous studies by considering the voltage magnitude variations, losses, and installation costs of DG in the OF. Therefore, this study optimally allocates DG in a more feasible way than the previous studies.
Many studies have optimized DG with the ability of VVC, but no research has suggested an algorithm that applies both VVC and load profiles to PSO. Thus, the objective of this study is to not only discover the optimal DG capacity and location using PSO but also enhance it to optimize DG when reflecting load profiles. The proposed OF considers the economic benefits in installation costs and line losses in conjunction with the voltage regulation. The case studies verify the proposed method by optimizing DG in the known test feeders (e.g., the IEEE 14-and 30-bus test feeders). The case study results compare voltage profile improvements that determine the effect of the VVC of optimized DG on voltage. Additionally, the optimization results are compared to the optimization solution of the GA.

Structure
The remainder of this paper is organized as follows. Section 2 lists considerations necessary to connect DG to systems. Section 3 describes existing PSO and GA methods without VVC, while Section 4 presents the proposed methodology with VVC and load profiles. Section 5 introduces the case studies and their results (e.g., the IEEE 14-and 30-bus test feeders). Finally, Section 6 presents the major findings of this paper.

Problem Statement
DG reduces peak load due to active power injection and can reduce line losses if appropriately coordinated with the system. DG can also compensate for the shortcomings of the centralized energy system, which requires high construction costs and a long construction period. This study optimally allocates DG capacity and location by considering the following: • Location and VVC. DG can be installed on all buses except for a slack bus. Buses to which DG systems are connected can participate in VVC. A target voltage magnitude is set at 1.00 p.u to maximize the effect of VVC on the system. • Capacity. In this paper, it is assumed that DG systems are connected to the transmission system in the form of a large-capacity energy resource (e.g., conventional generators, PV, or wind farms). However, the capacity of DG does not exceed the system's base MVA (e.g., S base ).

•
Load profile. The optimization should be in conjunction with load profile data.
For this purpose, this study combines a PSO algorithm that includes the VVC ability of DG. For practical optimization, the PSO algorithm is enhanced by applying load profiles. The focus of this paper is to stabilize the voltage of the system by using DG and to minimize the line losses and installation costs of DG. That is, the OF in the proposed PSO method considers voltage variations, line losses, and economic aspects of deploying DG (e.g., installation costs).

Distributed Generation
The installation costs of DG should be considered when placing DG in the system. Moreover, connecting DG systems to all the buses is not feasible. The DG reactive and active power should exist within the minimum and maximum values of each DG source.
where i = bus location (e.g., bus number), P i max = maximum active power of ith DG, P i min = minimum active power of ith DG, P DG , i = active power of ith DG, Q i min = minimum reactive power of ith DG, Q i max = maximum reactive power of ith DG, Q DG,i = reactive power of ith DG.
The sum of the DG and generator capacities should be equal to the sum of loads and losses.
where P DG , i = generation output of ith DG, P g,i = generation output of the ith generator, where V i min = minimum voltage magnitude of the ith bus, V i max = maximum voltage magnitude of the ith bus, V i = voltage magnitude of the ith bus.

Particle Swarm Optimization
A PSO algorithm can be used to solve the problem of obtaining optimized capacity and location for DG systems. PSO attempts to discover an optimal solution through a candidate particle. Particles remember the property of velocity and position, whose locations are repeatedly calculated by Equation (4) while reproducing the velocity vector. The best particle position (P best ) is created through an iterative process and converges to the best swarm position (G best ), where v = velocity, x = position, w = coefficient of inertia, rand = random number, c 1 and c 2 = weight coefficient value.
Based on the iterative equation, x is closer to an optimum (e.g., G best ). Figure 1 shows the workflow of a typical PSO algorithm for optimal DG allocation.
The parameters that make up the PSO play an important role in expressing the outcome of the PSO. Therefore, it is necessary to properly adjust the inertia weight w and the acceleration constants c 1 and c 2 . The values of the parameters are set as follows: w min = 0.4, w max = 0.9, c 1 and c 2 = 2.
The number of particles = 100 and the number of iterations = 100.

Volt/Var Control
In large-capacity PV and wind farms, which can be seen as a type of DG, inverters are included when connected to the grid. VVC works in this inverter. That is, the inverter either supplies or consumes reactive power by the droop control method according to the voltage of the corresponding bus. The detailed control method of VVC is shown in Figure 2 and Equation (6). Due to the nature of distributed power supply, utilizing the function of VVC works effectively in solving the local voltage problem [27].
VVC improves a voltage magnitude profile in the power system where DG is connected. Both the injection and absorption of reactive power depends on the voltage magnitude of a bus to which DG is connected. Such a VVC method is expressed in Figure 2, and Equation (6) describes the operation of VVC.

Volt/Var Control
In large-capacity PV and wind farms, which can be seen as a type of DG, inverters are included when connected to the grid. VVC works in this inverter. That is, the inverter either supplies or consumes reactive power by the droop control method according to the voltage of the corresponding bus. The detailed control method of VVC is shown in Figure  2 and Equation (6). Due to the nature of distributed power supply, utilizing the function of VVC works effectively in solving the local voltage problem [27].
VVC improves a voltage magnitude profile in the power system where DG is connected. Both the injection and absorption of reactive power depends on the voltage magnitude of a bus to which DG is connected. Such a VVC method is expressed in Figure 2, and Equation (6) describes the operation of VVC.

Volt/Var Control
In large-capacity PV and wind farms, which can be seen as a type of DG, inverters are included when connected to the grid. VVC works in this inverter. That is, the inverter either supplies or consumes reactive power by the droop control method according to the voltage of the corresponding bus. The detailed control method of VVC is shown in Figure  2 and Equation (6). Due to the nature of distributed power supply, utilizing the function of VVC works effectively in solving the local voltage problem [27].
VVC improves a voltage magnitude profile in the power system where DG is connected. Both the injection and absorption of reactive power depends on the voltage magnitude of a bus to which DG is connected. Such a VVC method is expressed in Figure 2, and Equation (6) describes the operation of VVC.  If the bus voltage drops below the set value (i.e., V 2 ), the bus is supplied with reactive power from the DG. If the voltage rises above the set value (i.e., V 3 ), the bus consumes reactive power. The controlled reactive power is obtained as the pu value from the result of Equation (7). Injected reactive power is used in the power flow equations. That is, the reactive power is either injected or consumed in the buses while iteratively adjusting the voltage magnitude within the set value. For example, Q(V) determined by Equation (6) iteratively calculates the new active and reactive power set point (S The VVC method should be implemented using a power-flow algorithm because Q in Equation (6) depends on V. Thus, this paper implements the established Newton-Raphson method. The detailed power-flow method is presented in the Appendix A.

Load Profile
The electric load changes by time because of changes in various factors such as demand, weather, and season. Thus, it is necessary to consider the variability of the load. Many studies have optimized DG with the ability of VVC but applying both VVC and load profile data to PSO is rarely examined [17,28]. For practical optimization, moreover, the PSO algorithm is enhanced by applying load profile data. Figure 3 shows the variation of the load for 24 h, obtained from the load fluctuation for one year in [29]. The load data are used as an input for DG optimization. The load at the peak time (1 p.m.) is set to 1 pu.

Objective Function
This study optimizes DG with the ability of VVC by PSO. In the optimization process, load profile data are applied. That is, the proposed PSO algorithm optimally determines the location and capacity of DG while taking all the load data into account in the OF. The OF of the proposed PSO method for the optimal allocation of DG systems includes voltage magnitude regulation, installation costs, and line losses.
The voltage magnitude variation is calculated by the Newton-Raphson power-flow calculation method when DG systems participate in VVC. Thus, either injected or consumed reactive power (i.e., Q) maintains the optimal voltage magnitude as close to the unity value (i.e., 1.0) as possible. Maintaining voltage in the power system is very important for stability. For example, the optimal allocation of DG considered voltage stability in [30]. The voltage magnitude range that must be maintained can be formulated by ( ) where Vi,h = voltage at bus i and time h, N = the last number of buses in the test feeder, The test feeder is equipped with DG systems, but the proposed method does not limit

Objective Function
This study optimizes DG with the ability of VVC by PSO. In the optimization process, load profile data are applied. That is, the proposed PSO algorithm optimally determines the location and capacity of DG while taking all the load data into account in the OF. The OF of the proposed PSO method for the optimal allocation of DG systems includes voltage magnitude regulation, installation costs, and line losses.
The voltage magnitude variation is calculated by the Newton-Raphson power-flow calculation method when DG systems participate in VVC. Thus, either injected or consumed reactive power (i.e., Q) maintains the optimal voltage magnitude as close to the unity value (i.e., 1.0) as possible. Maintaining voltage in the power system is very important for stability. For example, the optimal allocation of DG considered voltage stability in [30]. The voltage magnitude range that must be maintained can be formulated by where The test feeder is equipped with DG systems, but the proposed method does not limit the number and capacity of DG systems. However, if many DG systems are installed, the installation cost of the OF will increase and function as a penalty. Thus, the system adds an adequate installation capacity cost of DG (i.e., C cost ) to the OF.
where C DG is the average installation cost of DG in USD/kW (e.g., 3.975 USD/kW) and M is the last number of DG.
If optimal DG are added to the system, they can decrease line losses because of the reverse power flow. If the losses increase, it will negatively affect the system. Thus, the losses (e.g., S loss, i, h ) are also added to the OF.
where B is the last number of branches in the test feeder and S loss is the complex loss of branch i.

Normalization
The factors defined in the OF vary, so normalization is necessary. This study examines the worst case of each component and divides each value by the worst-case value. For example, the voltage magnitude should be within ±5% [31] or ±10% [32] according to the standards, so the worst case is when the voltage magnitude of all the buses is 10% away from the unity value. The worst case of losses is when the loss occurs at 10% of the base MVA (e.g., S base ) in all branches.
The worst-case installation cost is assumed when the maximum capacity of DG is installed in all the buses. Therefore, normalization is equivalent to,

Objective Function Evaluation
Each element of the OF either improves or deteriorates as DG is installed. The reflection rate is equally adjusted through the normalization of all three elements in the OF. Therefore, the OF value is expressed as the sum of the three normalized elements. Finally, the proposed PSO algorithm combined with VVC and load profile data finds the optimal allocation of DG to minimize the sum of these three factors (14) and (15) that represent the final OF value. That is, the proposed method is to minimize the sum of each OF element from (11) to (13). In other words, each element with normalization is reflected in the following OF at the same rate, Min C obj (15)

Workflow of the Proposed Method
This study optimally allocates the capacity and location of DG with the ability of VVC by PSO. In the PSO process, load profile data are also applied. Figure 4 is a flowchart of the proposed PSO/VVC algorithm, which includes the Newton-Raphson method implementing the proposed VVC algorithm. The OF of the PSO algorithm reflects the improved voltage magnitude and reduced line losses through VVC. The calculated OF determines the optimal location and capacity of DG with the ability of VVC in the iterative PSO process. For example, until all the load profile data are applied, the VVC loop in Figure 4 repeats the calculation of power flow and the evaluation of the OF. As a result, this study optimizes DG when considering all the load data. The following case studies, which use the proposed PSO/VVC algorithm, include the IEEE 14-and 30-bus test feeders to confirm the proposed methods and optimize DGs location and capacity with VVC.

IEEE 30-bus Test System
This study validates the proposed PSO method incorporated by the ability of VVC of

IEEE 30-Bus Test System
This study validates the proposed PSO method incorporated by the ability of VVC of DGs and load profile data by optimizing the DGs in the test systems (i.e., the IEEE 14and 30-bus test systems) in Figure 5. The test systems representing an approximation of the American Electric Power system were proposed for research and educational purposes in 1962. One of them, the IEEE 30-bus test system in Figure 5, includes 30 buses, 21 loads, 5 P-V buses, and 4 tap-changing transformers. Table 1 illustrates the detailed operation data points for VVC, which are defined in Figure 2 and Equation (6). Slack and P-V buses are simulated with a target voltage of 1.00 pu to minimize a variation in the voltage magnitude to the unity value.
In the first validation step, Figure 6 shows the OF values of the previous and proposed methods. All the OF values converge as iteration progresses. To prevent PSO from approaching the local optimum or converging to an incorrect value, if power flow calculation does not converge, the OF value was set high so that it could be excluded from the optimal convergence value. Therefore, the values representing the error were gradually removed, in other words, naturally dropping out of the optimal solution. In the case study of this paper, the OF values that ensure the convergence of PSO are summarized. The first previous method includes neither VVC nor the load profile in PSO. In other words, only the peak load is used in the first method. The second previous method applies only load profile data to PSO. The proposed method includes both VVC and load profile to minimize the OF value. In addition to PSO, to validate the optimization of the proposed method, it is compared to the value calculated by GA using the same objective function. For this purpose, a GA is implemented to verify the proposed PSO method for an optimal DG allocation problem. The GA includes initialization, suitability determination, new population creation (e.g., crossover and mutation), and iterations. This study uses arithmetic crossover per offspring = 0.9, uniform mutation = 0.1, the number of generations = In the first validation step, Figure 6 shows the OF values of the previous and proposed methods. All the OF values converge as iteration progresses. To prevent PSO from approaching the local optimum or converging to an incorrect value, if power flow calculation does not converge, the OF value was set high so that it could be excluded from the optimal convergence value. Therefore, the values representing the error were gradually removed, in other words, naturally dropping out of the optimal solution. In the case study of this paper, the OF values that ensure the convergence of PSO are summarized. The first previous method includes neither VVC nor the load profile in PSO. In other words, only the peak load is used in the first method. The second previous method applies only load profile data to PSO. The proposed method includes both VVC and load profile to minimize the OF value. In addition to PSO, to validate the optimization of the proposed method, it is compared to the value calculated by GA using the same objective function. For this purpose, a GA is implemented to verify the proposed PSO method for an optimal DG allocation problem. The GA includes initialization, suitability determination, new population creation (e.g., crossover and mutation), and iterations. This study uses arithmetic crossover per offspring = 0.9, uniform mutation = 0.1, the number of generations = 100, and the number of population members = 100, which is determined by the trial-and-error method. In Figure 6, the converged OF value of the proposed method is the lowest. Table 2 presents the optimal location and capacity of DG as a result of PSO simulated in the IEEE 30-bus test feeder, and the result of GA is presented in Table A1 in Appendix A.2. By applying a load profile to each model, the voltage magnitude profiles are shown in Figure 7. The proposed method maintains the voltage magnitude closest to the unity value compared to the previous methods. Figure 8 shows the total line losses for 24 h. Table 3 indicates the detailed OF in (14). value compared to the previous methods. Figure 8 shows the total line losses for 24 h. Table 3 indicates the detailed OF in (14).  16.29 ---- The first model does not include DGs, but load profile data are applied, which is denoted as "without DG." In Figure 7, the case indicates the severest voltage variation. In Figure 8, the case also shows the highest line losses. Although the installation cost of the case in Table 3 is zero, the converged OF value is highest (i.e., 0.0936). Thus, the case is set to the base value (i.e., 100%) for comparison.
In Figure 7, the first previous method (with PSO without VVC and load profiles) presents the second severest variation in the voltage magnitude because VVC is not applied.   Figure 6 represents a larger value than the proposed method, so it validates the effectiveness of the proposed method.    Figure 6 represents a larger value than the proposed method, so it validates the effectiveness of the proposed method.   Line losses(pu) Figure 8. Line losses profile. The first model does not include DGs, but load profile data are applied, which is denoted as "without DG." In Figure 7, the case indicates the severest voltage variation. In Figure 8, the case also shows the highest line losses. Although the installation cost of the case in Table 3 is zero, the converged OF value is highest (i.e., 0.0936). Thus, the case is set to the base value (i.e., 100%) for comparison.

Objective function value
In Figure 7, the first previous method (with PSO without VVC and load profiles) presents the second severest variation in the voltage magnitude because VVC is not applied. In fact, since this model includes neither the load profile data nor VVC in the process of PSO, this study produces Figure 7 by applying the load profile data after the optimization of DG via PSO. In Figure 6, the OF value of the first previous model converges to 0.0637. However, when the load profile data are applied to this model, the OF has a higher OF value compared to the previous second and proposed methods. The result of the GA in Figure 6 represents a larger value than the proposed method, so it validates the effectiveness of the proposed method.
For comparison, the second previous method applies load profile data to PSO but VVC is not applied. In Figure 7, as DG is optimally installed, the voltage profile improves, which is comparable to [17,34,35]. In Figure 8, the line losses reduce significantly over 24 h because only the load profile is applied to PSO. That is, as a result of optimally selected DG, the line losses reduce, which is comparable to [13]. Compared to the model without DG as a reference, the voltage variation reduces to 36.52%, and line losses reduce to 12.89% in Table 3. However, in Figure 7, the voltage variation is higher than the proposed method because VVC is not applied. In Figure 8, the proposed method shows higher line losses than the first, second previous, and GA methods. However, in Table 3, the proposed method improves the voltage profile and reduces installation costs. In Table 3, the voltage variation decreases to 26.01% and line losses to 21.32% compared to the model without DG. The voltage variation and line loss of the GA are 0.0152 and 0.004, respectively, which are lower than the proposed method, but the installation cost is 0.0236, which is higher than the proposed method. Therefore, with a slight difference, the result of the proposed method shows a lower OF value than the GA method. Since the converged OF value of the proposed method is the lowest, it meets the objectives of this paper.

IEEE 14-Bus Test System
The second validation uses the IEEE 14-bus test feeder in Figure 9. The 14-bus test feeder includes a slack bus, four P-V buses, and nine P-Q buses. The detailed system data of the test feeder are available in [36]. The methods presented in the previous case study are also applied to the IEEE 14-bus test feeder. Figure 10 shows the convergence of OF values of the previous and proposed methods. Figure 11 indicates the voltage magnitude profiles of each method. Figure 12 presents the total line losses. The optimal location and capacity of DG systems are presented in Table 4. The detailed OF values of each method are shown in Table 5. In Figure 10, the proposed method converges fastest. Similar to the previous case study, since the proposed method contains VVC, the voltage variation is lower than the other two methods (e.g., "without DG" and the first previous model) in Figure 11. In Figure 12, the total line losses of the proposed method are not low because of reactive power either injected or absorbed by VVC when compared to the first and second previous methods. However, the converged OF value of the proposed method (i.e., 0.0500 in Table 5) is the lowest compared to the other methods (i.e., 0.0698 and 0.0568 in Table 5). This is because the installation cost of the proposed method with less DG capacity than the other methods is the lowest. For example, Figure 11 shows that the voltage magnitude of the proposed method is within 5% for the entire simulation period. Although the voltage variation of the proposed method is not the lowest (e.g., 0.0216 of the second case study versus 0.0218 of the proposed method in Table 5), the installation cost of the proposed method is the lowest. The voltage variation and line losses of the GA are lower than the proposed method. However, because the installation cost is higher, the OF of the GA shows a higher value than that of the proposed method, with a slight difference. In Table 5, as a result, the line losses and voltage variation of the proposed method reduce to 51.38% and 53.56% compared the case without DG, respectively. The converged OF value of the proposed method is the lowest, which means that enough optimization has been achieved.

Conclusions
In this paper, we aimed to find the location and capacity of DG that minimize the OF value consisting of voltage variation, line losses, and installation costs by applying VVC and load profile to PSO. We compared five models in two test systems to verify the valid-

Conclusions
In this paper, we aimed to find the location and capacity of DG that minimize the OF value consisting of voltage variation, line losses, and installation costs by applying VVC and load profile to PSO. We compared five models in two test systems to verify the valid-

Conclusions
In this paper, we aimed to find the location and capacity of DG that minimize the OF value consisting of voltage variation, line losses, and installation costs by applying VVC and load profile to PSO. We compared five models in two test systems to verify the validity of the algorithms presented in this paper. The first comparison model without DG (denoted as "without DG") is a fundamental model of the test system and presents the highest voltage variation and line losses. Despite the installation cost being zero, its OF value is the highest. The second model (denoted as the first previous model) does not include VVC and load profile in PSO. This model applies only the peak load, resulting in the low line losses at the peak time. However, the voltage variation and overall line losses are higher than the other models. The third model (denoted as the second previous model) uses the 24-h load profile data. Additionally, this model to which VVC is not applied presents lower line losses and OF value than the previous models ("without DG" and the first previous model). GA and proposed models include VVC and load profile data. The two models show similar OF values, but the proposed method shows a lower OF value. The objective of this study is to enhance the PSO by using both VVC and load profile data. In the two test systems, the proposed method successfully optimizes DG to grid by reducing voltage variation and line losses by more than 50% over the conventional model without DG.
Tests in this paper were conducted on only the IEEE 14-and 30-bus test feeders. The IEEE-14 and 30-bus test feeders are large transmission systems (e.g., a base capacity of 100 MVA). Thus, large-capacity PV and wind farms, an example of large-capacity DG, can be optimally allocated in the transmission networks via the proposed PSO algorithm. However, it may be different from the results of this study in small distribution grids, which can be future work. That is, extension studies for grids with more complex and small capacity systems, longer-period load profile data, and unbalanced three-phase systems (e.g., 8760 h) are required as another future work. In addition, since the system tested in this paper is a theoretical test feeder, there is a limitation in directly applying the proposed PSO algorithm to an actual system. Therefore, in order to be applied to a real system, it is necessary to expand the proposed PSO algorithm to simulations based on actual field data.   This study implements the established Newton-Raphson method. The method initially defines the solution set (x), including the angle (δ) and the magnitude (V) of the voltage, where P and Q are the active and reactive power balance equations, respectively. The method also defines the Jacobian matrix (J): where ∆y is the mismatch between active and reactive power balance. The slack bus is assumed to be the first bus. After starting with the initial solution set (e.g., x (0) ), the method continues to satisfy the following convergence: The method repeats Equations (A3)-(A6) until the power mismatch reaches within a specific value. This paper does not consider the variation of the power generation and load of DG that changes over time, and in the future, it is necessary to study the location and capacity of DG considering these points and more detail variation factors.