CN114353891A - Ultrasonic water flow metering method and device, electronic equipment and storage medium - Google Patents
Ultrasonic water flow metering method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114353891A CN114353891A CN202210022412.XA CN202210022412A CN114353891A CN 114353891 A CN114353891 A CN 114353891A CN 202210022412 A CN202210022412 A CN 202210022412A CN 114353891 A CN114353891 A CN 114353891A
- Authority
- CN
- China
- Prior art keywords
- ultrasonic signal
- water flow
- maximum amplitude
- uplink
- pipeline
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Measuring Volume Flow (AREA)
Abstract
The application provides a method and a device for measuring ultrasonic water flow, electronic equipment and a storage medium. The method comprises the following steps: acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in a pipeline to be detected; acquiring a first maximum amplitude according to the uplink ultrasonic signal; acquiring a second maximum amplitude according to the downlink ultrasonic signal; matching the first maximum amplitude and the second maximum amplitude to obtain an uplink ultrasonic signal and a downlink ultrasonic signal which are matched; calculating a time difference of flight; acquiring the flow velocity of water in the pipeline to be detected according to the flight time difference; acquiring the temperature of water flow in a pipeline to be detected; and calculating the water flow in the pipeline to be measured according to the water flow velocity and the water flow temperature. According to the method and the device, the amplitude matching of the uplink ultrasonic signals and the downlink ultrasonic signals is realized by dynamically adjusting the amplification parameters of the gain amplifiers corresponding to the uplink ultrasonic signals and the downlink ultrasonic signals, so that the metering precision of the water flow is improved.
Description
Technical Field
The application relates to the technical field of ultrasonic measurement, in particular to a method and a device for measuring ultrasonic water flow, electronic equipment and a storage medium.
Background
Along with the development of intelligent water meters, the demand for electronization and digitization of water meter metering is more and more urgent. At present, the traditional mechanical water meter converts the metering data of the mechanical water meter into electronic data through electromechanical conversion, and the traditional mechanical water meter is still the mainstream mode in the field of the current civil small-caliber water meter. The pure electronic electromagnetic induction type and ultrasonic wave technology have the problems of high production cost, large metering power consumption and no obvious advantages in metering precision compared with a mechanical water meter, and cannot be popularized in large batch in the field of civil small-caliber water meters.
The conventional ultrasonic water meter generally adopts a master control MCU + TDC dual-metering chip, ultrasonic water flow is metered by a method of measuring the difference between the uplink flight time and the downlink flight time of ultrasonic waves by detecting the zero-crossing signal of an ultrasonic signal, the requirement on the signal consistency of two ultrasonic transducers of the uplink ultrasonic transducer and the downlink ultrasonic transducer is higher, the two ultrasonic transducers are required to be paired for use, and once the signal deviation of the two ultrasonic transducers is larger, the deviation of the metering of the water flow can be caused.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for measuring an ultrasonic water flow, an electronic device, and a storage medium, so as to solve a technical problem in the prior art that a deviation occurs in measurement of the water flow due to a difference between signal amplitudes of an uplink transducer and a downlink transducer.
In a first aspect, an embodiment of the present application provides a method for measuring an ultrasonic water flow rate, including: acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in a pipeline to be detected;
acquiring a first maximum amplitude of an uplink ultrasonic signal according to the uplink ultrasonic signal;
acquiring 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 to enable the deviation between the first maximum amplitude and the second maximum amplitude to be smaller than a first preset threshold value, and obtaining a matched uplink ultrasonic signal and a matched downlink ultrasonic signal;
calculating the flight time difference of the uplink ultrasonic signal and the downlink ultrasonic signal according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal;
acquiring the flow velocity of water flow in the pipeline to be detected according to the flight time difference;
acquiring the temperature of water flow in the pipeline to be detected;
and calculating the water flow in the pipeline to be detected according to the water flow velocity and the water flow temperature.
According to the embodiment of the application, the amplification times of the uplink ultrasonic signal and the downlink ultrasonic signal are dynamically adjusted, the matching of the amplitudes of the two ultrasonic signals is realized, the matching requirement on the transducer is lowered, the reduction of the metering performance caused by the aging of the transducer and a reflector plate, scaling and the like is avoided, the difference between the amplitudes of the uplink ultrasonic signal and the downlink ultrasonic signal is reduced, the obtained flight time difference is more accurate, and the metering precision in the running process of the water meter is improved.
Further, the acquiring of the uplink ultrasonic signal and the downlink ultrasonic signal in the pipeline to be detected includes:
acquiring a first initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be detected;
acquiring an uplink ultrasonic signal of the to-be-detected pipeline before restoration, and amplifying an electric signal corresponding to the uplink ultrasonic signal before restoration according to the first initial parameter to obtain an uplink electric signal;
acquiring a second initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be detected;
acquiring a downlink ultrasonic signal of the to-be-detected pipeline before restoration, and amplifying an electric signal corresponding to the downlink ultrasonic signal before restoration according to the second initial parameter to obtain a downlink electric signal;
and respectively carrying out AD acquisition on the uplink electric signal and the downlink electric signal to obtain the uplink ultrasonic signal corresponding to the uplink electric signal and the downlink ultrasonic signal corresponding to the downlink electric signal.
In the embodiment of the application, after the first electric signal and the second electric signal are amplified through the internal gain amplifier, the first electric signal and the second electric signal are acquired through high-speed AD acquisition, and the restored ultrasonic signal is obtained, so that the precision of single measurement is improved, the signal noise is effectively improved, the time difference resolution is improved, and the digital filtering effect is achieved.
Further, said matching the first maximum amplitude and the second maximum amplitude comprises:
judging whether the ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold value or not;
if the ratio is within a second preset threshold value and the difference value between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold value, adjusting the first initial parameter or the second initial parameter so as to enable the first maximum amplitude to be matched with the second maximum amplitude.
In the embodiment of the application, whether the ratio of the first maximum amplitude to the second maximum amplitude is within the second preset threshold is judged, and the uplink ultrasonic signal and the downlink ultrasonic signal which meet the second preset threshold are matched, so that the amplification parameter which does not meet the requirement can be prevented from being adjusted, and the metering efficiency of the water meter is improved.
Further, the adjusting the first initial parameter or the second initial parameter includes:
if the first maximum amplitude is greater than the second maximum amplitude, decreasing the first initial parameter or increasing the second initial parameter so that the deviation between the first maximum amplitude and the second maximum amplitude is smaller than the first preset threshold.
In the embodiment of the application, the parameters of the gain amplifier are dynamically adjusted by comparing the difference value between the maximum amplitude of the uplink ultrasonic signal and the maximum amplitude of the downlink ultrasonic signal, and the uplink ultrasonic signal and the downlink ultrasonic signal which meet the matching requirement are subjected to related calculation, so that the matching requirement of the transducer can be reduced, and the accuracy of the time difference of flight can be ensured.
Further, the calculating a time difference of flight according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal includes:
acquiring the flight time of the matched uplink ultrasonic signal to obtain a first flight time;
acquiring the flight time of the matched downlink ultrasonic signal to obtain a second flight time;
and obtaining the flight time difference according to the first flight time and the second flight time.
In the embodiment of the application, the flight time difference obtained by calculation is more accurate by obtaining the flight time of the matched uplink ultrasonic signal and the flight time of the matched downlink ultrasonic signal, so that the step of selecting the transducer in the early stage is reduced, the production efficiency is improved, and the proportion of defective products of the transducer in the selection process is reduced.
Further, the acquiring the water flow temperature in the pipeline to be detected comprises:
acquiring the time for charging a charging capacitor to a preset voltage by a first resistor in a water temperature detector to obtain first charging time; the water temperature detector is arranged in the pipeline to be detected and comprises a first resistor, a charging capacitor and a second resistor, and the first resistor is a standard resistor;
acquiring the time for the second resistor to charge the charging capacitor to the preset voltage to obtain second charging time; wherein the second resistor is a thermistor or a thermocouple;
obtaining the resistance value of the second resistor according to the first charging time, the second charging time and the resistance value of the first resistor;
and obtaining the temperature of the water flow in the pipeline to be tested according to the resistance value of the second resistor.
In the embodiment of the application, the charging time of the charging capacitor is measured through the combination of the resistor and the capacitor, so that the water flow temperature in the measuring pipeline is calculated, the resources of the MCU internal low-power consumption comparator and the timer are effectively utilized, the metering power consumption of the water meter is reduced, and the metering precision of the water flow temperature is improved.
Further, the calculating the water flow in the pipe to be tested according to the water flow velocity and the water flow temperature includes:
according to VSCalculating the linear velocity of the water flow in the center of the pipeline to be measured as kV; wherein k is a line-plane compensation coefficient, V is the water flow velocity, VSThe linear velocity of the water flow at the center of the pipeline to be detected;
according to QVAkV, calculating the instantaneous water flow in the pipeline to be measured; wherein A is the cross-sectional area of the pipeline to be measured, QVThe instantaneous water flow of the pipeline to be detected;
performing flow compensation on the instantaneous water flow meeting the instantaneous water flow range according to the water flow temperature to obtain compensated water flow;
and integrating the compensated water flow to obtain the total water flow in the pipeline to be detected.
In the embodiment of the application, only the instantaneous water flow which meets the temperature range and the instantaneous water flow range is subjected to flow compensation, the instantaneous water flow which does not meet the requirements is not compensated, and the power consumption of the operation of the single chip microcomputer can be reduced.
In a second aspect, an embodiment of the present application provides an ultrasonic water flow rate metering device, including: the signal acquisition module is used for acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in the pipeline to be detected;
the first amplitude acquisition module is used for acquiring a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal;
the second amplitude acquisition module is used for acquiring a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal;
the matching module is used for 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 smaller than a first preset threshold value, and obtaining an uplink ultrasonic signal and a downlink ultrasonic signal after matching;
the calculating module is used for calculating the flight time difference according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal;
the flow rate obtaining module is used for obtaining the flow rate of water flow in the pipeline to be tested according to the flight time difference;
the temperature acquisition module is used for acquiring the temperature of water flow in the pipeline to be detected;
and the flow calculation module is used for calculating the water flow in the pipeline to be detected according to the water flow speed and the water flow temperature.
In a third aspect, an embodiment of the present application provides an electronic device, including: the system comprises a processor, a memory and a bus, wherein the processor and the memory are communicated with each other through the bus; the memory stores program instructions executable by the processor, the processor being capable of performing the method of the first aspect when invoked by the program instructions.
In a fourth aspect, embodiments of the present application provide a storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the method of the first aspect.
Additional features and advantages of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a method for measuring an ultrasonic water flow rate according to an embodiment of the present disclosure;
fig. 2 is a schematic view of an internal structure of a water pipe to be tested according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an ultrasonic metrology unit provided by an embodiment of the present application;
fig. 4 is a schematic flowchart of amplitude matching of ultrasonic signals according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart illustrating automatic measurement of water flow temperature according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of task timing processing provided in an embodiment of the present application;
FIG. 7 is a schematic structural diagram of an ultrasonic water flow rate metering device provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Fig. 1 is a schematic flow chart of a method for measuring an ultrasonic water flow rate according to an embodiment of the present disclosure, as shown in fig. 1. The method comprises the following steps:
step 101: and acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in the pipeline to be detected.
Fig. 2 is the inner structure schematic diagram of the water pipe that awaits measuring that this application embodiment provided, as shown in fig. 2, including a pair of transducer and two metal reflector plates in the pipeline that awaits measuring, the diameter of the pipeline that awaits measuring is D, two cavities are opened to the pipeline top that awaits measuring, cavity central point puts the distance and is L, be used for placing a pair of ultrasonic transducer respectively in the cavity, a pair of ultrasonic transducer both can be used for sending ultrasonic signal and can receive ultrasonic wave envelope echo signal, metal reflector plate position is installed under ultrasonic transducer and is 45 degrees contained angles with the horizontal axis, mainly turn to the ultrasonic signal of vertical direction or horizontal direction for the ultrasonic signal of horizontal direction or vertical direction.
Fig. 3 is a schematic diagram of an ultrasonic metering unit provided in an embodiment of the present application, and as shown in fig. 3, a pair of ultrasonic transducers includes an ultrasonic transducer 1 and an ultrasonic transducer 2, and probe surfaces of the ultrasonic transducers 1 and 2 are in contact with a water flow. The uplink ultrasonic signal is a pulse signal sent by a pulse amplifier, the pulse signal is amplified by a power amplifier and passes through a resistor R1Sending the amplified pulse signal to the ultrasonic transducer 1, after a period of time, receiving the echo signal from the ultrasonic transducer 1 by the ultrasonic transducer 2, converting the received echo signal into an electric signal, and switching the capacitor C by the receiving and switching unit2The converted electric signal is received, amplified by an internal gain amplifier PGA, and acquired by an AD converter.
The downlink ultrasonic signal is a pulse signal sent by a pulse amplifier, the pulse signal is amplified by a power amplifier and passes through a resistor R2Sending the amplified pulse signal to the ultrasonic transducer 2, after a period of time, the ultrasonic transducer 1 receiving the echo signal from the ultrasonic transducer 2 and converting the received echo signal into an electric signal, and the receiving switching unit switching the capacitor C1The converted electric signal is received, amplified by an internal gain amplifier PGA, and acquired by an AD converter. Wherein, the period of time is generally calculated in advance according to the length of the pipeline to be measured, the sound wave speed and the maximum water flow velocity.
Step 102: and acquiring a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal.
The uplink ultrasonic signals are sine wave signals acquired and restored through an AD converter, and the first maximum amplitude is the maximum amplitude of the uplink ultrasonic signals in a period.
Step 103: and acquiring a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal.
The downlink ultrasonic signal is a sine wave signal acquired and restored through an AD converter, and the second maximum amplitude is the maximum amplitude of the downlink ultrasonic signal in a period.
Step 104: and matching the first maximum amplitude and the second maximum amplitude to enable the deviation between the first maximum amplitude and the second maximum amplitude to be smaller than a first preset threshold value, and obtaining a matched uplink ultrasonic signal and a matched downlink ultrasonic signal.
In this embodiment of the application, matching the first maximum amplitude and the second maximum amplitude means that the maximum amplitude of the uplink ultrasonic signal and/or the downlink ultrasonic signal is changed by adjusting a parameter of a gain amplifier corresponding to the uplink ultrasonic signal and/or the downlink ultrasonic signal, so that a deviation between the adjusted first maximum amplitude and the second maximum amplitude is smaller than a first preset threshold.
The gain amplifier may use a programmable amplifier PGA to adjust the amplitudes of the uplink ultrasonic signal and the downlink ultrasonic signal, and the programmable amplifier PGA may be specifically, but not limited to, AD 8577. The first preset threshold is a range in which the deviation of the maximum amplitude values corresponding to the uplink ultrasonic signal and the downlink ultrasonic signal meets the actual matching requirement, and comprises an upper limit threshold and a lower limit threshold, and the deviation between the first maximum amplitude value and the second maximum amplitude value is between the upper limit threshold and the lower limit threshold, so that the matching of the amplitude values of the uplink ultrasonic signal and the downlink ultrasonic signal can be realized.
Step 105: calculating a flight time difference according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal;
in the embodiment of the application, a singlechip microcomputer with an ultrasonic metering front end is adopted for MSP430FR6047 of TI company to realize the metering of the water flow, the MSP430FR6047 singlechip microcomputer is provided with an ultrasonic pulse generator and a power amplifier, and a receiving switching unit, an internal gain amplifier PGA and an AD converter are arranged at a receiving end.
After the matched uplink ultrasonic signal and the matched downlink ultrasonic signal are obtained, the flight time difference of the upper ultrasonic wave and the lower ultrasonic wave is calculated by adopting an algorithm ready in a USS SW Library inside the MSP430FR6047 singlechip, and the MSP430FR6047 singlechip has the advantages of low working voltage, low power consumption, high calculation capability and the like.
Step 106: and acquiring the flow velocity of the water flow in the pipeline to be detected according to the flight time difference.
In the embodiment of the application, after the time difference between the uplink ultrasonic signal and the downlink ultrasonic signal is calculated, the flow velocity of the water in the pipeline to be measured is calculated by the algorithm of the USS SW Library. The water flow speed of the pipeline to be detected refers to the instantaneous water flow speed in the current pipeline to be detected.
Step 107: and acquiring the temperature of the water flow in the pipeline to be detected.
In the embodiment of the application, as shown in fig. 3, the MCU control unit of the MSP430FR6047 single-chip microcomputer includes a comparator and a low-power timer, the combination of the comparator and the low-power timer provided in the control unit is used to calculate the water temperature of the pipeline to be measured, the obtained water temperature has high precision, and the running power consumption of the MSP430FR6047 single-chip microcomputer can be reduced.
Step 108: and calculating the water flow in the pipeline to be detected according to the water flow velocity and the water flow temperature.
The water flow in the pipeline to be tested is the total accumulated water volume in the metering time, and the water flow velocity is the water flow linear velocity in the center of the pipeline to be tested.
On the basis of the above embodiment, acquiring the uplink ultrasonic signal and the downlink ultrasonic signal in the pipe to be measured includes:
acquiring a first initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be detected;
acquiring an uplink ultrasonic signal of the to-be-detected pipeline before restoration, and amplifying an electric signal corresponding to the uplink ultrasonic signal before restoration according to the first initial parameter to obtain an uplink electric signal;
acquiring a second initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be detected;
acquiring a downlink ultrasonic signal of the to-be-detected pipeline before reduction, and amplifying an electric signal corresponding to the downlink ultrasonic signal before reduction according to the second initial parameter to obtain a downlink electric signal;
performing AD acquisition on the uplink electric signal to obtain an uplink ultrasonic signal in the pipeline to be detected;
and carrying out AD acquisition on the downlink electric signals to obtain downlink ultrasonic signals in the pipeline to be detected.
In the embodiment of the present application, the first initial parameter is an initial amplification parameter of a gain amplifier for adjusting an uplink ultrasonic signal, and the second initial parameter is an initial amplification parameter of a gain amplifier for adjusting a downlink ultrasonic signal. As shown in fig. 3, the upstream ultrasonic signal before being restored refers to an electric signal obtained by converting the echo signal received by the ultrasonic transducer 2 from the ultrasonic transducer 1. The downlink ultrasonic signal before restoration is an electric signal obtained by the ultrasonic transducer 1 receiving the echo signal from the ultrasonic transducer 2 and converting the echo signal.
Gain amplification is carried out on the electric signal corresponding to the uplink ultrasonic signal before reduction through the first initial parameter, gain amplification is carried out on the electric signal corresponding to the downlink ultrasonic signal before reduction through the second initial parameter, and the AD converter is used for collecting the uplink electric signal and the downlink electric signal after gain amplification respectively to obtain the uplink ultrasonic signal and the downlink ultrasonic signal after reduction. On the basis of the foregoing embodiment, the matching the first maximum amplitude value and the second maximum amplitude value includes:
judging whether the ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold value or not;
if the ratio is within a second preset threshold value and the difference value between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold value, adjusting the first initial parameter or the second initial parameter so as to enable the first maximum amplitude to be matched with the second maximum amplitude.
Fig. 4 is a schematic flow chart of amplitude matching of an ultrasonic signal according to an embodiment of the present application, as shown in fig. 4:
step 201: and acquiring an ultrasonic signal.
First, a first initial parameter and a second initial parameter are obtained, a first maximum amplitude value is obtained according to the first initial parameter, and a second maximum amplitude value is obtained according to the second parameter.
Step 202: and matching ultrasonic signals.
Firstly, judging whether the ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold, if the ratio does not meet the range of the second preset threshold, recording the current first initial parameter and the second initial parameter, so that the current first initial parameter and the current second initial parameter are prevented from being used as initial matching parameters of a gain amplifier in the next amplitude matching of the ultrasonic signal, and matching the corresponding first maximum amplitude and the corresponding second maximum amplitude according to the reset first initial parameter and the second initial parameter.
Wherein the second preset threshold value means that the ratio of the first maximum amplitude to the second maximum amplitude is in 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 deviation between the corresponding first initial parameter and the second initial parameter is large, and the requirement for amplitude matching of the ultrasonic signal can be met only by adjusting the first initial parameter and the second initial parameter for multiple times subsequently, so that the resource waste of the single chip microcomputer is caused, and the operation power consumption of the single chip microcomputer is increased.
And if the ratio satisfies the range of a second preset threshold value and the difference value between the first maximum amplitude and the second maximum amplitude is smaller than the first preset threshold value, matching the first maximum amplitude and the second maximum amplitude. If the ratio satisfies the range of a second preset threshold value and the deviation between the first maximum amplitude and the second maximum amplitude is larger than the first preset threshold value, adjusting the first initial parameter or the second initial parameter to adjust the maximum amplitude of the corresponding uplink ultrasonic signal or the maximum amplitude of the corresponding downlink ultrasonic signal, and matching the corresponding first maximum amplitude and the second maximum amplitude according to the reset first initial parameter and second initial parameter.
On the basis of the foregoing embodiment, the adjusting the first initial parameter or the second initial parameter includes:
if the first maximum amplitude is greater than the second maximum amplitude, decreasing the first initial parameter or increasing the second initial parameter so that the deviation between the first maximum amplitude and the second maximum amplitude is smaller than the first preset threshold.
In the embodiment of the application, when the first maximum amplitude is larger than the second maximum amplitude, the first maximum amplitude is reduced by reducing the first initial parameter, and the second maximum amplitude and the reduced first maximum amplitude are re-matched; or increasing the second initial parameter to increase the second maximum amplitude, and re-matching the first maximum amplitude and the increased second maximum amplitude. So that the deviation between the first maximum amplitude and the second maximum amplitude is smaller than the first preset threshold value, and the uplink ultrasonic signal and the downlink ultrasonic signal are matched.
On the basis of the above embodiment, the calculating a time difference of flight according to the matched uplink ultrasonic signal and downlink ultrasonic signal includes:
acquiring the flight time of the matched uplink ultrasonic signal to obtain a first flight time;
acquiring the flight time of the matched downlink ultrasonic signal to obtain a second flight time;
and obtaining the flight time difference according to the first flight time and the second flight time.
As shown in fig. 3, the first flight time is a time when the ultrasonic transducer 2 receives the echo signal from the ultrasonic transducer 1, and the second flight time is a time when the ultrasonic transducer 1 receives the echo signal from the ultrasonic transducer 2. In the embodiment of the application, the first flight time and the second flight time are calculated through a USS SW Library algorithm in the MSP430FR6047 singlechip, and the flight time difference between the uplink ultrasonic signal and the downlink ultrasonic signal is obtained through the difference value between the first flight time and the second flight time.
On the basis of the foregoing embodiment, fig. 5 is a schematic flow chart of automatically measuring a water flow temperature provided in the embodiment of the present application, and as shown in fig. 5, the acquiring a water flow temperature in the pipe to be measured includes:
acquiring the time for charging a charging capacitor to a preset voltage by a first resistor in a water temperature detector to obtain first charging time; the water temperature detector is arranged in the pipeline to be detected and comprises a first resistor, a charging capacitor and a second resistor, and the first resistor is a standard resistor;
acquiring the time for the second resistor to charge the charging capacitor to the preset voltage to obtain second charging time; wherein the second resistor is a thermistor or a thermocouple;
obtaining the resistance value of the second resistor according to the first charging time, the second charging time and the resistance value of the first resistor;
and obtaining the temperature of the water flow in the pipeline to be tested according to the resistance value of the second resistor.
Wherein the preset voltage is 0.63Vu,VuAn input voltage for charging the charging capacitor.
wherein, VtIs the voltage, V, across the charging capacitor C after time t of charginguIs the input voltage to charge the charge capacitor, R is the resistance of the standard resistor, C is the charge capacitor capacity, exp is an exponential function based on the natural constant e in higher mathematics, e is a constant of 2.71828. When t is RC, Vt=Vu*(1-e-1)=0.63Vu. Therefore, when the low power consumption comparator voltage V is set to 0.63Vu, the timer accumulates time t to RC.
Respectively passing through a thermistor RntcAnd a standard resistance R3Charging the charging capacitor to 0.63VuThe thermistor R can be calculated by the following formulantcResistance value of (2):
wherein, TntcTo pass through a thermistor RntcCharging the charging capacitor to 0.63VuTime of (T)RIs a standard resistance R3Charging the charging capacitor to 0.63VuTime of (T)ntcAnd TRAll can be obtained by timing with a low-power-consumption timer.
As shown in fig. 5, step 301: and charging the charging capacitor through the standard resistor. First, the capacitor C is charged3Discharge to zero level at the reference resistance R3When the charging pulse output is high level, the charging pulse output is passed through a standard resistor R3Charging the charging capacitor, timing by a low-power consumption timer, and judging the charging capacitor C by a low-power consumption comparator3Voltage of up to 0.63VuWhen, record the current TRThe value is obtained.
Step 302: the charging capacitor is charged through the thermistor.
To charge a capacitor C3Discharge to zero level at the thermistor RntcWhen the charging pulse output is high, the charging pulse output is passed through the thermistor RntcTo charging capacitor C3Charging, timing by a low-power consumption timer, and judging a charging capacitor C by a low-power consumption comparator3Voltage of up to 0.63VuWhen, record the current TntcThe value is obtained.
According to the standard resistance R3Resistance value of, TntcAnd TRCalculating thermistor RntcAnd calculating the current water flow temperature by looking up a table.
The embodiment of the application adopts the combination of the low-power consumption comparator and the low-power consumption timer which are arranged on the control unit, and utilizes the charging capacitor C3The resistance value of the thermistor is calculated according to the difference of the discharge curves of different resistors, and then the current water flow temperature is obtained through table lookup, so that the measurement precision of the water flow temperature can be effectively improved, and meanwhile, the power consumption of the MSP430FR6047 single chip microcomputer is reduced.
On the basis of the above embodiment, the calculating the water flow in the pipe to be measured according to the water flow velocity and the water flow temperature includes:
according to VSCalculating the linear velocity of the water flow in the center of the pipeline to be measured as kV; wherein k is a line-plane compensation coefficient, V is the water flow velocity, VSThe linear velocity of the water flow at the center of the pipeline to be detected;
according to QVAkV, calculating the instantaneous water flow in the pipeline to be measured; wherein A is the cross-sectional area of the pipeline to be measured, QVThe instantaneous water flow of the pipeline to be detected;
performing flow compensation on the instantaneous water flow meeting the instantaneous water flow range according to the water flow temperature to obtain compensated water flow;
and integrating the compensated water flow to obtain the total water flow in the pipeline to be detected.
In the embodiment of the application, the formula is usedAnd calculating the flow velocity of water flow in the pipeline to be measured, wherein V is the flow velocity of water flow, Delta T is the flight time difference of the uplink ultrasonic signal and the downlink ultrasonic signal, D is the diameter of the pipeline to be measured, L is the distance between a pair of ultrasonic transducers along the direction of water flow, Tup is first flight time, Toffset is the time of flight of the ultrasonic signal along the direction of the diameter D, and Tdown is second flight time.
Calculating the linear velocity of water flow at the center of the pipeline to be measured through Vs (voltage Vs) and then QVAkV obtain the instantaneous water flow in the pipe to be measured due to water temperature and water flowThe flow velocity affects the line-surface compensation coefficient k, and thus the measurement accuracy of ultrasonic water flow measurement.
In the embodiment of the application, the instantaneous water flow rate is from small flow Q1 to 0.1m within the temperature range of 0-55 DEG C3In the range of/h, the temperature of water flow is compensated for 0.01m of instantaneous water flow at intervals of 1 DEG C3H is used as the reference value. And when the data compensation correction is carried out, the closest correction point is selected according to the actual water flow temperature and the water flow velocity for compensation. The small flow Q1 can be obtained by calculating the diameter of the pipeline to be measured, the accuracy of the water meter and other parameters.
The embodiment of the application only has small flow Q1 to 0.1m for the instantaneous water flow3Compensating the instantaneous water flow in the range of/h, wherein the instantaneous water flow is more than 0.1m3And in the time of/h, the sensitivity of the water flow temperature is low, the instantaneous water flow of the part does not need to be compensated, and the running power consumption of the single chip microcomputer can be reduced.
Fig. 6 is a schematic flow chart of task timing processing provided in the embodiment of the present application, and as shown in fig. 6, a low-power-consumption timer is used to time a water flow temperature measurement process, a water flow velocity measurement process, an ultrasonic signal correction process, and a water meter human-computer interface processing process, and a corresponding task is executed after the processing time of each task, so that the operation power consumption of a single chip microcomputer can be reduced. The temperature of the water flow in the pipeline to be measured does not change frequently, the temperature can be measured once every K minutes, and the general value range of K is 1-30. In the process of automatically measuring the water flow temperature, the water flow temperature measured at the current K moment is stored in the temperature parameter and is provided for the time period before the temperature is measured next time for flow compensation and correction.
The amplitude change of the ultrasonic signals is not frequent, the ultrasonic signals are generally set to be automatically matched once in N days, and the general value range of N is 1-30. In the process of matching the ultrasonic signals, the first initial parameter and the second initial parameter measured at the current N moment are stored in the matching parameters of the gain amplifier and are provided for the time period before the next amplitude matching of the ultrasonic signals for matching the ultrasonic signals.
The process of automatically measuring the flow rate of water flow is generally set to once M seconds, wherein M is dynamically adjusted according to the measured flow rate period. For example, if the current flow rate is less than the flow rate corresponding to the small flow Q1, the flow rate is measured every 1 second. And if the current flow rate obtained by the test is larger than the flow rate corresponding to the small flow Q1, measuring the flow rate of the water flow every 0.25 seconds.
The display, communication, key processing and other human-computer interface processing of the single chip microcomputer generally need to be rapidly corresponding, generally, X is processed once every second, and X generally takes a value of 0.5-1.
As shown in fig. 6, the parameters of the single chip are initialized first, and whether the single chip is charged for the first time is determined. If the single chip microcomputer is used for electrifying for the first time, the amplitude of the ultrasonic signal is matched, and then the task timer is started for timing. And if the currently used singlechip is not used for charging for the first time, directly starting a task timer for timing.
And judging whether the task timer reaches the preset task timing time or not, and if the task timer does not reach the preset task timing time, enabling the task timer to enter a dormant state. And if the task timer reaches the preset task timing time, judging the specific due task according to the timing period corresponding to each task, and executing the corresponding due task until all the timing tasks are completed. Wherein the preset time is K minutes, M seconds, N days and X seconds.
Fig. 7 is a schematic structural diagram of an ultrasonic water flow rate metering device 400 provided in an embodiment of the present application, which may be a module, a program segment, or code on an electronic device. It should be understood that the apparatus corresponds to the above-mentioned embodiment of the method of fig. 1, and can perform various steps related to the embodiment of the method of fig. 1, and the specific functions of the apparatus can be referred to the description above, and the detailed description is appropriately omitted here to avoid redundancy. The device includes: a signal obtaining module 401, a first amplitude obtaining module 402, a second amplitude obtaining module 403, a matching module 404, a calculating module 405, a flow rate obtaining module 406, a temperature obtaining module 407, and a flow calculating module 408, wherein:
a signal obtaining module 401, configured to obtain an uplink ultrasonic signal and a downlink ultrasonic signal in a pipe to be tested;
a first amplitude obtaining module 402, configured to obtain a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal;
a second amplitude obtaining module 403, configured to obtain a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal;
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 smaller than a first preset threshold, and obtain an uplink ultrasonic signal and a downlink ultrasonic signal after matching;
a calculating module 405, configured to calculate a time difference of flight according to the matched uplink ultrasonic signal and downlink ultrasonic signal;
a flow rate obtaining module 406, configured to obtain a flow rate of water in the pipe to be tested according to the flight time difference;
a temperature obtaining module 407, configured to obtain a water flow temperature in the pipe to be tested;
and a flow calculating module 408, configured to calculate a flow of the water in the pipe to be tested according to the flow velocity of the water and the temperature of the water.
On the basis of the foregoing embodiment, the signal obtaining module 401 is specifically configured to:
acquiring a first initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be detected;
acquiring an uplink ultrasonic signal of the to-be-detected pipeline before restoration, and amplifying an electric signal corresponding to the uplink ultrasonic signal before restoration according to the first initial parameter to obtain an uplink electric signal;
acquiring a second initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be detected;
acquiring a downlink ultrasonic signal of the to-be-detected pipeline before reduction, and amplifying an electric signal corresponding to the downlink ultrasonic signal before reduction according to the second initial parameter to obtain a downlink electric signal;
performing AD acquisition on the uplink electric signal to obtain an uplink ultrasonic signal in the pipeline to be detected;
and carrying out AD acquisition on the downlink electric signals to obtain downlink ultrasonic signals in the pipeline to be detected.
On the basis of the foregoing embodiment, the matching module 404 is specifically configured to:
judging whether the ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold value or not;
if the ratio is within a second preset threshold value and the difference value between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold value, adjusting the first initial parameter or the second initial parameter so as to enable the first maximum amplitude to be matched with the second maximum amplitude.
On the basis of the foregoing embodiment, the matching module 404 is specifically configured to:
if the first maximum amplitude is greater than the second maximum amplitude, decreasing the first initial parameter or increasing the second initial parameter so that the deviation between the first maximum amplitude and the second maximum amplitude is smaller than the first preset threshold.
On the basis of the foregoing embodiment, the calculation module 405 is specifically configured to:
acquiring the flight time of the matched uplink ultrasonic signal to obtain a first flight time;
acquiring the flight time of the matched downlink ultrasonic signal to obtain a second flight time;
and obtaining the flight time difference according to the first flight time and the second flight time.
On the basis of the foregoing embodiment, the temperature obtaining module 407 is specifically configured to:
acquiring the time for charging a charging capacitor to a preset voltage by a first resistor in a water temperature detector to obtain first charging time; the water temperature detector is arranged in the pipeline to be detected and comprises a first resistor, a charging capacitor and a second resistor, and the first resistor is a standard resistor;
acquiring the time for the second resistor to charge the charging capacitor to the preset voltage to obtain second charging time; wherein the second resistor is a thermistor or a thermocouple;
obtaining the resistance value of the second resistor according to the first charging time, the second charging time and the resistance value of the first resistor;
and obtaining the temperature of the water flow in the pipeline to be tested according to the resistance value of the second resistor.
On the basis of the foregoing embodiment, the flow calculating module 408 is specifically configured to:
according to VSCalculating the linear velocity of the water flow in the center of the pipeline to be measured as kV; wherein k is a line-plane compensation coefficient, V is the water flow velocity, VSThe linear velocity of the water flow at the center of the pipeline to be detected;
according to QVAkV, calculating the instantaneous water flow in the pipeline to be measured; wherein A is the cross-sectional area of the pipeline to be measured, QVThe instantaneous water flow of the pipeline to be detected;
performing flow compensation on the instantaneous water flow meeting the instantaneous water flow range according to the water flow temperature to obtain compensated water flow;
and integrating the compensated water flow to obtain the total water flow in the pipeline to be detected.
To sum up, this application embodiment realizes the matching to two ultrasonic signal amplitudes through the dynamic adjustment goes upward ultrasonic signal and the magnification of down ultrasonic signal, reduces the requirement to transducer matching nature, avoids descending because of reasons such as transducer and reflector plate ageing, scale deposit lead to the measurement performance, reduces the difference of going upward ultrasonic signal and down ultrasonic signal amplitude, and the flight time difference that obtains is more accurate to improve the measurement accuracy of water gauge operation in-process.
Fig. 8 is a schematic structural diagram of an entity of an electronic device provided in an embodiment of the present application, and as shown in fig. 8, the electronic device includes: a processor (processor)501, a memory (memory)502, and a bus 503; wherein:
the processor 501 and the memory 502 are communicated with each other through the bus 503;
the processor 501 is configured to call program instructions in the memory 502 to perform the methods provided by the above-mentioned method embodiments, for example, including: acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in a pipeline to be detected; acquiring a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal; acquiring 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 to enable the deviation between the first maximum amplitude and the second maximum amplitude to be smaller than a first preset threshold value, 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; acquiring the water flow velocity according to the flight time difference; acquiring the temperature of water flow in the pipeline to be detected; and calculating the water flow in the pipeline to be detected according to the water flow velocity and the water flow temperature.
The processor 501 may be an integrated circuit chip having signal processing capabilities. The Processor 501 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. Which may implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 502 may include, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read Only Memory (PROM), Erasable Read Only Memory (EPROM), Electrically Erasable Read Only Memory (EEPROM), and the like.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in a pipeline to be detected; acquiring a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal; acquiring 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 to enable the deviation between the first maximum amplitude and the second maximum amplitude to be smaller than a first preset threshold value, 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; acquiring the water flow velocity according to the flight time difference; acquiring the temperature of water flow in the pipeline to be detected; and calculating the water flow in the pipeline to be detected according to the water flow velocity and the water flow temperature.
The present embodiment provides a storage medium, which stores computer instructions, where the computer instructions cause the computer to execute the method provided by the foregoing method embodiments, for example, the method includes: acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in a pipeline to be detected; acquiring a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal; acquiring 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 to enable the deviation between the first maximum amplitude and the second maximum amplitude to be smaller than a first preset threshold value, 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; acquiring the water flow velocity according to the flight time difference; acquiring the temperature of water flow in the pipeline to be detected; and calculating the water flow in the pipeline to be detected according to the water flow velocity and the water flow temperature.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A method for measuring the flow rate of ultrasonic water flow is characterized by comprising the following steps:
acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in a pipeline to be detected;
acquiring a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal;
acquiring 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 to enable the deviation between the first maximum amplitude and the second maximum amplitude to be smaller than a first preset threshold value, 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;
acquiring the water flow velocity according to the flight time difference;
acquiring the temperature of water flow in the pipeline to be detected;
and calculating the water flow in the pipeline to be detected according to the water flow velocity and the water flow temperature.
2. The method of claim 1, wherein the acquiring the upstream ultrasonic signal and the downstream ultrasonic signal in the pipe under test comprises:
acquiring a first initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be detected;
acquiring an uplink ultrasonic signal of the to-be-detected pipeline before restoration, and amplifying an electric signal corresponding to the uplink ultrasonic signal before restoration according to the first initial parameter to obtain an uplink electric signal;
acquiring a second initial parameter corresponding to a gain amplifier for adjusting the uplink ultrasonic signal in the pipeline to be detected;
acquiring a downlink ultrasonic signal of the to-be-detected pipeline before restoration, and amplifying an electric signal corresponding to the downlink ultrasonic signal before restoration according to the second initial parameter to obtain a downlink electric signal;
and respectively carrying out AD acquisition on the uplink electric signal and the downlink electric signal to obtain the uplink ultrasonic signal corresponding to the uplink electric signal and the downlink ultrasonic signal corresponding to the downlink electric signal.
3. The method of claim 2, wherein said matching the first maximum amplitude value and the second maximum amplitude value comprises:
judging whether the ratio of the first maximum amplitude to the second maximum amplitude is within a second preset threshold value or not;
if the ratio is within a second preset threshold value and the difference value between the first maximum amplitude and the second maximum amplitude is greater than the first preset threshold value, adjusting the first initial parameter or the second initial parameter so as to enable the first maximum amplitude to be matched with the second maximum amplitude.
4. The method of claim 3, wherein the adjusting the first initial parameter or the second initial parameter comprises:
if the first maximum amplitude is greater than the second maximum amplitude, decreasing the first initial parameter or increasing the second initial parameter so that the deviation between the first maximum amplitude and the second maximum amplitude is smaller than the first preset threshold.
5. The method of claim 1, wherein said calculating a time-of-flight difference from said matched up-going ultrasonic signal and said matched down-going ultrasonic signal comprises:
acquiring the flight time of the matched uplink ultrasonic signal to obtain a first flight time;
acquiring the flight time of the matched downlink ultrasonic signal to obtain a second flight time;
and obtaining the flight time difference according to the first flight time and the second flight time.
6. The method of claim 1, wherein the obtaining the temperature of the water flow in the pipe to be tested comprises:
acquiring the time for charging a charging capacitor to a preset voltage by a first resistor in a water temperature detector to obtain first charging time; the water temperature detector is arranged in the pipeline to be detected and comprises a first resistor, a charging capacitor and a second resistor, and the first resistor is a standard resistor;
acquiring the time for the second resistor to charge the charging capacitor to the preset voltage to obtain second charging time; wherein the second resistor is a thermistor or a thermocouple;
obtaining the resistance value of the second resistor according to the first charging time, the second charging time and the resistance value of the first resistor;
and obtaining the temperature of the water flow in the pipeline to be tested according to the resistance value of the second resistor.
7. The method of claim 1, wherein calculating the flow rate of the water in the pipe under test from the flow rate and the flow temperature comprises:
according to VSCalculating the linear velocity of the water flow in the center of the pipeline to be measured as kV; wherein k is a line-plane compensation coefficient, V is the water flow velocity, VSThe linear velocity of the water flow at the center of the pipeline to be detected;
according to QVAkV, calculating the instantaneous water flow in the pipeline to be measured; wherein A is the cross-sectional area of the pipeline to be measured, QVThe instantaneous water flow of the pipeline to be detected;
performing flow compensation on the instantaneous water flow meeting the instantaneous water flow range according to the water flow temperature to obtain compensated water flow;
and integrating the compensated water flow to obtain the total water flow in the pipeline to be detected.
8. An ultrasonic water flow metering device, comprising:
the signal acquisition module is used for acquiring an uplink ultrasonic signal and a downlink ultrasonic signal in the pipeline to be detected;
the first amplitude acquisition module is used for acquiring a first maximum amplitude of the uplink ultrasonic signal according to the uplink ultrasonic signal;
the second amplitude acquisition module is used for acquiring a second maximum amplitude of the downlink ultrasonic signal according to the downlink ultrasonic signal;
the matching module is used for 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 smaller than a first preset threshold value, and obtaining an uplink ultrasonic signal and a downlink ultrasonic signal after matching;
the calculating module is used for calculating the flight time difference according to the matched uplink ultrasonic signal and the matched downlink ultrasonic signal;
the flow rate obtaining module is used for obtaining the flow rate of water flow in the pipeline to be tested according to the flight time difference;
the temperature acquisition module is used for acquiring the temperature of water flow in the pipeline to be detected;
and the flow calculation module is used for calculating the water flow in the pipeline to be detected according to the water flow speed and the water flow temperature.
9. An electronic device, comprising: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the machine-readable instructions, when executed by the processor, performing the method of any of claims 1 to 7.
10. A storage medium, having stored thereon a computer program which, when executed by a processor, performs the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210022412.XA CN114353891A (en) | 2022-01-10 | 2022-01-10 | Ultrasonic water flow metering method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210022412.XA CN114353891A (en) | 2022-01-10 | 2022-01-10 | Ultrasonic water flow metering method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114353891A true CN114353891A (en) | 2022-04-15 |
Family
ID=81108265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210022412.XA Pending CN114353891A (en) | 2022-01-10 | 2022-01-10 | Ultrasonic water flow metering method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114353891A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115556603A (en) * | 2022-12-01 | 2023-01-03 | 小米汽车科技有限公司 | Heat dissipation method and device suitable for charging equipment |
-
2022
- 2022-01-10 CN CN202210022412.XA patent/CN114353891A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115556603A (en) * | 2022-12-01 | 2023-01-03 | 小米汽车科技有限公司 | Heat dissipation method and device suitable for charging equipment |
CN115556603B (en) * | 2022-12-01 | 2023-08-29 | 小米汽车科技有限公司 | Heat dissipation method and device suitable for charging equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109579950B (en) | Mistake proofing ripples detection device of gaseous ultrasonic flowmeter | |
US9588253B2 (en) | Method and apparatus for remote siphon drainage type rainfall measurement with self-compensation function | |
CN109506727B (en) | Ultrasonic flow measurement method and low-power consumption ultrasonic flowmeter | |
CN108801400A (en) | Ultrasonic liquid level measurer and ultrasonic liquid-level measurement method | |
CN103344825A (en) | Electric energy measuring system based on alternating-current sampling | |
CN105841645B (en) | A kind of thickness measuring method based on electromagnetic acoustic | |
CN104808056A (en) | Frequency characteristic testing method and device based on comparator conversion | |
US20230092014A1 (en) | Phase frequency detector-based high-precision feedback frequency measurement apparatus and method | |
CN114353891A (en) | Ultrasonic water flow metering method and device, electronic equipment and storage medium | |
CN112964317A (en) | Flow measuring and calculating method based on temperature compensation | |
CN102043084A (en) | Method for detecting resistive current of lightning arrester | |
CN106021855B (en) | A kind of reactor period calculates method | |
CN109060060B (en) | Gas metering method and device based on temperature compensation | |
CN101871971B (en) | Method for measuring frequency-phase characteristic of electrical network | |
CN108957174B (en) | Voltage sag detection device and method | |
CN113740856B (en) | Distance measurement method and device based on ultrasonic wave waveform vibration starting characteristics | |
CN101545819B (en) | Method of calibrating PVDF voltage coefficient when measuring gauge pressure of rotary body | |
CN209117096U (en) | A kind of low-consumption ultrasonic flow measurement meter | |
CN109298238A (en) | A kind of frequency measurement method and its measuring system | |
CN202141543U (en) | Temperature-pressure complementation device of pressure sensor based on two-dimensional orthogonal function | |
CN106124371A (en) | A kind of Dual-Phrase Distribution of Gas olid fineness measurement device based on electrostatic method and measuring method | |
CN106546837A (en) | Constant pressure water supply is without flow sleep detection method | |
CN110275156A (en) | The bias voltage scaling method and device of avalanche photodide in laser radar | |
CN111174842A (en) | Random number sampling method for electronic meter | |
CN110866338A (en) | Method and device for solving apparent impedance model based on coupling impedance model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |