Parameter characterization of PEM fuel cell mathematical models using an orthogonal learning-based GOOSE algorithm

In this paper, a new method is designed to effectively determine the parameters of proton exchange membrane fuel cells (PEMFCs), i.e., \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\xi }_{1}$$\end{document}ξ1, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\xi }_{2}$$\end{document}ξ2, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\xi }_{3}$$\end{document}ξ3, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\xi }_{4}$$\end{document}ξ4, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R}_{\text{C}}$$\end{document}RC, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda$$\end{document}λ, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$b$$\end{document}b. The fuel cells (FCs) involve multiple variable quantities with complex non-linear behaviours, demanding accurate modelling to ensure optimal operation. An accurate model of these FCs is essential to evaluate their performance accurately. Furthermore, the design of the FCs significantly impacts simulation studies, which are crucial for various technological applications. This study proposed an improved parameter estimation procedure for PEMFCs by using the GOOSE algorithm, which was inspired by the adaptive behaviours found in geese during their relaxing and foraging times. The orthogonal learning mechanism improves the performance of the original GOOSE algorithm. This FC model uses the root mean squared error as the objective function for optimizing the unknown parameters. In order to validate the proposed algorithm, a number of experiments using various datasets were conducted and compared the outcomes with different state-of-the-art algorithms. The outcomes indicate that the proposed GOOSE algorithm not only produced promising results but also exhibited superior performance in comparison to other similar algorithms. This approach demonstrates the ability of the GOOSE algorithm to simulate complex systems and enhances the robustness and adaptability of the simulation tool by integrating essential behaviours into the computational framework. The proposed strategy facilitates the development of more accurate and effective advancements in the utilization of FCs.


Addressing research gaps with OLGOOSE
The authors reviewed existing studies on parameter identification for PEMFCs and found several limitations.Many current methods struggle to achieve high accuracy due to the complex and non-linear nature of PEMFCs.These methods often require extensive computational resources and time, making them impractical for realtime applications or large-scale simulations.Additionally, the reliability of the parameter estimates can vary significantly, leading to less robust models.Furthermore, some methods are highly specific to certain types of PEMFC models and do not generalize well to other models or conditions.The proposed OLGOOSE algorithm addresses these gaps in several ways.First, by integrating an orthogonal learning mechanism, the OLGOOSE algorithm enhances the optimization process, resulting in more precise parameter estimates.This improvement in accuracy is crucial for developing reliable PEMFC models.Second, the OLGOOSE algorithm is designed to be computationally efficient, reducing the time required for parameter estimation and making it appropriate for real-time claims and large-scale simulations.Third, the adaptive behaviour and robust optimization framework of the OLGOOSE algorithm increase the reliability of the parameter estimates, ensuring consistent and dependable performance under various operating conditions.Finally, the versatility of the OLGOOSE algorithm allows it to be applied to various empirical and semi-empirical PEMFC models, making it a valuable tool for researchers and engineers working with different types of fuel cell systems and conditions.
The main contributions of this paper are outlined as follows: • Proposes a robust methodology employing the OLGOOSE algorithm to estimate the most accurate param- eters of PEMFC models.• Demonstrates the dominance of the OLGOOSE algorithm in finding the optimal parameters for various PEMFC models, showcasing its enhanced performance compared to traditional methods.• Checking the reliability and strength of the OLGOOSE, the convergence curve, I-V, and P-I curves are obtained.• Provide a comprehensive comparison of the OLGOOSE algorithm with other prominent optimization tech- niques.
The structure of this paper is organized into several parts for clarity and depth: Section "Modelling and problem formulation" details the model of the fuel cell.Section "Modelling and problem formulation" also delves into mathematical modelling, including the definition of the objective function.Section "Orthogonal learning based GOOSE algorithm" describes the implementation of the proposed OLGOOSE algorithm used in this study.Section "Results and discussions" examines the performance of the proposed strategy through empirical testing and also presents a comparison of the results obtained with those from recently published algorithms.The paper concludes with Section "Conclusions", where the findings are summarized and potential future work is discussed.

