Design Article

IMG1

How to use FPGAs to develop an intelligent solar tracking system

Altera Technical Staff

9/24/2008 2:48 PM EDT

Abstract
Solar panels are typically in fixed positions. They're limited in their energy-generating ability because they cannot consistently take full advantage of maximum sunlight. For more effective solar energy systems, the solar panels should be able to align with sunlight as it changes during a given day and from season to season. This article examines the design advantages of creating an intelligent solar tracking system using an embedded processor and an FPGA in a system-on-a-chip (SOC) architecture.

Introduction
Solar energy is becoming increasingly attractive as we grapple with global climate changes. However, while solar energy is free, non-polluting, and inexhaustible, solar panels are traditionally fixed. As such, they cannot take advantage of maximum sunlight as weather conditions and seasons change. This article describes an FPGA- and embedded processor-based system-on-a-chip (SOC) implementation of a prototypical solar-tracking electricity generation system that improves the efficiency of solar panels by allowing them to align with the sun's movements.

Integrated design for faster development and greater flexibility
For optimal efficiency, solar panels should be perpendicular to sunlight where the illumination is strongest. But since the direction of sunlight changes during the course of a day – and from season to season – a high-performance solar tracking system can maximize usage of the panels.

A team of students from Yuan Ze University in Taiwan applied embedded design techniques and a SOC architecture to create an FPGA-based solar tracking system. This system uses two motors as the drive source, conducting an approximate hemispheroidal 3-D rotation on the solar array within a certain amount of space. This rotation allows the system to track the sun in real time to efficiently perform photoelectric conversion and production.

To reduce control problems, the two drive motors are decoupled, i.e., the rotation angle of one motor does not influence that of the other motor. Similarly, one motor does not bear the weight of the other. This implementation minimizes the system's power consumption during operation and increases efficiency and the total amount of electricity generated.

This application uses an Altera Nios II configurable embedded processor to perform solar tracking. The design combines the processor with the two-axis motor tracking controller, memory, and I/O interfaces into one Cyclone II FPGA. This integration accelerates development while maintaining design flexibility, reduces the circuit board costs with a single-chip solution, and simplifies product testing. The design includes three modes as follows:

  • Balance positioning: A tilt switch prevents the solar panels from hitting the mechanism platform and damaging it or the motor. 
     
  • Automatic mode: The system receives sunlight onto the cadmium sulphide (CdS) photovoltaic cells where the CdS acts as the main solar tracking sensor. The sensor feeds back to the FPGA controller through an analog-to-digital (A/D) converter. The processor is the main control core and adjusts the two-axis motor so that the platform is optimally located for efficient electricity generation. 
     
  • Manual mode: This mode is available if the system requires maintenance or repair.


1. Solar tracking control architecture.
(Click this image to view a larger, more detailed version)

The logic flow design of the system is implemented with an embedded processor control circuit, as shown in Fig 2. When the tracking control circuit is activated, the system performs tracking, energy conservation, and system protection, as well as system control and external anti-interference measures. External interference includes weather influences, such as wind, sand, rain, snow, hail, and salt damage (i.e. salt erosion on the mechanism).


2. Tracking control flowchart.
(Click this image to view a larger, more detailed version)

Embedded processor in control
The embedded processor, as shown in Fig 3, acts as the control center and integrates the two-axis control chip. The system establishes what data is fed back to the FPGA using a photography sensor. It conducts the tracking control rule operation to calculate the angle required by the motor and adjusts the motor's current angle. It also moves the solar panel to achieve optimal power.


3. System architecture.
(Click this image to view a larger, more detailed version)
On the hardware side, there are two key sensors as follows:

  • Balance sensor: The initial reset balance uses a tilt switch. The mechanism includes four switches (east, west, south, and north) that are powered on when horizontal balance is achieved during initial system reset. 
     
  • Tracking sensor: The tracking sensor is composed of four similar CdS sensors, located east, west, south, and north to detect the light source intensity in each orientation. The CdS sensor forms a 45° angle with the light source. At the CdS sensor positions, brackets isolate the light from other orientations to achieve a wide-angle search and quickly determine the sun's position. The four sensors are divided into two groups, east/west and north/south, to compare the intensity of received light across the orientations within each group.

The signals fed back by the tracking sensor form the basis of the controller input. The control design outputs the signals to control the two-axis step motor and the solar tracking control system.

If the light source intensity received by the sensors is different, the system obtains signals from the sensors' output voltage in the two orientations. The system then determines which sensor received more intensive light based on the sensor output voltage value interpreted by a voltage type A/D converter and an 8-bit, microprocessor-compatible, A/D converter. The system drives the step motor towards the orientation of this sensor. If the output values of the two sensors are equal, both the output difference and the motor's drive voltage are zero, which means the system has tracked the sun's current position.

Controlling motor operation with fuzzy logic
Although the two drive motors of the solar tracking system can independently rotate without a coupling problem, they inevitably exhibit nonlinear phenomena in the moment of inertia. A closed-loop control for the motors can resolve this. Given the speed of the sun's movement, the solar tracking system doesn't need to rotate very fast. Fuzzy control rules can be used to control the motor operation while ensuring the system control mechanism's adjustability and fast response time.

To implement the fuzzy control, a hardware component was written in VHDL and integrated into the SOC system. The component loads the control program into the embedded processor, which is the control center. The sensor, decoder, and other devices form a complete control loop, ensuring the system's optimal efficiency.

The controller design, shown in Fig 4, takes the measured value of the light strength received by the sensor as the feedback and implements control using many rounds of modifications. The CdS sensor resistance changes with the light strength. Fuzzy control handles the errors of the two groups in the vertical (southern and northern) and horizontal (eastern and western) axes as the fuzzy control input. By contrast, a design using a discrete processor would have required external logic circuits to implement the fuzzy controller, increasing design complexity and costs.


4. Solar energy fuzzy control system structure.
(Click this image to view a larger, more detailed version)

SOC design
After defining the system and its components, the design team generated the system with the SOPC Builder system development tool in Quartus II design software. For hardware design, the team used the design software to compile the logic circuit of the HDL programs and EDIFfiles. During software design, they used the GNUPro software development tool, as well as software resources such as header files, libraries, monitors, and peripheral drivers, to generate and edit application code.

To ensure the correctness of the hardware and software design, the team used ModelSim software for simulation. When errors were found, they reverted to system generation, utilizing SOPC Builder to modify and generate the system until it functioned properly. When ready, they downloaded the hardware and software designs on to the development board and prototyping kit for circuit verification. Fig 5 shows the SOC system development flow.


5. SOPC system development flow.
(Click this image to view a larger, more detailed version)

Testing reveals superior smart solar current system
The solar tracking system was tested indoors and outdoors. Outside, the solar platform was affixed to the top of a building so the results could be compared between fixed positions and smart collection systems. Over a 24 hour period, the smart collection system had to operate for approximately 30 seconds per hour to maintain proper alignment with the sun. During that period, the solar panel charged for about eight hours, consuming no power the remainder of the time. Table 1 shows the energy data calculations.


Table 1.Collected 24-hour solar energy radiation (cloudy) data.

Comparing the total net electricity generation of the fixed elevation angle control and smart solar tracking control, the smart system yielded 22% greater efficiency than the fixed system.

For the indoor test, a searchlight provided a simulated sunlight source, creating a fixed and smart simulated sun-running orbit. Results show that the voltage of the fixed solar current collection system is less than that of the smart solar current system.

Conclusion By integrating the entire control system in an embedded processor and an FPGA, the design team was able to accelerate development, maximize flexibility, and simplify their design. Their successful implementation of an intelligent solar tracking system is a potential boon to environmentally conscious builders worldwide.

Authored by the Technical Staff of Altera Corporation, which includes participants from the Product Planning, Technology Development, IC Design, Software, Embedded and DSP Marketing, and Customer Success Programs departments.


print

email

rss

Bookmark and Share

Joinpost comment




Please sign in to post comment

Navigate to related information

Product Parts Search

Enter part number or keyword
PartsSearch

FeedbackForm