Minimization of Losses in Solar Photovoltaic Modules by Reconfiguration under Various Patterns of Partial Shading

Configurations of photovoltaic (PV) modules, such as series-parallel (SP), bridge-linked (BL), and total cross-tied (TCT) configurations, always utilize a number of connecting switches. In a simulation, the ideal switch with no loss is used to optimize the reconfiguration method for a solar PV array. However, in practice, the switches are non-ideal, causing losses and resulting in a decrease in the total output power of the PV array. In this work, MATLAB/Simulink (R2016a) was employed to simulate nine PV modules linked in a 3 × 3 array, and they were reconfigured using series-parallel (SP), bridge-linked (BL), and total cross-tied (TCT) configurations for both ideal and non-ideal switch cases. It was not surprising that non-ideal switches deteriorated the output power compared with ideal cases. Then, the minimization of losses (ML) configuration was proposed by minimizing the number of switches to give the highest output power. A 5% higher power output was set as the criterion to reconfigure the PV modules when partial shading occurred. The results showed that if 50% or more of the area was partially shaded, reconfiguration was unnecessary. On the other hand, when the shaded area was less than 50%, reconfiguration gave a significant increase in power. Finally, the ML method had different configurations for various shading patterns, and provided better results than those of the TCT method.


Introduction
At present, electrical energy is vital for various human activities.The consumption of electrical energy is rapidly increasing, while the fossil fuel used for electricity generation is limited.Moreover, the emissions from fossil fuel cause environmental problems.Therefore, renewable energy, such as hydro energy, solar energy, and wind energy, which is clean and has no resource cost, is widely promoted for electricity generation.According to the statistical data of the Ministry of Energy, Thailand, the potential of solar energy in Thailand is at a high level (4-5 kWh/m 2 per day) [1].The solar energy can be utilized for electrical generation and thermal applications [2].Nowadays, to generate electricity, solar photovoltaic (PV) panels transform solar energy into direct current electricity.The PV material is composed of a semiconductor that uses solar energy to stimulate an electron transfer reaction in order to generate electricity [3].Therefore, there are no emissions during the electricity generation process.However, there are many factors that affect the solar PV power output, such as solar radiation, temperature, solar incidence angle, dust, and shade.
With respect to dust or shade, these cause a reduction in the current and voltage of the affected panel.The panel that provides the minimum value of power will behave itself as an electrical load that consumes electricity from other panels.This will cause a reduction in the total power output.In previous studies, numerous mathematical models were developed to study the effects of the factors affecting the output power of solar PV.The obtained results from mathematical models were compared with those from simulation using a PV equivalent circuit [4,5].The impact of partial shading and the dynamic efficiency of solar PV were studied [6][7][8][9][10][11][12].The result found that it was necessary to automatically reconfigure the solar PV array when partial shading occurs in order to increase the output power.Consequently, many studies have aimed to solve this problem by using methods to reconfigure the solar PV array.Solar PV array reconfiguration is a well-known and popular method to increase the power output and efficiency of electricity generation.The conventional configuration type of a solar PV array can be classified into three types: series-parallel (SP), bridge-linked (BL), and total cross-tied (TCT).For SP, the configuration of this type is a combination of a series and a parallel connection of each panel.For BL, the connection of each panel is nearly the same as in the SP configuration, but the connections of some rows between each string will be added.Lastly, for TCT, the connection of each panel is nearly the same as in BL, but there are connections for all rows between each string.TCT is the most suitable configuration for reducing operation loss when a PV module is shaded [13].In 2009, the impact of shade in the series configuration of a solar photovoltaic array (SPVA) was studied by simulation in MATLAB with the MPPT method.The results found that a shaded solar PV module will behave as an electrical load and can be damaged by the accumulated heat.Bypass diodes could protect the shaded solar PV module from the damage.When considering the whole solar PV system, the shade caused multiple peaks that caused MPPT to not operate normally, and the solar PV modules were unable to operate at their maximum output power [14].
In 2011, the configuration of a PV array was studied by using 52 solar PV panels that were arranged in a 13 × 4 array.The efficiencies of the three conventional configurations were tested.The results found that when some parts of a solar PV module are shaded, the generated power will change depending on the number of shaded panels.From the results, SP can provide the maximum efficiency when the shaded area is low.However, TCT can provide the maximum efficiency, which is higher than SP by 5%, when the shaded area is high [15].In 2014, the effect of shade on a solar PV configuration was studied via MATLAB/Simulink.Thirty-six PV panels arranged in a six by six array were tested.The SP, BL, and TCT configurations were compared when some parts of the solar PV module were shaded.The results found that TCT had the maximum efficiency, which was higher than that of the other configurations by approximately 5.84% [16].In 2014, the impact of the shading effect was studied by using a Smart bypass system to short a shaded solar PV module from the circuit by adapting negative metal-oxide-semiconductor field-effect transistor (MOSFET) and comparing it with a Bypass diode to decrease the voltage at the diode.The results found that the shading effect can reduce the loss, which is similar to an ideal diode, and without the shading effect, the voltage drop was taken into account [17].
In 2015, an array reconfiguration of 81 solar PV panels arranged in a 9 × 9 array and connected in TCT was studied using MATLAB/Simulink.The solar radiation was varied from 200 to 900 W/m 2 .The Genetic algorithm (GA) was used to find the optimal reconfiguration for each shade to obtain the maximum power output.The study concluded that GA gave 34.96% higher power compared to a fixed TCT configuration [18].In 2018, a method to reduce the impact of shade on a solar PV array was applied by relocating the solar PV panel.This method tries to distribute the shade's impact by using the Dominance Square (DS) method for TCT, SP, BL, Honey-comb (HC), SP-TCT, BL-HC, and BL-TCT.Twenty-five solar PV panels were configured to be in a 5 × 5 solar PV array.The results showed that the shade effect by using DS was able to increase the maximum output power compared with those from the other methods when considering one day of operation [19].In 2018, the DS method was studied and improved by using the relocation method one time to decrease the investment in sensor installation.Compared to SP and TCT configurations of 81 solar PV panels connected in a 9 × 9 array, the results found that this method could reduce the impact of the shading effect better than using SP and TCT [20].In the same year, the method of decreasing the shade effect on the solar PV output power by reconfiguration was studied by using the Competence Square (CS) method and comparing it with the DS method.The result obtained from a TCT configuration of 81 solar PV panels connected in a 9 × 9 array found that, when it was shaded, the CS was able to increase the maximum output power more than that of TCT.Also, the CS method decreased multiple peaks, helping to extend the solar PV array's life [21].Moreover, in the same year, a reconfiguration by using the Power Comparison Technique (PCT) was studied to increase the efficiency of a solar PV array when it was partially shaded.Different strings of the shaded solar PV modules would be rearranged to be the same strings to decrease the problem of multiple peaks.The results found that the configuration obtained from the PCT method could reduce the multiple peaks and increase the efficiency more than the other configuration types.The maximum output power could be increased to 11.9% compared with other studies in the literature [22].In 2018, a technique that aims to reduce power loss was improved by spreading the partial shadings to a solar PV array by permanently reconfiguring the solar PV.This method is called static shade dispersion positioning (SDP).The results were compared with those of the Series-Parallel, Bridge-Linked, and Total Cross-Tied configurations under non-uniform and uniform shade conditions.It was found that the maximum power point of the solar PV array using SDP can reach the maximum value compared with other configuration types [23].
From the literature review, there have been many studies to find reconfiguration methods that can reduce the impact of shade at a solar PV module.Mathematical methods, relocation methods, and meta-heuristic methods, such as GA, have been used to find a suitable reconfiguration method.However, a complex reconfiguration of a solar PV array needs a large number of switches, which causes a higher loss during the operation of the switches.Moreover, none of the previous studies have considered this loss.So, a minimization of losses configuration (ML) for a solar PV array is proposed in this paper by minimizing number of switches to obtain the highest output power of solar PV.By reconfiguring the switches, the ML method can decide whether, based on the shaded level, it is necessary to switch and be connected with some other PV string or not.When compared with other reconfiguration techniques, the proposed ML method can extend the life expectancy of the switches by protecting them from overstress.

Solar PV Module Equivalent Circuit and the Effect of Solar Radiation and Temperature
The photo current occurs from sunlight, which causes the solar PV cell to generate the electric charge.This charge will flow through the electrical load, and is directly proportional to the solar radiation.The equivalent circuit of the solar PV module is shown in Figure 1.The relationship of the output current and the output voltage from a solar PV module is presented in Equation (1) [24].
where I ph is the current generated from sunlight (A).
I is the solar PV module's current (A); I o is the reverse saturation current of the diode (A); V is the PV module's voltage (V); R s is the series resistance of the solar PV module (Ω); R p is the parallel resistance of the solar PV module (Ω); where Iph is the current generated from sunlight (A).I is the solar PV module's current (A); Io is the reverse saturation current of the diode (A); V is the PV module's voltage (V); Rs is the series resistance of the solar PV module (Ω); Rp is the parallel resistance of the solar PV module (Ω); q is the electron charge, which is 1.602 × 10 −19 Coulombs; K is the Boltzmann constant, which is 1.3806504 × 10 −23 J/K; T is the operating temperature of the solar PV module (Kelvin); n is the ideality factor of the diode; and Ns is the number of cells per module.
The main factors that affect the solar PV's operation are solar radiation and temperature, as shown in Equations (2) and (3).Moreover, the relationship of parallel resistance and solar radiation is shown in Equation ( 4) [25].The output power of the PV module is shown in Equation (5).
P=VI, The main factors that affect the solar PV's operation are solar radiation and temperature, as shown in Equations ( 2) and (3).Moreover, the relationship of parallel resistance and solar radiation is shown in Equation ( 4) [25].The output power of the PV module is shown in Equation ( 5).The temperature (T) used in this simulation is based on the average values measured from the experiment.Also, the temperature coefficient was considered and accounted for as shown in Equations (2) and (3).Moreover, the variation in the module's temperature during the shading period was slightly changed, since the occurrence of shading happens in a very short time.Hence, the obtained output power and power loss from the model are slightly different from the output power and power loss from the experiment.In conclusion, one limitation is that the average temperature used in the model can provide some output power and power loss errors.In order to reduce these errors, the measured temperature should be used instead of the average temperature.

PV Module Configurations
The PV module configurations can be classified into three standard configurations: series-parallel (SP), bridge-linked (BL), and total cross-tied (TCT).An example of each configuration is shown in Figure 2 [11,13].
experiment.Also, the temperature coefficient was considered and accounted for as shown in Equations ( 2) and (3).Moreover, the variation in the module's temperature during the shading period was slightly changed, since the occurrence of shading happens in a very short time.Hence, the obtained output power and power loss from the model are slightly different from the output power and power loss from the experiment.In conclusion, one limitation is that the average temperature used in the model can provide some output power and power loss errors.In order to reduce these errors, the measured temperature should be used instead of the average temperature.

PV Module Configurations
The PV module configurations can be classified into three standard configurations: seriesparallel (SP), bridge-linked (BL), and total cross-tied (TCT).An example of each configuration is shown in Figure 2 [11,13].

Shading Patterns
Generally, shading at a solar PV module happens partially along the module.The occurrence of shading could decrease the output power; thus, we try to minimize the effect of shading by the reconfiguration of modules.However, shading situations occur instantaneously and cannot represent the normal behavior of the module.In this study, the shading patterns are classified into eight patterns: no shade (0% shaded), 1 of 9 PV panels (11% shaded), 2 of 9 PV panels (22% shaded),

Shading Patterns
Generally, shading at a solar PV module happens partially along the module.The occurrence of shading could decrease the output power; thus, we try to minimize the effect of shading by the reconfiguration of modules.However, shading situations occur instantaneously and cannot represent the normal behavior of the module.In this study, the shading patterns are classified into eight patterns: no shade (0% shaded), 1 of 9 PV panels (11% shaded), 2 of 9 PV panels (22% shaded), 4 of 9 PV panels (44% shaded), and 6 of 9 PV panels (66% shaded) as shown in Figure 3.For the simulation of a referenced case, the solar radiation is set to 1000 W/m 2 and the temperature of the PV is set to be constant at 40 • C. In the cases of partial shading, the solar radiation drops from 900 W/m 2 to 100 W/m 2 at the temperature of 40 • C as shown in Figure 4.The solar radiation level that gives a 5% or more difference in output power for each shading case will be considered as the point to start reconfiguring the solar PV array.

