A Solution of Implicit Model of Series-Parallel Photovoltaic Arrays by Using Deterministic and Metaheuristic Global Optimization Algorithms

: The implicit model of photovoltaic (PV) arrays in series-parallel (SP) conﬁguration does not require the LambertW function, since it uses the single-diode model, to represent each submodule, and the implicit current-voltage relationship to construct systems of nonlinear equations that describe the electrical behavior of a PV generator. However, the implicit model does not analyze different solution methods to reduce computation time. This paper formulates the solution of the implicit model of SP arrays as an optimization problem with restrictions for all the variables, i.e., submodules voltages, blocking diode voltage, and strings currents. Such an optimization problem is solved by using two deterministic (Trust-Region Dogleg and Levenberg Marquard) and two metaheuristics (Weighted Differential Evolution and Symbiotic Organism Search) optimization algorithms to reproduce the current–voltage (I–V) curves of small, medium, and large generators operating under homogeneous and non-homogeneous conditions. The performance of all optimization algorithms is evaluated with simulations and experiments. Simulation results indicate that both deterministic optimization algorithms correctly reproduce I–V curves in all the cases; nevertheless, the two metaheuristic optimization methods only reproduce the I–V curves for small generators, but not for medium and large generators. Finally, experimental results conﬁrm the simulation results for small arrays and validate the reference model used in the simulations.


Introduction
The continuous effects of climate change and environmental contamination have motivated a growing interest in the use of renewable energies to replace conventional energy sources based on fossil fuels. Within renewable energies, photovoltaic (PV) energy offers interesting advantages: long life cycle, lack of mobile parts, low maintenance costs, modularity, among others [1]; that is why the installed PV capacity has been growing in the last years [2]. In a PV system, one of the most important elements is the generator; therefore, it is important to have models of this element to reproduce its electrical behavior when they operate under homogeneous and non-homogeneous conditions [3]. These models are used in different applications like the sizing of PV generators, the power, and energy production estimation, the analysis, and evaluation of maximum power point tracking techniques, model-based diagnosis, and other applications [4]. A PV generator can be connected in different configurations, nonetheless, series-parallel (SP) is one of the most used configurations. In an SP generator, two or more modules are connected in series to form a string and two or more strings are connected in parallel to form the generator. As a consequence, all the strings have the same voltage and can be analyzed independently [5]. It is worth noting that each module is formed by one or more submodules connected in series and each submodule has a bypass diode connected in antiparallel. When the irradiance and temperature of all the submodules in the generator are the same, it can be said that the generator operates under homogeneous conditions [6]. In these conditions, the whole generator can be represented by the single-diode model (SDM) scaled in voltage, according to the number of modules in the string, and scaled in current, according to the number of strings in parallel [7]. In this case, the current vs. voltage (I-V) curve has a single knee and the power vs. voltage (P-V) curve has a single maximum power point (MPP), which can be easily tracked. In real applications, the PV generator is commonly shaded, or partially shaded, by surrounding objects, passing clouds, or other objects. Hence, the operating conditions (i.e., irradiance and temperature) of the shaded submodules are different than the operating conditions of the rest of the submodules [8]. In this case, it is said that the generator operates in nonhomogeneous conditions and the generator's I-V curve may present multiple knees, which is translated into multiple MPPs in the P-V curve [9]. To model a PV generator operating in nonhomogeneous conditions, it is necessary to consider that each submodule in a module is represented by the SDM. In this way, it is possible to include the effects of the nonhomogeneous conditions in the electrical behavior of the generator [10]. Therefore, the generator can be analyzed as an equivalent circuit that is obtained by connecting strings in parallel, where each string is formed by a set of submodules connected in series [11,12].
In the literature, most of the models use the SDM to represent each submodule and they use the LambertW function [13] to obtain an explicit equation of the submodule's current as a function of its voltage [7,[14][15][16]. Then, each string formed by N submodules and a blocking diode is modeled independently by a system of N + 1 nonlinear equations, where the unknowns are the voltages of the blocking diode and the N submodules [7,[14][15][16]. Solving the system of nonlinear equations of each string, it is simple to calculate the string current and finally the generator's current. However, the evaluation of the LambertW function implies a high computational cost for the solution to the system of nonlinear equations associated with each string. For example, in [7] the modeling of a PV array based on the use of the Lambert W-function to obtain an explicit relationship between the voltage and current of any PV module is presented. In addition, the non-linear equations that describe the PV array are solved by means of explicit symbolic calculation of the inverse of the Jacobian matrix. A similar solution was published in [14], where a new formulation of the one-diode model of the PV module is solved using the LambertW function with the terminal voltage expressed as an explicit function of the current, this approximation resulting in a reduction of simulation calculation time. Another solution was presented in [16], where a model of the PV field is presented by means of a set non-linear equations characterized by a sparse Jacobian matrix, which requires a moderate computational burden, both in terms of memory use and processor speed. Optimization methods for estimating the PV module parameters are presented as a suitable option to overcome the drawbacks of deterministic and iterative methods. In addition, optimization methods are not only used in PV area for estimating parameters, since the reconfiguration of PV modules to mitigate the effect of partial shading conditions in PV arrays is currently one of the most studied topics [17]. The model proposed in [18] uses the implicit equation that describes the current-voltage relationship in the SDM. From such an equation, is it possible to construct a system of N + 2 implicit equations to model each string, where the unknowns are the string current and the N + 1 voltages of the N submodules and the blocking diode. Then, solving each string it is possible to calculate the generator's current as in the other models. In [18] the system of N + 2 implicit equations is solved by using the Trust-Region Dogleg (TRD) algorithm, which is a deterministic optimization method. However, the authors in [18] do not formulate the solution of the system of N + 2 implicit equations as an optimization problem with restrictions; moreover, the authors do not provide any justification for the selection of TRD for solving the optimization problem nor evaluate other deterministic and metaheuristic optimization algorithms. Finally, those works [7,[14][15][16]18] are focused on the model, i.e., the system of nonlinear equations, and not in the optimization algorithms used to solve such models. Therefore, from those papers it is not clear which type of optimization methods should be used to reduce the calculation time.
This paper formulates the solution of the system of N + 2 implicit equations, associated with each string, as an optimization problem with restriction for the N + 2 unknowns, i.e., string current and the voltages of the N modules and the blocking diode. Moreover, the paper evaluates four optimization algorithms, two deterministic and two metaheuristics, to solve the problem and generate the I-V and P-V curves of generators with different sizes. The two deterministic algorithms are TRD and Levenberg-Marquardt (LMA), which are widely used to solve optimization problems in different areas; while the two metaheuristic optimization algorithms are Weighted Differential Evolution (WDE) and Symbiotic Organism Search (SOS), which have been recently used for PV applications. The evaluation of the optimization algorithms is performed with simulations of small, medium, and large generators in homogeneous and non-homogeneous conditions. Finally, experimental results are used to evaluate the different optimization algorithms for a small PV generator. In light of the previous analysis, the main advantages of the proposed procedure are listed as follows: • A solution of the system of N + 2 implicit equation as an optimization problem with restrictions, which can be used to explore other optimization methods to reduce the model's solution time.

