Optimal PV array reconfiguration under partial shading condition through dynamic leader based collective intelligence

This paper applies the innovative idea of DLCI to PV array reconfiguration under various PSCs to capture the maximum output power of a PV generation system. DLCI is a hybrid algorithm that integrates multiple meta-heuristic algorithms. Through the competition and cooperation of the search mechanisms of different metaheuristic algorithms, the local exploration and global development of the algorithm can be effectively improved to avoid power mismatch of the PV system caused by the algorithm falling into a local optimum. A series of discrete operations are performed on DLCI to solve the discrete optimization problem of PV array reconfiguration. Two structures (DLCI-I and DLCI-II) are designed to verify the effect of increasing the number of sub-optimizers on the optimized performance of DLCI by simulation based on 10 cases of PSCs. The simulation shows that the increase of the number of sub-optimizers only gives a relatively small improvement on the DLCI optimization performance. DLCI has a significant effect on the reduction in the number of power peaks caused by PSC. The PV array-based reconstruction system of DLCI-II is reduced by 4.05%, 1.88%, 1.68%, 0.99% and 3.39%, when compared to the secondary optimization algorithms.


Introduction
Consumption of energy has led to the rapid depletion of fossil fuels such as coal, oil and natural gas, and serious environmental pollution.These bring huge challenges [1,2].To cope with the approaching energy crisis, there is a need to change from fossil energy to low-carbon and clean renewable energy [3].As one of the most promising renewable energies, solar energy has been widely promoted and applied [4].However, photovoltaic (PV) systems in practical engineering application still face many problems that need to be solved [5].For example, PV systems are sensitive to changes in the external environment [6].When the temperature and irradiance changes rapidly, a PV system will generate a large mismatched power loss [7].In particular, when PV systems are in a partial shading condition (PSC), multiple power peaks can appear in the P-V characteristic curves of the arrays [8], resulting in a hot spot effect and causing PV panels to burn out because of local uneven heating [9].
In practical engineering application, PSC is a relatively common phenomenon [10].At present, many methods with excellent performance have been applied to solve various problems of the systems in PSC, e.g., parallel bypassed diodes on the PV panels [11] and performing maximum power point tracking (MPPT) for the output power [12].However, previous studies have shown that the multi-peak nature of the PV panel itself can lead to power mismatch loss in the connected bypass diodes [10].Also, there are huge implementation and control costs when MPPT technology is applied to large-scale PV power plants [13].
To reduce the power loss under PSC, PV reconstruction technology has become a research hotspot.The technology can be divided into static and dynamic reconstruction [14].The former changes the physical location of PV components instead of the electrical connection [15], such as Sudoku, Rubik's cube, and column index technology.From this, a method of PV array reconfiguration is proposed for PV systems in different PSCs [13].This is considered to be the perfect method for capturing the maximum power output of PV systems in different PSCs.As mentioned, it can be divided into static or dynamic reconfiguration depending on whether the electrical interconnect is changed [16].Dynamic reconfiguration shows strong optimization performance for various PSCs that change rapidly in practical engineering.Many topologies have been proposed and widely used in dynamic reconfiguration.The more common forms are series-parallel, bridge-link, TCT, Suduku, etc [17].In addition, some meta-inspiration algorithms have also been applied to the PV array reconfiguration, such as genetic algorithms (GA) [18], particle swarm optimization (PSO) [19], and butterfly optimization algorithms (BOA) [20], which can capture the maximum output power of PV arrays under dynamic and variable PSCs for TCT topology.However, these meta-inspiration algorithms easily fall into local optima because of the inherent defects of strong randomness [21].
To extract the maximum power of PV power plants in various PSCs, a novel PV array reconfiguration method based on dynamic leader-based collective intelligence (DLCI) is proposed here.A 9 × 9 TCT PV array reconstruction model is tested in various environments.The main innovations/contributions of the proposed method are: • Compared to using a single meta-heuristic algorithm, DLCI with multiple sub-optimizer search mechanisms can maximize the optimization performance of the sub-optimizer.• Through the competition and cooperation between different sub-optimizers, the convergence stability of the DLCI can be significantly improved, thereby greatly reducing the power fluctuation of a PV system during the reconstruction process.• DLCI has higher convergence speed and accuracy, and can guide other sub-optimizers at a deeper level by selecting the currently obtained optimal sub-optimizer as the dynamic leader.Therefore, the global maximum power point (GMPP) can be obtained with a higher probability by using DLCI for PV array reconfiguration under PSC.• To verify the effectiveness of the proposed method, a hardware-in-the-loop experiment is conducted, and the results of MATLAB and hardware-in-the-loop tests are compared and analyzed.
The structure of the paper is as follows: Sect. 2 describes the mathematical model of PV reconfiguration, and Sect. 3 designs the DLCI algorithm.Section 4 presents the design scheme of TCT array reconfiguration based on DLCI, while Sect. 5 conducts case analysis and research.In Sect.6, the hardware-in-the-loop experiment is employed.Section 7 provides some discussion, and Sect.8 gives a summary and perspective for the whole work.

TCT connected PV arrays
A PV cell is composed of a light generated current source, a parallel diode and a series resistor.Generally, PV cells are combined to form PV modules, which provide the required output power through series and parallel combinations [17].The schematic diagram of a PV cell is shown in Fig. 1 [22].Assuming that N s and N p are the numbers of PV cells in series and in parallel, respectively, the relationship between the output current and voltage is given as [22]: (1) s 1000 (3) where the description of each symbol is in the Nomenclature.It can be seen that the current generated by the PV array depends on both solar irradiance and temperature.TCT structure is a common PV array topology in practical engineering.In this structure, PV arrays in each row are connected in parallel, and then PV arrays in each column are connected in series.For example, an N × N TCT interconnected PV array is shown Fig. 2. The output voltage of the entire PV array and the sum of current across each column of the PV array can be described as [23]: where V ap is the maximum voltage,and I pq denotes the output current.

Performance evaluation
To evaluate the optimization performance of DLCI applied to PV array reconfiguration, three evaluation indicators are introduced, as [24]: (4) where P STC is the maximum output power in the stand- ard condition, which is defined as a solar irradiation of 1000 W/m 2 and an operational temperature of 25 ℃.P PSC is the maximum output power in the PSC, V OC is the open-circuit voltage, I SC is the short circuit current, and ∆P MMPL is the short circuit current, is the mismatched power loss.

Principle of DLCI
DLCI is a hybrid algorithm that integrates different search mechanisms of multiple meta-heuristics [22].Each algorithm is defined as a sub-optimizer, and optimal search is carried out through cooperation and competition between different sub-optimizers.Each sub-optimizer can independently perform the optimization search in each iteration, and the sub-optimizer that obtains the optimal solution will be defined as a dynamic leader.In the following iteration, the leader will pass the obtained optimal solution and optimal fitness value to other sub-optimizers to guide them at a deeper level.
Generally, because of the diversity of search, a large number of sub-optimizers will lead to higher quality optimization, though the computing time will be too long.To verify the effect of increasing the number of sub-optimizers on the optimization performance of DLCI, two structures of DLCI are designed, i.e., a DLCI-I composed of grey wolf optimizer (GWO) [25], whale optimization algorithm (WOA) [26], and moth-flame optimization (MFO) [27], and a DLCI-II composed of GWO [25], WOA [26], MFO [27], artificial bee colony (ABC) [28], and PSO [19], as shown in Fig. 3.

Solution initialization
The initial population of DLCI can be described by: where X ij is the ith candidate solution with dimension j, N is the total number of candidate solutions (population number), Dim denotes the dimension size of the problem and rand is a random number.LB j and UB j are the jth lower bound and upper bound of the given problem, respectively.

