1 Introduction

The world’s need for electricity is rising quickly, with an annual growth rate of 4% due to population growth, an increase in human comfort, and the development of industrialization. Without appropriate action, CO2 emissions would rise by 70% over the following 20 years due to rising electricity consumption [1]. Blending wind and solar energy generation has the potential to address the limitations associated with each individual renewable energy source (RES). Wind turbines generate power that varies with changing wind speeds, while photovoltaic (PV) modules solely produce electricity in daylight. Nonetheless, combining these two sources can mitigate fluctuations and facilitate consistent power generation round the clock. The synergistic relationship between wind and solar power can result in a more dependable stand-alone hybrid energy system (HES) [2]. RESs are a practical solution for cutting carbon releases and stopping the exhaustion of fossil resources [3]. The capacity of sustainable power generation worldwide at the end of 2022 was 3372 GW, up 295 GW (+ 9.6%) from the previous year. Solar and wind energy accounted for 90% of the total net additions to the renewable energy sector in 2022, maintaining their dominance in renewable capacity growth. The capacity of global RESs is shown in Fig. 1 [4].

Fig. 1
figure 1

Capacity of global RESs

Due to the reliance of RESs on climate conditions, traditional energy sources like a diesel generator (DG) and/or energy storage systems like a battery are required for more reliability. The biggest issue with batteries is their expensive cost, while the main problem with diesel generators is their greenhouse gas (GHGs) emissions. However, both must be present for reliability, so the sizing stage is critical to obtain the lowest cost and GHGs emissions at high reliability of HESs. When HESs work in conjunction with the national grid, they are referred to as on-grid, and when they operate independently, they are referred to as off-grid. Off-grid HESs will be the best choice in remote areas where constructing electric utilities will become unprofitable because of rising transmission line costs [5].

Numerous optimization approaches to obtain the optimum HESs size are discussed in Ref. [6]. Many research articles have studied the issue of generation unit sizing to create a techno-economic system. Depending on decreasing life cycle cost (LCC), particle swarm optimization (PSO) has been applied In Ref. [7] to identify the perfect capacity of an independent hybrid PV/wind/battery power system from the grid. In Ref. [8], HES has consisted of a hydro/wind/PV/ hydrogen storage power system autonomously, and ant colony optimization (ACO) was utilized to determine the perfect design of this system depending on reducing both losses of power supply probability (LPSP) and LCC. Cuckoo search (CS) was applied in [9] to find the desirable design of a grid-dependent HES.

Various research articles examined different optimization techniques intending to identify the one that produces the most significant results. Ref. [10] applied three various optimization methods, namely the grey wolf optimizer (GWO), improved GWO (IGWO), and salp swarm algorithms (SSA), to find the desired size of HES that included wind/PV/battery/DG autonomously from the grid, and IGWO outperformed the others to decrease both cost of energy (COE) and LPSP. Another three optimization approaches, PSO, bat algorithm (BA), and social mimic optimization algorithm are utilized in Ref. [5] for the same previous HES components, and the BA was the best in optimizing loss of load expected and COE compared with other techniques. Seven optimization approaches, PSO, improved PSO, simulated annealing (SA), improved harmony search (IHS), IHS-based SA, tabu search, and artificial bee swarm optimization (ABSO) are applied in Ref. [11] to determine the perfect design of HES that included wind/PV/battery autonomously from the grid and ABSO demonstrated the optimal results in order to minimize total annual cost (TAC) and LPSP. In Ref. [12] four optimization approaches, namely GWO, water cycle algorithm, SSA, and whale optimization algorithm (WOA) were applied to determine the perfect capacity of HES that consisted of hydro/wind/PV connected with the grid and the WOA was the best one among the others for optimizing COE and LPSP.

This research article introduces strategies for managing energy that takes into account the actual power consumed by the bi-directional converter to find the perfect capacity of the proposed HES. Numerous studies in this area assumed that, the bidirectional converter’s rated power was equal to the battery system’s capacity [10] or the peak load of the load profile [13,14,15].

The following are the major contributions of this paper:

  • This paper proposes a hybrid renewable energy (HRE) system design for a remote area in Egypt that lacks a conventional power grid, taking into account the region’s specific natural energy resources. The system configuration integrates photovoltaic (PV), wind turbine (WT), and battery energy storage (BES) components.

  • Introducing strategies for managing energy that consider the actual power flow through the bi-directional converter.

  • Three advanced optimization techniques are employed: the Chernobyl disaster optimizer (CDO), dynamic control cuckoo search (DCCS), and gold rush optimizer (GRO) to optimize the sizing of the HRE system and minimize the annual levelized cost of energy and power supply deficit.

  • A comprehensive comparative analysis of these three optimization techniques is presented to identify the best one for enhancing system reliability and reducing overall cost.

