Optimal Integration of Capacitor and Distributed Generation in Distribution System Considering Load Variation Using Bat Optimization Algorithm

In this article, an efficient long-term novel scheduling technique is proposed for allocating capacitors in a combined system involving distributed generation (DG) along with radial distribution systems (RDS). We introduce a unique multi-objective function that focuses on the reduction of power loss with the maximization of voltage stability index (VSI) subjected to constraints of equality and inequality systems. Loss sensitivity factor and VSI together are involved in pre-identifying the locations of capacitors and DG. Determination of the optimal size of capacitor and DG is performed by utilizing the Bat algorithm (BA) for all the loads in RDS. The conventional approach considers the medium load of (1.0) condition generally, but the proposed method changes the feeder loads linearly, ranging from light load (0.5) to peak load (1.6) with the value of step size as 1%. BA determines the optimal size of the capacitor and DG for each step load. The curve fitting technique is used for deducing the generalized equation of capacitor size and DG for all conditions of the load with the various loading condition sized by distributed network operators (DNOs). Further, various load models such as industrial, residential, and commercial loads have been considered to show the efficiency of the present approach. Validation of results is performed in different scenarios on a 69-bus test system and on a standard IEEE 33-bus system. The results exhibit improved accuracy with less power loss value, superior bus voltage, and stability of system voltage with a higher rate of convergence.


Introduction
Distribution level power losses have risen to a maximum of 13 percent, which could be reduced by optimally selecting and locating the compensating devices [1]. Voltage stability of the radial distribution system (RDS) is yet another challenge, which could also be solved by the above optimal approach [2], thereby improving voltage profile. Distributed generation (DG) is small, scattered generating units integrated with shunt capacitors, which are considered the compensating devices. DG predominantly has a direct • A novel technique is proposed for long-term scheduling to optimally allocate DGs and capacitors. • For the first time, consideration of load variation is given for the allocation problem of capacitors and DGs. • A framed set of generalized equations using curve fitting techniques to help distribution network operators to choose the exact size of the DG and capacitor for any load (light load to peak load).

•
The present approach is verified on three different load models to check the efficiency in all types of loads. • Improvement of overall system efficiency is achieved by considering a multi-objective function for the enhancement of stability and reduced power loss, which are not considered previously in the literature for the allocation of capacitors simultaneously. • For the first time, the Bat algorithm is applied for the allocation of capacitors and DGs.
This paper proposes a novel approach for solving the problems in allocating the DG and capacitor simultaneously in RDS with various load models. The objective of the system is to reduce the power loss and to enhance the VSI of the system. The Bat algorithm is used for sizing and locating both capacitor and DG. Linear changing of feeder loads is performed ranging from 0.5 (light load) to 1.6 (peak load) with a step size of value 0.01, where at each step, sizing is performed using CFT whose formulation is performed in the form of a simple quadrature equation. The present approach is supportive in the selection of a particular size of capacitor and DG based on distribution network operators (DNOs) and their load steps. The standard IEEE 33-bus test system and 69-bus benchmark test system are used to test the effectiveness and feasibility. Comparison of the simulated results is performed with that of other heuristic-based algorithms.

Formulation of Load Models
From a practical perspective, the current methodology is receptive to joining continuous voltage needy load models. To quantify the impact of a few load models on compensator (DG and capacitor) sizing, static load models are utilized to imply various kinds of purchasers. Mostly, the load of the distribution system can be partitioned into three classifications i.e., industrial, residential, and commercial load. In view of the load types, the active and imaginary power values will fluctuate, which influences the voltage and frequency of the system. In this current work, the voltage-dependent load models, for instance, industrial, residential, and commercial load models, have been thought of. The numerical articulation for the voltage-dependent load model is addressed as: where P and Q are the values of real and reactive powers, respectively; P o and Q o are the values of active and reactive powers at nominal voltages, respectively; and α and β are the real and reactive power exponents. In Table 1, the values of the real and reactive exponents that are used in this paper for constant power, industrial, residential, and commercial loads have been provided [25][26][27].

