Heliostat attitude angle detection method based on BP neural network

Traditional fossil fuels have dried up, global warming and sustained economic development have led to the rapid growth of clean energy resources. Tower thermal power generation has attracted much attention due to its ability to generate electricity during the night. The traditional tower thermal power generation adopts open-loop control which requires very high mechanical accuracy. In the operation of power station and there may be a settlement, wind load or other factors make the heliostat skew phenomenon. It will eventually lead to a decline in power generation efficiency. Thus, we propose a closed-loop feedback control method based on machine vision and optical reflection principle based on the method of using the correction of heliostat spot acquisition board. To identify the spot and the ellipse fitting method for spot feature extraction using image processing technology, we propose a heliostat to determine the characteristics of the corresponding spot mapping the attitude angle method based on BP neural network. Thus we can provide direct feedback control of heliostat errors. The new method can effectively increase the heliostat tower power generation efficiency and also can make the tower heliostat thermal power generation cost reduced with the popularization and application of significance.


Introduction
As a clean and renewable energy, solar energy attracts more and more attention.Solar power is divided into two categories: photo-voltaic and photo-thermal power generation.And the technology faces enormous pressure to reduce the cost of electricity as soon as possible [1].Because of the thermal power generation tower has special advantages, has attracted much attention, but because the control precision, heliostat operation stability, safety and reliability and the construction cost is limited.In order to reduce the cost of tower thermal power generation [2,8,9,12].
Tower power by elevation and azimuth tracking control of heliostat.The heliostat tracking control method for main program control and sensor control and sensor program, hybrid control in three ways [5]; in the practical application, mainly adopts open-loop control based on program control.The procedure control and the use of sensor data is gradually become the focus of the heliostat [3,4,13].
Heliostat traditional open loop control directly using the clock to control the rotation angle of the heliostat, very high requirements for heliostat support mechanical precision, resulting in high construction costs .The literature [5] used the camera as the day to achieve accurate tracking sun trajectory tracking, but because of the weather, the application will have certain limitations and difficulties in practical application; Literature [6] proposes the use of Whiteboard Based correction methods.But because of the way based on spot correction, not directly to optimize the layout of the heliostat field to provide effective data.
The above mentioned in the literature are not involved with heliostat attitude, but in practical application, heliostat attitude angle correction for heliostat reflection is very important [18].In the tower heliostat thermal power generation, because of the heliostat tower distance target center is far away, it will cause deviation of the heliostat spot cannot be accurately reflected to the target position, if the deviation is too large, it will even cause the spot projected on the target position.
This paper presents a method of heliostat attitude angle from the spot of direct mapping.In many applications of new energy systems, such as fault diagnosis, neural network method can be used as a powerful tool for processing, and has a very good effect [14,19,20].The complex neural network structure can approximate any nonlinear function, and can solve the complex nonlinear mapping problem very well.This paper uses BP neural network mining implicit mapping relationship between spot feature and heliostat attitude angle.Based on the small biaxial heliostat tracking platform for data acquisition and verification experiment, the method can accurately identify the heliostat spot with the characteristics of the corresponding attitude angle.

Problem description
In the tower heliostat thermal power generation, we need the heliostat reflection light reflected to the specified position of the target tower to achieve maximum heat collecting efficiency and Maximize output [6].In engineering applications, due to the installation error, mechanical wear and other irresistible factors will make the heliostat cannot be accurately reflected to the target area.Therefore, in practice, is the attitude angle of the heliostat need correction, this paper proposes a correction method for high precision heliostat attitude angle based on BP neural network.
According to the physical model of heliostat reflection [6,7].At the specified coordinates by the relevant input parameters, we can get the heliostat azimuth and elevation angle.The reflected light spot is projected to the target area, and then the original image data is collected.In order to use the data effectively and get the best spot, we need to preprocess the original data [10, 15,16,17].After the image processing, the smaller size of the reflected spot image is obtained.Based on the least square method, ellipse fitting is used to obtain the general characteristic equation of fitting ellipse, and the algebraic form of conic equation is expressed as formula (1) (1) The five eigenvalue representations of the ellipse can be obtained from the characteristic equation of the ellipse, that is, the coordinates of the central point of the ellipse, the length of the long axis, the axis of the ellipse and the inclination of the ellipse.Its algebraic expressions, such as formula (2) to (6) The characteristic value of the ellipse is equivalent to the feature of the reflected facula.Thus, the feature extraction of the spot is completed.Based on the data source for the identification of heliostat attitude angle.
Since the establishment of the model directly from the heliostat reflection spot a heliostat precise attitude angle is difficult.Considering only the heliostat elevation angle and azimuth axis moving, so under the given conditions there will be corresponding with the only spot [11].There is a map that reflects the pattern characteristics of heliostat attitude angle.
In view of the above situation, this paper proposes a data driven model identification method based on BP neural network.To solve this problem, this paper use the method of image processing based on the spot processing target spot and find the corresponding elliptic equation by the method of ellipse fitting.five features: Based on ellipse long axis a , short axis b , inclination of the long axis  , the coordinates of the center of c x and c y .In the specific time and location and coordinates, this paper presents a mathematical mapping for two spot attitude characteristics and heliostat angle between a  and z  .

