0% found this document useful (0 votes)
75 views

Design of ARM-Based Solar Tracking System

This document summarizes a research paper on the design of an ARM-based solar tracking system. The system uses an STM32 microcontroller to calculate the solar position using GPS data and a solar trajectory algorithm. It employs both solar trajectory tracking and photoelectric sensor tracking modes to achieve accurate solar tracking in all weather conditions. Experimental results showed the system maintains tracking accuracy within 0.15 degrees and improves solar energy utilization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Design of ARM-Based Solar Tracking System

This document summarizes a research paper on the design of an ARM-based solar tracking system. The system uses an STM32 microcontroller to calculate the solar position using GPS data and a solar trajectory algorithm. It employs both solar trajectory tracking and photoelectric sensor tracking modes to achieve accurate solar tracking in all weather conditions. Experimental results showed the system maintains tracking accuracy within 0.15 degrees and improves solar energy utilization.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Proceedings of the 37th Chinese Control Conference

July 25-27, 2018, Wuhan, China

Design of ARM-Based Solar Tracking System


Kang Mao1, Fuxiang Liu1, Ruijing Ji1
1. School of Aerospace Engineering, Beijing Institute of Technology, Beijing 100081
E-mail: [email protected]

Abstract: This paper presents a solar tracking system based on ARM, which mainly adopts the solar trajectory tracking mode,
supplemented by the photoelectric sensor tracking mode according to the weather condition, and control the motor rotation to
achieve all-time accurate solar tracking. The experimental results show that, the system performance is reliable, and all-weather
tracking accuracy is maintained within 0.15 degrees. Therefore, the system can be widely used in solar photovoltaic power
generation and lighting devices with solar energy utilization ratio improving greatly.
Key Words: solar tracking, solar trajectory tracking, photoelectric sensor tracking

algorithm; Then the corresponding pulse signal outputted by


1 Introduction chip controls the motor angle in the direction of elevation
In the contemporary world, energy issue becomes and azimuth to adjust the sun tracker attitude for coarse
increasingly severe. Non-renewable resources, such as oil tracking. After finishing the coarse tracking, the system will
and coal, are about to be depleted. Developing a low-carbon judge whether to enable the photoelectric sensor tracking
economy and utilizing renewable energy are the inevitable mode according to the real-time light intensity. Only if the
ways for mankind’s sustainable development. light intensity is greater than the system setting threshold, the
Solar energy has received enough attention for its large photoelectric sensor tracking mode is enabled, then the
amount, sustainability, and universality. At present, most of system controls motor rotation to carry out accurate tracking.
the solar generating equipment adopts a fixed-form device; The threshold setting is mainly used to distinguish the
the solar panel is fixed, and the solar position changes weather conditions (sunny) based on the light intensity.
constantly during the day. The sun ray cannot always radiate System running is displayed through the LCD screen. System
perpendicularly to the panel surface with the incident angle control block diagram is shown in Fig.1.
changing constantly, which leads to low energy receiving
efficiency and the efficiency will only peak at some point. Signal Processing Circuit
Practice shows that the solar tracking system used in solar
generating equipment, can increase the power generation GPS
capacity of more than 30%, the cost reduced by 25% [1]. In STM32F407 Motor and Drive
Photoelectric
China, Xiang Ping designed a biaxial solar tracking system Sensor
LCD
based on the solar position algorithm, which added a
closed-loop control structure with an angle sensor. It can
Optical Encoder
all-time track the sun, but it is insensitive to the weather
conditions and greatly affected by the accuracy of the
position algorithm and system’s installation error [2]; The Fig. 1: System control block diagram
high-precision solar tracking system designed by Yang
Peihuan adopts optical tracking method, which has high
tracking accuracy but problems of tracking stability are 3 Control Theory and Hardware Design
easily affected by environmental interference and weather [3]; The error generated by the algorithm is easy to accumulate
The solar tracking control system designed by Zhao Jianhua during the operation, and cannot be effectively removed
can automatically switch the tracking control method and the when the system controls motor rotation by adopting the
photoelectric tracking control method based on the change of solar trajectory tracking mode independently [5]. To ensure
illumination conditions to achieve all-time tracking, but the accurate solar tracking of the system, the photoelectric
accuracy is not high [4]. sensor tracking mode is added. The photoelectric sensor's
In this paper, the solar tracking system mainly adopts the electrical signal feedback is used to control motor rotation
solar trajectory tracking mode, supplemented by the and offset the accumulated error caused by the algorithm and
photoelectric sensor tracking mode to offset cumulative the out-of-step error of the stepper motor.
algorithm error generated by a stepper motor in the tracking The system hardware design includes STM32 processor
process, and finally realizes accurate solar position tracking. module, photoelectric sensor module, motor and drive
2 General Control module, optical encoder, GPS module and LCD screen. The
following is a detailed description of the main contents.
The system uses STM32F407ZGT6 chip as the control
core, and combines the system’s local time and geographic 3.1 Processor
location information to calculate the solar position (solar The STM32F407ZGT6 is a high-performance embedded
elevation and azimuth) through the solar trajectory tracking processor from STMicroelectronics based on the ARM

7394
CortexTM-M4 core, and it features high-speed data 3.3 Photoelectric Sensor
processing. The chip in the control system is mainly
The system uses QP50-6 four-quadrant photodetector as a
responsible for calculating the real-time solar elevation angle
photoelectric sensor. The schematic diagram is shown in
and azimuth, and outputs stepper pulse signal to control
Fig.3.
motors through receiving and analyzing photoelectric sensor
Design a closed cylinder. A four-quadrant sensor is placed
signal.
at the focal length of the lens so that sun rays pass through the
3.2 GPS lens and form a spot of a certain diameter on the
photosensitive surface of the sensor. When the light intensity
A high-performance GPS positioning module with
is greater than the setting threshold, the sum of voltages
U-BLOX NEO-6M module, is mainly used to obtain local
output by four quadrants of the sensor photosensitive surface
latitude, longitude, and time information. The solar
meets the requirements, and the system enables the
trajectory algorithm used in the system decodes the local
photoelectric sensor tracking mode. The voltages generated
time, latitude, and longitude from the GPS information to
by the four quadrants I, II, III and IV on the photosensitive
calculate the solar elevation angle and azimuth.
surface are U 1 , U 2 , U 3 and U 4 respectively. During the
tracking process, the voltages should be equal if the sunlight
vertical photosensitive surface and the center of the light spot
coincides with the center of the photosensitive surface; If not,
the light spots will deviate from the center. In the
two-dimensional plane, 'x and 'y respectively represent
the horizontal and vertical offset of the spot center, which is
relative to the center of the photosensitive surface.

Fig. 2: Horizontal system of coordinates

The solar elevation angle h and azimuth J in the


horizontal system of coordinates is shown in Fig.2, where P
is the observation point; g is the projection of the sun on the
ground plane. The following is the formula of solar position
calculation [6][7].
sin h sin M sin G  cos M cos G cos Z
sin J cos G sin Z / cos h Fig. 3: Principle of the four-quadrant photodetector
(1)
360 284  n In order to identify the position of the light spot, the
G 23.45sin position offset need to be converted into an electric signal.
365
'x and 'y are expressed as voltages U x and U y . The
where G is the solar declination angle; n is the number of
days in the year; Z is the solar hour angle, calculated as following describe the relationship between the above
follows: voltages.
Lloc  Lst
E Ux U1  U 4  U 2  U 3
ts tr  Uy U1  U 2  U 3  U 4
(3)
15 60
E 9.87 sin 2 B  7.53cos B  1.5sin B (2) Light intensity easily affects detector output current value.
In order to eliminate the influence of spot power change on
360 n  81
, Z 15 ts 12
U x and U y , normalization is performed to obtain the
B
364 corresponding equivalent E x and Ey , which are used to
where t s is the true solar time; t is the mean solar time; represent the spot center position offset 'x and 'y . The
Lloc is the local longitude; Lst is longitude of the local normalized formula is as follows [8][9]:
standard time zone (e.g. China in GMT+8, Lst =120°); E is
the jet lag, B is the coefficient.

7395
U1  U 4  U 2  U 3 coarse tracking and accurate tracking modes. Incremental
Ex optical encoder outputs three square wave pulses of A, B, Z
U1  U 2  U 3  U 4 phase by using photoelectric conversion principle; A, B two
(4)
U1  U 2  U 3  U 4 sets of pulses have a phase difference of 90°, which is
Ey applied to distinguish the motor rotation direction. The
U1  U 2  U 3  U 4 number of pulses per encoder revolution is fixed and
The system calculates the angle which the motor needs to determined by the grating line number on the encoder. The Z
be turned according to E x and E y , then outputs the phase produces a pulse, which indicates that the motor
rotates one circle.
corresponding pulse signal to control the motor.
Lens imaging principle is shown in Fig.4. It is known that 4 Software Design
the sun diameter D1 1.392 u10 km and the distance
6
The system uses the software MDK5 to develop and
between the Sun and the Earth R 1.5 u10 km . T is the debug the master chip, and the program written in C. The sun
8

angle between sun rays and light-sensitive surface normal. tracking system application development mainly considers
the operation mode of day and night, as well as daylight
The range of T is limited if the light passes through the lens
intensity. The system enters the standby mode at night, the
and can be imaged on the light-surface. The relationship application flow chart is shown in Fig.5.
between the above parameters is as follows:
tan D D1 2 R Power on
d 2 f tan D (5)
Light intensity: L
T arctan D 2 f
Init System threshold: S

Reset

GPS data
processing
Y
N Daytime
or not

Coarse Tracking

N
L>S or not

Y
Accurate
Tracking

Fig. 4: Lens imaging principle


Delay 30s

The system uses an achromatic doublet lens with a focal


length f=200 mm; the photosensitive surface diameter of the Fig. 5: Program flow chart
photoelectric sensor D=7.98 mm. According to the above
When the system power on, it firstly initializes the
equation, the detection range of sun rays is T 1.14 and controller’s internal storage data, and then resets the solar
the spot diameter is d=1.86 mm. Therefore, the system tracker attitude in its initial position. To be specific, the
adjusts the solar tracker attitude by coarse tracking so that photosensitive plane of photodetector placed in a horizontal
the four-quadrant photoelectric detector can sense sun rays, position, upward direction, and elevation angle rotation axis
that is, when T  1.14 . If the sum of four-quadrants’ of the solar tracker is placed east-west. Read GPS module
output voltages in photosensitive surface satisfies the information, then the system carries out the corresponding
requirements, the system enables photo-sensor tracking calculation and analysis to judge whether now is the daytime.
mode to carry out accurate tracking. If it is daylight, the system enters the solar trajectory tracking
mode to control the motor in the direction of elevation and
3.4 Motor and Encoder azimuth according to the calculation result of the GPS
Taking the required tracking accuracy into account, the information, so that the tracker achieves coarse solar
system chooses two-phase bipolar stepper motor tracking. After four-quadrant photodetector entering the
J-4218HB4402, and the corresponding driver is two-phase range that can sense the sun, the system determines whether
hybrid stepping motor driver HST2802-H. Two 16-bit photoelectric sensor tracking mode is enabled in order to
resolution optical encoder in the system is mainly used to accomplish accurate solar tracking. In the accurate tracking
real-time feedback the motor rotation direction, angle in algorithm, PID controller is added to control the motor at a

7396
small angle in every iteration, so that the light spot on the standby mode) can switch automatically. The tracking
photosensitive surface gradually approaches surface center accuracy can reach 0.15° without reaching the theoretical
position and the equivalent E x , E y approaches 0. Then it value 0.1°; this may be due to ignoring solar tracker
installation errors in the theoretical analysis. The tracking
is considered that the sunlight is vertically aligned with the accuracy of the solar tracking system designed in this paper
photosensitive surface. To ensure the system tracking is more significant compared with the system in reference [4],
accuracy, set the tracking cycle time that can be adjusted to where the sun position tracking cumulative error is less than
30s. 2° per hour.
If the system judges that it is dark now according to the The tracking accuracy analysis and experimental results
calculation result of GPS information, the system enters the illustrate that the system tracking accuracy designed in this
standby mode and resets the initial position to wait for the paper is mainly related to the solar trajectory algorithm error,
daytime of the next day. the step angle of stepping motor, the sampling error of
5 Theoretical Analysis and Verification controller ADC module, the algorithm error of conversion
between the sensor electrical signal and spot displacement,
5.1 Tracking Accuracy Analysis and the solar tracker mechanical installation error.

The solar position algorithm is mainly related to the


calculation of solar declination angle and solar hour angle.
The solar trajectory algorithm in the system software design
applies the Duffie algorithm mentioned in reference [7] to
calculate the declination angle and hour angle. Theoretical
calculation error [7] is shown in Table 1.
Table 1: Calculation Error

Unit Maximum Error


Mean-error
(in degrees) Error Variance
Sun Azimuth 0.3686 -0.0276 0.0398
Sun Elevation 1.1392 0.3929 0.1233

Fig. 6: Tracking error of elevation angle


The sun tracker has a 20:1 gear ratio on the mechanical
structure and the stepping motor has a step angle of 0.014° at
the 128 subdivisions setting of its drive.
Ignoring the sun tracker installation error, in theory, the
main controller outputs corresponding pulse signals to
control motor rotation according to the solar trajectory
algorithm, and the motor’s position accuracy is less than
1.14°, which meets the requirement that the photoelectric
sensor enters the range that can sense the sun. The
experimental results obtained in reference [9] denote that the
measurement error of four-quadrant detector can be
controlled within 0.1°, and the main influencing factor is the
algorithm error that converts the sensor signal into
displacement.
5.2 Experiment Fig. 7: Tracking error of azimuth angle

The system is applied to the solar tracker; the test site is


located in Haidian District of Beijing; the geographic 6 Conclusion
location is 116.3° E, 39.9° N; the test time is May 17, 2016, The solar tracking system designed in this paper, using the
8:00 am to 17:00. Measure tracker motor rotation angle in ARM chip STM43F407ZGT6 as a microcontroller, adopts
the direction of elevation and azimuth every half an hour, the solar trajectory tracking mode as the main method, then
and local solar elevation angle and azimuth values are adopts photoelectric sensor tracking mode to realize accurate
compared to get its tracking error curve, as shown in Fig.6 tracking according to the real-time weather conditions. In the
and Fig.7. In the actual test, the system can effectively actual test, the system is applied to the solar tracker, which
control motor in coarse tracking mode based on the solar runs stable and is able to achieve all-time accurate solar
trajectory algorithm, to make the four-quadrant tracking with a tracking accuracy of 0.15°. Practice has
photodetector enter the range that can sense the sun, so that proved that this system has reliable performance and wide
the system can judge whether the photoelectric sensor practicability. It possesses the promotion value of solar
tracking mode is enabled or not. The error measurement photovoltaic power generation and lighting equipment,
results show that the system can work normally and which can greatly improve the solar energy utilization ratio.
accurately track the sun; there is no tracking mistakes during
the test; the system's operating mode (tracking mode and

7397
References [6] J. Yang, Solar Photovoltaic Power Generation Technology.
Beijing: Publishing House of Electronics Industry, 2013,
[1] C. Hou, Sun Tracking Device and Technology. Shenyang: chapter 2.
Liaoning Science and Technology Publishing House, 2012, [7] C. Du, P. Wang, and C. Ma, A high accuracy algorithm for
chapter 1. the calculation of solar position, Energy Engineering, (02):
[2] P. Xiang, J. Zhang, and J. Gao, Design of closed-loop control 41-44, 2010.
system for sun tracing based on ARM, Industrial [8] E. Liu, H. Wu, and P. Zou, Deviation Analysis Based on
Instrumentation & Automation, (02): 24-26, 2010. Four-Quadrant Detector for Sun-tracking, Journal of
[3] P. Yang, The research of high precision solar tracking sensor. Atmospheric and Environmental Optics, 7(02): 139-146,
Wuhan: Wuhan University of Technology, 2010, chapter 7. 2012.
[4] J. Zhao, T. Zhang, Research and design of sun-tracking [9] Y. Chen, T. Zhu, and H. Li, Analysis and improvement in
control system, Electronic Measurement Technology, (03): angle measurement algorithm of the four-quadrant detector,
1-3, 2016. Laser & Infrared, 39(06): 669-672, 2009.
[5] B. Lu, The research of high accuracy method of sun-tracking
in photovoltaic system. Xinxiang: Henan Normal University,
2012, chapter 1.

7398

You might also like