Modelling and problem formulation
Building upon the foundational semi-empirical models by [8][9][10][11] , this study proposes an improved parameter estimation procedure.In a PEMFC, the core components are the anode and cathode, which are separated by a polymer electrolyte membrane, as depicted in Fig. 1.The operational mechanics involve hydrogen being introduced at the anode side while oxygen is fed into the cathode.The polymer electrolyte membrane serves a dual role: it conducts ions between the two electrodes and acts as a barrier to electron flow, ensuring that electrons must travel through an external circuit, thus generating electrical output 85 .The PEMFC functions based on a series of electrochemical reactions.At the anode, hydrogen molecules are split into protons and electrons.The polymer www.nature.com/scientificreports/membrane allows protons to pass through to the cathode, but electrons are forced to travel around the external circuit, creating an electric current.At the cathode, these electrons recombine with the protons and oxygen to form water, completing the chemical process 86 .At the anode, the reaction is represented by Eq. ( 1), and it describes the separation of hydrogen molecules into protons and electrons.
Equation 2 provides the reaction at the cathode, and it illustrates the reduction of oxygen and the combination with protons and electrons to form water. Equation 3 gives the chemical reaction that represents the total electrical energy generation.This reaction summarizes the complete process occurring within the PEMFC, from hydrogen oxidation at the anode to water formation at the cathode.These reactions underscore the continuous movement of ions and electrons within the fuel cell, which is essential for the production of electricity, thereby highlighting the complex yet efficient nature of PEMFCs in energy conversion 24 .The electrical generation is given by Eq. (4).
In the operation of an FC, the terminal voltage V fc is composed of several distinct components, each represent- ing different types of voltage losses, as outlined in Eq. ( 4).These components are crucial for understanding how an FC converts chemical energy into electrical energy efficiently: (i) E Nernst is the adjustable open-circuit voltage, which is the ideal value that the fuel cell would produce if there were no losses due to the cell's operation; (ii) V act is the activation voltage drop, this component arises from the energy barrier that must be overcome to initiate the electrochemical reactions at the electrodes.V act includes the activation losses from both the anode and the cathode.At the anode, hydrogen molecules are oxidized, as described by Eq. (1), while at the cathode, oxygen molecules are reduced, as described by Eq. (2).The overall reaction for the PEMFC, which results in electricity generation, is provided in Eq. ( 3).This comprehensive reaction highlights the continuous ion and electron movement essential for the efficient energy conversion process in PEMFCs; (iii) V ohm is the ohmic voltage drop, which occurs due to the resistance to the flow of ions through the electrolyte and the resistance to the flow of electrons in the external circuit; (iv) V con represents the concentration voltage drop, which happens when there are variations in the concentration of reactants at the electrode surfaces.Together, these components determine the actual operating voltage of the FC, highlighting the various inefficiencies that can occur during its operation.The expression for E Nernst is provided in Eq. (5).
where E 0 is the standard reference voltage at standard conditions, G is the change in Gibbs free energy, which is a function of temperature and pressure, Z is the number of electrons transferred in the reaction, and F is the Faraday constant, which represents the electric charge per mole of electrons.E r represents the reference voltage (standard cell potential) utilizing total Gibbs free energy and it is indeed a function of reaction pressure and temperature, and fluctuations in these parameters can significantly impact the reference voltage.The dependency of E r on temperature and pressure is given by E r (T, P) .The reversible thermodynamic potential for the reaction between oxygen and hydrogen in a fuel cell is determined by the Nernst equation, as illustrated in Eq. ( 6).In (1) this equation, R signifies the universal gas coefficient, T c indicates the cell temperature in K and P H 2 and P O 2 are the partial pressures of hydrogen and oxygen, respectively.Equation ( 5) can be rewritten to account for these variables in a more detailed form explicitly.
The Nernst potential E Nernst is expressed as a function of temperature and partial pressures of hydrogen and oxygen.Equation ( 7) incorporates the standard reference potential (1.229 V) and adjusts for temperature variations with the term −8.5 × 10 −4 (T c − 298.15) .The pressure dependencies are reflected in the logarithmic terms involving P H 2 and P O 2 , scaled by 4.385 × 10 −5 T c .This formulation ensures an accurate representation of the Nernst potential under varying reaction pressures and temperatures.The partial pressures of oxygen and hydrogen within a PEMFC are detailed in Eqs. ( 8) and (9), respectively.
where PH anode and PH cathode represent the partial pressures of hydrogen and oxygen at the anode and cathode inputs, respectively, P anode and P cathode represent the total pressures at the anode and cathode sides, respectively, P H 2 O represents the partial pressure of water vapour within the system, i represents the electrical current density produced by the PEMFC, and A denotes the membrane's surface area, both of which play crucial roles in the overall functionality of the cell.The partial pressure of water vapour within the system is elaborated in Eq. (10).The partial pressure of water within the system is determined using the following equation.
Figure 2 displays the simulated current-voltage (I-V) characteristics of a single cell within a PEMFC stack based on the input fuel pressures.When the current level is low, the ohmic loss is less significant because the chemical reactions occurring at the electrode surface proceed at a slower rate.The activation potential (V act ) characterizes this reduced rate of reaction, a phenomenon which occurs in what is known as the active polarization region.The formula to calculate this overall activation potential is provided in Eq. (11).
where ξ 1 , ξ 2 , ξ 3 , and ξ 4 are the semi-empirical factors, i 0 signifies the exchange current density, α is the charge transfer factor, and i is the current density.The oxygen concentration C O 2 at the interface of catalyst and cathode is provided in Eq. ( 12).
The ohmic region in an FC is characterized by a linear slope that lies between the concentration and the active regions.This region is defined by the losses that occur due to the resistance faced by electrons passing through the ( 7) www.nature.com/scientificreports/external circuit and ions moving through the electrolyte.These resistances lead to a direct and linear relationship between the voltage drop and the current.Consequently, the ohmic loss, denoted as V ohm , is expressed in Eq. (13).
where, R m represents the electronic resistance while R c refers to the contact resistance or ionic resistance meas- ured in cm −2 .The value of R m , presented in Eq. ( 14), varies with minor changes in current or voltage and is a typical resistance characteristic.
where represents the membrane water content, which is influenced by the stoichiometric ratio of the feed gas at the anode and the relative humidity.Additionally, ρ m signifies the membrane-specific resistivity, measured in (� • cm) .When the current density is extremely high, a notable voltage drop occurs due to the diminished efficiency of gas exchange, often caused by water flooding the catalyst and it is identified as the concentration region.The associated voltage loss, referred to as both mass transport loss and concentration loss, is calculated using Eq. ( 16).
where i represents the actual current density and i max denotes the maximum achievable current density, meas- ured in A/cm 2 .The parameter b = RT c /F is a voltage coefficient whose value varies depending on the different working conditions of the FC.The schematic circuit illustrated in Fig. 1 includes the equivalent concentration resistance (R Con ) and the equivalent activation resistance (R act ) .The voltage drops across R act and R act is denoted as V Con .In order to reduce variability in V Con , a capacitance C is utilized, which also demonstrates an Electro- chemical double-layer capacitance effect as a result of the arrangement of electrodes and the membrane.E Nernst denotes the Nernst voltage, which is also referred to as the thermal or open circuit voltage.The utilization of this analogous circuit is essential for examining the consistent state and active characteristics of the fuel cell.The FC numerical model integrates computational dynamics to tackle the details of charge transport, multidimensional mass and electrochemical kinetics, all of which are interconnected in a temperature-dependent manner.These aspects provide complex difficulties that can be effectively tackled by modern algorithms that can provide precise outcomes with efficient convergence rates.The performance of PEMFCs is highly dependent on efficient water management.Inadequate management can result in significant flooding, causing a substantial increase in the current density within flooded regions, up to 4.7 times larger than in non-flooded areas, resulting in extensive degradation of the FC's performance.
Combining all these elements, it is possible to get the relationship between the cell voltage ( V fc ) and current density ( j): For practical purposes and clarity in presenting the polarization curve, Eq. ( 16) can be simplified and rearranged as follows.
Equation (17) demonstrates how the actual operating voltage of the PEMFC decreases from the open-circuit voltage V oc as the current density increases due to various losses, it encapsulates the relationship between the cell voltage and current density, providing a comprehensive understanding of the PEMFC's performance characteristics.
The semi-empirical modelling of PEMFC illustrates how its performance is influenced by concentration, ohmic, and activation losses.The activation potential is determined by semi-empirical parametric coefficients, denoted as ξ 1 , ξ 2 , ξ 3 , and ξ 4 .Ohmic losses are influenced by the ionic resistance and a scalar factor called , which ranges in value from 10 to 24.If the value of b is known, it is possible to calculate the concentration voltage, along with values of current density J and maximum current density (J max ) .Therefore, for accurate PEMFC model- ling, it is essential to determine seven key parameters: ξ 1 , ξ 2 , ξ 3 , ξ 4 , R C , b , and .Such variables are typically not specified in the manufacturer's datasheet and vary under diverse working circumstances, affecting the PEMFC's performance as observed in its polarization curve.
Estimating these parameters is complex but crucial for operating the FC at optimal conditions and minimizing losses.The estimation of the parameter for a low-power, multiple-output, multiple-input electrochemical PEMFC structure has been conducted using current interruption tests and system identification approaches.Advanced algorithms have proven capable of deriving more accurate values than simpler methods.Beyond parametric coefficients, several critical factors impact the operation of FC systems significantly.These include (13) www.nature.com/scientificreports/reactant stoichiometry, stack current, stack temperature, humidity, and reactant pressure.Temperature plays a dominant role in fuel cell performance, while fuel pressure and flow rate have a lesser impact.In contrast, the airflow rate and air pressure, due to their negligible effect, are not considered for control purposes.Other influential factors encompass elements within the electrochemical and fluidic domains, such as thickness, porosity, gas diffusion coefficients between water and hydrogen and water and oxygen, respectively, gas diffusion layer tortuosity, in the fluidic domain.In the electrochemical domain, factors like symmetry, catalyst layer sectional area, exponential parameters of exchange current density, and scale factor are crucial.Various optimization methods have been utilized to determine these unknown FC parameters.Research has shown that while validating parameters obtained through optimization methods with empirical data, there is invariably some error.This parameter estimation process is depicted in Fig. 3.A primary objective is to minimize the error between the experimental and estimated data, commonly using the fitness function of minimizing the Sum of Squared Errors (SSE), calculated from the differences between estimated data and experimental data collected at N data samples.The objective is to minimize the SSE, and the error function is presented in Eq. (19).
where V sim,i and V exp,i are the simulated and experimental voltages at point i , respectively.Minimizing the difference between predicted and actual data is crucial for enhancing the reliability and efficiency of PEMFC systems.The Root Mean Square Error (RMSE) is used to evaluate the accuracy of model predictions against observed data in the parameter estimation process.The RMSE is derived from the SSE, and Eq. ( 20) presents the expression for RMSE.
The optimization variables in the PEMFC model consist of seven unknown parameters, as presented in Eq. ( 21), and each parameter is subject to the constraints, as presented in Eq. ( 22).
The unknown parameters are essential for the accurate modelling of the PEMFC's behaviour and for enhancing its performance.

