InTechOpen uses cookies to offer you the best online experience. By continuing to use our site, you agree to our Privacy Policy.

Computer and Information Science » Numerical Analysis and Scientific Computing » "MATLAB - A Fundamental Tool for Scientific Computing and Engineering Applications - Volume 3", book edited by Vasilios N. Katsikis, ISBN 978-953-51-0752-1, Published: September 26, 2012 under CC BY 3.0 license. © The Author(s).

Chapter 11

Model-Based Simulation of an Intelligent Microprocessor- Based Standalone Solar Tracking System

By C.S. Chin
DOI: 10.5772/46458

Article top


Actual solar tracker design
Figure 1. Actual solar tracker design
Schematic diagram of the standalone solar tracker system
Figure 2. Schematic diagram of the standalone solar tracker system
Overall tracking system block diagrams in Simulink
Figure 3. Overall tracking system block diagrams in Simulink
Circuit diagram of a PV cell model
Figure 4. Circuit diagram of a PV cell model
Fixed PV panel model
Figure 5. Fixed PV panel model
Actual and simulated net output current value of fixed panel
Figure 6. Actual and simulated net output current value of fixed panel
Effective sun irradiance model
Figure 7. Effective sun irradiance model
PV panel and LDR sensor angle position
Figure 8. PV panel and LDR sensor angle position
Smart tracker PV panel Model
Figure 9. Smart tracker PV panel Model
Sun’s model
Figure 10. Sun’s model
LDR sensor model
Figure 11. LDR sensor model
Microcontroller model
Figure 12. Microcontroller model
Block diagram of charge control
Figure 13. Block diagram of charge control
Charger model in Simulink
Figure 14. Charger model in Simulink
Battery model in Simulink
Figure 15. Battery model in Simulink
PWM Servo motor model in Simulink
Figure 16. PWM Servo motor model in Simulink
Schematic diagram of disturbances acting on solar tracker
Figure 17. Schematic diagram of disturbances acting on solar tracker
Simulink model for wind force
Figure 18. Simulink model for wind force
Current consumed due to wind force over time
Figure 19. Current consumed due to wind force over time
Rain droplet model on surface of solar tracker
Figure 20. Rain droplet model on surface of solar tracker
Experiment Setup for fixed (left) and smart tracker (right) system
Figure 21. Experiment Setup for fixed (left) and smart tracker (right) system
Simulation results of the standalone smart solar tracker
Figure 22. Simulation results of the standalone smart solar tracker
Simulated and actual power generated by smart solar tracker
Figure 23. Simulated and actual power generated by smart solar tracker

Model-Based Simulation of an Intelligent Microprocessor-Based Standalone Solar Tracking System

C.S. Chin

1. Introduction

The PV applications could be grouped according to the scheme of interaction with utility grid: grid connected, stand alone, and hybrid. PV systems consist of a PV generator (cell, module, and array), energy storage devices (such as batteries), AC and DC consumers and elements for power conditioning. The most common method uses the PV cells in the grid network. However, to understand the performance and to maximize the efficiency of the irradiation of the PV cells, the standalone PV cells have spurred some interest, especially, in the area of the solar tracker system.

Over the years, test and researchers had proven that development of smart solar tracker maximizes the energy generation. In this competitive world of advanced scientific discoveries, the introductions of automated systems improve existing power generation methods. Before the introduction of solar tracking methods, fixed solar panels were positioned within a reasonable tilted direction based on the location. The tilt angle depending on whether a slight winter or summer bias is preferred in the system. The PV systems would face “true north” in the northern hemisphere and “true south” in the southern hemisphere. Solar tracking is best achieved when the tilt angle of the tracking PV systems is synchronized with the seasonal changes of the sun’s altitude. Several methods of sun tracking systems have been surveyed and evaluated to keep the PV cells perpendicular to the sun beam. An ideal tracker would allow the PV cells to point towards the sun, compensating for both changes in the altitude angle of the sun (throughout the day), latitudinal offset of the sun (during seasonal changes) and changes in azimuth angle. In the light of this, two main types of sun trackers exist: passive (mechanical) and active (electrical) trackers. The detailed literatures review can be found in [3].

One class of the passive solar trackers is the fixed solar panel. It is placed horizontally on the fixed ground and face upwards to the sky. But most of the passive solar trackers are based on manual adjustment of the panel[4], thermal expansion of a shape memory alloy[5]or two bimetallic strips made of aluminum and steel[6]. Usually this kind of tracker is composed of a couple of actuators working against each other, which are, by equal illumination, balanced. By differential illumination of actuators, unbalanced forces are used for orientation of the apparatus in such direction where equal illumination of actuators and balance of forces is restored. Another passive tracking technology is based on the mass imbalance [6] between both ends of the panel. This kind of trackers does not use any kind of electronic control or motor. Two identical cylindrical tubes are filled with a fluid under partial pressure. The sun heats the fluid causing evaporation and transfer from one cylinder to another, which creates the mass imbalance. Passive solar trackers, compared to active trackers, are less complex but works in low efficiency. Although passive trackers are often less expensive, they have not yet been widely accepted by consumers.

On the other hands, major active trackers can be categorized as a microprocessor based, computer-controlled date and time based, auxiliary bifacial solar cell based and a combination of these three systems. In the microprocessor based solar tracker systems [7-11], a controller is connected to DC motors. Once the location is selected, the azimuth elevation range is determined, and the angular steps are calculated. Usually for monitoring the power generation, they also connected this tracking device to a PC by a code written in Assembly or C++ languages. In this solar tracker design, sensors were often used. For example, a photo-resistor [12-13] was put in a dark box with a small holes on the top to detect the illumination, and a light sensor or photosensor called light-dependent resistor (LDR) [11,14] to indicate the intensity of the radiation (that changes its electrical resistance from several thousand Ohms in the dark to only a few hundred Ohms when light falls upon it). The signals were then captured by the microcontroller that provides a signal to the motors to rotate the panel.

