Data processing method and system of water quality analyzer and readable storage medium
By collecting the energy value of the reference detector in real time, calculating the emission angle of the light source, and correcting the incident light intensity, the influence of ambient temperature on the water quality analyzer is solved, thus improving the accuracy and precision of the analysis.
Patent Information
- Application Number
- CN202511441300.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-10-10
AI Technical Summary
Existing water quality analyzers are affected by changes in ambient temperature, resulting in poor equipment stability and accuracy. In particular, changes in the emission angle and energy of the light source affect the measured values.
By collecting the energy value of each pixel of the reference detector, the emission angle of the light source is calculated, and the incident light intensity is corrected according to the ambient temperature and the emission angle of the light source. The transmitted light intensity is then corrected in conjunction with the temperature of the water sample to be analyzed, and the absorbance is calculated.
This improves the analytical precision and accuracy of the water quality analyzer and reduces the impact of ambient temperature changes on the measurement results.
Smart Images

Figure CN120908111B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of analytical testing technology, specifically relating to a data processing method, system, and readable storage medium for a water quality analyzer. Background Technology
[0002] Most existing water quality analyzers employ spectrophotometry, based on Beer-Lambert's law for quantitative analysis. However, in practical applications, this method is susceptible to various interferences, including ambient temperature, stray light, and scattering or reflection from non-uniform sample solutions, resulting in poor equipment stability and accuracy. Among these, ambient temperature is the most significant influencing factor. Changes in ambient temperature cause minute structural deformations, affecting the emission angle of the light source, the energy of the light source itself, and the temperature of the sample solution, thus impacting the measured values. Summary of the Invention
[0003] Based on the aforementioned shortcomings and deficiencies in the prior art, one of the objectives of this invention is to at least solve one or more of the aforementioned problems in the prior art. In other words, one of the objectives of this invention is to provide a data processing method, system, and readable storage medium for a water quality analyzer that meets one or more of the aforementioned requirements.
[0004] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0005] A data processing method for a water quality analyzer, the water quality analyzer comprising a light source, a first lens, a filter, a dichroic beam splitter, a measuring cell, a second lens, an aperture stop, and a detector arranged sequentially along the detection optical path. The light emitted by the light source passes through the first lens and the filter and is reflected by the dichroic beam splitter to obtain a reference beam, which is then converged by a third lens and enters the reference detector to form a reference optical path. The reference detector is connected to the light source modulator signal of the light source.
[0006] The data processing method includes the following steps:
[0007] S1. Collect the energy value of each pixel of the reference detector and search for the energy peak I. f And from the energy peak I f Searching for energy values I≤I on both sides f The first pixel of / 2 is used to obtain pixel X1 and pixel X2;
[0008] S2. Calculate the light source emission angle based on pixel X1, pixel X2, and the length of the reference optical path;
[0009] S3. Correct the incident light intensity based on the ambient temperature and the emission angle of the light source to obtain the corrected incident light intensity, and calculate the absorbance based on the corrected incident light intensity.
[0010] As a preferred embodiment, in step S2, the emission angle θ of the light source is:
[0011] ;
[0012] Where L is the length of the reference optical path, L = L1 + L2, L1 is the distance between the light source and the dichroic beam splitter, and L2 is the distance between the dichroic beam splitter and the reference detector.
[0013] As a preferred embodiment, the reference detector is a CMOS linear array detector.
[0014] As a preferred embodiment, in step S3, the corrected incident light intensity for:
[0015] ;
[0016] Where k1 and b are fitting coefficients, T is the ambient temperature, and θ is the emission angle of the light source. The incident light intensity is denoted as .
[0017] As a preferred embodiment, the emission angle of the light source is no greater than 20°.
[0018] As a preferred embodiment, in step S3, the absorbance A is:
[0019] ;
[0020] Among them, I t This represents the intensity of transmitted light.
[0021] As a preferred embodiment, step S3 further includes:
[0022] The transmitted light intensity of the water sample to be analyzed is corrected based on the temperature of the water sample in the measuring cell and the operating temperature of the detector to obtain the corrected transmitted light intensity; then the absorbance is calculated based on the corrected incident light intensity and the corrected transmitted light intensity.
[0023] As a preferred embodiment, the corrected transmitted light intensity for:
[0024] ;
[0025] Where k2, k3, and k4 are fitting coefficients, t1 is the temperature of the water sample to be analyzed, t2 is the operating temperature of the detector, and I t The transmitted light intensity is the light intensity of the water sample to be analyzed.
[0026] The present invention also provides a data processing system for a water quality analyzer, which applies the data processing method described in any of the preceding embodiments, wherein the data processing system includes:
[0027] The acquisition module is used to acquire the energy value of each pixel of the reference detector;
[0028] Search module, used to search for energy peak I f And from the energy peak I f Searching for energy values I≤I on both sides f The first pixel of / 2 is used to obtain pixel X1 and pixel X2;
[0029] The calculation module is used to calculate the emission angle of the light source based on pixel X1, pixel X2 and the length of the reference optical path;
[0030] The correction module is used to correct the incident light intensity based on the ambient temperature and the emission angle of the light source, so as to obtain the corrected incident light intensity.
[0031] The calculation module is also used to calculate the absorbance based on the corrected incident light intensity.
[0032] The present invention also provides a readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the data processing method as described in any of the preceding embodiments.
[0033] Compared with the prior art, the beneficial effects of this invention are:
[0034] (1) Based on the change of the light source emission angle, the present invention collects the energy value of each pixel of the reference detector in real time, and obtains the real-time light source emission angle accordingly. Then, the incident light intensity is corrected according to the ambient temperature and the light source emission angle, which effectively improves the calculation accuracy of absorbance and thus improves the analysis accuracy of the water quality analyzer.
[0035] (2) Based on the energy distribution of the light spot on the reference detector, the present invention can accurately calculate the divergence angle of the light spot, i.e. the emission angle of the light source;
[0036] (3) The present invention corrects the transmitted light intensity based on the temperature of the water sample to be analyzed in the measuring cell and the working temperature of the detector, thereby further improving the accuracy of absorbance calculation and further improving the analytical precision of the water quality analyzer. Attached Figure Description
[0037] Figure 1 This is a structural diagram of the water quality analyzer according to Embodiment 1 of the present invention;
[0038] Figure 2 This is a block diagram of the data processing system of the water quality analyzer in Embodiment 1 of the present invention;
[0039] Figure 3 This is a comparison graph showing the linear relationship between absorbance and standard solution concentration obtained by the data processing method of Embodiment 1 and Comparative Example 1 of the present invention;
[0040] Figure 4 This is a comparison chart of the concentration (after correction) obtained by the data processing method of Embodiment 1 of the present invention and the concentration (before correction) obtained by the data processing method of Comparative Example 1.
[0041] Figure 5 This is a pixel distribution map and light intensity distribution map collected by a reference detector in a specific application example of the present invention. Detailed Implementation
[0042] To more clearly illustrate the embodiments of the present invention, specific implementation methods will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0043] Example 1:
[0044] like Figure 1 As shown, the water quality analyzer of this embodiment includes a light source 1, a first lens 2, a filter 3, a dichroic beam splitter 4, a measuring cell 5, a second lens 6, an aperture stop 7 and a detector 8 arranged sequentially along the detection optical path, and also includes a light source modulator 9, a third lens 10 and a reference detector 11.
[0045] In this process, the light emitted by the light source 1 passes through the first lens 2, the filter 3, and is reflected by the dichroic beam splitter 4 to obtain a reference beam. This beam is then converged by the third lens 10 and enters the reference detector 11 to form a reference optical path. The reference detector 11 is connected to the light source modulator 9 of the light source 1 through the existing reference system 12 of the water quality analyzer.
[0046] Before starting water quality analysis, the aforementioned water quality analyzer first determines the homogeneity of the water sample to be analyzed. The specific process is as follows: First, the absorbed light intensity of the water sample to be analyzed is measured and then compared with the absorbed light intensity of the zero sample. If the ratio of the absorbed light intensity of the water sample to the absorbed light intensity of the zero sample is ≥0.98, it indicates that the homogeneity of the water sample to be analyzed is good; otherwise, dual-wavelength interference subtraction or pretreatment methods should be used to reduce the interference of the sample itself. Additionally, if the ratio of the absorbed light intensity of the mixture of the zero sample and the analytical reagent to the absorbed light intensity of the zero sample is ≥0.98, it indicates that the background absorption of the analytical reagent is very small and has virtually no impact on Beer-Lambert's law; otherwise, it indicates that the absorption of the analytical reagent itself is large and cannot be ignored, requiring dual-wavelength interference subtraction. Specific details regarding dual-wavelength interference subtraction and pretreatment methods can be found in existing technologies and will not be elaborated here.
[0047] The data processing method for the aforementioned water quality analyzer specifically includes the following steps:
[0048] (1) Collect the energy value of each pixel of the reference detector and search for the energy peak I.f And from the energy peak I f Searching for energy values I≤I on both sides f The first pixel of / 2 is used to obtain pixel X1 and pixel X2;
[0049] In this embodiment, the reference detector is a CMOS linear array detector with a pixel unit size of 25*500μm, a total of 512 pixels, and a detection area of 12.8*0.5mm. Based on the energy distribution of the light source spot on the reference detector, the divergence angle of the spot, i.e., the emission angle of the light source, can be calculated. The energy peak I is then found. f Then, search for energy values I≤I to the left and right. f The first pixel of / 2 is used to determine pixel X1 and pixel X2.
[0050] (2) The emission angle θ of the light source is calculated based on pixel X1, pixel X2 and the reference optical path length L;
[0051] Specifically, the emission angle θ of the above light source is:
[0052] ;
[0053] Where L is the reference optical path length, L = L1 + L2, L1 is the distance between the light source and the dichroic beam splitter, and L2 is the distance between the dichroic beam splitter and the reference detector, as detailed below. Figure 1 As shown.
[0054] The smaller the emission angle of the light source, the greater the brightness; the larger the angle, the smaller the brightness. Therefore, the emission angle of the light source in this embodiment is preferably no greater than 20°.
[0055] (3) Correct the incident light intensity according to the ambient temperature and the emission angle of the light source to obtain the corrected incident light intensity;
[0056] The transmitted light intensity of the water sample to be analyzed is also corrected based on the temperature of the water sample in the measuring cell and the operating temperature of the detector, so as to obtain the corrected transmitted light intensity.
[0057] Finally, the absorbance is calculated based on the corrected incident light intensity and the corrected transmitted light intensity, and the component concentration of the water sample to be analyzed is calculated based on the absorbance.
[0058] The corrected incident light intensity in this embodiment for:
[0059] ;
[0060] Where k1 and b are fitting coefficients, T is the ambient temperature, and θ is the emission angle of the light source. The incident light intensity is denoted as .
[0061] The corrected transmitted light intensity in this embodiment for:
[0062] ;
[0063] Where k2, k3, and k4 are fitting coefficients, t1 is the temperature of the water sample to be analyzed, t2 is the operating temperature of the detector, and I t The transmitted light intensity is the light intensity of the water sample to be analyzed.
[0064] The absorbance A in this embodiment is:
[0065] ;
[0066] The concentration of components in the water sample to be analyzed, calculated based on absorbance, is existing technology and will not be elaborated here.
[0067] Based on the above data processing method, this embodiment also provides a corresponding data processing system for a water quality analyzer, such as... Figure 2 As shown, it includes the following functional modules: acquisition module, search module, calculation module, and correction module;
[0068] The aforementioned acquisition module is used to acquire the energy value of each pixel of the reference detector;
[0069] The aforementioned search module is used to search for energy peak I. f And from the energy peak I f Searching for energy values I≤I on both sides f The first pixel of / 2 is used to obtain pixel X1 and pixel X2;
[0070] The above calculation module is used to calculate the emission angle of the light source based on pixel X1, pixel X2 and the length of the reference optical path;
[0071] The aforementioned correction module is used to correct the incident light intensity based on the ambient temperature and the emission angle of the light source to obtain the corrected incident light intensity; it is also used to correct the transmitted light intensity of the water sample to be analyzed based on the temperature of the water sample to be analyzed in the measuring cell and the operating temperature of the detector to obtain the corrected transmitted light intensity.
[0072] The aforementioned calculation module is also used to calculate absorbance based on the corrected incident light intensity and the corrected transmitted light intensity.
[0073] This embodiment also provides a readable storage medium storing instructions. When the instructions are executed on a computer, the computer performs the data processing method described above in this embodiment, thereby realizing intelligent data processing.
[0074] Comparative Example 1:
[0075] The difference between the data processing method of the water quality analyzer in this comparative example and that in Example 1 is:
[0076] The absorbance is obtained by taking the logarithm of the ratio of the uncorrected incident light intensity to the uncorrected transmitted light intensity.
[0077] The data processing methods of Example 1 and Comparative Example 1 are compared and verified below:
[0078] Ammonia nitrogen standard solution was used as the standard solution. The results of the analysis of ammonia nitrogen standard solutions with different concentrations are shown in Table 1.
[0079] Table 1. Absorbance of ammonia nitrogen standard solutions at different concentrations
[0080] ;
[0081] Based on the absorbance data in Table 1, plot a linear graph of absorbance versus standard solution concentration, as follows: Figure 3 As shown, the absorbance obtained by the data processing method in Example 1 has the best linearity, R 2 It achieves a value of 0.9999, which is significantly better than the data processing method used in Comparative Example 1.
[0082] Furthermore, the data processing method of Example 1 was used for long-term measurement of a 1.5 mg / L standard solution, such as... Figure 4 As shown, comparing the data processing method of Example 1 with that of Comparative Example 1, it can be seen that the absorbance obtained by the data processing method of Example 1 is significantly more stable than that of Comparative Example 1, and the accuracy of the data is also closer to the theoretical value.
[0083] Furthermore, the data processing method described in Example 1 was applied to a specific application example for detecting an ammonia nitrogen standard sample with a concentration of 8 mg / L. The specific process is as follows:
[0084] First, the energy value of each pixel of the reference detector is collected, i.e., the light intensity distribution is as follows: Figure 5 As shown, the search energy peak I f Given 20491, search for energy values I≤I on both sides. f The first pixel of / 2 is obtained as pixel X1 = 212 and pixel X2 = 337;
[0085] Then, the emission angle of the light source is calculated based on pixel X1, pixel X2 and the reference optical path length L; specifically, the reference optical path length L = 110 mm;
[0086] ;
[0087] Next, the incident light intensity was corrected based on the ambient temperature T = 28.086℃ and the emission angle θ of the light source, resulting in the corrected incident light intensity:
[0088] ;
[0089] The transmitted light intensity of the water sample to be analyzed is also corrected based on the temperature of the water sample in the measuring cell and the operating temperature of the detector, resulting in the corrected transmitted light intensity:
[0090] ;
[0091] Finally, the absorbance was calculated as follows:
[0092] This translates to an ammonia nitrogen concentration of 7.954 mg / L.
[0093] The absorbance obtained using the data processing method in Comparative Example 1 is:
[0094] This translates to an ammonia nitrogen concentration of 8.655 mg / L.
[0095] Therefore, the data processing method of this invention can effectively improve the analytical accuracy of water quality analyzers.
[0096] The above description is merely a detailed explanation of preferred embodiments and principles of the present invention. For those skilled in the art, there may be changes in specific implementation methods based on the ideas provided by the present invention, and these changes should also be considered within the scope of protection of the present invention.
Claims
1. A data processing method for a water quality analyzer, characterized in that, The water quality analyzer includes a light source, a first lens, a filter, a dichroic beam splitter, a measuring cell, a second lens, an aperture stop, and a detector arranged sequentially along the detection optical path. The light emitted by the light source passes through the first lens and the filter and is reflected by the dichroic beam splitter to obtain a reference beam, which is then converged by the third lens and enters the reference detector to form a reference optical path. The reference detector is connected to the light source modulator signal of the light source. The data processing method includes the following steps: S1. Collect the energy value of each pixel of the reference detector and search for the energy peak. I f and from the energy peak I f Search for energy values on both sides I ≤ I f The first pixel of / 2 is obtained. X 1 and pixel X 2; S2, Based on pixels X 1. Pixel X 2. The emission angle of the light source is obtained by calculating the length of the reference optical path; S3. Correct the incident light intensity based on the ambient temperature and the emission angle of the light source to obtain the corrected incident light intensity. The transmitted light intensity of the water sample to be analyzed is corrected based on the temperature of the water sample in the measuring cell and the operating temperature of the detector, and the corrected transmitted light intensity is obtained. The absorbance is then calculated based on the corrected incident light intensity and the corrected transmitted light intensity. The corrected incident light intensity for: ; in, k 1. b These are the fitting coefficients. T For ambient temperature, θ The emission angle of the light source. The incident light intensity; The corrected transmitted light intensity for: ; in, k 2. k 3. k 4 is the fitting coefficient. t 1 represents the temperature of the water sample to be analyzed. t 2 represents the detector's operating temperature. I t The transmitted light intensity is the light intensity of the water sample to be analyzed.
2. The data processing method according to claim 1, characterized in that, In step S2, the light source emission angle θ for: ; in, L For reference optical path length, L = L 1+ L 2, L 1 represents the distance between the light source and the dichroic beam splitter. L 2 represents the distance between the dichroic beam splitter and the reference detector.
3. The data processing method according to claim 1, characterized in that, The reference detector is a CMOS linear array detector.
4. The data processing method according to claim 1, characterized in that, The emission angle of the light source is no greater than 20°.
5. A data processing system for a water quality analyzer, employing the data processing method as described in any one of claims 1-4, characterized in that, The data processing system includes: The acquisition module is used to acquire the energy value of each pixel of the reference detector; Search module, used to search for energy peaks I f and from the energy peak I f Search for energy values on both sides I ≤ I f The first pixel of / 2 is obtained. X 1 and pixel X 2; The calculation module is used to calculate based on pixel points. X 1. Pixel X 2. The emission angle of the light source is obtained by calculating the length of the reference optical path; The correction module is used to correct the incident light intensity based on the ambient temperature and the emission angle of the light source to obtain the corrected incident light intensity; it is also used to correct the transmitted light intensity of the water sample to be analyzed based on the temperature of the water sample to be analyzed in the measuring cell and the operating temperature of the detector to obtain the corrected transmitted light intensity. The calculation module is also used to calculate the absorbance based on the corrected incident light intensity and the corrected transmitted light intensity.
6. A readable storage medium storing instructions, characterized in that, When the instructions are executed on a computer, they cause the computer to perform the data processing method as described in any one of claims 1-4.
Citation Information
Patent Citations
Water quality detection device and water quality detection method
CN106644974A
System utilizing energy method to rapidly measure fiber emitting focal ratio
CN107063634A