1 Introduction

Recently, solar energy became an important source of renewable energy in the world as it is used in different applications such as energy generation, self-sustained systems (e.g., water-pumping) as well as smart homes and water heating (Abbassi et al. 2018; Chen et al. 2019a). The increase in solar energy applications leads the need of obtaining accurate and reliable models to be used for the analysis and development of solar modules and its integrations. In this regard, as the characteristic of PV solar cell is similar to P–N junction characteristics so different types of models have been developed based on the number of diodes in the model (single (SD), double (DD) and triple diodes (TD)). In literature, different algorithms have been applied to estimate the parameters of SD and DD models to develop more and more accurate PN model. A comparative study for the most recent algorithms applied to SD and DD models has been presented in Abbassi et al. (2018). The SD model contains only five parameters. These parameters are two currents (photovoltaic current and diode current) and two resistors (series and shunt resistance) and the diffusion diode ideality factor. The SD model is considered a simple model due to it has a small number of parameters (Oliva et al. 2017; Li et al. 2013; Askarzadeh and Rezazadeh 2012). Although the SD model is simple in parameter estimation, some researchers tend to use the Double diode model. DD model has been developed to overcome the problems in the SD model by taking into consideration the recombination losses (Gupta et al. 2012; Jamadi et al. 2016). DD model represents the recombination losses by adding one diode to the SD model and raise the number of the model parameters to seven parameters instead of five parameters in the SD model. These two parameters are (second diode current and recombination factor). The accuracy achieved by the DD model is higher than SD, which gave the chance for the researchers to develop a triple diode model. The TD model has nine estimated parameters. In the TD model, one diode is added to the DD model to raise the number of diodes in the model to three. The third diode represents leakage current and grain boundaries. Using DD and TD models in estimating the parameters of solar cells is more complex but they give more accurate results than those obtained-based SD model. In the literature, several optimization algorithms have been applied to estimate the parameters of solar cell-based SD, DD and TD models (Qais et al. 2019; Omnia et al. 2018; Elazab et al. 2020; Allam et al. 2016; Abbassi et al. 2019, 2017; Ramadan et al. 2020). Allam et al. (2016), Moth-Flame Optimization Algorithm has been also used to estimate parameter of SD and DD and TD models. Abbassi et al. (2019), Salp Swarm-inspired algorithm has been adapted for parameter estimation of the DD model. Abbassi et al. (2017), comparative study to improve the SD model using genetic algorithm optimization algorithm has been presented. Ramadan et al. (2020), an enhancement teaching learn optimization algorithm has been developed for estimating the parameter of SD and DD. Many state-of-the-art methods have been developed for PV parameter estimation (Yu et al. 2019; Chen et al. 2019b; Liao et al. 2017; Zhang et al. 2020; Kler et al. 2017). Yu et al. (2019), a performance-guided JAYA (PGJAYA) algorithm has been proposed for extracting parameters of different PV models. Chen et al. (2019b), perturbed stochastic fractal search (PSFS) has been proposed to estimate the PV parameters in an optimization framework. Several hybrid optimization algorithms have been developed for solving the current optimization problem (Chen et al. 2018; Xu and Wang 2017; Ram et al. 2017a; Asaithambi and Rajappa 2018; Baygi et al. 2018; Muhsen et al. 2015; Xiong et al. 2018). Chen et al. (2018), a new hybrid teaching–learning-based artificial bee colony (TLABC) has been proposed for the solar PV parameter estimation problems. However, proposing more accurate algorithms for estimating PV parameters is still a hot research topic which needs more efforts. In general, metaheuristic algorithms are considered intelligent techniques, and they are inspired by observing the phenomena occurring in nature (Oliva et al. 2017, 2014; Kumar et al. 2017; Alam et al. 2015; Bana and Saini 2017; Qun et al. 2014). Harris hawk optimization algorithm has been considered one of recent and promising metaheuristic algorithms in literature (Heidari et al. 2019; Qais et al. 2020; Chen et al. 2020; Ridha et al. 2020). Its basic idea depends on the Harries Hawk hunting approach for its prey. HHO is a recent and a promising algorithm due to many reasons; the HHO theory is a population-based and doesn’t have access to partial derivatives which are too expensive to compute, so it is considered a gradient or derivative–free optimization technique. This advantage allows the application of HHO to any optimization problem subject to a proper formulation.

