Investigation of Optimal PV Allocation to Minimize System Losses and Improve Voltage Stability for Distribution and Transmission Networks Using MATLAB and DigSilent

Electricity generation from renewable energy sources such as solar energy is an emerging sustainable solution. In the last decade, this sustainable source was not only being used as a source of power generation but also as distributed generation (DG). Many literatures have been published in this field with the objective to minimize losses by optimizing the DG size and location. System losses and voltage profile go hand-in-hand; as a result, when system losses are minimized, eventually the voltage profile improves. With improvement in inverter technologies, PV-DG units do not have to operate at a unity power factor. The majority of proposed algorithms and methods do not consider power factor optimization as a necessary optimization. This article aims to optimize the size, location, and power factor of PV-DG units. The simulations are performed on the IEEE 33 bus radial distribution network and IEEE 14 bus transmission network. The methodologies developed in this article are divided into two sections. The first section aims to optimize the PV-DG size and location. A multi-objective function is developed by using system losses and a voltage deviation index. Genetic algorithm (GA) is used to optimize the multi-objective function. Next, analytical processes are developed for verification. The second section aims to further enhance PV-DG by optimizing the power factor of PV-DG. The simulation is performed for static load in both systems, which are the IEEE 33 bus radial distribution network and IEEE 14 bus transmission network. A mathematical analytical method was developed, and it was found to be sufficient to optimize the power factor of the PV-DG unit. The results obtained show that voltage stability indices help minimize the computation time by determining the optimal locations for DG placement in both networks. In addition, the GA method attained faster convergence than the analytical method and hence is the best optimal sizing for both test systems with minimum computation time. Additionally, the optimization of the power factor for both test systems has demonstrated further improvement in the voltage profile and loss minimization. In conclusion, the proposed methodology has shown promising results for both transmission and distribution networks.


