Ultrasonic water flow measurement method, device, electronic equipment and storage medium

By dynamically adjusting the ultrasonic signal gain amplification factor and temperature compensation, the measurement deviation problem caused by signal amplitude differences in ultrasonic water meters is solved, the measurement accuracy and production efficiency of water meters are improved, and costs and power consumption are reduced.

CN114353891BActive Publication Date: 2025-09-09WUHAN SAN FRAN ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210022412.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-10
Publication Date
2025-09-09
Estimated Expiration
2042-01-10

AI Technical Summary

Technical Problem

The difference in signal amplitude between the upstream and downstream transducers in existing ultrasonic water meters leads to deviation in water flow measurement. In addition, traditional water meters have high production costs, high power consumption, and insufficient measurement accuracy.

Method used

By dynamically adjusting the gain amplification of the uplink and downlink ultrasonic signals, matching the signal amplitudes, and calculating the water flow rate in combination with the water temperature and flow velocity, the requirements for transducer matching are reduced and the measurement accuracy is improved.

Benefits of technology

It achieves more accurate water flow measurement, reduces transducer pairing requirements, reduces measurement deviation, and reduces water meter production costs and power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114353891B_ABST
    Figure CN114353891B_ABST
Patent Text Reader

Abstract

The present application provides an ultrasonic water flow measurement method, device, electronic device, and storage medium. The method comprises: obtaining an uplink ultrasonic signal and a downlink ultrasonic signal in a pipe to be measured; obtaining a first maximum amplitude based on the uplink ultrasonic signal; obtaining a second maximum amplitude based on the downlink ultrasonic signal; matching the first maximum amplitude with the second maximum amplitude to obtain a matched uplink ultrasonic signal and downlink ultrasonic signal; calculating a time-of-flight difference; obtaining the water flow velocity in the pipe to be measured based on the time-of-flight difference; obtaining the water flow temperature in the pipe to be measured; and calculating the water flow rate in the pipe to be measured based on the water flow velocity and the water flow temperature. The present application achieves amplitude matching of the uplink ultrasonic signal and the downlink ultrasonic signal by dynamically adjusting the amplification parameters of the gain amplifiers corresponding to the uplink ultrasonic signal and the downlink ultrasonic signal, thereby improving the measurement accuracy of the water flow rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of ultrasonic measurement technology, and in particular to a method, device, electronic device and storage medium for measuring ultrasonic water flow. Background Art

[0002] With the development of smart water meters, the demand for electronic and digital water metering is becoming increasingly urgent. Currently, traditional mechanical water meters, which convert meter data into electronic data through electromechanical conversion, remain the mainstream method for small-diameter civilian water meters. Purely electronic electromagnetic induction and ultrasonic technologies suffer from high production costs, high power consumption, and lack significant accuracy advantages over mechanical water meters. Consequently, their widespread adoption in small-diameter civilian water meters has been limited.

[0003] Currently, commonly used ultrasonic water meters generally use a dual metering chip with a main control MCU + TDC. The ultrasonic water flow rate is measured by detecting the zero-crossing signal of the ultrasonic signal to measure the difference in the flight time of the ultrasonic uplink and downlink. The signal consistency requirements of the two ultrasonic transducers are relatively high, and the two ultrasonic transducers need to be used in pairs. Once the signal deviation of the two ultrasonic transducers is large, it will lead to deviations in the measurement of water flow. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for measuring ultrasonic water flow, so as to solve the technical problem in the prior art that the measurement of water flow is deviated due to the difference in signal amplitude between the upstream and downstream transducers.

[0005] In a first aspect, an embodiment of the present application provides a method for measuring ultrasonic water flow rate, comprising: obtaining an uplink ultrasonic signal and a downlink ultrasonic signal in a pipe to be measured;

[0006] Acquire a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal;

[0007] Acquire a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal;

[0008] Matching the first maximum amplitude and the second maximum amplitude so that a deviation between the first maximum amplitude and the second maximum amplitude is less than a first preset threshold, and obtaining a matched uplink ultrasonic signal and a matched downlink ultrasonic signal;

[0009] Calculating a time-of-flight difference between the uplink and downlink ultrasonic signals according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal;

[0010] Obtaining the water flow velocity in the pipeline to be tested according to the flight time difference;

[0011] Obtaining the water flow temperature in the pipeline to be measured;

[0012] The water flow rate in the pipeline to be measured is calculated according to the water flow velocity and the water flow temperature.

[0013] The embodiment of the present application dynamically adjusts the amplification factors of the uplink ultrasonic signal and the downlink ultrasonic signal to achieve matching of the amplitudes of the two ultrasonic signals, reduce the matching requirements of the transducer, avoid the degradation of metering performance due to aging and scaling of the transducer and reflector, reduce the difference in the amplitude of the uplink ultrasonic signal and the downlink ultrasonic signal, and obtain a more accurate flight time difference, thereby improving the metering accuracy during the operation of the water meter.

[0014] Furthermore, the obtaining of the uplink ultrasonic signal and the downlink ultrasonic signal in the pipeline to be tested includes:

[0015] Acquiring a first initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be tested;

[0016] Acquiring an uplink ultrasonic signal of the pipeline to be tested before restoration, and amplifying an electrical signal corresponding to the uplink ultrasonic signal before restoration according to the first initial parameter to obtain an uplink electrical signal;

[0017] Obtaining a second initial parameter corresponding to a gain amplifier for adjusting the downlink ultrasonic signal in the pipeline to be tested;

[0018] Acquire a downlink ultrasonic signal of the pipeline to be tested before restoration, and amplify an electrical signal corresponding to the downlink ultrasonic signal before restoration according to the second initial parameter to obtain a downlink electrical signal;

