Next Article in Journal
A Real Data-Driven Fault Diagnosing Method for Distribution Networks Based on ResBlock-CBAM-CNN
Previous Article in Journal
Microgrid Multivariate Load Forecasting Based on Weighted Visibility Graph: A Regional Airport Case Study
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Allocation and Sizing of Electrical Substations Using an Improved Black Widow Algorithm

by
Nathan de Oliveira Valim
and
Clainer Bravin Donadel
*
Federal Institute of Espírito Santo, Campus Vitória, Avenida Vitória 1.729, Vitória 29040-780, ES, Brazil
*
Author to whom correspondence should be addressed.
Electricity 2025, 6(2), 18; https://doi.org/10.3390/electricity6020018
Submission received: 10 February 2025 / Revised: 23 March 2025 / Accepted: 1 April 2025 / Published: 7 April 2025

Abstract

:
The allocation and sizing of electrical substations are critical for the efficient planning and expansion of distribution networks. This study presents the application of an enhanced Black Widow Algorithm (BWA) to solve this complex problem, considering multiple variables and constraints. The BWA, inspired by the reproductive behavior of black widows, was employed to optimize the placement and sizing of new substations and connection of load centers. Two mutation methods were evaluated: the original BWA mutation and a genetic algorithm-inspired mutation incorporated into the BWA algorithm (GA mutation). Four scenarios with varying load center distributions were tested to assess the algorithm’s adaptability and performance. The results showed that the GA mutation consistently outperformed the original mutation in more complex scenarios, reducing total costs by up to 14.75%. The proposed GA mutation enabled greater flexibility in escaping local optima, leading to improved solutions in scenarios involving numerous new load centers. Additionally, increasing the number of generations and black widows enhanced convergence and solution stability, particularly in challenging cases. This study demonstrates the feasibility of using the enhanced BWA for real-world applications, offering a valuable tool for electrical distribution planning.

1. Introduction

The economic growth of a country is directly associated with increased consumption of electricity in both industries and households [1]. This rise in electricity consumption is a clear trend that must be considered by power distribution companies when planning the expansion of the distribution network. Such planning should take into consideration the forecasted load growth in areas already served by the grid, the projected installation of new medium and large loads, such as industrial facilities, and the municipal development plans for each city within the distribution company’s service area [2].
In the context of distribution network expansion planning, the allocation and sizing of electrical substations have a significant impact on the grid, affecting both reliability and financial aspects [3].
Given that this is a multivariable, complex problem with engineering, financial, geographical, ecological, and aesthetic constraints, it is not feasible to describe the problem using a single function and apply classical mathematical methods for finding maxima and minima [4]. The sheer magnitude of the number of possible solutions in such problems also makes it impractical to compute all potential outcomes to identify the optimal one, necessitating the use of alternative optimization approaches.
In recent years, new optimization techniques have been developed, with heuristic methods being the most commonly used to find good solutions without testing all possible combinations. These optimization techniques have numerous applications, including the allocation and sizing of electrical substations using a biogeography-based optimization with population competition algorithm (BBOPC) [4], k-means algorithm [5,6], Voronoi diagram method [7], binary modified imperialist competitive algorithm (BMICA) [8], deep learning algorithm [9], artificial immune systems [10], k-mean++ algorithm [11], dynamic programming [12], genetic algorithm [13] and 0–1 optimization model [14]. In these studies, the authors address variables such as the installation and operational costs of electrical substations, costs associated with feeder reinforcement, the estimated power of loads and distributed generation units, as well as data on the network topology.
Among the various techniques proposed in the literature, one noteworthy method is an evolutionary approach based on the reproductive behavior of a species of arachnid known as black widows. In the proposal by [15], the concept of cannibalism during the reproduction phase was introduced, which helps accelerate population improvement and demonstrates strong performance in benchmark functions.
The Black Widow Algorithm (BWA) has been applied to various optimization problems, including distributed generation planning and operation [16,17], load dispatch [18], frequency regulation [19], antenna design [20], and noise reduction in medical imaging [21]. In the literature review conducted, no studies were found that addressed the use of the BWA in solving the optimal allocation and sizing problem of electrical substations.
One of the mechanisms for diversifying the solutions generated by the BWA is mutation. In the approach proposed in [15], the values of two genes are randomly swapped with each other. However, it has been observed that the performance of the BWA can be enhanced through the adoption of an alternative mutation technique.
Therefore, this article proposes the application of the BWA algorithm to the optimal allocation and sizing problem of electrical substations. Additionally, it introduces a modification to the original BWA by incorporating the classical genetic algorithm mutation into its mutation phase. This enhancement aims to improve the algorithm’s operational performance, particularly by minimizing the total cost. Additionally, this study contributes by evaluating and comparing the performance of both the original BWA and the proposed modification within the context of electrical substation allocation and sizing. The analysis highlights the scenarios in which the proposed algorithm achieves superior performance.
The remainder of this paper is organized as follows: Section 2 presents the methodology, detailing the problem modeling, the implementation, and the proposed modifications to the BWA, as well as the tests and comparisons performed. Section 3 presents the results of the seven evaluated scenarios; finally, Section 4 presents the conclusions of the paper.

2. Methodology

This section presents the methods used for problem modeling, the modifications made to the original BWA, and the approach employed to test and compare the various proposed scenarios.

2.1. Problem Modeling

