Prediction of Soil Nutrients from Different Soil Textures using Portable Spectrometer and Machine Learning
DOI:
https://doi.org/10.26877/asset.v8i1.2166Keywords:
Artificial Neural Network, machine learning, portable vis-nir spectrometer, soil nutrient prediction, spectral analysisAbstract
Soil nutrients, such as nitrogen, phosphorus, and potassium, are critical for plant growth and agricultural productivity. Conventional laboratory methods for measuring these nutrients are accurate but often time-consuming, costly, and environmentally taxing. This study explores the potential of portable visible-near infrared (Vis-NIR) spectrometer combined with machine learning algorithms as a rapid, cost-effective, and eco-friendly alternative for soil nutrient analysis. Soil samples of clay, clay loam, and sandy clay were collected and analyzed using artificial neural network (ANN) approach to predict soil nutrients. A total of 81 reflectance spectra data from each soil type were acquired using an AS7265x sensor and processed to develop a predictive model for nutrient content. ANN models demonstrated high accuracy, with R² values exceeding 0.8 in each type of soil texture. This study emphasizes the potential of portable Vis-NIR spectrometer and machine learning integration to revolutionize soil nutrient analysis, offering significant improvements in agricultural efficiency and sustainability.
References
[1] Jiaying M, Tingting C, Jie L, Weimeng F, Baohua F, Guangyan L, et al. Functions of Nitrogen, Phosphorus and Potassium in Energy Status and Their Influences on Rice Growth and Development. Rice Science 2022;29:166–78. https://doi.org/10.1016/j.rsci.2022.01.005.
[2] Sun Z, Yang R, Wang J, Zhou P, Gong Y, Gao F, et al. Effects of Nutrient Deficiency on Crop Yield and Soil Nutrients Under Winter Wheat–Summer Maize Rotation System in the North China Plain. Agronomy 2024;14. https://doi.org/10.3390/agronomy14112690.
[3] Keena M, Meehan M, Scherer T. Environmental Implications of Excess Fertilizer and Manure on Water Quality (NM1281) | Enhanced Reader 2022.
[4] Potdar RP, Shirolkar MM, Verma AJ, More PS, Kulkarni A. Determination of soil nutrients (NPK) using optical methods: a mini review. Journal of Plant Nutrition 2021;44:1826–39. https://doi.org/10.1080/01904167.2021.1884702.
[5] Negiş H. Using Models and Artificial Neural Networks to Predict Soil Compaction Based on Textural Properties of Soils under Agriculture. Agriculture (Switzerland) 2024;14. https://doi.org/10.3390/agriculture14010047.
[6] N E, Keerthana G. Application of Artificial Neural Networks in Soil Science Research. Archives of Current Research International 2024;24:1–15. https://doi.org/10.9734/acri/2024/v24i5674.
[7] Jiang C, Zhao J, Li G. Integration of Vis–NIR Spectroscopy and Machine Learning Techniques to Predict Eight Soil Parameters in Alpine Regions. Agronomy 2023;13:1–21. https://doi.org/10.3390/agronomy13112816.
[8] Saidi S, Ayoubi S, Shirvani M, Mireei SA, Ge Y, Zhao K, et al. Use of Vis-NIR reflectance spectroscopy for estimating soil phosphorus sorption parameters at the watershed scale. Soil and Tillage Research 2025;248. https://doi.org/10.1016/j.still.2025.106460.
[9] Metzger K, Liebisch F, Herrera JM, Guillaume T, Walder F, Bragazza L. The use of visible and near-infrared spectroscopy for in-situ characterization of agricultural soil fertility: A proposition of best practice by comparing scanning positions and spectrometers. Soil Use and Management 2024;40:1–13. https://doi.org/10.1111/sum.12952.
[10] Devianti, Sufardi, Bulan R, Sitorus A. Vis-NIR spectra combined with machine learning for predicting soil nutrients in cropland from Aceh Province, Indonesia. Case Studies in Chemical and Environmental Engineering 2022;6:100268. https://doi.org/10.1016/j.cscee.2022.100268.
[11] Husnain et al. Rekomendasi Padi , Jagung dan Kedelai pada Lahan Sawah ( Per Kecamatan ) Buku I : PADI. Balai Besar Penelitian Dan Pengembangan Pertanian Kementerian Pertanian 2020:478.
[12] Wang Q, Li S, Li J, Huang D. The Utilization and Roles of Nitrogen in Plants. Forests 2024;15. https://doi.org/10.3390/f15071191.
[13] Lizcano-Toledo R, Reyes-Martín MP, Celi L, Fernández-Ondoño E. Phosphorus dynamics in the soil–plant–environment relationship in cropping systems: A review. Applied Sciences (Switzerland) 2021;11. https://doi.org/10.3390/app112311133.
[14] Ladikou EV, Daras G, Landi M, Chatzistathis T, Sotiropoulos T, Rigas S, et al. Physiological and Biochemical Effects of Potassium Deficiency on Apple Tree Growth. Horticulturae 2025;11:1–19. https://doi.org/10.3390/horticulturae11010042.
[15] Zhang Z, Chang Z, Huang J, Leng G, Xu W, Wang Y, et al. Enhancing soil texture classification with multivariate scattering correction and residual neural networks using visible near-infrared spectra. Journal of Environmental Management 2024;352:120094. https://doi.org/10.1016/j.jenvman.2024.120094.
[16] Rossel RAV, Webster R. Predicting soil properties from the Australian soil visible-near infrared spectroscopic database. European Journal of Soil Science 2012;63:848–60. https://doi.org/10.1111/j.1365-2389.2012.01495.x.
[17] Xie XL, Li AB. Identification of soil profile classes using depth-weighted visible–near-infrared spectral reflectance. Geoderma 2018;325:90–101. https://doi.org/10.1016/j.geoderma.2018.03.029.
[18] Byun Y, Seo C, Yun T, Joo Y, Young Jo H. Prediction of Na- and Ca-montmorillonite contents and swelling properties of clay mixtures using Vis-NIR spectroscopy. Geoderma 2023;430:116294. https://doi.org/10.1016/j.geoderma.2022.116294.
[19] Barman U, Choudhury RD. Soil texture classification using multi class support vector machine. Information Processing in Agriculture 2020;7:318–32. https://doi.org/10.1016/j.inpa.2019.08.001.
[20] Coblinski JA, Giasson É, Demattê JAM, Dotto AC, Costa JJF, Vašát R. Prediction of soil texture classes through different wavelength regions of reflectance spectroscopy at various soil depths. Catena 2020;189. https://doi.org/10.1016/j.catena.2020.104485.
[21] Daniel KW, Tripathi NK, Honda K. Artificial neural network analysis of laboratory and in situ spectra for the estimation of macronutrients in soils of Lop Buri (Thailand). Australian Journal of Soil Research 2003;41:47–59. https://doi.org/10.1071/SR02027.
[22] Singha C, Swain KC, Sahoo S, Govind A. Prediction of soil nutrients through PLSR and SVMR models by VIs-NIR reflectance spectroscopy. Egyptian Journal of Remote Sensing and Space Science 2023;26:901–18. https://doi.org/10.1016/j.ejrs.2023.10.005.
[23] Priori S, Mzid N, Pascucci S, Pignatti S, Casa R. Performance of a Portable FT-NIR MEMS Spectrometer to Predict Soil Features. Soil Systems 2022;6:1–12. https://doi.org/10.3390/soilsystems6030066.
[24] Coblinski JA, Giasson É, Demattê JAM, Dotto AC, Costa JJF, Vašát R. Prediction of soil texture classes through different wavelength regions of reflectance spectroscopy at various soil depths. Catena 2020;189. https://doi.org/10.1016/j.catena.2020.104485.
[25] Ng W, Husnain, Anggria L, Siregar AF, Hartatik W, Sulaeman Y, et al. Developing a soil spectral library using a low-cost NIR spectrometer for precision fertilization in Indonesia. Geoderma Regional 2020;22:e00319. https://doi.org/10.1016/j.geodrs.2020.e00319.
[26] Asadu CO, Ezema CA, Ekwueme BN, Onu CE, Onoh IM, Adejoh T, et al. Enhanced efficiency fertilizers: Overview of production methods, materials used, nutrients release mechanisms, benefits and considerations. Environmental Pollution and Management 2024;1:32–48. https://doi.org/10.1016/j.epm.2024.07.002.