[0019] AD acquisition is performed on the uplink electrical signal and the downlink electrical signal respectively to obtain the uplink ultrasonic signal corresponding to the uplink electrical signal and the downlink ultrasonic signal corresponding to the downlink electrical signal.

[0020] In an embodiment of the present application, after the first electrical signal and the second signal are amplified by an internal gain amplifier, the first electrical signal and the second electrical signal are collected through high-speed AD to obtain a restored ultrasonic signal, which improves the accuracy of a single measurement, effectively improves signal noise, improves time difference resolution, and has the effect of digital filtering.

[0021] Furthermore, matching the first maximum amplitude and the second maximum amplitude includes:

[0022] determining whether a ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold;

[0023] If the ratio is within a second preset threshold and the difference between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold, the first initial parameter or the second initial parameter is adjusted to match the first maximum amplitude with the second maximum amplitude.

[0024] In an embodiment of the present application, it is first determined whether the ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold, and then the uplink ultrasonic signal and the downlink ultrasonic signal that meet the second preset threshold are matched. This can avoid adjusting the amplification parameters that do not meet the requirements and improve the metering efficiency of the water meter.

[0025] Furthermore, the adjusting the first initial parameter or the second initial parameter includes:

[0026] If the first maximum amplitude is greater than the second maximum amplitude, the first initial parameter is reduced or the second initial parameter is increased so that the deviation between the first maximum amplitude and the second maximum amplitude is less than the first preset threshold.

[0027] In an embodiment of the present application, by comparing the difference between the maximum amplitude of the uplink ultrasonic signal and the maximum amplitude of the downlink ultrasonic signal, dynamically adjusting the parameters of the gain amplifier, and performing correlation calculations on the uplink ultrasonic signal and the downlink ultrasonic signal that meet the matching requirements, the pairing requirements of the transducer can be reduced and the accuracy of the flight time difference can be ensured.

[0028] Furthermore, the calculating the time of flight difference according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal includes:

[0029] Obtaining the flight time of the matched uplink ultrasonic signal to obtain a first flight time;

[0030] Obtaining the flight time of the matched downlink ultrasonic signal to obtain a second flight time;

[0031] The flight time difference is obtained according to the first flight time and the second flight time.

[0032] In an embodiment of the present application, by obtaining the flight time of the matched uplink ultrasonic signal and the flight time of the downlink ultrasonic signal, the calculated flight time difference is more accurate, thereby reducing the steps of selecting the transducer in the early stage, improving production efficiency, and reducing the proportion of defective transducers during the selection process.

[0033] Furthermore, obtaining the water flow temperature in the pipeline to be measured includes:

[0034] Obtaining the time it takes for a first resistor in the water temperature detector to charge a charging capacitor to a preset voltage, thereby obtaining a first charging time; wherein the water temperature detector is disposed in the pipeline to be measured, and comprises the first resistor, the charging capacitor, and a second resistor, and the first resistor is a standard resistor;

[0035] Obtaining the time it takes for the second resistor to charge the charging capacitor to the preset voltage to obtain a second charging time; wherein the second resistor is a thermistor or a thermocouple;

[0036] Obtaining a resistance value of the second resistor according to the first charging time, the second charging time, and the resistance value of the first resistor;

[0037] The water flow temperature in the pipeline to be measured is obtained according to the resistance value of the second resistor.

[0038] In an embodiment of the present application, the charging time of the charging capacitor is measured by a combination of resistance and capacitance, thereby calculating the water flow temperature in the measuring pipe, effectively utilizing the low-power comparator and timer resources inside the MCU, reducing the metering power consumption of the water meter, and improving the metering accuracy of the water flow temperature.

[0039] Furthermore, the calculating of the water flow rate in the pipeline to be measured according to the water flow velocity and the water flow temperature includes:

[0040] according to Calculate the water flow linear velocity at the center of the pipeline to be measured; where k is the line-surface compensation coefficient, is the water flow rate, is the linear velocity of water flow in the center of the pipeline to be tested;

[0041] according to Calculate the instantaneous water flow rate in the pipeline to be tested; where A is the cross-sectional area of ​​the pipeline to be tested, is the instantaneous water flow rate of the pipeline to be tested;

[0042] performing flow compensation on the instantaneous water flow that meets the instantaneous water flow range according to the water flow temperature to obtain a compensated water flow;

[0043] The compensated water flow rate is integrated to obtain the total water flow rate in the pipeline to be tested.

[0044] In the embodiment of the present application, flow compensation is only performed on the instantaneous water flow that meets the temperature range and the instantaneous water flow range, and no compensation is performed on the instantaneous water flow that does not meet the requirements, which can reduce the power consumption of the microcontroller.

[0045] In a second aspect, an embodiment of the present application provides an ultrasonic water flow metering device, comprising: a signal acquisition module for acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in a pipe to be measured;

[0046] a first amplitude acquisition module, configured to acquire a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal;

[0047] a second amplitude acquisition module, configured to acquire a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal;

[0048] a matching module, configured to match the first maximum amplitude and the second maximum amplitude so that a deviation between the first maximum amplitude and the second maximum amplitude is less than a first preset threshold, and obtain a matched uplink ultrasonic signal and a downlink ultrasonic signal;

[0049] a calculation module, configured to calculate a time-of-flight difference based on the matched uplink ultrasonic signal and the matched downlink ultrasonic signal;

[0050] A flow rate acquisition module, configured to acquire the water flow rate in the pipe to be tested according to the flight time difference;

[0051] A temperature acquisition module, used to acquire the water flow temperature in the pipe to be tested;

[0052] The flow calculation module is used to calculate the water flow in the pipeline to be tested according to the water flow velocity and the water flow temperature.

[0053] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, a memory and a bus, wherein the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method of the first aspect.

[0054] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, and the computer program executes the method of the first aspect when executed by a processor.