Orthogonal learning based GOOSE algorithm
This section of the paper discusses the basic concepts of the GOOSE algorithm and the formulation of the proposed OLGOOSE algorithm.

GOOSE algorithm
The GOOSE algorithm is a metaheuristic optimization algorithm inspired by the behaviours of geese during foraging and rest periods 87 .Initially, the GOOSE algorithm populates an array, denoted as the X matrix, rep- resenting the geese's positions.Once populated, the algorithm repositions any search agents that stray outside the predefined search space.Each agent's fitness is evaluated in every iteration using standardized benchmark functions.The algorithm assesses and compares the fitness of each agent (each row in the X matrix) against all others to identify the best fitness score and position, referred to as BestFitness and BestX , respectively.To bal- ance exploration and exploitation, a random variable named "b" is utilized, and it commands the strategy, i.e., with a 50% chance, the algorithm chooses between exploring new areas or exploiting to refine the search.The distribution of phases is evenly managed across the iterations through a conditional statement.Additionally, several auxiliary variables, such as "a" , "b", and "c" , are introduced to facilitate the decision-making process.These variables are generated randomly within the range of 0 to 1.A specific condition checks if "c" exceeds 0.17; if it does, it is reset to 0.17 to maintain a controlled variability in the algorithm's behaviour.The variable "a" is crucial in determining the position update.
In the exploitation phase of the GOOSE algorithm, a key requirement is to ensure group safeguarding, as discussed earlier.To achieve this, the algorithm randomly determines the stone weight supported by the goose, which ranges between 5 and 25, as per Eq. ( 23).
The algorithm calculates the time T_o_A_Oit , which represents the duration needed for the stone to reach the Earth, randomly chosen between 1 and 0. In the subsequent formula, it is possible to calculate the overall period it takes for the sound to spread and influence each geese in the herd across all iterations.As detailed in Eq. ( 24), this total time is divided by the number of dimensions.The average time is then obtained by halving the total time, as outlined in Eq. ( 25).
As discussed earlier, the random variable ' b ' is used to allocate the phases of exploration and exploitation.The value of ' a ' is randomly chosen from between 0 and 1.If ' a ' is greater than 0.2 and the weight ' S_Wit ' is 12 or more, Eq. ( 26) is applied where ' T_o_A_Oit ' is multiplied by the square root of ' S_Wit ' divided by 9.81 m/s 2 , the standard acceleration due to gravity.Equation (27) calculates the distance sound travels, D_S_Tit , by multiplying the speed of sound in air, S_S , which is 343.2 m per second, by the time it takes for the sound to travel, T_o_A_Sit.
In this step, it is possible to calculate D_Git , the distance between another goose at rest or feeding and a guard goose.Equation (28) determines this distance by taking half of the sound travel distance D_S_T it .
To update a position within the population, specifically to awaken an individual in the flock, it needs to determine BestX it as outlined in Eq. ( 29), and it combines the falling object F_F_S with the product of the goose's distance D_G it and the square of the average time T_A.
Conversely, if both stone weight S_W it and a are less than 12, and a is less than or equal to 0.2, the new position X is calculated as described in Eq. (30).To compute the falling object speed F_F_S , multiply the time T_o_A_O it , it takes for the object to arrive by the stone weight S_W it divided by gravity.Furthermore, the distances of sound travel D_S_T it and the goose D_G it are calculated using the earlier Eqs.( 27) and (28).
Alternatively, a new position X is calculated using the formula outlined in Eq. (31), where parameters such as the falling object speed, goose distance, mean time, and coefficient c are sequentially multiplied.In the exploita- tion phase, Eqs. ( 28) and ( 30) are used to compute a new X .The choice between these equations is determined by the values of variables a and W_Sit.
(23) S_W it = randi( [5,25], 1,1) www.nature.com/scientificreports/ In the exploitation stage, the goose wakes randomly in response to the best position exposed so far, either to control its wake-up or to protect the individual in the flock.In addition, it is necessary to ensure that if the minimum time M_T exceeds the total time T_T , M_T is then set to equal T_T .The variable alpha , which ranges from 2 to 0, decreases significantly with each iteration.This reduction is captured in Eq. (32), which is employed to refine the positioning of a new X within the search space.
In this context, Max it represents the maximum number of iterations allowable.Calculating the parameters M_T (minimum time) and alpha is essential to steer the search phase towards what is likely the optimal solu- tion.It is significant to enable the goose to stochastically explore the positions of other populations in the search location, which is achieved by means of randn(1, dim) .The variables M_T and alpha are important in enhancing the search capabilities of the GOOSE algorithm.In Eq. ( 33), a random number is multiplied by the minimum of time and alpha , and this product is subsequently added to the optimal location found in the search location, facilitating effective exploration and exploitation.
where dim denotes the problem dimensions, and Best_pos denotes the top position found so far in the search area.The pseudocode is provided in Algorithm 1.

Orthogonal learning
Orthogonal Learning (OL) is a concept derived from the mathematical property of orthogonality, where two vectors are orthogonal if their dot product is zero, indicating that they are perpendicular to each other 88,89 .This principle can be applied to optimization algorithms to enhance their search strategies by ensuring diversity in the search directions.In OL, the search agents (or solutions) are encouraged to explore the search space in directions that are orthogonal to each other.This means that each agent explores a fundamentally different aspect or dimension of the problem space, reducing redundancy in the search process and covering more areas more efficiently.By utilizing orthogonal vectors, the algorithm can effectively escape local optima.Each orthogonal vector points in a direction that is not influenced by the others, ensuring that the agents do not cluster around local optima and instead explore more globally 90,91 .The OL helps in balancing exploration and exploitation.As the search progresses, the degree of orthogonality can be adjusted to focus more on exploitation, particularly as the algorithm converges towards potential solutions.The OL method is adaptable to various types of optimization problems because it does not depend heavily on the gradient of the problem space, making it suitable for non-differentiable, noisy, or highly complex landscapes. (31) The OL in optimization algorithms involves the use of vectors that are mutually orthogonal to each other, thus ensuring that search agents explore the search space along independent directions 92 .Two vectors u and v in an n-dimensional space are orthogonal if their dot product is zero: For a set of vectors to be mutually orthogonal, every pair of different vectors in the set must satisfy this condition.In practice, this can be achieved through processes such as Gram-Schmidt orthogonalization or by using predefined orthogonal matrices like Hadamard matrices in cases where dimensions allow.One straightforward method for generating orthogonal vectors in the context of an optimization algorithm is to use the QR decomposition of a randomly generated matrix 93 .Suppose A is a n × n matrix with randomly generated entries.The QR decomposition of A is: where Q is an orthogonal matrix (the columns are orthogonal unit vectors), and R is an upper triangular matrix.The columns of Q can be used as directions for orthogonal exploration.