The problem was modeled using a geographic representation on the X Y plane, with loads represented by load centers defined by their positions on the plane, and electrical substations with power limitations corresponding to their installed capacities. Additionally, constraints were imposed on restricted areas for new electrical substations, which could include geographic, environmental, historical, or other restrictions that prevent the construction of a new electrical substation.
Four scenarios ( A , B , C , and D ) were adopted for testing, aiming to evaluate the algorithm’s performance and adaptability. These scenarios are based on the final scenario presented in [4], where the coordinates of the loads and the electrical substation were used, and the load demands were adjusted to address distribution issues.
In Scenarios A and B , eight pre-existing load centers and one electrical substation were considered, with the addition of six new load centers located either closer to (Scenario A ) or farther from (Scenario B ) the pre-existing load centers. These two scenarios test the algorithm’s response to new load centers in different regions, with the expectation that the placement of the new electrical substation will correspond to the location of the new load centers.
For Scenarios C and D , two electrical substations and 10 load centers were considered. Scenario C introduces five new load centers with demands that can be met by the pre-existing electrical substations, testing the algorithm’s response without requiring a new electrical substation or in identifying a non-trivial optimal allocation. Scenario D presents 10 new load centers, aiming to analyze more complex situations where one or more new electrical substations may be needed.
The data used are presented in Appendix A, and Figure 1 illustrates the scenarios, with the pre-existing electrical substations represented by green triangles, the pre-existing load centers by blue circles, the projected load centers by yellow circles, and the restricted areas marked by red rectangles. Their locations are indicated by coordinates on the X Y plane.
Based on the models described in the theoretical framework, the variables used by most of the authors reviewed [5,13,22,23,24,25,26] were selected for the cost function, with these variables being expressed in monetary terms. The cost function can be divided into three components: the installation cost of new electrical substations ( C S ), the cost of implementing new feeders ( C F ), and the cost of power losses in supplying the load centers over the considered time horizon ( C L ). Equation (1) defines the cost function.
C o s t = n s = 1 N n s C S n s + n f = 1 N n f C F n f + c = 1 N c C L c
where:
C S n s Installation cost of the electrical substation n s .
N n s Number of new electrical substations.
C F n f Installation cost of the new feeder n f .
N n f Number of new feeders to be installed.
C L c Cost of electrical losses in supplying load center c .
N c Number of load centers, both new and pre-existing.
The installation cost of a new electrical substation is obtained by referencing the tabulated values according to its installed capacity, without accounting for regional cost variations. Equation (2) provides the calculation of the installation cost of a new feeder, where the distance between the load center and the electrical substation is calculated as 1.55 times the Euclidean distance between the points ( D F = 1.55 Δ X 2 + Δ Y 2 ), as approximated in [25]. In this paper, only one type of feeder is considered, and each feeder is used to supply only one load center.
C F n f = C k m D F n f
where:
C k m Cost per kilometer of the new feeder.
D F n f Estimated distance covered by feeder n f .
Equation (3) defines the calculation of loss costs, considering balanced three-phase load centers. An analysis horizon of 10 years was established, and it is assumed that all new load centers are connected to the system at the beginning of this period.
C L c = 3 R k m D F n f S c 3 V l 2 C k W h 10 9 N Y e a r s 365 24 P f a c t o r _ c
where:
R k m Electrical resistance per kilometer of the feeder.
D F n f Estimated distance covered by the feeder from load center c .
S c Apparent power demanded by load center c .
V l Line voltage of the feeder.
C k W h Cost of energy.
N Y e a r s Analysis horizon.
P f a c t o r _ c Loss factor for load center c .
Another important factor in performance evaluation is the verification of constraints, specifically the installed capacity constraints of electrical substations and the restricted areas for new installations. The installed capacity constraints are evaluated through a summation, as shown in Equation (4), where the power demands of the load centers connected to electrical substation “s” are summed. This constraint is verified for all pre-existing and proposed electrical substations.
P D s = c = 1 N c S c
where:
P D s Power demanded from electrical substation s .
S c Power demanded by load center c .
The second constraint pertains to the location of new electrical substations, ensuring that no new electrical substations are installed in restricted areas. Such areas may include environmental protection zones, historically or culturally significant sites, geographic obstacles such as rivers, lakes, or mountains, or any other regions that are not available for development.
Based on Equations (1)–(3) and the constraints, the optimization problem can be formulated according to Equation (5), which is to be minimized.
M i n   C o s t = n s = 1 N n s C S n s + n f = 1 N n f C k m D F n f + c = 1 N c 3 R k m D F n f S c 3 V l 2 C k W h 10 9 N Y e a r s 365 24 P f a c t o r _ c
Complying with the installed capacity constraint—Equation (6):
P D s S s     s   N N s u b
where:
S s Installed capacity of electrical substation s .
N s u b Number of electrical substations, both new and pre-existing.
And the geographical constraint, which is satisfied if the X or Y coordinates of the new electrical substations do not fall within the boundaries of any restricted regions, with these regions modeled as rectangles—Equation (7):
X n s X r m i n , X r m a x Y n s Y r m i n , Y r m a x     r N N r e g   n s N N n s
where:
X n s / Y n s Coordinates of the new electrical substation n s .
X r m i n , X r m a x , Y r m i n , and Y r m a x Boundary coordinates of the restricted region r .
N r e g Number of restricted regions.
This study does not apply proximity constraints between the newly allocated electrical substations and the existing load centers. If necessary, the algorithm can include additional constraints to ensure the minimum required distance between the load centers and the proposed substations.

2.2. Algorithm Implementation

2.2.1. Variable Encoding

This paper focuses on analyzing a group of pre-existing loads and electrical substations, considering a group of new loads to be included in the system, and aims to allocate new electrical substations and optimize the connection of loads to them.
Based on these considerations, the encoding of a black widow V n (from the BWA population) consists of a vector, where each position of the vector corresponds to a variable. The first four values refer to a potential new electrical substation, where V n 0 indicates its existence or non-existence, assuming values of 0 or 1. V n 1 and V n 2 represent the coordinates on the X and Y axes, respectively, constrained by the maximum and minimum values of X and Y among all pre-existing and planned load centers.
The value in V n 3 represents the installed capacity of the new electrical substation, assuming values from a predefined table, as shown in Table A10 in Appendix A. This group of four values is repeated t s times, with t s being the maximum number of new electrical substations that can be proposed by the algorithm. In this paper, t s was arbitrarily set to 5, meaning that the solutions can contain up to 5 new electrical substations, which is considered a satisfactory number to cover the expected outcomes in the proposed scenarios.
The remaining values of the vector correspond to which electrical substation each load center is connected to, taking the identification values of either pre-existing or new electrical substations. Considering t c as the total number of load centers (pre-existing and new), the vector always has a size of 4 t s + t c . Figure 2 illustrates a black widow with its possible values.
The difference in the magnitudes of the variables makes the reproduction and mutation phases more challenging. Therefore, the black widow, as shown in Figure 2, is used only to verify constraints and calculate the total cost. During the other phases of the algorithm, the black widow is populated with decimal values between 0 and 1, standardizing all variables to the same range and making them resemble the individuals in the original algorithm proposal [15]. An example of a possible black widow is presented in Figure 3.
The conversion is performed linearly, with rounding applied to the discrete values. The detailed conversion process for the different types of variables are described in Appendix B.

2.2.2. Performance Calculation

After converting the black widow values for the problem, the performance of each black widow in the population is determined by applying the constraints and computing the total cost. First, the algorithm checks the constraints related to installed capacity and restricted regions. If any of these constraints are violated, the signaling variable ( R s ) is set to 1, indicating a constraint violation. The evaluation of performance relies on the cost function modeled by Equation (1), where a lower cost value indicates better efficiency. Equation (8) defines the verification of constraints and their impact on the cost function ( f c ).
f c = C o s t , i f   R s = 0 10 12 , i f   R s = 1
When R s = 1, the assigned cost corresponds to a penalty value significantly higher than the expected optimal cost for the scenario. As a result, the penalized black widow receives the lowest ranking in the population, since a lower cost indicates a better-performing solution.

2.2.3. Reproduction, Cannibalism, and Mutation

Once the costs of all the black widows in a population are calculated, they are ranked in ascending order of cost, and the top 60% are selected for the reproduction and mutation phases. This percentage was determined based on preliminary convergence tests of the algorithm.
At the start of the reproduction phase, pairs are formed randomly and without repetition from the selected black widows. In each pair, the black widow with the lower cost is called the female ( x 1 ), and the one with the higher cost is called the male ( x 2 ). Reproduction is carried out by generating offspring y 1 and y 2 .
These black widows are then used in the cannibalism phase, where the male always dies during reproduction, and two possible scenarios occur for the female and the offspring. If both offspring have a lower cost than the mother, the female dies, and both offspring move on to the next generation. Otherwise, the offspring with the higher cost dies, and the female and the better-performing offspring continue.
Thus, the algorithm selects 60% of the population, which then generates an equal number of black widows through the reproduction and cannibalism phases. The remaining 40% undergo mutation, ensuring a consistent population size across all generations. Figure 4 illustrates how a new generation is created from the previous one through these three mechanisms.
The mutation in the original BWA (referred to as BW mutation), where the values of two random positions are swapped [15], can be questioned regarding its effectiveness in overcoming local optima since no new values are introduced. Therefore, this paper proposes the incorporation of the classic mutation from the genetic algorithm, described in [27], into the BWA algorithm, where it is referred to as the GA mutation. In this approach, a new random value is assigned to a randomly chosen characteristic, determining the mutation method to be applied. This process allows for a systematic comparison of different mutation strategies, enabling an assessment of their impact on the results.

2.3. Tests and Comparisons