Mathematical model of DLCI-I and DLCI-II
(1) Selection of sub-optimizer.
The main operating mechanism of each sub-optimizer is described as follows.
• GWO: Gray wolves based on hunting strategy to update their positions, which can be described as [25]: where k represents the number of iterations.
represent the position vectors of α wolf, β wolf and δ wolf, respectively.
− → X represents the loca- tion vectors of other gray wolves.
• WOA: Humpback whales update their individual positions with a 50% probability by shrinking prey circles and spiral shaped path simultaneously, as [26]: (k) is the optimal position vector of the whale in the kth iteration, and − → X (k) represents the position vector of the whale in the kth iteration.The constant b is used to define the shape of the spiral, l is a random number between [−1, 1], and p is a random number between [0, 1].
• MFO: The update mechanism of the moth position is selected as a logarithmic spiral, as [27]: where the meanings of N f , N max f , k max , ⇀ F j , and ⇀ X i can be found in the Nomenclature.
• ABC: The process of bee colony searching for optimal honey bee (food source) is as follows [28]: First, scout bees search for the domain food source (domain solution) to generate a new food source (preferable solution), as: Employed bees search the domain according to the food source information shared by scout bees, and select the next food source based on the information [29,30].The probability of the ith bee being selected is calculated by: where f j represents the fitness function of the ith bee, and N represents the population size.After the target food source is determined, employed bees can update their position according to (18).The search strategy of the scout bees is described by: where −−→ X min and −−→ X max are the minimum and maxi- mum position vectors, respectively, where as r is a random number within [0, 1].
• PSO: In each iteration, each particle updates its velocity and position as: where V i is the velocity vector, and ω represents the inertia weight.c 1 and c 2 represent the learning parameters, while r 1 and r 2 represent the random numbers between [0,1].⇀ P i is the individual best posi- tion, and − → G is the global best position of the whole swarm.

(B)
Guiding strategy based on the dynamic leader.
The selection of dynamic leaders with the optimal solution is modelled as: (18) where L represents the dynamic leader, f best o is the fitness function of the oth sub-optimizer, and n represents the number of sub-optimizers.
The guiding strategy based on the dynamic leader is described by (21).However, executing the guiding strategy too frequently will reduce the efficiency and stability of the DLCI.Therefore, the sub-optimizer is set to execute a guiding strategy after three iterations, as: is the poor solution obtained by the oth sub-optimizer in the kth iteration, − → is the optimal solution obtained by the dynamic leader in the kth iteration, and Z is the set of all integers.

Discrete design of DLCI-I and DLCI-II
DLCI was originally used to solve continuous optimization problems.For its excellent performance to be applied to discrete optimization problems, such as PV array reconfiguration, a series of discrete operations need to be performed as follows [31,32].
First, the initial population N of TCT PV array reconfig- uration is discretized, and can be described as: where B is a 9 × 9 matrix and represents the prime elec- trical connection state of the PV arrays.n pop is the number in the population.
(B) Discretization for optimization process.
In order to adapt the optimization method to the reconfiguration of the PV array, the electrical connection status of each PV array is reallocated as: where x q = [X 1 , X 2 , . . ., X i , . . ., X 9 ] denotes the solu- tion vector of arrays at the qth column, and rank x pq , x q denotes the order of x pq among all solutions x q , and is set in ascending order.

Design of DLCI-I and DLCI-II based TCT PV array reconfiguration
The existence of PSC will cause a huge output power mismatch loss in PV power plants, resulting in greatly reduced output power.This will seriously affect the power generation and revenue of the entire PV enterprise.Therefore, there is an urgent need to find a method of reconstructing the PV system to reduce the impact of PSC [33].This paper proposes a PV array reconfiguration (OAR) model based on electrical switches.This is used to reconfigure array positions to improve power generation output efficiency [34,35].The main steps are as follows: first, for the OAR model, the DLCI is used for discrete optimization to obtain the best electrical connection (28) s pq = rank(x pq , x q ) state.Then, the positions of the PV arrays are changed according to the electrical signals of the switch matrix to meet the required electrical connection state.The model proposed in this paper requires many electrical switches to meet the requirements of different states, and therefore, in order to reduce the switch cost and later maintenance cost, an electrical switch design is proposed as shown in Fig. 4. The end point of the electrical switch on the left can exchange the position of the rows in each column of the PV array.After reconfiguration, the connection between adjacent rows can be realized through the right bus.
Figure 5 shows the control structure diagram of the TCT PV array reconfiguration based on DLCI-I and DLCI-II.The reconfiguration of the position of PV arrays based on the optimal PV array reconfiguration model [23] is proposed in this work.First, the best electrical connection state can be obtained by discrete optimization based on the DLCI-I and DLCI-II OAR models.Then the physical positions of PV.
arrays are rearranged through electrical switches according to the obtained connection state to ensure that PV arrays can operate optimally in various PSCs [36,37].
The purpose of reconfiguring PV arrays is to guarantee that the entire PV power plant can obtain the maximum output power in various PSCs.Therefore, its objective function can be modelled as: (29)  where P(C) is the output power of the PV power plant at the C th case of PSC, n is the number of subsystems of the PV power plant.Figure 6 represents the executive procedure of the process of PV reconstruction by the algorithm.
5 Case study

