Introduction

DC microgrids are increasingly becoming more efficient and reliable, primarily due to the prevalence of DC loads and the DC output from various sources like renewable energy, storage systems, and fuel cells. Fuel cell (FC) systems are integral components within DC microgrids. The combination of solar energy with hydrogen, known for being a safe and sustainable storage system, forms the basis of hydrogen energy1,2. Although hydrogen is the third most abundant element on Earth, found in water, fossil fuels, and other minute entities, after oxygen and silicon3,4, hydrogen gas does not naturally exist in isolation, except within natural gas reservoirs5. This resource is garnering increasing global interest6.

Fuel cells are electrochemical devices that convert the chemical energy of hydrogen into electricity7,8. They are becoming increasingly popular across transportation, portable, and stationary applications due to their significant benefits such as high efficiency, clean and quiet operation, and high power and energy density9,10. Presently, the market features several types of fuel cells, with the most notable being proton exchange membrane FC (PEMFC)11, alkaline FC (AFC)12, solid oxide FC (SOFC)13, phosphoric acid fuel cell (PAFC)14,15, and microbial fuel cell (MFC)16,17.

Mann’s model is one of the semi-empirical models used to describe PEMFC performance, which consists of seven unknown parameters18. Accurately determining these parameters is crucial as the model’s precision is dependent on them. These parameters can be extracted using either meta-heuristic optimization algorithms or traditional analytical methods. Among the conventional methods are the stochastic method19, the input–output diffusive approach20, and the proper generalized decomposition approach21. Geem and colleagues22 employed the generalized reduced gradient method. However, these methods are often limited by their reliance on the initial conditions of the problem, the risk of converging to a local minimum, and their accuracy being contingent on the error of the differential equations’ solver5.

Given the limitations discussed earlier, numerous researchers have turned to meta-heuristic algorithms due to their flexibility with problem formulations, derivative-free nature, and applicability to diverse real-world engineering challenges23. Specific researchers have applied unique algorithms; EL-Fergany and colleagues adopted the grasshopper optimizer16, whale optimization algorithm17, and salp swarm optimizer24. Seleem and associates used the equilibrium optimizer in their research25, while Alsaidan applied the chaos game optimization technique26. Sultan and his team identified fuel cell parameters using improved chaotic electromagnetic field optimization27, and the artificial ecosystem optimizer was employed in another study28. Rao and colleagues used a shark smell optimizer for the PEMFC model29, Fahim and associates implemented the hunger games search algorithm30, and a novel circle search algorithm was explored in another study31.

Additionally, Ali and others proposed using a grey wolf optimizer (GWO) to achieve optimal PEMFC parameters32, Abaza and colleagues introduced a coyote optimization algorithm (COA) for solving the PEMFC problem33, and Zaki and associates utilized marine predators and political optimizers34. Chen and his team implemented a cuckoo search algorithm (CS)35, while Kandidayeni and colleagues employed both the firefly optimization algorithm (FOA) and shuffled frog leaping algorithm (SFLA) to model the PEMFC36, biogeography-based optimization algorithm (BBO) by Niu et al.37, and backtracking search algorithm (BSA) by Askarzadeh38, bird mating optimizer (BMO)39 and grouping-based global harmony search algorithm (GGHS)40. Chakraborty et al. applied differential evolution (DE) to find PEMFC parameters41, Priya et al., used flower pollination algorithm (FPA)42, Outeiro et al. employed simulated annealing optimization algorithm (SA)43.

The computational steps in many of the algorithms discussed earlier are lengthy and involve complex procedure44. Also, the nonlinearity characteristics of Proton Exchange Membrane Fuel Cells (PEMFC) make it difficult for a majority of meta-heuristic algorithms hence leading to several limitations. For instance, some of these features lead to premature convergence issues in some algorithms such as Cuckoo Search (CS)35, Firefly Optimization Algorithm (FOA)36 and Biogeography Based Optimization (BBO)37. On the other hand, Grey Wolf Optimizer (GWO)32, Shuffled Frog Leaping Algorithm(SFLA)36, Backtracking Search Algorithm(BSA)38 and Differential Evolution(DE)41 suffer from slow convergence rates.

In addition, there exist techniques that need intricate parameter settings and extensive tuning like Flower Pollination Algorithm(FPA)42, Bird Mating Optimizer(BMO)39,Simulated Annealing(SA)43. Also, there is a problem with approaches like CS35 and Grouping-Based Global Harmony Search (GGHS)40 which easily get trapped at local optimum solutions. Despite these problems, there are notable advantages. For example, The Grey Wolf Optimizer (GWO) as well as Coyote Optimization Algorithm (COA), are known for their simple variable tuning. Additionally, Jellyfish Search Optimizer, Shark Smell Optimizer and Neural Network Optimizer have low computational demands. Furthermore, rapid convergence speeds distinguish COA45, Marine Predator Optimizer (MPO) and Equilibrium optimizer (EO). Chaotic Slime Mold Algorithm (CSMA) has been successfully used for multi-disciplinary design optimization problems using chaotic sequences to enhance convergence and exploration capabilities46. The Improved Chaotic Harris Hawks Optimizer (ICHHO) also uses chaotic maps to avoid local optima and can be applied to complex numerical and engineering optimization tasks47. Furthermore, the Chaotic Slime Mould Optimizer (CSMO) is used to solve the unit commitment problem in an integrated power system with wind and electric vehicles, with the aid of chaos to improve search efficiency48. Wan et al. (2023) proposed an analysis method for optimizing water management in PEM fuel cells by examining different operating conditions to achieve optimal hydration states49. Zhang et al. (2023) introduced a multiple learning neural network algorithm to improve the accuracy of PEM fuel cell parameter estimation, offering a robust approach for model fidelity50. Furthermore, Waseem et al. (2023) reviewed the integration of fuel cells into hybrid electric vehicles, discussing critical challenges, policy implications, and future research opportunities51. Lastly, Qiu et al. (2023) outlined progress and identified challenges in multi-stack fuel cell systems for high-power applications, particularly focusing on energy management strategies52. A modified manta ray foraging optimization method has been demonstrated to improve parameter identification in PEMFC systems53 with better accuracy and stability. A recent study also introduced a modified slime mold algorithm for hydrogen powered PEMFCs, which showed significant improvements in terms of accuracy and convergence54. Additionally, the chaotic Rao optimization algorithm has been successfully utilized for steady state and dynamic characterization of PEMFC models, yielding useful information on the reliability and performance of PEMFC stacks under different conditions55.

Start with including some more recent studies from the last 3 to 5 years on optimization algorithms in PEMFC modeling. One of these would be references to later metaheuristic and hybrid approaches to Energy Systems for faster convergence speed, better solution accuracy, and stability. For example, studies of algorithms such as Mayfly Optimization Algorithm, Marine Predator Algorithm, Chaotic Harris Hawks Optimization, and others indicate that chaotic maps and adaptive strategies improve algorithm performance. However, these references could point out that, though these methods have succeeded in solving some optimization problems, there are difficulties with these complex engineering problems, such as PEMFCs.

