Temperature Compensation Algorithm for Water Quality Conductivity Sensor

By establishing a three-dimensional correction matrix of temperature-initial conductivity display-correction ratio, the compensation error problem of water quality conductivity sensors in high conductivity and wide temperature ranges is solved, and a high-precision temperature compensation effect is achieved.

CN115389567BActive Publication Date: 2025-07-29XIAMEN STANDARDS SCI INSTR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211061553.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-07-29
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

The prior art has problems of large errors and discontinuity in temperature compensation of water quality conductivity sensors in high conductivity and wide temperature ranges, especially breakpoints appear at 25°C, and the traditional coefficient method is complex in calculation and is not suitable for high range and wide temperature ranges.

Method used

A three-dimensional correction matrix of temperature-initial conductivity display-correction ratio is established. By measuring the initial conductivity values of the standard solution with different concentrations of conductivity at different temperatures, multiple linear correlation functions are constructed to simplify the calculation and ensure the continuity of the model at 25°C.

Benefits of technology

The temperature compensation accuracy of the conductivity sensor in high range and wide temperature range is improved, and the error is controlled within ±0.1℃, meeting the environmental protection industry standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115389567B_ABST
    Figure CN115389567B_ABST
Patent Text Reader

Abstract

Temperature compensation algorithm for water quality conductivity sensor. Using a series of conductivity standard solutions with different concentrations, the conductivity values at 25 °C are measured by a standard conductivity tester calibrated with a calibration solution and recorded as K<subgt;ref< / subgt>. At appropriately spaced temperatures, the conductivity sensor for which a temperature compensation model needs to be established is placed in each of the above standard solutions, and the initial conductivity readings at each temperature and each concentration are measured and recorded as K<subgt;T< / subgt>, that is, the initial conductivity reading of the standard solution at a temperature of T °C. Summarize and form a three-dimensional calibration matrix of water temperature T - initial conductivity reading K<subgt;T< / subgt> - calibration ratio β<subgt;T< / subgt>. Use this to perform temperature compensation on the detected water sample, improving the accuracy of temperature compensation and further ensuring the compensation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of on-line water quality detection, in particular to a temperature compensation algorithm for a water quality conductivity sensor. Background Art

[0002] Conductivity is a basic electro-chemical parameter for measuring the conductivity of a liquid, and is often used to characterize the concentration of conductive ions in a solution. Generally speaking, the purer the solution, the lower the conductivity, and the higher the impurity concentration, the higher the conductivity. Conductivity not only represents the strength of the conductivity of a liquid, but is also an important indicator for measuring chemical quantities such as solution composition, pH value, electrolyte concentration, and water quality. Water quality conductivity is often used as a monitoring indicator to ensure the health of water bodies and aquatic organisms. The detection of water quality conductivity is closely related to temperature. As the temperature increases, the viscosity of the water sample decreases accordingly, resulting in an increase in ion mobility. Even if the ion concentration is constant, the conductivity of the water sample will increase with the increase in temperature. Therefore, the detection result of conductivity must specify a temperature, otherwise it is meaningless. Currently, the reference temperature for the detection of water quality conductivity is usually set at 25 °C (a small number of enterprises also use a reference temperature of 20 °C). Therefore, temperature is one of the main external factors interfering with the accuracy of conductivity detection, and temperature compensation is an important means to improve the detection accuracy of conductivity sensors.

[0003] Currently, conductivity temperature compensation generally uses a potassium chloride (KCl) solution at 25 ± 0.5 °C as a standard reference, and calculates according to the conductivity increasing / decreasing by α% (α is the temperature compensation coefficient, generally fixed at an empirical value of 2.2%) for every 1 °C increase / decrease in temperature. This method may be applicable when detecting relatively clean surface water, that is, when the conductivity change range is small (below 500 mS / m), but there will be large errors when facing seawater or poor water quality conditions.

[0004] In the existing practice, traditional conductivity temperature compensation generally uses the coefficient method, that is, taking 25 °C as the reference temperature, and on this basis, for every 1 °C increase / decrease in temperature, the conductivity increases / decreases by α%. The specific calculation formula is:

[0005]

[0006] where α is the temperature compensation coefficient, and T is the temperature (°C) of the solution to be measured;

[0007] K T is the initial conductivity indication value (mS / m) before temperature compensation at T °C;

[0008] K 25℃ is the conductivity value of the solution at the standard reference temperature (25 °C), that is, the compensation target.

[0009] Most of the early literature calculated α using formula (1) to find patterns, fixed α at the empirical average of 2.2%, and then compensated the conductivity of the solution to be measured based on the difference between the current temperature and the standard temperature of the solution. The formula is as follows:

[0010]

[0011] where T is the current temperature of the solution;

[0012] K T is the initial conductivity reading (mS / m) before temperature compensation at T °C;

[0013] K 25℃ is the conductivity value (mS / m) after compensation to the standard reference temperature (25 °C).

[0014] There are mainly two problems with this method: (1) when the temperature = 25 °C, the denominator of formula (1) is 0, α is meaningless, and the calibration model will have a discontinuous breakpoint at 25 °C; (2) the premise for this method to hold is that the conductivity changes linearly with temperature. However, through experimental verification of a large number of literature and sensor products, as Figure 1 shown, the resistivity-temperature change curve is not a linear function. Assuming the conductivity of a certain solution at T °C is K T , and the conductivity at the standard reference temperature is K 25℃ , its complete calculation formula should be:

[0015] K T = K 25℃ × [1 + α1(T - 25 °C) + α2(T - 25 °C) 2

[0016] where α1 and α2 are polynomial parameters. To simplify the formula, the quadratic term (T - 25 °C) 2 is discarded, and the resulting formula is:

[0017] K T = K 25℃ × [1 + α(T - 25 °C)]

[0018] This formula is a variant of the aforementioned formula (2). Discarding the quadratic term will increase the compensation error at high conductivity or extreme temperatures. Therefore, this method is not applicable to high ranges and wide operating temperature ranges.

[0019] ​Some other documents propose to summarize the results of α calculation according to Formulas (1) and (2) into many linear functions of different initial conductivity readings - temperature, and combine them to form a correction matrix. However, this method still does not solve the problem of the model breakpoint at 25°C. In addition, according to our company's repeated experiments (experimental steps: prepare a series of potassium chloride standard solutions with different concentrations, whose standard conductivities at 25°C are 50 - 20,000 mS / m, and during the temperature change from 5°C to 40°C, test the initial conductivity readings of each standard solution and calculate the correction coefficient α according to Formula (1)), the specific data and results are as Figure 2 shown. After summarizing the correction coefficients obtained by Formula (1), a regular correction matrix cannot be obtained. The slopes of the linear functions between different temperatures are chaotic and the intervals are unequal.

[0020] A large number of documents also show that the temperature compensation coefficient of high-conductivity water samples is not a fixed value, but has certain correlation laws with temperature and conductivity values. Therefore, through exploring this correlation law, this patent proposes a temperature compensation model applicable to a larger conductivity range. Summary of the Invention

[0021] The object of the present invention is to propose a temperature compensation algorithm for a water quality conductivity sensor based on a correction ratio, establish a three-dimensional correction matrix of temperature - initial conductivity reading - correction ratio, simplify the calculation formula, solve the problem of low temperature compensation accuracy of the conductivity sensor in a high range and a wide working temperature range, and improve the accuracy of compensation and environmental adaptability.

[0022] To achieve the first object of the present invention, the present invention discloses a temperature compensation algorithm for a water quality conductivity sensor, specifically as follows:

[0023] Step 1: Prepare a series of conductivity standard solutions with different concentrations, whose standard conductivity values at 25°C are in the range of 50 - 20,000 mS / m, and use a standard conductivity tester calibrated with a calibration solution to test their conductivity values and record them as K ref , that is, the standard conductivity K 25℃ of this standard solution at 25°C, which is used as the correction target and error calculation reference;

[0024] Step 2: Adjust the temperatures of the above-mentioned conductivity standard solutions with different concentrations to vary in the range of S1 - S2 degrees Celsius, with an interval of every S degrees Celsius. Place the conductivity sensor for which a temperature compensation model needs to be established in each of the above-mentioned conductivity standard solutions, and respectively test the initial conductivity readings at each temperature and each concentration, and record them as K T , that is, the initial conductivity reading of this conductivity standard solution at a temperature of T°C;

[0025] Step 3: Let

[0026] Among them, β T is the correction ratio at T °C, which is the ratio of the initial conductivity indication value K T to K 25℃ ; after measuring the initial conductivity indication values of each conductivity standard solution at each temperature and calculating the correction ratio, it is summarized into multiple T-K T linear correlation functions and K T -β T linear correlation functions, which together form a three-dimensional correction matrix of temperature T - initial conductivity indication value K T - correction ratio β T ;

[0027] Step Four: Obtain a new water sample for conductivity detection. When temperature compensation is required, measure its initial conductivity indication value as K T , and the temperature is T. Substitute T into the three-dimensional correction matrix in Step Three to obtain the initial conductivity indication values of multiple conductivity standard solutions corresponding to the temperature T. Through the standard conductivity K 25℃ of each conductivity standard solution obtained in Step One and the formula in Step Three, further obtain the correction ratios β T corresponding to multiple conductivity standard solutions at temperature T, fit the initial conductivity indication values of multiple conductivity standard solutions and multiple correction ratios β T at temperature T, and obtain the linear function of the initial conductivity indication value K T - correction ratio β T at temperature T, as follows:

[0028] β T = b T × K T + c T

[0029] where b T and c T represent the linear slope and intercept respectively;

[0030] Substitute the initial conductivity indication value K T of the new water sample at temperature T, calculate the correction ratio β T of the water sample, and then through the formula in Step Three, convert and obtain the standard conductivity of the water sample compensated to 25 °C to complete the temperature compensation.

[0031] Furthermore, in Step Two, S1 is 5 and S2 is 40.

[0032] Furthermore, in Step Two, there is an interval of every S °C, where S is 5.

[0033] Furthermore, in Step Four, when the temperature T < 25 °C, at the same temperature, the correction ratio βT is linearly and positively correlated with the initial conductivity indication value K T When the temperature T > 25°C, at the same temperature, the calibration ratio β T is linearly and negatively correlated with the initial conductivity indication value K T When the temperature T = 25°C, the calibration ratio = 1, that is, no calibration is required.

[0034] Furthermore, within each temperature range, that is, when the temperature T < 25°C or the temperature T > 25°C, the slope of each correlation line gradually decreases as the temperature increases.

[0035] Furthermore, in the second step, the above-mentioned conductivity standard solutions with different concentrations are respectively placed in a constant temperature water bath to achieve temperature adjustment.

[0036] Furthermore, the number of the series of conductivity standard solutions with different concentrations is 10 - 30.

[0037] Furthermore, the series of conductivity standard solutions with different concentrations is a potassium chloride standard solution.

[0038] The present patent mainly has the following advantages:

[0039] (1) Considering that the conductivity value does not change linearly with temperature, but approaches a curve function, the ratio of the initial conductivity value at each temperature to the standard value at 25°C is used as a dependent variable, representing that the curvature of the curve changes linearly with temperature or the initial conductivity indication value. Based on this principle, a three-dimensional calibration matrix of temperature - initial conductivity indication value - calibration ratio is established to improve the calibration accuracy;

[0040] (2) The traditional calibration coefficient calculation formulas (1, 2) are relatively complex, and the calibration formula (1) also has a meaningless breakpoint at 25°C, which brings interference to the accuracy of the model. The present patent simplifies the calculation formula, and at the same time, the model is continuous without breakpoints at 25°C, ensuring that the calibration accuracy can reach ±0.1°C. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The following specific description given as a non-limiting example better explains what the present invention includes and how it can be implemented. In addition, this description refers to the accompanying drawings, in which:

[0042] Figure 1 is a resistivity (reciprocal of conductivity) - temperature change curve diagram in the background art;

[0043] Figure 2 is a calibration matrix diagram formed by the coefficient method in the background art;

[0044] Figure 3 is a calibration matrix diagram of temperature T - initial conductivity indication value of the present invention;

[0045] Figure 4 is the calibration ratio β of the present invention T - the initial indication value K of conductivity T calibration matrix;

[0046] Figure 5 is the relationship diagram of the initial indication value - calibration ratio at 18.5 °C in Example 1 of the present invention;

[0047] Figure 6 is the relationship diagram of the initial indication value - calibration ratio at 27.6 °C in Example 2 of the present invention. Specific embodiments

[0048] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0049] Example 1

