System for the Automatic Estimation of the Tilt Angle of a Flat Solar Collector

A R T I C L E I N F O A B S T R A C T Article history: Received: 01 June, 2017 Accepted: 20 July, 2017 Online: 15 August, 2017 In this work, a compact system for the automatic estimation of the tilt angle at any location of the world is presented. The system components are one computer, one GPS receiver and one Python program. The tilt angle is calculated through the maximization of the flux of direct radiation incident upon a flat solar collector. An estimation of the adjustments of this angle at different time periods are obtained. This angle is calculated in steps of six minutes during a whole year. Daily, monthly, biannually and yearly averages of this value are obtained. A comparison of the energetic gain when the tilt angle changes at the different time periods is made as well. Because, the algorithm doesn’t receive as an input the solar radiation incident upon a surface at the location of the calculation, a comparison was made between the results obtained and the results reported for the monthly tilt angle of 22 different places. The root mean square error obtained with this comparison was between 1.5 and 9.5 degrees. The monthly tilt angle estimated deviated in average for less than 6.3° with respect to the values reported for the different locations. Finally, the application of a correction factor in the monthly estimated angles is proposed, which might increase the collected energy.


Introduction
Recently, we reported a system having as a purpose the calculation of the sun trajectory during one day in a specific location [1]. In this paper, another system presenting enhanced capabilities with respect to the system presented in the above work is reported.
The energy that can be extracted from a flat solar collector depends to a large extent on the direction of solar radiation in relation to the surface of the panel. This will be maximum, when the sun rays and the surface are perpendicular to each other. Through, a solar tracking system the above condition can be fulfilled the whole time. However, it is cheaper and simpler to keep a fix solar collector for a period of time than to make two rotations along two different axes to achieve tracking. In systems with dual axis tracking the panel is rotated along the line pointing to the vertical of the place (surface azimuth angle) and it is rotated along the line east-west (tilt angle or slope).
In general, for the fixed panels the optimal surface azimuth angle is zero degrees. Therefore, the tilt angle is the only one that is adjusted to maximize the collected energy. In this respect, several studies to obtain the optimum tilt angle opt  at different locations of the world have been conducted. As for example: Athens [2], Izmir [3], four places in India [4], 5 regions in China [5], Sanliurfa [6], Tabass [7], two locations in India [8], eight provinces of Turkey [9], New Delhi [10], Helwan [11], Brunei [12], Syria [13], Surabaya [14], 35 sites of the Mediterranean region [15], Taiwan [16], Madinah [17] and the examples could continue.
In the literature, it is suggested that in the northern hemisphere the panels must be facing south. The optimum tilt angle depends of the geographical latitude of the place  . Not all of the studies are focusing in the calculation of an annual opt  . In some cases, this angle is reported in monthly or biannual (twice a year) time periods. Because, the selection of different time periods impacts the efficiency of the solar collector. For example, it was reported that in Madinah, a monthly adjustment of the tilt angle can enhance in 8% the captured energy than the one that can be obtained when this angle is kept fix during the whole year [17] continue. Unfortunately, the only way to obtain the optimum tilt angle is through radiation measurements at the place of interest for an extended period of time. This is due to the fact that solar radiation has different components, which are the direct, the diffuse and the albedo radiation. The optimum tilt angle, which is the ones that maximize the energy extraction is influenced in the way that these radiation components are distributed.
In this work, a system for estimation of the tilt angle considering exclusively the direct radiation is presented. This can be used in the locations that does not have a record of radiation measurements, or when the users or designers of the solar installations do not have a direct access to available radiation data. With this system in a very few minutes and with a minimum of interaction of the end user, several data used in the solar designs are obtained. Also, the tilt angle is calculated in time periods of six minutes, daily, monthly, biannual and yearly. A comparison of the energetic gain when the tilt angle changes at the different time periods is made as well. Finally, a comparison was made between the results provided with the proposed system and the ones reported for the monthly tilt angle of 22 different places. The root mean square error ( RMSE) obtained through this comparison was between 1.5 and 9.5 degrees. The estimation of the monthly tilt angle deviated in average for less than 6.3°. Also, an adjustment for each of the estimated monthly slope angles is proposed, which might reduce the energy loss.

Sun Position
In a fixed point on the Earth, due to the Earth's rotation and its movement around the sun, the direction of the beam radiation is changing in time. It is customary to describe the trajectory that follows the sun by using two angles, when the representation of the Celestial sphere is used. These are: the hour angle  and the declination angle for an equatorial coordinate system and the solar altitude angle s  and the solar azimuth angle s  for a horizontal coordinate system. The angle between the two planes; the one containing the Earth's axis and the meridian plane of the point of observation, and the other containing the Earth's axis and the meridian plane of the sun is  . At solar noon, i.e., when the sun is on the observer meridian 0   o . The angle between the equator and the sun position at solar noon is the declination. This angle in degrees is given by [23] 284 23.45sin 360 365 where n is the integer day number, being January 1st 1 n  . The declination is changing in time, but during one day is almost constant.
In the Figure  In the References [24][25][26][27][28] have been reported algorithms to calculate the sun position. The complexity and accuracy differ from each other. In this work, the fifth algorithm of the Reference [28] is employed, because it is easier to program and it is accurate from 2010 to 2110. The output of this algorithm are the angles The angles of the equatorial and horizontal coordinate systems are related to each other by [18] cos sin cos cos cos sin sin where the sign function is equal to 1  , if  is positive; otherwise is 1  .

Angle of Incidence on a Tilted Flat Solar Collector
In a fixed location, the sun moves across the sky along the day. By this reason, the beam radiation vector will make an angle i According to the geometry shown in the Figure 2. The unit vectors m and n are given by ˆˆˆŝin cos sin sin cos and ˆˆˆĉos cos cos sin sin Thus, the angle of incidence between both vectors after a few simplifications is cos cos cos( )sin sin cos The tilt angle is an angle between 90 that produce shadows over the collector surface, or in some cases when a set of two fixed panels are used for extracting energy. In this configuration, one of them is used in the morning and the other is employed after the solar noon [14].

Maximization of the Flux of Energy in Terms of the Tilt Angle
Recently, Handoyo and co-workers have exposed a mathematical procedure to calculate the optimum tilt angle of a solar flat collector [14]. In that work, cos i  is expressed in the equatorial coordinate system in terms of the following angles:  ,  ,  ,  and  . This equation is reported elsewhere as in Reference [18]. cos 0 dd  is tested. These tests will be applied to (6), which is expressed in terms of a horizontal coordinate system. The value of  , which corresponds to the critical point of where   cos cos Computing max  of (7) requires as inputs the date (month, day and year), the hour in decimal format, the geographical coordinates and the panel azimuth angle. If the magnitude of any of these variables changes, the value of max  is modified as well.

Sunrise, Sunset, Day Length and Local Standard Time
In the equator, the day length is 12.0 h during the whole year. But at latitudes different to this geographical point, this quantity is changing in daily basis. Up north of this latitude, during the summer the sun light is shining for a longer time, on the contrary during the winter. Therefore, the net energy that can be captured by a collector will depend to some extent on the day length. Of course, if there is no sun light, no solar energy can be obtained. By this reason, it is interesting to calculate the evolution of this variable, which is related to the sunrise and the sunset time. From (2), the sunrise hour angle in degrees can be obtained by making The sunset hour angle is ss The solar time ST in decimal hour is related to the hour angle by   15 12 In terms of the local standard time LST and a time correction factor TC is The time correction factor in minutes is given by where B in degrees is By combining (11) and (12), it can be obtained the local standard time in decimal hour as 12 60 15 With (9) and (16) This time doesn't observe the DST, and TZ follows the same convention applied to (13).

GPS Receiver
The global positioning system (GPS) receiver used in this work was the model ND-105C GPS Dongle from GlobalSat WorldCom Corporation. But, any GPS receiver that meets the National Marine Electronics Association (NMEA) requirements and that has the possibility of sending sentences through the serial port can be employed.
The above GPS receiver for the output data follows the protocol NMEA 0183. It returns four the sentences: GGA, GSA, GSV and RMC. The GGA sentence contains all the useful data introduced as an input in the program as the validity of satellite fix, the geographical latitude with the corresponding hemisphere and the local longitude with its relative position with respect to the prime meridian.

Python Program
The program used to perform the calculations was written in Python 3.6. It can be requested by email to the corresponding author. The flowchart of the program is shown in the Figure 3.
The time frame set in the calculations corresponds to one year. They will begin in the first day of the month at which the program was run, and they will end in the same day and in the same month of the next year.
The Spyder integrated development environment (IDE) included in the Anaconda distribution was chosen to debug and to run the program. The communication between the GPS and the computer is realized through the serial port. Therefore, pyserial module must be installed, it is freely available at: (https://pypi.python.org/pypi/pyserial). In order to the program to work properly the end user must provide the communication (COM) port at which the GPS is connected to the computer and it must configure the time zone of the Windows operating system (OS). This must correspond to the region at which the calculation of the tilt angle is going to be done. The DST changes are not considered in the program, and they must be ignored in the above configuration.
As it shown in the Figure 3, if the GPS is plugged, the GPS sentences are read through the serial port. From the GGA sentence all the required inputs are extracted (valid fix,  and l L ). When the fix is invalid the program will stop displaying a warning message. Otherwise, the program will continue doing computations. From the OS the date and the TZ are read by the program.
To obtain DL the program computes (9) and (10). The first equation requires the declination, which is calculated with (1). The latitude is provided by the GPS. sr LST is obtained with (16), when  is substituted by sr  , which is obtained with (9). ss LST is get when  is substituted by ss  in (16). The zenith angle at solar noon is calculated with the declination and the latitude. For places with greater latitudes than the tropics, this angle never will reach zero. For both tropics will be zero once a year. In places between the above latitudes will be reach zero twice a year.
Once the daily behavior of  .This means that the sun is not in the local horizon. In these particular situations, the program assign NaN values to all variables.
To estimate the average flux of solar radiation incident in the solar collector, the different values of  are generated by the program. In addition, the plot of the annual variation of cos i  is generated, when is evaluated with the following angles: max After this step, the program ends.

System Applications
The applications that can have the system can be briefly summarized as follows:  To have an insight of the working hours of the solar installations during a whole year, because these can operate just during the sun hours. The above variable is related to the day length, the sunrise and sunset times, which are provided graphically and in csv format files.
 To control a dual axis tracking system by the knowledge of the solar azimuth and the solar altitude angles. Both angles are provided by the system.
 To estimate the tilt angle that should follow one single axis tracking system in different periods of time. This can be done every six minutes, daily, monthly or biannual. To have an insight of the energetic gain that can have any of the above systems.
 To modify the program to extend its capabilities.

Results and Discussion
As stated above, the system can work at different locations. Just two conditions must be meet. On one hand, the correct COM port at which the GPS is detected by the computer must be set. On the other hand, the time zone of the location and the configured in the OS must match.
Several tests were realized to verify the proper operation of the system. However, they were realized in different places of same city, which was Mexico City.
As an example of the output data provided by the program, the results obtained during one test made in Mexico City will be presented. In the figure 6 the yearly evolution of DL is presented. The shortest day length will be in December 21st, 2017 and it has a value of 10 h and 49 min. It is not surprising that this date corresponds to the winter solstice. The day length reaches a maximum value of 13 h and 10 min. This will happen in June 21th, 2017, which corresponds to the summer solstice.

Annual Evolution of
In the Figure 7 the yearly evolution of the sz  at solar noon is presented. Due to the fact that Mexico City is located between the equator and the Tropic of Cancer, twice a year sz  is zero at solar noon. One of these dates corresponded to May 18th, 2017 and the other will occur in July 25th, 2017. The global maximum of sz  is 42.96 o and it will be reached in the winter solstice. The local maximum, with a value of 3.94°, will happen in June 21st, 2017, which corresponds to the summer solstice.        Table 1. Report summarizing the generated results of the program.
As expected, the greater flux incident on the collector surface is obtained when the panel is moved every six minutes.
Surprisingly, cos i  doesn't vary much when is evaluated with One file with the csv format summarizing the above results is generated, when the program is executed. This report is presented in the Table 1 The respectively. It is interesting to note that an energetic gain of ~1% is obtained by adjusting the tilt angle every six minutes than doing it every month.

Evaluation of the Algorithm
The optimum tilt angle at a given location requires of the measurements of the solar radiation. Therefore, to evaluate the algorithm one comparison was made between the results obtained and the results reported for the monthly tilt angle of 22  input manually to the algorithm. The monthly optimum tilt angle of this places is reported in the References [3][4][5][6][7][8][9][10][11][12][13]. As a measure of the deviation the RMSE was calculated. This is given by where 1,t x and 2,t x are two time series, and n in (18) is the number of data. The results of this comparison are shown in the Table 2. During these simulations the daily time interval was always short t .
In each of the rows corresponding to the twelve months of the year the difference between the reported tilt angle and the calculated with the algorithm is shown. A negative sign means that m  was underestimated, on the contrary the angle was overestimated. In these simulations, the average m  always was overestimated as it can be seen in the last row. Near the winter and summer solstices the variation was larger than in other months.
The better estimations of m  were obtained in March and in October. The greatest RMSE was found for the city of Mohe (9.21°). The smallest discrepancy for this variable was found for the city of Aligarh (1.59°). In each of the rows corresponding to the twelve months of the year the difference between the reported tilt angle and the calculated with the algorithm is shown. A negative sign means that m  was underestimated, on the contrary the angle was overestimated. In these simulations, the average m  always was overestimated as it can be seen in the last row. Near the winter and summer solstices the variation was larger than in other months. The better estimations of m  were obtained in March and in October. The greatest RMSE was found for the city of Mohe (9.21°). The smallest discrepancy for this variable was found for the city of Aligarh (1.59°).

Correction Factor
The results of the section 4.3 suggests that by considering exclusively the direct sun radiation, m  is overestimated. Therefore, we propose an empirical expression, in which the monthly tilt angle might be estimated better by where ˆm  is a new estimation of the monthly tilt angle and   is the correction factor, which can be obtained from the last row of the table 2. This correction might help to improve the value of the monthly tilt angle calculated with the program presented in this work.

Conclusions
A system for the estimation of the tilt angle in different world locations has been implemented. The computation of this angle is realized for different time periods.
Data provided by a GPS receiver are automatically passed to an algorithm without the intervention of the user. This approach might be more effective and it may avoid errors.
The code is written in a high-level programming language, which makes the process of increasing its capabilities simpler.
The estimation of the yearly evolution of average radiation flux incident on the collector surface for different angles shows that the monthly variation of the tilt angle produces almost the same energetic gain than moving this angle every six minutes.