This paper is divided into five parts. The first section, "Introduction", is followed by a "Modeling of suggested HES" in Sect. 2, while Sect. 3 describes the "Optimization process". The "Location and Input data" of the proposed HES and "Results" are displayed sequentially in Sects. 4 and 5.

2 Modeling of suggested HES

HESs typically comprise three sectors: generation, distribution, and consumer [16]. In this paper, the generation sector consists of PV/wind/battery/DG that is investigated in the selected location. The consumer sector comprising the central part (load profile) is also studied. Figure 2 shows the construction of the suggested HES as the distribution sector.

Fig. 2
figure 2

Typical HES schematic

2.1 System components

2.1.1 PV module

Solar radiation (\({\text{i}}\)), ambient temperature (\({{\text{T}}}_{{\text{am}}}\)), and the PV system’s efficiencies (\({\upeta }_{{\text{pv}}}\)) all affect how much power it can produce. The following formulas can be used to compute the power provided by a PV system (\({\text{Ppv}}\_{\text{sys}}\)) as a function of these variables [15]:

$$Ppv\_sys(t) = \eta_{pv} \ast N_{pv} \ast Ppvr \ast \frac{i(t)}{{i_{nom} }}\left( {1 - \delta \left( {T_{isc} (t) - T_{scr} } \right)} \right)$$
(1)

where, \({{\text{N}}}_{{\text{pv}}}\) and \({\text{Ppvr}}\) denote the total number of PV units and rated power for each of them, respectively. Moreover, \({{\text{i}}}_{{\text{nom}}}\) represents solar radiation under standard conditions, \(\delta\) is the temperature coefficient, and \({\text{T}}_{{\text{scr}}}\) denotes cell temperature. The instantaneous temperature of the solar cell (\({\text{T}}_{{\text{isc}}} \left( {\text{t}} \right)\)) that can be computed by Eq. (2).

$$T_{isc} (t) = T_{am} (t) + 0.034 \cdot i(t)$$
(2)

2.1.2 Wind turbine

Wind energy is a source of free, readily available energy that can be used to electrify. It is necessary to convert the observed wind speed at an anemometer height to the appropriate hub height because wind speed changes with height. The following formula could be utilized to calculate wind speed at any height [17]:

$$u_{{\rm I}{\rm I}} = u_{\rm I} \left( {\frac{{h_{{\rm I}{\rm I}} }}{{h_{\rm I} }}} \right)^{\alpha_c }$$
(3)

In which \({u}_{{\text{II}}}\) signifies wind speed at required height \({h}_{{\text{II}}}\), \({u}_{{\text{I}}}\) denotes the speed of wind at reference height \({h}_{{\text{I}}}\), and \({\upalpha}_{{\text{c}}}\) signifies friction coefficient. The actual output power of a wind farm (\({{\text{P}}}_{{\text{wf}}}({\text{t}})\)) can be modelled as follows [18]:

$$P_{wf} (t) = \left\{ { \begin{array}{ll} 0 & {u(t) < u_{c\_i} \;or\;u(t) > u_{c\_o} } \\ {(\eta _w \ast N_w \ast P_{w\_r} ) \ast {\frac{{u^2 (t) - u_{c\_i}^2 }}{{u_r^2 - u_{c\_i}^2 }}}} & {u_{c\_i} < u(t) < u_r } \\ {\eta _w \ast N_w \ast P_{w\_r} } & {u_r < u(t) < u_{c\_o} } \\ \end{array}} \right\}$$
(4)

where, \({\text{P}}_{{\text{w}}\_{\text{r}}}\), \({{\text{N}}}_{{\text{w}}}\), \({\upeta }_{{\text{w}}}\), \({{\text{u}}}_{{\text{r}}}\), \({{\text{u}}}_{{\text{c}}\_{\text{i}}}\) and \({{\text{u}}}_{{\text{c}}\_{\text{o}}}\) are rated power, number, efficiency, rated speed, cut-in speed and cut-off speed of wind turbine, respectively.

2.1.3 Diesel generator

In HESs, when the generated power from renewable sources and battery systems (BSs) are not enough to fulfill the load’s requirements, DG works as a secondary energy source. While building a HESs, DG’s hourly fuel consumption should be taken into account and can be represented using the following formula [19, 20].

$$FC_d (t) = \gamma_d \ast P_d (t) + \phi_d \ast P_{d\_r}$$
(5)

where, \({{\text{FC}}}_{{\text{d}}}({\text{t}})\), \({{\text{P}}}_{{\text{d}}}({\text{t}})\) and \({{\text{P}}}_{{\text{d}}\_{\text{r}}}\) denote fuel consumption (L/h), generated power (kW) and rated power of DG, respectively, \({\upgamma }_{{\text{d}}}\) and \({\mathrm{\varnothing }}_{{\text{d}}}\) are constant parameters, which refer to the fuel consumption coefficients and are almost equivalent to 0.246 and 0.08415, respectively [21].

2.1.4 Battery system