[0050] Step 1: Prepare a series of conductivity standard solutions with different concentrations (12 potassium chloride standard solutions with different concentrations are prepared in this example, hereinafter referred to as "standard solutions"), and the conductivity standard values at 25 °C are in the range of 50 - 20000 mS / m. Use a laboratory standard conductivity tester (calibrated with a calibration solution) to measure their conductivity values and record them as K ref , that is, the standard conductivity K of this standard solution at 25 °C 25 (hereinafter referred to as "standard value"), which is used as the calibration target and error calculation reference;

[0051] Step 2: Place the above potassium chloride standard solutions with different concentrations in a constant temperature water bath respectively, adjust the temperature to change from 5 °C to 40 °C, with an interval of 5 °C for each interval. Considering that 25 °C is the reference standard point, add one temperature point at each end (23 and 28 °C respectively) to ensure the regularity continuity and accuracy, for a total of 10 temperature points;

[0052] Step 3: Place the conductivity sensor for which a temperature compensation model needs to be established in each standard solution, and measure the initial indication values of conductivity at each temperature and each concentration, and record them as K T , that is, the initial conductivity indication value of this standard solution at a temperature of T °C. It should be noted that K 25℃ = K ref ;

[0053] Step 4:

[0054] Let

[0055] where β T is defined as the calibration ratio at T °C, which is the initial indication value K T and K 25℃Ratio. The initial conductivity indication values of each conductivity standard solution at each temperature (hereinafter referred to as "initial indication") are obtained. After calculating the correction ratio, multiple T-K T linear correlation functions and K T -β T linear correlation functions together form the temperature T - initial indication K T -correction ratio β T three-dimensional correction matrix, as Figure 3 and Figure 4 shown.

[0056] From Figure 3 the 12 linear relationships in it, it can be seen that for the conductivity standard solutions with the same concentration, as the temperature gradually increases, its initial indication value K T also gradually increases. There is a good linear relationship between the initial indication value K T and the temperature T. Using this correction matrix, the corresponding initial conductivity indication values of 12 conductivity standard solutions at any temperature T can be deduced.

[0057] From Figure 4 it can be seen that when the temperature < 25 °C, at the same temperature, the correction ratio β T and the initial indication value K T show a linear positive correlation; when the temperature > 25 °C, at the same temperature, the correction ratio β T and the initial indication value K T show a linear negative correlation; when the temperature = 25 °C, the correction ratio = 1, that is, no correction is required;

[0058] There is a linear function relationship between the correction ratio β T and the initial indication value K T , as shown in formula (3), where b T and c T respectively represent the linear slope and intercept of the correction ratio β T and the initial indication value K T at the temperature of T °C;

[0059] β T = b T × K T + c T (3)

[0060] In this embodiment, a certain water sample to be measured is selected for conductivity detection. The sensor is placed in the water sample to be measured, and the initial conductivity indication value of the water sample to be measured is obtained as K T = 32.68 mS / m, and the temperature is T = 18.5 °C; first, substitute T = 18.5 °C into the three-dimensional correction matrix in step four, as Figure 3 the temperature T - conductivity initial indication K TThe calibration matrix can obtain the initial values of 12 conductivity standard solutions corresponding to 18.5 °C, and further obtain the calibration ratio β corresponding to the 12 conductivity standard solutions at 18.5 °C. T , and the obtained data is shown in Table 1:

[0061] Table 1 Initial indication values and calibration ratios of different standard solutions at 18.5 °C

[0062]

[0063] Perform linear fitting on the initial indication values and calibration ratios of the 12 standard solutions in Table 1 at 18.5 °C, as Figure 5 shown, to obtain the calibration ratio β of the sensor at 18.5 °C T - Conductivity initial indication value K T linear function, and the linear function is as follows:

[0064] β T = 7×10 -7 K T + 0.8795

[0065] Substitute K T = 32.68 mS / m into the above linear function to obtain the calibration ratio β of the water sample at 18.5 °C T to be 0.8795;

[0066] Substitute into the formula:

[0067]

[0068] for compensation, so as to obtain the compensated conductivity value K of the water sample at 25 °C = K T / β T = 32.68 / 0.8795 = 37.16 mS / m.

[0069] Example 2:

[0070] Conduct conductivity detection on a water sample at a certain estuary. Place the sensor in the water sample to obtain the initial conductivity indication value of the water sample to be measured as K T = 3849.19 mS / m and the temperature is T = 27.6 °C; First, substitute T = 27.6 °C into the Figure 2 T - conductivity initial indication value K T in the calibration matrix of Example 1, and the initial values of 12 conductivity standard solutions corresponding to 27.6 °C can be obtained, and then the calibration ratio β corresponding to the 12 conductivity standard solutions at 27.6 °C can be obtained T , and the obtained data is shown in Table 2:

[0071] Table 2 Initial indication values and calibration ratios of different standard solutions at 27.6 °C

[0072]

[0073] Perform a linear fit on the initial readings and calibration ratios of the 12 standard solutions in Table 2 at 27.6 °C to obtain the calibration ratio β of the sensor at 27.6 °C T - Initial reading of conductivity K T Linear function, such as Figure 6 As shown, the linear function is as follows:

[0074] β T = -7×10 -7 K T + 1.0580

[0075] Substitute K T = 3849.19 mS / m into the above linear function to obtain the calibration ratio β of the water sample at 27.6 °C T which is 1.0553;

[0076] Substitute into the formula:

[0077]

[0078] Perform compensation to obtain the compensated conductivity value K = K T / β T = 3849.19 / 1.0553 = 3647.48 mS / m.

[0079] Example 3

[0080] To test the accuracy of the calibration matrix, six of the potassium chloride standard solutions in Example 1 were selected as unknown water samples to be measured and tested at different temperatures. Referring to the compensation and calibration process in Example 1, substitute the compensated results into Table 3 and compare the relative error with the standard value. Specifically, see Table 3:

[0081] Table 3 Calibration results of six potassium chloride standard solutions at different temperatures

[0082]

[0083] Conclusion: It can be seen that the compensated conductivity value obtained by back-calculation after substituting the three-dimensional calibration matrix is very close to the standard conductivity value during modeling. The relative errors of the compensated results are all within ±1%, meeting the environmental protection industry standard "Technical Requirements for Conductivity Water Quality Automatic Analyzers", further indicating the high accuracy of the patent solution.

[0084] Example 4:

[0085] To verify the compensation and calibration effect of the model on actual water samples, actual water samples from four regions such as Shanxi, Fujian, and Hefei were selected and tested under the conditions of 5 - 40°C. Referring to the compensation and calibration process of Example 1, the compensated results were substituted into Table 4, and the obtained calibration values were compared with the standard conductivity at 25°C.

[0086] Table 4 Temperature Compensation Results of Actual Water Samples

[0087]

[0088] Conclusion: It can be seen that the compensated conductivity values obtained by back-calculation after substituting the three-dimensional calibration matrix are very close to the standard conductivity values, and the relative errors of the compensated results are all within ±1%, meeting the technical requirements of the environmental protection industry standard "Technical Requirements for Automatic Water Quality Analyzers for Conductivity". Therefore, the calibration effect of this calibration model on actual water samples also meets the environmental standard requirements.

[0089] The standard reference temperature described in this patent can also be selected as 20°C, and its compensation process is the same as above.