Proposed OLGOOSE algorithm
In the context of the GOOSE algorithm, which is inspired by the natural behaviour of geese, orthogonal learning can significantly enhance its performance by integrating the following modifications and improvements: (i) During the initialization phase, the OL method can be applied to generate initial positions of the geese (search agents) so that they are spread out over the search space in a manner that minimizes overlap and redundancy; (ii) In each iteration, instead of moving solely based on the best solution found or random perturbations, the geese can also move in directions that are orthogonal to the direction of the current best solution; (iii) As the algorithm progresses, the extent of orthogonality in the moves can be dynamically adjusted.Early in the search process, high orthogonality can be beneficial for broad exploration, while later in the process, reducing orthogonality can help in fine-tuning the solutions by focusing more on exploitation near the current best areas; (iv) By integrating OL, the GOOSE algorithm can achieve faster convergence rates and better global optima discovery.The orthogonal directions ensure that the search is not trapped in local optima and that the solution space is thoroughly explored.
The initialization of agents (geese) can be modelled using the orthogonal matrix Q .For a set of initial agents X in a n-dimensional space: where D is a diagonal matrix whose diagonal elements are scaled according to the problem's bounds (i.e., the search space limits).During the iterative process, the algorithm can adjust each agent's position using orthogonal directions derived from the best current position X bs : where α is a step size, and Q i is the i th orthogonal vector influencing the direction of the i th agent.As the search progresses, the degree of orthogonality can be controlled by a parameter β, which modulates the influence of orthogonal directions based on the phase of the optimization: where β(t) decreases as the number of iterations increases, reducing the influence of orthogonal directions to allow more localized search near the end of the algorithm run.By initializing and guiding search agents in orthogonal directions, the algorithm covers the search space more comprehensively, reducing the risk of missing global optima.Orthogonal steps help maintain diversity in the population of agents, preventing them from clustering around local optima too early in the search process.With dynamic adjustment of the orthogonality parameter, the algorithm effectively transitions from broad exploration to intensive exploitation, optimizing performance over iterations.This orthogonal modelling enhances the robustness and effectiveness of the GOOSE algorithm, particularly in complex, high-dimensional search spaces where traditional methods may struggle with coverage and convergence.The pseudocode of the proposed OLGOOSE algorithm is shown in Algorithm 2.

Complexity of the OLGOOSE Algorithm
The orthogonal initialization of the population matrix X using QR decomposition has a time complexity of O n 3 for a matrix of size n × n .However, since the matrix size is typically m × n where m is the number of population and n is the problem dimension, the initialization complexity would be O m • n 2 , if we assume full orthogo- nalization for simplicity.Each agent's fitness is evaluated once per iteration, which gives us O(m) per iteration, assuming the fitness evaluation function has a constant time complexity.If the fitness function has a complexity of O f , then this step is O m • f .Updating the position of each agent includes computing orthogonal vectors and potentially performing the QR decomposition in each iteration, which has a time complexity of O m • n 2 .Combining all these gives us the overall time complexity of the Orthogonal Learning based GOOSE algorithm: The space complexity is calculated by the amount of memory needed to store data structures at any point in the algorithm: (i) Stores the position of each agent, requiring O(m • n) space; (ii) Storing the best position and fitness requires O(n) and O(1) space, respectively; (iii) During orthogonal learning, orthogonal vectors can be stored in a matrix of size m × n , which is O(m • n) ; (iv) Variables like BestFitness , BestX , distances , times , etc., add a marginal additional space requirement, which is typically O(m) or O(n) , depending on whether they store per-agent or per-dimension data.Therefore, the space complexity is O(m • n).

Results and discussions
The process of identifying the parameters was conducted using MATLAB software.Initially, the parameters in the model were assigned random values within ranges, as presented in Table 1.Data from the FC was then transferred to the identification program for analysis, where it was aligned and compared with the outputs from Table 1.Parameter limits for the FC model.www.nature.com/scientificreports/ the model.The differences between the actual data and the model outputs were encapsulated within the objective function, as detailed in Eq. ( 17), with parameter adjustments made iteratively.For the estimation of the unknown parameters, the proposed OLGOOSE strategy was applied to three PEM fuel cells: the NedStackPS6, SR-12, and BCS 500 W models.To validate the efficacy of the OLGOOSE strategy, its performance was evaluated against several other optimization algorithms, including the GOOSE, Gradient-Based Optimizer (GBO) 58 , Multi-Learning Reptile Search Algorithm (MLRSA) 45 , the Subtraction-Average-Based Optimizer (SABO) 94 , the Energy Valley Optimizer (EVO) 95 , the Black Widow Optimization Algorithm (BWOA) 50 , and the Marine Predator Algorithm (MPA) 69 .The operating conditions, parameters, and datasets for these specific PEMFC stacks were sourced from 12,77 .Details regarding the specifications of the PEMFCs under study are presented in Table 2. Notably, the cathode was supplied with air for the BCS 500W and SR-12 Modular types, whereas the NedStackPS6 type was supplied with pure oxygen.This distinction is crucial as it impacts the fractional pressure of oxygen ( P O 2 ) and the overall performance of the FCs.
To ensure a balanced comparison, the number of populations and the number of iterations were standardized across all optimization algorithms, set at 40 and 1000, respectively.Throughout the optimization process, the objective function used was the RMSE between the measured voltage data and the calculated voltage outputs from the selected FC model.The goal was to minimize this RMSE.The unidentified parameters of the PEMFC functioned as the decision vectors within the optimization framework.The specific upper and lower bounds for these PEMFC variables are detailed in Table 1.