Battery systems are utilized as a primary backup due to their quick response time and cheaper running cost when using minimal power compared to diesel [22]. If the battery’s state at time t (\({{\text{E}}}_{{\text{b}}}({\text{t}})\)) is within the permissible ranges represented in Eq. (6).

$$E_{b\_\min } \le E_b (t) \le E_{b\_\max }$$
(6)

\({{\text{E}}}_{{\text{b}}}({\text{t}})\) for both charging and discharging modes can be described by Eqs. (7), and (8):

$$E_b (t) = E_b (t - 1)(1 - \alpha_b ) + E_{Ch} (t)$$
(7)
$$E_b (t) = E_b (t - 1)(1 - \alpha_b ) - E_{D\_Ch} (t) ,$$
(8)

else \({{\text{E}}}_{{\text{b}}}({\text{t}})\) can be represented in Eq. (9) [23].

$$E_b (t) = E_b (t - 1)(1 - \alpha_b )$$
(9)

where, \({{\text{E}}}_{{\text{b}}\_{\text{min}}}\) and \({{\text{E}}}_{{\text{b}}\_{\text{max}}}\) are battery’s minimum and maximum permitted storage capacity, respectively, \({{\text{E}}}_{{\text{Ch}}}({\text{t}})\), \({{\text{E}}}_{{\text{D}}\_{\text{Ch}}}({\text{t}})\) and \(\alpha_b\) denote charging, discharging energy and rate of self-discharge per hour of battery, respectively. The efficiency of BS is 85% for discharging (\({\upeta }_{{\text{dch}}}\)) and 90% for charging (\({\upeta }_{{\text{ch}}}\)).

2.1.5 Bi-directional converter

Bi-directional converter has been utilized in HESs to convert AC-to-DC and DC-to-AC. There are four different scenarios that can be used to compute inverter power (Pinv(t)).

  • Scenario 1: Pinv(t) = (Pwf(t) − Pl(t)) ηinv (Charging mode 1)

  • Scenario 2: Pinv(t) = (Ppv_sys (t) − PCh(t)) ηinv (Charging mode 2)

  • Scenario 3: Pinv(t) = (Ppv_sys (t) + PD_Ch(t)) ηinv (Discharging mode)

  • Scenario 4: Pinv(t) = (Ppv_sys (t)) ηinv (Diesel running mode)

Inverter’s rated power (\({{\text{P}}}_{{\text{R}}\_{\text{Inv}}}\)) can be computed by Eq. (10).

$$P_{R\_Inv} = \max (P_{inv} (t))$$
(10)

2.2 Strategies for managing energy

Since it’s essential to have a dependable energy source that is able to suit the time distribution of load, the unexpected nature of RESs makes strategies for managing energy for HESs extremely complicated [24]. As a result, one of the key considerations while building such systems would be using strategies for managing energy. In order to implement strategies for managing energy, the simulation will take into account the four cases below:

  • Case 1: RESs can supply all the generated electrical power needed, and a battery system is charged in charging mode 1 or 2 using the surplus energy. Figure 3 displays the main flowchart for the various operation modes.

  • Case 2: If more wind energy is available than is required to power the load and the battery system. As a result, in this instance, the excess power is used in a dump load (operation charging mode 1), as shown in Fig. 4.

  • Case 3: If there is more electrical power supplied by RESs available than is required to power the load and the battery system. As a result, in this instance, the excess power is used in a dump load (operation charging mode 2), as shown in Fig. 5.

  • Case 4: RESs are unable to supply enough energy to fulfil the demand. In this case, stored energy in BS is used as a primary backup. If BS is not enough to fulfil the load’s requirements, DG works as a secondary backup (operation discharging mode), as shown in Fig. 6.

Fig. 3
figure 3

Main flowchart of the hybrid system

Fig. 4
figure 4

Flowchart of charging mode 1

Fig. 5
figure 5

Flowchart of charging mode 2

Fig. 6
figure 6

Flowchart of discharging mode

3 Optimization

3.1 Cost assessment

One of the most popular and widely utilized measures of the economic viability of HESs is the cost of energy (\({\text{COE}}\)). It is determined utilizing the subsequent formula [25]:

$$COE = \frac{ATC}{{\sum_{t = 1}^{8760} {P_l (t)} }}$$
(11)

Annual total cost (\({\text{ATC}}\)) is able to be calculated as follows [26]:

$$ATC = ACC + ARC + AOMC$$
(12)

where, \({\text{ACC}}\), \({\text{ARC}}\) and \({\text{AOMC}}\) are capital, replacement and operation and maintenance costs annually, respectively.

$${\text{Net}}\;{\text{Present}}\;{\text{Cost}}\;(NPC) = \frac{ATC}{{CRF}}$$
(13)
$$CRF = \frac{{I(1 + I)^{n_s } }}{{(1 + I)^{n_s } - 1}}$$
(14)

