Photovoltaic Array Reconfiguration under Partial Shading Based on Integer Link Matrix and Harmony Search

Photovoltaic Array Reconfiguration under Partial Shading Based on Integer Link Matrix and Harmony Search

Ahmed K. RyadAhmed M. Atallah Abdelhalim Zekry 

Ain Shams University, Faculty of Engineering, Cairo 11865, Egypt

Ain Shams University, Faculty of Engineering, Cairo 11865, Egypt

Corresponding Author Email:
18 April 2019
1 August 2019
9 August 2019
Available online: 
6 November 2019
| Citation



This paper mainly reconfigures a total cross tied (TCT) photovoltaic array (PA) under partial shading, aiming to maximize the power output based on irradiance mismatch index (IMI). First, the positions of the PV modules in the array were represented as an integer link matrix. The binary value of each integer in the matrix stands for the new position of each PV module in the array. Next, the harmony search (HS) was coupled with the integer link matrix to minimize the IMI. Then, the proposed reconfiguration method was compared with several famous techniques through case studies. The results show that the integer link matrix achieved the best reconfiguration pattern for each case, and the HS outperformed all the contrastive metaheuristic algorithms. The research findings shed important new light on PV power generation under partial shading.


maximum power point tracking (MPPT), global maximum power point (MPP), metaheuristic techniques, binary link matrix, irradiance mismatch index

1. Introduction

Photovoltaic (PV) is among the most rapidly growing renewable energies worldwide, although the efficiency of the PV system is the biggest concern when installing a large system. The mismatch between PV modules is a key factor that can lead to significant power loss caused by several factors as manufacturing technologies, poor soldering between modules, aging of modules and Partial Shading (PS) [1].

Partial shading can be caused by enormous reasons as moving clouds, birds, surrounding buildings causing significant reduction on output power and change the profile of the (P-V) curve for the PV from a single peak curve to a multi-peak curve with several local maximum power point and one global maximum PowerPoint. It makes the job of the conventional Maximum PowerPoint Tracking (MPPT) system more complicated and more likely to be trapped in a local maximum power point which leads to more reduction of output.

Many researches proposed several solutions for PS conditions follows:

Using of bypass diodes aiming to reduce the effect of hot spots in PV array and increasing the output power, although PV array suffers multi-peak and the output power extracted is not the maximum possible power [2]. Adopting suitable array configuration as series-parallel (S-P), Total Cross Tied (TCT), Bridge Linked (BL) and Honey Comb (HC), this technique aims to connect the PV array in such a way that shading any module doesn’t affect greatly the whole array but can’t ensure extracting the maximum possible power [3, 4]. System configuration as the use of a multi-level converter connected to each group of PV modules which can reduce the effect of partial shading on the PV array, although this technique increases dramatically the system cost and requires complex control [5]. MPPT techniques [6, 7] aiming to operate at the global MPP and avoid being trapped in a local maximum power point, various metaheuristic techniques are adapted for the tracking process [8, 9], although MPPT requires accurate PV modeling under various environmental conditions, significant computation and various MPPT techniques are used depending on array size and application. PV reconfiguration can be dynamic as Electric Array Reconfiguration (EAR) [10], irradiance equalization [11], adaptive array reconfiguration [12] or can be static reconfiguration as in magic square configuration [13], competence square [14] and Sudoku pattern [15]. In dynamic configuration switches between modules are altered at partial shading condition in order to maximize output power as in EAR although number of switches increase the system cost and complexity, for irradiance equalization modules are relocated in such a way so irradiation is equalized and no need to activate bypass diode so can achieve more output power than EAR although number of possible combinations is far large, while adaptive reconfiguration aims to reduce number of switches by changing only part of the PV array while the other part remains fixed. Static configuration aims to choose the physical location of modules and keep connection fixed so no need for switches but the chosen configuration uniformly distribute shade along the whole PV array, this technique is sensitive for the chosen configuration as it can result in sub-optimal solution thus reducing the output power.

It can be seen that dealing with partial shading is a rich research area where various techniques try to extract maximum power possible at partial shading conditions, yet each of the previous approaches suffers drawbacks as failing to reach MPP, increasing the complexity of the system, complicated computation, expensive cost and dependability on shading conditions.