Results for all FC models
Table 3 showcases the optimal parameters obtained for various fuel cell models when subjected to different algorithms.Due to the inherently random characteristics of algorithms, the outcomes they produce can vary from one execution to another.This variability stems from the algorithms' design, which incorporates randomness to escape local optima and explore the search space extensively.To account for the stochastic behaviour of these algorithms and to ensure a robust evaluation, multiple executions are necessary, i.e., 30 individual executions.This approach helps in assessing the performance consistency of each algorithm across runs.By averaging results from several iterations, it is possible to mitigate the influence of the outlier results, providing a more accurate reflection of the algorithm's capability to identify optimal parameters reliably.For the performance comparison, error metrics are considered.Error metrics are quantitative measures used to assess the accuracy of algorithms in predicting or fitting data.A brief introduction to the error metrics is discussed as follows.
Mean absolute error (MAE): MAE measures the average magnitude of errors in a set of predictions without considering their direction.It is the mean of the absolute values of each error.
where N is the number of samples, V sim,i is the estimated value, and V exp,i is the experimented value.
Sum of Squared Errors (SSE): SSE calculates the total sum of squared differences between the predicted and actual values.It emphasizes larger errors due to squaring.
In Table 3, several algorithms are compared, including OLGOOSE, across multiple datasets based on different performance parameters.OLGOOSE shows distinct advantages in optimization, with the data indicating its superior efficacy.OLGOOSE stands out primarily in its optimization precision, achieving the best or near-best scores in most parameters.For instance, in the BCS 500W dataset, the proposed algorithm hits the closest value to the optimum for the parameter ξ 1 , indicating its effectiveness in fine-tuning the distinctions of the dataset.The OLGOOSE consistently maintains low error metrics for all case studies, representing its capability to converge to the optimal solution with minimal deviation.The low values of b and Rc recommend that OLGOOSE controls voltage variations and resistance, and it is crucial for stable and accurate estimation.Furthermore, the high values indicate the high solution's quality.OLGOOSE's consistent performance across all the estimated parameters suggests that the proposed OLGOOSE not only surpasses in highlighting the exact optimal points but also reliably maintains the performance, showing flexibility and robustness.Through the investigation of www.nature.com/scientificreports/ the estimated parameters and error metrics, OLGOOSE's position as a reliable algorithm is likely to provide better outcomes when handling complex optimization problems.The improved results obtained by OLGOOSE, as compared to other algorithms like GOOSE, OBGBO, MLRSA, SABO, EVO, RLBWOA, and OBMPA, demonstrate the impact of orthogonal learning on the algorithm's performance, offering a significant enhancement over traditional methods.The data shown in Table 4 illustrates that the OLGOOSE algorithm shows notable consistency and efficiency when compared to other algorithms across various metrics and datasets.OLGOOSE consistently maintains a competitive edge in BCS 500W, NedStackPS6, and SR-12.OLGOOSE has remarkable accuracy in its average values, closely aligning with the minimal error rates in all the datasets.The standard deviation (STD) of this is remarkably low, often reaching the lower limits of accuracy, suggesting its constant and exact performance across multiple runs.The low STD values highlight the stability of OLGOOSE.The other statistical parameters, such as minimum (Min) and maximum (Max) values, suggest that OLGOOSE not only demonstrates strong performance on average but also effectively avoids any prominent outliers that could obstruct optimization in practical circumstances.
OLGOOSE demonstrates worthy outcomes in terms of runtime (RT), which quantifies the efficiency and speed of categorizing the initial acceptable solution.The proposed algorithm demonstrates less RT in multiple cases, suggesting a quick approach to reaching optimal solutions; however, the RT values are slightly higher compared to the original GOOSE algorithm.When considering Friedman's ranking test (FRT), OLGOOSE's rankings are outstanding, and the FRT metric is essential for the comparative performance of algorithms, providing a comprehensive assessment rather than focusing on individual instances.When compared with other algorithms, the proposed OLGOOSE demonstrates superior performance.The quality of the algorithm is validated by its low error metrics and top ranks in FRT values.OLGOOSE constantly exhibits its strength and expertise in executing activities with accuracy and effectiveness in many testing conditions.OLGOOSE is a powerful choice for improving complicated problems in various applications because of its fast convergence and dependable solutions.The A detailed analysis comparing the experimental values with the estimated values for the BCS 500 W fuel cell, obtained using the OLGOOSE algorithm, is illustrated in Fig. 4.This comparison shows a high degree of fit between the estimated voltages generated by the OLGOOSE algorithm and the actual experimental measurements, indicating strong model accuracy and effective parameter estimation.
The quantitative evaluation of this fit, as detailed in Table 4, includes several error metrics: the MAE is reported at 1.291E−02, the SSE at 1.17E−02, and the RMSE at 0.02549.The low error metrics confirm the usefulness of the OLGOOSE algorithm in precisely determining the optimal settings for the BCS 500 W stack. Furthermore, Fig. 5 illustrates the changes in the fitness function during the process of determining the parameters for the BCS 500 W FC. The convergence curves for all the investigated algorithms are shown in Fig. 5, illustrating the efficiency and speed at which each algorithm converges towards the optimal solution.Figure 5 highlights the robustness and computational efficiency of OLGOOSE in accurately finding the optimal set of parameters.To summarize, the presented statistics and figures validate the assertion that the OLGOOSE approach is superior in precisely estimating parameters for the BCS 500 W stack.
Figure 6 presents a comprehensive analysis of the measured voltage data and the simulated voltage values for the NedStackPS6 FC. Figure 6 demonstrates a strong correlation between the estimated voltages generated by OLGOOSE and the experimental findings, suggesting a successful alignment and efficient modelling by the proposed algorithm and all other selected algorithms.The effectiveness of the OLGOOSE algorithm in selecting the best parameters for the NedStackPS6 is further confirmed by the error metrics provided in Table 4.The MAE is measured at 0.20671, the SSE at 2.10422, and the RMSE at 0.26777.The low MAE, SSE, and RMSE indicate that the OLGOOSE method is capable of consistently and precisely determining the optimal parameters for the NedStackPS6 stack.As a result, the model's predictions closely align with the actual data.Figure 7 displays the changes in the fitness function as the parameters are determined for the NedStackPS6 stack.Figure 7 displays convergence curves for all algorithms, demonstrating the evolution of each approach towards the best solution during the optimization process.Figure 7 illustrates the convergence behaviour, which may be used as a visual benchmark to evaluate the effectiveness of the OLGOOSE method in selecting the best parameter set compared to other algorithms.
Figure 8 provides an insightful comparison between the measured voltage data and the data estimates derived from the OLGOOSE algorithm for the SR-12 fuel cell model.The comparison discloses that the voltage values estimated by OLGOOSE closely align with the experimental measurements.The successful alignment of the actual data and predicted data indicates that the OLGOOSE algorithm is highly effective in modelling the behaviour of the SR-12 fuel cell under varied operational conditions.Further validation of the OLGOOSE algorithm's efficacy comes from the detailed error metrics reported in Table 4.These include an MAE of 0.19998, SSE of 1.33104, and RMSE of 0.27193.Additionally, Fig. 9 illustrates the fitness function variations during the parameter optimization process for the SR-12 stack, including convergence curves for all algorithms compared.The convergence curves specifically highlight how quickly and smoothly the OLGOOSE algorithm approaches the optimal parameters, reflecting its computational efficiency and robustness in parameter optimization tasks.
In terms of statistical distribution parameters, including median, range, and outliers, the boxplot analysis for the three FC models provides an understandable visual depiction of how the OLGOOSE method stacks up against alternative algorithms.As can be seen from the boxplot for BCS 500W in Fig. 10a, OLGOOSE performs more consistently and with less variability in voltage estimate due to its tightly packed quartile distribution.Additionally, the centre location of the box's median line indicates that the data are symmetrically distributed around the median, which improves reliability.The fact that OLGOOSE's performance shows no outliers suggests that it has remarkable control over extreme values, which reinforces its accuracy.The boxplot in Fig. 10b illustrates how OLGOOSE, in the NedStackPS6 model, maintains a small interquartile range akin to BCS 500W, indicating reliable and consistent voltage estimates over several runs.The fact that the median is comparatively lower than that of several algorithms and closely matches the experimental data suggests that the modelling was accurate.In addition to being near the box, which indicates reduced data dispersion, the minimum and maximum values also don't have any notable outliers, suggesting consistent performance.The boxplot analysis displayed in Fig. 10c for the SR-12 model demonstrates the consistent estimation benefit provided by OLGOOSE and it becomes evident from its narrow box and shorter whiskers.The results demonstrate a highly symmetrical median, which does not deviate towards the quartiles, and it indicates that the estimates are not biased and are consistently centred.In summary, Fig. 10 provides strong evidence that OLGOOSE surpasses other methods in terms of parameter estimation in fuel cell models, delivering a higher level of reliability, consistency, and accuracy.To thoroughly evaluate the performance of the various algorithms, we have tabulated the SSE and MAE for all case studies in Tables 5, 6, 7, 8, 9 and 10.These tables provide a comprehensive comparison of the results achieved by each algorithm.Upon examining Tables 5, 6, 7, 8, 9 and 10, it becomes evident that the proposed OLGOOSE algorithm and the OBMPA yield comparable results in terms of SSE and MAE.However, Table 4 highlights a significant difference in computational efficiency between the two.Specifically, the OBMPA requires four times more computational time than the OLGOOSE algorithm, making the latter more efficient.Furthermore, the reliability of the OLGOOSE algorithm surpasses that of the OBMPA.This is supported by the boxplot analysis, which shows that the OLGOOSE algorithm consistently produces more stable and reliable results across different datasets and case studies.When compared to the original GOOSE algorithm, the proposed OLGOOSE algorithm demonstrates superior performance metrics.Although the computational time for the OLGOOSE algorithm is slightly greater than that of the original GOOSE algorithm due to the incorporation of the orthogonal learning mechanism, this increase in computational time is justified by the significant improvements in accuracy and reliability.Moreover, when benchmarked against other algorithms, the OLGOOSE algorithm consistently outperforms them in terms of both performance metrics (SSE and MAE) and computational efficiency.The enhanced reliability of the OLGOOSE algorithm further solidifies its superiority.The orthogonal learning mechanism, despite adding some computational overhead, effectively enhances the algorithm's capability to discover the solution space more carefully, leading to better overall performance.The proposed OLGOOSE algorithm offers a balanced approach, delivering high accuracy and reliability with reasonable computational efficiency.Its performance in terms of key metrics and reliability makes it a strong choice compared to other optimization algorithms evaluated in this study.
In order to visualize the error metric, Fig. 11 presents error plots that comprehensively display the performance of various algorithms, including OLGOOSE, across three different FC models.The error plots in Fig. 11 serve as a visual tool to measure and compare the magnitude of errors generated by each algorithm under varying operational conditions.By examining Fig. 11, one can distinguish the consistency and accuracy of each algorithm.Specifically, Fig. 11 highlights that the proposed algorithm exhibits the smallest errors consistently across all tested conditions and models.Figure 11 clearly defines which algorithm, including OLGOOSE, manages to maintain precision across a diverse set of conditions and models, effectively highlighting its superiority in terms of both accuracy and robustness.