Model of the 3 × 3 PV Modules
MATLAB/Simulink was used to simultaneously simulate the shading and the configuration of the solar PV array with various solar irradiances as described in the previous section.The temperature was defined to be constant at 40 • C. The characteristics of the solar PV are presented in Table 1, and the setting of the parameters of the solar PV array is illustrated in Figure 5.For the logic of the switch to change the configuration of the solar PV array, the logic "0" was defined as an open circuit and logic "1" was defined as a closed circuit as shown in Figure 6.Parameters such as tolerance, peak power, open circuit voltage, power maximum voltage, short circuit current, power maximum current, and fill factor were the initial setting values for the simulations.These parameters directly contribute to the final power output.4 of 9 PV panels (44% shaded), and 6 of 9 PV panels (66% shaded) as shown in Figure 3.For the simulation of a referenced case, the solar radiation is set to 1000 W/m 2 and the temperature of the PV is set to be constant at 40 °C.In the cases of partial shading, the solar radiation drops from 900 W/m 2 to 100 W/m 2 at the temperature of 40 °C as shown in Figure 4.The solar radiation level that gives a 5% or more difference in output power for each shading case will be considered as the point to start reconfiguring the solar PV array.

Model of the 3 × 3 PV Modules
MATLAB/Simulink was used to simultaneously simulate the shading and the configuration of the solar PV array with various solar irradiances as described in the previous section.The temperature was defined to be constant at 40 °C.The characteristics of the solar PV are presented in Table 1, and the setting of the parameters of the solar PV array is illustrated in Figure 5.For the logic of the switch to change the configuration of the solar PV array, the logic "0" was defined as an open circuit and logic "1" was defined as a closed circuit as shown in Figure 6.Parameters such as tolerance, peak power, open circuit voltage, power maximum voltage, short circuit current, power maximum current, and fill factor were the initial setting values for the simulations.These parameters directly contribute to the final power output.

Model of the 3 × 3 PV Modules
MATLAB/Simulink was used to simultaneously simulate the shading and the configuration of the solar PV array with various solar irradiances as described in the previous section.The temperature was defined to be constant at 40 °C.The characteristics of the solar PV are presented in Table 1, and the setting of the parameters of the solar PV array is illustrated in Figure 5.For the logic of the switch to change the configuration of the solar PV array, the logic "0" was defined as an open circuit and logic "1" was defined as a closed circuit as shown in Figure 6.Parameters such as tolerance, peak power, open circuit voltage, power maximum voltage, short circuit current, power maximum current, and fill factor were the initial setting values for the simulations.These parameters directly contribute to the final power output.The power loss in the system is caused by the internal contact resistance, including the power used to command the switches.The internal resistance was defined by using contact resistance as a setting in Figure 6.Generally, a relay is used as an electrical switch.A relay brand Songle with model SRD-05VDC-SL-C was used in this experiment.Data of the relay are presented in Table 2.  7a shows the setting for the ideal switch, which has no voltage drop when the switch is on.This condition is lossless and the results are presented in Section 3.1.In Figure 7b, 100 mΩ of contact resistance is set, which causes loss according to the following equation: where Ploss is the power loss in the switch (W); Isw is the current through the switch during operation (A); and Rct is the contact resistance (Ω).The power loss in the system is caused by the internal contact resistance, including the power used to command the switches.The internal resistance was defined by using contact resistance as a setting in Figure 6.Generally, a relay is used as an electrical switch.A relay brand Songle with model SRD-05VDC-SL-C was used in this experiment.Data of the relay are presented in Table 2. Figure 7a shows the setting for the ideal switch, which has no voltage drop when the switch is on.This condition is lossless and the results are presented in Section 3.1.In Figure 7b, 100 mΩ of contact resistance is set, which causes loss according to the following equation: where P loss is the power loss in the switch (W); I sw is the current through the switch during operation (A); and R ct is the contact resistance (Ω).
In a real situation of switch usage, the power that the switch commands must be considered as the loss.The power consumption will have huge effects following the number of switches used.When adding the effect of the loss from the contact resistance and the power consumption under high-temperature operation, the switches will consume more power.The power consumption based on the data sheet of the relay switch chosen for the experiment is shown in Figure 7, and the results are presented in Section 3.1.In a real situation of switch usage, the power that the switch commands must be considered as the loss.The power consumption will have huge effects following the number of switches used.When adding the effect of the loss from the contact resistance and the power consumption under hightemperature operation, the switches will consume more power.The power consumption based on the data sheet of the relay switch chosen for the experiment is shown in Figure 7, and the results are presented in Section 3.1.
Figure 8 shows the effect of the temperature on the power consumption to command the switch by adopting the data from the data sheet.The power consumption is not constant during the working time, and directly varies according to the temperature.When the temperature increases, the power to command the switches will also rise, as follows in the figure showing the amount of power to command the switches at 40 °C.This consumes approximately 0.55 W to command one switch.However, the switches are located close to the solar PV module in this research; therefore, the temperatures of the switches and the solar PV modules are defined equally to be 40 °C, which is the average temperature of the solar PV module when it operates.Figure 8 shows the effect of the temperature on the power consumption to command the switch by adopting the data from the data sheet.The power consumption is not constant during the working time, and directly varies according to the temperature.When the temperature increases, the power to command the switches will also rise, as follows in the figure showing the amount of power to command the switches at 40 • C.This consumes approximately 0.55 W to command one switch.However, the switches are located close to the solar PV module in this research; therefore, the temperatures of the switches and the solar PV modules are defined equally to be 40 • C, which is the average temperature of the solar PV module when it operates.In a real situation of switch usage, the power that the switch commands must be considered as the loss.The power consumption will have huge effects following the number of switches used.When adding the effect of the loss from the contact resistance and the power consumption under hightemperature operation, the switches will consume more power.The power consumption based on the data sheet of the relay switch chosen for the experiment is shown in Figure 7, and the results are presented in Section 3.1.
Figure 8 shows the effect of the temperature on the power consumption to command the switch by adopting the data from the data sheet.The power consumption is not constant during the working time, and directly varies according to the temperature.When the temperature increases, the power to command the switches will also rise, as follows in the figure showing the amount of power to command the switches at 40 °C.This consumes approximately 0.55 W to command one switch.However, the switches are located close to the solar PV module in this research; therefore, the temperatures of the switches and the solar PV modules are defined equally to be 40 °C, which is the average temperature of the solar PV module when it operates.Figure 9 presents the characteristics of the relay switch.Considering the operation, when supplying the power to the relay, the relay contact will be close to the delay time depending on the type of relay.Moreover, the amount of power required to command the relay is consumed during all relay switch operations.Consequently, in the experiment, the power consumption is considered for the whole operation time of the relay switch.
supplying the power to the relay, the relay contact will be close to the delay time depending on the type of relay.Moreover, the amount of power required to command the relay is consumed during all relay switch operations.Consequently, in the experiment, the power consumption is considered for the whole operation time of the relay switch.

Minimum Loss Configuration
The simulation results of the reconfiguration from SP to BL or TCT found that, when partial shading has occurred, the reconfiguration from SP to TCT provided the highest output power when neglecting all losses.However, when considering losses in the switches and the energy consumed to operate the switches, the TCT configuration could not generate the highest output power for all patterns of partial shading.
Therefore, the idea is to change the configuration using the least number of switches in order to decrease the loss in the switches.This idea could provide the maximum output power when partial shading has occurred.This method is called the "Minimum Loss (ML) configuration".This method can decrease the number of switches connecting between solar PV panels and provides the maximum output power.In a solar PV 3 × 3 array consisting of nine solar PV panels, four switches were used, which can generate 16 cases of configuration as shown in Figure 6.

Comparative Results between the Ideal Switch and the Non-Ideal Switch
The simulation was carried out by MATLAB/Simulink using the SP, BL, and TCT configurations and eight types of shading as shown in Figure 3.The simulation results of the ideal and non-ideal switches for reconfiguring were also investigated.
In Case 2, when considering the shading of one solar PV panel from nine panels and 900 W/m 2 , the output power obtained from the SP configuration was decreased.When changing the configuration to BL or TCT, the decrease in output power was less than that obtained from SP for the ideal switch case.In contrast, for the non-ideal switch case, the decrease in output power from the BL or TCT configuration was more than that of SP because of the losses in the switches, as presented in Table 3.

Minimum Loss Configuration
The simulation results of the reconfiguration from SP to BL or TCT found that, when partial shading has occurred, the reconfiguration from SP to TCT provided the highest output power when neglecting all losses.However, when considering losses in the switches and the energy consumed to operate the switches, the TCT configuration could not generate the highest output power for all patterns of partial shading.
Therefore, the idea is to change the configuration using the least number of switches in order to decrease the loss in the switches.This idea could provide the maximum output power when partial shading has occurred.This method is called the "Minimum Loss (ML) configuration".This method can decrease the number of switches connecting between solar PV panels and provides the maximum output power.In a solar PV 3 × 3 array consisting of nine solar PV panels, four switches were used, which can generate 16 cases of configuration as shown in Figure 6.

Comparative Results between the Ideal Switch and the Non-Ideal Switch
The simulation was carried out by MATLAB/Simulink using the SP, BL, and TCT configurations and eight types of shading as shown in Figure 3.The simulation results of the ideal and non-ideal switches for reconfiguring were also investigated.
In Case 2, when considering the shading of one solar PV panel from nine panels and 900 W/m 2 , the output power obtained from the SP configuration was decreased.When changing the configuration to BL or TCT, the decrease in output power was less than that obtained from SP for the ideal switch case.In contrast, for the non-ideal switch case, the decrease in output power from the BL or TCT configuration was more than that of SP because of the losses in the switches, as presented in Table 3. From Table 3, in the case of no shade (at solar radiation 1000 W/m 2 ), the solar PV array can generate the maximum output power.However, in the case of considering loss from switching, when reconfiguring from SP to TCT, the output power is decreased compared with the output power from the SP configuration because the switches consumed some power.The decreasing of the solar radiation caused the output power of the SP configuration to decrease.Under medium dark cloud conditions, the reconfiguration from SP to BL or TCT can increase the output power more than 5% compared with the output power obtained from the SP configuration.It can be found that the difference in output power obtained from non-ideal switch case was less than that obtained from the ideal switch case because of the power loss in the switch.Moreover, for the non-ideal switch case, reconfiguring to TCT at a solar radiation of 700−900 W/m 2 provided a difference of output power that was close to the difference of output power from BL.
Therefore, the solar PV reconfigurations with a non-ideal switch from SP to BL and TCT were made for other shading cases.It was found that, when the shaded area of the solar PV was higher than 50%, a reconfiguration cannot increase the output power in Cases 7 and 8 because of the shading of all solar PV panels in one string (Case 7) or the shading of every row of the solar PV array (Case 8) [28].The simulation results are shown in Tables 3 and 4. For a 5% increase in power, it can be found that the output power of Cases 2, 3, 4, and 6 obtained from TCT was better than that obtained from BL.However, BL was better than TCT only in Case 5.In addition, for a 5% increase in output power, the starting point of reconfiguration at a shading level (radiation values) is presented as follows: In Case 2, the best configuration type is TCT, which must operate at a solar radiation of less than 400 W/m 2 .
In Case 3, there is no reconfiguration because it could not provide more than a 5% increase in output power.
In Case 4, the best configuration type is TCT, which must operate at a solar radiation of less than 500 W/m 2 .
In Case 5, the best configuration type is BL, which must operate at a solar radiation of less than 200 W/m 2 .
In Case 6, the best configuration type is TCT, which must operate at a solar radiation of less than 700 W/m 2 .
When considering the losses in the switches, the BL and TCT configurations did not always provide the best results because the higher the number of used switches, the greater the losses in the switches.Consequently, a new idea was proposed to find a connection type that uses the least number of switches to decrease the losses in the switches and to obtain the maximum output power under various shading conditions.

