1 Introduction

In the current global scenario of climate emergency, there is a truly need for sustainable and clean energy production. According to Makhdoomi and Askarzadeh (2020), some recent situations such as the increasing demand load electrical energy, the fluctuation of diesel fuel costs, and new strict regulations on environmental issues have led to the implementation of clean energy sources to supply electricity. Part of this energy is intended to be produced in the near future within smart grid systems, connected to a public main grid to be fully operational. Market-driven policies are increasingly focused on promoting the deployment of micro renewable systems, to meet energy efficiency in micro grids and smart grid systems. This is, however, a challenging task, specially for micro-grids which try to exploit renewable resources locally available, such as micro-wind, micro-PV, or with use of small hydro generators. In this context, some optimization problems arise, often exhibiting hard characteristics such as high dimensionality, mixed types of design variables, non-linearity, non-convexity and conflicting objectives. Moreover, these optimization problems can be broadly structured into three different types: (1) Optimal Power Flow (OPF) problems, (2) Planning-type tasks, and (3) Scheduling-type problems (Reddy et al. 2017). In this work, we present a novel optimization metaheuristic process to tackle OPF problems in a smart grid approach, the Coral Reefs Optimization with Substrate Layers (CRO-SL) coupled with an in-depth pre-search mechanism based on Cross-Entropy method (CE+CRO-SL).

The OPF seeks to optimize the overall operation cost of generating and transmitting electric power in a micro-grid or smart-grid, subject to a number of system constraints and control limits (Marcelino et al. 2018, 2022a, 2023). Several OPF solution methods have been proposed in the literature, each with different mathematical characteristics and computational requirements. A cyber-constrained Optimal Power Flow model for smart grid resilience enhancement was proposed by Huang et al. (2019). The problem was solved via mixed integer programming (MILP) solver under the IEEE RTS-79 and IEEE RTS-96 systems, and the modeling adopted provided a fundamental method to analyze the operation of cyber-physical systems. Home-Ortiz et al. (2021) proposed the use of Variable Neighborhood Descent (VND) to solve the OPF. The approach was compared to MILP indicating better results. Reddy et al. (2017) showed a review of stochastic optimization methods applied to OPF problems in the field of smart grids. Since the use of metaheuristics based on observation of nature has been used to solve engineering problems, the related works below present the newest methods applied to OPF solution. Papadimitrakis et al. (2021) presented a recent review on the main metaheuristics applied to smart grid solutions in the OPF context. A security solution for cyber-attacks against optimal power flow in smart grids network is described in (Yang et al. 2017). To combat the investigated data integrity attack, the authors developed two types of defensive stochastic schemes applied to the IEEE 30-Bus System. The experimental results showed that the investigated attack can increase the minimum fuel cost. Awada et al. (2019) proposed a variation of Differential Evolution (DE) algorithm to solve the OPF based active–reactive dispatch problem considering renewable generators and comparing the results using the IEEE PES 2017 competition black-box system (see, Rivera et al. (2018)). Biswas et al. (2018) proposed a methodology based on Differential Evolution techniques to solve three different objective functions applied on the standard IEEE 30-Bus, IEEE 57-Bus Systems, and IEEE 118-Bus Systems. The authors concluded that the approach minimized the cost of energy production.

Different algorithms based on swarm intelligence have also been applied to solve OPF problems. Phommixay et al. (2020) presented a literature review, showing a diversification of smart grid problems solved via the Particle Swarm Optimization (PSO) algorithm. A multi-objective hybrid particle swarm and salp optimization (PSO-SSO) was proposed by Sehiemy et al. (2020) to provide a technical–economic–environmental operation in power systems. The PSO-SSO was applied to solve the electric power generation of the IEEE 30-Bus, IEEE 57-Bus, and IEEE 118-Bus systems. The objective of minimizing the costs and emissions simultaneously was achieved. This solution demanded a high computational cost due to the nature of the algorithm. An improvement in SSO was addressed in (El-sattar et al. 2021). The results showed better results when compared to standard PSO and SSA in IEEE 30-Bus, IEEE-57-Bus, and IEEE 118-Bus test systems.

A hybrid algorithm based on DE and PSO algorithms was proposed by Marcelino et al. (2020) to solve the electric dispatch in a smart grid system. This work addressed the importance of including battery storage devices in the system. Naderi et al. (2021) proposed a hybrid self-adaptive heuristic algorithm to handle single and multi-objective OPF problems. The approach used a fuzzy adaptive configuration oriented to a joint self-adaptive particle swarm optimization (SPSO) and differential evolution algorithms (FAHSPSO-DE). When compared to a standard DE and Genetic Algorithms (GA), FAHSPSO-DE showed better results in terms of minimizing costs and losses of IEEE 30-Bus and IEEE 118-Bus systems. Karthik et al. (2021) proposed a multi-objective OPF solution using a modified Interior Search Algorithm in which Levy Flight feature (LISA) in a renewable energy sources environment. This approach showed better results in relation to the standard PSO. Gilvaei et al. (2020) proposed the FA-APTFPSO, a hybrid optimization approach for solving the reactive power dispatch problem considering voltage stability index. FA-APTFPSO obtained robust results compared to other metaheuristics such as Particle Swarm Optimization (PSO), Biogeography-Based Optimization (BBO), and the cultural algorithm (CA).

Some innovative methods have taken place for solving electrical problems. For example, we can mention an approach using the elephant herd optimization-firefly (EHO-FF) proposed by Muthukumaran and Kalyani (2021) to construct a smart controller for reactive power optimization applied on smart grid production. The improved chaotic electromagnetic field optimization (ICEFO) algorithm was proposed by Bouchekara (2020) to solve the minimization costs of OPF problems, using the IEEE 30-BUS, 57-Bus and 118-Bus systems. The results demonstrated that the developed algorithm was able to minimize the generation losses in these three systems. Nusair and Alasali (2020) applied the golden ratio optimization method (GROM) to solve the OPF management system for a power network with renewable energy sources (RES). The network operators were forced to optimally control the conventional power generations in some RES inserted on IEEE 30-Bus system. Results showed that the approach respected the restrictions imposed on the problem. Kaur and Narang (2020) proposed the integration of the invasive weed optimization (IWO) and Powell’s pattern search (PPS) to solve the OPF in the IEEE 30-Bus and IEEE 57-Bus systems. The results showed that the difference between the IWO method and the IWO-PPS coupling was low. Alhejji et al. (2020) proposed an Adaptive Grasshopper Optimization Algorithm (AGOA) for solving the OPF problem with the optimal incorporation of a center-node unified power flow controller. Results showed that AGOA obtained better results in comparison to the previous GOA.