[0055] Other features and advantages of the present application will be described in the following description and, in part, will become apparent from the description or be understood by practicing the embodiments of the present application. The objectives and other advantages of the present application can be achieved and obtained through the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 A schematic flow chart of a method for measuring ultrasonic water flow provided in an embodiment of the present application;

[0058] Figure 2 A schematic diagram of the internal structure of a water pipe to be tested provided in an embodiment of the present application;

[0059] Figure 3 Schematic diagram of the ultrasonic metering unit provided in an embodiment of the present application;

[0060] Figure 4 A schematic diagram of the ultrasonic signal amplitude matching process provided in an embodiment of the present application;

[0061] Figure 5 A schematic diagram of a process for automatically measuring water flow temperature provided in an embodiment of the present application;

[0062] Figure 6 A flowchart of the task timing processing provided in an embodiment of the present application;

[0063] Figure 7 A schematic diagram of the structure of an ultrasonic water flow metering device provided in an embodiment of the present application;

[0064] Figure 8 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0066] Figure 1 A schematic flow chart of a method for measuring ultrasonic water flow rate provided in an embodiment of the present application is shown in FIG. Figure 1 The method includes:

[0067] Step 101: Acquire an uplink ultrasonic signal and a downlink ultrasonic signal in the pipeline to be tested.

[0068] Figure 2 The internal structure diagram of the water pipe to be tested provided in the embodiment of the present application is as follows: Figure 2As shown, the pipe to be tested includes a pair of transducers and two metal reflectors. The diameter of the pipe to be tested is D. Two cavities are opened above the pipe to be tested, and the distance between the centers of the cavities is L. A pair of ultrasonic transducers are placed in each cavity. The pair of ultrasonic transducers can be used to send ultrasonic signals and receive ultrasonic envelope echo signals. The metal reflectors are installed directly below the ultrasonic transducers and form a 45-degree angle with the horizontal axis. They mainly redirect vertical or horizontal ultrasonic signals into horizontal or vertical ultrasonic signals.

[0069] Figure 3 The schematic diagram of the ultrasonic metering unit provided in the embodiment of the present application is as follows: Figure 3 As shown, a pair of ultrasonic transducers includes ultrasonic transducer 1 and ultrasonic transducer 2. The probe surfaces of ultrasonic transducers 1 and 2 are in contact with the water flow. The uplink ultrasonic signal refers to the pulse signal sent by the pulse amplifier, which is amplified by the power amplifier and transmitted through the resistor. The amplified pulse signal is sent to the ultrasonic transducer 1. After a period of time, the ultrasonic transducer 2 receives the echo signal from the ultrasonic transducer 1 and converts the received echo signal into an electrical signal. The receiving switching unit switches the capacitor. The converted electrical signal is received, amplified by the internal gain amplifier PGA, and then acquired by the AD converter.

[0070] The downlink ultrasonic signal refers to the pulse signal sent by the pulse amplifier, which is amplified by the power amplifier and then transmitted through the resistor. The amplified pulse signal is sent to the ultrasonic transducer 2. After a period of time, the ultrasonic transducer 1 receives the echo signal from the ultrasonic transducer 2 and converts the received echo signal into an electrical signal. The receiving switching unit switches the capacitor. The converted electrical signal is received, amplified by the internal gain amplifier (PGA), and then acquired using an AD converter. The time period is typically pre-calculated based on the length of the pipe being measured, the speed of the sound wave, and the maximum water flow rate.

[0071] Step 102: Acquire a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal.

[0072] The uplink ultrasonic signal is a sine wave signal collected and restored by an AD converter, and the first maximum amplitude is the maximum amplitude of the uplink ultrasonic signal within a period.

[0073] Step 103: Acquire a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal.

[0074] The downlink ultrasonic signal is a sine wave signal collected and restored by an AD converter, and the second maximum amplitude is the maximum amplitude of the downlink ultrasonic signal within a period.

[0075] Step 104: Match the first maximum amplitude and the second maximum amplitude so that the deviation between the first maximum amplitude and the second maximum amplitude is smaller than a first preset threshold, and obtain a matched uplink ultrasonic signal and a matched downlink ultrasonic signal.

[0076] In an embodiment of the present application, matching the first maximum amplitude and the second maximum amplitude means changing the maximum amplitude of the uplink ultrasonic signal and / or the downlink ultrasonic signal by adjusting the parameters of the gain amplifier corresponding to the uplink ultrasonic signal and / or the downlink ultrasonic signal, so that the deviation between the adjusted first maximum amplitude and the second maximum amplitude is less than a first preset threshold.

[0077] The gain amplifier can utilize a programmable amplifier (PGA) to adjust the amplitudes of the uplink and downlink ultrasonic signals. Specifically, the programmable amplifier (PGA) may be, but is not limited to, an AD8577. The first preset threshold value refers to the range within which the deviation between the maximum amplitudes of the uplink and downlink ultrasonic signals meets actual matching requirements. The threshold value includes an upper threshold value and a lower threshold value. If the deviation between the first maximum amplitude and the second maximum amplitude falls within this range, matching of the amplitudes of the uplink and downlink ultrasonic signals is achieved.

[0078] Step 105: Calculating a time-of-flight difference based on the matched uplink ultrasonic signal and the matched downlink ultrasonic signal;

[0079] In the embodiment of the present application, TI's MSP430FR6047 single-chip microcomputer with an ultrasonic metering front end is used to realize the measurement of water flow. The MSP430FR6047 single-chip microcomputer has its own ultrasonic wave pulse generator and power amplifier, and the receiving end has a receiving switching unit, an internal gain amplifier PGA and an AD converter.