INTRODUCTION
The recent development in distributed generation (DG) technologies has started to reshape the conventional power generation and distribution (Keane et al., 2013). DG is categorized into renewable and fossil fuel-based energy sources. Renewable energy sources include solar photovoltaics, wind turbines, biomass generation, and micro-hydro generators. Within the last decade, the worldwide DG capacity has grown significantly. Global investments for DG technologies have increased from $30 billion to $150 billion (Fraser et al., 2002).
The traditional electricity generation is confined to a centralized power generation system. These systems consist of few large-scale power generation units, which are connected to transmission and distribution networks. These networks supply power to the industries and commercial and domestic customers. In a centralized system, a large quantity of power is generated, and the power flow is unidirectional (Di Santo et al., 2015). However, for a DG system, the small-scale generation units are directly connected to the distribution network. These DG units vary from few megawatts to small kilowatts; hence, a bidirectional power flow is achieved (Abapour et al., 2015).
These centralized power generations are usually fossil fuel-based power generations. The production of electricity is one of the major contributors of greenhouse gases. In this sector, CO 2 is considered the major contributor of greenhouse gases emitted in the atmosphere, whereas methane and nitrous oxide are other emitters. These gases cause climate change by trapping heat inside our atmosphere. This increase in the global temperature results in extreme weather, rise in sea level, droughts, and increase in wildfires. Since electricity is the backbone of any growing economy, the energy consumption and demand will increase rapidly. Utilities are tasked with providing reliable and safe power to all the customers within their networks.
In recent years, the development of centralized fossil fuel-based power generations has been stalled due to the depletion of fossil fuels, transmission costs and losses, huge capital cost, and increase in environmental concerns (Zubo et al., 2017). Hence, the demand for greener and more efficient methods of power generation and distribution has increased. Distribution networks with a high penetration of renewable DGs have started to prevail.
Research has revealed that, at any instance, the surface of the earth receives approximately 1.8 × 10 11 MW of power from solar radiations. This is more than enough to fulfill the world's power demand (Shah et al., 2015). Solar energy can be harvested in two forms, namely, thermal and photovoltaic. However, the photovoltaic form is the more feasible option (Sangster, 2014).
In addition, with the changes in energy sector regulations, many countries are expected to integrate large-scale renewable generation into the existing grid. For example, in the year 2015, China's total installed photovoltaic capacity was 43.18 TW. China is becoming the largest photovoltaic generation capacity-installed country in the world (He et al., 2018). As of March 2017, a 12.2 GW solar power capacity was installed by India. The Government of India has announced its mandate to enhance solar energy production to 100 GW by 2022 (Kadam et al., 2017).
Due to the uncontrollable nature of PV-DG, the integration of PV-DG into the existing grid will have several negative impacts on the system if the integration is not done properly. The most common concern is steady state over voltage, effects on the voltage profile, sudden fluctuations of voltage, and the impact on system losses. The voltage profile and system losses are the most important areas that utilities focus as they affect the system reliability (Guerra and Martinez, 2014;Haque and Wolfs, 2016). Furthermore, an increase in penetration would reduce the inertia of the system as power supplied by the conventional generators is decreased. The reduction of active power supplied to the system will have impact on the transient stability of the system (Zainuddin et al., 2018).
System loss minimization has been the major driving force behind most of the research conducted on this field. These research works are based on determining the optimal DG size and location. These optimized DG units could enhance voltage stability and improve the efficiency of the network by loss minimization.
Voltage stability is defined as the ability of a system to maintain acceptable voltage across the system after a disturbance (Bujal et al., 2014). When PV-DG is integrated, the voltage stability of the system is enhanced. As a result, the system's capacity to transfer more active power is increased. Hence, the installed PV-DG size needs to be controlled. Otherwise, the power generated by PV-DG will exceed the system load resulting in reverse power (Alam et al., 2012). Furthermore, if the increase in the penetration level of PV-DG is not controlled, the system will lose its stability and exceed the boundaries set by the utility.
To ensure a good operational performance of the distribution network, optimal placement and sizing of DGs are critical factors in terms of voltage stability, power quality, profitability, and reliable operational performance of the distribution network. This technical problem of optimal DG placement is in terms with economic maximization, voltage profile improvement, and loss minimization. These are the key components that govern the optimization process.
Several studies have been carried out to achieve an optimum location and size of PV-DG. Different methodologies have been used for this process, and it is based on conventional methods or meta-heuristic algorithms. Conventional methods include analytical analysis, exhaustive analysis, and probabilistic methods, whereas meta-heuristic algorithms include colony optimization, genetic algorithm (GA), and particle swarm optimization (Sadeghian et al., 2017).
The existing literatures on voltage fluctuations are relatively rare, as most of the studies are focused on safety index constraints. Few have highlighted the importance of voltage fluctuations when considering DG capacity (Aziz and Ketjoy, 2017;Liu et al., 2017). These studies still lack an analysis on the relationship between accessible PV-DG capacity and the power factor (Alsafasfeh et al., 2019).
Besides the level of PV penetration and PV size allocation, the power factor of PV-DG is a key aspect that has a direct impact on the voltage profile and system losses. The power factor of the system can be reduced to undesired levels of PF > 0.85 when PV-DG is integrated. Some studies suggest that PV-DG should operate at a power factor more than 0.85 (leading/lagging) when the PV-DG output is more than 10% of the system power (IEEE Standards Coordinating Committee 21 on Fuel Cells Photovoltaic Dispersed Generation and Energy Storage, 2000). Furthermore, most of the research on optimal PV-DG allocation is confined to the distribution network. Therefore, this article will investigate the optimal location and sizing of the PV-DG unit by using both analytical and metaheuristic methods. A comparison of both methods will prove the accuracy of the results. The proposed analytical method will consider the voltage stability indices, providing a comprehensive analysis of load flow within the candidate network. In addition, the appropriate power factor for PV-DG penetration is also inspected in this study. IEEE 33 bus distribution network and IEEE 14 bus transmission network systems are selected for simulation and further analysis.

