1 Introduction

The increasing energy users and the widespread expansion of renewable energy have significantly expanded the distribution of power systems around the world (García Márquez et al. 2018). On the other hand, rising energy consumption has led to issues such as global warming, climate change, and environmental problems (Mostafaeipour et al. 2019). In recent years, tackling these problems has posed many challenges around the world and increased the willingness to use renewable energy resources. Solar radiation is considered to be the main source of energy for the earth among renewable energy sources (Peinado Gonzalo et al. 2019; Sadeghian et al. 2021). Therefore, the direct conversion of solar radiation into electrical energy is one of the most principle technologies in the world (Owusu and Asumadu-Sarkodie 2016; Sadeghian et al. 2020). Achieving this important goal and using solar energy as electrical energy is created by a photoelectric effect technology in the photovoltaic (PV) arrays (Shahsavari and Akbari 2018). This technology has some advantages such as easy transportation and installation of solar panels, which are led to use in many places to produce electrical energy. The output power of PV can be reduced by factors such as the shade of trees, buildings, clouds, etc. (Peinado Gonzalo et al. 2020). One of the most important factors in reducing the output power is the placement of shadows in a row (Lappalainen and Valkealahti 2020). Modules under partial shading conditions (PSCs) receive less radiation than other modules (Pillai et al. 2018; Huerta Herraiz et al. 2020). Mismatch loss (ML) affects the entire PV system because shaded PV modules limit the output current of an array, which may damage PV cells or modules (Pillai and Rajasekar 2018; Hashemzadeh 2019). Solutions to deal with the aforementioned problems caused by the PSCs in the PV arrays are divided into two categories of passive and active techniques (Tabanjat et al. 2015; Pillai et al. 2018; Yousri et al. 2020). Each of these techniques has details that have been studied in various studies. The description of the passive technique can be referred to as the use of the bypass diodes and different types of inter-connections for PV modules for reducing the partially shaded losses. Figure 1 shows the series–parallel (SP), total-cross-tied (TCT), Honey-Comb (HC), and bridge-linked (BL), some of the most important and widely used PV array inter-connected schemes (Akrami and Pourhossein 2018; Dhanalakshmi and Rajasekar 2018). Recent studies demonstrate the ability and efficiency of the TCT connection model in obtaining maximum power from the PV array compared to the other inter-connection models (Picault et al. 2010).

Fig. 1
figure 1

Various interconnection schemes: a SP configuration, b TCT configuration, c BL configuration, d HC configuration

Active techniques for PSC fall into three categories as (Satpathy and Sharma 2019): utilizing multi-tracker converters; utilizing micro converters, and; reconfiguration of PV arrays.

The multi-track converters technique tracks the maximum power point with the same shading independently for each set of the PV arrays (Dhanalakshmi and Rajasekar 2018; Pillai et al. 2018). This technique, due to the use of a large number of converters, is expensive (Sanseverino et al. 2015). Utilizing the micro converters technique is also an expensive method (Akrami and Pourhossein 2018). Finally, the PV array reconfiguration method configures the modules in the PV array by switches between them (Subramanian and Raman 2021). This method can be mainly employed for the TCT and SP inter-connection models. It is economically viable and has been able to extract high energy efficiency in the PSC of the PV array (Yang et al. 2019). Reconfiguration of the PV array eliminates the effect of mismatch losses under partial shadow conditions of the PV array in extracting maximum power (Dhimish et al. 2017; Sai Krishna and Moger 2019a). Accordingly, a novel PV array reconfiguration-based technique is presented in this study. Thus, the next section of this paper, after stating the related works, introduces the proposed method of the paper and its advantages over other related methods.

The organization of the paper in the following sections is as follows: Sect. 2 introduces the related works. The proposed Knight's tour method is explained in Sect. 3. Section 4 introduces the performance appraisal indicators used in this paper. The simulation results are presented in Sect. 5. Finally, Sect. 6 concludes the paper.

2 Related works

In general, the PV arrays are reconfigured by two categories of static and dynamic techniques (Yousri et al. 2019). In dynamic techniques, the modules are electrically configured inside the PV array to extract the maximum output power under PSCs (Vaidya and Wilson 2013; Yang et al. 2019). While static techniques refer to the physical displacement of modules and follow a fixed connection scheme in which the modules are displaced in the PV array without changing the electrical connections. Static techniques do not require any sensors or switching matrices (Rezk et al. 2019; Rezazadeh et al. 2021).

The various PV array reconfiguration designs that follow static methods are Sudoku (Rani et al. 2013), optimal Sudoku (Potnuru et al. 2015; Horoufiany and Ghandehari 2018), improved Sudoku (Sai Krishna and Moger 2019b), Zig-Zag method (Vijayalekshmy et al. 2016), Latin square method (Pachauri et al. 2018), magic square (Yadav et al. 2017), placement of shadows with distance d (Malathy and Ramaprabha 2018), skyscraper puzzle (Nihanth et al. 2019), and shadow puzzle (Yadav et al. 2016).