[0080] After obtaining the matched uplink ultrasonic signal and the matched downlink ultrasonic signal, the ready-made algorithm of the USS SW Library algorithm library inside the MSP430FR6047 microcontroller is used to calculate the flight time difference between the upper and lower ultrasonic waves. The MSP430FR6047 microcontroller has the advantages of low operating voltage, low power consumption, and high computing power. In practical applications, other series of microcontrollers can be used to measure water flow rate. At the same time, other algorithm libraries and algorithms can also be used to calculate the flight time difference between the upper and lower ultrasonic waves. The embodiments of this application do not specifically limit this.

[0081] Step 106: Obtain the water flow velocity in the pipeline to be tested according to the flight time difference.

[0082] In this embodiment of the present application, after calculating the time difference between the uplink and downlink ultrasonic signals, the water flow velocity in the pipe under test is calculated using a readily available algorithm from the USS SW Library. The water flow velocity in the pipe under test refers to the instantaneous water flow velocity in the pipe under test.

[0083] Step 107: Obtain the water flow temperature in the pipeline to be measured.

[0084] In the embodiments of this application, Figure 3 As shown in the figure, the MCU control unit of the MSP430FR6047 microcontroller includes a comparator and a low-power timer. The water flow temperature of the pipe to be measured is calculated by combining the comparator and the low-power timer of the control unit. The obtained water flow temperature has high accuracy and can reduce the operating power consumption of the MSP430FR6047 microcontroller.

[0085] Step 108: Calculate the water flow rate in the pipeline to be tested according to the water flow velocity and the water flow temperature.

[0086] The water flow rate in the pipeline to be measured is the total accumulated water volume within the measurement time, and the water flow velocity is the water flow line velocity at the center of the pipeline to be measured.

[0087] Based on the above embodiment, the step of obtaining the uplink ultrasonic signal and the downlink ultrasonic signal in the pipeline to be tested includes:

[0088] Acquiring a first initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be tested;

[0089] Acquiring an uplink ultrasonic signal of the pipeline to be tested before restoration, and amplifying an electrical signal corresponding to the uplink ultrasonic signal before restoration according to the first initial parameter to obtain an uplink electrical signal;

[0090] Obtaining a second initial parameter corresponding to a gain amplifier for adjusting the downlink ultrasonic signal in the pipeline to be tested;

[0091] Acquire a downlink ultrasonic signal of the pipeline to be tested before restoration, and amplify an electrical signal corresponding to the downlink ultrasonic signal before restoration according to the second initial parameter to obtain a downlink electrical signal;

[0092] Performing AD acquisition on the uplink electrical signal to obtain the uplink ultrasonic signal in the pipeline to be tested;

[0093] Perform AD acquisition on the downlink electrical signal to obtain the downlink ultrasonic signal in the pipeline to be tested.

[0094] In the embodiment of the present application, the first initial parameter is the initial amplification parameter of the gain amplifier for adjusting the uplink ultrasonic signal, and the second initial parameter is the initial amplification parameter of the gain amplifier for adjusting the downlink ultrasonic signal. Figure 3 As shown in the figure, the uplink ultrasonic signal before restoration refers to the electrical signal obtained by ultrasonic transducer 2 receiving the echo signal from ultrasonic transducer 1 and converting the echo signal. The downlink ultrasonic signal before restoration refers to the electrical signal obtained by ultrasonic transducer 1 receiving the echo signal from ultrasonic transducer 2 and converting the echo signal.

[0095] The electrical signal corresponding to the uplink ultrasonic signal before restoration is gain-amplified using the first initial parameter, and the electrical signal corresponding to the downlink ultrasonic signal before restoration is gain-amplified using the second initial parameter. The AD converter collects the uplink electrical signal and the downlink electrical signal after gain amplification, respectively, to obtain the restored uplink ultrasonic signal and the downlink ultrasonic signal. Based on the above embodiment, the matching of the first maximum amplitude and the second maximum amplitude includes:

[0096] determining whether a ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold;

[0097] If the ratio is within a second preset threshold and the difference between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold, the first initial parameter or the second initial parameter is adjusted to match the first maximum amplitude with the second maximum amplitude.

[0098] Figure 4 The flow chart of the ultrasonic signal amplitude matching provided in the embodiment of the present application is as follows: Figure 4 As shown:

[0099] Step 201: Acquire ultrasonic signals.

[0100] First, a first initial parameter and a second initial parameter are obtained, a first maximum amplitude is obtained according to the first initial parameter, and a second maximum amplitude is obtained according to the second parameter.

[0101] Step 202: Ultrasonic signal matching.

[0102] First, determine whether the ratio of the first maximum amplitude to the second maximum amplitude is within the second preset threshold. If the ratio does not meet the range of the second preset threshold, record the current first initial parameter and the second initial parameter, so that in the next ultrasonic signal amplitude matching, avoid using the current first initial parameter and the second initial parameter as the initial matching parameters of the gain amplifier, and match the corresponding first maximum amplitude and the second maximum amplitude according to the reset first initial parameter and the second initial parameter.

[0103] The second preset threshold refers to a ratio of the first maximum amplitude to the second maximum amplitude within the range of [1 / 5, 5]. When the ratio of the first maximum amplitude to the second maximum amplitude is not within the second preset threshold, the corresponding first initial parameters and second initial parameters deviate significantly, requiring multiple subsequent adjustments to meet the ultrasonic signal amplitude matching requirement, resulting in a waste of microcontroller resources and increased microcontroller operating power consumption.

[0104] If the ratio falls within a second preset threshold range and the difference between the first maximum amplitude and the second maximum amplitude is less than the first preset threshold, the first maximum amplitude and the second maximum amplitude are matched. If the ratio falls within a second preset threshold range and the difference between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold, the first initial parameter or the second initial parameter is adjusted to adjust the corresponding maximum amplitude of the uplink ultrasonic signal or the maximum amplitude of the downlink ultrasonic signal, and the corresponding first maximum amplitude and second maximum amplitude are matched based on the reset first and second initial parameters.

