**Modified Search Strategies Assisted Crossover Whale Optimization Algorithm with Selection Operator for Parameter Extraction of Solar Photovoltaic Models**

#### **Guojiang Xiong 1,\*, Jing Zhang 1, Dongyuan Shi 2, Lin Zhu 3, Xufeng Yuan <sup>1</sup> and Gang Yao <sup>4</sup>**


Received: 21 October 2019; Accepted: 25 November 2019; Published: 26 November 2019

**Abstract:** Extracting accurate values for involved unknown parameters of solar photovoltaic (PV) models is very important for modeling PV systems. In recent years, the use of metaheuristic algorithms for this problem tends to be more popular and vibrant due to their efficacy in solving highly nonlinear multimodal optimization problems. The whale optimization algorithm (WOA) is a relatively new and competitive metaheuristic algorithm. In this paper, an improved variant of WOA referred to as MCSWOA, is proposed to the parameter extraction of PV models. In MCSWOA, three improved components are integrated together: (i) Two modified search strategies named WOA/rand/1 and WOA/current-to-best/1 inspired by differential evolution are designed to balance the exploration and exploitation; (ii) a crossover operator based on the above modified search strategies is introduced to meet the search-oriented requirements of different dimensions; and (iii) a selection operator instead of the "generate-and-go" operator used in the original WOA is employed to prevent the population quality getting worse and thus to guarantee the consistency of evolutionary direction. The proposed MCSWOA is applied to five PV types. Both single diode and double diode models are used to model these five PV types. The good performance of MCSWOA is verified by various algorithms.

**Keywords:** metaheuristic; parameter extraction; solar photovoltaic; whale optimization algorithm

#### **1. Introduction**

Solar energy is an inexhaustible and carbon emission-free energy source to promote sustainable development. Solar photovoltaic (PV) is becoming the preferred choice for meeting the rapidly growing power demands globally [1,2]. It is a clean energy according to the principle of sustainability. Take China as an example, according to the latest data from the National Energy Administration, PV added 5.20GW capacity, which was more than that of wind (added 4.78GW) in the first quarter of 2019 [3]. In addition, by the end of the first quarter of 2019, the total installed PV capacity had reached 180GW, accounting for 24.3% of renewable energy, only 0.09GW below that of wind, and the gap is narrowing. Along with the increasing installed capacity of PV, its impact on the connected power system is growing, and thereby, analyzing PV systems' dynamic conversion behavior is quite important and necessary. Thereinto, accurate modeling of the PV system's basic device, i.e., the PV cell or module, is the premise and crux. The most widely used modeling tool is the single diode (SDM) and double diode (DDM)

equivalent circuit models [4]. The SDM and DDM have five and seven unknown model parameters, respectively, and extracting accurate values for these parameters is just the purpose of this study.

Many methods have been proposed to solve the parameter extraction problem of PV models. They can be categorized into analytical methods and optimization methods approximately. Analytical methods mainly use some special data points such as short-circuit point, open-circuit point, and maximum power point of the current-voltage (I–V) characteristic curve under standard test conditions (STC) to formulate a few mathematical equations for the unknown model parameters. They have the features of simplicity, rapidity, and convenience. Their extraction accuracy is directly subject to the selected special data points provided by the manufacturers. In this context, the incorrectly specified values for these data points will degrade the extraction accuracy considerably due to the extraction strategy of "taking a part for the whole" [5,6]. In addition, those employed special data points are factory measured under the STC, while the PV degradation makes the model parameters change over time [7], which further influences the extraction accuracy of the "taking a part for the whole" methods.

Different from the analytical methods, the optimization methods abandon the heavy dependence on several special data points and use a number of actual measured data points to extract the unknown model parameters. First, an optimization objective function is constructed to reflect the difference between the measured data and the calculated data based on the idea of curve fitting. Then, solution optimization methods, including deterministic methods and metaheuristic methods, are designed to minimize the objective function and thereby to obtain the values for the unknown model parameters. These solution methods can overcome the shortcomings of the analytical methods thanks to "taking all actual measured data" rather than "taking a part of factory measured data" for the whole. The deterministic methods such as the Newton method, Newton–Raphson method and Levenberg–Marquardt algorithm are gradient-based methods. They are likely to get stuck in local optima especially for complicated multimodal problems such as the one considered in this work. Additionally, simplification and linearization are frequently performed to ease the optimization procedure. Consequently, they may result in poor approximate and unreliable solutions [8].

Metaheuristic methods, alternatively, do not use the gradient information and make no simplification or linearization to the optimization procedure. Therefore, they can hedge the problems of deterministic methods and have attracted growing attention recently. Many metaheuristic methods concluding particle swarm optimization (PSO) [9–11], differential evolution (DE) [12], teaching-learning-based optimization (TLBO) [13,14], supply-demand-based optimization (SDO) [15], symbiotic organisms search algorithm (SOS) [16], JAYA algorithm [17], artificial bee colony (ABC) [18], imperialist competitive algorithm [19], flower pollination algorithm (FPA) [20], hybrid algorithms [21–24], etc., have been applied to the parameter extraction problem of PV models.

The whale optimization algorithm (WOA) [25] is a new and versatile metaheuristic method inspired by the special spiral bubble-net hunting behavior of humpback whales. It performs effectively, competitively, and has been applied to various engineering optimization problems, including the parameter extraction problem of PV models. For example, Oliva et al. [26] utilized the chaotic maps to improve the performance of WOA and then applied the modified WOA to the concerned problem here. Abd Elaziz and Oliva [27] employed the opposition-based learning to enhance the exploration of WOA and applied the resultant WOA variant to both benchmark optimization functions and the problem considered here. Xiong et al. [28] developed two improved search strategies to balance WOA's local exploitation and global exploration, and then applied the improved WOA to different PV models. In reference [29], Xiong et al. used DE to enhance the exploration of WOA and then employed the hybrid algorithm to both benchmark optimization functions and different PV models.

From our previous works [28,29], we know that the original WOA performs well in local exploitation but badly in global exploration, which easily leads to premature convergence. They also reveal that the use of both improved search strategies and DE can enhance the performance of WOA significantly. Having noticed this, in this paper, we propose two modified search strategies named

WOA/rand/1 and WOA/current-to-best/1 inspired by DE. The former uses one random weighted difference vector to perturb a randomly selected individual and thus to improve the exploration; while the latter simultaneously adopts one current-to-best weighted difference vector and one random weighted difference vector to perturb the current individual and thereby to maintain the exploitation. In addition, in the original WOA, the values of all dimensions of each offspring completely come from a vector generated by one search strategy, which cannot meet the exploration and exploitation performance requirements of different dimensions. In this case, a crossover operator based on the modified search strategies is designed. It adopts two different search strategies to generate each offspring simultaneously, which can further promote the balance between exploration and exploitation. Moreover, the original WOA preserves the generated vector regardless of its quality. This "generate-and-go" strategy may result in retrogression or oscillation in evolutionary process. To prevent this phenomenon from occurring, a selection operator instead of the "generate-and-go" operator is implemented to guarantee the consistency of evolutionary direction. The resultant improved variant of WOA, referred to as MCSWOA, is applied to five PV types modeled by both SDM and DDM.

The main contributions of this paper are the following:


The rest of this paper is organized as follows. In Section 2, the mathematical formulation of the parameter extraction problem is described. Section 3 introduces the original WOA. Section 4 gives the proposed MCSWOA. Section 5 presents the experimental results and comparisons. The discussions are provided in Section 6. Finally, the paper is concluded in Section 7.

#### **2. Problem Formulation**

#### *2.1. Single Diode Model (SDM)*

The equivalent circuit of SDM is presented in Figure 1.

**Figure 1.** Equivalent circuit of a single diode model (SDM).

The output current *I*<sup>L</sup> can be achieved according to the Kirchhoff's current law:

$$I\_{\rm L} = I\_{\rm ph} - I\_{\rm d} - I\_{\rm sh} \tag{1}$$

where *I*ph, *I*sh and *I*<sup>d</sup> are the photogenerated current, shunt resistor current, and diode current, respectively. *I*<sup>d</sup> and *I*sh are calculated as follows [4,6]:

$$I\_{\rm d} = I\_{\rm sd} \cdot \left[ \exp(\frac{V\_{\rm L} + R\_{\rm s} \cdot I\_{\rm L}}{nV\_{\rm t}}) - 1 \right] \tag{2}$$

$$V\_t = \frac{kT}{q} \tag{3}$$

$$I\_{\rm sh} = \frac{V\_{\rm L} + R\_{\rm s} \cdot I\_{\rm L}}{R\_{\rm sh}} \tag{4}$$

where *I*sd is the saturation current, *V*<sup>L</sup> is the output voltage, *R*<sup>s</sup> and *R*sh are the series and shunt resistances, respectively, *<sup>n</sup>* is the diode ideal factor, *<sup>k</sup>* is the Boltzmann constant (1.3806503 <sup>×</sup> <sup>10</sup>−<sup>23</sup> <sup>J</sup>/K), *<sup>q</sup>* is the electron charge (1.60217646 <sup>×</sup> <sup>10</sup>−<sup>19</sup> C), and *<sup>T</sup>* is the cell temperature (K).

The output current *I*<sup>L</sup> can be obtained by substituting Equations (2) and (4) into (1):

