Energy Loss Reduction of Distribution Systems Equipped with Multiple Distributed Generations Considering Uncertainty using Manta-Ray Foraging Optimization

This paper has adopted the new bio-inspired Manta-Ray Foraging Optimization (MRFO) algorithm for optimal allocation of multiple Distributed Generation (DG) units attached to Radial Distribution Systems (RDSs) in order to reduce the total energy loss of the studied system. The DG units are optimized to work with a unity power factor (UPF) and optimal power factor (OPF) during a 24-h time-varying demand. The MRFO algorithm optimized single, two, and three DG units. The total energy loss and energy-saving during the time-varying demand are calculated and compared with the original case. The MRFO algorithm behavior is compared to the Particle Swarm Optimization (PSO) and Atom Search Optimization (ASO) algorithms regarding energy loss and energy-saving values. The standard 69-bus RDS is used as a test system. Considerable improvements in energy saving, loss reduction, and voltage profile are achieved after installing DG units, mainly when operating with optimal power factors. The MRFO algorithm achieves energy losses of 817.91, 751.08, and 730.25 kWh with 1, 2, and 3 DG units with UPF allocations, respectively. On the other hand, when the DG units are optimized to work with OPF, the MRFO achieves energy losses of 233.24, 142.08, and 106.79 kWh with the same number of DG units, respectively. Furthermore, the MRFO algorithm has efficient behavior compared with the PSO, ASO, and other algorithms for different operations and conditions.


Introduction
The distribution systems are being transferred from passive to active systems due to the increasing interest in using renewable energy sources as green and clean alternatives. Distributed generations (DGs) are secure and straightforward in contrast with regular power grids, and they are economically efficient (Bai and Yildizbasi 2020). These DGs are small-scale generators located typically near the load centers. They can be renewable such as photovoltaic, wind, or biomass sources, or nonrenewable engines or turbine-based sources (Parihar and Malik 2020). The integration of these DGs into the radial distribution systems (RDS) lessens traditional fossil fuel source dependency. In this case, more environmental and technical benefits are gained for the utility. DGs optimal allocation to RDSs provides several advantages: reducing the total losses, increasing system stability, increasing reliability, reducing overload, and improving voltage profiles . Shortly the electricity prices from the renewable DGs will be lower than the standard utility tariff.
On the other hand, connecting DG resources to existing distribution systems may result in different problems, such as increasing system losses or power fluctuations if they are not correctly sized and sited (Yuan et al. 2020). Integrating DG units may face some difficulties due to their unknown generating power characteristic. The objective of deciding the optimum position for the most outstanding production with minimal environmental consequences is the DG planning function (Radosavljevic et al. 2020). The optimal DG allocation is a large-scale, nondeterministic, stochastic, nonlinear problem with continuous and discrete constraints.
Different metaheuristic techniques and analytical mechanisms have been used to find the DG optimum size and location on the RDS. Analytical approaches use mathematical expressions to determine the optimal solution (Abdelkader, Elshahed, and Osman 2019;Hung, Mithulananthan, and Bansal 2010;Murthy and Kumar 2013). Some researchers Bansal 2013, 2014) adopted the probability distribution functions to model renewable sources' stochastic behavior and demand to take their time-variable nature. Many metaheuristic optimization algorithms have been employed to solve the DG allocation problem with RDS. Very few researchers (Atwa et al. 2010;Gkaidatzis et al. 2017;Hung, Mithulananthan, and Bansal 2013;Mehta, Bhatt, and Pandya 2018;Ullah, Wang, and Radosavljević 2019) considered the energy loss minimization of RDS. Most of the listed authors consider the DG allocation problem with a constant load. Thus the solution is for one instant of time. They did not consider demand variations or DG probabilistic behavior. The DG units can affect the protection of the distribution systems when using coordination of overcurrent relays (Elsadd et al. 2021), (Khalifa et al. 2018), or fault location techniques (Elsadd et al. 2017). The authors of (Arabi Nowdeh et al. 2019) applied multi-objective optimization with fuzzy functions to allocate different DG units to improve reliability and decrease losses. Different studies (Abdelaziz et al. 2015), (Tolba et al. 2018) were also applied for optimal allocation problems.
In the last two years, many researchers consider the DG allocation problem using different metaheuristic optimization algorithms. The authors of (Bai and Yildizbasi 2020), (Yuan et al. 2020) used the coyote optimization algorithm (COA) for allocating battery energy storage into distribution systems with and without photovoltaic (PV) panels with the objective of minimizing the total system losses. Grey wolf optimization (GWO) was applied in (Ansari et al. 2020) for DG planning into distribution systems to improve voltage profile, reliability, and strength of systems. The study included different distribution systems and DG types with different power factors. A similar study using the sine-cosine algorithm with chaos map theory (CSCA) was proposed in (Selim, Kamel, and Jurado 2020) to minimize the losses and improve the voltage profile. To allocate DG and shunt capacitors simultaneously into distribution systems, the authors of (Almabsout et al. 2020) used an enhanced genetic algorithm (EGA) for cost and economic analyses. PV and wind turbines were designed and allocated in (Parihar and Malik 2020) in order to minimize the voltage stability index of distribution systems. A hybrid particle swarm optimization and gravitational search algorithm (PSOGSA) was adopted in (Radosavljevic et al. 2020) to minimize total energy loss and maximize the total profits of DGs with RDS during a whole-year study. The authors of (Dehghani, Montazeri, and Malik 2020) used a spring search algorithm (SSA) to find the optimal size and site of DG units and capacitor banks integrated into RDS to reduce the total losses and elevate system performance. The author of (Eid 2020) used adaptive PSO and modified GSA algorithms to integrated multiple DG units with different power factors. The objective of the study was to enhance system performance in terms of loss reduction, improvement voltage profile, and increase of system stability using multi-objective optimization with the Pareto optimal front technique. The authors of (Selim et al. 2021) used a chaotic salp swarm algorithm (CSSA) to schedule different batteries and PV modules into distribution systems adopting 24 h operations to minimize losses and improve voltage profiles. Considering different load types, the authors of (Naderipour et al. 2021) used the Spotted hyena optimizer (SHO) algorithm to allocate different DGs and capacitors into RDS to minimize the cost of operation, cost of used devices, and energy losses. The adaptive PSO and exponential PSO algorithms were adopted in (Eid 2021) to minimize the system losses and enhance the system voltage profile of different RDS.
Most of the above researchers considered the allocations of DG units into distribution systems with constant power demand; that fixed during the whole day of operation. Due to the nature of PV or wind energy generations, the output power of these sources is weatherdependent and varies from hour to hour. Thus in order to model these sources effectively, at least 24 h operations must be considered.
In this paper, the DG allocation problem is solved using the newly published MRFO metaheuristic optimization algorithm with the primary objective of reducing the total energy losses considering time-varying demand. The study includes the integration of single-, two-, and three-DG units. Moreover, the study also includes the DGs optimal allocation working with unity and optimal lagging power factors. A concept of energysaving is proposed and estimated for considered case studies. The obtained results from the MRFO algorithms are compared to both ASO and PSO optimization algorithms. The main contribution points of this work can be summarized as follows: • Optimization of the distribution systems along with 24-h operations while minimizing the total energy losses. • Implementation of a new bio-inspired MRFO optimization algorithm with efficient behavior compared to other metaheuristic optimization algorithms such as ASO and PSO.

