Method for acquiring head wave threshold value of ultrasonic flowmeter and ultrasonic flowmeter

By dynamically adjusting the first wave threshold of the ultrasonic flowmeter, the measurement error problem caused by the inappropriate first wave threshold is solved, and the accuracy and stability of flow velocity measurement are improved.

CN119147058APending Publication Date: 2024-12-17LOONGSON TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411252354.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the existing ultrasonic flowmeter, since the original first wave threshold is not suitable for the new receiving waveform, the ultrasonic flight time measurement error is large, which in turn causes flow velocity measurement error.

Method used

By obtaining the peak sequence of the received waveform of the ultrasonic flowmeter, determine the adjacent peaks with the largest peak difference, and dynamically adjust the first wave threshold according to the first wave threshold measured by the last flow velocity measurement and the wave peak measured by the current flow velocity measurement to adapt to the changes in the received waveform. .

Benefits of technology

The error in flow velocity measurement is reduced, the measurement accuracy and stability of the flowmeter are improved, and the environmental changes in the pipeline are adapted to the pipeline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119147058A_ABST
    Figure CN119147058A_ABST
Patent Text Reader

Abstract

The invention discloses a head wave threshold obtaining method of an ultrasonic flowmeter and the ultrasonic flowmeter, and relates to the technical field of ultrasonic flowmeters.The head wave threshold obtaining method comprises the steps that a wave crest sequence of a current receiving waveform is obtained, and then a first wave crest and a second wave crest with the largest peak value difference in adjacent wave crests of the wave crest sequence are obtained; determining a first head wave threshold value as a second head wave threshold value of the current flow velocity measurement under the condition that the first head wave threshold value of the last flow velocity measurement is greater than a first peak value of the first wave crest and is smaller than a second peak value of the second wave crest, and determining the first head wave threshold value as a second head wave threshold value of the current flow velocity measurement under the condition that the first head wave threshold value is smaller than or equal to the first peak value; under the condition that the first peak value is larger than or equal to the first peak value or the first head wave threshold value is larger than or equal to the second peak value, the second head wave threshold value is obtained according to the first peak value and the second peak value, so that the head wave threshold value suitable for the current receiving waveform is obtained, the large flow velocity measurement error caused by the fact that the original head wave threshold value is not suitable for the current receiving waveform is avoided, and the flow velocity measurement error is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of ultrasonic flowmeters, and in particular relates to a method for obtaining a first wave threshold of an ultrasonic flowmeter and an ultrasonic flowmeter. Background Art

[0002] Time-difference ultrasonic flowmeters are widely used in water meters, heat meters and other fluid measurement fields due to their simple structure, easy implementation and high accuracy. Time-difference ultrasonic flowmeters measure the ultrasonic flight time in both the downstream and upstream directions in the same fluid pipeline, calculate the flow velocity of the fluid based on the difference in ultrasonic flight time, and then calculate the flow rate based on the flow velocity and the cross-sectional area through which the fluid passes.

[0003] It should be noted that the ultrasonic flight time is used to characterize the time required for the ultrasonic signal to start from one sensor of the time-difference ultrasonic flowmeter, be transmitted through the pipeline, and reach another sensor of the time-difference ultrasonic flowmeter. The first wave threshold is a key parameter for determining whether the ultrasonic signal reaches the other sensor normally. When the other sensor receives the peak of the ultrasonic signal that exceeds the first wave threshold for the first time, it is determined that the ultrasonic signal has reached the other sensor.

[0004] However, factors such as bubbles in the pipeline, flow rate changes, temperature changes, and impurity deposition cause changes in the received waveform of the ultrasonic signal. The received waveform becomes a new received waveform. Since the original first wave threshold is not suitable for the new received waveform, the original first wave threshold is used to measure the ultrasonic flight time, resulting in a large measurement error of the ultrasonic flight time, which in turn leads to a large measurement error of the flow rate. Summary of the invention

[0005] The present application aims to provide a method for obtaining a first wave threshold of an ultrasonic flowmeter and an ultrasonic flowmeter, which at least solves the problem in the prior art that the original first wave threshold is not suitable for a newly received waveform, and the original first wave threshold is used to measure the ultrasonic flight time, resulting in a large measurement error of the ultrasonic flight time, thereby leading to a large measurement error of the flow velocity.

[0006] In order to solve the above technical problems, this application is implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for obtaining a first wave threshold of an ultrasonic flow meter, the method comprising:

[0008] In the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of a received waveform of the ultrasonic flow meter is obtained, wherein the peak sequence includes a plurality of peaks arranged in a receiving time sequence;

[0009] Acquire target adjacent peaks with the largest peak value difference among adjacent peaks of the peak sequence, wherein the target adjacent peaks include adjacent first peak and second peak;

[0010] When the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first wave peak, and the first first wave threshold is less than the second peak value of the second wave peak, determining the first first wave threshold as the second first wave threshold of the current flow velocity measurement;

[0011] When the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, the second first wave threshold is obtained according to the first peak value and the second peak value; the second first wave threshold is greater than the first peak value and less than the second peak value.

[0012] In addition, in other aspects, an ultrasonic flow meter to which the above method can be applied is also provided.

[0013] In an embodiment of the present application, in the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of the receiving waveform of the ultrasonic flow meter is obtained, and then the target adjacent peaks with the largest peak difference are obtained among the adjacent peaks of the peak sequence, wherein the target adjacent peaks include adjacent first peaks and second peaks, and then, when the first first wave threshold of the previous flow velocity measurement of the ultrasonic flow meter is greater than the first peak value of the first peak, and the first first wave threshold is less than the second peak value of the second peak, the first first wave threshold is determined as the second first wave threshold for the current flow velocity measurement, and when the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, the second first wave threshold for the current flow velocity measurement is obtained based on the first peak value and the second peak value, so as to obtain the first wave threshold suitable for the current receiving waveform, avoid the original first wave threshold being unsuitable for the current receiving waveform, resulting in a large flow velocity measurement error, thereby reducing the flow velocity measurement error. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a flowchart of the steps of a method for obtaining a first wave threshold of an ultrasonic flow meter provided in an embodiment of the present application;

[0015] Figure 2 It is a flowchart of the specific steps of a method for obtaining a first wave threshold of an ultrasonic flow meter provided in an embodiment of the present application;

[0016] Figure 3 It is a schematic diagram of receiving waveforms of multiple continuous pulse signals provided in an embodiment of the present application;

[0017] Figure 4 is a schematic diagram of a receiving waveform of a single pulse signal provided in an embodiment of the present application;

[0018] Figure 5 It is a schematic diagram of the process of obtaining the first wave threshold of the ultrasonic flow meter provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] The following is a detailed description of the method for obtaining the first wave threshold of the ultrasonic flow meter provided in the embodiment of the present application through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0021] Figure 1 is a flowchart of a method for obtaining a first wave threshold of an ultrasonic flow meter provided in an embodiment of the present application. Figure 1 As shown, the method may include:

[0022] Step 101: In the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of a received waveform of the ultrasonic flow meter is obtained, wherein the peak sequence includes a plurality of peaks arranged in a receiving time sequence.

[0023] It should be noted that the ultrasonic flowmeter is a time-difference ultrasonic flowmeter; a sensor of the ultrasonic flowmeter (for example, an ultrasonic generator) emits a series of ultrasonic signals (hereinafter also referred to as ultrasonic groups or ultrasonic pulse groups), which are transmitted through the pipeline. The ultrasonic signals are received by another sensor of the ultrasonic flowmeter (ultrasonic receiver), and the received waveform is the waveform of the ultrasonic signal received by the other sensor of the ultrasonic flowmeter.

[0024] The primary flow velocity measurement of the ultrasonic flowmeter includes the measurement of the downstream ultrasonic flight time and the measurement of the upstream ultrasonic flight time; in the downstream ultrasonic flight time measurement, the ultrasonic signal is emitted from the sensor on the first side of the pipeline, transmitted through the pipeline in the downstream direction, and received by the sensor on the second side of the pipeline; in the upstream ultrasonic flight time measurement, the ultrasonic signal is emitted from the sensor on the second side of the pipeline, transmitted through the pipeline in the upstream direction, and received by the sensor on the first side of the pipeline, therefore, the types of received waveforms include the received waveforms in the downstream ultrasonic flight time measurement and the received waveforms in the upstream ultrasonic flight time measurement.

[0025] In one flow velocity measurement of the ultrasonic flowmeter, one sensor of the ultrasonic flowmeter sends ultrasonic signals multiple times. Each time one sensor of the ultrasonic flowmeter sends ultrasonic signals, another sensor of the ultrasonic flowmeter receives the ultrasonic signals transmitted by the pipeline. Each time another sensor of the ultrasonic flowmeter receives ultrasonic signals, a peak in the received waveform of the ultrasonic signal is obtained, and a peak sequence is obtained by sending and receiving ultrasonic signals transmitted by the pipeline multiple times.

