Whale optimisation algorithm for photovoltaic model identification

Parameter extraction of a solar cell is essential in the simulation and design calculation of photovoltaic (PV) systems. The mathematical model of the PV module is a non-linear I–V characteristic including several unknown parameters as the PV manufacturers’ data are not sufficient. This study presents a method for estimating the parameters of the singleand double-diode PV models of a PV module based on a nature-inspired meta-heuristic optimisation algorithm known as the whale optimisation algorithm (WOA). The validity of the proposed WOA-based PV model is verified by comparing its simulation results with the experimental results for the PV modules under different environmental conditions.


Introduction
The solar energy is one of the most promising renewable sources. PV modules have short time of installation, long life of utilisation, simple circuitry and low maintenance requirements [1]. The costs of PV systems are continuously decreasing which allowed the global installed capacity to exceed 300 GW by the end of 2016 with a market growth of over 40% for the last 15 years [2].
To accurately simulate PV systems, it is essential to select a model that closely resembles the characteristics of PV cells [3]. The mathematical model of the PV module is non-linear and complex [4]. Despite the non-linearity, an accurate estimation of the cell parameters required for accurate performance evaluation. Several models have been introduced to describe the current voltage relationship [5]. In practice, there are two main equivalent circuit models used to describe the non-linear I-V relationship: single-and double-diode models.
The main parameters that describe the PV module behaviour are the generated photocurrent, saturation current, series resistance, shunt resistance, and the diode ideality factor [6]. Different methods are used to extract the parameters of PV modules, generally are assorted into (i) analytical and numerical approaches [7][8][9][10][11] or (ii) soft computing and evolutionary algorithms (EAs) [12][13][14][15]. Analytical and numerical approaches cannot provide precise values as PV models are highly non-linear, multi-variable, and multi-modal problems with many local optima. On the other hand, EA is a very effective choice for extracting the module parameters. Different EA techniques such as genetic algorithm [12] simulated annealing [13] and particle swarm optimisation [14,15] have been applied for parameter extraction of solar module parameters.
More recently, the whale optimisation algorithm (WOA) has been presented by Seyedali and Andrew [16]. It is a meta-heuristic optimisation technique, which is based on observing, imitating, and modelling the special hunting method of a group of the humpback whales. This foraging behaviour is called the bubble-net feeding method [17]. Several engineering optimisation problems have been solved by the WOA [16]. The WOA can be considered as a global optimiser because it includes exploration/exploitation ability.
In this paper, a novel approach based on the WOA technology is presented with the purpose of determining the unknown parameters of the single-and double-diode PV models. The parameter estimation method minimises the differences between calculated current and measured data by adjusting parameters of the PV models. The fitness value is evaluated by the root mean square (RMS) error [18]. The validity of the proposed PV model is verified by the simulation results, which are performed under different temperature and irradiation conditions. The paper is organised as follows: Section 2 describes the mathematical model of the PV module. In Section 3, the problem formulation is introduced. Section 4 presents the WOA. In Section 5, the simulation results and discussion are presented. Finally, Section 6 draws the conclusion.

Model of PV module
Many equivalent circuit models have been proposed to describe the I-V characteristics of the solar cell. In practice, two main circuit models: single-diode model and double-diode model are commonly used.

Single-diode model
The single-diode model is considered due to its simplicity and accuracy [19]. It includes a current source, one diode and two resistors as shown in Fig. 1.
The output current of the module is calculated as where I PV is the photovoltaic (PV) current, I o is the reverse saturation current of the diode, ∝ is the ideality factor of the diode, and V th = N s kT/q is the thermal voltage of the module. N s is the number of series connected PV cells in the module, k is the Boltzmann constant, q is the electron charge, and T is the temperature of the p-n junction in Kelvin. R s and R p are the series and shunt resistance, respectively, and V is output voltage of the module. For the single-diode model, five parameters are extracted, which are I pv , I o , R s , R p , and ∝.

