Model for predicting the occurrence of soil compaction

. Solving the problem of preserving and increasing soil fertility, timely determination of the causes of its deformation require improved environmental forecasting. The development of quantitative approaches in ecology is facilitated by the availability of data on soil types and properties, understanding of ongoing processes and existing information technologies. In this article, we give an example of designing and training a deep neural network for ecological forecasting of the date of occurrence of soil compaction, as one of the relevant parameters in further research. Using the properties of existing compacted soils, we show that neural networks are able to predict both the short-term risk of soil compaction and the long-term dynamics. Against the background of existing methods, neural networks have better performance and the potential to create integrated soil monitoring systems based on them.


Introduction
A set of agricultural machinery is used in crop production technologies [1]: agricultural tractors, self-propelled agricultural machines (combine harvesters, self-propelled sprayers for plant protection, self-propelled combines for harvesting root crops, etc.), trailed and mounted agricultural machines (plows, general and precise seeding drills, organic and mineral fertilizer spreaders, harrows, cultivators, etc.). Due to mechanization and automation of individual operations or technological processes, labor productivity is increased. However, at the same time, the degree of impact on soils is also increasing.

Compaction process
One of the forms of physical degradation of soils, leading to the destruction of the soil structure and a decrease in porosity, permeability and biological activity, is soil compaction [2]. Compaction can reduce the ability of water to penetrate and increase the risk of erosion by accelerating runoff. Wheels, tracks, rollers (various propellers) or the passage of animals can initiate the compaction process.
Depending on the characteristics of the movers (the type of mover, the mass of the tractor and the number of passes of the units across the field), the compacting effect will also change. Every year, new mathematical modeling tools are released to calculate the degree of compaction depending on the running systems and to derive optimal characteristics of agricultural machinery [1].
On arable lands with annual plowing, it is possible to seal both the topsoil and the subsoil [3]. A feature of compacted soils is the formation of a pallet layer caused by the fact that tractor tires pass directly through the ground during plowing. The upper layer is less permeable to roots, water and oxygen than the soil beneath it, and is a bottleneck for the functioning of the subsoil. The subsoil in turn is not loosened annually, the compaction becomes cumulative, and over time, a homogeneous compacted layer is created. Soils can range from strong enough to withstand all possible applied loads, to so weak that they are compacted even with minor loads. Some soils are naturally compacted, strongly cemented. These characteristics depend on the type of soil [3].

Effects
When compacting the soil, macropores used to penetrate air and water deep into the soil suffer first. Because of this, the physical and biological quality of the soil decreases. Poor soil aeration reduces plant growth and leads to the loss of soil nitrogen and the formation of greenhouse gases as a result of denitrification in anaerobic areas, which can be calculated, for example, through the normalized vegetation difference index (NDVI) when analyzing remote sensing measurements [4].
Increasing soil density limits root growth, which can lead to vulnerability of crops [2]. A decrease in the ability to infiltrate leads to surface runoff, which ultimately leads to flooding, erosion and the transfer of nutrients and agrochemicals into open reservoirs, with subsequent effects on their ecosystems.
Soil compaction is a hidden form of soil degradation that can affect all agricultural land and lead to a gradual decrease in yield and an increase in waterlogging problems will be gradual.
Timely identification of the formation of compacted arable horizons and the causes of their appearance often causes difficulty. The existing methods of mathematical analysis require significant human and time resources to correlate the parameters in each individual case of analysis. Accordingly, the choice of the necessary agrotechnical methods of soil treatment becomes more complicated. It is required to form a set of signs of macro processes, their appearance, which will allow creating a high-quality environmental forecasting system capable of modeling the degradation process and determining the moment of occurrence of compaction. Based on the result, it will be possible to take effective preventive measures already. It is required to develop a tool for early prediction of the occurrence of compaction.

Materials and methods
We have conducted a study of the causes of natural and secondary susceptibility of soil to compaction. The key data necessary for training the predictive model were highlighted.

Soil properties
The reasons for the natural susceptibility of the soil to compaction are due to the properties of the soil and the typical climate of the assessed area and include:  Physical properties such as texture and fraction, mainly clay fraction. The higher the proportion of clay, the more susceptible the soil is to compaction.  Chemical properties. In particular, the excess of salts in the soil profile reduces the stability of the soil structure. A low pH level is unfavorable for the stability of the soil aggregate.  Water regime and groundwater availability, especially, an indicator of soil moisture potential.  Biological properties. Changes in soil properties due to compaction affect soil biota.
The properties of the soil, the change of which may affect the following: temperature, water and air regime, pH and Eh, the amount and redistribution of available nutrients, soil density.  Location and type of soil horizon. High water content and unstable structure. The accumulation of salts is associated with the low stability of soil aggregates. Leaching processes such as salting and polymerization, as well as the movement of clay, reduce the stability of the soil structure and affect the movement of water in the soil profile. Soil properties as input data were obtained from the Unified State Register of Soil Resources of Russia [9]. The data of anthropogenic susceptibility to soil compaction were also taken into account.