After the modeling and implementation, the four scenarios (A, B, C, and D) and the two mutation methods were tested, evaluating the installed capacity and consistency in achieving good solutions. A population size of 100 and a total of 100 generations were arbitrarily chosen. These parameters were selected empirically, as they were observed to be reasonable for the convergence of the solutions and, given the low complexity of the proposed scenarios, allowed for multiple executions in a short time for the validation of the tests, as previously mentioned.
For each combination of scenario and mutation type, 50 runs were conducted to reduce the impact of the intrinsic randomness of the method. This approach enabled the assessment of the dispersion of the new electrical substations, as well as calculating the average and standard deviation of the costs of the optimal solutions from each run.
Considering the low complexity of the first three scenarios, it was proposed to increase the population size and the number of generations to 200 in Scenario D to improve the chances of solution convergence, with comparisons made to the previous values.
Another complexity-related test was conducted by reducing the implementation cost of the electrical substations to 20% of the initially assigned value in Scenario D. This allowed for testing the algorithm’s ability to find solutions with multiple new electrical substations of higher complexity.
Table 1 provides a summary of the tested scenarios, including the respective number of generations, black widows, and the cost values of the electrical substations used, with both BW and GA mutations applied in each scenario.
The proposed methodology was implemented in the Python programming language and executed on a computer equipped with an Intel Core i5 processor (3.30 GHz), 16 GB of RAM, and Windows operating system.

3. Results and Discussion

This section presents the results obtained for each of the proposed scenarios, discussing the algorithm’s performance in each case and comparing the original BW mutation method with the proposed GA mutation.

3.1. Scenario A

Scenario A includes only one initial electrical substation, with new load centers planned near the pre-existing ones, whereas the total demanded power cannot be supplied by the pre-existing electrical substation. Both mutation methods found the same optimal solution after the test rounds, as shown in Figure 5, with one new electrical substation allocated and a redistribution of the load centers within the system. The load centers are represented by blue circles, the pre-existing electrical substations by green triangles, the new electrical substations by pink triangles, the feeders by black lines, and the restricted areas indicated by red lines.
Table 2 details the values associated with each type of cost in the optimal solution found. Notably, 60% of the total cost is attributed to electrical losses in the feeders over the 10-year analysis period.
Figure 6 confirms the similarity in performance between the two mutations, showing the evolution of one of the tests over the generations through a graph displaying the lowest cost value of each generation for each mutation type. It can be observed that the algorithm achieved convergence quickly in this scenario, encountering no significant difficulties in reaching the final value.
Figure 7 shows the distribution of solutions after 50 runs for each mutation type, with red circles indicating the position of new electrical substations. It can be observed that the solutions are tightly clustered.
All 50 solutions from each mutation method found results with a new electrical substation having an installed capacity of 40 MVA. This behavior demonstrates consistency in identifying such an important discrete parameter for the cost function. The optimal values found by each mutation, along with the averages and standard deviations of the optimal solutions after 50 runs, are shown in Table 3. It can be observed that, on average, the cost of the GA mutation was 0.33% lower than that of the BW mutation, indicating no significant performance differences in this scenario.

3.2. Scenario B

Scenario B also features only one initial electrical substation, but the new planned load centers are farther from the pre-existing ones, and the total demanded power cannot be supplied by the pre-existing electrical substation. Both mutations found the same optimal solution, which is presented in Figure 8.
This solution includes a new electrical substation supplying only the new load centers. The detailed cost breakdown is shown in Table 4, where the cost of electrical losses accounts for a large portion of the total cost, amounting to 63.5% in this case.
The rapid convergence and similarity between the mutations are also observed in this scenario. Figure 9 shows examples where the optimal solution was found in approximately 40 generations for both mutation types.
In Figure 10, one can see the dispersion of solutions, where it is noticeable that the BW mutation has a wider spread compared to the GA mutation, which is clustered closer to the optimal solution. Table 5 provides a summary of the costs found by each mutation, showing that the average cost of the GA mutation was 0.51% lower than the average cost of the BW mutation, indicating minimal difference between the mutation methods.

3.3. Scenario C

In Scenario C, there are two electrical substations that have the installed capacity to meet the demand of the new load centers. Figure 11 shows the optimal solution found by each mutation.
Table 6 provides the detailed costs of the optimal solution found using each mutation type. The solution from the GA mutation includes the cost of installing a new electrical substation, but the costs of new feeders and electrical losses are lower. As a result, the overall balance shows that the total cost is approximately USD 10,000 less than the solution without installing a new electrical substation.
In Figure 12, one can observe convergence in fewer generations than in Scenarios A and B, which is the expected behavior since this scenario is less complex than the previously mentioned ones.
Figure 13 shows the distribution of solutions after 50 runs for each mutation type. One solution using the BW mutation found a new electrical substation, while two solutions using the GA mutation identified a new electrical substation.
These three solutions suggested a new electrical substation with an installed capacity of 10 MVA, serving only a few load centers. Table 7 provides a summary of the 50 test runs for each mutation type, once again showing averages close to the optimal value found, approximately 0.1% higher, and small standard deviations.

3.4. Scenario D

Scenario D was designed to be more challenging for the algorithm, with two pre-existing electrical substations and several new load centers spread out. Figure 14 shows the optimal solution found by each mutation.
The optimal solution found by the BW mutation identified only one new electrical substation and allocated the remaining load centers to the pre-existing electrical substations. In contrast, the GA mutation found a solution with two new electrical substations to serve the more distant load centers. As detailed in Table 8, this solution has higher costs for electrical substation installation but lower costs for other factors, particularly new feeders, resulting in a lower total cost.
Another consequence of the greater complexity of Scenario D is observed in Figure 15, which shows that, in these examples, the optimal solution was found in the later generations, especially in the GA mutation.
Figure 16 shows the distribution of solutions after 50 runs for each mutation type, where no clear solution pattern is observed. This, along with the evaluation of solution evolution, indicates the need for a larger number of generations and black widows in the population to achieve greater consistency in the results.
Figure 17 contains histograms showing a greater diversity in the BW mutation, with a preference for 25 MVA electrical substations. In contrast, the GA mutation concentrated on electrical substations with lower installed capacity, primarily 17.5 and 25 MVA.
Table 9 presents a summary of the costs for Scenario D. The GA mutation showed better results, achieving an overall cost 4.74% lower than that of the BW mutation, which represents a reduction of USD 1 million over 10 years in this scenario. This pattern is consistent in the averages, with the GA mutation producing an average 2.67% lower than the average of the optimal results from the BW mutation.

Scenario D with 200 Generations and Black Widows

Since consistency in the solutions was not observed, additional test rounds were conducted, increasing the number of black widows and generations from 100 to 200 in an attempt to obtain better results. Figure 18 presents the optimal solutions found after the rounds with 200 black widows and 200 generations, along with the optimal solution for 100 black widows and 100 generations for comparison.
Once again, the BW mutation favored a solution with only one new electrical substation, while the GA mutation produced a solution with two new electrical substations as the optimal result. Despite the GA solution having USD 1.6 million higher electrical substation installation costs, the savings in new feeder installations and reduced losses outweigh this additional investment, as shown in Table 10.
Table 11 details the costs of the optimal solution previously found compared to the solution obtained with 100 black widows and generations. The new optimal solution has higher electrical substation installation costs due to selecting a larger installed capacity. However, the electrical substations are better positioned, making them advantageous in terms of the overall cost.
Table 12 provides a summary of the results from the new test rounds and compares them with the previous results. As expected, the algorithm found lower costs and a smaller standard deviation with the increased number of generations and black widows.
Figure 19 shows the dispersion of the positions of the new electrical substations suggested by each mutation after 50 test rounds. It can be observed that the solutions are more organized after increasing the number of generations and black widows. This behavior indicates greater convergence in the algorithm, resulting in solutions that are closer to one another.

3.5. Scenario D with Lower Installation Cost of Electrical Substations

