Next Article in Journal
Quantification of Metal(loid)s in Lubricating Eye Drops Used in the Treatment of Dry Eye Disease
Previous Article in Journal
Structures, Antioxidant Properties, and Antimicrobial Properties of Eu(III), Gd(III), and Dy(III) Caffeinates and p-Coumarates
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Research on the Effects of Drying Temperature for the Detection of Soil Nitrogen by Near-Infrared Spectroscopy

1
College of Information Engineering, Tarim University, 1188 Junken Avenue, Alar 843300, China
2
Key Laboratory of Tarim Oasis Agriculture, Ministry of Education, Tarim University, 1188 Junken Avenue, Alar 843300, China
3
College of Biosystems Engineering and Food Science, Zhejiang University, 866 Yuhangtang Road, Hangzhou 310058, China
4
Key Laboratory of Spectroscopy Sensing, Ministry of Agriculture and Rural Affairs, Hangzhou 310058, China
*
Authors to whom correspondence should be addressed.
Molecules 2023, 28(18), 6507; https://doi.org/10.3390/molecules28186507
Submission received: 1 July 2023 / Revised: 24 August 2023 / Accepted: 31 August 2023 / Published: 7 September 2023
(This article belongs to the Topic Advances in Spectroscopic and Chromatographic Techniques)

Abstract

:
Nitrogen nitrates play a significant role in the soil’s nutrient cycle, and near-infrared spectroscopy can efficiently and accurately detect the content of nitrate–nitrogen in the soil. Accordingly, it can provide a scientific basis for soil improvement and agricultural productivity by deeply examining the cycle and transformation pattern of nutrients in the soil. To investigate the impact of drying temperature on NIR soil nitrogen detection, soil samples with different N concentrations were dried at temperatures of 50 °C, 65 °C, 80 °C, and 95 °C, respectively. Additionally, soil samples naturally air-dried at room temperature (25 °C) were used as a control group. Different drying times were modified based on the drying temperature to completely eliminate the impact of moisture. Following data collection with an NIR spectrometer, the best preprocessing method was chosen to handle the raw data. Based on the feature bands chosen by the RFFS, CARS, and SPA methods, two linear models, PLSR and SVM, and a nonlinear ANN model were then established for analysis and comparison. It was found that the drying temperature had a great effect on the detection of soil nitrogen by near-infrared spectroscopy. In the meantime, the SPA-ANN model simultaneously yielded the best and most stable accuracy, with R c 2 = 0.998, R p 2 = 0.989, RMSEC = 0.178 g/kg, and RMSEP = 0.257 g/kg. The results showed that NIR spectroscopy had the least effect and the highest accuracy in detecting nitrogen at 80 °C soil drying temperature. This work provides a theoretical foundation for agricultural production in the future.

Graphical Abstract

1. Introduction

In order for plants to grow and flourish, soil is crucial to agricultural production. The rate of development, yield, and quality of plants are all influenced by the soil, as it provides the water, oxygen, nutrients, and strength [1]. Therefore, it is of great importance to maintain good soil quality, including maintaining and improving soil fertility, structure, moisture, pH, and biodiversity. Moreover, among the various nutrients in soil, nitrogen is not only the basis for the formation of plant proteins, chlorophyll, nucleic acids, enzymes, and other biological molecules but also one of the important elements required for plant growth [2]. In particular, nitrate–nitrogen is an essential component of nutrient cycling in soils. Excessive levels of nitrate–nitrogen can lead to environmental problems such as soil acidification, water eutrophication, and groundwater contamination [3]. Moreover, nitrate–nitrogen can be converted into nitrite in plants, and nitrite easily combines with protein to form the carcinogenic substances nitrosamines, which are harmful to human health [4]. Hence, a close study of soil nitrogen can determine the degree of soil fertility and offer a scientific basis for plant cultivation, which can provide guiding suggestions for precise fertilization. It also facilitates the protection of the environment and prevents overfertilization and contamination of the soil [5,6,7,8,9]. Accordingly, the rapid and accurate acquisition of nitrogen content is of great significance to agricultural production and environmental protection [10].
However, the conventional soil nitrogen testing methods, such as Kjeldahl digestion, dry combustion, and ion-sensing electrodes, are usually destructive, costly, and time-consuming [11]. Moreover, since this is affected by the technical level of the operator and so on, the recognition results will have a certain error and cannot meet the application of real-time accurate detection scenarios [12,13]. Due to its high efficiency and nondestructive accuracy, spectroscopy has been widely used to detect soil nitrogen in recent years [14]. Near-infrared spectroscopy, which has developed into a mature and major chemical analysis technique, has especially been applied [15]. For soil, the spectral information associated with most of the organic radical groups containing hydrogen was located in the near-infrared region [16,17]. Due to its nondestructive, nonpolluting, and quick detection process, many scholars have performed research on nitrogen detection using this technique. In the first place, the use of different algorithms to select the feature bands on spectral modeling was investigated. Zhang et al. [12] developed two methods for identifying sensitive bands of soil TN content. The results showed that the eight sensitive bands selected by the combined ant colony algorithm and mutual information algorithm (ACO-MI) method had a good mechanism, generality, and predictive ability in estimating the total soil nitrogen content. Wang et al. [18] used a public dataset called LUCAS Soil and proposed a deep-learning-based wavelength screening method for STN features. With the three other prediction methods, namely ordinary least squares estimation (OLSE), random forest (RF), and extreme learning machine (ELM) modeling, the results indicated that the ELM model using STN feature wavelengths performs better. Xiao et al. [19] selected the characteristic bands of loess, calcareous soil, black soil, and laterite by using competitive adaptive weighted sampling (CARS) and double least squares and modeled them based on partial least squares (PLS), inverse interval partial least squares (BIPS), and the backpropagation neural network (BPNN). The results showed that determining the sensitive bands for different soil types can largely improve the efficiency of nitrogen detection. Secondly, the soil water content also has a great influence on the spectral detection of nitrogen. Wang et al. [20] found that for the detection of soil nitrogen, dry soil had a better performance than moist soil. He et al. [21] treated the soil samples with drying times ranging from 1 h to 8 h, measured the corresponding moisture content at hourly intervals, and modeled the predictions using partial least squares (PLS) and uninformative variable elimination (UVE). The experiments suggested that the highest accuracy for the NIR detection of soil nitrogen was achieved when the soil moisture content was 1.03 percent. An et al. [22] proposed a moisture absorption correction method (PMAI), which normalized the raw spectral data to standard spectral data and then used backpropagation network modeling to predict the total nitrogen content. The results demonstrated that this method can effectively eliminate the interference of the soil water content on the prediction of the total soil nitrogen content. Zhou et al. [23] proposed a method of moisture absorption correction index that eliminated soil moisture interference. A new coupled soil moisture and particle size elimination method for predicting the total soil nitrogen from discrete near-infrared spectral band data was then created by combining it with a particle size correction coefficient (PSCI). In addition, the temperature can also affect the detection of soil nitrogen by using NIR spectroscopy [24]. Particularly, the drying temperature had an effect on water removal and urease activity [25]. The effect of soil water content on the determination of soil nitrogen via NIR spectroscopy was more studied, while the effect of drying temperature on the determination of nitrogen via NIR spectroscopy was less studied. Coarse samples were dried at 20 °C for 48 h and used to predict carbon and nitrogen content by using visible near-infrared spectroscopy and to detect their potential mineralization in nonhomogeneous soil samples, using comparative methods [26]. Flat-dry samples were dried at 35 °C for 12 h to explore the effects of pretreatment and standardized rewetting of soil samples [27]. Nie et al. [28] studied the effect of drying black, loess, and calcareous soils at different temperatures on NIR detection of soil nitrogen, and the results showed that different soil types have different suitable drying temperatures. In general, drying is usually used to remove soil moisture and is mostly focused on the detection of soil nitrogen. However, to our knowledge, there are few optimal drying temperatures considering nitrate–nitrogen content in the present study, and the mechanism of its influence is not clear. Based on this, we would like to fill the research gaps in this area and hope to further enhance the possibility of soil nitrogen detection precision by NIR.
In accordance with the existing studies, this study focused on the effect of soil-drying temperature on the detection of soil nitrogen by using NIR sensors. After analyzing the raw soil spectra, preprocessing methods, and characteristic bands, an optimal soil-drying temperature was derived, and higher prediction accuracy was achieved, with the aim of improving the theoretical and experimental guidelines for achieving precise fertilization.