[0026] The peak is the maximum voltage of the received waveform in a preset period, and the peak value of the peak is the maximum voltage value of the received waveform at the maximum voltage in a preset period; the receiving timing is the time sequence of obtaining the peaks.

[0027] In some embodiments, the ultrasonic signal emitted by a sensor of the ultrasonic flowmeter is a continuous plurality of pulse signals. In terms of timing, another sensor of the ultrasonic flowmeter first obtains the rising segment of the received waveform, then obtains the stable segment of the received waveform, and then obtains the falling segment of the received waveform. In the rising segment, the peak value of the wave crest gradually increases according to the receiving timing, that is, the peak value of the wave crest received first is smaller than the peak value of the wave crest received later, and the difference between the maximum peak value and the minimum peak value is greater than the preset minimum value; in the stable segment, the peak value of each wave crest is equal or the difference between the maximum peak value and the minimum peak value is less than the preset minimum value, that is, the fluctuation range of the peak value is small; in the falling segment, the peak value of the wave crest gradually decreases according to the receiving timing, that is, the peak value of the wave crest received first is smaller than the peak value of the wave crest received later. The peak value of the peak is greater than the peak value of the subsequently received peak, and the difference between the maximum peak value and the minimum peak value is greater than the preset minimum value; the peak sequence is the peak sequence of the rising section of the received waveform; in other embodiments, there are adjacent peaks with decreasing peak values ​​or adjacent peaks with equal peak values ​​in the rising section, and there are adjacent peaks with increasing peak values ​​or adjacent peaks with equal peak values ​​in the descending section; among adjacent peaks with decreasing peak values, the peak value of the peak with an earlier reception time is greater than the peak value of the peak with a later reception time; among adjacent peaks with equal peak values, the peak value of the peak with an earlier reception time is equal to the peak value of the peak with a later reception time; among adjacent peaks with increasing peak values, the peak value of the peak with an earlier reception time is less than the peak value of the peak with a later reception time.

[0028] Reference Figure 3, an ultrasonic signal emitted by a sensor of the ultrasonic flowmeter constitutes an ultrasonic pulse group, including a plurality of continuous pulse signals, and a receiving waveform of an ultrasonic signal received by another sensor of the ultrasonic flowmeter is a receiving waveform in a plane coordinate system with voltage as the vertical axis and time as the horizontal axis. In the receiving waveform, the moment t1 when the voltage is first greater than the preset voltage threshold U1 is the moment when the peak detection starts, and the peak sequence includes peaks A1, A2, A3, A4, A5, A6, A7, and A8 arranged in a receiving timing sequence, wherein peak A1 is the first peak received after the moment when the peak detection starts, peak A2 is the second peak received after the moment when the peak detection starts, and peak A3 is the moment when the peak detection starts. Peak A1 is the maximum voltage of the received waveform from the moment when peak detection starts to moment t2, moment t2 is the preset moment, peak A2 is the maximum voltage of the received waveform from moment t2 to moment t3, the time length from moment t2 to moment t3 is the time length of a preset period T1, and the other peaks are similar and will not be repeated here.

[0029] It should be noted that in terms of timing, the other sensor of the ultrasonic flowmeter first obtains the rising segment of the received waveform, and then obtains the stable segment of the received waveform, wherein the rising segment includes peak A1, peak A2, peak A3, peak A4, peak A5, peak A6, peak A7, peak A8, and the stable segment includes peak A9, peak A10, peak A11, etc.

[0030] In other embodiments, the ultrasonic signal emitted by a sensor of the ultrasonic flowmeter is a single pulse signal. In terms of timing, another sensor of the ultrasonic flowmeter first obtains the rising segment of the received waveform, and then obtains the falling segment of the received waveform. In the rising segment, the peak value of the peak gradually increases according to the receiving timing, that is, the peak value of the peak received first is smaller than the peak value of the peak received later; in the falling segment, the peak value of the peak gradually decreases according to the receiving timing, that is, the peak value of the peak received first is larger than the peak value of the peak received later; the peak sequence is the peak sequence of the rising segment of the received waveform.

[0031] Reference Figure 4, the ultrasonic signal emitted by one sensor of the ultrasonic flowmeter is a single pulse signal, and the receiving waveform of the ultrasonic signal received by another sensor of the ultrasonic flowmeter is a receiving waveform in a plane coordinate system with voltage as the vertical axis and time as the horizontal axis. In the receiving waveform of the ultrasonic signal received by another sensor of the ultrasonic flowmeter, the moment t4 when the voltage is first greater than the preset voltage threshold U3 is the moment when the peak detection starts, and the peak sequence includes peaks B1, B2, B3, B4, and B5 arranged in the receiving timing, wherein peak B1 is the first peak received after the moment when the peak detection starts, and peak B5 is the first peak received after the moment when the peak detection starts. Peak B2 is the second peak received after the moment of starting peak detection, peak B3 is the third peak received after the moment of starting peak detection, peak B4 is the fourth peak received after the moment of starting peak detection, and peak B5 is the fifth peak received after the moment of starting peak detection; peak B1 is the maximum voltage of the received waveform from the moment of starting peak detection to moment t5, moment t5 is the preset moment, peak B2 is the maximum voltage of the received waveform from moment t5 to moment t6, and the time length from moment t5 to moment t6 is the length of a preset period T2. The remaining peaks are similar and will not be repeated here.

[0032] It should be noted that in terms of timing, the other sensor of the ultrasonic flowmeter first obtains the rising segment of the received waveform, and then obtains the falling segment of the received waveform, wherein the rising segment includes peak B1, peak B2, peak B3, peak B4, peak B5, and the falling segment includes peak B6, peak B7, etc.

[0033] In an embodiment of the present application, by obtaining a peak sequence of a received waveform of an ultrasonic flow meter in the current flow velocity measurement of the ultrasonic flow meter, and then after obtaining the adjacent first peak and second peak with the largest peak difference among adjacent peaks in the peak sequence, it is determined whether the first wave threshold of the previous flow velocity measurement of the ultrasonic flow meter is suitable for the received waveform of the current flow velocity measurement based on the first peak of the first peak and the second peak of the second peak.

[0034] Step 102: Obtain target adjacent peaks with the largest peak value difference among adjacent peaks in the peak sequence, wherein the target adjacent peaks include an adjacent first peak and a second peak.

[0035] It should be noted that adjacent peaks refer to two adjacent peaks; the receiving time of the first peak is earlier than the receiving time of the second peak;

[0036] For example, refer to Figure 3The peak sequence includes peak A1, peak A2, peak A3, peak A4, peak A5, peak A6, peak A7, and peak A8 arranged in a receiving timing order, peak A1 and peak A2 are a group of adjacent peaks, peak A2 and peak A3 are a group of adjacent peaks, peak A3 and peak A4 are a group of adjacent peaks, peak A4 and peak A5 are a group of adjacent peaks, peak A5 and peak A6 are a group of adjacent peaks, peak A6 and peak A7 are a group of adjacent peaks, and peak A7 and peak A8 are a group of adjacent peaks; the difference between the peak value of peak A1 and the peak value of peak A2 is the difference a1, the difference between the peak value of peak A2 and the peak value of peak A3 is the difference a2, the peak value of peak A3 and the peak value of peak A4 are the difference a3, and the peak value of peak A4 is the difference a4. The difference between the peak values ​​of peak A4 and peak A5 is difference a4, the difference between the peak values ​​of peak A5 and peak A6 is difference a5, the difference between the peak values ​​of peak A6 and peak A7 is difference a6, and the difference between the peak values ​​of peak A7 and peak A8 is difference a7, wherein the difference between adjacent peaks is the difference between two adjacent peaks, and the difference between adjacent peaks is a positive value. Among the differences a1, a2, a3, a4, a5, a6, and a7, the difference a3 is the largest. Then the adjacent peaks composed of peak A3 and peak A4 are the target adjacent peaks in the adjacent peaks of the peak sequence, peak A3 is the first peak, and peak A4 is the second peak.

