[go: up one dir, main page]

CN118310984A - Quick measuring method for nitrite nitrogen in high salinity gradient environment by using spectrometry - Google Patents

Quick measuring method for nitrite nitrogen in high salinity gradient environment by using spectrometry Download PDF

Info

Publication number
CN118310984A
CN118310984A CN202410375505.XA CN202410375505A CN118310984A CN 118310984 A CN118310984 A CN 118310984A CN 202410375505 A CN202410375505 A CN 202410375505A CN 118310984 A CN118310984 A CN 118310984A
Authority
CN
China
Prior art keywords
nitrite nitrogen
absorbance
seawater
spectrum
turbidity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410375505.XA
Other languages
Chinese (zh)
Inventor
冯巍巍
梁星辉
孙珊
蔡宗岐
秦伟
王焕卿
赵玉庭
王立明
金晓杰
王佳莹
邱少男
杨剑炼
张辉
张立斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Oceanology of CAS
Yantai Institute of Coastal Zone Research of CAS
Shandong Marine Resource and Environment Research Institute
Original Assignee
Institute of Oceanology of CAS
Yantai Institute of Coastal Zone Research of CAS
Shandong Marine Resource and Environment Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Oceanology of CAS, Yantai Institute of Coastal Zone Research of CAS, Shandong Marine Resource and Environment Research Institute filed Critical Institute of Oceanology of CAS
Priority to CN202410375505.XA priority Critical patent/CN118310984A/en
Publication of CN118310984A publication Critical patent/CN118310984A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/3103Atomic absorption analysis

Landscapes

  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention relates to a rapid measurement method of nitrite nitrogen in seawater in a high salinity gradient environment by a spectrometry, which comprises the following steps: collecting ultraviolet visible absorption spectrum of a mixed solution of standard nitrate nitrogen and nitrite nitrogen, calculating absorbance and performing first-order differential treatment on the absorbance; screening out first-order differential spectrum data of a wave band required by model training in a wave band after 235nm by using a correlation coefficient search algorithm to form a training set; establishing an inversion model of the nitrite nitrogen concentration of the machine, and carrying out optimization training on model parameters by using a training set; and collecting an ultraviolet visible absorption spectrum of a seawater sample to be detected, calculating absorbance, subtracting turbidity interference, performing first-order differential treatment on the seawater sample, and inputting the seawater sample to be detected into a trained nitrite nitrogen concentration inversion model to obtain a nitrite nitrogen content prediction result. The method is suitable for the conditions of multi-salinity gradient of near-shore complex seawater and nitrate nitrogen interference, can rapidly determine the nitrite nitrogen content, and provides reference for instrument development.

Description

一种光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法A rapid measurement method for nitrite nitrogen in seawater with high salinity gradient using spectroscopy

技术领域Technical Field

本发明属于海水水质参数快速检测技术领域,涉及一种光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法。The invention belongs to the technical field of rapid detection of seawater quality parameters, and relates to a method for rapid measurement of nitrite nitrogen in seawater in a high-salinity gradient environment using a spectral method.

背景技术Background technique

亚硝酸盐氮是近岸海水中的一种重要氮源,它通常由硝化作用产生,在海洋生态系统中发挥着重要的生物地球化学作用。在某些环境条件下,如高浓度的污染物排放、水体富营养化和缺氧等,亚硝酸盐氮的积累和转化可能导致有害影响。对于水体中的亚硝酸盐氮浓度进行监测和控制是重要的环境保护和水质管理措施之一。Nitrite nitrogen is an important nitrogen source in coastal seawater. It is usually produced by nitrification and plays an important biogeochemical role in marine ecosystems. Under certain environmental conditions, such as high concentrations of pollutant emissions, eutrophication and hypoxia, the accumulation and transformation of nitrite nitrogen may lead to harmful effects. Monitoring and controlling the concentration of nitrite nitrogen in water bodies is one of the important environmental protection and water quality management measures.

传统方法使用萘乙二胺分光光度法进行海水亚硝酸盐氮测量,需配置显色剂,步骤繁琐,耗费时间长,还容易造成二次污染。吸收光谱法速度快,无试剂,但在紫外可见吸收光谱中,硝酸盐氮与亚硝酸盐氮的吸收峰存在交叠,给亚硝酸盐氮测量带来极大干扰。此外在近岸复杂海水中,盐度梯度变化范围大,多种溶解性有机物干扰等因素都会导致测量结果的模糊性。因此,需要考虑近岸复杂海水中多种干扰因素,以准确测量亚硝酸盐氮的浓度。The traditional method uses the naphthylethylenediamine spectrophotometry to measure nitrite nitrogen in seawater, which requires the preparation of a color developer, has cumbersome steps, is time-consuming, and is prone to secondary pollution. The absorption spectroscopy method is fast and reagent-free, but in the ultraviolet-visible absorption spectrum, the absorption peaks of nitrate nitrogen and nitrite nitrogen overlap, which greatly interferes with the measurement of nitrite nitrogen. In addition, in complex coastal seawater, the salinity gradient varies widely, and factors such as interference from multiple dissolved organic matter can lead to ambiguity in the measurement results. Therefore, it is necessary to consider a variety of interfering factors in complex coastal seawater to accurately measure the concentration of nitrite nitrogen.

发明内容Summary of the invention

为解决上述技术问题,本发明的目的是提供一种光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,基于紫外可见吸收光谱,使用一阶差分去除干扰,使用带相关系数搜索的多层感知机建模方法,可以快速测定亚硝酸盐氮含量。In order to solve the above technical problems, the purpose of the present invention is to provide a method for rapid measurement of nitrite nitrogen in seawater in a high-salinity gradient environment using a spectral method. Based on ultraviolet-visible absorption spectroscopy, the first-order difference is used to remove interference, and a multi-layer perceptron modeling method with correlation coefficient search is used to quickly determine the nitrite nitrogen content.