2. Results

2.1. Soil Original NIR Spectral Characterization

In this experiment, the spectral information of soil samples with different N concentrations at five drying temperatures was collected using a near-infrared sensor. Referring to Figure 1, the horizontal coordinate of the curve is the wavelength, and the vertical coordinate of the curve is the average spectral reflectance. The NIR reflectance curves for soil air-dried at 25 °C, 50 °C, 65 °C, 80 °C, and 95 °C are shown in Figure 1a–e. Each image reflects the variation in the reflectance spectra with the wavelengths for soil samples at different drying temperatures.
The NIR spectra of different soils varied, but the overall trends were similar. It can be seen that the spectral reflectance vibration in the 900–930 nm and 1680–1700 nm bands is severe, probably because the NIR sensor has more spectral information overlap and noise at the edge of the acquisition band [29]. In addition, all spectra have a maximum absorption peak near 1400 nm, which corresponds to the second overtone of the N-H bond [20].
The effect of drying temperature on the spectrum shows a certain degree of negative correlation with the reflectance intensity. As the drying temperature increases from 25 °C to 80 °C, there was an overall increase in the reflection peak near 1680 nm This indicates that as the soil-drying temperature increases, the spectral absorptivity decreases considerably, and, thus, the reflectance increases. However, when the drying temperature reaches 95 °C, the spectral reflectance near 1400 nm decreases to within the range of 38 to 42. This, in turn, suggests that the reflection intensity of the spectrum decreases when the drying temperature is too high, which similarly took place in Nie et al.’s research [24]. At the same time, the reflectance curve generally becomes smoother and more concentrated as the drying temperature increases. The soil spectral curve is the most curved at 25 °C air-dried placed at room temperature, and the curve becomes smoother and smoother from 50 °C to 65 °C to 80 °C, while the spectral curve is the smoothest and flattest at 95 °C. The reason for this is that when the soil was placed at 25 °C to air-dry, the soil was affected by the external environment, and the moisture did not dry completely since the NIR spectrum is very sensitive to the absorption of moisture. Although the high temperature completely eliminates the effect of moisture, it perhaps lost some valuable information. For instance, nitrates are unstable at high temperatures and perhaps volatilize in minor amounts.
When the drying temperature is 80 °C, it can be seen that the effect of the drying temperature on soil nitrogen detection in the NIR band is reduced to a relatively low level, and, at this point, the spectral reflectance curves of soil nitrogen are neither too concentrated nor too dispersed. The results show that the gradient of the reflectance curve became more pronounced and better detected with the increasing soil nitrogen concentration under such dry conditions. After the analysis based on the raw spectra, further studies will be performed regarding the data processing.

2.2. Full-Band Data Analysis

With soil spectral reflectance as the independent variable and nitrogen concentration as the dependent variable, the soil samples were divided into training and prediction sets in the ratio of 7:3, and then the original spectra and the other five pretreatment spectra were modeled and analyzed by using PLS, respectively. The predicted results using different pretreatment methods at different drying temperatures are given in Table 1 and Figure 2.
It can be seen that the effect of modeling with PLS after pretreatment from using different methods at different temperatures is not exactly the same. The effect of each pretreatment algorithm does not differ much at low and medium temperatures, while the effect is very unstable at high temperatures, especially at 80 °C and 95 °C. The most obvious performance is at 80 °C and 95 °C. This shows that high drying temperatures are not conducive to the detection of soil nitrogen, although it completely eliminates the moisture effect.
Although the effect of each pretreatment method varies for different temperatures, it is certain that the R 2 of the raw unpreprocessed spectral information is essentially the lowest regardless of the temperature, indicating that some preprocessing of the spectral data helps to improve the modeling accuracy. After a comprehensive comparison, the best lifting results were obtained with the SG algorithm for all temperatures, according to Table 1. It mathematically builds a polynomial regression to fit the curve and estimate its value at the center of a window of approximation. The algorithm preserves essential features and the data trends, while allowing for simple and fast denoising [30]. This, in part, makes it the best preprocessing method in this study. Consequently, the band selection would be based on the SG preprocessed data.

2.3. Feature Wavelength Selection

The full-band-based NIR spectral dataset contains 400 wavelengths of data, which make up a large amount of data, with lots of redundant information unrelated to the spectral response of soil N. Therefore, random forest (RFFS), competitive adaptive reweighted sampling (CARS), and continuous projection algorithm (SPA) feature wavelength selection algorithms were used to find the feature wavelengths associated with the soil nitrogen content. The maximum number of selected variables was set at 35, and wavelength variables were selected from 400 spectral variables based on the minimum error. The number of characteristic wavelengths and bands selected from the five datasets are shown in Table 2.
It is obvious that the number of variables in each dataset was greatly reduced after the selection of feature wavelengths. The number of wavelengths selected by RFFS ranged from 11 to 31, the number of wavelengths selected by CARS ranged from 24 to 33, and the number of wavelengths selected by SPA ranged from 8 to 18. For each temperature dataset, SPA selected fewer feature wavelengths than CARS and RFFS selected, as shown in Table 2.
To show the differences in the positions of the feature wavelengths selected by the algorithms more graphically, Figure 3 shows the results of the algorithms filtering the feature parameters for the average soil spectra at 80 °C, and the RFFS, CARS, and SPA methods are marked with different colored vertical lines in the figure. The different algorithms at the same drying temperature selected a different number of variations and wavelength bands, indicating that the drying temperature had a great influence on the wavelength variables selected by the algorithm. According to Figure 3, it is evident that the feature wavelengths selected by CARS and RFFS basically covered the locations where these differences occur, and there is a certain degree of overlap between the sites. However, the SPA, although less selective than these in both, covered these bands with large fluctuations in the spectral curve.
Therefore, the characteristic wavelengths chosen by these three methods were closely related to the nitrogen content in the soil. However, in the previous literature [21,29], the characteristic wavelengths of soil N were rarely selected for analysis. Even when a characteristic wavelength selection algorithm was used, the location of its bands was not specifically or visually analyzed. To demonstrate whether the selected wavelengths are reliable, a further analysis was performed using machine-learning and deep-learning modeling.

2.4. Prediction Model and Analysis of Soil Nitrogen Content under Different Drying Temperatures

In this study, PLS, SVM, and ANN models for predicting soil nitrogen content were developed based on the feature bands selected by the above three algorithms, respectively. A total of 132 samples were divided into two datasets by using the holdout cross-validation method; 92 of the samples were used as the training dataset, and the remaining 40 samples were used as the validation dataset. Furthermore, the modeling results are plotted as a 1:1 relationship diagram, making it easy to visualize the fitting effect of each model.

2.4.1. Partial Least Squares Modeling

The results of the PLS model developed by the automatic adjustment of optimal parameters method are shown in Figure 4 and Table 3.
According to Figure 4, it is clear that the SPA-based PLS model fits a little better at all five temperatures. However, comparing RMSEP and RPD according to Table 3, it can be found that the performance of the CARS-based PLS model will be better and more stable when the two R 2 values are similar. In this case, the R c 2 at each temperature is above 0.97, the R p 2 is above 0.95, and the RPD reach 2.170 at 80 °C. The results show that the soil nitrogen is significantly correlated with the selected sensitive bands. This suggests that the accuracy of training and prediction is acceptable when we conduct qualitative studies of soil nitrogen, for example, when only a rough estimate of the nitrogen content in the soil is required. Overall, in terms of PLS modeling, the best prediction is based on the feature bands selected by the CARS algorithm.

2.4.2. Prediction Model of Soil Nitrogen Content Based on Support Vector Machine

The results based on the developed support vector machine prediction model for soil nitrogen are shown in Figure 5 and Table 4.
From Figure 5, it can be found that the SPA-based SVM model fits better at each temperature under different feature selection methods. According to Table 4, their R p 2 values are above 0.95, and their RMSEP values are around 0.3. Meanwhile, the RPD is more stable between 1.6 and 1.8 for different temperatures. This indicates that the support vector machine model using linear kernel functions has an overall improvement in model performance at each temperature compared to PLS, thus suggesting that it has a better generalization capability and can be better adapted to the linearly differentiable case. For SVM modeling, the SPA-based method of selecting feature bands to detect soil nitrogen is the most effective. However, the RPD of both PLS and SVM models did not reach 2, so it could not be practically applied to the detection of soil nitrate–nitrogen.

2.4.3. Prediction Model of Soil Nitrogen Content Based on Artificial Neural Network

The results according to ANN modeling are shown in Figure 6 and Table 5. The correlation coefficient values of the modeling of nitrogen predicted by the ANN algorithm are high overall, while the RMSEP values are low, and the relative analytical errors’ RPDs are stable—basically above 2—especially after drying at 80 °C, based on Table 5.
Combined with Figure 6, this shows that, as far as ANN modeling is concerned, the SPA-based method of selecting characteristic bands to detect soil nitrogen works best, indicating that the model can be used for quantitative predictive analysis. In general, the accuracy of the artificial neural network model was greatly compared with both the PLS and SVM models; thus, we may consider that there is still some nonlinear relationship between soil nitrogen and the selected sensitive waveform. The artificial neural network modeling approach can handle nonlinear relationships, meaning that it can better adapt to complex data and patterns [31]. ANN is also fault-tolerant, so even if some of the data or network nodes fail, it can still provide a useful result. Taken together, the modeling of soil spectra using the ANN algorithm can be used to predict soil nitrate–nitrogen content with good results in this study.

3. Discussion

3.1. Comparison of the Three Modeling Methods

In this study, three modeling methods, namely PLS, SVM, and ANN, were used for modeling and analysis to investigate the effect of drying temperature on the detection of soil nitrate–nitrogen content via the use of NIR sensors. The comparison of the PLS model, SVM model, and ANN model based on different preprocessing methods is shown in Figure 7.
According to Figure 7, the prediction models of both PLS and SVM have high correlation coefficients but are unstable. Moreover, ANN is overall higher than both machine-learning models at each dry temperature. For instance, it can be seen that after drying at 80 °C, CARS-PLS and SPA-SVM both reach the highest correlation coefficients of the prediction set, 0.982 and 0.970, respectively, according to Table 3 and Table 4. Meanwhile, SPA-ANN has a high correlation coefficient of 0.989 at this temperature, according to Table 5. In short, different algorithms have different effects on soil nitrogen detection at the same temperature. The accuracy and stability of the ANN prediction model are better than that of the PLS and SVM models. The explanation for this may be that PLS can better handle the problem of multiple correlations of variables but not the nonlinear problem, and SVM can deal with the issue of nonlinear feature interactions, but sometimes it is hard to find a suitable kernel function. However, ANN, as a deep-learning model, has better adaptiveness and can automatically adjust the model parameters according to the changes in data. Moreover, it is robust to noise and outliers and can handle more complex data situations, so that the model accuracy can reach a high level [32]. In addition, although it performed best in this study, a large number of experiments are still needed to verify its stability as a measure of its application value, or a more simplified model can be continuously explored in subsequent studies.

3.2. Correlation Analysis of Soil-Drying Temperature and Model Accuracy

Based on some of the available studies, the soil-drying temperature has a significant effect on the detection of nitrogen in the NIR region. In this study, 11 different concentration gradients of nitrogen solutions were equipped and mixed evenly with soil; they were then placed at 25 °C for air-drying for 24 days, 50 °C for 36 h, 65 °C for 24 h, 80 °C for 18 h, and 95 °C for 12 h. This was followed by pressing the soil samples and collecting their spectral data for the modeling analysis.
It can be seen first that the different modeling accuracies at varying temperatures are distinct, which is shown by the large gap between the algorithms at 25 °C and 95 °C, according to Figure 8. This shows that the drying temperature does have a great influence on the detection of soil nitrogen. Due to the influence of different temperatures and the differences in the principles of different feature selection methods, they pick out different feature bands combined with different modeling methods, resulting in different modeling effects.
Secondly, there is a gradual improvement in the overall performance of each model as the temperature increases. From 50 °C to 80 °C, the R p 2 increased for most of the models. This is perhaps due to the fact that the effect of moisture gradually decreases with the increasing temperature. In addition, microbial activity at moderately dry temperatures may also lead to the nitrification of nitrogen compounds, thus causing nitrogen losses [33]. Whereas the greatest effect was observed at 25 °C, this may be due to the fact that low drying temperatures may not be able to completely dehydrate the soil. To the best of our knowledge, moisture also has a large effect on the NIR detection of soil nitrogen.
Finally, the high drying temperature is not conducive to the accurate NIR detection of soil nitrogen. A comprehensive comparison shows that the best performance was achieved at temperatures up to 80 °C. However, as the drying temperature increased from 80 °C to 95 °C, the performance of the models clearly decreased overall. This suggests that although the effect of moisture is completely eliminated at 95 °C, chemical processes such as thermal decomposition and volatilization may occur at higher temperatures [34]. In conclusion, appropriate drying temperatures can be of great help in the accurate detection of soil nitrogen by near-infrared.

4. Materials and Methods

4.1. Experiment Design

Soil samples were collected from Huai’an, Jiangsu Province, China, which is located between 32°43′00″–34°06′00″ N and 118°12′00″–119°36′30″ E. It is a transitional area between the southern warm temperate zone and the northern subtropical zone, with both northern and southern climatic characteristics. There are four distinct seasons: a warm and rainy spring, a hot and humid summer, a cool and dry autumn, and a cold and slightly rainy winter, with an average annual temperature of about 14 °C and annual precipitation of about 900 mm. Due to its flat topography and the influence of the Yangtze River basin and the Huai River basin, this area has a wide variety of soil types. The sandy loess used in this study is characterized by looseness, porosity, good permeability, and low water retention.
Soil samples were prepared as follows: Firstly, the collected soil was uniformly sieved and ground with a 60-mesh (about 0.25 mm) sieve under laboratory conditions, and a nitrogen solution containing 0.5–2.5 g/kg (with a concentration gradient of 0.2 g/kg) was prepared by mixing sodium–nitrate solution with distilled water. Next, the nitrogen solution was thoroughly mixed and blended with the soil samples. A total of 11 nitrogen concentrations were used, and 12 samples were replicated for each concentration gradient. Lastly, the experiments were conducted in five groups, and the drying conditions of the four groups of soil samples were 36 h at 50 °C, 24 h at 65 °C, 18 h at 80 °C, and 12 h at 95 °C to fully eliminate the effect of soil moisture on the detection of nitrogen in NIR. A control group was simultaneously set up, and the last group of soils was dried naturally at room temperature (i.e., 25 °C) for 24 days.

4.2. Spectrum Measurements

The NIR spectrometer used in this experiment was a reflection interferometer with two integrated tungsten–halogen lamps from Isuzu Optical Corporation (Shanghai, China). It can collect spectral information, including intensity, reflectance, and absorbance, in the range of 900–1700 nm. The device has an optical resolution of 10 nm and a signal-to-noise ratio of 5000:1 in a 1 s scan, and it has dimensions of 120 × 85 × 54 mm and weighs 900 g. The NIR spectrometer is shown in Figure 9. In this study, the spectral data were collected by using Isuzu Optics NIRez 2.0, a software for this spectroscopic instrument.
The device should be warmed up for 15 min before the spectroscopic measurement, and the calibration of the blackboard and whiteboard should be performed. To maintain the integrity of the original soil spectra and the speed of the detection process, the spectral acquisition parameters were set at 400 points, and three scans were set to use the average value as the spectral information of the samples. When scanning soil samples, the samples should be covered entirely with the light source window to avoid light leakage. It should be noted that its smooth side was chosen for collection to avoid the effects of cracks. In this study, the reflectance values of the spectra were recorded and used for subsequent modeling.

4.3. Spectral Analysis

Near-infrared light is a kind of electromagnetic wave between infrared and visible light. Its spectral information comes from the overlap of internal vibrations of O-H, C-H, N-H, and other hydrogen-containing groups with multi-frequencies and combined frequencies, which can be reflected in the characteristic signals of its spectral region of organic matter [35]. Furthermore, the spectral signal is stable and easy to obtain. According to Lambert’s absorption law, the spectral properties vary with the composition or structure of the material, and the spectra from different groups vary in regard to the position and intensity of the absorption peaks [36]. It is also affected by the nonuniform distribution of soil surface texture, density, and internal composition, making it difficult to eliminate all redundant information, such as overlap, from the spectral data [37,38,39]. Thus, to reduce spectral noise, baseline drift, and interference from other backgrounds, as well as to distinguish overlapping peaks for the purpose of qualitative or quantitative analysis of complex mixtures, five different preprocessing methods were used in this study to analyze the spectral information [40].
In this case, the Savitzky–Golay (S-G) smoothing algorithm uses a weighted average method to quantify the data in the moving window by polynomial least-squares fit and emphasizes the centrality of the centroid [41]. The basic idea of the multiplicative scattering correction (MSC) algorithm is to use the ideal spectrum to represent all spectra linearly regressed with the sample spectrum and to use the slope and intercept of the linear equation to correct the original spectrum [42]. The principle of the standard normal variation (SNV) algorithm is that the absorbance values at each wavelength point satisfy a certain distribution in each spectrum, and the spectral correction is performed according to this assumption [43]. The principle of the moving average smoothing (MA) algorithm is to filter out random noise from the original data by calculating the average of the samples and using it as a new data point. Wavelet transform (WT) can localize the analysis in time (space) frequency and gradually refine the signal (function) in multiple scales through the telescopic translation operation. Thus, the signal is decomposed into different frequency components. It makes the noise in the signal separate from the signal for denoising purposes [44,45,46].

4.4. Feature Band Selection Methods

NIR spectra can provide a large amount of spectral and spatial information related to soil nitrogen vitality properties. However, they also contain overlapping and redundant information, so it is necessary to use feature selection algorithms to obtain representative and important wavelengths to reduce irrelevant information and improve computational speed. By means of feature extraction techniques, the original high-dimensional spectral data are mapped or transformed to a lower dimensional space (while still retaining some of the necessary features of the original data), thus avoiding dimensional catastrophes to a large extent. This makes subsequent tasks, such as classification or clustering, not only more stable, efficient, and easy to handle but, more importantly, also yields better generalization performance [47]. In this study, the main data analysis software used was PyCharm 2023.1.2 (Community Edition) software.

4.4.1. Random Forest Feature Selection Algorithm

The random forest feature selection (RFFS) method is based on the properties of the random forest algorithm (RF). The random forest algorithm is an integrated learning algorithm based on decision trees that are constructed to perform classification or regression by building multiple decision trees [48]. Moreover, feature selection is a randomized approach to split each node and, thus, compare the errors generated in different cases. That is, the Gini coefficient (gini) and out-of-bag (OOB) error rate are used as evaluation metrics to measure the contribution of different feature wavelengths. Next, the importance of different features can be calculated by taking the average values and sorting them in descending order. Then, based on this order, the corresponding proportion of feature wavelength variables is eliminated to obtain a new set of feature wavelengths. The above process is repeated on this basis until m features remain (m is a value set in advance). Finally, the error rate of each feature wavelength collection obtained in the above process is compared, and the feature spectral collection with the lowest error rate is selected as the best combination of feature wavelength variables [49].

4.4.2. Competitive Adaptive Reweighted Sampling Algorithm

The competitive adaptive reweighted sampling (CARS) method is a feature variable selection method that combines Monte Carlo sampling with regression coefficients of the PLS model. It mimics the principle of “survival of the fittest” in Darwin’s theory [50]. The adaptive weighted sampling (ARS) algorithm combined with an exponential decay function is used in each sampling process. The PLS modeling retains the wavelength variables with the larger absolute weights of the regression coefficients and removes the wavelengths with the smaller weights of the regression coefficient values. The PLS modeling is then built based on the new subset. After several calculations, the subset of variables with the smallest root-mean-square error is selected based on ten-fold cross-validation. This subset contains the wavelength variables as the best combination of characteristic wavelength variables [51].

4.4.3. Successive Projections Algorithm

The successive projections algorithm (SPA) is a forward variable selection algorithm for multivariate calibration to select the wavelength with the least redundancy [52]. It is based on the principle of first calculating the correlation between each feature variable and the target variable by calculating the correlation between each feature variable. Then, the target variables after the projection analysis are used to retain the most useful feature information. Specifically, it utilizes projection analysis of vectors by projecting wavelengths onto other wavelengths. The magnitudes of the projection vectors are then compared, and the wavelength with the largest projection vector is retained as the wavelength to be selected. Subsequently, based on the calibration model, the projected feature wavelengths are linearly combined to obtain the final feature spectral set and to realize the data dimensionality reduction [53]. SPA selects the combination of the near-infrared spectral variables with minimum redundancy and minimum covariance.

4.5. Model Evaluation Index