To solve these defects, this paper presents a new PV reconfiguration technique aiming to overcome the problem of excess number of variables and complicated computations by effectively reducing the number combinations possible. Thus reaching the optimum configuration under partial shading regardless the shade pattern and reaching the maximum yield power possible from the PV without the need for expensive equipment.

The technique is based on the irradiance equalization principle aiming to deal with the excessive number of possible combinations using an integer link matrix reducing the number of variables effectively to the number of modules in the PV array. Each integer number in the matrix represents the new position of PV modules in each row. The objective function is minimizing the irradiance mismatch index subject to several constraints which are modeled using penalty function and optimization is achieved using integer programming optimization via Harmony Search (HS) after comparison with various meta-heuristic methods. The findings shed new light on the supremacy of the proposed technique in reaching the optimum configuration and yet the optimum power at every case tested.

The rest of the paper is organized as follows: section (2) compares between the previously proposed binary link matrix and the proposed integer link in terms of complexity and number of combinations possible, section (3) deals with approaching the irradiance equivalence principle via integer link matrix and the necessary constraints, finally section (4) compares firstly between approaching irradiance equivalence via binary link matrix and integer link matrix using a wide range of metaheuristic techniques then compares the results of various metaheuristic techniques to optimize IMI via integer link matrix for various shading patterns.

2. PV Reconfiguration Using Irradiance Equalization

PV array reconfiguration involves changing the PV modules positions during PS in such a way that enhances the output power. The irradiance equivalence principle is based on the idea of relocating PV panels in the PV array in such a way that the series-connected strings in the parallel-connected strings forces current limitation [16], in Shams et al. [11] Irradiance Mismatch Index (IMI) was introduced as shown in Eq. (1):

$\mathrm { IMI } = 0.5 * \sum _ { i = 1 } ^ { M } \sum _ { j = 1 } ^ { M } \left( \frac { \mathrm { IRR } _ { \mathrm { i } } } { \mathrm { G } } - \frac { \mathrm { IRR } _ { \mathrm { j } } } { \mathrm { G } } \right) ^ { 2 }$       (1)

where, IRRi , IRRJ are total irradiance level at row i and j respectively and M is the number of rows in an (M*N) PV array and G is the standard irradiance level (1000 w/m2) and the optimization problem aims to reduce the IMI as a mixed-integer quadratic problem utilizing a binary link matrix as the problem’s variables. Although irradiance equalization principle aims to increase the PV array power at PS but requires a huge number of variables in the binary link matrix aiming to the huge number of possible combinations, for example for an (M*N) PV array the number of possible exclusive (Ne) combinations is shown in Eq. (2):

$\mathrm { N } _ { \mathrm { e } } = \frac { ( \mathrm { M } * \mathrm { N } ) ! } { \mathrm { M } ! * \mathrm { N } ! ^M}$       (2)

The size of the binary link matrix for an (M*N) PV array is (M*N) rows and (M*N) columns, results in problem variables (M*N)2 which is a huge number. This number can be reduced neglecting the order of the PV modules in a single row which results in a binary link matrix of M column and (M*N) rows with (M2*N) variables which is still a huge number of variables.

An integer link matrix is proposed featuring a single row and (M*N) columns, where each column features a single integer value whose binary equivalent represents the existence of the PV module in a certain PV array’s row, for example integer number (2) in the ith row whose binary equivalent is (0010) represent the existence of the PV module in 2nd row of the PV array.

3. Optimization Function VIA Integer Link Matrix

Irradiance equivalence principle can be formulated as finding the minimum possible value for the IMI for a given PV array, the technique requires only irradiance level measurement for every PV module in the whole array regardless of the modules type or characteristics.

Optimization function is calculated via two variables:

1-Irradiance level matrix of each PV module (Y), which is a single row matrix with (M*N) columns featuring the irradiance level of each PV modules.

2- Integer matrix (U) which is also a single row matrix with (M*N) column featuring a single integer value in each column.

The matrix multiplication of matrix (Y) and binary equivalent of matrix (A) divided by normal irradiance level (G) results in the normalized irradiance level matrix (I) in each PV array’s row as shown in Eq. (3).

I= (Y*A)/G       (3)

Clearly by using normalized irradiance level matrix (I), IMI can be can be calculated using a suitable meta-heuristic function for minimization purpose, where the decision variables are the elements of matrix (U).