where, \({\text{CRF}}\), \({\text{I}}\) and \({{\text{n}}}_{{\text{s}}}\) are a factor affecting capital recovery, interest rate and the overall HES’s lifespan (this is often equivalent to the lifespan of the PV system because it has a longer lifespan than other components), respectively [27].

The DG fuel cost (\({{\text{C}}}_{{\text{f}}\_{\text{d}}}\)) can be calculated as follows [28]:

$$C_{f\_d} = FC_d \ast d_h \ast FP_d$$
(15)

where, \({{\text{d}}}_{{\text{h}}}\) represents the number of hours for DG that has been in operation over the system lifespan (h) and \({{\text{FP}}}_{{\text{d}}}\) represents the cost of one litre of fuel in dollars.

3.2 Reliability assessment

The statistical measure known as “loss of power supply probability” (\({\text{LPSP}}\)) estimates the likelihood that the availability of renewable energy sources will be insufficient to fulfil demand or that technical failure would prevent the supply from keeping up. It can be described using the expression below [29].

$$LPSP = \frac{{\sum_{t = 1}^{8760} {LPS(t)} }}{{\sum_{t = 1}^{8760} {P_l (t)} }}$$
(16)

where, \({{\text{P}}}_{{\text{l}}}\) denotes the load power, and \({\text{LPS}}\) is the loss of power supply (this is the gap between the power consumed by the load and the total amount of electricity produced by utilized sources). The allowed value of \({\text{LPSP}}\) is 5%.

3.3 Multi-objective and constraints of optimization

This paper proposes \({\text{COE}}\), \({\text{LPSP}}\) and \({{\text{P}}}_{{\text{dump}}}\) as multi objectives issues for the optimization algorithms. The expression for this issue is:

$$\min \begin{array}{*{20}l} Q \\ \end{array} = \min \begin{array}{*{20}l} {(\omega_1 \ast COE + \omega_2 \ast LPSP + \omega_3 \ast P_{dump} )} \\ \end{array}$$
(17)

Trial and error are used to select the weighting factors \({\upomega }_{1}\), \({\upomega }_{2}\), and \({\upomega }_{3}\) to get the perfect results, and the summation of them must equal 1. The values of \({\upomega }_{1}\), \({\upomega }_{2}\), and \({\upomega }_{3}\) in this study are chosen to be 0.4, 0.599, and 0.001, respectively.

The reliability indicator of \({\text{LPSP}}\) permissible value is set at 5%, and the \({{\text{P}}}_{{\text{dump}}}\) permissible value is set at 4% of the yearly demand. The constraints for both reliability and dump load are presented in Eqs. (18), and (19):

$$LPSP \le 5\%$$
(18)
$$P_{dump} \le 4\% \;{\text{of}}\;{\text{yearly}}\;{\text{demand}}$$
(19)

3.4 The proposed optimization approaches

In this study, CDO, DCCS and GRO are the proposed optimizers used for the perfect design of the proposed stand-alone HES.

3.4.1 Chernobyl disaster optimizer

The Chernobyl accident inspired the guiding ideas and principles of CDO. Alpha, beta, and gamma are the three particles that attack humans following an explosion. Figure 7 depicts the region of the blast. These particles will fly a distance from the reactor’s core (a high-pressure zone) to human centres (a low-pressure zone), where the disaster will occur. Assuming that while these particles target the victims (people), they also move simultaneously. Figure 8 shows the positions of the victim and the particles during the attack [30].

Fig. 7
figure 7

Explosion center and the generated particle [30]

Fig. 8
figure 8

The positions of the victim and the particles throughout the attack [30]

Adults can walk faster outside, with estimations that vary from 0 to 3 miles/hour. On the basis of that, the following formula can be used to simulate the speed dropping linearly from 3 to 0.

$$WS_h = 3 - 1 \ast \left[ {\frac{3}{Max\_Iteration}} \right]$$
(20)
  1. 1.

    Gamma (\(\upgamma\)) particle

When \(\upgamma\) particle is attacking a victim, the next formula can be used to compute the gradient descent factor (\({{\text{V}}}_{\upgamma}\)).

$$V_\gamma = Y_\gamma (t) - \sigma_\gamma \cdot D_\gamma$$
(21)

where, \({{\text{Y}}}_{\upgamma}({\text{t}})\), \({\upsigma }_{\upgamma}\) and \({{\text{D}}}_{\upgamma}\) denote the current location, propagation of gamma particle and the gap among gamma particle location and total position, respectively.

By the following equations, \({\upsigma }_{\upgamma}\) and \({{\text{D}}}_{\upgamma}\) can be computed:

$$\sigma_\gamma = \frac{r^2 \cdot \pi }{{\log (Rand\begin{array}{*{20}c} {(1:300 \ast 10^3 )} \\ \end{array} )}} - (WS_h \cdot Rand\begin{array}{*{20}c} {()} \\ \end{array} )$$
(22)
$$D_\gamma = \left| {r^2 \cdot \pi \cdot Y_\gamma (t) - Y_T (t)} \right|$$
(23)