The regression model evaluates the detection performance of the established model by the coefficient of determination ( R 2 ; Equation (1)), the root-mean-square error of prediction ( R M S E P ; Equation (2)), and the residual prediction deviation ( R P D ; Equation (3)). In this study, the coefficient of determination, R 2 , reflects the ability of the constructed model to interpret the sample spectra, and R M S E P refers to the error between the predicted and actual nitrogen content. The R P D assesses the overall performance of the model. In general, the higher the R 2 and R P D and the lower the R M S E P , the better the performance of the prediction model. In this paper, R c 2 and R P 2 represent the correlation coefficients of the calibration and prediction sets, respectively, and R M S E C and R M S E P represent the root-mean-square error of the calibration and prediction sets, respectively. In addition, Mouazen et al. [54] classified the R P D values as follows. An R P D greater than 3 is a good quantitative forecast. Values between 2.5 and 3.0 mean that the model will have good predictive power. R P D values between 2.0 and 2.5 indicate that approximate quantitative prediction is possible. An R P D value between 1.5 and 2.0 means that the model is poor and needs to be improved. R P D values below 1.5 indicate that the model has poor predictive power and is not recommended.
R 2 = i = 1 n y ^ i y ¯ 2 / i = 1 n y i y ¯ 2 ,
R M S E P = i = 1 n y ^ i y i 2 / n ,
R P D = S D p / R M S E P n / n 1 ,
where y ^ i is the predicted value, y i ¯   is the mean of the observed value, y i is the observed value, and n is the number of predicted/observed values. S D p is the standard deviation of the prediction dataset.

5. Conclusions

The effects of drying temperature for the detection of soil nitrogen by near-infrared sensors were investigated. To begin with, the NIR reflectance spectral characteristics of soil samples at five different drying temperatures were explored, and then different preprocessing methods were applied to denoise the original real-time spectral signals of the soil. The modeling and analysis were made on the basis of PLS, and the best preprocessing method SG algorithm was selected to perform the smoothing of the spectra. Next, the RFFS, CARS, and SPA algorithms were selected to determine the characteristic bands, and the filtered reflectance spectra were used to establish the PLS model, SVM model, and ANN model for predicting soil nitrogen content. The findings provided a rapid, convenient, and environmentally friendly method for the real-time detection of soil nitrogen. They also provided a theoretical basis for the development of soil management and precision agriculture. The main conclusions are as follows.
(1)
The analysis of soil reflectance spectral characteristics showed that the whole soil spectral curve shifted along the vertical direction with the change of drying temperature, which indicated that the varying of temperature and nitrate–nitrogen content of the drying soil would lead to a change in soil NIR reflectance. However, the spectral curved near 1400 nm at each drying temperature exhibited a very clear downward trend, indicating that hydrogen-containing groups of nitrogen, such as N-H, have stronger absorption in this band.
(2)
PLS, SVM, and ANN regression models for predicting the soil nitrate–nitrogen content were developed using three feature selection algorithms, RFFS, CARS, and SPA, respectively. The results revealed that the PLS and SVM models could better estimate the soil nitrate–nitrogen concentration, but the accuracy and stability were inferior to that of the ANN model. Therefore, the authors concluded that they were not applicable to this study. The best accuracy of both the SPA-based ANN model and the highest correlation coefficient was reached at a drying temperature of 80 °C, indicating that the accuracy of ANN modeling based on deep learning was greatly improved and had a great advantage in predicting soil nitrate–nitrogen content in real-time.
(3)
The soil-drying temperature has a significant effect on the detection of soil nitrate–nitrogen in NIR. As the drying temperature increased, the accuracy became better, while the accuracy dropped after the temperature reached 80 °C −95 °C, illustrating that high drying temperatures were not conducive to the NIR detection of soil nitrate–nitrogen. In summary, the selection of a suitable drying temperature was of great relevance to improve the accuracy of NIR detection of soil nitrogen. In future research, it may be possible to explore additional preprocessing algorithms and feature selection methods, as well as to investigate the effect of drying time in addition to temperature.

Author Contributions

Conceptualization, L.Z., H.X., J.Y., P.N. and Y.Z.; formal analysis, L.Z.; funding acquisition, J.Y. and P.N.; methodology, L.Z., J.Y., P.N., H.X. and Y.Z.; writing—original draft, L.Z.; writing—review and editing, J.Y. and P.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Research and Demonstration of Key Technology of Saline Water Resources Utilization, Major Science and Technology Project of the Xinjiang Production and Construction Corps (2018AA003) and the National Key Research and Development Program (2022YFD2001801).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Sample Availability

Not available.