The previous IMI equation needs to satisfy certain constraints in order for the solution to be reasonable, they are pair of constraint. Firstly, the summation of each row in matrix (A) is equal to one which mimic the presence of a single PV module only once in any array’s row. Secondly, the summation of each column in the matrix (A) equals to (M) which mimic the presence of only M PV modules in a certain PV any array’s row.

It can be seen that we are dealing with a constrained optimization function, there are two methods to deal with constrained optimization in order to combine the constraints with the original optimization function namely: Lagrange multipliers and penalty method [17]. Through this paper penalty method was used for its simplicity and effectiveness.

The total optimization function incorporating the constrains is given in Eq. (4).

$\mathrm { F } ( \mathrm { x } ) = \min \left( \mathrm { IMI } + \sum _ { \mathrm { i } = 1 } ^ { \mathrm { i } - \mathrm { M } } \mathrm { u } * \mathrm { H } _ { \mathrm { i } } \left[ \emptyset _ { \mathrm { i } } ( \mathrm { x } ) \right] * \emptyset _ { \mathrm { i } } ^ { 2 } ( \mathrm { x } ) \right)$  (4)

where, x is the optimization variable represented in this paper by integer matrix (U), u is the penalty coefficient, Hi is index function which equals to 1 if constraint function ∅i (x) is not satisfied and is equal to zero if constraint function is satisfied.

4. PV Reconfiguration VIA Integer Harmony Search

A case study of 4*4 PV array consists of 16 KC40T PV module [18] under partial shading condition suffering four different irradiance levels as shown in Figure 1. This case was taken to check various meta-heuristic method effectiveness in finding the optimum IMI value. The minimum IMI can be achieved when grouping each four modules having similar irradiance level in one row and this results in zero IMI.

Figure 1. Shading pattern for a 4*4 PV array

In this case the integer link matrix (U) is (1*16) with 16 integer variables which is equivalent to a binary matrix (A) of (16*4) with 64 elements. The two constraints are given in Eq. (5) and Eq. (6), respectively.

$\emptyset _ { 1 } = \sum _ { i = 1 } ^ { 16 } [ A ( i ,: ) - 1 ]$     (5)

$\emptyset _ { 2 } = \sum _ { i = 1 } ^ { 4 } [ A (: , i ) - 4 ]$   (6)

HSA mimics the way musicians compose harmony, the composition starts by recalling music pitches already known for them and try various combinations in order to produce the perfect harmony. Similarly, HSA starts with a harmony memory matrix representing the initial solution, new combinations are obtained via two parameters namely Harmony Memory Consideration Rate and pitch adjustment rate where they control the probability to select an existing solution from the harmony memory matrix and probability for the solution to be mutated respectively [19].

Other famous metaheuristic algorithm as genetic algorithm (GA) [20, 21], cuckoo search (CS) [22], flower pollination algorithm (FPA) [23], hybrid flower pollination with clonal selection algorithm (FPA-CSA) [24, 25], artificial bee colony (ABC) [26], invasive weed optimization (IWO) [27], was used to optimize the required objective function given in Equation 4 utilizing both Integer link matrix and binary link matrix. Results are summarized in Table 1.

In order for the search variables to be integers two rules was adapted through each optimization techniques. Firstly, the initial solution is rounded to the nearest integer value and secondly the step size is rounded to the nearest integer values which consequently ensure new solutions are integer values.

Firstly, comparing optimization problem using binary search with optimization using integer search we can see two difference:

a-Number of variables: 64 binary variables and 16 integer variables

b-Search space: 2 in binary search (0&1) and 8 in integer search (integer number from 1 to 8).

The bigger search space in binary search (4 times the integer search) results in more complicated optimization problem and lead to sub-optimal solutions even with less search space for each variable.

Integer search-based optimization presents more optimal solutions compared to binary search-based optimization based on lesser number of variables.

Table 1. Various metaheuristic techniques results for shading pattern shown in Figure 1

Optimization technique


IMI Value via Integer link matrix

IMI Value via binary link matrix


Memory size=25.

Consd. rate= 0.1

Pitch adj. rate=0.9




Pop. size= 25

Crossover rate= 0.8

Mutation rate= 0.3