本发明提供一种光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,包括:The present invention provides a method for rapidly measuring nitrite nitrogen in seawater in a high-salinity gradient environment using a spectral method, comprising:

步骤1:采集标准硝酸盐氮与亚硝酸盐氮混合溶液的紫外可见吸收光谱,计算吸光度并对其进行一阶差分处理;Step 1: Collect the UV-visible absorption spectrum of the standard nitrate nitrogen and nitrite nitrogen mixed solution, calculate the absorbance and perform first-order difference processing on it;

步骤2:使用相关系数搜索算法在235nm以后的波段中筛选出模型训练所需波段的一阶差分光谱数据,构成训练集;Step 2: Use the correlation coefficient search algorithm to select the first-order difference spectral data of the band required for model training in the band after 235nm to form a training set;

步骤3:建立多层感知机亚硝酸盐氮浓度反演模型,并使用训练集进行模型参数的优化训练;Step 3: Establish a multi-layer perceptron nitrite nitrogen concentration inversion model and use the training set to optimize the model parameters;

步骤4:采集待测海水样品的紫外可见吸收光谱,计算吸光度、扣除浊度干扰后对其进行一阶差分处理,再输入到训练好的多层感知机亚硝酸盐氮浓度反演模型中,获得亚硝酸盐氮含量的预测结果。Step 4: Collect the UV-visible absorption spectrum of the seawater sample to be tested, calculate the absorbance, perform first-order difference processing on it after deducting turbidity interference, and then input it into the trained multi-layer perceptron nitrite nitrogen concentration inversion model to obtain the predicted result of nitrite nitrogen content.

进一步的,所述步骤1具体为:Furthermore, the step 1 is specifically as follows:

步骤1.1:配置多组硝酸盐氮与亚硝酸氮的混合溶液,采集紫外可见吸收光谱,使用朗伯比尔定律计算吸光度,使用Savitzky-Golay卷积平滑算法去除随机噪声;Step 1.1: Prepare multiple sets of mixed solutions of nitrate nitrogen and nitrite nitrogen, collect UV-visible absorption spectra, calculate the absorbance using the Lambert-Beer law, and use the Savitzky-Golay convolution smoothing algorithm to remove random noise;

步骤1.2:对去噪后的紫外可见吸收光谱的吸光度进行一阶差分处理。Step 1.2: Perform first-order difference processing on the absorbance of the denoised UV-visible absorption spectrum.

进一步的,所述步骤1.1中采用朗伯比尔定律计算吸光度具体为:Furthermore, the absorbance is calculated using the Lambert-Beer law in step 1.1 as follows:

其中,Aλ为波长λ处的吸光度值,I为波长λ处所测光强,Iw为波长λ处纯水光强,Id为波长λ处光谱仪暗光谱光强。Where is the absorbance value at wavelength λ, I is the measured light intensity at wavelength λ, Iw is the light intensity of pure water at wavelength λ, and Id is the dark spectrum intensity of the spectrometer at wavelength λ.

进一步的,所述步骤1.1中使用Savitzky-Golay卷积平滑算法去除随机噪声具体为:Furthermore, in step 1.1, the Savitzky-Golay convolution smoothing algorithm is used to remove random noise as follows:

使用Savitzky-Golay卷积平滑算法对滤波窗口内的吸光度数据进行拟合,窗口宽度采用5,多项式阶数采用2,移动步长采用1;The Savitzky-Golay convolution smoothing algorithm was used to fit the absorbance data within the filter window, with a window width of 5, a polynomial order of 2, and a moving step of 1;

使用的滤波算子为对于连续等间隔的5个吸光度值An-2,An-1,An,An+1和An+2进行如下去噪处理:The filter operator used is For five consecutive equally spaced absorbance values An-2 , An -1 , An , An+1 and An +2, the following denoising process is performed:

其中,An为光谱中序号为n的吸光度值,为去噪后光谱中序号为n的吸光度值。Where A n is the absorbance value of the sequence number n in the spectrum, is the absorbance value with serial number n in the denoised spectrum.

进一步的,所述步骤1.2具体为:Furthermore, the step 1.2 is specifically as follows:

其中,为去噪后光谱中序号为n的一阶差分光谱值,为去噪后光谱中序号为n的吸光度值,为去噪后光谱中序号为n-1的吸光度值。in, is the first-order difference spectrum value with sequence number n in the denoised spectrum, is the absorbance value of sequence number n in the denoised spectrum, is the absorbance value of sequence number n-1 in the denoised spectrum.

进一步的,所述步骤2具体为:计算235nm以后的波段中每个波长的一阶差分光谱值与浓度的皮尔逊相关系数,筛选出若干个相关性最强的波长的一阶差分光谱数据构成训练集;Furthermore, the step 2 is specifically as follows: calculating the Pearson correlation coefficient between the first-order difference spectrum value of each wavelength in the band after 235 nm and the concentration, and selecting the first-order difference spectrum data of several wavelengths with the strongest correlation to form a training set;

根据下式计算一阶差分光谱值与浓度的皮尔逊相关系数:The Pearson correlation coefficient between the first-order difference spectrum value and the concentration was calculated according to the following formula:

其中,为第i组标准样品混合溶液中波长λ处的去噪后的一阶差分光谱值,m为标准样品混合溶液的组数,为所有标准样品混合溶液中波长λ处的去噪后的一阶差分光谱值的平均值;为所有标准样品混合溶液的浓度的平均值,Ci为第i组标准样品混合溶液的浓度,p为一阶差分光谱值与浓度的相关系数,其绝对值大于0.8时视为相关性强,则筛选出相关性强的波段的一阶差分光谱数据构成训练集。in, is the denoised first-order difference spectrum value at wavelength λ in the i-th group of standard sample mixed solution, m is the number of groups of standard sample mixed solution, is the average value of the first-order difference spectrum after denoising at wavelength λ in all standard sample mixed solutions; is the average concentration of all standard sample mixed solutions, Ci is the concentration of the ith group of standard sample mixed solutions, and p is the correlation coefficient between the first-order difference spectrum value and the concentration. When its absolute value is greater than 0.8, it is considered to be strongly correlated. The first-order difference spectrum data of the bands with strong correlation are screened out to form the training set.

