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

Institutions

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

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Rongyao Zhang, Mochen Liu, Fade Li, Yinfa Yan et al.
8 citations
Soil and Tillage Research
Spectroscopy and Chemometric Analyses
6.02
article

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

Rongyao Zhang, Mochen Liu, Fade Li, Yinfa Yan, Zhanhua Song, Tian Fuyang, Zhenwei Yu, Yao Lu, Yang Kuankuan, Yang Qinglu
article en
8 citations

Abstract

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.

Soil and Tillage ResearchVol. 252
Weichai Power (China) (CN), Shandong Agricultural University (CN)
Shandong Agricultural University, Natural Science Foundation of Shandong Province, National Key Research and Development Program of China
Life below water
Openalex Percentile: Top 3%
Spectroscopy and Chemometric Analyses
6.02
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.