The performance of the algorithm has been tested on 29 benchmark problems in Heidari et al. (2019). Its performance has been tested for several real engineering problems (Heidari et al. 2019).

In literature, the HHO has been applied for PV parameter estimation. Qais et al. (2020), some of TD PV model parameters have been estimated using computation, and the rest of parameters have been estimated by HHO. Chen et al. (2020), a diversification-enhanced Harris Hawks Optimization (HHO) has been presented to estimate of SD and DD PV models. Ridha et al. (2020), a Boosted Harris Hawk’s Optimization (BHHO) technique has been proposed to estimate the parameters of the SD PV model.

In this paper, an Enhanced Harris Hawk optimization algorithm is proposed. The conventional Harris Hawk algorithm is based on Hawks ways in hunting and catching their preys. The HHO aims for searching locally around promising solutions. The main advantage of the proposed algorithm is the improvement in the exploitation phase of HHO by fluctuating toward or outward the best optimal solution using sine and cosine functions (Mirjalili 2016). EHHO improves the balance between exploration and exploitation phases and increases the chance of escaping from locale optima problem in the original HHO. Unlike the presented references for original or enhanced HHO application on PV model estimation (Qais et al. 2020; Chen et al. 2020; Ridha et al. 2020). Both of EHHO and HHO algorithms have been applied for estimating the PV parameters not only for one or two models but also for three different PV models SD, DD and TD. The accuracy of EHHO has been tested through real PV systems with different characteristics. For a fair comparison, the results of EHHO are compared with the conventional HHO and recent optimization techniques through the same applications and conditions. The main contribution of this paper can be summarized as follows:

  • EHHO is proposed to enhance the performance of conventional HHO in the exploitation phase by combining between HHO and SCA.

  • Different types of PV models are discussed, and their parameters estimation are considered the optimization problems.

  • The performance of EHHO has been tested through three applications; the first application is specialized to test the applicability of EHHO with complex models, and the others two applications are to test the applicability for different systems by applying EHHO to polycrystalline and monocrystalline PV systems.

  • By comparing obtained results, EHHO results are more accurate than the conventional HHO and other optimization algorithms.

The rest of this paper is arranged as follows. Section 2 describes the PV models, SD, DD and TD. Section 3 discusses the HHO and EHHO. The results and application are discussed in Sect. 4. Section 5 presents the conclusion.

2 Mathematical PV models

The need for developing accurate solar cell models makes the researchers do their bests in developing different solar cell models providing promising results. Each model has advantages and drawbacks (Et-torabi et al. 2017; Jordehi 2018). In this section, the most recent models in literature have been discussed. These models are arranged from simple to complex as SD, DD and TD.

2.1 SD model

The equivalent circuit of this model consists of one current source to represent the solar cell photo generation current (Iph), one diode for representing the P–N junction characteristics, equivalent series and shunt resistance are represented by Rs and Rsh, respectively. The equivalent circuit is shown in Fig. 1. The output current (It) is calculated through the following equations:

$$ I_{t} = I_{{{\text{ph}}}} - I_{{{\text{sd}}}} - I_{{{\text{sh}}}} $$
(1)
$$ I_{t} = I_{{{\text{ph}}}} - I_{{{\text{sd}}}} \left[ {\exp \left( {\frac{{q\left( {V_{t} + R_{{\text{s}}} *I_{t} } \right)}}{\eta *K*T}} \right) - 1} \right] - \frac{{\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{R_{{{\text{sh}}}} }} {.}$$
(2)
Fig. 1
figure 1

SD model

2.2 DD model

The DD model is differentiated from SD model by 2 diodes as shown in Fig. 2. This model is represented by (3) and (4).

$$ I_{t} = I_{{{\text{ph}}}} - I_{{{\text{d1}}}} - I_{{{\text{d2}}}} - I_{{{\text{sh}}}} $$
(3)
$$ I_{t} = I_{{{\text{ph}}}} - I_{{{\text{d1}}}} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{\eta_{1} *K*T}}} \right) - 1} \right] - I_{{{\text{d2}}}} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{\eta_{2} *K*T}}} \right) - 1} \right] - \frac{{\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{R_{{{\text{sh}}}} }} $$
(4)
Fig. 2
figure 2

DD model

2.3 TD model

The TD equivalent circuit is the same as DD taking into consideration the leakage current which represented by a third diode as shown in Fig. 3.

Fig. 3
figure 3

TD model mathematical model

Equation (5) and (6) describe the mathematical model of TD model

$$ I_{t} = I_{{{\text{ph}}}} - I_{{{\text{d1}}}} - I_{{{\text{d2}}}} - I_{{{\text{d3}}}} - I_{{{\text{sh}}}} $$
(5)
$$ \begin{aligned} I_{t} & = I_{{{\text{ph}}}} - I_{{{\text{d1}}}} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{\eta_{1} *K*T}}} \right) - 1} \right] - I_{{{\text{d2}}}} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{\eta_{2} *K*T}}} \right) - 1} \right] \\ & \quad - I_{{{\text{d3}}}} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{\eta_{3} *K*T}}} \right) - 1} \right] - \frac{{\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{R_{{{\text{sh}}}} }} \\ {.}\end{aligned} $$
(6)

3 Optimization algorithm

3.1 HHO

HHO optimization algorithm is inspired from Hawks ways in hunting and catching their preys. The conventional HHO algorithm is divided into two main phases, exploration and exploitation. The exploitation phase is divided into two phases (Hard passage and soft passage) (Heidari et al. 2019).

3.1.1 Explorations

In optimization algorithms, exploration is considered as a global search. In this phase, the algorithm explores the search space looking for good solutions. The hawk waits for monitors and looks for a suitable prey through two manners:

Exploration in random high trees and exploration depending on the position of rabbit and other hawks, as described in (7), consider q is a chance for each manner:

$$ x\left( {t + 1} \right) = \left\{ {\begin{array}{*{20}l} {x_{{{\text{rand}}}} \left( t \right) - r_{1} \left| {x_{{{\text{rand}}}} \left( t \right) - 2r_{2} x\left( t \right)} \right|} \hfill & {q \ge 0.5} \hfill \\ {\left( {x_{{{\text{rabbit}}}} \left( t \right) - x_{{\text{m}}} \left( t \right)} \right) - r_{3} \left( {{\text{LB}} + r_{4} \left( {{\text{UB}} - {\text{LB}}} \right)} \right)} \hfill & {q < 0.5} \hfill \\ \end{array} } \right. $$
(7)

where t is the iteration number, X (t) is the current position of hawk, X (t + 1) is the position of the hawk in the next iteration, Xrabbit(t) is the rabbit current position. Xrand(t) is a random position for hawk. Xm(t) is average position of hawk current position calculated using (8). LB is the lower limit of variables; UB is the upper limit of variables. r1, r2, r3, r4 and q are random values.

$$ x_{{\text{m}}} \left( t \right) = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} x_{i} \left( t \right) $$
(8)

where N is the number of hawks.

The transition between exploration and exploitation depends on the prey escaping energy.

$$ E = 2E_{0} \left( {1 - \frac{t}{T}} \right). $$
(9)

where E is the escaping energy, E0 is the initial energy, t is the current iteration, and T is the total number of iterations.

3.1.2 Exploitation

By comparison with the exploration phase, exploitation is considered a local search. In this phase, the algorithm refines the solution and tries to avoid big jumps in the search space. Exploitation phase starts when |E|≤ 1, during |E|> 1, the exploration phase continues. The exploitation phase achieves through 4 inner phases depending on escaping energy (E) and the chance of the prey successfully escaping (r).

  • Soft besiege

In this phase, the energy of prey is decreased but it still large enough to escape, |E|≥ 0.5, |r|≥ 0.5. At these conditions, the hawk tries to reduce the prey energy though soft circles. This catching manner is presented by (10).

$$ x\left( {t + 1} \right) = \Delta x\left( t \right) - E\left| {Jx_{{{\text{rabbit}}}} \left( t \right) - x\left( t \right)} \right| $$
(10)
$$ \Delta x\left( t \right) = x_{{{\text{rabbit}}}} \left( t \right) - x\left( t \right) $$
(11)
$$ J = 2\left( {1 - r_{5} } \right) $$
(12)

where ∆x(t) is the difference between rabbit current position and hawk current position. J is a value changed randomly in each iteration through r5 which is a random value between (0, 1) as shown in (11) and (12).

  • Hard besiege

In this phase, the energy of the prey decreased to a limit that the prey cannot escape |E|< 0.5, |r|≥ 0.5, hence the hawk uses hard circles to catch it as presented in (13)

$$ x\left( {t + 1} \right) = x_{{{\text{rabbit}}}} \left( t \right) - E\left| {\Delta x\left( t \right)} \right| $$
(13)
  • Soft besiege with progressive rapid dives

Sometimes when the rabbit still has enough escaping energy for successfully escaping, |E|≥ 0.5, |r|< 0.5. The hawk changes its current position to position (Y) through (14). But due to the rabid zigzag escaping movement of the prey, the hawk changes its current position to position (Z) through (15). Where (D) is the problem dimension, (S) is a random vector (1xD), and LF (D) is the levy flight function described by (16). The final position updating at this phase is described by (17).

$$ Y = x_{{{\text{rabbit}}}} \left( t \right) - E\left| {Jx_{{{\text{rabbit}}}} \left( t \right) - x\left( t \right)} \right| $$
(14)
$$ Z = Y + S \times {\text{LF}}\left( D \right) $$
(15)
$$ {\text{LF}}\left( x \right) = 0.01 \times \frac{\upsilon \times \sigma }{{\left| \nu \right|^{{\frac{1}{\beta }}} }},\sigma = \left( {\frac{{\Gamma \left( {1 + \beta } \right) \times \sin \left( {\frac{\pi \beta }{2}} \right)}}{{\Gamma \left( {\frac{1 + \beta }{2}} \right) \times \beta \times 2^{{\left( {\frac{\beta - 1}{2}} \right)}} }}} \right)^{{\frac{1}{\beta }}} $$
(16)

where \(\upsilon\), \(\nu\) are random values between (0, 1), and \(\beta\) is constant.

$$ x\left( {t + 1} \right) = \left\{ {\begin{array}{*{20}c} Y & {\quad {\text{if}}\quad F\left( Y \right) < F\left( {x\left( t \right)} \right)} \\ Z & {\quad {\text{if}}\quad F\left( Z \right) < F\left( {x\left( t \right)} \right)} \\ \end{array} } \right. $$
(17)
  • Hard besiege with progressive rapid dives

In this phase, it is maybe no escaping chance for the prey as its energy is decreased so much |E|< 0.5, |r|< 0.5. The hawk decreasing the circle of catching and update its positions by (17). Where positions (Z) and (Y) are described by (15) and (18), respectively.

$$ Y = x_{{{\text{rabbit}}}} \left( t \right) - E\left| {Jx_{{{\text{rabbit}}}} \left( t \right) - x_{{\text{m}}} \left( t \right)} \right| {.}$$
(18)

3.2 EHHO

Exploration and exploitation are necessary for metaheuristic optimization algorithms, where they are two conflicting milestones. The EHHO is improved performance of the conventional HHO. The HHO performs in two phases (Exploration phase and exploitation phase), and the enhance-HHO (EHHO) to improve performance of the HHO is performed on the exploitation phase. The exploitation phase aims for searching locally around promising solutions. The sine–cosine method has been applied in the exploitation phase. Where sine–cosine function creates different solutions and fluctuate outward or toward the best possible solution (Ramadan et al. 2020). The sine–cosine function is added to Eqs. (10) and (13). The proposed enhanced equation can be described as follows:

$$ x\left( {t + 1} \right) = x\left( t \right) + r_{1} \cos (r_{2} )\left| {x_{{{\text{rabbit}}}} \left( t \right) - x\left( t \right)} \right| $$
(19)

where r1 is constant and r2 = 2 * pi * rand (0, 1), rand is a random value changed in each iteration.

Hard besiege Eq. (13) is updated to Eq. (20)

$$ x\left( {t + 1} \right) = x\left( t \right) + r_{1} \sin (r_{2} )\left| {x_{{{\text{rabbit}}}} \left( t \right) - x\left( t \right)} \right| $$
(20)

The computational complexity of EHHO is the same as HHO (Heidari et al. 2019), initialization complexity, fitness evaluation complexity and updating complexity. Assume N number of hawk, T number of iterations and D problem dimension.

Initialization complexity: O(N).

Fitness evaluation complexity: O (T × N).

Updating complexity: O(T × N × D).

Total complexity of EHHO: O (N × (T + TD + 1)).

The overall process of the proposed EHHO can be summarized in the following steps as:

Step (1)

Input population size, number of decision variables, and Max. Iteration

Step (2)

Generate an initial population of a hawks Xi (solutions)

Step (3)

Set current iteration 1

Step (4)

Evaluate the fitness function value of hawks

Step (5)

Set Xrabbit as the location of rabbit (best location)

Step (6)

For each (Xi)Update the E0 and J and the E using (9)

Step (7)

Update solution of individual Xi using Eq. (16)

Step (8)

If the current iteration is less than the maximum number of iterations, then continue; else end

 

Exploration phase

Step (9)

If |E|< then update its solution using Eq. (9),

Step (10)

Exploitation phase

Step (11)

Else |E|< then go to the next steps

Step (12)

if (r ≥ 0.5 and |E|≥ 0.5) then update its solution using Eq. (19),

Step (13)

Else if (r ≥ 0.5 and |E|< 0.5) then update its solution using Eq. (20),

Step (14)

Else if (r < 0.5 and |E|≥ 0.5) then update its solution using Eq. (17),

Step (15)

Else if (r < 0.5 and |E|< 0.5) then update its solution using Eq. (18),

Step (16)

End If

Step (17)

End If

Step (18)

Evaluate the objective function value for each individual

Step (19)

Update the best solution found for Xrabbit

Step (20)

End If

Step 22)

Return Xrabbit

The SCA enhance the movement of hawk toward its prey as shown in Fig. 4. The flow chart of EHHO is shown in Fig. 5

Fig. 4
figure 4

Position update through hard besiege of EHHO

Fig. 5
figure 5

Flow chart of EHHO

4 Simulation results

To discuss the efficiency of the proposed algorithm, EHHO has been applied on 23 different benchmark test functions (Heidari et al. 2019). Table 1 present the results of EHHO and HHO for all functions, moreover two recent optimization algorithms. The two recent algorithms are social network search (SNS) algorithm (Talatahari et al. 2021) and wild horse optimizer (WHO) (Ramadan et al. 2021). By applying Wilcoxon rank-sum test at the 5% significance level (Chen et al. 2016). The results show that EHHO gives good results with many functions. For the best average (AVG) values of 30 independent runs, EHHO has 30.4%, HHO has 39.1%. For the best standard deviation (STD) values of 30 independent runs, EHHO has 52.1%, HHO has 21.7%, all the best values have been highlighted in bold. Table 2 presents the average time for 30 run (500 iterations in each run). “+”, “−” and “=” represents that the performance of EHHO is “better than”, “worse than” or “Equal to” the performance of HHO.

Table 1 Results of benchmark functions (F1–F23)
Table 2 Results of average running time (s) over 500 iteration

To discuss the applicability of the proposed algorithm for the different number of estimated parameters, three applications are achieved. In Application 1, the EHHO is applied for the three different PV models (SD, DD and TD). In Application 2 and 3, the proposed algorithm is applied to the polycrystalline and monocrystalline PV system through the complex model (TD model). A comparison between the proposed algorithm, original algorithm and other recent algorithms have been achieved at the same number of search agents (population size(NP)) as shown in Table 3 which presents the parameters setting for each compared algorithm.

Table 3 Parameter setting for each compared algorithm

4.1 Optimization problem

Based on the discussion in Sect. 2, there are three optimization problems, due to the different PV models, as follows:

4.1.1 SD model optimization problem

In SD model, five parameters are estimated [Rs, Rsh, Iph, Isd, n], and they can be represented in one vector x = [x1, x2, x3, x4, x5], hence the optimization problem is described by (21).

$$ f_{{{\text{SD}}}} \left( {V_{tm} ,I_{tm} ,X} \right) = I_{tm} - X_{3} + X_{4} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{X_{5} *K*T}}} \right) - 1} \right] + \frac{{\left( {V_{t} + X_{1} *I_{t} } \right)}}{{X_{2} }} $$
(21)