•
Performance comparison of metaheuristic and deterministic optimization algorithms for solving the problem provides guidelines to continue exploring other optimization methods to reduce the computation time.

•
A novel application of the algorithms of weighted differential evolution and search for symbiotic organisms to solve the implicit model of series-parallel photovoltaic arrays is presented.
The rest of the paper is organized as follows: Section 2 describes the implicit model used in this paper, Section 3 introduces the optimization problem and the operating principle of the optimization algorithms, Sections 4 and 5 show the simulation and experimental results, respectively, and Section 6 closes the paper with the conclusions.

Implicit Model of a Series-Parallel Generator
This section shows a brief description of the implicit model of SP generators proposed in [18], which includes the SDM used to represent each submodule, the system of N + 2 implicit equation of each string, and the calculation of the array current.

Submodule Model
The SDM (see Figure 1) has been widely used in the literature to represent the electrical behavior of PV submodules [10,19,20], which can be defined as a set of N s cells connected in series. Such a model is able to represent mono-crystalline and poly-crystalline PV cells technologies [20]; in this paper PV modules formed by poly-crystalline cells have been used in simulation and experimental validations. In the SDM, I ph represents the current generated by the photovoltaic effect, the diode D models the nonlinearities of the PN junction, and the resistors R p and R s represent the leakage currents and ohmic losses, respectively. The bypass diode (BD) is an additional connected in antiparallel to the submodule (see Figure 1) to limit the power dissipated in the cells in mismatching conditions. The calculation of the PV module parameters has been widely reported in literature, not only for the SDM model [21] but also for the two-diode [22] and three-diode model [23]. Nevertheless, the estimating parameter techniques have been more widely studied for the SDM. Such an issue has been addressed by means of different approaches which can be grouped into: analytical, deterministic and metaheuristic [24,25]. The first two groups present drawbacks concerning accuracy and convergence. Therefore, metaheuristic algorithms have been introduced as an attractive alternative for estimating the PV cells and modules parameters [25]. Such approaches may include particle swarm optimization [26], genetic algorithms [27], differential evolution [28], cuckoo search [29], among others. From the circuit shown in Figure 1, it is possible to write an implicit equation that describes the relationship between the submodule's output voltage (V) and current (I), as shown in (1), where I sat and η are the inverse saturation current, and ideality factor of D, respectively, V t,d is the diode thermal voltage and I bd is the current through BD. The thermal voltage is defined as V t,d = k · T/q, where k is the Boltzmann constant, q is the electron charge and T is the cell's temperature in K. Moreover, I db is defined in (2), where I sat,bd and η bd are the inverse saturation current and ideality factor of BD. It is worth noting that V t,d is the same for diodes D and BD since it can be assumed that the cell's temperature and the bypass diode temperature are the same if there isn't a fast change in the irradiance [30].
Although the SDM parameters (i.e., I ph , I sat , V t,d , R s and R h ) may vary with the irradiance and temperature [31][32][33], I ph is directly proportional to the irradiance; therefore, it can be used as an indication of the incident irradiance on the submodule.

