Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jul 4;25(13):4176.
doi: 10.3390/s25134176.

PCA- and PLSR-Based Machine Learning Model for Prediction of Urea-N Content in Heterogeneous Soils Using Near-Infrared Spectroscopy

Affiliations

PCA- and PLSR-Based Machine Learning Model for Prediction of Urea-N Content in Heterogeneous Soils Using Near-Infrared Spectroscopy

Damiano Crescini et al. Sensors (Basel). .

Abstract

Determining the soil's nitrogen supply accurately and quickly is essential for effective agricultural management. This study explores the use of near-infrared (NIR) spectroscopy combined with spectral pre-processing techniques (such as Savitzky-Golay filtering) and partial least squares regression (PLSR) to assess soil nitrogen levels. Six soil types of varying compositions, treated with different levels of Urea-N fertilizer, were examined. Nitrogen-specific NIR peaks were identified, and regression models were consequently developed. Through a comparison of the performance of the models, the most effective model for nitrogen detection was selected. In calibration, the models performed well, with high R2 (over 0.9) and low root mean square error (RMSE) values. The second derivative-based (SD) model slightly outperformed the first derivative-based (FD) model in terms of accuracy. Both models showed minimal bias, indicating reliable performance. During validation, the FD model outperformed the SD model in terms of R2, root mean square error of prediction (RMSEP), and residual prediction deviation (RPD). Thus, the FD model demonstrated good predictive ability (R2 = 0.77, RPD = 2.06), while the SD model was less effective (R2 = 0.65, RPD = 1.77). Compared to previous studies, this study uniquely combines real-time online detection capability with low computational cost, unlike most prior offline approaches, and includes model validation across various soil types. Overall, NIR spectroscopy coupled with multivariate models proves to be a promising tool for the detection of nitrogen levels in various soils.

Keywords: data models and Urea-N; partial least squares regression (PLSR); reflectance spectroscopy; sensors; various soil.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflicts of interest.

Figures

Figure 1
Figure 1
Overall technical flowchart for Urea-N prediction using near-infrared (NIR) spectroscopy.
Figure 2
Figure 2
The research region: (a) map of Italy—northern sampling area; (b) map of Italy—southern sampling area; (c) map of Japan—northern area of origin; (d) map of Japan—central area of origin.
Figure 3
Figure 3
NIR spectra of the six soil samples (Urea-N = 0%).
Figure 4
Figure 4
Spectra of standard Urea-N in the range from 1100 to 2500 nm [15].
Figure 5
Figure 5
Example of measurement system: (a) overview of set-up; (b) close-up of soil container with inserted reflectivity probe; (c) view of reflectivity probe and detail of optical fibers; and (d) view of six soils under study.
Figure 6
Figure 6
Spectra of the six soils with different Urea-N concentrations.
Figure 7
Figure 7
First derivative (FD) spectra of the six soils under different Urea-N concentrations (in %).
Figure 8
Figure 8
Second derivative (SD) spectra of the six soils under different Urea-N concentrations (in %).
Figure 9
Figure 9
Scatter plot of predicted and measured Urea-N contents based on PLSR model after use of SG-FDT method.

Similar articles

References

    1. Panagos P., Montanarella L., Barbero M., Schneegans A., Aguglia L., Jones A. Soil priorities in the European Union. Geoderma Reg. 2022;29:e00510. doi: 10.1016/j.geodrs.2022.e00510. - DOI
    1. Communication from the Commission to the European Parliament, the Council, the European Economic and Social Committee and the Committee of the Regions EU Soil Strategy for 2020 Reaping the Benefits of Healthy Soils for People, Food, Nature and Climate. [(accessed on 1 July 2025)]. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=celex:52021DC0699.
    1. Bremner J.M. Determination of nitrogen in soil by the Kjeldahl method. J. Agric. Sci. 1960;55:11–33. doi: 10.1017/S0021859600021572. - DOI
    1. Novamsky I., Van Eck R., Van Schouwenburg C., Walinga I. Total nitrogen determination in plant material by means of the indophenol-blue method. Neth. J. Agric. Sci. 1974;22:3–5. doi: 10.18174/njas.v22i1.17230. - DOI
    1. Piccone L.I., Cabrera M.L., Franzluebbers A.J. A rapid method to estimate potentially mineralizable nitrogen in soil. Soil Sci. Soc. Am. J. 2002;66:1843–1847. doi: 10.2136/sssaj2002.1843. - DOI

LinkOut - more resources