METHODOLOGY
A methodology is developed to achieve the three main objectives of this article. Each section is designed to undertake an objective whereas section one highlights the test networks. The methodology is designed for each section to achieve the objective whereas the results can be verified by the next section or within the section. Figure 1 shows the verification process and the methodology outline.

Test Systems
The test systems selected to simulate the proposed methodology are the IEEE 14 bus system and IEEE 33 bus system which represent the transmission network and distribution network, respectively. The IEEE 14 bus network consists of five generator buses, 11 load buses, and 20 lines (Yadav et al., 2014). For the transmission network, base voltage is 132 kV and base MVA is 100MVA, respectively. Table 1 shows the generator bus voltages used for the IEEE 14 bus system.
The standard IEEE 33 bus radial distribution network consists of 33 buses, 32 load branches, and one synchronous generator. Rated voltage for the system is 12.66 KV (Vita, 2017).

Optimum DG Location
To achieve the first objective, two-line stability indices were selected to identify the optimal DG location. These indices are selected after analyzing many literatures. A methodology is developed by using these indices to find the optimal location of the PV-DG unit. This method will identify the weakest bus (optimum DG location). To verify, the next three weakest buses will also be identified. These four buses will be used as candidate buses in the next section.

Line Voltage Stability Indices
The stability of a network can be evaluated by line voltage stability indices. Figure 2 shows the two-bus representation that is used to formulate all line voltage stability indices (VSIs) (Jalboub et al., 2011). The shunt admittance for these representations is ignored since all network lines are simulated for 1 KM in length. Hence, the value for shunt admittance is negligible and can be ignored. All line VSIs are derived on the characteristics of voltage collapse. The main difference between each line VSI is its sensitivity. For example, the FVSI only considers reactive power transfer whereas LQP considers both active and reactive power transfer. The line VSIs selected for this research are briefly described in this section.

Fast Voltage Stability Index
The FVSI (Musirin and Abdul Rahman, 2002) is developed based on voltage collapse conditions. For stability operation, the FVSI should be less than unity. The line with the highest FVSI is the most critical line and may lead to system-wide instability. This index is also used to identify the weakest bus. The weakest bus corresponds to the bus with the smallest maximum permissible load.

Line Stability Factor
LQP is a line stability index developed by Mohamed et al. (1998). This stability index is modeled in a single line network between two nodes to generate the equation. For stable operation, the LQP value should be less than unity. The bus with the lowest LQP value is the most stable bus.
To identify the weakest bus, a fixed size of PV-DG at the unity power factor is placed at the receiving end of the line, and load flow is carried. FVSI and LQP values are calculated for all the lines within the networks. An average of these values indicates the stability of the network when PV-DG is installed. The process is then repeated at the sending end of the line. For the FVSI and LQP, the instability point is 1. The smaller the average stability value, it is indicative that the network becomes more stable when PV-DG is placed at that location. Thus, this is the optimum location for PV-DG placement.
To verify the optimum location, the next three weakest lines are selected. For these lines, the same procedure is followed, and an average stability value for the FVSI and LQP is calculated. From the results, three additional candidate buses are selected. These four candidate buses (optimum location and the three additional buses) will be used in the meta-heuristic optimization method to verify the proposed optimal location. Four candidate buses are selected to minimize computation time since it is only  being performed to verify the optimum location. Figure 3 shows the flow chart of the proposed method.

Optimum DG Size
To achieve the second objective, a multi-objective function is formulated to find the optimal size of the PV-DG unit. This multi-objective function is based on active loss reduction and the voltage deviation index of the network. The constraints allocated for the multi-objective function are also defined in this chapter. GA is selected to optimize the multi-objective function. MATLAB is selected as the optimization platform for the algorithm. These optimization solvers provide fast and accurate results with fast convergence time. MATPOWER 7.0 is selected to run Newton-Raphson load flow and to collect required data for the optimization process.