[0105] Based on the above embodiment, the adjusting the first initial parameter or the second initial parameter includes:

[0106] If the first maximum amplitude is greater than the second maximum amplitude, the first initial parameter is reduced or the second initial parameter is increased so that the deviation between the first maximum amplitude and the second maximum amplitude is less than the first preset threshold.

[0107] In the embodiment of the present application, when the first maximum amplitude is greater than the second maximum amplitude, the first maximum amplitude is reduced by reducing the first initial parameter, and the second maximum amplitude is re-matched with the reduced first maximum amplitude; or the second initial parameter is increased to increase the second maximum amplitude, and the first maximum amplitude is re-matched with the increased second maximum amplitude. This ensures that the deviation between the first maximum amplitude and the second maximum amplitude is less than the first preset threshold, thereby achieving matching of the uplink ultrasonic signal and the downlink ultrasonic signal.

[0108] Based on the above embodiment, the step of calculating the time of flight difference according to the matched uplink ultrasonic signal and the downlink ultrasonic signal includes:

[0109] Obtaining the flight time of the matched uplink ultrasonic signal to obtain a first flight time;

[0110] Obtaining the flight time of the matched downlink ultrasonic signal to obtain a second flight time;

[0111] The flight time difference is obtained according to the first flight time and the second flight time.

[0112] like Figure 3 As shown, the first flight time is the time it takes for ultrasonic transducer 2 to receive the echo signal from ultrasonic transducer 1, and the second flight time is the time it takes for ultrasonic transducer 1 to receive the echo signal from ultrasonic transducer 2. In the embodiment of the present application, the first flight time and the second flight time are calculated using the USS SW Library algorithm library within the MSP430FR6047 microcontroller, and the flight time difference between the uplink ultrasonic signal and the downlink ultrasonic signal is obtained by the difference between the first flight time and the second flight time.

[0113] Based on the above embodiments, Figure 5 The flow chart of the automatic measurement of water flow temperature provided in the embodiment of the present application is as follows: Figure 5 As shown, obtaining the water flow temperature in the pipeline to be measured includes:

[0114] Obtaining the time it takes for a first resistor in the water temperature detector to charge a charging capacitor to a preset voltage, thereby obtaining a first charging time; wherein the water temperature detector is disposed in the pipeline to be measured, and comprises the first resistor, the charging capacitor, and a second resistor, and the first resistor is a standard resistor;

[0115] Obtaining the time it takes for the second resistor to charge the charging capacitor to the preset voltage to obtain a second charging time; wherein the second resistor is a thermistor or a thermocouple;

[0116] Obtaining a resistance value of the second resistor according to the first charging time, the second charging time, and the resistance value of the first resistor;

[0117] The water flow temperature in the pipeline to be measured is obtained according to the resistance value of the second resistor.

[0118] Among them, the preset voltage is 0.63 , The input voltage for charging the charging capacitor.

[0119] If the initial voltage on the charging capacitor is 0, the charging formula can be simplified to: ;

[0120] in, is the voltage on the charging capacitor C after charging time t, is the input voltage for charging the capacitor, R is the resistance value of the standard resistor, C is the capacity of the charging capacitor, exp is the exponential function with the natural constant e as the base in higher mathematics, and e is a constant of 2.71828. When t=RC, Therefore, when the low power comparator voltage V is set to 0.63Vu, the accumulated time of the timer is t=RC.

[0121] Through thermistors and standard resistors Charge the capacitor to 0.63 The thermistor resistance can be calculated by the following formula Resistance value:

[0122] in, Through the thermistor Charge the capacitor to 0.63 time, Standard resistance Charge the capacitor to 0.63 time, and Both can be obtained through low-power timer timing.

[0123] like Figure 5 As shown, step 301: charging the charging capacitor through a standard resistor. First, the charging capacitor Discharge to zero level, in standard resistance When the charging pulse output is high, the standard resistor The charging capacitor is charged and the low power timer is used for timing. The low power comparator judges the charging capacitor. The voltage reaches 0.63 When recording the current value.

[0124] Step 302: Charge the charging capacitor via the thermistor.

[0125] Charge the capacitor discharge to zero level, the thermistor When the charging pulse output is high, the thermistor Charging capacitor Charging is performed while timing is performed through a low-power timer, and the charging capacitor is judged by a low-power comparator. The voltage reaches 0.63 When recording the current value.

[0126] According to standard resistor The resistance value, and Calculating thermistor resistance The resistance value is then calculated by looking up the table to calculate the current water temperature.

[0127] The embodiment of the present application adopts a combination of a low-power comparator and a low-power timer provided by the control unit, and utilizes a charging capacitor to The resistance of the thermistor is calculated by the difference in discharge curves under different resistances, and the current water temperature is obtained by looking up the table. This can effectively improve the measurement accuracy of water temperature and reduce the power consumption of the MSP430FR6047 microcontroller.

[0128] Based on the above embodiment, the step of calculating the water flow rate in the pipe to be measured according to the water flow velocity and the water flow temperature includes:

[0129] according to Calculate the water flow linear velocity at the center of the pipeline to be measured; where k is the line-surface compensation coefficient, is the water flow rate, is the linear velocity of water flow in the center of the pipeline to be tested;

[0130] according to Calculate the instantaneous water flow rate in the pipeline to be tested; where A is the cross-sectional area of ​​the pipeline to be tested, is the instantaneous water flow rate of the pipeline to be tested;

[0131] performing flow compensation on the instantaneous water flow that meets the instantaneous water flow range according to the water flow temperature to obtain a compensated water flow;

[0132] The compensated water flow rate is integrated to obtain the total water flow rate in the pipeline to be tested.

[0133] In the embodiment of the present application, the formula Calculate the water flow velocity in the pipe to be tested, where is the water flow velocity, is the flight time difference between the uplink ultrasonic signal and the downlink ultrasonic signal, D is the diameter of the pipe to be measured, L is the distance between a pair of ultrasonic transducers along the direction of water flow, Tup is the first flight time, Toffset is the time it takes for the ultrasonic signal to fly along the diameter D, and Tdown is the second flight time.

[0134] pass Calculate the water flow velocity at the center of the pipe to be tested, and then Obtain the instantaneous water flow rate in the pipe to be measured. Since the water temperature and water flow velocity will affect the line-surface compensation coefficient k, the measurement accuracy of ultrasonic water flow measurement will be affected.

[0135] In the embodiment of the present application, when the water temperature is in the range of 0~55℃, the instantaneous water flow rate is from small flow Q1 to 0.1 Within the range, the instantaneous water flow rate is compensated by 0.01 for every 1℃ of water temperature. When performing data compensation, the closest correction point is selected based on the actual water temperature and flow rate. The small flow Q1 can be calculated based on the diameter of the pipe to be measured, the accuracy of the water meter, and other parameters.

[0136] The embodiment of the present application only tests the instantaneous water flow rate between small flow Q1 and 0.1 The instantaneous water flow rate within the range is compensated, and the instantaneous water flow rate is greater than 0.1 When the water temperature is low, there is no need to compensate for this part of the instantaneous water flow, which can reduce the operating power consumption of the microcontroller.

[0137] Figure 6 The following is a flowchart of the task timing processing provided in the embodiment of the present application, such as Figure 6 As shown, a low-power timer is used to time the water temperature measurement, water velocity measurement, ultrasonic signal calibration, and human-machine interface processing of the water meter. Each task is executed after its processing time, reducing the microcontroller's operating power consumption. The water temperature in the measured pipe changes infrequently, so a temperature measurement can be performed every K minutes, with K typically ranging from 1 to 30. During the automatic water temperature measurement process, the current temperature measured at time K is stored in the temperature parameter and used for flow compensation correction before the next temperature measurement.

[0138] Ultrasonic signal amplitude changes infrequently, so automatic matching is typically set to occur every N days, with N typically ranging from 1 to 30. During the ultrasonic signal matching process, the first and second initial parameters measured at the current time N are stored in the matching parameters of the gain amplifier and used for ultrasonic signal matching until the next ultrasonic signal amplitude matching is performed.

[0139] The automatic flow rate measurement process is generally set to be every M seconds, where M is dynamically adjusted based on the measured flow rate period. For example, if the current measured flow rate is less than the flow rate corresponding to small flow Q1, the flow rate is measured every 1 second. If the current measured flow rate is greater than the flow rate corresponding to small flow Q1, the flow rate is measured every 0.25 seconds.

[0140] The display, communication, key processing and other human-machine interface processing of the microcontroller generally require fast response, usually once every X seconds, where X is generally between 0.5 and 1.

[0141] like Figure 6 As shown, the MCU parameters are initialized first to determine whether the MCU is being charged and used for the first time. If so, the ultrasonic signal amplitude is matched before the task timer is started. If not, the task timer is started directly.

[0142] Determine whether the task timer has reached the preset task timer. If the task timer has not reached the preset task timer, the task timer enters a dormant state. If the task timer reaches the preset task timer, the task timer determines the specific due task based on the corresponding timer period of each task and executes the corresponding due task until all scheduled tasks are completed. The preset timers are K minutes, M seconds, N days, and X seconds.

[0143] Figure 7 This is a schematic diagram of the structure of the ultrasonic water flow metering device 400 provided in the embodiment of the present application. The device can be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above-mentioned Figure 1 The method embodiment corresponds to the embodiment that can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device can be found in the description above. To avoid repetition, detailed descriptions are omitted here. The device includes: a signal acquisition module 401, a first amplitude acquisition module 402, a second amplitude acquisition module 403, a matching module 404, a calculation module 405, a flow rate acquisition module 406, a temperature acquisition module 407, and a flow calculation module 408, wherein:

[0144] The signal acquisition module 401 is used to acquire the uplink ultrasonic signal and the downlink ultrasonic signal in the pipeline to be tested;

[0145] A first amplitude acquisition module 402 is configured to acquire a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal;

[0146] A second amplitude acquisition module 403 is configured to acquire a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal;

[0147] a matching module 404 configured to match the first maximum amplitude and the second maximum amplitude so that a deviation between the first maximum amplitude and the second maximum amplitude is less than a first preset threshold, thereby obtaining a matched uplink ultrasonic signal and a matched downlink ultrasonic signal;

[0148] A calculation module 405 is configured to calculate a time of flight difference based on the matched uplink ultrasonic signal and the downlink ultrasonic signal;

[0149] A flow rate acquisition module 406 is configured to acquire the water flow rate in the pipeline to be tested according to the flight time difference;

[0150] The temperature acquisition module 407 is used to obtain the water flow temperature in the pipeline to be tested;

[0151] The flow calculation module 408 is used to calculate the water flow rate in the pipeline to be tested according to the water flow velocity and the water flow temperature.

[0152] Based on the above embodiment, the signal acquisition module 401 is specifically configured to:

[0153] Acquiring a first initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be tested;

[0154] Acquiring an uplink ultrasonic signal of the pipeline to be tested before restoration, and amplifying an electrical signal corresponding to the uplink ultrasonic signal before restoration according to the first initial parameter to obtain an uplink electrical signal;

[0155] Obtaining a second initial parameter corresponding to a gain amplifier for adjusting the downlink ultrasonic signal in the pipeline to be tested;

[0156] Acquire a downlink ultrasonic signal of the pipeline to be tested before restoration, and amplify an electrical signal corresponding to the downlink ultrasonic signal before restoration according to the second initial parameter to obtain a downlink electrical signal;