To test more complex solutions from the algorithm and compare the performance of the mutations, Scenario D was used with the installation cost of new electrical substations set to 20% of the initially assigned cost. This adjustment was made with the expectation that the algorithm would propose several new electrical substations. Figure 20 shows the optimal solution found by each mutation, where three new electrical substations were suggested in both cases, demonstrating the algorithm’s performance in identifying a more complex solution.
Table 13 details the costs of the optimal solution found by each mutation, where the GA mutation’s solution showed lower costs across all criteria. It demonstrated better performance in selecting the installed capacity of the new electrical substations, resulting in USD 0.72 million less in costs for this specific category.
Figure 21 shows the evolution graph of a population for each mutation, where once again, complete convergence of the GA mutation’s solution is not observed.
Figure 22 shows the dispersion of the solutions after 50 rounds, where no clear solution pattern is identified. This supports the discussion on the number of generations and black widows used.
Figure 23 presents the histograms of the installed capacity of the new electrical substations for each mutation, where the BW mutation favored higher installed capacities, and the GA mutation favored lower capacities. This behavior can be explained by the more efficient resource allocation achieved by the GA mutation, resulting in the better solutions found by it.
Table 14 provides a summary of the 50 optimal solutions for each mutation, with the GA mutation achieving a solution that was 8.4% lower in cost than the optimal solution found by the BW mutation. When looking at the averages, it is again evident that the GA mutation performed better, with an average 8.2% lower than the average of the optimal solutions found by the BW mutation.

Scenario D with Reduced Installation Cost of Electrical Substations and with 200 Generations and Black Widows

As with Scenario D, additional test rounds were conducted, increasing the number of generations and black widows to 200, along with the reduced electrical substation installation costs. The optimal solutions found after 50 rounds are shown in Figure 24.
The GA mutation once again provided a better solution than the BW mutation. Although both resulted in three new electrical substations, the GA mutation achieved better positioning of the electrical substations, leading to a significant cost difference in new feeders. Table 15 details the costs associated with the optimal solution from each mutation, with the GA mutation finding a solution approximately USD 2.46 million less expensive than that found with the BW mutation.
Table 16 compares the optimal solutions with 100 and 200 generations and black widows, where once again the difference in the installation cost of new feeders is observed. Despite the higher cost in losses, this solution achieved a total cost nearly USD 1 million lower.
Figure 25 confirms the improved convergence when increasing the number of generations and black widows, particularly for the GA mutation, with solutions that are closer to one another, highlighting areas of interest identified by the algorithm for the installation of new electrical substations.
The summary of the test rounds with different mutations and numbers of generations and black widows is presented in Table 17, where the results observed for the optimal solution are also reflected in the averages, with the GA mutation showing better performance.

3.6. Discussion of Results

Based on the presented results, it is possible to verify the usability and feasibility of the algorithm for the allocation and positioning of distribution electrical substations. The algorithm found good results with solid consistency in scenarios similar to the real-world vegetative growth of cities, such as Scenarios A, B, and C.
Table 18 summarizes the optimal results found in each scenario and the percentage difference between the results of each mutation (GA—BW). The use of the GA mutation proved superior to the BW mutation, particularly as the complexity of the scenarios increased, achieving a solution 14.75% lower in the most complex case and with a higher likelihood of convergence. The total execution time for each combination of scenario and mutation ranged from 7 min and 42 s to 34 min and 18 s.
Regarding the types of mutations analyzed, there were no significant differences in results when changing the mutation method in Scenarios A, B, and C. With averages close to the optimal solutions found and showing consistency in the dispersion of the electrical substation locations, both mutations arrived at the optimal solution in Scenarios A and B. In Scenario C, only one solution from the GA mutation achieved a lower cost with a non-obvious solution.
In Scenario D, however, the GA mutation showed a considerable advantage in the results, being approximately 4% better regardless of the number of generations and black widows. This advantage was further reinforced in Scenario D with reduced electrical substation installation costs, where the optimal solution was 8.41% lower for 100 generations and black widows, and up to 14.75% lower for 200. This demonstrates that for more complex optimal solutions, the GA mutation is capable of finding better results than the original black widow mutation.
This behavior can be explained by the fact that the GA mutation introduces completely new values into the black widows, whereas the BW mutation only swaps values, giving the GA mutation a greater ability to escape local optima.
This superiority is further confirmed when observing the average results, as the average reduces the effects of randomness in the method. The GA mutation achieved averages between 8% and 9% lower than the averages from the BW mutation in the modified Scenario D, as shown in Table 19.
It is still possible to observe the influence of increasing the number of generations and black widows in more complex scenarios, where both mutation types showed improvement in the solutions and greater consistency in the dispersion maps, indicating a higher level of convergence as a result of the increase in generations and black widows.
Given the importance of distribution expansion planning and the magnitude of the investments involved, it is essential to run the algorithm multiple times to ensure a broader search of the solution space, as well as to carefully choose the number of generations and population size. This approach increases the likelihood that the optimal solution found is truly an optimal one.

4. Conclusions

This paper applied an enhanced Black Widow Algorithm (BWA) to solve the complex problem of allocating and sizing electrical substations within power distribution networks. The proposed modification to the BWA, a mutation approach inspired by genetic algorithms (GA), enabled the BWA to consistently deliver optimal or near-optimal results across a variety of test scenarios, demonstrating its adaptability and robustness in handling real-world constraints.
The performance comparison between the original BWA mutation and the GA-inspired mutation revealed that the latter performed significantly better in more complex scenarios, achieving cost reductions of up to 14.75%. The GA mutation showed greater flexibility in escaping local minima, which was particularly advantageous in cases involving numerous new load centers and greater complexity in the distribution of loads. Additionally, increasing the number of generations and the size of the population proved effective in enhancing convergence and solution stability.
The findings underscore the practicality of the enhanced BWA in real-world applications of electrical substation planning. The improved flexibility of the GA-inspired mutation allowed the algorithm to handle the intricate demands of substation allocation, providing substantial cost savings and better solutions in complex scenarios. The paper emphasizes the importance of carefully choosing algorithm parameters such as population size and the number of generations to achieve more consistent and reliable results.

Author Contributions

N.d.O.V.: Methodology, Software, Validation, Formal Analysis, Investigation, Data Curation, Writing—Original Draft. C.B.D.: Conceptualization, Methodology, Writing—Review and Editing, Supervision, Project administration. All authors have read and agreed to the published version of the manuscript.

Funding

No funding was received for conducting this study. The authors have no relevant financial or non-financial interests to disclose. The article processing charge (APC) will be covered by the Federal Institute of Espírito Santo (IFES).

Data Availability Statement

The datasets generated and analyzed during the current study are available from the corresponding author upon reasonable request.

Acknowledgments