Method design
In order to solve the above problems, a flow chart is designed using the method shown in the diagram.Among them, the BP neural network model is the main problem solving tool used in this paper. .

Figure. 1 flow chart of method design
It can be seen from the picture, the mapping between the unknown heliostat reflection spot feature and -3heliostat attitude angle.The model identification process mainly includes the following five parts: Step one: model identification using standard BP neural network, aiming at the problem of the analysis results, application of this issue to be resolved for the mapping relationship between heliostat spot feature and heliostat attitude angle, the model identification using standard BP neural network.
Step two: experimental design, in order to obtain experimental data for training neural networks, we use a small biaxial experimental device console, which can real-time sunlight reflected to the specified target position.On the whiteboard to take pictures to get the image with the spot using industrial camera, and processing technology to obtain the characteristic spot value of the image by image processing, according to the different attitude angle to obtain the heliostat spot feature data Step three: Data acquisition.Different target points are input to the biaxial experimental console to simulate the position of the light spot in different targets.At the same time, with the change of time, spot feature data recording attitude angle of heliostat and image.
Step four: Determine the training set and validation set.The data were randomly divided into two groups, and a set of data was used to train the neural network structure.For the trained neural network, another set of data can be used to verify the accuracy of the model.
Step five: Algorithm optimization.The obtained training data is applied to the given neural network structure, and the optimization algorithm is used to obtain the weight matrix and threshold matrix of the network structure.
Step six: Model verification.In view of the well trained network model, we use another set of data to verify.Then the trained neural network model can accurately spot according to the characteristic of image acquisition attitude angle corresponding to the heliostat

LM-BP neural network method
The theory of BP algorithm has the advantages of reliable basis, rigorous derivation process, high precision and good universality.But the standard BP algorithm has the following disadvantages: slow convergence speed, easy to fall into local minimum and it is difficult to determine the number of hidden layer and hidden layer nodes.In practical applications, the BP algorithm is difficult to do.Therefore, there are many improved algorithms.In this paper, the BP neural network (BPNN) algorithm based on L-M (Levenberg-Marquardt) algorithm is used.
The algorithm includes two aspects: the input beam characteristic value of transmission signal propagation and heliostat attitude angle error of direction.That is, the actual output is calculated from the input to the output direction, and the weights and thresholds are corrected from the output to the input direction.Table 1 lists the mathematical symbols used in the model and their implications.The connection weight between the input layer and the hidden layer neuron i through the meta j ki w The connection weights between the hidden layer meta i and the output layer neuron k Step one: initialize network parameters.Initialize weights ij  , ki  and Threshold i  , k  .
Step two: calculate the input and output of the hidden layer and the output layer.The formulas are as follows (9) to (12).The input p i net and the output p i o of the i node of the hidden layer are respectively: The input p k net and output p k o of the output node k of the output layer are, respectively: Step three: calculate the output error.The mathematical expression for the error of the output layer is p p k k t o  , and the error function is set as the two order objective function.
Step four: use the iterative formula based on the L-M algorithm to correct the weights and thresholds.The formulas are as follows (13) to (16).The weight and threshold correction formula of the first node of the output layer is: The weight and the threshold correction formula of the k node in the hidden layer are: Step five: determine the termination condition.If the termination condition is reached, the algorithm is finished and the network training is completed.Otherwise, go back to step two.

Experiment and analysis 4.1Experimental device design
In order to obtain the experimental data of the training neural network, we use a small double axis image processing technology and other related technology to process the image to obtain the characteristic value of the spot.According to the different attitude angle to obtain the heliostat spot feature data.These data and the heliostat attitude angle data stored in the computer, as the original experimental data.
The experimental device has a programmable microcontroller, the use of heliostat algorithm can be based on local GPS input information and target coordinate information in real time the sun spot projected to the center of the target area.To realize the sun tracking function, and can simulate the solar facula projected onto the target near the center in order to achieve non precise target center projection.The use of four horns with rectangular black box as target, using projection whiteboard industrial camera photographs obtained using image processing technology for image processing features obtained spot value image, with a spot on the whiteboard.According to the different attitude angle to obtain the heliostat spot feature data

Experimental design and data acquisition
In order to calculate the weights and thresholds between neurons, we need a set of data to train the designed BP neural network.The relationship between the experimental data and can reflect the characteristics and the heliostat mirror facula attitude angle Tingri effectively.In this experiment the altitude angle and the azimuth angle of the heliostat were collected 200 groups of input and output value, because of the large amount of data, it is inconvenient to list all of them.A typical example of the data is collected from 9:51 a.m. to 11:26 April 23, 2017, and data is collected every 5 minutes.The target spot characteristic data is obtained from the Descartes coordinate system based on the whiteboard plane.Using the SPA algorithm [3] to obtain the solar altitude angle and azimuth angle, the algorithm calculates the sun position error is less than 0.0003 degrees, so its reliability is high  BP neural network is established to determine the structure of the network and the transfer function of each layer of neurons.The structure of BP network mainly includes the number of hidden layers and the number of nodes in the hidden layer.Because the input vector dimension is not too much, the number of hidden layers arranged in one layer; after above the experimental data collection and analysis, the number of the input neurons of the neural network structure is five, the output layer neuron number is one, the number of hidden nodes using the empirical formula method is set to eight.
The activation functions of the hidden layer and the output layer are usually nonlinear functions to enable the nonlinear mapping relation between input and output.Generally speaking, for BP neural networks, there are several commonly used nonlinear functions.For the hidden layer, we use the tan-sigmoid function to complete the data transfer from the input layer to the hidden layer, and its function is in the form of formula (17): The activation function of the output layer uses the log-sigmoid function, and its function is in the form of formula (18):   For the network performance function, the mean square error performance function (MSE) is used in this paper.Through the above analysis, we can complete the establishment of BP neural network.For the establishment of a good model, the network weights and thresholds are in the initial state, the network also can not work normally, so it is necessary to adopt the algorithm for training.Training is completed and achieved the desired goals of the network can be very good according to the given input to calculate the desired output value.

Experimental result analysis
For the BP neural network model with training performance and performance target, we can obtain the connection weights and threshold matrix of each neuron in the network, as shown in Figurer 4 and Figurer 5.At this time, we think that the neural network model can be used as a mathematical model of the heliostat attitude angle recognition.In view of the tower thermal power heliostat attitude angle corrections to the problem, this paper proposes a detection method of heliostat attitude angle based on BP neural network.This method avoids the complex modeling of heliostat reflection system and accurate modeling of the spot.Based on the method of image processing and BP neural network, the function relation between the reflected spot of heliostat mirror and the attitude angle of heliostat mirror is solved.The experimental results show that the method can obtain the attitude angle of the heliostats according to the characteristics of the reflected light spot.Based on the data driven to achieve the heliostat attitude angle recognition, and have a high accuracy.

ooo
The j output of the first sample input layer node p i Threshold of hidden layer neuron i k The threshold of the output layer neuron k p i The output of the hidden layer node i at the action of the sample p p k Output layer node k output at the action of sample p p k The gradient direction of the output layer neurons p i The gradient direction of hidden layer neurons N All training samples of the neural network L-M algorithm optimization BP neural network implementation steps are as follows:

Figure 3
Figure 3 Network error training curve

Figure. 5
Figure. 5 heliostat azimuth weights and threshold matrix The trained neural network, we use the test data of heliostat altitude angle and the azimuth angle is verified.The verification results are shown in Figurers 6 and 7, in which Figure. 6 is the verification result of height angle, and Figure.7 is the verification result of azimuth.From the chart we can clearly see that the gap between the output of the neural network and the actual output is very small.It shows that, for the specific coordinates in the heliostat spot are given, we can determine the spot fitting ellipse long axis a , short axis b , axis tilt the special function of the relationship between  and the coordinates of the center of c x

Figure. 6 Figure. 7
Figure.6 Comparison of height angle network output and actual output

Table 1
ANN Symbol specification  Learning rate p Sample p ij w

Table 2
Heliostat controller input parameters

Table 3
Partial data acquisitionThe network sample set consists of training samples and test samples.The training sample set is used to train the network and the test sample set is used to detect the effect of network training and the generalization ability.The training sample set and the test set are composed of the input data vector and the target output vector。 Since BP network is trained by teachers, its sample set is composed of input data and target data.Here, the long axis a, the short axis b, the long axis tilt  , the central coordinate cx and the c y are used as the neural network to input 5 components of the data, and the angle value is used as the one component of the network target data.The experimental data were altitude angle and the azimuth angle of the heliostat were randomly divided into two groups, the implementation of network training experiment.
Before the network training, the training parameters of the network need to be set up.The main parameter settings include learning rate, training time, training target and the maximum number of iterations.The specific parameters set in this article are shown in table4.The training error curve of the network is shown in Figurer 3, in which the abscissa represents the training times of the network, and the ordinate is expressed as the error precision of the network.The transverse line in the graph is expressed as the expected error of the neural network.As you can see from Figure3, the network has achieved the desired performance after 9 training sessions.The actual output and the expected output between regression coefficient was 0.97978, indicating that the network can be very good for prediction of output to input data, so that the network has completed training, can be used as a predictive model of heliostat attitude angle.

Table 4
Network training parameters