Power Loss in RDS
Generally, the resistance to reactance ratio of RDS (R/X) is high such that the study of conventional power flow is inappropriate over the transmission system for identification of line voltage and flow. Hence, the backward/forward sweep (BFS) algorithm is utilized for load flow calculations [28]. The BFS algorithm became common owing to its simplicity, fastness, and robustness with the requirement of low memory for processing. In addition, it is well suited for unbalanced distribution networks. In BFS, the three basis steps involved are backward sweep, Nodal current calculation, and forward sweep, which are repeated until convergence.
Two buses are considered, as shown in Figure 1, where these two buses are connected by a branch, the sending end bus is represented as t, and the receiving end bus is represented as t + 1. Real power represented by P t,t+1 and the reactive power represented by Q t,t+1 that are flowing between bus t and bus t + 1 are derived by applying the formulae given as follows: P t,t+1 = P (t+1)e f f + P Loss(t,t+1) Energies 2021, 14, x FOR PEER REVIEW 5 of 24 TL = ∑ Loss (t,t ) nb (13) where nb represents the total number of branches.

Reduction of Power Loss by Placement of DG/capacitor
Real power loss is predominant in RDS. This being the case, the focus of the allocation is to reduce the real power loss. Total power loss in the line section due to DG/capacitor allocation is represented as the ratio between total power loss with DG/capacitor allocation and without DG/capacitor allocation, Reduction of Δ DG/Cap forms one of the objectives during optimization.

Voltage Stability Index (VSI) in RDS
Maintaining the voltages of all network buses in spite of disturbance forms the crux of voltage stability. This is solely because of the scarce reactive power supply provided by the system to the loads. VSI for the distribution system shown in Figure 1 is obtained by the power flow method using Equation (8), as introduced in [29].
For stable operation of RDS, we should have: Computation of I between buses t and t + 1 in the line section is performed as follows: Additionally, Equating and cross-multiplying Equations (5) and (6), we obtain: Further simplification of Equation (7) leads to: Energies 2021, 14, 3548

of 24
Squaring and adding (8) and (9) Computation of real power loss is performed in the line section using Equation (5) as follows: The total real power loss (P TL ) is obtained by computing the summation of all the losses occurring in the line sections specified by: where nb represents the total number of branches.

Reduction of Power Loss by Placement of DG/capacitor
Real power loss is predominant in RDS. This being the case, the focus of the allocation is to reduce the real power loss. Total power loss in the line section due to DG/capacitor allocation is represented as the ratio between total power loss with DG/capacitor allocation and without DG/capacitor allocation, Reduction of ∆P DG/Cap TL forms one of the objectives during optimization.

Voltage Stability Index (VSI) in RDS
Maintaining the voltages of all network buses in spite of disturbance forms the crux of voltage stability. This is solely because of the scarce reactive power supply provided by the system to the loads. VSI for the distribution system shown in Figure 1 is obtained by the power flow method using Equation (8), as introduced in [29].
For stable operation of RDS, we should have: The above Equation (15) can be used to determine the location of the compensating devices as well as the stability. Upon ordering the VSIs of all the buses, the node corresponding to the minimum VSI is the most sensitive node.

VSI Maximization Using DG/capacitor Placement
Ignoring voltage stability during formalization of objective function makes RDS susceptible to a bad voltage profile. Maintaining a good voltage profile refers to the pertinence of voltage within limits, meeting the contractual obligations, saving the cost of resources of generation, and finally providing good voltage regulation on the grid. This makes the inclusion of VSI in optimization inevitable [18]. In fact, allocating the DG and capacitor simultaneously improves stability. The change in VSI is given by the ratio of VSI with DG/capacitor placement over VSI without DG/capacitor placement, as given in (15). This could be maximized during optimization.

Curve-Fitting Technique
Curve fitting is the process of constructing a curve or mathematical function that has the best fit to a series of data points, possibly subject to constraints [30]. The steps involved in the curve-fitting technique for the proposed method are given below: Place the suggested initial (extreme) DG/capacitor sizes one at a time at bus t. Then, run the load flow per DG capacitor size for all load factors (0.5 to 1.6 with step size of 0.01).

2.
Register the ΣP Loss values of these DG/capacitors individually on a scatter plot. The x and y axes are the total system power loss or DG/capacitor size and load factor, respectively.

3.
Plot a quadratic fitted curve of these registered results and obtain the curve function (ax 2 + bx + c).

4.
Find the x-intersect (x = −b/2a) of the minimum point at that curve. Then, represent that intersection as the best power loss or DG/capacitor size.