Generator's Model
In general, an SP generator is formed by M parallel-connected strings (see Figure 2), where each string is formed by a set of PV modules (N m ) and a blocking diode connected in series. In turn, each module is formed by one or more submodules connected in series (N sm ); then, each string is formed by N submodules, where N = N m · N sm . The generator is connected to a power converter, which sets the generator voltage (V gen ) to perform the MPP tracking; therefore, V gen is known for the model and the objective is to find: the generator current (I gen ), the current of each string, the voltage of each submodule, and the voltage of each blocking diode.
Considering the V gen is common for all the strings, each string can be analyzed and solved independently. Then, a string formed by N submodules and a blocking diode connected in series can be represented by a system of N + 2 nonlinear and implicit equations, as shown in (3) [18]; where V is a vector formed by the voltages of the N submodules and the blocking diode ( V = [V 1 , V 2 , · · · , V N , V blk ]) and I str is the string current.
The first N equations of (3), correspond the voltage-current relationship in each submodule given in (1), while equation N + 1 describes the model of the blocking diode and it is described in (4), where I sat,blk , and η blk are the inverse saturation current and the ideality factor of the blocking diode, respectively, and V t,d is the diode thermal voltage defined in Section 2.1, since the blocking diode temperature is assumed the same of the submodules. Finally, equation N + 2 in (3) is obtained from the Kirchhoff voltage law in the loop formed with the string and V gen .
All the electrical variables of the string are obtained by solving (3), i.e., I str and V; hence, after solving all the strings, Igen can be calculated using (5).

Optimization Problem Formulation and Solution Methods
This Section defines the solution of (3) as an optimization problem with its restrictions and presents a brief explanation of the optimization algorithms used in the paper to solve the optimization problem.

Optimization Problem and Restrictions
Let R be the set of real numbers and L a non-empty subset of R n , i.e., L ⊂ R n ; then, the system of nonlinear equations given in (3) can be expressed as shown in (6), where x ∈ R n and f k : L → R, ∀ k = 1, 2, . . . , N + 2. The solution of (6) is given by all vectors a ∈ R n , such that Now, let's consider the function F obj : L → R a function defined as shown in (7).
Note that F obj is a well-defined function that guarantees the existence of a minimum, since F obj ( x) ≥ 0 for all x ∈ L is a totally ordered set where exists the infimum of F obj (L) ∈ R and this infimum is non-negative, i.e., in f F obj (L) ≥ 0. Therefore, the minimum of F obj over L exists and it is a non-negative minimum. (3) has a solution L and ( a ∈ L); hence, is a solution of (3) if and only if, a minimizes F obj given in (7).