4.1.2 DD model optimization problem

In DD model, seven estimated parameters are considered [Rs, Rsh, Iph, Id1, Id2, n1, n2], and they can be represented in one vector x = [x1, x2, x3, x4, x5, x6, x7], hence the optimization problem is described by (22).

$$ f_{{{\text{DD}}}} \left( {V_{tm} ,I_{tm} ,X} \right) = I_{tm} - X_{3} + X_{4} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{X_{6} *K*T}}} \right) - 1} \right] + X_{5} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{X_{7} *K*T}}} \right) - 1} \right] + \frac{{\left( {V_{{\text{t}}} + X_{1} *I_{t} } \right)}}{{X_{2} }} $$
(22)

4.1.3 TD model optimization problem

In TD model, nine estimated parameters are considered [Rs, Rsh, Iph, Id1, Id2, Id3, n1, n2, n3], and they can be represented in one vector x = [x1, x2, x3, x4, x5, x6, x7, x8, x9], hence the optimization problem is described by (23).

$$ \begin{aligned} f_{{{\text{TD}}}} \left( {V_{tm} ,I_{tm} ,X} \right) & = I_{tm} - X_{3} + X_{4} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{X_{7} *K*T}}} \right) - 1} \right] + X_{5} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{X_{8} *K*T}}} \right) - 1} \right] \\ & \quad + X_{6} \left[ {\exp \left( {\frac{{q\left( {V_{{\text{t}}} + R_{{\text{s}}} *I_{t} } \right)}}{{X_{9} *K*T}}} \right) - 1} \right] + \frac{{\left( {V_{{\text{t}}} + X_{1} *I_{t} } \right)}}{{X_{2} }} \\ \end{aligned} $$
(23)