No/ of nests= 25

Disc. rate= 0.25




Pop. size=25

Prob. switch= 0.8




Pop. Size =25




Pop. Size =25




Pop. size=25

No. seeds= 5



Secondly, results show that integer programming via harmony search algorithm (IP-HSA) present the optimal solution resulting in IMI equals to zero which means equal irradiance level at each PV row with best configuration.

Thirdly, GA, CS, FPA, FPA-CSA, IWO produce near optimal solutions which increase the PV array output power than the initial configuration but not the best configuration yet.

Fourthly, ABC present an interesting result in the integer search-based optimization along with FPA binary search as the value of the optimization function is huge due to a heavy penalty factor indicating falling in satisfying the problem constraints.

The integer link matrix (U) according to IP-HSA is as follows:

U= [4     8     2     1     8     4     1     2     1     2     8     4     1    8    2     4]

Taking the binary equivalent for each integer value in matrix U, we get the binary equivalent link matrix (A).

Reconfiguration is done based on the binary value of each element in matrix U.

For example, PV module number one whose equivalent new position in matrix U is 4, we get the binary value of number 4 which 0010 which mean the new position of module number one is in the second row in the PV array and so on for the rest of the PV modules.

Figure 2 shows the complete reconfiguration of the PV array based of IP-HSA, it can be seen that each row has similar irradiance level (3,100 w/m2) reaching zero IMI which is the most optimal condition. Figure 3 show the P-V curve of the PV array after and before the configuration using IP-HS, IP-GA, IP-CS, IP-FPA and IP-FPA-CSA. IP-HSA was able to reach the most optimal solution along all other techniques reaching zero IMI fulfilling two valuable results:

1-The ability to extract the maximum output power from the PV array under partial shading condition.

2-The ability to eliminate local peaks from the P-V curve reaching single peak profile, which make the job of MPPT techniques easier.

Figure 2. PV Array after re-configuration

Figure 3. PV array P-V curve before and after reconfiguration using various meta-heuristic methods

For consistency of results, IP-HS along with IP-GA, IP-CS, IP-FPA & IP-FPA-CSA were tested against typical shadow patterns as follows.

4.1 Case 1: Short and wide shadow

In this pattern, the PV array is shaded along two horizontal rows by two irradiance levels of 700 w/m2 and 900 w/m2 respectively as shown in Figure 4.

Figure 4. Short and wide shadow

Reconfiguration of PV array based on IMI is applied using five metaheuristic algorithms and results are summarized in Table (2).

Table 2. Various metaheuristic techniques results for short and wide shadow













IP-HSA along with IP-FPA-CSA reach the most optimum solution, providing an IMI equals zero, reaching the maximum output power possible from the PV array under partial shading.

4.2 Case 2: Short and narrow shadow

In this pattern, the PV array is shaded along two modules in two horizontal rows by two irradiance levels of 700 w/m2 and 900 w/m2 respectively as shown in Figure 5.

Figure 5. Short and narrow shadow

Reconfiguration of PV array based on IMI is applied using five metaheuristic algorithms and results are summarized in Table (3).

Table 3. Various metaheuristic techniques results for short and narrow shadow













The minimum value for IMI was found to be 0.16 by HS, CS and FPA-CSA it can be seen that this shading pattern can’t be reconfigured to form zero IMI as the previous cases although this is the optimum configuration regarding this shading pattern achieving maximum possible output power with small local peak point as shown in Figure (6).

Figure 6. P-V curve for short and narrow shadow pattern before and after reconfiguration using harmony search

4.3 Case (3): Long and wide shadow

In this pattern, the PV array is shaded along three modules in three horizontal rows by three irradiance levels of 500 w/m2, 700 w/m2 and 900 w/m2 respectively as shown in Figure 7.

Figure 7. Long and wide shadow

Reconfiguration of PV array based on IMI is applied using five metaheuristic algorithms and results are summarized in Table (4).

Table 4. Various metaheuristic techniques results for long and wide shadow













As the previous case IP-HSA along with IP-FPA-CSA reach the most optimum solution compared to other techniques.

4.4 Case (4): Diagonal shadow

In this pattern, the PV array is shaded diagonally by 500 w/m2, 700 w/m2 and 900 w/m2 as shown in Figure 8.