Operating conditions setting
Here 10 cases of PSCs are designed to verify the superior performance of PV array reconfiguration based on DLCI-I and DLCI-II algorithms.It is worth noting that the designed PSCs are simulations that comprehensively consider the occlusion effects caused by trees, buildings, bird droppings, rain, snow, and dust in practical engineering application.Each irradiation intensity is represented by a different color block, as shown in Fig. 7.
The PV power plant simulated consists of 20 identical PV arrays.Each PV array is connected in a 9 × 9 TCT configuration.Table 1 gives the electrical characteristics of each PV module.To verify the effectiveness of DLCI-I and DLCI-II for PV array reconfiguration, their performance is compared with their respective sub-optimizers.Also, two algorithms (GA and BOA) are considered as competitive algorithms for comparison.Table 2 shows the parameters of all optimization algorithms.In addition, the maximum number of iterations k max and population numbers n pop of all algorithms are uniformly set to 200 and 50 to ensure fairness and reliability for performance comparison.Because DLCI-I and DLCI-II and their respective comparison algorithms are heuristic, their application in practical engineering will inevitably be affected by their own inherent defects (randomness), i.e., the results obtained with each optimization are not always the same.To avoid this shortcoming and obtain the global optimal solution, 30 runs of all algorithms are performed on MATLAB/Simulink 2021b.The applied solver is ode23 with a fixed-step size of 10 -3 s.A fairer conclusion is given by comparing the maximum value and average value of power based on 30 runs. Figure 8 presents the P-V and I-V curves of the 9 × 9 PV arrays in 10 cases of PSCs.It can be seen that the P-V curve of the PV array in the 10th case of PSC has the largest number of peaks.There is no doubt that the PV array is prone to power oscillation in the 10th case of PSC, resulting in large power mismatch loss.Therefore, the next simulation study will focus on this PSC to verify the PV array reconfiguration performance of DLCI-I and DLCI-II for the 10th case of PSC.

Result analysis of DLCI-I for PV array reconfiguration
Table 3 presents the optimization results obtained by DLCI-I, its sub-optimizer algorithm, and competitive algorithms applied for PV array reconfiguration in 10 cases of PSCs to extract maximum output power.P max and P mean represent the maximum and mean values of output power obtained by the optimization algorithm in 30 independent runs.It can be seen from Table 3 that the PV array reconstruction based on DLCI-I obtains the optimal P max and P mean (in bold).To further evaluate the optimization performance of DLCI-I, three evaluation The FF obtained by DLCI-I are 2.42%, 0.29%, 0.24%, 7.43%, 8.00% higher than those from GWO, WOA, MFO, GA, and BOA, respectively.For ∆P MMPL , it is 5.13%, 1.21%, 1.01%, 0.24% and 1.18% lower than those from GWO, WOA, MFO, GA, and BOA, respectively.
Figure 9 gives the optimal reconfiguration solution for 9 × 9 PV arrays based on DLCI-I.It can be seen that the concentrated shading of all PV arrays presented in Fig. 9 is redistributed to different rows.presents the P-V and I-V curves of the 9 × 9 PV arrays reconfigured by DLCI-I in the 10th case of PSC.Compared with without optimization, the output power of the PV arrays obtained based on DLCI-I is improved by 16.86%.Furthermore, the number of power peaks in the P-V curve of the PV arrays obtained by DLCI-I is significantly reduced.