Minimum Loss Configuration (ML)
In the simulation, four switches were used, as shown in Figure 6.There were 15 possible cases where switches were activated to obtain the configuration type that provided the maximum output power for each shading pattern.The switching of Switches 1 and 4 was defined to be equal to the BL configuration, and the switching of Switches (SW) 1, 2, 3, and 4 was equivalent to the TCT configuration.
The 15 output powers obtained from each possible case are presented in Table 5 for Shading Pattern 2 at various shading levels (100-800 W/m 2 ).It was found that the switching of Switches 1 and 3 provided the highest output power and was better than the BL and TCT configurations.Thus, the activation of Switches 1 and 3 was the ML configuration in this case.This ML gave better results than BL, although number of switches was equal (two switches).Activating Switches 1 and 3, which were in the same row, would result in an increase in voltage in the shaded module, thus increasing its power.This power was equal to that in the TCT case.It was seen that ML using two switches gave a better result than TCT, where four switches were used.For the other shaded cases (3-6), the ML was found to be different.In Case 3, ML activated SW 2 and 4. Case 4, ML only activated SW 3. Case 5 only used SW 4 to be ML.Lastly, in Case 6, ML used four switches, which is equivalent to TCT.
It can be found from Table 6 that ML provided a power output that was greater than or equal to the best configurations in Section 3.1 for every shading case because the number of switches of ML was less than that of the best configurations in Section 3.1.Therefore, the total losses of ML were less than the total losses of the best configurations in Section 3.1.When considering a 5% increase of power, in order to find the starting point of reconfiguration under each of the partial shadings shown in Figure 3, the results are presented as follows: In Case 2 (11% shaded area), the one shaded panel was on a string, and the best configuration was the switching of Switches 1 and 3, which must operate under the medium dark cloud and dark cloud where the solar radiation is less than 500 W/m 2 .
In Case 3 (22% shaded area), the two shaded panels were on the same string.The best configuration was the switching of Switches 2 and 4, which must operate under the dark cloud where the solar radiation is less than 100 W/m 2 .
In Case 4 (22% shaded area), the two shaded panels were on different strings.The best configuration was the switching of Switch 3, which must operate only under the medium dark cloud where the solar radiation is 400-500 W/m 2 .Under dark cloud, we cannot increase the power output higher than 5%.Therefore, it was unnecessary to reconfigure the solar PV array.
In Case 5 (44% shaded area), the four shaded panels were located on two strings, and each string had two shaded panels.The best configuration was the switching of Switch 4, which must operate under the dark cloud where the solar radiation is less than 300 W/m 2 .
In Case 6 (44% shaded area), the four shaded panels were located on three strings.The best configuration was the switching of Switches 1, 2, 3, and 4 (equivalent to the TCT configuration), which must operate only under the light cloud and medium dark cloud where the solar radiation is 500-700 W/m 2 .In the dark cloud situation, the power output increases insignificantly.Therefore, it was unnecessary to reconfigure the solar PV array.
It was found that, when the shaded area was the same but different in pattern, the appropriate solar radiation for reconfiguring the solar PV array was not similar, such as in Cases 3-4 and Cases 5-6.This was because the number of shaded panels on many strings resulted in a greater drop of power compared with the case when the shaded panels were in the same string.When considering the shading levels, it was found that, in most cases, the shading level under light cloud provided a slight increase in output power.So, the reconfiguration was unnecessary.At the medium dark cloud shading level, the output power could be increased by more than 5%, so a reconfiguration was necessary to reduce the shading effect.At the dark cloud shading level, Cases 2 and 5 needed to be reconfigured because the output power increase was high enough.In Cases 4 and 6, the reconfiguration produced less output power than that of SP, so a reconfiguration was unnecessary.
Thereby, when considering a reconfiguration for each partial shading case, the switching pattern was different in order to reduce the impact from loss inside the switches.The proposed configuration, ML, can provide the best output power when compared with the BL and TCT configurations.Moreover, the impact of the loss will be decreased when the solar PV capacity is higher.The output power increase from the reconfiguration will be higher as well.
The proposed ML reconfiguration can also be applied to a large-scale solar PV because all of the necessary parameters that are used in a large-scale solar PV in order to calculate the output power and to find the appropriate reconfiguration are taken into account in this simulation.In addition, we are testing this idea on a 20-PV-module system, and the results have shown similar trends.However, the power consumption of switches in a large-scale solar PV may have less of an effect on the output power compared with the effect on a small-scale solar PV.
In summary, based on the results obtained above, the ML method can be defined as the reconfiguration of switches around a shaded PV module so that the voltage level of the affected PV module can be maintained at the same level as that of the other unaffected PV strings.The reconfiguration of switches resulted in the parallel connection of the PV modules, which can provide a current distribution path through other strings.Also, by minimizing the number of switches, power loss due to the switching action can be kept to a minimum; i.e., the amount that is consumed by the connected switch.Therefore, the best possible maximum power output can be obtained.