A reconfiguration solution called the power comparison technique has been proposed to extract maximum power from the PV arrays (Akrami and Pourhossein 2018). The SuDoKu technique has been introduced in reference (Rani et al. 2013) to increase the maximum output power under PSCs in the TCT PV array. In this study, the physical position of the PV modules in the TCT PV array is reconfigured based on the SuDoKu scheme. Then, the optimal SuDoKu and improved SuDoKu methods for distributing partial shadow effects in the TCT PV array have been suggested in references Potnuru et al. (2015) and Sai Krishna and Moger (2019b), respectively. It was concluded that the improved SuDoKu performed better than the SuDoKu and the optimal SuDoKu. Vijayalekshmy et al. (2016) employed decreasing partial shading losses and increasing power generation, being done by a static PV module reconfiguration technique called the Zig-Zag method. A magic square arrangement for the TCT PV array has been presented by Yadav et al. (2017) to extract maximum output power under PSC. The results obtained show the effectiveness of the magic square arrangement in reducing mismatch losses compared to other settings. Malathy and Ramaprabha (2018) employed a static reconfiguration method based on displacement distance "d" between adjacent panels that configure the modules of a PV array under PSC to extract maximum output power from the PV. Nihanth et al. (2019) utilized a new procedure, namely the skyscraper puzzle, employed for enhancing output power production in the PSC. Yadav et al. (2016) used two shadow distribution models in an asymmetric PV array for the TCT PV array. The compounds proposed in this paper significantly reduce the drop in the mismatch. Srinivasa Rao et al. (2014) employed the distribution of shadow effects on the PV array, performed using an interconnection scheme. The results of comparisons in this study show the superiority of the proposed scheme compared to the SP, TCT, and BL PV settings. Reducing the effects of the PSC on the power generation of TCT PV arrays has been done by Yadav et al. (2020) using a new reconfiguration scheme called odd–even configuration. Reddy and Yammani (2020) utilized a novel magic-square puzzle PV module reconfiguration technique to reduce mismatch losses under PSCs. In Prince Winston et al. (2020), novel PV array topologies are proposed to improve performance under PSCs. The method proposed in this paper is tested on seven types of array configurations by applying eight shading patterns. A static-based reconfiguration approach called the Ken-Ken puzzle has been suggested in (Palpandian et al. 2021) for reconfiguring a \(4\times 4\) TCT PV array under PSCs.

Each of the aforementioned static techniques has some advantages and disadvantages. Therefore, Sudoku has partial shade distribution, and optimal Sudoku and improved Sudoku-based methods have been proposed to overcome Sudoku's problems. These solutions, despite having advantages such as reducing the ML and effective shadow scattering, suffer from issues such as reduced power output during effective shadow scattering. Meanwhile, the Zig-Zag method is different from other methods and has so far shown its effectiveness only for simple \(3\times 3\) PV arrays. Numerical methods such as puzzle shade and magic square have also been used to disperse the shadow. However, these methods only make the scattering of the shadow in column possible, in which case the reliability of the system is reduced.

As studies on static reconfiguration techniques were evaluated, in some other valuable studies, dynamic techniques have been employed to reconfigure the PV arrays. The bubble sorting algorithm (adaptive bank), despite having some ideal benefits, suffers from problems such as replacement constraints and difficult access to complete shadow scattering solutions (Nguyen and Lehman 2008). The results of the branched and limited algorithm showed great importance in solving the problems of the PV array reconfiguring. However, no convincing evidence has been presented for the implementation of this method for large PV power plants. Based on the radiation equation, optimization intelligence for the PV array reconfiguring is performed by hierarchical sorting based on repetition. In this method, continuous switching and complex calculation reduce the reliability of the installation method (Shams El-Dein et al. 2013). Oriented plant configuration is one of the most architectural interconnection systems of the PV array due to its simplicity and low cost. However, this method is associated with the frequent occurrence of short circuit faults in the array due to its unbalanced switching patterns (Velasco-Quesada et al. 2009). The rule-based Rough-Set theory concept has been presented as a reconfiguration system. However, to achieve the production of the switching matrix, it follows an inconsistent decision table, which is one of the main problems of this method (Wang and Hsu 2011). In a valuable study (Srinivasan et al. 2021), increasing the energy conversion under PSCs in a \(4\times 4\) PV array has been accomplished by introducing a new reconfiguration approach called the L-shaped propagated array configuration procedure with a novel dynamic reconfiguration algorithm. The use of clustering-based artificial neural networks (ANNs) has been published as an ideal solution to reconfiguration PV arrays and minimize power losses based on the dynamic structure (Monteiro et al. 2020). Simple structure and high accuracy are the advantages of this method, while the operation of ANNs requires a suitable database for network training (Moradzadeh et al. 2020, 2021). Sometimes prolonged training and network processing are major problems with this method (Monteiro et al. 2020). Another dynamic method of working with different loads is DC voltage using a dynamic PV array (Matam and Barry 2018). The configuration scanning algorithm that scans the array and decides how compatible components can be connected to the fixed part to extract maximum efficiency was introduced by Parlak (2014) for PV arrays reconfiguring. In using the scanning algorithm, it is necessary to calculate the short circuit of each row, which is difficult to get the short circuit current from all rows. The dynamic programming algorithm and Munkres assignment method have been suggested for reconfiguring the modules used in non-homogeneous radiation in the TCT structure to increase the output power in Sanseverino et al. (2015). In some valuable studies, various interesting optimization algorithms for the equality of solar radiation have been proposed. Storey et al. (2013) employed an optimal solution called the best–worst sorting algorithm. A random search algorithm has been used by Zabinsky (2011) for dynamic reconfiguration of the solar panels based on the principle of radiation equality. Despite the high speed of operation of this algorithm, it may provide different results in different runs depending on the inherent random mode of this method (Zabinsky 2011).

The literature review was performed for the static and dynamic techniques of reconfiguring the PV arrays. The literature indicates that the dynamic techniques reconfigures all PV modules electrically by repeating the gaining response to a specific shade, see for example (Pillai et al. 2018; Satpathy and Sharma 2019; Yousri et al. 2020). Although the electrical placement of the PV arrays can provide the highest power efficiency, those techniques are also not cost-effective due to their complexity and the need for complex sensors and circuits. On the other hand, the literature represents the cost-effectiveness and simplicity of static techniques. In addition, these techniques do not require additional peripherals such as sensors and switches. But, it can be seen that the static techniques used to reconfigure the PV modules have not been applied to large dimensions and rectangular PV arrays.

In this paper, a novel reconfiguration technique is introduced and employed to distribute shadows on the PV array and to achieve the global maximum power point (GMPP). Because one of the most important factors in reducing the output power is the PSCs in the same rows, in this paper, the losses corresponding to the PSCs and mismatch are reduced by a static method called the Knight's tour. The suggested method, by solving the problems related to the methods reviewed in the literature and with high efficiency, causes the distributing of shadows and significantly reduces the output power losses. This method targets shadow distribution in rows to eliminate problems such as reduced system reliability and achieve a maximum output power of the PV. The proposed technique can be implemented without the need for any sensors and switches and is cost-effective compared to other electrical array reconfiguration methods in terms of economic costs and implementation. The Knight's tour technique has been able to overcome the limitations such as high connections and complex wiring that classical reconfiguration methods suffer from. Independence of PV dimensions and type of shadow are other advantages of the Knight's tour procedure. Thus, this method can be applied contrary to many conventional techniques to rectangular PV arrays. The remarkable point is that the Knight's tour method, unlike other conventional methods, can be applied to the PV system in a short time, such as a few microseconds, which is a very short time against the behavior of PV. In addition, evaluation and comparison of the results showed that the proposed technique could significantly improve the performance of conventional methods such as TCT, SuDoKu, optimal SuDoKu, improved SuDoKu, and skyscraper puzzle. Despite these advantages, the proposed procedure suffers from some limitations. For example, the proposed procedure does not work very well on very small size PV arrays such as \(4\times 4\), which are mainly used in building applications. As with all reconfiguration techniques, the performance of the proposed technique is based on the I–V and P–V characteristic curves. However, various factors such as internal faults, grid-induced harmonics, and the like can have a variety of effects on characteristic curves that reduce the accuracy of the reconfiguration approach. In addition, the need for a powerful processor system and a microcontroller to run the algorithm designed on the PV system is another limitation of the technique presented in this paper.

3 Knight's tour technique

Knight's tour is a method derived from the chess and mathematic sciences. The Knight's tour refers to a sequel to a Knight's movements on a chessboard, in which the Knight crosses exactly one square at a time (Alfred 2017). In expressing this method, we must keep in mind that chess and mathematics are inextricably linked. Thus, many of the characteristics of a successful mathematician or chess player such as strong pattern recognition, analytical ability, intuition, high level of creativity, spatial awareness, etc., can overlap. If the Knight finishes on a square that is one Knight's move from the beginning square, the tour is closed. Otherwise, it is open (Conrad et al. 1994; Sandifer 2006). The problem with the Knight's tour, which is credited to the Swiss mathematician Leonhard Euler, is the math problem of finding a Knight's tour. In the late 1770s, Euler was able to find the first suitable solutions to this problem, and hence, it is even referred to as the Euler problem of chess and Knights (Sandifer 2006).

In this case, the route starts in the field adjacent to the starting point and is considered an open tour because the Knight cannot return directly to his starting point. Knowing the proper pattern of each of the chess pieces can play an important role in solving the problem of rearranging solar panels. Thus, the chessboard n × n is considered as a PV array with n rows and n columns. Solving the puzzle related to the Knight's tour movement problem is one of the simple, convenient, and efficient solutions for statically reconfiguring solar panels. The goal of the puzzle is to find a sequence of moves that allows the Knight to visit each square on the chessboard exactly once.

The legal movement of a Knight is to move from a square vertically or a square horizontally and then two perpendiculars to it. Thus, the Knight can move (± 1, ± 2) or (± 2, ± 1) in the coordinates of the chessboard (Erde et al. 2012). Figures 2 and 3 show examples of closed and open Knight's tours that have legal movement, respectively. It should be noted that our goal in this paper is not just to use closed or open tours. We can freely use any that brings us closer to the goal. Therefore, the movement of Knight's tours with coordinates (i ± 2, j ± 3) and (i ± 3, j ± 2) on the chessboard is the goal (Singhun et al. 2019).

Fig. 2
figure 2

The Knights are placed in a closed tour

Fig. 3
figure 3

The Knights are placed in an open tour

In this paper, considering a 10 × 10 PV array, five orientation modes of Knight movement are introduced and applied to it as follows:

  1. (a)

    The Knight moves two squares down and then three squares to the left.

  2. (b)

    The Knight moves three squares upwards and then two squares to the left.

  3. (c)

    The Knight moves two squares down and then three squares to the right.

  4. (d)

    The Knight moves three squares down and then two squares to the left.

  5. (e)

    The Knight moves three squares upwards and then two squares to the right.

The movement and placement of the Knight in each dimension are done based on the five movements mentioned above. The order of these movements will be different for a panel in different dimensions. In the continuation of this section, their movement in different dimensions and in the form of two movement patterns is mentioned.

In pattern 1, the first, second, third, fourth, fifth, sixth, seventh, eighth, and ninth movements are in the orientations a, a, b, c, d, c, e, c, and a, respectively. This algorithm can be repeated for n times.

In pattern 2, the first, second, third, fourth, fifth, sixth, seventh, eighth, and ninth movements are in the orientations d, a, b, a, d, c, e, c, and e, respectively. This algorithm can also be repeated for n times.

In general, the following points should be considered to move the Knight:

  • For each loop of the Knight movement, the starting point is in row 1.

  • Number 1 in each loop is \(10k-9;k\in \left\{1, 2, 3, \dots , 10\right\}\).

  • In each movement, the start and stop points cannot be in the same row.

After introducing and getting acquainted with the rules and how to move the Knight, it moves according to the first pattern. After determining the position of the starting point (number one), as shown in Fig. 4a, the position of the remaining numbers is determined based on the first pattern as follows:

  • Second number: third row, sixth column (3, 6).

  • Third number: fifth row, the third column (5, 3).

  • Fourth number: second row, the first column (2, 1).

  • Fifth number: fourth row, the fourth column (4, 4).

  • Sixth number: seventh row, the second column (7, 2).

  • Seventh number: ninth row, the fifth column (9, 5).

  • Number eight: sixth row, the fifth column (6, 5).

  • Ninth number: eighth row, the tenth column (8, 10).

  • Tenth number: tenth row, the seventh column (10, 7).

Fig. 4
figure 4

Knight's movement path in loops one to ten on the PV array with dimension of 10 × 10: a first loop; b second loop; c third loop; d fourth loop; e fifth loop; f sixth loop; g seventh loop; h eighth loop; i ninth loop; j tenth loop

After placing the numbers in the first loop and determining the direction of movement of the first loop, in the second loop, the numbers are placed, such as the first loop, according to the pattern of the first type. Thus, the first number in the first row is placed in front of the first number of the first loop (Fig. 4b). After placing the numbers in the first and second loops and determining the direction of movement of these loops, in the third loop, the numbers are placed, such as the second loop, according to the pattern of the first type. As shown in Fig. 4c, the first number in the first row is placed in front of the first number of the second loop. Thus, after placing the numbers in the first, second, and third loops in the same way as Fig. 4d–j show, the first numbers in the fourth to tenth loops are similar to the second and third loops in the first-row one by one are placed after the previous number, and the path of the Knight's movement continues according to the pattern of the first type.

Knight's movement was introduced according to the first pattern and tested on a 10 × 10 board. For the second pattern, the Knight's moves according to the introduced positions. In the proposed method, it is not important whether the Knight's tour is open or closed, but it is important to choose the right positions for the Knight's tour to move in the correct places. Also, the purpose of using a Knight's tour is to prevent the PV panels of one type from being in a row as it reduces the output power. Using the explained positions to move the Knight, this method can be used for 6 × 6 and 9 × 9 dimensions and dimensions in any size.

As shown in Fig. 5, the motion layout of the proposed method on a 6 × 6 PV array can be as follows:

Fig. 5
figure 5

Motion layout of the Knight's tour on a PV array with the dimension of 6 × 6

Number 1 can be placed in the first row in each of the columns, and this is the beginning of the first loop, and this loop is repeated 5 times. The next numbers are according to the presented pattern and are in order of d, a, b, a, and b, respectively. As Fig. 6 shows for the 9 × 9 board, the number one in the first row can be placed in each of the columns, and the first loop is started. This loop is repeated eight times and the next numbers are placed according to the pattern presented in the form of e, d, a, b, b, a, d, and d, respectively.

Fig. 6
figure 6

Motion layout of the Knight's tour on a PV array with the dimension of \(9\times 9\)

Figure 7 shows the flowchart of the shaded modules reconfiguration in a PV array based on the proposed Knight's tour technique. The proposed method was introduced in this section and implemented on a variety of boards in different dimensions. In the continuation of the paper, by introducing different types of PV array modeling, the suggested method will be implemented on PV arrays in different dimensions and its results will be presented.

Fig. 7
figure 7

The flowchart of the PV modules reconfiguration in a PV array based on the Knight's tour procedure

4 Performance assessment metrics

Performance appraisal of any method can be considered the most important part of the work. Thus, the efficiency and effectiveness of each method and the comparison of various methods are obtained by evaluating the results of their performance. In this paper, after applying the introduced methods on different types of PV arrays in order to reconfigure and distribute the shadow, the performance of each method is evaluated with various indicators. The GMPP, fill factor (FF), ML, and efficiency are introduced and utilized as performance evaluation indicators in this paper. Each of the aforementioned indicators is defined and calculated as follows:

GMPP is tracked and obtained by calculating the generated current in each row of the PV array.

FF is one of the defining indicators in the overall behavior of a solar cell and measures the area of a PV array module. The FF depends on the maximum power point (\({P}_{m}\)), open-circuit voltage (\({V}_{OC}\)), and short circuit current (\({I}_{SC}\)). It can be calculated as follows:

$$FF=\frac{{P}_{m}}{{V}_{OC}\times {I}_{SC}}$$
(1)

ML is the difference between the maximum power under uniform radiation (\({MPP}_{uni}\)) and the GMPP under PSC (\({GMPP}_{PSCs}\)). The ML can be calculated as:

$$ML= \frac{{MPP}_{uni-}{GMPP}_{PSCs}}{{GMPP}_{PSCs}}$$
(2)

Efficiency \((\eta )\) is the ratio between the maximum power point \({(P}_{m})\) and the solar energy input (\({P}_{in}\)). The efficiency can be expressed as the following equation:

$$\eta =\frac{{P}_{m}}{{P}_{in}}$$
(3)

5 Simulation results

The efficiency of the reconfiguration methods is obtained by influencing different models of the PV arrays. For this purpose, in this paper, the Knight's tour method is applied for reconfiguring 4 different cases of the PV arrays. PV arrays have been considered in square and rectangular shapes and with different dimensions to better compare and express the efficiency of the proposed method. In addition, the shadows intended for all cases are in various dimensions. In each shading condition, the GMPP for the TCT, SuDoKu, optimal SuDoKu, improved SuDoKu, Skyscraper Puzzle, and Knight's tour methods are tracked in the Simulink environment of MATLAB 2018b. The cases studied in this paper are described as follows:

Case 1: A \(9\times 9\) TCT PV array containing \(4\times 4\) shading.

Case 2: A \(9\times 9\) TCT PV array containing \(4\times 5\) shading.

Case 3: A \(8\times 7\) TCT PV array containing \(3\times 5\) shading.

Case 4: A \(8\times 14\) TCT PV array containing \(3\times 5\) shading.

It should be noted that the standard test condition specifications of the panels used in all four cases are presented in Table 1. So, under these conditions, only the size of the PV panels and the shadow conditions in each case have changed.

Table 1 Standard test condition specifications of the PV panels

5.1 Case 1

As shown in Fig. 8a, in this case, in group one, in the upper left corner, the \(4\times 4\) matrix is under PSCs with different radiation levels. In the shadow of group one in the TCT array, all PV modules in the 1, 2, 3, 4 rows and 1, 2, 3 columns receive \(700\,{ W/m}^{2}\) radiation. In the same way, column 4 and row 1, 2, 3, 4 receive \(600\, {W/m}^{2}\) radiation. In this case, in order to track the GMPP, the current produced in each row of the PV array after the distribution of shadows via the TCT, SuDoKu, optimal SuDoKu, improved SuDoKu, Skyscraper puzzle, and proposed solution of Knight's tour is calculated based on the following equations:

$${I}_{row 1}={B}_{11}{I}_{11}+{B}_{12}{I}_{12}+{B}_{13}{I}_{13}+\dots +{B}_{18}{I}_{18}+{B}_{19}{I}_{19}$$
(4)
$${B}_{1,j}= \frac{{G}_{1,j }}{{G}_{0}}$$
(5)

where \(j\) is the column index, \({G}_{1,j}\) shows the irradiance in the panel labeled \(1j\), \({G}_{0}\) is the full irradiance, and \({I}_{1j}\) demonstrate the limited current for full irradiance of the panel labeled \(1j\). If \({I}_{m}\) be considered the current limit of the panel for full irradiance (\({B}_{i,j}=1\)) under standard temperature conditions, then the current of each row in the TCT array is calculated as:

Fig. 8
figure 8

Shadow distribution in case 1 via different methods; a TCT, b SuDoKu, c Optimal SuDoKu, d improved SuDoKu, e skyscraper puzzle, f proposed Knight's tour method

$${I}_{row 9}={I}_{row 8}={I}_{row 7}={I}_{row 6}={I}_{row 5}={9I}_{m}$$
(6)
$${I}_{row 4}={I}_{row 3}={I}_{row 2}={I}_{row 1}=\left(5\times {I}_{m}\right)+\left(3\times (0.7{I}_{m})\right)+\left(1\times (0.6{I}_{m})\right)={7.7I}_{m}$$
(7)

The current of each row in the SuDoku array are:

$${I}_{row 9}={I}_{row 8}={I}_{row 5}=\left(7\times {I}_{m}\right)+\left(1\times (0.7{I}_{m})\right)+(1\times (0.6{I}_{m}))={8.3I}_{m}$$
(8)
$${I}_{row 7}={I}_{row 3}={I}_{row 1}=\left(7\times {I}_{m}\right)+\left(2\times (0.7{I}_{m})\right)={8.4I}_{m}$$
(9)
$${I}_{row 2}={I}_{row 6}=\left(8\times {I}_{m}\right)+\left(1\times 0.7{I}_{m}\right)={8.7I}_{m}$$
(10)
$${I}_{row 4}=\left(6\times {I}_{m}\right)+\left(2\times (0.7{I}_{m})\right)+(1\times (0.6{I}_{m}))={8I}_{m}$$
(11)

