Optimal Power Flow in DC Networks Using the Whale Optimization Algorithm

This paper presents a solution method for the optimal power flow (OPF) problem in direct current (DC) networks. The method implements a master-slave optimization that combines a whale optimization algorithm (WOA) and a numerical method based on successive approximations (SA). The objective function is to reduce the power losses considering the set of constraints that DC networks represent in a distributed generation environment. In the master stage, the WOA determines the optimal amount of power to be supplied by each distributed generator (DG) in order to minimize the total power losses in the distribution lines of the DC network. In the slave stage, the power or load flow problem is solved in order to evaluate the objective function of each possible configuration proposed by the master stage. To validate the efficiency and robustness of the proposed model, we implemented three additional methods for comparison: the ant lion optimizer (ALO), a continuous version of the genetic algorithm (CGA), and the algorithm of black hole-based optimization (BHO). The efficiency of each solution method was validated in the 21-and the 69-node test systems using different scenarios of penetration of distributed generation. All the simulations, performed in MATLAB 2019, demonstrated that the WOA achieved the greatest minimization of power losses, regardless of the size of the DC network and the level of penetration of distributed generation.


Introduction
It has been demonstrated that the regions that have access to electricity experience greater economic development, which translates into better living conditions for their inhabitants [1].Therefore, in recent years, technological development and worldwide energy, economic, and environmental issues have created the need to explore new power generation technologies that can supply electrical energy safely and reliably to all end users.
Acknowledging this need, several authors have sought to promote and develop clean generation technologies that can satisfy current energy needs and reduce the environmental impact by implementing renewable energy resources [2][3][4].In addition to their main advantage (i.e., the reduction of generation based on fossil fuels and, thus, energy production costs and the environmental impact), correctly locating and sizing clean technologies can have a positive impact on different technical indicators, such as power losses, voltage stability, and service interruptions [5][6][7][8].However, although multiple papers have addressed the optimal location of distributed generators in electrical networks, such optimal location is usually just a dream in real life because, due to the geographic, climate, and technical conditions of the region, the location of the generation devices is pre-established or fixed by the network designer or operator, which is the case examined in this study.
In addition to the research into distributed generation based on renewable energy sources that was mentioned above, in recent years, several authors have focused their work on DC networks to develop energy distribution systems in isolated as well as grid-connected networks [9][10][11][12].This is due to the multiple advantages of DC networks with respect to their AC counterparts: elimination of the analysis of reactive, less complex design and set-up, and easy adaptation of energy resources (e.g., photovoltaic generators and batteries) [13].
Due to the importance of DC networks and adequately sizing the distributed generators (DGs) in them, different papers have addressed this problem.For instance, the case in [14] proposed the formulation of second-order cone programming to size distributed generators in an isolated DC network, and the objective function was the minimization of power losses.Using the same objective function, Montoya et al. [15] proposed a convex quadratic model to solve the OPF problem in DC networks and employed 10-and 21-node test systems to demonstrate the efficiency of their methodology.The Linprog function of MATLAB was also used to find the optimal size of generators distributed in a DC network in India [16]; in that paper, the objective function was the reduction of the operating and investment costs of microgrids.The issue in the previously mentioned studies is that their authors employed specialized software to solve the OPF problem, which increases the complexity and costs associated with the implementation and acquisition of the tool.
In order to eliminate the implementation of specialized software to solve the mathematical formulation that represents the problem of optimal sizing of generators in DC networks, several solution strategies based on sequential programming have been proposed in recent years.They have mainly employed metaheuristic optimization techniques.This is the case in [17], where a black-hole-based optimization algorithm was used to size distributed generators in DC networks.In that study, the authors employed the 21-and 69-node systems proposed in the specialized literature to validate planning and operation strategies of DC networks [18].Additionally, they evaluated three different maximum penetration levels of distributed generation to assess the effect of such technology on this type of networks.In [19], the authors used a hybrid strategy that combines a continuous version of the genetic algorithm and the Gauss-Seidel numerical method to solve the problem of optimal sizing of DGs in DC networks; the objective function there was to reduce the power losses associated with energy transport.Particle swarm optimization has also been used in [20] to solve the problem of optimal sizing of DGs in DC networks; the objective function there was to reduce the operating costs, which are directly affected by power losses associated with energy transport.Likewise, multiple studies in recent years have aimed to improve the technical conditions of DC networks (mainly focused on the reduction of power losses) by means of an optimal sizing of the distributed generators in the network [21,22].All these efforts have been oriented toward enhancing the impact of the proposed methodology in terms of the quality of the solution (objective function).For that purpose, the authors have compared their methodologies with others reported in the literature in different test scenarios in order to demonstrate the efficiency and robustness of their specific solution methodology.
DC networks are important, and solution strategies based on sequential programming should be proposed to avoid the use of commercial software and have a positive impact on the technical aspects of these networks by means of the optimal sizing of the distributed generation in them.For that purpose, this study proposes a masterslave strategy: in the master stage, the whale optimization algorithm (WOA) solves the problem of sizing the generators; and, in the slave stage, a numerical method based on successive approximations solves the power flow problem.The objective function is to reduce the power losses associated with energy transport.In order to validate the efficiency and robustness of the methodology proposed here, we used 21-and 69-node test systems, as well as three levels of maximum penetration of distributed generation: 20%, 40%, and 60% of the power supplied by the slack generator in a scenario without distributed generation.Additionally, the ant lion optimizer (ALO), the black hole-based algorithm (BHO), and the continuous genetic algorithm (CGA) were used for comparison purposes due to their excellent results reported by other authors regarding the problem addressed here.The simulation results obtained in this study demonstrate that the WOA reaches the highest levels of reduction of power losses at different levels of DG penetration and network sizes.

OPTIMAL POWER FLOW IN DC NETWORKS USING THE WHALE OPTIMIZATION ALGORITHM
This article is organized as follows.Section 2 presents the mathematical formulation of the optimal power flow problem in DC networks, whose objective function is to reduce power losses.Section 3 details the proposed methodology, which is based on a master-slave strategy that combines the WOA and SA.Section 4 describes the test systems and the parameters of the four optimization algorithms used in this study.Section 5 reports the simulation results with their respective analysis.Finally, Section 6 highlights some final remarks, conclusions, and future work derived from this study.

Mathematical Formulation
The optimal power flow (OPF) problem is defined by a set of equations and constraints associated with the power flow in DC networks [14,15,19,23] that can be used to determine the optimal size of DGs while reaching the desired values in an objective function.Such values are established by the network operator or owner by selecting the power levels in the DGs; in this case, they are aimed at reducing the power losses associated with energy transport in the electrical power system (P loss).The following is the mathematical formulation of the problem addressed in this study:

Objective Function
In this specific case, the objective function is to reduce the power losses related to power transmission.The mathematical representation of that function is Equation (1).
where v is the vector that contains all the voltage profiles calculated using the power flow, and G L denotes the matrix that represents the conductivity effects of each line.

Constraints
The constraints employed in this mathematical formulation are associated with the operation of DC networks in an environment of distributed generation, and they are represented by the following equations: P min DG ≤ P DG ≤ P max DG (4) The interpretations and components of Equations ( 2) to (6) are the following.Equation (2) represents the global power balance of the network, where P g , P DG , and P d denote the power generated by the slack node, the power supplied to the network by the DGs, and the power demanded by the loads at the network nodes, respectively.Additionally, D(v) is defined as a positive symmetric matrix whose diagonal contains the nodal voltages of the system; G L and G N represent the conductances of the lines and resistive loads connected to the microgrid, respectively.The capacity of the slack node and the DGs to generate power is established in Equations ( 3) and ( 4), where P min g and P max g denote the minimum and maximum power the slack node can supply to the network.Likewise, P min DG and P max DG define the minimum and maximum power the DGs can supply.Equation (5) presents the voltage regulation limits, where V min and V max are the minimum and maximum allowable voltages.
Finally, in order to ensure that all the constraints mentioned above were satisfied, we employed the adaptation function (z) in Eq. 7 to find the optimal size of the distributed generators.Such function penalizes the objective function if a constraint is violated.In it, β 1 to β 7 are penalty factors equal to 1000 in order to force the optimization methods to meet all the constraints of the problem addressed in this study; such values are obtained in an heuristic manner.In addition, Ones T is a transposed vector of ones that enables the sum of the various penalties inside the adaptation function.Importantly, when all the constraints are satisfied, all the penalty factors should be nulled by max{•} and min{•} functions, which, in that case, makes z equal to P loss.

Proposed Methodology
Equations ( 2) to (6) in Section 2, which represent the problem addressed in this paper, require the application of nonlinear methods to find a solution.In that sense, this paper proposes a two-stage master-slave methodology to solve the optimal power flow problem in DC networks.The master stage is responsible for finding the optimal power injection of the DGs using the WOA, while the slave stage evaluates the z of the different power configurations proposed by the master stage using SA.The following is a description of the master-slave (WOA-SA) methodology proposed in this study:

Master Stage: Whale Optimization Algorithm
The WOA is inspired by the behavior of humpback whales and fish herds [24]; more specifically, it is based on the hunting method of such whales, called bubble-net, which consists of creating a spiral surrounding the pray to direct it to the surface.The whales follow the most successful hunters and converge at the location where most pray can be found.This behavior can be modeled mathematically and, thus, used as an optimization method.The following subsection presents the stages we followed for the computational development and to find a solution to the OPF problem in DC networks using WAO.

Generation of the initial population
To generate the initial population of whales, (M W hales ), and its respective location in the solution space, this paper proposes a population of size nxd, where "n" denotes the rows that represent the number of whales (possible solutions to the problem) and "d" denotes the columns that represent the location of the whales in said space (which is related to the number of variables in the problem to be solved).In Equation ( 8), W n is the n-th whale in the M W hales matrix.In this specific case (i.e., optimal power flow in DC networks), the number of columns is the number of nodes with DGs (different from the slack node) installed in the electrical network, and the value assigned to them in each row indicates the power level to be injected by each distributed generator.
The values of each column in every individual (whale) in the population are assigned randomly at the first iteration of the algorithm, respecting the maximum and minimum limits that constrain each variable in the problem.In this case, we used the maximum and minimum power limits established for the DGs.
3.1.2.Calculation of the objective function To assess the impact of all the possible solutions contained in M W hales , we evaluate the adaptation function of each whale W i (aptitude function).Subsequently, each one of the values obtained are stored in a matrix of size nx1 called M O W hales .In this case (i.e., the OPF problem), we evaluate the power levels proposed by each whale, thus obtaining the level of the adaptation function, which defines the power loss levels associated with every possible solution and the penalties for constraint violations (if they occur).
Additionally, the row (W i ) that offers the best solution in the M W hales matrix is selected as the incumbent solution to the problem.The resulting value of the objective function and the configuration of values that compose it are stored.

Evolution of whale position using upward-spirals
The WOA implemented here uses an iterative process in which, at each iteration, a new spiral bubble-net is generated; this enables the search agents (i.e., the whales) to explore the search space.To simulate this behavior, the whales can move forward adopting two methods.The first method is a shrinking encircling mechanism that can be used to update the whales' position based on the best whale (i.e., the incumbent solution) or a random whale.The second method is the upward spiral, which aims to attract the pray to the whale.The method is selected based on the probability of p.If p is under 50%, the shrinking encircling mechanism is selected; otherwise, spiral updating position is used.The following is a description of these two mechanisms.
Shrinking encircling mechanism: This method employs a selection factor (A), which, based on its value calculated at each iteration, forces the whale population to move to the incumbent solution or a random position, which enables such method to escape from local optima.
The A factor is calculated by reducing the value of a in (10) from 2 to 0. Such value changes as a function of the total number of iterations of the algorithm, as shown in 11, where I M ax denotes the maximum number of iterations, and I is the current iteration.Additionally, A is calculated as a function of an r value, which is a random number in the [0, 1] range.
When |A| ≥ 1, the movement of the whales evolves as a function of variable D (see 12), which determines a new random position from the current whale position.The A factor is also used to force the agents to search away from the reference whale.In Equation 13), W rand denotes a randomly chosen whale; r, a random value in the [0,1] range; and W t , the whale at the current iteration.
In turn, when |A| < 1, the movement is defined by (14), which calculates a new position between the whale at the current iteration and the current incumbent solution.The position of each whale is updated using (15), where W best is the position of the whale associated with the incumbent, the A factor enables a greater exploitation of the search space taking the best search agent as a reference point, and t denotes the current iteration.
Spiral updating position: The search agents can also be updated by means of the spiral mechanism, which consists of calculating the distance between the prey and the whale using ( 16) to generate a helix-shaped movement from the whale's position to that of the prey (the current incumbent solution).This imitation of the spiral motion of humpback whales is mathematically formulated in (17).
where b is a constant used to define the shape of the logarithmic ellipse, and l is a random number in the [−1, 1] interval.
At the end of each iteration and after M W hales has been calculated, we should verify that the W hales respect the constraints established for the problem examined here.Thus, if a constraint is violated, the objective function of each whale is penalized using the adaptation function proposed in (7).Afterward, M O W hales is updated with the new population, and the incumbent is updated as well.This process is repeated until the stopping criteria established for the problem addressed here are met.

Stopping criteria
We used two stopping criteria for the master stage: • The master stage will end after n consecutive iterations in which the incumbent solution is not updated.In other words, the process finishes when the objective function reaches a certain number of iterations (nonimprovement counter) without finding a better solution to the problem.• The computational analysis ends when the optimization algorithm reaches the maximum allowable number of iterations for such algorithm.Iterations are recorded using a counter in the algorithm.

Slave stage: Successive Approximations (SA)
The slave stage can calculate the objective function and the feasibility of each possible solution (W hales) proposed by the master stage.In other words, the slave stage calculates the electrical variables needed to estimate the power losses of the system, which represent the objective function in this paper, as well as the set of constraints associated with the problem.However, as this process requires an iterative method to solve the power flow (PF) problem in DC networks, this study proposes an iterative solution based on successive approximations (SA) [25].The latter was selected due to its excellent results, reported by the authors, in terms of convergence and processing times.The SA method solves the PF problem using where G dd is a positive symmetrical matrix that contains the conductance of the lines connecting nodes and the resistive loads of the electrical power system, except for the slack node; and V g and V d are the voltage profile in the (slack) generators and the demand nodes, respectively.By means of a mathematical development applied to (18), we can obtain the equation that can be used to calculate the nodal voltages in the demand nodes: Applying an iterative process, we can obtain the V d voltage profiles with an almost null convergence error.For this purpose, we should add a counter, i.e., t, in (19), thus obtaining: Algorithm 1 presents the pseudocode of the master-slave methodology proposed here, which combines the WOA and SA to efficiently solve the problem of optimal sizing of DGs in DC networks.
Algorithm 1 Hybrid WOA-SA optimization algorithm 1: Load network data.for Each search agent do 8: Calculate A, a, l, and p.

9:
if p < 0.5 then 10: Update the position of the current search agent using (15). 12: Randomly select a search agent (W rand ). 14: Update the position of the current search agent using (13). 15: end if

16:
else if P ≥ 0.5 then 17: Update the position of the current search agent using (17).end for 20: Calculate the adaptation function using SA.

21:
Update the incumbent solution.

Test systems and parameterization
This section details the test systems, their parameters, and test scenarios proposed in this study to validate the efficiency of the WOA to solve the problem of optimal sizing of distributed generators in DC networks.

Test systems
This section describes the 21-node [18] and 69-node [6] DC test systems used in this study.The two have been widely implemented in the literature to validate methodologies to plan and operate DC networks [26,27].
Stat., Optim.Inf.Comput.Vol. 12, September 2024 S. C. JIMENEZ-HERNANDEZ, L. F. GRISALES-NORE ÑA, J. MONTANO, O. D. MONTOYA, W. J. GIL-GONZ ÁLEZ.1483 Both systems were modified to have only load nodes in them (generation nodes other than the slack node were eliminated); for that purpose, the generation values in the original systems were transformed into loads in the systems employed here.Finally, the location of the distributed generators in the 21-and 69-node systems was calculated based on locations recommended in the specialized literature, which are described below.

21-node test system
Figure 1 shows the electrical diagram of the first system, composed of 21 nodes and 20 lines; and Table 1 lists the data that represent its nodal interconnections, the resistances in the lines, and the power demanded at each node.The voltage and base power in this system are 1 kV and 100 kW, respectively.In the case without distributed generators in the system (base case), the power generated by the slack node is 581.6 kW, and the power demand is 554 kW, which generates 27.603 kW of power losses.Finally, the distributed generators in this system are located at nodes 9, 12, and 16 [17]; they will be sized later.

From
To

69-node test system
Figure 2 shows the second test system, which comprises 69 nodes and 68 connection lines; and Table 2 presents its nodal interconnections, the resistances in the lines, and the power demanded at each node.The 69-node system reported in [6] originally operated in AC.However, in this study, we adapted it to DC by eliminating the reactive components form the lines and the loads in the system.For that purpose, we used a base voltage of 12.66 kV and a base power of 100 kW.We also considered a base case without distributed generators in the electrical power system.In said case, the power generated by the slack node is 4043.1 kW, and the power demand is 3889.25  kW of power losses.Finally, the distributed generators in the 69-node system are located at nodes 26, 61, and 66 [6].Table 2. Electrical parameters of the 69-node system

Comparison of methods
In order to validate the efficiency of the methodology proposed in this paper in terms of the quality of the solution (i.e., power loss reduction), we employed three other master-slave methodologies that can also be used to optimally size DGs.Such methodologies implement three different continuous solution methods in the master stage: (1) the ant lion optimizer (ALO) [28], which is a technique based on the way antlions hunt, i.e., they dig cone-shaped holes in the ground to catch their prey; (2) the continuous genetic algorithm (CGA) [29], which is based on the genetic process of living beings, who store the information of learned evolutions and share it with the following generations; and (3) Black Hole Optimization (BHO) [17], which uses the interaction between stars and black holes to offer a solution to the problem.
Stat., Optim.Inf.Comput.Vol. 12, September 2024 S. C. JIMENEZ-HERNANDEZ, L. F. GRISALES-NORE ÑA, J. MONTANO, O. D. MONTOYA, W. J. GIL-GONZ ÁLEZ.1485 Nevertheless, the slave stage of all these methodologies (including the one proposed in this paper, i.e., WOA-SA) employs successive approximations to solve the load or power flow problem [19].This method is implemented due to its high efficiency, in terms of convergence and processing times [25], and in order to make a fair comparison between the proposed methodology and its three counterparts.
Each method was tuned in order to obtain the best possible response in terms of objective function for each test system, which was possible by implementing the particle swarm algorithm proposed in [6].More specifically, several parameters were tuned in the techniques: population size ([2-100] range), number of iterations ([1-1000] range), and number of non-improvement iterations ([1-1000] range).In particular for WOA, we also tuned parameter b, which is a constant used to define the spiral shape, employing a [-1,1] range.Table 3 presents the parameters found for each methodology discussed in this document.
Non-improvement iterations: (151) Non-improvement iterations: (182) Non-improvement iterations: (443) Non-improvement iterations: (566) Constant b to define the spiral 0,67984 ---------Table 3. Parameters of the continuous methods employed in the master stage Additionally, in order to evaluate the robustness of the methodology proposed here, we considered three MGD levels applied to each one of the test systems described above: 20%, 40%, and 60% of the power generated by the slack node in the base case.The objective of this step was to evaluate the impact of the distributed generation on the DC networks.Importantly, we allowed a single generator or the group of three generators to reach the MGD.Therefore, the minimum power limit of each generator was 0 W, and the maximum level was equal to the penetration limit established for each case (20%, 40%, or 60% of the slack power), as long as a single generator was injecting power to the system.Finally, the voltage limits of the test systems were +/-10% of the nominal voltage of each system.

Simulations and results:
The computational analysis was conducted on a computer with a 3-GHz Intel Xeon CPU ES 1660 processor, 16 GB of RAM, a 2.5-inch 480-GB SATA solid state drive, and Windows 10 PRO as the operating system.The programming environment was M atlab ® 2019a.
Tables 4 and 5 present the results of applying the previously described solution methods to the test systems in each scenario.In said tables, the five columns show, respectively, (1) the solution method; (2) the power injected by each DG installed in the system; (3) the minimum P loss and the percentage of reduction with respect to the base case; (4) the mean P loss and the percentage of reduction with respect to the base case; and (5) the standard deviation of each method.In the case with 20% MGD, the WOA achieved the greatest reduction in P loss with respect to the base case (52.08%); that is, it outperformed the ALO, CGA, and BHO in terms of P loss reduction by 3.91%, 0.1854%, and 3.29%, respectively.In the case with 40% MGD, the CGA produced the largest P loss reduction (77.72%), outperforming the WOA by just 0.0578%; nevertheless, the WOA outperformed the BHO and ALO by 2.81% and 1.39%, respectively.Finally, in the tests with 60% MGD, the CGA was the most successful method (89.80%),only 0.0236% better than the WOA (89.7822%), which was followed by the BHO (88.96%) and ALO (87.0009%) in the third and fourth places, respectively.
Note that the WOA produced the greatest average reduction in P loss in the 21-node system when the results obtained in the three test scenarios (i.e., 20%, 40%, and 60% MGD) are averaged.Such reduction in P loss was 73.17%, which is 3.17% better than the ALO, 0.035% better than the CGA, and 1.83% better than the BHO.Moreover, the WOA exhibited the largest minimum reduction in P loss in the 21-node system (73.32%) in the three penetration scenarios with respect to the base case (see Figure 4).

