# Evaluation and Design of Power Controller of Two-Axis Solar Tracking by PID and FL for a Photovoltaic Module

Authors: Joel J. Ontiveros; Carlos D. Ávalos; Faustino Loza; Néstor D. Galán; Guillermo J. Rubio
Journal: International Journal of Photoenergy
 (2020)

---

## Abstract

Solar trackers represent an essential tool to increase the energy production of photovoltaic modules compared to fixed systems. Unlike previous technologies where the aim is to keep the solar rays perpendicular to the surface of the module and obtain a constant output power, this paper proposes the design and evaluation of two controllers for a two-axis solar tracker, which maintains the power that is produced by photovoltaic modules at their nominal value. To achieve this, mathematical models of the dynamics of the sun, the solar energy obtained on the Earth’s surface, the two-axis tracking system in its electrical and mechanical parts, and the solar cell are developed and simulated. Two controllers are designed to be evaluated in the solar tracking system, one Proportional-Integral-Derivative and the other by Fuzzy Logic. The evaluation of the simulations shows a better performance of the controller by Fuzzy Logic; this is because it presents a shorter stabilization time, a transient of smaller amplitude, and a lower percentage of error in steady-state. The principle of operation of the solar tracking system is to promote the orientation conditions of the photovoltaic module to generate the maximum available power until reaching the nominal one. This is possible because it has a gyroscope on the surface of the module that determines its position with respect to the hour angle and altitude of the sun; a data acquisition card is developed to implement voltage and current sensors, which measure the output power it produces from the photovoltaic module throughout the day and under any weather conditions. The results of the implementation demonstrate that a Fuzzy Logic control for a two-axis solar tracker maintains the output power of the photovoltaic module at its nominal parameters during peak sun hours.


---

## Body

## 1. Introduction

Human dependence on fossil fuels, for the generation of energy, has created numerous environmental catastrophes across the planet. Increased carbon emission, global warming, and ozone depletion area direct consequences of this ill use of fossil fuels [1]. Due to the burning of fossil fuels, greenhouses gases are emitted constantly. One such gas is carbon dioxide (CO2), which was represented in 2016, close to 70% of the total greenhouse gas emissions [2]. As strategies to decrease the world’s carbon footprint agreements between nations are formulated, like the “Kyoto protocol,” in which the need for cleaner, more sustainable, and more reliable energy production technologies is emphasized [3]. Photovoltaic systems meet such need since they are eco-friendly and help reduce CO2 emissions to the atmosphere and its energy source; the sun is constantly available [4]. In 2017, these systems generated an estimate of 460 terawatt-hour (TWh), which represents 2% of the world’s energy in that same year [5].Photovoltaic (PV) systems can be classified as on-grid and off-grid. The elements that make up these systems are photovoltaic modules, batteries, charge regulator (or controller for standalone systems), wiring, and inverter. The efficiency and output power of PV depend upon the solar irradiance, location, face angle of the PV panel, type of PV panel, and efficiency of the components [6]. The photovoltaic module is the element that transforms solar energy into electricity; its average efficiency in the energy conversion process does not surpass 20% [7]. This percentage is affected by design, assembly factors, environmental conditions, installation, and periodical maintenance [8]. During the installation process of PV modules, some considerations are taken such as the adequacy of the installation site and the amount of radiation received by the site, orientation, and inclination. These considerations are taken to assure that the incidence of solar rays is greater and in a perpendicular orientation relative to the PV system’s photosensitive surface. To achieve maximum energy absorption and to compensate for variations during different times of the year, solar tracking systems are implemented.Solar tracking systems are categorized according to their degrees of freedom (DOF). Fixed systems have an orientation and inclination based on their installation point. Single-axis systems track the movement of the sun from east to west. Dual-axis systems also track the sun from east to west, with the adding capability of altering their inclination and are therefore able to produce between 38 and 54% more energy than fixed systems [9–11].The preceding works are aimed at controlling the position of PV modules predominantly strive to collect as much solar radiation as possible, and in doing so, reach the maximum energy production possible during the day. Reference [12] describes the design of a proportional, integration, and derivative (PID) controller for solar tracking. It has three tunable parameters which are calculated using equations to determine their value: proportional action, time integration, and time derivative. In [13, 14], a PID and a Fuzzy Logic (FL) controller are designed. The FL controllers can handle the uncertainties and imprecision of the controlled plant since the design of the algorithm is based on the knowledge of the human expert of the plant’s dynamics [15]. However, the production of electricity over the nominal values of PV modules causes an acceleration in the deterioration of the PV cells, or possible physical damage to the system’s electronic components, such as the charge controller and inverter.The main aim of this paper is to keep the output power of the photovoltaic module at its nominal value. At sunrise, sundown, or a day with low radiation, the controller will allow the inclination of the module surface to be modified to achieve the maximum power available depending on the solar radiation that exists at the time, as long as it does not exceed the nominal power. The control that is developed is with feedback of the output power, by measuring the voltage and current. This poses advantages over solar tracking controllers that do not have feedback on weather conditions, energy production, and module position; they have programmed their movement by GPS, time, or dates of the year, so there is no control or monitoring over electricity production.This paper is divided into 5 sections. In Section2.1, the solar position and radiation on a determined point are estimated. The mathematical model of the tracking structure is presented in Section 2.2. Section 2.3 shows the mathematical model for a solar cell. The design of PID and FL controllers are found in Sections 2.4 and 2.5, respectively. In Section 3.1, the system’s simulations are shown, and in Section 3.2, the methodology of the algorithm is presented. Sections 4 and 5 presented the obtained results, conclusions.


