Optimal Coordination of Directional Overcurrent Relays Using Hybrid Fireﬂy–Genetic Algorithm

: The application of directional overcurrent relays (DOCRs) plays an important role in protecting power systems and ensuring their safe, reliable, and efﬁcient operation. However, coor-dinating DOCRs involves solving a highly constrained and nonlinear optimization problem. The primary objective of optimization is to minimize the total operating time of DOCRs by determining the optimal values for decision variables such as the time multiplier setting (TMS) and plug setting (PS). This article presents an efﬁcient hybrid optimization algorithm that combines the modiﬁed ﬁreﬂy algorithm and genetic algorithm to achieve improved solutions. First, this study modiﬁes the ﬁreﬂy algorithm to obtain a global solution by updating the ﬁreﬂy’s brightness and to prevent the distance between the individual ﬁreﬂies from being too far. Additionally, the randomized movements are controlled to produce a high convergence rate. Second, the optimization problem is solved using the genetic algorithm. Finally, the solution obtained from the modiﬁed ﬁreﬂy algorithm is used as the initial population for the genetic algorithm. The proposed algorithms have been tested on the IEEE 3-bus, 8-bus, 9-bus and 15-bus networks. The results indicate the effectiveness and superiority of the proposed algorithms in minimizing the total operating time of DOCRs compared with other optimization methods presented in the literature.