Multi-Objective Function Formulation
To achieve the objective of an optimal PV-DG size, the following multi-objective function (MOF) is formulated by considering real power losses and the voltage deviation index of the network.
Here, PLR is the active power loss reduction, VDI is the voltage deviation index, and W 1 and W 2 represent the weight of each factor. The summation of all the weights should be equal to 1. The weights represent the importance of each factor. It may vary from study to study, and this article analyzes different weighs and their impact on the fitness function. Since the minimization of system losses is considered the primary factor for this research, more weightage is given to this parameter. The secondary factor for this study is voltage deviation; hence, the weightage restrictions were allocated accordingly. W1 is restricted between 0.6 and 0.8 whereasW2 is restricted between 0.2 and 0.4. As it was mentioned earlier, this weightage lays more emphasis on real power losses.

Active Power Loss Minimization
Active power loss minimization is one of the main objectives. The active total power loss reduction (PLR) is defined as a ratio between total active power loss after DG installation (P DGi Loss ) and the base total active power loss (P Base Loss ); this is represented in the following equation: The total active power loss P Loss for both networks is calculated by generating the power flow results. A summation of active power losses of all the branches is calculated. It is written as follows: Here, I k and R k represent the magnitude of current flow and resistance of the branch number k, respectively, and N br represents the total number of branches.

Voltage Deviation index
Voltage fluctuations within the set limits are a common occurrence in any distribution network. When networks are less stable these fluctuations can have a direct impact on the system, and sometimes this results in blackouts. Hence, it is advised to minimize any voltage deviation within the system. The voltage deviation index for individual load buses can be identified by finding the square value of the difference between nominal voltage and actual load bus voltage. Performing a summation of these individual voltage deviations will provide the voltage deviation index of the entire network (Le et al., 2007;Uniyal and Kumar, 2018). This is written as follows: Here, V n the nominal voltage 1 p.u., V k is the voltage at load bus K, and N br is the number of buses.

Voltage limits
The voltage limits dictate the maximum and minimum limits allowed. This is expressed with the following inequality.
For this article, the allowed V max value is 1.05 p.u., whereas the lower bound V min value is 0.95 p.u.

Generation limits
This constraint limits the size of the PV-DG unit. This is expressed with the following inequality.
The active power injected by PV-DG should be maintained within the predetermined range. The PV-DG size should not exceed the total load demand (Duong et al., 2019). Hence, the maximum DG capacity is fixed at 100% of the load. For this analysis, maximum PV-DG-injected P max DG value is fixed at 80% of the load demand. Beyond this point, PV-DG will overload. For the minimum PV-DG injection, as mentioned earlier, when DG penetration is low during peak load, the PV inverter does very little to improve the voltage profile of the network. Furthermore, when the penetration percentage is very low, reverse power is also another possibility that would result in excess voltage (Chen et al., 2012). The use of a minimum value also impacts computation time. Hence, for this analysis, the minimum PV-DG penetration P min DG value is fixed at 20% of the total load.

Genetic Algorithm
GA is developed to simulate the mechanics of natural genetics and natural selection based on randomized search algorithms. GA is based on a string structure that is randomized yet structured like evolutionary adaptation for the survival of the fittest. This creates a new string within each generation, using the fittest members from the previous set (Roetzel et al., 2020). The proposed strategy is expected to determine the optimal PV-DG size for the network. The candidate buses selected from Frontiers in Energy Research | www.frontiersin.org October 2021 | Volume 9 | Article 695814 optimal PV-DG placement is incorporated into the fitness function. The proposed voltage limits are incorporated into the network configuration. Generation limits are implemented by setting the lower and upper boundaries of the GA function.
The fitness function consists of the proposed multi-objective function (MOF) and the process to find the optimal PV-DG size. MATPOWER 7.0 is used to perform power flow and to extract required data for the analysis.

