Intelligent correction method for ultraviolet spectrum signal of seawater nitrate sensor
Through adaptive wavelet denoising and hybrid neural network model segmented fitting, combined with salinity credibility factor for temperature and salinity correction, the problem of inaccurate nitrate measurement caused by bromide ion interference in seawater was solved, and high-precision nitrate concentration measurement was achieved.
Patent Information
- Application Number
- CN202511006664.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-22
AI Technical Summary
In the existing technology, the absorption spectra of bromide ions and organic matter in seawater overlap with the nitrate spectrum in the ultraviolet band, which affects the accuracy of nitrate measurement, especially the poor temperature-salinity correction effect after 230nm.
An adaptive wavelet denoising algorithm was used to process the absorbance data. The local correlation and noise characteristics were extracted by combining 1D-CNN and wavelet transform. The molar extinction coefficient of bromide ion was fitted piecewise by a hybrid neural network model, and the salinity credibility factor was introduced for temperature and salinity correction.
The nitrate spectral data can be effectively separated, which improves the measurement accuracy and model fitting ability, and enables high-precision nitrate concentration measurement in extreme environments.
Smart Images

Figure CN120508734B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of measurement technology and relates to an intelligent correction method for ultraviolet spectrum signals of a seawater nitrate sensor. Background Art
[0002] Nitrate is one of the most important nutrients in marine ecosystems. Changes in its concentration have a profound impact on the growth and reproduction of marine organisms, as well as the energy flow and material circulation of the entire ecosystem. Therefore, accurately measuring nitrate concentrations in ocean waters is crucial for understanding the function and dynamics of marine ecosystems.
[0003] The principle of UV spectroscopy for nitrate measurement is based on the nitrate ion (NO3 - ) in the ultraviolet band (200-240 nm). By measuring the UV absorption spectrum of a water sample in this band using a UV light source and a spectral detector, nitrate concentration can be inferred through a series of calculations and modeling. Due to its rapidity, sensitivity, and non-destructive nature, UV spectroscopy is currently a commonly used method for seawater nitrate detection.
[0004] Since seawater contains substances such as bromide ions and organic matter, their absorption spectra overlap with the nitrate spectrum in the ultraviolet band, such as Figure 1 As shown, their UV absorption spectra will be affected by temperature, mainly bromide ions, which in turn affects the measurement accuracy of nitrate. The current temperature-salinity correction algorithm has a poor correction effect on the absorption spectrum after 230nm, mainly because the determination coefficient R of its fitting equation after 230nm is 2 The key to measuring seawater nitrate is to effectively separate the nitrate spectral data from the interference spectrum and perform temperature and salinity correction to determine the nitrate concentration. Therefore, it is urgent to design an intelligent temperature and salinity correction method for seawater nitrate sensors to solve this problem. Summary of the Invention
[0005] In order to solve the technical problems existing in the prior art, the present invention provides an intelligent correction method for the ultraviolet spectrum signal of a seawater nitrate sensor, comprising the following steps:
[0006] Step 1: Prepare several nitrate seawater solution samples with different concentrations and calculate the absorbance data of each sample at different temperatures;
[0007] Step 2: The absorbance data obtained in step 1 are preprocessed using the adaptive wavelet denoising algorithm. The processed data are recorded as ;
[0008] Step 3: Data within the wavelength range of 240-260nm Perform linear fitting to obtain a linear equation; the absorbance data obtained after baseline correction is , determined as the absorbance of bromide ions;
[0009] Step 4. Calculate the molar extinction coefficient of bromide ion , and calculate the natural logarithm of the molar extinction coefficient of bromide ion and temperature The linear relationship is:
[0010] ;
[0011] ;
[0012] Where, is the slope of the temperature response; is the optical path length, is salinity; is the calibration temperature;
[0013] Step 5: Interpolate and fit piecewise to get the fitting slope , and then To perform temperature correction:
[0014] ;
[0015] in, is the molar extinction coefficient of baseline-corrected low-nitrate seawater, that is, the molar extinction coefficient of bromide ion after baseline correction; is the temperature-corrected molar extinction coefficient of bromide ion;
[0016] Step 6: Using the Salinity Credibility Factor , after temperature correction in step 5 Perform salinity correction and finally obtain the bromide ion absorbance after temperature and salt correction :
[0017]
[0018] Preferably, in step 5, a series of evenly distributed wavelength points are generated in a wavelength range of 210nm-240nm with a step size of 0.5nm, and Interpolate to these wavelength points; extract through 1D-CNN and wavelet transform The local correlation and noise characteristics of Feature enhancement.
[0019] Preferably, in step 5, a hybrid model combined with a neural network is used to convert the slope The piecewise fitting is , specifically including:
[0020] (1) 210-230nm: Deep neural network dynamically generates polynomial coefficients and fits :
[0021] ;
[0022] ;
[0023] Among them, the coefficient Based on deep neural network Dynamic generation;
[0024] (2) 230-240nm: According to Trend adaptive selection of linear / nonlinear fitting model, fitting :
[0025] Linear fitting model:
[0026] ;
[0027] in, ,coefficient Extracted by CNN Local trends are determined;
[0028] Nonlinear fitting model:
[0029] ;
[0030] Among them, the coefficient , Based on deep neural network Dynamically generated.
[0031] Preferably, when When the fluctuation amplitude is greater than 0.1, the nonlinear fitting model is used; when When the fluctuation amplitude is ≤0.1, the linear fitting model is used.
[0032] Preferably, in step 6, the salinity credibility factor adopts the form of a Gaussian decay function:
[0033] ;
[0034] in, is the salinity reference value; is the scale parameter of natural variability in salinity; is the maximum attenuation amplitude;
[0035] Preferably, the salinity reference value is updated based on real-time measurement data :
[0036] ;
[0037] in, is the average salinity of the last 100 valid measurements, is the learning rate.
[0038] Preferably, the concentration of nitrate in the nitrate seawater solution sample prepared in step 1 is less than 0.1 µmol / kg.
[0039] The intelligent correction method for the ultraviolet spectral signal of the seawater nitrate sensor proposed in this invention can effectively solve problems such as bromide ion spectrum overlap interference, random noise, baseline interference and temperature-salinity interference, improve the fitting and prediction capabilities of the model, and provide a new solution for the rapid and accurate measurement of seawater nitrate concentration. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 Schematic diagram of the overlapping spectra of nitrate and bromide;
[0041] Figure 2 This is a flow chart of an intelligent calibration method for ultraviolet spectrum signals of a seawater nitrate sensor provided in an embodiment of the present invention;
[0042] Figure 3 The absorbance of the seawater solution (bromide ion) before calibration using the method of the present invention;
[0043] Figure 4 It is the absorbance of seawater solution (bromide ion) after correction using the method of the present invention. DETAILED DESCRIPTION
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the examples described are only some examples of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0045] Example 1 Intelligent calibration method for ultraviolet spectrum signal of seawater nitrate sensor, such as Figure 2 As shown, it includes the following steps:
[0046] 1. Prepare artificial seawater solution, each liter of artificial seawater solution contains 35 grams of sodium chloride and 70 grams of sodium bromide.
[0047] 2. Take a portion of the artificial seawater solution and add potassium nitrate to prepare a nitrate-artificial seawater standard solution. Each liter of nitrate-artificial seawater standard solution contains 1g of potassium nitrate.
[0048] 3. To evaluate the performance of this method, prepare nitrate sample solutions of varying concentrations. Transfer a certain volume of the nitrate-artificial seawater standard solution to a volumetric flask and dilute to 100 mL with artificial seawater:
[0049] ;
[0050] in, is the volume of the nitrate-artificial seawater standard solution to be taken (mL); For the The number of the solution represents the dilution multiple of the nitrate-artificial seawater standard solution. The maximum value is 20; The volume (mL) of the solution with the current number.
[0051] 4. Repeat step 3 above to prepare nitrate-artificial seawater solutions of different concentrations, so that the lowest nitrate concentration in the solution is 0.1 mg / L and the highest concentration is 2 mg / L, with a step size of 0.3 mg / L, for a total of 20 samples.
[0052] 5. Calculate the absorbance at each wavelength based on the absorption spectrum of the nitrate-artificial seawater solution:
[0053] The ultraviolet absorption spectrum of pure water was measured using a deuterium halogen lamp light source and a fiber optic spectrometer. The spectrometer has 2048 pixels and can record the light intensity data of 204 pixels in the wavelength range of 200nm to 260nm. The wavelength values corresponding to each pixel in the fiber optic spectrometer are recorded in ascending order as a series:
[0054] .
[0055] The intensity of light transmitted through pure water is recorded pixel by pixel as a series:
[0056] .
[0057] The UV absorption spectrum of the artificial seawater solution records the transmitted light intensity as a series in order from small to large wavelength:
[0058] .
[0059] Using pure water as a reference, calculate the absorbance at each wavelength one by one according to the Lambert-Beer law absorbance formula:
[0060] ;
[0061] in, is the wavelength The absorbance at is the wavelength The intensity of light transmitted by pure water at is the wavelength The transmitted light intensity of the artificial seawater solution at .
[0062] Record the absorbance data of artificial seawater solution as a series in the order of wavelength from small to large :
[0063] .
[0064] 6. Repeat step 5 to measure the UV absorption spectrum of the artificial seawater solution at different temperatures (0℃-30℃) and record the spectral intensity as a series:
[0065] ;
[0066] in, Indicates the temperature Lower wavelength The spectral intensity at is the temperature at the time of measurement, is the wavelength number.
[0067] Calculate the absorbance data of artificial seawater solution at different temperatures:
[0068] .
[0069] 7. Use adaptive wavelet denoising algorithm to Preprocessing is performed to dynamically adjust the denoising intensity according to the local characteristics of the signal, which can better retain the details and characteristics of the signal. The processed set of absorbance data is recorded as .
[0070] 8. Absorbance data within the wavelength range of 240-260nm Perform linear fitting and get the linear equation , is the slope of the linear equation, is the intercept.
[0071] After baseline correction, the data obtained after correction is , can be determined as the absorbance of bromide ions:
[0072] .
[0073] 9. Through the absorbance of bromide ions The molar extinction coefficient of bromide ion can be calculated :
[0074] ;
[0075] in, is the optical path length, which is 1 cm. For salinity.
[0076] 10. Molar extinction coefficient for bromide ion and temperature Statistical analysis was performed to observe the relationship between them and it was found that the natural logarithm of the molar extinction coefficient of bromide ion and temperature A linear relationship:
[0077] ;
[0078] in, is the calibration temperature, usually 20°C; is the slope of the temperature response.
[0079] 11. In the wavelength range of 210nm to 240nm, generate a series of evenly distributed wavelength points with a step size (interval) of 0.5nm and Interpolate to these wavelength points. Then extract through 1D-CNN and wavelet transform The local correlation and noise characteristics of Feature enhancement.
[0080] 12. Since after 230nm The fluctuation increases, so the present invention innovatively proposes a hybrid model combining neural networks to segmentally fit these slopes. , breaking through the limitations of traditional linear models.
[0081] (1) 210-230nm: Deep neural network dynamically generates polynomial coefficients and fits :
[0082] ;
[0083] ;
[0084] Among them, the coefficient Based on deep neural network Dynamically generated.
[0085] (2) 230-240nm: According to Trend adaptive selection of linear / nonlinear fitting model, fitting :
[0086] Linear fit (basic form):
[0087] ;
[0088] in, ,coefficient Extracted by CNN Local trends are determined.
[0089] Nonlinear fitting (high volatility scenario):
[0090] ;
[0091] Among them, the coefficient , Based on deep neural network Dynamically generated.
[0092] Determine whether to use the basic form or the high volatility scenario, mainly based on Judging by the fluctuation range in this range: When the fluctuation amplitude is greater than 0.1, it automatically switches to nonlinear fitting (high fluctuation scenario); when When the fluctuation amplitude is ≤0.1, linear fitting (basic form) is used.
[0093] (3) Boundary continuity constraint: ensure .
[0094] 13. Repeat step 12 several times to get The coefficients are: c0 = 1.46380e-02; c1 = 1.676600e-03; c2 = 2.91898e-05; c3 = 7.56395e-06; c4 = 1.27353e-07. Because The fluctuation range is ≤0.1, so Using linear fitting, , .
[0095] 14. Temperature correction:
[0096] ;
[0097] in, is the molar extinction coefficient of the artificial seawater solution after baseline correction, which can also be regarded as the molar extinction coefficient of bromide ion after baseline correction; is the temperature-corrected molar extinction coefficient of bromide ion.
[0098] 15. The present invention creatively introduces a salinity credibility factor , is a dynamic weight factor, , which is used to quantify the confidence level of salinity measurements.
[0099] Using the Gaussian decay function form:
[0100] ;
[0101] in, is the salinity reference value, usually set to 35.0, corresponding to standard seawater; is a scale parameter for the natural variation of salinity, controlling the decay rate and usually set to 2.0–3.0; is the maximum attenuation amplitude, usually set to 0.5, to ensure .
[0102] To improve environmental adaptability, the salinity baseline value is updated based on real-time measurement data. :
[0103] ;
[0104] in, is the average salinity of the last 100 valid measurements, is the learning rate (0.01-0.1).
[0105] 16. Salinity correction:
[0106] ;
[0107] in, The absorbance of artificial seawater solution (bromide ion) after temperature and salinity correction.
[0108] Example 2 Evaluation of the Intelligent Correction Method for Ultraviolet Spectral Signals of Seawater Nitrate Sensors Proposed in the Present Invention
[0109] The absorption spectrum data obtained by measuring nitrate-artificial seawater solution at different temperatures are recorded as :
[0110] ;
[0111] in, is the molar extinction coefficient of bromide ion, is the molar extinction coefficient of nitrate, is the nitrate concentration.
[0112] According to the above steps, wavelet denoising and baseline correction are first performed, and then temperature and salt correction and bromide ion interference removal are performed to obtain nitrate absorbance. :
[0113] .
[0114] Nitrate-artificial seawater solutions with different concentrations were measured repeatedly, and the root mean square error (RMSE) and mean absolute error (MAE) were used to evaluate the proposed method.
[0115] Root Mean Square Error (RMSE):
[0116] ;
[0117] Mean Absolute Error (MAE):
[0118] ;
[0119] in, is the sample size, is the corrected absorbance, is the absorbance before correction.
[0120] The root mean square error (RMSE) and mean absolute error (MAE) were used as evaluation criteria. The RMSE is an evaluation metric that measures the difference between model predictions and actual observations. It calculates the average of the squared differences between the predicted and actual values and is commonly used to evaluate the predictive performance of regression models. A smaller RMSE indicates a more accurate model. The mean absolute error (MAE) is a commonly used metric that measures the deviation between predicted and true values, reflecting the average level of correction error and demonstrating greater robustness to outliers. A smaller MAE indicates a higher model correction accuracy. The TCSS method, a temperature-salinity correction algorithm proposed by Sakamoto et al. in 2009, was compared with the method presented in this paper. The TCSS method primarily involves establishing a nonlinear model between bromide and temperature, using this model to correct bromide temperature; subtracting the bromide absorption contribution from salinity data; and fitting nitrate concentrations using the Beer-Lambert law. The final evaluation results are shown in Table 1.
[0121] Table 1 Evaluation results obtained by comparing the TCSS method with the method of the present invention
[0122] Mean Squared Error (RMSE) Mean Absolute Error (MAE) TCSS Method 0.018 0.015 Method of the present invention 0.010 0.008
[0123] According to the comparison in Table 1, the temperature-salinity correction method proposed in the present invention is more accurate than the TCSS method. Figure 3 and Figure 4 It can be seen that the temperature-salinity correction method proposed in the present invention can improve the measurement accuracy of nitrate.
[0124] This invention proposes an intelligent method for correcting the ultraviolet spectral signal of a seawater nitrate sensor. The modeling approach employed in this invention effectively improves the model's adaptability, enabling temperature-salinity correction in extreme environments (high salinity and high temperature), thereby enhancing measurement accuracy. The above are merely specific embodiments of the invention, but the scope of protection of the invention is not limited thereto. Any modifications or substitutions readily conceivable by those skilled in the art within the technical scope disclosed herein are intended to fall within the scope of protection of this invention. Therefore, the scope of protection of this invention shall be subject to the scope of protection of the claims.
Claims
1. An intelligent calibration method for ultraviolet spectrum signals of a seawater nitrate sensor, characterized in that: The following steps are involved: Step 1: Prepare several nitrate seawater solution samples with different concentrations and calculate the absorbance data of each sample at different temperatures; Step 2: The absorbance data obtained in step 1 are preprocessed using the adaptive wavelet denoising algorithm. The processed data are recorded as ; Step 3: Data within the wavelength range of 240-260nm Perform linear fitting to obtain a linear equation; the absorbance data obtained after baseline correction is , determined as the absorbance of bromide ions; Step 4. Calculate the molar extinction coefficient of bromide ion , and calculate the natural logarithm of the molar extinction coefficient of bromide ion and temperature The linear relationship is: ; ; Where, is the slope of the temperature response; is the optical path length, is salinity; is the calibration temperature; Step 5: Interpolate and fit piecewise to get the fitting slope , and then To perform temperature correction: ; in, is the molar extinction coefficient of baseline-corrected low-nitrate seawater, that is, the molar extinction coefficient of bromide ion after baseline correction; is the temperature-corrected molar extinction coefficient of bromide ion; Step 6: Using the Salinity Credibility Factor , after temperature correction in step 5 Perform salinity correction and finally obtain the bromide ion absorbance after temperature and salt correction : 。 2. The intelligent correction method for ultraviolet spectrum signal of seawater nitrate sensor according to claim 1, characterized in that: In step 5, a series of evenly distributed wavelength points are generated in the wavelength range of 210nm-240nm with a step size of 0.5nm, and Interpolate to these wavelength points; extract through 1D-CNN and wavelet transform The local correlation and noise characteristics of Feature enhancement.
3. The intelligent correction method for ultraviolet spectrum signal of seawater nitrate sensor according to claim 2, characterized in that: The slope is converted into The piecewise fitting is , specifically including: (1) 210-230nm: Deep neural network dynamically generates polynomial coefficients and fits : ; ; Among them, the coefficient Based on deep neural network Dynamic generation; (2) 230-240nm: According to Trend adaptive selection of linear / nonlinear fitting model, fitting : Linear fitting model: ; in, ,coefficient Extracted by CNN Local trends are determined; Nonlinear fitting model: ; Among them, the coefficient , Based on deep neural network Dynamically generated.
4. The intelligent correction method for ultraviolet spectrum signal of seawater nitrate sensor according to claim 3, characterized in that: when When the fluctuation amplitude is greater than 0.1, the nonlinear fitting model is used; when When the fluctuation amplitude is ≤0.1, the linear fitting model is used.
5. The intelligent correction method for ultraviolet spectrum signal of seawater nitrate sensor according to claim 1, characterized in that: In step 6, the salinity credibility factor adopts the form of Gaussian decay function: ; in, is the salinity reference value; is the scale parameter of natural variability in salinity; is the maximum attenuation amplitude.
6. The intelligent correction method for ultraviolet spectrum signal of seawater nitrate sensor according to claim 5, characterized in that: Update salinity reference value based on real-time measurement data : ; in is the average salinity of the last 100 valid measurements, is the learning rate.
7. The intelligent calibration method for ultraviolet spectrum signal of a seawater nitrate sensor according to any one of claims 1 to 6, characterized in that: In the nitrate seawater solution sample prepared in step 1, the concentration of nitrate is less than 0.1 µmol / kg.
Citation Information
Patent Citations
Spectroscopic seawater nitrate concentration detection method
CN111239071A
Near-shore complex seawater nitrate nitrogen multispectral measurement method
CN111766210A