Double-diode model
The two-diode model is a more accurate model that takes the effect of recombination losses in the space-charge into account by adding an additional diode. Fig. 2 shows the two-diode model. In this case, the output current of the module is calculated as I O1 and I O2 are the reverse saturation currents of diode 1 and diode 2, respectively. The I O2 term is introduced to compensate the recombination loss in the depletion region. Variables ∝ 1 and ∝ 2 are the diode ideality constants; ∝ 1 and ∝ 2 represent the diffusion and recombination current component, respectively. Although higher accuracy can be achieved using double-diode compared to the single-diode model, it requires the computation of seven parameters; I pv , I O1 , I O2 , R P , R S , ∝ 1 , and ∝ 2 .
The dependence of all of the parameters on temperature and irradiance levels is considered [20,21] where I pvn , I on , E gn , G n , R p and T n denote the photocurrent, diode saturation current, material band gap, solar irradiance, shunt resistance, and cell temperature measured at standard test conditions (STCs), respectively. E gn is set to 1.121 eV for silicon cells [20], ΔT presents the difference between T and T n . K i represents the shortcircuit current coefficient. By using these relations, the I-V characteristics of a PV module for different temperature and solar irradiance are described.

Problem formulation
To extract the parameters of different PV models from the I-V data using the optimisation techniques, the objective function should be defined and optimised. In this work, the RMS error, which minimises the difference between real and estimated values, is used as the objective function and is described as where N is the number of experimental data samples, ∅ is decision vector which consists of the parameters to be extracted. In case of single-diode model, the (V, I, ∅) is given by For the double-diode model, the function (V, I, ∅) is given as where ∅ = {I PV , I o1 ,I o2 ,R S ,R P ,∝ 1 , ∝ 2 } The aim of the study is to minimise (8) and (9) with respect to ∅. The WOA is applied to the objective function to obtain the unknown parameters of the single-and double-diode models.

Whale optimisation algorithm (WOA)
The WOA is a new meta-heuristic optimisation algorithm mimicking the hunting behaviour of humpback whales. An adult humpback whale is as big as a school bus. Fig. 3 shows this mammal. The special thing about the humpback whales is their way of hunting known as the bubble-net feeding method [17]. Humpback whales prefer to hunt school of krill or small fishes near the surface.
Humpback whales go down around 12 m down in water then start to produce bubbles in a spiral shape or '9'-shaped path encircles prey then follows the bubbles and moves upward the surface to catch the prey [22]. Fig. 3 represents this bubble net behaviour. The humpback whales work in teams of at least two individuals and are not beyond stealing prey from the bubble nets set up by others [23]. Bubble-net feeding is a unique behaviour noticed in humpback whales.
The mathematical model of encircling prey, bubble net hunting method, search for the prey is described in the following 3 subsections:

Encircling prey equation
Humpback whales can notice the prey location and en-circle them, the WOA supposes that target prey is the current best solution. Then the best search agent is defined, accordingly other search agents will update their positions towards the best search agent over the course of increasing number of iteration from start to a maximum number of iteration through the following equations: where t indicates the current iteration, A and C are coefficient vectors, X * is the position vector of the best solution obtained so far, X is the position vector. X * should be updated in each iteration, if there is a better solution. The coefficient vectors A and C are calculated as follows: where a is a variable linearly decrease from 2 to 0 over the iterations in both exploration and exploitation phases. Exploration is related to global search exploring the search space looking for good solutions while exploitation is related to local search to refine the solution avoiding big jumps on the search space. r is a random number [0, 1].

Bubble-net attacking method
To develop the mathematical equations for bubble-net behaviour of humpback whales, two methods are modelled as follows:  Fig. 4 shows the possible positions from (X, Y ) towards (X*,Y*) that can be achieved by 0 ≤ A ≤ 1 in a 2D space. (ii) Spiral updating position: To update the position of whale located at (X,Y) and prey located at (X*,Y*), a spiral equation is introduced to mimic the helix-shaped movement of humpback whales as shown in Fig. 4b, which is described as where D ′ = X * t ( ) − X t ( ) and indicates the distance of the ith whale to the prey (best solution obtained so far), b is a constant for defining the shape of the logarithmic spiral, l is a random number in [−1, 1].
There is a probability of 50% to choose either the shrinking encircling mechanism or the spiral model to update the position of whales where p expresses random number between [0, 1]. Fig. 4 Bubble-net search mechanism implemented in WOA (X* is the best solution obtained so far) a Shrinking encircling mechanism b Spiral updating position [16]