Figure 8. Diagonal shadow

Reconfiguration of PV array based on IMI is applied using five metaheuristic algorithms and results are summarized in Table (5).

Table 5. Various metaheuristic techniques results for diagonal shadow













In the diagonal shadow, IP-HAS reaches the most optimum solution compared to other techniques with IMI 0.03.

5. Conclusions

Reconfiguration of PV array when subjected to partial shading based on irradiance mismatch index principle was achieved via integer link matrix using Integer harmony search.

Integer link matrix provide an efficient method for reconfiguration of the PV array under partial shading as each integer element in the integer link matrix represent the position of each PV module in which array row. In addition, integer link matrix effectively decreases the number of variables in the optimization problem to the number of PV modules in the array which decrease the complexity of the optimization problem and decrease the processing time without the need for expensive equipment.

Minimization of the optimization function (IMI) was approached via binary link matrix and integer link matrix, a comparison between optimization via the two approaches using various metaheuristic techniques is shown in Figure 9.

Results shows that optimization via integer link matrix produces more optimum results in terms of minimizing IMI, maximizing the output power and minimizing number of local peaks. This can be explained due to limited number of variables which make the optimization problem simpler compared to corresponding approach via binary search matrix with excessive variables.

Integer link matrix provide an excellent compromise for irradiance equivalence technique which suffers from the huge number of combinations possible making the optimization problem difficult for solution, while integer link matrix aims to simplify the optimization function by reducing number of variables.

Figure 9. Comparison between integer search and binary search approach

Figure 10. Comparison between various metaheuristic techniques results for different shading patterns

Various metaheuristic techniques were utilized to optimize the irradiance mismatch index optimization problem via integer link matrix to achieve its minimum possible value. Integer harmony search present most optimum results through all the tested cases achieving the minimum value for IMI as shown in Figure 10, which in turn provide maximum power and decrease number of local peaks in the P-V curve.

Future work can apply the proposed technique on all the possible configuration for PV array as the classical configuration: S-P, HC, BL and the recent configuration as magic square configuration, competence square and Sudoku pattern.

Another interesting point can cover the effect of increasing the number of PV modules in the array on the accuracy of the proposed technique.



irradinac of the ith row in a PV array


Standard irradiance level of 1000 w/m2



number of rows in a PV array

number of columns in a PV array


number of exclusive combination in a PV array


irradiance matrix


integer link matrix


normalized irrradiance matrix


penalty coefficient


index function


constraint function


[1] Malathy, S. Ramaprabha, R. (2018). Reconfiguration strategies to extract maximum power from photovoltaic array under partially shaded conditions. Renewable and Sustainable Energy Reviews, 81: 2922-2934.

[2] Das, S.K., Verma, D., Nema, S. Nema, R.K. (2017). Shading mitigation techniques: State-of-the-art in photovoltaic applications. Renewable and Sustainable Energy Reviews, 78: 369-390.

[3] Belhaouas, N., Cheikh, M.S.A., Agathoklis, P., Oularbi, M.R., Amrouche, B., Sedraoui K., Djilali, N. (2017). PV array power output maximization under partial shading using new shifted PV array arrangements. Applied Energy, 187: 326-337. 2016.11.038

[4] Amin, M., Bailey, J., Tapia, C., Thodimeladine, V. (2016). Comparison of PV array configuration efficiency under partial shading condition. 43rd IEEE Photovoltaic Specialists Conference, pp. 3704-3707.

[5] Krishna, G.S., Moger, T. (2019). Reconfiguration strategies for reducing partial shading effects in photovoltaic arrays: State of the art. Solar Energy, 182: 429-452.

[6] Mohapatra, A., Nayak, B., Das, P., Mohanty, K.B. (2017). A review on MPPT techniques of PV system under partial shading condition. Renewable and Sustainable Energy Reviews, 80: 854-867. 2017.05.083

[7] Martin, A.D., Vazquez, J.R., Cano, J.M., (2018). MPPT in PV systems under partial shading conditions using artificial vision. Electric Power Systems Research, 162: 89-98.

[8] Mohamed, M.A., Diab, A.A.Z., Rezk, H. (2019). Partial shading mitigation of PV systems via different meta-heuristic techniques. Renewable Energy, 130: 1159-1175.