[0037] For example, refer to Figure 4 The peak sequence includes peaks B1, B2, B3, B4, and B5 arranged in the receiving timing order. Peaks B1 and B2 are a group of adjacent peaks, peaks B2 and B3 are a group of adjacent peaks, peaks B3 and B4 are a group of adjacent peaks, peaks B4 and B5 are a group of adjacent peaks, the difference between the peak value of peak A1 and the peak value of peak A2 is the difference a1, the difference between the peak value of peak B1 and the peak value of peak B2 is the difference b1, the difference between the peak value of peak B2 and the peak value of peak B3 is the difference b2, the difference between the peak value of peak A1 and the peak value of peak A2 is the difference b3, the difference between the peak value of peak B2 and the peak value of peak B3 is the difference b4, the difference between the peak value of peak A1 and the peak value of peak A2 is the difference b5, the difference between the peak value of peak B1 and the peak value of peak B2 and the peak value of peak B3 is the difference b6, the difference between the peak value of peak B2 and the peak value of peak B3 is the difference b7, the difference between the peak value of peak A1 and the peak value of peak A2 is the difference a1, the difference between the peak value of peak B1 and the peak value of peak B2 and the peak value of peak B3 is the difference b8, the difference between the peak value of peak B2 and the peak value of peak B3 is the difference b9, the difference between the peak value of peak A1 and the peak value of peak A2 is the difference b1, the difference between the peak value of peak B1 and the peak value of peak B2 and the peak value of peak B3 is the difference b1, the difference between the peak value of peak A1 and the peak value of peak A2 is the difference b1, the difference between the peak value of peak B1 and the peak value of peak B2 and the peak value of peak B3 is the difference b9, the difference between the peak value of peak A1 and the peak value of peak A2 is the difference b1, the difference between the peak value of The difference is difference b2, the difference between the peak value of peak B3 and the peak value of peak B4 is difference b3, and the difference between the peak value of peak B4 and the peak value of peak B5 is difference b4, wherein the difference between adjacent peaks is the difference between two adjacent peaks, and the difference between adjacent peaks is a positive value. Among the differences b1, b2, b3, and b4, difference b3 is the largest. Then, the adjacent peaks composed of peak B3 and peak B4 are the target adjacent peaks in the adjacent peaks of the peak sequence, peak B3 is the first peak, and peak B4 is the second peak.

[0038] In an embodiment of the present application, by obtaining the target adjacent peaks with the largest peak difference among adjacent peaks in the peak sequence, that is, the adjacent first peak and second peak, and then based on the first peak value of the first peak and the second peak value of the second peak, it is determined whether the first wave threshold of the previous flow velocity measurement of the ultrasonic flow meter is suitable for the received waveform of the current flow velocity measurement.

[0039] Step 103: When the first first wave threshold of the previous flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first wave peak, and the first first wave threshold is less than the second peak value of the second wave peak, determine the first first wave threshold as the second first wave threshold of the current flow velocity measurement.

[0040] Specifically, in some embodiments, the first wave threshold of the received waveform is between the first peak of the first peak and the second peak of the second peak in the rising segment of the received waveform, that is, the first wave threshold of the received waveform is greater than the first peak of the first peak and less than the second peak of the second peak, then the first wave threshold of the received waveform suitable for the current flow rate measurement is greater than the first peak and less than the second peak.

[0041] It should be noted that since the peak values ​​of the target adjacent peaks are the largest among adjacent peaks, that is, the peak values ​​of the adjacent first peak and the second peak are the largest, the first wave threshold is set between the first peak of the first peak and the second peak of the second peak, so that the setting range of the first wave threshold is the largest.

[0042] The larger the difference between the first wave threshold and the adjacent peak value, the larger the signal value of the interference signal to be resisted. For example, the first wave threshold is 500mV, the adjacent peak value is 200mV, and the difference between the first wave threshold and the adjacent peak value is 300mV. It can resist interference signals not exceeding 290mV, that is, the signal value of the adjacent peak value plus the interference signal is 490mV (less than 500mV), and the adjacent peak value is not mistakenly identified as the peak value of the first wave; the first wave threshold is 500mV, the adjacent peak value is 300mV, and the difference between the first wave threshold and the adjacent peak value is 200mV. It cannot resist interference signals of 290mV, that is, the signal value of the adjacent peak value plus the interference signal is 590mV (greater than 500mV), and the adjacent peak value is mistakenly identified as the peak value of the first wave. The larger the difference between the first wave threshold and the adjacent peak value, the stronger the anti-interference ability of the first wave identification according to the first wave threshold.

[0043] In some embodiments, the first wave threshold is the average value of the first peak and the second peak, that is, the difference between the first wave threshold and the first peak is equal to the difference between the first wave threshold and the second peak, compared with setting the first wave threshold to the average value of the first other peak and the second other peak of other adjacent peaks, the first wave threshold is set to the average value of the first peak and the second peak in the target adjacent peak, the difference between the first wave threshold and the first peak is greater than the difference between the first wave threshold and the first other peak, the difference between the first wave threshold and the second peak is greater than the difference between the first wave threshold and the second other peak, then the first wave threshold is set to the average value of the first peak and the second peak, and the first wave threshold has the strongest anti-interference performance for first wave identification. In some embodiments, the first wave threshold is a weighted average of the first peak and the second peak.

[0044] In some embodiments, the first wave (the first wave peak) is identified according to the first wave threshold, that is, the first peak value greater than the first wave threshold is taken as the peak value of the first wave. When the peak value of the first wave is detected, it is determined that the ultrasonic signal has arrived at another sensor of the ultrasonic flowmeter, and then, after a preset interval, the waveform of the stable plateau is collected to obtain the arrival time of the ultrasonic signal according to the waveform of the plateau (for example, the time when a peak in the waveform of the plateau is located is taken as the arrival time of the ultrasonic signal), and then the ultrasonic flight time of the ultrasonic signal is obtained according to the arrival time of the ultrasonic signal and the preset emission time.

[0045] Specifically, the first wave threshold of the received waveform is greater than the first peak value of the first wave peak and less than the second peak value of the second wave peak, and the second wave peak is the first wave (the first wave peak) identified according to the first wave threshold.

[0046] In an embodiment of the present application, among adjacent peaks in the peak sequence of the last flow velocity measurement, the adjacent peaks with the largest difference in peak value are the adjacent eighth peak and ninth peak, the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is greater than the peak value of the eighth peak and less than the peak value of the ninth peak, the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first peak, and the first first wave threshold is less than the second peak value of the second peak, indicating that the received waveform of the current flow velocity measurement is the same as the received waveform of the last flow velocity measurement, the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is suitable for the received waveform of the current flow velocity measurement, and the first first wave threshold can be determined as the second first wave threshold of the current flow velocity measurement.

[0047] Step 104: When the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, obtain the second first wave threshold according to the first peak value and the second peak value; the second first wave threshold is greater than the first peak value and less than the second peak value.

[0048] It should be noted that the second first wave threshold is greater than the first peak value and less than the second peak value, that is, the setting range of the second first wave threshold of the current flow velocity measurement is between the first peak value and the second peak value.

[0049] In an embodiment of the present application, the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, indicating that the received waveform of the current flow velocity measurement is different from the received waveform of the previous flow velocity measurement, and the first first wave threshold of the previous flow velocity measurement of the ultrasonic flowmeter is not suitable for the received waveform of the current flow velocity measurement. It is necessary to obtain the second first wave threshold of the current flow velocity measurement based on the first peak value and the second peak value, so that the second first wave threshold of the current flow velocity measurement is between the first peak value and the second peak value to be suitable for the received waveform of the current flow velocity measurement.

[0050] To summarize, in an embodiment of the present application, in the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of the receiving waveform of the ultrasonic flow meter is obtained, and then the target adjacent peaks with the largest peak difference are obtained among the adjacent peaks of the peak sequence, wherein the target adjacent peaks include adjacent first peaks and second peaks, and then, when the first first wave threshold of the previous flow velocity measurement of the ultrasonic flow meter is greater than the first peak value of the first peak, and the first first wave threshold is less than the second peak value of the second peak, the first first wave threshold is determined as the second first wave threshold for the current flow velocity measurement, and when the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, the second first wave threshold for the current flow velocity measurement is obtained based on the first peak value and the second peak value, so as to obtain a first wave threshold suitable for the current receiving waveform, avoid the original first wave threshold being unsuitable for the current receiving waveform, resulting in a large flow velocity measurement error, thereby reducing the flow velocity measurement error.

[0051] Figure 2 is a flowchart of the specific steps of a method for obtaining a first wave threshold of an ultrasonic flow meter provided in an embodiment of the present application, such as Figure 2 As shown, the method may include:

[0052] Step 201: In the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of a received waveform of the ultrasonic flow meter is obtained, wherein the peak sequence includes a plurality of peaks arranged in a receiving time sequence.

[0053] The implementation of this step is similar to the implementation process of the above step 101, and will not be repeated here.

[0054] Optionally, in some embodiments, the number of peaks in the peak sequence is greater than or equal to a preset number threshold, and the peak values ​​of the peaks in the peak sequence increase according to the receiving timing.