Theorem 1. Suppose that the system of equations given in
Proof. If a is a solution of the system of equations given in (3) The last paragraph proves that the minimum point of the objective function given in (7) is the set of values that solve the system of equations shown in (3). Such a solution contains the unknown voltages in the string ( V) and the string current (I str ). However, to minimize (7) using numerical methods, it is necessary to establish the limits of I str and each unknown in V as shown in Table 1. Table 1. Upper and lower limits of the electrical variables in a string.

Variable Lower Limit Upper Limit
The lower limit of the string current is 0 A; while the upper limit is I SC,STC , which corresponds to the submodule short-circuit current in Standard Test Conditions (STC), i.e., irradiance of 1 kW/m 2 and the submodule temperature is 25 • C (i.e., T = 298.15 K). Moreover, the upper limit of the submodules voltages (V 1 . . . V N ) is open-circuit voltage in STC (V OC,STC ), which corresponds to the submodule voltage when I = 0 A. The lower limit of V 1 . . . V N is the negative value of the maximum bypass diode voltage (V bd,max ), defined in (8), which corresponds to the bypass diode voltage when I bd = I SC,STC . This current corresponds to the worst-case scenario where the submodule is completely shaded, and the string current is maximum. Finally, the upper limit of the blocking diode voltage is 0 V, which corresponds to I str = 0 A; while the lower limit corresponds to the negative value of the maximum blocking diode voltage (V blk,max ) defined in (9).

Optimization Methods
This section presents a brief description of the optimization algorithms used to minimize the objective function introduced in (7) and to find the solution to the system of nonlinear equations associated with the string (3).

Trust-Region Dogleg (TRD)
This is a deterministic algorithm with a single search agent. It starts from an initial point x 0 , that belongs to the domain of f (x), and searches the point x * that minimizes the function f through the iterative process indicated in (10), where x k is the actual position of the search agent and p k is the step of the k-th iteration.
To determine the magnitude and direction of the vector p k that approaches x k+1 to x * is posed as an optimization problem, as shown in (11), where m k (p) is an approximate function of f (x) formed by the two first terms of the Taylor series in a region Q k that contains x k .
If m k (p) is a good approximation of the objective function in a region Q k , then this region is denominated thrust-interval and it is defined as Q k = {p | |p | < ∆ k }, where ∆ k is the radius of the thrust-region in the k-th iteration. Once the vector p * k is found, i.e., the solution of (11), it is necessary to verify the fulfillment of the condition expressed in (12).
If condition (12) is fulfilled, the actual position is updated as x k+1 = x k + p * k ; then, the next step is to calculate a new model m k+1 and a new trust-region Q k+1 from the updated point x k+1 . Otherwise, if condition (12) is not fulfilled, the algorithm keeps the actual position, i.e., x k+1 = x k , and the trust-region is reduced by reducing its radius (∆ k+1 < ∆ k ). The details of this algorithm can be found in [34] along with different variants of this method.

Levenberg-Marquardt (LMA)
This is a deterministic optimization algorithm that requires the calculation of the jacobian matrix (J) and it is especially effective for solving nonlinear problems, where methods that used linear models, like Gauss-Newton, are not effective for the entire solution region [35]. The essence of this method is to select the search direction of the next step between the one given by the Gauss-Newton method and a direction close to the one provided by the gradient descent method. That direction search is selected by a criterion denominated µ k .
Let's consider an optimization problem that has the structure of a trust-interval, as shown in (13) and (14) [35].
This is a least-squares problem, which is linear with restrictions because r(x k ) is a linearized model valid in the trust-region defined by ∆ k . The solution to the problem described in (13) and (14) is obtained by solving (15), where s = x − x k , and the position of the next iteration is given by (16) [35]. (16) is solved by s k ; in this case, the best search direction is the same as the Gauss-Newton method. Otherwise, µ k > 0 and the solution of (16) fulfills s k = ∆ k ; with this condition, it is possible to find the solution of (16) and the value of µ k . When µ k 0, the search direction is close to the one of the gradient descent method and (15) approaches to (17). Further details of the Levenberg-Marquardt algorithm are provided in [35].

Weighted Differential Evolution (WDE)
This metaheuristic optimization method uses the evolution concept to solve numerical optimization problems and it is characterized by calculating the search direction and the search steps in an evolutionary way [36]. The general process of the WDE algorithm is introduced in Figure 3, where the first step is to generate two populations denominated initial population (P) and subpopulation (SubP), both randomly created with a normal distribution. Then, SubP is mutated to create TempP and vector F and binary map M are generated, by using random variables. Population SubP, F and M are used in a mutation and crossover proves to generate the new population (T), which requires verification that all the individuals fulfill the problem restrictions (boundaries control). The individuals that do not fulfill the restrictions are adjusted to be within the problem borders. Now, the objective function is evaluated for all the individuals of T and SubP and the best individuals in both populations are identified (T (i) and SubP (i) ). If T (i) is a better solution than SubP (i) , then SubP (i) is updated (SubP (i) = T (i) ), and population P is updated from SubP; otherwise, TempP, F and M are calculated to generate a new T. Finally, the best individual of P is evaluated to verify if it fulfills the stop criteria; else, a new algorithm iteration starts.

Symbiotic Organism Search (SOS)
This is a metaheuristic optimization algorithm inspired by the different interactions between the living beings of different species that share an ecosystem, named symbiotic relationships. The first phase of the algorithm is to create an initial population of particles that represents an ecosystem, and each particle represents an organism. Then, it is necessary to define some parameters, like the solution boundaries and the stop criteria, before starting the iterative process, which is based on three types of relationships: mutualism, commensalism, and parasitism. In the mutualism phase, two organisms participate, X i and X j , where X i is the i-th organism into the ecosystem and X j is a randomly chosen organism within the ecosystem. In this phase, both organisms could be benefited from each other through the creation of a new vector (M vec ) described in (18) Then, the algorithm calculates two new candidates to replace X inew and X jnew by using (19) and (20), which model the mutualist symbiotic relationship between two organisms. In (19) and (20) rand(0, 1) is a vector with random numbers between 0 and 1, and X best is the organism with the lowest value of the cost function, also known as the organism with the best adaptation in the ecosystem. Moreover, in mutualist relationships some species benefit more than the others; this phenomenon is represented by the factors BF 1 and BF 2 in (19) and (20), which are randomly assigned with 1 or 2. Once X inew and X jnew are calculated, the algorithm evaluates the objective function for both organisms. If X inew and X jnew are better solutions than X i and X j , then X inew and X jnew replace X i and X j in the ecosystem.
In the commensalism phase, X i is the same organism used in the previous phase, while X j is an organism randomly selected from the ecosystem, but it is different than X j used in the mutualism stage. The commensalism relationship between X i and X j is represented by (21), where X i benefits from X j . If the objective function of the X inew is less than the one of the objective function of X i , then X i is updated in the ecosystem.
The last symbiotic relationship is parasitism, where the organism X j is aleatory chosen from the ecosystem and X i is the same organism used in the commensalism phase, but with a random modification of one of its components. The modified X i is named parasite vector and if its objective function if better than X j , then the parasite vector replaces X j ; otherwise, the parasite vector is discarded, and it is said that X j developed immunity to the parasite. Once the three phases end for the i-th organism, the algorithm moves to the next organism to repeat the process until all the organisms in the ecosystem have been processed. At this point, one iteration if finished and the stop criteria are evaluated, if no stop condition is met, then the algorithm starts a new iteration. The detailed explanation of this algorithm is shown in [37]. Keep in mind that the evaluated algorithms (many of them) are sensitive to the assumed values for their multiple parameters. It is so sensitive that if they are not chosen with caution, they may not even converge to the expected solution even for PV arrays operating under uniform conditions. This aspect is a notable disadvantage of this metaheuristic solution strategy. Until now, there is no solid mathematical basis to predict the convergence and influence of these parameters. It is certainly possible that the results presented could have been obtained in shorter computation times, having selected other values for the algorithm parameters. However, it is worth noting that we tune the optimization algorithms in order to obtain the best results for all the algorithms. Particularly, the parameters of the metaheuristic methods selected for this work were defined randomly.