A hybrid method based on Cuckoo Search and Sunflower Optimization (HCSA-SFO) was proposed to solve the OPF in Duong et al. (2020). The approach was applied to solve the IEEE 30- Bus and IEEE 118-Bus system with the objective functions of minimizing generator costs, power loss, and voltage deviation. Results showed that HCSA-SFO obtained better results than standard DE and BBO algorithms. An adaptive constraint differential evolution (ACDE) algorithm was proposed by Li et al. (2021) to solve the IEEE 30-Bus system. An Optimal power flow solution with stochastic wind power using the Lévy Coyote Optimization Algorithm (LCOA) was proposed by Kaymaz et al. (2021). Farhat et al. (2021) proposed an optimal power flow solution based on Jellyfish Search Optimization (JS) considering uncertainty of renewable energy sources. JS achieved better results than Artificial bee colony (ABC) and success history-based adaptive differential evolution (SHADE). The IEEE 30-Bus, IEEE 57-Bus, and IEEE 118-Bus test systems were adapted to consider the addition of the PV panel and/or wind generators in respective systems in work of Shaheen et al. (2021). The results indicated that the proposed HEAP Optimization Algorithm (HOA) was flexible and applicable compared with that achieved by using the GA. A dynamic electric dispatch for wind power plants was proposed by Marcelino et al. (2021a). In this work, the OPF problem was solved as a dynamic problem and the adopted algorithm was tuned in a real-time approach, generating the best results. An analysis study to energy consumption in smart grid using a hybrid algorithm based on Harmony Search algorithm (HSA) and PSO was studied on Hemalata et al. (2020). Based on the Mont Carlo method, Li et al. (2022) proposed a solution to IEEE 30-Bus System in a smart grid approach. Many metaheuristics have been applied to solve OPF problems in a microgrid scenario in (Yang et al. 2021). Thus, it was concluded that metaheuristics are a useful tool to guarantee electrical dispatch considering uncertainty of the smart grids. In addition, approaches using hybridization with techniques based on swarm intelligence and vector combination of solutions have been successful when performing electrical dispatch in smart grid networks with the presence of electric vehicles (Marcelino et al. 2022b).

As smart grids integrate multiple renewable energy sources, the resulting OPF problem becomes more challenging. Despite the large amount of previous work in OPF problems, very few studies tackle the OPF problem from a smart grid perspective with more than one renewable source. For instance, (Shaheen et al. 2022a) proposed a hybridization between a machine learning technique based on artificial neural networks and Transient Search Optimization (TSO) algorithm. This algorithm dubbed ML-TSO employs a modified version of Self-Organizing Map (SOM) as an initial deep search operator for the TSO to perform a global search in the decision space. The proposed approach was applied to solve the IEEE 57-Bus and IEEE 118-Bus standard test systems, which were modified to include PV panels and/or wind generators. Results indicated that ML-TSO showed better results when compared to standard versions of PSO and GA in terms of minimizing fuel costs. A Circle Search Algorithm (CSA) was proposed by (Shaheen et al. 2022b) to solve an OPF problem with the presence of PV panels and/or wind turbines. The proposed solution updates the population of solutions toward the optimal solution by drawing random circles centered at the optimal solution found so far. By varying the radius of the circles, the algorithm is able to balance between exploration and exploitation. The algorithm was applied to solve adapted versions of IEEE 57-Bus and IEEE 118-Bus standard test systems. The experimental results showed that CSA outperformed both standard PSO and GA in minimizing operational costs in both test systems.

Motivated by the lack of more studies addressing the OPF problem with multiple renewable source in a smart grid approach and by the successful real-world applications, standard versions of Coral Reefs Optimization with Sub-Layers (CRO-SL) (Salcedo-Sanz et al. 2016a), Evolutionary Particle Swarm Optimization (EPSO) (Miranda and Fonseca 2002), and Covariance Matrix Adaptation Evolution Strategy (CMA-ES) (Auger and Hansen 2005), we have employed these metaheuristics in this work to assess the performance of IEEE 57 Bus-System in the electrical dispatch problem. As a novelty, we propose the use of the Cross-Entropy method (Rubinstein and Kroese 2004) as an initial deep search operator for the aforementioned metaheuristics. Taking advantage of a mix of the Simulated Annealing and Evolutionary algorithms Del Ser et al. (2019), the CRO-SL (see (Camacho-Gómez et al. 2019; Garcia-Hernandez et al. 2020)) is compared with two algorithms, EPSO and CMA-ES. The experimental results show that the coupled CE+CRO-SL is extremely competitive in solving electric dispatch in a smart grid approach. We particularly chose the EPSO and CMA-ES algorithms, as they have been successfully applied in the 2018 IEEE PES competition for solving the test problems (Rueda et al. 2018). Therefore, CE+CRO-SL acts as an electrical dispatch controller system capable of offering optimized solutions for the hourly planning horizon. Furthermore, CE+CRO-SL guarantees the minimum costs in power production differing from the techniques to which it has been compared. In addition, CE+CRO-SL is able to overcome initialization problems with a few hyperparameters for CE initial deep search. More specifically, this paper presents the following contributions:

  • A study on the effectiveness of the Cross-Entropy method as a starting method for a deep search in the solution space;

  • A new CE+CRO-SL algorithm version boosted with Cross-Entropy mechanism is proposed;

  • An in-depth performance assessment of CE+CRO-SL comparing to four different and well-known algorithms, CE, CMA-ES, and EPSO (all them with and with out CE mechanism) in the optimal power flow problem, and;

  • A projection analysis has been carried out indicating a profit of million’s dollar per month when solving the problem using the proposed approach.

The rest of the paper is organized as follows: Sect. 2 describes the IEEE 57 Bus-System detailing the electrical dispatch mathematical modeling. Section 3 addresses the optimization techniques used so solve the OPF problem introducing the fundamentals of the CE+CRO-SL method. Section 4 comprises the experimental design performed by mono-objective algorithms solving the power dispatch problem on the security-constrained optimal power flow, and the comparative analysis of CE+CRO-SL with other methods taking into account the optimized solutions found and the savings ratio achieved by the method proposed here. Finally, Sect. 5 illustrates the conclusions regarding the overall CE+CRO-SL robustness.

2 Power dispatch problem in smart grids scenarios

Currently, with the challenges of energy decentralization and the automation of systems, proposing new solutions for operating smart grid systems has become an emerging economic development and research area. Moreover, note that sustainable operation of electrical power systems is affected by the high stochastic nature of renewable generation terms. Thus, new solutions to promote the inclusion of renewable generation in smart grids are necessary. In this framework, electric dispatch problems involved in scheduling power generation need keeping in mind the probabilistic models, nonlinear systems, and a large number of mixed-integer decision variables. This work addresses the optimal active-reactive power dispatch (OARPD) problem with security-constrained optimal power flow (SCOPF) approach. As a case study, the well-known IEEE 57 Bus-System is investigated, including an adaptation for taking into account renewable sources integrated in the network system, simulating a smart grid paradigm. Table 1 shows a summary of the system information.

Table 1 IEEE 57 Bus-System features

2.1 Power dispatch problem: mathematical modeling

In order to describe the objective function, this work addresses the optimal active-reactive power dispatch problem, with the goal of minimizing the total costs of production (see (Rueda et al. 2018; Carvalho et al. 2018; Awada et al. 2019)). The function corresponds to a quadratic equation of the bus voltage magnitudes and of the cosine of the difference between bus voltage angles. Equation (1) represents the power production costs in ($/h). Note that the control variables in this problem are related to active and reactive power generation,

$$\begin{aligned} \min ~ \varphi = \sum _{i=1}^{NG}a_{i}+b_{i} \cdot Pg_{i} +c_{i} \cdot Pg_{i}^{2}, ~~~~ (~\$/h), \end{aligned}$$
(1)

in which C is the total fuel cost of the system. The term \(P_{gi}\) is the power output of the i-th unit. NG indicates the number of generators. The terms a ($/h), b ($/MWh) and c ($/MWh\(^2\)) are the cost coefficients associated with each generation unit. The problem must also satisfy the following constraints:

$$\begin{aligned}{} & {} P_{i} = Pg_{i} - Pl_{i} = \sum _{j=1}^{NB}U_{i}U_{j}\nonumber \\{} & {} \qquad \qquad \begin{bmatrix} G_{ij} \cos (\delta _{i} - \delta _{j}) + B_{ij} \sin (\delta _{i} - \delta _{j})\end{bmatrix}, \end{aligned}$$
(2)
$$\begin{aligned}{} & {} \forall _{i} \in NB, \forall _{s} \in NS; \end{aligned}$$
(3)
$$\begin{aligned}{} & {} Q_{i} = Qg_{i} - Ql_{i} = \sum _{j=1}^{NB}U_{i}U_{j}\nonumber \\{} & {} \qquad \qquad \begin{bmatrix}G_{ij} \sin (\delta _{i} - \delta _{j}) + B_{ij} \cos (\delta _{i} - \delta _{j})\end{bmatrix}, \end{aligned}$$
(4)
$$\begin{aligned}{} & {} \forall _{i} \in NB, \forall _{s} \in NS; \end{aligned}$$
(5)
$$\begin{aligned}{} & {} \underline{U}_{i}\leqslant U_{i} \leqslant \overline{U}_{i}, \forall _{i} \in NB, \forall _{s} \in NS; \end{aligned}$$
(6)
$$\begin{aligned}{} & {} \begin{vmatrix}S_{ij}\end{vmatrix}\leqslant \overline{S_{ij}},\forall _{i} \in NC, \forall _{s} \in NS; \end{aligned}$$
(7)
$$\begin{aligned}{} & {} \begin{vmatrix}S_{ji}\end{vmatrix}\leqslant \overline{S_{ij}}, \forall _{i} \in NC, \forall _{s} \in NS; \end{aligned}$$
(8)
$$\begin{aligned}{} & {} \underline{Pg_{i}}\leqslant Pg_{i}\leqslant \overline{P_{i}}, \forall _{i} \in NG, \forall _{s} \in NS; \end{aligned}$$
(9)
$$\begin{aligned}{} & {} \underline{Qg_{i}}\leqslant Qg_{i}\leqslant \overline{Q_{i}}, \forall _{i} \in NG, \forall _{s} \in NS; \end{aligned}$$
(10)
$$\begin{aligned}{} & {} \underline{t_{i}}\leqslant t_{i}\leqslant \overline{t_{i}}, \forall _{i} \in NOLTC, t_{i} \in \forall _{s} \in NS;\end{aligned}$$
(11)
$$\begin{aligned}{} & {} 0\leqslant q_{i}\leqslant 1, \forall _{i} \in NSHUNT, q_{i} \in Z, \forall _{s} \in NS. ~ \end{aligned}$$
(12)

Equations (2) and (4) are related to the active and reactive power balance constraints, in which \(P_{i}\) refers to the active power injected and \(Q_{i}\) to the reactive power. Pl (MW) is the active power load. The constraint (6) represented by term \(U_{i}\) (kV) means the voltage magnitude and \(\theta _{i}\) to the voltage angle. Constraints (7) and (8) mean the \(S_{ij}\) (MVA) term that is the apparent power flow injection at the sending end of the transmission circuit connecting bus (i) to bus (j), and the \(S_{ji}\) (MVA) is the apparent power flow injection at the receiving end of the same circuit. In constraints (9) and (10), \(Pg_{i}\) (MW) is the active power generation and the reactive power generation is represented by \(Qg_{i}\) (MVar), respectively.

The transformer tap constraint (11) indicates that the variable (t) is the tap setting position of the OLTC (On-Load Tap Changer). Constraint (12) explains the capacitor/reactor balance where q is a binary variable that represents the state of the capacitor/reactor banks. This notation has some variables that mean: \(Y = G + jB\) is the bus admittance matrix, NG is the number of generators, NB is the number of buses, NC is the number of circuits in the network, NOLTC is the number of OLTC transformers, NSHUNT is the number of capacitor/reactor banks, and NS is the number of scenarios that represent the expected operation scenario and contingency states.

The constraints that have been modeled as a penalty to the objective function, presented in Equation (1), represent the active power energy (in the REF bus), the voltage magnitude (PQ busses), the apparent power flow through branches, and the reactive power generation (situated in the REF and PV busses). Therefore, the fitness function (\(\lambda \)) is described in Equation (13) as:

$$\begin{aligned} \lambda = \varphi + \rho \sum _{i=1}^{k} \max [0, vk_i]^2, \end{aligned}$$
(13)

in which \(\varphi \) is the objective function of the problem. The term (\(\rho \)) is a penalty factor that is set to a value of \(1E+7\). The total number of constraints is represented by (k), and (\(vk_i\)) means the violated constraints.

2.2 Power dispatch problem: smart grid definition

In general, the goal in the OARPD is to minimize the total fuel cost respecting the constraints imposed (generator reactive power capability, maximum active power output of slack generator, nodal balance of power, nodal voltages, and allowable branch power flows) for non-contingencies related and selected N-1 conditions of SCOPF. Keeping that in mind, this work addresses the minimization of total costs to traditional generators (based on diesel) plus the expect uncertainty costs of renewable generators (wind turbines, photo-voltaic (PV) panels, and small-hydro generators, including operational cost due to variability of primary energy resources). Following this, each renewable generation source is considered to be a dispatchable generator. These conditions and the mathematical modeling can be viewed in (Reddy et al. 2017). Figure 1 shows the diagram of the IEEE 57 Bus system.

Fig. 1
figure 1

Diagram system by IEEE 57 Bus

As we can see in Fig. 1, the IEEE 57 Bus system has 7 generators (buses 1, 2, 3, 6, 8, 9, and 12). In a smart grid context, three of these generators have been defined as renewable energy generator (PV panels, wind turbine, and small hydro generator) and are located at buses 2, 6, and 9. The systems have 42 loads, in which four of them are controllable ones.

In this context, this study aims to minimize the total costs of traditional generators in the IEEE 57 Bus-System (buses: 1, 3, 8, and 12), added to the expected uncertainty cost for renewable energy generators (buses: 2, 6, and 9) and the compensation cost for controllable loads (buses: 8, 12, 18, and 47). The optimization problem has 35 variables, comprising 13 continuous (generators power outputs), 15 discrete variables (adjustable on-load transformers’ tap positions), 3 binary variables (shunt compensation devices), and 4 controllable loads. In this problem, 179 fixed contingencies (N-1 conditions) and outages at branches 8 and 50 are considered (see Rueda et al. (2018)).

We address three case studies, with different combinations of renewable energy sources as follows:

  1. 1.

    System with wind generators and controllable loads;

  2. 2.

    System with wind/solar generators and controllable loads;

  3. 3.

    System with wind/solar/small hydro generators and controllable loads;

To include the renewable sources in the electrical dispatch modeling, each renewable generator is considered to be a dispatchable generator with the expected uncertainty cost of renewable energy generator. However, that is dependent of the available real power, considering an underestimated or overestimated condition according to Readdy et al. (2015). In the underestimated renewable energy generation, the scheduled power (\(Ps_i\)) from renewable energy generator (i) is less than the available real power (\(Pa_i\)), occurring an underestimated cost (\(C_u=c_u(Pa_i-Ps_i)\)) to the renewable generator. On the other hand, in the overestimated renewable energy generation situation, \(Ps_i\) is greater than the \(Pa_i\) from such a system. The overestimated cost (\(C_o= c_o(Ps_i - Pa_i)\)) in this work is treated as a penalty term in the objective function (see, Readdy et al. (2015)). We use Monte Carlo Simulation to obtain the probability distribution of the available power from the known primary data of energy source probability. From the underestimated and overestimated situations, the related cost can be obtained as a probabilistic function given the uncertainty in renewable energy sources using this approach. The Monte Carlo simulation follows the steps:

  1. 1.

    Generate a random primary energy source value for each renewable generator (from the probability distribution of River flow, wind or solar radiation) in the corresponding scenario (j);

  2. 2.

    Compute the available real power for scenario (j) when renewable energy generator (i) is used (\(Pa_{ij}\)) by using the relationship between the primary energy source and \(Pa_{ij}\);

  3. 3.

    Verify of \(Psi < Pai_j\) (underestimated) or \(Ps_i > Pai_j\) (overestimated) conditions in scenario (j). \(Ps_i\) corresponds to the decision variable describing renewable energy generator (i);

  4. 4.

    Compute the uncertainty cost for scenario (j), according to:

    \(Ci_j=cu(Pa_{ij}-Ps_i) ~ if ~ Ps_i < Pa_{ij}\) or

    \(Ci_j=co(Ps_i-Pa_{ij}) ~ if ~ Ps_i > Pa_{ij}\)

  5. 5.

    Repeat the steps (1) to (4) for \(N = 2000\) times;

  6. 6.

    Construct the histogram of the uncertainty cost for N;

  7. 7.

    Compute the expected uncertainty cost for renewable energy generator (i) considering Monte Carlo simulation.

