Background Subtraction Method for Soil XRF Spectrum Based on
PIEspline
LI Tang-hu1, GAN Ting-ting2, 4*, ZHAO Nan-jing1, 2, 3, 4, 5*, YIN Gao-fang2, 4, 5, YE Zi-qi2, 3, 4 , WANG Ying2, 3, 4, SHENG Ruo-yu2, 3, 4
1. Institute of Physical Science and Information Technology, Anhui University, Hefei 230601, China
2. Key Laboratory of Environmental Optics and Technology, Anhui Institute of Optics and Fine Mechanics, Hefei Institutes of Physical Science, Chinese Academy of Sciences, Hefei 230031, China
3. University of Science and Technology of China, Hefei 230026, China
4. Key Laboratory of Optical Monitoring Technology for Environment of Anhui Province, Hefei 230031, China
5. Institute of Environment Hefei Comprehensive National Science Center, Hefei 230031, China
Abstract:X-ray fluorescence (XRF) spectroscopy is a crucial technique for the rapid on-site detection of heavy metals. However, when applied to soil heavy metal analysis, the presence of high-intensity and complex background spectra due to soil matrix effects significantly hinders the accurate acquisition of characteristic spectral peaks and the precision of quantitative analyses. To address this issue, this paper proposes a background subtraction method for soil XRF spectra, combining peak-valley recognition using an extremum method with penalized correction for cubic smoothing spline fitting, termed PIEspline. Initially, the extremum method identifies peak and valley points in the complete soil XRF spectra to extract data points representative of the background. These points are then used to fit a cubic smoothing spline curve with penalized corrections, forming the background baseline and thus enabling the subtraction of complex backgrounds from soil XRF spectra. The performance of the PIEspline method is further validated by comparing it with three traditional spectral background subtraction methods: adaptive iteratively reweighted penalized least squares (airPLS), iterative wavelet transform (IWT), and statistical sensitive nonlinear iterative peak-clipping (SNIP). The results indicate that, for simulated soil XRF spectra, the root mean square errors (RMSE) between the background spectra obtained by the PIEspline method and the true background spectra are 0.425 8 and 0.644 1, respectively, which are lower than those of the other three methods. Additionally, the PIEspline demonstrates the fastest background subtraction efficiency. For three different soil types cinnamon soil, saline-alkali soil, and loess and three different soil uses agricultural, industrial, and construction the average relative error of fluorescence intensity at 10 characteristic valley points in the XRF spectra fitted by PIEspline is 10.87%. Compared to the traditional methods, this error is reduced by 84.88%, 76.30%, and 16.51%, respectively. Furthermore, for quantitative analysis of Cr, Pb, and Cd in the aforementioned six soil types, the average relative errors using PIEspline are 4.01%, 2.50%, and 5.20%, respectively, representing reductions of 22.39% to 84.07%, 60.15% to 71.92%, and 79.18% to 84.07% compared to airPLS, IWT, and SNIP. Notably, the PIEspline method exhibits minimal fluctuation in relative error when soil type and use change, showcasing superior stability. This suggests that the PIEspline method offers the best applicability for simultaneous XRF quantitatively analyzing multiple heavy metals across various soil types and uses. Therefore, the PIEspline method proposed in this study enables precise background subtraction of XRF spectra from different soil types and uses, improving heavy metal XRF quantitative analysis accuracy. This research provides a vital methodological foundation for the rapid and accurate on-site detection of soil heavy metals using XRF.
Key words:X-ray fluorescence; Background subtraction; Heavy metal detection; Spectral analysis; Soil
李唐虎,甘婷婷,赵南京,殷高方,叶紫琪,汪 颖,盛若愚. 基于PIEspline的土壤XRF光谱背景扣除方法研究[J]. 光谱学与光谱分析, 2025, 45(05): 1364-1372.
LI Tang-hu, GAN Ting-ting, ZHAO Nan-jing, YIN Gao-fang, YE Zi-qi , WANG Ying, SHENG Ruo-yu. Background Subtraction Method for Soil XRF Spectrum Based on
PIEspline. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(05): 1364-1372.
[1] Hou D,O'Connor D,Igalavithana A D,et al. Nature Reviews Earth & Environment,2020,1(7):366.
[2] Ministry of Environmental Protection of the People's Republic of China,Ministry of Land and Resources of the People's Republic of China(环境保护部,国土资源部). Bulletin of Natilnal Survey on Soil Pollution(全国土壤污染状况调查公报),(2014-04-17)[2020-04-23]. http://www.gov.cn/foot/2014-04/17/content_2661768.htm.
[3] GAN Ting-ting,ZHAO Nan-jing,YIN Gao-fang,et al(甘婷婷, 赵南京, 殷高方, 等). Spectroscopy and Spectral Analysis(光谱学与光谱分析),2017,37(6):1912.
[4] QIU Hui-dong,ZHAO Bo,ZHANG Hong, et al(邱会东,赵 波,张 红,等). China Oils and Fats(中国油脂),2017,42(1):76.
[5] Hamida S,Ouabdesslam L,Ladjel A F,et al. Analytical Letters,2018, 51(16):2501.
[6] DU Yan-dong(杜彦东). Chinese Journal of Inorganic Analytical Chemistry(中国无机分析化学),2023, 13(3):226.
[7] Malik L A,Bashir A,Qureashi A,et al. Environmental Chemistry Letters,2019,17:1495.
[8] Aragay G,Pons J,Merkoçi A. Chemical Reviews,2011,111(5):3433.
[9] Małachowska E,Lipkiewicz A,Dubowik M,et al. Coatings,2023,13(8):1398.
[10] XING Yan,TIAN Wei-hua,LIU Jin-hua,et al(杏 艳,田渭花,刘锦华,等). Environmental Chemistry(环境化学),2022,41(10):3182.
[11] DOU Wei-quan,GAO Ming,XIA Pei-min,et al(豆卫全,高 明,夏培民,等). Metallurgical Analysis(冶金分析),2019,39(9):54.
[12] JIANG Xiao-yu,LI Fu-sheng,WANG Qing-ya,et al(江晓宇,李福生,王清亚,等). Transactions of the Chinese Society for Agricultural Machinery(农业机械学报),2021,52(8):205.
[13] YANG Jin,LI Fei,GE Liang-quan,et al(杨 津, 李 飞, 葛良全, 等). Nuclear Techniques(核技术),2020,43(6):77.
[14] ZHAO Feng-kui,XU Xiao-mei,LÜ Li-ya(赵奉奎,徐晓美,吕立亚). Journal of Instrumental Analysis(分析测试学报),2019,38(10):1275.
[15] Zhang Z M,Chen S,Liang Y Z. Analyst,2010,135(5):1138.