Simulations Results
This section introduces the simulation results for small, medium and large generators, i.e., PV generators formed by a single string with 6, 36 and 72 series-connected submodules, respectively. All the simulated generators are formed by Trina Solar TMS-PD05 de 270 W [38] modules, which are composed of three series-connected submodules. Moreover, the bypass diodes of the three submodules in this section are GF3045T [39]. It is worth noting that the generators considered in this section only have one string. This is because for generators with M strings each string is independently solved, which is equivalent to solve one string M times and then to sum the currents of all the strings to calculate the array current. The SDM parameters in STC are calculated, with the procedure proposed in [40], from the module datasheet information. Then, the parameters are adjusted for a module temperature of 44 • C (T = 44 • C) and an irradiance of 1 kW/m 2 (G = 1 kW/m 2 ), by following the procedure proposed in [31], obtaining the following values: I ph = 9.311 A, I sat = 23.782 ηA, η = 1.097, R s = 0.088 Ω, and R p = 246.670 Ω. Afterward, the bypass diode parameters are calculated from the datasheet information as follows: I sat,bd = 851, 540 µA and η bd = 1.634. The irradiance condition of each submodule in the generator is represented by using the linear dependence on I ph with the submodule irradiance. Therefore, the irradiance reduction in a submodule produced by some kind of shading is represented by a coefficient P irr that multiplies I ph and varies between 0 and 1. Thus the reduction of I ph is proportional to the reduction of the submodule irradiance. The P irr coefficients of all the string submodules are grouped in a vector ( P irr ) that represents the shading conditions of the string. The solutions obtained with the four optimization methods used in this paper are compared with the solution of the equivalent electrical circuit (EEC) of each generator. Those EECs for the small, medium, and large generators are implemented in Simulink of Matlab; hence, the errors calculated for the optimization algorithms are calculated concerning the EEC solution.