References

  1. Potdar, R.P.; Shirolkar, M.M.; Verma, A.J.; More, P.S.; Kulkarni, A. Determination of soil nutrients (NPK) using optical methods: A mini review. J. Plant Nutr. 2021, 44, 1826–1839. [Google Scholar] [CrossRef]
  2. Liu, J.; Cai, H.; Chen, S.; Pi, J.; Zhao, L. A Review on Soil Nitrogen Sensing Technologies: Challenges, Progress and Perspectives. Agriculture 2023, 13, 743. [Google Scholar] [CrossRef]
  3. Ma, X.; Bifano, L.; Fischerauer, G. Evaluation of Electrical Impedance Spectra by Long Short-Term Memory to Estimate Nitrate Concentrations in Soil. Sensors 2023, 23, 2172. [Google Scholar] [CrossRef] [PubMed]
  4. Ward, M.; Jones, R.; Brender, J.; De Kok, T.; Weyer, P.; Nolan, B.; Villanueva, C.; Van Breda, S. Drinking Water Nitrate and Human Health: An Updated Review. Int. J. Environ. Res. Public Health 2018, 15, 1557. [Google Scholar] [CrossRef] [PubMed]
  5. Su, R.; Wu, J.; Hu, J.; Ma, L.; Ahmed, S.; Zhang, Y.; Abdulraheem, M.I.; Birech, Z.; Li, L.; Li, C.; et al. Minimalizing Non-Point Source Pollution Using a Cooperative Ion-Selective Electrode System for Estimating Nitrate Nitrogen in Soil. Front. Plant Sci. 2022, 12, 810214. [Google Scholar] [CrossRef] [PubMed]
  6. Yu, J.; Yin, X.; Raper, T.B.; Jagadamma, S.; Chi, D. Nitrogen Consumption and Productivity of Cotton under Sensor-based Variable-rate Nitrogen Fertilization. Agron. J. 2019, 111, 3320–3328. [Google Scholar] [CrossRef]
  7. Qi, J.; Tian, X.; Li, Y.; Fan, X.; Yuan, H.; Zhao, J.; Jia, H. Design and Experiment of a Subsoiling Variable Rate Fertilization Machine. Int. J. Agric. Biol. Eng. 2020, 13, 118–124. [Google Scholar] [CrossRef]
  8. Nogueira Martins, R.; Magalhães Valente, D.S.; Fim Rosas, J.T.; Souza Santos, F.; Lima Dos Santos, F.F.; Nascimento, M.; Campana Nascimento, A.C. Site-Specific Nutrient Management Zones in Soybean Field Using Multivariate Analysis: An Approach Based on Variable Rate Fertilization. Commun. Soil Sci. Plant Anal. 2020, 51, 687–700. [Google Scholar] [CrossRef]
  9. Mouazen, A.M.; Kuang, B. On-Line Visible and near Infrared Spectroscopy for in-Field Phosphorous Management. Soil Tillage Res. 2016, 155, 471–477. [Google Scholar] [CrossRef]
  10. Xiao, S.; He, Y. Application of Near-Infrared Spectroscopy and Multiple Spectral Algorithms to Explore the Effect of Soil Particle Sizes on Soil Nitrogen Detection. Molecules 2019, 24, 2486. [Google Scholar] [CrossRef]
  11. Xu, S.; Wang, M.; Shi, X.; Yu, Q.; Zhang, Z. Integrating Hyperspectral Imaging with Machine Learning Techniques for the High-Resolution Mapping of Soil Nitrogen Fractions in Soil Profiles. Sci. Total Environ. 2021, 754, 142135. [Google Scholar] [CrossRef]
  12. Zhang, Y.; Li, M.; Zheng, L.; Qin, Q.; Lee, W.S. Spectral Features Extraction for Estimation of Soil Total Nitrogen Content Based on Modified Ant Colony Optimization Algorithm. Geoderma 2019, 333, 23–34. [Google Scholar] [CrossRef]
  13. Nocita, M.; Stevens, A.; Noon, C.; Van Wesemael, B. Prediction of Soil Organic Carbon for Different Levels of Soil Moisture Using Vis-NIR Spectroscopy. Geoderma 2013, 199, 37–42. [Google Scholar] [CrossRef]
  14. Sorenson, P.T.; Quideau, S.A.; Rivard, B. High Resolution Measurement of Soil Organic Carbon and Total Nitrogen with Laboratory Imaging Spectroscopy. Geoderma 2018, 315, 170–177. [Google Scholar] [CrossRef]
  15. Wang, Y.; Cui, B.; Zhou, Y.; Sun, X. Advances in monitoring soil nutrients by near infrared spectroscopy. In Computer and Computing Technologies in Agriculture XI; Li, D., Zhao, C., Eds.; IFIP Advances in Information and Communication Technology; Springer International Publishing: Cham, Switzerland, 2019; Volume 546, pp. 94–99. ISBN 978-3-030-06178-4. [Google Scholar]
  16. Li, M. Spectral Analysis Technique and Its Application, 1st ed.; Science Press: Beijing, China, 2006. [Google Scholar]
  17. Debaene, G.; Niedźwiecki, J.; Pecio, A.; Żurek, A. Effect of the Number of Calibration Samples on the Prediction of Several Soil Properties at the Farm-Scale. Geoderma 2014, 214–215, 114–125. [Google Scholar] [CrossRef]
  18. Wang, Y.; Li, M.; Ji, R.; Wang, M.; Zheng, L. A Deep Learning-Based Method for Screening Soil Total Nitrogen Characteristic Wavelengths. Comput. Electron. Agric. 2021, 187, 106228. [Google Scholar] [CrossRef]
  19. Xiao, S.; He, Y.; Dong, T.; Nie, P. Spectral Analysis and Sensitive Waveband Determination Based on Nitrogen Detection of Different Soil Types Using Near Infrared Sensors. Sensors 2018, 18, 523. [Google Scholar] [CrossRef]
  20. Wang, Q.; Zhang, H.; Li, F.; Gu, C.; Qiao, Y.; Huang, S. Assessment of Calibration Methods for Nitrogen Estimation in Wet and Dry Soil Samples with Different Wavelength Ranges Using Near-Infrared Spectroscopy. Comput. Electron. Agric. 2021, 186, 106181. [Google Scholar] [CrossRef]
  21. He, Y.; Xiao, S.; Nie, P.; Dong, T.; Qu, F.; Lin, L. Research on the Optimum Water Content of Detecting Soil Nitrogen Using Near Infrared Sensor. Sensors 2017, 17, 2045. [Google Scholar] [CrossRef]
  22. An, X.; Li, M.; Zheng, L.; Sun, H. Eliminating the Interference of Soil Moisture and Particle Size on Predicting Soil Total Nitrogen Content Using a NIRS-Based Portable Detector. Comput. Electron. Agric. 2015, 112, 47–53. [Google Scholar] [CrossRef]
  23. Zhou, P.; Yang, W.; Li, M.; Wang, W. A New Coupled Elimination Method of Soil Moisture and Particle Size Interferences on Predicting Soil Total Nitrogen Concentration through Discrete NIR Spectral Band Data. Remote Sens. 2021, 13, 762. [Google Scholar] [CrossRef]
  24. Nie, P.; Dong, T.; He, Y.; Xiao, S.; Qu, F.; Lin, L. The Effects of Drying Temperature on Nitrogen Concentration Detection in Calcium Soil Studied by NIR Spectroscopy. Appl. Sci. 2018, 8, 269. [Google Scholar] [CrossRef]
  25. Cartes, P.; Jara, A.A.; Demanet, R.; Mora, M.D.L.L. Urease Activity and Nitrogen Mineralization Kinetics as Affected by Temperature and Urea Input Rate in Southern Chilean Andisols. Rev. Cienc. Suelo Nutr. Veg. 2009, 9, 69–82. [Google Scholar] [CrossRef]
  26. Fystro, G. The Prediction of C and N Content and Their Potential Mineralisation in Heterogeneous Soil Samples Using Vis–NIR Spectroscopy and Comparative Methods. Plant Soil 2002, 246, 139–149. [Google Scholar] [CrossRef]
  27. Stenberg, B. Effects of Soil Sample Pretreatments and Standardised Rewetting as Interacted with Sand Classes on Vis-NIR Predictions of Clay and Soil Organic Carbon. Geoderma 2010, 158, 15–22. [Google Scholar] [CrossRef]
  28. Nie, P.; Dong, T.; He, Y.; Xiao, S. Research on the Effects of Drying Temperature on Nitrogen Detection of Different Soil Types by Near Infrared Sensors. Sensors 2018, 18, 391. [Google Scholar] [CrossRef]
  29. Nie, P.; Dong, T.; He, Y.; Qu, F. Detection of Soil Nitrogen Using Near Infrared Sensors Based on Soil Pretreatment and Algorithms. Sensors 2017, 17, 1102. [Google Scholar] [CrossRef]
  30. Wang, Y.; Li, M.; Ji, R.; Wang, M.; Zheng, L. Comparison of Soil Total Nitrogen Content Prediction Models Based on Vis-NIR Spectroscopy. Sensors 2020, 20, 7078. [Google Scholar] [CrossRef]
  31. Solihat, N.N.; Son, S.; Williams, E.K.; Ricker, M.C.; Plante, A.F.; Kim, S. Assessment of Artificial Neural Network to Identify Compositional Differences in Ultrahigh-Resolution Mass Spectra Acquired from Coal Mine Affected Soils. Talanta 2022, 248, 123623. [Google Scholar] [CrossRef]
  32. Feng, Y.; Cui, N.; Hao, W.; Gao, L.; Gong, D. Estimation of Soil Temperature from Meteorological Data Using Different Machine Learning Models. Geoderma 2019, 338, 67–77. [Google Scholar] [CrossRef]
  33. Dhar, N.R. Improvement of the Nitrogen Status of Soils and the Origin of Soil Nitrogen. Nature 1943, 151, 590–592. [Google Scholar] [CrossRef]
  34. Dettmann, U.; Kraft, N.N.; Rech, R.; Heidkamp, A.; Tiemeyer, B. Analysis of Peat Soil Organic Carbon, Total Nitrogen, Soil Water Content and Basal Respiration: Is There a ‘Best’ Drying Temperature? Geoderma 2021, 403, 115231. [Google Scholar] [CrossRef]
  35. Wang, W.; Yang, W.; Zhou, P.; Cui, Y.; Wang, D.; Li, M. Development and Performance Test of a Vehicle-Mounted Total Nitrogen Content Prediction System Based on the Fusion of near-Infrared Spectroscopy and Image Information. Comput. Electron. Agric. 2022, 192, 106613. [Google Scholar] [CrossRef]
  36. Mouazen, A.M.; De Baerdemaeker, J.; Ramon, H. Towards Development of On-Line Soil Moisture Content Sensor Using a Fibre-Type NIR Spectrophotometer. Soil Tillage Res. 2005, 80, 171–183. [Google Scholar] [CrossRef]
  37. Zhang, Z.; Ding, J.; Zhu, C.; Wang, J.; Ma, G.; Ge, X.; Li, Z.; Han, L. Strategies for the Efficient Estimation of Soil Organic Matter in Salt-Affected Soils through Vis-NIR Spectroscopy: Optimal Band Combination Algorithm and Spectral Degradation. Geoderma 2021, 382, 114729. [Google Scholar] [CrossRef]
  38. Wu, C.; Zheng, Y.; Yang, H.; Yang, Y.; Wu, Z. Effects of Different Particle Sizes on the Spectral Prediction of Soil Organic Matter. CATENA 2021, 196, 104933. [Google Scholar] [CrossRef]
  39. Divya, Y.; Sanjeevi, S.; Ilamparuthi, K. A Study on the Hyperspectral Signatures of Sandy Soils with Varying Texture and Water Content. Arab. J. Geosci. 2014, 7, 3537–3545. [Google Scholar] [CrossRef]
  40. Gorry, P.A. General Least-Squares Smoothing and Differentiation by the Convolution (Savitzky-Golay) Method. Anal. Chem. 1990, 62, 570–573. [Google Scholar] [CrossRef]
  41. Chen, J.; Jönsson, P.; Tamura, M.; Gu, Z.; Matsushita, B.; Eklundh, L. A Simple Method for Reconstructing a High-Quality NDVI Time-Series Data Set Based on the Savitzky–Golay Filter. Remote Sens. Environ. 2004, 91, 332–344. [Google Scholar] [CrossRef]
  42. Isaksson, T.; Næs, T. The Effect of Multiplicative Scatter Correction (MSC) and Linearity Improvement in NIR Spectroscopy. Appl. Spectrosc. 1988, 42, 1273–1284. [Google Scholar] [CrossRef]
  43. Hsu, H.-P.; Binder, K.; Paul, W. How to Define Variation of Physical Properties Normal to an Undulating One-Dimensional Object. Phys. Rev. Lett. 2009, 103, 198301. [Google Scholar] [CrossRef] [PubMed]
  44. Daubechies, I. The Wavelet Transform, Time-Frequency Localization and Signal Analysis. IEEE Trans. Inf. Theory 1990, 36, 961–1005. [Google Scholar] [CrossRef]
  45. Zhang, Y.; Li, M.; Zheng, L.; Zhao, Y.; Pei, X. Soil Nitrogen Content Forecasting Based on Real-Time NIR Spectroscopy. Comput. Electron. Agric. 2016, 124, 29–36. [Google Scholar] [CrossRef]
  46. Hutengs, C.; Ludwig, B.; Jung, A.; Eisele, A.; Vohland, M. Comparison of Portable and Bench-Top Spectrometers for Mid-Infrared Diffuse Reflectance Measurements of Soils. Sensors 2018, 18, 993. [Google Scholar] [CrossRef] [PubMed]
  47. Vohland, M.; Ludwig, M.; Thiele-Bruhn, S.; Ludwig, B. Determination of Soil Properties with Visible to Near- and Mid-Infrared Spectroscopy: Effects of Spectral Variable Selection. Geoderma 2014, 223–225, 88–96. [Google Scholar] [CrossRef]
  48. Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  49. Xu, Y.; Bao, S.; Pradhan, A.K. Modeling Drivers’ Reaction When Being Tailgated: A Random Forests Method. J. Saf. Res. 2021, 78, 28–35. [Google Scholar] [CrossRef]
  50. Yun, Y.-H.; Wang, W.-T.; Deng, B.-C.; Lai, G.-B.; Liu, X.; Ren, D.-B.; Liang, Y.-Z.; Fan, W.; Xu, Q.-S. Using Variable Combination Population Analysis for Variable Selection in Multivariate Calibration. Anal. Chim. Acta 2015, 862, 14–23. [Google Scholar] [CrossRef]
  51. Krakowska, B.; Custers, D.; Deconinck, E.; Daszykowski, M. The Monte Carlo Validation Framework for the Discriminant Partial Least Squares Model Extended with Variable Selection Methods Applied to Authenticity Studies of Viagra® Based on Chromatographic Impurity Profiles. Analyst 2016, 141, 1060–1070. [Google Scholar] [CrossRef]
  52. Yang, H.; Kuang, B.; Mouazen, A.M. Quantitative Analysis of Soil Nitrogen and Carbon at a Farm Scale Using Visible and near Infrared Spectroscopy Coupled with Wavelength Reduction. Eur. J. Soil Sci. 2012, 63, 410–420. [Google Scholar] [CrossRef]
  53. Araújo, M.C.U.; Saldanha, T.C.B.; Galvão, R.K.H.; Yoneyama, T.; Chame, H.C.; Visani, V. The Successive Projections Algorithm for Variable Selection in Spectroscopic Multicomponent Analysis. Chemom. Intell. Lab. Syst. 2001, 57, 65–73. [Google Scholar] [CrossRef]
  54. Mouazen, A.M.; De Baerdemaeker, J.; Ramon, H. Effect of Wavelength Range on the Measurement Accuracy of Some Selected Soil Constituents Using Visual-Near Infrared Spectroscopy. J. Infrared Spectrosc. 2006, 14, 189–199. [Google Scholar] [CrossRef]
