Minimizing the Utilized Area of PV Systems by Generating the Optimal Inter-Row Spacing Factor

: In mounted photovoltaic (PV) facilities, energy output losses due to inter-row shading are unavoidable. In order to limit the shadow cast by one module row on another, sufﬁcient inter-row space must be planned. However, it is not uncommon to see PV plants with such close row spacing that energy losses occur owing to row-to-row shading effects. Low module prices and high ground costs lead to such conﬁgurations, so the maximum energy output per available surface area is prioritized over optimum energy production per peak power. For any applications where the plant power output needs to be calculated, an exact analysis of the inﬂuence of inter-row shading on power generation is required. In this paper, an effective methodology is proposed and discussed in detail, ultimately, to enable PV system designers to identify the optimal inter-row spacing between arrays by generating a multiplier factor. The spacing multiplier factor is mathematically formulated and is generated to be a general formula for any geographical location including ﬂat and non-ﬂat terrains. The developed model is implemented using two case studies with two different terrains, to provide a wider context. The ﬁrst one is in the Kingdome of Saudi Arabia (KSA) provinces, giving a ﬂat terrain case study; the inter-row spacing multiplier factor is estimated for the direct use of a systems designer. The second one is the water pump for agricultural watering using renewable energy sources, giving a non-ﬂat terrain case study in Dhamar, Al-Hada, Yemen. In this case study, the optimal inter-row spacing factor is estimated for limited-area applications. Therefore, the effective area using the proposed formula is minimized so that the shading of PV arrays on each other is avoided, with a simple design using the spacing factor methodology.


Introduction
The penetration level of small-scale renewable energy resources, particularly photovoltaic (PV) systems, has rapidly evolved over recent years.Their low installation and operational costs make these resources competitive in the energy market in those countries that have high solar radiation, such as those located in the Middle East and South Africa (MENA).Several studies have been conducted to investigate the possibilities of maximizing the yield of energy production from renewable power generation, taking the MENA region as a case study, using intensive surveys and theories of theoretical and practical optimization [1][2][3].With more focus on PV systems, roof-top solar energy projects are incentivized due to the simplicity of grid integration and the possibility of trade and exchange within the grid via certain policies [4].Furthermore, prompt implementation with scalable capacity and a low maintenance cost encouraged communities, households, and companies to invest in PV systems.One of the main hurdles encountered by systems designers is accommodating the area with the targeted demand without affecting the quantity and quality of the yielded energy.
Several studies have analyzed solar energy system designs from a variety of perspectives.For instance, many studies are devoted to studying the grid integration of solar energy systems and its impact on system quality, sustainability, and reliability [5][6][7].Others concentrate on solar radiation assessments for different locations on Earth [8,9].A concrete design for a solar energy system was also introduced in several studies, discussing the sizing, tracking system, maximum power point tracking (MPPT), and the power electronic devices.Nevertheless, there is a deficiency in the article's content when it comes to effective area maximization in PV systems design.The studies that introduced the surface area are limited to the available area, suitable tilt angles, etc.
The sun's path differs from one season to another, as well as varying based on the location around the globe.The winter season is the time when the elevation angle of the sun is at its minimum, which is the case when shading is at its maximum [10].The variation in sun position is addressed by the researcher by studying the optimal orientation of PV panels to maximize as much extracted energy as possible.Karafil et al. [11] carried out a mathematical analysis and calculated the optimal tilt angle of the system, comparing the result with the practical data acquired.The shading effect is analyzed in [12] using hill-shade analysis, considering different levels of the roof potential of a PV system: the physical, geographical, and technical aspects.Furthermore, a tracking system is undergoing development to follow the sun's path and has consequently increased the system yield, as introduced in [13][14][15].
The system's overall area is affected by two main factors, which are module dimension and inter-row spacing.The spacing between arrays depends on how much the module is tilted, i.e., the tilt angle of the PV panel.In one study [16], different inter-row spacing is simulated and compared to analyze the solar shading levels throughout the year.The effect of inter-row spacing on energy yield was also investigated in another study [17] using data analysis of the measurements of the energy production of large PV plants for the calculation of shading effects.Joshi et al. [18] investigate different spacing ratios relative to the module height and simulate each one using PVsyst software to identify the most adequate spacing.The authors of [19] provide a sensor design to detect the shading on the inter-row spacing, to enable the system designer to test the shading of the PV modules.
Different configurations are considered in PV systems design.These configurations manipulate the installation angles through certain orientations upon tilt and azimuth angles, as well as change the panel's orientation from portrait to landscape and vice versa [20,21].The performance of PV systems is mainly affected by the shading phenomenon.Some software has been developed to estimate the spacing between PV arrays.Others have been developed to facilitate PV system design in terms of sizing and energy calculations.For example, PVsyst and PVsol both provide sizing features and performance analysis [22][23][24].Some features are designed to calculate panel distribution in the studied area, such as the Skelion feature in the SketchUp software [25].The accuracy of all the software types varies between 5.00 and 18.75% in terms of percentage error, according to the results reported in [26,27].The software that is most commonly used in estimating the spacing between arrays has limited accuracy and could not deal with the different configurations of panel distribution for either flat or non-flat terrains.
To the best of the authors' knowledge, studies that have introduced this issue are almost completely confined to the articles listed in this manuscript, with certain weaknesses and gaps.For example, although the authors of [28] extensively examined commercial buildings and shading within the roof restrictions, they have not come up with a clear methodology or presented any mathematical model to justify the selected spacing areas; even the parameters used are vague.The same issue is found in another study [22], where inter-row spacing was selected without considering the worst-case scenario when shading is at the maximum, especially in the case study in Germany, which has a very small elevation angle that was ignored.Other studies tended to assume different spacing patterns and different orientations to investigate the impact of each selected value, as presented by the authors of [17,18].The rest of the articles either relied on software directly or ignored some parameters, which is the case in [29][30][31].Moreover, scholars have not paid significant attention to PV systems in the case of hilly sites and terrain restrictions.The research gap is that insufficient articles are available to clearly address the issue of shading by providing a clear and detailed methodology for the researcher and designer to select adequate interrow spacing, considering the essential parameters and different configurations to ensure minimizing the shading area and maximizing the energy production.
Therefore, the contribution of this manuscript can be summarized as the following: • Generating the optimal inter-row spacing factor for minimizing the installation area and maximizing the energy output of the PV system for flat and non-flat terrains.

•
A detailed method of estimating the needed angles of the sun's path, which play an essential role in systems design.

•
A comprehensive description of inter-row spacing estimation is given to establish the most appropriate spacing that avoids the worst-case scenario of the shading effect.

•
Generating an inter-row spacing factor formula and validating it through a case study that was conducted in the Kingdom of Saudi Arabia (KSA), which has high solar radiation and solar energy potential but insufficient studies in this regard.
The rest of this article is organized as follows: the methodology of sun angle calculation and factor generation is presented in Section 2. In Section 3, the methodology of optimum area estimation is introduced, while the objective function is presented in Section 4. Case studies and the validation process are introduced in Section 5, and Section 6 presents our conclusions.

Sun Angles Calculation
It is essential to identify the sun's path at the system's final location to understand the nature of shading over the course of a year, especially in the worst-case scenario when the objects' shading is at maximum in the northern hemisphere on 21 December every year [27,32].The first stage of designing a PV system sun chart is to consider and identify the required sun radiation angles; elevation and azimuth.Figure 1 illustrates an example of a two-dimensional (2D) sun path, and how these angles can be estimated by analyzing this chart.As shown at 9.00 a.m. and 3.00 p.m., the shading is the longest, so the figure represents the method of identifying the angles.It can be noticed from Figure 1 that on 21 December, the date when shading is at the maximum, the sun elevation angle is 28  The elevation angle in the winter season is the smallest value, based on the rule tha the smaller the elevation angle, the greater the shading of objects [34].In the case of PV system installation, this angle is considered to avoid exposing the PV array to the shading of the array behind.To this end, intensive calculation is required to determine the optimal inter-row spacing between arrays.In this section, the methodology of selecting the most efficient space that ensures minimizing the area occupied and maximizing the energy production is introduced.
Different parameters are required to identify the distance between two rows.The first parameter is from the module dimension and whether the module is implemented individually or mounted in two modules.Then, the tilt angle that is selected by the designer is also required.In this step, the height difference, , which is shown in Figure 2, is estimated, assuming that the module shading has an angle with the horizontal called the azimuth angle,  .As the elevation angle  is determined from the sun's path and the height difference is estimated from the module dimension and tilt angle, the shading length can consequently be determined and denoted by X However, the shading has appeared with a length of X; this cannot be considered as the spacing value because it is tilted at an angle.The spacing, which is denoted by D, can be estimated using the X-value and the azimuth angle in the triangle when laid horizontally.
The elevation angle in the winter season is the smallest value, based on the rule that the smaller the elevation angle, the greater the shading of objects [34].In the case of PV system installation, this angle is considered to avoid exposing the PV array to the shading of the array behind.To this end, intensive calculation is required to determine the optimal inter-row spacing between arrays.In this section, the methodology of selecting the most efficient space that ensures minimizing the area occupied and maximizing the energy production is introduced.
Different parameters are required to identify the distance between two rows.The first parameter is from the module dimension and whether the module is implemented individually or mounted in two modules.Then, the tilt angle that is selected by the designer is also required.In this step, the height difference, ∆H, which is shown in Figure 2, is estimated, assuming that the module shading has an angle with the horizontal called the azimuth angle, θ az .As the elevation angle θ elev is determined from the sun's path and the height difference is estimated from the module dimension and tilt angle, the shading length can consequently be determined and denoted by X.However, the shading has appeared with a length of X; this cannot be considered as the spacing value because it is tilted at an angle.The spacing, which is denoted by D, can be estimated using the X-value and the azimuth angle in the triangle when laid horizontally.
The inter-row spacing between PV arrays can be calculated by estimating these angles in addition to the dimensions of the panel used.Once these angles are graphically estimated, the inter-row spacing can be determined using the following formula: where ∆H is the height of the module terminal, L is the PV panel length, and θ tilt is the tilt angle of the module.Then, the inter-row spacing can be estimated using the following equation: where X is the shadow length and θ elev is the sun elevation angle at the location, which can be determined from the sun's path.
stainability 2022, 14, x FOR PEER REVIEW 5 of 16 The inter-row spacing between PV arrays can be calculated by estimating these angles in addition to the dimensions of the panel used.Once these angles are graphically estimated, the inter-row spacing can be determined using the following formula: where Δ is the height of the module terminal, L is the PV panel length, and  is the tilt angle of the module.Then, the inter-row spacing can be estimated using the following equation:  The second parameter is the tilt angle, which depends on the system designer's decision and may differ to accommodate a certain number of panels.Other parameters, D, L, and ∆H, refer to the spacing between successive panels or arrays, the length of the module, and the height difference in the vertical projection of the module, respectively.

EER REVIEW
Δ, refer to the spacing between successive panels or arrays, the length of th and the height difference in the vertical projection of the module, respectively.

Multiplier Factor Estimation
In this paper, the optimal inter-row spacing factor is generated for a location in Saudi Arabia to facilitate determining the optimum spacing between By implementing this optimum spacing, shading will be minimized, and the ut will also be minimized.The designer can use this multiplier factor directly with through complicated calculations.The factor can be estimated from the formula, which is based on the sun elevation and azimuth angles: where  is the azimuth angle and  is the elevation angle.This factor can b multiplying it with the height of the module Δ: Moreover, in cases where a limited area is available, the configuration of so might be oriented relative to the azimuth angle, with a certain angle to accomm available area.The inter-row spacing factor will remain the same and is not a

Multiplier Factor Estimation
In this paper, the optimal inter-row spacing factor is generated for a different location in Saudi Arabia to facilitate determining the optimum spacing between modules.By implementing this optimum spacing, shading will be minimized, and the utilized area will also be minimized.The designer can use this multiplier factor directly without going through complicated calculations.The factor can be estimated from the proposed formula, which is based on the sun elevation and azimuth angles: where θ az is the azimuth angle and θ is the elevation angle.This factor can be used by multiplying it with the height of the module ∆H: Moreover, in cases where a limited area is available, the configuration of solar arrays might be oriented relative to the azimuth angle, with a certain angle to accommodate the available area.The inter-row spacing factor will remain the same and is not affected by orienting the panel from the optimal position, based on the new azimuth angle.Figure 4 shows that the whole triangle is rotating, keeping the distance, D, unchanged, like the radius of a circle.Thus, the inter-row spacing factor is still applicable.

Inter-Row Spacing Considered for Non-Flat Terrain
Hilly sites are always an option for installing PV systems with relative ease, but the land surface is not always flat.There may be terrain issues or roughness that should be taken into consideration in the shading analysis.The effect of these terrain issues might increase or decrease the shading phenomenon.Figure 5 illustrates a scenario using a PV system area with non-flat terrain, where the PV station is installed on uneven ground and is ascending or descending at a certain slope.In this case, arrays are installed either higher or lower than the previous array, corresponding to the south direction.As shown in this figure, array (2) is higher than array (1), which results in decreasing the shading; in contrast, array (5) is lower than array (4), which requires increasing the distance between them to avoid shading.To properly address this issue, the first step is to identify the reference line between every two successive arrays, which is the horizontal line that passes through the lowest point.The idea behind drawing a reference line is to calculate the height difference

Inter-Row Spacing Considered for Non-Flat Terrain
Hilly sites are always an option for installing PV systems with relative ease, but the land surface is not always flat.There may be terrain issues or roughness that should be taken into consideration in the shading analysis.The effect of these terrain issues might increase or decrease the shading phenomenon.Figure 5 illustrates a scenario using a PV system area with non-flat terrain, where the PV station is installed on uneven ground and is ascending or descending at a certain slope.In this case, arrays are installed either higher or lower than the previous array, corresponding to the south direction.As shown in this figure, array (2) is higher than array (1), which results in decreasing the shading; in contrast, array (5) is lower than array (4), which requires increasing the distance between them to avoid shading.

Inter-Row Spacing Considered for Non-Flat Terrain
Hilly sites are always an option for installing PV systems with relative ease, but the land surface is not always flat.There may be terrain issues or roughness that should be taken into consideration in the shading analysis.The effect of these terrain issues might increase or decrease the shading phenomenon.Figure 5 illustrates a scenario using a PV system area with non-flat terrain, where the PV station is installed on uneven ground and is ascending or descending at a certain slope.In this case, arrays are installed either higher or lower than the previous array, corresponding to the south direction.As shown in this figure, array (2) is higher than array (1), which results in decreasing the shading; in contrast, array (5) is lower than array (4), which requires increasing the distance between them to avoid shading.To properly address this issue, the first step is to identify the reference line between every two successive arrays, which is the horizontal line that passes through the lowest point.The idea behind drawing a reference line is to calculate the height difference To properly address this issue, the first step is to identify the reference line between every two successive arrays, which is the horizontal line that passes through the lowest point.The idea behind drawing a reference line is to calculate the height difference between two or more bases of the PV arrays.Once the height difference (h) is estimated, the second step is to identify whether the slope is positive or negative.The inter-row spacing between two arrays in an area with a specific terrain will, therefore, be affected by the height difference.Therefore, the new formulation can be written to consider this new factor as follows: If the slope is positive, as in slope 1, the height difference h1 will be positive (h); if the slope is negative, as in slope 2, the height difference h2 is negative (-h).

Methodology of Optimum Area Estimation
The PV system's area is affected by different factors, which are the dimension of the module, the tilt angle, and the location on the Earth.The area's location affects the length of the shading and the inter-row spacing accordingly.To minimize the area required for system installation, the optimal inter-row spacing needs to be estimated, taking into account maximizing the energy yield by selecting the optimal tilt angle of the system location.The area estimated is at optimum when shading is completely avoided; therefore, the area is properly utilized.Figure 6 illustrates the essential factors that are used to estimate the area, assuming certain dimensions of the PV panel and the spacing between arrays.between two or more bases of the PV arrays.Once the height difference (h) is estimated, the second step is to identify whether the slope is positive or negative.The inter-row spacing between two arrays in an area with a specific terrain will, therefore, be affected by the height difference.Therefore, the new formulation can be written to consider this new factor as follows: If the slope is positive, as in slope 1, the height difference h1 will be positive (h); if the slope is negative, as in slope 2, the height difference h2 is negative (-h).

Methodology of Optimum Area Estimation
The PV system's area is affected by different factors, which are the dimension of the module, the tilt angle, and the location on the Earth.The area's location affects the length of the shading and the inter-row spacing accordingly.To minimize the area required for system installation, the optimal inter-row spacing needs to be estimated, taking into account maximizing the energy yield by selecting the optimal tilt angle of the system location.The area estimated is at optimum when shading is completely avoided; therefore, the area is properly utilized.Figure 6 illustrates the essential factors that are used to estimate the area, assuming certain dimensions of the PV panel and the spacing between arrays.If the installed system encompasses the (n) number of vertical modules that have dimensions L × w, per (m) arrays, tilted at a tilt angle of  , the spacing between rows is estimated and is equal to D. Thus, in the case of uniformly distributed modules, the whole system's occupied area is equal to:

Objective Function
In the non-flat sites, the total area will be changed according to the terrain's nature (see Figure 7).Thus, to estimate the overall area, the sum of the different areas needs to be determined, as follows: where R and C are the rows and columns of the PV systems, respectively.In Equation ( 8), the areas between two successive modules in the system are estimated, where each area is affected by several parameters, taking into account the dimension of the PV panel, the If the installed system encompasses the (n) number of vertical modules that have dimensions L × w, per (m) arrays, tilted at a tilt angle of θ tilt , the spacing between rows is estimated and is equal to D. Thus, in the case of uniformly distributed modules, the whole system's occupied area is equal to:

Objective Function
In the non-flat sites, the total area will be changed according to the terrain's nature (see Figure 7).Thus, to estimate the overall area, the sum of the different areas needs to be determined, as follows: where R and C are the rows and columns of the PV systems, respectively.In Equation ( 8), the areas between two successive modules in the system are estimated, where each area is affected by several parameters, taking into account the dimension of the PV panel, the inter-row spacing, and the terrain nature.Since there is no self-shading for the first row of the PV system, the inter-row spacing is not taken into account and the second part of Equation ( 8) is applied.
Sustainability 2022, 14, x FOR PEER REVIEW 9 of 16 inter-row spacing, and the terrain nature.Since there is no self-shading for the first row of the PV system, the inter-row spacing is not taken into account and the second part of Equation ( 8) is applied.The general formula of the energy produced by the PV system (E) depends on several parameters, as suggested by the authors of [27]: where AS is the surface area of the PV panel, r is the solar panel efficiency, GR is the tilted surface mean solar radiation, and PR is the performance ratio.Knowing this, the energy density is the ratio between the generated energy and the installation area: where Ed is the energy density in (kWh/m 2 ), Eout is the energy output in (kWh), and A is the total area of the system in (m 2 ).If we substitute Equation (8) into Equation (10), then Ed can be written as follows: The objective function in this study is to maximize the energy density by avoiding the shading effect, based on several constraints, as follows: Objective function: Subject to: The general formula of the energy produced by the PV system (E) depends on several parameters, as suggested by the authors of [27]: where A S is the surface area of the PV panel, r is the solar panel efficiency, G R is the tilted surface mean solar radiation, and PR is the performance ratio.Knowing this, the energy density is the ratio between the generated energy and the installation area: where E d is the energy density in (kWh/m 2 ), E out is the energy output in (kWh), and A is the total area of the system in (m 2 ).If we substitute Equation ( 8) into Equation (10), then E d can be written as follows: The objective function in this study is to maximize the energy density by avoiding the shading effect, based on several constraints, as follows: Objective function: Subject to: Sustainability 2022, 14, 6077 10 of 15 where D worst is the inter-row spacing under the worst-case scenario (21 December).

Saudi Arabia Case Study
A case study has been developed to evaluate the multiplier factor for all provinces in KSA.Table 1 summarizes some general information about these provinces.In addition, the optimum multiplier factors for all provinces are also presented in this table.To validate the above methodology, a real-life installed system in Saudi Arabia, in Jeddah province, is tested under different scenarios by varying the tilt angle of the system arrays.This system is installed using a 15 • tilt angle in reality.The number of the modules that are studied here is 750, distributed over five roof-tops, as shown in Figure 8.This system will be tested in two scenarios: uniformly distributed modules when the tilt angle is standardized throughout all the arrays, and non-uniformly distributed arrays, when more than one tilt angle is used for system area minimization.In the case of a standardized tilt angle, the above formula is used to calculate the overall system area.In this case study, two different scenarios are presented to evaluate the methodology of minimizing the installation area of the PV system.The first scenario is to use the same tilt angle for all arrays, while the second scenario is to implement two tilt angles in the same system, as discussed in a previous study [27].The area is divided into five areas, and the estimation in the first scenario is summarized in Table 2; the module length is 2L because every two modules are mounted together in the installed system.It is found that the area is reduced by 300 m 2 due to the proposed approach of estimating the area, based on optimal inter-row spacing using the generated multiplier factor.In this case study, two different scenarios are presented to evaluate the methodology of minimizing the installation area of the PV system.The first scenario is to use the same tilt angle for all arrays, while the second scenario is to implement two tilt angles in the same system, as discussed in a previous study [27].The area is divided into five areas, and the estimation in the first scenario is summarized in Table 2; the module length is 2L because every two modules are mounted together in the installed system.It is found that the area is reduced by 300 m 2 due to the proposed approach of estimating the area, based on optimal inter-row spacing using the generated multiplier factor.The second scenario is to implement the system by setting different tilt angles, as proposed by the authors of [27], setting the tilt angle of the first row to the optimal tilt angle, which is 22° in the studied case.This row now has a shadow effect on the other arrays because it is the first one to the north of the area of the rooftop.The optimal area, if this methodology is employed, is summarized in Table 3; the area is reduced by about 12 2 less than the standardized case, and, inevitably, the energy yield is maximized when setting the tilt angle of row 1 to 22°, the optimal angle.
In each scenario, a comparison between two different configurations is presented.The first configuration is designed to standardize a single tilt angle for all arrays in the system, while the second configuration is for the scenario of using two different tilt angles, according to the new configuration proposed by the authors of [27].The optimal area that should be used is estimated and compared with the area that the system occupies in reality.The optimal area is calculated using the methodology proposed in The second scenario is to implement the system by setting different tilt angles, as proposed by the authors of [27], setting the tilt angle of the first row to the optimal tilt angle, which is 22 • in the studied case.This row now has a shadow effect on the other arrays because it is the first one to the north of the area of the rooftop.The optimal area, if this methodology is employed, is summarized in Table 3; the area is reduced by about 12 2 less than the standardized case, and, inevitably, the energy yield is maximized when setting the tilt angle of row 1 to 22 • , the optimal angle.In each scenario, a comparison between two different configurations is presented.The first configuration is designed to standardize a single tilt angle for all arrays in the system, while the second configuration is for the scenario of using two different tilt angles, according to the new configuration proposed by the authors of [27].The optimal area that should be used is estimated and compared with the area that the system occupies in reality.The optimal area is calculated using the methodology proposed in this study, while the installation area is set based on a design tool that relied on the areas suggested by the software.The overall percentage error in the first configuration is 11.6%, and the percentage error, if the second configuration is employed, is 12.3%.

Yemen Case Study
Another case study in Yemen has been employed to extend the use of this mathematical model and provide a wider context for this study.The PV system in this study was installed in Dhamar, Al-Hada; longitude: 44.41423 • and latitude: 14.5523 • .It was designed by the Engineering Studies and Designs Unit-Tesla and was installed by Power City for electrical tools and solar energy systems, under the project name: "Water pump for agricultural watering, using renewable energy sources with a total power capacity of 52 kW".A photo for this project is shown in Figure 9.As illustrated in this figure, the system is installed in a non-flat area in a descending order, facing the south direction.From inspection, the shading, in this case, will increase as we descend from array A1 to A4.The shading length of the PV arrays of this case study is also clearly shown in Figure 8.
Considering these differences in terrain, the minimum spacing area is calculated using Equation (8) and is found to be less than the actual spacing area by around 16%.
. The PV arrays of the Yemen case study and their shading length.

Conclusions
As solar energy systems are rapidly proliferating in recent decades, and the potential dependency on this form of energy resource is increased, PV system installation and enhancement are being given significant attention by researchers worldwide.This article introduces a mathematical analysis of shading avoidance by the use of adequate spacing that ensures maximizing the extracted energy and minimizing the area occupied by the PV module.A complete formulation of the spacing factor has been developed and presented for flat and non-flat terrains.This factor can be generated and generalized to a specific geographical location, which could be a city or province.
In KSA, two specific scenarios were implemented for a flat-terrain PV system.A comparison of two distinct configurations was offered in each scenario.The first The designer of this project selected the spacing between the PV arrays to prevent shading by ignoring the effect of the slope and the non-flat terrain.The actual total area of the spacing of the installed PV system is 370 m 2 , as illustrated in Table 4.However, since this value is sufficient to prevent shading in this case study, it cannot be employed in limited-area applications.Therefore, the mathematical model developed in this paper is used to provide the optimal inter-row spacing factor for limited area applications.To estimate the optimal inter-row spacing factor between PV arrays, in this case, Equation ( 6) has been used with a positive height difference (h).Table 2 provides all the parameters needed to estimate the optimal inter-row spacing factor using this model.The estimated minimum spacing area that is sufficient to install this system with the same power capacity, ensuring avoidance of the worst-case scenario of the shading effect is 310.17 m 2 .As shown in Table 2, there are two different inter-row spacing distances between arrays in this case study.The first one is the inter-row spacing between the distant arrays A1 and A2, and A2 and A3.The second inter-row spacing is between A3 and A4.The former is less than the latter because its height difference is less than the latter, being 20 cm for the former, vs. 30 cm for the latter, as illustrated in Table 5.The optimal inter-row spacing factor is estimated for this case study, using Equation (4).Then, the spacing is decided, considering the non-flat terrain, using Equation (6).Considering these differences in terrain, the minimum spacing area is calculated using Equation (8) and is found to be less than the actual spacing area by around 16%.

Conclusions
As solar energy systems are rapidly proliferating in recent decades, and the potential dependency on this form of energy resource is increased, PV system installation and enhancement are being given significant attention by researchers worldwide.This article introduces a mathematical analysis of shading avoidance by the use of adequate spacing that ensures maximizing the extracted energy and minimizing the area occupied by the PV module.A complete formulation of the spacing factor has been developed and presented for flat and non-flat terrains.This factor can be generated and generalized to a specific geographical location, which could be a city or province.
In KSA, two specific scenarios were implemented for a flat-terrain PV system.A comparison of two distinct configurations was offered in each scenario.The first configuration applied a single tilt angle to all arrays in the system, while the second configuration employed two separate tilt angles to reduce the required area for PV system installation.The optimal area was determined using the approach given in this study, while the installation area was determined using the design software tool.Overall, the first setup had a percentage error of 11.6%, whereas the second configuration had a percentage error of 12.3%.To provide a broader perspective of this model, it was exemplified using a second case study with a non-flat terrain.This study is a water pump for agricultural watering using Renewable Energy sources located in Dhamar, Al-Hada, Yemen, which has a non-flat terrain.The optimal inter-row spacing factor for limited-area applications is estimated in this case study.The optimal spacing is reduced by around 16% from the actual spacing applied by the systems designers.

Figure 1 .
Figure 1.Example of a two-dimensional sun path, with angles estimated [33].

Figure 2 .
Figure 2. Sun path analysis and shading effect representation.

Figure 2 .
Figure 2. Sun path analysis and shading effect representation.

Figure 3
Figure 3 represents the two-dimensional geometry of solar panel implementation relative to the sun's path, with inter-row spacing as D, height difference, and installation angles: tilt angle and elevation angle [35].As shown in this figure, the elevation angle significantly affects the self-shading.This angle varies, based on the geographic location.The second parameter is the tilt angle, which depends on the system designer's decision

Figure 3 .
Figure 3. Two-dimensional view of solar panel implementation.

Figure 3 .
Figure 3. Two-dimensional view of solar panel implementation.

Figure 4 .
Figure 4. Effect of changing the azimuth angle on the distance (D) and the inter-row spacing factor.

Figure 5 .
Figure5.A case study of a PV system on non-flat terrain.

Figure 4 .
Figure 4. Effect of changing the azimuth angle on the distance (D) and the inter-row spacing factor.

Figure 4 .
Figure 4. Effect of changing the azimuth angle on the distance (D) and the inter-row spacing factor.

Figure 5 .
Figure 5.A case study of a PV system on non-flat terrain.

Figure 5 .
Figure 5.A case study of a PV system on non-flat terrain.

Figure 6 .
Figure 6.Geometry of the essential factors to estimate the area.

Figure 6 .
Figure 6.Geometry of the essential factors to estimate the area.

Figure 7 .
Figure 7. Geometry of the essential factors to estimate the area of the PV system for non-flat terrain.

Figure 7 .
Figure 7. Geometry of the essential factors to estimate the area of the PV system for non-flat terrain.

Figure 8 .
Figure 8.The distribution of PV panels in five areas of the case study.

Figure 8 .
Figure 8.The distribution of PV panels in five areas of the case study.

Figure 9 .
Figure 9.The PV arrays of the Yemen case study and their shading length.

Table 1 .
Optimal multiplier factors for all provinces of KSA.

Table 2 .
Installation area of the case study and the optimal area of scenario 1 (with a 15 • tilt angle).

Table 2 .
Installation area of the case study and the optimal area of scenario 1 (with a 15° tilt angle).

Table 3 .
Installation area of the case study and the optimal area of scenario 2.

Table 5 .
Estimated parameters for the Yemen case study.

Table 4 .
PV panel data in the Yemen case study.

Table 5 .
Estimated parameters for the Yemen case study.