Whilst in the auxiliary bifacial solar cell [15] systems, the bifacial solar cell senses and drives the tracker system to the desired position. Auxiliary solar cells (panels) connected directly to a permanent magnet DC motor are fixed to a rotary axle of the tracker and can both sense and provide energy for tracking. In this design, unreliable and expensive components like batteries and driving electronics were completely eliminated. Hence, it is a very simple, reliable solar tracker for space and terrestrial applications. On the other hands, the computer-controlled date and time based system calculates the sun positions with respect to date and time with algorithms and creates signals for the system control via motor to the panel. In the solar tracking system that was designed by [16-17], the required position was calculated in advance and was programmed into Programmable Logic Control (PLC) that in term controls the motor to adjust the panel to maintain position perpendicular to the sun.

In another method that uses the combination of microprocessor with sensor and date/time based system [18-19], the sensors such as pyrheliometers (that measure the direct beam of sun irradiance) and/or light sensors send the signal to the microprocessor. Using the real-time clock (RTC), the tracker computes the position of the sun based on the date/time information of its clock. The data gathered during the day are analyzed, and a new improved set of parameters for the installation errors is computed. These data are used in the next day to compute more accurate positions of the sun, and the cycle continues.

Hence, the main difference between the active trackers is the ability to reduce the pointing error using external sensors, thereby increasing the daily irradiation the solar cells receive and the electric energy that they produced. A comparative study[3] shows that, the power consumption by the tracking device is only 2-3 % of the increased energy. The annual energy available to the two axis tracker was 72% higher than a fixed surface and 30% for single axis East-to-West tracker. However, the two or more axes trackers are more complex and costly to maintain as compared to the single-axis tracker. Furthermore, as Singapore is near to the equinoxes, the sun rises directly in East and set directly West regardless of the latitude, the single axis solar tracker becomes more favorable in this region. Based on the above-mentioned tracking systems, we have suggested that the active based single-axis tracker system is less complex to design and maintain. Additionally, for the system to work solely based on light-sensor tracking technology is not practical due to Singapore’s unexpected changes in weather conditions. We have therefore come about with the idea to integrate a time-based tracking technology with the light-sensor tracking technology in the tracker system. With high numbers of high-rise buildings in Singapore, the ideas of having a wall-mounted design for each household usage become an attractive option.

In the new solar tracking system installed with sensor feedback, and real-time clock control was capable of performing both automatic and preset mode of operation. The system’s ability to switch between the modes proves to be an important feature. The position and "status" of the sun is detected by two light-dependent resistor (LDR) sensors that are located at the both ends of the surface of the photovoltaic panel. In the automatic modes, the resultant signals from the sensors are fed into an electronic control system that operates a low- speed DC motor to rotate the panel via a speed-reduction system. In this mode, the Sun is not constantly tracked to prevent energy consumed by the motor, and the system will be in 'sleep' mode when the night falls. In the preset mode, the solar tracker rotates at a pre-determined angle from the sunrise to the sunset. The increment of the angle is determined through the data collected on the day and is analyzed and re-programmed for a better tracking ability on the next day. Whilst in the manual mode, the solar tracker is set to a desired angle by manually increasing or decreasing the angle via the input to the PIC microcontroller. In all modes, a night return algorithm repositioned the panel to its initial home position facing the East (at sunrise).

Besides, the ability to operate as a solar tracker, computer models of the PV panel and the electro-mechanical systems are modeled using MATLABTM/SimulinkTM environment. In literature [20], a simple visual C++ program was used to provide an excellent graphic user interface (GUI) and control normal DC power supply output using the computer printer port to exactly simulate solar panel characteristics. As seen in [21-23], MATLAB TM/Simulink TM was used to model and analyze the PV model characteristics. However, there are only a few attempts [24] to model the entire PV standalone system, including the electro-mechanical subsystem such as DC motor, drive transmission, microcontroller output, battery and charging module. Whether like or not, this is essential as they are parts of the PV systems and the influence on the overall performance such as efficiency and power output can be compromise if the electro-mechanical system is poorly design for the active solar tracker and when it is subjected to external disturbances such as wind and raindrops. With that in mind, the PV standalone system model consists of a PV panel, a servo motor, a battery, a charger, two LDR sensors, external disturbances and the microcontroller are modeled using MATLABTM/SimulinkTM. It was chosen due to its easy to program language supported by ready toolboxes and graphic block diagrams can be designed for complicated systems simulation. With the completed system model, it is used to determine the power and its efficiency over the fixed solar panel before actual implementation.

In summary, the book chapter presents the modeling and simulation of the solar tracker system consisting of the photovoltaic system under a constant load using MATLABTM and SimulinkTM. The chapter is organized as follows. The overview of the electro-mechanical design of the single-axis solar tracker is described in Section 2. This is followed by the description of the proposed MATLABTM and SimulinkTM models in Section 3. The experiments and testing are described in Section 4. Lastly, conclusions are drawn in Section 5.

2. Solar tracker system descriptions

2.1. Mechanical structure