They clearly outline the complex, nonlinear nature of PEMFC systems. The parameters of PEMFCs are interdependent, and include activation, ohmic, and concentration losses, which are different under different operating conditions. The dynamic behavior of PEMFCs under varying loads, pressures and temperatures, as well as the non-linear I-V relationship, make accurate parameter estimation difficult. This complexity, however, poses a challenge to traditional methods such as gradient based techniques or simple metaheuristics, which can suffer from premature convergence or entrapment in local optima, particularly when the search space is high dimensional and multi modal. Note that while such progress has been made, current algorithms are still lacking in directly balancing exploration (globally exploring a solution space) and exploitation (refining a solution with local refinements). A number of algorithms either do not have adequate global search capability and hence converge prematurely or have low convergence rates due to poor local search. For instance, the Grey Wolf Optimizer (GWO) and Differential Evolution (DE) algorithms may convergence slowly or need many parameter tuning, thus may be less practical for PEMFC applications that require real time control.

Artificial Hummingbird Algorithm (AHA)56 was selected as the primary algorithm for enhancement because of its unique adaptive mechanisms that match well with the complex and nonlinear nature of PEMFC parameter estimation. AHA is shown to have strong exploration and exploitation abilities, with an intrinsic multi-dimensional search approach based on the foraging behavior of hummingbirds. This enables efficient search space navigation, which prevents entrapment of the search in local optima and encourages global search capabilities. In addition, its framework is flexible to include more sophisticated strategies, e.g., sinusoidal chaotic mapping and Lévy flight, to enhance the convergence speed and accuracy. Although other algorithms exist, AHA structure lends itself naturally to the implementation of these improvements, and is therefore particularly well suited to the precise, time critical applications, such as PEMFC parameter estimation. In this study, the limitations of these algorithms are addressed by the development of the Lévy Chaotic Artificial Hummingbird Algorithm (LCAHA). LCAHA uses chaotic maps and Lévy flights, and couples them with cross update foraging strategies for both exploration and exploitation phases, thus increasing the likelihood of reaching a global optimal solution in a reasonable time. The chaotic map is used to start a random search; the Lévy flight searches globally to escape any local optima, and the cross-update foraging procures quick convergence. For PEMFC parameter estimation, precision and computational efficiency are particularly important, and this is especially so. The research conducted thus fulfills the need for a more robust, adaptive, and efficient optimization method, which LCAHA57 is shown to be a suitable solution to the complex optimization problems posed by PEMFC models. Furthermore, this paper provides a thorough comparison with existing methods in the literature to validate and verify the efficacy of these techniques. The following are some insights of the study:

  1. 1.

    The precise extraction of unknown PEMFC model parameters by minimizing the sum of squared errors between measured and simulated data.

  2. 2.

    Development of an accurate PEMFC model that replicates the electrical and electrochemical characteristics of actual PEMFC stacks, considering variations in pressure and temperature of the reactants.

  3. 3.

    An extensive comparative analysis of five optimization algorithms: LCAHA, Particle Swarm Optimization (PSO)58, Differential Evolution (DE)59, Grey Wolf Optimizer (GWO)60, and Sparrow Search Algorithm (SSA)61 for parameter extraction in PEMFC models.

  4. 4.

    Evaluation of the efficiency of the applied algorithms using six different PEMFC stacks: BCS 500W-PEM62, 500W-SR-12PEM63, Nedstack PS663, 12 W-HR-12 PEM64, 500WHORIZON PEM64, and 250W-stack65.

  5. 5.

    Presentation of comprehensive statistical analysis to validate the reliability of the applied algorithms.

  6. 6.

    Comparison of the results obtained from the proposed algorithm with those from various recent algorithms reported in the literature.

  7. 7.

    A competitive comparison highlighting the reliability of the applied algorithms in addressing the studied problem.

  8. 8.

    The main innovation of this study is the Lévy Chaotic Artificial Hummingbird Algorithm (LCAHA), a new multi strategy optimization method that combines sinusoidal chaotic mapping, Lévy flights and an advanced cross update foraging strategy. The integration of this method enhances both exploration and exploitation capabilities, and leads to a significant improvement in the accuracy and convergence speed of parameter estimation for PEMFC models as compared to existing methods.

The remainder of this paper is organized as follows: section "PEMFC Mathematical Modelling" outlines the mathematical model of PEMFC stacks and the objective function. Section "Enhanced artificial hummingbird algorithm" describes the optimization algorithms used. Section "Result Analysis and Discussion" presents the simulation results and dynamic performance of PEMFCs for each case study, along with a statistical analysis. Finally, section "Conclusion" draws the main conclusions of the research.

PEMFC mathematical modelling

In this section, we first provide a comprehensive description of the semi-empirical model and the specifications of the chosen Proton Exchange Membrane Fuel Cell (PEMFC). Following that, we define the objective function and discuss statistical comparison metrics, including Mean Biased Error (MBE) and the efficiency of the objective function.

Semi-empirical electrochemical model

The output voltage of the FC stack (\({V}_{fc})\) is obtained using Eq. (1),

$$V_{fc} = \left( {V_{Nernst} - V_{act} - V_{ohmic} - V_{con} } \right) \cdot N_{cell}$$
(1)

In this description, \({V}_{act}\)​ denotes the activation polarization caused by the slow reaction rates at the electrode surface, \({V}_{ohmic}\)​ refers to the ohmic polarization which accounts for the resistance encompassing all electrical and ionic conduction losses through the electrolyte, catalyst layers, cell interconnects, and contacts. \({V}_{con}\)​ indicates the concentration polarization linked to the variance in concentration between the fuel/air channel and the chemical species on the electrode surface, and \({N}_{cell}\) is the number of cells66. \({V}_{Nernst}\) represents the reversible cell voltage, also known as the Nernst voltage, which can be calculated using Eq. (2)67,68.

$$V_{Nernst} = 1.229 - 0.85 \times 10^{ - 3} \left( {T_{stack} - 298.15} \right) + 4.3085 \times 10^{ - 5} T_{stack} \left[ {ln\left( {p_{{H_{2} }} } \right) + 0.5ln\left( {p_{{O_{2} }} } \right)} \right]$$
(2)

In this context, \({T}_{stack}\)​ refers to the stack temperature measured in Kelvin (K), \({p}_{{H}_{2}}\) indicates the partial pressure of hydrogen in bars, and \({p}_{{O}_{2}}\) represents the partial pressure of oxygen, also measured in bars. The partial pressure of hydrogen is determined using Eq. (3).66.

$$p_{{H_{2} }} = 0.5 \cdot RH_{a} \cdot P_{{H_{2} O}}^{sat} \left[ {\left( {\exp \left( {\frac{{1.635\left( {\frac{{I_{fc} }}{{A_{cell} }}} \right)}}{{T_{stack}^{1.334} }}} \right) \times \frac{{RH_{a} \cdot P_{{H_{2} O}}^{sat} }}{{P_{a} }}} \right)^{ - 1} - 1} \right]$$
(3)

Calculating the partial pressure of oxygen at the cathode can be achieved by injecting pure oxygen into the FC’s cathode side according to Eq. (4).