The authors would like to thank the Federal Institute of Espírito Santo for their financial and institutional support.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Table A1 presents the data used for the pre-existing electrical substations in Scenarios A and B, which utilize the coordinates of the electrical substation found in one of the solutions from [4], with the installed capacity adjusted to values typical of distribution electrical substations.
Table A1. Pre-existing electrical substations in Scenarios A and B (initial configuration). Source: Adapted from [4].
Table A1. Pre-existing electrical substations in Scenarios A and B (initial configuration). Source: Adapted from [4].
Electrical Substation X (km) Y (km) S (MVA)
1161950
The pre-existing load centers are presented in Table A2, and the coordinates provided in [4] were also used, with the demanded power adjusted and a loss factor assigned to each, approximating typical values found in the literature. In real-world situations, such values are either known or can be estimated by the electrical utility company.
Table A2. Pre-existing load centers in Scenarios A and B (initial configuration). Source: Adapted from [4].
Table A2. Pre-existing load centers in Scenarios A and B (initial configuration). Source: Adapted from [4].
Load Center X (km) Y (km) S (MVA)Electrical Substation P f a c t o r _ c
125175.710.262
21087.010.298
327105.710.254
414226.410.311
522165.310.213
613255.910.324
78385.410.231
89146.310.276
Table A3 and Table A4 contain the data for the new load centers in Scenarios A and B, respectively. The coordinates were arbitrarily chosen to test the algorithm’s response to load centers that are more widely distributed across different regions.
Table A3. New load centers in Scenario A.
Table A3. New load centers in Scenario A.
Load Center X (km) Y (km) S (MVA) P f a c t o r _ c
921297.10.289
1012365.70.291
1117336.90.248
1217123.90.326
1314344.30.354
1419246.80.226
Table A4. New load centers in Scenario B.
Table A4. New load centers in Scenario B.
Load Center X (km) Y (km) S (MVA) P f a c t o r _ c
927297.10.289
1030365.70.291
1124336.90.248
1329223.90.326
1421384.30.354
1522296.80.226
Table A5 presents the data for the pre-existing electrical substations in Scenarios C and D, with the addition of another electrical substation compared to those pre-existing in Scenarios A and B.
Table A5. Pre-existing electrical substations in Scenarios C and D (initial configuration). Source: Adapted from [4].
Table A5. Pre-existing electrical substations in Scenarios C and D (initial configuration). Source: Adapted from [4].
Electrical Substation X (km) Y (km) S (MVA)
1161950
2262450
Table A6 contains the data for the pre-existing load centers in Scenarios C and D, including their coordinates, demanded power, loss factors, and the electrical substation to which they are connected.
Table A6. Pre-existing load centers in Scenarios C and D (initial configuration). Source: Adapted from [4].
Table A6. Pre-existing load centers in Scenarios C and D (initial configuration). Source: Adapted from [4].
Load Center X (km) Y (km) S (MVA)Electrical Substation P f a c t o r _ c
125175.720.262
21087.010.298
327105.720.254
414226.410.311
522165.310.213
613255.910.324
78385.410.231
89146.310.276
927297.120.226
1024336.920.261
Table A7 and Table A8 contain the data for the new load centers in Scenarios C and D, respectively. Scenario C includes new load centers that can be served by the pre-existing electrical substations, while Scenario D features a larger number of more dispersed new load centers.
Table A7. New load centers in Scenario C.
Table A7. New load centers in Scenario C.
Load Center X (km) Y (km) S (MVA) P f a c t o r _ c
1130365.70.291
1229223.90.326
1315314.30.354
1420344.70.243
1518105.20.221
Table A8. New load centers in Scenario D.
Table A8. New load centers in Scenario D.
Load Center X (km) Y (km) S (MVA) P f a c t o r _ c
1130365.70.291
1229223.90.326
1315314.30.354
1420344.70.243
1518105.20.221
164285.50.287
170205.10.299
1835154.40.312
1937274.20.301
2033143.80.284
Table A9 presents the boundary coordinates of the two regions that were arbitrarily designated as restricted for new electrical substations in all scenarios.
Table A9. Restricted regions in Scenarios A, B, C, and D.
Table A9. Restricted regions in Scenarios A, B, C, and D.
X m i n (km) X m a x (km) Y m i n (km) Y m a x (km)
16182027
9111721
Based on [10], the costs of the electrical substations were determined and are presented in Table A10.
Table A10. Costs of new electrical substations.
Table A10. Costs of new electrical substations.
Installed Capacity (MVA)Installation Cost (mi USD)
101.6
17.52.0
252.4
402.8
503.2
663.6
754.0
Table A11 presents the values considered for the feeder variables used in the cost calculation. The feeder resistance is based on the Ostrich conductor (300 MCM) and its DC electrical resistance at 20 °C. The installation cost of the feeder and the energy cost for the distribution company were derived from the dollar values reported in [10].
Table A11. Feeder data.
Table A11. Feeder data.
VariableValueUnit
Distribution voltage13.8kV
Feeder resistance0.19 Ω / k m
Feeder installation cost40 10 3   U S D / k m
Energy cost0.06 U S D / k W h

Appendix B

The use of decimal values ensures that all variables remain within the same range (between 0 and 1), which simplifies the reproduction and mutation phases of the BWA. The reproduction phase involves a weighting of the difference between two black widows, while the mutation phase consists of swapping the values of two positions in the vector.
There are four types of encoded variables, each with a different conversion method:
  • The existence or absence of a potential new electrical substation.
  • The X and Y coordinates of the location of a potential new electrical substation.
  • The installed capacity of a potential new electrical substation.
  • The electrical substation to which a load center is connected.

Appendix B.1. Existence of a New Electrical Substation

The first type of variable refers to the existence or absence of a potential new electrical substation. For this problem, the coding is performed in binary form, where 1 indicates the presence and 0 indicates the absence of the electrical substation. The conversion is performed by rounding the decimal value, as shown in Equation (A1).
V p n = 0 , V d n < 0.5 1 , V d n 0.5
where:
V p n Encoded value of the problem at position n.
V d n Decimal value at position n.
A value of V d 0 = 0.7683 in a position corresponding to the existence of a new electrical substation will be converted to V p 0 = 1, indicating that, for this solution, the respective electrical substation is allocated.

Appendix B.2. Coordinates of a New Electrical Substation

For this type of variable, a linear conversion is applied, where a decimal value of 0 represents the minimum possible coordinate value, and 1 represents the maximum. It is assumed that electrical substations can only be allocated within the range of pre-existing and planned load centers. Thus, the minimum possible value corresponds to the smallest coordinate value among the load centers ( V m i n ), and the same logic applies to the maximum value ( V m a x ). Thus, the conversion of the coordinates is performed using Equation (A2).
V p n = V m i n + V d n V m a x V m i n
where:
V p n Original value of the problem at position n .
V d n Decimal value at position n .
V m i n Minimum coordinate value.
V m a x Maximum coordinate value.
In a scenario where the smallest X -coordinate among the pre-existing and planned load centers is V m i n = 8 and the largest is V m a x = 27, a value of V d 1 = 0.452 is converted using Equation (A2).
V p 1 = 8 + 0.452 27 8 = 16.588
Thus, a decimal value of 0.452 is converted to an X -coordinate of 16.588 for the respective potential new electrical substation.

Appendix B.3. Installed Capacity of a New Electrical Substation

The third type of variable refers to the sizing of a potential new electrical substation. In this paper, seven possible installed capacity values were considered, as presented in Table A10. Using these values, and similarly to the previous conversion, it is possible to define V m i n = 10 and V m a x = 75. Based on Equation (A2), an estimated installed capacity value is determined. For example, if V d 3 = 0.561, the conversion would be as follows:
V p 3 = 10 + 0.561 75 10 = 46.465
However, the installed capacity values are discrete, so an approximation to the nearest tabulated value is made. In the case of the decimal value 0.561, it is first converted to 46.465, and then rounded to the nearest tabulated value of 50 MVA for the installed capacity of the potential new electrical substation.

Appendix B.4. Electrical Substation to Which a Load Center Is Connected

The last type of variable refers to which electrical substation a load center is connected to, and in the context of the problem, it can take integer values corresponding to the identification number of the respective electrical substation.
The pre-existing electrical substations are listed and numbered, followed by the numbering for the new electrical substations that will be installed according to the respective BWA solution.
Equation (A3) describes the calculation for converting the values, where rounding is applied after the calculation to ensure the response is an integer corresponding to one of the listed electrical substations.
V p n = V d n N s u b 1 + 1
where:
V p n Original value of the problem at position n.
V d n Decimal value at position n.
N s u b Total number of electrical substations, new and pre-existing.
In an example where there are two pre-existing electrical substations and the solution indicates three new ones, with a decimal value of V d 23 = 0.215, the conversion is performed as follows:
V p 23 = 0.215 2 + 3 1 + 1 = 1.86
After rounding, the value becomes V p 23 = 2, indicating that the respective load center will be supplied by electrical substation number 2.