Claims

1. Temperature compensation algorithm for water quality conductivity sensor, characterized in that: Step 1: Prepare a series of conductivity standard solutions with different concentrations, whose conductivity standard values at 25°C are in the range of 50 to 20,000 mS / m. Use a standard conductivity tester calibrated with a calibration solution to measure their conductivity values respectively, and record them as , that is, the standard conductivity of this conductivity standard solution at 25°C , which is used as the calibration target and the reference for error calculation; Step 2: Adjust the temperatures of the above conductivity standard solutions with different concentrations to vary within the range of S1 to S2 degrees Celsius, with an interval of S degrees Celsius. Place the conductivity sensor for which a temperature compensation model needs to be established into each of the above conductivity standard solutions, and respectively measure the initial conductivity indication values at each temperature and each concentration, and record them as , that is, the initial conductivity indication value of this conductivity standard solution at a temperature of T °C; Step 3: Let ; Among them, is the corrected ratio at T °C, which is the ratio of the initial conductivity indication K T to K 25℃ ; after measuring the initial conductivity indications of each conductivity standard solution at each temperature and calculating the corrected ratio, it is summarized into multiple T-K T linear correlation functions at temperatures from S1 to S2 degrees Celsius and K T - linear correlation functions, which together form a temperature T-initial conductivity indication K T -corrected ratio three-dimensional correction matrix; Step 4: Obtain a new water sample for conductivity detection. When temperature compensation is required, measure its initial conductivity indication as , with the temperature being T. Substitute T into the three-dimensional calibration matrix in Step 3 to obtain the initial conductivity indications of multiple conductivity standard solutions corresponding to temperature T. Through the standard conductivity of each conductivity standard solution obtained in Step 1 and the formula in Step 3, further obtain the calibration ratios corresponding to multiple conductivity standard solutions at temperature T, and fit the linear function of the initial conductivity indications and multiple calibration ratios - calibration ratio at temperature T, as shown in the following formula: where b T and c T represent the linear slope and intercept respectively; Substitute the initial conductivity indication value of the new water sample at temperature T , and calculate the correction ratio of this water sample , and then through the formula in step three, convert and obtain the standard conductivity of this water sample compensated to 25 °C to complete the temperature compensation.

2. The temperature compensation algorithm of the water quality conductivity sensor according to claim 1, characterized in that: In step two, S1 is 5 and S2 is 40.

3. The temperature compensation algorithm of the water quality conductivity sensor according to claim 1, characterized in that: In the said step two, every S degrees Celsius is an interval, where S is 5.

4. The temperature compensation algorithm of the water quality conductivity sensor according to claim 1, characterized in that: In the fourth step, when the temperature T < 25°C, at the same temperature, the calibration ratio is linearly positively correlated with the initial conductivity indication value K T ; when the temperature T > 25°C, at the same temperature, the calibration ratio is linearly negatively correlated with the initial conductivity indication value K T ; when the temperature T = 25°C, the calibration ratio = 1, that is, no calibration is required.

5. The temperature compensation algorithm of the water quality conductivity sensor according to claim 4, characterized in that: In each temperature region, that is, when the temperature T < 25 °C or the temperature T > 25 °C, the slope of each correlation straight line gradually decreases as the temperature rises.

6. The temperature compensation algorithm of the water quality conductivity sensor according to claim 1, characterized in that: In the said step two, the above-mentioned conductivity standard solutions with different concentrations are respectively placed in a constant temperature water bath to achieve temperature adjustment.

7. The temperature compensation algorithm of the water quality conductivity sensor according to claim 1, characterized in that: The number of the said series of conductivity standard solutions with different concentrations is 10 - 30.

8. The temperature compensation algorithm of the water quality conductivity sensor according to claim 1, characterized in that: The said series of conductivity standard solutions with different concentrations are potassium chloride standard solutions.

Citation Information

Patent Citations

  • Nonlinear temperature compensation method for conductivity measurement

    CN108169565A

  • Temparature-compensated concentration sensor for ice-remover solution

    KR1020130003953A