[0055] Specifically, in some embodiments, the preset quantity threshold is 3.

[0056] In an embodiment of the present application, the number of peaks in the peak sequence is greater than or equal to a preset number threshold, which is conducive to determining whether the peak values ​​in the peak sequence increase according to the receiving timing. The peak values ​​in the peak sequence increase according to the receiving timing, indicating that the peak sequence is a peak sequence of the rising segment of the receiving waveform.

[0057] In some other embodiments, the peak sequence includes adjacent peaks with increasing peak values, and among the adjacent peaks with increasing peak values, the peak value of the peak with an earlier reception time is less than the peak value of the peak with a later reception time; the peak sequence also includes adjacent peaks with decreasing peak values ​​or adjacent peaks with equal peak values, and among the adjacent peaks with decreasing peak values, the peak value of the peak with an earlier reception time is greater than the peak value of the peak with a later reception time; among the adjacent peaks with equal peak values, the peak value of the peak with an earlier reception time is equal to the peak value of the peak with a later reception time;

[0058] Among them, in the peak sequence, the number of adjacent peaks with increasing peak values ​​is greater than the number of adjacent peaks with decreasing peak values, and the number of adjacent peaks with increasing peak values ​​is greater than the number of adjacent peaks with equal peak values.

[0059] Step 202: Obtain target adjacent peaks with the largest peak value difference among adjacent peaks in the peak sequence, wherein the target adjacent peaks include an adjacent first peak and a second peak.

[0060] The implementation of this step is similar to the implementation process of the above step 102, and will not be repeated here.

[0061] Step 203: When the first first wave threshold of the previous flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first wave peak, and the first first wave threshold is less than the second peak value of the second wave peak, determine the first first wave threshold as the second first wave threshold of the current flow velocity measurement.

[0062] The implementation of this step is similar to the implementation process of the above step 103, and will not be repeated here.

[0063] Step 204: When the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, or the first first wave threshold is a null value, obtain the second first wave threshold according to the first peak value and the second peak value; the second first wave threshold is greater than the first peak value and less than the second peak value.

[0064] It should be noted that the first first wave threshold is a null value, indicating that there is no previous flow velocity measurement of the ultrasonic flowmeter, and the first wave threshold needs to be initialized.

[0065] In an embodiment of the present application, the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, indicating that the received waveform of the current flow velocity measurement is different from the received waveform of the previous flow velocity measurement, and the first first wave threshold of the previous flow velocity measurement of the ultrasonic flowmeter is not suitable for the received waveform of the current flow velocity measurement, and it is necessary to obtain the second first wave threshold of the current flow velocity measurement based on the first peak value and the second peak value. In addition, if the first first wave threshold is a null value, it is also necessary to obtain the second first wave threshold of the current flow velocity measurement based on the first peak value and the second peak value, so that the second first wave threshold of the current flow velocity measurement is between the first peak value and the second peak value to be suitable for the received waveform of the current flow velocity measurement.

[0066] Optionally, in some embodiments, obtaining the second first wave threshold according to the first peak value and the second peak value includes the following sub-steps:

[0067] Sub-step 2041: Add the first peak value and the second peak value to obtain a sum value.

[0068] In the embodiment of the present application, the first peak value and the second peak value are added to obtain a sum value, and then the sum value is divided by 2 to obtain an average value of the first peak value and the second peak value, that is, to obtain the second first wave threshold. Sub-step 2042: Divide the sum value by 2 to obtain the second first wave threshold.

[0069] In the embodiment of the present application, the average value of the first peak value and the second peak value is obtained by dividing the added value by 2, that is, the second first wave threshold value is obtained, so that the second first wave threshold value is between the first peak value and the second peak value.

[0070] In one embodiment, the second first-wave threshold may be a weighted average of the first peak value and the second peak value.

[0071] Specifically, in some embodiments, the expression of the second first wave threshold is:

[0072]

[0073] Among them, TH2 is the second first wave threshold, P1 is the first peak, and P2 is the second peak.

[0074] By executing sub-steps 2041 to 2042, it is possible to obtain the second first wave threshold.

[0075] Optionally, in some embodiments, the method further comprises the following steps:

[0076] Step 205: Add the first peak value and the second peak value to obtain a sum value.

[0077] In the embodiment of the present application, the first peak value and the second peak value are added to obtain an added value, and the added value is then divided by 2 to obtain a first preset value, that is, an average value of the first peak value and the second peak value.

[0078] Step 206: Divide the added value by 2 to obtain the first preset value.

[0079] In an embodiment of the present application, by dividing the added value by 2, a first preset value, that is, the average value of the first peak value and the second peak value, is obtained, and then when the first first wave threshold is greater than the first peak value and the first first wave threshold is less than the second peak value, the absolute value of the difference between the first first wave threshold and the first preset value is obtained, that is, the difference between the first first wave threshold and the average value of the first peak value and the second peak value is obtained.

[0080] Specifically, in some embodiments, the expression of the first preset value is:

[0081]

[0082] Wherein, E1 is the first preset value, P1 is the first peak value, and P2 is the second peak value.

[0083] By executing step 205 to step 206, it is possible to obtain the first preset value.

[0084] Optionally, in some embodiments, the method further comprises the following steps:

[0085] Step 207: Obtain a first difference between the first peak value and the second peak value.

[0086] Specifically, in some embodiments, the first difference is a difference between the second peak value and the first peak value.

[0087] In the embodiment of the present application, a first difference between a first peak value and a second peak value is obtained, and then the first difference is multiplied by a first preset ratio to obtain a second preset value.

[0088] Step 208: multiply the first difference by a first preset ratio to obtain the second preset value.

[0089] In the embodiment of the present application, the second preset value is obtained by multiplying the first difference by the first preset ratio, and then when the absolute value is smaller than the second preset value, the first first wave threshold is determined as the second first wave threshold.

[0090] Specifically, in some embodiments, the first preset ratio is less than 50%, for example, the first preset ratio is 40%.

[0091] The expression of the second preset value is:

[0092] E2=(P2-P1)×F1

[0093] Among them, E2 is the second preset value, P1 is the first peak value, P2 is the second peak value, and F1 is the first preset ratio.

[0094] By executing step 207 to step 208, the second preset value can be obtained.

[0095] Optionally, in some embodiments, step 203 may include the following sub-steps:

[0096] Sub-step 2031: when the first first wave threshold is greater than the first peak value and the first first wave threshold is less than the second peak value, obtain an absolute value of a difference between the first first wave threshold and a first preset value.

[0097] In an embodiment of the present application, in order to ensure the anti-interference of the first wave identification according to the first wave threshold, it is necessary to ensure that the first wave threshold of the received waveform has a certain difference with the first peak value, and to ensure that the first wave threshold of the received waveform has a certain difference with the second peak value, that is, the first wave threshold of the received waveform is within a preset range, wherein the preset range is smaller than the range between the first peak value and the second peak value. In the case where the first first wave threshold is greater than the first peak value, and the first first wave threshold is smaller than the second peak value, it is necessary to determine whether the first first wave threshold is within the preset range. Specifically, after obtaining the absolute value of the difference between the first first wave threshold and the first preset value, determine whether the absolute value of the difference between the first first wave threshold and the first preset value is smaller than the second preset value. When the absolute value is smaller than the second preset value, determine that the first first wave threshold is within the preset range, and determine the first first wave threshold as the second first wave threshold.

[0098] Sub-step 2032: when the absolute value is less than a second preset value, determine the first first-wave threshold as the second first-wave threshold.

[0099] Specifically, the condition for determining the first first wave threshold as the second first wave threshold is:

[0100]

[0101] Among them, TH1 is the first first wave threshold, P1 is the first peak value, P2 is the second peak value, and F1 is the first preset ratio.

[0102] In the embodiment of the present application, by determining the first first wave threshold as the second first wave threshold when the absolute value of the difference between the first first wave threshold and the first preset value is less than the second preset value, the anti-interference performance of the first wave identification according to the first wave threshold is ensured.

[0103] By executing sub-steps 2031 to 2032, it can be achieved that the first first-wave threshold is determined as the second first-wave threshold.

[0104] Optionally, in some embodiments, the method further comprises the following steps:

[0105] Step 209: When the absolute value is greater than or equal to the second preset value, obtain the second first wave threshold according to the first peak value and the second peak value.

[0106] In an embodiment of the present application, when the absolute value of the difference between the first first wave threshold and the first preset value is greater than or equal to the second preset value, it means that the first first wave threshold is outside the preset range. Then, the first first wave threshold is used as the second first wave threshold for current flow rate measurement, and the anti-interference ability of first wave recognition is poor. It is necessary to obtain the second first wave threshold based on the first peak value and the second peak value, so that the first first wave threshold is within the preset range to ensure the anti-interference ability of first wave recognition according to the first wave threshold.

[0107] Optionally, in some embodiments, the received waveform is a received waveform of a plurality of continuous pulse signals of the ultrasonic flow meter, and the method further comprises the following steps:

[0108] Step 210: Obtain a second difference between a peak value of a third peak and a peak value of a fourth peak, and a third difference between a peak value of a fourth peak and a peak value of a fifth peak in a current peak sequence; the third peak is a peak with the latest receiving time in the current peak sequence, the fourth peak is adjacent to the third peak, and the fifth peak is adjacent to the fourth peak.

[0109] Specifically, refer to Figure 3 The receiving waveform of the ultrasonic signal received by another sensor of the ultrasonic flowmeter is a receiving waveform in a plane coordinate system with voltage as the vertical axis and time as the horizontal axis. The peak sequence of the receiving waveform includes peak A1, peak A2, peak A3, peak A4, peak A5, peak A6, peak A7, and peak A8 arranged in a receiving timing order, wherein peak A1 is the first peak received after the moment of starting peak detection, peak A2 is the second peak received after the moment of starting peak detection, peak A3 is the third peak received after the moment of starting peak detection, peak A4 is the fourth peak received after the moment of starting peak detection, peak A5 is the fifth peak received after the moment of starting peak detection, peak A6 is the sixth peak received after the moment of starting peak detection, peak A7 is the seventh peak received after the moment of starting peak detection, and peak A8 is the eighth peak received after the moment of starting peak detection.

[0110] The third peak is peak A8, the fourth peak is peak A7, the fifth peak is peak A6, the second difference is the peak value of peak A8 minus the peak value of peak A7, and the third difference is the peak value of peak A7 minus the peak value of peak A6.

[0111] In an embodiment of the present application, since in the rising segment of the received waveform, the peak value of the peak gradually increases according to the receiving timing, by obtaining the second difference between the peak value of the third peak and the peak value of the fourth peak in the current peak sequence, and the third difference between the peak value of the fourth peak and the peak value of the fifth peak, then based on the second difference and the third difference, it is judged whether the peak sequence of the rising segment of the received waveform is complete (whether the rising segment of the received waveform is ended). When the second difference and the third difference are both less than the preset difference threshold, it is determined that the peak sequence of the rising segment of the received waveform is complete, and starting from the next peak of the third peak, the received peaks all belong to the stable segment of the received waveform.

[0112] It should be noted that, in the stable section of the received waveform, the difference between any adjacent peaks is smaller than the preset difference threshold.

[0113] Step 211: When the second difference is greater than a preset difference threshold, or the third difference is greater than the preset difference threshold, obtain the next peak of the third peak in the received waveform.

[0114] In an embodiment of the present application, the second difference is greater than the preset difference threshold or the third difference is greater than the preset difference threshold, indicating that the peak sequence of the rising segment of the received waveform is incomplete, and the next peak of the third peak in the received waveform still belongs to the rising segment of the received waveform. It is necessary to obtain the next peak of the third peak in the received waveform and update it to the peak sequence.

[0115] Step 212, update the next peak of the third peak to the current peak sequence, and enter the step of obtaining the second difference between the peak value of the third peak and the peak value of the fourth peak in the current peak sequence, and the third difference between the peak value of the fourth peak and the peak value of the fifth peak.

[0116] In an embodiment of the present application, after the next peak of the third peak is updated to the current peak sequence, it is necessary to determine whether the peak sequence of the rising segment of the received waveform is complete, and then enter the step of obtaining the second difference between the peak value of the third peak and the peak value of the fourth peak in the current peak sequence, and the third difference between the peak value of the fourth peak and the peak value of the fifth peak, until the peak sequence of the rising segment of the received waveform is complete.

[0117] Step 202 may include the following sub-steps:

[0118] Step 2021: When the second difference and the third difference are both smaller than the preset difference threshold, obtain the target adjacent peak.

[0119] In the embodiment of the present application, when the second difference and the third difference are both smaller than the preset difference threshold, it means that starting from the next peak of the third peak, the received peaks all belong to the stable segment of the received waveform, then it can be determined that the peak sequence of the rising segment of the received waveform is complete, and then the target adjacent peaks with the largest peak value difference among the adjacent peaks of the peak sequence of the rising segment are obtained.

[0120] In some embodiments, the step of determining whether the peak sequence of the rising segment of the received waveform is complete is to obtain a peak subsequence composed of peaks after a preset receiving time in the peak sequence, and then obtain the difference between each adjacent peak in the peak subsequence. When the difference between each adjacent peak is less than a preset difference threshold, it is determined that the peak sequence of the rising segment of the received waveform is complete, and starting from the next peak of the third peak, the received peaks all belong to the stable segment of the received waveform; when there is at least one adjacent peak in the peak subsequence whose difference is greater than the preset difference threshold, the next peak of the third peak in the received waveform is obtained and updated to the peak sequence, and then the step of determining whether the peak sequence of the rising segment of the received waveform is complete is entered, wherein the difference between adjacent peaks is the difference between two adjacent peaks.

[0121] By executing step 210, step 211, step 212 and step 2021, it can be achieved to determine whether the peak sequence of the rising segment of the received waveform is complete.

[0122] Optionally, in some embodiments, the method further comprises the following steps:

[0123] Step 213: Obtain a first difference between the first peak value and the second peak value.

[0124] In an embodiment of the present application, a first difference between a first peak value and a second peak value is obtained, and then a preset difference threshold is set according to the first difference between the first peak value and the second peak value. Specifically, the first difference is multiplied by a second preset ratio to obtain the preset difference threshold.

[0125] Step 214: multiply the first difference by a second preset ratio to obtain the preset difference threshold.

[0126] In the embodiment of the present application, a preset difference threshold is obtained by multiplying the first difference by the second preset ratio, so as to judge whether the peak sequence of the rising segment of the received waveform is complete according to the preset difference threshold.

[0127] Specifically, in some embodiments, the expression of the preset difference threshold is:

[0128] G=(P2-P1)×F2

[0129] Wherein, G is a first preset value, P1 is a first peak value, P2 is a second peak value, and F2 is a second preset ratio.

[0130] By executing step 213 to step 214, it is possible to obtain the preset difference threshold.

[0131] Optionally, in some embodiments, the received waveform is a received waveform of a single pulse signal of the ultrasonic flow meter, and the method further includes the following steps:

[0132] Step 215, obtaining the sixth peak and the seventh peak of the received waveform, wherein the sixth peak is the next peak of the third peak in the current peak sequence, the seventh peak is the next peak of the sixth peak, and the third peak is the latest peak received in the current peak sequence.

[0133] Specifically, refer to Figure 4 The receiving waveform of the ultrasonic signal received by another sensor of the ultrasonic flowmeter is a receiving waveform in a plane coordinate system with voltage as the vertical axis and time as the horizontal axis. The peak sequence includes peak B1, peak B2, peak B3, peak B4, and peak B5 arranged in a receiving timing order, wherein peak B1 is the first peak received after the moment of starting peak detection, peak B2 is the second peak received after the moment of starting peak detection, peak B3 is the third peak received after the moment of starting peak detection, peak B4 is the fourth peak received after the moment of starting peak detection, and peak B5 is the fifth peak received after the moment of starting peak detection, wherein the rising section includes peaks B1, peak B2, peak B3, peak B4, and peak B5, and the falling section includes peaks B6, peak B7, etc.

[0134] The third wave peak is the wave peak B5, the sixth wave peak is the wave peak B6, and the seventh wave peak is the wave peak B7.

[0135] In the embodiment of the present application, since the peak value of the peak gradually decreases according to the receiving timing in the descending segment of the received waveform, it is possible to judge whether the peak sequence of the rising segment of the received waveform is complete by receiving the sixth peak and the seventh peak of the waveform. Specifically, when the peak value of the third peak is greater than the peak value of the sixth peak, and the peak value of the sixth peak is greater than the peak value of the seventh peak, it is determined that the peak sequence of the rising segment of the received waveform is complete, and starting from the sixth peak, the received peaks all belong to the descending segment of the received waveform.

[0136] Step 216: When the peak value of the third peak is smaller than the peak value of the sixth peak, update the sixth peak to the current peak sequence, and enter the step of obtaining the sixth peak and the seventh peak of the received waveform.

[0137] In an embodiment of the present application, when the peak value of the third peak is smaller than the peak value of the sixth peak, it indicates that the sixth peak still belongs to the rising segment of the received waveform, and the peak sequence of the rising segment of the received waveform is incomplete. The sixth peak is updated to the current peak sequence. After the sixth peak is updated to the current peak sequence, it is necessary to determine whether the peak sequence of the rising segment of the received waveform is complete. Then, the step of obtaining the sixth peak and the seventh peak of the received waveform is performed until the peak sequence of the rising segment of the received waveform is complete.

