Fuel Cell Characteristic Curve Approximation Using the Bézier Curve Technique

: Accurate modelling of the fuel cell characteristics curve is essential for the simulation analysis, control management, performance evaluation, and fault detection of fuel cell power systems. However, the big challenge in fuel cell modelling is the multi-variable complexity of the characteristic curves. In this paper, we propose the implementation of a computer graphic technique called Bézier curve to approximate the characteristics curves of the fuel cell. Four different case studies are examined as follows: Ballard Systems, Horizon H-12 W stack, NedStackPS6, and 250 W proton exchange membrane fuel cells (PEMFC). The main objective is to minimize the absolute errors between experimental and calculated data by using the control points of the Bernstein–Bézier function and de Casteljau’s algorithm. The application of this technique entails subdividing the fuel cell curve to some segments, where each segment is approximated by a Bézier curve so that the approximation error is minimized. Further, the performance and accuracy of the proposed techniques are compared with recent results obtained by different metaheuristic algorithms and analytical methods. The comparison is carried out in terms of various statistical error indicators, such as Individual Absolute Error ( IAE ), Relative Error ( RE ), Root Mean Square Error ( RMSE ), Mean Bias Errors ( MBE ), and Autocorrelation Function ( ACF ). The results obtained by the Bézier curve technique show an excellent agreement with experimental data and are more accurate than those obtained by other comparative techniques.


Introduction
Recently, the fuel cell (FC) has been recognized by scientists and industrialists as a significant renewable energy source. Specialists considers it as the lowest impact and the least of all the major problems facing the global energy system [1]. It consist essentially of two electrodes viz., a cathode, anode and a Proton Exchange Membrane (PEM) between them as an electrolyte. The two electrodes are in contact with bipolar plates embedding gas flow channels within which the reactive gasses (H2 and O2) are delivered to the device. It generates electricity as long as the fuel is delivered in the form of hydrogen. The FC is a type of sustainable energy that converts the chemical process between hydrogen and oxygen to electrical energy. The use of the fuel cell is due to its advantages over other renewable energy sources, e.g., the electrical efficacies of FC range between 50% and 70%, rich reserves, high utilization efficiency, versatility, high safety, and flexibility in the use of the necessary fuels. Thus, it has become a genuinely competitive power source of energy [2,3]. Generally, two types of fuel can be distinguished in industries; they are: (i) Proton Exchange Membrane FCs (PEMFCs) and Solid-Oxide FCs (SOFCs). PEMFC is one type of fuel cell technology in which high power density These methods have some demerit points because they are based on mathematical manipulation, and the derivation imposes several restrictions, such as convexity, continuity, and differentiability, also, the approximations reduce the ultimate accuracy.
On the other hand, the meta-heuristic algorithms have prospered over the last few years, and have been effectively used to overcome several challenging optimization difficulties in specific various fields. In the literature, numerous meta-heuristic optimization techniques have been proposed to approximate the FC characteristic curves, including Shuffled Frog-Leaping Algorithm (SFLA), Firefly Optimization Algorithm (FOA), Imperialist Competitive Algorithm (ICA) [25], Shuffled Multi-Simplexes Search Algorithm (SMSA) [26], Hybrid Grey Wolf Optimization (HGWO) [27], Hybrid Vortex Search Algorithm and Differential Evolution [28], Eagle Strategy [8], Cuckoo Search Algorithm with Explosion Operator (CAEO) [29], Neural Network Optimizer (NNO) [30], Shark Smell Optimizer (SSO) [31], Slap Swarm Optimizer (SSO) [32], Grasshopper Optimization (GO) [33], Grey Wolf Optimizer (GWO) [34], Hybrid Teaching Learning Based Optimization-Differential Evolution [35], Hybrid Adaptive Differential Evolution Algorithm [36], Evolutionary Strategy [37], Genetic Algorithm (GA) and Manta Rays Foraging Optimizer (MRFO) [38], Transferred Adaptive Differential Evolution (TADE) [39], Adaptive Differential Evolution Algorithm (ADEA) [40], and Harmony Search Algorithm (HSA) [41]. In particular, these nature-inspired or artificial swarm intelligence have their own benefits and drawbacks, in which someone can overcome an unsolvable problem and not solve another one. Even so, the algorithms referenced are generally trapped at local optima and have large error values. Besides, the accuracy of such algorithms is strongly dependent on the selection of specific parameters, such as mutation probability, crossover probability, and the selection operator in the GA, as well as inertia weight, and social and cognitive parameters for particle swarm optimization. As a result, researchers are always looking for successful techniques capable of approximating the characteristics curves of the FC with low error and high accuracy.
As mentioned previously, most scientists have tried to improve the modeling of the FC, which requires a complex model with a degree of nonlinearity and multi-variability. The latter maintains that the FC characteristics curves are challenging to be tackled by using traditional methodologies to improve the effectiveness of V-I and P-I characteristic curves, and accurately reflect the ultimate performance. It is essential to define accurate curves using modern techniques properly. However, the critical requirement for choosing a method to approximate the FC characteristic curves is its precision. The primary needs for the techniques are accuracy, reliability, efficiency, detection limit, quantitation limit, flexibility, operating range, and robustness. An approximation technique with a low error is widely accepted as successful, and the calculated error is measured based on the discrepancy between the calculation and the experimental values.
For this reason, recently, several researchers have introduced the Computer Aided Geometric Design (CAGD) technique, Computer Graphics (CG), and Computer-Aided Design (CAD) to overcome all problems of the nonlinearity and complex functions to approximate curves and surfaces [42]. The Bézier curves technique is considered the most stable among all polynomial based on CAD and provides excellent representation for piecewise polynomial curves (since the Bézier curve has a continuous curvature, and can rapidly change the shape by adapting its control points and can be adjusted with an optimization algorithm) [43]. This technique is used to fit or approximated different geometry through different algorithms to minimize the distance between the experimental and control points. For example, Huo et al., [44] have applied the Bézier curve technique to approach and design the trajectory of the electric sail. A description of the thermal behavior of three-way mixing valves [45], estimation of the Kendall distribution function [46], and circle, and conic approximation [47,48], has been also carried out.
In this paper, an investigation and application of the control points of the Bernstein-Bézier technique for numerically approximating the V-I and P-I characteristics curve of FCs have been proposed. The main objective is to minimize the absolute errors between experimental and calculated data by using the control points of the Bernstein-Bézier technique. Four different case studies are examined as follows: PEMFC by M/S Ballard Systems, Horizon H-12 W stack, NedStack PS6 PEMFC stack, and 250 W PEMFC stack. To check the efficiency of the used technique and the performance of the obtained results, a statistical analysis is conducted to assess the precision and accuracy of the approximated V-I and P-I curves. The results obtained are compared to latest methods, such as the Whale Optimization Algorithm (WOA) [14], GRG-1 [22], GRG-2 [22], FOA [25], ICA [25], SFLA [25], SMSA [26], SSO [32], Modified Artificial Ecosystem Optimizatio (MAEO) [49], GA [38], MRFO [38], Grouping-based Global Harmony Search GGHS [50], Improved Harmouny Search (HIS) [50], Particle Swarm Optimization with adaptive inertia Weight (PSO-w) [50], and Chaotic Harris Hawks Optimization (CHHO) [51]. To evaluate the performance of the proposed method, various error parameters are computed, examined, and compared, such as Individual Absolute Error (IAE), Relative Error (RE), Root Mean Square Error (RMSE), Mean Bias Error (MBE), and Autocorrelation Function (ACF). The obtained results are shown close to the experimental data, with a good agreement for most of the approximated curves. The proposed method outperforms the benchmark techniques from the literature.
The remaining of this article is structured as follows: Section 2 displays the mathematical model and fundamentals description of FCs. Section 3 presents the application of the Bézier curve technique to the FC curve. Section 4 depicts the evaluation of the statistical criteria. Sections 5 and 6 illustrate the obtained results and the analysis and discussion of the approximated curves, respectively. Lastly, conclusions and future works are drawn in Section 7.

Fuel Cell Model
A Fuel Cell (FC) is an electrical and chemical system that transforms chemical energy generally from hydrogen directly to electric power. The analogous electrical circuit may be used to simulate the complex behaviors of the FC and its polarization curves are depicted in Figure 1a,b, respectively [52]. This model is characterized by a sequence of equations and a set of parameters, the interpretation of which is crucial for successful simulation performance. The polarization is caused by chemical and physical factors associated with various elements in the fuel cell, such as temperature, pressure, and gas composition. The three primary types of polarization, named activation, ohmic (or resistance) and concentration, are illustrated in Figure 1b. Moreover, the polarization voltage (or terminal voltage) of FC is given in function of thermodynamic voltage Enernst, activation voltage losses due to reaction kinetics Vact, the ohmic voltage losses from ionic and electronic resistance Vohm, the concentration voltage losses due to mass transport Vcon and ncell is the number of cells. Generally, the real voltage output of a fuel cell could be written by starting with the thermodynamically predicted voltage and then subtracting the various overvoltage losses, as follow [16]: Each of the terms in Equation (1) is identified and interpreted individually as follows: where, = 1.229 is the standard-state reversible fuel cell thermodynamic voltage are only useful under standard-state conditions (equal to 1.229 V at 298.15 K and 1 atm). The coefficient = ( ⁄ ) depends on the thermodynamic equilibrium potential, in the literature is determined from the entropy change of a given reaction which is approximately constant and can be set to the standard state value −0.83. 10 / , R is the gas constant, 8.3143 J/mol.(K), F is the Faraday's constant, equal to 96 487 C/mol, is the hydrogen partial pressure at anode catalyst/gas interface (atm), the oxygen partial pressure at cathode catalyst/gas interface (atm), T is the absolute cell temperature (Kelvin) and = 298.15 is the standard state temperature (Kelvin). The parametric coefficient ( = 1,2,3,4) represents the semi-empirical coefficients based on fluid mechanics, thermodynamics, and electrochemistry. The is the oxygen concentration at the catalytic interface of the cathode defined according to Henry's law(mol.cm −3 ).
The ohmic loss in the FC can be mathematically interpreted as: where i is the cell operating current (I), Rm denotes the membrane resistance (Ω) and Rc denotes the equivalent resistance describing the concentration processes (Ωcm −2 ). The membrane resistance Rm and denotes the specific resistance of the material of the membrane (Ω.cm), they can be evaluated as given in Equation (6) where, λ is an adjustable empirical coefficient that influenced by the preparation steps of the solid membrane and l is the membrane thickness (μm).
The concentration voltage drop is given by: where β is a parametric coefficient (V), J and Jmax represent the actual and the maximum current of the cell (A.cm −2 ), respectively.

Bézier Curve Method
The Bézier curve technique is defined as a parametric based in the spline or fitting curve, which forms the basis of the Bernstein function and control points. A Bézier curve P(t) of degree n in space R m with the bi as the control point is defined as follows: where Bi n is the Bernstein basis functions and the coordination of the control points as pi(ti,bi).
The control points use the Greville abscissa ti = i/n to provide a kind of parametrization for various approximation polygons of the original Bézier curve using the subdivision process. Noting that the subdivision is an essential form in geometric modeling. In practice, the subdivision offers an attractive method for interpolation. Intersections of curves can also be determined by subdivision within any given tolerance [1,54]. Theoretical characteristics of the subdivision scheme also characterize specific geometric characteristics of the curve.
The subdivision of the curve using the Bézier curve method is obtained using the set of control points bi to find the new coordinate in the curve. The points are subdivided into two segments, and each segment possesses a Bézier polygon as follows: Figure 2 illustrates the degree elevation of a cubic Bézier piece with b0 and b4 are the content and ending points, respectively, and the points c1,…,c5 are the connecting or midpoint points. The points from b2,…,b2 are the control points of the curve. The curve constructed by the control points is called control polygon. The subdivision of the FC characteristic voltage-current curve using the Bézier curve method is illustrated in Figure 2. The subdivision and evaluation can be obtained easily by using de Casteljau's algorithm applied to Equation (8). Let us define the new formulation based on the recurrence relation as follow: The ( ) = ( ) and let us consider any curve defined by: Equation (12) belongs to the class of the curves that can be evaluated by the de Casteljau algorithm by changing the variable t to a linear function nonconstant. The evaluation of the Bernstein polynomial begins with choosing a point t0 to evaluate and subdivide the curve by using the V Stack diagonals of the triangle scheme to construct a division of the polynomial. The new evaluation can be formulated as follows: The points ( ) are obtained by the de Casteljau algorithm, which provides not only a procedural approach to the subdivision, but also an attractive graphical representation of the points ( ). Figures 3 and 4 illustrate the diagram of the de Casteljau algorithm applied to the control points of the Bézier curve for n = 3 and the relationship between ( ) = ( ) and ( ), respectively.
The algebraic interpretation of the subdivision can also be written in terms of matrix multiplication as: From Figures 2 and 3, the equations of the right and left section are given as follows: The final equation of the experimental points is the sum of the right and left sections:

Proposed Method Evaluation Criteria
Statistical criteria are widely used in numerous disciplines to evaluate the fitness of the theoretical or estimated model accurately. The assessment of the estimated models has been based on a comparison of the statistical criteria used to check the accuracy and efficiency of the simulations. To calculate the accuracy and performance of the Bézier curve method, the following statistical measures are used [55,56]: Individual Absolute Error (IAE): it is the correlation between the observational current, voltage, or power points and the calculated current points using a methodology. It is defined as: Relative Error (RE): It is used as a calculation of accuracy, and it is described as the ratio of the IAE of the measurement to the calculations being recorded. RE is expressed in terms and does not have any units, and it is expressed as: Root Mean Square Error (RMSE): it represents the probability distribution between the experimental and the presented curve data of the m data point sample. This measure will be used to quantify unconsidered error that can be defined as follows: Mean Bias Error (MBE): it represents the arithmetic mean of the error and provides information about the long-term performance; the small value is desired as a condition. It can signify whether the model overestimates or underestimates. MBE quantifies the systematic error, and it is described as follows: Autocorrelation Function (ACF): it defines how the correlation between any two values of the signal changes as their separation changes. It is a time-domain measure of the stochastic process memory, and it does not reveal any information about the frequency content of the process. For error signal et, the ACF can be formulated as: Conv e e ACF Var e Var e   

Results, Discussions, and Comparisons
In this section, the performance and validity of the proposed method are investigated for characteristic curves approximation of four well-known commercial PEMFC by M/S Ballard Systems, Horizon H-12 W stack, NedStackPS6 PEMFC stack, and 250 W PEMFC stack. The datasheet specifications of these four commercial PEMFCs stacks are concluded from [14,25,49,50], and represented in Table 1, respectively. The measured experimental data characteristic curves of these four FCs are accessible online and reproducible in the literature in terms of parameter and curves estimation by several researchers [14,19,38,46]. The efficiency of the proposed effective computer graphic technique used to approximate the FC characteristics curve is compared with various algorithms to validate the performance of each algorithm. Further, statistical metrics are calculated and evaluated using the most used statistical criteria and error analysis in the research literature. The important is to identify the performance method in others by comparing each V-I and P-I curves.

Case Study 1: Single Cell-Based PEMFC by M/S Ballard Systems
The proposed computer graphic technique is applied first to approximate the voltage-current and P-I curves of the M/S Ballard Systems rated power fuel cell system. This stack has 35 cells connected in a series with 70 A maximum thermal current. The main information and the characteristics of this FC are reported in Table 1. The pair measured experimental data are collected from [19]. The experimental data of M/S Ballard Systems have been widely used to extract and estimate the unknown parameters and then approximate their characteristic curves. Table 2 reports the approximated current and voltage using the Bézier curve method compared with GRG-1 [22], GRG-2 [22], GGHS [50], IHS [50], and PSO-w [50]. Further, the IAE of the approximated characteristics are evaluated and compared. To present more validity and accuracy of the proposed method, the reconstructions of the V-I and P-I are presented in Figure 5a,b. The reconstructed approximated characteristics curves are compared with the experimental data point and GRG-1, GRG-2, GGHS, IHS, and PSO-w. The results of validation and approximation curves denote an excellent match compared with empirical data and other algorithms. From Figure 5, it is shown that the two algorithms GRG-1 and GRG-2 are close to experimental data in low voltage while in high voltage, they are far. The other algorithm approximated the two curves by high errors in high and low voltages.   To confirm the performance of the proposed method and present more accuracy of each technique, the IAE and RE are presented and compared in Figure 7a,b, respectively. From Figure 7a Moreover, the ACF is evaluated as shown in Figure 8. The presented qualified test of the M/S Ballard Systems is in the range of −1 and +1.

Case Study 2: Horizon H-12 W Stack
The second case study is about the approximation of the characteristic curves of Horizon H-12 12 W. The primary information and characteristics datasheet of this fuel cell are reported in Table 2. The primary objective of this test case study was to validate the implementation of Bézier curve method compared to WOA [14], GA [38], and MRFO [38] for the effective determination of voltage, current and power of Horizon H-12 PEMFC stack. The measured pairs current and experimental voltage data of PEMFC stack are collected from [14,38], in which the fuel cell is operated at a normal atmospheric pressure of 0.5 bar and the ambient temperature of 29 °C. The main configuration for this fuel cell illustrated in Table 2. A 19 experimental pair measurements of current-voltage characteristics are used under the cited steady-state conditions illustrated in Table 3.  Table 3 depicts the approximated voltage and current by Bézier curve method compared with the measured experimental data. Moreover, Table 3 illustrates the comparison of the IAE of Bézier curve method with WOA, GA, and MRFO.
The reproduced V-I and P-I curves using the approximated Bézier curve method compared with the experimental data are presented in Figure 9a,b. Moreover, the quality and efficiency of the approximated values are reconstructed and compared with WOA, GA, and MRFO. It is clear that the reconstructed curves using the Bézier curve method are close to the experimental data.  For more validity and accuracy, the statistical metrics in terms of IAE and RE are illustrated in Figure 11a,b. It is observed that the Bézier curve method provides the lowest value of IAE and RE compared to the algorithms WOA, GA, and MRFO.

Case Study 3: NedStackPS6 PEMFC Stack
In this case study, a NedSstackPS6 PEMFC stack rated power fuel cell system has been analyzed for performance analysis of the Bézier curve method. The datasheet of the product is accumulated from [25] and reported in Table 2. The fuel cell is with 225 A maximum cell current, and operating partial pressures lie between 1 and 5 bar. Table 4 present the approximated values obtained by Bézier curve method compared with the algorithms MRFO [38], FOA [25], ICA [25], SFLA [25], SMSA [26] and SSO [32].  Figure 13a,b show the reconstructed V-I and P-I curves of NedStackPS6 PEMFC stack using the approximated value using Bézier curve method compared to experimental data and MRFO and FOA algorithms. The comparisons show that the reconstructed value using Bézier curve method is in good agreement with experimental data.   The performance of the Bézier curve method provides the lowest values for the statistical criteria, IAE and MAE, when compared to the other algorithms. Therefore, the Bézier curve method is ranked first in achieving the lowest of IAE and RE, while the ICA and FOA are ranked second and third, respectively. Therefore, the approximated values of the characteristic's curves identified by the proposed Bézier curve method are very accurate because they are close to the experimental data of the fuel cell. The IAE and the RE for each measurement using optimal values founded by the Bézier curve method are depicted in Figure 15a,b. It observed that the Bézier curve method performs better than the reported algorithms.

Case Study 4: 250 W PEMFC Stack
The last case study deals with the approximation of the characteristics curve of the 250 W fuel cell stack. The measured end experimental current and voltage data are collected from [46]. This data is widely used in the parameters extraction and estimation to estimate the characteristic curve of the 250 W fuel cell stack. Moreover, the datasheets constant data of the product are reported in Table 2. Table 4 presents the approximated value of current and voltage using the Bézier curve method compared with experimental data. The calculated IAE of the Bézier curve, CHHO [49], and MAEO [51] are compared and reported in Table 5. The purpose of the comparison is to validate the accuracy of the proposed technique in the characteristic curves process with other algorithms. To validate the approximated pair current and voltage values obtained by Bézier curve method, they are used to reconstruct the V-I and P-I of the 250 W PEMFC stack. Figure 17a,b present the V-I and P-I characteristic curves of the approximated values by the Bézier curve method along with the experimental data. From the results, it can be observed that the values extracted by the Bézier curve method for the considered 250 W PEMFC stack fit the experimental data very well, and they are very close.   The comparison between CHHO and the proposed algorithm in terms of IAE and RE for each measurement is illustrated in Figure 19a,b. Figure 19 shows that the Bézier curve method has better performance than the other estimation algorithms.    Bézier Curve CHHO

Analysis and Discussion
The objective of using the statistical criteria is to compare the performance of the calculated data by the Bézier curve method and other algorithms. The RMSE present the standard deviation of the residues of the generated errors. Residuals are a metric of how far away the variables of the regression line are; RMSE is a metric of how these residues are distributed out. In other words, it says how distributed the information is in the best match rows. The MBE represents the arithmetic mean of the error and provides information about the long-term performance; the small value is desired as a condition. It can signify whether the model overestimates or underestimates the stack voltage. So, the low values of the statistical measures present the best-estimated model. Figure 21 illustrates the comparison of RMSE and MBE for the approximated characteristics curves of PEMFC by M/S Ballard Systems, Horizon H-12 W stack, NedStackPS6 PEMFC stack, and 250 W PEMFC stack. It is observed that in all of the considered case studies, the proposed method has the lowest values of RMSE and MBE. In the M/S Ballard Systems the Bézier curve method has the lowest measures' values followed by GRG-1 and GRG-2, while the PSO-w provides the highest measures' values.
For the Horizon H-12 W stack, the Bézier curve method is better than WOA, GA, and MRFO, which have the highest measures' values in RMSE and MBE.
The characteristics curve of NedStackPS6 PEMFC stack has been approximated by the Bézier curve method much better than SSO and SMA, while the highest value is obtained by MRFO, FOA, ICA, and SFLA.
In the last case study, it is observed that the Bézier curve method provides the best values of the curves, much better than MAEO and CHHO algorithms.
In all case studies, the approximation is very close to the experimental data at low voltage and current. However, in high voltage value and low current, that is a little far. Moreover, the Bézeir curve method outperforms all other algorithms in the four case studies and provides the lowest error measures' values. Further, the approximated values by the Bézier curve method are close to the experimental values in low voltage and high current and also at low current and high voltage.

Conclusions
This paper presents the implementation and adaptation of the Bézier curve method to approximate the characteristic curves of four different fuel cells under different conditions. The used experimental data of current and voltage for testing the effectiveness of the proposed technique are based on the results obtained by several algorithms previously developed for parameter extraction and characteristic curves approximation. The voltage-current curve is subdivided using the experimental into segments, and the control points were constructed using the coefficients of the polynomial Bernstein function in the interval of the measured data. The de Casteljau subdivision algorithm is applied to the fuel cell curve to an infinite sequence of control points, which defines a new family of curves. The degree of the Bernstein function depends on the number of the measured data points. The de Casteljau algorithm is used to minimize the distance between the experimental data points and is then approximated to find the best approximation. Further, several statistical metrics are calculated and determined to fit the performance and accuracy of the approximated curves.
The obtained approximated voltage, current, and power are compared with those obtained by recent techniques and methods from the literature. The proposed method provides the lowest value in terms of Individual Absolute Error (IAE), Relative Error (RE), Root Mean Square Error (RMSE), and Mean Bias Error (MBE) compared to other techniques. The comparisons of four cases demonstrate that the Bézier curve method using the adopted statistical error measures provides high performance and accuracy of the approximated current, voltage, and power of the fuel cells. Therefore, the research relevant to the study will then commence focused on analyzing the static and dynamic behavior of the fuel cell model in different conditions. The results of this study create the following opportunities for various potential research: • Construction of a good fuel cell model device based on the approximated curves; • Development of a new implicit model. Because the performance of the results is of significant importance in control management and performance analysis of the fuel cell in hybrid renewable energy systems; the proposed characteristics approximation is a useful feature for monitoring, fault detection and diagnosis of the connected fuel cell.