•
The study involved allocating different DG units (1, 2, and 3) operating with unity and optimal power factors.

•
The energy-saving and cost-saving principles are incorporated in this study.
The rest of the paper is organized as follows. Section 2 describes the problem formulation, while Section 3 explains the mathematical formulation of the MRFO algorithm. Section 4 displays the obtained results, and the conclusions are drawn in Section 5.

Problem Formulation
The optimal allocations of DGs improve system performance from different perspectives. The DG shares the load and system losses with the utility. A load flow solver is necessary to solve the distribution system with DG integration. For the radial distribution system, the Forward/Backward Sweep Method (FBSM) is the most suitable and adopted.

Objective functions
For any branch connected between any buses , , the active power loss of the branch %&'' () is calculated as: While the reactive power loss %&'' () of the branch is calculated as: where () represents the branch current; () represents the branch resistance and () represents the branch reactance.
The total active loss of the system %&'' is calculated from: While the total reactive loss is calculated as: represents the total number of the branches of the system. The active energy loss 9 : during a 24-h period is calculated as: While the reactive energy loss 9 C is calculated as: The main objective of this work is to reduce the total active energy loss of the system when accompanied by DG units as: The energy-saving is calculated as the sum of the savings of each hour of the day. The active energy saving where 9 :,IJKA&LK MN , 9 C,IJKA&LK MN are the active and reactive energy losses per day without installing any DG to the system; 9 :,IJKA MN , 9 C,IJKA MN are energy losses with installing the DG units.