Search for prey
Exploration is expressed as follows : Vector A takes the values >1 to enforce exploration.

Simulation results
In this study, Kyocera polycrystalline KC200GT is used to test the WOA-based PV model. The typical electrical characteristics of these PV modules under the STC (module temperature, 25°C, AM 1.5 spectrum, irradiance 1000 W/m 2 ) are listed in Table 1.
According to the WOA presented in Section 4, the WOA starts with a set of random solutions. At each iteration, search agents update their positions with respect to either a randomly chosen search agent or the best solution obtained so far. Then a parameter is decreased from 2 to 0 to provide exploration and exploitation. A random search agent is chosen when A | | . 1, while the best solution is selected when A | | , 1 for updating the position of the search agents. Depending on the value of p, WOA switches between either spiral or circular movement. Finally, the WOA is terminated by the satisfaction of a termination criterion. The flowchart of the WOA approach is shown in Fig. 5.
In this study, The WOA was terminated after pre-specified number of iterations. Number of iterations was set to 500 and number of search agents was set 30. It can be noted that the WOA has the merit of high speed convergence, which is clearly shown in Fig. 6 taking about 2.8 s. The simulation results are performed using an Intel(R) Core(TM) i3 CPU M380@ 2.53 GHz Processor, 2 GB RAM, 64-bit operating system, PC. The WOA code is built using MATLAB environment. The proposed PV model for single-diode model using the WOA is tested by making a comparison with the model using the iterations method [24] and the GA method presented in [25]. The results are shown in Table 2.
Similarly, the proposed optimal PV model for double-diode PV model using the WOA is tested by making a comparison among the model using particle swarm optimisation (PSO), genetic algorithm (GA) and the WOA-based PV model for KC200GT PV module. The results are shown in Table 3 [26].  It can be realised that the values of the unknown parameters of the PV models using the WOA are close to that of other different methods and they are also in an acceptable range.
To show the superiority of the proposed method, the validity of the proposed WOA-based PV model is verified by comparing the simulation results with the experimental results for the PV modules under different environmental conditions. Fig. 7 and Fig. 8 show the I-V curves, power versus voltage (P-V) curves, and the experimental data of the KC200GT PV module under different temperature conditions for single-diode model and doublediode model, respectively. It can be demonstrated that the I-V and P-V curves of the proposed WOA-based PV model coincide with the experimental data. This distinguishes the high accuracy of the proposed PV model. Double-diode model proved to be more accurate than single-diode except at low irradiance level.
For more verification of the proposed WOA-based PV model, the absolute current error of the proposed PV model with respect to the experimental data is compared with the absolute current error of the iterations-based PV model [8] and a MATLAB PV model [27] as shown in Fig. 9. It can be noted that the absolute current error of the WOA-based PV model is lower than that of other PV models.

Conclusion
This paper proposed a method for identifying the parameters of the electrical equivalent circuits of the PV modules. The identified model is essential to simulate the behaviour of the PV modules at any operating condition. The mathematical model of the PV module is a non-linear I-V characteristic that includes several unknown parameters because of the limited information provided by the PV manufacturers. The optimised problem under study was formulated using root mean square error between the module current and the computed current. The objective of the optimised problem was to minimise the RMS error function. The WOA was successfully applied to solve the optimised problem producing the unknown parameters of the PV model for both single-and double-diode methods. The results were verified by comparing the experimental and numerical values of I-V and P-V characteristic curves under STC and under different temperatures and irradiations. The simulation results of the WOA-based PV model coincide with the experimental data. The results obtained demonstrate that the proposed models are close to that of other different methods and they are also in an acceptable range. Double-diode model proved to be more accurate than single-diode in particular at low irradiance level.