Very accurate parameter estimation of single- and double-diode solar cell models using a modified artificial bee colony algorithm

This paper proposes an effective method for very accurate parameter estimation of single- and double-diode solar cell models. For this purpose, unknown parameters of model are estimated by minimization of an objective function using a new highly effective modified version of artificial bee colony (ABC) algorithm. The proposed algorithm is used for parameter estimation of single- and double-diode models and the results are compared, from different aspects, with recently developed related works (including those applied GA, CPSO, PS, SA, IGHS, ABSO, ABC, GGHS, and IADE for this purpose). The proposed algorithm is also compared with other modified explanations of ABC algorithm. The results show that the proposed strategy is considerably faster and more accurate compared to all the previous studies.


Introduction
The solar energy constitutes the biggest source of energy in our world. This kind of energy is clean, cheap, endless, and reachable in most parts of the planet. Nowadays, according to the limitations of fossil fuels and their proved consequences on climate change and global warming, there is an increasing attention to solar energy all around the world.
Solar cells are often used to get energy from the sun light, especially when the electrical energy is needed. It yields the fact that analysis and predicting the behavior of solar cells at different working conditions with a high precision is of high importance in practice. Of course, this task cannot be performed without accurate modeling of these devices. So far, various electrical models have been developed for extracting the I-V curve of solar cells (see, for example, [1][2][3][4] and the references therein). Among others, the so-called single-and double-diode models are more often used in practice. At this time, a variety of methods are available for parameter estimation of these two electrical models. Some attempts in this field are focused on using classical analytical and numerical methods for parameter estimation based on minimization of a suitably chosen cost function [1,[5][6][7][8][9][10]. The main drawback of such classical methods is the high probability of falling in local optimums, besides the complexity of calculations.
As a well-known fact, any optimization algorithm has its own advantages and disadvantages. For example, GA is often known for its slow convergence. PSO is fast but commonly the accuracy of solutions is not increased by increasing the number of iterations (to be adjusted by trial and error) [31]. High sensitivity to the initial guess and low probability of finding the global optimum are the main drawbacks of SA. A similar discussion goes on other optimization algorithms. In general, algorithms with smaller number of parameters (to be adjusted by user by trial and error), faster convergence and higher probability of skipping from local optimums are identified as more effective algorithms. It is very important to note that effectiveness of a certain algorithm strictly depends on the problem it is going to solve. In other words, it may happen that a certain algorithm be very successful in dealing with a problem while it is quite unsuccessful in dealing with another one. For this reason and as a common practice, researchers apply different techniques to a certain problem to find the best method suited to solve it. More often authors try to combine two or more methods in a single hybrid one [32][33][34]. The aim is to use different models with unique features to overcome the single negative performance and finally improve the performances. Hence, proposing the most effective algorithm (i.e., the one at once with the highest accuracy, fastest convergence, smallest number of parameters, most ease of use, etc.) for parameter estimation of solar cell models is of high importance in practice.
The main aim of this paper is to develop a modified explanation of artificial bee colony (ABC) algorithm, MABC, and study its applications for parameter estimation of single-and double-diode solar cell models and compare the results with competing methods. ABC, which is inspired from the behavior of honey bees in nature, is originally developed by [35] as a tool for solving nonlinear optimization problems. So far, this algorithm has been successfully used for solving wide variety of real-world problems (see, for example [36][37][38], for some very recent applications of this algorithm). In this paper, we have modified the definition of the so-called scout bees in classical ABC algorithm to arrive at a version of this algorithm which, compared to all previous studies, is highly effective for solving the problem under consideration (and probably many others as well).
The rest of this paper is organized as the following. Formulation of the problem is presented in ''Problem description'' section. In this section, single-and doublediode models are reviewed and the proposed objective function is introduced. The ABC algorithm is briefly reviewed in ''Summary of ABC Algorithm'' section and the proposed modification is also presented in this section. In ''Proposed ABC algorithm'' section, the proposed ABC algorithm is applied to some benchmark functions and the results are compared with those obtained using other modified ABC algorithms. ''Simulation results for benchmark function'' section is devoted to simulation results. In this section, the proposed approach is used for parameter estimation of single-and double-diode models and the results are compared (from different aspects) with other algorithms. Finally, ''Results and discussion'' section concludes the paper.

Problem description
As mentioned before, it is common practice to model solar cells using the so-called single-and double-diode models, where the parameters of these models are often calculated by minimization of a suitably chosen cost function. In the following, first we briefly review these two electrical models and then we introduce our proposed cost function to be minimized.

Double-diode model of solar cells
The double-diode electrical model of solar cells is shown in Fig. 1. According to this figure, the electrical current passing through the load is obtained as the following [4]: where I ph is the electrical current generated by solar cell, I d1 is the electrical current of first diode, I d2 is the electrical current of second diode, I sh is electrical current of shunt resistor and I L is the electrical current passing through the load connected to solar cell. I d1 and I d2 in (1) are calculated through the Shockley equation as the following: where R s is the resistor in series with load, I sd1 and I sd2 are the reverse bias saturation currents, V L is the load voltage, n 1 and n 2 are the diode ideality factors, k is the Boltzmann constant, q is the electric charge of electron and T is the Fig. 1 The double-diode model of solar cells absolute temperature of solar cell in Kelvin. On the other hand, according to Fig. 1, I sh is calculated as the following: Substitution of I d1 , I d2 and I sh from (2), (3), and (4) in (1) yields: Hence, the output power of the solar cell under consideration is obtained as: In the double-diode model, as discussed above, the seven parameters {n 2 , n 1 , R sh , R s , I sd2 , I sd1 , I ph } are considered as unknown parameters of problem to be estimated.

Single-diode model of solar cells
The single-diode model as shown in Fig. 2 is the most widely used model for extracting the I-V curve of solar cells. According to this figure, the load current provided by cell is obtained as the following: This leads to the following formula for the power generated by this cell.
In the single-diode model shown in Fig. 2 {I ph , I sd1 , R s , R sh , n} are assumed to be the unknown parameters to be estimated.

Objective function
As mentioned before, the single-and double-diode models consist of five and seven unknown parameters, respectively, which are determined by solving a root mean square error (RMSE) optimization problem in this paper. For this purpose, the load current is calculated and measured at different working conditions and the unknown parameters are calculated such that the proposed objective function defined as the following: where N is the number of measurements, and I L,i and I meas,i stand for the ith calculated and measured load currents, respectively.
In this paper, a modified explanation of ABC algorithm is proposed to find the value of unknown parameters of model; the cost function given in (9) is minimized.

Summary of ABC algorithm
The ABC algorithm, which belongs to the family of natureinspired meta-heuristic optimization algorithms, was first introduced in 2005 by Karaboga [35]. This algorithm is inspired from the behavior of honey bees in nature and provides us with a powerful tool for solving complex optimization problems. In the ABC algorithm, artificial bees in the colony are divided into three parts: employed bees, onlooker bees, and scout bees. Employed bees (whose number is equal to onlooker bees) discover the food sources, bring the food to hive and share its location with other bees. Onlooker bees stay in the hive and decide to follow the employed bees based on the quality of the food sources they have discovered. Scout bees randomly search the outdoor (independent of employed bees) to find (probably better) unseen food sources. In ABC algorithm, the location of each food source identifies a point in the domain of problem (i.e., a potential solution) and points with smaller value for cost function are assumed to be better food sources (better solutions).
Mathematically, in the first step of algorithm, the solution vectors are selected randomly from the domain of problem. For this purpose, position of the nth artificial bee (n = 1, 2, …, SN) is considered as the following: where SN and m stand for the number of artificial bees and number of variables, respectively, and x n1 , x n2 , …, x nm are random numbers selected from the domain of definition of problem. At each step, employed bees search around the food sources x n (i.e., the previous solutions in their memory) to find the potentially better sources where the components of x n and v n are related through the following equation: In the above equation, k (k 6 ¼ n) is a randomly selected integer in the range [1,SN] and / ni is a random number with uniform distribution selected from [-1,1]. The new solution v n is replaced with the previous one, where f is the m-variable cost function to be minimized. Else, the previous one is retained.
After calculating the location of new sources from (11) and performing necessary substitutions, the fitness of each new source is calculated from the following equation: Where fit(x n ) is the fitness of the source located at x n , and fit(x n ) is the value of the (m-variable) cost function to be minimized at this point. Then, onlooker bees in the hive choose the employed bees of the next iteration based on the quality of their food sources. More precisely, first the probability of choosing the food source located at x n (to be used in the next iteration for further search around) denoted as P n is calculated as the following: Then, a roulette wheel is used for determining the food sources to be used by employed bees in the next iteration (angles of the corresponding sectors of roulette wheel are considered proportional to the probabilities calculated from (13)). Note that at each iteration onlooker bees select exactly SN bees by chance and, consequently, some of the employed bees may not be selected at all, while some others are selected more than once. In the standard ABC algorithm, one of the employed bees is selected and classified as the scout bee [39] (later, this definition is slightly modified in [40]). The classification is controlled by a control parameter called ''limit''. In this manner if a solution representing a food source is not improved after a predetermined number of successive trials, then that food source is abandoned by its employed bee and the employed bee associated with that food source becomes a scout, which searches around randomly. The number of trials for releasing a food source is equal to the value of ''limit'', which is an important control parameter in ABC algorithm. In this paper, however, for increasing the accuracy of results we have adopted more than one scout bee (similar to [40]) and, moreover, the scout bees are assumed to follow the best employed bee of colony instead of performing a random search. More precisely, any employed bee that cannot find a better solution (compared to its previous findings) after ten successive iterations is considered as a scout bee who begins to follow the best bee of colony. Fig. 3 The flowchart of proposed algorithm To sum up, at each iteration first the new locations are calculated from (11) and their qualities are evaluated through (12). Then, necessary substitutions are performed and the selection probabilities are calculated from (13). Next, some of these locations are selected by onlooker bees and the possible scout bee is determined, and this procedure is repeated until a certain termination condition is fulfilled. It is obvious that using this procedure low-quality food sources are most likely to be abandoned by onlooker bees and, as a result, employed bees tend to search around the locations with higher fitness values. The location with the highest fitness value (taking into account all iterations and all bees) is considered as the final solution (of course, for this purpose the best solution should be memorized at each iteration).

Proposed ABC algorithm
In the classical ABC algorithm, random selection of the location of scout bees reduces the effectiveness of algorithm. The reason (especially when the objective function is continuous and a large number of iterations is performed) is that it is very improbable that the point randomly selected by a scout bee be better than the solution obtained by cooperative search of employed bees after several iterations. However, in the proposed method the position of scout bee is considered equal to the position of the close to the best solution obtained so far, that is Obviously, using the above definition for scout bees leads to a more search around the best solution obtained so far. Currently, many methods are available to modify Eq. (11) [41][42][43][44]. Especially, in [40] / ni is selected in the range [-SF,SF] (SF is the scaling factor) where SF is     selected using Rechenberg's 1.5 rule mutation during search. But in this paper, SF is modified through (15) which is inspired by the PSO algorithm: In the above equation, x max and x min are selected equal to 1 and 0.7, respectively. According to the above discussion and Table 1, the modified ABC algorithm to estimate the parameters of single-and double-diode models of solar cells is proposed as Fig. 3.

Simulation results for benchmark function
To demonstrate the capabilities of the proposed algorithm, it is applied to some benchmark functions [45]. The mean result of 10 runs is summarized in Table 2. In this simu-   Fig. 7 Absolute error between measured and calculated powers in the single-diode model using three different algorithms Fig. 6 Absolute error between measured and calculated currents in the single-diode model using three different algorithms lation, the population of bee colony is considered equal to 80 and the maximum number of iterations is equal to 5000. Several candidate values are considered for the limit values. The mean result of 10 runs for each limit is reported.
As it can be observed in Table 2, the best candidate value is 0.06 itermax to 0.08 itermax. The result of proposed method is compared with the Gbest Algorithm in Table 3. Table 3 clearly shows that the proposed algorithm works better than the Gbest Algorithm.

Results and discussion
Experimental data used in simulations of this paper are adopted from [46] which correspond to a 57 mm diameter commercial (R.T.C France) silicon solar cell at 33°C. Note that since meta-heuristic optimization algorithms are probabilistic in nature, in all the following simulations the algorithms under consideration are executed several times and the best result is presented at each case.

Parameter estimation of single-diode model
According to Fig. 4 for the single-diode model, the appropriate size of the bee colony is 100 and the number of maximum iteration is 600. Figure 5 demonstrates the distribution of objective function (RMSE) for single-diode model for 50 runs. As it can be observed, the average line is close to minimum line which shows the capability of proposed algorithm. The unknown parameters of the proposed method are obtained by minimization of the cost function given in (9). Note that since the exact value of parameters is not known, the only way for comparing the performance of different algorithms is to evaluate this index. In fact, the algorithm that leads to a smaller value for RMSE index is considered as a more effective one. Table 4 shows the values obtained for unknown parameters of model when nine different optimization algorithms (including the proposed MABC algorithm) are applied [24]. The corresponding RMSE indices are also presented in this table for comparing purposes. As it can be observed, GGHS, MABC and IADE lead to relatively closer values for RMSE index compared to others. To make a better comparison between these three algorithms, the absolute errors between measured and calculated currents and powers are calculated at each operating point through (16) and (17) and the results are plotted in Figs. 6 and 7.
e current ¼ jI L À I measured j ð 16Þ e power ¼ jP L À P measured j ð 17Þ As it can be observed in Fig. 6, at voltages between -0.2 and 0.45 V the MABC, IADE, and GGHS lead to almost the same values for absolute current error, while at voltages between 0.45 and 0.6 V the error caused by  MABC is considerably smaller than IADE and GGHS.
Similarly, Fig. 7 shows the absolute error in power versus voltage when again these three algorithms are applied. As it can be observed in this figure, MABC exhibits a considerably better performance, especially at voltages between 0.5 and 0.6 V. Figures 8 and 9 show the P-V and I-V curves of the single-diode model (identified using the proposed MABC) and the corresponding experimental data points, respectively. As it is observed, the curves obtained using MABC perfectly match the real-world data points. This observation confirms the accuracy of the proposed method.
Another advantage of the proposed MABC algorithm is its very fast convergence. More precisely, in the above simulations, it was observed that MABC converges after about 600 iterations while ABSO (which is the fastest one among all the algorithms presented in Table 4, except MABC) converges after about 5000 iterations. Figure 10 shows the value of objective function versus iteration number when the proposed MABC [39] is applied. This figure clearly shows the considerably faster convergence of MABC, which also leads to a lower value for objective function. Note that finding smaller values for objective is equivalent to more accurate estimation of unknown parameters of the model. Table 5 represents the measured and calculated currents at 26 different working conditions and powers of the solar cell under consideration at 26 different working conditions when the proposed MABC algorithm is applied. Investigating the numbers presented in this table confirms the high accuracy of the proposed method for parameter estimation of single-diode models.
Parameter estimation of double-diode model Table 6 shows the values obtained for unknown parameters of the double-diode model under consideration using seven different algorithms. According to Fig. 11 for a double-diode model, the appropriate size of the bee colony is 200 and maximum number of iterations is 600 where again the limitations of Table 1 are considered. Figure 12 demonstrates distribution of the objective function (RMSE) for double-diode model for 50 runs. In   Note that here the number of iterations of MABC algorithm is considered equal to 600 which is considerably smaller than the 5000 iterations used by ABSO and IGHS. Since in Table 6 ABSO, IGHS, and MABC lead to more closer values for RMSE performance index we have plotted the absolute current and power errors (calculated from (16) and (17), respectively) in Figs. 13 and 14 to make a better comparison. As it can be observed in these figures, the proposed MABC algorithm leads to considerably more accurate results both in current and power estimations, especially in the voltage range 0.45 to 0.6 V.
To study the accuracy of the double-diode model obtained using MABC algorithm, the corresponding P-V and I-V curves of the model and real-world solar cell are shown in Figs. 15 and 16, respectively. As it can be observed, at each figure the curve of model perfectly matches the corresponding data points of the real-world solar cell. This observation again verifies the accuracy of the proposed method.
The last simulation of this paper studies the effect of the proposed modification in ABC algorithm on its performance. For this purpose, the value of objective function (RMSE) is plotted versus the iteration number in Fig. 17 As it can be observed, this figure clearly shows the considerably faster convergence. Note that, as it is expected, the values obtained for objective function in double-diode case are typically smaller than the values obtained for it in single-diode case (compare Figs. 10,17). However, since in Fig. 17 MABC leads to slightly smaller values for objective function, it is expected that the corresponding double-diode model also be more accurate.  Finally, relative errors between estimated (using doublediode model) and measured currents and powers are summarized in Table 7 for 26 different working conditions when MABC is applied. According to the data presented in this table, it can be easily verified that MABC has estimated both the current and power with a very high accuracy.

Conclusions
In this paper, we modified the definition of scout bees in ABC algorithm to arrive at a more effective explanation of this algorithm called MABC. Moreover, despite all previous studies, we also took into account the output power of solar cell in definition of the objective function to be minimized for estimation. The various simulations presented in this paper and the comparisons made with real-world data proved that the proposed modifications can highly improve the accuracy and speed of algorithm.  Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://crea tivecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.