[0157] Performing AD acquisition on the uplink electrical signal to obtain the uplink ultrasonic signal in the pipeline to be tested;

[0158] Perform AD acquisition on the downlink electrical signal to obtain the downlink ultrasonic signal in the pipeline to be tested.

[0159] Based on the above embodiment, the matching module 404 is specifically configured to:

[0160] determining whether a ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold;

[0161] If the ratio is within a second preset threshold and the difference between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold, the first initial parameter or the second initial parameter is adjusted to match the first maximum amplitude with the second maximum amplitude.

[0162] Based on the above embodiment, the matching module 404 is specifically configured to:

[0163] If the first maximum amplitude is greater than the second maximum amplitude, the first initial parameter is reduced or the second initial parameter is increased so that the deviation between the first maximum amplitude and the second maximum amplitude is less than the first preset threshold.

[0164] Based on the above embodiment, the calculation module 405 is specifically configured to:

[0165] Obtaining the flight time of the matched uplink ultrasonic signal to obtain a first flight time;

[0166] Obtaining the flight time of the matched downlink ultrasonic signal to obtain a second flight time;

[0167] The flight time difference is obtained according to the first flight time and the second flight time.

[0168] Based on the above embodiment, the temperature acquisition module 407 is specifically used to:

[0169] Obtaining the time it takes for a first resistor in the water temperature detector to charge a charging capacitor to a preset voltage, thereby obtaining a first charging time; wherein the water temperature detector is disposed in the pipeline to be measured, and comprises the first resistor, the charging capacitor, and a second resistor, and the first resistor is a standard resistor;

[0170] Obtaining the time it takes for the second resistor to charge the charging capacitor to the preset voltage to obtain a second charging time; wherein the second resistor is a thermistor or a thermocouple;

[0171] Obtaining a resistance value of the second resistor according to the first charging time, the second charging time, and the resistance value of the first resistor;

[0172] The water flow temperature in the pipeline to be measured is obtained according to the resistance value of the second resistor.

[0173] Based on the above embodiment, the flow calculation module 408 is specifically used to:

[0174] according to Calculate the water flow linear velocity at the center of the pipeline to be measured; where k is the line-surface compensation coefficient, is the water flow rate, is the linear velocity of water flow in the center of the pipeline to be tested;

[0175] according to Calculate the instantaneous water flow rate in the pipeline to be tested; where A is the cross-sectional area of ​​the pipeline to be tested, is the instantaneous water flow rate of the pipeline to be tested;

[0176] performing flow compensation on the instantaneous water flow that meets the instantaneous water flow range according to the water flow temperature to obtain a compensated water flow;

[0177] The compensated water flow rate is integrated to obtain the total water flow rate in the pipeline to be tested.

[0178] To summarize, the embodiments of the present application achieve matching of the amplitudes of the two ultrasonic signals by dynamically adjusting the amplification factors of the uplink ultrasonic signal and the downlink ultrasonic signal, thereby reducing the requirements for transducer matching, avoiding the degradation of metering performance due to aging and scaling of the transducer and reflector, reducing the difference in amplitude between the uplink ultrasonic signal and the downlink ultrasonic signal, and making the obtained flight time difference more accurate, thereby improving the metering accuracy during the operation of the water meter.

[0179] Figure 8 The physical structure diagram of the electronic device provided in the embodiment of the present application is as follows: Figure 8 As shown, the electronic device includes: a processor (processor) 501, a memory (memory) 502 and a bus 503; wherein:

[0180] The processor 501 and the memory 502 communicate with each other via the bus 503;

[0181] The processor 501 is used to call the program instructions in the memory 502 to execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining an uplink ultrasonic signal and a downlink ultrasonic signal in the pipeline to be tested; obtaining a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal; obtaining a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal; matching the first maximum amplitude and the second maximum amplitude so that the deviation between the first maximum amplitude and the second maximum amplitude is less than a first preset threshold, and obtaining a matched uplink ultrasonic signal and a matched downlink ultrasonic signal; calculating a flight time difference according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal; obtaining the water flow velocity according to the flight time difference; obtaining the water flow temperature in the pipeline to be tested; and calculating the water flow rate in the pipeline to be tested based on the water flow velocity and the water flow temperature.

[0182] Processor 501 can be an integrated circuit chip with signal processing capabilities. The processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0183] The memory 502 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0184] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions. When the program instructions are executed by a computer, the computer can perform the methods provided by the above-mentioned method embodiments, for example, including: obtaining an uplink ultrasonic signal and a downlink ultrasonic signal in a pipeline to be tested; obtaining a first maximum amplitude of the uplink ultrasonic signal based on the uplink ultrasonic signal; obtaining a second maximum amplitude of the downlink ultrasonic signal based on the downlink ultrasonic signal; matching the first maximum amplitude and the second maximum amplitude so that the deviation between the first maximum amplitude and the second maximum amplitude is less than a first preset threshold, thereby obtaining a matched uplink ultrasonic signal and a matched downlink ultrasonic signal; calculating a flight time difference based on the matched uplink ultrasonic signal and the matched downlink ultrasonic signal; obtaining the water flow velocity based on the flight time difference; obtaining the water flow temperature in the pipeline to be tested; and calculating the water flow rate in the pipeline to be tested based on the water flow velocity and the water flow temperature.

[0185] This embodiment provides a storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining an uplink ultrasonic signal and a downlink ultrasonic signal in the pipeline to be tested; obtaining a first maximum amplitude of the uplink ultrasonic signal based on the uplink ultrasonic signal; obtaining a second maximum amplitude of the downlink ultrasonic signal based on the downlink ultrasonic signal; matching the first maximum amplitude and the second maximum amplitude so that the deviation between the first maximum amplitude and the second maximum amplitude is less than a first preset threshold, and obtaining a matched uplink ultrasonic signal and a matched downlink ultrasonic signal; calculating a flight time difference based on the matched uplink ultrasonic signal and the matched downlink ultrasonic signal; obtaining the water flow velocity based on the flight time difference; obtaining the water flow temperature in the pipeline to be tested; and calculating the water flow rate in the pipeline to be tested based on the water flow velocity and the water flow temperature.