Small Generator
This generator is formed by two modules connected in series that correspond to six submodules. This low power generator may be used in grid-connected applications, by using a microinverter, or in stand-alone applications to charge a battery or to feed a set of lights. The simulation results of this generator operating under homogeneous (i.e., P irrh = [1 1 1 1 1 1]) and partial shading (i.e., P irrnh = [0.  Table 2. Moreover, the evaluation criteria of the simulation results (see Table 3) are: the computation time, the root mean square error (RMSE), and the number of evaluations of the objective function (F eval ).  In Figure 4a it can be observed that all the implemented optimization methods can reproduce the I-V curve of a small string (six submodules) under homogeneous conditions. Additionally, the errors in the string current calculation are similar for the different methods, as shown in Figure 4b and Table 3.
When the generator operates in partial shading conditions, three of the four algorithms (TRD, LMA, and SOS) can solve the system of implicit equations for all the voltages to reproduce the I-V with similar errors (see Figure 5 and Table 3). However, the WDE algorithm presents significant errors in the current calculation for voltages between 20 V and 55 V, as it is evidenced in Figure 5 and Table 3. Therefore, WDE is not a suitable algorithm to solve the model of a small generator in partial shading conditions. Note that under homogeneous and partial shading conditions the computation time and number of cost function evaluations (F eval ) of the deterministic optimization methods (TRD and LMA) are significantly less than the computation time and F eval of the metaheuristic algorithms (WDE and SOS), as shown in Table 3. Moreover, the RMSE values of the methods able to solve the optimization problem provide similar errors in the I-V curve reproduction.

Medium Generator
In this case, the generator is formed by one string with 12 modules (36 submodules) connected in series, which is a typical configuration for a residential application with a string inverter (e.g., ABB UNO-7.6-TL-OUTD). For this generator, the stop criteria of the optimization algorithms are modified concerning the previous subsection, as shown in Table 4, to improve the performance of the algorithms. The medium generator I-V curves for homogeneous and partial shading conditions are presented in Figures 6 and 7, respectively; while the computation time, RMSE and F eval are introduced in Table 5. Moreover, the vectors that define the homogeneous ( P irrh ) and partial shading conditions ( P irrnh ) have 36 elements and are defined as follows: all elements in P irrh are 1 and P irrnh has 24 elements equal to 0.8, 6 elements equal to 0.6, and 6 elements equal to 0.2.
The results in Figures 6 and 7 and Table 5 show that the deterministic methods (TRD and LMA) solve the system of equations of the string for homogeneous and partial shading conditions. Additionally, the RMSE values for the I-V curves are the same for both deterministic methods (less than 0.1 A); nevertheless, computation times of TRD are less than the computation times of LMA for both homogeneous and partial shading conditions. In general, metaheuristic methods present greater errors and computation times than the deterministic methods in the I-V curve's calculation. For homogeneous conditions, the current errors are concentrated in medium and high generator voltages (from 250 V to 400 V), as shown in Figure 6; those errors generate RMSE values between 13% and 60% greater than the ones of the deterministic methods. Whilst for partial shading conditions, the RMSE values of the metaheuristic methods between 15.3 and 21.3 times greater than the RMSE values of the deterministic methods, and the errors occur in the entire range of the generator voltage (see Figure 7). As observed, the computation times of the metaheuristic algorithms are two orders of magnitude greater than the computation times of the deterministic methods, which is also reflected in the number of cost function evaluations (F eval ). Finally, the results in Table 5 indicate that the implemented metaheuristic optimization methods are not suitable for solving the implicit model of a medium PV generator.

Large Generator
This generator is formed by a single string with 24 modules (72 submodules) connected in series, which can be found in industrial applications or high-power generators that use inverters whit maximum input voltages of 1 kV (e.g., Sunny Tripower 20000TL). The stop criteria are the same shown in Table 4 and the vectors that define homogeneous ( P irrh ) and partial shading ( P irrnh ) conditions have 72 elements defined as follows: all elements in ( P irrh ) are 1 and ( P irrnh ) has 30 elements equal to 0.8, 30 elements equal to 0.6, and 12 elements equal to 0.2. The generator I-V curves and the errors in the current calculation are shown in Figures 8 and 9 for homogeneous and partial shading conditions, respectively; while the computation time, RMSE and F eval are presented in Table 6.  Once more, the results in Figures 8 and 9 and Table 6 indicate that the deterministic optimization methods (TRD and LMA) are capable to reproduce the I-V curves for the evaluated conditions with RMSE less than 0.10 A. In homogeneous conditions, the computation time of LMA is 12.9% less than the one of TRD; while in partial shading conditions the computation time of TRD is 15.5% less than the computation time of LMA. Moreover, the values of F eval for TRD and LMA have similar behavior to the computation time. The metaheuristic algorithms show errors and computation time greater than the deterministic algorithms in the reproduction of the I-V curves in the evaluated operating conditions. For homogeneous conditions (see Figure 8) the biggest errors are present in high voltages; as consequence, the RMSE values of the metaheuristic methods are significantly greater (between 132% and 700%) than the deterministic algorithms. In partial shading conditions (see Figure 9) the errors are in the whole voltage range, making the RMSE values of the metaheuristic methods between 24.2 and 31.9 times the RMSE values of the deterministic methods. Additionally, the computation time of the metaheuristic algorithms is two orders of magnitude greater than the one of the deterministic algorithms, which is similar to the differences in F eval (see Table 6). After the evaluation of the four optimization algorithms for small, medium and large PV arrays, it seems that metaheuristic optimization methods do not worth their evaluations because the evaluated deterministic optimization methods outperform the evaluated metaheuristic methods. However, those results could not be obtained if the comparison is not performed; therefore, we consider that the evaluation is proposed in the paper is valid, since it is necessary to explore different optimization methods to reduce the computation time of the model. Such a reduction is important for applications like reconfiguration, energy production estimation, evaluation of MPPT techniques, among others.

Experimental Results
The performance of the optimization methods was validated with experimental data, which were obtained with the test bench shown in Figure 10 This test bench if formed by a PV with Matlab, a programmable electronic load BK Precision 8500, and a Trina Solar TMS-PD05 de 270 W [38] PV module. The PV module is the same one used in the simulations (formed by 3 submodules); however, the SDM parameters of the submodules (I ph = 9.316 A, I sat = 1.549 nA, η = 0.972, R s = 0.175 Ω and R p = 400.804 Ω) and the bypass diodes (I sat,bd = 851, 540 µA and η bd = 0.2261) are calculated from experimental I-V curves. The experimental validation considers two cables AWG 12 of 28.96 m each, which introduce losses that can be represented by resistance in series with the module of 313 mΩ. Therefore, such resistance was included in the R s parameter of each submodule; thus, the ohmic losses introduced by the cables are lumped in the R s of the submodules. The small generator used for the experimental validation was formed by one string of three submodules, which was evaluated for homogeneous (C-1) and partial shading (C-2) defined by the vectors ( P irr,1 ) = [0.4 0.4 0.4] and ( P irr,2 ) = [0.620 0.598 0.210], respectively. Moreover, the stop criteria used for the optimization algorithms were the same ones defined in Table 2. The experimental results for conditions C-1 and C-2 are summarized in Figure 11 and Table 7. Figure 11 introduces the I-V curves obtained with the experimental test bench, the four optimization algorithms (TRD, LMA, WDE, and SOS), and the equivalent electrical circuit (EEC) for conditions C-1 and C-2; while Table 7 shows the computation time, RMSE values, and F eval for the different methods.
In general, the experimental results agree with the simulation results obtained for small generators (Section 4.1) regarding computation time and current errors. On the one hand, in homogeneous conditions (C-1), the four optimization algorithms generate I-V curves that fit the experimental data with practically the same RMSE values. Moreover, the error in the current calculation for condition C-1 increases for high voltages (circles in Figure 11b), which agrees with the behavior shown in the simulation results for small generators (see Figure 4b). On the other hand, in partial shading conditions (C-2) three algorithms (TRD, LMA and SOS) reproduce the experimental I-V curves with the same RMSE values. However, the WDE presents significant errors in the current calculation for medium voltages (blue x in Figure 11b), which agree with the simulation results in Figure 5 of Section 4.1 (small generators). The behavior of the computation time in the experimental validation is similar to the one presented in simulation results. The computation time of the metaheuristic algorithms are, approximately, two orders of magnitude greater than the deterministic algorithms. Additionally, the computation time of the deterministic methods was less than the EEC in a proportion similar to the one presented above. The computation time of the four optimization algorithms is reflected in the F eval values, which are similar to the values in the simulation results. Finally, Table 7 shows that the smallest errors were obtained with the EEC model, which verifies the usefulness of this model to be used as the reference in the simulation results. (a) (b) Figure 11. Experimental results in a small generator (3 submodules) under homogeneous and partial shading conditions. (a) Current vs. voltage (I-V) curve. (b) Current calculation error.

Conclusions
The solution of the implicit model of a PV generator in SP configuration as an optimization problem has been proposed and solved with deterministic and metaheuristic algorithms. The implicit model of an NxM SP generator (M strings with N submodules each) is formed by M systems of N + 2 implicit equations, where each system of equations corresponds to one string and it can be solved independently. Moreover, in a system of N + 2 implicit equations, the unknowns correspond to the N submodules voltages, the blocking diode voltage, and the string current. To solve a system of N + 2 implicit equations, the paper proposes an objective function and defines the upper and lower restrictions for the unknowns. Finally, the paper evaluates two deterministic optimization algorithms (TRD and LMA) and two metaheuristic algorithms (WDE and SOS) to solve the optimization problem and generate the I-V curves of small, medium, and large generators.
The proposed objective function and the performance of the four evaluated methods were validated with simulation and experimental results. The simulations show that the deterministic optimization methods can solve the optimization problem for small, medium and large generators operating in homogeneous and partial shading conditions; therefore, with these algorithms, it is possible to reproduce the generator I-V curves. Moreover, simulation results show that the metaheuristic algorithms are not able to solve the optimization problem in all cases. On the one hand, SOS correctly reproduces the I-V curves for small generators under homogeneous and non-homogeneous conditions and medium generators in homogeneous conditions. Nevertheless, for the other simulation scenarios, the errors were significant. On the other hand, WDE only solved the optimization problem for small generators under homogeneous conditions; while the errors were large for the other cases concerning the deterministic methods. We believe that metaheuristic algorithms performed worse because due to the random selection of parameter values instead of the nature of the selected algorithms (weighted differential evolution and search for symbiotic organisms). This could even be explained based on the No Free Lunch Theorems (NFL) for Optimization. Additionally, experimental results confirm simulation results for small generators in homogeneous and non-homogeneous conditions, where all the methods correctly reproduce the I-V curves except for WDE under partial shading conditions. Moreover, experimental results illustrate the usefulness of the EEC model as a reference for simulation results.
Finally, the results suggest that the solution of the implicit model of SP generators should be performed with deterministic algorithms, which suggests the necessity of evaluating other metaheuristic optimization methods to solve the proposed problem and reduce the computation time. Those presented results should be used to evaluate different solutions for energy yield calculations or economic analysis of a PV system; hence as future work, an addition to the presented algorithms with energy predictions or economic calculations will be considered.