References

  1. Pao, H.-T. Forecast of electricity consumption and economic growth in Taiwan by state space modeling. Energy 2009, 34, 1779–1791. [Google Scholar] [CrossRef]
  2. Kersting, W.H. Distribution System Modeling and Analysis. In Electric Power Generation, Transmission, and Distribution; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar]
  3. Willis, H.L.; Tram, H.; Engel, M.V.; Finley, L. Optimization applications to power distribution. IEEE Comput. Appl. Power 1995, 8, 12–17. [Google Scholar] [CrossRef]
  4. Li, L.-L.; Yang, Y.-F.; Wang, C.-H.; Lin, K.-P. Biogeography-based optimization based on population competition strategy for solving the substation location problem. Expert Syst. Appl. 2018, 97, 290–302. [Google Scholar] [CrossRef]
  5. Vahedi, S.; Banejad, M.; Assili, M. Optimal location, sizing and allocation of subtransmission substations using K-means algorithm. In Proceedings of the 2015 IEEE Power & Energy Society General Meeting, Denver, CO, USA, 26–30 July 2015; pp. 1–5. [Google Scholar]
  6. Corigliano, S.; Rosato, F.; Ortiz Dominguez, C.; Merlo, M. Clustering Techniques for Secondary Substations Siting. Energies 2021, 14, 1028. [Google Scholar] [CrossRef]
  7. Zhu, X.; Tang, W.; Liu, Y.; Yang, H.; Cong, W.; Gai, W. Distribution substation planning method based on weighted Voronoi diagram. In Proceedings of the 2016 IEEE PES Asia-Pacific Power and Energy Engineering Conference (APPEEC), Xi’an, China, 25–28 October 2016; pp. 1898–1902. [Google Scholar]
  8. Ahmadigorji, M.; Amjady, N.; Dehghan, S. A novel two-stage evolutionary optimization method for multiyear expansion planning of distribution systems in presence of distributed generation. Appl. Soft Comput. 2017, 52, 1098–1115. [Google Scholar] [CrossRef]
  9. Feng, L.; Cui, C.; Ma, R.; Wu, J.; Yang, Y.; Zhang, X.; Liu, S. Deep Learning Algorithm for Preliminary Siting of Substations Considering Various Features in Distribution Network Planning. IOP Conf. Ser. Earth Environ. Sci. 2018, 192, 012032. [Google Scholar] [CrossRef]
  10. Silva, F.T.S.; Araujo, L.R.; Penido, D.R.R. Optimal Substation Placement in Distribution Systems using Artificial Immune Systems. IEEE Lat. Am. Trans. 2018, 16, 505–513. [Google Scholar] [CrossRef]
  11. Li, Y.; Di, S.; Xiaobin, G.; Zhen, J.; Guangyue, X.; Ganyang, J.; Jinyong, L.; Chaoyang, J. An efficient substation placement and sizing strategy based on GIS using semi-supervised learning. CSEE J. Power Energy Syst. 2018, 4, 371–379. [Google Scholar] [CrossRef]
  12. Prakobkaew, P.; Sirisumrannukul, S. Optimization of Electrical Substation Location for Distribution Loss Reduction from Power Demand of Electric Vehicle Charging Stations. In Proceedings of the 2021 5th International Conference on Power and Energy Engineering (ICPEE), Xiamen, China, 2–4 December 2021; pp. 262–267. [Google Scholar]
  13. Liu, Y.; Sun, B.; Wang, L.; Wang, B.; Zhang, Y. Improved Genetic Algorithm for Substation Location Optimization. In Proceedings of the 2022 IEEE 4th International Conference on Power, Intelligent Computing and Systems (ICPICS), Shenyang, China, 29–31 July 2022; pp. 557–561. [Google Scholar]
  14. Zheng, K.; Zheng, W.; Li, P.; Yuan, S.; Ni, G. Optimization of Substation Locating and Sizing Based on 0–1 Model. In Proceedings of the 2023 6th International Conference on Energy, Electrical and Power Engineering (CEEPE), Guangzhou, China, 12–14 May 2023; pp. 1563–1567. [Google Scholar]
  15. Hayyolalam, V.; Pourhaji Kazem, A.A. Black Widow Optimization Algorithm: A novel meta-heuristic approach for solving engineering optimization problems. Eng. Appl. Artif. Intell. 2020, 87, 103249. [Google Scholar] [CrossRef]
  16. KR, S.; Ananthapadmanabha, T. Improved black widow-bear smell search algorithm (IBWBSA) for optimal planning and operation of distributed generators in distribution system. J. Eng. Des. Technol. 2021. ahead-of-print. [Google Scholar] [CrossRef]
  17. Samal, P.; Mohanty, S.; Patel, R.; Behera, S.; Mishra, S. Optimal Allocation of Distributed Generation in Distribution system by Using Black Widow Optimization Algorithm. In Proceedings of the 2021 2nd International Conference for Emerging Technology (INCET), Belagavi, India, 21–23 May 2021; pp. 1–5. [Google Scholar]
  18. Pawani, K.; Singh, M. Economic Load Dispatch using Black Widow Optimization Algorithm. In Proceedings of the 2021 IEEE 2nd International Conference On Electrical Power and Energy Systems (ICEPES), Bhopal, India, 10–11 December 2021; pp. 1–4. [Google Scholar]
  19. Dahiya, P.; Saha, A.K. Frequency Regulation of Interconnected Power System Using Black Widow Optimization. IEEE Access 2022, 10, 25219–25236. [Google Scholar] [CrossRef]
  20. Saha, R.; Das, A.; Mandal, D.; Kar, R. An optimal linear and elliptical antenna array design using black widow optimisation for 5G communication. Int. J. Commun. Syst. 2023, 36, e5597. [Google Scholar] [CrossRef]
  21. Qu, H.; Liu, K.; Zhang, L. Research on improved black widow algorithm for medical image denoising. Sci. Rep. 2024, 14, 2514. [Google Scholar] [CrossRef]
  22. El-Fouly, T.H.M.; Zeineldin, H.H.; El-Saadany, E.F.; Salama, M.M.A. A new optimization model for distribution substation siting, sizing, and timing. Int. J. Electr. Power Energy Syst. 2008, 30, 308–315. [Google Scholar] [CrossRef]
  23. Haghifam, M.R.; Shahabi, M. Optimal location and sizing of HV/MV substations in uncertainty load environment using genetic algorithm. Electr. Power Syst. Res. 2002, 63, 37–50. [Google Scholar] [CrossRef]
  24. Lavorato, M.; Rider, M.J.; Garcia, A.V.; Romero, R. Distribution network planning using a constructive heuristic algorithm. In Proceedings of the 2009 IEEE Power & Energy Society General Meeting, Calgary, AB, Canada, 26–30 July 2009; pp. 1–6. [Google Scholar]
  25. Ravadanegh, S.N.; Roshanagh, R.G. A heuristic algorithm for optimal multistage sizing, siting and timing of MV distribution substations. Electr. Power Syst. Res. 2013, 105, 134–141. [Google Scholar] [CrossRef]
  26. Vahedi, S.; Banejad, M.; Assili, M. Pseudo-dynamic substation expansion planning using hybrid heuristic and genetic algorithm. In Proceedings of the 2015 4th International Conference on Electric Power and Energy Conversion Systems (EPECS), Sharjah, United Arab Emirates, 24–26 November 2015; pp. 1–6. [Google Scholar]
  27. Reeves, C.R.; Rowe, J.E. Genetic Algorithms: Principles and Perspectives, 1st ed.; Operations Research/Computer Science Interfaces Series; Springer: New York, NY, USA, 2002. [Google Scholar] [CrossRef]