[0186] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0187] In addition, the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0188] Furthermore, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0189] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.

[0190] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, various modifications and variations of the present application are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for measuring ultrasonic water flow, characterized in that: include: Acquire uplink ultrasonic signals and downlink ultrasonic signals in the pipeline to be tested; acquiring a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal; Acquire a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal; Matching the first maximum amplitude and the second maximum amplitude so that a deviation between the first maximum amplitude and the second maximum amplitude is less than a first preset threshold, and obtaining a matched uplink ultrasonic signal and a matched downlink ultrasonic signal; Calculating a time-of-flight difference based on the matched uplink ultrasonic signal and the matched downlink ultrasonic signal; Obtaining the water flow velocity according to the flight time difference; Obtaining the water flow temperature in the pipeline to be measured; The water flow rate in the pipeline to be measured is calculated according to the water flow velocity and the water flow temperature.

2. The method according to claim 1, characterized in that The obtaining of the uplink ultrasonic signal and the downlink ultrasonic signal in the pipeline to be tested includes: Obtaining first initial parameters corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be tested; Acquiring an uplink ultrasonic signal of the pipeline to be tested before restoration, and amplifying an electrical signal corresponding to the uplink ultrasonic signal before restoration according to the first initial parameter to obtain an uplink electrical signal; Obtaining a second initial parameter corresponding to a gain amplifier for adjusting the downlink ultrasonic signal in the pipeline to be tested; Acquire a downlink ultrasonic signal of the pipeline to be tested before restoration, and amplify an electrical signal corresponding to the downlink ultrasonic signal before restoration according to the second initial parameter to obtain a downlink electrical signal; AD acquisition is performed on the uplink electrical signal and the downlink electrical signal respectively to obtain the uplink ultrasonic signal corresponding to the uplink electrical signal and the downlink ultrasonic signal corresponding to the downlink electrical signal.

3. The method according to claim 2, characterized in that The matching of the first maximum amplitude value and the second maximum amplitude value includes: determining whether a ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold; If the ratio is within a second preset threshold and the difference between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold, the first initial parameter or the second initial parameter is adjusted to match the first maximum amplitude with the second maximum amplitude.

4. The method according to claim 3, characterized in that The adjusting the first initial parameter or the second initial parameter includes: If the first maximum amplitude is greater than the second maximum amplitude, the first initial parameter is reduced or the second initial parameter is increased so that the deviation between the first maximum amplitude and the second maximum amplitude is less than the first preset threshold.

5. The method according to claim 1, wherein The calculating the flight time difference according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal includes: Obtaining the flight time of the matched uplink ultrasonic signal to obtain a first flight time; Obtaining the flight time of the matched downlink ultrasonic signal to obtain a second flight time; The flight time difference is obtained according to the first flight time and the second flight time.

6. The method according to claim 1, characterized in that The step of obtaining the water flow temperature in the pipeline to be measured includes: Obtaining the time it takes for a first resistor in the water temperature detector to charge a charging capacitor to a preset voltage, thereby obtaining a first charging time; wherein the water temperature detector is disposed in the pipeline to be measured, and comprises the first resistor, the charging capacitor, and a second resistor, and the first resistor is a standard resistor; Obtaining the time it takes for the second resistor to charge the charging capacitor to the preset voltage to obtain a second charging time; wherein the second resistor is a thermistor or a thermocouple; Obtaining a resistance value of the second resistor according to the first charging time, the second charging time, and the resistance value of the first resistor; The water flow temperature in the pipeline to be measured is obtained according to the resistance value of the second resistor.

7. The method according to claim 1, characterized in that The calculating the water flow rate in the pipeline to be measured according to the water flow velocity and the water flow temperature includes: according to Calculate the water flow linear velocity at the center of the pipeline to be measured; where k is the line-surface compensation coefficient, is the water flow rate, is the linear velocity of water flow in the center of the pipeline to be tested; according to Calculate the instantaneous water flow rate in the pipeline to be tested; where A is the cross-sectional area of ​​the pipeline to be tested, is the instantaneous water flow rate of the pipeline to be tested; performing flow compensation on the instantaneous water flow that meets the instantaneous water flow range according to the water flow temperature to obtain a compensated water flow; The compensated water flow rate is integrated to obtain the total water flow rate in the pipeline to be tested.

8. A device for measuring ultrasonic water flow, characterized in that: include: A signal acquisition module is used to acquire the uplink ultrasonic signal and the downlink ultrasonic signal in the pipeline to be tested; a first amplitude acquisition module, configured to acquire a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal; a second amplitude acquisition module, configured to acquire a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal; a matching module, configured to match the first maximum amplitude and the second maximum amplitude so that a deviation between the first maximum amplitude and the second maximum amplitude is less than a first preset threshold, and obtain a matched uplink ultrasonic signal and a downlink ultrasonic signal; a calculation module, configured to calculate a time-of-flight difference based on the matched uplink ultrasonic signal and the matched downlink ultrasonic signal; A flow rate acquisition module, configured to acquire the water flow rate in the pipe to be tested according to the flight time difference; A temperature acquisition module, used to acquire the water flow temperature in the pipeline to be tested; The flow calculation module is used to calculate the water flow in the pipeline to be tested according to the water flow velocity and the water flow temperature.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is performed.

10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, executes the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • High-precision low-power-consumption ultrasonic flowmeter

    CN104568036A

  • Method and apparatus for ultrasonic flow velocity measurement

    JP2001317975A