3 Proposed metaheuristic approach (CE+CRO-SL)

In this section, the main features of the proposed approach, Cross-Entropy Boosted Coral Reefs Optimization with Substrate Layers algorithm (CE+CRO-SL), are briefly described. In the proposed approach, the Cross-Entropy method is employed as a first depth search operator to assist the Coral Reef Optimization with Substrate Layers algorithm, which will obtain the final solution to the problem.

3.1 Cross-Entropy method

The technique based on the Monte Carlo method called Cross-Entropy (CE) is a general method to efficiently obtain solutions to optimization problems (Rubinstein and Kroese 2004). In CE, a deterministic optimization problem is translated into an associated stochastic optimization problem that can be applied to both combinatorial and continuous problems, with either a static or noisy objective functions (Kroese et al. 2006). In this work, we propose to use the CE method as a deep global search operator in order to find a promising basin of attraction for the problem in hand. After that, a bio-inspired stochastic algorithm will be used to refine the solutions from the CE. For solving the objective function, in our case the power production costs described by Equation (13), CE needs to find the minimum value (\(\lambda ^*\)) according to Equation (14)

$$\begin{aligned} \lambda ^* = S (\textbf{x}^*) = \min _{\textbf{x} ~\in ~\chi } S(\textbf{x}), \end{aligned}$$
(14)

in which S is the minimization of the performance function over all elements/states \(\mathbf {{x}^*}\) in some set \(\chi \). In CE, it is necessary to identify an associated stochastic problem (ASP). For that, a family of probability distribution functions (pdfs, \(\{f(\cdot ;) \textbf{v}, \textbf{v} \in \mathcal {V} \}\)) on the set \(\chi \) is defined, associating Equation (14) with an estimation following

$$\begin{aligned} \ell (\lambda ) = \mathbb {P}_u(S(\textbf{X}) \ge \lambda ) = \mathbb {E}_u I_{\{ S(\textbf{X}) \ge \lambda \}, } \end{aligned}$$
(15)

in which \(\textbf{X}\) is a random vector with pdf \(f(\cdot ;u, u \in \mathcal {V})\). The expectation operator is represented by the term (\(\mathbb {E}_u\)), and an indicator function of event is indicated by (\(I_{\{\cdot \}}\)) (Kroese et al. 2006; Carvalho et al. 2018). In this case, from a mean vector (\(\mu \)) and a variance vector (\(\sigma ^2\)), the Gaussian distribution \(\mathbf {v = [\mu , \sigma ^2]}\) can provide a density function \(f(\cdot ; \textbf{v})\). According to Kroese et al. (2006), the ASP (\(\ell \)) is a sporadic event and for that \(\mathbb {P}_u(S(\textbf{X}) \ge \lambda )\) and can be obtained from a multi-level Cross-Entropy algorithm. To solve the problem, a multi-level CE will conduct a sequence of pdf, as: \(f(\cdot ;u)\), \(f(\cdot ; \mathbf {v_1})\), \(f(\cdot ; \mathbf {v_2})\),\(\cdots \),\(f(\cdot ; \mathbf {v_k})\) in direction of theoretical optimal density \(f(\cdot ; \mathbf {v^*})\) concentrated in the neighborhood of \(\mathbf {{x}^*}\) (Kroese et al. 2006). Equation (16) obtains the optimal reference parameter \(\mathbf {v^*}\) according to

$$\begin{aligned} \mathbf {v^*} = \underset{\textbf{v} \in \mathcal {V}}{\textrm{argmax}} ~\mathbb {E}_u [I_{\{S(\textbf{x}) \geqslant \lambda \}} \ln f(\textbf{X;v})]. \end{aligned}$$
(16)

According to De Boer et al. (2005), \(\mathbf {v^*}\) can be estimated from

$$\begin{aligned} \underset{\textbf{v} \in \mathcal {V}}{\textrm{argmax}} \frac{1}{N} \sum _{k=1}^{N} ~\mathbb {E}_u [I_{\{S(\mathbf {x_k}) \geqslant \lambda \}} \ln f(\mathbf {X_k;v})], \end{aligned}$$
(17)

in which \(\mathbf {X_1}\),..., \(\mathbf {X_N}\) is approximately \(f(\cdot ;\textbf{u})\). In this step, a multilevel approach to generate sequences of \(\{\mathbf {v_t}, t \geqslant 0 \}\) parameters and iterated \(\{\lambda _t, t \leqslant 1 \}\) levels and \(\mathbf {v_t}\) is needed, so that the value \(\mathbf {v_t}\) is close to \(\mathbf {v^*}\). Thus, \(\mathbf {v_t}\) can be used in the importance sampling density \(f(\cdot ;\mathbf {v_t})\) to estimate \(\ell \), starting with \(\mathbf {v_0}= \mathbf {v_u}\) in which the initializing short quantity term \(\varrho = 10^{-2}\) (Kroese et al. 2006). These steps must be repeated in the subsequent iterations in two update phases: (1) adaptive update of \(\lambda _t\) and (2) adaptive update of \(\mathbf {v_t}\).

  1. (1)

    Let \(\lambda _t\) be a \((1-\varrho )\)-quantile of \(S(\textbf{X})\) under \(\mathbf {v_{t-1}}\) for a fixed \(\mathbf {v_{t-1}}\) to satisfy

    $$\begin{aligned}{} & {} \mathbb {P}_{\mathbf {v_{t-1}}} (S(\textbf{X}) \geqslant \lambda _t \geqslant \varrho ), \end{aligned}$$
    (18)
    $$\begin{aligned}{} & {} \mathbb {P}_{\mathbf {v_{t-1}}} (S(\textbf{X}) \geqslant \lambda _t \geqslant 1- \varrho ), \end{aligned}$$
    (19)

    in which \(\textbf{X} \sim f(\cdot ;\mathbf {v_t})\). Here, it is necessary to generate a random sample \(\mathbf {X_1},\ldots ,\mathbf {X_N}\) from \(f(\cdot ;\mathbf {\widehat{v}_{t-1}})\) to estimate \(\lambda _t\) and evaluate \((1- \varrho )\)-quantile of \(\widehat{\lambda }_t\), as the performances .

  2. (2)

    A smoothed equation to update the parameter \(\textbf{v}\) has been addressed by Kroese et al. (2006), according to

    $$\begin{aligned} \mathbf {\widehat{v}_t} = \alpha \mathbf {\widetilde{v}_t} + (1- \alpha ) \mathbf {\widehat{v}_{t-1}}, \forall i = 1,\ldots , n, \end{aligned}$$
    (20)

    in which \(\alpha \) is the smoothing parameter, different from 1 to avoid occurrences of zeros and ones in vector \(\textbf{v}\) (Kroese et al. 2006; Carvalho et al. 2018).

