A comparison of two automatic solar tracking algorithms

. Due to global climate change as a result of pollution caused by the burning of fossil fuels, the world has changed its view when it comes to power generation. The focus is now more on natural and clean energy, such as solar PV systems. An effective solar PV system is not a simple system, as the sun is not a stationery object. The sun moves from east to west daily and that makes the design and installation of an effective solar PV system challenging for optimal power harvesting. The purpose of this paper is to compare two algorithms (linear regression and fuzzy logic) that are applied to a dual-axis tracker in order to maximize the output power yield that may be obtained from a fixed-axis system. One fixed-axis PV module serves as the baseline for comparing the results of the dual-axis trackers that are controlled by the two algorithms. A key recommendation is to align a PV module perpendicular to the sun from sunrise to sunset using a control algorithm based on fuzzy logic principles in order to extract the maximum amount of available energy.


Introduction
As a kind of clean and renewable energy source, solar photovoltaic (PV) systems have been drawing attention, especially in the field of electricity generation, due to the shortage and pollution effects of fossil fuels [1]. The amount of power produced by a solar PV system is directly proportional to the amount of sunlight which it receives. As the sun"s position changes throughout the day, a solar PV system"s tilt and orientation angles should be adjusted so that it produces the maximum possible amount of output power [2]. An important part of a solar PV system is the PV modules that produce maximum output power when direct solar radiation strikes its top surface at 90° angles. Constantly aligning it perpendicular (90°) to the sun"s rays results in more solar energy collection by the PV module [3]. Optimizing the output power of a PV module improves the overall efficiency of a solar PV system. The maximum output power of the PV module depends on atmospheric conditions (such as air pollution and cloud movements), the load profile, the tilt and orientation angles [4]. Several techniques have been implemented in order to maximize the energy obtained from PV modules, including the use of a solar tracking system [5]. The motion of tracking could be a single-axis or dual-axis tracking system [6]. The purpose of this paper is to compare two algorithms (linear regression and fuzzy logic) that are applied to a dual-axis tracker in order to maximize the output power yield that may be obtained from a fixed-axis system.

Literature study
A PV module is usually mounted on top of the roof of a building or in an open area to face the sun. The custom is to fix a PV module"s tilt angle to the location"s latitude angle or seasonally try to adjust the module"s direction manually towards the sun; currently known as fixed-axis systems. The literature suggests that the introduction of a dual-axis automated system collects more solar radiation than a fixed-axis system [7]. Over the years, researchers have developed smart solar tracking systems to increase the amount of energy generation. Before the introduction of solar tracking methods, fixed solar modules were positioned with a reasonable tilted angle based on the latitude of the location. The introduction of an automated system may improve existing power generation schemes [8].
As the sun"s position changes hourly, solar PV modules should be adjusted constantly to produce the maximum output power. Fixed-axis tracking systems are considerably cheaper and easier to construct, but their efficiency is lower than the dual-axes systems [9]. A dualaxis tracking system follows the sun from east to west together with the sun"s altitude; this enables direct solar radiation to be perpendicular to the solar PV module"s top surface [10]. Tracking around two axes increases its energy yield by 30% over the fixed-axis system [11]. Varying the tilt and orientation angle of an adjustable PV module automatically, to align it to the direct beam radiation of the sun increases the conversion efficiency between solar energy and electrical energy; however, the implementation of various control techniques for automatic solar tracking remains challenging. The envisioned control techniques include linear regression and fuzzy logic in conjunction with LabVIEW software to control two linear actuators to meet the requirements for a dual-axis tracker.
PV module radiation can be estimated using linear regression algorithm [12]. Linear regression analysis is a statistical technique for investigating and modelling the relationship between input variables [11]. The linear regression model using the least-square method is a way of fitting a straight-line model to observed data. This would be predicted based on the two previous input values of the output power measured from the PV module. Solar radiation cannot be manipulated; it varies throughout the day, causing changes in plant dynamics and strong perturbations in the process. A special subclass of fuzzy logic algorithm may be used to obtain adequate control signals for various operating conditions [13]. The algorithm is based on a few fuzzy rules [14]. With the PV modules voltage and current serving as input values, the rules are set based on their instantaneous recorded magnitudes.
National Instruments (NI) LabVIEW, a graphical programming language, is rooted in automation control and data acquisition. Its graphical representation, like a process flow diagram, was created to provide an intuitive programming environment for scientists and engineers. LabVIEW has several key features, making it a good choice in an automation environment [15]. It is easier to interface LabVIEW with real-world signals, analyse data for meaningful information and share results [16] while also providing for accuracy [17]. LabVIEW software may be used to control linear actuators that adjust PV modules to different angles. Linear actuators can provide better efficiency, better dynamic performance, and smoother operation [18]. Three actuators are usually used. Two horizontal actuators vary the orientation angle by moving the PV module either to the right or the left of 0° north. The vertical actuator varies the tilt angle by moving the module upwards or downwards (between the horizon (0°) and the sky (90°)).
The tilt angle is defined as the angle between the PV module surface and the horizontal plane while the orientation angle is defined as the angle between true south (or true north) and the projection of the normal of the PV module to the horizontal plane [19]. The tilt and orientation angles of a PV module are shown in figure 1.
The orientation and tilt angle angles should be constantly adjusted for optimum power yields. However, for fixed-axis systems, the PV modules should be placed at an orientation angle of 0° with tilt angles corresponding to the +10°, 0° and -10° of the latitude angle of the installation site for optimum output power from a stationary PV module. These angles are derived from the Heywood and Chinnery equations of latitude for calculating tilt angles of PV modules in South Africa [19]