Figure 1. Average NIR reflectance spectra of soils (a) placed at 25 °C, (b) dried at 50 °C, (c) dried at 65 °C, (d) dried at 80 °C, and (e) dried at 95 °C.
Figure 1. Average NIR reflectance spectra of soils (a) placed at 25 °C, (b) dried at 50 °C, (c) dried at 65 °C, (d) dried at 80 °C, and (e) dried at 95 °C.
Molecules 28 06507 g001
Figure 2. The determination coefficients of the partial least squares (PLS) method after different spectral pretreatments.
Figure 2. The determination coefficients of the partial least squares (PLS) method after different spectral pretreatments.
Molecules 28 06507 g002
Figure 3. Screening results of each algorithm for the average spectrum of soil dried at 80 °C.
Figure 3. Screening results of each algorithm for the average spectrum of soil dried at 80 °C.
Molecules 28 06507 g003
Figure 4. Relationship between actual and predicted values of soil N content based on the PLS model: (a) RFFS-PLS, (b) CARS-PLS, and (c) SPA-PLS.
Figure 4. Relationship between actual and predicted values of soil N content based on the PLS model: (a) RFFS-PLS, (b) CARS-PLS, and (c) SPA-PLS.
Molecules 28 06507 g004
Figure 5. Relationship between actual and predicted values of soil N content based on SVM model: (a) RFFS-SVM, (b) CARS-SVM, and (c) SPA-SVM.
Figure 5. Relationship between actual and predicted values of soil N content based on SVM model: (a) RFFS-SVM, (b) CARS-SVM, and (c) SPA-SVM.
Molecules 28 06507 g005
Figure 6. Relationship between actual and predicted values of soil nitrogen content based on the ANN model: (a) RFFS-ANN, (b) CARS-ANN, and (c) SPA-ANN.
Figure 6. Relationship between actual and predicted values of soil nitrogen content based on the ANN model: (a) RFFS-ANN, (b) CARS-ANN, and (c) SPA-ANN.
Molecules 28 06507 g006
Figure 7. Histogram of actual and predicted values of soil N content for different models: (a) modeling results based on PLS, (b) modeling results based on SVM, and (c) modeling results based on ANN.
Figure 7. Histogram of actual and predicted values of soil N content for different models: (a) modeling results based on PLS, (b) modeling results based on SVM, and (c) modeling results based on ANN.
Molecules 28 06507 g007
Figure 8. Comparison of modeling performance at different temperatures.
Figure 8. Comparison of modeling performance at different temperatures.
Molecules 28 06507 g008
Figure 9. Experimental instrument—portable NIR spectrometer.
Figure 9. Experimental instrument—portable NIR spectrometer.
Molecules 28 06507 g009
Table 1. The prediction effects with different spectral pretreatments and different drying temperatures by using the partial least squares (PLS).
Table 1. The prediction effects with different spectral pretreatments and different drying temperatures by using the partial least squares (PLS).
MethodsGroupCalibration SetPrediction SetN
R c 2 RMSEC (g/kg) R p 2 RMSEP (g/kg)RPD
RAW25 °C0.9070.4280.8330.5091.2447
50 °C0.9440.3800.8760.4721.3417
65 °C0.9290.4020.8740.4741.3367
80 °C0.8670.4640.6620.6071.0438
95 °C0.8770.4560.7180.5801.0919
MA25 °C0.9770.3080.9190.4251.4906
50 °C0.9540.3620.9140.4311.4685
65 °C0.9750.3150.9630.3491.8156
80 °C0.9600.3510.9700.3311.9136
95 °C0.9510.3690.8950.4531.3966
WT25 °C0.9660.3390.8650.4821.3139
50 °C0.9480.3740.8950.4531.3967
65 °C0.9790.3000.9120.4331.4619
80 °C0.9250.4070.7680.5521.1469
95 °C0.9310.4000.8020.5311.19210
MSC25 °C0.9760.3110.8810.4671.35410
50 °C0.9850.2750.9370.3991.58710
65 °C0.9850.2760.9200.4231.49510
80 °C0.9290.4030.7230.5771.0969
95 °C0.9320.3980.7330.5721.10710
SG25 °C0.9590.3530.9410.3921.6155
50 °C0.9760.3110.9730.3221.9676
65 °C0.9770.3060.9640.3471.8245
80 °C0.9750.3120.9770.3092.057
95 °C0.9640.3430.9510.3751.6897
SNV25 °C0.9440.3830.8450.4911.2458
50 °C0.9680.3360.9120.4261.4358
65 °C0.9660.3410.8640.4741.2878
80 °C0.9590.3540.7820.5431.16410
95 °C0.9320.3980.7330.5721.10710
Table 2. Characteristic wavelength selection results based on RFFS, CARS, and SPA.
Table 2. Characteristic wavelength selection results based on RFFS, CARS, and SPA.
MethodsTemperatureVariable NumberProportion
RFFS25 °C112.75%
50 °C317.75%
65 °C164%
80 °C287%
95 °C164%
CARS25 °C246%
50 °C246%
65 °C307.5%
80 °C307.5%
95 °C338.25%
SPA25 °C184.5%
50 °C82%
65 °C143.5%
80 °C143.5%
95 °C123%
Table 3. Results of PLS modeling based on different feature selection algorithms.
Table 3. Results of PLS modeling based on different feature selection algorithms.
MethodsTemperature R c 2 RMSEC (g/kg) R p 2 RMSEP (g/kg)RPD
RFFS-PLS25 °C0.8470.4790.8680.4791.320
50 °C0.9320.4010.9140.4231.444
65 °C0.9710.3260.9560.3641.737
80 °C0.9760.3130.9570.3561.716
95 °C0.8960.4390.8520.4931.283
CARS-PLS25 °C0.9730.3200.9590.3581.766
50 °C0.9830.2860.9750.3152.088
65 °C0.9810.2940.9740.3201.979
80 °C0.9850.2780.9820.2922.170
95 °C0.9750.3130.9600.3561.777
SPA-PLS25 °C0.9720.3210.9520.3721.700
50 °C0.9670.3350.9690.3341.896
65 °C0.9810.2920.9720.3261.939
80 °C0.9840.2840.9750.3121.959
95 °C0.9760.3360.9570.3621.750
Table 4. Results of building SVM models based on different feature selection algorithms.
Table 4. Results of building SVM models based on different feature selection algorithms.
MethodsTemperature R c 2 RMSEC (g/kg) R p 2 RMSEP (g/kg)RPD
RFFS-SVM25 °C0.8320.4880.8500.4871.255
50 °C0.9880.2670.9460.3781.619
65 °C0.9700.3270.9510.3681.663
80 °C0.9390.3930.9500.3701.652
95 °C0.8670.4630.8670.4721.294
CARS-SVM25 °C0.9490.3780.9410.3851.587
50 °C0.9690.3430.9530.3651.675
65 °C0.9760.3080.9610.3481.755
80 °C0.9760.3110.9620.3461.767
95 °C0.8380.4630.8800.4601.330
SPA-SVM25 °C0.9780.3070.9560.3591.705
50 °C0.9650.3400.9620.3461.770
65 °C0.9770.3110.9690.3291.860
80 °C0.9850.2800.9700.3251.880
95 °C0.9590.3510.9530.3631.683
Table 5. Results of ANN models based on different feature selection algorithms.
Table 5. Results of ANN models based on different feature selection algorithms.
MethodsTemperature R c 2 RMSEC (g/kg) R p 2 RMSEP (g/kg)RPD
RFFS-ANN25 °C0.9850.2800.9640.3501.847
50 °C0.9960.1980.9840.2822.196
65 °C0.9940.2150.9860.2722.279
80 °C0.9930.2290.9810.2942.107
95 °C0.9830.2820.8980.4341.360
CARS-ANN25 °C0.9840.2910.9270.4071.502
50 °C0.9900.2490.9820.2872.128
65 °C0.9970.1810.9830.2802.181
80 °C0.9980.1660.9880.2602.378
95 °C0.9930.2240.8760.4671.325
SPA-ANN25 °C0.9960.1990.9840.2792.221
50 °C0.9980.1730.9870.2672.323
65 °C0.9930.2280.9870.2672.314
80 °C0.9980.1780.9890.2572.411
95 °C0.9970.1760.9860.2812.352
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhou, L.; Yao, J.; Xu, H.; Zhang, Y.; Nie, P. Research on the Effects of Drying Temperature for the Detection of Soil Nitrogen by Near-Infrared Spectroscopy. Molecules 2023, 28, 6507. https://doi.org/10.3390/molecules28186507

AMA Style

Zhou L, Yao J, Xu H, Zhang Y, Nie P. Research on the Effects of Drying Temperature for the Detection of Soil Nitrogen by Near-Infrared Spectroscopy. Molecules. 2023; 28(18):6507. https://doi.org/10.3390/molecules28186507

Chicago/Turabian Style

Zhou, Ling, Jiangjun Yao, Honggang Xu, Yahui Zhang, and Pengcheng Nie. 2023. "Research on the Effects of Drying Temperature for the Detection of Soil Nitrogen by Near-Infrared Spectroscopy" Molecules 28, no. 18: 6507. https://doi.org/10.3390/molecules28186507

Article Metrics

Back to TopTop