5.
Place the designated DG/capacitor size and run the power flow. If the constraints are within the limits, that is, this is the best DG/capacitor option of this pf, then print the results. Otherwise, one of three scenarios could arise: a. |V t | > V min t and |V t | > |V max t | reduce the DG/capacitor size by 5% and follow step 5. b.
|V t | < V min t and |V t | < |V max t | increase the DG/capacitor size by 5% and follow step 5. c.
|V t | < V min t and |V t | > |V max t | increase and decrease the DG/capacitor size by 5% and follow step 5 for both DGs and capacitors one at a time. If both DGs and capacitors satisfy the constraints, retain the one that provides maximum objective function values.

Proposed Objective Function
The multi-objective function formulated here works on both VSI and real power loss such that it maximizes VSI and minimizes the real power loss. The proposed multiobjective function for optimal DG is given below. Capacitor placement constraints are given in Table 2.

Sensitivity Analysis
Sensitivity analysis is utilized to identify the optimum site for placement of the DG/capacitor. Space-time complexity during optimization is met by the locations obtained using the above analysis.

Voltage Stability Index
The aim of VSI is to find the optimal location of DG along with the level of security of the system [19]. The ode corresponding to the lowest VSI obtained using (15) has the highest priority of DG placement. Additionally, VSI should be maximized to avoid voltage collapse.

Loss Sensitivity Factor
Optimal locations for capacitors are obtained from LSF [31,32], which reduces the search space during optimization. The bus with the highest LSF obtains a higher chance of capacitor allocation. The expression for LSF is obtained by differentiating Equation (12) with respect to reactive power.

Bat Algorithm
In the present scenario, nature-inspired algorithms have gained attention and eventually became a powerful tool to solve complex power system optimization problems easily. A recent meta-heuristic algorithm, "Bat Algorithm", is proposed by Xin-She Yang in 2010 [33], which is based on the behavior of natural bats using echo signals for locating their food sources. Bats have an interesting way of determining obstacles even in complete darkness by radiating sound waves from their wings. Such auditory behavior is present in very few species.
BA is developed by depicting the characteristics of bats, which are categorized by three rules as given below:

1.
Every bat senses the distance and sizing of the food/prey and background obstacles by echolocation, and it can also differentiate between them.

2.
In the process of preying, each bat flies arbitrarily with velocity of v i considered at a position x i , with a least frequency of f min whose wavelength varies as λ and value of loudness is A 0 . Frequency or the wavelength is determined by target proximity and pulse emission rate r, whose value ranges between [0, 1], happening inherently.

3.
The value of loudness varies between a range from a large positive value A 0 to a least constant value A min .

Parameters of BAT Algorithm
• The steps involved in the process of allocation of DG and capacitor using BA are given as follows.
Step 1: Set the objective function.
Step 2: Initialize the bat population (10 to 40) with variables: v i , x i , f min , r and A 0 .
Step 3: Computation of fitness value is performed for each bat and then ranking is performed.
Step 4: Update the variables v i , x i , f min , r and A 0 by following Equations (20)- (24).
Then, a solution is taken from the available best solutions, based on which a local solution is produced, which is around the best solution, selected using Equation (25): and if A new solution is generated by flying in a random fashion. Step Then, the new solutions are accepted.
Step 7: Computation of the fitness value of each bat is performed.
Step 8: Steps 4 to 6 are repeated until the loop ends into a criterion stopping it.

Simulation Results and Discussion
The value of voltage sensitivity characterizes the load models of the distribution system as constant voltage/power/impedance. The constant power load model in [34] is considered for simulation. The BFS algorithm is utilized to obtain the power loss of the uncompensated system, VSI, LSF, and bus voltages. The minimum and maximum limits of DG and capacitor sizes are 10% and total 100% of the loading in KW and kVAr of the network, respectively. The maximum number of DG/capacitor banks can be three, and the placement is limited to three, after which no improvement in objective function value is observed. No-load to full-load variation is obtained using the following equation: The efficiency of the present approach is validated, and then it is implemented on the standard IEEE 33-bus as well as using 69-bus test systems in the MATLAB simulation platform. For both 33-bus and 69-bus test systems, the feeder loads are varied linearly from 50% (light load) to 160% (peak load) with a step size of 1% increasing every time. The optimal sizes of DG and capacitor for all load steps are calculated by BA.
The efficiency of the proposed methodology is analyzed based on four different cases on the IEEE 33-and 69-bus test systems, respectively. They are represented as follows: System considering both DG and capacitor

