13154 FACTA UNIVERSITATIS Series: Electronics and Energetics Vol. 38, No 2, June 2025, pp. 337 - 353 https://doi.org/10.2298/FUEE2502337K © 2025 by University of Niš, Serbia | Creative Commons License: CC BY-NC-ND Original scientific paper OPTIMAL PLACEMENT OF BYPASS DIODES IN PV MODULES FOR ENERGY PRODUCTION IMPROVEMENT UNDER PARTIAL SHADING CONDITIONS Nikola Krstić1, Dragan Tasić1, Dardan Klimenta2 1University of Niš, Faculty of Electronic Engineering, Niš, Serbia 2University of Priština in Kosovska Mitrovica, Faculty of Technical Sciences, Kosovska Mitrovica, Serbia ORCID iDs: Nikola Krstić https://orcid.org/0000-0003-2872-3190 Dragan Tasić https://orcid.org/0000-0001-5957-9617 Dardan Klimenta https://orcid.org/0000-0003-0019-8371 Abstract. This paper determines the optimal placement of bypass diodes in photovoltaic (PV) modules to increase their energy production in the case of partial shading while protecting each PV cell from overheating. Within the optimal placement, the optimal number and the optimal locations of bypass diodes are obtained using the metaheuristic optimization method of genetic algorithm (GA). The optimization method finds the optimal solution by maximizing the power of the maximum power point (MPP) on the power-voltage (P-V) characteristics generated from the created model of the PV module under partial shading. This model is created using the five-parameter single-diode PV cell model and allows the implementation of different shading patterns and different locations of bypass diodes in the PV modules. To simulate the effects of static and dynamic shading of the PV module surface, horizontal, vertical, diagonal, and random shading patterns are used. The obtained results show that the optimal placement of bypass diodes in PV modules can significantly increase their energy production, especially for the cases with low solar irradiance of the shaded PV cells. This energy increment is between 30% and 80 % depending on the shading pattern, when the solar irradiance of the shaded PV cells is 70 % reduced compared to the unshaded cells. Key words: bypass diode, partial shading, PV module, genetic algorithm (GA), shading pattern 1. INTRODUCTION Solar energy is one of the most important renewables, and certainly a necessary part in energy transition to green technologies. This is primarily due to the great energy potential of solar irradiance which can be directly converted into electricity using PV modules [1]. During Received October 28, 2024; revised December 16, 2024; accepted December 22, 2024 Corresponding author: Nikola Krstić University of Niš, Faculty of Electronic Engineering, Niš, Serbia E-mail: nikola.krstic@elfak.ni.ac.rs https://orcid.org/0000-0003-2872-3190 https://orcid.org/0000-0001-5957-9617 https://orcid.org/0000-0003-0019-8371 338 N. KRSTIĆ, D. TASIĆ, D. KLIMENTA their operation, the PV module surface can be partially shaded by nearby objects (static shading) or by clouds (dynamic shading), decreasing the solar irradiance on it [2]. The amount of electric power generated by the PV modules is proportional to the intensity of solar irradiance, which is the main reason why partial shading harms the PV module energy production [3]. Partial shading not only decreases the intensity of solar irradiance on the PV module surface but also makes it unevenly distributed which decreases the operating performances and generated power of the PV modules [4]. The main reason for this degradation of performances is that PV cells in PV modules are connected in series to achieve the required output voltage, so the shaded PV cells with lower photocurrent are limiting the current flowing through the unshaded cells [5]. To overcome this problem diodes are connected in parallel with PV cells offering the path for current that is flowing from the unshaded to the shaded PV cell [6]. Taking into account their function of bypassing the shaded PV cells these diodes are called bypass diodes. In addition to the increase of power generation of the PV module [7], bypass diodes protect the shaded PV cells from overheating by not allowing them to enter in reverse bias. In the literature, there are a lot of papers covering the improvement of the PV module operation in the case of partial shading [8] by finding the optimal position (determining the optimal tilt and azimuth angle), developing new enhanced MPP tracking algorithms [9-11], or in recent years by proposing new more efficient layouts and topologies for PV modules [12]. However, there are very few papers that consider the impact of bypass diodes on the operation of the PV modules [13-14], and practically none deal with their optimal placement in the PV module under partial shading [15]. In other words, previous research has been more focused on the general benefits and contributions of bypass diodes on the operation of the PV modules in partial shading conditions, and less on their optimal placement in the module, neglecting the energy generation improvement that can be achieved in this way. Also, the papers that optimize the configuration of the bypass diodes in the PV modules use different approaches which usually are not based on metaheuristics [16-17]. Having that in mind this paper considers the improvement of the PV module energy production under partial shading using the optimal placement of bypass diodes [15]. The basic idea behind the proposed optimization is that different shading patterns require different paths for current in the PV module, so different locations of bypass diodes are needed. Considering that bypass diodes can be connected to one or a group of PV cells room for optimization appears, especially when different shading patterns take place [6]. To determine the optimal placement (number and locations) of the bypass diodes metaheuristic optimization method of GA is used [8]. The main goal of the optimization method is to maximize the energy production output of the PV array, while simultaneously protecting each PV cell from overheating. To determine the quality of the proposed solution GA maximizes the energy output of the PV module using the power of the MPP (it is assumed that the PV module operates in the MPP at all times). This MPP is derived from the P-V characteristic of the created model of the PV module under partial shading for different shading patterns [18]. The model of the PV module is flexible and allows the placement of bypass diodes in different locations [19]. It is created based on the five-parameter single-diode PV cell model [18], in which a partial shading effect is included by reducing the photocurrent of the shaded cell. Although the uneven distribution of solar irradiation on the surface of the PV modules is considered in this paper the temperature of each PV cell in the module is assumed to be the same. During the Optimal Placement of Bypass Diodes in PV Modules for Energy Production Improvement Under... 339 exploitation, PV modules are often exposed to combined effects of static and dynamic shading of their surfaces, for this reason, horizontal, vertical, diagonal, and random shading patterns [5] are used when generating results. To see the energy production improvement obtained results are compared with those generated for the standard PV module configuration with 3 bypass diodes. 2. MODEL OF THE PV MODULE UNDER PARTIAL SHADING The first step in creating the model of the PV module under partial shading is to model the PV cell as the basic building unit from which the PV module is composed. For this purpose, the five-parameter single-diode model of the PV cell, shown in Fig. 1, is used. Fig. 1 Electric circuit of the five-parameter single-diode model of the PV cell Considering the I-V characteristic of the diode and the topology of the electric circuit in Fig. 1, the I-V characteristic of the PV cell is: 0 exp 1C C S C C S C ph T sh V I R V I R I I I aV R   + + = − − −       (1) From (1) it can be seen that the dependency between PV cell current (IC) and the PV cell voltage (VC) is a function of five parameters, from which the model got its name, and that are: photocurrent of the PV cell (Iph), diode inverse saturation current (I0), diode ideality constant (a), internal series resistance (RS), and internal shunt resistance (Rsh) of the PV cell. Also, in (1) VT is the thermal voltage through which the impact of temperature on the I-V characteristic of the PV cell is achieved and that is calculated using (2): /TV kT q= (2) In (2) T is the temperature, k is the Boltzmann constant and q is the absolute elementary charge. Taking into account that shading reduces the solar irradiance on the surface of the PV cell, the impact of the shading effect on the I-V characteristic of the shaded PV cell is included by reducing the value of the photocurrent: 0 0 ph ph G I I G = (3) Where G is the solar irradiance of the shaded PV cell, while G0 and Iph0 are the solar irradiance and photocurrent of the unshaded PV cell. 340 N. KRSTIĆ, D. TASIĆ, D. KLIMENTA The second step in modeling the PV module under partial shading is to model the bypass diodes. In this paper, the PV module is composed of PV cells connected in series. To reduce the negative effects of partial shading a PV cell or a group of PV cells in the module have a bypass diode connected in parallel and oriented in the opposite direction to the PV cell diode. The I-V characteristic of the bypass diode is given by the expression: 0 exp 1bd bd bd bd T V I I a V    = −       (4) As can be seen from (4), the dependency between the current (Ibd) and voltage (Vbd) of the bypass diode is the same as in regular diodes, where I0bd is the inverse saturation current, and abd is the ideality constant of the bypass diode. Taking into account the topology of the PV module and the existence of the bypass diodes, the current of the module (Im) is equal to the sum of the PV cell current and the current of the bypass diode connected to that PV cell (4). The voltage of the PV module is the sum of the PV cell voltages or the sum of the voltages on the bypass diodes (6) because every PV cell in the module must be protected individually or as a part of a group by a bypass diode. m c bdI I I= + (5) 1 1 C bdN N m ci bdji j V V V = = = =  (6) In (6) Nc is the number of PV cells and Nbd is the number of bypass diodes in the PV module. The bypass diode starts to conduct when the current of the PV module is greater than the photocurrent of the PV cell protected by that bypass diode. When turned on, the current of the bypass diode is equal to the difference between the current of the module and the photocurrent of the PV cell with minimal solar irradiance within the group of PV cells protected by that bypass diode. bd m phminI I I= − (7) Using the current of the bypass diode from (7), the voltage of the bypass diode can be found considering the I-V characteristic given in (4). 3. DEFINING THE OPTIMIZATION PROBLEM Finding the optimal locations of bypass diodes in PV modules, for energy production improvement under partial shading, is a nonlinear optimization problem with constraints. The main constraint that exists is that the placement of bypass diodes must protect each PV cell from overheating. This constraint includes two limitations: 1. Each PV cell, individually or as a part of a group, must have a bypass diode connected in parallel for protection. 2. The number of PV cells protected by one bypass diode (the number of PV cells in a group) must be limited to achieve safe operation of the shaded cells, for every case of partial shading. The limitation in the number of PV cells protected by one bypass diode exists to limit the reverse voltage that appears on the shaded cells, not allowing it to reach the reverse Optimal Placement of Bypass Diodes in PV Modules for Energy Production Improvement Under... 341 breakdown voltage of the PV cell. In other words, if the number of PV cells protected by one bypass diode is too large, the most shaded PV cell will reach the reverse breakdown voltage and overheat before the bypass diode starts to conduct (as there is no protection from the bypass diode). Taking into account that a group of PV cells has the same voltage as the bypass diode and that only the most shaded PV cell has the voltage in the opposite direction compared to other PV cells in a group, the value of reverse voltage (Vr) that appears on the most shaded PV cell can be calculated as: ( 1)r bdON cg ocV V c N V= +  −  (8) where, VbdON is the voltage of the bypass diode when it starts to conduct (triggering voltage placed in the knee of the I-V characteristic), Voc is the open circuit voltage of the PV cell, c is the correction factor that respects the difference between operating and open circuit voltage (has a value between 0.85 and 1) and Ncg is the number of PV cells in a group. Considering (8), the maximum number of PV cells in a group (Nmax) can be determined as: 1rBD bdON cgmax OC V V N c V − = +  (9) In (9) VrBD is the reverse breakdown voltage of the PV cell. Considering the given constraint by which the PV cells are protected from overheating the placement of bypass diodes must be organized in the following manner: The second connection point of the previous bypass diode is the first connection point of the next bypass diode, covering every PV cell in the PV module. Control variables in this optimization problem are the number of bypass diodes and the location of their connection points in the PV module. The constraint of the number of bypass diodes in the PV module is given in (10), while the constraints of the locations of the first (i) and second (j) connection points of bypass diodes are defined in (11) and (12): c c bd cgmax N N N N   (10) 1 11, 1, , 2,3... bdN C k k bdi j N i j k N−= = + = = (11) , 1,2,3...k k cgmax bdj i N k N−  = (12) In this way, the first coordinate in the vector of control variables is the number of bypass diodes and the other coordinates are the locations (indexes of PV cells in the PV module in front of which the bypass diodes are connected) of the second connection points of each bypass diode except the last one, which is always located at the end of the module. In this way, the total number of coordinates in the vector of control variables is equal to the number of bypass diodes. The main goal of the optimization process is to maximize the energy production of the PV module under partial shading. Taking into account that different shading patterns may occur on the surface of the PV module, the criterion function (C) must be defined using the energy produced by the PV module (Wm) in the considered period: mC W= − (13) The minus sign appears in (13) so that minimization of the criterion function would lead to the optimal solution (solution in which the PV module produces the highest amount of energy). 342 N. KRSTIĆ, D. TASIĆ, D. KLIMENTA Although the partial shading changes the shape of the P-V characteristic of the PV module, it is assumed that it operates in the MPP at any given moment. The assumption of PV module operating in the MPP all the time is made to quantify the energy benefits that could be created by the optimal placement of bypass diodes in PV modules in partial shading conditions, which otherwise would depend on the efficiency of the used MPP tracking algorithm. This means that produced energy from (13) can be calculated using the power of the MPP on the P-V characteristic of each part of the considered period as: 1 n m mMPPi ii W P t = =  (14) Where PmMPPi is the power of the MPP of the PV module and Δti is the time interval of the i-th period, while n is the number of different shading patterns that appear in the considered period. The implementation of the optimization method is such that it prioritizes the solution with a lower number of bypass diodes if there are more solutions with the same value of the criterion function. 4. SOLVING THE OPTIMIZATION PROBLEM The metaheuristic optimization method of GA is used to solve the optimization problem and find the optimal placement of bypass diodes in the PV modules to increase their energy production under partial shading. The flowchart of the proposed approach is shown in Fig. 2. Fig. 2 Flowchart of the proposed approach for finding the optimal placement of bypass diodes in the PV module Optimal Placement of Bypass Diodes in PV Modules for Energy Production Improvement Under... 343 4.1. Genetic Algorithm GA is a population-based optimization method, inspired by the process of evolution in nature, in which more capable and adaptable individuals have a greater chance to pass on their genetic material. Each individual is described with the vector of control variables and the value of the criterion function, first representing the genetic material and the second its quality. The first step in this optimization method is the selection of pairs for mating, where individuals with lower values of criterion function have a greater chance to be selected. This is done by randomly choosing the individuals from the genetic pool in which more suitable individuals have a greater presence. After choosing pairs for mating the second step of the GA takes place in which the crossing of genes is performed. In this step, the next generation of individuals is created which most likely has better genetic material and thus is closer to the optimal solution. The third and final step of GA mimics the process of mutation in which with a certain probability the genetic material of individuals in a population is randomly changed. The main function of the mutation process is to create genetic diversity in a population, representing a mechanism in the optimization method for escaping the local optimum. During these steps the quality of genetic material of each next generation is increasing, while the value of the criterion function of individuals is decreasing. These three steps are repeated the required number of times until the change in the value of the criterion function of the best individual is negligible. 4.2. Implementation of GA in the Optimization Problem GA is a very flexible metaheuristic optimization method, easy to implement on various optimization problems. In this paper, the first step of the GA is implemented so the probability (Pi) that marks the presence of the individual in the genetic pool based on their criterion function (Ci) is determined as: 1 (%) 100% i i i N jj c P c = =   (15) Where Ni is the number of the fittest individuals in the generation that are going into the genetic pool and thus can be chosen for mating. In the second step, the crossing is achieved so that the even coordinates in the vector of control variables are inherited from one and the odd coordinates from the other parent. 1( ) ( ), 1,3,..., 1k k p i coX t X t t n+ = = − (16) 1( ) ( ), 2,4,...,k k p i coX t X t t n+ = = (17) In (16) and (17) 1k pX + is the vector of control variables of pth individual (offspring) from the k + 1-th generation (iteration), while the k iX and k jX are the vectors of control variables of its parents (individuals from k-th generation), and nco is the number of coordinates of the vector of control variables of the individual from the next generation (offspring). Also, in (16) and (17) the first coordinate represents the number of bypass diodes, while the other coordinates are their locations, one for each bypass diode, except the last one, whose second connection point is located at the end of the PV module. It is important to note that in the case where the 344 N. KRSTIĆ, D. TASIĆ, D. KLIMENTA offspring inherits the number of the bypass diodes from the parent that has a greater number of coordinates, the content on those additional coordinates is directly inherited by the offspring. The process of mutation is implemented to change (increase or decrease) the genetic material of the individuals (number and locations of bypass diodes) by one. The probability of mutation to happen is determined by the mutation rate (p), which in this paper is linearly increasing by the iterations (k) from the minimum to the maximum value: ( ) ( 1) 1 max min min k p p p k p k N − = +  − − (18) Where Nk is the total number of iterations. 5. DETERMINING THE VALUES OF THE PARAMETERS USED IN THE SIMULATIONS The parameters needed for running the simulations and generating results consist of the parameters in the model of the PV module under partial shading, parameters of the optimization method, and the parameters for the shading patterns. The parameters used in the model of the PV module, are the parameters of the PV cell model whose values need to be determined. These five unknown parameters in the PV cell model are obtained considering the characteristic operation modes of the PV cell (open circuit, short circuit, and operation in the MPP), using the I-V characteristic from (1). Also, it is assumed that the losses in the PV cell in the short circuit are three times greater than the losses in the open circuit operation mode. The value used for this ratio is determined based on the values of the single-diode model parameters used in [20]. The ideality constant of the PV cell has a value of 1.3, which is a value from a common range for this parameter that is between 1 and 2. Taking this into account, the four nonlinear equations can be formed: ( ,0) 0c ocI V = (19) (0, ) 1c scI I = (20) , oc sc c c c MPP MPP MPP V I FF FF I V V V    =    (21) 2 2 3 oc sc S sh V I R R  =  (22) The parameters in the PV cell model are expressed in relative units, where the open circuit voltage (Voc) and short circuit current (Isc) are the base units equal to 1 p.u, while the values of the voltage of the MPP and the fill factor are VMPP = 0.815 and FFC = 0.76. The non-linear system of equations (19)-(22) is solved using the Newton-Raphson iterative method, and the values of PV cell parameters are found: Iph = 1, I0 = 4.914 · 10-10, RS = 0.0596, and Rsh = 50.289 p.u. The configuration of the PV module considered in this paper is such that it is composed of 36 PV cells connected in series, located in six rows and six columns. It is important to note that PV cells in the PV module are connected vertically (Figures 3, 4, and 5). The number and the locations of bypass diodes in the PV modules are determined using the optimization method of GA. Optimal Placement of Bypass Diodes in PV Modules for Energy Production Improvement Under... 345 The optimization method is applied to a population of 100 individuals and the solution to the optimization problem is obtained after 50 iterations. Values of the parameters required for the implementation of GA are: the number of individuals who are allowed to go into the genetic pool is 15% of all individuals in the population (Ni = 15), minimum and maximum values of the mutation rate are pmin = 15 % and pmax = 35 %. The partial shading of the PV module is included using four different shading patterns: horizontal, vertical, diagonal, and random shading pattern. The first three shading patterns (horizontal, vertical, and diagonal) are modeled to create two different shades on the surface of the PV module during their existence. In the case of the horizontal shading pattern, the first shade covers one row of the PV cells in the PV module and the second shade covers two, as shown in Figure 3. Fig. 3 The surface of the PV module with a horizontal shading pattern The same analogy is used for the vertical shading pattern, where columns of PV cells are shaded, instead of rows, Figure 4. The shading surface of the diagonal shading pattern has Fig. 4 The surface of the PV module with a vertical shading pattern 346 N. KRSTIĆ, D. TASIĆ, D. KLIMENTA a triangular shape and covers PV cells located in the corner of the PV module. In this case, the first shade covers three and the second shade covers ten PV cells, as can be seen in Figure 5. Because of the huge variety of possibilities in the case of the random shading pattern, three different cases are considered. In the first case, the shade on the surface of the PV module changes 2 times in the observation period, in the second case 10 times, and 50 times in the third case, where each shade lasts the same time. Fig. 5 The surface of the PV module with a diagonal shading pattern Two different levels of shade are considered for the horizontal, vertical, and diagonal shading patterns. In the first case, the shaded PV cells have 40 %, and in the second 70 % of the solar irradiance of the unshaded PV cells. For the random shading pattern solar irradiance of each PV cell has a random value between 20 and 80 %. In all considered cases of partial shading, the maximum number of PV cells that one bypass diode can protect is 12 and the solar irradiance of the unshaded PV cells has the same value during the entire observation period. Also, it is important to note that the I-V characteristic of the bypass diode has the same parameter values as the I-V characteristic of the diode in the PV cell model. 6. RESULTS AND DISCUSSION The results shown in Tables 1, 2, and 3 are the results obtained for the horizontal, vertical, and diagonal shading patterns, respectively. These tables contain the number and locations of the bypass diodes, as well as the average powers generated by the PV module. To compare and evaluate the improvement of the average power obtained in the case of the optimal placement of the bypass diodes (Pavr) in the PV module, the average power of the PV module with 3 bypass diodes (Pavr_3), generated in the same conditions, is also shown in Tables 1, 2, and 3. The power generated by the PV module with 3 bypass diodes (each protecting 12 PV cells) is used as a reference for comparison because this configuration of the PV module is the standard one. Optimal Placement of Bypass Diodes in PV Modules for Energy Production Improvement Under... 347 Table 1 The optimal number and location of bypass diodes and the generated average powers of the PV module with and without optimal placement in the case of a horizontal shading pattern SP H1 H2 H1+2 Pavr_3 0.259462 (0.591937) 0.247915 (0.573705) 0.253688 (0.582821) Pavr 0.476175 (0.591937) 0.351390 (0.573705) 0.362045 (0.582821) Nbd 18 (3) 12 (3) 18 (3) Loc. 1 2 (13) 3 (13) 2 (13) Loc. 2 3 (25) 7 (25) 3 (25) Loc. 3 7 (-) 9 (-) 7 (-) Loc. 4 8 (-) 13 (-) 8 (-) Loc. 5 9 (-) 15 (-) 9 (-) Loc. 6 13 (-) 19 (-) 13 (-) Loc. 7 14 (-) 21 (-) 14 (-) Loc. 8 15 (-) 25 (-) 15 (-) Loc. 9 19 (-) 27 (-) 19 (-) Loc. 10 20 (-) 31 (-) 20 (-) Loc .11 21 (-) 33 (-) 21 (-) Loc. 12 25 (-) - (-) 25 (-) Loc. 13 26 (-) - (-) 26 (-) Loc. 14 27 (-) - (-) 27 (-) Loc. 15 31 (-) - (-) 31 (-) Loc. 16 32 (-) - (-) 32 (-) Loc. 17 33 (-) - (-) 33 (-) It is important to note that the average power shown in Tables 1, 2, 3, and 4 is the average maximum power of the PV module considering that it is assumed that the PV module operates in the MPP at every moment and that the shading pattern (horizontal, vertical and diagonal) consists of two different shades. Having that in mind, the first column of Tables 1, 2, and 3 contains the results obtained for the first shade in the shading patterns, the second column shows the results referring to the second shade, and in the third column of Tables 1, 2, and 3 are the results generated in the case where the first and the second shade are present on the PV module surface for the same time. Table 2 The optimal number and location of bypass diodes and the generated average powers of the PV module with and without optimal placement in the case of a vertical shading pattern SP V1 V2 V1+2 Pavr_3 0.475345 (0.591937) 0.475345 (0.573705) 0.475345 (0.582821) Pavr 0.600600 (0.601617) 0.475345 (0.573705) 0.525455 (0.587661) Nbd 4 (4) 3 (3) 4 (4) Loc. 1 7 (7) 13 (13) 7 (7) Loc. 2 13 (13) 25 (25) 13 (13) Loc. 3 25 (25) - (-) 25 (13) 348 N. KRSTIĆ, D. TASIĆ, D. KLIMENTA Table 3 The optimal number and location of bypass diodes and the generated average powers of the PV module with and without optimal placement in the case of a diagonal shading pattern SP D1 D2 D1+2 Pavr_3 0.475345 (0.602685) 0.251553 (0.579643) 0.363447 (0.591162) Pavr 0.638011 (0.640442) 0.442324 (0.579643) 0.515516 (0.610041) Nbd 6 (6) 9 (3) 11 (6) Loc. 1 13 (13) 13 (13) 13 (13) Loc. 2 25 (25) 14 (25) 14 (25) Loc. 3 26 (26) 19 (-) 19 (26) Loc. 4 31 (31) 21 (-) 21 (31) Loc. 5 33 (33) 25 (-) 25 (33) Loc. 6 - (-) 28 (-) 26 (-) Loc. 7 - (-) 31 (-) 28 (-) Loc. 8 - (-) 35 (-) 31 (-) Loc. 9 - (-) - (-) 33 (-) Loc. 10 - (-) - (-) 35 (-) Locations of bypass diodes shown in Tables 1, 2, and 3 are the ordinal numbers of PV cells (Figures 3, 4, and 5) in front of which the second connection point of the bypass diode is located. The location of the second connection point of the last bypass diode is not shown in Tables 1, 2, and 3 because it is always behind the last PV cell in the module (index 37). Also, in Tables 1, 2, and 3 values in brackets refer to the case where the solar irradiance of the shaded PV cells is 70%, and values without brackets are obtained for the case where solar irradiance is 30% of the solar irradiance of the unshaded PV cells. It is important to note that the average power of the PV module shown in the results is expressed per unit, where the base unit is the product of open circuit voltage and short circuit current in the case without partial shading (without partial shading the power of the MPP of the PV module has the value of the fill factor of the PV cell PMPP0 = FFc = 0.76 p.u.). From Tables 1, 2, and 3 it can be seen that the average power generated by the PV module in the case of the optimal placement of bypass diodes is greater than the average power of the module with the standard configuration of the bypass diodes. This improvement in energy production is more significant in the case with lower solar irradiance of the shaded PV cells (30% of the solar irradiance of the unshaded PV cells). The reason for this is that the location of the MPP of the PV module changes with the reduction of solar irradiance. If the decrease in the solar irradiance of the shaded PV cells is not so great then the reduction of the current of the PV module will be lower than the reduction of the voltage of the module if bypass diodes start to conduct, in this case, the MPP will be located in a high voltage area (as there are no bypass diodes). Otherwise, if a decrease in solar irradiance of the shaded PV cells is significant then the reduction of the voltage of the PV module, if bypass diodes start to conduct, will be lower than the reduction of current, if bypass diodes are not turned on, locating the MPP of the PV module in lower voltage areas. Taking this into account, and the fact that GA minimizes the number of bypass diodes if that does not reduce the produced energy of the PV module, it is clear why in some cases when the solar irradiance of the shaded PV cells is 70% the optimal placement of bypass diodes in the PV module is the Optimal Placement of Bypass Diodes in PV Modules for Energy Production Improvement Under... 349 same as in standard configuration with 3 bypass diodes (the number and location of bypass diodes are irrelevant because they do not conduct current when module operates in the MPP). Also, results in Tables 1, 2, and 3 show that the optimal number and location of the bypass diodes are greatly affected by the shading pattern of the PV module. Analyzing the optimal locations of the bypass diodes in Tables 1, 2, and 3 it can be seen that GA placed bypass diodes to separate shaded from unshaded PV cells. This can be explained by the fact that the voltage generated by the unshaded PV cell will be lost if it is bypassed by the diode, which will not be turned on if all the PV cells in a group are unshaded. Considering this, it is clear why the optimal number of bypass diodes is highest in the horizontal and lowest in the vertical shading pattern. The average powers of the PV module obtained in the case of the random shading pattern for the different number of bypass diodes (3, 6, 9, 12, 18, and 36) in the PV module are shown in Table 4. The first column of this Table refers to the case where shade within the random shading pattern changes two times, in the second column shade changes 10 times, and the third column refers to the case where a random shading pattern consists of 50 different shades. This is done to simulate different dynamics of shading the PV module’s surface. Taking into account that in this shading pattern, the shape and the intensity of shade are random (solar irradiance of each PV cell is assumed to have a random value between 20% and 80%) there is not much sense for the optimal location of bypass diodes, so they are evenly distributed along the PV module, each protecting the same number of PV cells. Table 4 The average power generated by the PV module with 3, 6, 9, 12, 18, and 36 bypass diodes in the case of a random shading pattern SP R_2 R_10 R_50 Pavr_3 0,188651 0,182620 0,185346 Pavr_6 0,188651 0,182620 0,185666 Pavr_9 0,189662 0,183853 0,187604 Pavr_12 0,191286 0,187084 0,190749 Pavr_18 0,193257 0,190336 0,194517 Pavr_36 0,204865 0,196086 0,206428 From Table 4 it can be seen that the average power of the PV module increases by 10% if the number of bypass diodes rises from 3 to 36 (each PV cell has the bypass diode), regardless of the number of shades in the random shading pattern. The reason for the low values of the average powers of the PV module, for this shading pattern, is the lower limit for solar irradiance of the PV cells, which is only 20%. The results from Table 4 can be explained by the fact that increasing the number of bypass diodes increases the possible paths for current in the PV module, which has a positive effect in the case of dynamic and unpredictable shading. Figures 6, 7, and 8 show the P-V characteristics of the PV module in the case of a horizontal, vertical, and diagonal shading pattern, respectively, with and without optimal placement of bypass diodes in the PV module. In the case without optimal placement, the PV module has the standard configuration with 3 bypass diodes. 350 N. KRSTIĆ, D. TASIĆ, D. KLIMENTA Fig. 6 Power of the PV module with and without optimal placement of bypass diodes under a horizontal shading pattern with two levels of shade The P-V characteristics in Figures 6, 7, and 8 are generated using the first shade of the mentioned shading patterns (shading patterns H1, V1, and D1 in Tables), for the cases where solar irradiance of the shaded PV cells are 30% and 70% of the solar irradiance of the unshaded PV cells. Fig. 7 Power of the PV module with and without optimal placement of bypass diodes under a vertical shading pattern with two levels of shade Optimal Placement of Bypass Diodes in PV Modules for Energy Production Improvement Under... 351 Fig. 8 Power of the PV module with and without optimal placement of bypass diodes under a diagonal shading pattern with two levels of shade Figures 6, 7, and 8 show that the optimal placement of the bypass diodes changes the P- V characteristic of the PV module, achieving higher power in the MPP. Based on Figures 6, 7, and 8 it can be seen that the P-V curve of the PV module has two characteristic local optimums. One local optimum is located in lower voltages (when bypass diodes are turned on), and the other optimum is located in a high voltage area (when bypass diodes are not conducting current and the current of the module is limited with the current of the shaded PV cell). As can be seen from Figures 6, 7, and 8 when the solar irradiance is reduced, the power of the first local optimum is increased becoming the global optimum, and the power of the other optimum is decreasing becoming the local optimum. Figure 9 represents the P-V characteristics of the PV module in the case of a random shading pattern. The P-V characteristics are obtained for the cases of 3, 12, and 36 bypass diodes uniformly distributed among the PV cells in the PV module. Fig. 9 Power of the PV module with 3, 12, and 36 bypass diodes under a random shading pattern 352 N. KRSTIĆ, D. TASIĆ, D. KLIMENTA Figure 9 shows, that in the case of a random shading pattern, a greater number of bypass diodes creates more distorted P-V characteristics with many small local optimums and slightly higher global optimum. Also, it is important to note that the explanation for the negative power on the PV module’s P-V characteristics shown in Figures 6, 7, 8, and 9 lies in the fact that 1 p.u. voltage refers to the open circuit voltage of the unshaded PV module. The shaded PV module has a lower open circuit voltage, depending on the solar irradiance reduction, resulting in negative currents and powers for voltage close to 1 p.u. 7. CONCLUSION This paper proposes an approach for the optimal placement of bypass diodes in the PV module under partial shading to increase the module’s energy production. The results show that the PV module’s energy production under partial shading can be significantly increased, especially for horizontal and diagonal shading patterns, if the bypass diodes are optimally placed. The optimal number and the optimal locations of bypass diodes in the PV module, determined by the metaheuristics of GA, prove to perform classification of the PV cells on groups of shaded and unshaded PV cells. Also, the obtained results show that the optimal placement of bypass diodes in the PV module has a greater impact on the energy production improvement if solar irradiance of the shaded PV cells has low values. This energy increment is between 30% and 80 % depending on the shading pattern, when the solar irradiance of the shaded PV cells is 70 % reduced compared to the unshaded cells. In the case of unpredictable and stochastic shading of the PV module surface (random shading pattern), the optimal placement of bypass diodes does not have much effect on the improvement of the PV module energy production and only benefit comes from increasing the number of bypass diodes (ideally each PV cell has one bypass diode). Acknowledgment: This paper was supported by the Ministry of Science, Technological Development and Innovation of the Republic of Serbia [grant number 451-03-65/2024-03/200102]. REFERENCES [1] J. Mikulović and Ž. Đurišić, Solarna energetika, Beograd, Akademska misao, 2019. [2] N. Klasen, F. Lux, J. Weber, T. Roessler and A. Kraft, "A Comprehensive Study of Module Layouts for Silicon Solar Cells Under Partial Shading", IEEE J. Photovolt., vol. 12, no. 2, pp. 546-556, 2022. [3] F. Bayrak, G. Erturk and H. Oztop, "Effects of partial shading on energy and energy efficiencies for photovoltaic panels", J. Clean. Prod., vol. 164, pp. 58-69, 2017. [4] H. Zair, B. Asaei, S. Farhangi, M. Korevaar and M. Zeman, "Quantification of Shading Tolerability for Photovoltaic Modules", IEEE J. Photovolt., vol. 7, no. 5, pp. 1390-1399, 2017. [5] C. Saiprakash, A. Mohapatra, T. Sudhakar Babu and H. Haes Alhelou, "A Novel Benzene Structured Array Configuration for Harnessing Maximum Power from PV Array Under Partial Shading Condition with Reduced Number of Cross Ties", IEEE Access, vol. 10, pp. 129712-129726, 2022. [6] Z. Abdelaziz, A. Mohammedi, D. Fares, M. Nasser-eddine and D. Rekioua, "Investigation and Analysis of Different Solar Photovoltaic Array Configurations with and without Bypass Diodes Under Various Partial Shading Conditions", In Proceedings of the 6th International Conference on Advances in Mechanical Engineering, Turkey, October 2021, pp. 1-8. Optimal Placement of Bypass Diodes in PV Modules for Energy Production Improvement Under... 353 [7] K. Singh, T. Afrin Chandel, K. Siddiqui and A. Mallick, "Effect of Bypass Diode under Partial Shading in SPV Module", Int. J. Eng. Adv. Technol. (IJEAT), vol. 8, no. 5, pp. 2215-2219, 2019. [8] M. Mohamed, A. Zaki Diab and H. Rezk, "Partial Shading Mitigation of PV Systems via Different Meta- Heuristic Techniques", Renew. Energy, vol. 130, pp. 1159-1175, 2019. [9] J. Li, Y. Wu, S. Ma, M. Chen, B. Zhang and B. Jiang, "Analysis of Photovoltaic Array Maximum Power Point Tracking Under Uniform Environmental and Partial Shading Condition: A Review", Energy Reports, vol. 8, pp. 13235-13252, 2022. [10] B. Yang, T. Zhu, J. Wang, H. Shu, T. Yu, X. Zhang, W. Yao and L. Sun, "Comprehensive Overview of Maximum Power Point Tracking Algorithms of PV System Under Partial Shading Condition", J. Clean. Prod., vol. 268, p. 121983, Sept. 2020. [11] H. Ouatman and N. Boutammachte, "A Genetic Algorithm Approach for Flexible Power Point Tracking in Partial Shading Conditions", Results Eng., vol. 24, p. 102940, 2024. [12] S. Ganesan, P. Winston David, P. Kumar Balachandran and I. Colak, "Power Enhancement in PV Arrays Under Partial Shaded Conditions with Different Array Configurations", Heliyon, vol. 10, no. 4, p. e23992, 2024. [13] A. Tarabsheh, M. Akmal and M. Ghazal, "Improving the Efficiency of Partially Shaded Photovoltaic Modules without Bypass Diodes", Electronics, vol. 10, no 9. p. 1046, 2021. [14] S. Saha, S. Akter, K. Mahto, P. Das, A. Chakraborty and G. Awasthi, "Improvement in Power Efficiency of Photovoltaic Array Under Shading Conditions Using Bypass Diode", Int. J. Renew. Energy Res., vol. 6, no. 2, pp. 628-636, 2016. [15] M. Duong, G. Sava, G. Ionescu, H. Necula, S. Leva and M. Mussetta, "Optimal Bypass Diode Configuration for PV Arrays Under Shading Influence", In Proceedings of International Conference on Environment and Electrical Engineering and Industrial and Commercial Power Systems Europe (EEEIC/I&CPS Europe), Milano, Italy, June 2017, pp. 1-5. [16] T. Yu, Y. Hung, Y. Lin, C. Chen and Y. Liou, "Optimal Configuration of Bypass Diodes for a High- Concentration Photovoltaic System", In Proceedings of the 5th International Conference on Electrical Engineering and Automatic Control. Lecture Notes in Electrical Engineering, vol 367. Springer, Berlin, Heidelberg, 2016, pp 845-856. [17] S. Li, X. Zhang, D. Xie and W. Zhao, "Research on Optimal Configurations of Bypass Diodes in PV Module Under Shading Conditions", Taiyangneng Xuebao/Acta Energiae Solaris Sinica, vol. 34, pp. 1768-1774, 2013. [18] M. F. Jalil, S. Khatoon, I. Nasiruddin and R. C. Bansal, "Review of PV Array Modeling, Configuration and MPPT Techniques", Int. J. Model. Simul., vol. 42, no. 4, pp. 533-550, 2022. [19] N. Shiradkar, E. Schneller, N. Dhere and V. Gade, "Effect of Shading on the Switching of Bypass Diodes in PV Modules", In Proceedings of Conference: SPIE Solar Energy + Technology, San Diego, United States, Oct. 2014, vol. 9179, p. 91790C. [20] M. Kumar, K. Panda, R. Naayagi, R. Thakur and G. Panda, "Enhanced Optimization Techniques for Parameter Estimation of Single-Diode PV Modules", Electronics, vol. 13, no. 15, p. 2934, 2024.