[0138] Step 217: When the peak value of the third peak is greater than the peak value of the sixth peak, and the peak value of the sixth peak is less than the peak value of the seventh peak, update the sixth peak and the seventh peak to the current peak sequence, and enter the step of obtaining the sixth peak and the seventh peak of the received waveform.

[0139] In an embodiment of the present application, when the peak value of the third peak is greater than the peak value of the sixth peak, and the peak value of the sixth peak is less than the peak value of the seventh peak, it means that the seventh peak still belongs to the rising segment of the received waveform, the sixth peak is an abnormal peak, and the peak sequence of the rising segment of the received waveform is incomplete. The sixth peak and the seventh peak are updated to the current peak sequence. After the sixth peak and the seventh peak are updated to the current peak sequence, it is necessary to judge whether the peak sequence of the rising segment of the received waveform is complete, and the step of obtaining the sixth peak and the seventh peak of the received waveform is entered until the peak sequence of the rising segment of the received waveform is complete.

[0140] Step 202 may include the following sub-steps:

[0141] Step 2022: When the peak value of the third peak is greater than the peak value of the sixth peak, and the peak value of the sixth peak is greater than the peak value of the seventh peak, obtain the target adjacent peak.

[0142] In an embodiment of the present application, when the peak value of the third peak is greater than the peak value of the sixth peak, and the peak value of the sixth peak is greater than the peak value of the seventh peak, it means that starting from the sixth peak, the received peaks all belong to the descending segment of the received waveform, then it can be determined that the peak sequence of the rising segment of the received waveform is complete, and then the target adjacent peaks with the largest peak difference among the adjacent peaks of the peak sequence of the rising segment are obtained.

[0143] In some embodiments, the step of determining whether the peak sequence of the rising segment of the received waveform is complete is to obtain a peak subsequence composed of a plurality of consecutive peaks after the third peak, and when the peak values ​​of the peaks in the peak subsequence gradually decrease according to the receiving timing, it is determined that the peak sequence of the rising segment of the received waveform is complete, and starting from the next peak of the third peak, the received peaks all belong to the falling segment of the received waveform; when there are two adjacent peaks in the peak subsequence whose peak values ​​gradually increase according to the receiving timing, the next peak of the third peak in the received waveform is obtained and updated to the peak sequence, and then the step of determining whether the peak sequence of the rising segment of the received waveform is complete is entered, wherein adjacent peaks are two adjacent peaks.

[0144] By executing step 215, step 216, step 217 and step 2022, it can be achieved to determine whether the peak sequence of the rising segment of the received waveform is complete.

[0145] Optionally, in some embodiments, step 201 may include the following sub-steps:

[0146] Sub-step 2011: In the current flow velocity measurement, the maximum voltage of the received waveform received for the i-th time within the first preset time period is determined as the i-th peak, where i is a positive integer.

[0147] In the embodiment of the present application, in the current flow velocity measurement, the peak is obtained by determining the maximum voltage of the received waveform received for the i-th time within the first preset time period as the i-th peak.

[0148] Optionally, in some embodiments, determining the maximum voltage of the received waveform received for the i-th time within the first preset time period as the i-th wave peak comprises the following molecular steps:

[0149] In the molecular step 2011a, the voltage of the received waveform of the i-th reception is obtained at each first voltage point where the voltage is greater than the zero voltage within the first preset time period.

[0150] In the embodiment of the present application, by obtaining each first voltage point where the voltage of the received waveform of the i-th reception is greater than the zero-point voltage within the first preset time period, the first voltage point with the largest voltage among the first voltage points is determined as the i-th peak.

[0151] In numerator step 2011b, the first voltage point with the largest voltage among the first voltage points is determined as the i-th wave peak.

[0152] In the embodiment of the present application, the peak is obtained by determining the first voltage point with the largest voltage among the first voltage points as the i-th peak.

[0153] Taking molecular steps 2011a to 2011b as examples, for example, obtaining the received waveform of the i-th reception within the first preset time period, the first voltage points where the voltage is greater than the zero voltage include the first voltage point C1, the first voltage point C2, the first voltage point C3, the first voltage point C4, and the first voltage point C5, among which the voltage at the first voltage point C3 is the largest, and the first voltage point C3 is the i-th peak.

[0154] The peak can be obtained by executing the molecular step 2011a to the molecular step 2011b.

[0155] Sub-step 2012: determine the maximum voltage of the received waveform received for the i+1th time within the second preset time period as the i+1th peak; the duration of the second preset time period is the sum of the duration of the first preset time period and the preset period.

[0156] In the embodiment of the present application, the peak is obtained by determining the maximum voltage of the received waveform received for the (i+1)th time within the second preset time period as the (i+1)th peak.

[0157] Optionally, in some embodiments, sub-step 2012 may include the following molecular steps:

[0158] Numerator step 2012a: obtaining the received waveform of the (i+1)th reception at each second voltage point where the voltage is greater than the zero-point voltage within the second preset time period.

[0159] In an embodiment of the present application, by obtaining the received waveform of the i+1th reception within the second preset time period, at each second voltage where the voltage is greater than the zero point voltage, the second voltage with the largest voltage among the second voltages is determined as the i+1th peak.

[0160] In numerator step 2012b, the second voltage point with the largest voltage among the second voltage points is determined as the (i+1)th wave peak.

[0161] In the embodiment of the present application, the peak is obtained by determining the second voltage point with the largest voltage among the second voltage points as the (i+1)th peak.

[0162] Taking molecular steps 2012a to 2012b as examples, for example, obtaining the received waveform of the i+1th reception within the second preset time period, the second voltage points where the voltage is greater than the zero voltage include second voltage point C6, second voltage point C7, second voltage point C8, second voltage point C9, and second voltage point C10, among which the voltage at second voltage point C8 is the largest, and the second voltage point C8 is the i+1th peak.

[0163] The peak can be obtained by executing the molecular step 2012a to the molecular step 2012b.

[0164] Sub-step 2013: assemble each of the peaks into the peak sequence according to the receiving timing.

[0165] The duration of the first preset time period of the received waveform received for the first time is the preset duration.

[0166] In the embodiment of the present application, each peak is formed into a peak sequence according to the receiving timing, so as to obtain the peak sequence.

[0167] For example, in the current flow rate measurement, the maximum voltage of the received waveform received for the first time in the preset time period D1 is determined as the first peak, the maximum voltage of the received waveform received for the second time in the preset time period D2 is determined as the second peak, the maximum voltage of the received waveform received for the second time in the preset time period D3 is determined as the third peak, and so on, ..., the maximum voltage of the received waveform received for the n-1th time in the preset time period D(n-1) is determined as the n-1th peak, and the received waveform received for the nth time is determined as the n-1th peak. The maximum voltage of the shape within the preset time period Dn is determined as the nth peak, and then the 1st peak, the 2nd peak, the 3rd peak, ..., the n-1th peak, the nth peak, a total of n peaks are formed into a peak sequence, wherein n is a positive integer, the duration of the preset time period D1 is the preset duration, the duration of the preset time period D2 is the sum of the duration of the preset time period D1 and the preset period, the duration of the preset time period D3 is the sum of the duration of the preset time period D2 and the preset period, and so on, ..., the duration of the preset time period Dn is the sum of the duration of the preset time period D(n-1) and the preset period.

[0168] The peak sequence can be acquired by executing sub-steps 2011 to 2013.

[0169] Optionally, in some embodiments, the method further comprises the following steps:

[0170] Step 218: Determine the time when the voltage in the i-th received waveform is greater than the preset voltage threshold for the first time as the start time of the first preset time period of the i-th received waveform.

[0171] In an embodiment of the present application, the moment when the voltage in the received waveform received for the i-th time is greater than the preset voltage threshold for the first time is determined as the starting moment of the first preset time period of the received waveform received for the i-th time, and then the peak detection is started from the starting moment of the first preset time period of the received waveform received for the i-th time. Within the first preset time period, each first voltage point at which the voltage of the received waveform received for the i-th time is greater than the zero-point voltage is obtained, and then the first voltage point with the largest voltage among the first voltage points is determined as the i-th peak.

[0172] Step 219: Determine the time when the voltage in the received waveform received for the (i+1)th time is greater than the preset voltage threshold for the first time as the start time of the second preset time period of the received waveform received for the (i+1)th time.

[0173] In an embodiment of the present application, the moment when the voltage in the received waveform received for the i+1th time is first greater than the preset voltage threshold is determined as the starting moment of the second preset time period of the received waveform received for the i+1th time, and then the peak detection is started from the starting moment of the second preset time period of the received waveform received for the i+1th time. Within the second preset time period, each second voltage at which the voltage of the received waveform received for the i+1th time is greater than the zero-point voltage is obtained, and then the second voltage at which the voltage is the largest among the second voltages is determined as the i+1th peak.

[0174] For example, refer to Figure 3 The ultrasonic signal emitted by one sensor of the ultrasonic flowmeter is a continuous plurality of pulse signals. The receiving waveform of the ultrasonic signal received by another sensor of the ultrasonic flowmeter is a receiving waveform in a plane coordinate system with voltage as the vertical axis and time as the horizontal axis. In each receiving waveform received in the current flow rate measurement, the moment t1 when the voltage is greater than the preset voltage threshold U1 for the first time is the moment to start the peak detection.

[0175] For example, refer to Figure 4 The ultrasonic signal emitted by one sensor of the ultrasonic flowmeter is a single pulse signal. The receiving waveform of the ultrasonic signal received by another sensor of the ultrasonic flowmeter is a receiving waveform in a plane coordinate system with voltage as the vertical axis and time as the horizontal axis. In the receiving waveform received each time in the current flow rate measurement, the moment t4 when the voltage is greater than the preset voltage threshold U3 for the first time is the moment to start the peak detection.

[0176] By executing steps 218 to 219, it is possible to determine the starting time of the preset time period of each received waveform received in the current flow velocity measurement.

[0177] Optional, see Figure 5In some embodiments, the first wave threshold acquisition process of the ultrasonic flowmeter includes: X1, start; X2, set the preset voltage threshold and the preset time period, that is, set the preset voltage threshold and the preset time period of the received waveform each time, wherein the preset time period includes a first preset time period and a second preset time period; X3, obtain the peak, that is, in the current flow rate measurement, the maximum voltage of the received waveform received for the i-th time within the first preset time period is determined as the i-th peak, and the maximum voltage of the received waveform received for the i+1th time within the second preset time period is determined as the i+1th peak; X4, whether the rising stage is over, that is, whether the peak sequence of the rising segment of the received waveform is complete; X5, whether the first first wave threshold is a null value, that is, whether the second first wave threshold is is a null value; X6, first wave threshold warning, that is, determining whether to generate warning information of the first wave threshold. Specifically, when the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, a warning information of the first wave threshold is generated to inform the staff of changes in the receiving waveform of the ultrasonic signal; when the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first wave peak, and the first first wave threshold is less than the second peak value of the second wave peak, no warning information of the first wave threshold is generated, and the receiving waveform of the ultrasonic signal does not change; X7, obtaining the second first wave threshold, that is, obtaining the second first wave threshold of the current flow velocity measurement according to the first peak value and the second peak value; X8, end. The specific implementation process is similar to the above and will not be repeated here.

[0178] Through the embodiments of the present application, when the received waveform changes too much, the risk that the first first wave threshold is not suitable for the received waveform is identified and the first wave threshold is updated to ensure the long-term working stability of the ultrasonic flowmeter.

[0179] To summarize, in an embodiment of the present application, in the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of the receiving waveform of the ultrasonic flow meter is obtained, and then the target adjacent peaks with the largest peak difference are obtained among the adjacent peaks of the peak sequence, wherein the target adjacent peaks include adjacent first peaks and second peaks, and then, when the first first wave threshold of the previous flow velocity measurement of the ultrasonic flow meter is greater than the first peak value of the first peak, and the first first wave threshold is less than the second peak value of the second peak, the first first wave threshold is determined as the second first wave threshold for the current flow velocity measurement, and when the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, the second first wave threshold for the current flow velocity measurement is obtained based on the first peak value and the second peak value, so as to obtain a first wave threshold suitable for the current receiving waveform, avoid the original first wave threshold being unsuitable for the current receiving waveform, resulting in a large flow velocity measurement error, thereby reducing the flow velocity measurement error.

[0180] The embodiment of the present application provides an ultrasonic flowmeter for measuring the flow rate of a fluid. The ultrasonic flowmeter includes an ultrasonic pulse transmitter and a receiver, and a time measurement unit. The time measurement unit controls the flowmeter to perform flow measurement, and calculates and detects the first wave threshold in the flow measurement. The ultrasonic flowmeter can be implemented as a part of a dedicated MCU for ultrasonic heat meters, water meters, and gas meters.

[0181] In one embodiment, the time measurement unit determines the first wave of the ultrasonic pulse and is configured to:

[0182] In the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of a received waveform of the ultrasonic flow meter is obtained, wherein the peak sequence includes a plurality of peaks arranged in a receiving time sequence;

[0183] Acquire target adjacent peaks with the largest peak value difference among adjacent peaks of the peak sequence, wherein the target adjacent peaks include adjacent first peak and second peak;

[0184] When the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first wave peak, and the first first wave threshold is less than the second peak value of the second wave peak, determining the first first wave threshold as the second first wave threshold of the current flow velocity measurement;

[0185] When the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, the second first wave threshold is obtained according to the first peak value and the second peak value; the second first wave threshold is greater than the first peak value and less than the second peak value.

[0186] From the above embodiments and Figure 3-5 It can be seen from the description that in the present application, on the one hand, the time measurement unit calculates the first wave threshold by receiving the peak values ​​of the adjacent wave peaks constituting the maximum peak difference in the wave group. On the other hand, the time measurement unit determines the conditions for the application of the first wave threshold by the peak values ​​of the adjacent wave peaks above. It should be understood that the calculation of the first wave threshold and the determination of the application of the first wave threshold can be used separately.

[0187] In one embodiment, the time measurement unit calculates the first wave threshold and is configured to: calculate the peak difference between adjacent peaks of the multiple peaks of the received wave group during the rising phase when the amplitude of the received wave group increases; and determine the first wave threshold of the received wave group based on the two peak values ​​that form the maximum peak difference.

[0188] The first wave threshold is determined as the average of the two peak values ​​with the largest peak difference, including the weighted average.

[0189] As above combined Figure 3-5As described, the first wave threshold is determined by the ultrasonic wave group in the rising phase. The rising phase is determined by the difference between consecutive wave peaks. When the difference between two consecutive wave peaks of the received wave group is less than the end threshold, the rising phase is determined to be over.

[0190] In some embodiments, for the currently used threshold, the time measurement unit calculates the peak difference between each pair of adjacent peaks in the received wave group starting from when the peak is detected to be greater than the initial threshold.

[0191] In some embodiments, the time measurement unit is configured to determine whether the first wave threshold currently used for fluid measurement is abnormal. The time measurement unit uses the distance between the peak value of the continuous wave peak and the current first wave threshold to reflect the degree of change of the received wave group (for example, caused by temperature, impurities, etc.). When the degree of change increases and the current first wave threshold is not applicable, the first wave threshold is re-determined.

[0192] In such an embodiment, the time measurement unit determines the conditions for the application of the first wave threshold value through the peak values ​​of the continuous peaks, and is configured to: in the rising stage when the amplitude of the received wave group increases, for the multiple peaks of the received wave group, calculate the peak difference between the adjacent peaks; determine whether there are two adjacent peaks in the received wave group that make the current first wave threshold value between their peak values; and if there are no such adjacent peaks, re-determine the first wave threshold value of the received wave group. In a further embodiment, the time measurement unit is further configured to: if there are such adjacent peaks, calculate the difference between the current first wave threshold value and the mean value of the adjacent peaks; and if the difference is less than a predetermined ratio of the difference between the peak values ​​of the adjacent peaks, continue to use the current first wave threshold value, otherwise, re-determine the first wave threshold value of the received wave group.

[0193] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0194] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for obtaining the first wave threshold of an ultrasonic flowmeter, It is characterized in that The method comprises: In the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of a received waveform of the ultrasonic flow meter is obtained, wherein the peak sequence includes a plurality of peaks arranged in a receiving time sequence; Acquire target adjacent peaks with the largest peak value difference among adjacent peaks of the peak sequence, wherein the target adjacent peaks include adjacent first peak and second peak; When the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first wave peak, and the first first wave threshold is less than the second peak value of the second wave peak, determining the first first wave threshold as the second first wave threshold of the current flow velocity measurement; When the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, the second first wave threshold is obtained according to the first peak value and the second peak value; the second first wave threshold is greater than the first peak value and less than the second peak value.

2. The method according to claim 1, It is characterized in that When the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first wave peak, and the first first wave threshold is less than the second peak value of the second wave peak, determining the first first wave threshold as the second first wave threshold of the current flow velocity measurement includes: When the first first wave threshold is greater than the first peak value, and the first first wave threshold is less than the second peak value, obtaining an absolute value of a difference between the first first wave threshold and a first preset value; When the absolute value is smaller than a second preset value, the first first-wave threshold is determined as the second first-wave threshold.

