光谱学与光谱分析, 2023, 43 (4): 1037, 网络出版: 2023-05-03  

基于SG-Lasso-PLS融合算法的水体硝酸盐氮紫外光谱检测研究

Study on the Detection Method of Nitrate Nitrogen in Water Based on Ultraviolet Spectroscopy
作者单位
重庆邮电大学光电工程学院, 光电信息感测与传输技术重庆重点实验室, 重庆 400065
摘要
硝酸盐氮(NO3-N)是水中“三氮”(硝酸盐氮、 亚硝酸盐氮、 氨氮)之一, 能够反映水体受污染的程度, 是水质评估的一项重要指标。 水体中的硝酸盐氮浓度过高不仅会导致水环境污染加重, 而且会对人畜及水产构成较大威胁。 传统的硝酸盐氮检测必须先反应后测定, 具有时间长、 操作复杂、 有二次污染等缺点。 光谱法具有快速、 无损、 无试剂消耗等显著优点。 针对硝酸盐氮难以快速检测的问题, 提出了一种基于紫外吸收光谱的快速定量分析硝酸盐氮的方法。 采集42份浓度为0~20 mg·L-1的硝酸盐氮标准溶液样本的紫外吸收光谱, 每份样本经11次平均处理以减少仪器噪声和环境的影响。 采用SPXY算法按照7∶3的比例划分训练集、 测试集, 对紫外吸收光谱数据使用Savitzky-Golay(SG)滤波算法进行预处理, 通过10折叠交叉验证获得套索回归(lasso regression)合适的正则化参数λ=0.203 6, 再使用Lasso回归在全光谱范围内筛选出与硝酸盐氮相关的光谱特征波长, 将特征波长处的吸光度与样本浓度进行偏最小二乘(PLS)拟合建立硝酸盐氮的回归模型。 采用此建模方法所建立的模型训练集的R2与RMSE分别为0.999 91和0.060 15 mg·L-1, 测试集的R2与RMSE分别为0.999 72和0.046 91 mg·L-1。 为了验证提出的SG-Lasso-PLS预测模型效果, 另外建立了Lasso-PLS, SG-PCA-PLS和SG-PCA-SVR三种预测模型进行对比。 验证结果表明, SG-Lasso-PLS建立的预测模型的R2和RMSE均优于其他三种预测模型。 说明SG滤波能够消除光谱信号的随机噪声, 提高模型的预测精度。 与PCA数据降维算法相比, Lasso可实现全光谱范围内的光谱特征选择和数据降维, 能有效消除光谱数据的冗余信息, 提高模型的预测精度。 因此, 本文提出的SG-Lasso-PLS混合模型能够快速准确的对水体中的硝酸盐氮进行预测。 作为硝酸盐氮浓度检测的基础研究, 能为快速无污染的水质在线监测场景提供算法参考。
Abstract
Nitrate nitrogen (NO3-N) is one of the “three nitrogen” (nitrate nitrogen, nitrite nitrogen, ammonia nitrogen) in water, can reflect the degree of pollution of the water environment, and is an important indicator of water quality assessment. High concentrations of nitrate nitrogen in the water body will not only lead to increased pollution of the water environment, but also pose a greater threat to humans, animals and aquatic products. The traditional nitrate nitrogen detection must be measured after the reaction, with a long time, complex operation, secondary pollution and other disadvantages. The spectrometry method has the significant advantages of rapid, non-destructive, and no reagent consumption. To address the problem that nitrate nitrogen is difficult to be detected quickly, a method for rapid quantitative analysis of nitrate nitrogen based on UV absorption spectroscopy was proposed. The UV absorption spectra of 42 samples of nitrate nitrogen standard solutions with concentrations ranging from 0 to 20 mg·L-1 were collected, and each sample was averaged 11 times to reduce the influence of instrument noise and environment. The SPXY algorithm was used to divide the training set and test set according to the ratio of 7∶3, and the UV absorption spectra data were preprocessed using the Savitzky-Golay (SG) filtering algorithm. The appropriate regularization parameter λ=0.203 6 was obtained by 10-fold cross-validation with Lasso regression, and then the Lasso regression was used to filter out the correlations with nitrate nitrogen in the full spectral range. The spectral features associated with nitrate nitrogen were selected in the full spectral range using Lasso regression. The absorbance at the feature wavelength was fitted with the sample concentration by partial least squares (PLS) to establish the regression model for nitrate nitrogen. The R2 and RMSE of the training set of the model built using the modeling method proposed in this paper were 0.999 91 and 0.060 15, respectively, and the R2 and RMSE of the test set were 0.999 72 and 0.046 91, respectively. In order to verify the effect of the SG-Lasso-PLS prediction model proposed in this paper, additional Lasso-PLS, SG-PCA-PLS and SG-PCA-PLS were built. PLS and SG-PCA-SVR prediction models were compared. The validation results show that the R2 and RMSE of the prediction models established by SG-Lasso-PLS are better than those of the other three. It indicates that SG filtering can eliminate the spectral signal’s random noise and improve the model’s prediction accuracy. Compared with the PCA data dimensionality reduction algorithm, Lasso can achieve spectral feature selection and data dimensionality reduction in the full spectral range, which can effectively eliminate the redundant information of spectral data and improve the model’s prediction accuracy. Therefore, the hybrid SG-Lasso-PLS model proposed in this paper can quickly and accurately predict the nitrate nitrogen in water bodies. As a basic study of nitrate nitrogen concentration detection, it can provide an algorithmic reference for fast and pollution-free water quality online monitoring scenarios.

王金梅, 何适, 张航熙, 杨晨, 尹义同, 张莉, 郑培超. 基于SG-Lasso-PLS融合算法的水体硝酸盐氮紫外光谱检测研究[J]. 光谱学与光谱分析, 2023, 43(4): 1037. WANG Jin-mei, HE Shi, ZHANG Hang-xi, YANG Chen, YIN Yi-tong, ZHANG Li, ZHENG Pei-chao. Study on the Detection Method of Nitrate Nitrogen in Water Based on Ultraviolet Spectroscopy[J]. Spectroscopy and Spectral Analysis, 2023, 43(4): 1037.

关于本站 Cookie 的使用提示

中国光学期刊网使用基于 cookie 的技术来更好地为您提供各项服务,点击此处了解我们的隐私策略。 如您需继续使用本网站,请您授权我们使用本地 cookie 来保存部分信息。
全站搜索
您最值得信赖的光电行业旗舰网络服务平台!