$$p_{{O_{2} }} = P_{c} - \left( {RH_{c} \cdot P_{{H_{2} O}}^{sat} } \right) \cdot \left[ {\left( {\exp \left( {\frac{{4.192\left( {\frac{{I_{fc} }}{{A_{cell} }}} \right)}}{{T_{stack}^{1.334} }}} \right) \cdot \frac{{\left( {RH_{c} \cdot P_{{H_{2} O}}^{sat} } \right)}}{{P_{c} }}} \right)^{ - 1} - 1} \right]$$
(4)

If air replaces oxygen, the partial pressure of oxygen at the cathode may be computed using Eq. (5).

$$p_{{O_{2} }} = P_{c} - \left( {RH_{c} \cdot P_{{H_{2} O}}^{sat} } \right) - \frac{0.79}{{0.21}} \cdot p_{{O_{2} }} \cdot {\text{exp}}\left( {\frac{{0.291\left( {\frac{{I_{fc} }}{{A_{cell} }}} \right)}}{{T_{stack}^{0.832} }}} \right)$$
(5)

where \(R{H}_{a}\) and \(R{H}_{c}\) are the relative humidity of the vapours in the anode and cathode respectively. \({I}_{fc}\) is the current of operation of FC (A), \({A}_{cell}\) refers to the active cell area (cm2), \({P}_{a}\) represents pressure at anode (bar) while \({P}_{c}\) stands for pressure at cathode(bar). \({P}_{{H}_{2}O}^{sat}\) represent saturation pressure for water vapor (bar) which can be calculated as a function of stack temperature using Eq. (6).67,68.

$${\text{log}}_{10} \left( {P_{{H_{2} O}}^{sat} } \right) = 2.95 \times 10^{ - 2} \left( {T_{stack} - 273.15} \right) - 9.18 \times 10^{ - 5} \left( {T_{stack} - 273.15} \right)^{2} + 1.44 \times 10^{ - 7} \left( {T_{stack} - 273.15} \right)^{3} - 2.18$$
(6)

The Eq. given by (7)67 tells us that the activation polarization can be determined with the help of stack temperature and oxygen concentration.

$$V_{act} = - \left[ {\xi_{1} + \xi_{2} \cdot T_{stack} + \xi_{3} \cdot T_{stack} {\text{ln}}\left( {C_{{O_{2} }} } \right) + \xi_{4} \cdot T_{stack} \cdot {\text{ln}}\left( {I_{FC} } \right)} \right]$$
(7)

where \({\xi }_{k}(k=\text{1,2},\text{3,4})\) are coefficients of a semi-empirical equation derived from kinetic, thermodynamic and electrochemical theories69 and \({C}_{{O}_{2}}\) is the concentration of oxygen (mol ·cm − 3) that can be calculated by this equation67.

$$C_{{O_{2} }} = \left( {\frac{{p_{{O_{2} }} }}{5.08}} \right) \times 10^{6} {\text{exp}}\left( { - \frac{498}{{T_{stack} }}} \right)$$
(8)

As expressed in Eq. (9),67 the ohmic polarization relies on contact resistance, \({R}_{C}\) (Ω), and membrane resistance, \({R}_{m}\) (Ω).

$$V_{ohmic} = I_{FC} \cdot \left( {R_{m} + R_{C} } \right)$$
(9)

The membrane resistance depends on the resistivity of the membrane, \({\rho }_{m}\) (Ω.cm), membrane thickness, \(l\) (cm), and effective membrane area (cm2), which is shown in Eq. (10).

$$R_{m} = \frac{{\rho_{m} l}}{{A_{cell} }}$$
(10)

The membrane resistivity (\({\rho }_{m}\)) is calculated by using Eq. (11) for Nafion membranes.

$$\rho_{m} = \frac{{181.6\left[ {1 + 0.03\left( {\frac{{I_{fc} }}{{A_{cell} }}} \right) + 0.062\left( {\frac{{T_{stack} }}{303}} \right)^{2} \left( J \right)^{2.5} } \right]}}{{\left[ {\lambda - 0.643 - 3\left( {\frac{{I_{fc} }}{{A_{cell} }}} \right)} \right]\exp \left( {4.18\left( {\frac{{T_{stack} - 303}}{{T_{stack} }}} \right)} \right)}}$$
(11)

where \(\lambda\) is an adjustable parameter related to the membrane and its preparation process69. The concentration polarization is calculated using Eq. (12) 67.

$$V_{con} = - \beta {\text{ln}}\left( {1 - \frac{J}{{J_{max} }}} \right)$$
(12)

where \(\beta\) is the parametric coefficient (V) that depends on the cell and its operation state67, \(J\) is the actual current density (A \(\cdot\) cm−2), and \({J}_{max}\) is the maximum current density (A \(\cdot\) cm−2).

Fitness function definition

In this research, the parameters of the model are optimized using various versions of Particle Swarm Optimization (PSO) and Finite Difference Differential Evolution (FD-DE) to align the PEMFC model’s results with those found in the literature or provided by manufacturers, thereby improving the model. The output voltage is calculated at points corresponding to each current value using the mathematical formulas detailed in the section titled "Semi-empirical Electrochemical Model." Consequently, the proposed fitness function acts as an indicator of the quality of the estimated parameters. The Sum of Squared Errors (SSE), presented in Eq. (13), is chosen as the fitness function67.

$$SSE = Min\left( {\mathop \sum \limits_{i = 1}^{N} \left[ {V_{meas} \left( i \right) - V_{calc} \left( i \right)} \right]^{2} } \right)$$
(13)

In this context, \(N\) represents the total number of measured data points, \(i\) is the iteration counter, \({V}_{meas}\) is the measured voltage of the Fuel Cell (FC), and \({V}_{calc}\)​ refers to the voltage calculated for the FC. Additionally, various Multi-Attribute Decision Making (MADM) methods with differing foundational principles were outlined in the section "Ranking of the Algorithms." These methods are employed to determine the most effective Meta-Heuristic Algorithms (MHAs) for the H-1000 XP case study. The Mean Biased Error (MBE) is computed using Eq. (14).

$$MBE = \frac{{\mathop \sum \nolimits_{i = 1}^{N} \left| {V_{meas} \left( i \right) - V_{calc} \left( i \right)} \right|}}{N}$$
(14)

Enhanced artificial hummingbird algorithm

Principles of the artificial hummingbird algorithm

The first step of the Artificial Hummingbird Algorithm (AHA) is to generate candidate solutions that are distributed randomly. When an artificial hummingbird comes to a newer area, it will randomly find food sources in order to complete the establishment of colony. This behavior represents the first search for food sources. The process of initialization is given by Eq. (15):

$$x_{i} = LB + r \cdot \left( {UB - LB} \right)$$
(15)

Here, LB and UB represent the upper and lower bounds of the interval, respectively, while \(r\) is a random number between 0 and 1. The variable \({x}_{i}\)​ denotes the position identified by the \(i\) th hummingbird.

The visit table is put like this:

$$VT_{i,j} = \left\{ {\begin{array}{*{20}c} {0,} & {if\;i \ne j} \\ {null,} & {i = j} \\ \end{array} } \right.$$
(16)

For the first scenario, \({\text{VT}}_{ij}\)=null indicates that hummingbirds are feeding at a consistent food source and for the second scenario, \({\text{VT}}_{ij}\)=0 indicates that the \(i\)th hummingbird has recently explored the \(j\)th food source.

Three flight trajectories are used by hummingbirds for multidimensional space navigation. The axial flight is important because it allows the bird to move along the axis, as explained in Eq. (17).

$$D_{Af} ^{\left( i \right)} = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {{\text{if}}\;{ }i = {\text{Randi}}\left( {\left[ {1,d} \right]} \right)} \hfill \\ {0,} \hfill & {\text{else }} \hfill \\ \end{array} } \right.$$
(17)

The diagonal flight can be expressed by Eq. (18).

$$D_{Df} ^{\left( i \right)} = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {{\text{if}}\;i = G\left( j \right),\;j \in \left[ {1,c} \right],\;G = {\text{ Randperm }}\left( c \right)} \hfill \\ {0,} \hfill & {{\text{else }},} \hfill \\ \end{array} } \right.$$
(18)

The omnidirectional flight is expressed by Eq. (19).

$$D_{Of}^{\left( i \right)} = 1,{ }i = 1,2, \ldots ,n$$
(19)

In this model, \(c\) takes a number of values between 2 and \(\left[{r}_{1}(d-2)+1\right],\) where \(\text{Randi}([1,d])\) generates a random number between 1 and \(d\), whereas \(Randperm (c)\) generates an arrangement of numbers randomly chosen from the set of all whole numbers smaller than \(c\). \({r}_{1}\) is a randomly generated quantity that comes from within the interval (0,1).

The equation of the hummingbird’s candidate solutions update during guided foraging is illustrated in Eq. 20.

$$v_{i} \left( {t + 1} \right) = x_{{i,\;{\text{target}}}} + g \cdot D_{t} \cdot \left( {x_{i} \left( t \right) - x_{{i,\;{\text{target }}}} \left( t \right)} \right),\quad t \in \left\{ {Af,Df,Of} \right\}$$
(20)
$$g \sim N\left( {0,1} \right)$$
(21)

The position of the target solution is represented by \({x}_{i,\text{target}}(t)\) and \(g\) is a factor that guides it. The update formula, which applies when a hummingbird finds the target food source closer to its location, is given below:

$$x_{i} \left( {t + 1} \right) = \left\{ {\begin{array}{*{20}l} {x_{i} \left( t \right),} \hfill & {f\left( {x_{i} \left( t \right)} \right) \le f\left( {v_{i} \left( {t + 1} \right)} \right)} \hfill \\ {v_{i} \left( {t + 1} \right),} \hfill & {\text{else }} \hfill \\ \end{array} } \right.$$
(22)

The fitness values of the candidate solution \({x}_{i}(t)\) and the updated solution \({v}_{i}(t+1)\) are represented by \(f\left({x}_{i}(t)\right)\) and \(f\left({v}_{i}(t+1)\right)\) respectively.

The equation for revising candidate solutions through territorial foraging by hummingbirds is given in Eq. (23).

$$v_{i} \left( {t + 1} \right) = x_{i} + k \cdot D_{t} \cdot x_{i} \left( t \right),\quad t \in \left\{ {Af,Df,Of} \right\}$$
(23)
$$k \sim N\left( {0,1} \right)$$
(24)

\(k\) is a guiding parameter, and \({D}_{t}\) stands for one of the three modes of flight. The following outlines the strategy for insufficiently placed artificial hummingbirds migrating to another food source by way of migratory foraging.

$$x_{{\text{worst }}} \left( {t + 1} \right) = LB + r \cdot \left( {UB - LB} \right),\;{\text{when}}\;M = t$$
(25)

where \({x}_{\text{worst}}\) shows the candidate solution with lowest nectar refilling rate, \(t\) is the current iteration number and \(M\) denotes migration coefficient used in the proposed algorithm. Normally the value of \(M\) is set as \(M=2n\) where \(n\) represents population size.

LCAHA algorithm: framework

The Artificial Hummingbird Algorithm (AHA), which requires an improvement to handle engineering optimization problems that possess multiple local optimal solutions, is enhanced by means of a more advanced hybrid version called the multi-strategy hybrid AHA. In this version, sinusoidal chaotic maps, Lévy flight and cross-and-update foraging strategy have been integrated.

Sinusoidal chaotic map strategy

The unpredictable, unsteady and undetermined nature of such maps as chaotic mappings in nonlinear dynamics is well-known70. Chaotic variables are used to start the population of these maps and hence offer a more exhaustive searching process than random searches which heavily depend on probabilities71. Moreover, chaotic maps are made effective by their sensitivity to initial conditions and parameters72. This research utilizes one-dimensional mapping that is done using the sinusoidal chaotic map, which creates a wider exploration through iterative initialization process into the search space.

$$\left\{ {\begin{array}{*{20}l} {f_{j + 1} = \alpha f_{j}^{2} {\text{sin}}\left( {\pi f_{j} } \right)} \hfill \\ {f_{0} \in \left[ {0,1} \right],\alpha \in \left( {0,4} \right]} \hfill \\ \end{array} } \right.$$
(26)

where \(j\) represents the quantity of iterations. The formula increases the range of search through initiating process of iterations to understand what happens where.

The Lévy flight introduction

Lévy flight is a frequent behavior exhibited by many flying animals and is comprised of random walks with a heavy-tailed probability density function that encompasses lots of small steps as well as rare long jumps73,74,75. For populations that generally move toward predetermined food sources but have to search for new prey sites, this type of movement is very efficient76. As such, Lévy flight has extensively enhanced the efficiency of several Swarm Intelligence (SI) algorithms77.

By incorporating Lévy flight, the integration of guided foraging allows artificial hummingbirds to efficiently determine the precise area where target food sources are located, expand their survey areas, in surrounding regions and improve the diversity of search process as a whole. Guided foraging which includes Lévy flight is defined by Eq. (27).

$$v_{i} \left( {t + 1} \right) = x_{{i,\;{\text{target }}}} + \alpha \cdot {\text{ Levy}} \cdot D_{t} \cdot \left( {x_{i} \left( t \right) - x_{{i,\;{\text{target }}}} \left( t \right)} \right){, }\quad t \in \left\{ {Af,Df,Of} \right\}$$
(27)

where \(\alpha\) is set to 0.01.

$${\text{Levy}}\left( \beta \right) \sim u = t^{ - 1 - \beta } ,\;0 < \beta \le 2$$
(28)

Also, Lévy flight’s effect is influenced by two factors: the impact of uniform distribution on the flight direction and the influence of Lévy distribution on step length.

$$s = \frac{U}{{|V|^{1/\beta } }}$$
(29)

where \(U\) and \(V\) obey Gaussian distribution as illustrated in Eq. (30).

$$U \sim N\left( {0,\sigma_{U}^{2} } \right),\;V \sim N\left( {0,\sigma_{V}^{2} } \right)$$
(30)

where \({\sigma }_{U}\) and \({\sigma }_{V}\) satisfy Eqs. (31) and (32):

$$\sigma_{U} = \left( {\frac{{{\Gamma }\left( {1 + \beta } \right) \cdot {\text{sin}}\left( {\pi \cdot \beta /2} \right)}}{{{\Gamma }\left( {\left( {1 + \beta /2} \right) \cdot \beta \cdot 2^{{\left( {\beta - 1} \right)/2}} } \right)}}} \right)^{1/\beta }$$
(31)
$$\sigma_{V} = 1$$
(32)

where \(\Gamma\) represents the standard Gamma function, and β\betaβ is set at 1.578.

Cross and update foraging strategy

Crossover and update foraging strategies used in this study are conducted following the crossover operator from CSO. The operator employs previous iterations’ information to increase future search ability79. The crossover operator is an improved catalyst that effectively identifies the best quality solutions. It is divided into two parts, namely; horizontal and vertical operators80. These operators shift the population iteratively until they reach the optimum position. The Cross foraging simulates artificial hummingbirds exchanging positional information while Update foraging is how hummingbirds change their information processing due to a changing environment with which they interact during their lifetime in search of nectar. In this case, these strategies can reproduce both fundamental communication behaviors between artificial hummingbirds and environmental characteristics of nectar sources. During evolutionary iterations, potential new food locations found by hummingbird using movements across horizontal and vertical directions are considered as candidate honey sources.

Horizontal operator-based cross foraging strategy

Information trading among artificial hummingbirds is the main issue of this study. The horizontal operator acts as a bridge to span across the solution space and exchange some information. It’s called “cross foraging” because of the horizontal operator that discovered how population level information transfer can be efficient. This is why sharing the current feeding sources by two types of artificial hummingbirds enables them to know where a new source of honey may be found for influencing their positional updates. Hence, with this strategy, both birds can avoid local maxima by searching broadly. Therefore, we can characterize the updating mechanism for cross foraging as:

$$V_{hc} \left( {N_{1} ,j} \right) = r_{1} \cdot x\left( {N_{1} ,j} \right) + \left( {1 - r_{1} } \right) \cdot x\left( {N_{2} ,j} \right) + c_{1} \cdot \left( {x\left( {N_{1} ,j} \right) - x\left( {N_{2} ,j} \right)} \right),$$
(33)
$$V_{hc} \left( {N_{2} ,j} \right) = r_{2} \cdot x\left( {N_{2} ,j} \right) + \left( {1 - r_{2} } \right) \cdot x\left( {N_{1} ,j} \right) + c_{1} \cdot \left( {x\left( {N_{1} ,j} \right) - x\left( {N_{2} ,j} \right)} \right)$$
(34)

Two food sources \(x\left({N}_{1},j\right)\) and \(x\left({N}_{2},j\right)\) are presented after one iteration of applying horizontal operator in the \(dth\) dimension. In this case, \({r}_{1}\) and \({r}_{2}\) are random numbers between (0,1). Besides, \({c}_{1}\) and \({c}_{2}\) are stochastic coefficients for [-1, 1] and \({V}_{hc}\left({N}_{1},d\right)\) as well as \({V}_{hc}\left({N}_{2},d\right)\) are brand-new candidate honey sources because of information sharing between two hummingbirds.

With the help of expansion factors \({c}_{1}\) and \({c}_{2}\), a horizontal operator can find new positions at the hypercube edges with certain probability. This way, the LCAHA reduces its blind spots which could hinder hummingbirds from finding food sources. It greatly improves their global search ability.

Revised foraging strategy utilizing the vertical operator

To continue investigating the effects of changes in environmental information on flight behavior, a revised foraging strategy has been developed that includes a vertical operator mechanism. The flight of these man-made creatures is affected by the change in environmental conditions such as temperature, illumination and humidity when they are heading towards probable sources of nectar. These environmental factors alter their certainty towards these sources hence can change their path to be taken. As a result of this behavior, they might end up in unexplored regions where there is possibility of discovering new nectar sources. Artificial hummingbirds are able to enter previously unknown territories through an adaptive strategy which enhances global exploration and local exploitation capabilities. As well, it addresses problems connected with recurred stops during multiple iterations. This approach uniquely modifies the positions of nectar sources by applying two dimensional planes across different locations where there is food for them using vertical operations.

The revised strategy utilizes vertical manipulations in the dimensions \({d}_{1}\)​ and \({d}_{2}\)​ of an artificial hummingbird’s position \(x(i,:)\), updating the position of a new potential nectar source \({V}_{vc}(i)\) as outlined below:

$$V_{vc} \left( {i,d_{1} } \right) = c \cdot x_{{i,d_{1} }} + \left( {1 - c} \right) \cdot x_{{i,d_{2} }} ,{ }i \in M\left( {1,n} \right),{ }d_{1} ,d_{2} \in M\left( {1,{\text{Dim}}} \right)$$
(35)

where \(c\) represents a random number within the range \((\text{0,1})\). Here, \(n\) signifies the agents, and \(Dim\) refers to the design variables.

In this context, the population is normalized based on the upper and lower bounds of each design variable. Each vertical operation is dedicated to a single nectar source, avoiding the risk of disrupting another potentially optimal global dimension by exiting a locally optimal stale dimension.

Additionally, a competitive operator is introduced to manage the nectar-refilling dynamics between the new and existing nectar sources. A newly discovered nectar source by an artificial hummingbird is not immediately adopted; it is only considered if its nectar-refilling rate surpasses that of the current source. The mathematical expression for this competitive operator is given as:

$$x = \left\{ {\begin{array}{*{20}l} {V_{hv} ,} \hfill & {{\text{if }}\;f\left( {V_{hv} } \right) < f\left( x \right),} \hfill \\ {x,} \hfill & {{\text{if}}\;{ }f\left( {V_{hv} } \right) > f\left( x \right),} \hfill \\ \end{array} } \right.$$
(36)

where \({V}_{hv}\) is the candidate honey source obtained after competitive arithmetic.

Equilibrium between exploration and exploitation

Exploration and exploitation together form a comprehensive search strategy. The exploration mechanism extends the search by identifying and pushing candidate solutions towards unexplored areas far within the search space. Conversely, exploitation drives the solutions to converge towards the most promising regions identified. A careful equilibrium between these two opposing functions directs the algorithm towards optimal performance.

Initially, the inclusion of Lévy flight macro migration introduces frequent minor movements that diversify the motion of search agents. This strategy, adopted during the exploratory phase, allows candidate solutions to bypass local optima via the Lévy step size, enhancing the overall search effectiveness globally. This approach not only stabilizes the global search but also maintains a balance between exploration and exploitation. Moreover, the implementation of a horizontal operator within the cross-foraging strategy incorporates an expansion factor \({c}_{1}\)​, enabling the sampling of new positions at the hypercube’s edges with minimal probability. This tactic minimizes unsearchable blind spots by the primary agent, thereby boosting the global search capabilities of the Artificial Hummingbird Algorithm (AHA). Furthermore, the adoption of vertical operators ensures normalization of the hummingbird population based on each dimension’s upper and lower limits. Simultaneously, each vertical crossover operation produces a single new candidate solution, offering a chance for the search to escape local optima in stagnant dimensions without negatively impacting other dimensions that might represent the global optimum. The dual-stage enhancement effectively balances exploration and exploitation.

Optimization process steps for the LCAHA

In order to solve complex, high-dimensional engineering problems, the Artificial Hummingbird Algorithm (AHA) should tackle challenges such as local optima, slow convergence and limited exploration capabilities. A multi-strategy improved version of the AHA was developed for this purpose known as Hybrid Artificial Hummingbird Algorithm (LCAHA). This new approach includes sinusoidal chaotic maps, Lévy flight and advanced cross and update foraging strategies which have a number of advantages:

  1. 1.

    Improved Solution Distribution: Within the initial distribution in solution space sinusoidal chaos maps are integrated to cover more search area and lead to faster convergence towards optimum solution. Thus LCAHA has an increased convergence speed with higher accuracy.

  2. 2.

    Greater Population Diversity: The inclusion of Levy flight increases diversity among artificial hummingbird populations eliminating their premature convergence. As a result, rather than getting stuck on some suboptimal solutions LCAHA better escapes from local optima hence achieving more efficiency when it comes to identifying global optimal solutions at different stages of optimization process.

  3. 3.

    Better Exploration and Exploitation: The algorithm is improved by using cross and update foraging strategies that provide updated information about where the birds are located at both population level and dimension level resulting into balance between exploration and exploitation processes which enable detailed searching optimal solutions within the solution space.

The procedural steps for implementing LCAHA are as follows:

  • Step 1: Set initial LCAHA parameters: number of agents \(n\), design variables \(Dim\), boundaries of variables \((lb,ub)\), maximum iterations \(Max\_Iteration\), and migration coefficient \(M\).

  • Step 2: Randomly initialize \(n\) food sources using sinusoidal chaotic maps and set up the initial visit table per Eq. (16).

  • Step 3: Hummingbirds approach the nearest food source, assessing and recording the highest nectar-refilling rate and optimal food source \(best (x);\)

  • Step 4: During each iteration, generate a random number \({r}_{1}\)​ within [0,1]. Based on \({r}_{1}\)​, hummingbirds employ axial, diagonal, or omnidirectional flights as prescribed by Eqs. (17), (18), or (19), respectively.

  • Step 5: Generate another random \(r\) within [0,1]. If \(r\le 0.5\), hummingbirds engage in guided foraging via Eq. (27) using Lévy flight to assess nearby food sources.

  • Step 6: If \(r>0.5\), adjust the hummingbird’s location through territorial foraging as defined in Eq. (23), and assess the nectar-refilling rate of the new source. If it proves better, switch to the new optimal solution \(best\left(x\right)\) and reset the food source record.

  • Step 7: Every \(2n\) iterations, update the position by migratory foraging using Eq. (25), relocating the least efficient hummingbird to a new food source.

  • Step 8: Update positions and explore new food sources using Eqs. (35) and (36) through the cross and update foraging strategy, evaluating the nectar-refilling rate for potential updates.

  • Step 9: After each iteration, increase \(t\); if \(t\) exceeds \(Max\_Iteration\), declare the global minimum and optimum variables; if not, return to Step 4.

To distinctly outline the multi-strategy hybrid AHA, Algorithm 1 provides the pseudo-code for the advanced LCAHA.

Algorithm 1
figure a

The proposed LCAHA

Moreover, Fig. 1 depicts the flowchart of the LCAHA algorithm with emphasis on three essential improvement approaches. To begin with, algorithm parameters have been set up and initial evaluation has been done. Then, both global and local searches are performed by LCAHA. The iterative outcomes are refined through cross and update foraging strategy until the termination criteria is met which concludes the process. Eventually, in output mode, algorithm produces optimally improved solution. The use of parameters of chaotic mapping, Lévy flight, and the cross and update foraging strategy, where parameters such as the migration coefficient (M), guiding factors (α, g, k) and the sinusoidal chaotic map constant α (0–4) are set to guarantee efficient optimization. The contribution of these parameters is to improve the balance between exploration and exploitation of the LCAHA for PEMFC parameter estimation, which leads to the improvement of the convergence rate and accuracy.

Fig. 1
figure 1

Flowchart for the LCAHA.

Computational complexity of LCAHA

Five main aspects and among them are the initial phase, number of hummingbirds (\(n\)), Max_Iteration (\(M\)) and the number of design variables (\(d\)) determine time complexity of LCAHA algorithm. At the same time, before any iterations, metaheuristic algorithm initializes total dimensionality for all individuals in the population. The cost to initialize LCAHA is \(O(n \times d)\). Since an objective function’s form may depend on a problem type and can’t be standardized, its time complexity may not be a significant factor considered about it. According to the AHA introduction, at each iteration guided foraging or territorial foraging done with 50% chance have computational complexities of \(O(0.5M\times n\times d) and O(0.5M\times n\times d)\) respectively due to their position updates while migratory foraging only occurs in half iterations hence having complexity \(O(M\times d/2)\). Cross-foraging on the other hand has a complexity of \(O(M\times n\times d)\) since it swaps positions between pairs of individuals in population simultaneously. Changing from one foraging strategy into another takes place by updating only some dimensions thereby resulting in complexity \(O(M\times n)\), where only one update happens. Thus, overall this can be written as:

The computational complexity of LCAHA primarily hinges on five factors: the initialization phase, the number of hummingbirds \((n)\), maximum iterations \((M)\), and the number of design variables \((d)\). The initialization of the metaheuristic algorithm, which sets up the total dimensions for all individuals before beginning the iterations, has a complexity of \(O(n \times d)\). The complexity related to solving the objective function is not included here, as it varies depending on the problem type and cannot be universally applied. As detailed in AHA, guided and territorial foraging occurs during each iteration with equal probability, attributing a computational complexity of \(O(0.5M\times n\times d)\) and \(O(0.5M\times n\times d)\) for each. Furthermore, migratory foraging, conducted in half of the iterations, contributes a complexity of \(O(M\times d/2)\). Cross foraging, which involves positional exchanges between pairs of individuals, also adds a complexity of \(O(M\times n\times d)\). Update foraging, which adjusts specific dimensions, brings the complexity to O(M \(\times\) n). Thus, the overall complexity of LCAHA can be summarized as follows:

$$\begin{aligned} & O\left( {LCAHA} \right) = O\left( {Initializationphase} \right) + O\left( {objectivefunction} \right) + O\left( {guidedforaging} \right) \\ & \quad \quad + O\left( {territorialforaging} \right) + O\left( {migratoryforaging} \right) + O\left( {crossforaging} \right) \\ & \quad \quad + O\left( {updateforaging} \right) \\ & \quad = O\left( {n \times d} \right) + O\left( {0.5M \times n \times d} \right) + O\left( {0.5M \times n \times d} \right) + O\left( {M \times d/2} \right) + O\left( {M \times n \times d} \right) + O\left( {M \times n} \right) \\ & \quad = O\left( {n \times d + 2M \times n \times d + M \times d/2 + M \times n} \right) \approx O\left( {2M \times n \times d + M \times d/2 + M \times n} \right). \\ \end{aligned}$$

Result analysis and discussion

In this work an attempt has been made to exhaustively illustrate LCAHA algorithm and compare it with different highly applied algorithms like Particle Swarm Optimization (PSO)58, Differential Evaluation (DE)59, Grey Wolf Optimizer (GWO)60 and Sparrow Search Algorithm (SSA)61, applied for PEMFC modelling. The default parameter settings for different algorithms used in literatures are given in Table 1. All algorithms compared were set to their recommended to estimate the parameter of a PEMFC fuel cell (BCS 500W-PEM62, 500W-SR-12PEM63, Nedstack PS663, 12 W-HR-12 PEM64, 500WHORIZON PEM64 and 250W-stack65) presented in Table 2. All the experiments are carried out on Matlab 2021a of a PC with Windows Server 2019 operating system CPU i7-11700 k@3.6 GHz, maximum iterations 500, number of run 50 and population size 40.

Table 1 Default parameter settings of the compared algorithms.
Table 2 Characteristics of Six PEMFCs used in this work.

FC1: BCS 500W

According to Table 3, the LCAHA algorithm consistently delivers either the lowest or among the lowest values in all evaluated categories, showcasing its superior stability, precision, and effectiveness. The algorithm’s minimum value is recorded at 0.0254927, matching DE for the lowest among the compared algorithms, thereby illustrating its consistent ability to identify optimal solutions. The maximum value for LCAHA remains constant at 0.0254928, notably lower than those observed with PSO (0.1924899) and GWO (0.0364916), which highlights its capacity to avoid scenarios with high error rates. The mean value of LCAHA is also the most favorable at 0.0254927, confirming its ability to produce reliably accurate outcomes. Additionally, LCAHA exhibits remarkable stability, as evidenced by an extremely low standard deviation of 4.59E-08, much lower than those seen in PSO (0.053443) and DE (0.0061464), indicating its unparalleled precision. In terms of computational speed, LCAHA demonstrates impressive efficiency with a runtime of 2.8059648 s, which is faster than both DE, which takes 6.5825206 s, and SSA, which requires 5.9258096 s. Furthermore, LCAHA achieves the best Friedman rank (FR) at 1.2, solidifying its position as the most efficient algorithm across all considered measures. As evidenced by the data in Tables 3, 4, and Fig. 2, LCAHA not only excels in delivering top-tier results with minimal computational demand but also consistently outperforms other algorithms in terms of stability and efficiency, positioning it as the optimal choice for precision-critical and time-sensitive applications.

Table 3 Optimized parameters and optimal function value for FC1.
Table 4 Performance metrics of LCAHA Algorithm for FC1.
Fig. 2
figure 2

FC1 (a) V-I, P–V and Error Curve, (b) Convergence Curve, (c) Box-Plot.

FC2: NetStack PS6

Table 5 reveals that the LCAHA algorithm consistently records the lowest or nearly the lowest values, affirming its exceptional stability, precision, and effectiveness. LCAHA achieves a minimum value of 0.2752105, the best among all competing algorithms, illustrating its consistent capacity for identifying optimal solutions. Furthermore, this value also stands as the maximum, markedly better than PSO (0.6747868) and GWO (0.3155648), thus showcasing its strength in steering clear of high-error instances. The algorithm’s mean value, identical to its minimum and maximum, at 0.2752105, underscores its consistent accuracy in outcomes. LCAHA exhibits extraordinary stability, evidenced by an extremely low standard deviation of 2.51E-16, considerably lower than the variability seen in PSO (0.1917348) and DE (0.0199925), highlighting its superior precision. When it comes to computational speed, LCAHA shows great efficiency with a runtime of 3.9154243 s, outperforming GWO (9.410101 s) and SSA (8.2868594 s). Additionally, it achieves the highest Friedman rank (FR) of 1, further solidifying its status as the most effective algorithm across all evaluated measures. As detailed in Tables 5 and 6, and illustrated in Fig. 3, LCAHA not only excels in delivering outstanding results with minimal computational demands but also consistently surpasses other algorithms in terms of stability and efficiency. This makes it the premier choice for applications requiring high precision and time efficiency.

Table 5 Optimized parameters and optimal function value for FC2.
Table 6 Performance metrics of LCAHA Algorithm for FC2.
Fig. 3
figure 3

FC2 (a) V-I, P–V and Error Curve, (b) Convergence Curve, (c) Box-Plot.

FC3:SR-12

Table 7 demonstrates that the LCAHA algorithm achieves either the lowest or near-lowest values in every category, exemplifying its superb stability, precision, and efficiency. The algorithm records a minimum value of 0.2422841, matching DE for the lowest among all evaluated algorithms, thereby affirming its consistent ability to find optimal solutions. Moreover, LCAHA’s maximum value is notably low at 0.2429272, substantially better than PSO (1.028973) and GWO (0.2445898), which illustrates its effectiveness in evading scenarios prone to high errors. With the lowest mean value at 0.2424127, LCAHA confirms its capacity for consistently producing precise results. Remarkably stable, LCAHA shows a standard deviation of just 0.0002876, significantly less than the variations seen in PSO (0.3356485) and GWO (0.0009362), highlighting its unparalleled accuracy. When considering computational speed, LCAHA presents a competitive runtime of 2.6793874 s, faster than both DE (6.1672906 s) and SSA (5.915031 s). It also achieves a strong Friedman rank (FR) of 1.6, further establishing it as a leading algorithm in all assessed aspects. As shown in Tables 7 and 8 and depicted in Fig. 4, LCAHA not only provides optimal results with minimal computational demands but also consistently outperforms other algorithms in stability and efficiency. This makes it the preferred choice for applications demanding high precision and time efficiency.

Table 7 Optimized parameters and optimal function value for FC3.
Table 8 Performance metrics of LCAHA Algorithm for FC3.
Fig. 4
figure 4

FC3 (a) V-I, P–V and Error Curve, (b) Convergence Curve, (c) Box-Plot.

FC4:H-12

Table 9 illustrates that the LCAHA algorithm consistently ranks among the lowest or absolute lowest in every category, demonstrating its superior stability, precision, and efficiency. The algorithm’s minimum value stands at 0.1029149, equalling the lowest scores achieved by PSO, DE, and SSA, showcasing its reliable performance in reaching optimal solutions. Additionally, LCAHA’s maximum value remains at 0.1029149, significantly better than PSO (0.1072152) and GWO (0.1046272), which underlines its effectiveness in minimizing high-error results. The mean value for LCAHA also ranks as the lowest at 0.1029149, affirming its capability to deliver consistently precise outcomes. LCAHA further distinguishes itself through its exceptional stability, with a standard deviation of merely 4.22E-17, much lower than the variability encountered in PSO (0.0019782) and DE (0.0003977), thus reinforcing its unmatched accuracy. In terms of computational speed, LCAHA leads with a runtime of 2.4898632 s, outperforming DE (6.0140818 s) and SSA (5.8182958 s). It also achieves the best Friedman rank (FR) of 1.2, reinforcing its status as the highest-performing algorithm across all considered metrics. As presented in Tables 9 and 10 and depicted in Fig. 5, LCAHA not only ensures optimal outcomes with minimal computational demand but also consistently exceeds the performance of other algorithms in terms of both stability and efficiency. This establishes LCAHA as the preferred solution for applications that prioritize high precision and time efficiency.

Table 9 Optimized parameters and optimal function value for FC4.
Table 10 Performance metrics of LCAHA Algorithm for FC4.
Fig. 5
figure 5

FC4 (a) V-I, P–V and Error Curve, (b) Convergence Curve, (c) Box-Plot.

FC5: STD

Table 11 demonstrates that the LCAHA algorithm consistently posts the lowest or near-lowest scores across all categories, illustrating its outstanding stability, precision, and efficiency. LCAHA records a minimum value of 0.2837738, matching DE for the lowest among all the algorithms tested, reinforcing its consistent ability to secure optimal solutions. Furthermore, its maximum value also stands at 0.2837738, which significantly surpasses the performance of PSO (0.2913425) and GWO (0.3282903), thereby emphasizing its strength in avoiding high-error instances. The mean value for LCAHA remains the lowest at 0.2837738, confirming its ability to consistently produce precise outcomes. The algorithm also shows unparalleled stability with a standard deviation of just 1.59E-14, considerably lower than those recorded by PSO (0.0035844) and DE (0.0418689), which underscores its superior accuracy. In terms of computational time, LCAHA boasts the quickest runtime at 2.3362759 s, more efficient than DE (5.2500994 s) and SSA (4.9669823 s). Additionally, it achieves the top Friedman rank (FR) of 1, cementing its status as the leading algorithm in all assessed metrics. As shown in Tables 11 and 12, and Fig. 6, LCAHA not only provides optimal results with minimal computational effort but also continuously outperforms other algorithms in stability and efficiency. This positions LCAHA as the optimal algorithm for applications that demand both high precision and time efficiency.

Table 11 Optimized parameters and optimal function value for FC5.
Table 12 Performance metrics of LCAHA Algorithm for FC5.
Fig. 6
figure 6

FC5 (a) V-I, P–V and Error Curve, (b) Convergence Curve, (c) Box-Plot.

FC6:Horizon

In Fig. 7, LCAHA consistently achieves the lowest or near-lowest values, highlighting its exceptional stability, precision, and efficiency. The minimum value for LCAHA is 0.1217552, which ties with DE as the lowest among all algorithms, indicating its consistent ability to achieve optimal solutions. The maximum value for LCAHA is also the lowest at 0.1217552, significantly outperforming PSO (0.1359797) and GWO (0.1293204), showcasing its robustness in avoiding high-error scenarios. The mean value for LCAHA is the lowest at 0.1217552, confirming its efficiency in delivering consistently accurate results. Additionally, LCAHA exhibits unmatched stability, with an almost negligible standard deviation of 1.42E-13, far lower than the variability observed in PSO (0.0043719) and GWO (0.003028), emphasizing its superior precision. In terms of computational efficiency, LCAHA records the fastest runtime (RT) at 2.2898568 s, outperforming other algorithms such as DE (5.3359243 s) and SSA (5.3789802 s). Moreover, LCAHA secures a strong Friedman rank (FR) of 1.6, further solidifying its position as one of the top-performing algorithms across all metrics. Overall, as shown in Tables 13, 14, and Fig. 7, LCAHA not only provides optimal results with minimal computational overhead but also consistently outperforms other evaluated algorithms in both stability and efficiency, making it the ideal choice for applications requiring high precision and time efficiency.

Fig. 7
figure 7

FC6 (a) V-I, P–V and Error Curve, (b) Convergence Curve, (c) Box-Plot.

Table 13 Optimized parameters and optimal function value for FC6.
Table 14 Performance metrics of LCAHA Algorithm for FC6.

Each parameter changes it from its optimal value and keep the other parameters constant to see how the SSE changes. Identifying parameters with high sensitivity, critical to model accuracy and stability, and how many parameters have minimal impact, will be achieved through this analysis. These insights would improve our model’s robustness and help guide future optimization adjustments, especially for real time applications where parameter sensitivity affects system reliability.

Conclusion

Objective: The challenge of parameter estimation in Proton Exchange Membrane Fuel Cells (PEMFC) was addressed in this study, by using an optimized approach, which is the Lévy Chaotic Artificial Hummingbird Algorithm (LCAHA).

Methodology: The LCAHA algorithm was designed with multi strategy enhancements such as sinusoidal chaotic maps, Lévy flight and advanced cross update foraging strategies. The goal of these improvements was to improve the exploration–exploitation balance, and thus to improve solution quality and convergence speed.

Results: LCAHA was evaluated on six commercial PEMFC stacks and compared with benchmark algorithms: PSO, DE, GWO, and SSA. Sum of Squared Errors (SSE) between experimental and estimated model outputs was used as the fitness function. Key findings include:

  • Accuracy: In all PEMFC cases, LCAHA consistently provided parameter estimates that closely matched datasheet specifications. The mean SSE across all PEMFC models was 0.025 for LCAHA, showing a good fit to datasheet specifications.

  • Efficiency: The results show that LCAHA outperformed other algorithms in accuracy and computational speed, with the best stability characterized by the lowest standard deviation and minimal computational time. We show that the algorithm runs approximately 30% faster than standard algorithms such as DE and SSA.

  • Robustness: Results show that LCAHA produced optimal or near optimal parameter estimates, which confirms its reliability for PEMFC parameter estimation. Among tested algorithms, LCAHA showed the lowest standard deviation (4.59E-08), which means high reliability.

Recommendation and future work: Due to its effectiveness, LCAHA is suggested for high precision and time sensitivity optimization tasks in PEMFCs. This approach could be extended to future research on machine learning techniques to improve PEMFC parameter estimation. Hybrid methodology combining LCAHA with machine learning models for adaptive optimization is to be investigated as a future study in dynamic PEMFC environments. Further, the applicability of LCAHA may be extended to other fuel cell types, such as solid oxide fuel cells (SOFCs). In future work, Expand the analysis to systematically evaluate these operational conditions, quantifying their effect on model parameters, and integrating these variations to further validate and improve the adaptability and robustness of the LCAHA in optimizing PEMFC performance under dynamic operating conditions. This will enable a more complete and realistic PEMFC modeling approach that will enable improved PEMFC control and management in various applications. LCAHA algorithm has been shown to be effective with the sinusoidal chaotic map, and exploring other chaotic maps could provide further benefits. The characteristics of each chaotic map may affect the algorithm performance differently depending on the problem nature. Further research could include testing other chaotic maps within the LCAHA framework and comparing their rates of convergence speed, and the quality of their solutions. Future work could also compare these algorithms to genetic algorithms (GA) and other recent methods81. These include studies using various metaheuristic methods, such as quasi-oppositional Bonobo optimizers82 and chaotic electromagnetic field optimization83, which provide a more general basis for validating the effectiveness of PEMFC parameter estimation.