Test System Using IEEE 33-Bus
This test system is considered as a medium scale RDS that comprises 33 buses and 32 branches. Base voltage and apparent base power are obtained as 12.66 kV and 10 MVA, respectively. The adoption of line and bus is performed from [20]. IEEE 33-bus RDS with its single line diagram is represented in Figure 2. Analysis is performed with and without compensation, The former case being together and individual placement of DG and capacitor.

System without Compensation
The computation of the active power loss of the system is performed by running the load flow algorithm. The value of base case power loss is obtained as 210.98 kW, and minimum voltage is obtained as 0.9037 p.u.
CFT is utilized for obtaining the approximated base real power loss of the 33-bus test system, given as (27):

System with Capacitor
In this scenario, one optimally sized capacitor is placed at every optimal location found using sensitivity analysis. Optimal locations obtained are the 14th, 24th, and 30th buses. Mitigation of power loss is performed to 138.35 from 210.98 kW, whereas VSImin is maximized from a value of 0.6610 to 0.7423 p.u. Optimal DG and capacitor sizes for different load factors at optimal locations obtained using BA are shown in Figure 3a,b, respectively. Total active power loss with capacitor is formulated by CFT: (28) Optimum size of the capacitors is given by:

System with DG
DGs are optimally sited in three (13th, 25th, and 30th buses) different places. Optimum sizing of the DGs is calculated using BA. Reduction of real power loss occurs whose values are obtained as 72.78 from 210.98 kW, while there is improvement in the least bus voltage 0.9037 to 0.9669 p.u. Analysis is performed with and without compensation, The former case being together and individual placement of DG and capacitor.

System without Compensation
The computation of the active power loss of the system is performed by running the load flow algorithm. The value of base case power loss is obtained as 210.98 kW, and minimum voltage is obtained as 0.9037 p.u.
CFT is utilized for obtaining the approximated base real power loss of the 33-bus test system, given as (27):

System with Capacitor
In this scenario, one optimally sized capacitor is placed at every optimal location found using sensitivity analysis. Optimal locations obtained are the 14th, 24th, and 30th buses. Mitigation of power loss is performed to 138.35 from 210.98 kW, whereas VSI min is maximized from a value of 0.6610 to 0.7423 p.u. Optimal DG and capacitor sizes for different load factors at optimal locations obtained using BA are shown in Figure 3a,b, respectively. Total active power loss with capacitor is formulated by CFT: P Cap loss (kW) = 169.8∂ 2 − 49.46∂ + 21.55 (28) Optimum size of the capacitors is given by: Formulated total active and reactive power losses with DG using CFT are given by:

System with DG and Capacitor
Simultaneous allocation of DG and capacitor units in an RDS enhances system effectiveness, reduces the power losses, and increases the bus voltage. The sizing of DGs and capacitors is performed optimally at appropriate buses obtained by BA ( Table 3).
Extraction of power loss from CFT for simultaneous allocation of DG and capacitor is given by: The voltage profile for the above-discussed scenarios under different load variations shown in Figure 4a-d reveals significant improvement in bus voltage when DG and capacitor are located concurrently (10.32%) over individual scenarios (2.92% and 6.99% for capacitor and DG, respectively).
Further, comparison of VSI (per unit values) under different scenarios in a full load condition ( Figure 4) goes with the previous inference of providing maximum VSI enhancement while DG and capacitor are placed together (45.24%). VSI enhancement when the capacitor is placed is 12.29% and is 30.89% during DG placement.
Yet another objective function of power loss minimization also yields similar results. Power loss reduction is 34.4%, 65.5%, and 94.42% for capacitor, DG, and simultaneous DG and capacitor placement conditions, respectively ( Figure 5). Interestingly, power loss minimization objective attainment is more than the other objective of VSI improvement.

System with DG
DGs are optimally sited in three (13th, 25th, and 30th buses) different places. Optimum sizing of the DGs is calculated using BA. Reduction of real power loss occurs whose values are obtained as 72.78 from 210.98 kW, while there is improvement in the least bus voltage 0.9037 to 0.9669 p.u.
Formulated total active and reactive power losses with DG using CFT are given by: Optimum kW of DG is given by:

System with DG and Capacitor
Simultaneous allocation of DG and capacitor units in an RDS enhances system effectiveness, reduces the power losses, and increases the bus voltage. The sizing of DGs and capacitors is performed optimally at appropriate buses obtained by BA (Table 3).  (13) 200 (13) 250 (13) 250 (13)  490 (25) 360 (25) 360 (25) 400 (25) The voltage profile for the above-discussed scenarios under different load variations shown in Figure 4a-d reveals significant improvement in bus voltage when DG and capacitor are located concurrently (10.32%) over individual scenarios (2.92% and 6.99% for capacitor and DG, respectively).
Further, comparison of VSI (per unit values) under different scenarios in a full load condition ( Figure 4) goes with the previous inference of providing maximum VSI enhancement while DG and capacitor are placed together (45.24%). VSI enhancement when the capacitor is placed is 12.29% and is 30.89% during DG placement.
Yet another objective function of power loss minimization also yields similar results. Power loss reduction is 34.4%, 65.5%, and 94.42% for capacitor, DG, and simultaneous DG and capacitor placement conditions, respectively ( Figure 5). Interestingly, power loss minimization objective attainment is more than the other objective of VSI improvement. Figure 6 represents the VSI-comparison of the 33-bus system at normal load. Scenario 4 gives the best VSI improvement compared to all other scenarios. The power loss reductions of all scenarios are compared and shown in Figure 7. It is evident that there is vast improvement in the reduction of power loss in Scenario 4 of the system, which is better than the other scenarios represented. all scenarios are compared and shown in Figure 7. It is evident that there is vast improvement in the reduction of power loss in Scenario 4 of the system, which is better than the other scenarios represented.   Figure 7. It is evident that there is vast improvement in the reduction of power loss in Scenario 4 of the system, which is better than the other scenarios represented.           To examine the presentation of the present methodology technique inside and out, it has applied been to various load models. The compensator sizes and sites, power loss, bus voltage, and VSI for all load models are presented in Table 3. Table 3 addresses a notable enhancement in the power loss decrease in all load models when contrasted and the base case. Figure 8a-d show the enhancement in bus voltage under various load models for all considered scenarios. As demonstrated in Figure 8a-d, the voltage at all feeders essentially improved for all load models because of the inclusion of compensators in the RDS. This exhibits that the present strategy is exceptionally precise in discovering the power loss and bus voltage for the system with various load models. voltage, and VSI for all load models are presented in Table 3. Table 3 addresses a notable enhancement in the power loss decrease in all load models when contrasted and the base case. Figure 8a-d show the enhancement in bus voltage under various load models for all considered scenarios. As demonstrated in Figure 8a-d, the voltage at all feeders essentially improved for all load models because of the inclusion of compensators in the RDS. This exhibits that the present strategy is exceptionally precise in discovering the power loss and bus voltage for the system with various load models.

Comparative Analysis
The effectiveness of the proposed methodology is examined by comparison with other algorithms such as intersect mutation differential evolution (IMDE) [11], particle swarm optimization (PSO) [8], the bacterial foraging optimization algorithm (BFOA) [9], the analytical method [7], multi-objective particle swarm optimization (MOPSO) [12], and the binary particle swarm optimization algorithm (BPSO) [13], as tabulated in Table 2. Power loss reduction with minimization of bus voltage has greater improvement in the proposed method compared to other methods in all scenarios. The system with the DG and capacitor shows more significant improvement in VSI than the base case. Using VSI, the voltage stability level of the RDS can be determined such that if the stability level is poor, then appropriate action is taken as a remedy in the proposed method. The authors could not have compared VSI with other methods, due to unavailability. Mitigation of power loss, enhancement of bus voltage, and maximization of VSI are the attributes achieved using BA-based optimization at a higher end over other methods of comparison Table 4.

Test System Using IEEE 69-Bus
The performance of the BA algorithm is demonstrated by considering the next test system with radial distribution-a large-scale 69-bus that has a total load of 3.80 MW and 2.69 MVAR. Figure 9 illustrates the single line diagram of the IEEE 69-bus test system where this test system also includes line and bus as adopted from [35].

System without Compensation
BFS is the load flow for computing the uncompensated system power as well as voltage values. In this system, the real losses are obtained to be 225 kW and the reactive power losses are obtained to be 102.13 kVAr. The least value of bus voltage without any compensation technique is obtained as 0.9090 p.u, and the VSI least value is obtained as 0.6822