The current of each row in the optimal SuDoku array are:

$${I}_{row9}={I}_{row3} ={I}_{row2} ={ (7\times I}_{m})+\left( 1\times \left(0.7{I}_{m}\right)\right)+\left(1\times \left(0.6{I}_{m}\right)\right)= {8.3I}_{m}$$
(12)
$${I}_{row7}={I}_{row4} ={ (7\times I}_{m})+\left( 2\times \left(0.7{I}_{m}\right)\right)= {8.4I}_{m}$$
(13)
$${I}_{row8}={I}_{row6} ={I}_{row5} ={ (8\times I}_{m})+\left( 1\times \left(0.7{I}_{m}\right)\right)= {8.7I}_{m}$$
(14)
$${I}_{row1}={ (6\times I}_{m})+\left( 2\times \left(0.7{I}_{m}\right)\right)+\left( 1\times \left(0.6{I}_{m}\right)\right)= {8I}_{m}$$
(15)

The current of each row in the improved SuDoKu array are:

$${I}_{row9}={I}_{row1} ={ (7\times I}_{m})+\left( 2\times \left(0.7{I}_{m}\right)\right)= {8.4I}_{m}$$
(16)
$${I}_{row8}={I}_{row4} ={{I}_{row3}= (7\times I}_{m})+\left( 1\times \left(0.7{I}_{m}\right)\right)+\left( 1\times \left(0.6{I}_{m}\right)\right)= {8.3I}_{m}$$
(17)
$${I}_{row7}={I}_{row6} ={I}_{row2} ={ (8\times I}_{m})+\left( 1\times \left(0.7{I}_{m}\right)\right)= {8.7I}_{m}$$
(18)
$${I}_{row5}={ (6\times I}_{m})+\left( 2\times \left(0.7{I}_{m}\right)\right)+\left( 1\times \left(0.6{I}_{m}\right)\right)= {8I}_{m}$$
(19)

The current of each row in the Skyscraper Puzzle array are:

$${I}_{row9}={I}_{row7}= {I}_{row5}={I}_{row1} ={ (8\times I}_{m})+\left( 1\times \left(0.7{I}_{m}\right)\right)= {8.7I}_{m}$$
(20)
$${I}_{row8}={ (7\times I}_{m})+\left( 2\times \left(0.7{I}_{m}\right)\right)= {8.4I}_{m}$$
(21)
$${I}_{row6} ={I}_{row4} ={ (6\times I}_{m})+\left( 2\times \left(0.7{I}_{m}\right)\right)+\left( 1\times \left(0.6{I}_{m}\right)\right)= {8I}_{m}$$
(22)
$${I}_{row3}={I}_{row2}={ (7\times I}_{m})+\left( 1\times \left(0.7{I}_{m}\right)\right)+\left( 1\times \left(0.6{I}_{m}\right)\right)= {8.3I}_{m}$$
(23)

The current of each row in the Knight's tour array are:

$${I}_{row9}={I}_{row4}= {I}_{row2} ={ (7\times I}_{m})+\left( 2\times \left(0.7{I}_{m}\right)\right)= {8.4I}_{m}$$
(24)
$${I}_{row8}={I}_{row6}={ (8\times I}_{m})+\left( 1\times \left(0.7{I}_{m}\right)\right)= {8.7I}_{m}$$
(25)
$${I}_{row7} ={I}_{row5 }={I}_{row3}={I}_{row2} ={ (7\times I}_{m})+\left( 1\times \left(0.7{I}_{m}\right)\right)+\left( 1\times \left(0.6{I}_{m}\right)\right)= {8.3I}_{m}$$
(26)

Figure 8 shows how the shadow is distributed by TCT, SuDoKu, optimal SuDoKu, improved SuDoKu, Skyscraper Puzzle, and Knight's tour solutions in the \(9\times 9\) PV array.

Figures 9 and 10 illustrate the P–V and I–V characteristic curves for the PV arrays of case 1, respectively. The corresponding current, voltage, and power for adjusting the TCT, SuDoKu, and optimal SuDoKu are given in Table 2. Similarly, the current, voltage, and power for adjusting the improved SuDoKu, Skyscraper puzzle, and Knight's tour are presented in Table 3. From the results presented in Tables 2 and 3, it can be seen that the highest GMPP value of \(74.7 {I}_{m}{V}_{m}\) is obtained for the Knight's tour method. Finally, the comparison of the results presented for case 1 emphasizes the superiority of the proposed method with the highest power generation compared to other solutions.

Fig. 9
figure 9

P–V characteristic curves for the I group shadow conditions in case 1

Fig. 10
figure 10

I-V characteristic curves for the I group shadow conditions in case 1

Table 2 Current, voltage, and power values for adjusting the TCT, SuDoKu, and optimal SuDoKu in case 1
Table 3 Current, voltage, and power values for adjusting the improved SuDoKu, Skyscraper puzzle, and Knight's tour in case 1

5.2 Case 2