The generic CE method for optimization presented in Algorithm 1 can be summarized as follows (Kroese et al. 2006; De Boer et al. 2005):

  1. (1)

    Choose some \(\mathbf {\widehat{v}_0}\). Set \(t=1\).

  2. (2)

    Generate a sample \(\mathbf {X_1},\ldots ,\mathbf {X_N}\) from the density \(f(\cdot ;\mathbf {\widehat{v}_{t-1}})\) and compute the sample \((1- \varrho )\)-quantile of \(\widehat{\lambda }_t\) of the performances.

  3. (3)

    Use the same sample \(\mathbf {X_1},\ldots ,\mathbf {X_N}\) and solve the stochastic program. Denote the solution by \(\mathbf {\widetilde{v}_t}\).

  4. (4)

    Realize the smoothing procedures out the vector \(\mathbf {\widetilde{v}_t}\).

  5. (5)

    Repeat steps 2–4 until a pre-specified stopping criterion is met.

figure a

In this work, the CE method is executed during \(1.5 \times 10^4\) fitness evaluations (stop criterion). From then onwards, a stochastic algorithm (here CRO-SL, CMAES and EPSO) continues the optimization process until reaching \(3 \times 10^4\) function evaluations.

3.2 The Coral Reefs Optimization algorithm

The Coral Reefs Optimization algorithm (CRO) is a type of evolutionary technique proposed in Salcedo-Sanz et al. (2014a) that has been successfully applied to several optimization problems such as optimal mobile network deployment problems under electromagnetic pollution and capacity control criteria (Salcedo-Sanz et al. 2016c), optimal size reduction in time series (Durán-Rosal et al. 2018), neural networks training Yang et al. (2016), optimal design planar textile antennas (Sánchez-Montero et al. 2018), data clustering problems Tsai et al. (2019a), robust wi-fi channel assignment (Camacho-Gómez et al. 2019), information retrieval (Jiménez et al. 2021), feature selection problems (Salcedo-Sanz et al. 2014b; Yan et al. 2019), or unequal area facility layout problems (García-Hernandez et al. 2020; García-Hernández et al. 2020), among other optimization problems (Li et al. 2015; Agrawal et al. 2018; Emami et al. 2021; Ficco et al. 2018), including management problems in micro-grids (Roy et al. 2020) and optimal scheduling for hydro-power plants (Marcelino et al. 2021b). This metaheuristic is based on a \(n \times m\) grid (reef) in which each hole is defined by \(\varLambda (i, j)\), where (ij) are the coordinates in the grid. Each hole may contain a candidate solution of the problem \(\textbf{x}\) or remain empty. The CRO algorithm can be described in four steps, as follows:

  1. (1)

    Initialization. The initial population is usually randomly generated. The initial number of filled holes is previously set in the algorithm configuration. The positions on which the initial solutions are placed are also randomly chosen. Thus, those whose are not chosen keep being empty. The goodness of each solution is evaluated through the fitness function f(x).

  2. (2)

    Reef construction. The CRO is executed over \(N_{\text {rep}}\) repetitions. For each one, different operators (which are described below) are used to generate coral’s reproduction in the reef. The candidate solutions try to be placed on the reef. The criteria to determine if the proposed solution is set or not on the reef are: 1) if the hole is empty, then it is filled by the proposed solution, 2) if it is not but the fitness of the proposed solution is lower than the current solution at this place, the proposed solution is then placed there. Each proposed solutions tries to find a place where to be placed \(n_{\text {jumps}}\) times. After that, if the candidate has not been placed, it is discarded.

  3. (3)

    Predation. From new corals, a predation phase starts with probability \(P_{\psi }\). In case of predation, a percentage of the reef is lost. It leaves holes for newest solutions (with bad health functions) from other basins of attraction, to enter the reef, as a way to escape local minimums.

  4. (4)

    Stop if halting criteria are satisfied; otherwise go to step (2) for the next cycle. The best individual in the reef is considered as the final solution to the problem.

Recently, a new approach to improve the CRO has been proposed. The central idea is to implement a set of different search mechanisms during the reef’s formation, in order to obtain new aspirant solutions from different exploration methods. Thus, the new version has been named as Coral Reefs with Substrate Layers (CRO-SL) (Salcedo-Sanz et al. 2016b). The CRO-SL is a multi-method ensemble based on the standard CRO algorithm, yet with a structure that promotes competitive co-evolution using the layers (different search operators) deployed. This modified CRO version has been successfully used to several different hard optimization problems, covering a wide range of fields, such as in vehicle routing (Lin et al. 2019), data clustering (Tsai et al. 2019b), climate data field reconstruction (Salcedo-Sanz et al. 2019; Jaume-Santero et al. 2020), image processing (Bermejo et al. 2018; Chen et al. 2021), and also for optimal battery scheduling in microgrids (Salcedo-Sanz et al. 2016a; Jiménez-Fernández et al. 2019). In addition, it has been used to provide optimal structural designs (Perez-Aracil et al. 2020; Pérez-Aracil et al. 2021a, b), and in vibrations cancellation problems in structures (Pérez-Aracil et al. 2021c).