System without Compensation
BFS is the load flow for computing the uncompensated system power as well as voltage values. In this system, the real losses are obtained to be 225 kW and the reactive power losses are obtained to be 102.13 kVAr. The least value of bus voltage without any compensation technique is obtained as 0.9090 p.u, and the VSI least value is obtained as 0.6822 p.u. CFT is utilized to formulate the generalized equation in order to obtain the total real power loss, without any compensation in the case of the IEEE 69-bus system, which is given as follows: P loss (kW) = 335.4∂ 2 − 166.5∂ + 55.38 (37)

System with Capacitor
In this scenario, three optimally sized capacitors at every optimal location identified using sensitivity analysis are located. Optimal locations attained are the 12th, 19th, and 61st buses. Mitigation of power loss is performed to a value of 144.96 kW from a value of 225 kW (i.e., percentage of mitigation is 35.57%); meanwhile, VSI min is maximized from 0.6822 to 0.7516 p.u. Optimum DG and capacitor sizes for different load factors at optimal sittings attained using the proposed BA optimization algorithm are represented in Figure 10a

System with DG
Three DG units are placed at the 12th, 19th, and 61st buses using a VSI-and LSFbased sensitive analysis method. Determination of optimal sizes of the DG units is performed using the proposed BA-based optimization techniques. Mitigation of real power loss is achieved as 68.97 kW power from a power value of 225 kW (i.e., percentage of mitigation is 35.57%), while there is improvement in the minimum bus voltage from a value of 0.9090 p.u to a value of 0.9772 p.u.
The total real power and reactive power losses formulated with DG utilizing CFT are given by: DGs' optimal sizes for the 12th, 19th, and 61st locations are given by: In the present scenario, DGs and capacitors are allocated in an optimal way with a Formulation of total real power loss with the effect of a capacitor is performed by CFT for IEEE 69-bus system is given by: Locations of the capacitors at the 12th, 19th, and 61st buses with varying load, indicating the optimal size, are given by: DNOs can plan for capacitor sittings using the above equations in distribution networks.

System with DG
Three DG units are placed at the 12th, 19th, and 61st buses using a VSI-and LSF-based sensitive analysis method. Determination of optimal sizes of the DG units is performed using the proposed BA-based optimization techniques. Mitigation of real power loss is achieved as 68.97 kW power from a power value of 225 kW (i.e., percentage of mitigation is 35.57%), while there is improvement in the minimum bus voltage from a value of 0.9090 p.u to a value of 0.9772 p.u.
The total real power and reactive power losses formulated with DG utilizing CFT are given by: DGs' optimal sizes for the 12th, 19th, and 61st locations are given by:

System with DG and Capacitor
In the present scenario, DGs and capacitors are allocated in an optimal way with a sizing option using the proposed BA technique. Figure 11 illustrates the comparison of real power loss for various scenarios considered for variation in load of the test system with 69-bus. Power loss and VSI min are obtained as 5.01 kW, 0 p.u, and 0.9607 p.u, respectively, using simultaneous allocation of the DG and capacitor. In all the scenarios, the power loss is mitigated in comparison to the base case (without compensation), and in Scenario 4, the largest loss mitigation is exposed, which is 97.77%. Additionally, the VSI and minimum bus voltage have enhanced in all the scenarios compared to the base case, and the largest enhancement is for Scenario 4, which is 0.9972 and 0.9607 p.u, respectively. For different loading conditions, the voltage profile of the 69-bus is represented, as shown in Figure 12a-d. It can be noted from the figures that simultaneous placement of the DG and capacitor in RDS enhances bus voltages meritoriously. From Table 3 and Figure 13, it is evident that the objective function is enhanced to a maximum value whenever the placements of the DG and capacitor are near to each other (Scenario 4). Attaining optimal solutions in Scenario 4 is the most optimal value for objective functions of all scenarios.      Figure 15a-d show the enhancement in bus voltage profile under various load models of IEEE 69-RDS. As can be seen from Table 5 and Figure  15a-d, the loss mitigation decrease and bus voltage profile of the system at each load model is enhanced after the situation of a compensator in the RDS utilizing BA optimization procedure.
Compared with all scenarios, the simultaneous allocation of the DG and capacitor (Scenario 4) produces better loss reduction, bus voltage enhancement, and VSI improvement in all load models.   Figure 15a-d show the enhancement in bus voltage profile under various load models of IEEE 69-RDS. As can be seen from Table 5 and Figure 15a-d, the loss mitigation decrease and bus voltage profile of the system at each load model is enhanced after the situation of a compensator in the RDS utilizing BA optimization procedure.