Figure 1. Initial conditions of each scenario: (a) Scenario A, (b) Scenario B, (c) Scenario C, and (d) Scenario D. Source: Adapted from [4].
Figure 1. Initial conditions of each scenario: (a) Scenario A, (b) Scenario B, (c) Scenario C, and (d) Scenario D. Source: Adapted from [4].
Electricity 06 00018 g001
Figure 2. Example of encoding vector with real values.
Figure 2. Example of encoding vector with real values.
Electricity 06 00018 g002
Figure 3. Example of encoding vector with decimal values.
Figure 3. Example of encoding vector with decimal values.
Electricity 06 00018 g003
Figure 4. Creation of a new generation of black widows.
Figure 4. Creation of a new generation of black widows.
Electricity 06 00018 g004
Figure 5. Optimal solution found for Scenario A: (a) initial configuration and (b) optimal solution.
Figure 5. Optimal solution found for Scenario A: (a) initial configuration and (b) optimal solution.
Electricity 06 00018 g005
Figure 6. Solution evolution for Scenario A.
Figure 6. Solution evolution for Scenario A.
Electricity 06 00018 g006
Figure 7. Dispersion of new electrical substation positions for Scenario A: (a) BW mutation and (b) GA mutation.
Figure 7. Dispersion of new electrical substation positions for Scenario A: (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g007
Figure 8. Optimal solution found for Scenario B: (a) initial configuration and (b) optimal solution.
Figure 8. Optimal solution found for Scenario B: (a) initial configuration and (b) optimal solution.
Electricity 06 00018 g008
Figure 9. Solution evolution for Scenario B.
Figure 9. Solution evolution for Scenario B.
Electricity 06 00018 g009
Figure 10. Dispersion of new electrical substation positions for Scenario B: (a) BW mutation and (b) GA mutation.
Figure 10. Dispersion of new electrical substation positions for Scenario B: (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g010
Figure 11. Optimal solution found for Scenario C: (a) initial configuration, (b) optimal solution by BW mutation, and (c) optimal solution by GA mutation.
Figure 11. Optimal solution found for Scenario C: (a) initial configuration, (b) optimal solution by BW mutation, and (c) optimal solution by GA mutation.
Electricity 06 00018 g011
Figure 12. Solution evolution for Scenario C.
Figure 12. Solution evolution for Scenario C.
Electricity 06 00018 g012
Figure 13. Dispersion of new electrical substation positions for Scenario C: (a) BW mutation and (b) GA mutation.
Figure 13. Dispersion of new electrical substation positions for Scenario C: (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g013
Figure 14. Optimal solution found for Scenario D: (a) initial configuration, (b) optimal solution by BW mutation, and (c) optimal solution by GA mutation.
Figure 14. Optimal solution found for Scenario D: (a) initial configuration, (b) optimal solution by BW mutation, and (c) optimal solution by GA mutation.
Electricity 06 00018 g014
Figure 15. Solution evolution for Scenario D.
Figure 15. Solution evolution for Scenario D.
Electricity 06 00018 g015
Figure 16. Dispersion of new electrical substation positions for Scenario D: (a) BW mutation and (b) GA mutation.
Figure 16. Dispersion of new electrical substation positions for Scenario D: (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g016
Figure 17. Histograms of installed capacity for Scenario D (in some cases, more than one electrical substation was recommended by the algorithm in the same run): (a) BW mutation and (b) GA mutation.
Figure 17. Histograms of installed capacity for Scenario D (in some cases, more than one electrical substation was recommended by the algorithm in the same run): (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g017
Figure 18. Optimal solution found for Scenario D with 200 generations and black widows: (a) initial configuration, (b) optimal solution with 100 generations and black widows, (c) optimal solution by BW mutation with 200 generations and black widows, and (d) optimal solution by GA mutation with 200 generations and black widows.
Figure 18. Optimal solution found for Scenario D with 200 generations and black widows: (a) initial configuration, (b) optimal solution with 100 generations and black widows, (c) optimal solution by BW mutation with 200 generations and black widows, and (d) optimal solution by GA mutation with 200 generations and black widows.
Electricity 06 00018 g018
Figure 19. Dispersion of new electrical substation positions for Scenario D with 200 generations and black widows: (a) BW mutation and (b) GA mutation.
Figure 19. Dispersion of new electrical substation positions for Scenario D with 200 generations and black widows: (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g019
Figure 20. Optimal solution found for Scenario D with reduced cost of electrical substations: (a) initial configuration, (b) optimal solution by BW mutation, and (c) optimal solution by GA mutation.
Figure 20. Optimal solution found for Scenario D with reduced cost of electrical substations: (a) initial configuration, (b) optimal solution by BW mutation, and (c) optimal solution by GA mutation.
Electricity 06 00018 g020
Figure 21. Solution evolution for Scenario D with reduced electrical substation costs.
Figure 21. Solution evolution for Scenario D with reduced electrical substation costs.
Electricity 06 00018 g021
Figure 22. Dispersion of new electrical substation positions for Scenario D with reduced electrical substation costs: (a) BW mutation and (b) GA mutation.
Figure 22. Dispersion of new electrical substation positions for Scenario D with reduced electrical substation costs: (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g022
Figure 23. Histograms of installed capacity for Scenario D (in some cases, more than one electrical substation was recommended by the algorithm in the same run) with reduced electrical substation costs: (a) BW mutation and (b) GA mutation.
Figure 23. Histograms of installed capacity for Scenario D (in some cases, more than one electrical substation was recommended by the algorithm in the same run) with reduced electrical substation costs: (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g023
Figure 24. Optimal solution found for Scenario D with reduced electrical substation costs and with 200 generations and black widows: (a) initial configuration, (b) optimal solution with 100 generations and black widows, (c) optimal solution by BW mutation with 200 generations and black widows, and (d) optimal solution by GA mutation with 200 generations and black widows.
Figure 24. Optimal solution found for Scenario D with reduced electrical substation costs and with 200 generations and black widows: (a) initial configuration, (b) optimal solution with 100 generations and black widows, (c) optimal solution by BW mutation with 200 generations and black widows, and (d) optimal solution by GA mutation with 200 generations and black widows.
Electricity 06 00018 g024
Figure 25. Dispersion of new electrical substation positions for Scenario D with reduced electrical substation costs and with 200 generations and black widows: (a) BW mutation and (b) GA mutation.
Figure 25. Dispersion of new electrical substation positions for Scenario D with reduced electrical substation costs and with 200 generations and black widows: (a) BW mutation and (b) GA mutation.
Electricity 06 00018 g025
Table 1. Tested scenarios and their parameters.
Table 1. Tested scenarios and their parameters.
ScenarioNumber of Generations and Black WidowsElectrical Substation Costs
A100100%
B100100%
C100100%
D100100%
D—200200100%
D mod.10020%
D mod.—20020020%
Table 2. Costs of the optimal solution found in Scenario A.
Table 2. Costs of the optimal solution found in Scenario A.
CostValue (mi USD)
New electrical substations2.80
New feeders2.54
Power losses8.08
Total value13.42
Table 3. Cost values obtained after 50 runs for Scenario A.
Table 3. Cost values obtained after 50 runs for Scenario A.
MutationOptimal Value
(mi USD)
Average Value
(mi USD)
Standard Deviation
(mi USD)
BW13.4213.750.23
GA13.4213.710.38
Table 4. Costs of the optimal solution found in Scenario B.
Table 4. Costs of the optimal solution found in Scenario B.
CostValue (mi USD)
New electrical substations2.80
New feeders2.08
Power losses8.51
Total value13.39
Table 5. Cost values obtained after 50 runs for Scenario B.
Table 5. Cost values obtained after 50 runs for Scenario B.
MutationOptimal Value
(mi USD)
Average Value
(mi USD)
Standard Deviation
(mi USD)
BW13.3913.470.16
GA13.3913.390.004
Table 6. Costs of the optimal solution found in Scenario C.
Table 6. Costs of the optimal solution found in Scenario C.
CostValue (mi USD)
BW MutationGA MutationΔ (GA–BW)
New electrical substations0.001.601.60
New feeders3.051.94−1.11
Power losses10.249.74−0.50
Total value13.2913.28−0.01
Table 7. Cost values obtained after 50 runs for Scenario C.
Table 7. Cost values obtained after 50 runs for Scenario C.
MutationOptimal Value
(mi USD)
Average Value
(mi USD)
Standard Deviation
(mi USD)
BW13.2913.310.10
GA13.2813.300.06
Table 8. Costs of the optimal solution found in Scenario D.
Table 8. Costs of the optimal solution found in Scenario D.
CostValue (mi USD)
BW MutationGA MutationΔ (GA–BW)
New electrical substations2.403.200.80
New feeders6.075.01−1.06
Power losses12.4811.75−0.73
Total value20.9519.96−0.99
Table 9. Cost values obtained after 50 runs for Scenario D.
Table 9. Cost values obtained after 50 runs for Scenario D.
MutationOptimal Value
(mi USD)
Average Value
(mi USD)
Standard Deviation
(mi USD)
BW20.9522.291.49
GA19.9621.690.88
Table 10. Costs of the optimal solution found in Scenario D with 200 generations and black widows.
Table 10. Costs of the optimal solution found in Scenario D with 200 generations and black widows.
CostValue (mi USD)
BW Mutation—200 Generations and Black WidowsGA Mutation—200 Generations and Black WidowsΔ (GA–BW)
New electrical substations2.003.601.60
New feeders6.064.75−1.32
Power losses12.4811.44−1.04
Total value20.5519.79−0.75
Table 11. Costs of the optimal solution found in Scenario D with 100 and 200 generations and black widows for the GA mutation.
Table 11. Costs of the optimal solution found in Scenario D with 100 and 200 generations and black widows for the GA mutation.
CostValue (mi USD)
GA Mutation—100 Generations and Black WidowsGA Mutation—200 Generations and Black WidowsΔ (GA 200—GA 100)
New electrical substations3.203.600.40
New feeders5.014.75−0.26
Power losses11.7511.44−0.31
Total value19.9619.79−0.17
Table 12. Cost values obtained after 50 runs for Scenario D with 100 and 200 generations and black widows for the BW and GA mutations.
Table 12. Cost values obtained after 50 runs for Scenario D with 100 and 200 generations and black widows for the BW and GA mutations.
MutationOptimal Value
(mi USD)
Average Value
(mi USD)
Standard Deviation
(mi USD)
BW—100 generations and black widows20.9522.291.49
BW—200 generations and black widows20.5521.480.73
GA—100 generations and black widows19.9621.690.88
GA—200 generations and black widows19.7921.340.73
Table 13. Costs of the optimal solution found in Scenario D with reduced electrical substation costs.
Table 13. Costs of the optimal solution found in Scenario D with reduced electrical substation costs.
CostValue (mi USD)
BW MutationGA MutationΔ (GA–BW)
New electrical substations2.081.36−0.72
New feeders5.184.64−0.54
Power losses9.509.35−0.15
Total value16.7615.35−1.41
Table 14. Cost values obtained after 50 runs for Scenario D with reduced electrical substation costs.
Table 14. Cost values obtained after 50 runs for Scenario D with reduced electrical substation costs.
MutationOptimal Value
(mi USD)
Average Value
(mi USD)
Standard Deviation
(mi USD)
BW16.7619.931.18
GA15.3518.301.21
Table 15. Costs of the optimal solution found in Scenario D with reduced electrical substation costs and with 200 generations and black widows.
Table 15. Costs of the optimal solution found in Scenario D with reduced electrical substation costs and with 200 generations and black widows.
CostValue (mi USD)
BW Mutation—200 Generations and Black WidowsGA Mutation—200 Generations and Black WidowsΔ (GA–BW)
New electrical substations1.601.20−0.40
New feeders6.063.44−2.62
Power losses9.009.570.57
Total value16.6614.21−2.46
Table 16. Costs of the optimal solution found in Scenario D with reduced electrical substation costs and with 100 and 200 generations and black widows for the GA mutation.
Table 16. Costs of the optimal solution found in Scenario D with reduced electrical substation costs and with 100 and 200 generations and black widows for the GA mutation.
CostValue (mi USD)
GA Mutation—100 Generations and Black WidowsGA Mutation—200 Generations and Black WidowsΔ (GA 200—GA 100)
New electrical substations1.361.20−0.16
New feeders4.643.44−1.20
Power losses9.359.570.23
Total value15.3514.21−1.14
Table 17. Cost values obtained after 50 runs for Scenario D with reduced electrical substation costs and with 100 and 200 generations and black widows for the BW and GA mutation.
Table 17. Cost values obtained after 50 runs for Scenario D with reduced electrical substation costs and with 100 and 200 generations and black widows for the BW and GA mutation.
MutationOptimal Value
(mi USD)
Average Value
(mi USD)
Standard Deviation
(mi USD)
BW—100 generations and black widows16.7619.931.18
BW—200 generations and black widows16.6619.370.88
GA—100 generations and black widows15.3518.301.21
GA—200 generations and black widows14.2117.631.65
Table 18. Comparison of the optimal solutions found in each scenario.
Table 18. Comparison of the optimal solutions found in each scenario.
ScenarioValue (mi USD)
BW MutationGA MutationΔ (GA–BW)
A13.4213.42-
B13.3913.39-
C13.2913.28−0.08 %
D20.9519.96−4.73 %
D—20020.5519.79−3.67%
D mod.16.7615.35−8.41%
D mod.—20016.6614.21−14.75%
Table 19. Comparison of the average solutions found in each scenario.
Table 19. Comparison of the average solutions found in each scenario.
ScenarioValue (mi USD)
BW MutationGA MutationΔ (GA–BW)
A13.7513.71−0.23%
B13.4713.39−0.58%
C13.3113.30−0.09%
D22.2921.69−2.68%
D—20021.4821.34−0.66%
D mod.19.9318.30−8.17%
D mod.—20019.3717.63−9.00%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Valim, N.d.O.; Donadel, C.B. Optimal Allocation and Sizing of Electrical Substations Using an Improved Black Widow Algorithm. Electricity 2025, 6, 18. https://doi.org/10.3390/electricity6020018

AMA Style

Valim NdO, Donadel CB. Optimal Allocation and Sizing of Electrical Substations Using an Improved Black Widow Algorithm. Electricity. 2025; 6(2):18. https://doi.org/10.3390/electricity6020018

Chicago/Turabian Style

Valim, Nathan de Oliveira, and Clainer Bravin Donadel. 2025. "Optimal Allocation and Sizing of Electrical Substations Using an Improved Black Widow Algorithm" Electricity 6, no. 2: 18. https://doi.org/10.3390/electricity6020018

APA Style

Valim, N. d. O., & Donadel, C. B. (2025). Optimal Allocation and Sizing of Electrical Substations Using an Improved Black Widow Algorithm. Electricity, 6(2), 18. https://doi.org/10.3390/electricity6020018

Article Metrics

Back to TopTop