After the solar panels and other components were selected, the overall structural design of the solar tracker as seen in Fig.1 was fabricated. The solar tracker weight 3 kg and has an overall dimension of 340mm x 270mm x 500mm. The compactness of the proposed solar tracker enables it to be mounted on the wall. It consists of the PV panel, the pulley-chain transmission system; the motor and electronics boards support and the vertical pillar with base plate support. The entire structure was fabricated using the aluminum rods and plates. The pillar holding panel is aligned to the center of the panel for better flexibility during the panel rotation. The tracker is designed to have a single-axis rotation (East to West), and the motor is mounted in such a way that the tracker systems have only a single-axis freedom of rotation. The fixture to hold the sensors are then assembled and aligned at both ends of the PV panel to sense the sun irradiance.

The PV panel frame support (as seen in Fig. 1) has a support rod that runs across the PV panel width. The pulley on the rod supported by two bearings is directly connected to the motor shaft via the pulley transmission system. The two mechanical stoppers at each ends were incorporated to limit the rotation of the panel. As shown in Fig. 1, the components were arranged along the vertical pillar mounted on the base plate support.


Figure 1.

Actual solar tracker design

2.2. Electrical system

The overall mechanical and electrical subsystems were integrated into the solar tracker system as shown in Fig. 2. The detailed design of the circuitry could be found in [24]. The block diagram of the solar tracker system consists of mostly electrical components. The solar tracker consists of the PV cells, the charge controller and the lead-acid battery. Other subsystems such as the LDR sensors, the voltage regulator, and the microcontroller-PIC18F4520 target board were also used. The LDR sensors sense the sunlight intensity and send the signal to the microcontroller to rotate the PV panel via the servo motor. The electrical energy is then stored in the lead-acid battery that is later used to power the respective components.


Figure 2.

Schematic diagram of the standalone solar tracker system

The PV cells are a device that helps to convert the solar energy into electrical energy. The solar panel selected is capable of generating 10W power. As per the vendor specification, it weighs about 1.3kg with a dimension of 341mm x 269 mm x 28mm. Charge controller was supplied together with the solar panel's unit. It requires 12V supply and is capable of handling a maximum of 5A. The charge controller prevents the over-charging of the battery.

The LDR sensors (NORPS-12) are basically resistors that vary their resistance according to the sunlight intensity when exposed to irradiance. The output of the sensor circuit is an analogue voltage that is used as an input to the PIC microcontroller. To determine the value of resistor R, various values of different resistors were examined to finalize an appropriate resistor. The desired resistor value should provide a voltage that covers the sunny and cloudy conditions. The following resistor values as shown in Table 1 were tested. From the test result, it was found that varying the value of resistors in the voltage divider circuit helps to improve the sensitivity of the output. The resistor of 100Ω was found to be suitable to differentiate between the sunny and cloudy day.

Fixed Resistor (Ω)Vout on sunny dayVout on cloudy day∆Vout

Table 1.

Recorded Voltage variation at different resistor values

The driving mechanism includes the servo motor and the pulley system. The servo motor was controlled using the microcontroller. The controller uses the PWM (Pulse Width Modulation) signal to drive the servo motor at a controlled speed correspond to a maximum voltage of 6V. The PWM wave is a continuous square wave signal that changes between 0V and 6V. The duration or width of the pulse determines the angle of the shaft’s rotation. A voltage regulator circuit was used to bring the supply voltage down to a level suitable for use in the microcontroller, the charge controller and the LDR sensors. The microcontroller target board in the system was used to control the servo motor. It receives the signals from the LDR sensors. The analogue voltage is converted into digital signal (logic 1 or 0) for processing. The processor was a PIC18F4520 from Microchip Inc. The PICKIT2 programmer was then used to interface MPLAB Integrated Development Environment to the target board. To program the microcontroller target board, MPLAB C18 Compiler software that runs on the Microsoft Window as a 32-bit application was used. The C program was then compiled into assembly language before downloading into the target board.

2.3. Modes of operation

There are three modes of operation in the solar tracker. They are namely: automatic, preset and manual mode. In the automatic mode, the PIC microcontroller rotates the PV panel to balance the light intensity at both LDR sensors. In the case when both sensors receive a low voltage due to cloudy conditions, the PV panel is programmed to wait for 15minutes and automatically switched to preset mode (using internal real-time clock). In this mode, the PV panel is programmed to rotate 2˚ towards west in every 15 minutes. If the extreme position towards the west is sensed (at sunset), the night return algorithm repositioned the panel to its initial home position facing the East (at sunrise). In the manual mode, it allows the panel to rotate to the desired angle by manually increasing or decreasing the angle via the input to the PIC microcontroller. Once the PV panel is positioned to the desired angle, it switches back to the automatic mode.

In summary, the operation modes for the control of solar tracker and the features in these user options are shown below.

  • When the SW1 switch is pressed, it rotates the panel to the home position and waits for the user to select the automatic mode (SW2), the preset mode (SW3) or manual mode (SW4).

  • When the SW2 switch is pressed, it starts the tracking in “automatic mode”. In this mode, the rotation of the PV panel depends on the LDR sensors.

  • When the SW3 switch is pressed, it starts the tracking in “preset mode”. In this case, it rotates the panel in a pre-determined angle till the sunset.

  • When the SW4 switch is pressed; the panel is allowed to rotate manually to a desired position. Once it is positioned, it switches back to the automatic mode.

3. Standalone solar tracker system modeling

In this section, the main aim is to simulate the single axis solar tracking system during the automatic mode using MATLABTM /SimulinkTM (see Fig. 3). To obtain a more realistic model, the solar tracker is subjected to external disturbances such as wind and raindrop. It should be similar to the real prototype made in section 2 such that comparisons could be made fairly. All the data for building the simulation models were obtained from either the components' datasheets or the experiments conducted. The simulation run was performed in every second of the entire 10 hours or 36000 seconds of experimental setup. The rapid accelerator mode has been chosen to reduce the simulation time to about 180-seconds real time (one-second second simulation time is equivalent to 180-seconds real time). The rapid accelerator mode gives the best speed improvement compared to normal mode when simulation execution time exceeds the time required for code generation. For this reason, the rapid accelerator mode generally performs better than normal mode when simulation execution times are several minutes or more. The ODE45 solver type of variable step size was used throughout the simulations. Solar tracker model developed in Simulink could detect the sun irradiance to produce the required current. The simulation model is implemented in such a way that when the sun irradiance falls on the sensors, the servo motor moves the PV panel in an incremental way until the sunset.

The PV tracking panel with two LDR sensors, namely: V_LDR_B and V_LDR_T are the bottom and top voltage outputs based on the corresponding sun irradiance data. The irradiance from the sun model was obtained by dividing the power obtained from the tracker by the surface area of the PV cells. The outputs were used as inputs to the microcontroller. The servo motor rotates the panel at an angle based on the microcontroller PWM signal. This process repeats again until the sunset. During the process, the PV panel generates direct current that keeps the 12V battery charged. The battery gets charged or discharged depending on the state of the charger. The external load was modeled by a pure resistor to simulate the loading on the motor shaft. The wind and rain droplet were modeled as additional current load (that is by deducting the actual current generated from the solar cells) on the solar tracker. The efficiency of the proposed solar tracking system over the fixed panel can be compared. With the model, it is used to determine the types of PV systems that could be successfully combined to give a required level of efficiency before actual implementation.


Figure 3.

Overall tracking system block diagrams in Simulink

3.1. PV panel model

The simplest equivalent circuit of a solar cell is a current source in parallel with a diode as shown in Fig. 4. The current source represents the current generated by the PV cell due to the photons received by it, and is constant under constant sun irradiance and temperature. During darkness, the solar cell is not an active device; it works as a diode. It produces neither a current nor a voltage. However, if it is connected to an external supply (large voltage) it generates a saturation current or dark current. The key parameters for a PV cell are short circuit current (Isc or the current from the solar cell when the voltage across the cell is zero), open circuit voltage (Voc) and sun irradiance value. Usually these values are given by the manufacturer in the data sheet.


Figure 4.

Circuit diagram of a PV cell model

Normally a single PV cell produces a rather small voltage that have less practical use. The real PV panel always uses many cells to generate a large voltage. For example the Kamtex-10W PV module used for our project comprises of 36 cells to generate a large enough voltage to charge a 12 volt battery. The data sheet for Kamtex-10W is given in Table 2.

Maximum Power (Pmax)10W
Voltage at Pmax17.6V
Current at Pmax0.57A
Short-circuit current (Isc)0.6A
Open-circuit voltage (Voc)21.6V
Temperature coefficient of open-circuit voltage-(10+/-1)mV/degree Celsius
Temperature coefficient of short-circuit current(0.065+/-0.015)%/degree Celsius
Nominal Operating Cell Temperature (NOCT)30+/-3degree Celsius

Table 2.

Electrical characteristics of PV Module-Kamtex (KMX-10W)

The following parameters were used in the calculation of the net current of a PV cell.

  • Saturation current of the diode, I0.

  • Net current from the PV panel I.

  • Light-generated current inside the cell IL.

  • Series resistance Rs, which is internal resistance of the PV panel;

  • Shunt resistance Rsh, in parallel with the diode, Rsh is very large unless many PV modules are connected in a large system;

  • Diode quality factor, n;

In an ideal cell Rs is 0 and Rsh is infinite. The net current of the PV cells is the difference between the output current [25-26] from the PV cells and the diode current is given by.


where V is the voltage across the PV cell, k is the Boltzmann’s constant (=1.38110-23 J/K), T is the junction temperature in Kelvin, q is the electron charge (=1.60210-19C), n is the diode ideality factor (1.62).


Here, Tref equals to 298K is the reference temperature of the PV cell, G (Tref) equals to 1000W/m2, K0 is the temperature coefficient are used. Then,


where Vg is the band gap energy (=1.12eV). It is the energy needed to break a bond in the crystal, Voc is the open circuit voltage corresponds to the photocurrent IL. The resistance within each cell in the connection between cells is the series resistance, Rs


By Newton’s method,


where f'(x) is the derivative of the functionf(x)=0,xn is a present value, and xn+1is the next value. So,


Then using Newton’s equation:


By using MATLABTM, the above function can be computed numerically to obtain the net output current from the PV cells.

The fixed PV panel was modeled as shown in Fig.5 using the equations as seen in (11). The output voltage of the battery is 12V. The temperature (TaC) obtained during the experiment and the sun irradiance data (G) that represents the intensity (or the power of sunlight falling per unit area) were used. The solar irradiance data were taken hourly, and the averages in each hour were then tabulated. The PV Cells Array block diagram computes the net current from the PV cells using the embedded MATLAB function. The plot for the actual and simulated net output current is shown in Fig. 6. The deviation in the plot may due to the averaging done during each hour and the power consumed before noon was actually higher than expected. This is reasonable as the sunlight is stronger during the day.


Figure 5.

Fixed PV panel model


Figure 6.

Actual and simulated net output current value of fixed panel

To simulate the sun irradiance at different PV panel’s angle, the effective irradiance was used. Details of the effective irradiance block diagram can be seen in Fig. 7. The block diagram defined the angle between sun’s incident ray and PV panel. For a static panel, it is always parallel to the ground that is at 90 degrees (0 degree for sunrise and 180 degrees for sun set). A simple program was written to obtain the relationship of the effective sun irradiance when the difference between the sun angle and panel angle is more than +/-90 degrees. To limit the angle to 90 degrees, the cosine trigonometric function was introduced in the model to create the zero sun irradiance when such a situation occurs.


Figure 7.

Effective sun irradiance model

3.1.1. Smart tracker PV panel

The smart tracker panel was installed with two LDR sensors. Assuming both sensors are placed in parallel with the PV panel, the effective irradiance is similar. As the results, the smart tracker is unable to perform the proposed sun tracking algorithm. To circumvent this, the top and bottom sensors were positioned at 45 degrees and 135 degrees respectively as seen in Fig. 8. When the sunlight falls onto the PV panel, the LDR sensors generate different voltages (that is V_LDR_B and V_LDR_T according to the changes in the sun irradiance) to move the PV panel.


Figure 8.

PV panel and LDR sensor angle position


Figure 9.

Smart tracker PV panel Model

3.2. Sun model

At each time instant, the actual sun irradiance data obtained from the experiment was used. In the sun model, the sun is assumed to travel from the 0 degree (sunrise) to 180 degrees (sunset) from 7am to 5pm. During these 10 hours, the PV panel rotates 180 degrees. As shown in Fig. 10, the initial sun’s angle is at 30 degrees and with the angle changes at 15 degrees per hour or 0.004147 per simulated time in second; the corresponding sun angle (with respect to the base) is obtained.


Figure 10.

Sun’s model

3.3. LDR sensor model

The LDR sensor is a variable resistor that changes the resistance according to the intensity of incident ray illuminated onto it. As the intensity of sunlight changes, the resistance and the voltage of LDR sensors change. The output voltage across the resistor (resistance value of 100Ω) is converted into digital signal at the input of the microcontroller. Based on the TTL input, the servo motor rotates clockwise (CW) or anticlockwise (CCW). In the LDR sensor model as shown in Fig. 11, the difference between the panel angle and the assumed sun position was calculated. The angles were limited to +/- 90 degrees. When 90 degrees is reached, the LDR sensor output a zero irradiance that corresponds to a certain voltage as shown in Table 1. Recalled, V_LDR_B and V_LDR_T are the voltage output from the bottom and top sensors.


Figure 11.

LDR sensor model

3.4. Microcontroller model

As shown in Fig. 12, the microcontroller model is modeled using the embedded MATLABTM function. The inputs to this function are LDR_B and LDR_T, a real-time clock and initial buffer value of 1.5. One of the inputs (named Extime) is used to compare the current time with the previous time when the PWM value changes. The microcontroller generates output duration of 1.5ms to rotate the PV panel if the voltage difference of the LDR sensors is less than 0.07V and are both less than 0.75V (very low irradiance). If LDR sensor's voltages are both greater than 0.75V but the voltage difference is less than 0.07V, the PV panel remains in the current position. When the LDR sensor values is greater than 0.07V, the motor turns the PV panel by adjusting its PWM value until the sensors’ voltages are equal. The delay time of 0.7 seconds and increment steps were found using the trial-and-error method during the simulation.


Figure 12.

Microcontroller model

3.5. Charger Model

A charger is essential to protect the battery from over-charged and fully drained. In an ideal case, the battery charge remains between 20% and 100% based on a PSpice photovoltaic model [27]. This charger model (see Fig. 13) includes two switches namely: Switch A and B to control the battery voltage flow. Switch A remains deactivated for any value of battery charge above 12.95V (100% charged). Switch B deactivates once the battery charge drops to 11.6V (20% charge left). The truth table for the charge control is given in Table 3.


Figure 13.

Block diagram of charge control

The Switch A is connected to the PV module on one side and the battery on the other side. When the net output current from the PV panel is positive, it begins to charge the battery until the maximum charge of 12.95V is reached. When there is no current from PV panel, the switch remains activated, the current required is obtained from the battery. After the battery is fully charged, the switch disconnects. The switch is activated again if the battery voltage drops below to 12.2 V.

The Switch B is connected when the battery is in charging mode (greater than 12.25V). When the battery voltage drops below 11.6 V, the battery is draining, and hence it is important to cut off the loads in order not to damage the motor. The conditions for the switching are given in Table 3 and the corresponding values of Switch A and Switch B (previous states and current states) are given by X, Y, M and N respectively. The value ‘1’ represents the closed switch and ‘0’ represents the open switch.


Table 3.

Truth table used for discharging (left) and charging (right) condition

The Simulink model of the charger can be seen in Fig. 14. The Compare block diagrams were used to compare the various conditions as shown in Table 3. The logic gate after the comparisons serves as the truth table for operating the Switch A and B.


Figure 14.

Charger model in Simulink

3.6. Battery model

The lead-acid battery model was implemented based on a PSpice model [27] for a lead acid battery. It has two modes of operation – charging and discharging modes. When the current to the battery is positive (negative), the battery is in the charging (discharging) mode. The following parameters were used for modeling the battery.

  • SOC1 is the initial state of charge,

  • SOC (%) is the available charge.

  • SOCm is the maximum state of charge.

  • ns is the number of 2V cells in series.

  • D (h-1) is the self-discharge rate of battery.

  • Kb (no unit) is the charging and discharging battery efficiency.

As SOC varies linearly with Vocb (open circuit voltage of the battery), the relationship between open circuit battery voltage and state of charge can be determined using the Table 4.