GA implementation
For multi-objective optimization problems, GA is exceptionally suited as it can scan vast number of datasets and can provide solutions within reasonable time. Hence, GA is widely used for optimization problems. The proposed methodology is implemented via the following steps.
Step 1: Select candidate buses and prepare the test network.
Step 3: Initialization creates a random initial population. Run load flow via MATPOWER 7.0.
Step 4: Evaluate the fitness of each chromosome in initial population using the fitness function (M).
Step 5: While within the generation size, Select members called parents for mating. Produce children by crossover or mutation of parents. New population is generated. Data string corresponding to the new population is applied to the test network, and load flow is carried out via MATPOWER 7.0. Fitness of new chromosomes is calculated using the fitness function M. Number of generations is increased by 1.
Step 6: If stopping criteria are fulfilled, go to Step 7 or go to Step 5.

Analytical Method to Find the Optimal Size of PV-DG
The proposed analytical method is developed to verify the results obtained from the meta-heuristic method. This analytical method is developed in MATLAB to minimize system losses by the optimal placement of PV-DG. Since the optimal location of PV-DG is verified, this location is used as the candidate bus. The main concept for this analysis is that with an increase in the DG-PV size, the losses are decreased to their minimum value. But with further increase in the PV-DG size, losses start to increase again (Anwar and Pota, 2011). Hence, the aim of this analysis is to find this optimum PV-DG size. For this analysis, the same generation size constraints of 20-80 percent of the total load demand are used. The following steps describe how the proposed method is designed.
Step 1: Create a vector for PV-DG size constraints (20-80%) with a step size of 0.1. For this analysis, a step size of 0.01 is sufficient. If a smaller step size is used, the number of variables will increase exponentially. Increasing the computation time.
Step 2: Identify the candidate bus for the network, and load the candidate network.
Step 3: Identify the active load demand for the network.
Step 4: Create an empty vector to record the PV-DG size.
Step 5: Create vector k with step size one and with length of PV-DG size constraints vector.
Multiplying the corresponding PV-DG size constraint with the total load demand. This gives the PV-DG size for the analysis.
Install PV-DG of the selected size at the candidate bus.
To activate the generator, the generator status is changed to 1. To select active power injection, the bus type is changed to 1. Run load flow by using MATPOWER 7.0. Record active losses. Increase the iteration counter k k+1. When maximum iterations are achieved, go to Step 7.
Step 7: Select the minimum losses and the corresponding PV-DG size. This is the optimum size of PV-DG.
Step 8: Plot the graph.

