Machine learning techniques for short-term solar power stations operational mode planning

The paper presents the operational model of very-short term solar power stations (SPS) generation forecasting developed by the authors, based on weather information and built into the existing software product as a separate module for SPS operational forecasting. It was revealed that one of the optimal mathematical methods for SPS generation operational forecasting is gradient boosting on decision trees. The paper describes the basic principles of operational forecasting based on the boosting of decision trees, the main advantages and disadvantages of implementing this algorithm. Moreover, this paper presents an example of this algorithm implementation being analyzed using the example of data analysis and forecasting the generation of the existing SPS.


Introduction
At present, machine-learning algorithms that use decision trees are very common and universal for most applications.They allow predicting the real response for each object, that is, solving the regression problem.Composing several derived trees, combining the responses of each of them, it is possible to get a stable and much more qualitative solution than many other algorithms can provide.
Forecasting the generation of a solar power station (SPS), both short-term (day ahead) and operational (one hour ahead), consists of five main stages:  Determining the solar radiation flux density (SRFD) at the boundary of the atmosphere;  Determining the SRFD incident on the horizontal surface of the earth;  Determining the SRFD incident on the inclined panel surface;  Determining the generation of a photoelectric DC converter;  Determining the power output of AC inverters.The most difficult part of the SPS generation forecasting process is the second stage, which is the determination of SRFD incident on the horizontal surface of the earth, since this value depends on a variety of unstable and difficult for forecasting factors, the greatest influence of which is exerted by cloud cover.
In case of short-term forecasting, the dependence of SRFD incident on the horizontal surface of the earth on cloud cover can be restored by solving the regression problem based on least-squares method (or other similar method) and choosing the optimal function [1,2].The use of such traditional methods to solve the regression problem for operational forecasting of SRFD incident on the horizontal surface of the earth is not possible, since in the case of variable clouds it is not possible to restore the relationship between SRFD and the current measurement data, i.e. variables that allow describing this dependence.

Problem formulation
In this research the task of SRFD operational forecasting using retrospective data was set, based on which the output power of the SPS was calculated [3].There is a learning sample S : where j y is the parameter, which is the measured value of SPFD within the task; ij x is the attribute matching the parameter i y (within the task, attributes can be both calculated values, solar declination angle  , SRFD on the boundary of atmosphere 0 G , and retrospective parameters, such as transparency factor T k as well as weather data); l is the number of observations in the sample; a is the number of attributes.
The task consisted in composing the decision trees, which with great accuracy will determine the value of the new parameters y according to the relevant attributes ij x [4,5]

Gradient boosting
Gradient boosting is essentially a gradient descent in the space of all possible algorithms [6]; each step of this descent is done by the basic algorithm according to the following sequence of actions ( ) n b x according to the following sequence of actions.
 Initializing of the first basic algorithm 0 b the following steps are repeated: 1.The shift vector s , which shows how to correct the predictions of the composition already constructed to reduce the error in the learning sample, is calculated: ) 2. A basic algorithm n b is constructed by approximating its responses to the learning sample to the shift data i s : 3. After the algorithm is found, it is added to the composition: 4. Steps 1-3 are repeated until a stop criterion, for example, a specified number of iterations, is satisfied.The settings shown in Table 1 were used to work with the gradient-boosting algorithm.The colsample_bytree and colsample_bylevel settings were used to avoid overfit.To solve the problem, authors developed an approach based on gradient boosting on decision trees.The task was proposed to be solved in three ways: teaching an algorithm without history, teaching only with history and teaching with history and weather data.
Computational experiments were performed to evaluate the possibility of using the gradient-boosting algorithm on solution trees for the task of SPS generation operational forecasting within the research work.Experiments varied according to the following criteria:  Teaching without history The following calculated values were used as attributes:

Developed model evaluation
A cross-validation was used to evaluate the analytical model and its behavior on independent data.The available data were divided into 5 parts for the model evaluation.The algorithm for the learning subsample is configured for each partition; then its mean error at the objects of the control subsample was estimated.The cross-validation estimation was the error average for all partitions on the control subsamples [6].
To analyze the prediction error, the mean absolute percentage error MAPE and the mean-square error (MSE) were used [7,8].The mean absolute percentage error (MAPE) was calculated by the formula: where MAPE is the mean absolute percentage error, [%]; where MSE is the mean-square error, [W 2 /m 4 ]; N is the number of time intervals t in the day considered (between sunrise and sunset);

Calculation example of SPS operational forecasting
The results of the operational forecasting correction for the SRFD incident on the horizontal surface of the earth G for all three teaching modes in case of the 1-hour forecast horizon are shown in Fig. 1 -2.
Parameters of the forecast error for considered days are presented in the Table 2.
It is seen from the Figures 1 and 2 that in case of teaching without history (without using current measurement data) the algorithm allows determining the relationship between SRFD at the boundary of the atmosphere 0 G and SRFD incident on the horizontal surface of the earth G without considering cloud cover.
This teaching mode physically takes into account only the change in the solar altitude angle during the day, as well as factors that are generally constant (solar absorption by ozone, dust, air molecules, water).
In case of teaching with history, when the nearest available data of current measurements were used for the prediction, the algorithm allows to approximate the forecast value f G to the measured values m G .For the case of slightly variable clouds on 28.05.2017, the algorithm allows to correct the forecast even without reliance on weather data.For the case of sharply variable clouds on 27.05.2017,an accurate correction was not possible; the error for 8 of 16 hours was 50% or more.
The operational forecast correction for such days necessitates the use of reliable weather data.A decrease in the prediction error is observed for both days considered in case of teaching with history and weather data, even though low quality weather data were used to teach the algorithm.
Table 3 shows the parameters of the forecast error for the entire sample considered.This data is from 14.01.2017 to 28.05.2017.It can be seen from the table that the proposed algorithm has a lower average error for the 1-hour forecast horizon within the entire considered time interval (4.5 months) than for a single day.This fact points at the significant accuracy of operational forecasting and the success of the proposed algorithm application for most of the considered days.
From Table 3 it is also clear that the use of low quality weather data provided only a slight error reduction compared with teaching only with history.Obviously, using more accurate weather data will result in making more accurate operational forecasts.
The main factor affecting the error of operational forecast is the remoteness of the forecast horizon.Figures 3 and 4 show the dependence of the mean-square error MSE and the mean absolute percentage error MAPE on the magnitude of the forecast horizon.It can be seen from the diagrams that the accuracy increases as the forecast horizon approaches, since the current measurements are more informative (better describe the predicted value).
From the analysis of the results obtained, it can be concluded that it is possible to apply the gradientboosting algorithm on solution trees in the context of the task of SPS generation operational forecasting.

Conclusion
Within the presented research, the analysis of gradient boosting application on decision trees in the task of SPS generation operational forecasting is performed.
To improve the accuracy of generation forecasting based on the data of a local meteorological station, the authors developed a new mathematical model of operational forecasting for software implementation as part of the existing software package.Mathematical model of operational generation forecasting is implemented based on decision trees.
Within this research, test calculations of the operational generation forecast for one of the existing SPS in Russia in the form of a Python program in the Jupyter software environment were performed.In the course of the research, the accuracy of the SPS generation forecast for the operational forecast model was 75-65%, which allowed increasing the forecast accuracy by 20% in comparison with similar approaches to the SPS generation forecasting.

mG
is the average measured value of the SRFD near the ground, [W/m 2 ]; f G is the average forecast value of the SRFD near the ground, [W/m 2 ].

Figure 1 .Figure 2 . 1 -
Figure 1.1-hour ahead operational forecast for 27.05.2017(blue line -without history, red line -with history, orange line -history and weather)

Figure 3 .
Figure 3. MSE dependence on the forecast horizon value (blue line -without history, orange line -with history, green linehistory and weather)

Figure 4 .
Figure 4. MAPE dependence on the forecast horizon value (blue line -without history, orange line -with history, green line -history and weather)

Table 1 .
Gradient boosting configuration is the number of objects in the sample;