Introduction
The electric power distribution system requires robust and effective protection systems to ensure reliable service that meets regulatory standards [1].Typically, a distribution network includes protection devices such as fuses, reclosers, relays, and circuit breakers [2].Nevertheless, one limitation of these devices is their inability to accurately determine the current direction, even though relays are believed to possess such capability, which would make them more effective for power system protection [3].
Directional overcurrent relays (DOCRs) have been employed to develop costeffective options for primary and backup power system protection, providing reliable and efficient protection at a reduced cost compared to traditional protection schemes.The use of DOCRs allows for a reduction in the number of relays needed for protection, resulting in significant savings in terms of both protection equipment and installation Energies 2023, 16, 5328 2 of 28 expenses [4].These relays serve as primary relays in interconnected sub-transmission and distribution systems.Additionally, they are utilized as local backup relays in transmission systems [5].
After a fault occurs in a power system, there is a significant increase in the current flowing through the protected circuit, potentially causing damage to the system.The DOCRs are designed to monitor the current flow and identify any abnormal conditions, such as a short-circuit or overcurrent condition.When a fault is detected, the DOCR transmits a trip signal to the circuit breaker, which opens the circuit and isolates the faulted section of the electric network [6].
In general, DOCRs are configured with two main settings, which are the time multiplier setting (TMS) and the plug setting (PS).The operating time of each relay is determined using these settings [5,7].Relay coordination studies aim to establish the appropriate settings for the TMS and PS, ensuring that the relays operate in the proper sequence, and that the total operating time is optimized to minimize network outage.To ensure that the selectivity study is valid, the specified coordination time interval (CTI) between the primary and backup protections must be maintained.The CTI is the time interval between the operation of the primary and backup relays, which should be long enough to allow for the primary relay to clear the fault, but short enough to prevent the backup relay from unnecessarily tripping [8].It is essential to coordinate the relays effectively to prevent any misoperations, such as unnecessary breaker tripping or the isolation of power system sections that are not actually experiencing a fault.This may be accomplished by appropriately determining the operating time of the relays [9,10].However, the coordination problem of DOCRs can be expressed as an optimization problem with the aim of minimizing the total operating time of the DOCRs, while taking into account various constraints and boundary limits, such as relay settings and selectivity constraints [11,12].
The DOCRs' coordination problem in power system protection is a complex optimization problem, which can be highly constrained, nonlinear, and non-convex.One possible way to formulate this problem is to use linear programming (LP), where the time multiplier setting of the relays is treated as a decision variable, and the plug setting is considered a fixed value within specific boundaries [13].However, it is also possible to express the optimization problem as a nonlinear programming (NLP) problem, where both the time multiplier and plug settings are decision variables that can be either continuous or discrete.In the case of electromechanical relays, the time multiplier setting is continuous, while the plug setting is discrete.In contrast, for the microprocessor-based relays, both the time multiplier and plug settings are treated as continuous variables [14].
Optimization has emerged as a popular research area and cost-effective approach for addressing complex problems in recent years.Researchers have increasingly utilized optimization techniques to solve the coordination problem of DOCRs due to the growing complexity of power systems and the critical need to ensure the reliable and efficient operation of protection systems [15,16].There are various optimization techniques available to address the coordination problem of DOCRs.Power system engineers previously utilized a trial-and-error method to determine the optimal DOCR settings for a given power system.This process was time-consuming as it involved a lot of iterations of trial runs and adjustments to the relay settings [17].Linear programming was used in [18][19][20][21] to obtain the optimal time multiplier setting for the DOCRs.In [22], the coordination problem for the IEEE 6-bus and IEEE 30-bus systems was resolved through the utilization of nonlinear optimization techniques using the general algebraic modeling system (GAMS) and sequential quadratic programming (SQP).The optimal DOCR coordination problem was addressed in [23] through the use of an analytical method (AA) that utilizes a numerical technique capable of converting numbers to global optimal values.In [24][25][26][27][28], the optimal settings for the appropriate coordination of DOCRs were determined using the genetic algorithm (GA) and its modified versions.In [18,[29][30][31][32][33], the minimum relay coordination was achieved using different variants of Energies 2023, 16, 5328 3 of 28 the particle swarm optimization (PSO) technique.In [34], the researchers utilized the honey bee algorithm to address the optimization problem by formulating it as a linear programming problem for the relay coordination in the IEEE 8-bus test system.In [35], the coordination problem in a distribution system with distributed energy resources was presented as a mixed integer nonlinear programming (MINLP) problem, which was then solved using the differential evolution (DE) algorithm to achieve optimal coordination.In [36], the optimal relay setting was determined using different versions of DE.In [37], a modified DE algorithm with an information exchange strategy, called IDE, was developed for optimizing the relay settings.In [38], the coordination problem for DOCRs was expressed as an MINLP problem and solved using the seeker optimization algorithm (SOA).In [39], the effectiveness of the ant bee colony (ABC) algorithm was demonstrated using various test systems.The authors in [5] applied the biogeography-based optimization (BBO) algorithm to solve the optimal coordination problem of DOCRs.The optimal relay coordination problem was addressed in [4] using an oppositional Jaya (OJaya) algorithm with a distance-adaptive coefficient (DAC).The authors of [40] successfully fine-tuned the parameters of the cuckoo search algorithm (CSA) to achieve the optimal global solution for addressing the coordination problem of DOCRs.The study revealed that the random value generated for the step size, ranging from 0 to 1, was modified.However, this value did not adapt well to environmental changes as the iterations progressed.Thus, the authors in [41] introduced a hierarchical clustering mechanism using the cuckoo search algorithm (HCSA) to enhance the efficiency and effectiveness of the solution to the coordination problem.The grey wolf optimizer (GWO) was utilized in [42] for determining optimal relay settings and addressing coordination issues.To enhance the search capability of the grey wolves across a wide range of search space, an improved version of the GWO known as the IGWO was introduced in [43].The optimal coordination of DOCRs in looped power systems was accomplished by implementing the teaching-learning-based optimization (TLBO) algorithm in [44].Meanwhile, the authors in [45] introduced a new variant of the TLBO algorithm, called MATLBO, to address the DOCR problem.According to the literature, hybrid algorithms generally lead to better results in comparison to conventional or metaheuristic optimization techniques.In [46], the coordination problem of DOCRs was resolved by employing a hybrid approach that combines GA and LP, while also taking into account the effect of various network topologies.In [47], a hybrid technique that integrates PSO with DE was utilized.This approach, referred to as PSO-DE, not only delivers the globally optimal solution, but also achieves faster convergence.The authors in [48] introduced a hybrid approach that combines the ABC algorithm with LP to improve the performance of the conventional ABC algorithm.In [49], the authors introduced a hybrid optimization approach, called the immune algorithm and particle swarm optimization (IA-PSO) algorithm, for achieving the optimal coordination of DOCRs in meshed power systems.This algorithm combines the immune information processing mechanism with the PSO algorithm to enhance the quality of the global solution and to reduce the computational effort required.
The firefly algorithm (FA) is a popular metaheuristic algorithm in the field of swarm intelligence optimization that takes inspiration from the flashing behavior of fireflies in nature.However, the effectiveness of the FA algorithm is affected by a Gaussian distribution random value, leading to slow convergence and causing it to become trapped in local optimization points.To overcome these challenges, the researchers in [50] introduced an adaptive modified version of the FA, known as the AFA.The aim of the AFA is to discover the optimal coordination of DOCRs by exploring the search space and enhancing the convergence rate.Another improvement to the FA algorithm is the use of a self-adaptive weight, as discussed in [51], which adjusts the tendency to move towards the best solution and neglect the worst solution.Additionally, a learning strategy based on the experience of other solutions is employed to enhance the flashing mechanism and increase exploration, contributing to the development of an improved version of the FA, known as the IFA.
In this article, a modified firefly optimization approach, called the MFA, is proposed to effectively coordinate the DOCRs.Compared to the standard FA, the attractiveness and randomized movement parameters are controlled to obtain a global solution and produce a good convergence rate.To further enhance the optimization process and achieve better solutions while maintaining a balance between the global and local search, this study proposes a hybrid approach that combines the the MFA with the GA.This hybrid approach helps to prevent being trapped in various local optima and offers improved performance.The MATLAB programming software was employed to test the proposed approaches for both linear and nonlinear programming on the IEEE 3-bus and 6-bus systems, and for numerical DOCRs using nonlinear programming on the IEEE 9-bus and 15-bus systems.To the best of the authors' knowledge, the hybrid FA-GA algorithm still has not been optimized for the DOCR coordination problem.
The main contributions of this paper are summarized as follows: • A modified version of the firefly algorithm is developed to solve the relay coordination problem.

•
The standard genetic algorithm is used to solve the relay coordination problem.

•
The relay coordination problem is solved by combining two metaheuristic algorithms, the firefly algorithm and genetic algorithm, to obtain a better solution.

•
The performance of the modified firefly algorithm, genetic algorithm, and hybrid firefly-genetic algorithm are assessed by implementing them to the standard IEEE 3-bus, 6-bus, 9-bus, and 15-bus test networks.

•
The proposed optimization techniques are verified by comparing them to up-to-date optimization algorithms that have been utilized to address the coordination problem.
The rest of this paper is organized as follows.Section 2 discusses the formulation of the DOCR coordination problem.Section 3 provides a detailed discussion on the proposed modified firefly algorithm.Section 4 presents an overview of the genetic algorithm.In Section 5, the hybrid algorithm, which combines the modified firefly algorithm and the genetic algorithm, is discussed.Section 6 presents the results achieved from the proposed algorithms for each test system with a discussion.Finally, Section 7 concludes the study with some future research directions.

Coordination Problem Formulation
Coordinating DOCRs is a complicated optimization problem that requires addressing various linear and nonlinear inequality constraints.Formulating the coordination problem involves defining the objective function mathematically, and specifying the constraints related to relay settings and selectivity between relays.

Objective Function Formulation
The DOCR problem is formulated as an optimization problem that aims to minimize a certain objective function [52,53].In this article, minimizing the total operating times of all primary DOCRs in the system is the purpose of the problems for DOCRs.The objective function (OF) is presented by the following equation: where m is the number of primary relays in the network; t represents the operating time of the i-th primary relay.To fairly compare the effectiveness of the various algorithms presented in the literature, including Simplex [54], LP [18], PSO [18,29], SOA [29,38], ABC [39], AFA [50], Analytic [23], Jaya [4], IGWO [43], TLBO [44,45], PSO-DE [47], IA-PSO [49], FA [51], IFA [51], WOA [51], IDE [37], BBO [5], MATLBO [45], CSA [40], and DJaya [4], the IEC standard inverse time characteristic is applied in this study.This characteristic is utilized to formulate the relay's operating time, which can be expressed using the equation presented below for a known short-circuit current (I sc ) and pickup current (I P ).
where t is the relay operating time, TMS is the time multiplier setting of the relay, I sc is the fault current flowing through the relay, and PS is the plug setting of the relay.In general, the plug setting represents the ratio of the pickup current (I P ) to the current transformer ratio (CTR).

Constraint Formulation
The objective function minimization in Equation ( 1) is bound by several sets of constraints.These constraints can be categorized into two sets; one set relates to the characteristics of the relay such as the relay operation time, TMS, and PS, while the other set focuses on ensuring selectivity.The following subsections outline how each type of constraint is formulated and addressed in this study.

Relay Characteristic Constraints
To achieve an optimal setting result for the TMS, it is necessary to determine its upper and lower bounds.The limitations of the TMS can be defined based on the specifications provided by the manufacturers of protection relays.The limitations of the TMS can be defined as follows: where TMS i,min and TMS i,max are the lower and upper limits of the TMS for the i-th relay, respectively.Equation ( 5) can be utilized to establish the boundaries of the plug setting for each relay.The value of the PS is influenced by the full load current and the short-circuit level of the system, and it can be defined as follows [55]: where PS i,min and PS i,max are the minimum and the maximum values of the PS of the i-th relay, respectively.To ensure the proper operation of the protection relay, the lower limit PS i,min must be set equal to or greater than the maximum overload current so that the relay is sensitive enough to detect and respond to fault conditions where the current exceeds the maximum overload level, while the upper limit PS i,max must be set equal to or less than the minimum fault current (I fmin ) to ensure that the relay will activate and initiate the appropriate protection measures whenever a fault current exceeds the specified threshold.These boundaries can be obtained as follows: where OLF is the overload factor, which is dependent on the specific protected element, I L,max is the maximum load current, and I fmin is the minimum fault current, both of which must be detected by the i-th relay.Additionally, the current transformer ratio for the i-th The upper time limit is determined by the critical clearing time and the allowable thermal limit of the protected component, while the lower limit is dependent on the relay manufacturer [56].

Relay Coordination Constraints
Coordination constraints are employed to ensure that both the primary and backup relays function properly, preventing any instances of undesired or uncoordinated relay trips.To ensure appropriate coordination, it is necessary for the backup relay to have an operational time that exceeds that of the primary relay by a pre-determined CTI, which is expressed as follows: where t i,k and t j,k represent the operational times of the primary relay (R i ) and backup relay (R j ), respectively, for a fault at k.The CTI denotes the coordination time interval assigned to the i-th primary relay, which is also the minimum allowable discrimination margin between R i and R j .

Constraint Handling Technique
During the optimization process, it is possible for the coordination constraint described in Equation ( 9) to be violated.To address this issue, the penalty method is employed as a technique to handle and satisfy the constraints in optimization problems.It involves incorporating a penalty term into the objective function to penalize unfeasible solutions that violate the constraints [4].This penalty term becomes large as the constraint violation increases, encouraging the optimizer to find feasible solutions that satisfy the constraints.Penalty functions are commonly employed due to the difficulty in modeling and/or the requirement for derivations in other approaches [5].In the coordination problem, the relay coordination constraints and the relay characteristic constraints are combined in the objective function using the penalty method, as shown in Equation (10).When a constraint is violated, a penalty value is incorporated into the objective function.Since the objective function aims to minimize, a high penalty factor (δ) is employed.
The penalty term P(l) is given by the following expression: where the penalty function values vary from 1 to k entries, in which k indicates the relay pairs involved.If all pairs satisfy the constraints specified in Equation (11), the penalty function in (10) returns a value of zero, and δ represents a large value assigned to the solutions that violate the constraints.The function returns a result of zero if the boundaries are obeyed, and for optimal minimization, the value of the penalty function must also be zero.

Firefly Algorithm
The firefly algorithm (FA) is a nature-inspired optimization algorithm that is applied to solve the complex and highly nonlinear constrained problems [51].The FA was proposed by Xin She Yang, in late 2007 and 2008, who was inspired by the movement of fireflies at Cambridge University [57].This algorithm was developed using three idealized rules.The first rule is that all fireflies are unisex, meaning they can attract one another regardless of gender.The second rule is that the brightness and attractiveness of each firefly are inversely correlated.In other words, the brighter a firefly is, the more attractive it is to other fireflies.However, as the distance between the fireflies increases, both their brightness and attractiveness decrease.The third rule states that the brightness of each firefly is influenced by the value of the objective function [50].In minimization problems, the firefly with a larger light intensity has a smaller objective function.Equations ( 12) and ( 13) provide mathematical descriptions of the second rule [50,58], which is expressed as follows: where I 0 is the actual intensity of light emitted by a firefly, β 0 is the attractiveness at r equal to 0, which is the maximum attractiveness that a firefly can have, and γ is the coefficient of light absorption that controls the variation in attractiveness and defines the convergence.Its value lies in the range [0.01, 100].As γ increases, the attractiveness of the fireflies decreases more rapidly with distance, leading to a faster convergence.r is the distance between two fireflies using the Cartesian distance, and m is the number of local optima of an optimization problem.The distance between the j-th and i-th fireflies is expressed as follows: X j,m = x j,1 , x j,2 , x j,3 , . . ..x j,k where X i,m refers to the m-th component of the spatial coordinate of the i-th firefly, while X j,m refers to the m-th component of the spatial coordinate of the j-th firefly, and k is the number of dimensions [59].The movement of a firefly i that is attracted to another more attractive (brighter) firefly j is expressed as follows: where x i,m+1 is the next generation of fireflies, x i,m and x j,m are the current position of the fireflies, α m is the randomization parameter in interval [0, 1], and rand is the random number generator with numbers uniformly distributed in the range [0, 1] [3,59].The FA updates the position of each firefly in the search space using a combination of three terms, as described by Equation (17).The first term represents the current location of the i-th firefly, while the second term represents the attraction towards a brighter firefly.The third term adds a random perturbation to the movement of the firefly [60].The algorithm initializes each agent in the population with a solution to an optimization problem, and then iteratively updates their positions based on their light intensity and proximity to other agents.If the light intensity of agent i is less than that of agent j, located at position x j , then agent i moves towards agent j.The agents are ranked based on their fitness values, and the global best solution is updated with the most recent one, if applicable.The movement of each firefly is controlled by a randomization parameter α m , which is a uniformly distributed random number in the range [0, 1].The algorithm aims to find the optimal solution to the optimization problem by iteratively updating the positions of the fireflies until convergence [57,58].
The FA is an easy-to-use and effective technique.However, it has been found to be slow to converge and prone to becoming trapped in local optima when applied to multi-modal problems.Additionally, the algorithm only considers the current performance of the fireflies, without retaining any memory of the previous best solutions or performances, which may lead to the loss of better solutions.Furthermore, the search behavior of the algorithm remains constant throughout all iterations for any condition because the parameters are fixed [61].The performance of the FA is assessed by measuring the attraction between individual fireflies, and different settings of the randomization parameter α and attractiveness coefficient β 0 parameters can result in different performances.To address some of these issues, modifications were proposed to the standard firefly algorithm in [62].These modifications update the brightness of the fireflies to obtain a global solution and prevent the distance between individual fireflies from becoming too large.However, the attractiveness between the r-th and n-th fireflies is given by the following formula: where β min and β max are user-supplied values and are taken as 0.2 and 1.Even if the distance is too far, e −γr 2 ij → 0, the attraction between them can be the β min .The parameter α plays a significant role in governing the stochastic movements of fireflies to attain a solution.A higher value of α results in a lower degree of accuracy in searching for an optimal solution, as the firefly's random movement becomes too widely spread and does not lead to the intended point.Conversely, a small α value can lead to a good convergence rate for the firefly moving in the desired direction [50].In [59], the researchers proposed a modification to the parameter α, as shown in Equation (19), which aims to enhance the convergence properties of the firefly algorithm.
where maxgen is the maximum number of generations.

Genetic Algorithm
The genetic algorithm (GA) was initially proposed by Holland in the 1960s and was further analyzed by Goldberg in 1989 [63].It is an optimization algorithm based on the principles of natural evolution and natural selection, inspired by the idea of "survival of the fittest" [64,65].The process starts with a population of solutions generated randomly, where the ones with higher fitness are preferred for selection as parents to create new solutions (offspring) for the next generation [66].The GA begins by identifying the variables for optimization and the fitness function [65].The fitness value of each chromosome in the current generation is then evaluated.The GA selects some chromosomes and uses them to create the next generation, evolving the existing population to reach an optimal solution that is proportional to the fitness value.The crossover and mutation operators are employed to generate new individuals within the decision space by operating on the selected pair of chromosomes [46].The GA has several stopping criteria, including reaching a maximum number of generations, running for a specific time, or reaching the fitness limit.The process can also stop if there is a lack of progress in the objective function for a certain period of time.

Proposed FA-GA Approach for Coordination Problem
The performance of the optimization algorithm can be enhanced by transforming the current solution into one or more improved solutions.A combination between the modified FA and GA techniques is used to perform this improvement.In this hybrid method, the master meta-heuristic is the modified FA, and the GA is subordinate to it.It comprises two stages.The first stage is aimed at exploring the search space to identify the most promising region.In the second stage, the GA is incorporated to investigate the search space further (beginning with the FA's solution) and to generate improved solutions to improve the global search while avoiding becoming trapped in multiple local optima.The main idea behind using the GA is based on its genetic operators, the crossover and mutation, in generating new solutions.The best solutions generated by the GA are considered to be the best solutions overall.The pseudo-code in Algorithm 1 illustrates the structure of the hybrid FA-GA.Figure 1 illustrates the hybrid FA-GA flowchart.
Algorithm 1. Pseudo-code for the proposed hybrid firefly-genetic algorithm FA Starting 1: Initialize FA and GA parameters (number of fireflies (n), generation number of FA (nGerFA), absorption coefficient (γ), attractiveness (β min and β max ) the randomness strength (α), number of population (nPop), generation number of GA (nGerGA), Crossover probability (P c ) and Mutation probability (P m )) 2: Objective function f(x), x = (x1, . . ., xd) T 3: Initialize the population of fireflies randomly within the search space xi (i = 1, 2, . . ., n). 4: Evaluate the brightness of each firefly using the objective function.5: While (t < nGerFA) for i = 1:n for j = 1:n Update the brightness of each firefly using Equation (18).Sort the fireflies in descending order of brightness.Update the position of each firefly using Equation (17).Update the value of delta using Equation ( 20

Simulation Results on Various IEEE Bus Systems
In this section, the achieved results for the DOCRs are presented using the proposed algorithms.To show the efficiency of the proposed modified firefly algorithm (MFA), the genetic algorithm (GA), and the hybrid firefly-genetic algorithm (FA-GA), a comparison with other optimization techniques is provided.The effectiveness of the proposed techniques is validated and tested through various IEEE bus systems.Specifically, the following four standard IEEE systems were considered: the IEEE 3-bus, 6-bus, 9-bus, and 15-bus test systems.The results were achieved through the development of a precise simulation program using MATLAB software version 2021a.

Simulation Results on Various IEEE Bus Systems
In this section, the achieved results for the DOCRs are presented using the proposed algorithms.To show the efficiency of the proposed modified firefly algorithm (MFA), the genetic algorithm (GA), and the hybrid firefly-genetic algorithm (FA-GA), a comparison with other optimization techniques is provided.The effectiveness of the proposed techniques is validated and tested through various IEEE bus systems.Specifically, the following four standard IEEE systems were considered: the IEEE 3-bus, 6-bus, 9-bus, and 15-bus test systems.The results were achieved through the development of a precise simulation program using MATLAB software version 2021a.

IEEE 3-Bus Network
The effectiveness of the proposed algorithms in minimizing the operating time of the DOCRs is assessed using the standard IEEE 3-bus network as the first test case.
Figure 2 depicts its component parts, which are three buses, three power generators, three branches, and six DOCRs.In this case, the coordination problem is initially expressed as a linear programming problem, and then formulated as a nonlinear programming problem.Tables 1 and 2 present the results of three-phase short circuits and the CTR of the relays in the IEEE 3-bus system, respectively.The CTI value is set to 0.2 s.There are a total of 30 constraints for this system.These constraints encompass six inequality conditions focused on the minimum operating times, an additional six inequality conditions concerning the maximum operating times, six inequality conditions addressing the selectivity criteria, as well as six side constraints pertaining to the TMS and another six side constraints related to the PS.

IEEE 3-Bus Network
The effectiveness of the proposed algorithms in minimizing the operating time of the DOCRs is assessed using the standard IEEE 3-bus network as the first test case.Figure 2 depicts its component parts, which are three buses, three power generators, three branches, and six DOCRs.In this case, the coordination problem is initially expressed as a linear programming problem, and then formulated as a nonlinear programming problem.Tables 1 and 2 present the results of three-phase short circuits and the CTR of the relays in the IEEE 3-bus system, respectively.The CTI value is set to 0.2 s.There are a total of 30 constraints for this system.These constraints encompass six inequality conditions focused on the minimum operating times, an additional six inequality conditions concerning the maximum operating times, six inequality conditions addressing the selectivity criteria, as well as six side constraints pertaining to the TMS and another six side constraints related to the PS.In linear programming formulation, the only decision variable is the TMS, which is continuously lying in [0.1, 1.1].The PS values are the fixed constants given in Table 3.In nonlinear programming formulation, the PS and TMS are treated as the design variables, which lie in [1.5, 5.0] and [0.1, 1.1], respectively, and both of them are continuous values.In linear programming formulation, the only decision variable is the TMS, which is continuously lying in [0.1, 1.1].The PS values are the fixed constants given in Table 3.In nonlinear programming formulation, the PS and TMS are treated as the design variables, which lie in [1.5, 5.0] and [0.1, 1.1], respectively, and both of them are continuous values.The optimum settings of the TMS achieved by the MFA, GA, and FAGA are presented in Table 4.Other methods that are proposed for this system are presented for comparison.The observation reveals that the proposed methods achieved superior results compared to the other methods, including Simplex [54], LP [18], PSO [18], SOA [38], and ABC [39].The optimum settings of the TMS achieved by the MFA, GA, and FAGA are presented in Table 4.Other methods that are proposed for this system are presented for comparison.The observation reveals that the proposed methods achieved superior results compared to the other methods, including Simplex [54], LP [18], PSO [18], SOA [38], and ABC [39].[18] 0.100000 0.136400 0.10000 0.10000 0.129800 0.10000 1.92580 PSO [18] 0.100000 0.136400 0.10000 0.10000 0.129800 0.10000 1.92580 SOA [38] 0.100000 0.136400 0.10000 0.10000 0.129800 0.10000 1.92580 ABC [39] 0.100000 0.136400 0.10000 0.10000 0.129800 0.10000 1.92580 MFA 0.100000 0.100000 0.10000 0.10000 0.100000 0.10000 1.78039 GA 0.100016 0.100004 0.10000 0.10000 0.100002 0.10000 1.78047 FAGA 0.100000 0.100000 0.10000 0.10000 0.100000 0.10000 1.78039 Figure 3 illustrates the overall net gain and the percentage of improvement in time achieved by the proposed methods, highlighting their superiority over the other methods mentioned in the literature.The CTI of each backup and primary relay pair is presented in Table 5.It is demonstrated that all backup and primary relay pairs satisfy the CTI criteria and that all of them are greater than 0.2.The CTI of each backup and primary relay pair is presented in Table 5.It is demonstrated that all backup and primary relay pairs satisfy the CTI criteria and that all of them are greater than 0.2.For nonlinear programming formulation, the optimal settings of the decision variables TMS and PS are shown in Table 6.Additionally, it provides a comparison of the results obtained using the proposed methods with other algorithms.The overall net gain in the operating time achieved by the proposed methods and other published techniques reported in the literature is depicted in Figure 4.The comparison of the proposed algorithms with existing approaches highlights the superiority and advantages of the proposed algorithms.

Simplex
Energies 2023, 16, x FOR PEER REVIEW 13 of 28 For nonlinear programming formulation, the optimal settings of the decision variables TMS and PS are shown in Table 6.Additionally, it provides a comparison of the results obtained using the proposed methods with other algorithms.
The overall net gain in the operating time achieved by the proposed methods and other published techniques reported in the literature is depicted in Figure 4.The comparison of the proposed algorithms with existing approaches highlights the superiority and advantages of the proposed algorithms.Based on these results, it can be concluded that the proposed methods demonstrated their superiority over the other approaches by achieving a lower fitness value.Specifically, they successfully minimized the total operating time of the DOCRs in the IEEE 3-bus system.These results further confirm the superiority, efficiency, and robustness of the proposed algorithms.
In Table 7, the CTI values for the six relay pairs in the IEEE 3-bus system are presented.It is evident from the table that the initial response is from the primary relays, followed by the backup relays activating with a coordination time margin in the event of primary relay failure to isolate the fault.

IEEE 6-Bus Network
Figure 5 presents the single-line diagram of the IEEE 6-bus network, which consists of seven branches, four power generators, and 14 relays.The objective is to optimize the settings of the 14 relays, with the main goal of determining the optimal TMS and PS.At the closed end of each relay, three-phase short circuits are connected.Table 8 provides information on the primary/backup relay pairs and the close-in short-circuit currents, while Table 9 presents the CTRs of the relays.The CTI value is selected as 0.  10.In the nonlinear programming formulation, the continuous variables PS and TMS both have ranges between [1.5, 5.0] and [0.1, 1.1], respectively.This test system has 76 constraints in total, including 14 inequality constraints for the minimum operating times, 14 inequality constraints for the maximum operating times, 20 inequality constraints for selectivity criteria, 14 side constraints for the TMS, and 14 side constraints for the PS.
Energies 2023, 16, x FOR PEER REVIEW 14 of 28 Based on these results, it can be concluded that the proposed methods demonstrated their superiority over the other approaches by achieving a lower fitness value.Specifically, they successfully minimized the total operating time of the DOCRs in the IEEE 3-bus system.These results further confirm the superiority, efficiency, and robustness of the proposed algorithms.
In Table 7, the CTI values for the six relay pairs in the IEEE 3-bus system are presented.It is evident from the table that the initial response is from the primary relays, followed by the backup relays activating with a coordination time margin in the event of primary relay failure to isolate the fault.

IEEE 6-Bus Network
Figure 5 presents the single-line diagram of the IEEE 6-bus network, which consists of seven branches, four power generators, and 14 relays.The objective is to optimize the settings of the 14 relays, with the main goal of determining the optimal TMS and PS.At the closed end of each relay, three-phase short circuits are connected.Table 8 provides information on the primary/backup relay pairs and the close-in short-circuit currents, while Table 9 presents the CTRs of the relays.The CTI value is selected as 0.  10.In the nonlinear programming formulation, the continuous variables PS and TMS both have ranges between [1.5, 5.0] and [0.1, 1.1], respectively.This test system has 76 constraints in total, including 14 inequality constraints for the minimum operating times, 14 inequality constraints for the maximum operating times, 20 inequality constraints for selectivity criteria, 14 side constraints for the TMS, and 14 side constraints for the PS.The optimal settings of the TMS, attained via the proposed methods using the linear programming formulation, are presented in Table 11.The table also includes a comparative analysis of these methods with other published techniques mentioned in the literature.Figure 6 depicts the evaluation of the total net gain in time obtained using the proposed methods in comparison to the other algorithms, such as the TLBO [44], PSO-DE [47], IA-PSO [49], FA [51] and IFA [51].The obtained results demonstrate that the proposed methods have shown an improved performance for the IEEE 6-bus test system.It is concluded that the proposed algorithms possess an advantage in terms of net gain in time when compared to the other techniques, demonstrating satisfactory and enhanced results.The CTI of each relay pair obtained using the proposed algorithms is shown in Figure 7.These results indicate that the CTI values are consistently higher than the lowest limit of CTI applied throughout this study.
In the case of nonlinear programming formulation, Table 12 provides the optimal settings for the decision variables obtained through the proposed methods.The coordination margin achieved utilizing the proposed algorithms is shown in Figure 8.The backup relays will be activated if the primary relays fail to operate, as can be observed from the figure.It can be evident that the proposed methods effectively achieved the objective of obtaining relay settings that ensure the sequential operation between the relay pairs.In the case of nonlinear programming formulation, Table 12 provides the optimal settings for the decision variables obtained through the proposed methods.The coordination margin achieved utilizing the proposed algorithms is shown in Figure 8.The backup relays will be activated if the primary relays fail to operate, as can be observed from the figure.It can be evident that the proposed methods effectively achieved the objective of obtaining relay settings that ensure the sequential operation between the relay pairs.

IEEE 9-Bus Network
The third system investigated in this study is the IEEE 9-bus network, as shown in Figure 9.It consists of nine buses, one power generator, 12 branches, and 24 directional overcurrent relays.In this case, all relays are regarded as numerical relays.Thus, this network is formulated as a nonlinear programming problem.Additionally, the lower and upper bounds of the TMS are set at 0.1 and 1.2, respectively.Meanwhile, the lower and higher bounds of the PS are defined at 0.5 and 2.5, respectively.Also, for a justified comparison, the value of the coordination time interval is set as 0.2 s.To complete the analysis, the three-phase short-circuit currents for the primary and backup relays are provided in Table 13, and all relays use a CTR of 500/1.For this test system, there are a total of 128 constraints, which can be further categorized as follows: 32 inequality constraints for the selectivity criteria, 24 inequality constraints for the minimum and maximum operating times, and 24 side constraints each for the TMS and PS.

IEEE 9-Bus Network
The third system investigated in this study is the IEEE 9-bus network, as shown Figure 9.It consists of nine buses, one power generator, 12 branches, and 24 directio overcurrent relays.In this case, all relays are regarded as numerical relays.Thus, t network is formulated as a nonlinear programming problem.Additionally, the lower a upper bounds of the TMS are set at 0.1 and 1.2, respectively.Meanwhile, the lower a higher bounds of the PS are defined at 0.5 and 2.5, respectively.Also, for a justifi comparison, the value of the coordination time interval is set as 0.2 s.To complete analysis, the three-phase short-circuit currents for the primary and backup relays provided in Table 13, and all relays use a CTR of 500/1.For this test system, there ar total of 128 constraints, which can be further categorized as follows: 32 inequality c straints for the selectivity criteria, 24 inequality constraints for the minimum and ma mum operating times, and 24 side constraints each for the TMS and PS.

IEEE 9-Bus Network
The third system investigated in this study is the IEEE 9-bus network, as shown in Figure 9.It consists of nine buses, one power generator, 12 branches, and 24 directional overcurrent relays.In this case, all relays are regarded as numerical relays.Thus, this network is formulated as a nonlinear programming problem.Additionally, the lower and upper bounds of the TMS are set at 0.1 and 1.2, respectively.Meanwhile, the lower and higher bounds of the PS are defined at 0.5 and 2.5, respectively.Also, for a justified comparison, the value of the coordination time interval is set as 0.2 s.To complete the analysis, the three-phase short-circuit currents for the primary and backup relays are provided in Table 13, and all relays use a CTR of 500/1.For this test system, there are a total of 128 constraints, which can be further categorized as follows: 32 inequality constraints for the selectivity criteria, 24 inequality constraints for the minimum and maximum operating times, and 24 side constraints each for the TMS and PS.Table 14 displays the optimized values of the decision variables obtained via the MFA, GA, and FA-GA.Figure 10 provides an analysis of the overall net gain in time obtained using the proposed methods compared to other published techniques, including the TLBO [45], IDE [37], BBO [5], SOA [29], FA [51], IFA [51], and WOA [51].It is evident that the proposed methods surpass the other algorithms in terms of the net time gain.MFA, GA, and FA-GA.Figure 10 provides an analysis of the overall net gain in time obtained using the proposed methods compared to other published techniques, including the TLBO [45], IDE [37], BBO [5], SOA [29], FA [51], IFA [51], and WOA [51].It is evident that the proposed methods surpass the other algorithms in terms of the net time gain.
Figure 11 shows the discrimination times for each relay pair.The results demonstrate that the proposed techniques effectively maintain the CTI between the DOCRs, resulting in a satisfactory performance.Figure 11 shows the discrimination times for each relay pair.The results demonstrate that the proposed techniques effectively maintain the CTI between the DOCRs, resulting in a satisfactory performance.

IEEE 15-Bus Network
This network is a networked distribution test system with 15 buses, 21 lines, and 42 relays, as shown in Figure 12.Table 15 presents the short-circuit currents obtained from both the primary and backup relays.Table 16 provides the CTRs for the settings of the DOCRs.All relays are regarded as numerical relays in this case.As a result, this network

IEEE 15-Bus Network
This network is a networked distribution test system with 15 buses, 21 lines, and 42 relays, as shown in Figure 12.Table 15 presents the short-circuit currents obtained from both the primary and backup relays.Table 16 provides the CTRs for the settings of the DOCRs.All relays are regarded as numerical relays in this case.As a result, this network is formulated as a nonlinear programming problem.The continuous decision variables PS and TMS have ranges between [0.5, 2.5] and [0.1, 1.2], respectively.A coordination interval of 0.2 s is considered.There are 250 constraints in total for the coordination problem, and they are as follows: 82 inequality constraints for the selectivity criteria, 42 inequality constraints for the minimum allowable operating time, 42 inequality constraints for the maximum allowable operating time, and 42 side constraints each for the TMS and PS.
PS and TMS have ranges between [0.5, 2.5] and [0.1, 1.2], respectively.A coordination interval of 0.2 s is considered.There are 250 constraints in total for the coordination problem, and they are as follows: 82 inequality constraints for the selectivity criteria, 42 inequality constraints for the minimum allowable operating time, 42 inequality constraints for the maximum allowable operating time, and 42 side constraints each for the TMS and PS.Table 17 demonstrates that the optimal solution obtained through the proposed approaches surpasses the results achieved by the other techniques, including the MATLBO [45], PSO [29], Jaya [4], SOA [29], CSA [40], and DJaya [4].Figure 13 shows an examination of the overall net gain in time that was achieved for this case using the proposed methods.The effectiveness of the proposed algorithms in addressing the coordination problem of the DOCRs is demonstrated by their ability to achieve the lowest objective function value.Figure 14 illustrates the discrimination times for each relay pair.It is evident that the primary relays activate initially, and subsequently, after a coordination time margin, and the backup relays come into operation if the primary relays fail to isolate the fault.Table 17 demonstrates that the optimal solution obtained through the proposed approaches surpasses the results achieved by the other techniques, including the MATLBO [45], PSO [29], Jaya [4], SOA [29], CSA [40], and DJaya [4].Figure 13 shows an examination of the overall net gain in time that was achieved for this case using the proposed methods.The effectiveness of the proposed algorithms in addressing the coordination problem of the DOCRs is demonstrated by their ability to achieve the lowest objective function value.Figure 14 illustrates the discrimination times for each relay pair.It is evident that the primary relays activate initially, and subsequently, after a coordination time margin, and the backup relays come into operation if the primary relays fail to isolate the fault.

Number of Objective Function Evaluation
To demonstrate the effectiveness of the proposed hybrid algorithm, a comparison was made with the standard genetic algorithm using the objective function evaluation number.The count of the objective function evaluations represents the total number of times the objective function is assessed during the optimization process.During the search for the optimal solution, the optimization algorithm frequently evaluates the objective function multiple times.Algorithms that necessitate fewer function evaluations are typically considered more efficient and tend to converge towards a solution more rapidly.Table 18 presents the objective function evaluation number and the percentage improvement for each simulated case.The results indicate that the hybrid algorithm performed better than the standard GA.

Number of Objective Function Evaluation
To demonstrate the effectiveness of the proposed hybrid algorithm, a comparison was made with the standard genetic algorithm using the objective function evaluation number.The count of the objective function evaluations represents the total number of times the objective function is assessed during the optimization process.During the search for the optimal solution, the optimization algorithm frequently evaluates the ob-

Conclusions
This research proposes a modified firefly algorithm and hybrid firefly-genetic algorithm to address the issue of coordinating DOCRs.In the modified firefly algorithm, the attractiveness coefficient and the randomization parameter are controlled to obtain a desired convergence rate.The hybrid firefly-genetic algorithm is proposed to obtain a sufficiently accurate solution, and both techniques are applied in a serial fashion, which is divided into two stages; the modified firefly algorithm is applied in the first stage to obtain global solutions, and the results from the algorithm are used as the initial population for the genetic algorithm in the last stage to obtain better solutions.To compare the performance of the proposed methods in solving the problem, the methods are applied to the directional overcurrent relay coordination problem including the IEEE 3-bus, 6-bus, 9-bus, and 15-bus test systems.The results indicate that the proposed methods outperform the previous approaches in achieving a minimal total operating time for primary relays and ensuring proper coordination between the primary and backup relay pairs.The hybrid firefly-genetic algorithm achieves a better solution with fewer objective function evaluations than the standard genetic algorithm.The algorithms used in this work were tested using a single type of fault and the same standard inverse characteristic for all relays.It is advised that the proposed algorithms be tested for various standard characteristics and multiple types of faults.Additionally, the work can be expanded by using additional decision variables that are non-standard characteristic curve relays to provide the relay coordination issue with more flexibility.

Figure 1 .
Figure 1.Flowchart of the proposed hybrid firefly-genetic algorithm.

Figure 1 .
Figure 1.Flowchart of the proposed hybrid firefly-genetic algorithm.

Figure 3 .
Figure 3. Net gain improvement of proposed algorithms compared to other algorithms for IEEE 3-bus system (LP formulation).

Figure 3 .
Figure 3. Net gain improvement of proposed algorithms compared to other algorithms for IEEE 3-bus system (LP formulation).
Figure5presents the single-line diagram of the IEEE 6-bus network, which consists of seven branches, four power generators, and 14 relays.The objective is to optimize the settings of the 14 relays, with the main goal of determining the optimal TMS and PS.At the closed end of each relay, three-phase short circuits are connected.Table8provides information on the primary/backup relay pairs and the close-in short-circuit currents, while Table9presents the CTRs of the relays.The CTI value is selected as 0.2 s.The values of the continuous TMS in the linear programming formulation lie in the range [0.1, 1.1].The PS values are fixed constants given in Table10.In the nonlinear programming formulation, the continuous variables PS and TMS both have ranges between [1.5, 5.0] and [0.1, 1.1], respectively.This test system has 76 constraints in total, including 14 inequality constraints for the minimum operating times, 14 inequality constraints for the maximum operating times, 20 inequality constraints for selectivity criteria, 14 side constraints for the TMS, and 14 side constraints for the PS.
Figure5presents the single-line diagram of the IEEE 6-bus network, which consists of seven branches, four power generators, and 14 relays.The objective is to optimize the settings of the 14 relays, with the main goal of determining the optimal TMS and PS.At the closed end of each relay, three-phase short circuits are connected.Table8provides information on the primary/backup relay pairs and the close-in short-circuit currents, while Table9presents the CTRs of the relays.The CTI value is selected as 0.2 s.The values of the continuous TMS in the linear programming formulation lie in the range [0.1, 1.1].The PS values are fixed constants given in Table10.In the nonlinear programming formulation, the continuous variables PS and TMS both have ranges between [1.5, 5.0] and [0.1, 1.1], respectively.This test system has 76 constraints in total, including 14 inequality constraints for the minimum operating times, 14 inequality constraints for the maximum operating times, 20 inequality constraints for selectivity criteria, 14 side constraints for the TMS, and 14 side constraints for the PS.

Figure 10 .
Figure 10.Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 9-bus system (NLP formulation).

Figure 13 .
Figure 13.Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 15-bus system (NLP formulation).
CTR i , is taken into account.The minimum operating time (t i,min ) and maximum operating time (t i,max ) constraints for the DOCRs are expressed as follows:t i,min ≤ t i ≤ t i,max

Table 1 .
Three-phase short-circuit current for IEEE 3-bus network.

Table 2 .
CTR for primary relays in IEEE 3-bus network.

Table 1 .
Three-phase short-circuit current for IEEE 3-bus network.

Table 2 .
CTR for primary relays in IEEE 3-bus network.

Table 4 .
Optimal settings of DOCRs for the IEEE 3-bus system (LP formulation).Figure3illustrates the overall net gain and the percentage of improvement in time achieved by the proposed methods, highlighting their superiority over the other methods mentioned in the literature.

Table 4 .
Optimal settings of DOCRs for the IEEE 3-bus system (LP formulation).

Table 5 .
CTI between relay pairs for the IEEE 3-bus system.

Table 6 .
Optimal settings of DOCRs for the IEEE 3-bus system (NLP formulation).

Table 5 .
CTI between relay pairs for the IEEE 3-bus system.

Table 6 .
Optimal settings of DOCRs for the IEEE 3-bus system (NLP formulation).
Figure 4. Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 3-bus system (NLP formulation).

Percentage Improvement in Net Gain Compared to Other Algorithms Figure
4. Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 3-bus system (NLP formulation).

Table 7 .
CTI between relay pairs for the IEEE 3-bus system (NLP formulation).

Table 7 .
CTI between relay pairs for the IEEE 3-bus system (NLP formulation).

Table 8 .
Three-phase short-circuit current for IEEE 6-bus network.

Table 9 .
CTR for primary relays in IEEE 6-bus network.

Table 11 .
Optimal TMS settings of DOCRs for IEEE 6-bus system (LP formulation).Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 6-bus system (LP formulation).The CTI of each relay pair obtained using the proposed algorithms is shown in Figure7.These results indicate that the CTI values are consistently higher than the lowest limit of CTI applied throughout this study.

Percentage Improvement in Net Gain Compared to Other Algorithms Figure 6.
Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 6-bus system (LP formulation).

Table 12 .
Optimal settings of DOCRs for the IEEE 6-bus system (NLP formulation).

Relay Pairs CTI Values For Relay Pairs For IEEE 6-bus (LP Formulation)
Figure 7. CTI values for 20 relay pairs for IEEE 6-bus system (LP formulation).

Table 12 .
Optimal settings of DOCRs for the IEEE 6-bus system (NLP formulation).

Table 13 .
Three-phase short-circuit current for IEEE 9-bus network.

Table 14 .
Relay settings of DOCRs for the IEEE 9-bus system (NLP formulation).

in Net Gain Compared to Other Algorithms Figure 10.
Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 9-bus system (NLP formulation).

Table 14 .
Relay settings of DOCRs for the IEEE 9-bus system (NLP formulation).

Table 15 .
Three-phase short-circuit current in Ampere for IEEE 15-bus network.
Figure 13.Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 15-bus system (NLP formulation).

Percentage Improvement in Net Gain Compared to Other Algorithms
cond) CTI Values of the Proposed Algorithms Figure 13.Improvement in net gain of the proposed algorithms compared to other algorithms for IEEE 15-bus system (NLP formulation).

Table 16 .
CTR for primary relays in IEEE 15-bus network.

Table 17 .
Relay settings of DOCRs for the IEEE 15-bus system (NLP formulation).

Table 18 .
Number of objective function evaluations for the GA and hybrid algorithm.