Analysis of DLCI-II for PV array reconfiguration
Table 4 provides the optimization results acquired by DLCI-II, its 5 sub-optimizer algorithms, and competitive algorithms for PV array reconfiguration in 10 cases of PSCs in 30 runs.One can see clearly from Table 4 that DLCI-II still has the optimal P max and P mean compared to other contrasting algorithms.Also, the FF and η acquired by DLCI-II are also the largest, while ∆P MMPL generated by DLCI-II is the smallest.Particularly, the FF obtained by DLCI-II is 2.72%, 0.84%, 0.74%, 0.43%, 1.54%, 7.59% and 8.16% higher than those of GWO, WOA, MFO, ABC, PSO, GA, and BOA, respectively, while ∆P MMPL is 94.2%, 98.12%, 98.32%, 99.00%, 96.61%, 99.07% and 98.15% of those from GWO, WOA, MFO, ABC, PSO, GA, and BOA, respectively.
The optimal reconfiguration solution of the 9 × 9 PV arrays reconfigured gained by DLCI-II is provided in Fig. 11.It can be clearly seen that the concentrated shading of all PV arrays shown in Fig. 11 is redistributed to different rows.This dramatically increases the output power of the PV plant.Figure 12 shows that in the 10th case of PSC, the maximum output power of PV arrays acquired by DLCI-II is 17.52% higher than that without optimization.Also, it can be clearly seen that the P-V curve produced by DLCI-II applied to the PV array reconfiguration has only a single power peak.

Result statistics
The mismatch power loss (∆P MMPL is an extremely important indicator to measure the optimization performance of the proposed algorithm applied to PV array reconfiguration.Figure 13 presents the total ∆P MMPL obtained by DLCI-I, DLCI-II and their sub-optimizer algorithms for OAR in 10 cases of PSCs in 30 independent runs.It can be clearly seen that the total ∆P MMPL acquired by DLCI-I and DLCI-II are significantly smaller than those from the single meta-heuristic algorithm.In addition, it can be found that the increase of the number of sub-optimizers has a certain effect on the improvement of DLCI optimization performance, but the effect is not significant.The total ∆P MMPL acquired by DLCI-II is only 0.67% lower than that of DLCI-I.

Hardware-in-the-loop test
To further test the real-time output characteristics of the PV array at different irradiances and temperature, hardware-in-the-loop experiments are carried out based on the RTLAB platform.At a standard temperature of 25 ℃, the output characteristics of the PV array on the MAT-LAB and RTLAB platforms at different irradiances are shown in Fig. 14.The simulation experiments based on the MATLAB platform are conducted on Intel (R) Core (TM) i10-8401 CPU@4.20 GHz and 16 GB RAM.The solver of the MATLAB platform is selected as ode23 with a 10 -3 s fixed-step size.From the output characteristic curves of the PV arrays on the two platforms in Figs. 15  and 16, it is clear that the experimental results based on the RTLAB platform are very similar to those based on the MATLAB platform, and thus subsequent cases can be conducted based on the MATLAB platform.

Discussion
It is worth noting that different meta-heuristic algorithms might be suitable for different optimization tasks because of their inherent property of high randomness.Hence this work tested 10 meta-heuristic algorithms, include GA, GWO, WOA, MFO, ABC, PSO, BOA, jellyfish  Fig. 9 The optimal solution of the 9 × 9 PV arrays reconfigured by DLCI-I with 10 cases of PSCs search algorithm (JSA) [38], ant colony algorithm (ACO) [39], and simulated annealing (SA) [40], as possible candidates to synthesize DLCI.After trial-and-error, the best five algorithms are chosen, i.e., GWO, WOA, MFO, ABC, and PSO.The novelty of this work can be summarized as follows: • Various meta-heuristic algorithms have been employed as sub-optimizers to dynamically seek the global optimum of PV system reconfiguration.This shows that DLCI significantly outperforms the individual sub-optimizers while the increase of number of sub-optimizers has a relatively small impact on overall DLCI optimization performance.• Generally speaking, PV system reconstruction is a discrete optimization associated with a limited number of solutions.These can be efficiently resolved by conventional meta-heuristic algorithms.Metaheuristic algorithms usually own high randomness in solving a given problem, e.g., some algorithms perform well for some problems but not for others, and they also vary as to their improvement/modifica-tion. Hence, the improvement of meta-heuristic algorithms cannot guarantee an improvement of optimization performance or may even degrade it.• PV reconfiguration requires real-time data collection and online reconfiguration.These require an efficient computation speed.In this work, 10 different algorithms have been tested and the best have been chosen to incorporate DLCI.Such a framework already increases the overall algorithm structure complexity and possible further improvement of them may noticeably increase the overall computation burden.• Finally, a hardware-in-the-loop experiment has been carried out to validate the hardware implementation feasibility of the proposed DLCI.

Conclusions
This paper proposes a novel PV array reconfiguration method by means of a dynamic leader-based collective intelligence for maximum power extraction of PV systems in various PSCs, and the main innovations and value are: (1) First, a series of discrete operation improvements are made to the DLCI, so that DLCI with continuous optimization performance has stronger universality.This can be used to solve not only continuous optimization problems but also any discrete optimization problems.However, the reconstruction method proposed in this paper still has some limitations: (1) Strong randomness is a common problem of heuristic algorithms.For PV power stations of different sizes, it is necessary to set the number of populations and iterations of the sub-optimizers to weigh  Fig. 11 The optimal solution of the 9 × 9 PV arrays reconfigured by DLCI-II with 10 cases of PSCs the quality of the algorithm.The DLCI has complex parameter adjustment that needs to be improved.(2) The reconstruction technology of a PV array is mainly designed for a change of environment.In the reconstruction scheme proposed in this paper, the influence of the shelter on the PV system is mainly considered.
Future research will focus on the following aspects: (1) Hardware experiments of AOA-based MPPT for centralized TEG systems under DTG to further verify the practical feasibility of the technique.
(2) AOA applied to other energy conversion optimization problems, such as PV system MPPT in a PSC.(3) In the follow-up work, the reconstruction effect in different conditions needs to be further considered.(4) PV reconstruction technology is an important part of renewable energy power generation technology, which has certain guidance and reference value for

Fig. 2 N
Fig. 2 N × N TCT connected PV array

Fig. 3
Fig. 3 Optimization framework: a Structure of DLCI-I; b Structure of DLCI-II

Fig. 4
Fig. 4 Configuration of electrical switching arrangement

Fig. 5
Fig. 5 The control structure diagram of DLCI-I and DLCI-II based TCT PV array reconfiguration

Fig. 8
Fig. 8 results of the 9 × 9 PV arrays in 10 cases of PSCs. a P-V curves, and b I-V curves

( 2 )
The idea of the DLCI is innovatively used to solve the problem of PV array reconfiguration in various PSCs, and two structures of DLCI (DLCI-I and DLCI-II) are designed to verify the influence of the number of sub-optimizers on its optimization performance.The results show that the increase of the number of sub-optimizers has a certain but limited effect on the improvement of optimization performance.(3)Taking into account the effects of shadows from clouds, trees, buildings and dust accumulation, bird droppings, snow, etc., 10 cases of discrete PSCs are designed.The study shows that the DLCI with multiple sub-optimizer search mechanisms can achieve a deeper local search and a wider global search with minimal ∆P MMPL .

Fig.
Fig. Comparison result of PV arrays acquired without optimization and DLCI-I in the 10th case of PSC. a P-V curves, and I-V curves

Fig. 12 Fig. 13 Fig. 14 Fig. 15 Fig. 16
Fig. 12 Comparison result of PV arrays acquired by without optimization and DLCI-II in the 10th case of PSC. a P-V curves, and b I-V curves

Table 1
Electrical characteristics of each PV module

Table 2
Parameters of all optimization algorithms

Table 3
Optimization results of OAR in 10 cases of PSCs in 30 runs of six algorithms

Table 4
Optimization results of OAR in 10 cases of PSCs in 30 runs of eight algorithms