Conclusions
The simulation of 3 × 3 solar PV modules under various shading patterns and shading levels was performed based on MATLAB/Simulink.The shading patterns of 1 in 9 PV panels (11% shaded), 2 in 9 PV panels (22% shaded), 4 in 9 PV panels (44% shaded), and 6 in 9 PV panels (66% shaded) were studied as different patterns of shading.The PV array configurations of SP, BL, and TCT for both ideal and non-ideal switches cases were simulated.From the simulation results, it was found that the output power of PV decreases when the solar radiation decreases and vice versa.We can conclude that the results obtained from MATLAB/Simulink are consistent with the theory in Section 2.1.In addition, the solar radiation level that was suitable to start reconfiguring the PV array was investigated.The results showed that the non-ideal switches cases gave less output due to the switching loss causing a power drop.However, the results were the same as those in a previous study.When the shading area was less than 50% of the total PV array area, reconfiguration can improve the output power; however, this was not true when the shaded area was more than 50% of the total PV array area.Then, a new concept of the minimization of losses in switches by minimizing the number of switches was proposed for the 3 × 3 array.There were 15 possible cases to investigate, and the ML was determined for various cases.It was found that the ML was not the same for the various cases.For a given case, ML may use 1, 2, 3, or 4 switches.Obviously, the ML configuration provided a better result than the BL and TCT configurations.In addition, a reconfiguration was needed when the shading levels were medium dark cloud and dark cloud.However, it was shown that a reconfiguration in some shading patterns is unnecessary at the dark cloud level.ML can build the path of current flow in, and maintain the voltage level of, the shaded module.Decisively, it can be concluded that the ML reconfiguration pattern is a reconfiguration that is based on operating the switches around the shaded PV module.
ML patterns vary depending on the shading pattern and the number of modules.Therefore, ML must be used in conjunction with a smart decision maker.Moreover, the reconfiguration by ML uses less switching compared with the other reconfiguration methods; thus, it can extend the switches' lives.Apart from a small-scale solar PV system, the concept of ML has also been applied preliminarily to a larger-scale solar PV of 20 modules, and a simulation using identical parameters and conditions was conducted.The results obtained agreed well with those for the small-scale solar PV.Finally, the ML method can be a versatile technique for reconfiguring switches against variety of shaded conditions regardless of the size of the solar PV system.

I
ph,ref is the photo current at the temperature T ref (A); I ph,shade is the photo current at the temperature T (A); V ref is the open circuit voltage at the temperature of 25 • C (V); V oc,new is the open circuit voltage at operating temperature (V); K I is the temperature coefficients of the current (A/ • C); K V is the temperature coefficients of the voltage; V/ • C; T ref is the reference temperature of the solar PV module (Kelvin); G ref is the reference solar radiation (1000 W/m 2 ); and G shaded is the shaded solar radiation (W/m 2 ).

Figure 4 .
Figure 4.The drop in solar radiation when shading occurs on the solar PV.

Figure 4 .
Figure 4.The drop in solar radiation when shading occurs on the solar PV.

Figure 4 .
Figure 4.The drop in solar radiation when shading occurs on the solar PV.

Figure 5 .
Figure 5.The setting of the parameters fromTable 1. Figure 5.The setting of the parameters from Table 1.

Figure 6 .
Figure 6.A 3 × 3 solar PV array and the command switch.

Figure 6 .
Figure 6.A 3 × 3 solar PV array and the command switch.

Figure 7 .
Figure 7.An example of the inside switch setting: (a) the parameter setting without loss; (b) the parameter setting with loss.

Figure 8 .
Figure 8.The power consumption required to command the switch [26].

Figure 7 .
Figure 7.An example of the inside switch setting: (a) the parameter setting without loss; (b) the parameter setting with loss.

Figure 7 .
Figure 7.An example of the inside switch setting: (a) the parameter setting without loss; (b) the parameter setting with loss.

Figure 8 .
Figure 8.The power consumption required to command the switch [26].Figure 8.The power consumption required to command the switch [26].

Figure 8 .
Figure 8.The power consumption required to command the switch [26].Figure 8.The power consumption required to command the switch [26].

Figure 9 .
Figure 9.An example of the operation and power consumption of a relay switch [27].

Figure 9 .
Figure 9.An example of the operation and power consumption of a relay switch [27].
is the electron charge, which is 1.602 × 10 −19 Coulombs; K is the Boltzmann constant, which is 1.3806504 × 10 −23 J/K; T is the operating temperature of the solar PV module (Kelvin); n is the ideality factor of the diode; and N s is the number of cells per module. q

Table 1 .
The characteristics of a 20 W, poly-crystalline-type solar PV.

Table 1 .
Figure 5.The setting of the parameters from Table 1.

Table 3 .
The output power from the solar PV configurations for Case 2 (11% shaded).

Table 4 .
The difference in output power from reconfiguring SP to BL and TCT for the non-ideal switch cases.

Table 5 .
The output power from the solar PV configurations when shaded in Case 2.

Table 6 .
A comparison of the difference in the power of the solar PV between ML and the best configurations in Section 3.1 under various partial shadings.