Result of improper use
Anthropogenic or secondary susceptibility of the soil to compaction occurs when the possible compaction of the soil is the result of improper use of the soil [10]. In the case of agricultural soils, the creation of narrow ditches and plowing of the soil can especially contribute to soil compaction. In all these cases, the balance of the soil with the environment is disturbed.

Heavy machinery
With the existing technologies of cultivation of agricultural crops, it is important to correctly adjust the parameters and operating modes of the equipment [11]. To do this, you need to know the weight of the tractor, traction, speed, number of passes on one track, slipping. The analysis of scientific and technical information [9,12] on soil compaction shows that the impact of the movers of machines on the soil should be associated with the study of changes in the density and structure of the soil depending on such indicators as normal pressure, the speed of movement of machines, soil moisture.

Correlating data
By correlating the corresponding statistical assessment of the degree of influence of various factors of agricultural machinery on soil properties with data on areas with compacted soil (where the density value exceeded the standard range) over time, it is possible to design an intelligent system capable of predicting the appearance of this type of soil degradation.

Data preparation
The data had to be prepared in several stages. At the stage of data cleaning, outliers were eliminated, incorrect and incomplete data were deleted. In our case, the properties of the soil were already purified data. Then the remaining data was analyzed to identify dependencies. At this stage, data analysis was carried out. As a result, we got rid of data with excessive correlation and isolated new functions from existing ones. The third stage was the transformation of data into a format convenient for training a neural network.

Building a predictive model with neural network
To build a predictive model [5], we will use neural networks. Previous studies [6,7] show that the use of deep learning is preferable for the class of problems under consideration. When designing a neural network, we will take the minimum required number of layers to preserve the accuracy of predictions. The complexity of the architecture leads to the need to use more data and increases the complexity of training. Therefore, it was decided to start experimenting with a simpler fully connected architecture. The Keras framework was chosen as a tool for creating a predictive model. The next step was to design a neural network. The neural network (Figure 1) consists of four layers (Dense) and accepts input parameters. Each layer contains a different number of neurons. The final fourth layer forms the final value-the time of the appearance of the recompaction.

Training process
To train the model, you need to configure several training parameters. The activation function (relu) is used to work with positive values. Adaptive moment estimation (adam) is one of the most popular fast optimization methods. The loss function determines the amount of the penalty for erroneous predictions in the learning process. It will be important to minimize the value of this function. Training takes place gradually, taking into account the learning rate, which is reported to the optimizer to determine the size of the next step in the process of minimizing losses. If the step is too big, then the training will take place on a large scale and the goal will not be achieved, and, if the step is too small, it will take a long time to reach the desired loss value.
The metric will allow us to evaluate the quality of the predictions of the trained model. The metric is not related to the loss function and is used mainly for reporting.
The following is the learning process. At the training stage, the characteristics described above were loaded into the neural network as the initial data for which the model should make a prediction. Such models are trained using the "learning with a teacher" approach, therefore, in order to adjust the weights in the process of training a neural network, the prediction result is compared with the expected result.

Results
As a result of the study, an array of data was collected, on the basis of which further research was carried out. A neural network has been designed that makes it possible to predict the time of occurrence of soil compaction at the planning stage of agricultural activity based on the characteristics of the equipment used and soil properties.

Training results
Based on the data collected and prepared earlier, a fully connected neural network was trained ( Figure 2). On the training and test set, the model shows a fairly good prediction quality. Accordingly, correct prediction is carried out in more than 60 percent of cases (-loss: 0.0624). This result can be considered satisfying the requirements.

Discussion
It takes several decades to partially restore soil compaction, making it crucial to actively regenerate soil functions. Avoidance and alleviation are essential as soil compaction is difficult to identify and reverse.
Neural network allows to predict the time of occurrence of soil compaction by a number of parameters and can be used in various monitoring information systems to expand their functionality.
Based on the results of the neural network at the moment, decisions and actions are made by the user, however, it is possible to exclude the human factor and develop a comprehensive decision-making system. Based on the data that will be aggregated, it will be possible to make a map of recompacted soils and suggest ways to optimize agricultural processes. In the case of the introduction of automation hardware, a significant development of the agrotechnical complex is possible.
It is also possible to move from the task of predicting the appearance of soil compaction as a result of agricultural load to models that allow us to offer the optimal amount of load on the soil for effective use. Moreover, thanks to the introduction of neural networks, it has become possible to solve other tasks related to soil monitoring.

Conclusion
We proposed an approach to the prediction of soil compaction. For the solution, a tool was created (a fully connected neural network), capable of predicting with sufficient accuracy the time of occurrence of compaction in soils after training. This solution lays the foundation for the further development of information systems and automated complexes and can serve as an example of designing a neural network to identify and predict other dependencies.