1 Introduction

Achieving an optimal power flow (OPF) represents an essential and complex non-linear optimization problem in power systems [1]. From an optimization standpoint, the OPF problem involves minimization of an objective, such as voltage instability, fuel cost, and total emission. For this minimization, researchers have applied algorithms in order to obtain an optimized adjustment of control variables that respect constraints, i.e., equality and inequality of operating conditions [2]. These variables include the real power generator, voltages of generation buses, tap ratios of transformers, and reactive powers of shunt compensation capacitors [3].

Recently, several metaheuristic algorithms (MAs) [4] for solving the OPF problems have been proposed [5]. These include the adaptive multiple team perturbation-guiding Jaya (AMTPG-Jaya) algorithm [6], modified sine-cosine algorithm (MSCA) [7], modified grasshopper optimization algorithm (MGOA) [5], moth swarm algorithm (MSA) [8], electromagnetism mechanism algorithm (EM) [9], and colliding bodies optimization (CBO) [10]. Although these algorithms have solved the same kind of OPF problems, their objective functions, i.e., optimization goals, were different. Different goals lead to different optimized solutions and can therefore influence the optimization performance. Generally, optimization algorithm performance refers to the quality of the optimized solution and its computation time, i.e., time required for convergence of the algorithm. Although many MAs have provided satisfactory results, optimization problems have become increasingly challenging (as the number of optimized variables has increased), while satisfying many constraints and requirements. However, in spite of the advantages of algorithms, numerous existing meta-heuristic optimization algorithms do not constantly guarantee the globally optimum solution. In addition, owing to the variability of objectives Where, diverse functions are used for formulating the OPF problem, no algorithm can be considered the better-quality in solving all variants of OPF. Therefore, developing new meta-heuristic algorithms which can effectively handle diverse OPF formulations, is necessary [6]. Combining MAs - often referred to as hybridization- is effective in addressing the current optimization challenges [11]. Although hybridization improves optimization performance, it should be performed with adequate algorithms. Thus, selecting the algorithms is an important step. And common practice is to select them based on their standalone performance. Another way to improve algorithm performance is by adding optimization components to an original algorithm.

Therefore, to develop a more effective algorithm (than the methods typically employed) for solving OPF problems, we have studied recent algorithms and features. The Equilibrium Optimizer (EO) has attracted the attention of many researchers –in approximately one year, this method has been cited 500 times. In [12], the EO performed better than several other algorithms. This algorithm has been validated for over 58 benchmark functions, including composite functions and functions from the Congress On Evolutionary Computation 2017 (CEC’17), which are considered challenging optimization problems. To further validate its efficiency, the EO has also been applied to three canonical engineering problems, i.e., welded beam design, pressure vessel design, and tension/compression spring design. The EO optimized results yielded superior performance compared with those of seven other MAs. Although the EO has yielded promising results, the algorithm has some drawbacks. For example, depending on the optimization problem, slow convergence speed, convergence to a local minimum, performance dependence on algorithm parameters, and difficulty in achieving a balance between the exploration and exploitation phases, have been reported [13].

In this regard, the EO has gained much popularity in recent days in several fields of engineering and complex applications. Authors in [13] used EO in a similar context for solving combinatorial, global, engineering, and Multi-Objective problems. Authors in [14] applied Opposition Based Learning (OBL) at the initialization phase of EO for parameters identification of photovoltaic modules. In [15], authors combined the dimension learning hunting (DLH) with EO for multi-thresholding based COVID-19 CT images. Authors in [16], the support vector regression (SVR) method with equilibrium optimizer (EO) is combined for stock market prediction. In [17], authors developed a new variant of EO called general learning equilibrium optimizer (GLEO), they utilizes a general learning strategy to explore the promising regions, the GLEO is employed as a wrapper feature selection method, to select a subset of informative biological dataset’s features. Authors in [18] proposed an enhanced EO version using ReliefF algorithm and the local search strategy, the introduced feature selection algorithm, is tested on 16 UCI datasets and 10 biological datasets. In [19], authors introduced an adaptive variant of EO called LWMEO for solving the engineering design problems, the Lévy flight random walk is utilized to enhance the traditional EO exploration, and spiral encirclement mechanism to enhance the exploitation process. In [20], an improved variant of the EO (IEO), to optimize the optimal power flow (OPF) problem, the IEO uses the chaotic equilibrium pool to improve the information sharing between individuals. In [21], authors suggested an algorithm that combines the a modified version of the EO and the extreme learning machine (ELM). To enhance the exploratory search, a gaussian mutation method is incorporated to the original EO.

Some studies have focused on overcoming these shortcomings. Recently, the Lévy Flights (LF) algorithmic feature has yielded excellent results in improving MA performance [22], and consequently has attracted attention from optimization algorithm developers. Indeed, LF has been integrated into the algorithms of some MAs, such as Grey wolf optimizer (GWO) [23], Particle swarm optimization [24, 25], Evaporation rate water cycle algorithm [26], Whale Optimization Algorithm (WOA) [27], Chimp optimization algorithm [28], marine predators algorithm [29], and Lévy flight distribution [30]. The results have shown that (in general) LF improves standard MAs by strengthening the local search, escaping local minima, enhancing the convergence speed, or improving the exploration-exploitation balance. With these benefits in mind, incorporating LF features into an algorithm seems a promising avenue for addressing the aforementioned shortcomings. Therefore, the motivations of this paper are to:

  1. 1.

    Device a methodology for reinforcing the exploration and exploitation phases of MAs, thereby providing improved solutions to optimization problems;

  2. 2.

    Investigate the OPF and provide enhanced solutions;

  3. 3.

    Propose an optimization algorithm that exhibits better performance than recent and high-performance algorithms.

Thus, this paper proposes an enhanced EO (EEO), which includes an LF component and a new reinforcement strategy for solving OPF problems more efficiently than other methods. In particular, the proposed enhancing method consists of three components for improving the local and global searches. The aim is to reduce the potential weaknesses (such as premature convergence, unbalanced exploration and exploitation phases, and convergence to a local optimum) of the standard EO. Thus, the proposed algorithm aims to solve OPF problems more efficiently (than other methods) and to serve as a high-performance optimization tool [31]. To achieve this goal, the efficiency of the proposed EEO is evaluated on ten benchmark functions of the CEC’20 test suite. The proposed EEO is then used to solve the OPF problem of a standard IEEE 30-bus system. The fuel cost, fuel cost with value-point loading effect, emission, total active power losses, voltage stability enhancement, and voltage deviation are all individually optimized. Simulation results are compared with the results of the original EO, some of the most recent algorithms, and high-performance optimizers and winners of IEEE CEC competitions including; Moth-flame optimization algorithm (MFO), Sine Cosine Algorithm (SCA), Whale Optimization Algorithm (WOA), Grey wolf optimizer (GWO), Harris hawk optimization algorithm (HHO), Black Widow Optimization Algorithm (BWO), Evolution Strategy with Covariance Matrix Adaptation (CMA-ES), Ensemble Sinusoidal Differential Covariance Matrix Adaptation (LSHADE_cnEpSin), Improved Multi-Operator Differential Evolution algorithm (IMODE), Adaptive Gaining Sharing Knowledge (AGSK) and the original EO.

In summary, the features that distinguish our work from previous studies are as follows:

  • We proposed an enhanced algorithm, i.e., the EEO, which includes a new exploitation-exploration method.

  • The EEO performance is analyzed over 10 benchmark functions of the CEC’20 test suite. This benchmark is more recent than other related works. The optimized results are compared with the standard EO and other recently published algorithms.

  • Statistical and qualitative analyses validate the performance of the proposed EEO.

  • The OPF objective functions are more comprehensive than those considered in many other studies on the topic. That is, six functions (fuel cost, fuel cost with value-point loading, emissions, total real power losses, voltage instability, and voltage deviation) are minimized.

  • The proposed EEO achieved high-quality optimized solutions for the standard IEEE 30-bus power system compared with the results of seven recent algorithms and 20 published results.

The rest of this paper are organized as follows: Section 2 presents some preliminaries about EO and other used enhancement methods i.e., the original EO, the LF method. Section 3 presents the details of the proposed EEO algorithm, and its components. Section 4 introduces the formulation of OPF problem, i.e., the mathematical model and constraints. Section 5 presents the results obtained and analyses performed by the proposed EEO and competitive algorithms on the CEC’20 test suite and the OPF problems. Section 6 concludes the paper.

2 Preliminaries

The different components of the proposed algorithm, i.e., the original EO, the LF feature, are described in the following subsections.

2.1 Equilibrium optimizer (EO)

Inspired by physics observations, the authors of [12] have proposed an EO. Specifically, EO is based on the physics laws governing the balance of concentrations of nonreactive constituents in a controlled volume. An equation defines the conservation of mass that enters and leaves a specific volume and the system always tends to an equilibrium point. The EO algorithm is based on the ability to reach this point. Indeed, the algorithm tries to stabilize the concentration within the system. The three main mathematical steps of EO are: 1) Initialization, 2) Equilibrium pool and candidates, and 3) Concentration update (we describe these steps below and refer readers to [12] for additional details about the EO).

Initialization

Similar to MAs based on population evolution, EO generates a population randomly. The population consists of particles and a uniform distribution is obtained. Particles are defined by concentration vectors. The initial population is generated from:

$$ P_{i}^{\text{initial}}=P_{\min }+\operatorname{rand}_{i}\left( P_{\max }-P_{\min }\right) \quad i=1,2, \ldots, n $$
(1)

Where, \(P_{i}^{\text {initial}}\) is the vector corresponding to the initial concentration of particle i, \(P_{{\max \limits } }\) and \(P_{{\min \limits } }\) are the upper and lower bounds, respectively, n is the number of particles in the population, and randi generates a random value ∈ [0,1].

Equilibrium pool and candidates

From an optimization standpoint, EO employs a pool of five particles to achieve the unknown state of equilibrium, which represents the optimal solution. The pool is composed of the four best-so-far particles for diversification purposes. The average of these four particles is employed for the exploitation process. The pool is defined as:

$$ \overrightarrow{\mathrm{P}}_{\text{eq}}=\left[\overrightarrow{\mathrm{P}}_{\text{eq}(1)}, \overrightarrow{\mathrm{P}}_{\text{eq}(2)}, \overrightarrow{\mathrm{P}}_{\text{eq}(3)}, \overrightarrow{\mathrm{P}}_{\text{eq}(4)}, \overrightarrow{\mathrm{P}}_{\text{eq}(\text{avg})}\right]. $$
(2)

Concentration update

At each iteration, the EO updates the particle population through the following equation:

$$ \vec{P}=\overrightarrow{P_{\text{eq}}}+(\vec{P}-\overrightarrow{P_{\text{eq}}}) \vec{F}+\frac{\vec{R}}{\vec{\lambda}} (1-\vec{F}), $$
(3)

Where, \(\vec {F}\) influences the exploration-exploitation balance and is defined as follows:

$$ \vec{F}=e^{-\vec{\lambda}\left( t-t_{0}\right)}, $$
(4)

Where, λ is a random value ∈ [0,1], and and the value of t decreases with increasing iteration number iter, as follows,

$$ t=\left( 1-\frac{iter}{Max\_{iter }}\right)^{\left( a_{2} \left( \frac{iter}{Max\_{iter }}\right)\right)}. $$
(5)

iter is the current iteration and Max_iter is the maximum number of iterations. The constant a2 controls the exploitation; as a2 increases, the intensification process improves, but the exploration capability decreases. The vector \(\vec {t}_{0}\) is computed as follows:

$$ \vec{t}_{0}=\frac{1}{\vec{\lambda}} \ln \left( -a_{1} \operatorname{sign}(\vec{r}-0.5)\left[1-e^{-\vec{\lambda} t}\right]\right)+t, $$
(6)

Where, the constant a1 controls the diversification. The term sign(r − 0.5) designates the diversification and intensification directions. The exploration ability increases with increasing a1 value, but the exploitation capability decreases. The vector \(\vec {R}\) is referred to as the generation rate and is computed as follows:

$$ \vec{R}=\overrightarrow{\text{RCP}} (\overrightarrow{P_{\text{eq}}}-\vec{\lambda} \vec{P}) e^{-\vec{\lambda} \left( t-t_{0}\right)}, $$
(7)

Where, \(\overrightarrow {\text {RCP}}\) is :