Further discussions
OLGOOSE's superior performance across all FC models can be attributed to several key features and enhancements integrated within the algorithm, which collectively improve its accuracy, robustness, and efficiency.The introduction of orthogonal learning in OLGOOSE is a fundamental enhancement that significantly contributes to its superior performance.Orthogonal learning helps in diversifying the search patterns of the algorithm, ensuring that the solution space is explored more comprehensively.By using orthogonal vectors, OLGOOSE can efficiently escape local optima and explore multiple dimensions of the problem space simultaneously, reducing the risk of convergence on sub-optimal solutions.
OLGOOSE strikes an optimal balance between global and local search strategies.The orthogonal vectors facilitate broad, global explorations initially, which is crucial for identifying promising regions within a vast search space.As the algorithm progresses, it gradually shifts towards more refined local searches, focusing in on the best solutions with high accuracy.This dynamic adjustment between exploration and exploitation phases allows OLGOOSE to maintain high accuracy and adaptability across different operational conditions and FC models.In the FC models, precise parameter estimation is critical for modelling the complex chemical and physical interactions accurately.OLGOOSE's algorithmic structure is particularly adept at tuning these parameters to reflect the true behaviour of the system under study.By effectively minimizing the error metrics such as MAE, SSE, and RMSE, OLGOOSE demonstrates its capability to tune parameters that result in models which closely mimic real-world data.The stochastic nature of metaheuristic algorithms often leads to variability in performance.However, OLGOOSE is designed to offer more consistent results across multiple runs.This consistency is evidenced by the smaller standard deviations in error metrics, suggesting that OLGOOSE not only finds better solutions but does so reliably over successive iterations.Such reliability is particularly valuable in practical applications where repeatability of results is crucial.Despite its complex internal mechanisms, OLGOOSE is optimized for computational efficiency.OLGOOSE's ability to quickly converge to optimal solutions without excessive computational overhead makes it suitable for real-time and scalable applications.Fuel cells come in various types and configurations, each with unique characteristics and operational dynamics.OLGOOSE's performance across multiple FC models suggests that it has inherent flexibility and adaptability, capable of adjusting its optimization strategy to suit different types and sizes of data sets and models.In summary, OLGOOSE's integration of orthogonal learning, balanced search capabilities, robust parameter optimization, consistent and reliable performance, computational efficiency, and adaptability are key reasons behind its superior performance across different FC models.These features not only enhance the precision of the model but also ensure that it can be reliably used in diverse applications, reaffirming its status as a preferred algorithm in the field of optimization.The OLGOOSE algorithm's flexibility allows for its application across different PEMFC models, requiring the estimation of various parameters unique to each model.This adaptability ensures that the approach remains robust and applicable to a wide range of modelling frameworks.