As shown in Fig. 11a, in this case, the \(4\times 5\) matrix is subjected to partial shadows with different radiation levels. According to the procedure described in Case 1, also, in this case, the GMPP via each method is done by calculating the current in each row. For case 2, the current of each row is calculated based on Eqs. (122) for each of the considered methods. All PV modules in rows 5, 6 and columns 4, 5, 6, 7, 8 receive \(500\,{W/m}^{2}\) radiation and columns 4, 5, 6, and row 3 receive \(400\, {W/m}^{2}\) radiation and columns 4, 5, 6, and row 2 are irradiated with \(200\,{ W/m}^{2}\). Figure 11 shows the distribution of shadows by SuDoKu, optimal SuDoKu, improved SuDoKu, Skyscraper Puzzle, and Knight's tour methods in case 2.

Fig. 11
figure 11

Shadow distribution in case 2 via different methods; a TCT, b SuDoKu, c optimal SuDoKu, d improved SuDoKu, e Skyscraper puzzle, f proposed Knight's tour method

The P–V and I–V characteristic curves for the PV arrays of case 2 are demonstrated in Figs. 12 and 13, respectively. Table 4 shows the corresponding current, voltage, and power for adjusting the TCT, SuDoKu, and optimal SuDoKu. The current, voltage, and power for adjusting the improved SuDoKu, Skyscraper puzzle, and Knight's tour are given in Table 5.

Fig. 12
figure 12

P–V characteristic curves for the II group shadow conditions in case 2

Fig. 13
figure 13

I–V characteristic curves for the II group shadow conditions in case 2

Table 4 Current, voltage, and power values for adjusting the TCT, SuDoKu, and optimal SuDoKu in case 2
Table 5 Current, voltage, and power values for adjusting the improved SuDoKu, Skyscraper puzzle, and Knight's tour in case 2

The results obtained in Tables 4 and 5, the maximum values of power generated after reconfiguring the PV arrays in case 2 are \(54\,I_{m} V_{m}\), \(63.2\,I_{m} V_{m}\), \(65.7\,I_{m} V_{m}\), \(62.1\,I_{m} V_{m}\), \(65.7\,I_{m} V_{m}\), and \(66.6\,I_{m} V_{m}\) for the TCT, SuDoKu, optimal SuDoKu, improved SuDoKu, Skyscraper Puzzle, and Knight's tour, respectively. It can be seen that in this case, the proposed solution of Knight's tour has been able to do the most shadow distribution and therefore has the highest power production.

5.3 Case 3

The PV array considered in this case is a rectangular PV array in dimensions of \(8 \times 7\). In this case, the lower left of the \(3 \times 5\) matrix is shaded under a partial shadow with a different radiation level (Fig. 14a). All PV modules in rows 1 and columns 1, 2, 3, 4, and 5 receive \(400\,W/m^{2}\) radiation. Also, row 2 and columns 1, 2, 3, 4, and 5 receive \(300\,W/m^{2}\) radiation and row 3 and columns 1, 2, 3, 4, and 5 receive \(500\,W/m^{2}\) radiation. As in previous cases, the current generated by each row is calculated to track the GMPP. The shadow distribution in case 3 is presented by the TCT and Knight's tour methods in Fig. 14.

Fig. 14
figure 14

Shadow distribution in case 3 via different methods; a TCT, b Knight's tour arrangement without dispersion, c Knight's tour arrangement with dispersion

Figures 15 and 16 demonstrate the P–V and I–V characteristic curves for the PV arrays of case 3, respectively. The corresponding current, voltage, and power for adjusting the TCT and Knight's tour methods in case 3 are given in Table 6.

Fig. 15
figure 15

P–V characteristic curves for the V group shadow conditions in case 3

Fig. 16
figure 16

I–V characteristic curves for the V group shadow conditions in case 3

Table 6 Current, voltage, and power values for adjusting the TCT and Knight's tour solutions in case 3

According to the results presented in Table 6, in this case, the Knight's tour method was able to show better performance than the TCT method by producing a maximum power of 46.8 VmIm.

5.4 Case 4

In this case, a rectangular PV array with dimensions of 7 \(\times 14\) has been examined. As shown in Fig. 17a, the \(3 \times 5\) matrix of this case is shaded with different radiation levels. All the PV modules in row 5 and columns 3, 4, 5, 6, 7 receives \(500\,W/m^{2}\) radiation. Modules in row 4 and columns 3, 4, 5, 6, and 7 under irradiation of \(400\,W/m^{2}\) and also modules in row 3 and columns 3, 4, 5, 6, and 7 are under the irradiation of \(400\,W/m^{2}\). The location of the GMPP is determined via the TCT and Knight's tour methods by calculating the current generated in each row as in the previous cases. Figure 17 shows the distribution of shadows in case 4 by the TCT and Knight's tour procedures.

Fig. 17
figure 17

Shadow distribution in case 4 via different methods; a TCT, b Knight's tour arrangement without dispersion, c Knight's tour arrangement with dispersion

P–V and I–V characteristic curves for the PV arrays of case 4 are demonstrated in Figs. 18 and 19, respectively. The current, voltage, and power related to adjusting the TCT and Knight's tour methods in case 4 are given in Table 7.

Fig. 18
figure 18

P–V characteristic curves for the VI group shadow conditions in case 4

Fig. 19
figure 19

I–V characteristic curves for the VI group shadow conditions in case 4

Table 7 Current, voltage, and power values for adjusting the TCT and Knight's tour solutions in case 4

The results presented in Table 7 show that the Knight's tour method was able to produce maximum power, i.e., \(109.8\, {I}_{m}{V}_{m}\) compared to the TCT method by distributing more shadows in all rows of the PV array.

After implementing the methods presented in this paper to reconfigure the PV arrays and distribute shadows on its surface in order to extract maximum power, the results of each in terms of GMPP were evaluated and compared. The results showed that the Knight's tour method compared to other methods was provided the best results for all cases studied. Evaluation of results by FF, ML, and efficiency indicators for cases 1 to 4 is presented in Figs. 20, 21, 22 and 23, respectively.

Fig. 20
figure 20

FF, ML, and efficiency for the case 1 shading condition

Fig. 21
figure 21

FF, ML, and efficiency for the case 2 shading condition

Fig. 22
figure 22

FF, ML, and efficiency for the case 3 shading condition

Fig. 23
figure 23

FF, ML, and efficiency for the case 4 shading condition

Based on the evaluations performed in Figs. 20, 21, 22 and 23 for reconfiguring the PV arrays, it was observed that the Knight's tour method was able to provide the best results in performance evaluation via FF indicator compared to the TCT, SuDoKu, optimal SuDoKu, improved SuDoKu, and Skyscraper Puzzle methods. Assessments also showed that the Knight's tour method had the lowest value of ML compared to other solutions. On the other hand, the Knight's tour method with the highest GMPP for cases 1 to 4 with the values of 74.7 \({I}_{m}{V}_{m}\), 66.6 \({I}_{m}{V}_{m}\), 46.8 \({I}_{m}{V}_{m}\), and 109.8 \({I}_{m}{V}_{m}\), respectively, could be superior.

The results presented in each case emphasized the ideal performance of the Knight's tour technique compared to other conventional methods. However, a noteworthy point to note is the performance of the proposed method in the practical implementation of real-world PV systems. Because all reconfiguration methods operate based on voltage and current characteristics measured by the PV system, in this case, they can suffer from measurement errors. In this paper, to show the generalizability of the Knight's tour technique and evaluate its performance in practical implementation, examples of voltage characteristics with measurement errors were utilized. This test was performed optionally on the first case. Table 8 presents the GMPP results obtained for reconfiguration under measurement error and practical implementation modeling in case 1.

Table 8 The results of the obtained GMPP for the reconfiguration under measurement error in the first case study

From the results presented in Table 8, it can be seen that changes in the voltage values due to measurement errors also cause significant changes in the GMPP values. However, the results show that the Knight's tour method was able to obtain the highest GMPP values under conditions where voltage values suffer from measurement error compared to other solutions that had healthy voltage characteristics without measurement error. Despite the efficiency of the Knight's tour method in the evaluations, the application of this method on the rectangular PV arrays and extraction of maximum power production is one of the most important features of the proposed method. It should be noted that the Night's tour method can also be implemented for the PV arrays in the real world.

For future studies, the Knight's tour technique can be developed and generalized for very small size and very large size PV arrays. It is also recommended to modify the proposed method so that it does not lose its accuracy in the face of the effects of internal faults, grid harmonics, and obvious measurement errors. Improving the Knight's tour technique and using data mining techniques such as artificial neural networks, machine learning, and deep learning, which enable GMPP to be achieved with high performance speeds and low computational costs, are important issues that need to be addressed. In addition, the analysis of P–V or I–V characteristic curves to simultaneously detect internal PV panel faults under shading conditions can be an ideal way to prevent serious damage to the PV system and attain the GMPP.

6 Conclusions

Reconfiguration of solar arrays in partially shaded conditions in order to extract maximum production power is one of the most important challenges in using PV systems. In this paper, the Knight's tour technique is presented to extract the maximum power from the PV array in PSCs. The Knight's tour is a chess-based technique that reconfigures the PV arrays based on Knight's movements on the chessboard so that shadows are distributed in all rows and maximum power is extracted. The proposed method was applied to the 4 cases of PV arrays in square and rectangular shapes with different dimensions and various shading conditions in each case. In order to provide a comparative approach in each case, the TCT connection model and other conventional methods such as SuDoKu, optimal SuDoKu, improved SuDoKu, and Skyscraper Puzzle were utilized to extract the maximum power. The results of the methods used were evaluated by different performance evaluation indicators such as GMPP, FF, ML, and efficiency. The evaluations showed the highest efficiency values for the Knight's tour method in cases 1 to 4, i.e., 8.05%, 9.10%, 9.31%, and 9.81%, respectively. In the evaluation of efficiency and FF, for each of the used methods, the highest values were obtained for the Knight's tour method in all cases. Also, the Knight's tour method with its lowest mismatch loss values of 3.40%, 3.95%, 3.48%, and 1.88% for cases 1 to 4, respectively, showed its superiority and efficiency. However, using the Knight's tour technique for the PV arrays in the real world can play a significant role in reducing partial shadow losses and generating maximum power from the PV arrays.