Water turbidity detection method and device and electronic equipment
The water flow rate and temperature are obtained through an ultrasonic meter, the amplitude is calibrated and the turbidity is determined, which solves the complexity and high cost of existing water quality turbidity detection equipment, and achieves low power consumption and accurate water quality monitoring suitable for terminal products.
Patent Information
- Application Number
- CN202411202841.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-17
AI Technical Summary
The existing water quality turbidity detection equipment is complex, high in price, and is not suitable for long-term online use. The ultrasonic measurement method is complex in circuits, making it difficult to achieve low power consumption performance, and is not suitable for small-volume, battery-powered terminal products.
The flow rate and temperature of the water body are obtained through an ultrasonic meter, the measured amplitude of the ultrasonic signal is calibrated, the amplitude attenuation rate is determined at the flow rate and temperature, the turbidity of the water quality is determined based on the amplitude attenuation rate, and the existing ultrasonic water meter structure and circuit design are used. There is no need to add an optical turbidity detection sensor to monitor the envelope amplitude changes of the ultrasonic received signal in real time.
It realizes accurate detection of water quality turbidity, reduces equipment complexity and cost, is suitable for small-volume, battery-powered terminal products, and is suitable for water quality protection and water resource management.
Smart Images

Figure CN119147628A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality detection, and in particular to a water quality turbidity detection method, device and electronic equipment. Background Art
[0002] Water turbidity testing is of great significance for water quality assessment and pollution monitoring, ecological protection and biological health, industrial production and quality control, and public safety. Through scientific and accurate turbidity testing, we can better understand the status of water bodies and provide strong support for water quality protection and water resources management.
[0003] In the related technology, turbidity detection methods include optical turbidity detection sensors and turbidity detection methods based on ultrasonic measurement. Optical turbidity detection sensors are complex and expensive, and their performance is easily degraded after long-term online use; turbidity detection methods based on ultrasonic measurement require the emission of ultrasonic signals of multiple frequencies and amplitudes, and the measurement circuit is relatively complex, making it difficult to achieve low power consumption performance, and are not suitable for use in small-volume, battery-powered terminal products. Summary of the invention
[0004] The present invention provides a water quality turbidity detection method, device and electronic equipment, which are used to solve the defects of the prior art that the turbidity detection equipment is complicated and the detection effect is poor.
[0005] The present invention provides a method for detecting water turbidity, comprising: Obtain the current flow rate and temperature of the water body to be tested through an ultrasonic meter; Determining a measured amplitude of the ultrasonic signal at the flow rate and temperature, and calibrating the measured amplitude to obtain a calibrated amplitude; Determining a current amplitude decay rate at the flow rate and temperature based on the calibration amplitude and the standard amplitude; Based on the relationship between turbidity and amplitude decay rate, and the current amplitude decay rate, the water quality turbidity of the water body to be detected is determined.
[0006] According to the water turbidity detection method provided by the present invention, the measuring amplitude is calibrated to obtain the calibration amplitude, including: Determining a current flow rate calibration coefficient based on the flow rate and a relationship between the flow rate and the flow rate calibration coefficient; Determining a current temperature calibration coefficient based on the temperature and a relationship between the temperature and the temperature calibration coefficient; The measurement amplitude is calibrated based on the current flow rate calibration coefficient and the current temperature calibration coefficient to obtain a calibration amplitude.
[0007] According to the water turbidity detection method provided by the present invention, the relationship between the flow rate and the flow rate calibration coefficient is determined based on the following steps: Obtaining first amplitudes corresponding to the water body at each flow rate in a first state, wherein the first state refers to a state at a standard temperature, when the water turbidity is zero and the flow rate of the water body is not zero; Determine the flow rate calibration coefficient corresponding to each flow rate based on the first amplitude corresponding to each flow rate and the standard amplitude; The flow rate calibration coefficients corresponding to each flow rate are subjected to piecewise linear fitting to obtain the relationship between the flow rate and the flow rate calibration coefficient.
[0008] According to the water turbidity detection method provided by the present invention, the relationship between the temperature and the temperature calibration coefficient is determined based on the following steps: Obtaining second amplitudes corresponding to the water body at each temperature in a second state, wherein the second state refers to a state in which the water turbidity is zero, the flow rate of the water body is zero, and the temperature of the water body is a non-standard temperature; Determine the temperature calibration coefficients corresponding to the respective temperatures based on the second amplitudes corresponding to the respective temperatures and the standard amplitudes; The temperature calibration coefficients corresponding to the respective temperatures are subjected to piecewise linear fitting to obtain the relationship between the temperature and the temperature calibration coefficient.
[0009] According to the water turbidity detection method provided by the present invention, the relationship between the turbidity and the amplitude decay rate is determined based on the following steps: Obtaining third amplitudes corresponding to the water body at each turbidity in a third state, wherein the third state refers to a state at a standard temperature, a flow rate of the water body is zero and the turbidity of the water quality is not zero; Determine the amplitude attenuation rate corresponding to each turbidity based on the third amplitude corresponding to each turbidity and the standard amplitude; The amplitude decay rates corresponding to the respective turbidities are subjected to piecewise linear fitting to obtain the relationship between the turbidity and the amplitude decay rate.
[0010] According to the water turbidity detection method provided by the present invention, the standard amplitude is determined based on the following steps: Obtaining the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal of the water body under the standard state, wherein the standard state refers to a state under the standard temperature, the flow velocity of the water body is zero, and the turbidity of the water quality is zero; The standard amplitude is determined based on the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal.
[0011] According to the water turbidity detection method provided by the present invention, the method further comprises: After a preset time, the current standard amplitude is automatically updated under standard conditions.
[0012] According to the water turbidity detection method provided by the present invention, after determining the water turbidity of the water body to be detected, the method further comprises: Determine the water turbidity change value for each detection, and filter the water turbidity based on the water turbidity change value and a low-pass filter; and / or,
[0013] When the water turbidity exceeds a preset threshold, an alarm is issued.
[0014] The present invention also provides a water turbidity detection device, comprising: An acquisition unit, used for acquiring the current flow rate and temperature of the water body to be detected through an ultrasonic meter; an amplitude calibration unit, used to determine the measured amplitude of the ultrasonic signal at the flow rate and temperature, and calibrate the measured amplitude to obtain a calibrated amplitude; a decay rate determination unit, configured to determine a current amplitude decay rate at the flow rate and temperature based on the calibration amplitude and the standard amplitude; The turbidity determination unit is used to determine the water quality turbidity of the water body to be detected based on the relationship between turbidity and amplitude decay rate and the current amplitude decay rate.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned water turbidity detection methods is implemented.
[0016] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the water turbidity detection method as described above is implemented.
[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the water turbidity detection method as described above is implemented.
[0018] The water quality turbidity detection method, device and electronic equipment provided by the present invention can utilize the existing structure and circuit design of the existing ultrasonic water meter, and can realize the detection of water quality turbidity without adding a separate optical turbidity detection sensor, and then monitor the turbidity change of water quality by real-time monitoring the envelope amplitude change of the ultrasonic receiving signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 This is one of the flow diagrams of the water turbidity detection method provided by the present invention.
[0021] Figure 2 The present invention provides a schematic diagram of the structure of the ultrasonic water meter measuring pipe section.
[0022] Figure 3 It is a waveform schematic diagram of the ultrasonic signal provided by the present invention.
[0023] Figure 4 It is a schematic diagram of the peak-to-peak value result of the ultrasonic receiving signal provided by the present invention.
[0024] Figure 5 It is a structural schematic diagram of the water turbidity detection device provided by the present invention.
[0025] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] In the related art, common water turbidity detection generally uses optical turbidity detection sensors. This type of sensor has high accuracy, but the overall equipment is relatively complex, the price is high and it is not suitable for long-term installation in public utility networks to monitor turbidity conditions in real time.
[0028] There is also a method that uses the principle of Doppler frequency shift to measure water turbidity by measuring the frequency change of ultrasonic signals propagating in water. The Doppler frequency shift principle requires measuring the frequency change during ultrasonic propagation, and requires high accuracy for frequency measurement. The transmitted signal is required to be a pure tone signal as much as possible to ensure that other interference is reduced during the measurement process. The entire measurement circuit has high requirements for the signal processing part, and the overall circuit design cost is high and difficult to achieve. In addition, one or more separate receiver transducers need to be set in the measurement circuit.
[0029] There is also a water quality turbidity measurement device with a specially designed structure. This device requires the design of a special sealed pressure chamber, and the installation of temperature and pressure sensors for turbidity measurement and calibration. The cost is also high, and it can be used to measure water quality turbidity at larger endpoints in public utility networks, but is not suitable for water meter terminal monitoring.
[0030] There is also a method to calculate the turbidity of the liquid by measuring the changes in the frequency and amplitude of the ultrasonic receiving signal. This method requires the emission of ultrasonic signals of multiple frequencies and amplitudes. The measurement circuit is relatively complex and it is difficult to achieve low power consumption performance. It is not suitable for use in small-volume, battery-powered terminal products. In addition, ultrasonic transducers generally operate at one operating frequency. If ultrasonic signals of multiple frequencies need to be emitted, an ultrasonic transducer that supports multiple different frequencies needs to be used. Otherwise, it is difficult to obtain a good matching effect and is relatively difficult to achieve.
[0031] In view of the above problems, an embodiment of the present invention provides a water quality turbidity detection method, in which the current flow rate and temperature of the water body to be detected are obtained through an ultrasonic meter; the measurement amplitude of the ultrasonic signal at the flow rate and temperature is determined, and the measurement amplitude is calibrated to obtain the calibration amplitude; based on the calibration amplitude and the standard amplitude, the current amplitude attenuation rate at the flow rate and temperature is determined; based on the relationship between turbidity and amplitude attenuation rate, and the current amplitude attenuation rate, the water quality turbidity of the water body to be detected is determined. The embodiment of the present invention can utilize the existing structure and circuit design of the existing ultrasonic water meter, and can realize turbidity detection without adding a separate optical turbidity detection sensor, and then monitor the turbidity change of water quality by real-time monitoring the envelope amplitude change of the ultrasonic receiving signal.
[0032] The embodiments of the present invention can be applied to scenarios where water turbidity detection is required. The execution subject of the method can be an electronic device such as a terminal device, a computer, a server, a server cluster, or a specially designed water turbidity detection device, or it can be a water turbidity detection device set in the electronic device. The water turbidity detection device can be implemented by software, hardware, or a combination of both.
[0033] It should be noted that the method provided in the embodiment of the present invention can be used not only for water turbidity detection, but also for turbidity detection of other liquids and gases, such as in the fuel gas turbidity detection scenario.
[0034] In the description of the embodiments of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0035] Figure 1 It is one of the flow charts of the water turbidity detection method provided by the present invention, such as Figure 1 As shown, the method comprises the following steps: Step 110, obtaining the current flow rate and temperature of the water body to be detected through an ultrasonic meter.
[0036] Specifically, the water body to be detected is the water body that needs to be tested for turbidity. The embodiment of the present invention first introduces the principle of turbidity detection. The optical turbidity monitoring sensor utilizes the phenomenon that light will be scattered when it encounters impurities in the liquid, thereby causing the intensity of the received light to attenuate in liquids with different turbidity. The turbidity of the liquid can be measured based on the attenuation.
[0037] When an ultrasonic signal encounters impurities in a liquid, scattering will also occur, causing the amplitude of the received ultrasonic signal to attenuate. The turbidity of the liquid can also be measured using this attenuation change.
[0038] The structure of ultrasonic meters for non-Doppler metering methods usually includes ultrasonic meter pipe sections, uplink ultrasonic transducers, downlink ultrasonic transducers, and ultrasonic metering circuits. Usually, ultrasonic flow measurement is done by sending ultrasonic signals through the uplink ultrasonic transducer, and then the downlink transducer receives the signal and measures the downlink flight time Tdown of the ultrasonic signal; the downlink ultrasonic transducer sends ultrasonic signals again, and the uplink transducer receives the signal and measures the uplink flight time Tup of the ultrasonic signal. Then, the flow rate of the liquid is calculated based on the difference between the uplink and downlink flight times. The liquid flow rate is calculated based on the flow rate and the inner diameter of the pipe section, and the total volume of the liquid passing through the pipe section is obtained by integrating the time.
[0039] The ultrasonic transducer generally used for flow measurement operates at a frequency of 1MHz~4MHz. By transmitting 10~30 square wave ultrasonic signals, a spindle-shaped envelope ultrasonic receiving signal will appear at the receiving transducer end.
[0040] The embodiment of the present invention provides a method for monitoring the turbidity change of water quality by real-time monitoring the envelope amplitude change of ultrasonic receiving signals based on the existing structure and circuit design of the existing ultrasonic meter.
[0041] In step 110, the current flow velocity of the water body to be detected can be obtained by measuring the uplink flight time difference of the ultrasonic signal, and the current temperature can be calculated by measuring the total uplink and downlink flight time of the ultrasonic signal, combining the total flight length of the pipe section and other information to calculate the sound speed in the liquid, and then calculated based on the relationship between the sound speed and temperature.
[0042] Step 120, determining the measured amplitude of the ultrasonic signal under the flow rate and temperature, and calibrating the measured amplitude to obtain a calibrated amplitude.
[0043] Specifically, many ultrasonic metering chips have the function of measuring the peak-to-peak value of ultrasonic signals, and the measured amplitude can be obtained based on the peak-to-peak value of the ultrasonic signal measured by the ultrasonic metering chip at the current flow rate and temperature. In some embodiments, the measured amplitude is the average of the peak-to-peak values of the uplink and downlink ultrasonic receiving signals at the current flow rate and temperature.
[0044] Considering that when the water body is flowing, the uplink receiving signal Aup and the downlink receiving signal Adown will change, Aup will increase, and Adown will decrease. And because the uplink and downlink transducer parameters cannot be completely consistent, the peak values and changes of the uplink and downlink ultrasonic receiving signals will not be completely consistent. In addition, when the water body is at different temperatures, the performance of the transducer will also change. Therefore, this embodiment first calibrates the measurement amplitude. The calibration here refers to calibrating the measurement amplitude at the current flow velocity and temperature to the amplitude when the flow velocity and temperature are both standard. The calibration amplitude thus obtained is the amplitude of the water body to be detected when the flow velocity and temperature are both standard.
[0045] Step 130, determining the current amplitude decay rate at the flow rate and temperature based on the calibration amplitude and the standard amplitude.
[0046] Specifically, the standard amplitude refers to the amplitude of the water quality under standard conditions. In some embodiments, the step of determining the standard amplitude includes: Obtain the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal of the water body under the standard state, wherein the standard state refers to the state under the standard temperature, the flow velocity of the water body is zero, and the turbidity of the water quality is zero; The standard amplitude is determined based on the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal.
[0047] For example, at a standard temperature (e.g. 20°C), fill the ultrasonic meter pipe section with water without impurities and zero turbidity, and measure the peak-to-peak value Aup_st of the uplink ultrasonic receiving signal and the peak-to-peak value Adown_st of the downlink ultrasonic receiving signal while keeping the water flow rate stationary, that is, the flow rate is zero. The standard amplitude Ast=1 / 2*(Aup_st+Adown_st) is obtained based on the average value.
[0048] The calibration amplitude here is the amplitude of the water body to be tested when the flow rate and temperature are both standard, and the standard amplitude is the amplitude of the water body with zero turbidity when the flow rate and temperature are both standard. Based on the calibration amplitude and the standard amplitude, the current amplitude attenuation rate is determined. The current amplitude attenuation rate can reflect the degree of influence of turbidity on amplitude attenuation.
[0049] Step 140, determining the water turbidity of the water body to be detected based on the relationship between turbidity and amplitude decay rate, and the current amplitude decay rate.
[0050] Specifically, the relationship between turbidity and amplitude attenuation rate can be pre-set to reflect the mapping relationship between turbidity and amplitude attenuation rate, and the relationship between turbidity and amplitude attenuation rate can be a piecewise linear relationship. Therefore, after obtaining the current amplitude attenuation rate, the water quality turbidity of the water body to be detected can be determined based on the relationship between turbidity and amplitude attenuation rate and the current amplitude attenuation rate.
[0051] In some embodiments, the relationship between turbidity and amplitude decay rate can be determined based on the following steps: Obtaining the third amplitudes corresponding to the water body at each turbidity in the third state, wherein the third state refers to a state at the standard temperature, where the flow rate of the water body is zero and the turbidity of the water quality is not zero; Determine the amplitude attenuation rate corresponding to each turbidity based on the third amplitude and the standard amplitude corresponding to each turbidity; The amplitude decay rate corresponding to each turbidity was fitted piecewise linearly to obtain the relationship between turbidity and amplitude decay rate.
[0052] Specifically, the ultrasonic meter pipe section is filled with water of different turbidities at standard temperature. While keeping the water flow rate still, that is, the flow rate is zero, the peak-to-peak value average of the uplink and downlink ultrasonic receiving signals of the water at different turbidities is measured, and the amplitudes corresponding to the different turbidities are obtained based on the average value, that is, the third amplitude A3.
[0053] It should be noted that the calculation methods of the first amplitude, second amplitude, third amplitude and standard amplitude described in the present invention are all the same, which are all the peak-to-peak averages of the uplink and downlink ultrasonic receiving signals. The difference lies in the different states of water quality during measurement, that is, the turbidity, temperature and flow rate of the water body are different.
[0054] Then, based on the third amplitude and the standard amplitude Ast, the amplitude attenuation rate D corresponding to different turbidity conditions is determined. Here, the amplitude attenuation rate can be expressed as D=A3 / Ast.
[0055] On this basis, the piecewise linear fitting PWL algorithm is used to fit the relationship between turbidity and amplitude decay rate. The relationship between turbidity and amplitude decay rate obtained by fitting can be expressed as: TU=k1*D. Among them, TU represents turbidity, D represents amplitude decay rate, and k1 is the coefficient.
[0056] Therefore, in step 140, on the basis of obtaining the current amplitude attenuation rate, the water turbidity of the water body to be detected can be determined based on the preset relationship between turbidity and amplitude attenuation rate.
[0057] The method provided in the embodiment of the present invention can utilize the existing structure and circuit design of the existing ultrasonic water meter, and can realize the detection of water turbidity without adding a separate optical turbidity detection sensor, and then monitor the turbidity change of water quality by real-time monitoring the envelope amplitude change of the ultrasonic receiving signal.
[0058] Based on any of the above embodiments, the measured amplitude is calibrated in step 120 to obtain the calibrated amplitude, including: Step 121, determining a current flow rate calibration coefficient based on the flow rate and the relationship between the flow rate and the flow rate calibration coefficient; Step 122, determining a current temperature calibration coefficient based on the temperature and the relationship between the temperature and the temperature calibration coefficient; Step 123, calibrating the measurement amplitude based on the current flow rate calibration coefficient and the current temperature calibration coefficient to obtain a calibration amplitude.
[0059] Specifically, calibration for the measurement amplitude refers to calibrating the measurement amplitude at the current flow velocity and temperature to the amplitude when the flow velocity and temperature are both in standard conditions, thereby obtaining the amplitude of the water body to be tested when the flow velocity and temperature are both in standard conditions, that is, the calibration amplitude.
[0060] Therefore, the current flow rate calibration coefficient and the current temperature calibration coefficient may be determined respectively first, and then the amplitude calibration may be performed based on the current flow rate calibration coefficient and the current temperature calibration coefficient.
[0061] It should be noted that in this embodiment, step 121 and step 122 may be executed simultaneously or sequentially, and when executed sequentially, the execution order of the two is not limited.
[0062] The current flow rate calibration coefficient reflects the degree of influence on the amplitude change under the current flow rate. The relationship between the flow rate and the flow rate calibration coefficient reflects the corresponding relationship between each different flow rate and the flow rate calibration coefficient. Therefore, when the flow rate of the water body to be detected is obtained, the flow rate calibration coefficient corresponding to the flow rate can be determined, that is, the current flow rate calibration coefficient.
[0063] Similarly, the current temperature calibration coefficient reflects the degree of influence of the current temperature on the amplitude change. The relationship between the temperature and the temperature calibration coefficient reflects the corresponding relationship between each different temperature and the temperature calibration coefficient. Therefore, when the current temperature of the water body to be detected is obtained, the temperature calibration coefficient corresponding to the current temperature can be determined, that is, the current temperature calibration coefficient.
[0064] Finally, based on the current flow rate calibration coefficient and the current temperature calibration coefficient, the measured amplitude is calibrated to obtain the calibration amplitude. For example, the calibration amplitude can be expressed as A 校准 =K2'*K3'*A 测量 , where A 校准Indicates the calibration amplitude, A 测量 Indicates the measurement amplitude, K2' indicates the current flow rate calibration coefficient, and K3' indicates the current temperature calibration coefficient.
[0065] In some embodiments, the relationship between the flow rate and the flow rate calibration factor may be determined by the following steps: Obtaining first amplitudes corresponding to the water body at each flow rate in a first state, wherein the first state refers to a state at a standard temperature, when the water turbidity is zero and the flow rate of the water body is not zero; Determine the flow rate calibration coefficient corresponding to each flow rate based on the first amplitude and the standard amplitude corresponding to each flow rate; The flow rate calibration coefficients corresponding to each flow rate are subjected to piecewise linear fitting to obtain the relationship between the flow rate and the flow rate calibration coefficient.
[0066] Specifically, under the standard temperature, when the water body is flowing and the turbidity is zero, that is, in the first state, the first amplitude A1 corresponding to each flow rate of the water body is obtained.
[0067] The flow rate calibration coefficient can reflect the effect of flow rate on amplitude attenuation, and the flow rate calibration coefficient is determined based on the first amplitude and standard amplitude corresponding to each flow rate. The flow rate calibration coefficient K2 can be expressed as: K2=A1 / Ast, where A1 represents the first amplitude and Ast represents the standard amplitude.
[0068] Then, the flow rate calibration coefficients corresponding to each flow rate are piecewise linearly fitted to obtain the relationship between the flow rate and the flow rate calibration coefficient. The relationship between the flow rate calibration coefficient and the flow rate is obtained by using the piecewise linear fitting PWL algorithm. In some embodiments, the relationship between the flow rate and the flow rate calibration coefficient can be expressed as K2=(1-b)*V, where V is the current flow rate and K2 is the flow rate calibration coefficient.
[0069] In some embodiments, the relationship between temperature and temperature calibration coefficient is determined based on the following steps: Obtaining second amplitudes corresponding to the water body at each temperature in a second state, wherein the second state refers to a state in which the water turbidity is zero, the flow rate of the water body is zero, and the temperature of the water body is a non-standard temperature; Determine the temperature calibration coefficient corresponding to each temperature based on the second amplitude and the standard amplitude corresponding to each temperature; The temperature calibration coefficients corresponding to each temperature are subjected to piecewise linear fitting to obtain the relationship between the temperature and the temperature calibration coefficients.
[0070] Specifically, in a state where the water turbidity is zero, the flow rate of the water body is zero, and the temperature of the water body is a non-standard temperature, ie, in the second state, the second amplitude A2 corresponding to each temperature of the water body is obtained.
[0071] The temperature calibration coefficient can reflect the effect of temperature on amplitude attenuation. The temperature calibration coefficient is determined based on the second amplitude and the standard amplitude corresponding to each temperature. The temperature calibration coefficient K2 can be expressed as: K2=A2 / Ast, where A2 represents the second amplitude and Ast represents the standard amplitude.
[0072] Then, the temperature calibration coefficients corresponding to each temperature are piecewise linearly fitted to obtain the relationship between the temperature and the temperature calibration coefficient. The piecewise linear fitting PWL algorithm is used to obtain the relationship between the temperature calibration coefficient and the temperature.
[0073] Based on any of the above embodiments, the method further includes: After a preset time, the current standard amplitude is automatically updated under standard conditions.
[0074] Specifically, considering that after ultrasonic metering products have been running for a long time on site, the transducer performance has deteriorated, and the internal components such as the transducer surface and the reflector surface have scaled, which will cause the amplitude of the ultrasonic receiving signal to change. The traditional approach is to regularly replace the transducer, clean the pipe section, or replace the entire pipe section to solve the problem.
[0075] Since these changes are relatively slow and the amplitude is not large, for example, in the tap water section, the turbidity is basically zero when the water quality is not polluted. The method of regularly updating the standard amplitude Ast can be used to solve the turbidity measurement deviation caused by the performance change of the device in the pipe section.
[0076] The preset duration here can be pre-set, for example, 6 months or 8 months. Usually, after 6 to 12 months of operation on site, when the water flow rate is detected to be stationary in the early morning, the automatic update of the standard amplitude is started. The updated standard amplitude is obtained by continuously transmitting uplink and downlink ultrasonic signals, recording the corresponding receiving transducer amplitude data and calculating the average value. If the turbidity is abnormal after the update, such as multiple measurements showing that the turbidity value is negative, it means that the water quality was abnormal during the last update and needs to be updated again. Otherwise, wait for the next automatic update cycle to start the automatic update again.
[0077] The method provided by the embodiment of the present invention automatically updates the standard amplitude during long-term operation, thereby reducing measurement errors caused by degradation of transducer performance and scaling on the device surface during long-term operation.
[0078] Based on any of the above embodiments, after determining the water turbidity of the water body to be detected, the method further includes: Determine the water turbidity change value for each test, and filter the water turbidity based on the water turbidity change value and a low-pass filter; and / or,
[0079] When the water turbidity exceeds the preset threshold, an alarm will be issued.
[0080] Specifically, if bubbles appear inside the pipe during ultrasonic measurement, the ultrasonic receiving signal will be weakened or even unable to be received, which will interfere with the measurement results. Since bubbles usually appear suddenly, the change process of turbidity generally requires a certain slow process. In addition to causing a large change in the amplitude of the ultrasonic receiving signal, the appearance of bubbles often leads to problems such as the inability to detect ultrasonic flow velocity. Based on these phenomena, a digital low-pass filter can be set to filter out the rapidly changing turbidity value, effectively filter out the bubble interference during the measurement process, and prevent the misjudgment of turbidity changes.
[0081] In addition, when the water turbidity exceeds the preset threshold, an alarm can be sounded to promptly remind relevant public utilities to handle abnormalities.
[0082] Based on any of the above embodiments, a method for detecting water turbidity is provided, comprising: S1, determine the standard amplitude. This includes: obtaining the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal of the water body under the standard state, where the standard state refers to the state where the flow rate of the water body is zero and the turbidity of the water quality is zero under the standard temperature; determining the standard amplitude based on the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal.
[0083] Figure 2 The ultrasonic water meter measuring pipe section structure diagram provided by the present invention is an ultrasonic water meter measuring pipe section using TDC-GP30 as a measuring chip. Figure 2 The structure of a typical W-shaped reflective small-caliber ultrasonic water meter is shown. US_UP and US_DOWN are the uplink and downlink ultrasonic transducers respectively. The blue wavy line indicates the direction of water flow. The red lines indicate the uplink ultrasonic transmission and reception signals and the downlink ultrasonic transmission and reception signals respectively.
[0084] It should be noted that the turbidity detection method provided by the present invention can be realized by replacing the pipe section of the ultrasonic water meter with a beam type, a V-shaped reflection type or other large-caliber water meter multi-channel measurement form. In addition, the method provided in the embodiment of the present invention can also be applied to other related products such as ultrasonic heat meters, ultrasonic gas meters, and ultrasonic flow meters.
[0085] In this embodiment, the ultrasonic metering chip can also use the MSP430FR60xx or MSP430FR50xx series of Texas Instruments. Since this series of chips uses AD to collect ultrasonic signals and then calculates the flight time difference through a related algorithm, the chip itself will measure the amplitude of the ultrasonic signal, so the turbidity detection method provided by the present invention can also be implemented. There are other general ultrasonic measurement chips, as long as the chip has the function of measuring the amplitude of the ultrasonic receiving signal, it can be used to implement this solution.
[0086] Figure 3 is a waveform diagram of the ultrasonic signal provided by the present invention, such as Figure 3 As shown, the transmitted signal on the US_UP and US_DOWN transducers is a square wave signal, and the received signal is a spindle-shaped envelope signal. Figure 4 is a schematic diagram of the peak-to-peak value result of the ultrasonic receiving signal provided by the present invention, Figure 4 The horizontal axis is time, the vertical axis is amplitude, and the peak-to-peak value actually measured is the maximum value of the spindle-shaped envelope waveform. The sampling results can be obtained by setting the relevant control registers of GP30 and reading FDB_US_AMC_VH and FDB_US_AMC_VL inside GP30.
[0087] S2, determining the relationship between the flow rate and the flow rate calibration coefficient. Specifically, it includes: obtaining the first amplitude corresponding to each flow rate of the water body in the first state, the first state refers to the state under the standard temperature, the water turbidity is zero and the flow rate of the water body is not zero; based on the first amplitude corresponding to each flow rate and the standard amplitude, determining the flow rate calibration coefficient corresponding to each flow rate; performing piecewise linear fitting on the flow rate calibration coefficient corresponding to each flow rate, and obtaining the relationship between the flow rate and the flow rate calibration coefficient.
[0088] S3, determining the relationship between temperature and temperature calibration coefficient. Specifically, it includes: obtaining the second amplitude corresponding to the water body at each temperature in the second state, the second state refers to the state where the water turbidity is zero, the flow rate of the water body is zero, and the temperature of the water body is a non-standard temperature; based on the second amplitude corresponding to each temperature and the standard amplitude, determining the temperature calibration coefficient corresponding to each temperature; performing piecewise linear fitting on the temperature calibration coefficient corresponding to each temperature, and obtaining the relationship between the temperature and the temperature calibration coefficient.
[0089] S4, determining the relationship between turbidity and amplitude decay rate.
[0090] The third amplitude corresponding to the water body at each turbidity in the third state is obtained, and the third state refers to the state under the standard temperature, the flow velocity of the water body is zero and the turbidity of the water quality is not zero; based on the third amplitude corresponding to each turbidity and the standard amplitude, the amplitude attenuation rate corresponding to each turbidity is determined; the amplitude attenuation rate corresponding to each turbidity is piecewise linearly fitted to obtain the relationship between turbidity and the amplitude attenuation rate.
[0091] S5, obtaining the current flow rate and temperature of the water body to be detected through an ultrasonic meter.
[0092] S6, determining the measured amplitude of the ultrasonic signal at the current flow rate and temperature, and calibrating the measured amplitude to obtain the calibrated amplitude. Specifically, it includes: determining the current flow rate calibration coefficient based on the flow rate and the relationship between the flow rate and the flow rate calibration coefficient; determining the current temperature calibration coefficient based on the temperature and the relationship between the temperature and the temperature calibration coefficient; calibrating the measured amplitude based on the current flow rate calibration coefficient and the current temperature calibration coefficient to obtain the calibrated amplitude.
[0093] S7, determining a current amplitude attenuation rate at a current flow rate and temperature based on the calibration amplitude and the standard amplitude; S8, determining the water turbidity of the water body to be tested based on the relationship between turbidity and amplitude decay rate, and the current amplitude decay rate.
[0094] S9, after a preset time, the current standard amplitude is automatically updated under the standard state.
[0095] S10, determining the water turbidity change value for each detection, filtering the water turbidity based on the water turbidity change value and a low-pass filter; and / or, issuing an alarm when the water turbidity exceeds a preset threshold.
[0096] The method provided by the embodiment of the present invention does not need to add a separate optical turbidity monitoring sensor based on the hardware of the existing ultrasonic water meter. The water quality turbidity can be obtained by simply increasing the amplitude of the sampled uplink and downlink ultrasonic signals and calculating the attenuation rate of the amplitude. Through the flow velocity measurement function of the ultrasonic water meter itself, the amplitude calibration coefficient is obtained by the PWL algorithm under the condition of known flow velocity, so that the turbidity calculation reduces the influence of flow velocity, and there is no need to set a separate turbidity measurement area. The water temperature is calculated by the total flight time algorithm of the ultrasonic water meter, and the current amplitude data is calibrated according to the water temperature data, so as to improve the accuracy of turbidity calculation without increasing the hardware cost. The standard amplitude is automatically calibrated during long-term operation to reduce the measurement error caused by the degradation of transducer performance and scaling on the device surface during long-term operation. The duration and amplitude of the ultrasonic uplink and downlink flight time changes and the speed of the sudden change can be used to judge whether it is bubble interference or actual turbidity change, thereby reducing the probability of misjudgment of turbidity change.
[0097] The turbidity detection device provided by the present invention is described below. The turbidity detection device described below and the turbidity detection method described above can be referred to each other.
[0098] Based on any of the above embodiments, Figure 5 Schematic diagram of the structure of the water turbidity detection device provided by the present invention, such as Figure 5 As shown, a water turbidity detection device is provided, comprising: An acquisition unit 510 is used to acquire the current flow rate and temperature of the water body to be detected through an ultrasonic meter; an amplitude calibration unit 520, for determining a measured amplitude of the ultrasonic signal at the flow rate and temperature, and calibrating the measured amplitude to obtain a calibrated amplitude; a decay rate determination unit 530, for determining a current amplitude decay rate at the flow rate and temperature based on the calibration amplitude and the standard amplitude; The turbidity determination unit 540 is used to determine the water quality turbidity of the water body to be detected based on the relationship between turbidity and amplitude decay rate and the current amplitude decay rate.
[0099] The device provided in the embodiment of the present invention can utilize the existing structure and circuit design of the existing ultrasonic water meter, and can realize turbidity detection without adding a separate optical turbidity detection sensor, and then monitor the turbidity changes of water quality by real-time monitoring of the envelope amplitude changes of the ultrasonic receiving signal.
[0100] Based on any of the above embodiments, the amplitude calibration unit is specifically used for: Determining a current flow rate calibration coefficient based on the flow rate and a relationship between the flow rate and the flow rate calibration coefficient; Determining a current temperature calibration coefficient based on the temperature and a relationship between the temperature and the temperature calibration coefficient; The measurement amplitude is calibrated based on the current flow rate calibration coefficient and the current temperature calibration coefficient to obtain a calibration amplitude.
[0101] Based on any of the above embodiments, it also includes a flow rate relationship determination unit, which is used to: Obtaining first amplitudes corresponding to the water body at each flow rate in a first state, wherein the first state refers to a state at a standard temperature, when the water turbidity is zero and the flow rate of the water body is not zero; Determine the flow rate calibration coefficient corresponding to each flow rate based on the first amplitude corresponding to each flow rate and the standard amplitude; The flow rate calibration coefficients corresponding to each flow rate are subjected to piecewise linear fitting to obtain the relationship between the flow rate and the flow rate calibration coefficient.
[0102] Based on any of the above embodiments, it further includes a temperature relationship determination unit, which is used to: Obtaining second amplitudes corresponding to the water body at each temperature in a second state, wherein the second state refers to a state in which the water turbidity is zero, the flow rate of the water body is zero, and the temperature of the water body is a non-standard temperature; Determine the temperature calibration coefficients corresponding to the respective temperatures based on the second amplitudes corresponding to the respective temperatures and the standard amplitudes; The temperature calibration coefficients corresponding to the respective temperatures are subjected to piecewise linear fitting to obtain the relationship between the temperature and the temperature calibration coefficient.
[0103] Based on any of the above embodiments, it also includes a turbidity relationship determination unit, which is used to: Obtaining third amplitudes corresponding to the water body at each turbidity in a third state, wherein the third state refers to a state at a standard temperature, a flow rate of the water body is zero and the turbidity of the water quality is not zero; Determine the amplitude attenuation rate corresponding to each turbidity based on the third amplitude corresponding to each turbidity and the standard amplitude; The amplitude decay rates corresponding to the respective turbidities are subjected to piecewise linear fitting to obtain the relationship between the turbidity and the amplitude decay rate.
[0104] Based on any of the above embodiments, it further includes a standard amplitude determination unit, which is used to: Obtaining the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal of the water body under the standard state, wherein the standard state refers to a state under the standard temperature, the flow velocity of the water body is zero, and the turbidity of the water quality is zero; The standard amplitude is determined based on the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal.
[0105] Based on any of the above embodiments, it also includes an amplitude updating unit, which is used to: After a preset time, the current standard amplitude is automatically updated under standard conditions.
[0106] Based on any of the above embodiments, it also includes a filtering and alarm unit, which is used to: Determine the water turbidity change value for each detection, and filter the water turbidity based on the water turbidity change value and a low-pass filter; and / or,
[0107] When the water turbidity exceeds a preset threshold, an alarm is issued.
[0108] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the turbidity detection method, which includes: obtaining the current flow velocity and temperature of the water body to be detected through an ultrasonic meter; determining the measured amplitude of the ultrasonic signal at the flow velocity and temperature, and calibrating the measured amplitude to obtain a calibrated amplitude; determining the current amplitude attenuation rate at the flow velocity and temperature based on the calibrated amplitude and the standard amplitude; determining the water quality turbidity of the water body to be detected based on the relationship between turbidity and the amplitude attenuation rate and the current amplitude attenuation rate.
[0109] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0110] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the turbidity detection method provided by the above methods, which includes: obtaining the current flow rate and temperature of the water body to be detected through an ultrasonic meter; determining the measured amplitude of the ultrasonic signal at the flow rate and temperature, and calibrating the measured amplitude to obtain a calibrated amplitude; determining the current amplitude attenuation rate at the flow rate and temperature based on the calibrated amplitude and the standard amplitude; determining the water quality turbidity of the water body to be detected based on the relationship between turbidity and the amplitude attenuation rate, and the current amplitude attenuation rate.
[0111] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the turbidity detection method provided by the above-mentioned methods, the method comprising: obtaining the current flow velocity and temperature of the water body to be detected through an ultrasonic meter; determining the measured amplitude of the ultrasonic signal at the flow velocity and temperature, and calibrating the measured amplitude to obtain a calibrated amplitude; determining the current amplitude attenuation rate at the flow velocity and temperature based on the calibrated amplitude and the standard amplitude; determining the water quality turbidity of the water body to be detected based on the relationship between turbidity and the amplitude attenuation rate, and the current amplitude attenuation rate.
[0112] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting water turbidity, It is characterized in that include: Obtain the current flow rate and temperature of the water body to be tested through an ultrasonic meter; Determining a measured amplitude of the ultrasonic signal at the flow rate and temperature, and calibrating the measured amplitude to obtain a calibrated amplitude; Determining a current amplitude decay rate at the flow rate and temperature based on the calibration amplitude and the standard amplitude; Based on the relationship between turbidity and amplitude decay rate, and the current amplitude decay rate, the water quality turbidity of the water body to be detected is determined.
2. The water turbidity detection method according to claim 1, It is characterized in that The step of calibrating the measured amplitude to obtain a calibrated amplitude includes: Determining a current flow rate calibration coefficient based on the flow rate and a relationship between the flow rate and the flow rate calibration coefficient; Determining a current temperature calibration coefficient based on the temperature and a relationship between the temperature and the temperature calibration coefficient; The measurement amplitude is calibrated based on the current flow rate calibration coefficient and the current temperature calibration coefficient to obtain a calibration amplitude.
3. The water turbidity detection method according to claim 2, It is characterized in that The relationship between the flow rate and the flow rate calibration coefficient is determined based on the following steps: Obtaining first amplitudes corresponding to the water body at each flow rate in a first state, wherein the first state refers to a state at a standard temperature, when the water turbidity is zero and the flow rate of the water body is not zero; Determine the flow rate calibration coefficient corresponding to each flow rate based on the first amplitude corresponding to each flow rate and the standard amplitude; The flow rate calibration coefficients corresponding to each flow rate are subjected to piecewise linear fitting to obtain the relationship between the flow rate and the flow rate calibration coefficient.
4. The water turbidity detection method according to claim 2, It is characterized in that The relationship between the temperature and the temperature calibration coefficient is determined based on the following steps: Obtaining second amplitudes corresponding to the water body at each temperature in a second state, wherein the second state refers to a state in which the water turbidity is zero, the flow rate of the water body is zero, and the temperature of the water body is a non-standard temperature; Determine the temperature calibration coefficients corresponding to the respective temperatures based on the second amplitudes corresponding to the respective temperatures and the standard amplitudes; The temperature calibration coefficients corresponding to the respective temperatures are subjected to piecewise linear fitting to obtain the relationship between the temperature and the temperature calibration coefficient.
5. The method for detecting water turbidity according to any one of claims 1 to 4, It is characterized in that The relationship between turbidity and amplitude decay rate is determined based on the following steps: Obtaining third amplitudes corresponding to the water body at each turbidity in a third state, wherein the third state refers to a state at a standard temperature, a flow rate of the water body is zero and the turbidity of the water quality is not zero; Determine the amplitude attenuation rate corresponding to each turbidity based on the third amplitude corresponding to each turbidity and the standard amplitude; The amplitude decay rates corresponding to the respective turbidities are subjected to piecewise linear fitting to obtain the relationship between the turbidity and the amplitude decay rate.
6. The method for detecting water turbidity according to any one of claims 1 to 4, It is characterized in that The standard amplitude is determined based on the following steps: Obtaining the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal of the water body under the standard state, wherein the standard state refers to a state under the standard temperature, the flow velocity of the water body is zero, and the water turbidity is zero; The standard amplitude is determined based on the peak-to-peak value of the uplink ultrasonic receiving signal and the peak-to-peak value of the downlink ultrasonic receiving signal.
7. The method for detecting water turbidity according to claim 6, It is characterized in that The method further comprises: After a preset time, the current standard amplitude is automatically updated under standard conditions.
8. The method for detecting water turbidity according to any one of claims 1 to 4, It is characterized in that After determining the water turbidity of the water body to be detected, the method further includes: Determine the water turbidity change value for each detection, and filter the water turbidity based on the water turbidity change value and a low-pass filter; and / or, When the water turbidity exceeds a preset threshold, an alarm is issued.
9. A water turbidity detection device, It is characterized in that include: An acquisition unit, used for acquiring the current flow rate and temperature of the water body to be detected through an ultrasonic meter; an amplitude calibration unit, used to determine the measured amplitude of the ultrasonic signal at the flow rate and temperature, and calibrate the measured amplitude to obtain a calibrated amplitude; a decay rate determination unit, configured to determine a current amplitude decay rate at the flow rate and temperature based on the calibration amplitude and the standard amplitude; The turbidity determination unit is used to determine the water quality turbidity of the water body to be detected based on the relationship between turbidity and amplitude decay rate and the current amplitude decay rate.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the water turbidity detection method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Flow measurement method and system for water quality safety control
CN120101892A
A flow measurement method and system for water quality safety control
CN120101892B
Double-frequency anti-interference ultrasonic water meter and metering method thereof
CN121026255A
Dual-frequency anti-interference ultrasonic water meter and metering method thereof
CN121026255B