3. The method according to claim 2, It is characterized in that The method further comprises: When the absolute value is greater than or equal to the second preset value, the second first wave threshold is acquired according to the first peak value and the second peak value.

4. The method according to claim 2, It is characterized in that The method further comprises: Adding the first peak value and the second peak value to obtain an added value; The added value is divided by 2 to obtain the first preset value.

5. The method according to claim 2, It is characterized in that The method further comprises: Obtaining a first difference between the first peak value and the second peak value; The first difference is multiplied by a first preset ratio to obtain the second preset value.

6. The method according to claim 1, It is characterized in that The received waveform is a received waveform of a plurality of continuous pulse signals of the ultrasonic flow meter, and the method further includes: Acquire a second difference between a peak value of a third peak and a peak value of a fourth peak, and a third difference between a peak value of a fourth peak and a peak value of a fifth peak in a current peak sequence; the third peak is a peak with the latest receiving time in the current peak sequence, the fourth peak is adjacent to the third peak, and the fifth peak is adjacent to the fourth peak; When the second difference is greater than a preset difference threshold, or the third difference is greater than the preset difference threshold, acquiring a next peak of the third peak in the received waveform; Updating the next peak of the third peak to the current peak sequence, and entering the step of obtaining the second difference between the peak value of the third peak and the peak value of the fourth peak, and the third difference between the peak value of the fourth peak and the peak value of the fifth peak in the current peak sequence; The step of obtaining the target adjacent peak with the largest peak difference among the adjacent peaks in the peak sequence includes: When the second difference and the third difference are both smaller than the preset difference threshold, the target adjacent peak is acquired.

7. The method according to claim 6, It is characterized in that The method further comprises: Obtaining a first difference between the first peak value and the second peak value; The first difference is multiplied by a second preset ratio to obtain the preset difference threshold.

8. The method according to claim 1, It is characterized in that The received waveform is a received waveform of a single pulse signal of the ultrasonic flowmeter, and the method further includes: Acquire a sixth peak and a seventh peak of the received waveform, wherein the sixth peak is the next peak of the third peak in the current peak sequence, the seventh peak is the next peak of the sixth peak, and the third peak is the latest peak received in the current peak sequence; In the case where the peak value of the third peak is smaller than the peak value of the sixth peak, updating the sixth peak to the current peak sequence, and entering the step of obtaining the sixth peak and the seventh peak of the received waveform; When the peak value of the third peak is greater than the peak value of the sixth peak, and the peak value of the sixth peak is less than the peak value of the seventh peak, the sixth peak and the seventh peak are updated to the current peak sequence, and the step of obtaining the sixth peak and the seventh peak of the received waveform is entered; The step of obtaining the target adjacent peak with the largest peak difference among the adjacent peaks in the peak sequence includes: In a case where the peak value of the third peak is greater than the peak value of the sixth peak, and the peak value of the sixth peak is greater than the peak value of the seventh peak, the target adjacent peak is acquired.

9. The method according to claim 1, It is characterized in that The acquiring the second first wave threshold according to the first peak value and the second peak value includes: Adding the first peak value and the second peak value to obtain an added value; The added value is divided by 2 to obtain the second first wave threshold.

10. The method according to claim 1, It is characterized in that In the current flow velocity measurement of the ultrasonic flow meter, obtaining the peak sequence of the received waveform of the ultrasonic flow meter includes: In the current flow velocity measurement, the maximum voltage of the received waveform received for the i-th time within the first preset time period is determined as the i-th wave peak, where i is a positive integer; The maximum voltage of the received waveform received for the (i+1)th time within the second preset time period is determined as the (i+1)th peak; the duration of the second preset time period is the sum of the duration of the first preset time period and the preset period; Combining each of the peaks into the peak sequence according to the receiving timing; The duration of the first preset time period of the received waveform received for the first time is the preset duration.

11. The method according to claim 10, It is characterized in that The step of determining the maximum voltage of the received waveform received for the i-th time within the first preset time period as the i-th wave peak comprises: Acquire the received waveform of the i-th reception at each first voltage point where the voltage is greater than the zero voltage within the first preset time period; Determine a first voltage point having the largest voltage among the first voltage points as the i-th wave peak; The step of determining the maximum voltage of the received waveform received for the (i+1)th time within the second preset time period as the (i+1)th wave peak comprises: Acquire the received waveform of the (i+1)th reception at each second voltage point where the voltage is greater than the zero voltage within a second preset time period; A second voltage point with the largest voltage among the second voltage points is determined as the (i+1)th wave peak.

12. The method according to claim 10, It is characterized in that The method further comprises: Determine the moment when the voltage in the received waveform received for the i-th time is greater than the preset voltage threshold for the first time as the starting moment of the first preset time period of the received waveform received for the i-th time; The moment when the voltage in the received waveform received for the (i+1)th time is greater than the preset voltage threshold for the first time is determined as the starting moment of the second preset time period of the received waveform received for the (i+1)th time.

13. The method according to claim 1, It is characterized in that The number of peaks in the peak sequence is greater than or equal to a preset number threshold, and the peak values ​​of the peaks in the peak sequence increase according to the receiving timing.

14. The method according to claim 1, It is characterized in that The method further comprises: When the first first-wave threshold is a null value, the second first-wave threshold is acquired according to the first peak value and the second peak value.

15. An ultrasonic flow meter, include: An ultrasonic pulse transmitter, which sends ultrasonic pulses; An ultrasonic pulse receiver, receiving ultrasonic pulses; as well as The time measurement unit, used to determine the first wave threshold of the ultrasonic pulse, is configured as follows: In the current flow velocity measurement of the ultrasonic flow meter, a peak sequence of a received waveform of the ultrasonic flow meter is obtained, wherein the peak sequence includes a plurality of peaks arranged in a receiving time sequence; Acquire target adjacent peaks with the largest peak value difference among adjacent peaks of the peak sequence, wherein the target adjacent peaks include adjacent first peak and second peak; When the first first wave threshold of the last flow velocity measurement of the ultrasonic flowmeter is greater than the first peak value of the first wave peak, and the first first wave threshold is less than the second peak value of the second wave peak, determining the first first wave threshold as the second first wave threshold of the current flow velocity measurement; When the first first wave threshold is less than or equal to the first peak value, or the first first wave threshold is greater than or equal to the second peak value, the second first wave threshold is obtained according to the first peak value and the second peak value; the second first wave threshold is greater than the first peak value and less than the second peak value.

16. An ultrasonic flow meter, include: An ultrasonic pulse transmitter, which sends ultrasonic pulse groups; An ultrasonic pulse receiver, receiving ultrasonic pulse groups; as well as The time measurement unit is configured as: In the rising phase when the amplitude of the received wave group increases, for multiple peaks of the received wave group, the peak differences between adjacent peaks are calculated; as well as The first wave threshold of the received wave group is determined based on the two wave peak values ​​that form the maximum wave peak difference.

17. The ultrasonic flow meter according to claim 16, in, The first wave threshold is determined as the mean of the two peak values ​​with the largest peak difference.

18. The ultrasonic flow meter according to claim 16, in, The time measurement unit is configured to determine that the rising phase ends when the difference between two consecutive wave peaks of the received wave group is smaller than an end threshold.

19. The ultrasonic flow meter according to claim 16, in, For the first wave threshold currently in use, the time measurement unit calculates the peak difference between each pair of adjacent peaks in the received wave group starting from when it is detected that the peak is greater than the first wave threshold currently in use.

20. An ultrasonic flow meter, include: An ultrasonic pulse transmitter, which sends ultrasonic pulse groups; An ultrasonic pulse receiver, receiving ultrasonic pulse groups; as well as The time measurement unit is configured as: In the rising phase when the amplitude of the received wave group increases, for multiple peaks of the received wave group, the peak differences between adjacent peaks are calculated; Determine whether there are two adjacent wave peaks in the received wave group such that the current first wave threshold is located between the peaks thereof; as well as In the absence of such adjacent wave peaks, the first wave threshold of the received wave group is re-determined.

21. The ultrasonic flow meter according to claim 20, in, The time measurement unit is further configured to: When there are two adjacent wave peaks such that the current first wave threshold is located between their peak values, the difference between the current first wave threshold and the mean of the adjacent wave peaks is calculated; as well as If the difference is smaller than a predetermined ratio of the difference between the peak values ​​of the adjacent peaks, the current first wave threshold value continues to be used; otherwise, the first wave threshold value of the received wave group is re-determined.