4.2 Application 1

In this application, the EHHO is applied for estimating the parameters of three PV models using real PV system data (Ramadan et al. 2020). In literature, many papers covering RTC France cell in their application, but with conditions differ from this paper, so their results have not covered here (Ćalasan et al. 2019; Gao et al. 2018; Ram et al. 2017b; Yu et al. 2017; Talatahari et al. 2021). A comparison between EHHO, HHO and other algorithms are implemented for SD, DD and TD models. For a comparison between results, the objective function is calculated for each algorithm by the information of the estimated parameters and the real output current. The most accurate objective function is that obtained from the most accurate estimated parameters. The validation process for the results of the proposed algorithm and other compared algorithms depends on different factors:

  • Comparing RMSE for the objective function calculated from the estimated parameters.

  • The absolute error between the real output current and the output current calculated from the parameter estimated from EHHO and HHO.

  • The convergence curves for each algorithm.

  • Calculating the minimum, average, maximum and standard deviation (STD) values and 30 run statistical results for each algorithm.

4.2.1 SD results

Table 4 presents the parameters estimated by EHHO, HHO and other algorithms. The real PV current and the output current for EHHO and HHO are listed in Table 5. The absolute error between the real output current and the output current calculated from the parameter estimated from EHHO and HHO have been shown in Fig. 6. The convergence curves of the best run of EHHO and HHO and other algorithms have been shown in Fig. 7. Table 6 represents the minimum, average, maximum and standard deviation (STD) values for 30 run statistical results. The RMSE values calculated for all run are figured in boxplot for each algorithm as shown in Fig. 8. (+) represents the outliers.