Problem constraints
Necessary problem limits should be satisfied while solving the DG integration to the RDS to minimize the total energy losses. These constraints include the voltage, DG size, power factor limits, and power flow governing equations.
The voltage profile should always be within standard limits of ±5%, and the bus voltages should be: where W is the bus voltage at bus .
The total installed DG size should be less than the total demand at normal conditions, as: where MN Z , [\]^_[ Z are the total of the DG power and total demand, respectively.
For optimal power factor (OPF) operation, the MRFO algorithm optimizes the PF to be within limits as: The power flow equations are also satisfied while optimizing the DG units as: where L , L represent the utility powers; MN , MN represent the total injected DG powers; %&'' , %&'' represent system powers; and [\]^_[ , [\]^_[ represent the demand powers.

MRFO Algorithm
The MRFO is a new metaheuristic optimization algorithm inspired by the behavior of manta rays creatures (Zhao, Zhang, and Wang 2020) published in 2020. The algorithm is not widely applied to power system optimization problems. This encourages us to adopt it for solving the DG allocation problem to reduce the energy losses of radial distribution systems (RDS). The MRFO mathematical model includes three foraging behavior as follows:

Chain foraging
The chain foraging is modeled as (Zhao, Zhang, and Wang 2020): where J ( ) represents the position of the ℎ manta ray at time ; represents a random number; represents a weighting coefficient; (\'K ( ) represents the best location so far; represents the number of rays.

Cyclone foraging
The mathematical model of cyclone foraging is expressed as (Zhao, Zhang, and Wang 2020): = 2 exp ( 4 × − + 1 × sin(2 4 )) where 4 is a random number and is a weighting factor, and , are the current and maximum iterations.
To enhance the exploration process, random assignments are assigned to rays as follows: where )[ is a random position, , are the lower and upper limits of the search space.

Summersault foraging
The summersault action is modeled as (Zhao, Zhang, and Wang 2020): where , , { are random numbers. The above steps of the MRFO repeat until the stopping criterion is met. In this study, the stopping condition is the maximum number of iterations.

Results and Discussions
The standard 69-bus RDS performance is enhanced with optimal sizing and sitting different DG units. The main purpose is to minimize the total power loss and hence the energy loss as a result. The 69-bus RDS, as shown in Fig.  1, has a power loss of 224.95 kW at normal demand conditions. The system data is provided in (Khodabakhshian and Andishgar 2016). The optimization in this study has two phases. In the first phase, the system works at regular demand, and the three different algorithms MRFO (Zhao, Zhang, and Wang 2020), ASO (Zhao, Wang, and Zhang 2019), and PSO (Kennedy and Eberhart 2011), are adopted and implemented to reduce the total power losses. In the second phase of the study, the same algorithms are used to reduce the total energy losses with time-varying demand along the 24-h cycle.

Power loss reduction at regular demand
The MRFO optimizes single-, two-and three-DG units to minimize the total system energy losses. Fig. 1 The 69-bus system layout.
The MRFO performance is compared to PSO and ASO, and other algorithms in the literature when the distribution system is loaded with the regular demand (fixed PQ load). The DG operates with UPF and OPF separately, as discussed in the following sections.

DG operation with UPF
In this section, the total power loss ( %&'' ) is minimized while the system is loaded at regular demand with the help of the optimal allocation of different DG units operating at UPF. The study includes the optimal integration of single-, two-, and three-DG units using three metaheuristic optimization algorithms. These algorithms include the well-known PSO (Kennedy and Eberhart 2011) and ASO (Zhao, Wang, and Zhang 2019), and the newly published MRFO algorithm (Hemeida et al. 2020). For a single-DG allocation, the losses are the same for all algorithms of 83.177 kW as listed in      Fig. 3 using the MRFO algorithm. The voltage profile increases with increasing the number of the DG units due to the extra injected real power into the system. Hence, the current in the system feeders decreases. The reduction of the feeder currents results in fewer power losses, and lesser voltage drops from the slack bus to the different branches and loads, which leads to the improvements of the voltage at system buses.

DG operation with OPF
When the DG operates with an optimal power factor (OPF), it reduces the system power loss dramatically compared to that of the operation with UPF. The DG operating with OPF supplies active power and reactive power to the system to cover some of the load and the system losses. As a result, the source power decreases and, consequently, the active and reactive power losses decrease. In this case, any algorithm optimizes the size, site, and PF of each DG. Thus the problem is three-, six-, and nine-dimensional type for allocating a single-, two-, and three-DG units, respectively. for a single-DG operating with OPF, the MRFO reduces the %&'' to 23.134 kW with a percentage reduction of 89.71%, competing with the other ASO and PSO algorithms as listed in Table 2 and shown in Fig. 4. With two-DGs, the losses are reduced to 7.189 kW, 7.213 kW, and 7.348 kW for MRFO, ASO, and PSO algorithms, respectively. The percentage loss reduction increases when the number of the DGs increase, as shown in Fig. 4. Moreover, the reduction with MRFO is the largest among the three algorithms.
While allocating different DG units at their OPF, the voltage profiles of the 69-bus RDS are drawn in Fig. 5 using the MRFO algorithm. The voltage profile increases with increasing the number of the DG units due to the extra injected real power into the system. The voltages with 2 and 3 DGs are almost around the unit value. This means that DG compensating or injected real and reactive power covers most of the load and losses of the system.

Power loss reduction with time-varying demand
In this section, the DG units are optimized using the MRFO algorithm for reducing the energy losses of the 69bus RDS loaded by a commercial load type (Hung, Mithulananthan, and Bansal 2014), illustrated in Fig. 6. The active and reactive energy losses, 9 | , 9 } respectively are calculated during a whole day cycle by integrating the power loss curves during the same period. The algorithm optimizes the size and site of each DG at every hour, and the corresponding power losses are recorded. By the end of the day, the power loss curves are generated, and the energy losses are evaluated. A complete flowchart for the process is shown in Fig. 7. The flow chart starts with collecting system and algorithm input data, and then the simulation runs for every hour for a whole day (24 h). Then starting from the first iteration, the system is solved using FBSM, and the objective function is updated as well as the particles of the algorithm. The process is repeated until the maximum iteration number and then restarted with the next hour until the end of the day. The power loss curves for a single-DG allocation using the MRFO algorithm are shown in Fig. 8, accompanied by the base curves (without DGs). As can be seen that both active and reactive power loss curves follow the pattern of the daily load demand, as shown in Fig. 6. When the demand increases, more losses are generated in the system. The power losses are lower when the DG operates with OPF than the case with UPF operation. When the MRFO optimizes two-and three-DG units, the power curves are shown in Fig. 9 and Fig. 10, respectively. The loss curves always follow the load pattern with UPF operation, while the active loss curve does not follow it with two and three DGs at OPF. The sum integration of these loss curves during the whole day yields energy loss per day values.  Citation: Eid, A., Abdelaziz, A.Y., Dardeer, M. (2021

with UPF DG units
The MRFO and other algorithms, ASO, PSO, are applied to optimize the DG units throughout the whole day to minimize the total energy losses and for energy-saving purposes. The system is optimized every hour of the day, and hence, the energy losses and energy saving are calculated.
Operating with UPF DGs, the energy losses are calculated and listed in Table 3. For a single-DG, the MRFO optimizes the system to 817.91 kWh and 397.21 kVarh for active ( 9 : ) and reactive ( 9 C ) energy losses achieving the lowest values compared to the ASO and PSO algorithms. On the other hand, with two-and three-DG units, the MRFO performance is also better than the ASO and PSO algorithms. The matching active ( H : ) and reactive ( H C ) energy savings are calculated for each case study and listed in Table 3. It is clear that increasing the number of DG units decreases energy losses and increases energy savings. Injecting real and reactive power to the system at some buses reduces the power coming from the primary substation, which results in a reduction of the currents passing in the system feeders. Decreasing the currents in the feeders reduces the system losses and hence energy losses. Thus this process saves more energy.

with OPF DG units
The second scenario for energy saving is to allocate the DGs with OPF. With OPF, the DG injects both real and reactive powers into the system. This will share the load and losses with the main supply and decrease the total system losses. With different DG units, the active ( 9 : ) and reactive ( 9 C ) energy losses are calculated during a day cycle and listed in Energy savings increase with increasing the DG units. On the other hand, both energy savings are more significant for the OPF case than that with UPF operation. If the electricity tariff is assumed 0.127$/kWh, the costsaving is displayed in Fig. 11 for different DG units with UPF and OPF cases. The cost-saving is more significant with OPF than with UPF. Moreover, increasing the DG units maximizes the benefits.

Conclusion
A new optimization algorithm called MRFO has been implemented to optimize different DG units to minimize the total energy losses of the 69-bus distribution systems.
The study included single-, two-, and three-DG units. All of the DG units are optimized to work with unity and optimal power factors. The obtained results showed that the increasing number of the DG units reduces the system energy losses, and hence, more energy savings and cost savings are achieved. Moreover, the results approved the proposed MRFO algorithm's superiority over ASO and PSO algorithms and other algorithms. The MRFO algorithm can optimize the size, site, and power factor of every DG along the 24-h cycle to minimize the active and reactive energy losses of the distribution systems. For future work, the actual modeling of the distributed generation such as photovoltaic (PV) and wind energy systems (WES) can be modeled and considered together with their uncertainty of power generations.