Practical setup
The purpose of this research is to optimize the output power from a PV module by constantly aligning it to the direct beam radiation of the sun. Three PV modules with the same load profile of three 0.82 Ω and 1 Ω resistors (100 W) are used. One PV module is set to an orientation angle of 0° with a tilt angle of 26° north. This serves as a fixed-system providing a baseline or reference for comparison purposes. A reference tilt angle of 26° is used in this research, corresponding to the latitude value of the installation site at the UNISA, Florida Campus, which is lying on the elevated plateau of the interior of South Africa. Two dual-axis systems exist where the PV modules move between 0° and 90° (tilt angle around the Y-axis) and between -90° and +90° (orientation angle around the X-axis). The two tracking PV modules are controlled using linear regression and fuzzy logic. The orientation and tilt angles of the dual-axis tracking systems are changed throughout the day in accordance with the control mechanisms housed in LabVIEW.
Voltage and current measured from the PV modules are relayed to LabVIEW where the power is calculated and used in subsequent control mechanisms. A signal is then relayed back to the tracking system where actuators are used to adjust the orientation and tilt angles of the PV modules. Figure 2 illustrates the PV modules. The entire system consists of six PV modules; in this paper, the results of only three modules are reported on as pertaining to the purpose of the paper.
The practical setup has three identical PV modules (a 310 W YL310P-35b polycrystalline PV module with a rated voltage = 36.3 V, open circuit voltage = 45.6 V, rated current = 8.53 A and short circuit current = 8.99 A. Identical actuators are used on the dual-tracking system (SKF type with a rated load = 500 N, rated voltage = 24 V dc, rated current = 4 A maximum and a 25% duty cycle). The data logging interface circuit provides signal conditioning between the PV module and the data acquisition (DAQ) equipment. The main function of a signal conditioning circuit is to scale down signal voltage and add offset voltages [20]. It is oriented towards limiting the input voltage to the DAQ system to less than 10 V as the DAQ system can only handle a maximum input of 10 V.  Figure 3 illustrates the data logging interface circuit, that is also used as the system load, featuring high power resistors that are chosen to satisfy the voltage divider rule. A typical voltage divider consists of two or more resistors connected in series across a source voltage. As the source voltage is dropped in successive steps through the series resistors, any desired portion of the source voltage may be "tapped off" to supply individual voltage requirements [21]. The voltage divider circuit provides signal conditioning, as the output voltage of the PV module (open circuit voltage = 45.6 V) is much higher than the allowed input voltage to the NI DAQ unit which is limited to 10 V. Using three 0.82 Ω and 1 Ω resistors (100 W) in series enables the input voltage to the NI DAQ to be less than 10 V. This DAQ is connected directly to a computer running the LABVIEW software where measurements are recorded and the control algorithms are implemented.  Figure 4 illustrates the fuzzy logic controller block diagram in LabVIEW. Fuzzy logic algorithm is mainly used due to its ability to deal with uncertainty and ambiguous situations that may arise from varying environmental conditions in the Highveld of South Africa. Fuzzy logic algorithm purpose is mainly to apply its fuzzy based rules to drive PV module. The main components of fuzzy logic are fuzzy set, membership function and fuzzy IF-THEN rule base [22]. The rules are set based on whether the PV module output parameters (voltage and current) are minimumaverage parameters = move; maximum parameters = stop. Fuzzy logic makes use of its measured voltage and current as feedbacks. At 6 am when the program starts to run, the PV module is moved to its the start position (-90° orientation and 0° tilt to the sun). The system measures its instantaneous voltage and current and then compares it to the previous readings read from the shift register. If the latest readings are greater or equal to the previous value, then the PV module tilts forward to check if the readings cannot get better. If the latest voltage reading is less than the previous reading, then the PV module tilts backward, monitoring the change in voltage and current readings. The PV module movements happen once every four seconds preventing oscillating. The "fuzzy logic current" label in figure 4 is the numeric indicator displaying the measured analog current, while FLC is the numerical indicator displaying the measured current digitally. Figure 5 presents the linear regression controller block diagram in LabVIEW. Linear regression algorithm is used mainly because of its simplicity and accuracy. For linear regression, the PV module moves to the start position (-90° orientation and 0° tilt to the sun) every morning at 6 am. The PV module then starts moving at intervals of 4 seconds only in the forward direction. The PV module moves only when the voltage reading is less than the previous reading. Unlike the fuzzy logic, this setup never moves backwards in the X-axis (Horizontal), but it"s allowed to adjust the Y-axis forwards or backwards (Vertical). The Y-axis and the X-axis never move at the same time as this allows more accurate direction movements for both axes. The "linear regression" label is the numeric indicator displaying the measured analog current, while LRC is the numerical indicator displaying the measured current digitally.

Research methodology
For calibration purposes, the three identical PV modules (fixed-system at 0° orientation and 26° tilt angle, dual-axis with linear regression and dual-axis with fuzzy logic were fixed at a 26° tilt angle and 0° orientation angle. The intention of calibrating the system was to eliminate any bias between the systems. Calibration of equipment is of vital importance before measurements can be taken so as to ensure accuracy and to validate any future measurements as being reliable [23].
The measurements were calibrated using a Rish Multi 16S True RMS multimeter on 09 February 2019. This was done by physically measuring the output voltage across the load resistors and the current flowing through the 1 Ω resistor. These values correlated well with those shown on the LabVIEW user interface as shown in Table 1. Before any conclusion could be reached after recording results on the 29 th January 2019, it was important to recheck the calibration of the system to ensure the validity and reliability of the results.
The LabVIEW user interface was used to visualize the measured data. It was designed and developed for this research pertaining to the operating parameters of PV modules and linear actuators. The sample interval (measurements taken every 4 seconds) and cycle duration of 12 hours (6 am -6 pm) may be adjusted after each complete cycle, as LabVIEW first needs to close an opened text file on the hard drive of the computer. This text file contains the measurements displayed on the user interface, which are only saved at the end of the complete cycle.

Results
The calibration readings were compared to the available readings in the LabVIEW user interface, so that the instantaneous voltage and current values displayed on the interface equalled the values displayed on the digital multimeter. The system was calibrated between 12:30 noon and 1 pm when the sun was perpendicular to all the PV modules. The measurements were first done on the 26° fixed PV module. Current of 8.29 A from the PV module was measured (physically) while the LabVIEW interface displayed 8.27 A. The readings (currents and voltages) measured physically and displayed by the LabVIEW interface within the 30 minutes time are displayed in table 1. Figure 6 visually presents the output of all three systems for one day that are observed to be similar, thereby achieving calibration. The results of using the solar-tracking systems along with the fixed-axis system is shown in table 2. This represents one day, being 29 January 2019. Unlike figure  6, where all the modules provided an output voltage of 0 V at 6 am, the dual-axis systems take advantage of their position to the sun and start at higher values (see figure 7). The tracking modules continue operating at maximum power until 12 noon when all the modules operate at maximal. From figure 7, it is evident that the two algorithms (fuzzy logic and linear regression) operated similarly from 6 am to 7:20 am. From 7:20 am to 8:40 am, the fuzzy logic marginally outperformed the linear regression algorithm. After 02:40 pm, the whole system was affected by cloudy conditions. The three PV modules instantaneous power readings for each time slot is listed in table 2. The instantaneous power was used to calculate the subsequent power over a period of time (Wh). This was done by multiplying the instantaneous power by the number of hours in a day (12 hours) when the system was running, and the total is shown at the bottom of table 2.
The results of using the two algorithms along with the fixed-axis system for a longer period of time is shown in table 3. This represents an instantaneous average power for a period of three months, being December 2019, January and February 2019. The tracking modules continue harvesting more power compared to the fixed module (see figure 8). The percentage difference between the total Wh produced for a period of three months between fuzzy logic and the fixed-axis system was 30.5 %. The percentage difference between linear regression and the fixed-axis system was 29.2 %.

Conclusion
This paper compared two algorithms (linear regression and fuzzy logic) that were applied to a dual-axis PV module tracking system to maximize their output power. One fixed-axis PV module served as the baseline for comparing the results of the dual-axis tracking system that are controlled by the two algorithms. Dual-axis solar tracking system installation is more complex as compared to the fixed system; making it more expensive as it also requires more maintenance. Proper application of a dualaxis solar tracking system results in significant optimization of energy gain. The increase in percentage difference between the total Wh produced for three months between fuzzy logic and fixed-axis system was 30.5 %, while linear regression showed a 29.2 % increase as compared to the fixed-axis system. The presence of a solar tracking system is not essential for the operation of a PV module, but without it the overall system performance is reduced. An ideal tracking system should have an ideal control algorithm that allows a PV module"s surface to be perpendicular to the direct beam radiation of the sun. A recommendation of this paper is to use a fuzzy logic algorithm in dual-axis solar tracking systems, as it outperformed the linear regression algorithm by 1.3 %.