Comparative Analysis of 69-Bus System
The efficiency of the present approach has been tested by the obtained results from the viewpoint of minimum voltage, power loss, and VSI in comparison to all the scenarios with IMDE [11] and PSO [8] as tabulated in Table 6. The compensating device is required to enhance the performance of the distribution network [25][26][27]. Power loss mitigation with minimal bus voltage enhancement as in the BA-based optimization technique is better than other existing methods in all scenarios [36][37][38][39][40][41][42][43]. The DG and capacitor installed system shows more noteworthy enhancement in VSI than in the base case. The determination of voltage stability level of RDS can be performed using VSI, based on which appropriate action can be taken for the poor value of the index of stability using the proposed method. The authors could not have compared VSI with other methods due to unavailability. Mitigation of power loss, enhancement of bus voltage, and maximization of VSI attributes are achieved using BA-based optimization at the higher end over other methods of comparison ( Table 6).
The accuracy of the results reveals that the present approach of BA is an effective and bio-inspired well-organized method able to solve complex problems in optimization. This BA algorithm is suggested based on the accuracy of the results as an accomplished tool of optimization for solving tough problems of optimization in the engineering field for future research works. Figure 13 depicts the comparison of VSI of a 69-bus system at normal load. Scenario 4 gives the best VSI improvement compared to all other scenarios. Compared with all scenarios, the simultaneous allocation of the DG and capacitor (Scenario 4) produces better loss reduction, bus voltage enhancement, and VSI improvement in all load models.

Comparative Analysis of 69-Bus System
The efficiency of the present approach has been tested by the obtained results from the viewpoint of minimum voltage, power loss, and VSI in comparison to all the scenarios with IMDE [11] and PSO [8] as tabulated in Table 6. The compensating device is required to enhance the performance of the distribution network [25][26][27]. Power loss mitigation with minimal bus voltage enhancement as in the BA-based optimization technique is better than other existing methods in all scenarios [36][37][38][39][40][41][42][43]. The DG and capacitor installed system shows more noteworthy enhancement in VSI than in the base case. The determination of voltage stability level of RDS can be performed using VSI, based on which appropriate action can be taken for the poor value of the index of stability using the proposed method. The authors could not have compared VSI with other methods due to unavailability. Mitigation of power loss, enhancement of bus voltage, and maximization of VSI attributes are achieved using BA-based optimization at the higher end over other methods of comparison (Table 6). The accuracy of the results reveals that the present approach of BA is an effective and bio-inspired well-organized method able to solve complex problems in optimization. This BA algorithm is suggested based on the accuracy of the results as an accomplished tool of optimization for solving tough problems of optimization in the engineering field for future research works. Figure 13 depicts the comparison of VSI of a 69-bus system at normal load. Scenario 4 gives the best VSI improvement compared to all other scenarios.
The initial data and inflation rate, interest rate, and feeder distribution rate formulas are taken from the references [44][45][46]. The economic factors such as inflation and interest rate are considered to check the performance of the proposed method. Table 7 presents the initial data of the problem with all necessary parameters. The size of the capacitor and DG is calculated as 1860 kVAr and 2210 kW, respectively. Table 8 shows the savings of the system after compensation. The failure rate of the distribution feeders is analyzed and tabulated in Table 9.

Conclusions
The proposed approach investigates the integration of DG and capacitor placing and their sizing in the RDS to minimize the power loss and enhance the voltage stability. BA is applied to obtain optimal sizing of the DG and capacitor in the system of RDS. The generalized equation is derived using CFT to facilitate DNOs in the determination of DGs' and capacitors' optimal sizes for any particular change of load. The efficiency of the present algorithm is tested on the 33-bus and IEEE 69-bus RDS with four changing scenarios with various load models such as constant, industrial, residential, and commercial load models. Comparison is performed between simulated results with conventional techniques namely IDME, PSO, BFOA, analytical, FGA, and BPSO available in the literature. The attained results demonstrate that the integration of DG and capacitor (Scenario 4) is efficient in mitigation of power loss with enrichment of voltage stability. Additionally, the proposed approach is effective in determining the optimal solution in various scenarios. Thus, based on the results obtained, it is recommended to allocate both the DG and capacitor simultaneously in the distribution system to ensure maximum benefits from the system.