$$ {\text{RMSE}} = \sqrt {\frac{1}{N}\mathop \sum \limits_{K = 1}^{N} f^{2} \left( {V_{tm} ,I_{tm} ,X} \right)} $$
(24)
Table 4 Estimated parameter in case of SD obtained by different optimization algorithms
Table 5 The real and output current for each algorithm
Fig. 6
figure 6

PV output current absolute error for EHHO and HHO

Fig. 7
figure 7

Fitness function for SD model

Table 6 The statistical results of all algorithms
Fig. 8
figure 8

Boxplot for RMSE values of different algorithms for SD model

4.2.2 DD results

Table 7 presents the estimated parameters and RMSE for EHHO, HHO and other algorithms. The real and calculated current are presented in Table 8. Figure 9 displays absolute error for EHHO and HHO. The convergence curves are shown in Fig. 10. Table 9 represents the minimum, average, maximum and standard deviation (STD) values for 30 run statistical results. The RMSE values calculated for all run are figured in boxplot for each algorithm as shown in Fig. 11. (+) represents the outliers.

Table 7 Estimated parameter in case of DD obtained by different optimization algorithms
Table 8 The real and output current for proposed and conventional algorithm
Fig. 9
figure 9

PV output current absolute error for EHHO and HHO

Fig. 10
figure 10