$$I\_{\rm L} = I\_{\rm ph} - I\_{\rm sd} \cdot \left[ \exp\left(\frac{V\_{\rm L} + R\_{\rm s} \cdot I\_{\rm L}}{nV\_{\rm t}}\right) - 1\right] - \frac{V\_{\rm L} + R\_{\rm s} \cdot I\_{\rm L}}{R\_{\rm sh}} \tag{5}$$

From Equation (5), it can be seen that the SDM has 5 unknown parameters (i.e., *I*ph, *I*sd,*R*s,*R*sh, and *n*) that need to be extracted.

#### *2.2. Double Diode Model (DDM)*

When considering the effect of the recombination current loss in the depletion region, we can get the equivalent circuit of DDM, as shown in Figure 2. It performs well in some applications [4].

**Figure 2.** Equivalent circuit of a double diode model (DDM).

The output current *I*<sup>L</sup> is calculated as follows:

$$\begin{array}{l} I\_{\rm L} = I\_{\rm ph} - I\_{\rm d1} - I\_{\rm d2} - I\_{\rm sh} \\ \huge{h} = I\_{\rm ph} - I\_{\rm sd1} \cdot \left[ \exp\left(\frac{V\_{\rm L} + R\_{\rm s} I\_{\rm l}}{n\_{\rm L} V\_{\rm t}}\right) - 1\right] \\ \harrow -I\_{\rm s2} \cdot \left[ \exp\left(\frac{V\_{\rm L} + R\_{\rm s} I\_{\rm l}}{n\_{\rm L} V\_{\rm t}}\right) - 1\right] - \frac{V\_{\rm L} + R\_{\rm s} \cdot I\_{\rm l}}{R\_{\rm sh}} \end{array} \tag{6}$$

where *I*sd1 and *I*sd2 are diode currents, *n*<sup>1</sup> and *n*<sup>2</sup> are diode ideal factors. The DDM has 7 unknown parameters (i.e., *I*ph, *I*sd1, *I*sd2,*R*s,*R*sh, *n*<sup>1</sup> and *n*2) that need to be extracted.

#### *2.3. PV Module Model*

For a PV module with *N*<sup>s</sup> × *N*<sup>p</sup> solar cells in series and/or in parallel, its output current *I*<sup>L</sup> can be formulated as follows:

For the SDM based PV module:

$$I\_{\rm L} = N\_{\rm P} \left\{ I\_{\rm ph} - I\_{\rm sd} \cdot \left[ \exp\left(\frac{V\_{\rm L}/N\_{\rm s} + R\_{\rm s}I\_{\rm L}/N\_{\rm P}}{nV\_{\rm t}}\right) - 1\right] - \frac{V\_{\rm L}/N\_{\rm s} + R\_{\rm s}I\_{\rm L}/N\_{\rm P}}{R\_{\rm sh}} \right\} \tag{7}$$

For the DDM based PV module:

$$I\_{\rm L} = N\_{\rm P} \left\{ \begin{array}{c} I\_{\rm ph} - I\_{\rm sd1} \cdot \left[ \exp\left(\frac{V\_{\rm L}/N\_{\rm s} + R\_{\rm s} \mathrm{l}\_{\rm L}/N\_{\rm P}}{n\_{\rm I} V\_{\rm t}}\right) - 1\right] \\ - I\_{\rm sd2} \cdot \left[ \exp\left(\frac{V\_{\rm L}/N\_{\rm s} + R\_{\rm s} \mathrm{l}\_{\rm L}/N\_{\rm P}}{n\_{\rm I} V\_{\rm t}}\right) - 1\right] - \frac{V\_{\rm L}/N\_{\rm s} + R\_{\rm s} \mathrm{l}\_{\rm L}/N\_{\rm P}}{R\_{\rm sh}} \end{array} \right\} \tag{8}$$

#### *2.4. Objective Function*

One way to extract the unknown parameters of PV models is to construct an objective function to reflect the difference between the measured data and the calculated data. Commonly, the root mean square error (RMSE) between the measured current *IL*,measured and the calculated current *IL*,calculated as shown in Equation (9) is recommended [6,8,9,30,31].

$$\min f(\mathbf{x}) = \text{RMSE}(\mathbf{x}) = \sqrt{\frac{1}{N} \sum\_{k=1}^{N} \left[ I\_{L,\text{calculated}}^{k}(\mathbf{x}) - I\_{L,\text{measured}}^{k} \right]^2} \tag{9}$$

where *N* is the number of measured data, *x* is the vector of unknown parameters.

#### **3. Whale Optimization Algorithm**