Optimizing the Power Factor
In the previous sections, the PV-DG location and size are optimized at a unity power factor to minimize system losses and to improve the voltage profile. As the network loads are static, a simple analytical method could be used to further optimize the PV-DG unit. The IEEE recommendations for utility interfacing of PV-DG highlights that PV-DG should operate at more than 0.85 of the power factor (leading/lagging) when PV-DG output is more than 10% of the system load (IEEE Standards Coordinating . Hence, in this simulation, the power factor will fluctuate between 1.00 (unity) and 0.85 lagging. The aim of this section is to investigate the impact of the power factor on system losses and the voltage profile. Hence, the methodology is built to deliver the optimum power factor for PV connected to the system. For this analysis, the same constraints for the PV-DG size and voltage limits are used. The proposed analytical method relies on the concept of trial and error to find the optimal power factor.
For both networks, the power factor fluctuates between one and 0.85 (lagging). The PV-DG unit is integrated to the network at an optimum location with the optimum penetration percentage and power factor set at unity. The power factor is decreased by 0.1 and load flow is run to obtain the network losses and voltage profile. If losses are decreasing and the constraints are not violated, the process is repeated. Figure 4 shows the flowchart for the optimal PV-DG power factor.

RESULTS
The results are divided into sub-sections; each section fulfils an objective of this article. Comparison has been done to show the reliability and to verify the results. The key components such as reduction in active losses and the improvement of the voltage profile for the proposed methods are compared. The results from this chapter indicate significant improvement in the voltage profile while the system losses are minimized significantly when PV-DG is properly optimized.

Analysis on the Optimal Location
The first step is to establish the base case scenario, and load flow is carried out for both networks without the PV-DG unit. For both networks, the voltage profile and system losses are recorded. The optimal PV-DG location is determined by considering the two voltage stability indices that are selected. From the base case results, line stability for both networks is calculated using the FVSI and LQP index.

Case Study 1: IEEE 14 Bus System
The voltage stability analysis for all lines was analyzed, and the weakest lines were identified. The highest FVSI and LQP value indicates the weakest line. The candidate buses are selected from the 132 KV side of the network. This eliminates buses from one to five. While considering these conditions, the four weakest lines are selected for the analysis.
Both indices clearly identified lines 4-9 as the weakest lines, but to verify this, the next three candidate lines were selected. The results indicate the line 2-3 as the second weakest line, but it is excluded as the line is on the 220 KV side of the network. Hence, based on both stability indices, lines 4-9, 12-13, 13-14, and 5-6 were selected as candidate lines. Buses 4 and 5 were not considered for further analysis, as these buses were located on the 220 KV side of the network.
As these indices could only indicate the weakest line, the proposed methodology provides a solution to identify the candidate bus for PV-DG placement. The proposed analytical method is implemented, and an average value of FVSI and LQP is calculated. The weakest bus is determined by the smallest average FVSI and LQP value. When PV-DG is placed at bus 12, excess voltage is observed, hence eliminating the candidate bus. By analyzing the results, bus 9 is identified as the optimal location. To verify, four candidate buses 6, 9, 13, and 14 were selected as candidate buses for the meta-heuristic method.

Case Study 2: IEEE 33 Bus Distribution Network
The stability of all lines were calculated by using both stability indices. Since the IEEE 33 bus has only one voltage level, no buses were eliminated. The first step is to establish the base case for the network. Newton-Raphson load flow was established, and the voltage profile and system losses were recorded. From this data, the FVSI and LQP value was calculated for the network. By comparing the stability index of all line four candidates, lines were selected for the analytical process. Lines 5-6 were identified as the weakest lines whereas 27-28, 2-3, and 28-29 were also selected for verification. The proposed analytical method is implemented, and an average value of FVSI and LQP is calculated. The weakest bus is determined by the smallest average FVSI and LQP value.
The analysis of the results indicates bus 3, 6, 27, and 29 as the candidate buses whereas bus 6 displays the weakest characteristics and it is considered the optimum location. To verify this analysis, these four candidate buses will be used for meta-heuristic methods.

Results of Genetic Algorithm Optimization
According to the methodology, required changes were made to the fitness function. This includes the incorporation of candidate buses and the system constraints. The bus data were modified to allocate the voltage limits whereas the GA solver accommodates the PV-DG size constraint.

Case Study 1: IEEE 14 Bus System
The proposed methodology was implemented in the IEEE 14 bus network. The candidate buses from the previous section (Alam et al., 2012;Bujal et al., 2014;Bujal et al., 2014;Shah et al., 2015;Kadam et al., 2017) were assigned and incorporated to the fitness function in the ascending order. The voltage constraints were limited between 0.95 p.u. and 1.05 p.u. The penetration limits were set between 51.8 and 207.2 MW. GA solver converges at the ninth iteration with the best fitness value of 0.2817. Furthermore, GA requires 22.41 s to complete the optimization.
The two variables of GA solver (X1 and X2) provide the optimal size and location from the candidate buses, respectively. X1 Size of PV-DG 135.5 MW. X2 Optimum location 1.7, this is equal to the second candidate bus for the network.
The second candidate bus corresponds to bus 9, verifying results from the previous section. After the integration of PV-DG of the proposed size at bus 9, significant reduction in active losses was observed. The results indicate active system loss reduction of 53.4%. Figure 5 shows the comparison of system losses between the base case and losses after optimized PV-DG installation.
It was also observed that for some branches active losses were increased; this is due to the increase in current flow within them. Line losses are governed by the equation P loss I 2 R. Since the size of the conductors remains the same, increase in current flow increases the losses within those lines. But for most of the branches, a significant decrease in active losses was observed.
The lowest voltage is observed at bus 3 with a value of 0.953 p.u. The highest voltage level is observed at bus 8 with a value of 1.028 p.u. While maintaining the voltage limits, the voltage profile for the network improved on average by 0.0094 p.u. Figure 6 shows the comparison of the voltage profile within the base case.

Case study 2: IEEE 33 bus distribution network
To verify the optimal location proposed in the previous section, four candidate buses (Di Santo et al., 2015;Shah et al., 2015;Duong et al., 2019;Roetzel et al., 2020) were assigned and incorporated to the fitness function in the ascending order. The voltage constraints were limited between 0.95 p.u. and 1.05 p.u. The DG size constraint was implemented at this stage, and limits were set between 0.7 and 3 MW. From the results, it can be highlighted that the GA solver converges at the 10th iteration with the best fitness value of 0.319. Furthermore, GA requires 45.5 s to complete optimization.
The two variables of GA solver (X1 and X2) provide optimal size and location from the candidate buses, respectively. X1 Optimal size of PV-DG 2.675 MW. X2 Optimal location 1.52; this equals to the second candidate bud.
Since the second candidate is bus 6, this verifies the results. When PV-DG of the proposed size was installed at bus 6, significant active loss reduction was observed for all buses within the network. The results indicate an active system loss reduction of 48.8%. Figure 7 shows the comparison of branch losses before and after optimized PV-DG installation.
Since loss reduction and the voltage profile go hand-in-hand, significant improvement in the voltage profile was observed for all buses within the network. The lowest voltage is observed at bus 18 with a value of 0.952 p.u. The highest voltage level is observed at bus 1 with 1 p.u. as the voltage level. This achieves the voltage constraints set for the network. The average voltage profile was improved by a value of 0.027 p.u. Figure 8 shows the comparison of the voltage profile for the network within the base case.

Results of the Analytical Method
The proposed analytical method was established to verify the optimum PV-DG size for the network. Similar to the metaheuristic method, DG size constraint was fixed at 20-80% percent of the total load demand, and voltage limits were set at ±5%. At this stage, the optimum location for both networks was verified. Hence, optimum locations will be used to verify the PV-DG size.

Case study 1: IEEE 14 bus system
The proposed methodology was implemented to verify the optimal PV-DG size. The optimum location and network data file were incorporated into the program. The process was started, and the following results were obtained. Figure 9 shows how active loss fluctuates with increase in the PV-DG size.
As mentioned earlier, with increase in the PV-DG size, the losses are decreased to their minimum value. But, with further increase in the PV-DG size, the losses start to increase again. The minimum active losses for the network are 5.937 MW, and the corresponding PV-DG size is 135.5 MW. By comparing the results, the optimum PV-DG size can be verified.
To verify the optimum PV-DG size, the proposed methodology was implemented. To start the process, the optimum location and network data file were incorporated into the program. Figure 10 shows how active loss fluctuates with increase in the PV-DG size.
From Figure 10, it can be seen that with the increase in the PV-DG size, losses start to decrease. But beyond 2.574 MW, losses start to increase again. This indicates that 2.5745 MW is the optimum PV-DG size. The results are compared to verify the optimal PV-DG size.

Comparison of Results
Comparison of these results helps us to explore and verify results from each section. Table 2 shows the comparison of optimal size and computation time for the methods explored in this article.
The results indicate very similar values for optimal size for both optimization methods.
An analytical method is used to verify the optimal PV-DG size for the meta-heuristic method. For the IEEE 14 bus system, when the PV-DG size is compared, the difference between the optimal PV-DG size for the meta-heuristic method and analytical method is 0.0605 MW. For the IEEE 33 bus system, when the PV-DG size is compared, the difference between the optimal PV-DG size for the meta-heuristic method and analytical method is 0.0997 MW. The main difference between the meta-heuristic method and the analytical method is computation time. The analytical method requires much longer computation time. Any attempt to make the results more accurate by increasing the step size would further increase computation time with little improvement to the accuracy.

Analysis on optimizing the power factor
After optimizing the PV size and location for both systems to minimize losses and to improve the voltage profile, PV could be optimized further. The power factor should be fluctuated between   , 2000). Hence, the proposed methodology was applied to deliver the optimum power factor for PV connected to the system.