进一步的,所述步骤3具体为:Furthermore, the step 3 is specifically as follows:

建立多层感知机亚硝酸盐氮浓度反演模型,使用LeakyReLU激活函数,使用MSE损失函数,使用Adam优化算法进行优化;所述模型具体为:A multi-layer perceptron nitrite nitrogen concentration inversion model was established, using the LeakyReLU activation function, the MSE loss function, and the Adam optimization algorithm for optimization; the model is specifically as follows:

Cpre=H(H(EW1)W2)C pre =H(H(EW 1 )W 2 )

其中,Cpre为模型预测的亚硝酸盐氮浓度向量,E为输入的一阶差分光谱数据,W1和W2为模型的权重矩阵,H为LeakyReLU激活函数。Among them, Cpre is the nitrite nitrogen concentration vector predicted by the model, E is the input first-order difference spectral data, W1 and W2 are the weight matrices of the model, and H is the LeakyReLU activation function.

进一步的,所述步骤4具体为:Furthermore, the step 4 is specifically as follows:

步骤4.1:采集待测海水样品的紫外可见吸收光谱,计算吸光度,并进行平滑去噪处理;Step 4.1: Collect the UV-visible absorption spectrum of the seawater sample to be tested, calculate the absorbance, and perform smoothing and denoising;

步骤4.2:将平滑去噪处理的紫外可见吸收光谱的吸光度减去浊度干扰值,扣除浊度干扰;Step 4.2: subtract the turbidity interference value from the absorbance of the smoothed and denoised UV-visible absorption spectrum to deduct the turbidity interference;

步骤4.3:将扣除浊度干扰的吸光度进行一阶差分处理后输入到训练好的多层感知机亚硝酸盐氮浓度反演模型中,获得亚硝酸盐氮含量的预测结果。Step 4.3: After the absorbance after deducting the turbidity interference is processed by the first-order difference, it is input into the trained multi-layer perceptron nitrite nitrogen concentration inversion model to obtain the predicted result of nitrite nitrogen content.

进一步的,所述步骤4.2扣除浊度干扰具体为:Furthermore, the step 4.2 of deducting turbidity interference is specifically as follows:

步骤4.2.1:使用福尔马肼配置浊度标准溶液,共配置浓度梯度为0.1,0.2,0.4,0.6,0.8,1,2,3,4,5,6,7,8,9,10NTU共15个浊度标准溶液样本;Step 4.2.1: Use formazine to prepare turbidity standard solutions, with a total of 15 turbidity standard solution samples with concentration gradients of 0.1, 0.2, 0.4, 0.6, 0.8, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 NTU;

步骤4.2.2:选取每个浊度标准溶液样本中550nm为中心波长的5个波长的去噪后吸光度值组成矩阵Ftrain,每个浊度标准溶液样本的浊度值组成向量TSStrainStep 4.2.2: Select the denoised absorbance values of five wavelengths with 550 nm as the central wavelength in each turbidity standard solution sample to form a matrix F train , and the turbidity values of each turbidity standard solution sample to form a vector TSS train ;

步骤4.2.3:使用正规方程确定线性回归模型的系数M,公式如下:Step 4.2.3: Use the normal equation to determine the coefficients M of the linear regression model, as follows:

步骤4.2.4:选取待测海水样品550nm为中心波长的5个波长的去噪后吸光度值组成向量F,经下列公式计算获得预测浊度值:Step 4.2.4: Select the denoised absorbance values of the five wavelengths with 550nm as the central wavelength of the seawater sample to be tested to form a vector F, and calculate the predicted turbidity value using the following formula:

TSSpre=FMTSS pre = FM

其中,TSSpre为预测浊度值;Among them, TSS pre is the predicted turbidity value;

步骤4.2.5:记235~400nm处的预测吸光度值向量为Apre,拟合公式如下:Step 4.2.5: Let the predicted absorbance value vector at 235-400 nm be A pre , and the fitting formula is as follows:

Apre=K(TSSpre)+BA pre =K(TSS pre )+B

其中,Apre为预测的吸光度值向量,K与B为系数向量,通过浊度标准溶液进行拟合;Among them, A pre is the predicted absorbance value vector, K and B are coefficient vectors, and the fitting is performed through the turbidity standard solution;

步骤4.2.6:获取预测吸光度值向量Apre后,进行浊度干扰扣除,记去噪后吸收光谱235nm-400nm处的吸光度值向量为A,根据下公式扣除干扰:Step 4.2.6: After obtaining the predicted absorbance value vector A pre , perform turbidity interference subtraction. The absorbance value vector of the absorption spectrum at 235nm-400nm after denoising is recorded as A, and the interference is subtracted according to the following formula:

Aafter=A-Apre A after =AA before

其中,Aafter为扣除浊度干扰后的吸光度值向量。Among them, A after is the absorbance value vector after deducting turbidity interference.

本发明的一种光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,至少具有以下有益效果:The method for rapidly measuring nitrite nitrogen in seawater in a high-salinity gradient environment using a spectral method of the present invention has at least the following beneficial effects:

1、本发明的亚硝酸盐氮快速测量方法,基于一阶差分法与多层感知机,可以有效解决硝酸盐氮与亚硝酸盐氮光谱混叠干扰的问题,快速测定亚硝酸盐氮含量,节省人力物力成本,提高监测效率;1. The rapid measurement method of nitrite nitrogen of the present invention, based on the first-order difference method and the multi-layer perceptron, can effectively solve the problem of spectral aliasing interference between nitrate nitrogen and nitrite nitrogen, quickly determine the nitrite nitrogen content, save manpower and material costs, and improve monitoring efficiency;

2、本发明可解决近岸复杂海水中盐度变化范围大带来的溴离子与氯离子干扰难以准确扣除的问题,提高了光谱法测定亚硝酸盐氮的稳定性。2. The present invention can solve the problem that the interference of bromide ions and chloride ions caused by the wide range of salinity changes in complex nearshore seawater is difficult to accurately deduct, and improves the stability of nitrite nitrogen determination by spectrometry.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明的一种光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法的流程图。FIG1 is a flow chart of a method for rapidly measuring nitrite nitrogen in seawater in a high-salinity gradient environment using a spectral method according to the present invention.

具体实施方式Detailed ways

下面结合说明书附图对本发明作进一步阐述。The present invention will be further described below in conjunction with the accompanying drawings.

如图1所示,本发明的一种光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,包括:As shown in FIG1 , a method for rapidly measuring nitrite nitrogen in seawater in a high salinity gradient environment using a spectral method of the present invention comprises:

步骤1:采集标准硝酸盐氮与亚硝酸盐氮混合溶液的紫外可见吸收光谱,计算吸光度并对其进行一阶差分处理,所述步骤1具体为:Step 1: Collect the UV-visible absorption spectrum of the standard nitrate nitrogen and nitrite nitrogen mixed solution, calculate the absorbance and perform first-order difference processing on it. The specific steps of step 1 are:

步骤1.1:配置硝酸盐氮与亚硝酸氮的混合溶液,采集紫外可见吸收光谱,使用朗伯比尔定律计算吸光度,使用Savitzky-Golay卷积平滑算法去除随机噪声。Step 1.1: Prepare a mixed solution of nitrate nitrogen and nitrite nitrogen, collect UV-visible absorption spectra, calculate the absorbance using the Lambert-Beer law, and use the Savitzky-Golay convolution smoothing algorithm to remove random noise.

具体实施时,亚硝酸盐氮的标准物质采用亚硝酸钠,硝酸盐氮的标准物质采用硝酸钾,配置浓度表见表1。2因素7水平组合共计49组数据。In the specific implementation, sodium nitrite is used as the standard substance for nitrite nitrogen, and potassium nitrate is used as the standard substance for nitrate nitrogen. The configuration concentration table is shown in Table 1. There are a total of 49 sets of data for the 2 factor 7 level combination.

表1硝酸盐氮与亚硝酸盐氮定标溶液样品浓度表Table 1 Nitrate nitrogen and nitrite nitrogen calibration solution sample concentration table

具体实施时,紫外可见吸收光谱的范围为210-710nm,间隔为0.625nm,共800个数据点。In a specific implementation, the range of the UV-visible absorption spectrum is 210-710 nm, the interval is 0.625 nm, and there are 800 data points in total.

具体实施时,采用朗伯比尔定律计算吸光度具体为:In specific implementation, the absorbance is calculated using the Lambert-Beer law as follows:

其中,Aλ为波长λ处的吸光度值,I为波长λ处所测光强,Iw为波长λ处纯水光强,Id为波长λ处光谱仪暗光谱光强。Where is the absorbance value at wavelength λ, I is the measured light intensity at wavelength λ, Iw is the light intensity of pure water at wavelength λ, and Id is the dark spectrum intensity of the spectrometer at wavelength λ.

具体实施时,使用Savitzky-Golay卷积平滑算法去除随机噪声具体为:In specific implementation, the Savitzky-Golay convolution smoothing algorithm is used to remove random noise as follows:

使用Savitzky-Golay卷积平滑算法对滤波窗口内的吸光度数据进行拟合,窗口宽度采用5,多项式阶数采用2,移动步长采用1;The Savitzky-Golay convolution smoothing algorithm was used to fit the absorbance data within the filter window, with a window width of 5, a polynomial order of 2, and a moving step of 1;

使用的滤波算子为对于连续等间隔的5个吸光度值An-2,An-1,An,An+1和An+2进行如下去噪处理:The filter operator used is For five consecutive equally spaced absorbance values An-2 , An -1 , An , An+1 and An +2, the following denoising process is performed:

其中,An为光谱中序号为n的吸光度值,为去噪后光谱中序号为n的吸光度值。Where A n is the absorbance value of the sequence number n in the spectrum, is the absorbance value with serial number n in the denoised spectrum.

步骤1.2:对去噪后的紫外可见吸收光谱的吸光度进行一阶差分处理,所述步骤1.2具体根据下式进行一阶差分处理:Step 1.2: Perform first-order difference processing on the absorbance of the denoised UV-visible absorption spectrum. The step 1.2 specifically performs first-order difference processing according to the following formula:

其中,为去噪后光谱中序号为n的一阶差分光谱值,为去噪后光谱中序号为n的吸光度值,为去噪后光谱中序号为n-1的吸光度值。in, is the first-order difference spectrum value with sequence number n in the denoised spectrum, is the absorbance value of sequence number n in the denoised spectrum, is the absorbance value of sequence number n-1 in the denoised spectrum.

步骤2:使用相关系数搜索算法在235nm以后的波段中筛选出模型训练所需波段的一阶差分光谱数据,构成训练集,所述步骤2具体为:Step 2: Use the correlation coefficient search algorithm to select the first-order difference spectral data of the band required for model training in the band after 235nm to form a training set. The specific steps of step 2 are as follows:

计算235nm以后的波段中每个波长的一阶差分光谱值与浓度的皮尔逊相关系数,筛选出若干个相关性最强的波段的一阶差分光谱数据构成训练集。The Pearson correlation coefficient between the first-order difference spectral value and the concentration at each wavelength in the band after 235 nm was calculated, and the first-order difference spectral data of several bands with the strongest correlation were selected to form a training set.

根据下式计算一阶差分光谱值与浓度的皮尔逊相关系数:The Pearson correlation coefficient between the first-order difference spectrum value and the concentration was calculated according to the following formula:

其中,为第i组标准样品混合溶液中波长λ处的去噪后的一阶差分光谱值,m为标准样品混合溶液的组数,为所有标准样品混合溶液中波长λ处的去噪后的一阶差分光谱值的平均值;为所有标准样品混合溶液的浓度的平均值,Ci为第i组标准样品混合溶液的浓度,p为一阶差分光谱值与浓度的相关系数,其绝对值大于0.8时视为相关性强,则筛选出相关性强的波段的一阶差分光谱数据构成训练集。in, is the denoised first-order difference spectrum value at wavelength λ in the i-th group of standard sample mixed solution, m is the number of groups of standard sample mixed solution, is the average value of the first-order difference spectrum after denoising at wavelength λ in all standard sample mixed solutions; is the average concentration of all standard sample mixed solutions, Ci is the concentration of the ith group of standard sample mixed solutions, and p is the correlation coefficient between the first-order difference spectrum value and the concentration. When its absolute value is greater than 0.8, it is considered to be strongly correlated. The first-order difference spectrum data of the bands with strong correlation are screened out to form the training set.

步骤3:建立多层感知机亚硝酸盐氮浓度反演模型,并使用训练集进行模型参数的优化训练,所述步骤3具体为:Step 3: Establish a multi-layer perceptron nitrite nitrogen concentration inversion model, and use the training set to optimize the model parameters. Step 3 is specifically as follows:

建立多层感知机亚硝酸盐氮浓度反演模型,使用LeakyReLU激活函数,使用MSE损失函数,使用Adam优化算法进行优化;所述模型具体为:A multi-layer perceptron nitrite nitrogen concentration inversion model was established, using the LeakyReLU activation function, the MSE loss function, and the Adam optimization algorithm for optimization; the model is specifically as follows:

Cpre=H(H(EW1)W2)C pre =H(H(EW 1 )W 2 )

其中,Cpre为模型预测的亚硝酸盐氮浓度向量,E为输入的一阶差分光谱数据,W1和W2为模型的权重矩阵,H为LeakyReLU激活函数。Among them, Cpre is the nitrite nitrogen concentration vector predicted by the model, E is the input first-order difference spectral data, W1 and W2 are the weight matrices of the model, and H is the LeakyReLU activation function.

步骤4:采集待测海水样品的紫外可见吸收光谱,计算吸光度、扣除浊度干扰后对其进行一阶差分处理,再输入到训练好的多层感知机亚硝酸盐氮浓度反演模型中,获得亚硝酸盐氮含量的预测结果,所述步骤4具体为:Step 4: Collect the UV-visible absorption spectrum of the seawater sample to be tested, calculate the absorbance, perform first-order difference processing on it after deducting the turbidity interference, and then input it into the trained multi-layer perceptron nitrite nitrogen concentration inversion model to obtain the prediction result of nitrite nitrogen content. The specific step 4 is:

步骤4.1:采集待测海水样品的紫外可见吸收光谱,计算吸光度,并进行平滑去噪处理;具体操作过程与步骤1相同。Step 4.1: Collect the UV-visible absorption spectrum of the seawater sample to be tested, calculate the absorbance, and perform smoothing and denoising. The specific operation process is the same as step 1.

步骤4.2:将平滑去噪处理的紫外可见吸收光谱的吸光度减去浊度干扰值,扣除浊度干扰,具体为:Step 4.2: Subtract the turbidity interference value from the absorbance of the smoothed and denoised UV-visible absorption spectrum to deduct the turbidity interference, specifically:

步骤4.2.1:使用福尔马肼配置浊度标准溶液,共配置浓度梯度为0.1,0.2,0.4,0.6,0.8,1,2,3,4,5,6,7,8,9,10NTU共15个浊度标准溶液样本。Step 4.2.1: Use formazine to prepare turbidity standard solutions. A total of 15 turbidity standard solution samples with concentration gradients of 0.1, 0.2, 0.4, 0.6, 0.8, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 NTU were prepared.

步骤4.2.2:选取每个浊度标准溶液样本中550nm为中心波长的5个波长的去噪后吸光度值组成矩阵Ftrain,每个浊度标准溶液样本的浊度值组成向量TSStrainStep 4.2.2: Select the denoised absorbance values of five wavelengths with 550 nm as the central wavelength in each turbidity standard solution sample to form a matrix F train , and the turbidity values of each turbidity standard solution sample to form a vector TSS train .

步骤4.2.3:使用正规方程确定线性回归模型的系数M,公式如下:Step 4.2.3: Use the normal equation to determine the coefficients M of the linear regression model, as follows:

步骤4.2.4:选取待测海水样品550nm为中心波长的5个波长的去噪后吸光度值组成向量F,经下列公式计算获得预测浊度值:Step 4.2.4: Select the denoised absorbance values of the five wavelengths with 550nm as the central wavelength of the seawater sample to be tested to form a vector F, and calculate the predicted turbidity value using the following formula:

TSSpre=FMTSS pre = FM

其中,TSSpre为预测浊度值。Among them, TSS pre is the predicted turbidity value.

步骤4.2.5:记235~400nm处的预测吸光度值向量为Apre,拟合公式如下:Step 4.2.5: Let the predicted absorbance value vector at 235-400 nm be A pre , and the fitting formula is as follows:

Apre=K(TSSpre)+BA pre =K(TSS pre )+B