69-node system
Table 5 reports the simulation results obtained in the 69-node system with each method.As with the 21-node system, Figures 5 and 6 show the difference in mean and minimum power losses obtained by the WOA and each one of the methods used for comparison here.Figure 5 presents the impact of each one of the methodologies implemented in this study on the average loss reduction.When a 20% MGD was allowed, the method that produced the highest reduction in P loss was the WOA, with 62.99%, followed by the CGA, with a P loss reduction 0.094% lower than WOA's.BHO was in the third place, with a P loss reduction 3.47% lower than WOA's; and the worst solution was offered by the ALO, with a P loss reduction 3.66% lower than that of the method proposed here.When a 40% MGD penetration was allowed, the CGA was on top in terms of power loss reduction, but its solution was only 0.045% better than that of the WOA, which was followed by the BHO (87.72%) and the ALO (87.35%).Finally, when a 60% MGD was considered, the WOA was the most effective method for reducing power losses, with a 96.31% decrease in P loss , thus outperforming the ALO, CGA, and BHO by 1.912%, 0.017%, and 2.077%, respectively.As in the 21-node feeder, the proposed method (i.e., WOA) presented the best minimum reduction in P loss in the 69-node system at all the penetration levels.Remarkably, the WOA also achieved the best mean reduction in P loss , i.e., 83.38%, outperforming the ALO, CGA, and BHO by 2.99%, 0.022%, and 2.86%, respectively (see Figure 6).
Finally, to determine the efficiency and robustness of the WOA to solve the problem of optimal sizing of DGs in DC networks of different sizes, we averaged the results of each methodology in the different scenarios and test systems considered in this paper, which are presented in Figure 7.The latter shows that the WOA achieves the greatest reduction in minimum and average power losses.Regarding the minimum power losses found by the methodologies, the WOA outperformed the ALO, CGA, and BHO by 0.0691%, 0.0071%, and 0.1675%, respectively.Furthermore, the WOA produced a mean reduction in P loss of 78.28%, which is 3.083%, 0.0285%, and 2.346% better than that of the ALO, CGA, and BHO, respectively.This shows that the methodology proposed in this paper can achieve the highest reduction in power losses when distributed generators are optimally sized in DC networks of different sizes.

Conclusions
In this paper, we proposed a WOA-SA optimization algorithm to solve the OPF problem in DC networks by means of a master-slave methodology.The master stage uses the WOA to determine the optimal power to be injected by each DG.In turn, the slave stage employs the power flow based on successive approximations to calculate the impact of each solution proposed by the master stage on the objective function and the set of constraints that define the problem.To prove the efficiency of the method proposed in this study, we used three other methods for comparison (i.e., the ALO, CGA, and BHO) and three MGD levels as test scenarios (20%, 40%, and 60% of the power supplied by the slack node in a no-DG configuration).In most cases, the WOA reached the highest reduction in average P loss , and, in all cases, the greatest decrease in minimum P loss .The standard deviations of this method are adequate with respect to that of the three other methods used for comparison.Based on these results, we can conclude that the WOA-SA master-slave methodology is the

Reduction of energy costs [%]
WOA ALO CGA BHO Figure 7. Reduction of power losses for all the systems and penetration percentages most efficient method to solve the OPF problem in DC networks of different sizes and MGD levels.Therefore, this hybrid methodology is recommended to reduce power losses in DC networks by optimally sizing their DGs.Future studies could use the WOA-SA methodology proposed in this article with different objective functions that consider the reduction of the operating costs of the network and the CO 2 emissions associated with fossil fuel power generation.The WOA-SA can also be used to solve the problem of optimal location and sizing of DGs in DC as well as AC networks.
Figure 1.21-node system

Figure 2 .
Figure2shows the second test system, which comprises 69 nodes and 68 connection lines; and Table2presents its nodal interconnections, the resistances in the lines, and the power demanded at each node.The 69-node system reported in[6] originally operated in AC.However, in this study, we adapted it to DC by eliminating the reactive components form the lines and the loads in the system.For that purpose, we used a base voltage of 12.66 kV and a base power of 100 kW.We also considered a base case without distributed generators in the electrical power system.In said case, the power generated by the slack node is 4043.1 kW, and the power demand is 3889.25 kW, which generates 153.85

Figure 3 .Figure 4 .
Figure 3. Mean loss reduction in the 21-node system with the WOA as the zero reference

Figure 5 .Figure 6 .
Figure 5. Mean power loss reductions in the 69-node system with the WOA as the zero reference

Table 1 .
Electrical parameters of the 21-node system

Table 4 .
Results in the 21-node system

Table 5 .
Results obtained in the 69-node system