Performance Investigation of Low-Cost Dual-Axis Solar Tracker using Light Dependent Resistor

To generate power, the solar tracker mechanism can be mounted on a stationary or mobile platform. Moving platforms include boats, ground vehicles, and aerial vehicles. The solar tracker must be a mechanism that can keep the solar panel perpendicular to the direction of the sun at an appropriate level of precision in order to be more effective. Therefore, this research is going to investigate the performance of a low-cost dual-axis solar tracker (parallel mechanism) installed on a moving platform. This work describes the simulation and experiment of a dual-axis solar tracker that is mounted on a rotating support plate with rotational axis. This simulation uses the method of controlling linear actuators to adjust the solar panel perpendicular to the direction of sunlight. Both actuators were controlled by proportional and integral controllers (PI), which will make the system have a faster response time. The tracker is equipped with a type of low-cost sunlight sensor to provide the information for determining the orientation of the sunlight vector with respect to the solar panel. The sunlight sensor was designed and fabricated on our own by adding four light-dependent resistors in the four different quadrants. For the purpose of tracking the sun, the mathematical models of the tracker mechanism, sun sensor, and control architecture are defined. The results of simulation and experiment demonstrate that the tracker control system can follow the sun with some tracking error (about 2 degrees) at its final alignment. In real-time applications, solar trackers can be used on vehicles or boats to adjust solar panels on their surfaces and increase their exposure to sunlight and electrical output. This is an open access article under the CC-BY-SA license.


Introduction
Because of its inexhaustible resources and environmentally favorable behavior, solar energy has been a prominent current study topic in the field of power generation.Solar energy efficiency may be increased by incorporating a tracking system that maintains the solar panel perpendicular to the rays of the sun.The orientation of the solar panels relative to the sun affects how well they can convert solar energy.A solar panel that does not move may miss out on the optimal amount of solar radiation as the sun shifts constantly.Hence, a solar tracking system that can change the angle of the solar panel based on the sun's motion can enhance the efficiency and output of the solar system [1]- [5].
In the view of this, the objective of this research is to investigate the tracking performance of the low-cost dual-dxis solar tracker (parallel mechanism) using LDR, which is mounted on a movable support that has a rotational axis.The scope of this research covers the simulation and experiment to determine the error angle of the solar panel to track the sun at it final alignment.
A close-chain parallel mechanism will be used in the dual-axis solar tracker system that is being presented in order to improve the alignment of the solar panel using two linear actuators.The system will also include sensors and a micro-controller for controlling the movement of the solar panel in accordance with the location of the sun.The system will be affordable, dependable, and portable, making it appropriate for use in a variety of settings including residential, agricultural, ground vehicles and aerial vehicles.
The structure of this paper is as follows: Section 2 validates the degree of freedom of the dualaxis solar tracking mechanism, defines the various coordinate frames of the tracker and the supporting plate, presents mathematical models of the sun sensor model, shows control law, highlights actuator dynamics, delivers a kinematics model, presents control architecture, and provides simulation and experiment setup.Then, results and discussion can be made in Section 3. Finally, a conclusion can be drawn.

Method 2.1. Degree of Freedom of the Tracker
The mechanical system of the tracker uses revolute joints (R), prismatic joints (P), universal joint (U) and spherical joint (S) as the connector from one link to another.To verify that the tracker has two degrees of freedom (DOF), the Grubler's formula [41] is used as below: where N is the number of the link including ground; j is the number of joints; m = 3 for planar mechanism or m = 6 for spatial mechanism; and C is the constraints between two rigid body.
The mechanical system of the tracker must be divided into two mechanisms, the first one is planar mechanism and another one is spatial mechanism as shown in Fig. 1.For planar mechanism Fig. 1(b), there are four joints (three Rs and one P, j = 4) and three links plus one ground (Link 1, Link 2, Link 3, N = 4).The joint constraints in planar motion C R = 2 and C P = 2, please see Table 1.The degree of freedom of the planar mechanism (DOFp) can be calculated as For the spatial mechanism Fig. 1(c), there are four joints (one R, one P, one S, and one U, j = 4) and three links plus one ground (Link 1', Link 2', Link 3', N = 4).The joint constraints in spatial motion C R = 5, C P = 5, C U = 4, and C S = 3, please see Table 1.The degree of freedom of the spatial mechanism (DOFs) can be calculated as So, the degree of freedom of the tracker is DOF = DOFp + DOFs = 2. Hence, the control joints for controlling the orientation of solar panel are prismatic joints, which are replaced by two linear actuators.The supporting plate is assumed to be a vehicle.So, the plate can rotate with respect to its vertical axis.The plate and the main structure of the tracker are considered one body attached to a coordinate frame (OXYZ).The panel has two DOF with respect to the plate and is attached with a coordinate frame (O'X'Y'Z'), where O' coincides with O.The orientation of the panel with respect to the plate is described by two rotation angles, θ in [rad] and ϕ in [rad] as shown in Fig. 2. If the plate is rotating quickly with respect to its axis, the sunlight direction with respect to the plate changes accordingly.From another perspective that the plate is fixed, but the sunlight direction is changing quickly.In order to make simulations, the latter perspective is considered.Therefore, the frame (OXYZ) is considered the global frame, and the panel frame (O'X'Y'Z') is considered the body frame.The sunlight direction with respect to the global frame is represented by a unit vector U = [u x , u y , u z ] T .See Fig. 2, the rotation matrix for transforming any vector v ′ on the panel frame to the global frame is defined by R (θ, ϕ) = R y (θ) R x (ϕ), then the coordinate transformation is written by v = R (θ, ϕ) v ′ .

Sunlight Model
Assume that the trajectory of the sun is on the surface of the unit radius sphere as shown in Fig. 3. So, the vector of the sunlight U in the global frame is computed as below where α s in [rad] is the altitude angle of the sun and ψ s in [rad] is the azimuth angle of the sun.The horizon forms an angle with an object in the sky; this angle is called the altitude angle.The object can be higher or lower than the horizon, so the angle can be positive or negative.For instance, the sun has a 0 degree altitude angle at sunrise and sunset and a 90 degrees altitude angle at noon.The angle that shows how far the sun is from the north direction on a flat surface is called the azimuth angle.It can be measured in radian from 0 to 2π.Let normal vector k = [0, 0, 1] T in the X'Y'Z' coordinate frame.Since the direction of vector k in global frame is desired to be pointed towards the sun, then the vector of the sunlight U can be computed in relation to k as where θ is the angular of the solar panel with respect to X axis [rad], ϕ is the angular of the solar panel with respect to Y axis [rad], and R (θ, ϕ) = R y (θ) R x (ϕ) is the rotation matrix from the body frame to the global frame, Chivorn Keo (Performance Investigation of Low-Cost Dual-Axis Solar Tracker using Light Dependent Resistor) Substituting ( 6) and k into (5), it is gotten since u x and u y can be computed by ( 4), the desired orientation of the solar panel is derived as follow Fig. 3. Configuration of the sun sensor in global frame.

Sunlight Sensor
The design concept of the sunlight sensor is to use four Light Dependent Resistor (LDR) sensors in four different quadrants, divided by two perpendicular walls.The LDR sensors capture the light from the sun and convert it into analog data.By interpreting the data from four LDR sensors, the direction of the sunlight is determined.For simplification of modeling, the perpendicular walls are modified into the desired shape as shown in Fig. 4.
To interpret the LDR sensors, the vector of sunlight U 1 = [u x1 , u y1 , u z1 ] T in the sun sensor frame is used to determine the zone where the LDR can detect the light from the sun.By taking the rotation of the sunlight vector U of (4) from the global frame to the sun sensor frame, U 1 is determined as below: Since the distance of the sun is far away from earth, the direction vector U 1 with respect to the body frame of each LDR is the same, and the orientation of the vector U 1 that is described by α Li , where α Li in [rad] is the altitude angle value of the sun with respect to LDR i position, and ψ Li in [rad] is the azimuth angle value of the sun with respect to LDR i position (i = 1 : 4).To simplify mathematical model for simulation, the LDR data is scaled from 0 to 1, and the crosssection of the modified perpendicular wall is designed as the part of the cylinder in each quadrant.The part of the cylinder is mapped as the conic that has the vertex at the position of the LDR sensor as shown in Fig. 4. Then the angle between the slant height and XY plan; r where ρ in [mm] is the slant height, and r in [mm] is the radius of the sun sensor base.See Fig. 5; the angle value of the part of cylinder in each quadrant is derived as below: The purpose of interpreting the LDR is to determine the condition when each LDR detects the light based on the orientation of the sun and the orientation of the sun sensor (see Table 2).See Fig. 4, the angle error β [rad] in tracking the movement of the sun can be determined as below: Chivorn Keo (Performance Investigation of Low-Cost Dual-Axis Solar Tracker using Light Dependent Resistor) Fig. 5. Base view of the sun sensor.

Control Law
The control law is the condition to set the linear actuators to pull or push the solar panel until it is perpendicular to sunlight.This control algorithm needs data from all LDR sensors on the sun sensor to determine the errors between the orientation of the sun and the solar panel.To meet that condition, the sun sensor is divided into four zones, as shown in Fig. 5 to identify the error value between the LDRs.The left zone is equal to the average value of the LDR2 with LDR3, the right zone is the average value of the LDR1 with LDR2, the upper zone is the average value of the LDR1 with LDR2, and the lower zone is the average value of the LDR3 with LDR4.The error value between the left and right zone will determine how the controller adjusts the first actuator, and the error value between the upper and lower zone will determine how it adjusts the second actuator.
Table 3 shows the control law algorithm of the tracking system.K 1 and K 2 in Table 3 are the proportional gain of velocity command θc in [rad] and φc in [rad].Proportional gain K 1 and K 2 are factors that affect how much the output of a control system varies based on the input error.It makes the tracking control system faster at correcting the error and achieving the target setpoint.But setting proportional gain that is too big or too small can lead to issues like fluctuations, instability, saturation, or constant error.After setting the values of all zones, the condition for determining the linear actuator motion is created by comparing the values of those zones.The motion of the first actuator is related to the upper and lower zones, and the motion of the second actuator is related to the left and right zones as shown in Fig. 5 and Fig. 6.If the value of the left zone is greater than that of the right zone, it means that the location of the sun is in the left zone.So, the first actuator needs to retract more length until the values of both zones are equal.If the value of the right zone is greater than that of the left zone, the first actuator needs to extend its length until the values of both zones are equal.The second actuator follows the same approach as the first actuator.

Inverse Kinematics
The modeling of the inverse-kinematics of the tracker is to find the length of the linear actuators L x and L y in [mm] with known orientations of the solar panel θ and ϕ in [rad].It means that the orientations of the panel must be defined for the linear actuators to be controlled to pull or push the solar panel.The orientation of the panel, which is used as input for the inverse-kinematics of the tracker, has been converted from the sun sensor data in the tracker control system.For the first actuator Fig. 6(a), using the cosine formula, the first linear actuator length is obtained as a function of the orientation of the panel, as shown below: To adjust the speed and direction of the linear actuators according to the orientation of the moveable support, the linear velocity and acceleration must be defined.So the first-time derivative of the L x is the linear velocity in [mm/s] as below: The second-time derivative of the L x is linear acceleration in [mm/s 2 ] by taking the same approach as the first actuator, the inverse-kinematics of the second actuator Fig. 6(b) is The first-time derivative of the L y is the linear velocity in [mm/s] as below The second-time derivative of the L y is linear acceleration in [mm/s 2 ]

Forward Kinematics
The forward kinematics of the tracker system are used as the feedback component of the tracker control system.The modeling of the forward kinematics of the tracker is to find orientation of the solar panel θ in [rad] and ϕ in [rad] with known length of the linear actuators L x and L y in [mm].From (19), it is gotten From ( 22), it is obtained where θ 0 in [rad] and ϕ 0 in [rad] are the initial angle of the solar panel with respect to the Z-axis.

Dynamics of Actuator
The combination of the electrical and mechanical part of the DC motor generated the rotational motion, which can be described as the equation below: The actuator of the tracker system are linear motors which are the combination of the DC motor with gearbox and lead screw.So, the dynamics of the linear motor can model based on the (27) as follow: where and c lp in [mm/s 2 ] are the lumped parameters.In practice, these parameters can be accurately identified based on the estimation method, which is elaborated in [42], [43].

Simulation Control Architecture
The approach of this simulation is to control the linear actuators to adjust the solar panel perpendicular to the vector of the sunlight.So, the tracker needs to be attached to a sunlight sensor that can determine the orientation of the sunlight vector with respect to the panel.Fig. 7 shows the control architecture of the dual-axes tracker, which is composed of the sunlight model, sunlight sensor, actuator, compensation, forward kinematics, inverse kinematics, and panel orientation.The reference of the system is the orientation of the sunlight vector described by spherical coordinate α s and ψ s which are fed directly to the sunlight model.The output of the sunlight model is the sunlight unit vector U = [u x , u y , u z ] T and the desired orientation of the solar panel, θ d and ϕ d .The sunlight sensor receives the vector U as the input and then computes the angular velocity ω c = θc , φc T as the input to the inverse kinematics, whose output is the linear velocity Lc = Lxc , Lyc T .The actuator block receives the Lc as the input and computes the displacement L = [L x , L y ] T of the linear actuators as the output of the system.L is fed to the forward kinematics to get the panel orientation, which feeds to the sunlight sensor and control block.The compensation part is used to compensate the dynamic of the actuators.To obtain the results, the behavior of the tracker is simulated using MATLAB and SIMULINK software.

Simulation and Experimental Setup
The simulation scenario has been applied for the experiment and adding one more condition for initializing the actuators, see also Fig. 8.The initializing process is a state machine based on the time (duration for initializing the tracker actuators), which allows the actuators to retract to the minimum length (L xmin and L ymin ) and take this length as the initial position of the actuators.After that, the tracking system starts working normally.Fig. 9 shows the direction of the sun, which is used as the input for the simulation and the experiment.From initialization, both actuators take 10 seconds to reach the initial position.The azimuth angle of the sun ψ s chosen to start from 0 to 360 degrees with respect to the X-axis, with the starting time from 10 to 42 seconds.The altitude angle of the sun α s = 70 degrees constant with respect to XY plan was chosen due to the limitation of the tracker mechanism.
To perform the simulation and experiment, lumped parameters a lp , b lp , and c lp of both linear actuators are identified as shown in Table 4 and mechanical parameters of the tracker are recognized, see also Table 5.In the experiment process, assume that the flashlight is the sun.The flashlight is connected to the tripod that can setup the altitude angle of the sunlight α s = 70 degrees as shown in Fig. 10.To make the experiment easier, the tracker is chosen to rotate in the horizontal plane instead of the flashlight based on the value of the azimuth angle ψ s , which starts from 0 degree to 360 degrees.The tracker is put on the horizontal plate, which can rotate 360 degrees with one actuator under the plate.For starting, the flashlight turns on and the tracker starts initializing based on the initializing time t init =10 seconds.After that, the tracker starts tracking the flashlight, and the horizontal plate starts moving from position 0 degree to 360 degrees based on the final time t f = 50 seconds.We hope that the outcome will indicate a low deviation angle (not more than 10 degrees) of the solar panel to follow the sun quickly.In addition, the Arduino Mega 2560 has been used as the main controller of the tracker system, along with the actuator system, which includes two linear position feedback actuators (L16-140-35-12-P) and drivers (BTS7960).

Results and Discussion
Fig. 11 shows the signal detection of LDRs sensor by simulation.The binary signal is the output from the LDRs sensor (when the light is detected, it returns a value of 1; otherwise, it returns a value of 0).At the start, the unit vector of the sun and unit vector of solar panel are 70 degrees different from each other.Then, the sunlight vector starts moving by α s and ψ s .The control law receives the alignment error between sunlight direction and LDRs detection from the LDRs signal, then it commands to move the solar panel to the orientation where the four LDRs can all detect the light.The time it takes for the solar panel to align with the sunlight direction is around 42 seconds.Fig. 12 is the result of an experiment that displays the signal detection of an LDRs sensor.The analog signal is the output of the LDRs sensor (when light is detected, it returns a value dependent on the light intensity; the maximum LDR value is around 650).The solar panel takes around 42 seconds to align with the direction of the sunlight.Fig. 13 describes the required voltage for both actuators to rotate the solar panel to the desired orientation.The voltage required by the actuator is around 12V, which is the most important component in determining tracking response time.When the voltage indication is negative, the actuator is retracting.When the voltage indication is positive, the actuator is extracting.The pattern of the voltage data of the actuator Lx is increasing from -10V to 12V at 0 to 7 seconds, which means that  Fig. 14 shows the result of the variation of linear actuator lengths L x and L y .The result of the simulation starts to track the sun faster than the result of the experiment around 5 seconds later, due to the experimental set-up inaccuracy, the approximation that the LDR is a point in the simulation but not in the experimentation, and the inaccuracy of the shape of the sun sensor, which is not exactly 3/4 cylindrical at each location of LDR in the experiment.The sun has been followed for approximately 42 seconds, with an error length of L x of approximately 4 millimeters, due to the possibility that the mechanism of the tracker could be misaligned at some point.Fig. 15 shows the β angle, which is the error angle of the solar panel in order to track the sunlight.First, β starts at 72 degrees because the vector of the sun and the sensor are 70 degrees apart.The error became smaller because of the variation in the stroke of the linear actuator.Then, after 42 seconds, the error dropped to around 2 degrees and remained stable until the end of the simulation.Although it has a value of error, it is within the expected range (0 degree to 15 degrees) for a conventional solar panel to perform well.

Conclusion
The kinematics (both forward and inverse) of the tracker mechanism and the control architecture are described for tracking the sun.The simulation and the experiment show that the control system of the solar panel can track the sun with a small lag.There is error between the simulation and the experiment due to the fact that the experiment had some errors in its set-up, the simulation assumed the LDR was a point but the experiment did not, the shape of sun sensor was not precisely 3/4 cylinder at every position of LDR, and the misaligned tracker mechanism at some point.However, the result of both shows that the tracker can track the sun accurately at its final orientation when the sun stops moving (around 2 degrees of the error angle of the solar panel to track the sun).For real-time applications, the tracker will be equipped with a vehicle on the ground or a boat because positioning solar panels on a vehicle's body to maximize their exposure to sunlight and electrical output is one use for a solar tracker.For instance, solar automobiles have engines that are powered by solar trackers.It could be very practical because such a vehicle will not rotate frequently throughout the operation.To improve the sun tracking performance, the new linear actuators can be used, which operate at a

Fig. 4 .
Fig. 4. Configuration of the sun sensor in body frame.

Fig. 6 .
Fig. 6.(a) First actuator, and (b) Second actuator.Geometric relation of the actuators to the tracker.

Fig. 11 .
Fig. 11.Simulation result of signal detection of sun sensor (LDRs) with filter.

Fig. 12 .
Fig. 12. Experiment result of signal detection of sun sensor (LDRs) with filter.

Fig. 13 .
Fig. 13.Simulation result of voltage requirement for both linear actuators.

Fig. 14 .
Fig. 14.Simulation and experiment result of length L for both linear actuators.

Fig. 15 .
Fig. 15.Simulation result of the error angle of solar panel.

Table 1 .
[41]number of degrees of freedom and constraints C provided by joints[41].