Case Study 1: IEEE 14 Bus System
For the IEEE 14 bus system, when the power factor was minimized to 0.96, the system losses were reduced by 54.3%. Beyond that point, voltage constraints for the system was breached. Figure 11 shows voltage profile improvement when PF was optimized for the IEEE 14 bus system. The results indicate significant voltage profile improvement throughout the network. A maximum voltage of 1.05 was observed at bus 9.

Case Study 2: IEEE 33 Bus System
The optimization of the power factor to 0.88 for PV has minimized the system losses from 48.7 to 68.9%. Beyond that point, the PV-DG system overloads. Significant voltage profile improvement was observed for the network with an average improvement of 0.088 p.u. Maximum voltage improvement was observed at bus 18. Figure 12 shows the voltage profile improvement when PF is optimized for the IEEE 33 bus system.

CONCLUSION
Global warming is a disaster that can be mitigated by minimizing fossil fuel usage. One of the main contributors is fossil fuel-based FIGURE 8 | Voltage profile comparison for the IEEE 33 bus system.
FIGURE 9 | Active loss characteristics with PV-DG size variation. FIGURE 10 | Active loss characteristics with PV-DG size variation.
Frontiers in Energy Research | www.frontiersin.org October 2021 | Volume 9 | Article 695814 10 centralized power generation facilities. The use of renewable DGs, such as solar PV, will minimize the power output of these facilities. The introduction of PV-DG units will improve the efficiency of both transmission and distribution networks. This research is designed to minimize system losses and to improve the voltage profile by optimal PV-DG placement. In this article, a static stability model with PV-DG is presented for the IEEE 14 and IEEE 33 bus network. The methodologies presented in this article have been carried out. To find the optimum location of PV-DG, line stability indices were used, and results were verified. To achieve the optimal PV-DG size, a multi-objective function was developed by considering active system losses and voltage FIGURE 11 | Voltage profile of the IEEE 14 bus system after power factor optimization of PV.
FIGURE 12 | Voltage profile of the IEEE 33 bus system after power factor optimization of PV.
Frontiers in Energy Research | www.frontiersin.org October 2021 | Volume 9 | Article 695814 11 deviation indices. The GA and meta-heuristic method were utilized to optimize the multi-objective function. In order to verify the results from the meta-heuristic method, the analytical method was used. The results from GA and analytical method were very similar, verifying the results. It was observed that the active losses for both the IEEE 14 bus system and IEEE 33 bus system were decreased by 53.4 and 48.8%, respectively. Both systems were improved further by optimizing the power factor of PV-DG. Additional active power loss reduction was observed for both the IEEE 14 bus system and IEEE 33 bus system. Active losses were reduced from 53.4 to 54.3% and 48.8-68.9%, respectively. This resulted in considerable voltage profile improvement for both networks while maintaining the constraints proposed in this article. In conclusion, this article has successfully presented that optimal PV-DG can be used in both transmission and distribution networks with satisfactory results. Furthermore, the optimal location and optimal size of PV-DG together with appropriate power factor for PV-DG penetration can significantly reduce the power losses of the system while improving the system voltage profile.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/Supplementary Material; further inquiries can be directed to the corresponding author.