其中,Apre为预测的吸光度值向量,K与B为系数向量,通过浊度标准溶液进行拟合。Among them, A pre is the predicted absorbance value vector, K and B are coefficient vectors, and fitting is performed through the turbidity standard solution.

步骤4.2.6:获取预测吸光度值向量Apre后,进行浊度干扰扣除,记去噪后吸收光谱235nm-400nm处的吸光度值向量为A,根据下公式扣除干扰:Step 4.2.6: After obtaining the predicted absorbance value vector A pre , perform turbidity interference subtraction. The absorbance value vector of the absorption spectrum at 235nm-400nm after denoising is recorded as A, and the interference is subtracted according to the following formula:

Aafter=A-Apre A after =AA before

其中,Aafter为扣除浊度干扰后的吸光度值向量。Among them, A after is the absorbance value vector after deducting turbidity interference.

步骤4.3:将扣除浊度干扰的吸光度进行一阶差分处理后输入到训练好的多层感知机亚硝酸盐氮浓度反演模型中,获得亚硝酸盐氮含量的预测结果。一阶差分处理过程与步骤1中相应部分相同。Step 4.3: After the absorbance after deducting the turbidity interference is processed by first-order difference, it is input into the trained multi-layer perceptron nitrite nitrogen concentration inversion model to obtain the prediction result of nitrite nitrogen content. The first-order difference processing process is the same as the corresponding part in step 1.

