Multi-spectral evaluation of total nitrogen, phosphorus and potassium content in soil using Vis-NIR spectroscopy based on a modified support vector machine with whale optimization algorithm
Accurate and non-destructive detection of total nitrogen (TN), total phosphorus (TP), and total potassium (TK) levels in soil is crucial for precise soil testing and fertilization in modernized precision agriculture . Traditional methods for soil composition analysis are expensive, time-consuming, and destructive. This research aims to establish a low-cost, high-precision, and non-destructive method for soil nutrient detection based on visible-near-infrared (Vis-NIR) spectroscopy (350–2500 nm) combined with improved machine learning algorithms. The Vis-NIR spectra of soil samples were acquired using the RS-5400 high-resolution ground feature spectrometer. Subsequently, the Monte Carlo sampling cross-validation (MCCV) algorithm was used to eliminate abnormal samples, and then different preprocessing methods were performed on the spectral data including first-derivative (FD), Savitzky-Golay smoothing (SG) and others. The optimal preprocessing method was selected from these options. In order to remove redundant information and increase the speed of calculation, five algorithms such as competitive adaptive reweighted sampling (CARS), iteratively retains informative variables (IRIV) and the variable iterative space shrinkage approach (VISSA)-IRIV algorithm were used to select feature variables. The characteristic wavelengths closely related to TN, TP, and TK in the soil have been extracted. Then, the RBF kernel (radial basis function) and poly kernel were mixed to obtain the RBF-poly hybrid kernel function, and then the hybrid kernel function support vector machine (RBF-poly-SVM) and the radial basis kernel function support vector machine (RBF-SVM) were applied respectively. Establish prediction models and introduce the whale optimization algorithm (WOA) to optimize the g (kernel function parameter), c (penalty factor) and k -rbf (weight coefficient) parameters in the two models. The performance of the developed models was tested using the coefficient of determination ( R 2 ), the root mean squared error ( RMSE ) and the ratio of performance to deviation ( RPD ). The results demonstrated that among all models, the RBF-poly -SVM modeling methods were superior to the RBF-SVM model. The best results for estimation of TN, TP, and TK elements were achieved by the models of SG-square-FD + IRIV + RBF-poly-SVM ( R 2 C =0.960, R 2 V =0.902, RPD =3.206), square-FD + IRIV + RBF-poly-SVM ( R 2 C =0.999, R 2 V =0.937, RPD =3.939), square root + VISSA-IRIV + RBF-poly-SVM ( R 2 C =0.955, R 2 V =0.904, RPD =2.608), respectively. The findings of the current approach own practical implications for agriculture and environmental management, as they enable more efficient and accurate soil nutrient monitoring and management. • Innovative soil nutrients detection method using NIR and ML was proposed. • A novel WOA-SVM algorithm with enhanced prediction Performance. • CARS, IRIV, VISSA, SPA algorithms selected effective features for TN, TP, TK. • Satisfied multi-spectral prediction results of TN, TP, TK were achieved.
Authors
- Rongyao Zhang (ORCID: https://orcid.org/0009-0009-1840-2933)
- Mochen Liu
- Fade Li (ORCID: https://orcid.org/0000-0003-4874-7421)
- Yinfa Yan (ORCID: https://orcid.org/0000-0002-6417-9666)
- Zhanhua Song (ORCID: https://orcid.org/0000-0002-0819-3375)
- Tian Fuyang
- Zhenwei Yu (ORCID: https://orcid.org/0000-0002-6264-1183)
- Yao Lu (ORCID: https://orcid.org/0000-0002-1587-0135)
- Yang Kuankuan
- Yang Qinglu
Institutions
- Weichai Power (China) (CN)
- Shandong Agricultural University (CN)
Publication Details
- Journal
- Soil and Tillage Research
- Published
- 2025-04-19
- DOI
- https://doi.org/10.1016/j.still.2025.106567
- Citations
- 8
- Primary Topic
- Spectroscopy and Chemometric Analyses
- Type
- article
- Field-Weighted Citation Impact
- 6.02
Funders
- Shandong Agricultural University
- Natural Science Foundation of Shandong Province
- National Key Research and Development Program of China