Abstract

Sun position and the optimum inclination of a solar panel to the sun vary over time throughout the day. A simple but accurate solar position measurement system is essential for maximizing the output power from a solar panel in order to increase the panel efficiency while minimizing the system cost. Solar position can be measured either by a sensor (active/passive) or through the sun position monitoring algorithm. Sensor-based sun position measuring systems fail to measure the solar position in a cloudy or intermittent day, and they require precise installation and periodic calibrations. In contrast, the sun position algorithms use mathematical formula or astronomical data to obtain the station of the sun at a particular geographical location and time. A standalone low-cost but high-precision dual-axis closed-loop sun-tracking system using the sun position algorithm was implemented in an 8-bit microcontroller platform. The Astronomical Almanac’s (AA) algorithm was used for its simplicity, reliability, and fast computation capability of the solar position. Results revealed that incorporation of the sun position algorithm into a solar tracking system helps in outperforming the fixed system and optical tracking system by 13.9% and 2.1%, respectively. In summary, even for a small-scale solar tracking system, the algorithm-based closed-loop dual-axis tracking system can increase overall system efficiency.

1. Introduction

With the rapid growth of population and economic development, there is an increasing concern due to the energy crisis and environmental pollution; researchers are trying to explore new technologies for the production of electricity from clean and renewable sources such as solar and wind. Solar energy is one of the primary sources of clean, abundant, and inexhaustible energy that not only provides alternative energy resources but also improves environmental pollution. Moreover, the accessibility of this energy is significantly higher in a subtropical country, like Qatar. Annual Direct Normal Irradiance (DNI) of 1800 kWh/m2/y is enough for concentrated solar power plants, where Qatar has DNI value of 2008 kWh/m2/y. DNI between the range of 2000 to 2800 kWh/m2/y is considered feasible [1]. Thus, Qatar has a huge potential for harnessing the solar energy via a solar photovoltaic (PV) power plant. It is possible to convert solar energy into mechanical energy or electricity with adequate efficiency. Information about the quality and amount of solar energy available at a specific location is of prime importance for the development of a solar energy system. However, the amount of electricity that is obtained is directly proportional to the intensity of sunlight falling on the photovoltaic panel.

To get a larger amount of solar energy, the efficiency of photovoltaic systems has been studied by a large number of scientists and engineers. In general, there are three ways to increase the efficiency of photovoltaic systems [2]. The first method is to increase the efficiency of power generation of the solar cells, the second is related to the efficiency of the control algorithms for the energy conversion, and the third approach is to adopt a tracking system to achieve maximum solar energy. The focus area of this paper is to increase efficiency by combining the second and third approaches. Several solar controlling and tracking systems are proposed in the literature; one can classify them according to their degrees of freedom (DoFs) and/or control strategy. Regarding DoF, there are three main types of trackers [3]: fixed devices [4], single-axis trackers [5], and dual-axis trackers [6]. Different researchers have reported the potential system benefits of using a simple single-axis tracking solar system [7, 8]. The data acquisition, control, and monitor of the mechanical movement of the photovoltaic module were implemented based on a programmable logic-controlling unit. Some researchers [915] also present the design and construction of a two-axis solar tracking system in order to track the photovoltaic solar panel according to the direction of beam propagation of solar radiation. To achieve maximum solar energy, solar power systems generally are equipped with devices, which are calculating the maximum power point tracking (MPPT) [1619].

Regarding the control strategy, three main types of solar trackers exist: passive, open-loop, and closed-loop controlled trackers. The passive trackers have no electronic sensors or actuators, but rather, various properties of matters (thermal expansion, pressure control, or other mechanical arrangements) have been used for the solar position prediction [20, 21]. The passive sensor-based solar positioning system does not measure the solar position accurately, although they are reliable and simple in design due to exclusion of any electronic control or motors and are almost maintenance-free [20]. However, the system is not able to track the temperature variability that happens from one day to another. In addition, the system can lead to unpredictable movement due to the mechanics. Such unpredictable movement happens especially on overcast days, when the sun is visible and invisible due to the clouds or when the sun is randomly covered by clouds. Moreover, real-time implementation of the solar positioning system accurately is difficult due to the calibration required for the smooth operation of the system. The open-loop ones have no sensors either but use a microprocessor and are based on the sun position algorithm using a mathematical formula to obtain the station of the sun at a particular location and time, and it does not need to sense any physical quantity [2224]. The third kind of trackers uses the information of electrooptic sensors [2529] (auxiliary bifacial solar cell panel, charge-coupled device (CCD) camera, photocell, light-dependent resistors, etc.). These systems are popular as these have positive effect on increasing efficiency in sunny days. However, these systems fail to measure the solar position in a cloudy day or intermittent sunny day. Such systems are complex due to the usage of different and/or numerous sensors. Moreover, it requires a very precise installation. An open-loop type of controller does not observe the output of the processes that it is controlling. Consequently, an open-loop system cannot correct any errors and thus may not compensate for disturbances in the system. The system is simpler and cheaper than the closed-loop type of sun-tracking systems [30]. In the open-loop mode, the computer or a processor calculates the sun’s position from the formula or algorithms using its time/date and geographical information to send signals to the electromotor. However, in some cases, many sensors are used to identify specific positions [31, 32]. Among the many works done in the design and implementation of a low-cost dual-axis autonomous solar tracker, recently, Gabe et al. have worked on designing a complete autonomous solar tracker [33] which is an example of a closed-loop controlled tracker using light-dependent resistors (LDRs) and has the same issues which are discussed earlier.

A good number of real-time solar position measurement algorithms have been developed (sun position algorithm (SPA) [34], Astronomical Almanac’s (AA) [35], and Roberto Grena’s Energy and Sustainable Economic Development (ENEA) [36]) which are more accurate to measure the solar position than the sensor-based solar positioning system. Several researchers [37, 38] have implemented the sun position algorithm to detect the sun position accurately in a microprocessor and personal computer platform. These algorithms are mainly developed for locating the sun position using a standard microprocessor-based system which is not standalone and not applicable in remote areas due to power and management requirements. It is difficult to implement standard algorithms in the standalone electronic control system due to computation complexity of the sun position algorithms, which could offer highly reliable real-time sun position information without much increasing system cost and avoiding the requirement of time-to-time calibration.

A solar position system that can work standalone without the necessity of being developed in a powerful microprocessor with the standard solar positioning algorithm used for positioning is worthwhile. In this work, a simple, cost-effective algorithm-based reliable two-axis tracking system has been developed for real-time solar position measurement on an 8-bit microcontroller platform. Firstly, a comparative MATLAB-based (The MathWorks, Natick, MA) simulation study was carried out between three popular solar positon algorithms: SPA, AA, and ENEA. Secondly, the most feasible and relatively accurate algorithm was implemented in an 8-bit microcontroller to compare its performance in comparison to simulation. Thirdly, three different tracking systems, fixed orientation PV solar panel, four light-dependent resistor- (LDR-) based optical sensor, and AA algorithm-based dual-axis closed-loop solar tracker, were designed and implemented in an 8-bit microcontroller platform. Finally, the dual-axis solar tracker’s performance was compared with the fixed orientation PV solar panel and optical solar tracking system. The prototyped system was evaluated with the MATLAB-based simulated results and real-time sun position results from the prototype system.

This paper is organized into sections. Section 2 is describing the system materials and methods along with the comparisons between the proposed and popular sun position algorithms. Section 3 shows the comparisons of outcomes between the fixed orientation PV solar panel and optical solar tracking system with the proposed solution, and finally, the conclusion is drawn in Section 4.

2. Materials and Methods

2.1. System Block Diagram

The main elements of a typical solar tracking system are the sun-tracking system, control unit, positioning system, drive mechanism, and sensing devices. The system architecture of the optical sensor-based and proposed systems is shown in Figure 1. The main difference in both systems is that the first one requires a signal conditioning circuit and LDR sensors; however, the latter one does not need any sensor except a real-time clock (RTC) to input real-time to the algorithm. The system block was implemented in the ATmega382P microcontroller along with the Arduino development board. The ATmega328 is a single-chip microcontroller created by Atmel (known as Microchip Technology now). It has a modified Harvard architecture 8-bit (reduced instruction set computer) RISC processor core. ATmega328P, in 28-pin narrow dual in-line package (DIP-28N) version, was used in the implementation. Arduino integrated development environment (IDE) v1.6.12 in the Windows platform was used to compile the code written in C++ language. The compiled program was uploaded on the Arduino UNO, an open-source microcontroller board based on the Microchip ATmega328P microcontroller and developed by Arduino.cc. It was uploaded on the ATmega328P with the Arduino IDE via a type B USB cable. The motor controllers were implemented in the Arduino motor shield. The tracker has two degrees of freedom, which is required to track the solar position using its azimuthal and elevation angles.

The PDV-P8001 photoresistors (made from cadmium sulfide (CdS)) from Adafruit were used in this work. The diameter of the LDRs is 5 mm, while the height is 2.09 mm. The LDRs are placed at the top of the centre of the solar panel in the arrangement shown in Figure 1. The horizontal separation between the LDRs 1 and 2 and LDRs 3 and 4 is 5 mm, whereas the diagonal separation between LDRs 1 and 4 and LDRs 2 and 3 is 10 mm. The solar panel was a small uxcell polycrystalline solar panel (6 V, 120 mA, and 0.65 W) to proof the concept of the tracker. The YMT22 Optical Encoder hollow shaft incremental motor servomotor encoder was used with the FS5106R FEETECH Continuous Rotation Servo. Figure 2 summarizes the components used in this work.

The basic operation of the systems is described as follows. The microcontroller sends signals (as pulse width modulation (PWM)) to the servomotors, which have integrated gears and a shaft that can be controlled. Two servomotors are for rotating the solar panel about the horizontal and vertical axes so that it can move the solar panel toward the sun. The microcontroller calculates the sun position from the algorithm using the geographical location, time, and date (using a DS1302 real-time clock (RTC) module) as shown in Figure 1(b). Elevation and azimuth angles were calculated, and the microcontroller commanded the servomotors to the desired angles. Optical encoders were attached to the shaft of each motor so that the amount of rotation accomplished by each motor can be tracked, and if any deviation occurred, the controller would fix that.

2.2. Sun Position Algorithms

The sun position algorithms calculate the solar azimuth () and elevation (EL) () angles of the sun. These angles are then used to position the solar panel toward the sun. The zenith angle () is the angle between the direction of the sun (direction of interest) and the zenith (straight up or directly overhead). The sun elevation or altitude () is the angle from the horizontal plane and the sun’s central ray or just the compliment of the zenith angle (90°-zenith angle). The azimuth angle (Az) () is measured clockwise from true north to the point on the horizon directly below the object.

Figure 3 depicts the parameters associated with the sun position measurement. The elevation angle () is calculated using any one of the following formulas (depending on the algorithm such as is the elevation angle calculated using the SPA, is the elevation angle calculated using the AA algorithm, and is the elevation angle calculated using the ENEA algorithm): and the azimuthal angle is calculated by any algorithm (such as ΦSPA is the azimuthal angle calculated using the SPA, ΦAA is the azimuthal angle calculated using the AA algorithm, and ΦENEA is the azimuthal angle calculated using the ENEA algorithm) as follows: where is latitude, is the declination angle, is the topocentric declination angle, is the hour angle, is the topocentric hour angle, and and are approximate sine and cosine of the hour angle, respectively.

The comparison of the three algorithms is necessary for feasibility study of the electronic implementation of the algorithms in an 8-bit microcontroller. Therefore, a comparative simulation study, in terms of both implementation complexity and computational cost, of those algorithms was carried out, and results are described in Section 3.

2.3. Simulation Study

Simulations of the three popular algorithms (SPA, AA, and ENEA) have been carried out in MATLAB (R2015a) [18], and the in-house built MATLAB codes were tested in a Windows machine with Pentium Dual-Core 2.2 GHz CPU, 2 GB RAM, and 64-bit Windows 7 operating system.

MATLAB script for each algorithm (AA, ENEA, and SPA) was tested separately to get the sun position ( and angle) at three randomly chosen days over the year (March 21, July 10, and December 15, 2016) which represent winter, beginning of summer, and midsummer. The location (lat: 25.37463 and long: 51.49128) of Qatar University (QU) was used for simulation and experimental study. In the AA algorithm, the sun position was calculated for the mentioned dates using date, time, latitude, and longitude as input parameters. However, both ENEA algorithm and SPA require one additional parameter altitude (31 m) of the location. The absolute difference between the simulated elevation and azimuth angle among each other for ENEA, AA, and SPA was calculated to evaluate the performance of the algorithms. SPA is capable of calculating the solar elevation and azimuth angles in the period from the year -2000 to 6000, with uncertainties of ±0.0003, which reflects a very high accuracy [34]. However, the algorithm is a slow algorithm for the computation of the sun position with respect to an observer at the ground surface.

2.4. Experimental Study

The AA algorithm was used in this work for implementation because of its simplicity, reliability, and fast computability of the solar position valid for the long period of time (1950-2050) (with uncertainty of greater than ±0.01°) [35] compared to another fast algorithm ENEA (valid for only 2003-2022) (with the minimum uncertainty of ±0.002°) [36]. On the contrary, SPA is very accurate and valid until year 6000 but is a slow algorithm for the computation of the sun position. Moreover, implementation of SPA in an 8-bit microcontroller is not possible because of its complexity whereas the accuracy of AA is comparable to SPA, and AA is well recognized for computing the sun position. Moreover, the AA algorithm has been compared with other standard algorithms (ENEA and SPA) using MATLAB simulation to show the relevance of using AA for implementation.

To evaluate the performance of the algorithms and to decide whether it is worth to implement AA or ENEA algorithms experimentally, the simulated elevation and azimuth angle for the three mentioned dates were plotted against the hours of the day. Figure 4 shows and angle for the three algorithms on March 21, July 10, and December 15, 2016, respectively.

2.5. System Implementation

Implementation of the most accurate SPA in an 8-bit microcontroller was not possible because of its complexity whereas AA is also very accurate and well recognized for computing the sun position using mathematical equations, implementable in an 8-bit microcontroller. The “AA algorithm” must be implemented as a function of the location and time of the specific site where the equipment will be placed. A prototype of the fixed inclination solar panel, closed-loop dual-axis tracking system (as shown in Figure 5(a)) was developed using the conventional optical-based (LDRs) tracking and sun position algorithm-based tracking (Figure 5(b)) to compare the performance of the systems. The optical tracking system is based on four LDRs that will detect the light levels and convert them to voltages which were compared by the microcontroller to determine the brightest region. On the contrary, the location of the sun was calculated using the AA algorithm to find azimuthal (Az) and elevation (EL) angles of the sun to adjust the orientation of the solar panel. The advantage of using the ATmega328P microcontroller for implementation is that there are several trigonometric functions, which are essential to implement the AA algorithm, which are already available as built-in functions. To compare the tracking-based systems with the fixed system, the solar system was placed at 81° fixed inclinations to the zenith. The voltage measured by the microcontroller onboard 10-bit analog-to-digital converter (ADC) is the open-circuit voltage measured across the PV panel. The photovoltaic (PV) terminals were connected to the ADC input of the microcontroller through a voltage divider network to make sure that the voltage applied at the input of ADC remains smaller than 5 V while the PV panel is producing maximum voltage. This is because the ADC input of the microcontroller can withstand maximum of 5 V. The voltage reading acquired using the microcontroller was compared with the Fluke 117 Electricians True RMS Multimeter, which shows a good agreement between the microcontroller reading and the Fluke meter reading. For further quantification of the performance of the proposed system with respect to contemporary systems, this study calculated the area under the voltage-time curve (AUC) of the panel voltage vs. time graphs obtained from the three systems. AUC was calculated by the trapezoidal rule. It consists in dividing the voltage-time profile into several trapezoids and calculating the AUC by adding the area of these trapezoids. Several experimental data were taken from the three systems which were placed at the same location and time to make sure that all systems are illuminated under the same condition. Each experimental data was acquired in a different day, but operating duration was the same (sunrise to sunset).

3. Results and Discussion

Figure 4 shows that the solar positions simulated at different hours of three different days were very similar. Figure 6 shows that the ENEA algorithm’s accuracy is higher than that of the AA algorithm, but the ENEA algorithm will not be valid after 2022. The overall difference in the solar position using AA from SPA is not higher than 0.4°. Since the SPA is computationally expensive and not implementable in a low-speed, low-power-consuming microcontroller, the computationally cost-effective AA algorithm was implemented for the experimental study. The difference between the simulated and experimental values for the elevation and azimuth angles obtained in three individual days was calculated and plotted in Figure 7, where in all cases the difference was less than 0.6°. So, the outcome of the proposed implemented system has almost the same performance compared to the ideal case which was simulated in the computer. This error could be introduced due to the 8-bit implementation of the AA algorithm. Furthermore, the experimental results shown in Figure 8 were recorded from the prototype systems at the same time on an intermittently cloudy day in three scenarios: with the solar system placed at 81° fixed inclinations to the zenith, with optical tracking, and with solar position-based tracking. The results confirmed that the proposed system outperforms significantly from the fixed solar system and also the conventional optical tracker. Furthermore, the algorithm-based proposed system was more stable than the optical one. The operation of this system is independent of periodic calibration, and it can be made independent of geographical location by adding a Global Positioning System (GPS) receiver in the system.

The panel voltage acquired in a sunny day is shown in Figure 7. However, it is obvious that the uncertainty in the voltage reading of the microcontroller-based voltmeter is 2.44 mV (half of the resolution of the ADC, 5 V/(210/2)). Therefore, the uncertainty in the reading is quite small. Moreover, with the advancement of embedded electronics, it is possible to get a cheap and miniature microcontroller with a higher number of ADC bits which can measure voltage with much higher accuracy. The area under the panel voltage-time curve (AUC) (an example is shown in Figure 8) reflects the actual energy harnessed by the solar panel after positioning the system toward the sun and is expressed in . This AUC is dependent on positioning of the tracker toward the sun, time of the operation, and the energy-harnessing capability by the system. The total amount of energy harvested by the system may be assessed by adding up or integrating the amounts eliminated in each time interval, from time zero (time of the initial operation of the system) to infinite time. This total amount corresponds to performance of the tracker in terms of the energy harvested from the sun by the system. The AUC is directly proportional to the incidence of solar radiation falls on the panel. That is, it has high value during noon of a shiny day but zero value at night.

Table 1 shows the AUC values of the three systems which shows that our proposed algorithm-based system (has the highest average AUC value) outperformed over other conventional systems. Therefore, the tacker with the highest average AUC value indicates the best performance in terms of energy harvesting from the sun which indicates the best positioning of the system toward the sun. It is therefore apparent from the table that the algorithm-based tracker outperforms over fixed tracking and optical tracking by 13.9% and 2.1%, respectively. Moreover, the standard deviation calculated over the trials showed that the algorithm-based tracker provide the least variation in the trials, which reflects the highest throughput of the system with stable system response.

4. Conclusions

A real-time solar position tracking system was successfully implemented using the AA algorithm, which is implementable in an 8-bit microcontroller. The additional hardware requirement for identifying the solar position using the AA algorithm is minimum while the solar tracking code was executed in less than a second, which makes it suitable for real-time application using an 8-bit microcontroller. Moreover, the algorithm is valid till 2050, and therefore, this algorithm will be usable in the next three decades. In order to show the accuracy of the AA algorithm, it was compared to other standard algorithms (ENEA and SPA), where it was proved that the accuracy of the AA algorithm is comparable to other algorithms in measuring the sun position. Moreover, the measured solar panel voltage also reflects that a close-loop algorithm-based dual-axis tracker can be implemented using an 8-bit microcontroller, which outperforms a conventional optical tracker without adding system cost. Other benefits of the proposed system are that it is standalone with high accuracy in tracking the sun position (maximum uncertainty of position detection is 0.6°). In this small-scale prototype implementation, we did not consider the lead resistance of the photoresistors. For a large full-scale operational system, the designer needs to consider lead resistance for the photoresistors. However, this limitation can be easily removed by incorporating a wireless photoresistor data transmission system to the main controller using radio frequency (RF) chips (e.g., nRF24L01) or a miniature microcontroller with an embedded Bluetooth module (e.g., RFduino). Therefore, in the small-scale prototype implementation, we did not consider this aspect of the design, which we believe can be minimized easily for large-scale implementation. In the future, the proposed electronic implantation of the algorithm will be validated for the solar concentrator system.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors certify that they have no affiliations with or involvement in any organization or entity with any financial interest or nonfinancial interest in the subject matter or materials discussed in this manuscript.

Acknowledgments

The authors would like to thank Qatar University for granting the student grant (QUST-CENG-SPR\2017-23) which made this work possible. We would like to thank the Mechanical Engineering Department, Qatar University, for their assistance in designing the mechanical system.