以上所述仅为本发明的较佳实施例,并不用以限制本发明的思想,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention and is not intended to limit the concept of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1.一种光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,包括:1. A method for rapid measurement of nitrite nitrogen in seawater in a high salinity gradient environment using a spectral method, characterized by comprising: 步骤1:采集标准硝酸盐氮与亚硝酸盐氮混合溶液的紫外可见吸收光谱,计算吸光度并对其进行一阶差分处理;Step 1: Collect the UV-visible absorption spectrum of the standard nitrate nitrogen and nitrite nitrogen mixed solution, calculate the absorbance and perform first-order difference processing on it; 步骤2:使用相关系数搜索算法在235nm以后的波段中筛选出模型训练所需波段的一阶差分光谱数据,构成训练集;Step 2: Use the correlation coefficient search algorithm to select the first-order difference spectral data of the band required for model training in the band after 235nm to form a training set; 步骤3:建立多层感知机亚硝酸盐氮浓度反演模型,并使用训练集进行模型参数的优化训练;Step 3: Establish a multi-layer perceptron nitrite nitrogen concentration inversion model and use the training set to optimize the model parameters; 步骤4:采集待测海水样品的紫外可见吸收光谱,计算吸光度、扣除浊度干扰后对其进行一阶差分处理,再输入到训练好的多层感知机亚硝酸盐氮浓度反演模型中,获得亚硝酸盐氮含量的预测结果。Step 4: Collect the UV-visible absorption spectrum of the seawater sample to be tested, calculate the absorbance, perform first-order difference processing on it after deducting turbidity interference, and then input it into the trained multi-layer perceptron nitrite nitrogen concentration inversion model to obtain the predicted result of nitrite nitrogen content. 2.如权利要求1所述的光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,所述步骤1具体为:2. The method for rapid measurement of nitrite nitrogen in seawater in a high salinity gradient environment using spectroscopy as claimed in claim 1, wherein step 1 is specifically as follows: 步骤1.1:配置多组硝酸盐氮与亚硝酸氮的混合溶液,采集紫外可见吸收光谱,使用朗伯比尔定律计算吸光度,使用Savitzky-Golay卷积平滑算法去除随机噪声;Step 1.1: Prepare multiple sets of mixed solutions of nitrate nitrogen and nitrite nitrogen, collect UV-visible absorption spectra, calculate the absorbance using the Lambert-Beer law, and use the Savitzky-Golay convolution smoothing algorithm to remove random noise; 步骤1.2:对去噪后的紫外可见吸收光谱的吸光度进行一阶差分处理。Step 1.2: Perform first-order difference processing on the absorbance of the denoised UV-visible absorption spectrum. 3.如权利要求1所述的光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,所述步骤1.1中采用朗伯比尔定律计算吸光度具体为:3. The method for rapid measurement of nitrite nitrogen in seawater in a high-salinity gradient environment using spectroscopy as claimed in claim 1, characterized in that the absorbance calculated using the Lambert-Beer law in step 1.1 is specifically: 其中,Aλ为波长λ处的吸光度值,I为波长λ处所测光强,Iw为波长λ处纯水光强,Id为波长λ处光谱仪暗光谱光强。Where is the absorbance value at wavelength λ, I is the measured light intensity at wavelength λ, Iw is the light intensity of pure water at wavelength λ, and Id is the dark spectrum intensity of the spectrometer at wavelength λ. 4.如权利要求1所述的光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,所述步骤1.1中使用Savitzky-Golay卷积平滑算法去除随机噪声具体为:4. The method for rapid measurement of nitrite nitrogen in seawater in a high-salinity gradient environment using spectroscopy as claimed in claim 1, characterized in that the Savitzky-Golay convolution smoothing algorithm is used to remove random noise in step 1.1: 使用Savitzky-Golay卷积平滑算法对滤波窗口内的吸光度数据进行拟合,窗口宽度采用5,多项式阶数采用2,移动步长采用1;The Savitzky-Golay convolution smoothing algorithm was used to fit the absorbance data within the filter window, with a window width of 5, a polynomial order of 2, and a moving step of 1; 使用的滤波算子为对于连续等间隔的5个吸光度值An-2,An-1,An,An+1和An+2进行如下去噪处理:The filter operator used is For five consecutive equally spaced absorbance values An-2 , An -1 , An , An+1 and An +2, the following denoising process is performed: 其中,An为光谱中序号为n的吸光度值,为去噪后光谱中序号为n的吸光度值。Where A n is the absorbance value of the sequence number n in the spectrum, is the absorbance value with serial number n in the denoised spectrum. 5.如权利要求4所述的光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,所述步骤1.2具体为:5. The method for rapid measurement of nitrite nitrogen in seawater in a high salinity gradient environment using spectroscopy as claimed in claim 4, wherein step 1.2 is specifically as follows: 其中,为去噪后光谱中序号为n的一阶差分光谱值,为去噪后光谱中序号为n的吸光度值,为去噪后光谱中序号为n-1的吸光度值。in, is the first-order difference spectrum value with sequence number n in the denoised spectrum, is the absorbance value of sequence number n in the denoised spectrum, is the absorbance value of sequence number n-1 in the denoised spectrum. 6.如权利要求1所述的光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,所述步骤2具体为:计算235nm以后的波段中每个波长的一阶差分光谱值与浓度的皮尔逊相关系数,筛选出若干个相关性最强的波长的一阶差分光谱数据构成训练集;6. The method for rapid measurement of nitrite nitrogen in seawater in a high-salinity gradient environment using spectroscopy as claimed in claim 1, characterized in that the step 2 specifically comprises: calculating the Pearson correlation coefficient between the first-order difference spectral value and the concentration at each wavelength in the band after 235 nm, and selecting the first-order difference spectral data of several wavelengths with the strongest correlation to form a training set; 根据下式计算一阶差分光谱值与浓度的皮尔逊相关系数:The Pearson correlation coefficient between the first-order difference spectrum value and the concentration was calculated according to the following formula: 其中,为第i组标准样品混合溶液中波长λ处的去噪后的一阶差分光谱值,m为标准样品混合溶液的组数,为所有标准样品混合溶液中波长λ处的去噪后的一阶差分光谱值的平均值;为所有标准样品混合溶液的浓度的平均值,Ci为第i组标准样品混合溶液的浓度,p为一阶差分光谱值与浓度的相关系数,其绝对值大于0.8时视为相关性强,则筛选出相关性强的波段的一阶差分光谱数据构成训练集。in, is the denoised first-order difference spectrum value at wavelength λ in the i-th group of standard sample mixed solution, m is the number of groups of standard sample mixed solution, is the average value of the first-order difference spectrum after denoising at wavelength λ in all standard sample mixed solutions; is the average concentration of all standard sample mixed solutions, Ci is the concentration of the ith group of standard sample mixed solutions, and p is the correlation coefficient between the first-order difference spectrum value and the concentration. When its absolute value is greater than 0.8, it is considered to be strongly correlated. The first-order difference spectrum data of the bands with strong correlation are screened out to form the training set. 7.如权利要求1所述的光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,所述步骤3具体为:7. The method for rapid measurement of nitrite nitrogen in seawater in a high salinity gradient environment using spectroscopy as claimed in claim 1, wherein step 3 is specifically: 建立多层感知机亚硝酸盐氮浓度反演模型,使用LeakyReLU激活函数,使用MSE损失函数,使用Adam优化算法进行优化;所述模型具体为:A multi-layer perceptron nitrite nitrogen concentration inversion model was established, using the LeakyReLU activation function, the MSE loss function, and the Adam optimization algorithm for optimization; the model is specifically as follows: Cpre=H(H(EW1)W2)C pre =H(H(EW 1 )W 2 ) 其中,Cpre为模型预测的亚硝酸盐氮浓度向量,E为输入的一阶差分光谱数据,W1和W2为模型的权重矩阵,H为LeakyReLU激活函数。Among them, Cpre is the nitrite nitrogen concentration vector predicted by the model, E is the input first-order difference spectral data, W1 and W2 are the weight matrices of the model, and H is the LeakyReLU activation function. 8.如权利要求1所述的光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,所述步骤4具体为:8. The method for rapid measurement of nitrite nitrogen in seawater in a high salinity gradient environment using spectroscopy as claimed in claim 1, wherein step 4 is specifically: 步骤4.1:采集待测海水样品的紫外可见吸收光谱,计算吸光度,并进行平滑去噪处理;Step 4.1: Collect the UV-visible absorption spectrum of the seawater sample to be tested, calculate the absorbance, and perform smoothing and denoising; 步骤4.2:将平滑去噪处理的紫外可见吸收光谱的吸光度减去浊度干扰值,扣除浊度干扰;Step 4.2: Subtract the turbidity interference value from the absorbance of the smoothed and denoised UV-visible absorption spectrum to deduct the turbidity interference; 步骤4.3:将扣除浊度干扰的吸光度进行一阶差分处理后输入到训练好的多层感知机亚硝酸盐氮浓度反演模型中,获得亚硝酸盐氮含量的预测结果。Step 4.3: After the absorbance after deducting the turbidity interference is processed by the first-order difference, it is input into the trained multi-layer perceptron nitrite nitrogen concentration inversion model to obtain the predicted result of nitrite nitrogen content. 9.如权利要求8所述的光谱法高盐度梯度环境海水亚硝酸盐氮快速测量方法,其特征在于,所述步骤4.2扣除浊度干扰具体为:9. The method for rapid measurement of nitrite nitrogen in seawater in a high-salinity gradient environment using spectroscopy as claimed in claim 8, wherein the step 4.2 of deducting turbidity interference is specifically as follows: 步骤4.2.1:使用福尔马肼配置浊度标准溶液,共配置浓度梯度为0.1,0.2,0.4,0.6,0.8,1,2,3,4,5,6,7,8,9,10NTU共15个浊度标准溶液样本;Step 4.2.1: Use formazine to prepare turbidity standard solutions, with a total of 15 turbidity standard solution samples with concentration gradients of 0.1, 0.2, 0.4, 0.6, 0.8, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 NTU; 步骤4.2.2:选取每个浊度标准溶液样本中550nm为中心波长的5个波长的去噪后吸光度值组成矩阵Ftrain,每个浊度标准溶液样本的浊度值组成向量TSStrainStep 4.2.2: Select the denoised absorbance values of five wavelengths with 550 nm as the central wavelength in each turbidity standard solution sample to form a matrix F train , and the turbidity values of each turbidity standard solution sample to form a vector TSS train ; 步骤4.2.3:使用正规方程确定线性回归模型的系数M,公式如下:Step 4.2.3: Use the normal equation to determine the coefficients M of the linear regression model, as follows: 步骤4.2.4:选取待测海水样品550nm为中心波长的5个波长的去噪后吸光度值组成向量F,经下列公式计算获得预测浊度值:Step 4.2.4: Select the denoised absorbance values of the five wavelengths with 550nm as the central wavelength of the seawater sample to be tested to form a vector F, and calculate the predicted turbidity value using the following formula: TSSpre=FMTSS pre = FM 其中,TSSpre为预测浊度值;Among them, TSS pre is the predicted turbidity value; 步骤4.2.5:记235~400nm处的预测吸光度值向量为Apre,拟合公式如下:Step 4.2.5: Let the predicted absorbance value vector at 235-400 nm be A pre , and the fitting formula is as follows: Apre=K(TSSpre)+BA pre =K(TSS pre )+B 其中,Apre为预测的吸光度值向量,K与B为系数向量,通过浊度标准溶液进行拟合;Among them, A pre is the predicted absorbance value vector, K and B are coefficient vectors, and the fitting is performed through the turbidity standard solution; 步骤4.2.6:获取预测吸光度值向量Apre后,进行浊度干扰扣除,记去噪后吸收光谱235nm-400nm处的吸光度值向量为A,根据下公式扣除干扰:Step 4.2.6: After obtaining the predicted absorbance value vector A pre , perform turbidity interference subtraction. The absorbance value vector of the absorption spectrum at 235nm-400nm after denoising is recorded as A, and the interference is subtracted according to the following formula: Aafter=A-Apre A after =AA before 其中,Aafter为扣除浊度干扰后的吸光度值向量。Among them, A after is the absorbance value vector after deducting turbidity interference.
CN202410375505.XA 2024-03-29 2024-03-29 Quick measuring method for nitrite nitrogen in high salinity gradient environment by using spectrometry Pending CN118310984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410375505.XA CN118310984A (en) 2024-03-29 2024-03-29 Quick measuring method for nitrite nitrogen in high salinity gradient environment by using spectrometry

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410375505.XA CN118310984A (en) 2024-03-29 2024-03-29 Quick measuring method for nitrite nitrogen in high salinity gradient environment by using spectrometry