## 2. Materials and Methods

### 2.1. Estimation of Solar Radiation on an Inclined Surface

To define the inclination and orientation of the solar tracker, it is necessary to estimate the solar position, particularly, the azimuthal angle (λ) and the solar altitude (α). As shown in Figure 1, the former is defined as the azimuth from the north of the sun’s rays on the horizontal plane (clockwise). The latter is the angular height of the sun, measured from the horizontal. These angles are estimated by Equations (1) and (2) [16].
(1)α=sin−1sinφsinδ+cosφcosδcosω,(2)λ=sin−1sinφsinδ+sinφcosδcosωα,where φ is the latitude of the installation site, δ the declination at solar noon, and ω the angular altitude of the sun measured from the horizontal plane.Figure 1
Angles to estimate the solar position, the azimuthal angle (λ), and the solar altitude (α).To determine the working mode of the solar tracker (stand-by mode and tracking mode), it is important to calculate the solar radiation on an inclined surface (HT). This is obtained by the sum of Equation (3) [17]:
(3)HT=HB+HD+HR,where HB, HD, and HR are the direct, fuzzy, and reflected solar radiation on an inclined surface (J/m2). All previous variables are calculated by Equations (4), (5), and (6) [17]:
(4)HB=cosφ−βcosδsinω+ωsinφ−βsinδcosφcosδsinω+ωsinφsinδHb,(5)HD=1+cosβ2Hd,(6)HR=ρ1+cosβ2Hd,where β is the inclination angle of the PV module and ρ the reflectance of the ground. Hb and Hd are the direct and fuzzy radiation over a horizontal surface (J/m2). They are estimated by Equations (7) and (8) [18]:
(7)Hb=H0τbcosθC,(8)Hd=H0τdcosθC,where τb and τd are the atmospheric transmittance for the direct and fuzzy solar radiations, θC is the zenith angle formed between the vertical and the sun’s line, and H0 is the energy incident outside the earth’s atmosphere, assuming that it impacts with a 90° angle on a surface [17]. It is defined as
(9)H0=243600π×106HSC1+0.033360d365cosδcosφsinω+ωsinφsinδ,where d is the day of the year, and Hsc is the radiation constant (1.367 kW/m2) provided by the World Radiation Center (WRC).


### 2.2. Solar Tracking System Model

To design the PID controller, it is necessary to model the dual-axis solar tracking system. Each axis of freedom is divided into 2 parts: a positioning system and a mechanical structure, as shown in Figure2. The former consists of a permanent magnet direct current motor (PMDCM), which utilizes magnetic fields induced by an external excitation current that flows through the stator’s winding to produce motion. The latter consists of two viscous friction coefficients that represent two rowlocks and the moment of inertia of the PV module.Figure 2
Electromechanical representation for the solar tracking system of each axis of freedom.The matrices of the positioning system and the mechanical structure for each axis of freedom are defined as(10)dθXtdtd2θXtdtdiXtdt=0100−BJ+JXKMJ+JX0−KELa−RaLaθXtdθXtdtiXt+001LaVXt,(11)dθYtdtd2θYtdtdiYtdt=0100−BJ+JYKMJ+JY0−KELa−RaLaθYtdθYtdtiYt+001LaVYt,where θX,Y is the orientation and inclination, iX,Y the armature current for each axis of freedom, B the motor’s viscosity coefficient, and B1 and B2 are the ideal viscous friction coefficient of the rowlocks (zero). Ra is the armature resistance, La is the armature inductance, Ke the electromotive force constant, KM the motor’s torque current relation, τ the torque, and J the inertia of the motor’s rotor. The moments of inertia for each axis of freedom (JX,Y) are estimated by Equations (12) and (13) [19]:
(12)JX=Maa∫−a/2a/2x2dx,(13)JY=Mab∫−b/2b/2x2dx,where Ma is the mass, a is the height, and b is the base of the PV module.


### 2.3. Mathematical Model of Photovoltaic Cell Diode

A PV module transforms the solar radiation into usable electric energy. The basic energy conversion element is the solar cell. This is a semiconductive device, capable of turning sunlight into electricity. Figure3 represents the 5-diode simple model of a solar cell designed to model the behavior of a solar cell [20].Figure 3
Five-parameter-diode simple model.Equation (14) to estimate the output current i is:
(14)i=iph−iD−ish,where iph is the photon current, iD is the diode current, and ish the current that flows through resistance Rsh. Iph it is defined as
(15)iph=HTHrefIref+KIT−Tr.Href is the solar radiation of reference (1 kW/m2), the solar radiation over the PV cell (HT), the short-circuit reference current (Iref), the temperature coefficient of the cell’s short circuit current (KI), the temperature of reference (Tr=298.15°K), and the temperature of the cell (T).The diode current (ID) is estimated by
(16)iD=i0expVD/VTH−1,where VD is the diode voltage, and VTH is the thermal voltage. The cell’s saturation current (i0) is defined by
(17)i0=IscexpqVoc/NskT−1TTr3/4expqEGklT−TrTrT,where ISC is the short circuit current, q the charge of the electron, VOC the open-circuit voltage, NS the number of cells, k the Boltzmann constant, and EG the dead band energy.Lastly, according to Kirchhoff’s laws, the current that flows through resistanceRsh is
(18)ish=V+iRsRsh.V is the output voltage, Rs series resistance, and Rsh parallel resistance.


### 2.4. PID Control of the Solar Tracking System

The PID control isut and consists of a KP parameter (proportional), a Ti (integral), and a Td (derivative). This control can modify a system’s response. The time-domain Equation (19) of the controller is [21]:
(19)ut=KPet+1Ti∫0tetdt+Tddetdt,where et is the error value.The second tuning method proposed by Ziegler-Nichols is used to obtain the valuesKp, Ti, and Td. On it, a Ti=0 and Td=∞ is set, and the critical gain (Kcr) is obtained. Additionally, s=jω is substituted in the characteristic Equation (19) of the closed-loop system’s transfer function Equation (20) to calculate the critical frequency Pcr. The values that are calculated through this method and the values tuned experimentally are shown in Table 1.
(20)θX,YsUs=KMKcrsJLa+JX,YLas2+JLa+JX,YLa+BLas+KMKe+KMKcr.Table 1
PID controller gains calculated by the Ziegler-Nichols method and tuned experimentally.
θXθYZiegler-NicholsTunedZiegler-NicholsTunedKP235.35472.3535207.64852.0765Ti14.12850.141311.103214.1285Td3.53210.00352.77580.0026


### 2.5. Fuzzy Logic Control of the Solar Tracking System

The design of a Fuzzy Logic controller is described in four steps. Fuzzification, the error, and error change signals are normalized to the values inside the universe of discourse (Table2).Table 2
Ranges of possible values of the universe of discourse.
θXθYMinimum-90°0Maximum90°90The inference mechanism, the normalized inputs, and outputs are described in different membership functions, as shown in Figure4. IF-THEN rules contain the linguistic description of the controller (Table 3). In defuzzification, the output signal is turned into a quantifiable value. The inference mechanism and the defuzzification method of this paper are Mamdani and centroid methods [22].Figure 4
Membership functions for FL control inputs and outputs.Table 3
Description of the FL controller linguistic rule set.
etMNNEZPOMPdetMNMNMNNENEZNEMNNENEZPOZNENEZPOPOPONEZPOPOMPMPZPOPOMPMPMN is more-negative, NE is negative, Z is zero, PO is positive, and MP is more-positive in the domain of discourse.Figure5 shows the simulation diagram of the fuzzy controller, where Re is the reference and YFL the controllers’ output. The fuzzy error (g0), derivative (g1), and gain fuzzy (hf). These can be tunable values that are used to improve the system’s response. Its values are shown in Table 4.Figure 5
Block diagram of the Fuzzy Logic controller.Table 4
Fuzzy controller gain tuned.
θXθYg01.21.2g10.010.01hf10.4510.45


## 2.1. Estimation of Solar Radiation on an Inclined Surface

To define the inclination and orientation of the solar tracker, it is necessary to estimate the solar position, particularly, the azimuthal angle (λ) and the solar altitude (α). As shown in Figure 1, the former is defined as the azimuth from the north of the sun’s rays on the horizontal plane (clockwise). The latter is the angular height of the sun, measured from the horizontal. These angles are estimated by Equations (1) and (2) [16].
(1)α=sin−1sinφsinδ+cosφcosδcosω,(2)λ=sin−1sinφsinδ+sinφcosδcosωα,where φ is the latitude of the installation site, δ the declination at solar noon, and ω the angular altitude of the sun measured from the horizontal plane.Figure 1
Angles to estimate the solar position, the azimuthal angle (λ), and the solar altitude (α).To determine the working mode of the solar tracker (stand-by mode and tracking mode), it is important to calculate the solar radiation on an inclined surface (HT). This is obtained by the sum of Equation (3) [17]:
(3)HT=HB+HD+HR,where HB, HD, and HR are the direct, fuzzy, and reflected solar radiation on an inclined surface (J/m2). All previous variables are calculated by Equations (4), (5), and (6) [17]:
(4)HB=cosφ−βcosδsinω+ωsinφ−βsinδcosφcosδsinω+ωsinφsinδHb,(5)HD=1+cosβ2Hd,(6)HR=ρ1+cosβ2Hd,where β is the inclination angle of the PV module and ρ the reflectance of the ground. Hb and Hd are the direct and fuzzy radiation over a horizontal surface (J/m2). They are estimated by Equations (7) and (8) [18]:
(7)Hb=H0τbcosθC,(8)Hd=H0τdcosθC,where τb and τd are the atmospheric transmittance for the direct and fuzzy solar radiations, θC is the zenith angle formed between the vertical and the sun’s line, and H0 is the energy incident outside the earth’s atmosphere, assuming that it impacts with a 90° angle on a surface [17]. It is defined as
(9)H0=243600π×106HSC1+0.033360d365cosδcosφsinω+ωsinφsinδ,where d is the day of the year, and Hsc is the radiation constant (1.367 kW/m2) provided by the World Radiation Center (WRC).


## 2.2. Solar Tracking System Model

To design the PID controller, it is necessary to model the dual-axis solar tracking system. Each axis of freedom is divided into 2 parts: a positioning system and a mechanical structure, as shown in Figure2. The former consists of a permanent magnet direct current motor (PMDCM), which utilizes magnetic fields induced by an external excitation current that flows through the stator’s winding to produce motion. The latter consists of two viscous friction coefficients that represent two rowlocks and the moment of inertia of the PV module.Figure 2
Electromechanical representation for the solar tracking system of each axis of freedom.The matrices of the positioning system and the mechanical structure for each axis of freedom are defined as(10)dθXtdtd2θXtdtdiXtdt=0100−BJ+JXKMJ+JX0−KELa−RaLaθXtdθXtdtiXt+001LaVXt,(11)dθYtdtd2θYtdtdiYtdt=0100−BJ+JYKMJ+JY0−KELa−RaLaθYtdθYtdtiYt+001LaVYt,where θX,Y is the orientation and inclination, iX,Y the armature current for each axis of freedom, B the motor’s viscosity coefficient, and B1 and B2 are the ideal viscous friction coefficient of the rowlocks (zero). Ra is the armature resistance, La is the armature inductance, Ke the electromotive force constant, KM the motor’s torque current relation, τ the torque, and J the inertia of the motor’s rotor. The moments of inertia for each axis of freedom (JX,Y) are estimated by Equations (12) and (13) [19]:
(12)JX=Maa∫−a/2a/2x2dx,(13)JY=Mab∫−b/2b/2x2dx,where Ma is the mass, a is the height, and b is the base of the PV module.


## 2.3. Mathematical Model of Photovoltaic Cell Diode

A PV module transforms the solar radiation into usable electric energy. The basic energy conversion element is the solar cell. This is a semiconductive device, capable of turning sunlight into electricity. Figure3 represents the 5-diode simple model of a solar cell designed to model the behavior of a solar cell [20].Figure 3
Five-parameter-diode simple model.Equation (14) to estimate the output current i is:
(14)i=iph−iD−ish,where iph is the photon current, iD is the diode current, and ish the current that flows through resistance Rsh. Iph it is defined as
(15)iph=HTHrefIref+KIT−Tr.Href is the solar radiation of reference (1 kW/m2), the solar radiation over the PV cell (HT), the short-circuit reference current (Iref), the temperature coefficient of the cell’s short circuit current (KI), the temperature of reference (Tr=298.15°K), and the temperature of the cell (T).The diode current (ID) is estimated by
(16)iD=i0expVD/VTH−1,where VD is the diode voltage, and VTH is the thermal voltage. The cell’s saturation current (i0) is defined by
(17)i0=IscexpqVoc/NskT−1TTr3/4expqEGklT−TrTrT,where ISC is the short circuit current, q the charge of the electron, VOC the open-circuit voltage, NS the number of cells, k the Boltzmann constant, and EG the dead band energy.Lastly, according to Kirchhoff’s laws, the current that flows through resistanceRsh is
(18)ish=V+iRsRsh.V is the output voltage, Rs series resistance, and Rsh parallel resistance.


## 2.4. PID Control of the Solar Tracking System

The PID control isut and consists of a KP parameter (proportional), a Ti (integral), and a Td (derivative). This control can modify a system’s response. The time-domain Equation (19) of the controller is [21]:
(19)ut=KPet+1Ti∫0tetdt+Tddetdt,where et is the error value.The second tuning method proposed by Ziegler-Nichols is used to obtain the valuesKp, Ti, and Td. On it, a Ti=0 and Td=∞ is set, and the critical gain (Kcr) is obtained. Additionally, s=jω is substituted in the characteristic Equation (19) of the closed-loop system’s transfer function Equation (20) to calculate the critical frequency Pcr. The values that are calculated through this method and the values tuned experimentally are shown in Table 1.
(20)θX,YsUs=KMKcrsJLa+JX,YLas2+JLa+JX,YLa+BLas+KMKe+KMKcr.Table 1
PID controller gains calculated by the Ziegler-Nichols method and tuned experimentally.
θXθYZiegler-NicholsTunedZiegler-NicholsTunedKP235.35472.3535207.64852.0765Ti14.12850.141311.103214.1285Td3.53210.00352.77580.0026


## 2.5. Fuzzy Logic Control of the Solar Tracking System

