CN110568144B - Temperature compensation method for ammonia nitrogen detection - Google Patents

Temperature compensation method for ammonia nitrogen detection Download PDF

Info

Publication number
CN110568144B
CN110568144B CN201910931224.7A CN201910931224A CN110568144B CN 110568144 B CN110568144 B CN 110568144B CN 201910931224 A CN201910931224 A CN 201910931224A CN 110568144 B CN110568144 B CN 110568144B
Authority
CN
China
Prior art keywords
ammonia nitrogen
temperature
formula
temperature compensation
model
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.)
Expired - Fee Related
Application number
CN201910931224.7A
Other languages
Chinese (zh)
Other versions
CN110568144A (en
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.)
Changchun University of Science and Technology
Original Assignee
Changchun University of Science and Technology
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 Changchun University of Science and Technology filed Critical Changchun University of Science and Technology
Priority to CN201910931224.7A priority Critical patent/CN110568144B/en
Publication of CN110568144A publication Critical patent/CN110568144A/en
Application granted granted Critical
Publication of CN110568144B publication Critical patent/CN110568144B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/18Water
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/18Water
    • G01N33/1813Specific cations in water, e.g. heavy metals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A20/00Water conservation; Efficient water supply; Efficient water use
    • Y02A20/152Water filtration

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Pathology (AREA)
  • Mathematical Analysis (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Medicinal Chemistry (AREA)
  • Immunology (AREA)
  • Food Science & Technology (AREA)
  • Computational Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Analytical Chemistry (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Investigating Or Analyzing Materials By The Use Of Electric Means (AREA)

Abstract

A temperature compensation method for ammonia nitrogen detection belongs to the technical field of water quality detection, and aims to solve the problem that temperature compensation errors are large in a low-temperature environment when temperature compensation is performed only on a sensor, and the method comprises the following steps: step one, establishing a functional relation between z (x, y) and x and y: acquiring output readings of ammonia nitrogen detected by the sensors at different temperatures; step three, determining an objective function of z (x, y): step four, solving the optimal solution of the function coefficient established in the step one
Figure DDA0002218157930000011
Step five, establishing a temperature compensation model; the method utilizes a mathematical optimization technology to establish a fusion ammonia nitrogen temperature compensation model about an ammonia nitrogen water sample and an ammonia nitrogen sensor. The model has good compensation effect on low-temperature environment detection, can compensate the ammonia nitrogen concentration at a certain temperature into the ammonia nitrogen concentration value at the standard temperature (20 ℃), can realize secondary correction on the model through changing temperature experiment data so as to improve the precision of the model, and has high compensation precision.

Description

Temperature compensation method for ammonia nitrogen detection
Technical Field
The invention relates to the technical field of water quality detection, in particular to a temperature compensation method for ammonia nitrogen detection.
Background
In recent years, excessive discharge of ammonia nitrogen has gradually become a main factor of most river pollution in China, and an ammonia nitrogen sensor based on an electrochemical method has the characteristics of convenience in carrying, rapidness and high efficiency in detection and the like, and is widely applied to field water quality online monitoring. According to the Nernst theory, temperature change can affect the response of the ammonia nitrogen sensor, and the detection of the ammonia nitrogen sensor can be obviously interfered when the outdoor water temperature is generally changed from 0 ℃ to 35 ℃.
Aiming at the problem of interference of temperature change on ammonia nitrogen detection, a paper entitled "ammonia nitrogen online detector compensation model based on ammonia-sensitive electrode" is published in journal "analysis laboratory" by Wu Shi Guang et al, the paper only explores the influence of temperature on a sensor according to the theoretical principle of an ammonia nitrogen sensor, deduces a theoretical temperature compensation method through an Nernst equation and compensates the temperature of the sensor, but in the field actual detection process, the change of temperature not only influences the sensor, but also influences the existence form of ammonia nitrogen in water, and particularly influences the existence form of ammonia nitrogen in a low-temperature environment (0-20 ℃) are more obvious. Therefore, the problem of large compensation error in low-temperature environment exists when the temperature of the sensor is compensated by the prior art.
Disclosure of Invention
The invention provides a method for processing ammonia nitrogen experimental data through a mathematical optimization technology to establish an ammonia nitrogen temperature compensation model, aiming at solving the problem of large temperature compensation error in a low-temperature environment when only a sensor is subjected to temperature compensation. The temperature compensation can be simultaneously carried out on the water sample and the sensor through the data fusion processing of the output value of the ammonia nitrogen sensor, the standard value of the ammonia nitrogen solution and the temperature, and the method can compensate the ammonia nitrogen concentration at a certain temperature to the ammonia nitrogen concentration at the standard temperature (20 ℃) in real time.
The technical scheme adopted by the invention is as follows:
the low-temperature compensation method for ammonia nitrogen detection is characterized by comprising the following steps of:
step one, establishing a functional relation between z (x, y) and x and y:
z(x,y)=a0+a1x+a2y+a3x2+a4xy+a5y2+a6x3+a7x2y+a8xy2+a9y3 (1);
in formula (1): x represents the sample temperature, y represents the output reading of the ammonia nitrogen sensor, z (x, y) represents the standard concentration of ammonia nitrogen at the standard temperature, a0,a1,…a9Is a coefficient of formula (1);
acquiring output readings of ammonia nitrogen detected by the sensors at different temperatures;
detecting ammonia nitrogen samples with different standard concentrations at different temperatures by using an ammonia nitrogen sensor to obtain n groups of ammonia nitrogen detection records as (x)i,yi,zi),i=1,2,3…n,xi∈x、yi∈y、zi∈z(x,y);
Step three, determining an objective function of z (x, y):
Figure BDA0002218157910000021
in the formula (2)
Figure BDA0002218157910000022
Is a in the formula (1)0、a1,…a9The optimal solution of (2);
step four, solving the optimal solution of the coefficient of the formula (1)
Figure BDA0002218157910000023
Solving equation (2) by least squares method, it is necessary to
Figure BDA0002218157910000024
Satisfies formula (3):
Figure BDA0002218157910000025
solving the formula (3) to obtain:
Figure BDA0002218157910000026
in formula (4):
Figure BDA0002218157910000027
b=(z1,z2,...,zn)T (6);
step five, establishing a temperature compensation model;
coefficient obtained by equation (4)
Figure BDA0002218157910000028
Substituting into formula (1) to obtain:
Figure BDA0002218157910000029
the invention has the beneficial effects that: a fusion ammonia nitrogen temperature compensation model about an ammonia nitrogen water sample and an ammonia nitrogen sensor is established by using a mathematical optimization technology. The model has good compensation effect on low-temperature environment detection, can compensate the ammonia nitrogen concentration at a certain temperature into the ammonia nitrogen concentration value at the standard temperature (20 ℃), can realize secondary correction on the model through changing temperature experiment data so as to improve the precision of the model, and has high compensation precision. The temperature compensation can be performed on ammonia nitrogen sensors of different types and brands by fusing data layers only by modifying related experimental data, and the universality is high.
Drawings
FIG. 1: the invention relates to a flow chart of a temperature compensation method for ammonia nitrogen detection.
FIG. 2: the temperature experiment of the invention acquires a sample point distribution diagram.
FIG. 3: the invention discloses a three-dimensional schematic diagram of a temperature compensation model.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
The invention provides a method for processing ammonia nitrogen experimental data through a mathematical optimization technology to establish an ammonia nitrogen temperature compensation model, aiming at solving the problem of large temperature compensation error in a low-temperature environment when only a sensor is subjected to temperature compensation. The temperature compensation can be simultaneously carried out on the water sample and the sensor through the data fusion processing of the output value of the ammonia nitrogen sensor, the standard value of the ammonia nitrogen solution and the temperature, and the method can compensate the ammonia nitrogen concentration at a certain temperature to the ammonia nitrogen concentration at the standard temperature (20 ℃) in real time.
As shown in fig. 1, a temperature compensation method for ammonia nitrogen detection comprises the following steps:
step one, establishing a functional relation between z (x, y) and x and y;
x represents the sample temperature, y represents the output reading of the ammonia nitrogen sensor, and z (x, y) represents the standard concentration of ammonia nitrogen at the standard temperature.
(x,y)=a0+a1x+a2y+a3x2+a4xy+a5y2+a6x3+a7x2y+a8xy2+a9y3 (1);
Wherein a is0,a1,…a9Is the coefficient of formula (1);
acquiring output readings of ammonia nitrogen detected by the sensors at different temperatures;
detecting ammonia nitrogen samples with different standard concentrations at different temperatures by using an ammonia nitrogen sensor to obtain n groups of ammonia nitrogen detection records as (x)i,yi,zi),i=1,2,3…n,xi∈x、yi∈y、zi∈z。
As shown in fig. 2, a sample point distribution diagram is acquired in the temperature experiment;
step three, determining an objective function about z (x, y):
Figure BDA0002218157910000031
Figure BDA0002218157910000032
is about unknown numbers
Figure BDA0002218157910000033
An objective function of, wherein
Figure BDA0002218157910000034
Is a in the formula (1)0,a1,…a9The optimal solution of (2);
step four, solving the optimal solution of the coefficient of the formula (1)
Figure BDA0002218157910000041
Solving equation (2) by least squares method, it is necessary to
Figure BDA0002218157910000042
Satisfies formula (3):
Figure BDA0002218157910000043
solving the formula (3) to obtain:
Figure BDA0002218157910000044
in formula (4):
Figure BDA0002218157910000045
b=(z1,z2,...zn)T (6);
step five, establishing a temperature compensation model;
and (4) carrying the experimental data measured in the step two into the formula (4):
Figure BDA0002218157910000046
coefficient obtained by equation (4)
Figure BDA0002218157910000047
Substituting into formula (1) to obtain:
z=0.9673-0.088x+1.287y+0.00551x2-0.01195xy-0.001303y2-0.0001536x3-
1.979×10-5x2y-3.686×10-5y2x+1.993×10-5y3
(7)。
as shown in fig. 3, the temperature compensation model is a three-dimensional schematic diagram;
and (3) detecting the output reading of the water sample to be detected and the temperature of the water sample by the recording sensor, and substituting the data into the temperature compensation model (7) so as to obtain a compensated value, namely the true ammonia nitrogen content of the water sample. For example: when the temperature of a water sample is 5 ℃, the output readout of the ammonia nitrogen sensor is 3.7mg/L, namely x is 5, y is 3.7, and x and y are substituted into formula (7) to obtain the ammonia nitrogen concentration z which is 5.06 at the standard temperature (20 ℃).
The accuracy verification of the ammonia nitrogen temperature compensation model is to carry out the temperature experiment on the ammonia nitrogen reagent with random concentration, bring the experimental data into the temperature compensation model for compensation, and utilize the formula: the fitting error (%) (accuracy) ═ estimated mass concentration-actual mass concentration |/actual mass concentration × 100%, the verification data obtained are shown in table 1;
TABLE 1
Figure BDA0002218157910000051
From table 1, the maximum relative error after compensation is 3.0%, the minimum relative error is-0.20%, and the errors are within ± 3%, which shows that the temperature compensation model has good compensation accuracy.
Substituting into the average deviation formula:
Figure BDA0002218157910000052
wherein,
Figure BDA0002218157910000053
represents the mean deviation; sigmaiError representing a single term determination; n represents the number of measurements;
Figure BDA0002218157910000054
represents the average of n measurement errors;
Figure BDA0002218157910000055
represents the absolute deviation of the individual measurement from the mean;
calculating the mean deviation
Figure BDA0002218157910000056
The small average deviation shows that the temperature compensation effect of the model is good.

Claims (1)

1. A low-temperature compensation method for ammonia nitrogen detection is characterized by comprising the following steps:
step one, establishing a functional relation between z (x, y) and x and y:
z(x,y)=a0+a1x+a2y+a3x2+a4xy+a5y2+a6x3+a7x2y+a8xy2+a9y3 (1);
in formula (1): x represents the sample temperature, y represents the output reading of the ammonia nitrogen sensor, z (x, y) represents the standard concentration of ammonia nitrogen at the standard temperature, a0,a1,…a9Is a coefficient of formula (1);
acquiring output readings of ammonia nitrogen detected by the sensors at different temperatures;
detecting ammonia nitrogen samples with different standard concentrations at different temperatures by using an ammonia nitrogen sensor to obtain n groups of ammonia nitrogen detection records as (x)i,yi,zi),i=1,2,3…n,xi∈x、yi∈y、zi∈z(x,y);
Step three, determining an objective function of z (x, y):
Figure FDA0002218157900000011
in the formula (2)
Figure FDA0002218157900000012
Is a in the formula (1)0、a1,…a9The optimal solution of (2);
step four, solving the optimal solution of the coefficient of the formula (1)
Figure FDA0002218157900000013
Solving equation (2) by least squares method, it is necessary to
Figure FDA0002218157900000014
(k is 0, 1 … 9) satisfies formula (3):
Figure FDA0002218157900000015
solving the formula (3) to obtain:
Figure FDA0002218157900000016
in formula (4):
Figure FDA0002218157900000017
b=(z1,z2,...,zn)T (6);
step five, establishing a temperature compensation model;
coefficient obtained by equation (4)
Figure FDA0002218157900000021
Substituting into formula (1) to obtain:
Figure FDA0002218157900000022
CN201910931224.7A 2019-09-27 2019-09-27 Temperature compensation method for ammonia nitrogen detection Expired - Fee Related CN110568144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910931224.7A CN110568144B (en) 2019-09-27 2019-09-27 Temperature compensation method for ammonia nitrogen detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910931224.7A CN110568144B (en) 2019-09-27 2019-09-27 Temperature compensation method for ammonia nitrogen detection

Publications (2)

Publication Number Publication Date
CN110568144A CN110568144A (en) 2019-12-13
CN110568144B true CN110568144B (en) 2021-08-03

Family

ID=68783051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910931224.7A Expired - Fee Related CN110568144B (en) 2019-09-27 2019-09-27 Temperature compensation method for ammonia nitrogen detection

Country Status (1)

Country Link
CN (1) CN110568144B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115236149A (en) * 2022-07-15 2022-10-25 中国地质调查局水文地质环境地质调查中心 Water quality detection method and system based on electrochemical sensor
CN116434857B (en) * 2023-03-24 2024-03-15 青岛思普润水处理股份有限公司 Intelligent dosing setting method of sewage treatment system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105807340A (en) * 2016-06-01 2016-07-27 山东省科学院海洋仪器仪表研究所 Temperature compensating method of marine temperature-humidity sensors
US9500585B2 (en) * 2014-10-16 2016-11-22 Spectro Scientific, Inc. Photometer and method for compensating for ambient temperature changes in a photometer
CN108717501A (en) * 2018-05-25 2018-10-30 广西电网有限责任公司电力科学研究院 A kind of non-linear compensation method of sensor
US10317421B2 (en) * 2014-03-31 2019-06-11 Stmicroelectronics S.R.L Positioning apparatus comprising an inertial sensor and inertial sensor temperature compensation method
CN110057773A (en) * 2019-05-05 2019-07-26 南京信息工程大学 A kind of infrared gas sensor system and the temperature-compensation method based on AACA-Elman algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10317421B2 (en) * 2014-03-31 2019-06-11 Stmicroelectronics S.R.L Positioning apparatus comprising an inertial sensor and inertial sensor temperature compensation method
US9500585B2 (en) * 2014-10-16 2016-11-22 Spectro Scientific, Inc. Photometer and method for compensating for ambient temperature changes in a photometer
CN105807340A (en) * 2016-06-01 2016-07-27 山东省科学院海洋仪器仪表研究所 Temperature compensating method of marine temperature-humidity sensors
CN108717501A (en) * 2018-05-25 2018-10-30 广西电网有限责任公司电力科学研究院 A kind of non-linear compensation method of sensor
CN110057773A (en) * 2019-05-05 2019-07-26 南京信息工程大学 A kind of infrared gas sensor system and the temperature-compensation method based on AACA-Elman algorithm

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
COD 光谱法检测中的波长优化及温度补偿实验研究;李鑫等;《光学技术》;20191130;第45卷(第6期);全文 *
Modeling and Analysis of Adaptive Temperature Compensation for Humidity Sensors;Wei Xu etal;《eletronics》;20190430;第8卷;全文 *
基于氨气敏电极的氨氮在线检测仪补偿模型;吴志广等;《分析试验室》;20170331;第36卷(第3期);全文 *
紫外光谱法检测 COD 时波长和低温影响的探究;李鑫等;《光谱学与光谱分析》;20200831;第40卷(第8期);全文 *

Also Published As

Publication number Publication date
CN110568144A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
CN101308017B (en) Batteries plate thickness on-line measurement method utilizing baseband thickness for self-calibration
CN106872378B (en) A kind of Wavelength modulation spectroscopy detects the temperature-compensation method of oxygen concentration in vial
CN110018275A (en) A kind of gas detector with compensation function and compensation method
CN110568144B (en) Temperature compensation method for ammonia nitrogen detection
CN110988272A (en) Method for correcting measured values of a hydrogen sensor
CN102213708A (en) Method for testing air leak rate of air preheater
CN110220945B (en) Full-range temperature compensation method of semiconductor gas sensor
CN111272289A (en) Real-time calibration device for thermal infrared imager
AU2020100700A4 (en) A Correction Method for Gas Sensor Based on Machine Learning
CN110907509B (en) Method for detecting hydrofluoric acid in electronic-grade mixed acid
CN115389567A (en) Temperature compensation algorithm of water quality conductivity sensor
CN113588710B (en) Component concentration detection device and method for mixed gas and application
CN107228614B (en) Detection device and detection method for phase angle of six-cylinder crankshaft
CN113533472A (en) Laboratory pH meter with automatic temperature compensation function
CN113484376A (en) High-precision micro water sensor zero drift correction method and storage device
CN112834562A (en) Device and method for detecting helium concentration in heat-conducting mixed gas
CN217359696U (en) Heat transfer power detection device applied to measurement of mixed gas heat conductivity coefficient
CN110780002A (en) High-efficiency low-cost detection method for quantifying essential oil components
Sobina Development of alumina-based porosity reference materials for the mercury porosimetry method
CN106353386B (en) ZrO2Limiting current formula lambda sensor altimetric compensation method
CN114755270A (en) Method and device for measuring pH temperature compensation of ammonia-containing pure water medium
CN110567899B (en) Low-temperature compensation method for COD detection
CN114002378A (en) Concentration detection method of gas concentration sensor
Zhao et al. Comparative experimental study on the stability of two brands of dry block furnace
CN113970502A (en) Tobacco leaf water content prediction model construction method based on rapid oven method

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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210803