A dynamic compensation method for background ion interference of ammonia nitrogen sensor and water quality monitoring system

By using a dynamic compensation method for background ion interference in ammonia nitrogen sensors and employing conductivity and temperature models to correct ammonia nitrogen concentration, the problem of interference from potassium and sodium ions in ammonia nitrogen sensors was solved, achieving accurate compensation and high-precision measurement.

CN122631734APending Publication Date: 2026-08-25ZHONGSHUI WEIZHI SENSING TECHNOLOGY (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610828898.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2026-05-17
Filing Date
2026-06-09
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing ammonia nitrogen sensors in complex water bodies may produce false positive responses due to interference from potassium and sodium ions. Traditional compensation schemes are costly and difficult to maintain.

Method used

A dynamic compensation method for background ion interference using an ammonia nitrogen sensor is adopted. By acquiring multidimensional environmental variables in real time, the interference potential increment is calculated using conductivity and temperature models to correct the ammonia nitrogen concentration, including compensation for conductivity linear interference, temperature interference, and cross-coupling terms.

Benefits of technology

It reduces hardware costs, simplifies equipment structure, improves ammonia nitrogen measurement accuracy, is suitable for complex water bodies and wide temperature ranges, and reduces measurement errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122631734A_ABST
    Figure CN122631734A_ABST
Patent Text Reader

Abstract

The application provides an ammonia nitrogen sensor background ion interference dynamic error compensation algorithm and a water quality monitoring system to solve the problems of background ion false positive interference in ammonia nitrogen ion selective electrode monitoring and high cost and difficult maintenance of a traditional compensation scheme. The method obtains water body potential, conductivity and other variables in real time, uses an interference model containing a conductivity and temperature related interference term and an adaptive threshold value determination interference model, calculates an interference potential increment and corrects the potential, and then substitutes the potential into a Nernst equation to solve the ammonia nitrogen concentration. The application does not need to add a special interference ion electrode, simplifies the structure, reduces the cost, adapts to complex water bodies, and improves the measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing technology for water quality monitoring sensors, specifically to a method for dynamic compensation of background ion interference in ammonia nitrogen sensors and a water quality monitoring system. Background Technology

[0002] Ammonia nitrogen sensors typically employ the ion-selective electrode (ISE) principle. In continuous monitoring of actual water bodies (such as municipal sewage, surface water, and industrial wastewater), the following key challenges are encountered:

[0003] 1. Severe false positive interference: The ionic radii of monovalent cations such as potassium (K+) and sodium (Na+) are very similar to those of ammonium (NH4+). When the concentration of these impurity ions in the water fluctuates, the ammonia nitrogen ISE sensitive membrane will produce a strong cross-response (false positive), resulting in a significantly higher ammonia nitrogen measurement value.

[0004] 2. Traditional compensation solutions are costly and difficult to maintain: Existing mainstream industry solutions (such as high-end instruments in Europe and America) use the "dual-electrode method," which involves adding an extra dedicated potassium ion selective electrode to the probe. This not only multiplies the hardware cost, but the potassium ion electrode also faces the problems of aging and frequent calibration, leading to a significant increase in the overall system failure rate and maintenance costs. Summary of the Invention

[0005] To address one of the aforementioned technical problems, this invention provides a dynamic error compensation algorithm and system for an ammonia nitrogen sensor.

[0006] According to one aspect of the present invention, a method for dynamic compensation of background ion interference in an ammonia nitrogen sensor is provided, characterized in that the ammonia nitrogen sensor includes an ion-selective electrode.

[0007] The method includes the following steps:

[0008] S1. Obtain multidimensional environmental variables of the target water body in real time. The multidimensional environmental variables include at least the target water body potential. and conductivity ;

[0009] S2. Calculate the false positive interference potential increment caused by background ions using a preset interference model. The variables in the interference model include at least the electrical conductivity of the target water body. ;

[0010] S3, from the target water body potential Subtract the potential increment Obtain the corrected potential ,

[0011] ;

[0012] S4, adjust the corrected potential Substituting into the Nernst equation, we obtain the corrected ammonia nitrogen concentration.

[0013]

[0014] In the formula: The zero-point intercept of the electrode. Let Nernst slope be the slope. This is the corrected ammonia nitrogen concentration.

[0015] Furthermore, the interference model is as follows:

[0016]

[0017] In the formula, The linear interference fitting coefficients for conductivity; The basic conductivity threshold.

[0018] Furthermore, the multidimensional environmental variables of the target water body obtained in step S1 also include the target water body temperature. The variables in the interference model also include the target water temperature T, therefore the interference model is replaced by:

[0019]

[0020] In the formula: The linear interference fitting coefficients for conductivity; These are the temperature linear disturbance fitting coefficients; The basic conductivity threshold; This is the preset reference temperature.

[0021] Furthermore, the background ion interference also includes the coupling effect of temperature on ion activity amplification, thus the interference model is replaced by:

[0022]

[0023] In the formula: The linear interference fitting coefficients for conductivity; These are the temperature linear disturbance fitting coefficients; This is the cross-coupling coefficient between temperature and conductivity; The basic conductivity threshold; This is the preset reference temperature.

[0024] Furthermore, the interval between step S1 and step S2 also includes:

[0025] S11, Preset basic conductivity threshold ;

[0026] S12, Compare with the aforementioned basic conductivity threshold. With the electrical conductivity of the target water body ;

[0027] like Greater than Then proceed to step S2, where the false positive interference potential increment caused by background ions is calculated using a preset interference model. ;

[0028] like Less than or equal to If the background ion interference in the current water body is determined to be negligible, the target water body potential obtained in step S1 can be directly applied. As a correction potential Then proceed to step S4 to calculate the ammonia nitrogen concentration.

[0029] Furthermore, the coefficient , , The results were obtained through orthogonal experiments and fitting using the least squares method.

[0030] Furthermore, the background ions include potassium ions and sodium ions.

[0031] According to one aspect of the present invention, a water quality monitoring system is provided, comprising an ion-selective ammonia nitrogen sensor, characterized in that it further comprises a conductivity sensor and a microprocessor, the microprocessor being used to execute the above-described dynamic compensation method for background ion interference of the ammonia nitrogen sensor.

[0032] Furthermore, the water quality monitoring system also includes a temperature sensor.

[0033] According to one aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program or instructions are stored therein, characterized in that the computer program or instructions are programmed or configured to execute the above-described dynamic compensation method for background ion interference of an ammonia nitrogen sensor via a processor.

[0034] Beneficial effects

[0035] Compared with the prior art, the dynamic compensation method for background ion interference of ammonia nitrogen sensor provided by the present invention has the following beneficial effects:

[0036] 1. This invention does not require additional potassium and sodium ion selective electrodes. It can achieve accurate compensation for background ion interference by relying only on the ammonium ion selective electrode, conductivity sensor and temperature sensor that are standard in existing ammonia nitrogen sensors. This effectively reduces hardware costs, simplifies equipment structure and facilitates mass production and engineering deployment.

[0037] 2. This invention characterizes the total matrix strength of monovalent background ions such as potassium and sodium ions in water by measuring conductivity, and fits the false positive potential shift caused by background ions as a whole. It can simultaneously cover the comprehensive interference of multiple coexisting background ions, avoiding the limitations of existing single ion compensation methods that can only compensate for a certain type of ion and have limited applicability. It is especially suitable for various complex water bodies with potassium and sodium ions as the main interfering ions.

[0038] 3. This invention introduces separate interference terms for conductivity, temperature, and cross-coupling terms for temperature and conductivity. This not only effectively corrects measurement deviations caused by background ion matrix interference and temperature drift, but also accurately compensates for the coupling amplification effect of temperature on ion activity and ion migration rate. Compared with existing purely linear single-factor compensation methods, this invention significantly reduces ammonia nitrogen measurement errors under complex water quality and wide temperature conditions, and improves the detection accuracy of low-concentration ammonia nitrogen and complex matrix water bodies. Attached Figure Description

[0039] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:

[0040] Figure 1 A flowchart of a dynamic compensation method for background ion interference in an ammonia nitrogen sensor according to Embodiment 1 of the present invention is shown;

[0041] Figure 2 A flowchart of the threshold determination logic in Embodiment 1 of the present invention is shown. Detailed Implementation

[0042] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present invention are shown in the accompanying drawings.

[0043] Example 1

[0044] This embodiment provides a method for dynamic compensation of background ion interference in an ammonia nitrogen sensor. The ammonia nitrogen sensor includes an ion-selective electrode, such as an ammonium ion-selective electrode, and its measurement follows the Nernst equation:

[0045]

[0046] In the formula: This is the measured potential. The zero-point intercept of the electrode. Let Nernst slope be the slope. This represents the ammonia nitrogen concentration.

[0047] Electrode zero intercept and Nernst slope The ammonia nitrogen standard solution of known concentration can be used for calibration and fitting. The calibration and fitting method is a conventional method in this field and will not be described in detail here.

[0048] like Figure 1 As shown, the method specifically includes the following steps:

[0049] S1. Obtain multidimensional environmental variables of the target water body in real time. The multidimensional environmental variables include at least the measured potential of the target water body. and conductivity ;

[0050] S2. Calculate the false positive interference potential increment caused by background ions using a preset interference model. The variables in the interference model include at least the electrical conductivity of the target water body. ;

[0051] Constructing based on conductivity A pre-defined interference model is used as the input variable to calculate the false positive interference potential increment caused by background ions. ;

[0052] In this embodiment, the interference model adopts a linear fitting form:

[0053]

[0054] In the formula, The linear interference fitting coefficients for conductivity; The basic conductivity threshold.

[0055] S3. Employ potential difference correction logic to obtain the measured potential from the target water body. The interference potential increment corresponding to the subtraction of background ions The corrected potential after eliminating background ion interference was obtained. The calculation formula is:

[0056]

[0057] S4: Adjust the corrected potential Substituting into the Nernst equation, we obtain the corrected ammonia nitrogen concentration.

[0058]

[0059] In the formula: The zero-point intercept of the electrode. Let Nernst slope be the slope. This is the corrected ammonia nitrogen concentration.

[0060] The corrected ammonia nitrogen concentration can be obtained after calculation. for,

[0061]

[0062] Model coefficients in this embodiment Multiple calibration experiments were designed using water samples with different potassium / sodium ion concentrations. Multiple sets of potential sample data were collected, and the coefficients were calculated. .

[0063] The coefficient The acquisition process:

[0064] 1. Prepare the calibration environment: Prepare a standard solution of ammonia nitrogen at a fixed concentration (e.g., 10 mg / L);

[0065] 2. Orthogonal experimental design: Different gradients of impurity salts such as potassium chloride (KCl) and sodium chloride (NaCl) are artificially added to the standard solution to forcibly alter the total conductivity of the water. );

[0066] 3. Data Acquisition and Model Fitting: Record the abnormal potential increments generated by the ammonia-nitrogen electrode under different conductivity combinations (i.e., The optimal coefficients are solved by a microcontroller or host computer. .

[0067] In this embodiment, the background ions mainly include monovalent cations such as potassium and sodium ions in water. These ions are similar to ammonium ions in radius and physicochemical properties, and are prone to cross-interference with ion-selective electrodes, resulting in false positive potential shifts. This embodiment does not rely on adding separate potassium and sodium ion-selective electrodes, but only uses conductivity to characterize the overall background ion matrix strength to achieve overall dynamic compensation for batch background ion interference. It has a simple structure, low cost, and strong engineering feasibility, and is suitable for online monitoring of ammonia nitrogen in multiple scenarios such as municipal sewage, surface water, aquaculture water, and industrial circulating water.

[0068] The basic conductivity threshold Commonly used reference values ​​for the target water body industry and monitoring can be adopted, such as 500 μs / cm for general surface water, 2000 μs / cm for municipal sewage, 800 μs / cm for freshwater aquaculture water, and 3000 μs / cm for industrial circulating water.

[0069] Furthermore, such as Figure 2 As shown, threshold determination logic is added between step S1 and step S2:

[0070] S11, Preset basic conductivity threshold ;

[0071] S12, Compare with the aforementioned basic conductivity threshold. With the electrical conductivity of the target water body ;

[0072] like Greater than This indicates that the current background ion concentration in the water is too high and the interference cannot be ignored. Therefore, proceed to step S2, where the false positive interference potential increment caused by background ions is calculated using a preset interference model. ;

[0073] like Less than or equal to If the background ion interference in the current water body is determined to be negligible, the target water body potential obtained in step S1 can be directly applied. As a correction potential Then proceed to step S4 to calculate the ammonia nitrogen concentration.

[0074] This invention uses a preset basic conductivity threshold. It can automatically determine the strength of background ion interference in the water body, and when the water conductivity is higher than... When the interference is not negligible, the interference model will be automatically activated for compensation; when the water conductivity is lower than or equal to When interference is negligible, the original detection potential is used directly to calculate the ammonia nitrogen concentration, avoiding the additional error introduced by over-correction, and balancing the stability of ammonia nitrogen measurement with the robustness of the algorithm.

[0075] Example 2

[0076] This embodiment introduces a temperature variable based on Embodiment 1 to achieve joint compensation of both conductivity and temperature parameters.

[0077] The multidimensional environmental variables collected in step S1 also include the real-time temperature of the target water body. ;

[0078] The corresponding disturbance model is updated, and a temperature reference value is introduced. The expression for the interference model is:

[0079]

[0080] In the formula: The linear interference fitting coefficients for conductivity; These are the temperature linear disturbance fitting coefficients; The basic conductivity threshold; The preset reference temperature is usually selected as the calibration reference, typically 25°C.

[0081] This embodiment compensates for two types of interference: first, the overall matrix interference from background ions such as potassium and sodium ions, which characterize conductivity; and second, the electrode potential drift caused by temperature variations, further broadening the applicable temperature range of the method. The remaining steps S1, S3, S4, and the conductivity threshold determination logic are completely consistent with those in Embodiment 1.

[0082] Model coefficients in this embodiment , The least squares method is used to perform global fitting and solution through orthogonal experiments.

[0083] coefficients in this embodiment , The acquisition process:

[0084] 1. Prepare the calibration environment: Prepare a standard solution of ammonia nitrogen at a fixed concentration (e.g., 10 mg / L);

[0085] 2. Orthogonal experimental design: Different gradients of impurity salts such as potassium chloride (KCl) and sodium chloride (NaCl) are artificially added to the standard solution to forcibly alter the total conductivity of the water. Multiple isothermal gradients can be set simultaneously (e.g., 10℃, 25℃, 40℃).

[0086] 3. Data Acquisition and Model Fitting: Record the abnormal voltage deviation generated by the ammonia-nitrogen electrode under different temperature and conductivity combinations (i.e., The optimal polynomial coefficients can be obtained using a microcontroller or host computer. , .

[0087] (3.1) Maintain the reference temperature (e.g., 25℃). At this point, the formula includes... All terms become 0. The formula simplifies to Change at this time The linear slope of the measured multiple voltage differences is... .

[0088] (3.2) Maintain the reference conductivity (e.g., 500 μs / cm). The formula then simplifies to... Change the temperature The linear slope of the measured voltage differences is... .

[0089] Example 3

[0090] Based on Example 2, this embodiment introduces a temperature-conductivity cross-coupling term to compensate for the coupling amplification effect of temperature on background ion activity.

[0091] Considering that temperature changes in actual water bodies alter ion migration rates and ion activities, and that conductivity and matrix strength are coupled with temperature, the optimized interference model is a multivariate linear model with cross-coupling terms:

[0092]

[0093] In the formula: The linear interference fitting coefficients for conductivity; These are the temperature linear disturbance fitting coefficients; This is the cross-coupling coefficient between temperature and conductivity; The basic conductivity threshold; The preset reference temperature is usually selected as the calibration reference, typically 25°C.

[0094] Model coefficients in this embodiment , , Multiple calibration experiments were conducted using orthogonal experimental design with water samples of different conductivity, temperature, and potassium / sodium ion concentrations. Multiple sets of potential sample data were collected, and the least squares method was used for global fitting to ensure that the model coefficients fit the actual working condition interference law and improve the compensation accuracy under complex working conditions.

[0095] 1. Prepare the calibration environment: Prepare a standard solution of ammonia nitrogen at a fixed concentration (e.g., 10 mg / L);

[0096] 2. Orthogonal experimental design: Different gradients of impurity salts such as potassium chloride (KCl) and sodium chloride (NaCl) are artificially added to the standard solution to forcibly alter the total conductivity of the water. Multiple isothermal gradients can be set simultaneously (e.g., 10℃, 25℃, 40℃).

[0097] 3. Data Acquisition and Model Fitting: Record the abnormal voltage deviation generated by the ammonia-nitrogen electrode under different temperature and conductivity combinations (i.e., The optimal polynomial coefficients can be obtained using a microcontroller or host computer. , , .

[0098] (3.1) Maintain the reference temperature (e.g., 25℃). At this point, the formula includes... All terms become 0. The formula simplifies to Change at this time The linear slope of the measured voltage differences is... .

[0099] (3.2) Maintain the reference conductivity (e.g., 500 μs / cm). The formula then simplifies to... Change the temperature The linear slope of the measured voltage differences is... .

[0100] (3.3) Simultaneously change conductivity and temperature, for example = 1500 and = 35℃, measure the total actual interference voltage at this time: for example, the measured voltage is 3.5 mV higher; measure the total actual interference voltage at this time, and calculate it using steps (3.1) and (3.2). and Calculate "how much higher should theoretically be if coupling effects are not considered": Theoretically higher = * (1500-500) + * (35-25), assuming the calculated value is 3.0 mV. The difference between the measured and theoretical values ​​(3.5 - 3.0 = 0.5 mV) is caused by the cross-coupling c. * (1500 - 500) * (35 - 25) = 0.5mV, which can be solved by inverse equation. = 0.00005.

[0101] The obtained coefficients a, b, and c are stored as fixed calibration parameters in the non-volatile memory of the microprocessor.

[0102] The logic for calculating the remaining potential correction, solving the Nernst equation, and determining the conductivity threshold are the same as in Examples 1 and 2.

[0103] Example 4

[0104] This embodiment provides a water quality monitoring system, including an ion-selective ammonia nitrogen sensor, a conductivity sensor, and a microprocessor.

[0105] The ion-selective ammonia nitrogen sensor is used to collect the original detection potential of the water body. The conductivity sensor is used to collect the conductivity of the target water body in real time. The microprocessor has a built-in calibration base conductivity threshold and model coefficients. The method includes a compensation algorithm program configured to execute a dynamic compensation method for background ion interference from an ammonia nitrogen sensor, completing interference potential calculation, potential correction, and ammonia nitrogen concentration calculation to achieve accurate online monitoring of ammonia nitrogen in water. The method specifically includes the following steps:

[0106] S1. Obtain multidimensional environmental variables of the target water body in real time. The multidimensional environmental variables include at least the measured potential of the target water body. and conductivity ;

[0107] S2. Calculate the false positive interference potential increment caused by background ions using a preset interference model. The variables in the interference model include at least the electrical conductivity of the target water body. ;

[0108] Constructing based on conductivity A pre-defined interference model is used as the input variable to calculate the false positive interference potential increment caused by background ions. ;

[0109] In this embodiment, the interference model adopts a linear fitting form:

[0110]

[0111] In the formula, The linear interference fitting coefficients for conductivity; The basic conductivity threshold.

[0112] S3. Employ potential difference correction logic to obtain the measured potential from the target water body. The interference potential increment corresponding to the subtraction of background ions The corrected potential after eliminating background ion interference was obtained. The calculation formula is:

[0113]

[0114] S4: Adjust the corrected potential Substituting into the Nernst equation, we obtain the corrected ammonia nitrogen concentration.

[0115]

[0116] In the formula: The zero-point intercept of the electrode. Let Nernst slope be the slope. This is the corrected ammonia nitrogen concentration.

[0117] Furthermore, the microprocessor also incorporates a threshold determination algorithm, which adds threshold determination logic between step S1 and step S2:

[0118] S11, Preset basic conductivity threshold ;

[0119] S12, Compare with the aforementioned basic conductivity threshold. With the electrical conductivity of the target water body ;

[0120] like Greater than This indicates that the current background ion concentration in the water is too high and the interference cannot be ignored. Therefore, proceed to step S2, where the false positive interference potential increment caused by background ions is calculated using a preset interference model. ;

[0121] like Less than or equal to If the background ion interference in the current water body is determined to be negligible, the target water body potential obtained in step S1 can be directly applied. As a correction potential Then proceed to step S4 to calculate the ammonia nitrogen concentration.

[0122] The model coefficients built into the microprocessor Multiple calibration experiments were designed using water samples with different potassium / sodium ion concentrations. Multiple sets of potential sample data were collected, and the coefficients were calculated. .

[0123] The coefficient The acquisition process:

[0124] 1. Prepare the calibration environment: Prepare a standard solution of ammonia nitrogen at a fixed concentration (e.g., 10 mg / L);

[0125] 2. Orthogonal experimental design: Different gradients of impurity salts such as potassium chloride (KCl) and sodium chloride (NaCl) are artificially added to the standard solution to forcibly alter the total conductivity of the water. );

[0126] 3. Data Acquisition and Model Fitting: Record the abnormal potential increments generated by the ammonia-nitrogen electrode under different conductivity combinations (i.e., The optimal coefficients are solved by a microcontroller or host computer. .

[0127] The basic conductivity threshold Commonly used reference values ​​for the target water body industry and monitoring can be adopted, such as 500 μs / cm for general surface water, 2000 μs / cm for municipal sewage, 800 μs / cm for freshwater aquaculture water, and 3000 μs / cm for industrial circulating water.

[0128] The microprocessor can be, for example, an 8-bit general-purpose microcontroller, MCU, MPU, etc.

[0129] Example 5

[0130] This embodiment provides a water quality monitoring system. Based on Embodiment 4, the water quality monitoring system further includes a temperature sensor; the temperature sensor is used to collect the temperature of the target water body in real time. The microprocessor further integrates model coefficients. The compensation algorithm program is configured to execute the dynamic compensation method for background ion interference of the ammonia nitrogen sensor described in Embodiment 2 above. The multidimensional environmental variables collected in step S1 of the method also include the real-time temperature of the target water body. ;

[0131] The corresponding disturbance model is updated, and a temperature reference value is introduced. The expression for the interference model is:

[0132]

[0133] In the formula: The linear interference fitting coefficients for conductivity; These are the temperature linear disturbance fitting coefficients; The basic conductivity threshold; The preset reference temperature is usually selected as the calibration reference, typically 25°C.

[0134] The model coefficients built into the microprocessor in this embodiment , The least squares method is used to perform global fitting and solution through orthogonal experiments.

[0135] coefficients in this embodiment , The acquisition process:

[0136] 1. Prepare the calibration environment: Prepare a standard solution of ammonia nitrogen at a fixed concentration (e.g., 10 mg / L);

[0137] 2. Orthogonal experimental design: Different gradients of impurity salts such as potassium chloride (KCl) and sodium chloride (NaCl) are artificially added to the standard solution to forcibly alter the total conductivity of the water. Multiple isothermal gradients can be set simultaneously (e.g., 10℃, 25℃, 40℃).

[0138] 3. Data Acquisition and Model Fitting: Record the abnormal voltage deviation generated by the ammonia-nitrogen electrode under different temperature and conductivity combinations (i.e., The optimal polynomial coefficients can be obtained using a microcontroller or host computer. , .

[0139] (3.1) Maintain the reference temperature (e.g., 25℃). At this point, the formula includes... All terms become 0. The formula simplifies to Change at this time The linear slope of the measured voltage differences is... .

[0140] (3.2) Maintain the reference conductivity (e.g., 500 μs / cm). The formula then simplifies to... Change the temperature The linear slope of the measured voltage differences is... .

[0141] Example 6

[0142] This embodiment provides a water quality monitoring system. Based on Embodiment 5, the microprocessor further has a built-in compensation algorithm program configured to execute the dynamic compensation method for background ion interference of the ammonia nitrogen sensor described in Embodiment 3, and optimize the interference model as a multivariate linear model with cross-coupling terms.

[0143]

[0144] In the formula: The linear interference fitting coefficients for conductivity; These are the temperature linear disturbance fitting coefficients; This is the cross-coupling coefficient between temperature and conductivity; The basic conductivity threshold; The preset reference temperature is usually selected as the calibration reference, typically 25°C.

[0145] The model coefficients built into the microprocessor in this embodiment , , Multiple calibration experiments were conducted using orthogonal experimental design with water samples of different conductivity, temperature, and potassium / sodium ion concentrations. Multiple sets of potential sample data were collected, and the least squares method was used for global fitting to ensure that the model coefficients fit the actual working condition interference law and improve the compensation accuracy under complex working conditions.

[0146] 1. Prepare the calibration environment: Prepare a standard solution of ammonia nitrogen at a fixed concentration (e.g., 10 mg / L);

[0147] 2. Orthogonal experimental design: Different gradients of impurity salts such as potassium chloride (KCl) and sodium chloride (NaCl) are artificially added to the standard solution to forcibly alter the total conductivity of the water. Multiple isothermal gradients can be set simultaneously (e.g., 10℃, 25℃, 40℃).

[0148] 3. Data Acquisition and Model Fitting: Record the abnormal voltage deviation generated by the ammonia-nitrogen electrode under different temperature and conductivity combinations (i.e., The optimal polynomial coefficients can be obtained using a microcontroller or host computer. , , .

[0149] (3.1) Maintain the reference temperature (e.g., 25℃). At this point, the formula includes... All terms become 0. The formula simplifies to Change at this time The linear slope of the measured voltage differences is... .

[0150] (3.2) Maintain the reference conductivity (e.g., 500 μs / cm). The formula then simplifies to... Change the temperature The linear slope of the measured voltage differences is... .

[0151] (3.3) Simultaneously change conductivity and temperature, for example = 1500 and = 35℃, measure the total actual interference voltage at this time: for example, the measured voltage is 3.5 mV higher; measure the total actual interference voltage at this time, and calculate it using steps (3.1) and (3.2). and Calculate "how much higher should theoretically be if coupling effects are not considered": Theoretically higher = * (1500-500) + * (35-25), assuming the calculated value is 3.0 mV. The difference between the measured and theoretical values ​​(3.5 - 3.0 = 0.5 mV) is caused by the cross-coupling c. * (1500 - 500) * (35 - 25) = 0.5mV, which can be solved by inverse equation. = 0.00005.

[0152] Example 7

[0153] This embodiment provides a computer-readable storage medium, which is a non-volatile readable storage medium storing a computer program or instructions. When the computer program or instructions are loaded and executed by a processor, they implement all the steps of the dynamic compensation method for background ion interference of ammonia nitrogen sensor as described in any one of Embodiments 1 to 3, and can be embedded in hardware devices such as water quality monitoring instruments, online monitoring terminals, and PLC controllers for deployment and application.

[0154] Those skilled in the art should understand that the above embodiments are merely for illustrating the present invention and are not intended to limit the scope of the invention. Those skilled in the art can make other changes or modifications based on the above invention, and these changes or modifications still fall within the scope of the present invention.

Claims

1. A method for dynamic compensation of background ion interference in an ammonia nitrogen sensor, characterized in that, The ammonia nitrogen sensor includes an ion-selective electrode. The method includes the following steps: S1. Obtain multidimensional environmental variables of the target water body in real time, wherein the multidimensional environmental variables include at least the target water body potential. and conductivity ; S2. Calculate the false positive interference potential increment caused by background ions using a preset interference model. The variables in the interference model include at least the electrical conductivity of the target water body. ; S3, from the target water body potential Subtract the potential increment Obtain the corrected potential , ; S4, adjust the corrected potential Substituting into the Nernst equation, we obtain the corrected ammonia nitrogen concentration. In the formula: The zero-point intercept of the electrode. Let Nernst slope be the slope. This is the corrected ammonia nitrogen concentration.

2. The compensation method according to claim 1, characterized in that: The interference model is: In the formula, The linear interference fitting coefficients for conductivity; The basic conductivity threshold.

3. The compensation method according to claim 2, characterized in that: The multidimensional environmental variables of the target water body obtained in step S1 also include the target water body temperature. The variables in the interference model also include the target water temperature T, therefore the interference model is replaced by: In the formula: The linear interference fitting coefficients for conductivity; These are the temperature linear disturbance fitting coefficients; The basic conductivity threshold; This is the preset reference temperature.

4. The compensation method according to claim 3, characterized in that: The background ion interference also includes the coupling effect of temperature on ion activity amplification, therefore the interference model is replaced by: In the formula: The linear interference fitting coefficients for conductivity; These are the temperature linear disturbance fitting coefficients; This is the cross-coupling coefficient between temperature and conductivity; The basic conductivity threshold; This is the preset reference temperature.

5. The compensation method according to any one of claims 2-4, characterized in that: The steps between S1 and S2 also include: S11, Preset basic conductivity threshold ; S12, Compare with the aforementioned basic conductivity threshold. With the electrical conductivity of the target water body ; like Greater than Then proceed to step S2, where the false positive interference potential increment caused by background ions is calculated using a preset interference model. ; like Less than or equal to If the background ion interference in the current water body is determined to be negligible, the target water body potential obtained in step S1 can be directly applied. As a correction potential Then proceed to step S4 to calculate the ammonia nitrogen concentration.

6. The compensation method according to claim 4, characterized in that: The coefficient , , The results were obtained through orthogonal experiments and fitting using the least squares method.

7. The compensation method according to claim 1, characterized in that: The background ions include potassium ions and / or sodium ions.

8. A water quality monitoring system, comprising an ion-selective ammonia nitrogen sensor, characterized in that, It also includes a conductivity sensor and a microprocessor, and the water quality monitoring system does not contain separate potassium or sodium ion selective electrodes, the microprocessor being used to execute the dynamic compensation method for background ion interference of the ammonia nitrogen sensor as described in any one of claims 1-7.

9. The water quality monitoring system according to claim 8, characterized in that: It also includes a temperature sensor.

10. A computer-readable storage medium storing a computer program or instructions, characterized in that, The computer program or instructions are programmed or configured to execute, via a processor, the dynamic compensation method for background ion interference of the ammonia nitrogen sensor according to any one of claims 1 to 7.