Calculation of making doses of fertilizers under planned yield of spring wheat using an artificial neural network

This paper is devoted to the study of the construction and application of an artificial neural network for calculating the doses of fertilizer application at the planned yield level in the conditions of grey forest soils of the Republic of Tatarstan. When using mineral fertilizers for crops, it is crucial to comply with the norms and doses of the introduced substances. An overabundance of fertilizer leads to residual accumulation in the soil. Lack of quantity of applied doses affects the quality of the crop, as well as the fertility and ecological situation of agricultural lands. High modern technology and information tools allow solving this problem.


Introduction
Improvement of the quality and productivity of spring wheat is one of the main tasks of the agro-industrial complex of the Russian Federation at present. Spring wheat crop formation is a complex process of influence of many factors that have a complex interaction structure. Influencing factors on wheat productivity can be divided into two groups.
The first group is uncontrollable factors associated with natural and climatic conditions. The second group is regulated factors responsible for the provision of soils with NPK and microelements. Providing soils with mineral fertilizers and microelements for cultivating wheat implies the maximum supply of plants with nutrients, as well as changing the properties of soils, increasing its fertility and the interconnection of all processes in the ecosystem.
At the present stage of development of our society in almost all sectors and spheres of the national economy, artificial neural networks have been widely used for solving various problems. Neural network models allow an intelligent analysis of multidimensional data, taking into account all the complex relationships between influencing factors, and at the same time solve the forecasting problem.
The use of the neural network model allows targeted control of regulated factors with average values of uncontrollable factors, which allows increasing productivity [1][2][3]. For increasing the economic development of the economy, it is necessary to make optimal decisions in time to ensure soil fertility by applying NPK and microelements to the soil [4][5][6][7][8][9][10][11].

Conditions, research methods
For solving the studied problem, it is necessary to build a nonlinear model capable of calculating the amount of NPK fertilizer application for a given yield. The condition for building the model is to take into account all the influencing factors.
The search for the optimal values of the factors affecting the yield of spring wheat is possible in the presence of a regression equation in the form of a polynomial of the second degree. However, in the available analytical packages, the construction of a nonlinear regression model is possible only with a small number of factors. Therefore, in this work, an artificial neural network was used for planning the yield of spring wheat.
Neural network models are often used in various fields of research. The tasks of forecasting, nonlinear regression, systems of equations are solved using neural models. Neural networks can generalize data, learn from their own mistakes, select the answer "by analogy." In our work, the neural network model was used as a nonlinear regression for calculating the doses of fertilizer for spring wheat.

Results
The novelty of the presented study is the development of a neural network model that will allow calculating the doses of mineral fertilizers for the planned yield levels of spring wheat in the grey forest soils of the Republic of Tatarstan.
The studied sample of experimental data for 37 years, consisting of eighteen influencing factors on the yield and average yield of spring wheat: -the amount of fertilizers NO3, P2O5 and K2O; -productive moisture on the day of sowing, -the sum of the effective temperatures during the growing season, the temperature in May and June, the temperature in June, -air humidity, -precipitation during the growing season, precipitation in May and June, precipitation in June, -growing season, -grain weight per spike, -weight of 1000 grains -gluten mass fraction, -content of easily hydrolyzable nitrogen in the soil, -the content of P2O5 in the soil, -K2O content in the soil. Table 1 presents a fragment of this sample. Kolmogorov's theorem on the sufficient structure of a neural network was used for selecting the architecture of the neural network, in particular, the number of hidden layers, the number of neurons in each of them, and the activation functions of neurons. According to Kolmogorov's theorem, to transform an N-dimensional input vector of a set of input data x into an M-dimensional output vector d, it is sufficient to use a neural network with one hidden layer. With N input neurons, to implement the approximating function, it is sufficient to use (2N + 1) neurons in the hidden layer.
As a result, a three-layer neural network model was constructed with one hidden, one input, and one output layer.
For selecting the number of neurons in the inner layer of the neural network model, 14 models with different numbers of neurons were constructed according to the network extension method [12]. The number of hidden layer neurons varied from 2 to 15. When testing these models, calculation errors were obtained and analyzed on the test data set, which is presented in Table 2. According to the results (Table 2), it is seen that the model with four neurons in the hidden layer is the most effective model. Hyperbolic tangent as a nonlinear transducer providing a neural network model of the properties of a universal approximator was chosen as the activation function of hidden layer neurons.
The number of training epochs was selected experimentally according to the following methodology: at each epoch of training, two error values were tracked, namely, on the training and test sets. On the training set, the error value monotonously decreases. In contrast, on the test set, after the error decreases with a further increase in the number of epochs, the error begins to increase. This process corresponds to the so-called "retraining" of the neural network. The optimal number of eras for learning, therefore, is that at which the test error reaches its minimum.
As a result of a series of experiments, the number of 1000 epochs for training the network was selected. In particular, it is recommended to choose a three-layer perceptron with a linear function for activating the output layer and hyperbolic tangent for the hidden layer. The response of the neural network, in this case, can be represented as: Here N is the dimension of the input vector; S is the number of neurons in the hidden layer; M is the number of neurons in the output layer;  Figure 1 shows this diagram.

Fig. 1. The graph of the neural network model
The constructed three-layer neural network has 16 neurons in the input layer, four neurons in the inner layer and three neurons in the output layer. The graph of the constructed neural network is shown in Figure 1. The input data are the yield of the studied culture and the last 15 factors from Table 1. As the neurons in the output layer, the amount of fertilizer applied was selected.
The neural network was trained and tested on a set of initial data from Table 1, which were previously randomly divided into two sets: training (95% of data tuples) and test (5% of data tuples). An online learning algorithm was used. The correction of the weights was made after the presentation of each example of the learning set. The condition for the termination of training was the value of the learning error less than 0.005, or the achievement of a given era (1000). Figure 2 presents this diagram.
The trained neural network was used for calculating the amount of fertilizer for the planned spring wheat yield. The average values of factors from the studied sample were fed to the input of the neural network model, and the yield was set. At the output, in the form of neural network responses, the required amounts of introduced nitrogen, phosphorus, and potassium fertilizers were obtained. Some results are presented in Figure 2.  The results obtained very much depend on the initial content of useful chemical elements in the soil. For example, for the sample in Table 1, the average value of nitrogen content is 309 kg per 1 ha, phosphorus content -369, potassium -299. Figure 3 shows the relationship between spring wheat yield and the total amount of initial content and fertilizer applied. In particular, for a given yield of 2.5 t / ha, it is required to add 28 kg of active substance per 1 ha of nitrogen, 59 kg of phosphorus, 54 kg of potassium, and 64 kg of nitrogen, 95 kg of phosphorus, 80 kg of potassium per 3 ha.

Conclusion
The neural network model that we developed made it possible to calculate fertilizer application doses taking into account 15 influencing factors on the planned yield. The constructed neural network model is adequate and can be used for calculating fertilizer doses for the planned levels of spring wheat, taking into account the initial content of nutrients in the soil. The above shows the theoretical significance of monitoring the regulated factors, providing the soil with nutrients for yield formation, and at the same time, indicates the vast possibility of applying the results in the agricultural practice of the Republic of Tatarstan and our country as a whole.