In this paper, we consider de CRO-SL as second phase optimization approach after the CE. As previously mentioned, each layer in the CRO-SL implements an exploration operator, but the algorithm’s structure and dynamics are the same as that described for the standard CRO. In this paper, the operators selected as search procedures in the CRO-SL are the following:

  • 2Px: Classical 2-point crossover by (Eiben and Smith 2015). It consists of coupling to individuals at random, choosing two points for the crossover, and interchanging the solution information in-between both points. In the CRO-SL, one individual to be crossed is from the 2Px substrate, whereas the couple can be chosen from any part of the reef.

  • MPx: Multi-points crossover. In this case, we use a number k point to realize the crossover, and a binary template decides whether parts of the individuals are interchanged.

  • Differential Evolution mutation (DE): based on the differential mutation operator from the Differential Evolution algorithm (Storn and Proce 1997). Particularly, the variant “best/2” has been used (Guohua et al. 2018). In each iteration, the current best solution has been chosen; then, the larva is generated by:

    $$\begin{aligned} x'_i = x_i^{best} + F (x_i^1 - x_i^2) + F (x_i^3 - x_i^4) \end{aligned}$$
  • Harmony Search mutation (HS): Inspired from Harmony Search algorithm (Geem et al. 2001). In this operation, an aspirant solution is obtained as: using the same values of the component from other reefs’ coral, with a harmony memory considering rate equal to \(\in [0,1]\); or performing slight modifications to the aspirant solution, with a pitch adjusting rate \(\in [0,1]\) interval;

  • Simulated Binary Crossover (SBX): this operator is based on the offspring distribution of the binary-coded one point crossover (Deb and Bhushan 1995). Two offspring are generated by \(x'_i = \pm 0.5[(1 + \beta )x_i^1 + (1 - \beta )x_i^2]\); the value of \(\beta \) is calculated, for each iteration, as follows:

    $$\begin{aligned} \beta ={\left\{ \begin{array}{ll} (1/(2(1-u)))^{\frac{1}{\eta +1}} &{}\text {if}\ u \le 0.5\\ (2u)^{\frac{1}{\eta +1}} &{}\text {otherwise} \end{array}\right. } \end{aligned}$$

    in which \(\eta \) is the distribution index, such that \(\eta > 0\). For large values of \(\eta \), there is greater probability of creating a solution close to the parents.

  • Blend Crossover (BLX-\(\alpha \)): this operator was firstly introduced by Eshelman and Schaffer (1993). The offspring \(x'_i\) is generated from a uniform distribution within the interval \([C_{\text {min}} - I\alpha , C_{\text {max}} + I\alpha ]\), in which \(C_{\text {min}} = \text {min}(x_i^1, x_i^2)\) and \(C_{\text {max}} = \text {max}(x_i^1, x_i^2)\), while \(I = C_{\text {max}} - C_{\text {min}}\). The parameter \(\alpha \) is a constant, which has been chosen to be 0.3 in this work.

Figure 2 illustrates the experimental design of the CRO-SL mechanisms and Algorithm 2 shows the proposed CE+CRO-SL coupled metaheuristic. Note that in line 11, CE is executed to perform an initial deep exploration aiming at finding a good basin of attraction. A full code version, for greater reproducibility of our proposal, is available at: https://es.mathworks.com/matlabcentral/fileexchange/119263-ce-cro-sl.

Fig. 2
figure 2

(A) Example of Reef’s setting process in CRO-SL in which each aspirant solution to the problem (larva) tries to settle down in any substrate (regardless of its original layer). (B) Example of layering reef’s using the operator’s applied

figure b

3.3 Computational complexity

Let the population size, number of decision variables (dimension), number of fitness evaluations, time complexity of fitness function be \(NP, D, N_f,\) and O(fitness), respectively. The time complexity of the algorithm (see Algorithm 2) is divided in two parts: (1) CE complexity and (2) CRO-SL complexity. To provide a clearer notation, let \(N_{rep} = \lceil N_f / NP\rceil \) denote the number of iterations the algorithm runs and O(operator) denote the worst time complexity among the selected operators. According to (Rubinstein and Kroese 2004), the CE time complexity is of order \(O(NP^3)\). The CRO-SL time complexity is of order \(O(D \cdot N_{rep} \cdot [NP \cdot O(operator) \cdot O(fitness) \cdot n_{jumps} + O(NP\cdot \log (NP))]\), in which the term \(O(NP\cdot \log (NP))\) arises from the sorting operation. Thus, CE+CRO-SL time complexity is polynomial in NP and D.

4 Experiments and results

In this section, we evaluate the performance of the CRO-SL coupled with the Cross-Entropy method (CE+CRO-SL), for solving the electric power dispatch considering five different scenarios. The experimental setup is divided into the following studies:

  1. 1.

    To assess the CE+CRO-SL performance to solve the electric dispatch problem in smart grid systems, we perform 12 runs in each scenario based on IEEE 57 Bus-System. The proposed metaheuristic is compared with the other techniques: CE, EPSO, and CMAES. The algorithms have been constructed taking into account the structures and characteristics of the system. We test the standard versions and couple them with Cross-Entropy as an initial deep search operator, generating the CE+CRO-SL, CE+EPSO, and CE+CMA-ES versions.

  2. 2.

    The obtained results are analyzed using hypothesis test of equality of means using a statistical inference test to compare the results obtained by CRO-SL versus the others using the same methodology (boosted to Cross-Entropy).

  3. 3.

    Analyze the results found by CE+CRO-SL for solving the electrical dispatch problem, highlighting the positive impact of using CRO-SL as a power production control system.

For assessing the performance of CRO-SL, EPSO, and CMAES using the Cross-Entropy method as an initial deep search operator when applied to the OARPD problem, the initialization parameters used for all algorithms are: population size (NP) equal to 100 individuals, and the total number of fitness evaluations \(3 \times 10^4\) (MaxIt – stop criteria). Specifically for Cross-Entropy, all algorithms use \(1.5 \times 10^4\) fitness evaluations. The CRO algorithm uses as a probability of death (PD) a value equal to 0.1, the number of jumps (NJ) is equal to 3, and the number of depleted corals (NDC) is equal to 10% of the population. The EPSO uses as mutation (Mut), and communication (Com) weights the values equal to 0.8 and 0.8 rates. CMA-ES uses a value of 0.3 for coordinate-wise standard deviation (CW) and stops if fitness equals to \(1 \times 10^{-10}\). All parameters have been defined empirically, as shown in Table 2. We perform the computational simulation using an Intel(R) Core(TM) i9-10900X CPU@3.70GHz and 64 GB RAM, with Windows 10 Pro. The CRO-SL with Cross-Entropy code is implemented in MATLAB R2020b.

Table 2 Parameters initialization of different algorithms considered

4.1 Benchmarck test cases to validate the proposed metaheuristics

To verify the behavior of CE+CRO-SL in comparison with other metaheuristics including the standard PSO, we carried out a experimental design using three well-known benchmark functions. For this experimentation, the same parameters described in Table 2 are used, except for the maximum number of function evaluations (FEs) that have been determined here as 100.000 FEs. For greater testing power, we check each algorithm by function in dimensions 10, 30, and 50. Equations (21), (22) and (23) show the benchmark functions:

  • Rosenbrock function-Multimodal (D>2)-Goal = 0,

    $$\begin{aligned} f(x) = \sum _{i=1}^{D-1} [100(x_i^2 - x_{i+1})^2 + (x_i - 1)^2]. \end{aligned}$$
    (21)
  • Schwefel function - Multimodal-Goal = 0,

    $$\begin{aligned} f(x) = \sum _{i=1}^n (-x_i sin(\sqrt{|x_i|})). \end{aligned}$$
    (22)
  • Griewank function - Multimodal - Goal = 0,

    $$\begin{aligned} f(x) = 1 + \frac{1}{4000} \sum _{i=1}^n x^2_i - \prod _{i=1}^n cos\left( \frac{x_i}{\sqrt{i}}\right) . \end{aligned}$$
    (23)

Table 3 summarizes the results of the simulations performed. The results statistically show that the standard version of PSO, located in the middle of the table, presented a performance very distant from the other metaheuristics with the highest values found for the solution of the benchmark functions. This fact corroborates the improvement in techniques always aiming to find more efficient minimum points. In this context, the EPSO and CE-ESPO techniques, based on PSO, show that although the mean results obtained are better than the standard PSO, the Cross-Entropy (CE) technique as an initial depth search operation very subtly benefits the EPSO algorithm in the medium and high dimensions (30 and 50) of the Rosenbrock and Schwefel functions. When evaluating the CE+ESPO and CRO-SL standard results, we can see that the PSO-based version (CE+EPSO) outperforms the average CRO-SL results. However, when the Cross-Entropy operation is coupled to the CRO-SL (generating the version proposed here, CE+CRO-SL), we notice that the depth-first search not only improves the behavior of the algorithm, but also makes it capable of outperforming all versions of metaheuristics to which it has been compared. Taking into account that for dimensions 30 and 50, the results of CE+CRO-SL are robust for these test functions that have a difficult optimization nature; we understand that the proposed algorithm works well in solving problems not only of low dimension, but also of medium and high dimensions.

Table 3 Benchmarck functions results. In bold, the minimum results found in the simulations. Legend: D (dimension); Std (standard deviation)

4.2 System with wind generators and controllable loads

This work considers the IEEE 57 Bus-System as a base case of electrical dispatch problem. The optimization problem, described in detail in Sect. (2), has 35 variables for optimization (dimension = 35). In addition, Fig. 3 represents the detailed flowchart corresponding to OPF problem state solved by using the metaheuristics addressed in this work.

Fig. 3
figure 3

Flowchart of OPF solution

Considering wind energy in this system, three winds turbines as renewable energy sources are used. Figure 4 shows one example of the Weibull probabilistic distribution (Arslan et al. 2014) generated by Monte Carlo Simulation, meaning the calculated power for the randomly generates samples of wind speed. The uncertainty of power generation for the three wind turbines at bus 2, bus 6, and bus 9 is shown in Fig. 5.

Fig. 4
figure 4

Wind generators at bus 2, 6, and 9

Fig. 5
figure 5

Monte Carlo scenarios of wind generators for case 1. Wind generator at bus 2, 6, and 9

Fig. 6
figure 6

Mean convergence line for the IEEE 57 bus system/OARDP:System with Wind generators and controllable loads. The x-axis represents the function evaluations (FEs) and the y-axis the mean value of the fitness function over the 12 runs

Figure 6 shows the mean convergence line of CRO-SL, EPSO, and CMA-ES and the respective versions with Cross-Entropy method. Observing Fig. 6, note that both CRO-SL versions are shown to be competitive when compared with the other algorithms. The magnified area shows the mean value of each algorithm obtained in a specific range of function evaluation counter. Although CE, CRO-SL, and CE+CRO-SL show to converge first, note that the CRO-SL with Cross-Entropy version obtains the lowest average power generation cost in the case study. In this case, CE+CRO-SL has a cost of 82512,50 $/h to produce power energy in the system with wind generators and controllable loads. Note that the EPSO metaheuristic refines the search in the solution space by continuing from CE, as so does the CRO-SL algorithm. The CMA-ES algorithm does not show convergence improvements even with the use of CE method.

Fig. 7
figure 7

Wind Generator at bus 2, solar generator at bus 6, and wind generator at bus 9

Fig. 8
figure 8

Monte Carlo scenarios of wind generators and solar panel for case 2. Wind generator at bus 2 and 9. Solar panel at bus 6

4.3 System with wind/solar generators and controllable loads

To consider wind and solar energy generators and controllable loads, we consider three renewable energy generators (2 wind and 1 solar PV). According to (Reddy et al. 2017), solar radiance follows a lognormal distribution. Thus, it is possible to derive the energy produced from the solar photovoltaic system using a probability distribution model. We use Monte Carlo Simulations to obtain a distribution of solar radiance into uncertain power generation. Figure 7 shows the solar radiance histograms with corresponding power to be produced from solar panel system. The uncertainty of power generation of renewable generator (wind and PV panels) is shown in Fig. 8.

Figure 9 shows the mean convergence line of the algorithms in the electrical dispatch problem considering wind and solar resources. As in the case of the network that only considers wind generators, the solutions obtained by the tested algorithms maintain the same convergence behavior when a wind generator is replaced by solar panels. Note that in this test scenario, the result of CE+CMA-ES is visibly better than the standard version of the algorithm. The CE algorithm is visually more efficient than the canonical versions of EPSO and CMA-ES, in addition to converging faster than the coupled version of CE+CMA-ES. The CE+EPSO coupled algorithm has its final value closest to the solution value found by CRO-SL in its classic form. Finally, the coupled version of CE+CRO-SL shows a faster convergence result than the others and presents the best result compared to the others.

Fig. 9
figure 9

Mean convergence line for the IEEE 57 bus system/OARDP: System with Wind/Solar generators and controllable loads. The x-axis represents the function evaluations (FEs) and the y-axis the mean value of the fitness function over the 12 runs

4.4 System with wind/solar/small hydro generators and controllable loads

We adopt as a final case test a grid with three renewable sources: a wind generator (bus 2), a solar panel solar (bus 6), and a small-hydro generator (bus 9). Here, the uncertainty in wind speed and solar radiation follows the same approaches explained before. To generate a distribution to the hydro-power production, the Gumbel probabilistic distribution is used (Mujere 2011). The distributions of wind speed, solar radiation, and river flow have been simulated through the Monte Carlo method, considering the uncertainty characteristic of each renewable source. Figure 10 shows one example of the frequencies generated by the simulation carried out.

Fig. 10
figure 10

Wind generator at bus 2, solar generator at bus 6, and wind generator at bus 9

Fig. 11
figure 11

Monte Carlo scenarios of wind generators and solar panel for case 2. Wind generator at bus 2 and 9. Solar panel at bus 6

Fig. 12
figure 12

Mean convergence line for the IEEE 57 bus system/OARDP: System with wind/solar/small hydro generators and controllable loads. The x-axis represents the function evaluations (FEs) and the y-axis the mean value of the fitness function over the 12 runs

Fig. 13
figure 13

Boxplot of fitness values on the three described system grids

Figure 11 presents the uncertainty of power generation in each renewable source used in the experiment. Figure 12 shows the mean convergence line for the systems considering wind/solar/small hydro generators and controllable loads. We can see that CE+CRO-SL keeps obtaining the best convergence result compared to the others metaheuristics analyzed. We emphasize here that, as in the previous systems, the classic version of CRO-SL maintains a visual result superior to the EPSO and CMA-ES algorithms, even in its boosted versions with the CE method. The CE method has more efficient average results than the EPSO and CMA-ES algorithms. This feature indicates that CE is a good starting method for finding optimal solutions with alternative metaheuristics such as the CRO-SL algorithm.

4.5 Discussion of results with statistical inference

In our experimental design, for all test cases described in Sects. (4.2), (4.3), and (4.4), each algorithm has been executed 12 times. We choose to analyze and discuss the results of the four algorithms that showed the best convergence robustness. For that, the first step evaluates the sample dispersion of the solutions of each algorithm using boxplot graphs. Boxplots are not only useful for analyzing the range and distribution of the data, but also they can provide information about the true difference among the means. If the notches in the boxplots do not overlap, it can be concluded, with 95% confidence, that the true means do differ (Marcelino et al. 2021b). Figure 13 presents, for each described system grid, the boxplot of the fitness values for CE, CE+CRO-SL, CRO-SL, and CE+EPSO. Visually analyzing this figure, it is possible to obtain that:

  • The CE+CRO-SL is statistically superior when compared to the other three considered approaches in all test cases.

  • It is not possible to conclude if a statistical significant difference of the means computed of CE, CRO-SL, and CE+EPSO algorithms exists (or not) in the three test cases analyzed.

We can see that the Cross-Entropy method improves the results of CRO-SL since there is a statistical difference between both versions favoring the CE+CRO-SL. Considering the CE+CRO-SL, it is important to notice that, in all test cases, there are a smaller variability and smaller outliers when compared to the other approaches. The algorithm showing the greatest variability and largest outliers is the CE+EPSO. This behavior can be seen in all test cases.

Since the notches in the boxplots for CE, CRO-SL, and CE+EPSO do overlap in all test cases, to verify whether the true mean differs or not it is necessary to perform a hypothesis test. Since the normality assumption of all algorithm samples has been validated, the Analyses of Variance (ANOVA) test is applied to compare the algorithms throughout the 12 runs. Following Marcelino et al. (2021c), if ANOVA states there is a statistical difference between the means of the algorithms, a Tukey test is applied to simultaneously assess all pairwise comparisons and to identify any difference between two means that are greater than the expected standard error.

Using a level of significance equals to 5%, a p-value below 0.05 is found indicating that there is a difference among the means. Thus, a Tukey test is carried out to identify where the differences between the samples are. Table 4 shows the results of optimal settings of control variables for each case test, according: (1) System with wind generators and controllable loads, (2) System with wind/solar generators and controllable loads, and (3) System with wind/solar/small hydro generators and controllable loads. Table 4 also informs the optimized result from the algorithms of each case system using the median solution found of 12 runs and visualized on boxplots. We are making available a summary of statistical metrics in Table 4 to address the performance analysis of the CE, CE+CRO-SL, CE+EPSO, and CRO-SL algorithms.

Observing the general metrics of Fuel Costs in $/h (bestmedianworstmean and std) in Table 4, we can see that CE+CRO-SL obtains the best results in all grid systems tested. Although these metric values are preliminary measures, in many cases they are not sufficient for a more effective analysis of the results. The ANOVA test performed on the three test cases refutes the hypothesis of equality of means from a p-value less than 0.05. Table 5 shows the algorithm classification results. The statistical inference carried out proves that the CE+CRO-SL algorithm is the most robust approach for solving the electrical dispatch problem in a renewable generation environment, in the three tested energy systems.

It is important to say that the canonical version of CRO-SL remains tied with the CE-boosted version, in cases 1 and 2 in first place. This information corroborates the efficiency of the CRO-SL method for solving the problem addressed here. In the analysis, the CE algorithm has the highest mean value and the lowest standard deviation. This justifies the fact that this algorithm remains statistically similar to the CE+EPSO algorithm in the results obtained in the cases 1 and 2. In general, the average result obtained by each algorithm for solving the electrical dispatch problem in the network containing three wind generators has a total cost in ($/h) equivalent to: 99432.94 (CE), 82512.53 (CE+CRO-SL), 86481.9 (CRO-SL) and 94954.90 (CE+EPSO). We can noticed that CE+CRO-SL when compared to other methods can save, per hour, the amount of $16.920,41 (comparing whit CE), $3.969,37 (comparing with CRO-SL), and $12.442,37 (comparing whit CE+EPSO). As discussed, CE-CRO-SL has the same classification as standard CRO-SL. However, we can note that the use of the CE method as a starting operator to find a promising region in the search space guarantees an energy generation cost savings when the grid uses three wind generators.

Analyzing the network with two wind generators and a solar generator (case 2), we see that the algorithms find, on average, the fitness values in ($/h) according to: 82657.52 (CE), 69111.2 (CE-CRO-SL), 75674.8 (CRO-SL), 77211.41 (CE+EPSO). Here the savings addressed to CE+CRO-SL is $13.546,32 (comparing with CE), $6.563,6 (comparing with CRO-SL), and $8.100,21 (comparing with CE+EPSO). In this case— the System with wind/solar generators and controllable loads —the statistical inference concluded there are no statistical differences that corroborate for equality of means among the CE+CRO-SL algorithm and the others method tested.

Table 4 Optimized results of the median solution and summary of statistical metrics

Table 4 informs the statistical metrics of system with wind/solar/small hydro generators and controllable loads scenario and Table 5 the Tukey test classification. We can see that CE+CRO-SL and CRO-SL show no statistical difference in term of mean results. In terms of average value, the algorithms finished the search process achieving the respective results in $/h: 66493.38 (CE), 56852.39 (CE+CRO-SL), 60040.47 (CRO-SL), and 66241.29 (CE-EPSO). In this test scenario, three thermoelectric generators have been replaced by renewable source generators, namely wind, solar, and hydraulic. It is possible to notice that the total cost of generation is lower in this scenario, since hydroelectric generation has a low cost when compared to the others. In general, the use of CE+CRL-SL when compared to other techniques saves the average amount of $9.640,96 (comparing whit CE), $3.188,08 (comparing with CRO-SL), and $9.388,9 (comparing whit CE+EPSO) per hour of generation.

4.6 Discussion about the savings achieved

To verify effectiveness of the proposed method, the large-scale IEEE 57-bus system is considered for study purpose in three distinct smart grid approaches. In general, performance of CE+CRO-SL is found to be superior for higher number of variables in constrained optimization problems. Hence, CE+CRO-SL algorithm is applied to the system to minimize fuel cost independently. A total of \(3 \times 10^4\) function evaluations have been performed for each test case for all approaches used. CE+CRO-SL has found the best set of average solutions, and as reported in Table 4, the mean solution presented for each test scenario meets the constraint of the electrical dispatch problem. Furthermore, CE-CRO-SL stands out for presenting differences in the average of results when compared to CE and CE+EPSO algorithms.

Despite not presenting statistical differences regarding the classic version of CRO-SL, the difference in the mean results of the fitness function is high. Table 6 shows a monthly projection of savings to be achieved using CE+CRO-SL compared to the other algorithms. It is noticeable that the results of the CMA-ES (with or without CE) are extremely higher than the others, so we can exclude these results from the analysis. Monthly CE+CRO-SL can save millions of dollars when compared to other algorithms, CE, CRO-SL, and CE+EPSO.

Table 6 indicates that when inserting three wind generators into the IEEE 57 Bus-System, the projected difference between CE+CRO-SL and CE is $12 million each, followed by $8.9 million compared to CE+EPSO and $2.8 million with regard to CRO-SL. Similar quantities are informed for cases where there is insertion of solar and hydraulic generators. We emphasize that the least difference pointed out is in relation to the standard CRO-SL. This fact corroborates the robustness of the method, since it presents a better solution for electrical dispatch control than the CE, CE+EPSO, and CE+CMA-ES methods. Thus, by coupling the CE method as a starter to CRO-SL, it is possible to generate an efficient and economical control solution for smart grid networks. Therefore, the main advantages of using a method such as CE coupled with a metaheuristic that works on population substrates, such as CRO-SL, are:

  • We build an exploration first phase based on the Cross-Entropy mechanism. This causes the population to have a deep descent behavior previous to the CRO-SL application. Thus, a plowing basin can be reached more quickly and efficiently.

  • CRO-SL is a modern metaheuristic capable of executing several search operations, such as mutation coming from the differential evolution algorithm, harmonic mutation, and several recombination operations. Thus, the exploitation phase works in a more exploratory way, which aims to ensure a greater scan of the local neighborhood in search of minimum points of the function to be optimized.

  • The coupling of these techniques solved an NP-Hard, non-convex, nonlinear and high-dimensional problem, the OPF with security constraints. It is possible to notice that the boxes presented by this algorithm have little dispersion in the three scenarios studied. Thus, it was shown that when applying CE+CRO-SL inference tests, it was statistically more robust when compared to the others.

  • The economic projection analysis showed that CE+CRO-SL can monetarily reach millions of dollars, guaranteeing the security of the system and dealing with the uncertainty coming from renewable sources when applied to the grid.

Table 5 Tukey test results using fitness function analysis of IEEE 57 Bus-Systems tested in Sects. (4.2), (4.3), and (4.4) – labeled as Case1, Case2, and Case3
Table 6 Monthly projection of savings with use of CE+CRO-SL in labeled test cases compared to other methods

5 Conclusions

In this paper, we have approached the Optimal Power Flow (OPF) problem in a smart grid facility. We have proposed a novel boosted algorithm for mono-objective optimization, the CE+CRO-SL, that uses the Cross-Entropy (CE) method as a previous step, with the consistent Coral Reef’s with Substrate Layers (CRO-SL) algorithms as a final metaheuristic procedure. The CE+CRO-SL has the advantage of producing a hard exploitation process, due to its operation of working with substrates, i.e., merging the best operators coming from different modern heuristics. In addition, by adding a previous CE operation, the final algorithm is capable of finding promising solutions more quickly than the CRO-SL on its own. Thus, the proposed technique differs from classical methods which can be computationally expensive to solve large-scale and complex problems. The simulation results have been carried out in the IEEE 57 Bus-System, with the objective function of minimizing generator costs. We incorporate in this grid renewable generators generating three different scenarios: (1) System with wind generators and controllable loads; (2) System with wind/solar generators and controllable loads; and (3) System with wind/solar/small-hydro generators and controllable loads. For all the testing systems, CE+CRO-SL reached better solutions and faster convergence than CE, CRO-SL, EPSO, CMA-ES, CE+EPSO, and CE+CMA-ES in all cases studied. In thorough statistical inference, the CE+CRO-SL outperformed most of the methods used for performance comparison. The simulation results also showed that CE+CRO-SL can be a competitive solver for dealing with large-scale security constrained OPF problems considering the uncertainty of power generation in each renewable source used. The CE+CRO-SL solution was able to generate a profit of millions dollars monthly, according to a first economic forecast study carried out. We believe that, as a future work, a technique for performing the parameters fine-tuning of the algorithm, in real time, can be adopted to improve the performance of this approach in smart-grid systems optimization problems.