$$ \overrightarrow{\text{RCP}}=\left\{\begin{array}{ll} 0.5 r_{1} & r_{2}>\text{RP} \\ 0 & \text{ otherwise }, \end{array}\right. $$
(8)

Where, r1 and r2 are random values ∈ [0,1] and RP is a variable that also influences the exploitation-exploration balance.

3 The proposed EEO algorithm

Initialization

The proposed EEO integrates the above-mentioned strategies. Particularly, the EEO initializes its population with LF distribution as follows:

$$ P_{i}^{\text{initial}}=P_{\min }+\operatorname{Levy}\left( \beta\right) \times \left( P_{\max }-P_{\min }\right) \quad i=1,2, {\ldots} {\ldots} NP $$
(9)

Where, \(P^{\text {initial}}_{i}\) are the initial values of the ith particle, \(P_{{\min \limits } }\) and \(P_{{\max \limits } }\) are the lower and upper bounds, respectively. \(\operatorname {Levy}\left (\beta \right )\) is LF random walk described. Previous work has confirmed that LF allows effective coverage of the search region, and hence candidate solutions will most likely converge to (near)-optimal solutions. Indeed, a previous study [32] has demonstrated that LF is an effective mechanism for escaping regions with local minima (even those with many deep local minima).

Reinforce exploration

During the exploration stage, algorithm particles search the problem space broadly in order to identify promising areas. The exploration performed by the original EO algorithm involves only searches near the best particle, i.e., Peq, and can therefore be improved. Thus, this work proposes a new reinforcement exploration method that mutates the search particles by selecting two particles in the population as follows:

  1. 1.

    Based on the fitness value, the population is divided into two parts, i.e., the best and worst solutions;

  2. 2.

    The Pr1 solution from the best fitness solutions and Pr2 from the worst fitness solutions are selected via the tournament selection method, which is defined by:

    $$ Pt_{j} = Peq_{j} + (P_{r2}(j)- P_{i,j}) * x+ (P_{i,j}- P_{r1}(j)) * y. $$
    (10)

    Where, x, y operators retain the stochastic nature and define the convergence direction of search particles, when generating Pt solution; x and y are generated randomly through the following equations:

    $$ x = 0.05 + 0.95*rand $$
    (11)
    $$ y = 0.9 + 0.1*rand $$
    (12)

    Where, rand is a random number generated within average ∈ [0,1].

Reinforce exploitation

During the exploitation process, the particles are crowded for searching around the identified promising areas from early exploration. As illustrated below, search-particle evolution is achieved by minimizing the distance from the best agent Peq. (3) of the original EO algorithm is slightly adapted in the proposed EEO and is given as follows:

$$ P_{m}(j) = P(i,j) + \vec{F}(P_{i,j} - Peq(j)) + (\vec{G}/\vec{\lambda})(1-\vec{F}) $$
(13)

Where, vectors F and λ are defined by (4) and (3) respectively, and Peq(j) refers to the j-th portion of the best particle, P(i,j) refers the j-th portion of the i-th particle.

Balancing exploration and exploitation

During the first iterations, strengthening the exploration phase is essential for algorithm identification of promising areas in the problem space, while the subsequent iterations exploit the identified areas. Therefore, the following strategy is proposed for balancing the exploration and exploitation phases:

$$ P(new)_{j} =\left\{\begin{array}{ll} P_{m}(j) & \text{if } \left( \text{rand} > 0.6\right)\\ Pt_{j} & \text{else if }\left( z > 1/2\right) \\ P_{i,j} & otherwise \end{array}\right. $$
(14)

Where, z is computed as follow:

$$ z=\left( 1-\frac{iter}{Max\_{iter }}\right)e^{\left( a_{2} \left( \frac{iter}{Max\_{iter }}\right)\right)}. $$
(15)

The value of z decreases with increasing iteration number iter; iter is the current iteration and Max_iter is the maximum number of iterations. The variable a2 is a constant that controls the exploitation step. During the optimization process, the particles evolve by mutating some parts of each particle and keeping the best information parts; indeed, (14) retains the best parts of each particle Pi,j.

Algorithm 1 presents the pseudo-code of the EEO algorithm, Where, iter refers to the current iteration number and Max_iter refers to the total number of iterations.

figure a

Computation of complexity

The time complexity of the EEO relies mainly on the process of updating solutions’ positions. Therefore, it can be formulated as follows:

The time complexity is mainly depends on the number of particles (NP), the optimization problem dimension (D), the total number of iterations (T) and the function evaluations’s cost (C). In a particular way, the time complexity of EEO is computed as follow: O(EEO) = O ((problem definition) + (initialization) + O (cost function) + O(Solution update)), consequently,

$$ O(EEO) = O (1 + NP*D + T*NP*C + T*NP*D) $$
(16)

The terms of each component in (16) can be defined as below:

  • The problem definitions require O(1) time.

  • The particles initialization step require O(NP×D) time.

  • Evaluation of the population particles demands O(T × C× NP) time.

  • The population particles update phase require O(T × NP × D) time.

Hence, the overall EEO time complexity in polynomial order.

4 OPF problems - mathematical formulation

4.1 General structure of OPF

We modeled the OPF problem as follows [33]:

$$ Minimize: f(x,u) $$
(17)

subject to:

$$ g\left( x,u\right)=\mathrm{0} $$
(18)
$$ h\left( x,u\right)<=\mathrm{0} $$
(19)

Where, f is the objective functions, g and h are sets of equality constraints and inequality constraints of the power system network, which are voltage and angle of load buses respectively. And x, which represents various state variables, is defined as follows:

$$ x=[P_{G_{1}},V_{L_{1}}, \ldots, V_{L_{NL}},Q_{G_{1}}, \ldots, Q_{G_{NG}},S_{l_{1}}, \ldots, S_{l_{nl}}] $$
(20)

Where, \(P_{G_{1}}\) is the active power of the generator at the slack bus, \(V_{L_{i}}\) is the voltage magnitude of the ith load bus, \(Q_{G_{i}}\) is the reactive power output of the ith generator, and \(S_{l_{j}}\) is the line loading of the jth line. NL is the number of load buses. NG is the number of generators and ln is the number of transmission lines. Furthermore, u, the vector of control variables, which are included real and reactive power outputs from generators, bus voltages, series and/or shunt capacitors (reactors), tap-changer transformers setting defined as [33]:

$$ u=[P_{G_{2}}, \ldots, P_{G_{NG}},V_{G_{1}}, \ldots,V_{G_{NG}},Q_{c_{1}}, {\ldots} ,Q_{c_{Nc}},T_{1}, \ldots,T_{NT}] $$
(21)

Where, \(P_{G_{i}}\) is the ith bus generator real power excluding the swing generator, \(V_{G_{i}}\) is the voltage magnitude of the ith generator, \(Q_{c_{d}}\) is the shunt compensation of the dth bus, Tk is the kth branch transformer tap, NT is the number of regulating transformers, and NC is the number of shunt compensators. Any value within its range can be assumed as a control variable.

4.2 Objective functions for the OPF

The proposed EEO performance is evaluated over six case studies with various objective functions for a standard IEEE 30-bus system [33].

4.2.1 Case 1: fuel cost minimization

We can relate the total fuel cost ($/h) to the generated power (MW) as follows:

$$ f(x,u) = FC = \sum\limits_{i=1}^{NG} (a_{i} + b_{i} P_{Gi} + c_{i} P^{2}_{{Gi}}), $$
(22)

Where, ai, bi, and ci aare the cost coefficients of the thermal generators \(P_{{G}_{i}}\).

4.2.2 Case 2: fuel cost with value-point loading effect minimization

Minimization of the total fuel cost with value-point loading effect is achieved through the following relation:

$$ \begin{array}{@{}rcl@{}} f(x,u) = FC_{vp} &=& \sum\limits_{i=1}^{NG} (a_{i} + b_{i}P_{{G}_{i}}+c_{i}P^{2}_{Gi}\\&&+\mid d_{i} \times \sin (e_{i} \!\times\! (P^{min}_{Gi} - P_{{G}_{i}})) \mid ) \end{array} $$
(23)

Where, di and ei are the cost coefficients of the ith thermal generators. Table 1 lists the coefficient values presented in [34].

Table 1 Cost coefficients of the thermal power generators

4.2.3 Case 3: emission minimization

The third objective function is used to minimize the emission produced by the thermal generation units:

$$ f(x,u) = E={\sum}_{i=1}^{NG} (0.01 \times (\alpha_{i}+\beta_{i}P_{{G}_{i}}+\gamma_{i}P^{2}_{Gi})+ \omega_{i}e^{\mu_{i}P_{Gi}} ) $$
(24)

Where, αi, βi, γi, ωi, μ are the emission coefficients of the thermal generators. The values presented in [34] are listed in Table 2.

Table 2 Emission coefficients of the thermal power generators

4.2.4 Case 4: total real power losses minimization

The fourth objective minimizes the total real power loss and is expressed as follows:

$$ f(x,u) = P_{loss}=\sum\limits_{q=1}^{nl} (G_{q_{(ij)}}\times ({V^{2}_{i}}+{V^{2}_{j}}-2V_{i}V_{j}\cos(\delta_{ij} ))) $$
(25)

Where, \(G_{q_{(ij)}}\) is the conductance transfer of branch q(ij) and δij is the difference in voltage angles. Vi is the voltage at bus i and Vj is the voltage at bus j.

4.2.5 Case 5: voltage instability minimization

The power system stability refers to the ability of the system to maintain bus voltages within admissible limits. The voltage stability index (L-index) of each bus, which is an accepted metric for assessing this stability, is given as:

$$ L_{j}=\mid 1-\sum\limits_{i=1}^{NG} (F_{ji}\frac{V_{i}}{V_{j}})\mid $$
(26)

Where, Fji = −[YLL]− 1[YLG]. YLG and YLL are submatrices of the admittance matrix at a specific bus. Thus, we can express the voltage stability as follows [35]:

$$ f(x,u) = L_{max}= max[L_{j}], \text{Where,} j=1,2,3,\ldots,NL $$
(27)

Where, Lj is the L-index of the jth load bus.

4.2.6 Case 6: voltage deviation minimization

The last objective function is used to minimize the cumulative deviation of voltages obtained for the entire load bus:

$$ f(x,u) = VD= \sum\limits_{i=1}^{NG} \mid V_{L_{p}}-1 \mid $$
(28)

4.3 Constraints

Usually, the OPF constraints are split into two categories: i) equality constraint and ii) inequality constraints [5]. The equality constraints are as follows:

$$ P_{Gi} - P_{Di}= V_{i}\sum\limits_{j=1}^{NB} V_{j}(G_{ij} \cos \theta_{ij}+B_{ij} \sin \theta_{ij}) $$
(29)
$$ Q_{Gi} - Q_{Di}= V_{i}\sum\limits_{j=1}^{NB} V_{j}(G_{ij} \sin \theta_{ij}+B_{ij} \cos \theta_{ij}) $$
(30)

Where, 𝜃ij is the difference in voltage angles. PDi and QDi are the active load demand and the reactive load demand, respectively. Gij is the transfer conductance and Bij is the susceptance.

The inequality constraints, which are associated with five parts of the power system, are given as follows:

  • Generator constraints:

    $$ V_{G_{i}}^{\min} \leq V_{G_{i}} \leq V_{G_{i}}^{\max}, i=1,\ldots,NG $$
    (31)
    $$ P_{G_{i}}^{\min} \leq P_{G_{i}} \leq P_{G_{i}}^{\max}, i=1,\ldots,NG $$
    (32)
    $$ Q_{G_{i}}^{\min} \leq Q_{G_{i}} \leq Q_{G_{i}}^{\max}, i=1,\ldots,NG $$
    (33)
  • Transformer tap setting constraints

    $$ T_{j}^{\min} \leq T_{j} \leq T_{j}^{\max}, j=1, {\ldots} ,NT $$
    (34)
  • Shunt compensator constraints

    $$ Q_{C_{d}}^{\min} \leq Q_{C_{d}} \leq Q_{C_{d}}^{\max}, d=1,\ldots,NC $$
    (35)
  • Voltages at load bus constraints

    $$ V_{L_{h}}^{\min} \leq V_{L_{h}} \leq V_{L_{h}}^{\max}, h=1,\ldots,NL $$
    (36)
  • Transmission line loading constraints

    $$ S_{l_{k}}\leq S_{l_{k}}^{\max}, k=1,\ldots,nl. $$
    (37)

We use the following penalty function to ensure feasible solutions, where all the constraints are respected:

$$ \begin{array}{@{}rcl@{}} penalty&=&K_{p}(P_{G_{1}}-P_{G_{1}}^{Lim})^{2}+K_{q} \sum\limits_{i=1}^{NG} (Q_{G_{i}}-Q_{G_{i}}^{Lim})^{2}\\ && +K_{v} \sum\limits_{i=1}^{NL} (V_{L_{i}}-V_{L_{i}}^{Lim})^{2}+K_{s} \sum\limits_{i=1}^{nl} (S_{l_{i}}-S_{l_{i}}^{Lim})^{2} \end{array} $$
(38)

Where, Kp, Kq, Kv, and Ks are penalty factors. In this study, Kp = Kq = Kv = 100, and Ks = 100,000. Figure 1 shows the flowchart of the OPF optimization performed by the proposed EEO.

Fig. 1
figure 1

Flowchart of EEO for the OPF problem

5 Simulations results and discussion

Before applying the proposed algorithm to OPF problems, we assess the proposed EEO efficiency on the IEEE Congress on Evolutionary Computation 2020 (CEC’20) [36]. The simulation results of the proposed EEO are compared with those obtained from various classes of existing optimization methodsincluding; LSHADE_cnEpSin, CMA-ES, IMODE, AGSK, MFO, SCA, WOA, GWO, HHO, BWO, and EO.

5.1 Parameter settings

To conduct a fair comparison, the EEO algorithm and the other competitors are investigated through 30 runs. The function evaluations (FEs) number is set to 150,000 for all considered problems. Table 3 shows the parameters’ setting for each algorithm. The parameters of the proposed algorithm and competitive algorithms are tuned first. In order to get the suitable parameter values corresponding to the best performance when applying the test methods, the taguchi robust design parameter is used. The Taguchi [37] method utilizes the Orthogonal Array (OA) and the mean analysis to investigate the effects of the algorithm’s parameters based on the statistical analysis of experiments. The OA is a fractional factorial matrix of numbers arranged so that each row represents the level of the factors in each run and each column represents a specific factor that can be changed from each run.

Table 3 Parametrization of EEO and the other algorithms

5.2 Experimental series 1: applying EEO for solving CEC’20 test suit

5.2.1 Statistical results and analysis

The algorithm results on the CEC’20 functions are compared. In particular, the efficiency of each algorithm is measured with the average of the best solutions obtained at each run and the corresponding standard deviation (STD). Table 4 presents the average and STD values of each algorithm for functions of 10-dimension, i.e., Dim = 10. The best results are shown in boldface.

Table 4 Average and STD obtained by the algorithms on the CEC’20 test suite with Dim = 10

5.2.2 Convergence behavior analysis