VoltageState of Charge (%)
11.76Completely discharged

Table 4.

State of charge with respect to Voc

The terminal voltage for the battery is given by:

Here V1 and R1 both depend on the mode of battery operation and have different equations. Battery current; Ibat is positive when battery is in charge (ch) mode and negative when in discharge (dch) mode.

In charging mode, we can write the resistance and voltage as follows:


where SOC (t) represents the current state of charge (%), SOC (t) is defined by a set of equations later. In discharging mode, the resistance and voltage are written as follows:


To estimate the value of SOC (t), the following equations have been used to describe them in the PSpice model[27].


In equation (17), the time is assumed in seconds, so some terms must be divided by 3600 such that SOC is in Wh. By substituting Vbat as a function of V1, the value of SOC (t) can be determined as shown.


The Simulink model in Fig. 15 is used to model the charging and discharging conditions during the process. The left-hand side of the Fig. 15 shows the respective functions used. There are namely: Vch, Vdch, Rch and Rdch. The input to the battery is the net current output from the PV panel and the output is the battery voltage, Vbat. In order to obtain 12V, six 2V cells denoted by ns were used. The maximum state of charge, SOCm was set to 84. The discharge rate, D and the efficiency, Kb are set as 1.5×10-5 and 0.8 respectively. As the battery is in charging or discharging mode, it allows only one value for R1 and V1 to the equations.


Figure 15.

Battery model in Simulink

3.7. PWM servo motor model

The solar panel is designed to drive the PV panel in a small angle, between 0 to 180 degrees at a low speed. PWM is used to control the motor. The PWM is a continuous square wave with a period of 20ms. With the PWM signal, the output shaft of the servo motor changes the angular position of the PV panel. The following parameters are used for the servo motor.

  • Moment of inertia (J) = 0.01 kg.m2/s2;

  • Damping ratio (b) = 0.1 Nms;

  • Electromotive force constant (Kt) = 0.01Nm/Amp;

  • Back electromotive force constant (Ke) = 0.01s.s/rad;

  • Electric resistance (Rm) = 1 ohm;

  • Electric inductance (Lm) = 0.5H;

  • Input Voltage (Vm);

  • Output angle (θ);

For the PWM servo motor, the transfer function between the output rotational angle and the input voltage is written as follows.


Based on this transfer function, the servo motor model can be modeled in Simulink (as seen in Fig. 16) using the look-up tables. The look-up table uses the PWM as an input to rotate the motor to a pre-determined angle. When pulse width changes from 1.25ms to 1.75ms, the panel angle changes from the 0 degree to 180 degrees in a linear manner. The second look-up table on the feedback path provides the actual pulse width results. The actual and the desired pulse-width are then compared to obtain the error signal for the Proportional-Integral-Derivative (PID) controller (using the controller gains:Kp=60,KI=30,KD=3) to drive the motor to the desired angle. The embedded MATLABTM function block is used to deactivate the motor load when it is not turning. An external load was added to show whether the motor is able to drive the PV panel. The weight could vary due to the modeling error. In this case, the external load is modeled as a pure resistance value (40).


Figure 16.

PWM Servo motor model in Simulink

3.8. Wind model

Tracking the sun irradiance in an ideal condition would involve no disturbances on the system. But in practice, factors such as external force like wind and rain (as seen in Fig. 17) moves the tracker away from its position. It is therefore vital for the solar tracker to be able to track the sun throughout the daytime. Two types of disturbances are considered: wind and raindrop as depicted in Fig. 17 schematically.

The drag force due to the wind comprises of two main forms: (a) friction drag is present when the panels are near to horizontal position; (b) Pressure drag is prominent when the tracker is positioned near to vertical position. As a preliminary model, the drag coefficient is modeled as a flat plate and the area of the solar tracker varies with angle,. The seventh power law [28], as shown below can estimate the air velocity over the tracker.

where u is air velocity at height y; U0 is air velocity at boundary layer; y is height above surface; d is height of boundary layer (taken from ground).


Figure 17.

Schematic diagram of disturbances acting on solar tracker

Taking small changes on both sides,


For a certain velocity at any height above the ground, the drag force acting on a tilted plate is written as:

Using (21) and (22), the wind drag force must be integrated over the area of the tilted solar tracker facing the wind. The resulting moment or torque about the central axis becomes:


where h1 and h3 are heights of each side of the solar tracker; h2 is height of centre axis of rotation as shown in Fig. 17. This moment differential about the central axis, due to the wind force, can be modeled using MATLAB/Simulink as a continual force that consumes the current obtained from the irradiance.

The Simulink model is shown in Fig.18. Equation (23) was modeled in Simulink. The integral terms in (23) are modeled as a summation in the difference between the lower vertical height (y-h2) acting in counter-clockwise direction and its upper vertical height (h2-y) acting in the clockwise direction. The values for the parameters as shown in Fig. 18 are as follows: h1=0.415m, h2=0.500m, h3=0.585m, L= 0.34m, a = 1.165 kg/m3 (at outdoor temperature of 30oC), A = 0.092m2, Uo=0.8m/s (around 1.56 knots), Cd =1.0 and d=1m.


Figure 18.

Simulink model for wind force

As shown in Fig. 19, the increases in the wind speed causes the current consumption (or moment) acting on the tilted solar tracker to increases. It could be observed that the wind loading is cyclic in nature as the moment acting on the solar tracker changes as time increases. As an increase in the torque required implies an increase in the current (as shown in the relationship Kt=0.01Nm/A) needed to drive the tilted solar tracker, this causes an increase in the current drawn from the battery. For a wind speed of 0.8m/s (or 1.56 knots), the estimated moment acting on the tilted solar tracker is estimated to be around 0.0022Nm and the corresponding current consumed is computed to be approximately 0.22A.


Figure 19.

Current consumed due to wind force over time

3.9. Raindrop

Raindrop is driven along by the gravitational force. The movements can be evaluated by considering the equation of motion of the particles in horizontal along-wind, cross-wind and vertical directions. In this paper, we considered the raindrop that is not driven by the wind. Instead, we consider the mass of rain droplet (m) acting on the surface of the solar tracker. As the volume of the rain droplet is spherical in shape, the mass can be computed by multiplying it by the water density. The total force acting on the surface of the solar tracker can be computed as:

where w is the water density, rr is the radius of the raindrop and g is the gravitational constant.

In the simulation, the total force, Fr acting on the surface of the solar tracker could be easily modeled. The point force acting on the surface is translated into the torque acting about the central axis by multiplying the value by L/2 (that is half of the width of the solar panel). The radius of the rain droplet rr is assumed to be small, that is 0.25mm instead of large raindrop. The current consumed as a result of the rain droplet is around 0.011 mA.


Figure 20.

Rain droplet model on surface of solar tracker

4. Experimental and simulation results

In order to validate the proposed modeling, it was necessary to compare the experiment results for the fixed panel with the smart solar tracker system. To obtain this data, simple experiments were performed. The experiment setup for both fixed, and tracker system can be seen in Fig. 21. The setups were installed on building roof top that was 40m above the ground. The temperatures during the experiment were recorded using the Type-K thermocouple sensor. The open-circuit voltage and the current readings were recorded using a multi-meter connected to the solar cells. The climatic condition considered for experimental was sunny during the entire test period. The average temperature recorded was around 30˚C and the local wind speed was broadcasted to be around 0.8m/s (or 1.6knots) during the tests.


Figure 21.

Experiment Setup for fixed (left) and smart tracker (right) system

The simulation results of the solar tracker using the Simulink are shown in Fig. 22. As observed from the plots, the solar tracker is able to follow the sun angle. In the plot, the smart solar tracker produces a higher current output as compared to the static PV panel. The other part of the graph shows the state of the charge during the simulation. As seen in the battery voltage, the Switch A was deactivated when the maximum allowable voltage of 12.95V reached. The switch B was always connected during the entire duration (in charging mode).


Figure 22.

Simulation results of the standalone smart solar tracker

In Fig. 23, the simulated power output (or current) over the day was quite close to the actual results obtained. There was some slight deviation during the noon and evening period due to the modeling of the actual irradiance obtained from the experiment. Furthermore, the current consumed during the actual test was different as the wind loading and other disturbances were not modeled in the simulation.


Figure 23.

Simulated and actual power generated by smart solar tracker

The output power of the smart tracker was compared with the fixed panel design in order to determine the efficiency of the solar tracker system. As expected the overall power (or the efficiency) generated by the tracking panel is higher than that of the static panel. However, with the disturbances acting on the simulated models (see Fig. 23), the simulated curve exhibits closer behavior to the actual response obtained from experiment. Here, the efficiency refers to the ratio of difference between the sum of smart tracker and the fixed panel power to the sum of fixed panel power over the period of interest. The efficiency (obtain from experiment results) is around 20%. As compared to various the solar trackers as seen in [3], the average efficiency is around 12-15% and hence, the proposed design is slightly higher and comparable to the existing design. The solar tracker was efficient during most of the day except during the noon time where the sun irradiance was found to be the highest. The fixed panel that lies horizontally on the ground is therefore, quite comparable to the solar tracker system and hence zero efficiency was obtained. This explained why it is common to use a fixed panel in a sunny day where it experienced the maximum sun irradiance during the noon time.

For the cost and benefit of the proposed solar tracker system, it has some special features such as the initial expenditure on the equipment is usually high but there is no fuel cost involved, and the maintenance cost is low. The accumulated data [29] show that at present a PV system is competitive where small amounts of energy are required at a place that is far away from an electric grid or any other source of energy. For the economic evaluation of a system, the parameters that are usually considered are the life-cycle cost (LCC), payback period (PP) and rate of return (RR). LCC is the sum of all the costs of a system over its lifetime, expressed in today’s money. In case of the analysis of a PV system, the lifetime of the modules is usually taken as 20 years. The calculations were made on the basis of the approach described in [29-30]. Our estimates of the electricity cost matched with those reported in [29] for the PV, diesel generator and grid-extension systems. Our analysis shows that the cost of electricity from a PV system is approximately equal to that from a diesel generator and cheaper than a grid extension. This PV system may be used for domestic applications, especially in remote areas. Keeping in view the environmental impact and economic assessments of the designed PV system it is evident to the listed data that the PV system even at present is a competitive choice for small power requirements. With the expectation that the cost of a solar module will reduce from around $ 3/Wp to somewhere below $2/Wp in the near future (see one of the quarterly report from, a PV system may as well become an economic and more attractive option for higher loads.

5. Conclusions

The design, modeling and testing of an active single axis solar tracker were presented. In the proposed design and operation of the solar tracker system, the sun was not constantly tracked based on the simulated irradiation. This helps to prevent unnecessary energy to be consumed by the devices and the system stops moving when the night falls. Hence, the proposed control structure provides the flexibility to accommodate different weather conditions, and also different user preference. The completed MATLABTM/SimulinkTM model of the solar tracker with external disturbances is first used to provide a computer-aided design tool to determine the efficiency over the fixed solar panel, net current output, power generated and the types of PV systems that can be combined to give a required level of efficiency before actual implementation. The experimental results show a similar behavior in the power, the efficiency and the current output over the fixed solar panel when compared them with the simulation results. The external disturbances such as wind loading and raindrop model provide an insight to the impact of the current consumption on the model of the solar tracker before actual implementation.


1 - Lopes L A C, Lienhardt A M,2003A Simplified Nonlinear Power Source for Simulating PV Panels. IEEE 34th Annual Conference on Power Electronics Specialist: 17291734
2 - B. Kroposki, R. De Blasio, 2000Technologies for the New Millennium: Photovoltaics as a Distributed Resource.IEEE Power Engineering Society Summer Meeting: 17981801
3 - H. Mousazadeh, A. Keyhani, A. Javadi, H. Mobli, K. Abrinia, A. Sharifi, 2009A Review of Principle and Sun-Tracking Methods for Maximizing Solar Systems OutputRenewable and Sustainable Energy Reviews1318001818
4 - G. Mwithiga, S. N. Kigo, 2006Performance of a Solar Dryer with Limited Sun Tracking CapabilityJournal of Food Engineering74247252
5 - V. Poulek, 1994Testing the New Solar Tracker with Shape Memory Alloy ActorsIEEE Photovoltaic Specialists Conference 111311133
6 - M. J. Clifford, D. Eastwood, 2004Design of a Novel Passive Solar TrackerSolar Energy 77269280
7 - O. Bingol, A. O. Altintas, 2006Microcontroller Based Solar-Tracking System and Its Implementation. Journal of Engineering Sciences 12243248
8 - B. Koyuncu, K. Balasubramanian, 1991A Microprocessor Controlled Automatic Sun TrackerIEEE Transactions on Consumer Electronics37913917
9 - A. Zeroual, M. Raoufi, M. Ankrim, A. J. Wilkinson, 1998Design and Construction of a Closed Loop Sun-Tracker with Microprocessor ManagementSolar Energy 19263274
10 - T. Jinayim, S. Arunrungrasmi, T. Tanitteerapan, N. Mungkung, 2007Highly Efficient Low Power Consumption Tracking Solar Cells for White LED-Based Lighting System. International Journal of Electrical Computer and Systems Engineering 113075179
11 - P. Hatfield, 2006Low Cost Solar Tracker, Bachelor of Electrical Engineering Thesis, Department of Electrical and Computer Engineering, Curtin University of Technology.
12 - S. Rumala, 1986A Shadow Method for Automatic TrackingSolar Energy37245247
13 - I. Palavras, G. C. Bakos, 2006Development of a Low-Cost Dish Solar Concentrator and its Application in Zeolite DesorptionRenewable Energy324222431
14 - Kalogirou S A1996Design and Construction of a One-Axis Sun-Tracking. SolarEnergy 57465469
15 - V. Poulek, M. Libra, 2000A Very Simple Solar Tracker for Space and Terrestrial ApplicationsSolar Energy Materials and Solar Cells6099103
16 - A. Mohamad, 2004Efficiency Improvements of Photo-Voltaic Panels using a Sun Tracking SystemApplied Energy79345354
17 - M. Khader, O. Badran, S. Abdallah, 2008Evaluating Multi-Axes Sun-Tracking System at Different Modes of Operation in JordanRenewable and Sustainable Energy Reviews12864873
18 - P. Roth, A. Georgiev, H. Boudinov, 2004Design and Construction of a System for Sun TrackingRenewable Energy29393402
19 - Hession P J, Bonwick W J1984Experience with a Sun Tracker. SolarEnergy 32311
20 - Kulkarni S S, Thean C Y, Kong A W2003A Novel PC Based Solar Electric Panel Simulator. The Fifth International Conference on Power Electronics and Drive Systems: 848852
21 - Yu T C, Chien T S2009Analysis and Simulation of Characteristics and Maximum Power Point Tracking for Photovoltaic SystemsInternational Conference on Power Electronics and Drive Systems: 13391344
22 - Tsai H L2010Insolation-Oriented Model of Photovoltaic Module using Matlab/SimulinkSolar Energy8413181326
23 - Tsai H L, Tu C S, Su Y J2008Development of Generalized Photovoltaic Model Using MATLAB/Simulink, Proceedings of the World Congress on Engineering and Computer Science, San Francisco, USA:16
24 - C. S. Chin, A. Babu, W. Mc Bride, 2011Design, Modeling and Testing of a Standalone Single-Axis Active Solar Tracker using MATLAB/Simulink. Renewable Energy 361130753090
25 - J. M. Enrique, E. Duran, M. Sidrach-de-Cardona, J. M. Andu, (2007) Theoretical Assessment of the Maximum Power Point Tracking Efficiency of Photovoltaic Facilities. Solar Energy 813138 .
26 - Villalva M G, Gazoli J R, Filho E R2009Comprehensive Approach to Modeling and Simulation of Photovoltaic ArraysIEEE Transactions on Power Electronics511981208
27 - C. Luis, S. Silvestre, 2002Modelling Photovoltaic Systems Using PSpiceJohn Wiley and Sons, Chichester.
28 - White F M1999Fluid Mechanicsfourth ed. McGraw-Hill.
29 - K. S. Karimov, M. A. Saqib, P. Akhter, M. M. Ahmed, J. A. Chattha, S. A. Yousafzai, 2005A Simple Photo-Voltaic Tracking System. Solar Energy Materials and Solar Cells 874959
30 - T. Markvart, 2000Solar ElectricityWiley, New York.