Publications (1)

Publication Number Publication Date
CN118310984A true CN118310984A (en) 2024-07-09

Family

ID=91721594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410375505.XA Pending CN118310984A (en) 2024-03-29 2024-03-29 Quick measuring method for nitrite nitrogen in high salinity gradient environment by using spectrometry

Country Status (1)

Country Link
CN (1) CN118310984A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119438109A (en) * 2025-01-13 2025-02-14 浙江大学 Water quality multi-parameter detection method and system based on ultraviolet-visible light spectrum method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119438109A (en) * 2025-01-13 2025-02-14 浙江大学 Water quality multi-parameter detection method and system based on ultraviolet-visible light spectrum method

Similar Documents

Publication Publication Date Title
CN111157476B (en) A Quantitative Inversion Method of Water Quality Multi-parameter UV-Vis Absorption Spectrum
CN111239071B (en) Method for detecting concentration of nitrate in seawater by spectrometry
CN109187392B (en) Zinc liquid trace metal ion concentration prediction method based on partition modeling
CN110031413B (en) A kind of detection method of polymetallic ion concentration in solution
CN118310984A (en) Quick measuring method for nitrite nitrogen in high salinity gradient environment by using spectrometry
CN113484257B (en) Water quality concentration calculating system and method based on neural network and full spectrum absorbance
CN103543132B (en) A kind of coal characteristic measuring method based on wavelet transformation
CN114166769A (en) Ultraviolet-visible spectrum water quality multi-parameter monitoring system
CN106153561A (en) The many metal ion inspections of uv-vis spectra based on wavelength screening
CN112504983A (en) Nitrate concentration prediction method based on turbidity chromaticity compensation
CN107796777A (en) A kind of data processing method of low concentration ultraviolet difference gas analyzer
CN111855608A (en) A near-infrared non-destructive testing method for apple acidity based on fusion feature wavelength selection algorithm
CN108956584B (en) A rapid and accurate detection method for heavy metal element chromium in mulberry
CN103134763B (en) The method of oil density is predicted by infrared spectrum
Zhou et al. Detection of chemical oxygen demand in water based on UV absorption spectroscopy and PSO-LSSVM algorithm
CN102262055B (en) A method for measuring the residual amount of acrylamide monomer in polyacrylamide substances
CN117368132B (en) Malodorous gas detection method and device and computer equipment
Dong et al. Effective correction of dissolved organic carbon interference in nitrate detection using ultraviolet spectroscopy combined with the equivalent concentration offset method
CN117607077A (en) Edge calculation-based method for simultaneously monitoring chemical oxygen demand and nitrate nitrogen
CN112014344A (en) Online sewage monitoring method
CN115656058B (en) A method for measuring NO2 concentration based on DOAS
CN105223166A (en) A kind of based on contents of many kinds of heavy metal ion Simultaneously test method in the water of film enrichment-near infrared spectrum
TW201124712A (en) A method for measuring the property of the suspended solids and other substances in the fluid
CN104990889A (en) Method for rapidly determining concentration of inorganic salt nitrogen in shortcut nitrification-denitrification through near infrared spectroscopy
CN103134762B (en) The method of crude oil nitrogen content is predicted by infrared spectrum

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination