Modeling and Optimization of Triple Diode Model of Dye-Sensitized Solar Panel Using Heterogeneous Marine Predators Algorithm

: The reliable mathematical model construction of dye-sensitized solar cells (DSSCs) using the triple-diode model (TDM) is proposed but it is a challenge due to its complexity. This work implements a novel method incorporating a recent meta-heuristic optimizer called the heterogeneous marine predators algorithm (H-MPA) to identify the nine parameters of the triple-diode equivalent circuit of DSSCs. In the optimization procedure, the nine unknown parameters of TDM are employed as decision variables, but the objective function to be minimized is the root mean square error (RMSE) between the experimental data and the estimated data. To prove the superiority of the H-MPA, the obtained results are compared with the slime mold algorithm (SMA), Transient search optimizer (TSO), Manta-Ray Foraging Optimization algorithm (MRFO), Forensic-Based Investigation (FBI), Equilibrium optimizer (EO), and Artiﬁcial ecosystem-based optimizer. The primary ﬁndings demonstrated the superiority of the proposed strategy in building a consistent model of the triple-diode model of DSSCs.


Introduction
In comparison with the other types of third generation solar cells, DSSCs are expected to be a highly attractive solar cell technology for the next-generation solar cells having the advantage of low-cost fabrication, energy consumption, tunable transparency, and colorization [1][2][3][4]. They demonstrate high efficiency values not only under diffuse light [5] but also under low illumination situations [6], together with a reduced angular dependence of efficiency [7]. A typical DSSC is a photoelectrochemical device consisting of the photoanode, which contains high porosity nanocrystalline nanoparticles (titanium dioxide (TiO 2 ), zinc oxide (ZnO) [8], or hybrid materials TiO 2 /ZnO [9]) sensitized by dye molecules (photosensitizer of organic [10][11][12] or inorganic nature [1,13,14]), the counter electrode (CE) [1], and the electrolyte, either liquid or solid [15], involving a redox system. In the DSSCs, the photocurrent is generated at a junction between the dye-anchored metal oxide semiconductor and the hole-conducting electrolyte upon light absorption. The counter electrode has two main jobs: it back transfers electrons arriving from the external circuit to the redox system, and it catalyzes the reduction of the charge mediator [1].
DSSCs are very hopeful for large-scale applications in both economic and technical faces. They are cost effective, relatively easy to fabricate on large scales and as panels, flexible and lightweight. They also offer transparency and color variety in comparison with the first two generations of solar cells [16][17][18]. Due to their unique transparency [19], they can easily be integrated into building-integrated photovoltaics (BIPVs) and air improvement photovoltaic AIPVs; but the outdoor long-term stability still needs a lot of research work to be achieved.
DSSCs consist of four main components namely the photosensitizer (dye) acting as light capturing antenna and electron injector, the electrolyte for regeneration of the dye, the working electrode (a mesoporous TiO 2 thin film) for electrons conduction and collection as well as the counter electrode (Pt) for redox couple renewal ( Figure 1) [20][21][22][23][24][25][26][27][28]. Creating a consistent mathematical model of DSSCs based on the triple-diode model (TDM) is a challenge due to its complexity. Several attempts have been made [29]; however, the previous optimization algorithms offered high convergence speed and global search. These algorithms have some drawbacks; for example, most of these algorithms diverged their accuracy between the single diode model (SDM) and the double diode model (DDM). Nevertheless, it is challenging to accomplish consistent accuracy. Consequently, the precision and consistency in PV parameter determination are yet to be conducted. Few research studies are concentrated on TDM because it has nine parameters that increase the difficulty of the optimization process. Therefore, in the current research work, the TDM has been studied to model the DSSCs applying a heterogeneous marine predators algorithm (H-MPA). The obtained results are compared with slime mold algorithm (SMA) [30], Transient search optimization algorithm (TSO) [31], Manta-Ray Foraging Optimization algorithm (MRFO) [32], Forensic-Based Investigation (FBI) [33], Equilibrium optimizer (EO) [34] and Artificial ecosystem-based optimization (AEO) [35].
The contributions of the current research work are outlined as follows: • Applying the TDM for DSSCs to obtain best estimated parameters and performance simulation for the first time.

•
A new application of the heterogeneous marine predators algorithm to identify the TDM parameters for DSSCs.

•
The obtained results by the heterogeneous marine predators algorithm are compared with the other methods.

•
The accuracy and superiority of the heterogeneous marine predators algorithm in defining parameters of the TDM are proved.
The flow chart of the planned research is shown in Figure 2 while the remainder of the work is given as follows: Section 2 presents the experimental work. The mathematical representation of the TDM has been explained in Section 3. The suggested methodology to determine the model parameters is discussed in Section 4. The heterogeneous marine predators algorithm is described in Section 5. The obtained results are presented and discussed in Section 6. Lastly, Section 7 outlines the main findings of the paper.

Triple Diode Model for PV
The triple diode model (TDM) recorded more significant performance than the regular single diode model (SDM) and double diode models (DDM) by emulating the comparatively complex non-linearity of PV cells. Moreover, the TDM is considered a worthy model for simulating the physical performance of different PV modules where the grain boundaries influence, and high leakage current in the PV solar modules materials is considered in the TDM [29].
The electrical equivalent scheme of TDM is modeled by a photocurrent source, I pv , three parallel diodes with saturation currents I 01 , I 02 , and I 03 , that paralleled with a resistance R p then the total circuit is connected in series resistance R s . The scheme of TDM is depicted in Figure 3. Considering the electric scheme of Figure 1, the produced current by TDM can be expressed as below: where I irr is a photocurrent, while the I 01 , I 02 and I 03 are the three diodes D1, D2, and D3 reverse saturation currents. The a 1 , a 2 , and a 3 symbols of the ideality factors of the three diodes, V t refers to the constant of thermal voltage, it can be calculated via K b * T q , where q and T are the electron's charge and the absolute temperature, respectively, and K b is the Boltzmann's constant. The V and I represents the total output voltage and current. Based on Equation (1), it is required to determine nine variables that are namely; a 1 , a 2 , a 3 , R s , R p , I 01 , I 02 , I 03 , I pv to represent the physical behavior of the PV cell.

Experimental Work
The dye-sensitized solar modules in this study were purchased from Brite Solar and their characteristics are as follows, Mechanical Specifications: Length, Width and Thickness are 475 mm, 380 mm, and 6.4 mm, respectively. The solar module's total area and active area are 0.181 m 2 and 1012 cm 2   The photovoltaic characteristics of the panel were measured for five hours (from 11:00 to 16:00) and the environmental conditions (T, H%) prevailing during these hours were recorded. The results are presented in Table 1 and Figure 5.

The Proposed Methodology for Identifying the Model Parameters
For implementing the TDM to emulate the PV cell, the model's unknown nine parameters must be determined. To model the non-linear equation of Equation (1) as an optimization problem, the RMSE between the measured and the estimated PV characteristic on the basis of the identified TDM parameters is formulated as an objective function. The minimum value of the RMSE is an indicator of the high accuracy of the estimated parameters [29]. The estimated current can be easily computed based on the estimated parameters via applying the Newton-Raphson function to solve the non-linear equations of the PV model as expressed below: The fitness function: where K denotes the number of dataset points, and I meas and I est are the measured and estimated current. The estimated current is determined using the Newton-Raphson method of Equation (3) and the identified parameters.
where dI denotes the difference function of I. The dI symbols are the first derivative of dI with respect to I.

Heterogeneous Marine Predators Algorithm
The marine predators algorithm (MPA) has been recently developed by Faramarzi [36]. The MPA was investigated by several researchers due to its simplicity and flexibility. At the same time, it has a significant drawback as the number of iterations is divided between the main core phases of the algorithm (exploration and exploitation). Therefore, in this work, this issue is solved by using the heterogeneous concept. In the heterogeneous concept, the exploration and exploitation have different groups; each modified its position throughout the total iteration numbers. After each iteration, these groups are recombined for best the solution determination so far to guide the others. The overview of the basic MPA and the main structure of the heterogeneous marine predators algorithm (H-MPA) is described in detail as follows.

Marine Predators Algorithm
The Marine predator's algorithm (MPA) is an optimization technique innovated by the authors in [36]. The core concept of MPA is inspired by the relationship between marine prey and predator. Based on this concept, MPA initiates the optimization process by a set of random solutions.
where rand is random numbers [0, 1]. Ub, LB are the upper and lower limits of the search area, respectively. Next, two matrices, one for the best solution obtained so far and the other for the candidates' positions as expressed below: where M best , M are the best and the solutions matrices.
MPA updates the solutions using the following phases.
• Phase 1: Exploration phase (High-speed ratio): in this stage, it is assumed that the predator is slower than the prey. Such a stage is yielded throughout the first third of the iterations. Then, the prey uses the following mathematical relation to update its position.
where R [0, 1] is a vector formed from random numbers, P = 0:5. R B is the Brownian motion vector. • Phase 2: Transition phase (unity speed ratio): in this stage, the speed of the prey and predator is identical; therefore, it is implemented in the middle of the optimization process. In this stage, the predator and prey use the Brownian approach and levy flight approach, respectively, while updating their positions. The population is divided into two subgroups; the first one uses Equations (8) and (9) and the other section uses Equations (10) and (11) to modify the locations.
where R L is a randomly generated variable by the Levy distribution. (11) where t and t max denote the present and maximum no. of iterations, respectively. • Phase 3 Exploration phase (low-speed ratio): in this part, the predator moves faster than the prey to be able to catch it. This phase is yielded in the last third of iterations. Equation (12) shows the relation for the location modification: Important points that Faramarzi et al. [36] have accounted for in the MPA are: • Eddy formation and the effect of fish aggregating devices (FADS): The eddy formation and FADS have an impact on the predator performance; therefore, the algorithm developer is considered while implementing the MPA. Their mathematical equation can be expressed as below: where B is the binary solution. FAD = 0:2. r [0, 1]. r 1 and r 2 denote the random index of the prey.
Marine memory: A marine predator remembers its position everywhere its productivity in foraging is efficient. Accordingly, the MPAs developed considered this behavior while implementing this algorithm. Therefore, the MPA saves the previous optimal solution in memory for comparison with the new location of food. Based on the previous descriptions, the flowchart of the MPA can be depicted in Figure 6 as below:

Heterogeneous Marine Predators Algorithm Based PV Modeling
This section summarizes the strategies that are followed to enhance the motion of the search agents while discovering and exploiting the optimal solutions. The basic MPA used the number of iterations as a transition condition between exploration (phase 1), transition (phase 2) and exploitation (phase 3) phases, hence each phase does not have an adequate number of tries to discover the search area and converge to the best solutions. Therefore, in the enhanced MPA, this issue is solved by considering the exploration and transition phases as separate processes, where the candidates are divided into two subgroups, and each group is implemented for the same number of iterations. The first group (g1) can be implemented via Equations (6) and (7) while the second group (g2) is followed by Equations (8)- (11). The generated solutions of both g1 and g2 are combined; then a non-uniform mutation is applied to the solutions. In the last stage, Equations (12)- (14) are performed on the solutions. The non-uniform mutation is illustrated in Algorithm 1.

•
Step 1: Generally, the H-MPA starts with a set of random solutions as shown in Equation (15): where UB j , and LB j , denote the upper and lower limits, respectively. For TDM, the d = 9.

•
Step 2: Calculate the initial objective function (Obj f ). Next, build the M best matrix (top predator) and search agents' matrix as in Equation (5).

•
Step 4: The subgroups are combined, and the non-uniform mutation of Algorithm 1 is applied to the solutions.

•
Step 5: The solutions are modified using Equations (12) and (13) • Step 6: Evaluation of the new solutions and upgrade the top predator M best . • Step 7: The memory saving process then the FADs for each predator of Equation (14) are applied.

•
Step 8: Repetition of the previous steps until the maximum number of iterations is met.

Results and Discussions
In this part, the parameters of the triple diode model are identified based on the proposed H-MPA using several measured datasets for the dye-sensitized solar dye module with 22 cells in series at different levels of irradiation and temperature, as reported in Table 2. For evaluating the H-MPA performance, numerous recently registered metaheuristic algorithms in the literature are implemented using the same population size (50) and the number of iterations (500). The performed algorithms include slime mold algorithm (SMA), transient search optimization (TSO) algorithm, manta-ray foraging optimization (MRFO) algorithm, forensic-based investigation (FBI), equilibrium optimizer (EO), and artificial ecosystem optimizer (AEO). For unbiased analysis, 30 independent runs were used to implement all the algorithms. Finally, several statistical analyses and non-parametric tests of the Wilcoxon rank test and Friedman rank test are performed to justify the performance of the proposed optimizer. The upper and lower boundaries of the triple diode model parameters are adjusted as LB = [1, 1, 1, 0.001, 10, 1 × 10 −12 , 1 × 10 −12 , 1 × 10 −12 , 0] and UB = [2, 2, 2, 100, 10,000, 1 × 10 −6 , 1 × 10 −6 , 1 × 10 −6 , 0.5] for vector of unknown parameters [a 1 , a 2 , a 3 , R s , R p , I 01 , I 02 , I 03 , I pv ]. A MATLAB environment is used to perform both simulation and analysis. The identified parameters by the proposed algorithm (H-MPA) and the other counterparts for the six studied cases are presented in Table 3 with the corresponding fitness function (RMSE). Regarding the tabulated results in Table 3, the proposed H-MPA succeeded in extracting the optimal parameters of the dye-sensitized solar TDM circuit with the best RMSE of 1 × 10 −4 , 2 × 10 −4 , 2.99 × 10 −4 , 9.57 × 10 −4 , 9.22 × 10 −4 , and 1.45 × 10 −3 for the studied cases, respectively. On the other hand, the MRFO comes in the last rank achieving the worst errors of 9.396 × 10 −3 , 8.61 × 10 −3 , 2.78 × 10 −2 , 3.45 × 10 −3 , and 3.99 × 10 −2 for cases 1, 3, 4, 5, and 6, respectively, while in case 2 EO comes in the last rank achieving error of 2.21 × 10 −4 case 2.  It can be said that the proposed H-MPA outperformed the others in all studied cases, achieving the best RMSE; this means it succeeded in constructing a reliable model that converges with the real one. Table 4 displays the results of a set of statistical analyses, including minimum, maximum, mean, and median values of the RMSE throughout a group of independent runs beside the standard deviation (STD) and non-parametric test-based Wilcoxon sign-rank test and non-hypothesis test. Regarding the statistical analysis for case 1 given in Table 4, one can see that the proposed H-MPA achieved the best performance with the lowest variance and STD of 8.57 × 10 −21 and 9 × 10 −11 . respectively. However, in that case, the TSO comes in the last rank with values of 8.66 × 10 −6 and 0.002943 for STD and variance, respectively. By inspecting the reported data and the values of RMSE, one can detect that the H-MPA has remarkable performance in providing more accurate and consistent results than the other counterparts in all studied cases. The STDs obtained by H-MPA have values in a range of 10 −11 to 10 −4 . In contrast, the MPA scored lower STD values. Furthermore, the resultant number of ranks where the H-MPA outperforms the other algorithm (R+) and the p-values of the Wilcoxon sign-rank test provides evidence of existing significant differences in favor of H-MPA in most of the studied cases. To justify the superiority of the proposed H-MPA statistically, the Friedman test was applied to illustrate the rank of the proposed optimizer versus the other competitors. The Friedman test reports the final rank of the optimizers over the six cases as 1, 4.3334, 7, 4.6667, 4, 3.3334, 3.66667 for the H-MPA, SMA, TSO, MRFO, FBI, EO and AEO, respectively. It is obvious that the H-MPA has the first rank while the closer optimizer for the H-MPA is EO with an average rank of 3.3334, accordingly, the H-MPA is the superior optimizer as indicated from Friedman's ANOVA table in Table 5. The reported p-value for the chi-square statistic of Table 5 of 0.0004 reveals the significant difference between the MPA and other optimizers, statistically.  The acceleration convergence speed of the H-MPA is the second sector that should be studied. As a result, the mean convergence curves are plotted as shown in Figure 7 for H-MPA versus the other counterparts. The proposed optimizer has superior performance than the SMA, MRFO, TSO, FBI, EO, and AEO in converging for highly qualified solutions in a smooth acceleration response.

Conclusions
In this study, a heterogeneous marine predators algorithm was applied to determine the nine unknown parameters model of dye-sensitized solar cells based on the triplediode model. Six experimental datasets have been considered during the identification process. A set of statistical analyses, including minimum, maximum, mean, and median values of the RMSE throughout a group of independent runs, in addition to the standard deviation and non-parametric test-based Wilcoxon sign-rank test and non-hypothesis test, were used to evaluate the H-MPA. The results were compared with slime mold optimizer  Based on the previous discussions, the H-MPA proves its efficiency; therefore, the current-voltage relationship (I-V) and power-voltage relationship (P-V) curves based on the estimated parameters by H-MPA are depicted in Figure 8. The curves reveal a good fitting for the experimental datasets; however, it includes several outlays.

Conclusions
In this study, a heterogeneous marine predators algorithm was applied to determine the nine unknown parameters model of dye-sensitized solar cells based on the triple-diode model. Six experimental datasets have been considered during the identification process. A set of statistical analyses, including minimum, maximum, mean, and median values of the RMSE throughout a group of independent runs, in addition to the standard deviation and non-parametric test-based Wilcoxon sign-rank test and non-hypothesis test, were used to evaluate the H-MPA. The results were compared with slime mold optimizer (SMA), Transient search optimizer (TSO), Manta-Ray Foraging Optimization algorithm (MRFO), Forensic-Based Investigation (FBI), Equilibrium optimizer (EO) and Artificial ecosystembased optimization (AEO). The comparison of results demonstrated the superiority of the H-MPA based-strategy in identifying the unknown parameters of the triple-diode model of dye-sensitized solar cells. The Friedman test was applied to illustrate the rank of the proposed optimizer versus the other competitors. The Friedman test reports the final rank of the optimizers over the six cases as 1, 4.3334, 7, 4.6667, 4, 3.3334, 3.66667 for H-MPA, SMA, TSO, MRFO, FBI, EO and AEO, respectively. It is obvious that the H-MPA has the first rank while the closer optimizer for the H-MPA is EO with an average rank of 3.3334, accordingly the H-MPA is the superior optimizer as indicated in Friedman's ANOVA test. The reported p-value for the chi-square statistic of 0.0004 reveals the significant difference between the MPA and other optimizers statistically.