[9] Chen, L., Han, W., Huang, Y.H., Cao, X., Xu, Z.K. (2019). Reconfiguration of partially shaded photovoltaic arrays. European Journal of Electrical Engineering, 12(4): 383-392.

[10] Kandemir, E., Cetin, N.S., Borekci, S. (2017). A comprehensive overview of maximum power extraction methods for PV systems. Renewable and Sustainable Energy Reviews, 78: 93-112.

[11] Shams El-Dein, M.Z., Kazerani, M., Salama, M.M.A. (2013). Optimal photovoltaic array reconfiguration to reduce partial shading losses. IEEE Transactions on Sustainable Energy, 4(1): 145-153.

[12] Jazayeri, M., Jazayeri, K., Uysal S. (2017). Adaptive photovoltaic array reconfiguration based on real cloud patterns to mitigate effects of non-uniform spatial irradiance profiles. Solar Energy, 155: 506-516.

[13] Yadav, A.S., Pachauri, R.K., Chauhan, Y.K., Choudhury, S., Singh, R. (2017). Performance enhancement of partially shaded PV array using novel shade dispersion effect on magic-square puzzle configuration. Solar Energy, 144: 780-797.

[14] Dhanalakshmi, B., Rajasekar, N. (2018). A novel Competence Square based PV array reconfiguration technique for solar PV maximum power extraction. Energy Conversion and Management, 174: 897-912.

[15] Horoufian, M., Ghandehari, R. (2018). Optimization of the Sudoku based reconfiguration technique for PV arrays power enhancement under mutual shading conditions. Solar Energy, 159: 1037-1046.

[16]  Velasco-quesada, G., Guinjoan-gispert, F., Piqué-lópez, R., Román-lumbreras, M., Conesa-roca, A. (2009). Electrical PV array reconfiguration strategy for energy extraction improvement in grid-connected PV systems. IEEE Transactions on Industrial Electronics, 56(11): 4319-4331.

[17]  Yang, X.S. (2010). Nature-Inspired Metaheuristic Algorithms (Second Edition). Luniver Press, 32-33.

[18] Kyocera Photovoltaic Modules., accessed on Jan, 2019.

[19] Kim, J.H. (2016). Harmony search algorithm: A unique music-inspired algorithm. Procedia Engineering, 154: 1401-1405.

[20] Camarillo-Peñaranda, J.R., Ramírez-Quiroz, F.A., González-Montoya, D., Bolaños-Martínez, F., Ramos-Paja. C.A. (2015). Reconfiguration of photovoltaic arrays based on genetic algorithm. Revista Facultad de Ingenieria, 75: 95-107.

[21] Deshkar, S.N., Dhale, S.B., Mukherjee, J.S., Babu, T.S., Rajasekar, N. (2015). Solar PV array reconfiguration under partial shading conditions for maximum power extraction using genetic algorithm. Renewable and Sustainable Energy Reviews, 43: 102-110.

[22] Shehab, M., Khader, A.T., Al-Betar, M.A. (2017). A survey on applications and variants of the cuckoo search algorithm. Applied Soft Computing Journal, 61: 1041-1059.

[23]  Alam, D.F., Yousri, D.A., Eteiba, M.B. (2015). Flower pollination algorithm based solar PV parameter estimation. Energy Conversion and Management, 101: 410-422.

[24] Nabil, E. (2016). A modified flower pollination algorithm for global optimization. Expert Systems with Applications, 57: 192-203.

[25] Ryad, A.K., Atallah, A.M., Zekry, A. (2018). Photovoltaic parameters estimation using hybrid flower pollination with clonal selection algorithm. Turkish Journal of Electromechanics and Energy, 3(2): 15-21.

[26] Benyoucef, A.S., Chouder, A., Kara, K., Silvestre, S., Ait Sahed, O. (2015). Artificial bee colony-based algorithm for maximum power point tracking (MPPT) for PV systems operating under partial shaded conditions. Applied Soft Computing Journal, 32: 38-48.

[27] Ghalenoei, M.R., Hajimirsadeghi, H., Lucas. C. (2009). Discrete invasive weed optimization algorithm: Application to cooperative multiple task assignment of UAVs. Proceedings of the IEEE Conference on Decision and Control, pp. 1665-1670.