-
对处于局部热平衡且不考虑自吸收效应的激发态离子,激光击穿光谱谱线强度可表示为:
$ {I_{k, i}} = F{C_s}\frac{{{A_{k, i}}{g_k}}}{{{U_s}(T)}}\exp \left( { - \frac{{{E_k}}}{{{k_{\rm{B}}}T}}} \right) $
(1) $ 令A = \frac{{{U_s}(T)}}{{F{A_{k, i}}{g_k}\exp \left( {\frac{{ - {E_k}}}{{{k_{\rm{B}}}T}}} \right)}} $
(2) 式中, k, i分别为跃迁谱线的上下能级;F为与光收集装置效率有关,与波长无关,同次实验测量中保持不变的实验参量;Cs为特征谱线对应的原子、离子浓度;Ak, i为特征谱线的跃迁几率;gk为上能级的简并度;Us(T)为发射元素s的配分函数;Ek为跃迁能级的上能级能量,kB为玻尔兹曼常数, 当等离子体满足局部热平衡时,温度T为常数。
将(2)式代入(1)式得:
$ {C_s} = A{I_{k, i}} $
(3) 根据(3)式可计算出样品中待测元素的浓度。但由于受到基体效应等影响,A在实验中很难确定,当不考虑自吸收效应时, 和Ik, i的关系可表达为:
$ {C_s} = a{I_{k, i}} $
(4) 式中, a为比例系数。结合(1)式~(4)式,并令I=Ik, i, 得:
$ {C_s} = \sum\limits_{i \in v} {{\partial _i}} {k_{{\mathop{\rm libs}\nolimits} }}\left( {{I_i}, I} \right) + b $
(5) 式中, v为支持向量集;$\partial $ i为拉格朗日乘子;klibs(Ii, I)为核函数;b为常数。
结合(4)式和(5)式得到激光诱导击穿光谱混合核函数:
$ {k_{{\rm{libs}}}}\left( {{I_i}, I} \right) = cI{I_i} + (1 - c)\exp \left( {\frac{{ - {{\left\| {I - {I_i}} \right\|}^2}}}{{2{g^2}}}} \right) $
(6) 式中, 混合核函数由两部分组成,前者为线性核函数cIIi,后者为径向核函数(radial kernel function, RBF)。支持向量机核函数常用来解决数据的非线性映射问题,大量的实验和数据表明,RBF径向核函数具有较高的拟合和预测精度,通常被选作为核函数进行研究。
支持向量机中对参量的调整在很大程度上决定着回归效果,所选择的径向核函数为内核函数,从而在复合肥中P元素定量分析回归模型中对参量的调整主要是惩罚系数c和核参量g[22-23]。由于本研究中复合肥样本较少,所以选取网格搜索法作为寻优方式,可能获得较好的预测结果。
-
在实验中引入相对误差er和绝对误差ea来衡量模型的预测结果的准确性。相对误差描叙模型预测含量值γ与实际值μ之间的一致程度,相对误差越小表明两者一致程度越高,绝对误差表示模型预测值γ与实际值μ之间具体差值,表示二者离散程度大小。公式如下:
$ {e_{\rm{r}}} = \left| {\frac{{\gamma - \mu }}{\mu }} \right| \times 100\% $
(7) $ {e_{\rm{a}}} = |\gamma - \mu | $
(8) 基于LIBS结合SVM对复合肥中P元素质量分数定量分析,采用网格搜索法寻优参量的相对误差和绝对误差。图 8和表 1为样本1号~43号训练集结果,图 9和表 2为样本44号~58号测试集结果。
Table 1. Prediction effect table of support vector machine model of training set
number
categoryactual mass
fraction/10-2SVM predictive
mass fraction/10-2ea/10-2 er/10-2 1 15.400 14.782 0.618 4.013 2 14.900 14.837 0.063 0.423 3 15.000 14.880 0.120 0.800 4 15.100 15.158 0.058 0.384 5 15.200 15.310 0.110 0.724 6 15.300 15.363 0.063 0.412 7 15.300 15.375 0.075 0.490 8 15.300 15.394 0.094 0.614 9 15.300 15.404 0.104 0.680 10 15.300 15.354 0.054 0.353 11 15.400 15.492 0.092 0.597 12 15.500 15.510 0.010 0.645 13 15.500 15.527 0.027 0.174 14 15.500 15.552 0.052 0.335 15 15.600 15.591 0.009 0.058 16 15.700 15.671 0.029 0.185 17 15.700 15.680 0.020 0.127 18 15.700 15.684 0.016 0.102 19 15.700 15.647 0.053 0.338 20 15.800 15.713 0.087 0.551 21 15.800 15.730 0.070 0.443 22 15.900 15.836 0.064 0.403 23 15.900 15.845 0.055 0.346 24 15.900 15.868 0.032 0.201 25 15.900 15.892 0.008 0.447 26 15.900 15.883 0.017 0.107 27 16.000 16.014 0.014 0.088 28 16.000 16.045 0.045 0.281 29 16.000 16.017 0.017 0.106 30 16.000 16.051 0.051 0.319 31 16.100 16.084 0.016 0.099 32 16.100 16.081 0.019 0.118 33 16.100 16.114 0.014 0.087 34 16.200 16.167 0.033 0.204 35 16.200 16.174 0.026 0.160 36 16.200 16.186 0.014 0.086 37 16.300 16.310 0.010 0.061 38 16.300 16.340 0.040 0.245 39 16.300 16.364 0.064 0.393 40 16.400 16.454 0.054 0.329 41 16.500 16.558 0.058 0.352 42 16.600 16.582 0.018 0.108 43 16.700 16.670 0.030 0.180 Table 2. Prediction effect table of support vector machine model of test set
number
categoryactual mass
fraction/10-2SVM predictive
mass fraction/10-2ea/10-2 er/10-2 44 15.100 15.193 0.093 0.616 45 15.200 15.272 0.072 0.047 46 15.300 15.386 0.086 0.562 47 15.400 15.645 0.245 1.591 48 15.500 15.542 0.042 0.271 49 15.600 15.611 0.011 0.071 50 15.700 15.678 0.022 0.140 51 15.800 15.719 0.081 0.513 52 15.900 15.880 0.020 0.126 53 16.000 16.027 0.027 0.169 54 16.100 16.104 0.004 0.025 55 16.200 16.180 0.020 0.123 56 16.300 16.327 0.027 0.166 57 16.400 16.396 0.004 0.024 58 16.500 16.524 0.024 0.145 由图 8中的训练集效果显示,除第1组误差较大外, SVM预测质量分数和实际值具有很好的拟合性,这证明了此模型可以用来快速检测复合肥中P元素质量分数。由图 9中的测试集效果再次显示,SVM预测值和实际值之间具有较好的一致性,较好地检测出P元素质量分数。由表 1、表 2经计算可得, 复合肥中P元素的支持向量机的训练集平均绝对误差5.9×10-4,最大绝对误差为6.18×10-3,平均相对误差为3.99×10-3,最大相对误差为4×10-2;测试集平均绝对误差5.6×10-4,最大绝对误差为2.45×10-3,平均相对误差为3.28×10-3,最大相对误差为1.59×10-2。
复合肥中磷元素的激光诱导击穿光谱定量分析
Quantitative analysis of phosphorus in compound fertilizer by laser induced breakdown spectroscopy
-
摘要: 为了在复合肥生产中对其成分进行快速检测, 达到指导生产的目的, 采用激光诱导击穿光谱技术(LIBS)与支持向量机(SVM)方法结合对复合肥中磷(P)元素进行定量分析。实验中选取磷元素的P Ⅰ 213.5nm, P Ⅰ 214.9nm和P Ⅰ 215.4nm 3条特征谱线对58个复合肥样品进行分析。采用随机选择法将58个样品划分为训练集(43个样本)和测试集(15个样本), 用网格搜索法对复合肥中P元素的定量分析模型进行参量寻优, 构建了SVM分析模型。结果表明, 所建立的训练集定标模型的相关系数R2=0.981, 说明训练集的参考值和预测值的相关性较高; 测试集中验证样本P元素的参考值与预测值的相关系数R2=0.992, 均方误差为4.95×10-5, 说明所构建的SVM模型的适用性较强; 训练集的平均绝对误差和相对误差分别为5.9×10-4和3.99×10-3; 测试集的平均绝对误差和相对误差分别为5.6×10-4和3.28×10-3。将SVM算法与LIBS技术结合可实现复合肥中磷元素的快速检测, 这为复合肥中元素含量快速检测提供了参考。Abstract: In order to detect its components rapidly in the production of compound fertilizer and guide the production, laser-induced breakdown spectroscopy (LIBS) and support vector machine (SVM) were used to quantitatively analyze phosphorus (P) in compound fertilizer. In the experiment, 58 compound fertilizer samples were analyzed by three characteristic spectra of PⅠ 213.5nm, PⅠ 214.9nm and PⅠ 215.4nm. 58 samples were divided into training set (43 samples) and test set (15 samples) by random selection method. The grid search method was used to optimize the parameters of the quantitative analysis model of P element in compound fertilizer. The SVM analysis model was constructed. The results show that, the correlation coefficient R2 of the calibration model of training set is 0.981. It shows that the correlation between the reference value and the predicted value of the training set is high. The correlation coefficient R2 between the reference value and the predicted value of phosphorus (P) in the samples is 0.992. The mean square error is 4.95×10-5. SVM model has strong applicability. The average absolute error and relative error of the training set are 5.9×10-4 and 3.99×10-3, respectively. The average absolute error and relative error of the test set are 5.6×10-4 and 3.28×10-3, respectively. The combination of SVM algorithm and LIBS technology can realize the rapid detection of phosphorus in compound fertilizer. This study provides a reference for rapid determination of element content in compound fertilizer.
-
Table 1. Prediction effect table of support vector machine model of training set
number
categoryactual mass
fraction/10-2SVM predictive
mass fraction/10-2ea/10-2 er/10-2 1 15.400 14.782 0.618 4.013 2 14.900 14.837 0.063 0.423 3 15.000 14.880 0.120 0.800 4 15.100 15.158 0.058 0.384 5 15.200 15.310 0.110 0.724 6 15.300 15.363 0.063 0.412 7 15.300 15.375 0.075 0.490 8 15.300 15.394 0.094 0.614 9 15.300 15.404 0.104 0.680 10 15.300 15.354 0.054 0.353 11 15.400 15.492 0.092 0.597 12 15.500 15.510 0.010 0.645 13 15.500 15.527 0.027 0.174 14 15.500 15.552 0.052 0.335 15 15.600 15.591 0.009 0.058 16 15.700 15.671 0.029 0.185 17 15.700 15.680 0.020 0.127 18 15.700 15.684 0.016 0.102 19 15.700 15.647 0.053 0.338 20 15.800 15.713 0.087 0.551 21 15.800 15.730 0.070 0.443 22 15.900 15.836 0.064 0.403 23 15.900 15.845 0.055 0.346 24 15.900 15.868 0.032 0.201 25 15.900 15.892 0.008 0.447 26 15.900 15.883 0.017 0.107 27 16.000 16.014 0.014 0.088 28 16.000 16.045 0.045 0.281 29 16.000 16.017 0.017 0.106 30 16.000 16.051 0.051 0.319 31 16.100 16.084 0.016 0.099 32 16.100 16.081 0.019 0.118 33 16.100 16.114 0.014 0.087 34 16.200 16.167 0.033 0.204 35 16.200 16.174 0.026 0.160 36 16.200 16.186 0.014 0.086 37 16.300 16.310 0.010 0.061 38 16.300 16.340 0.040 0.245 39 16.300 16.364 0.064 0.393 40 16.400 16.454 0.054 0.329 41 16.500 16.558 0.058 0.352 42 16.600 16.582 0.018 0.108 43 16.700 16.670 0.030 0.180 Table 2. Prediction effect table of support vector machine model of test set
number
categoryactual mass
fraction/10-2SVM predictive
mass fraction/10-2ea/10-2 er/10-2 44 15.100 15.193 0.093 0.616 45 15.200 15.272 0.072 0.047 46 15.300 15.386 0.086 0.562 47 15.400 15.645 0.245 1.591 48 15.500 15.542 0.042 0.271 49 15.600 15.611 0.011 0.071 50 15.700 15.678 0.022 0.140 51 15.800 15.719 0.081 0.513 52 15.900 15.880 0.020 0.126 53 16.000 16.027 0.027 0.169 54 16.100 16.104 0.004 0.025 55 16.200 16.180 0.020 0.123 56 16.300 16.327 0.027 0.166 57 16.400 16.396 0.004 0.024 58 16.500 16.524 0.024 0.145 -