The design of a Fuzzy Logic controller is described in four steps. Fuzzification, the error, and error change signals are normalized to the values inside the universe of discourse (Table2).Table 2
Ranges of possible values of the universe of discourse.
θXθYMinimum-90°0Maximum90°90The inference mechanism, the normalized inputs, and outputs are described in different membership functions, as shown in Figure4. IF-THEN rules contain the linguistic description of the controller (Table 3). In defuzzification, the output signal is turned into a quantifiable value. The inference mechanism and the defuzzification method of this paper are Mamdani and centroid methods [22].Figure 4
Membership functions for FL control inputs and outputs.Table 3
Description of the FL controller linguistic rule set.
etMNNEZPOMPdetMNMNMNNENEZNEMNNENEZPOZNENEZPOPOPONEZPOPOMPMPZPOPOMPMPMN is more-negative, NE is negative, Z is zero, PO is positive, and MP is more-positive in the domain of discourse.Figure5 shows the simulation diagram of the fuzzy controller, where Re is the reference and YFL the controllers’ output. The fuzzy error (g0), derivative (g1), and gain fuzzy (hf). These can be tunable values that are used to improve the system’s response. Its values are shown in Table 4.Figure 5
Block diagram of the Fuzzy Logic controller.Table 4
Fuzzy controller gain tuned.
θXθYg01.21.2g10.010.01hf10.4510.45


## 3. Results and Discussion

### 3.1. Simulation

To simulate the complete system using Simulink™ and determine the controller to be implemented, the diagram in Figure6 is followed. Equations (1) to (9) are used to calculate the solar radiation on an inclined surface, and Equations (10) to (13) are used to obtain the mechanical and electrical dynamics of the system. To determine the PV module’s behavior, Equations (14) to (17) are used. The equations, charts, and the diagram in Sections 2.4 and 2.5 govern PID and Fuzzy Logic controllers. The simulation data to evaluate solar radiation is shown in Table 5 and in Table 6 is shown the data of the photovoltaic module [23]. The results illustrated in Figure 7 were obtained.Figure 6
Diagram for simulating solar tracking system controllers.Table 5
Simulation data to evaluate solar radiation.
DataValueDay of the yearSeptember 18, 2019CityCuliacán, SinaloaLatitude24.79°Longitude107.38°Altitude71.01 mWeatherTropicalTable 6
Photovoltaic module data to simulate.
DataValueIsc2.10 AVoc106 VImpp1.69 AVmpp80 VPmax135.2 WBandgap1.12 eVISC is short circuit current (A), Voc is open-circuit voltage (V), Impp is peak power current (A), Vmpp is peak power voltage (V), and Pmax is rated power (W).Figure 7
Comparison simulations results for nominal power output of the controllers by PID and FL for the solar tracker on September 18.In Figure7, we can observe that both controllers can maintain the electric power output, within the nominal parameters of the PV module for 1 hour and 30 minutes. However, as exposed in Figure 8, the FL controller shows better performance because it has a stabilization time of 2.4 seconds, maximum output power transient of 0.59%, and a steady-state error of 0.51%. The control with PID for its part has a stabilization time of 2.98 seconds, maximum output power transient of 0.66%, and a steady-state error of 0.59%. For these reasons, the decision to implement the FL controller was considered. A simulation comparison was made of the energy produced by a photovoltaic module when implementing a solar tracker with respect to a fixed system. The results were that, for all times of the year, there is a higher production when using a two-axis monitoring system. For the spring season, it is 16% more energy; for summer, it is 44%; for autumn, it is 17%; and for winter, it is 5.4%. Annually, there is an average of 20.60% more energy with solar tracking systems.Figure 8
Performance of the controllers when reaching the nominal output power.


### 3.2. Methodology of Implementation

The prototype to implement Fuzzy Logic controller is shown in Figure9. The solar tracking system is made up of two linear actuators, one for the vertical axis, which corresponds to the azimuthal angle (λ), and the other for the horizontal axis, which corresponds to solar altitude (α). Each axis consists of two rowlocks and a round tube to allow rotation. The gyroscope was installed in the frame of the photovoltaic module, taking care not to interfere with the photovoltaic cells or produce shadows.Figure 9
Prototype two-axis solar tracking system to implement Fuzzy Logic controller.The implementation methodology of the power control algorithm for a dual-axis solar tracker is shown in Figure10.Step 1.
Using the real-time clock (RTC) DS1302, the data year (Y), month (M), day (d), hour (h), minute (m), and second (s) are obtained.Step 2.
According to the installation site of the solar tracker and the design parameters of the PV module, the algorithm is loaded with the data of the observer’s meridian’s longitude (LLong), local standard meridian (Lmel), latitude (φ), and the reference power (Pref).Step 3.
Estimate the solar position (α and ω) through Equations (1) and (2).Step 4.
Calculate the solar radiation on an inclined surface (HT) by Equations (1) to (9).Step 5.
Compare the estimated solar radiation (HT) with 0.
(21)HT<0⟶Step6,HT≥0⟶Step15.Step 6.
Update of the power output.Step 7.
Compare the output power (Pout) with the reference power (Pref).
(22)Pout<Pref⟶Step8,Pout≥Pref⟶Step9.Step 8.
Calculate orientation (θX) and inclination (θY) angles of maximum power point tracking.
(23)θX=180°−ω,θY=180°−α.Step 9.
AnglesθX and θY of the PV module are obtained, to maintain a power output that is within the nominal parameters of the PV module.
(24)h<12⟶θX=180°−ω+PoutθY=180°−α+Pout,h>12⟶θX=180°−ω−PoutθY=180°−α−Pout.Step 10.
The control algorithm, either PID or Fuzzy Logic, uses the reference angle estimated in Step8 or 9 and generates a control signal to modify the solar tracker’s position.Step 11.
The control signal is taken to a power stage, which can activate the linear actuators XLA18. For this, a coupling stage using optocouplers 4N25, transistors 2N222 and TIP31C are required. Moreover, feedback to Step10 is carried out with the gyroscope MPU6050.Step 12.
Orientation and inclination of the PV module.Step 13.
Measuring of output current (I) and voltage (V) using sensors CSNE151 and LV25P, respectively.Step 14.
Compare the output power with 0.(25)Pout<0⟶Step15,Pout≥0⟶Step6.Step 15.
Adjustment of the orientation toθX=90° and inclination to θY=45°.Figure 10
Flowchart for the control algorithm in the solar tracker.Figure11 shows the flow diagram of the FL controller implementation. The microcontroller Atmega2560 [24] is the device that communicates the computer, which is where the FL control algorithm is implemented with the tracking system. The H-bridge with transistors TIP31 [25] links the control signal calculated by the FL algorithm and drives the DC motor to change the position of the tracking system. The tilt and orientation angles are estimated with the gyroscope MPU 6050 [26]; the measurement is fed back to the microcontroller. In addition, the voltage and current are measured with the LV25-P [27] and CSNE151 [28] sensors at the output of the photovoltaic module. These measures are feedbacked to the microcontroller and calculated the output power. Table 7 shows the technical specifications of the sensors used in the implementation.Figure 11
Diagram for implementing the solar tracker controller.Table 7
Sensor data for voltage and current feedback.
DataLV25-PCSNE151Supply voltage±15±15Maximum input measure25 A500 VAccuracy±8%±5%Temperature operating0 to 70°C0 to 70°CResponse time<40μs<1μsThe average energy consumption for the solar tracking system to work is 6.71 w for each hour it is operating; this is because at times of the year where the length of the day is longer, such as in spring and summer, it has a consumption of 80.5 w when considering 12 hours of light and in autumn and winter, daily consumption of 60.39 w when considering 9 hours. The system is kept switched off at night to avoid energy consumption and can be reset when the first rays of sunlight are detected.To determinate the propagation of the error, the maximum and minimum values of the uncertainty, and the relative error, Equations (26) to (30) are used [29].
(26)Vout±δVout=Vout1±δVoutVout,Iout±δIout=Iout1±δIoutIout.The product is(27)Pout=VoutIout.Maximum value ofPmax is
(28)Pmax=Vout1+δVoutVoutIout1+δIoutIout≅VoutIout1+δVoutVout+δIoutIout.Minimum value ofPmin is
(29)Pmin=Vout1−δVoutVoutIout1−δIoutIout≅VoutIout1−δVoutVout+δIoutIout.Relative product error is(30)Pout=VoutIout⇒δPoutPout≈δVoutVout+δIoutIout.Table8 shows the calculated error for the FL controller tests. These results are obtained by considering the accuracy values mentioned in the datasheets of the voltage and current sensors Table 7. The voltage, current, and output power references are provided by the photovoltaic module datasheet from Table 6.Table 8
Value of the errors calculated for the tests.
DataValueVoltage sensor80 ± 6.4 VCurrent sensor1.69 ± 0.0845 AMaximum uncertainty output power152.776 WMinimum uncertainty output power117.624 WRelative error13%


## 3.1. Simulation

To simulate the complete system using Simulink™ and determine the controller to be implemented, the diagram in Figure6 is followed. Equations (1) to (9) are used to calculate the solar radiation on an inclined surface, and Equations (10) to (13) are used to obtain the mechanical and electrical dynamics of the system. To determine the PV module’s behavior, Equations (14) to (17) are used. The equations, charts, and the diagram in Sections 2.4 and 2.5 govern PID and Fuzzy Logic controllers. The simulation data to evaluate solar radiation is shown in Table 5 and in Table 6 is shown the data of the photovoltaic module [23]. The results illustrated in Figure 7 were obtained.Figure 6
Diagram for simulating solar tracking system controllers.Table 5
Simulation data to evaluate solar radiation.
DataValueDay of the yearSeptember 18, 2019CityCuliacán, SinaloaLatitude24.79°Longitude107.38°Altitude71.01 mWeatherTropicalTable 6
Photovoltaic module data to simulate.
DataValueIsc2.10 AVoc106 VImpp1.69 AVmpp80 VPmax135.2 WBandgap1.12 eVISC is short circuit current (A), Voc is open-circuit voltage (V), Impp is peak power current (A), Vmpp is peak power voltage (V), and Pmax is rated power (W).Figure 7
Comparison simulations results for nominal power output of the controllers by PID and FL for the solar tracker on September 18.In Figure7, we can observe that both controllers can maintain the electric power output, within the nominal parameters of the PV module for 1 hour and 30 minutes. However, as exposed in Figure 8, the FL controller shows better performance because it has a stabilization time of 2.4 seconds, maximum output power transient of 0.59%, and a steady-state error of 0.51%. The control with PID for its part has a stabilization time of 2.98 seconds, maximum output power transient of 0.66%, and a steady-state error of 0.59%. For these reasons, the decision to implement the FL controller was considered. A simulation comparison was made of the energy produced by a photovoltaic module when implementing a solar tracker with respect to a fixed system. The results were that, for all times of the year, there is a higher production when using a two-axis monitoring system. For the spring season, it is 16% more energy; for summer, it is 44%; for autumn, it is 17%; and for winter, it is 5.4%. Annually, there is an average of 20.60% more energy with solar tracking systems.Figure 8
Performance of the controllers when reaching the nominal output power.


## 3.2. Methodology of Implementation

The prototype to implement Fuzzy Logic controller is shown in Figure9. The solar tracking system is made up of two linear actuators, one for the vertical axis, which corresponds to the azimuthal angle (λ), and the other for the horizontal axis, which corresponds to solar altitude (α). Each axis consists of two rowlocks and a round tube to allow rotation. The gyroscope was installed in the frame of the photovoltaic module, taking care not to interfere with the photovoltaic cells or produce shadows.Figure 9
Prototype two-axis solar tracking system to implement Fuzzy Logic controller.The implementation methodology of the power control algorithm for a dual-axis solar tracker is shown in Figure10.Step 1.
Using the real-time clock (RTC) DS1302, the data year (Y), month (M), day (d), hour (h), minute (m), and second (s) are obtained.Step 2.
According to the installation site of the solar tracker and the design parameters of the PV module, the algorithm is loaded with the data of the observer’s meridian’s longitude (LLong), local standard meridian (Lmel), latitude (φ), and the reference power (Pref).Step 3.
Estimate the solar position (α and ω) through Equations (1) and (2).Step 4.
Calculate the solar radiation on an inclined surface (HT) by Equations (1) to (9).Step 5.
Compare the estimated solar radiation (HT) with 0.
(21)HT<0⟶Step6,HT≥0⟶Step15.Step 6.
Update of the power output.Step 7.
Compare the output power (Pout) with the reference power (Pref).
(22)Pout<Pref⟶Step8,Pout≥Pref⟶Step9.Step 8.
Calculate orientation (θX) and inclination (θY) angles of maximum power point tracking.
(23)θX=180°−ω,θY=180°−α.Step 9.
AnglesθX and θY of the PV module are obtained, to maintain a power output that is within the nominal parameters of the PV module.
(24)h<12⟶θX=180°−ω+PoutθY=180°−α+Pout,h>12⟶θX=180°−ω−PoutθY=180°−α−Pout.Step 10.
The control algorithm, either PID or Fuzzy Logic, uses the reference angle estimated in Step8 or 9 and generates a control signal to modify the solar tracker’s position.Step 11.
The control signal is taken to a power stage, which can activate the linear actuators XLA18. For this, a coupling stage using optocouplers 4N25, transistors 2N222 and TIP31C are required. Moreover, feedback to Step10 is carried out with the gyroscope MPU6050.Step 12.
Orientation and inclination of the PV module.Step 13.
Measuring of output current (I) and voltage (V) using sensors CSNE151 and LV25P, respectively.Step 14.
Compare the output power with 0.(25)Pout<0⟶Step15,Pout≥0⟶Step6.Step 15.
Adjustment of the orientation toθX=90° and inclination to θY=45°.Figure 10
Flowchart for the control algorithm in the solar tracker.Figure11 shows the flow diagram of the FL controller implementation. The microcontroller Atmega2560 [24] is the device that communicates the computer, which is where the FL control algorithm is implemented with the tracking system. The H-bridge with transistors TIP31 [25] links the control signal calculated by the FL algorithm and drives the DC motor to change the position of the tracking system. The tilt and orientation angles are estimated with the gyroscope MPU 6050 [26]; the measurement is fed back to the microcontroller. In addition, the voltage and current are measured with the LV25-P [27] and CSNE151 [28] sensors at the output of the photovoltaic module. These measures are feedbacked to the microcontroller and calculated the output power. Table 7 shows the technical specifications of the sensors used in the implementation.Figure 11
Diagram for implementing the solar tracker controller.Table 7
Sensor data for voltage and current feedback.
DataLV25-PCSNE151Supply voltage±15±15Maximum input measure25 A500 VAccuracy±8%±5%Temperature operating0 to 70°C0 to 70°CResponse time<40μs<1μsThe average energy consumption for the solar tracking system to work is 6.71 w for each hour it is operating; this is because at times of the year where the length of the day is longer, such as in spring and summer, it has a consumption of 80.5 w when considering 12 hours of light and in autumn and winter, daily consumption of 60.39 w when considering 9 hours. The system is kept switched off at night to avoid energy consumption and can be reset when the first rays of sunlight are detected.To determinate the propagation of the error, the maximum and minimum values of the uncertainty, and the relative error, Equations (26) to (30) are used [29].
(26)Vout±δVout=Vout1±δVoutVout,Iout±δIout=Iout1±δIoutIout.The product is(27)Pout=VoutIout.Maximum value ofPmax is
(28)Pmax=Vout1+δVoutVoutIout1+δIoutIout≅VoutIout1+δVoutVout+δIoutIout.Minimum value ofPmin is
(29)Pmin=Vout1−δVoutVoutIout1−δIoutIout≅VoutIout1−δVoutVout+δIoutIout.Relative product error is(30)Pout=VoutIout⇒δPoutPout≈δVoutVout+δIoutIout.Table8 shows the calculated error for the FL controller tests. These results are obtained by considering the accuracy values mentioned in the datasheets of the voltage and current sensors Table 7. The voltage, current, and output power references are provided by the photovoltaic module datasheet from Table 6.Table 8
Value of the errors calculated for the tests.
DataValueVoltage sensor80 ± 6.4 VCurrent sensor1.69 ± 0.0845 AMaximum uncertainty output power152.776 WMinimum uncertainty output power117.624 WRelative error13%


## 4. Results

Two tests were carried out to verify the functioning of the controller. Test 1 is aimed at maintaining the PV module power output in its nominal power. Test 2 consists of maintaining the PV module’s power output following an arbitrary power reference. The data and parameters of the carried-out tests are shown in Table9 and the results in Figures 12 and 13.Table 9
Test data to validate the operation of controller.
Test 1Test 2DaySeptember 18, 2019September 19, 2019Reference135.2 WVariableSampling interval9:00-16:00 hours9:00-15:00 hoursSampling time5 min.5 min.Figure 12
FL controller simulation and test performance for a nominal output power reference on September 18, 2019.Figure 13
FL controller simulation and test performance for a variable output power reference on September 19, 2019.Figure12 shows the results of simulating and implementing the FL controller for test 1. This test started at 9:00 hours, and it is concluded at 16:00 hours, with sampling intervals of current and voltage every 5 minutes, used to estimate the power output. The reference power for the controller is 135.2 W, which is the nominal power output of the PV module. For this test, an uncertainty was considered with minimum and maximum values calculated with Equations (28) and (29). The simulation reaches the desired interval around at 10:00 hours and stays within it until a close to 15:00 hours. As a result, the nominal power generation is obtained with an error of ±13% for 4 hours. Of these 4 hours that the uncertainty interval was reached from 12:00 to 14:00 hours, it remained at the nominal output power 135.2 W. The implementation reaches the desired power output at around 10:30 and falls below it at 14:25 hours. Solar radiation that day allowed the PV module power output to be maintained within ±13% its nominal value close to 4 hours. The nominal output power was maintained from 10:30 to 14:10 hours. The test shows variations in the output power, due to the weather conditions of that day, a difference from the simulation where it has an ideal and gradual increase in solar radiation.Figure14 presents the propagation of the error throughout test 1. Throughout the test period, an average error of 14.29% is obtained, which represents a difference of 19.32 W. However, once the system reaches the reference power at around 10:30 and until 14:10, an average error of 2.16% is obtained, which represents 2.92 W.Figure 14
Error propagation during test 1.Figure13 shows the results of simulating and implementing the FL controller for test 2. In this test, a reference signal with diverse amplitudes is presented to validate the robustness of the algorithm against abrupt changes. This test started at 9:00 hours and concluded at 15:00 hours and followed the same sampling procedure as test 1. The simulation results show that the controller follows the different reference steps quickly and without transients. The implementation graph shows that the controller responds swiftly to reference modifications, succeeding in reaching satisfactory values in the power output. As in test 1, the variation in output power compared to the simulation is due to changes in solar radiation.Figure15 presents the propagation of the error throughout test 2. Throughout the test period, an average error of 5.92% is obtained, which represents a difference of 5.77 W. It is observed that the controller responds better to powers equivalent to or greater than 100 W, which is above 70% of the nominal capacity of the photovoltaic module. During the periods with references equal to or greater than 100 W. An average error of -0.75% was presented, which represents -0.68 W of the output power, expected to be delivered by the system. On the other hand, during all test 2, an average error of 5.77% was obtained, which represents 5.98 W more than the expected output power.Figure 15
Error propagation during test 2.


## 5. Conclusions

This paper presents the design and evaluation of two controls for a two-axis solar tracking system; the first is a Proportional-Integral-Derivative and the other by Fuzzy Logic. Both controls maintain the output power of a photovoltaic module at its nominal value. When carrying out the evaluation and for the performance shown in the simulation, the control by Fuzzy Logic is implemented. For implementation, it develops a data acquisition card made up of voltage, current, and gyroscope sensors. This allows the output power values of the module to be monitored in strut throughout the day and under different conditions of solar radiation, thus correcting the position of the collector surface with respect to the sun by moving the structure. This is with the intention of increasing the collection of solar energy and achieving a perpendicular incidence of solar rays, which results in greater energy production from the photovoltaic module. In the future, this type of control and monitoring of energy production allows adjusting and knowing the amount of electricity that is supplied, depending on the load that is connected to a photovoltaic system. Likewise, estimate energy production under different meteorological conditions. In the next works, it is proposed to develop wireless and remote monitoring with storage on a server of the information collected for analysis and study of the solar monitoring system and the photovoltaic system, in addition to integrating a graphical interface that allows the user to view the variables flexible in real-time.



---

*Source: 8813732-2020-07-17.xml*