Conclusions
The proposed OLGOOSE algorithm is combined with the orthogonal learning mechanism and it demonstrated superior performance in optimizing parameters for three different fuel cell models.The superior performance of the OLGOOSE algorithm is due to the orthogonal learning mechanism, which effectively balances the exploration and exploitation phases of the original GOOSE algorithm.The investigation in this study illustrates the effectiveness of the OLGOOSE in terms of accuracy and efficiency, outperforming conventional metaheuristic algorithms across various parameters such as RMSE, SSE, MAE, RT, and FRT.The strong mechanism of OLGOOSE is the foundation of its strength and allows for precise and reliable estimation of the fuel cell behaviour.The stability and consistency demonstrated in several experimentations, statistical parameters, and statistical tests make the proposed algorithm a reliable tool for fuel cell parameter estimation.OLGOOSE addresses the challenge of parameter optimization by enhancing the operational efficiency of fuel cell systems and achieves a prominent balance between comprehensive search capabilities and precise improvements.As a result, this is highly advantageous for academics and practitioners who aim to advance the boundaries of energy technology and optimization.
In the future, OLGOOSE may expand its application to include additional complex systems such as battery management and renewable energy sources.By integrating OLGOOSE with machine learning predictions and real-time data processing, it has the potential to become a valuable tool in the energy market.This future extension would enhance its practicality in everyday situations.In addition, advancements in computational methods could enhance its effectiveness by enabling faster and more adaptable procedures that are ideal for handling larger and more complicated datasets.These additional paths are expected to enhance the usefulness of OLGOOSE and yield discoveries in the disciplines of energy system optimization and other related areas. https://doi.org/10.1038/s41598-024-71223-7

Fig. 1 .
Fig. 1.Structure of the PEMFC and the equivalent circuit.

Table 2 .
Specifications of the PEMFC cells and stacks.

Table 3 .
Estimated parameters of PEMFC by all algorithms.

Table 4 .
Obtained statistical metrics by all algorithms.Significant values are given in bold.

Table 5 .
SSE achieved by all algorithms for BCS 500W.

Table 6 .
MAE achieved by all algorithms for BCS 500W.

Table 7 .
SSE achieved by all algorithms for NedStackPS6.

Table 8 .
MAE achieved by all algorithms for NedStackPS6.

Table 9 .
SSE achieved by all algorithms for SR12.

Table 10 .
MAE achieved by all algorithms for SR12.