Build an intelligent solar tracking system with FPGAs
By Altera Technical Staff

Solar energy is becoming increasingly attractive as we grapple with global climate changes. However, while solar energy is free, nonpolluting, 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 optimal efficiency, solar panels should be perpendicular to sunlight where the illumination is strongest. However, since the direction of sunlight changes during the course of a day—and from season to season—a high-performance solar tracking system can maximise 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 minimises 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. 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 analogueto-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. The logic flow design of the system is implemented with an embedded processor control circuit, as shown in figure 2. When the tracking control circuit is activated, the system performs tracking, energy conservation, and system protection, as well as system control and external antiinterference measures. External interference includes weather influences, such as wind, sand, rain, snow, hail, and salt damage (i.e. salt erosion on the mechanism). Embedded processor in control The embedded processor (figure 3) acts as the control centre

Figure 1: Solar tracking control architecture.

Figure 2: Tracking control flowchart.

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. On the hardware side, there are two key sensors as follows: • Balance sensor—The initial re-

set 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° | EE Times-India

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. Control motor operation Although the two drive motors of the solar tracking system can independently rotate without a coupling problem, they inevitably exhibit non-linear phenomena in the moment of inertia. A closedloop 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

Figure 3: System architecture.

Figure 4: Solar energy fuzzy control system structure.

Figure 5: SOPC system development flow.

is the control centre. The sensor, decoder, and other devices form a complete control loop, ensuring the system’s optimal efficiency. The controller design (figure 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. SOC design After defining the system and its components, the design team generated the system with the | EE Times-India

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, utilising 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. Figure 5 shows the SOC system development flow.

Testing 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. The table shows the energy data calculations. Comparing the total net electricity generation of the fixed elevation angle control and smart solar tracking control, the smart system yielded 22 per cent greater efficiency than the fixed system. For the indoor test, a searchlight provided a simulated sunlight source, creating a fixed and

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

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 proces-

sor and an FPGA, the design team was able to accelerate development, maximise flexibility, and simplify their design. Their successful implementation of an intelligent solar tracking system is a potential boon to environmentally conscious builders worldwide. | EE Times-India

Sign up to vote on this title
UsefulNot useful