The convergence of the algorithms is evaluated (see Fig. 2. As shown in the figure, the EEO algorithm converges to (near)-optimal solutions faster than most of the other algorithms, and is therefore a viable optimization technique for problems requiring fast computation, such as online optimization.

Fig. 2
figure 2

Convergence curves of the proposed EEO and the other algorithms obtained on CEC’20 test suite with Dim = 10

5.2.3 Wilcoxon rank test analysis

Wilcoxon’s rank-sum test is performed to show the significance of the achieved results. Wilcoxon test demonstrates that the algorithm behavior is not random. Although, MAs are stochastic ones the probable performance is expected to be precise. For more details relating to Wilcoxon’s test, interested reader can refer to [38]. Wilcoxon’s rank sum test based on the average values is used to investigate the difference between EEO and the other optimization techniques. Table 5 compares the results obtained by EEO and the other algorithms. The “Better” column represents the sum of ranks on 10 problems when the EEO is better than the other methods. However, the “Worse” column denotes the sum of ranks on 10 functions when the EEO is worse than the other methods. The “p-value” is the significance test that decides whether the similarity hypothesis should be rejected. The significance test level should be less than 5%.

Table 5 Wilcoxon test (p ≥ 0.05) for the CEC’20 test suite statistical results

Due to Friedman rank, EEO performs better than the MFO, SCA, WOA, GWO, HHO, BWO, and EO, in the same context, EEO compete with the CEC’20 competition winners including the IMODE and AGSK. In specific way, similar to the AGSK, IMODE and LSHADE_cnEpSin, the proposed EEO reached the optimum value for F1. For the mult-imodal F2 and F3 test methods, the proposed algorithm achieved a better performance rather than the AGSK algorithm. Over the hybrid functions F5 to F7, the EEO exhibits a robust performance near the optimal solution, i.e. the EEO and AGSK achieved the best solutions of functions F5 and F7 compared to the remain algorithms. For the composite functions F8 to F10 the EEO algorithm shows a comparative performance against the IMODE and AGSK winner algorithms. Aso, it is observed that the EEO get low performance on test functions F2 and F9, as a result the EEO get the third rank on the friedman test after AGSK and IMODE algorithms.

5.2.4 Qualitative metrics analysis

The qualitative analysis of the proposed EEO algorithm are illustrated in Fig. 3. Notably, the agent’s behaviors are displayed in Fig. 3, which include 2D views of the functions, search history, average fitness history, and convergence curves. The qualitative analysis depicts the exploration/exploitation balance of the optimization algorithm, through various metrics, especially the fluctuation of solutions diversity [39, 40], over the course of the optimization process.

Fig. 3
figure 3

The qualitative metrics on CEC’20 test suite: 2D views of the functions, search history, average fitness history, and optimization history

The following points are worthwhile from the qualitative analysis:

  • In terms of domain’s topology - functions in 2D views: The first column of Fig. 3 depicts the 2-dimensional space of the optimization test method. Further, the test functions have a various topologies, which in turn extends a focus into determining the type of function spaces, the optimization algorithm yields a better performance.

  • In terms of regarding the search history: The search history of the EEO particles, over the course of the iterations, is illustrated in the second column of the Fig. 3. Where the increasing of the fitness value through the search space is represented with counter lines, which in turn gradated from the blue lines to red lines with high fitness value. In this point, the Search history reveal that for some functions the EEO is able to get the areas Where the fitness values are the lowest.

  • In terms of average fitness history: The third column of Fig. 3 explains the average fitness history, such that the averages of fitness value as a function of the iteration number. This metric concentrates the light over the general behavior of the particles through the optimization process. Particularly, the result history curves are in a decreasing pattern, which is referring the improve of particles at each iteration. This stable improvement confirms a cooperative searching behavior between the EEO particles.

  • In terms of population diversity: The diversity plot curves are presented in the last column of Fig. 3, these curves depict the average distance between the population particles during the optimization process. The result diversity curves show that, at the iterations, the particles are most likely exploring the search space with a high diversity value. While the optimization progresses, the particles converge towards the best solution, in the exploitation phase, matched with a decreasing in the diversity value. The stable interchange in the particles diversity boost the exploration/exploitation balance strategy in the EEO algorithm.

In summary, from the results obtained, the following points can be observed:

  • The proposed EEO reached the optimal value for F1, F3, F4, F6 and F7 and near-optimal value for F5, F8, and F10. These results strongly suggest that the proposed EEO could perform well on other functions with similar characteristics.

  • The proposed EEO reached equivalent or better results than the other algorithms on most CEC’20 functions, as shown in Table 4.

  • The Wilcoxon’s rank-sum test confirms that the EEO algorithm is statistically significant.

  • The convergence curves in Fig. 2 confirm that the proposed algorithm has better exploration and exploitation abilities than the other algorithms. For most functions, some of the other algorithms either get stuck in a local optimum or fail to converge to a lower value, indicating respectively poorer exploration ability and poorer exploitation capability than those of the proposed algorithm. The improved exploitation and exploration abilities result from addition of the LF and reinforcement exploration/exploitation strategies to the original EO algorithm.

5.3 Experimental series 2: applying EEO for solving OPF problems

The OPF problem-solving ability of the proposed EEO is evaluated. For this evaluation, we compared the proposed EEO to the original EO using the standard IEEE 30-bus system; Fig. 4 shows the single-line diagram of the system [41]. Its characteristics are presented in Tables 1011 and 12 in the Appendix. This system has 24 control variables which consist of the active power of PV buses, voltages magnitudes of generator buses, transformer ratio, and shunt reactive power compensating. Furthermore, the transformer tap and shunt reactive power compensating among the control variables both are discrete variables.

Fig. 4
figure 4

Single-line diagram of IEEE 30-bus system [42]

We performed 20 independent runs for each objective function detailed in subsection 4.2; Table 6 lists the six case studies. We run the simulations with MATLAB R2016a on a computer that has a 2.4 GHz processor and 8 GB RAM. For both algorithms, the maximum number of iterations is 300 and the population size is 30.

Table 6 Different objectives that will be minimized for solution of the OPF problem

Table 7 presents the settings of all control and state (dependent) variables along with their allowable ranges for the best fitness value obtained for the objective function in a case study pertaining to a 30-bus test system using the proposed EEO and original EO algorithms. Active power of swing generator (PG1) and reactive power of all generators are states or dependent variables treated as constraints in the optimization. Values of these variables are listed here to show that the proposed EEO techniques duly comply with the limits of these constraining variables for the six cases. The statistical results of 20 runs for each study case performed (i.e. case 1 to case 6) using the EEO and EO algorithms are presented in Table 8. The columns indicate the best, mean, worst, and standard deviation (STD) values for the objective function in each case. The best solutions are shown in boldface.

Table 7 Optimized solutions obtained by the proposed EEO and the original EO
Table 8 Statistical analysis of the proposed EEO and the original EO

For all objective functions, the proposed algorithm reached better solutions in regards to the average, best, worst, and STD values. Figure 5 presents the voltage profiles of the load buses obtained by EO and EEO for the six cases.

Fig. 5
figure 5

Voltage profiles of the load buses

We can see that EEO yields voltages within the lower and upper bounds. The safety margin (the largest absolute value of the voltage difference between the bounds and the value obtained by the algorithm) values achieved with EEO are higher than those achieved with EO. Thus, the optimized system by EEO will tolerate higher voltage perturbations than the system optimized by the original EO. Figures 6 to 8 compare the convergence curves of both algorithms; except for case 3, in the beginning, the original EO has lower objective function values than EEO, but after fewer than 50 iterations, the proposed EEO reaches lower values. Narrow data distributions are obtained for all cases (highest STD value obtained by EEO: 0.305491785). Figure 9 shows the 20 independent run distributions obtained by the proposed EEO for Case 1.

Fig. 6
figure 6

Convergence curves

Fuel cost minimization is also performed. The EEO obtained a fuel cost of 800.415 $/h, which is lower than the value obtained by the original EO (800.433 $/h) and other techniques, as shown in Table 9. Figure 6a compares the convergence characteristics of EEO and EO; the EEO performs better than the EO. Table 7 presents the statistical analysis of the optimized solutions. In addition, Figs 6b and 7a show the load bus voltages of the IEEE 30-bus system for the cases considered.

Table 9 Comparison of EEO and other studied optimization algorithms
Fig. 7
figure 7

Convergence curves

5.3.1 Case 2: minimizing the fuel cost with value-point loading effect

This case aims to minimize the fuel cost associated with the value-point loading effect. Figure 6b shows the convergence of the studied algorithms; the EEO outperforms the original EO in terms of achieving the best solution. Table 7 shows that total fuel costs of 832.1817 $/h and 832.1969 $/h are achieved for EEO and EO, respectively, indicating the superiority of the proposed EEO to the original EO. Table 9 compares the best values of the costs obtained by the EEO with other counterparts.

5.3.2 Case 3: minimizing emission

This case is aimed at minimizing the total emission, thereby reducing pollution. The results obtained for this case are provided in Table 7, which reveals that EEO and EO achieve optimal total emissions of 0.2048212 t/h and 0.20482522 t/h, respectively. Figure 7a shows the convergence curves obtained by both algorithms. Furthermore, Table 9 compares the best result obtained by the proposed algorithm with the results available in the literature; the EEO provides one of the best results.

5.3.3 Case 4: minimizing total active power loss

In this case, the OPF solutions are optimized by considering the optimal total active power loss values. The convergence characteristics of the considered algorithms for this case are shown in Fig. 7b. From Table 9, the optimal power losses obtained by the EEO and EO are 3.088974 MW and 3.096271 MW, respectively. Compared with recent techniques (see Table 9), the EEO provides an approved solution and guarantees that all limits are always respected, unlike some of the published algorithms.

5.3.4 Case 5: voltage stability enhancement

The main objective of this case is to obtain the best values of voltage stability enhancement. The optimal settings of design variables for the finest stability enhancement by EEO and basic EO are listed in Table 7. As shown in the table, the L-index (the voltage stability indicator) obtained by EEO, 0.124236, is lower and therefore better than the value (0.124268) obtained by the original EO. A comparison of the EEO and EO convergence characteristics (Fig. 8a) reveals that the EEO outperforms the original EO in terms of convergence rate and optimized solution.

Fig. 8
figure 8

Convergence curves

Fig. 9
figure 9

Data distribution obtained by EEO - Case 1

5.3.5 Case 6: minimizing the voltage deviation

The obtained results from the proposed algorithm and original algorithms for case 6 are listed in Table 7. Table 9 presents the results obtained by the proposed technique and other optimization techniques used for solving the same case. We see from the tables that, compared with the other algorithms, the proposed algorithm achieved a better solution. The convergence curves obtained from the proposed EEO and the original EO of case 6 are presented in Fig. 8b; the proposed method yields rapid convergence to the best solution.

5.3.6 Comparing EEO with published studies

We compared the EEO results to more than 20 published results as shown in Table 9. Compared with other methods, the EEO achieved lower function values in most cases, substantiating the EEO efficiency. Thus, at a large scale, substantial cost savings and emission reductions can potentially be achieved by EEO while improving the system stability.

6 Conclusion and future work

This paper proposed an enhanced version of the Equilibrium Optimizer (EO) called EEO, which relies mainly on reinforcing the algorithm exploration and exploitation process. The proposed EEO is applied for obtaining improved solutions to global optimization problems, and Optimal Power Flow (OPF) problems. During the process, we assess the performance of the proposed EEO with regard to ten functions of the CEC’20 test suite. The EEO achieved better or similar results than LSHADE_cnEpSin, CMA-ES, IMODE, AGSK, MFO, SCA, WOA, GWO, HHO, BWO, and EO. Wilcoxon’s rank-sum test confirms that the proposed EEO results are statistically significant. Moreover, we demonstrated the efficiency of the proposed EEO on OPF for the standard IEEE 30-bus system. We minimized different objectives, i.e., the fuel cost, fuel cost with value-point loading effect, total emission, active power loss, voltage deviation, and voltage instability. For most objectives, the EEO yielded better results than the original EO and the methods reported in 20 published studies. Substantial cost savings and emission reductions can potentially be achieved with EEO at a large scale while improving system stability. Thus, the proposed algorithm is a valuable optimization tool for engineers of power systems and a promising tool for solving more complex optimization problems than those associated with such systems.

Indeed, as future work, the proposed EEO will be applied to more challenging problems (than the problem considered here), including multi-objective problems and problems such as prediction, image segmentation, Cloud Data Center [59, 60], and prediction of cloud workloads [61,62,63].