WOA [25] is an effective metaheuristic inspired by the special spiral bubble-net hunting behavior of humpback whales. In WOA, the position of each whale (i.e., population individual) is represented as *xt <sup>i</sup>* = [*xt <sup>i</sup>*,1, *<sup>x</sup><sup>t</sup> <sup>i</sup>*,2, ... , *<sup>x</sup><sup>t</sup> <sup>i</sup>*,*D*], where *i* = 1, 2, ... , *ps*, *t* = 1, 2, ... ,*t*max, *ps* is the population size, *t*max is the maximum number of iterations, and *D* is the dimension of one individual. WOA contains the following three parts:

#### (1) Encircling prey

WOA defines the position of a current best humpback whale as the target prey, and other whales encircle the prey using the following formulation:

$$\mathbf{x}\_{i}^{t+1} = \mathbf{x}\_{\mathcal{S}}^{t} - A \cdot |\mathbf{C} \cdot \mathbf{x}\_{\mathcal{S}}^{t} - \mathbf{x}\_{i}^{t}| \tag{10}$$

where *xt <sup>g</sup>* is the best position found so far. *A* and *C* are coefficient parameters and calculated for each individual using the following method:

$$A = 2 \cdot a \cdot r - a \tag{11}$$

$$\mathbb{C} = \mathbf{2} \cdot \mathbf{r} \tag{12}$$

where *a* linearly decreases from 2 to 0 with the increasing of iterations. *r* is a random real number in (0,1).

#### (2) Bubble-net attacking method

WOA employs both shrinking encircling and spiraling to spin around the prey with the same probability as follows:

$$\mathbf{x}\_{i}^{t+1} = \mathbf{x}\_{\mathcal{S}}^{t} - A \cdot |\mathbf{C} \cdot \mathbf{x}\_{\mathcal{S}}^{t} - \mathbf{x}\_{i}^{t}| \quad \text{if } p < 0.5 \tag{13}$$

$$\mathbf{x}\_{i}^{t+1} = \mathbf{x}\_{\mathcal{S}}^{t} + \exp(bl) \cdot \cos(2\pi l) \cdot |\mathbf{x}\_{\mathcal{S}}^{t} - \mathbf{x}\_{i}^{t}| \quad \text{if } p \ge 0.5 \tag{14}$$

where *b* is a constant for defining the shape of the logarithmic spiral, *l* and *p* are random real numbers in (0,1).

#### (3) Searching for prey

Before finding the prey, humpback whales swim around and select a random whale to search for prey. This behavior is formulated as follows and continues if |*A*| ≥ 1.

$$\mathbf{x}\_{i}^{t+1} = \mathbf{x}\_{r}^{t} - A \cdot |\mathbf{C} \cdot \mathbf{x}\_{r}^{t} - \mathbf{x}\_{i}^{t}| \tag{15}$$

where *<sup>r</sup>* <sup>∈</sup> {1, 2, ... , *ps* is different from *i*.

#### **4. The Proposed MCSWOA**

#### *4.1. Modified Search Strategies*

It is well-known that balancing exploration and exploitation is very important for a metaheuristic algorithm. For the original WOA, it emphasizes the exploitation excessively and thus easily suffers from premature convergence [28]. In order to solve this issue, one active method is to modify its search strategy.

Differential evolution (DE) [32] has proved its efficiency in solving different real-world problems. The efficiency of DE comes largely from its versatile mutation strategies. The following are 2 popular mutation strategies widely used in the literature:

$$\text{DE/rand/} \, 1: \boldsymbol{v}\_{i}^{t} = \mathbf{x}\_{r1}^{t} + F \cdot (\mathbf{x}\_{r2}^{t} - \mathbf{x}\_{r3}^{t}) \tag{16}$$

$$\text{DE}/\text{current} - \text{to} - \text{best}/\text{1}: \mathbf{v}\_i^t = \mathbf{x}\_i^t + F \cdot (\mathbf{x}\_{\mathcal{g}}^t - \mathbf{x}\_i^t) + F \cdot (\mathbf{x}\_{r1}^t - \mathbf{x}\_{r2}^t) \tag{17}$$

where *r*1, *r*2 and *r*3 are random distinct integers selected from 1, 2, ··· , *ps* and are also different from *i*, the parameter *F* is the scaling factor. The former, i.e., DE/rand/1 strategy, usually presents good exploration while the latter, i.e., DE/current-to-best/1 strategy exhibits good exploitation.

Inspired by the mutation strategies of DE, in this paper, two modified search strategies are proposed to generate new donor individuals as follows:

$$\text{WOA/rand}/\mathbf{1}: \boldsymbol{v}\_i^t = \mathbf{x}\_{r1}^t - A \cdot |\mathbf{x}\_{r2}^t - \mathbf{x}\_{r3}^t|\tag{18}$$

$$\text{WOA/current} - \text{to} - \text{best}/\mathbf{1}: \boldsymbol{v}\_{i}^{t} = \mathbf{x}\_{i}^{t} - A \cdot |\mathbf{x}\_{\mathcal{S}}^{t} - \mathbf{x}\_{i}^{t}| - A \cdot |\mathbf{x}\_{r1}^{t} - \mathbf{x}\_{r2}^{t}| \tag{19}$$

The above-modified search strategies are employed to replace Equations (15) and (13), respectively.

#### *4.2. Modified Search Strategies Assisted Crossover Operator*

In the original WOA, the random parameter *p* is generated for each individual, indicating that all dimensions would perform the same search strategy. For example, on the premise of |*A*| ≥ 1, if *p* < 0.5, then the current individual would perform Equation (15). According to Equation (15), WOA updates the current individual around a random individual *x<sup>t</sup> <sup>r</sup>*, which is beneficial for the exploration but harmful to the exploitation. In fact, different dimensions of an individual have different performance requirements for exploration and exploitation. For one dimension, it is wise to perform the exploration-oriented search strategy if the population diversity associated with this dimension is high; otherwise, it is wise to perform the exploitation-oriented search strategy. In order to meet the performance requirements of different dimensions, a crossover operator based on the abovementioned modified search strategies is proposed and shown in Figure 3. In the crossover operator, for each dimension of each individual, the random parameter *p* is regenerated, and thereby the target dimension of the donor individual has the same chance of deriving from 2 search strategies, which is able to promote the balance between the exploration and exploitation. This crossover operator can be formulated as follows:

$$
\boldsymbol{\upsilon}\_{i,d}^{t} = \begin{cases}
\begin{array}{cc}
\mathbf{x}\_{r1,d}^{t} - A \cdot |\mathbf{x}\_{r2,d}^{t} - \mathbf{x}\_{r3,d}^{t}| & \text{if } p < 0.5 \\
\mathbf{x}\_{g,d}^{t} + \exp(bl) \cdot \cos(2\pi l) \cdot |\mathbf{x}\_{g,d}^{t} - \mathbf{x}\_{i,d}^{t}| & \text{if } p \ge 0.5
\end{array} & \text{if } |A| \ge 1 \\
\begin{array}{cc}
\mathbf{x}\_{i,d}^{t} - A \cdot |\mathbf{x}\_{g,d}^{t} - \mathbf{x}\_{i,d}^{t}| - A \cdot |\mathbf{x}\_{r1,d}^{t} - \mathbf{x}\_{r2,d}^{t}| \text{ if } p < 0.5 \\
\mathbf{x}\_{g,d}^{t} + \exp(bl) \cdot \cos(2\pi l) \cdot |\mathbf{x}\_{g,d}^{t} - \mathbf{x}\_{i,d}^{t}| & \text{if } p \ge 0.5
\end{array} & \text{if } |A| < 1
\end{cases}
\tag{20}
$$

**Figure 3.** Modified search strategies assisted crossover operator sketch.

#### *4.3. Selection Operator*

In the original WOA, the target individual is directly replaced by the newly generated vector regardless of its quality. This "generate-and-go" operator is not very effective because the newly generated vector may be worse than the target individual. In order to guarantee the consistency of evolutionary direction, a selection operator is employed to determine whether the target individual or the donor individual survives to the next iteration. This selection operator is formulated as follows:

$$\mathbf{x}\_{i}^{t+1} = \begin{cases} \boldsymbol{v}\_{i}^{t} & \text{if } f(\boldsymbol{v}\_{i}^{t}) \le f(\mathbf{x}\_{i}^{t})\\ \mathbf{x}\_{i}^{t} & \text{if } f(\boldsymbol{v}\_{i}^{t}) > f(\mathbf{x}\_{i}^{t}) \end{cases} \tag{21}$$

Hence, the prerequisite of using the donor individual to replace the target individual is that the donor individual achieves an equal or better fitness value; otherwise, the donor individual is abandoned, and the target individual is retained and passed on to the next iteration. Consequently, the population either gains quality improvement or maintains the current quality level, but never gets worse.

#### *4.4. The Main Procedure of MCSWOA*

By combining the abovementioned 3 improved components into WOA, the MCSWOA is developed and presented in Algorithm 1. Compared with the original WOA, it can be seen that: (1) MCSWOA needs only a small extra computational cost in comparing the fitness values of current individuals with those of donor individuals. (2) The structure of MCSWOA also remains very simple, and no new parameter that needed to be adjusted is introduced. (3) The use of the selection operator makes MCSWOA an elitist method that is able to preserve best individuals in the population.

#### **Algorithm 1:** The main procedure of MCSWOA **1:** Generate a random initial population **2:** Evaluate the fitness for each individual **3:** Select the best individual *x*<sup>0</sup> best and set it as *<sup>x</sup>*<sup>0</sup> *g* **4:** Initialize the iteration counter *t* = 1 **5: While** the stopping condition is not satisfied **do 6: for** *i* = 1 to *ps* **do 7:** Update *a*, *A*, and *l* **8: for** *d* = 1 to *D* **do 9:** Update *p* **10: if** *p* < 0.5 **then 11:** Select three random individuals *x<sup>t</sup> <sup>r</sup>*<sup>1</sup> *xt <sup>r</sup>*<sup>2</sup> *xt <sup>r</sup>*<sup>3</sup> *x<sup>t</sup> i* **12: if** |*A*| ≥ 1 **then 13:** *vt <sup>i</sup>*,*<sup>d</sup>* <sup>=</sup> *xt <sup>r</sup>*1,*<sup>d</sup>* <sup>−</sup> *<sup>A</sup>*·|*xt <sup>r</sup>*2,*<sup>d</sup>* <sup>−</sup> *<sup>x</sup><sup>t</sup> r*3,*d* | **14: else 15:** *vt <sup>i</sup>*,*<sup>d</sup>* <sup>=</sup> *xt <sup>i</sup>*,*<sup>d</sup>* <sup>−</sup> *<sup>A</sup>*·|*x<sup>t</sup> <sup>g</sup>*,*<sup>d</sup>* <sup>−</sup> *<sup>x</sup><sup>t</sup> i*,*d* | − *<sup>A</sup>*·|*x<sup>t</sup> <sup>r</sup>*1,*<sup>d</sup>* <sup>−</sup> *xt r*2,*d* | **16: end if 17: else 18:** *vt*<sup>+</sup><sup>1</sup> *<sup>i</sup>*,*<sup>d</sup>* <sup>=</sup> *<sup>x</sup><sup>t</sup> <sup>g</sup>*,*<sup>d</sup>* <sup>+</sup> exp(*bl*)· cos(2π*l*)·|*x<sup>t</sup> <sup>g</sup>*,*<sup>d</sup>* <sup>−</sup> *xt i*,*d* | **19: end if 20: end for 21: end for 22:** Evaluate the fitness for each donor individual **23: for** *i* = 1 to *ps* **do 24: if** *f*(*vt i* ) <sup>≤</sup> *<sup>f</sup>*(*xt i* ) **then 25:** *xt*<sup>+</sup><sup>1</sup> *<sup>i</sup>* <sup>=</sup> *<sup>v</sup><sup>t</sup> i* **26: else 27:** *xt*<sup>+</sup><sup>1</sup> *<sup>i</sup>* <sup>=</sup> *<sup>x</sup><sup>t</sup> i* **28: end if 29: end for 30:** Select the best individual *x<sup>t</sup>* best of the updated population **31: if** *f*(*xt* best) <sup>≤</sup> *<sup>f</sup>*(*x<sup>t</sup> <sup>g</sup>*) **then 32:** *<sup>x</sup>t*+<sup>1</sup> *<sup>g</sup>* <sup>=</sup> *<sup>x</sup><sup>t</sup>* best **33: else 34:** *<sup>x</sup>t*+<sup>1</sup> *<sup>g</sup>* <sup>=</sup> *<sup>x</sup><sup>t</sup> g* **35: end if 36:** *t* = *t* + 1 **37:End while**

#### **5. Experimental Results**

#### *5.1. Test Cases*

In this work, the proposed MCSWOA was applied to five PV types, including RTC France cell, Photowatt-PWP201 module, STM6-40/36 module, STP6-120/36 module, and Sharp ND-R250A5 module. Both the SDM and DDM were adopted to model them, and thus we could get 10 test cases. The detailed information about these 10 test cases is tabulated in Table 1. The search ranges of involved parameters are presented in Table 2. They are kept the same as those used in [6,9,10].


**Table 1.** Test photovoltaic (PV) models in this work.

NA denotes the value is not available in the literature.

**Table 2.** Ranges of parameters of PV models.


#### *5.2. Experimental Settings*

In this work, the maximum number of fitness evaluations (Max\_FEs) setting as 50,000 [15,17,24,33] was employed as the stopping condition. All involved algorithms used the same population size with the value *ps* = 50 [14,24]. With regard to other parameters associated with the compared algorithms, the same values in their original literature were used for a fair comparison. In addition, 50 independent runs for each algorithm on each test case were performed in MATLAB 2017a.

#### *5.3. Experimental Results*

#### 5.3.1. Comparison of MCSWOA with WOA

In this subsection, the proposed MCSWOA was compared with the original WOA to demonstrate its effectiveness. The experimental results tabulated in Table 3 contain the minimum (Min), maximum (Max), mean, and standard deviation (Std Dev) values of the RMSE values over 50 independent runs. The best results on each case are highlighted in **boldface**. It can be seen that MCSWOA was significantly better than WOA in all terms of RMSE values in all cases, indicating that the proposed modified components could improve the performance of WOA considerably.

The extracted values corresponding to the minimum RMSE given by MCSWOA for the involved unknown parameters are presented in Table 4. By using these extracted parameters, the output current could be easily calculated and given in Tables 5–9, respectively. Two error metrics, i.e., individual absolute error (IAE) and the sum of individual absolute error (SIAE) were used to evaluate the fitting results between the calculated current and the measured current. Tables 5–9 only provide the detailed calculated current of MCSWOA due to the space limitation, while for WOA only the SIAE values were listed. It is obvious that MCSWOA achieved smaller SIAE values than WOA on all cases. Namely, the calculated current obtained by MCSWOA fitted the measured current better than that of WOA, meaning that the parameters extracted by MCSWOA were more accurate. In addition, it can be observed that the DDM obtained slightly smaller SIAE values on the RTC France solar cell and Photowatt-PWP201 module, while the SDM yielded somewhat better results on the STM6-40/36, STP6-120/36 and Sharp ND-R250A5 modules. However, the differences were very small, which could be confirmed by some representative reconstructed *I-V* and *P-V* characteristic curves illustrated in Figure 4. Figure 4 also shows that the calculated data given by MCSWOA with both SDM and DDM were highly in agreement with the measured data throughout the entire voltage range.


**Table 3.** Experimental results of the whale optimization algorithm (WOA) and MCSWOA.

**Figure 4.** Comparison between the measured and calculated data achieved by MCSWOA. (**a**) RTC France cell; (**b**) STM6-40/36 module; (**c**) STP6-120/36 module; (**d**) Sharp ND-R250A5 module.


**Table 4.** Extracted value for involved parameters by MCSWOA.

**Table 5.** Calculated results of MCSWOA for the RTC France solar cell.



**Table 6.** Calculated results of MCSWOA for the Photowatt-PWP201 module.

**Table 7.** Calculated results of MCSWOA for the STM6-40/36 module.



**Table 8.** Calculated results of MCSWOA for the STP6-120/36 module.

**Table 9.** Calculated results of MCSWOA for the Sharp ND-R250A5 module.



**Table 9.** *Cont.*

#### 5.3.2. The Benefit of MCSWOA Components

It can be seen from Section 4 that the proposed MCSWOA has three improved components, i.e., modified search strategies, crossover operator, and selection operator. In this subsection, the influence of these three components on MCSWOA was assessed. Six variants of MCSWOA were considered here: (1) WOAwM: The original WOA with modified search strategies; (2) WOAwC: The original WOA with crossover operator; (3) WOAwS: The original WOA with selection operator; (4) MCSWOAwoM: The proposed MCSWOA without modified search strategies; (5) MCSWOAwoC: The proposed MCSWOA without crossover operator; and (6) MCSWOAwoS: The proposed MCSWOA without selection operator.

The mean and standard deviation values of the RMSE values over 50 independent runs are summarized in Table 10. The Wilcoxon's rank sum test was employed to compare the significance between MCSWOA and other algorithms. It is clear that MCSWOA performed significantly better than all of the other algorithms on all cases. Comparing WOAwM, WOAwC, and WOAwS with the original WOA, they won on 7, 10 and 5 cases while lost on 3, 0, and 5 cases, respectively. Additionally, comparison with WOAwM, WOAwC, and WOAwS, MCSWOAwoM beat them on all cases; MCSWOAwoC was better on 9, 4, and 9 cases, respectively; and MCSWOAwoS outperformed WOAwM and WOAwS on all cases, while just lost on cases 9 and 10 when compared with WOAwC. The comparison result indicated that the crossover operator contributed the most to MCSWOA, followed by the selection operator and modified search strategies. Besides, the absence of any improved component would deteriorate the performance of MCSWOA.

#### 5.3.3. Comparison with Advanced WOA Variants

In this subsection, some advanced WOA variants were employed to verify the proposed MCSWOA. These advanced WOA variants included CWOA [34], IWOA [28], Lion\_Whale [35], LWOA [36], MWOA [37], OBWOA [27], PSO\_WOA [38], RWOA [39], SAWOA [40], WOA−CM [41], and WOABHC [42]. The experimental results are summarized in Table 11. It can be seen that MCSWOA was consistently significantly better than all of the other 11 algorithms on all cases, according to the statistical result of Wilcoxon's rank sum test. In addition, the standard deviation values of RMSE achieved by MCSWOA were also the smallest, meaning that the proposed algorithm was the most robust one among these 12 advanced WOA variants. Furthermore, the Friedman test result presented in Figure 5 manifests that MCSWOA yielded the first ranking, followed by IWOA, WOA−CM, Lion\_Whale, MWOA, WOABHC, RWOA, LWOA, SAWOA, PSO\_WOA, OBWOA, and CWOA. Some representative convergence curves given in Figure 6 indicate that MCSWOA had the fastest convergence speed overall, while other algorithms converged relatively slowly and had the possibility of being plunged into local optima. IWOA was slightly faster than MCSWOA at the initial stage on Case 2, but it was overtaken and surpassed quickly by MCSWOA.


**Table 10.** Influence of components on MCSWOA (Mean ±Std. dev.).

115

**Figure 5.** Friedman test result of MCSWOA with advanced WOA variants.

**Figure 6.** Convergence curves of MCSWOA with advanced WOA variants. (**a**) Case 2; (**b**) Case 4; (**c**) Case 7; (**d**) Case 9.



**Table** 

#### 5.3.4. Comparison with Advanced Non−WOA Variants

The performance of MCSWOA was further verified by some advanced non−WOA variants. Thirteen algorithms consisting of BLPSO [43], CLPSO [44], CSO [45], DBBO [46], DE/BBO [47], GOTLBO [14], IJAYA [17], LETLBO [48], MABC [49], ODE [50], SATLBO [15], SLPSO [51], and TLABC [24] were employed for comparison in this subsection. The result of Wilcoxon's rank sum test tabulated in Table 12 shows that MCSWOA performed very competitively and outperformed all of the other 13 algorithms on 9 cases except Case 4, on which MCSWOA was surpassed by ODE and DBBO, and tied by TLABC. Considering the standard deviation values, the comparison result was similar to that of the mean values of RMSE, which validated the good robustness of MCSWOA. Similarly, the Friedman test result given in Figure 7 shows that MCSWOA won the first ranking again, followed by TLABC, IJAYA, SATLBO, LETLBO, GOTLBO, ODE, DE/BBO, DBBO, CLPSO, MABC, BLPSO, SLPSO, and CSO. In addition, the convergence curves in Figure 8 reveal again that MCSWOA obtained a competitively fast convergence speed throughout the whole evolutionary process although it was temporarily surpassed by ODE at the early stage.

**Figure 7.** Friedman test result of MCSWOA with advanced non−WOA variants.


 **12.** Comparison with some advanced non−WOA variants (Mean ± Std. dev.).

**Table**

**Figure 8.** Convergence curves of MCSWOA with advanced non−WOA variants. (**a**) Case 1; (**b**) Case 5; (**c**) Case 8; (**d**) Case 9.

#### **6. Discussions**

In this work, we present modified search strategies, crossover operator, and selection operator to enhance the performance of MCSWOA. In the modified search strategies, WOA/rand/1 strategy focuses on the exploration, while WOA/current−to−best/1 strategy emphasizes the exploitation. They can cooperate well to achieve a good ratio between exploration and exploitation. In the crossover operator, each dimension of each donor individual has the same chance of deriving from two search strategies, which can further promote the balance between exploration and exploitation. In the selection operator, only comparative or better individuals can survive to the next iteration, which makes the population either gain quality improvement or maintain the current quality level, but never get worse. Experiments have been conducted on five PV types modeled by both SDM and DDM. From the experimental results and comparisons, we can summarize that:


#### **7. Conclusions**

An improved WOA variant referred to as MCSWOA by integrating modified search strategies, crossover operator, and selection operators is proposed to extract accurate values for involved unknown parameters of PV models. Five PV types modeled by both SDM and DDM are employed to validate the performance of MCSWOA. The experimental results compared with various algorithms (original WOA, 6 MCSWOA variants, 11 WOA advanced variants, and 13 non−WOA advanced variants) demonstrate that MCSWOA is better or highly competitive in terms of the solution quality, convergence performance, and statistical analysis, indicating that it can achieve more accurate and reliable parameters of PV models. Therefore, MCSWOA is a promising candidate for parameter extraction of PV models.

In this work, the proposed MCSWOA is verified at one given operating condition for a PV type, and its performance still has room to improve. In future work, on the one hand, adaptive learning and local search strategies will be used to further enhance its performance and, on the other hand, other PV types operating at different irradiances and temperatures will be employed to verify the enhanced performance.

**Author Contributions:** Conceptualization, G.X.; Writing—original draft preparation, G.X.; Writing—review and editing, J.Z., D.S., and L.Z.; Formal analysis, X.Y.; Resources, X.Y. and G.Y.

**Funding:** This research was funded by the National Natural Science Foundation of China (Grant No. 51907035, 51867005, 51667007), the Scientific Research Foundation for the Introduction of Talent of Guizhou University (Grant No. [2017]16), the Guizhou Education Department Growth Foundation for Youth Scientific and Technological Talents (Grant No. QianJiaoHe KY Zi [2018]108), the Guizhou Province Science and Technology Innovation Talent Team Project (Grant No. [2018]5615), the Science and Technology Foundation of Guizhou Province (Grant No. QianKeHe Platform Talents [2018]5781).

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