Fitness function for DD model for different optimization algorithms

Table 9 The statistical results of all algorithms
Fig. 11
figure 11

Boxplot for RMSE values of different algorithms for DD model

4.2.3 TD results

Table 10 presents the estimated parameters and RMSE for EHHO, HHO and other algorithms. The real and calculated current are presented in Table 11. Figure 12 displays absolute error for EHHO and HHO. The convergence curves are shown in Fig. 13. Table 12 represents the minimum, average, maximum and standard deviation (STD) values for 30 run statistical results. The RMSE values calculated for all run are figured in boxplot for each algorithm as shown in Fig. 14, (+) represents the outliers. From the tables related with SD, DD and TD results, EHHO give an accurate estimated parameter as the RMSE for EHHO is less than that for HHO and other optimization algorithms as mentioned in each table, also the parameter estimated by EHHO for TD model is more accurate than other models. From the convergence curve and current absolute error figures, the EHHO has the less fitness function and less absolute error. The reliability of the EHHO has been cleared by comparing the statistical through statistical results tables and boxplot figures. The characteristic curve of the (current–voltage) and the power curve for the real PV and the most accurate model (TD) for different temperature are displayed in Figs. 15 and 16, respectively.

Table 10 Estimated parameter in case of TD obtained by different optimization algorithms
Table 11 The real and output current for proposed and conventional algorithm
Fig. 12
figure 12

PV output current absolute error for EHHO and HHO

Fig. 13
figure 13

Fitness function of TD model for different optimization algorithms

Table 12 The statistical results of all algorithms
Fig. 14
figure 14

Boxplot for RMSE values of different algorithms for TD model

Fig. 15
figure 15

Characteristic curve of real system and TD model at different temperature

Fig. 16
figure 16

Power curve for real system and TD model at different temperature

4.3 Application 2