where, \(r\) is a randomly chosen value among (0 and 1).

  1. 2.

    Beta (\(\upbeta\)) particle

When \(\upbeta\) particle is attacking a victim, the following formula can be applied to estimate the gradient descent factor (\({{\text{V}}}_{\upbeta}\)).

$$V_\beta = 0.5(Y_\beta (t) - \sigma_\beta \cdot D_\beta )$$
(24)

where, \({{\text{Y}}}_{\upbeta}({\text{t}})\), \({\upsigma }_{\upbeta}\) and \({{\text{D}}}_{\upbeta}\) represent the current location, propagation of \(\upbeta\) particle and the gap among \(\upbeta\) particle location and total position, respectively.

\({\upsigma }_{\upbeta}\) and \({{\text{D}}}_{\upbeta}\) can be determined via the following equations:

$$\sigma_\beta = \frac{r^2 \cdot \pi }{{0.5\log (Rand\begin{array}{*{20}c} {(1:270 \ast 10^3 )} \\ \end{array} )}} - (WS_h \cdot Rand\begin{array}{*{20}c} {()} \\ \end{array} )$$
(25)
$$D_\beta = \left| {r^2 \cdot \pi \cdot Y_\beta (t) - Y_T (t)} \right|$$
(26)

where, \(r\) is a randomly chosen value among (0 and 1).

  1. 3.

    Alpha (\({\upalpha }\)) particle

When \({\upalpha }\) particle is attacking a victim, the next equation can be applied to determine the gradient descent factor (\({{\text{V}}}_{{\upalpha }}\)).

$$V_\alpha = 0.25(Y_\alpha (t) - \sigma_\alpha \cdot D_\alpha )$$
(27)

where, \({{\text{Y}}}_{{\upalpha}}({\text{t}})\), \({\upsigma }_{{\upalpha}}\) and \({{\text{D}}}_{{\upalpha }}\) represent the current location, propagation of \({\upalpha }\) particle, and the gap among \({\upalpha }\) particle location and total position, respectively.

\({\upsigma }_{\upalpha}\) and \({{\text{D}}}_{\upalpha}\) can be calculated via the following equations:

$$\sigma_\alpha = \frac{r^2 \cdot \pi }{{0.25\log (Rand\begin{array}{*{20}c} {(1:16 \ast 10^3 )} \\ \end{array} )}} - (WS_h \cdot Rand\begin{array}{*{20}c} {()} \\ \end{array} )$$
(28)
$$D_\alpha = \left| {r^2 \cdot \pi \cdot Y_\alpha (t) - Y_T (t)} \right|$$
(29)

where, \({\text{r}}\) is a randomly chosen value among (0 and 1).

According to Galileo Galilei’s equations of motion, the following formula can be used to get the average overall speed of these particles. The CDO flowchart has been displayed in Fig. 9.

$$Y_T = V_\gamma \cdot V_\beta \cdot V_\alpha /3$$
(30)
Fig. 9
figure 9

Flowchart of CDO

3.4.2 Dynamic control cuckoo search

The Cuckoo search (CS) approach was developed based on the ability of the Cuckoo bird to reproduce. This was achieved by creating a mathematical simulation that drew inspiration from the bird’s behavior. The Cuckoo uses the nest of a flock of birds to lay its eggs to reproduce. The flock bird might identify the cuckoo bird eggs with an abandoned chance Pa ∈ [0, 1] and throw the eggs away or quit the nests to build new ones elsewhere. The CS approach operates under two suppositions: firstly, that the number of host nests is constant, and secondly, that the Cuckoo bird selects an arbitrary nest to lay its eggs. The CS approach utilizes the Levy step to identify the following iteration of solutions [31]. The Adaptive Cuckoo Search (ACS) approach was developed with the aim of improving the identification of optimum solutions, with no reliance on the Levy step. The ACS replaces the Levy step with an adaptive step size that more effectively directs the next iteration of solutions by using fitness and iteration count. For the present iteration, the step size \({{\text{W}}}_{\rm i}({\text{t}})\) was selected adaptively as follows [32]:

$$W_i (t) = \left( \frac{1}{t} \right)^{\left| {\frac{f_b (t) - f_i (t)}{{f_b (t) - f_w (t)}}} \right|}$$
(31)

where, \({{\text{f}}}_{\rm i}({\text{t}})\), \({{\text{f}}}_{\rm b}({\text{t}})\) and \({{\text{f}}}_{\rm w}({\text{t}})\) denote fitness value for \({\text{i}}\)th cuckoo, best and worst optimum fitness value between N cuckoos at iteration \({\text{t}}\), respectively.

A longer iteration is needed to increase performance on the scalable unimodal and multimodal benchmark functions to attain the best solutions in ACS. The Dynamic Control Cuckoo Search (DCCS) algorithm incorporates a dynamic control mechanism into the ACS, which enhances its performance and accelerates convergence [33]. According to a present iteration (\({\text{t}}\)) and maximum iteration count (\({\text{T}}\)), the adaptive step size under dynamic control by \({\text{i}}\)th cuckoo, is as follows:

$$D_i (t) = \left( {\sin \left( {\frac{\pi }{2} \ast \frac{t}{T}} \right) + \cos \begin{array}{*{20}c} {\left( {\frac{\pi }{2} \ast \frac{t}{T}} \right)} \\ \end{array} - 1} \right) \cdot W_i (t)$$
(32)

For the condition of \({\text{R}}<0.5\), the solution was upgraded by utilizing an adaptive step size with dynamic control and taking into account the global optimum solution (\({Y}_{G})\) When the condition \({\text{R}}\ge 0.5\), Cuckoos will blindly transfer to neighboring host nests in pursuit of a better one. So, for the ith host nest in the DCCS, the next iteration solution is as follows:

$$Y_{i} (t + 1) = \left\{ \begin{array}{ll} Y_{i} (t) + Rand(1,d) \cdot D_{i} (t) \cdot Y_{i} (t) \cdot Y_{G}, & \quad R < 0.5 \\ Y_{i} (t) \cdot Rand(1,d), & \quad R \ge 0.5 \\ \end{array}\right.$$
(33)

where, \({\text{Rand}}(1,{\text{d}})\) denotes a random vector of \({\text{d}}\)–dimensional and \({\text{R}}\) is a random number with a uniform distribution across [0, 1]. Figure 10 shows the DCCS flowchart.

Fig. 10
figure 10

Flowchart of DCCS

3.4.3 Gold rush optimizer

The gold rush optimizer (GRO), uses the three fundamental principles of seeking gold: migration, cooperation, and prospecting to emulate the major occurrences of the gold rush and how gold diggers searched for gold through the gold rush period [34].

  1. 1.

    Miners modeling

The miners in the GRO algorithm perform a comparable function to the population in a genetic algorithm or the particles in a PSO approach. The \({{\text{M}}}_{{\text{ml}}}\) matrix, which is represented by Eq. (34), contains the miners’ locations.

$$M_{ml} = \left[ {\begin{array}{*{20}c} {X_1^1 } & {X_2^1 } & \cdots & {X_d^1 } \\ {X_1^2 } & {X_2^2 } & \cdots & {X_d^2 } \\ \vdots & \vdots & \ddots & \vdots \\ {X_1^n } & {X_2^n } & \cdots & {X_d^n } \\ \end{array} } \right]$$
(34)

where, \({{\text{X}}}_{{\text{j}}}^{{\text{i}}}\) is the position of miner \({\text{i}}\) at \({\text{j}}\)th dimension. \({\text{n}}\) and \({\text{d}}\) denote the miners number and the dimension size, respectively.

When performing the optimization process, an objective function is required to assess the miners, and in the following Equation, the assessment values of the miners are recorded in an assessment matrix \({{\text{M}}}_{{\text{a}}}\).

$$M_a = \left[ {\begin{array}{*{20}c} {f(X_1^1 } & {X_2^1 } & \cdots & {X_d^1 )} \\ {f(X_1^2 } & {X_2^2 } & \cdots & {X_d^2 )} \\ \vdots & \vdots & \ddots & \vdots \\ {f(X_1^n } & {X_2^n } & \cdots & {X_d^n )} \\ \end{array} } \right]$$
(35)
  1. 2.

    Miners migration

Miners travel to a mine of gold once detecting it to extract gold from it, represented by Eq. (36). The position of the richest mine of gold is the perfect point in the search space during running the GRO. The most skilled miner’s position is considered a reliable indicator of the position of the most productive gold mine, as shown in Fig. 11.

$$X_i^{t + 1} = X_i^t + a_1 \cdot (C_1 \cdot X_b^t - X_i^t )$$
(36)

where, \({X}_{i}^{t+1}\) denotes the position of miner \({\text{i}}\) at current iteration \({\text{t}}\) and \({X}_{b}^{t}\) is the position of the most productive gold mine. Vector coefficients \({{\text{C}}}_{1}\) and \({{\text{a}}}_{1}\) are computed as follows:

$$a_1 = 1 + L_1 (R_1 - 0.5)$$
(37)
$$C_1 = 2R_2$$
(38)

where, \({{\text{R}}}_{1}\) and \({{\text{R}}}_{2}\) are a randomly chosen vectors that have value among (0 and 1). The following equation represents the convergence component Lq, which linearly drops from 2 to \(1/{{\text{Iteration}}}_{{\text{Max}}}\) for \({\text{q}}=1\) and non-linearly drops for \({\text{q}}>1\).

$$L_q = \left( {\frac{{Iteration_{Max} - Iteration}}{{Iteration_{Max} - 1}}} \right)^q \left( {2 - \frac{1}{{Iteration_{Max} }}} \right) + \frac{1}{{Iteration_{Max} }}$$
(39)
Fig. 11
figure 11

Schematic view of Eq. (38) [34]

  1. 3.

    Gold prospecting

Miners search for gold in various areas, and their positions can be used as a rough estimate for the gold mine position in mathematical models as follows:

$$X_i^{t + 1} = X_r^t + a_2 \cdot (X_i^t - X_r^t )$$
(40)

where, \({{\text{X}}}_{{\text{r}}}^{{\text{t}}}\) is the position of a randomly chosen miner \({\text{r}}\) at current iteration \({\text{t}}\) and \({{\text{a}}}_{2}\) denotes vector coefficient computed as follows:

$$a_2 = 2L_2 R_1 - L_2$$
(41)
  1. 4.

    Miners cooperation

The cooperation among miners during gold prospecting can be better understood through mathematical modeling of Eq. (42), which takes into account the teamwork involved in the process.

$$X_i^{t + 1} = X_i^t + R_1 \cdot (X_{g_2 }^t - X_{g_1 }^t )$$
(42)

where, \({{\text{X}}}_{{{\text{g}}}_{1}}^{{\text{t}}}\) and \({{\text{X}}}_{{{\text{g}}}_{2}}^{{\text{t}}}\) denote the position of two randomly chosen miners \({{\text{g}}}_{1}\) and \({{\text{g}}}_{2}\) at current iteration \({\text{t}}\).

The position of the miner is updated if there is an enhancement in the objective function’s value. Figure 12 shows the flowchart of GRO.

Fig. 12
figure 12

Flowchart of GRO

4 The location and input data of the proposed HES

A remote region in Egypt placed in the southwest of the Nile Valley and lies at 25°26′56″N, 30°32′24″E was taken as a case study for utilized optimizers’ evaluation to get the perfect size of suggested stand-alone HES. This region is located specifically in El-Kharga Oasis which is the capital of the New Valley and 230 km far from Qena as shown in Fig. 13. The simulation requires numerous input data, as presented in the next points:

  1. 1.

    Load per hour throughout the entire year (peak load is 375 kW). Figure 14 illustrates the load per hour for the entire day, which was taken from a remote region in El-Kharga Oasis.

  2. 2.

    Radiation and Temperature per hour throughout the entire year as shown in Figs. 15, and 16 [35].

  3. 3.

    Wind speed per hour at a height of 50 m throughout the entire year as shown in Fig. 17 [35].

  4. 4.

    Parameters of each component of the proposed HES, as summarized in Table 1 [36]. The proposed HES lifespan in this research study is set at 25 years, and the interest rate is set at 6%.

Fig. 13
figure 13

Location of the selected study region [37]

Fig. 14
figure 14

Winter and summer hourly load profile for the entire day

Fig. 15
figure 15

Radiation per hour for the remote region

Fig. 16
figure 16

Hourly Temperature for the remote region

Fig. 17
figure 17

Wind speed per hour for the remote region

Table 1 Input parameters of HES [36]

5 Simulation results and discussions

Three optimization approaches (CDO, DCCS and GRO) are applied to get the perfect one that gives optimum results. In this study, the optimum design of the suggested HES is described as \({{\text{N}}}_{{\text{pv}}}\), \({{\text{N}}}_{{\text{w}}}\), and capacity of (BS and diesel). For the assessment to be fair, both search agents and maximum iterations for the three techniques were selected to be 20 and 50, respectively. Furthermore, each technique’s parameters are the same. After 50 iterations for CDO, DCCS, and GRO, the final results and the comparison between the three optimization processes are tabulated in Table 2. DCCS provided the lowest (optimal) objective function of 0.22072 compared to the other two techniques and captured it after 43 iterations while CDO achieved the perfect solution of 0.22076 after 24 iterations as shown in Fig. 18. At last, the worst approach GRO caught its perfect solution of 0.22148 after 50 iterations. GRO is the fastest technique completing 50 iterations within 48 s coming after it, CDO took 49 s, and the last technique, DCCS got the 50 iterations after 99 s.

Table 2 The outcomes of the optimization approaches
Fig. 18
figure 18

Convergence performance of utilized optimization approaches

The perfect approach DCCS estimated the perfect \({\text{LPSP}}\) of \(1.5836*{10}^{-10}\) and optimal \({\text{COE}}\) of 0.199096 $/kWh, leading to \({\text{NPC}}\) of 5,798,740.7 $. CDO estimated an optimum \({\text{COE}}\) of 0.199121 $/kWh leading to \({\text{NPC}}\) of 5,799,461.2 $ and suitable \({\text{LPSP}}\) of \(4.4273*{10}^{-5}\) which matches the acceptable value (< 5%). GRO predicted \({\text{COE}}\) of 0.199363 $/kWh leading to \({\text{NPC}}\) of 5,806,511.7 $ and \({\text{LPSP}}\) of \(5.1943*{10}^{-4}\).

In the best approach for DCCS, Fig. 19 displays the hourly change of the power generated for the proposed HES components. This figure involves the power provided by a PV system (\({\text{Ppv}}\_{\text{sys}}\)), the actual output Power of the wind farm (\({{\text{P}}}_{{\text{wf}}}\)), the power of dump load (\({{\text{P}}}_{{\text{dump}}}\)), charging and discharging the energy of BS (\({{\text{E}}}_{{\text{ch}}}\) and \({\mathrm{ E}}_{{\text{dch}}}\)), the battery’s state (Eb), the generated power of DG (\({{\text{P}}}_{{\text{d}}}\)), DG fuel consumption (\({{\text{FC}}}_{{\text{d}}}\)), (DG Operation) is the state of DG ON (= 1) or OFF (= 0) and finally, inverter power (\({{\text{P}}}_{{\text{inv}}}\)). It is clear from the results that, the peak value of \({{\text{P}}}_{{\text{inv}}}\) =337 kW leading to \({{\text{P}}}_{{\text{R}}\_{\text{Inv}}}\) of 337 kW, and this proves cost-effective for the proposed four different scenarios to compute \({{\text{P}}}_{{\text{R}}\_{\text{Inv}}}\) overtaking the peak load of the load profile (375 kW) to compute \({{\text{P}}}_{{\text{R}}\_{\text{Inv}}}\).

Fig. 19
figure 19

DCCS technique results of an optimum design for 8760 h (1 year)

Figure 20 presents the results of DCCS for a particular summertime day (24-h) of operation. The curve of load profile for the entire day has a peak at 14.00 (3542 o’clock), where air conditioner devices are turned on and another peak at 18.00 (3546 o’clock), through the first hours of the night, where power difference among the power of each of a load and sustainable resources (\({{\text{P}}}_{{\text{dif}}}={{\text{P}}}_{{\text{l}}}-({{\text{P}}}_{{\text{wf}}}+{\text{Ppv}}\_{\text{sys}})\)) recorded its highest values and power from PV exactly zero so that, DG set is in operation to meet energy deficit. After 07.00 (3535 o’clock), while the sun comes and the output energy from PV is building up so DG becomes off and sustainable resources supply energy. In this period the battery system begins to recharge up to \({{\text{E}}}_{{\text{b}}\_{\text{max}}}\) and the dump load consumes the excess power once the BS is finishing its recharge. When \({{\text{P}}}_{{\text{dif}}}\) becomes positive the BS starts to discharge the energy down to \({{\text{E}}}_{{\text{b}}\_{\text{min}}}\), at which point DG resumes operation.

Fig. 20
figure 20

DCCS technique results for a specific summertime day (24-h) of operation

Figure 21 indicates a convergence curve of 30 separate times to run for the three applied algorithms. CDO, DCCS and GRO captured the perfect solution in the run no. 10, 26 and 25, respectively out of 30 separate runs as shown in Fig. 22. The standard deviation (SD) value of DCCS is \(2.894*{10}^{-6}\) and this proves DCCS stability compared with CDO and GRO which have SD of \(7.475*{10}^{-4}\) and \(1.574*{10}^{-3}\), respectively. In another statistical analysis, the average objective function of CDO, DCCS and GRO are 0.22144, 0.22072 and 0.22355, respectively.

Fig. 21
figure 21

Convergence performance of 30 separate times to run for the three utilized algorithms

Fig. 22
figure 22

Final results of 30 separate times to run for the three utilized algorithms

6 Conclusion

Novel optimizers were employed to optimize and design a suggested stand-alone HES, and their performance was analyzed and evaluated. The HES is consisting of PV, wind, BS, and DG which employed to supply power to loads in a remote area in the southern part of Egypt’s western desert. The cost indicator of COE and reliability indicator of LPSP are employed to assess the performance of the proposed optimizers. The minimization of LPSP and COE was achieved using three algorithms: CDO, DCCS, and GRO. The results conformed to the recommended constraints for the hybrid system, ensuring that, LPSP remained below 5% and \({{\text{P}}}_{{\text{dump}}}\) stayed under 4%. The comparison between these optimizers reveals that, DCCS delivers superior results. Based on the outcomes of the optimization process, the DCCS algorithm attained an optimal objective function value of 0.22072, achieving the lowest LPSP of \(1.5836*{10}^{-10}\) and the most negligible COE value of 0.199096 $/kWh leading to NPC of 5,798,740.7 $. The results demonstrate the effectiveness of the suggested strategies for managing energy to compute the rated power of the converter, overtaking the peak load of the load profile. In future studies, a comparison of new optimization algorithms with a detailed study of their effect on system performance will be planned by incorporating additional variables. Furthermore, a complete analysis of their economic feasibility studies will be conducted in terms of their ability to determine optimal sizing and efficiency during execution time. In order to improve the outcomes of the ideal design of energy systems, future work should include different formulations of the optimization issue that are studied while considering multiple objectives.