Optimal Tilt Angle and Orientation of Photovoltaic Modules Using HS Algorithm in Different Climates of China

Mian Guo 1, Haixiang Zang 1,2,* ID , Shengyu Gao 3, Tingji Chen 3, Jing Xiao 3, Lexiang Cheng 3, Zhinong Wei 1 and Guoqiang Sun 1 1 College of Energy and Electrical Engineering, Hohai University, Nanjing 211100, China; hhuguomian@163.com (M.G.); wzn_nj@263.net (Z.W.); hhusunguoqiang@163.com (G.S.) 2 Jiangsu Key Laboratory of Smart Grid Technology and Equipment, Nanjing 210096, China 3 State Grid Nanjing power supply company, Nanjing 210019, China; gaosy@js.sgcc.com.cn (S.G.); ctj@js.sgcc.com.cn (T.C.); xiaojing@js.sgcc.com.cn (J.X.); chenglx@js.sgcc.com.cn (L.C.) * Correspondence: zanghaixiang@hhu.edu.cn; Tel.: +86-137-7071-9919


Introduction
Environmental pressure and increasing energy costs escalation create a series of fundamental dilemmas in electric power production.Like many developing countries, the growing consumption of energy fuels bolsters the Chinese economy, but increasing the use also exposes potential disruptions in supply [1].Thus, renewable energy plays an increasingly important part in the future Chinese power system, supplanting all or part of conventional energy sources.Solar energy deserves attention because of its clean, non-polluting, and sustainable use, and other advantages [2].It is an ideal energy that fundamentally solves the energy crisis and environmental problems [3].Solar radiation varies with geographic latitude, season and time of a day due to the various solar positions [4].To maximize the collection of solar radiation, a PV panel should be installed at the appropriate tilt angle and orientation under various circumstances [5].
Recently, many investigators have searched for the optimum tilt angle (β opt ) and optimum azimuth angle (γ opt ) of solar collectors.Dixit [6] used the artificial neural network (ANN) estimator taking the H g , φ and E L of the site as inputs, to estimate the optimum tilt angle almost instantaneously while testing.Gopinathan [7] represented the optimum slope and the azimuth angles with the anisotropic model for South Africa, calculating the daily radiation at various slopes and orientations, thus obtaining β opt and γ opt .The past few decades have seen an increased interest in general-purpose "black-box" optimization algorithms that have drawn inspiration from optimization processes that occur in nature in large part [8][9][10][11][12][13][14].In Ref. [15], an approach combining the orthogonal array experimental technique and an ant direction hybrid differential evolution algorithm (ADHDEOA) was presented for determining the tilt angle for PV modules.In Ref. [16], the tilt angle was changed from −20 • to 90 • in a step size of 0.1 • , and the corresponding value of maximum global solar radiation for a specific period is defined as the optimal tilt angle.In Ref. [17], a particle-swarm optimization method with nonlinear time-varying evolution (PSO-NTVE) was proposed, by which the tilt angle of PV modules were determined for Taiwan.The calculation can be formulated as an optimization problem for maximizing the output electrical energy of the modules.From previous applications, the defect of particle swarm optimization (PSO) prematurity makes it easy to fall into a local optimum; thus, it is necessary to select other algorithms to attempt this research.
In 2001, Geem [18] developed a new harmony search (HS) meta-heuristic algorithm that was conceptualized using the musical process of searching for a perfect state of harmony.The word "heuristic" refers to "solution by trial and error method", and the word "meta" refers to "high level".The harmony in music is analogous to the optimization solution vector, and the musician's improvisations are analogous to local and global search schemes in optimization techniques [19].The characteristics of the HS algorithm include the following three aspects: (1) There is no need for initial values of the decision variables; (2) HS uses a stochastic random search, which requires the harmony memory (HM) without any derivative information; and, (3) When compared with meta-heuristic optimization algorithms, it demands fewer mathematical requirements and can be applied to a wider range.Sandgren [20] and Wu and Chow [21] applied the algorithm to analyze pressure vessel design to minimize the total cost of the material.The HS algorithm was used to solve a weld beam design optimization problem in [19], which was compared with previous solutions.In [22], the HS algorithm was used to determine the near-global optimal initial weights when training the model.Since the initial values of design variables are not required in HS, it is regarded as the best solution in terms of results, and has the fewest limitations on the range of applications.
Traditional methods, such as the ergodic method, are too slow to find the best result in a relatively complex mathematical model.Hence, the HS algorithm is proposed to search for the optimum values because of the advantages mentioned.In this paper, first, the ergodic method is adopted to obtain β opt and γ opt by calculating the extraterrestrial solar radiation at various tilt angles and azimuth angles.The ergodic results are used as standard values for comparison.Next, the calculation of β opt and γ opt is formulated as an optimization problem.Then, the HS method is employed to determine the optimal angles based on the established objective function and constraints.Finally, the HS and PSO results are compared with reference values obtained from the ergodic algorithm through the most widely used statistical methods.Comparisons show that the HS is an accurate and reliable method for the PV module to determine the tilt angle and orientation.

Mathematical Model
To obtain the maximum solar radiation, it is necessary to design the tilt angle and orientation of a PV panel.The proper mathematical model related to the latitude of the station and the Julian day is a basis of calculating β opt and γ opt .There are various methods to classify climates in China [23][24][25].In this paper, several methods are applied to solar energy collection optimization on the tilted surfaces for six stations (Sanya, Shanghai, Zhengzhou, Harbin, Mohe, and Lhasa) in different climate zones (tropical zone [TZ], subtropical zone [SZ], warm temperate zone [WTZ], mid temperate zone [MTZ], cold temperate zone [CTZ], and Tibetan plateau zone [TPZ]) in China [26].General layout of the six major climates across China is shown in Figure 1.General information about the selected six typical stations is shown in Table 1.

Julian Day (JD)
The Julian day or Julian day number (JDN) is the number of days that have elapsed since the first day of a year, January 1. December 31 has a JDN of 365, except when it has a Julian number of 366 in a leap year [27][28][29].

Solar Declination (δ)
The declination of the sun is the angle between the line joining the centres of the earth, the sun, and the equatorial plane.In Equation (1), the declination of the sun is determined by the day of the year using the following formula [30]: where n is the JDN.

Angle Incidence (θ)
The angle of incidence of the direct solar radiation on the tilt surface, θ, can be calculated by ( 2 where Φ is the latitude of the site, β is the tilt angle of PV panel, γ is the azimuth angle, and ω is the hour angle, which shifts with the sun movement.

Julian Day (JD)
The Julian day or Julian day number (JDN) is the number of days that have elapsed since the first day of a year, 1 January.31 December has a JDN of 365, except when it has a Julian number of 366 in a leap year [27][28][29].

Solar Declination (δ)
The declination of the sun is the angle between the line joining the centres of the earth, the sun, and the equatorial plane.In Equation ( 1), the declination of the sun is determined by the day of the year using the following formula [30]: where n is the JDN.

Angle Incidence (θ)
The angle of incidence of the direct solar radiation on the tilt surface, θ, can be calculated by ( 2) [31]: where φ is the latitude of the site, β is the tilt angle of PV panel, γ is the azimuth angle, and ω is the hour angle, which shifts with the sun movement.

Sunrise and Sunset Hour Angle
The solar altitude angle is zero at the sunrise and sunset.To find the sunrise (or sunset) hour angle ω r (ω s ) on a south-facing (γ = 0) tilt surface, one can use the following formulas [32]: Furthermore, the sunrise (or sunset) hour angle ω r (ω s ) for the inclined surface is given by [31]: ) with A = 2(sin δ sin φ cos β − sin δ cos φ sin β cos γ) × (cos δ cos φ cos β + cos δ sin φ sin β cos γ), (7) and where A and B are calculated by Equation ( 2), which were used to obtain the values of sunrise (or sunset) hour angle in Equations ( 3)-( 6).

Extraterrestrial Solar Radiation
We use I* to denote extraterrestrial solar radiation, which is calculated by: where I c is the solar constant (=1367 W/m 2 ).The extraterrestrial solar radiation on a tilted surface for a day (I d ) is calculated from (10): The monthly mean daily extraterrestrial solar radiation on a tilted surface (I m ) can be calculated from Equation (11): where n 1 and n 2 are the JD number of the first day and the last day of a month, respectively.I di is the extraterrestrial solar radiation on a tilted surface of the day, which has the JD number of i.
In this paper, the ergodic method employs Equations ( 1)-( 11) to calculate the monthly mean daily extraterrestrial solar radiation for six different stations.The tilt angle is changed from 0 • to 90 • with a step size of 0.1 • , while the azimuth angle is changed from 0 • to 360 • in the step of 0.1 • , and the corresponding value of maximum extraterrestrial solar radiation for a specific period are defined as the optimal angle.Note that the results are considered to be standard values, serving as a reference group in the following research.

Objective Function
In general, an objective function may be any functional relation that an investigator selects to reflect the relative desirability of groupings [33].According to the "radiation-maximized" demand and the mathematical model of solar obit and position, this paper establishes the object system of decision-making.Equation ( 12) reflects the optimization problem, in which the tilt angle and azimuth angle are determined with a maximum of I m : max(I m (β, γ)). (12)

Constraints
1. Tilt angles where β min and β max are the lower and the upper values of β.In this optimization problem, β min and β max are set as 0 • and 90 • , respectively.2.
Azimuth angles where γ min and γ max are the lower and the upper value of γ.In this optimization problem, γ min and γ max are set as 0 • and 360 • , respectively.

HS Searching Procedure
The HS algorithm was conceptualized using the musical process of searching for a perfect state of harmony.Musical performances seek pleasing harmony (a perfect state), as determined by an aesthetic standard, just as the optimization process seeks to find a global solution (a perfect state) as determined by an objective function.The pitch of each musical instrument determines the aesthetic quality, just as the objective function value is determined by the set of values assigned to each decision variable [11].The searching procedure using HS theory for β opt and γ opt [13] is as follows: Step 1: Initialize the optimization problem and algorithm parameters.First, the optimization problem is specified as Equations ( 12)- (14).The HS algorithm parameters required to solve the optimization problem (i.e., Equations ( 12)-( 14) are also set in this step: harmony memory size (number of solution vectors in harmony memory, HMS) = 6, harmony memory considering rate (HMCR) = 0.9, pitch adjusting rate (PAR) = (0.4,0.9), and termination criterion (maximum number of searches) = 2000.
Step 2: Initialize the harmony memory (HM).The solution vectors in the HM matrix are generated randomly and sorted by the values of the objective function.The HM is given by (15): Step 3: Improvise a new harmony from the HM.A new harmony vector, (β , γ ) is generated from the HM based on memory considerations, pitch adjustments, and randomization.For example, the value of the first design variable (β ) for the new vector can be chosen from any value in the specified HM range (β −β HMS ).Values of the other design variables (γ ) can be chosen in the same way.Here, the algorithm chooses the new value with HMCR = 0.9: The pitch adjusting process is performed until a value is chosen from the HM.PAR of 0.4 indicates that it is possible to choose a neighboring value using 40% × HMCR.The value (1-PAR) sets the rate of doing nothing.
Step 4: Update the HM.If the objective function value of new harmony vector is larger than the worst harmony in the HM, include the new harmony in the HM and exclude the existing worst harmony from the HM.Then, sort the HM by the objective function value.
Step 5: Repeat Steps 3 and 4 until the termination criterion is met.In this step, the termination of a computation process is allowed before the final conclusion, in accordance with specified termination criterion (maximum number of searches = 2000).If not, repeat Steps 3 and 4.

Statistical Methods
To assess the accuracy and suitability of the models, numerous statistical methods are used to compare the reference optimum tilt angle obtained by the ergodic method and the optimum tilt angle calculated by the PSO and HS algorithms.PSO is a stochastic technique for exploring the search space for optimization [34].It emulates the social behavior of a natural swarm.With the term "swarm", a population of individuals (particles) is indicated.Each swarm particle follows a path in the solution space.The motion of each particle is governed by a list of constraints based on ecology (i.e., natural swarm behavior) [35].In the present study, PSO is used to compare the solution quality with the HS algorithm.The model equations are evaluated using mean percentage error (MPE), mean absolute percentage error (MAPE), mean absolute bias error (MABE), and root mean square error (RMSE), which are defined as below [36][37][38][39][40][41][42]: where β ic and β im are the ith calculated and standard optimum tilt angles, respectively; N is the total number of observations; and β ca and β ma are the average of the calculated and standard values, respectively.

Results and Discussions
The optimum tilt angles and orientations of PV modules for six stations in different climates are established using the HS method, accounting for the climate and latitude of each site.The six Chinese cities selected for study are Sanya, Shanghai, Zhengzhou, Harbin, Mohe, and Lhasa.In practical applications, PV modules do not operate under a standard condition.During the sun's movements, the solar irradiance accumulates each hour angle with the corresponding extraterrestrial radiation.
Based on Equations ( 1)-( 11), the monthly mean daily extraterrestrial radiation data were determined accordingly; Figure 2 displays the results from January to December in Shanghai.Taking the result of March as an example, in Figure 2c, I dm on a tilted surface varies from 0 to over 35 MJ/m 2 .Apart from south-facing orientations, the solar radiation decreases gradually with an increasing incline angle from horizontal to vertical surfaces.The maximum value is observed at the inclined angles between 20 • and 40 • , with the azimuth angles from 150 • to 210 • .The figure also indicates that I d is quite symmetrical with respect to due south (γ = 180 • ).As the result of the sun path in Shanghai, the sun is visible for most of the day throughout the year; therefore, solar collection is greatest among all of the surfaces.Since the east-facing surfaces and west-facing surfaces face the sun in the morning and afternoon, respectively, the solar radiations at these two orientations are very close to each other.Due to the shortest period facing the direct sun, the north-facing planes receive the least solar radiation.practical applications, PV modules do not operate under a standard condition.During the sun's movements, the solar irradiance accumulates each hour angle with the corresponding extraterrestrial radiation.
Based on Equations ( 1)-( 11), the monthly mean daily extraterrestrial radiation data were determined accordingly; Figure 2 displays the results from January to December in Shanghai.Taking the result of March as an example, in Figure 2c, Idm on a tilted surface varies from 0 to over 35 MJ/m 2 .Apart from south-facing orientations, the solar radiation decreases gradually with an increasing incline angle from horizontal to vertical surfaces.The maximum value is observed at the inclined angles between 20° and 40°, with the azimuth angles from 150° to 210°.The figure also indicates that Id is quite symmetrical with respect to due south (γ = 180°).As the result of the sun path in Shanghai, the sun is visible for most of the day throughout the year; therefore, solar collection is greatest among all of the surfaces.Since the east-facing surfaces and west-facing surfaces face the sun in the morning and afternoon, respectively, the solar radiations at these two orientations are very close to each other.Due to the shortest period facing the direct sun, the north-facing planes receive the least solar radiation.(  From Figure 2, the optimum azimuth angles are 0° (360°) or 180° in every month.Therefore, when referring to the optimum results, the azimuth angle data are simplified to the sign in the discussion below: a positive sign means due south, and a negative sign means due north.Table 2 demonstrates the values of βopt obtained using the ergodic method, the PSO and the HS algorithm.In the ergodic results, βopt values from Sanya, Shanghai, Zhengzhou, Harbin, Mohe, and Lhasa ranges from −18.1°(Jun) to 49.9°(Dec), from −7.6°(Jun) to 61.4°(Dec), from 5.5°(Jun) to 64.3°(Dec), from 12.6°(Jun) to 73.7°(Dec), from 16.6°(Jun) to 80.0°(Dec), and from −8.9°(Jun) to 59.9°(Dec), respectively.The values of βopt are negative from May to July.The results also show that γopt values obtained with the HS method are exactly the same as those obtained with the PSO method and ergodic method, and that the trend of βopt values in each month is roughly the same.From Figure 2, the optimum azimuth angles are 0 • (360 • ) or 180 • in every month.Therefore, when referring to the optimum results, the azimuth angle data are simplified to the sign in the discussion below: a positive sign means due south, and a negative sign means due north.Table 2 demonstrates the values of β opt obtained using the ergodic method, the PSO and the HS algorithm.In the ergodic results, β opt values from Sanya, Shanghai, Zhengzhou, Harbin, Mohe, and Lhasa ranges from −18.1 • (Jun) to 49.9 • (Dec), from −7.6 • (Jun) to 61.4 • (Dec), from 5.5 • (Jun) to 64.3 • (Dec), from 12.6 • (Jun) to 73.7 • (Dec), from 16.6 • (Jun) to 80.0 • (Dec), and from −8.9 • (Jun) to 59.9 • (Dec), respectively.The values of β opt are negative from May to July.The results also show that γ opt values obtained with the HS method are exactly the same as those obtained with the PSO method and ergodic method, and that the trend of β opt values in each month is roughly the same.
For further comparison, the statistical errors of PSO and HS for six typical climatic stations in China are shown in Table 4, obtained using Equations ( 21)- (24).According to MPE, MAPE, MABE, and RMSE, the errors of the HS model are lower than those of the PSO method.More specifically, the computational results show that HS errors are about 1 order of magnitude smaller than the PSO errors.The MPE of the HS method is between −0.0450% and 0.4376%, the MAPE ranges from 0.1105% to 0.4510%, the maximum of MABE is 0.0867 • , and the minimum of MABE is 0.0317 • .The RMSE value, which measures the accuracy of estimation, stays well between 0.0385 • and 0.1279 • .The data in Table 4 starkly illustrate that the monthly optimum tilt angle data obtained from the HS method are more accurate and reliable than that from PSO.The results indicate that the HS method is applicable to the optimization problem of the tilt angle and orientation for PV modules.

Conclusions
The tilt angle and orientation play an important role in maximizing the solar radiation collected by a PV panel.In this paper, the ergodic method is applied to the mathematical model of extraterrestrial solar radiation to determine the monthly optimum tilt angles and azimuth angles in six Chinese cities with different climates.The results of the ergodic method serve as a reference group.Then, the calculation of the optimum angles based on HS theory is presented.By comparing the results of the HS and PSO methods with standard results, the following conclusions can be drawn: 1.
In most cases, the best orientation is due south (optimum azimuth angle, 180 • ) in the selected cities.Except when the azimuth angle equals 180 • , the extraterrestrial solar radiation decreases as the tilt angle increases.

2.
The optimum tilt angle increases during the winter months and reaches a maximum in December for all of the stations.To enhance the energy collected by the panel, if possible, the tilt angle should be changed once a month.

3.
According to MPE, MAPE, MABE, and RMSE, errors with the HS method are less than those with PSO.Moreover, the extraterrestrial solar radiation of HS is larger than that of PSO.The application of HS performs better in the search for β opt .4.
The proposed approach, the HS method, provides an accurate and simple alternative to the ergodic method.The experimental results of the HS method are very close to the standard values.

Table 1 .
General information about selected six typical stations.

Table 1 .
General information about selected six typical stations.

Table 4 .
Statistical indicators (mean percentage error (MPE), mean absolute percentage error (MAPE), mean absolute bias error (MABE), root mean square error (RMSE)) of PSO and HS at six different climatic stations.