In this application, EHHO is applied to monocrystalline PV panel STM6-40/36 (Ramadan et al. 2020). Table 13 displays the results of EHHO which is better than HHO and other algorithms for parameter estimation of TD model. By comparing RMSE of EHHO for TD model with TLBO and PSO, they give the same results and better than others. Table 14 presents the real and calculated current for EHHO and HHO. The fitness function for EHHO and other optimization algorithms and current absolute error of TD model for EHHO and HHO are shown in Figs. 17 and 18, respectively. Table 15 represents the minimum, average, maximum and standard deviation (STD) values for 30 run statistical results. The RMSE values calculated for all run are figured in boxplot for each algorithm as shown in Fig. 19, (+) represents the outliers. The characteristic curve and power curve for the monocrystalline PV panel and estimated TD model by the proposed algorithm at different temperatures are displayed in Figs. 20 and 21, respectively.

Table 13 Estimated parameter in case of TD obtained by different optimization algorithms
Table 14 The real and output current for the proposed and conventional algorithm
Fig. 17
figure 17

The fitness function of TD model for different optimization algorithms

Fig. 18
figure 18

PV output current absolute error for proposed and conventional algorithms

Table 15 The statistical results of all algorithms
Fig. 19
figure 19

Boxplot for RMSE values of different algorithms for TD model

Fig. 20
figure 20

Characteristic curve for real system and TD model at different temperature

Fig. 21
figure 21

Power curve for real system and TD model at different temperatures

4.4 Application 3

In this application, the proposed EHHO is applied to polycrystalline PV panel STM6-120/36 (Ramadan et al. 2020). The panel has open circuit voltage Voc = 19.21, and short circuit current Isc = 7.48A. The measured data from the panel at temperature 55C are listed in Table 16. Also, the calculated output current from the estimated parameter of TD model using EHHO and HHO are presented in Table 16. The estimated parameters and the calculated RMSE values for TD model obtained by EHHO and HHO and other algorithms have been listed in Table 17.

Table 16 The real and output current for proposed and conventional algorithms
Table 17 Estimated parameter in case of TD obtained by different optimization algorithms

From Tables 15 and 16, it is can be observed that the estimated parameter for TD model obtained by EHHO is more accurate than those obtained by HHO, this also clearer from convergence and current absolute error curves which have been shown in Figs. 22 and 23, respectively. By comparing RMSE of EHHO for TD model with RMSE for different algorithms, the TD model using EHHO gives the same results as TLBO and more accurate model than others. Table 18 represents the minimum, average, maximum and standard deviation (STD) values for 30 run statistical results. The RMSE values calculated for all run are figured in boxplot for each algorithm as shown in Fig. 24. The characteristic and power curves for the polycrystalline PV panel and estimated TD model by the proposed algorithm at different temperatures are displayed in Figs. 25 and 26, respectively.

Fig. 22
figure 22

The fitness function of TD model for different optimization algorithms

Fig. 23
figure 23

PV output current absolute error for proposed and conventional algorithms

Table 18 The statistical results of all algorithms
Fig. 24
figure 24

Boxplot for RMSE values of different algorithms for TD model

Fig. 25
figure 25

The characteristic curve for the real and optimized TD model by EHHA at different temperatures

Fig. 26
figure 26

Power curve for real system and optimized TD model by EHHA at different temperature

5 Conclusion

In this paper, an enhanced version for the Harris Hawk-Based Optimization Algorithm, called EHHO, has been proposed and applied for solving the optimal parameter estimation of different PV models. The proposed algorithm aims to improve the exploitation phase of conventional HHO by fluctuating toward or outward the best optimal solution using sine and cosine functions. The EHHO has been tested through parameter estimation of SD, DD and TD models of the real PV system. In addition, it has been applied for estimating the parameters for Monocrystalline and polycrystalline PV panels through TD model. The results have been compared by several criteria as follows: comparing the best RMSE for the objective function, comparing the Absolute Error of the calculated and the real output current and comparing the statistical results of RMSE in 30 independent runs. The results obtained by EHHO have been compared with the conventional HHO and other recent algorithms including SOA, TLBO, PSO, MRFO, TSA and WCA. In all cases, the results obtained by EHHO are more accurate than those obtained by the conventional HHO and other optimization algorithms. It is observed that the results for TD model are more accurate than SD and DD models.