An ultrasonic flowmeter and a method and system for setting a first wave detection threshold thereof

By dynamically adjusting the initial threshold of the ultrasonic flow meter, the problem of measurement deviation caused by factors such as water quality and device aging is solved, achieving high accuracy and rapid adaptability in fluid velocity measurement.

CN119469299BActive Publication Date: 2025-12-05ZHEJIANG WEIXING INTELLIGENT METER STOCK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411735600.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-12-05
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

Existing ultrasonic flow meters suffer from reduced measurement accuracy due to factors such as water quality, component aging, and temperature. The fixed initial threshold leads to deviations in echo signal detection.

Method used

By adjusting the first wave threshold and comparing the absolute time difference between the initial value of the first wave threshold and the period of the emitted wave, the first wave detection threshold is dynamically set. The first wave threshold is optimized by combining preset increments and correction values ​​to ensure the accuracy of fluid velocity measurement.

Benefits of technology

It improves the accuracy of fluid velocity measurement, reduces measurement deviations caused by changes in echo signals, and quickly adapts to changes in fluid velocity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119469299B_ABST
    Figure CN119469299B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses an ultrasonic flowmeter and a setting method and system of a first-wave detection threshold value, wherein the setting method compares the absolute time difference of the first-wave arrival time before and after the first-wave threshold value adjustment with the emission wave period, and when the judgment condition is met, it is indicated that the first wave detected by the adjusted first-wave threshold value is the target wave, the adjusted first-wave threshold value is set as the first-wave detection threshold value, fluid flow rate detection is performed, and adaptive first-wave threshold value rapid setting is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present specification relate to the technical field of ultrasonic flow metering, and in particular to an ultrasonic flow meter and a method and system for setting a first-wave detection threshold value thereof. BACKGROUND

[0002] In the field of ultrasonic flow metering, the double threshold time difference method for calculating fluid flow rate by measuring the time difference of sound wave propagation in fluid is the most commonly used method at present. The principle is to set two threshold voltages: the first threshold voltage is called the first-wave (the first detectable wave) threshold value, which is used as a trigger level to detect whether the ultrasonic echo signal arrives normally; the second threshold voltage is called the zero-crossing threshold value, which is used to detect the zero-crossing point of the echo signal as a stop timing identifier, and finally the timing circuit calculates the propagation time of the ultrasonic signal according to the ultrasonic transmission time.

[0003] In the prior art, a fixed first-wave threshold value is set for the flow meter, and when the flow meter detects each echo signal, the detected first wave is assumed to be the target wave, and the fluid flow rate is calculated based on the difference in arrival time of each detected first wave.

[0004] However, in actual application, the received wave intensity will fluctuate within a certain range due to factors such as water quality, component aging, and temperature. When the first-wave threshold value is constant, the detected first wave of the echo signal may not be the target wave, resulting in a forward or backward shift of the stop timing identifier signal by one or more periods, thereby causing a large deviation in the measurement. SUMMARY

[0005] Embodiments of the present specification provide an ultrasonic flow meter and a method and system for setting a first-wave detection threshold value thereof. By comparing the absolute time difference of the arrival time of the first wave before and after adjustment with the transmission wave period, when the judgment condition is met, it is indicated that the first wave detected by the adjusted first-wave threshold value is the target wave. The adjusted first-wave threshold value is set as the first-wave detection threshold value for first-wave detection, thereby realizing rapid setting of an adaptive first-wave threshold value and improving the measurement accuracy of fluid flow rate.

[0006] The technical scheme is as follows:

[0007] In a first aspect, the embodiments of the present specification provide a method for setting a first-wave threshold value of an ultrasonic flow meter, comprising:

[0008] obtaining a first-wave threshold value initial value and a transmission wave period of a transmission signal, and taking the first-wave threshold value initial value as a reference first-wave threshold value;

[0009] detecting the echo signal based on the current reference first-wave threshold value, and obtaining the first-wave arrival time corresponding to the current reference first-wave threshold value;

[0010] adjusting the current reference first-wave threshold according to a preset increment to obtain a current adjusted first-wave threshold;

[0011] detecting the echo signal based on the current adjusted first-wave threshold to obtain a first-wave arrival time corresponding to the current adjusted first-wave threshold;

[0012] when an absolute difference between the first-wave arrival time corresponding to the current reference first-wave threshold and the first-wave arrival time corresponding to the current adjusted first-wave threshold and an absolute difference of the emission wave period are greater than a first preset value, taking the current adjusted first-wave threshold as a latest reference first-wave threshold, and returning to execute the step of detecting the echo signal based on the current reference first-wave threshold to obtain the first-wave arrival time corresponding to the current reference first-wave threshold;

[0013] when the absolute difference between the first-wave arrival time corresponding to the current reference first-wave threshold and the first-wave arrival time corresponding to the current adjusted first-wave threshold and the absolute difference of the emission wave period are less than or equal to the first preset value, setting a first-wave detection threshold based on the current adjusted first-wave threshold.

[0014] As a preferred scheme, the setting of the first-wave detection threshold based on the current adjusted first-wave threshold further comprises:

[0015] obtaining a first-wave propagation time corresponding to the current adjusted first-wave threshold based on the first-wave arrival time corresponding to the current adjusted first-wave threshold, and taking the first-wave propagation time as a target time;

[0016] detecting the echo signal based on the first-wave detection threshold to obtain a first-wave propagation time corresponding to the first-wave detection threshold;

[0017] when an absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold and the target time is greater than a second preset value, resetting the first-wave detection threshold.

[0018] As a preferred scheme, when the absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold and the target time is greater than the second preset value, the resetting of the first-wave detection threshold specifically comprises:

[0019] when the absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold and the target time is greater than the second preset value, resetting the first-wave detection threshold based on a size relationship between the first-wave propagation time corresponding to the first-wave detection threshold and the target time.

[0020] As a preferred scheme, the resetting of the first-wave detection threshold based on the size relationship between the first-wave propagation time corresponding to the first-wave detection threshold and the target time comprises:

[0021] if the first-wave propagation time corresponding to the first-wave detection threshold is less than the target time:

[0022] increase the first wave detection threshold by a first correction preset value to obtain a first correction value;

[0023] detect the echo signal based on the current first correction value, and obtain a first wave propagation time corresponding to the current first correction value;

[0024] when the absolute difference between the first wave propagation time corresponding to the current first correction value and the target time is less than or equal to a second preset value, take the first wave propagation time corresponding to the current first correction value as a new target time, and set the first wave detection threshold based on the current first correction value;

[0025] when the absolute difference between the first wave propagation time corresponding to the current first correction value and the target time is greater than the second preset value, increase the current first correction value by the first correction preset value to obtain a latest first correction value, and return to the step of detecting the echo signal based on the current first correction value and obtaining the first wave propagation time corresponding to the current first correction value;

[0026] if the first wave propagation time corresponding to the first wave detection threshold is greater than the target time:

[0027] decrease the first wave detection threshold by a second correction preset value to obtain a second correction value;

[0028] detect the echo signal based on the current second correction value, and obtain a first wave propagation time corresponding to the current second correction value;

[0029] when the absolute difference between the first wave propagation time corresponding to the current second correction value and the target time is less than or equal to the second preset value, take the first wave propagation time corresponding to the current second correction value as a new target time, and set the first wave detection threshold based on the current second correction value;

[0030] when the absolute difference between the first wave propagation time corresponding to the current second correction value and the target time is greater than the second preset value, decrease the current second correction value by the second correction preset value to obtain a latest second correction value, and return to the step of detecting the echo signal based on the current second correction value and obtaining the first wave propagation time corresponding to the current second correction value.

[0031] As a preferred scheme, the adjusting the current reference first wave threshold according to a preset increment to obtain a current adjusted first wave threshold comprises:

[0032] if the absolute difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than a transmission wave period, then multiply the preset increment, and increase the current reference first wave threshold by the multiplied preset increment to obtain the current adjusted first wave threshold;

[0033] If an absolute time difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is greater than a transmission wave period, the preset increment is multiplied by a certain number, and the current reference first wave threshold is increased by the preset increment multiplied by the certain number to obtain a current adjusted first wave threshold.

[0034] As a preferred solution, if the absolute time difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than half of the transmission wave period, the preset increment is multiplied by a certain number, and the current reference first wave threshold is increased by the preset increment multiplied by the certain number to obtain a current adjusted first wave threshold.

[0035] If the absolute time difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than half of the transmission wave period, the preset increment is multiplied by a certain number, and the current reference first wave threshold is increased by the preset increment multiplied by the certain number to obtain a current adjusted first wave threshold.

[0036] If the absolute time difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than half of the transmission wave period, the preset increment is multiplied by a certain number, and the current reference first wave threshold is increased by the preset increment multiplied by the certain number to obtain a current adjusted first wave threshold.

[0037] As a preferred solution, the method further comprises:

[0038] obtaining an upper limit of the first wave detection threshold based on the current adjusted first wave threshold;

[0039] obtaining a lower limit of the first wave detection threshold based on the current adjusted first wave threshold;

[0040] setting the first wave detection threshold based on the upper limit of the first wave detection threshold and the lower limit of the first wave detection threshold.

[0041] As a preferred solution, the method further comprises:

[0042] taking the current adjusted first wave threshold as an initial value of a first test value;

[0043] increasing the current first test value by a first test preset value to obtain a current adjusted first test value;

[0044] detecting the echo signal based on the current adjusted first test value to obtain a first wave arrival time corresponding to the current adjusted first test value;

[0045] when the absolute difference between the first-wave arrival time corresponding to the current adjusted first test value and the first-wave arrival time corresponding to the current first test value is greater than a third preset value, obtaining an upper limit of the first-wave detection threshold based on the first-wave arrival time corresponding to the current adjusted first test value and the first-wave arrival time corresponding to the current first test value; otherwise, taking the current adjusted first test value as the latest first test value, and returning to the step of obtaining the current adjusted first test value by increasing the first test preset value from the current first test value;

[0046] the obtaining of the lower limit of the first-wave detection threshold based on the current adjusted first-wave threshold comprises:

[0047] taking the current adjusted first-wave threshold as an initial value of the second test value;

[0048] obtaining a current adjusted second test value by decreasing the second test preset value from the current second test value;

[0049] detecting the echo signal based on the current adjusted second test value to obtain a first-wave arrival time corresponding to the current adjusted second test value;

[0050] when the absolute difference between the first-wave arrival time corresponding to the current adjusted second test value and the first-wave arrival time corresponding to the current second test value is greater than a fourth preset value, obtaining a lower limit of the first-wave detection threshold based on the first-wave arrival time corresponding to the current adjusted second test value and the first-wave arrival time corresponding to the current second test value; otherwise, taking the current adjusted second test value as the latest second test value, and returning to the step of obtaining the current adjusted second test value by decreasing the second test preset value from the current second test value;

[0051] wherein the first test preset value and the second test preset value are both less than a preset increment.

[0052] In a second aspect, the embodiments of the present specification provide an ultrasonic flowmeter first-wave threshold setting system, comprising an acquisition module, a first detection module, a threshold adjustment module, a second detection module and a setting module.

[0053] the acquisition module acquires a first-wave threshold initial value and a transmission wave period of a transmission signal, and takes the first-wave threshold initial value as a reference first-wave threshold;

[0054] the first detection module detects the echo signal based on the current reference first-wave threshold to obtain a first-wave arrival time corresponding to the current reference first-wave threshold;

[0055] the threshold adjustment module adjusts the current reference first-wave threshold according to a preset increment to obtain a current adjusted first-wave threshold;

[0056] The second detection module detects the echo signal based on the current adjusted first-wave threshold value to obtain a first-wave arrival time corresponding to the current adjusted first-wave threshold value.

[0057] The setting module sets the first-wave detection threshold based on the current adjusted first-wave threshold value when an absolute difference between the first-wave arrival time corresponding to the current reference first-wave threshold value and the first-wave arrival time corresponding to the current adjusted first-wave threshold value and an absolute difference of the emission wave period are less than or equal to a first preset value.

[0058] The setting module sets the first-wave detection threshold based on the current adjusted first-wave threshold value when an absolute difference between the first-wave arrival time corresponding to the current reference first-wave threshold value and the first-wave arrival time corresponding to the current adjusted first-wave threshold value and an absolute difference of the emission wave period are less than or equal to a first preset value.

[0059] In a third aspect, an embodiment of the present specification provides an ultrasonic flowmeter, comprising a first-wave threshold value setting module and a metering module.

[0060] The first-wave threshold value setting module sets the first-wave detection threshold by using the setting method in the first aspect.

[0061] The metering module calculates the fluid flow rate based on the set first-wave detection threshold.

[0062] In a fourth aspect, an embodiment of the present specification provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and performing the steps in the first aspect of the above embodiment.

[0063] The technical solutions provided by some embodiments of the present specification have at least the following beneficial effects:

[0064] 1. Starting from the first-wave threshold initial value, the first-wave threshold value is continuously increased, and the absolute difference between the first-wave arrival time corresponding to the current reference first-wave threshold value and the first-wave arrival time corresponding to the current adjusted first-wave threshold value is compared with the emission wave period of the emission signal. When the two are relatively close, the current adjusted first-wave threshold value is used as the basis to set the first-wave detection threshold, and the first-wave detection is performed, thereby realizing the rapid setting of the adaptive first-wave threshold value, and improving the measurement accuracy of the fluid flow rate.

[0065] 2. The first-wave propagation time corresponding to the current adjusted first-wave threshold value is used as the target time, and when the absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold and the target time is greater than a second preset value, the first-wave threshold value is corrected based on the first-wave detection threshold according to the first-wave propagation time and the target time.

[0066] 3. Since the preset increment cannot be set too large, it may miss the appropriate first wave detection threshold. Usually, the preset increment is set very small, but this will greatly increase the time to obtain the first wave detection threshold by adjusting the first wave threshold one by one. By setting conditions to double or triple the preset increment, the speed of determining the first wave detection threshold can be greatly accelerated.

[0067] 4. Based on the first wave detection threshold, further test the peak amplitude of the first wave and the wave before the first wave. Use the range of the two peak amplitudes as the selection range of the first wave detection threshold. Then select the most suitable first wave detection threshold according to the selection range of the first wave detection threshold in order to minimize the frequency of wave jumping phenomenon caused by changes in echo signal. Attached Figure Description

[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0069] Figure 1 A schematic diagram showing the different first waves obtained before and after the attenuation of the echo signal for the first wave threshold detection;

[0070] Figure 2 A flowchart illustrating a method for setting the first-wave detection threshold of an ultrasonic flow meter, as provided in an embodiment of this specification.

[0071] Figure 3 This is a schematic diagram of the structure of a system for setting the first wave detection threshold of an ultrasonic flow meter, as provided in the embodiments of this specification.

[0072] Figure 4 This is a structural schematic diagram of an ultrasonic flow meter provided in the embodiments of this specification. Detailed Implementation

[0073] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings.

[0074] The terms "first," "second," "third," etc., in the description, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0075] The following description provides examples, and is not intended to limit the scope, applicability or example set forth in the claims. Various changes can be made to the function and arrangement of elements described without departing from the scope of the description. Various examples can omit, substitute, or add various procedures or components as appropriate. For instance, the methods described can be performed in an order different than described, and various steps can be added, omitted, or combined. Also, features described with respect to some examples can be combined in other examples.

[0076] Firstly, the principle of measuring fluid flow rate by double threshold time difference method is described: a first wave threshold is set as a trigger level to detect whether the ultrasonic echo signal arrives normally; a zero-crossing threshold is set to detect the zero-crossing point of the ultrasonic echo as a stop timing mark, i.e. the arrival time. The time of each zero-crossing of the echo signal is recorded, and when the echo signal first crosses the first wave threshold, the time of the Nth (usually the 1st) zero-crossing of the echo signal before or after the echo signal first crosses the first wave threshold is taken as the arrival time of the first wave, and the propagation time of the first wave can be obtained by the transmission time of the echo signal and the arrival time of the first wave. Finally, the fluid flow rate is calculated according to the difference between the propagation times of the same first wave detected when the echo signal propagates in the fluid in the forward and reverse directions.

[0077] Referring to Figure 1 The figure shows the schematic diagram of different first waves detected by the first wave threshold before and after the attenuation of the echo signal. When the first wave threshold detects the initial waveform, the first wave detected is the third wave in the figure, but when the initial waveform is attenuated into the decay waveform, the peak amplitude of the third wave becomes smaller than the first wave threshold, and the first wave detected by the first wave threshold becomes the fourth wave in the figure, so that the recorded first wave arrival time is shifted backward by about one transmission wave period. At this time, the real flow rate of the fluid cannot be calculated, and the first wave threshold needs to be reset, so that the first wave detected by the adjusted first wave threshold when detecting the decay waveform is still the third wave. Obviously, the fixed first wave threshold cannot solve this problem.

[0078] Therefore, the embodiments of the present specification provide an ultrasonic flowmeter and a setting method and system of the first wave detection threshold thereof.

[0079] As Figure 2 The figure shows the flowchart of the setting method of the first wave detection threshold of the ultrasonic flowmeter provided by one or more embodiments of the present specification. Figure 2 The figure shows the flowchart of the setting method of the first wave detection threshold of the ultrasonic flowmeter provided by one or more embodiments of the present specification.

[0080] The setting method of the first wave detection threshold of the ultrasonic flowmeter comprises the following steps:

[0081] Step 202, obtaining a first-wave threshold initial value and a transmission wave period of the transmission signal, and taking the first-wave threshold initial value as a reference first-wave threshold;

[0082] Step 204, detecting the echo signal based on the current reference first-wave threshold, and obtaining a first-wave arrival time corresponding to the current reference first-wave threshold;

[0083] Step 206, adjusting the current reference first-wave threshold according to a preset increment to obtain a current adjusted first-wave threshold;

[0084] Step 208, detecting the echo signal based on the current adjusted first-wave threshold, and obtaining a first-wave arrival time corresponding to the current adjusted first-wave threshold;

[0085] Step 210A, when an absolute difference between the first-wave arrival time corresponding to the current reference first-wave threshold and the first-wave arrival time corresponding to the current adjusted first-wave threshold and an absolute difference of the transmission wave period are greater than a first preset value, taking the current adjusted first-wave threshold as a latest reference first-wave threshold, and returning to execute the step of detecting the echo signal based on the current reference first-wave threshold to obtain the first-wave arrival time corresponding to the current reference first-wave threshold;

[0086] Step 210B, when the absolute difference between the first-wave arrival time corresponding to the current reference first-wave threshold and the first-wave arrival time corresponding to the current adjusted first-wave threshold and the absolute difference of the transmission wave period are less than or equal to the first preset value, setting a first-wave detection threshold based on the current adjusted first-wave threshold.

[0087] Illustratively, the transducer transmits ultrasonic signals at a constant transmission wave period, but in the initial stage of ultrasonic transmission, the transducer needs time to reach its optimal working state, which is reflected in the gradually enhanced waves in the first few cycles of the echo signal, these waves are called start-up waves, the start-up waves usually have a faster rise time, but cannot reach the amplitude and frequency in the stable state, the waves with stable amplitude and frequency are called stable waves, the stable waves are consistent with the transmission wave period of the transmission signal, so the period of the start-up wave is gradually increased and close to the transmission wave period.

[0088] Illustratively, the threshold value of the first wave is adjusted according to the preset increment successively from the initial value of the smaller threshold value of the first wave, and in fact, the peak amplitude of each wave is located successively in the process of continuously increasing the threshold value of the first wave. The peak amplitude of each wave in the echo signal gradually increases and finally tends to be stable. The wave meeting the condition is selected as the target wave and the matching threshold value of the first wave is set. Since the period of the starting wave of the echo signal gradually increases and approaches the period of the transmitted wave, in the process of successively increasing the threshold value of the first wave for the first several times, if the first wave detected by the adjusted threshold value of the first wave is just the next wave of the first wave detected by the current reference threshold value of the first wave, the absolute time difference between the arrival times of the two first waves is the period of the first wave detected by the adjusted threshold value of the first wave. However, since the threshold value of the first wave is still small at this time, the detected first wave is in the early position of the starting wave, and these waves have poor stability and are not suitable as the target wave. At this time, the absolute time difference is much smaller than the period of the transmitted wave. By setting the first preset value, the threshold value of the first wave corresponding to the absolute time difference greater than the first preset value is discarded. The current reference threshold value of the first wave is adjusted according to the preset increment, and the adjustment is repeated for multiple times. When the determination condition is met, the threshold value of the first wave is no longer adjusted, and the threshold value of the first wave is set based on the current adjusted threshold value of the first wave for the detection of the first wave in the normal fluid flow metering. The absolute difference is the absolute value of the difference between the two.

[0089] Illustratively, the maximum amplitude of the echo signal is adjusted within a certain range by the amplifier circuit, and the initial value of the threshold value of the first wave is set to be less than the lower limit value of the range. Since the change of the arrival time of the first wave caused by the change of the fluid flow rate is much smaller than half of the period of the transmitted wave, the first preset value can be set to be half of the period of the transmitted wave or a value close to it, which can avoid the situation that the first wave detected by the adjusted threshold value of the first wave is the same wave as the first wave detected by the current reference threshold value of the first wave, but due to the change of the fluid wave speed, the absolute time difference triggers the setting condition and sets the inappropriate threshold value of the first wave.

[0090] Specifically, when the absolute time difference between the arrival time of the first wave corresponding to the current reference threshold value of the first wave and the arrival time of the first wave corresponding to the current adjusted threshold value of the first wave is less than or equal to the first preset value, the first wave detected by the current adjusted threshold value of the first wave is not the same wave as the first wave detected by the current reference threshold value of the first wave, so that the absolute time difference between the two arrival times of the first wave approaches the period of the transmitted wave. The absolute time difference between the two arrival times of the first wave is certainly less than half of the period of the transmitted wave. If the first wave detected by the current adjusted threshold value of the first wave is the same wave as the first wave detected by the current reference threshold value of the first wave, but due to the change of the wave speed, the difference between the two arrival times of the first wave, the absolute time difference between the two arrival times of the first wave is much smaller than half of the period of the transmitted wave, so the absolute time difference between the two arrival times of the first wave is certainly greater than half of the period of the transmitted wave.

[0091] Based on the above method of setting the first wave detection threshold, the setting of the first wave detection threshold can be periodically or each time the above method is re-executed to set the first wave detection threshold, thereby achieving rapid setting of the adaptive first wave threshold.

[0092] In one embodiment of the present specification, the first wave detection threshold is set based on the current adjusted first wave threshold, and then further comprising:

[0093] Based on the first wave arrival time corresponding to the current adjusted first wave threshold, the first wave propagation time corresponding to the current adjusted first wave threshold is obtained and used as the target time.

[0094] Based on the first wave detection threshold, the first wave propagation time corresponding to the first wave detection threshold is obtained.

[0095] When the absolute difference between the first wave propagation time corresponding to the first wave detection threshold and the target time is greater than a second preset value, the first wave detection threshold is re-set.

[0096] The second preset value is greater than or equal to half of the transmission wave period.

[0097] Illustratively, the first wave detection threshold is set while the first wave propagation time corresponding to the current adjusted first wave threshold is used as the target time. In normal fluid flow metering, the first wave propagation time of each echo signal is obtained, and the first wave propagation time is compared with the target time in turn. When the absolute difference between any first wave propagation time and the target time is greater than the second preset value, the first wave detection threshold is re-set.

[0098] Illustratively, when the absolute difference between the first wave propagation time corresponding to the first wave detection threshold and the target time is greater than the second preset value, it indicates that the echo signal has changed, resulting in that the first wave detected by the first wave detection threshold is no longer the target wave. At this time, the first wave detection threshold needs to be re-set.

[0099] Illustratively, the setting logic of the second preset value is consistent with the first preset value, and the two can be the same or different. Illustratively, the second preset value is set to half of the transmission wave period.

[0100] When the absolute difference between the first wave propagation time corresponding to the first wave detection threshold and the target time is greater than the second preset value, the first wave detection threshold is re-set, specifically:

[0101] When the absolute difference between the first wave propagation time corresponding to the first wave detection threshold and the target time is greater than the second preset value, the first wave detection threshold is re-set based on the size relationship between the first wave propagation time corresponding to the first wave detection threshold and the target time.

[0102] Illustratively, the way of resetting the first wave detection threshold value can be that the first wave propagation time of the echo signal is detected successively from the first wave threshold initial value, until the first wave propagation time substantially matches the target time, as the steps in the foregoing method. The first wave detection threshold value can also be reset by a more preferred scheme, i.e., the first wave detection threshold value is reset based on the size relationship between the first wave propagation time corresponding to the first wave detection threshold value and the target time, which can quickly complete the correction of the first wave detection threshold value.

[0103] In an embodiment of the present specification, the first wave detection threshold value is reset based on the size relationship between the first wave propagation time corresponding to the first wave detection threshold value and the target time, comprising:

[0104] If the first wave propagation time corresponding to the first wave detection threshold value is less than the target time:

[0105] The first wave detection threshold value is increased by a first correction preset value to obtain a first correction value;

[0106] The echo signal is detected based on the current first correction value to obtain the first wave propagation time corresponding to the current first correction value;

[0107] When the absolute difference between the first wave propagation time corresponding to the current first correction value and the target time is less than or equal to a second preset value, the first wave propagation time corresponding to the current first correction value is taken as a new target time, and the first wave detection threshold value is set based on the current first correction value;

[0108] When the absolute difference between the first wave propagation time corresponding to the current first correction value and the target time is greater than the second preset value, the current first correction value is increased by the first correction preset value to obtain the latest first correction value, and the step of detecting the echo signal based on the current first correction value to obtain the first wave propagation time corresponding to the current first correction value is returned;

[0109] If the first wave propagation time corresponding to the first wave detection threshold value is greater than the target time:

[0110] The first wave detection threshold value is decreased by a second correction preset value to obtain a second correction value;

[0111] The echo signal is detected based on the current second correction value to obtain the first wave propagation time corresponding to the current second correction value;

[0112] When the absolute difference between the first wave propagation time corresponding to the current second correction value and the target time is less than or equal to the second preset value, the first wave propagation time corresponding to the current second correction value is taken as a new target time, and the first wave detection threshold value is set based on the current second correction value;

[0113] When the absolute difference between the first-wave propagation time corresponding to the current second correction value and the target time is greater than the second preset value, the current second correction value is decreased by the second correction preset value to obtain a latest second correction value, and the step of detecting the echo signal based on the current second correction value and obtaining the first-wave propagation time corresponding to the current second correction value is returned.

[0114] Illustratively, when the absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold value and the target time is greater than the second preset value, the size relationship between the first-wave propagation time corresponding to the first-wave detection threshold value and the target time is first determined. If the first-wave propagation time corresponding to the first-wave detection threshold value is less than the target time, it indicates that the echo signal is enhanced, and the first wave detected by the first-wave detection threshold value is a wave before the target wave; if the first-wave propagation time corresponding to the first-wave detection threshold value is greater than the target time, it indicates that the echo signal is attenuated, and the first wave detected by the first-wave detection threshold value is a wave after the target wave. Then, the correction method is selected according to different situations.

[0115] When the first-wave propagation time corresponding to the first-wave detection threshold value is less than the target time, the first correction preset value is sequentially increased based on the first-wave detection threshold value, and a series of first-wave propagation times corresponding to the obtained first correction values are obtained. The correction is stopped until the absolute difference between the first-wave propagation time corresponding to the first correction value and the target time is less than or equal to the second preset value, and the last first correction value is used to set the first-wave detection threshold value.

[0116] When the first-wave propagation time corresponding to the first-wave detection threshold value is greater than the target time, the second correction preset value is sequentially decreased based on the first-wave detection threshold value, and a series of first-wave propagation times corresponding to the obtained second correction values are obtained. The correction is stopped until the absolute difference between the first-wave propagation time corresponding to the second correction value and the target time is less than or equal to the second preset value, and the last second correction value is used to set the first-wave detection threshold value.

[0117] Illustratively, because the echo signal change will not be particularly large, there is a high probability that the first wave detected by the first-wave detection threshold value is only deviated from the target wave by one wave. Instead of detecting the first-wave propagation time of the echo signal by gradually increasing the first-wave threshold value from the initial value until the first-wave propagation time basically matches the target time, and then resetting the first-wave detection threshold value, when the absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold value and the target time is greater than the second preset value, the first-wave propagation time corresponding to the first-wave detection threshold value at this time is used as a reference, and the reference is corrected according to the size relationship between the first-wave propagation time and the target time. This greatly speeds up the time for resetting the first-wave detection threshold value and quickly restores the normal fluid flow rate measurement state.

[0118] Illustratively, generally the fluctuation of the echo signal is attenuation, and enhancement is rarely seen. The first correction preset value, the second correction preset value, and the preset increment can be equal or not equal, and preferably the first correction preset value is equal to the second correction preset value and is less than or equal to the preset increment.

[0119] In an embodiment of the present disclosure, adjusting the current reference first wave threshold according to the preset increment to obtain a current adjusted first wave threshold comprises:

[0120] If the absolute difference in time between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than the emission wave period, the preset increment is multiplied, and the current reference first wave threshold is increased by the multiplied preset increment to obtain the current adjusted first wave threshold.

[0121] If the absolute difference in time between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is greater than the emission wave period, the preset increment is divided, and the current reference first wave threshold is decreased by the divided preset increment to obtain the current adjusted first wave threshold.

[0122] Illustratively, whenever the absolute difference in time between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the current adjusted first wave threshold is greater than the absolute difference of the first preset value and the emission wave period, the current adjusted first wave threshold is taken as the latest reference first wave threshold, and the step of detecting the echo signal based on the current reference first wave threshold to obtain the first wave arrival time corresponding to the current reference first wave threshold is re-executed, and then the current reference first wave threshold is adjusted according to the preset increment to obtain the current adjusted first wave threshold.

[0123] Illustratively, before adjustment, the absolute difference in time between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is judged in relation to the emission wave period.

[0124] When the absolute difference in time between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than the emission wave period, the first wave detected by the two first wave thresholds before and after the previous adjustment is the same wave or adjacent wave. The case where the first wave is the same wave indicates that the effect of the previous adjustment is not obvious, and the case where the first wave is adjacent wave but adjustment is still needed at this time indicates that the detected first wave is still a relatively early start wave, which does not meet the set condition. Therefore, the preset increment is multiplied in this adjustment, and the current reference first wave threshold is increased by the multiplied preset increment to obtain the current adjusted first wave threshold, and the preset increment is further multiplied every time the above condition is met subsequently, which can effectively reduce the invalid adjustment steps in the initial small preset increment setting.

[0125] Greater, corresponding to the previous adjustment over the case, resulting in the first wave of two waves respectively detected by the first wave is at least one wave interval. Due to the previous multiple times on the preset increment multiplication to cause excessive adjustment, so this adjustment first preset increment is reduced, and the current benchmark first wave threshold is reduced by the preset increment to obtain the current first wave threshold after adjustment, and if it still satisfies the above conditions, the preset increment is further reduced, and the preset increment is gradually reduced after multiple times, and the threshold part which is skipped by the previous adjustment is supplemented.

[0126] By means of multiplication and reduction of the preset increment, the number of first wave threshold adjustments is greatly reduced, and the first wave detection threshold meeting the conditions is obtained quickly.

[0127] In an embodiment of the present specification, if the absolute difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the last current benchmark first wave threshold is less than the emission wave period, the preset increment is multiplied, and the current benchmark first wave threshold is increased by the multiplied preset increment to obtain the current first wave threshold after adjustment, comprising:

[0128] If the absolute difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the last current benchmark first wave threshold is less than half of the emission wave period, the preset increment is multiplied, and the current benchmark first wave threshold is increased by the multiplied preset increment to obtain the current first wave threshold after adjustment.

[0129] If the absolute difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the last current benchmark first wave threshold is less than the emission wave period, but greater than half of the emission wave period, the preset increment remains unchanged, and the current benchmark first wave threshold is increased by the preset increment to obtain the current first wave threshold after adjustment.

[0130] Explanatory, for the above two specific cases of the absolute difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the last current benchmark first wave threshold is less than the emission wave period, further distinguish:

[0131] The absolute difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the last current benchmark first wave threshold is less than half of the emission wave period, corresponding to the case that the two first waves are the same wave, which indicates that the first wave before and after adjustment does not change, and the adjustment speed can be accelerated by multiplying the preset increment.

[0132] The absolute difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the previous current reference first wave threshold is less than the emission wave period, but greater than half of the emission wave period, which corresponds to the case that two first waves are adjacent waves, indicating that the first wave changes before and after adjustment, and the preset increment is large enough, so the preset increment is not multiplied, which can avoid over-adjustment in the next time.

[0133] In an embodiment of the present specification, the first wave detection threshold is set based on the current adjusted first wave threshold, comprising:

[0134] The upper limit of the first wave detection threshold is obtained based on the current adjusted first wave threshold;

[0135] The lower limit of the first wave detection threshold is obtained based on the current adjusted first wave threshold;

[0136] The first wave detection threshold is set based on the upper limit of the first wave detection threshold and the lower limit of the first wave detection threshold.

[0137] Explanatorily, the way of setting the first wave detection threshold can be directly set as the current adjusted first wave threshold, but since the current adjusted first wave threshold corresponding to the setting condition is obtained by increasing the preset increment from the current reference first wave threshold, the current adjusted first wave threshold is very close to the peak amplitude of the previous wave of the target wave, and the first wave detected by the echo signal is prone to be the previous wave of the target wave due to the slight fluctuation of the echo signal, resulting in the deviation of the measurement result of the fluid flow rate. The first wave detection threshold can be re-set by a more preferred scheme, that is, after the current adjusted first wave threshold is determined, the approximate situation of the peak amplitudes of the target wave and the previous wave of the target wave is further determined, and the middle point of the peak amplitudes of the two waves can be selected as the first wave detection threshold. Then, the echo signal needs to change more to cause the change of the detected first wave, that is, the wave skipping phenomenon, so as to avoid the failure of the first wave detection threshold, and the frequency of resetting the first wave detection threshold can also be greatly reduced.

[0138] Specifically, the upper limit of the first wave detection threshold is obtained based on the current adjusted first wave threshold, comprising:

[0139] The current adjusted first wave threshold is taken as the initial value of the first test value;

[0140] The current adjusted first test value is obtained by increasing the first test preset value from the current first test value;

[0141] The echo signal is detected based on the current adjusted first test value, and the first wave arrival time corresponding to the current adjusted first test value is obtained;

[0142] When the absolute difference between the first-wave arrival time corresponding to the current adjusted first test value and the first-wave arrival time corresponding to the current first test value is greater than the third preset value, the upper limit of the first-wave detection threshold is obtained based on the first-wave arrival time corresponding to the current adjusted first test value and the first-wave arrival time corresponding to the current first test value; otherwise, the current adjusted first test value is taken as the latest first test value, and the step of obtaining the current adjusted first test value by increasing the first test preset value from the current first test value is returned.

[0143] Explanatorily, the current adjusted first-wave threshold is taken as an initial value, and the first test preset value is increased successively. The first-wave arrival time corresponding to each first test value is obtained respectively, and the absolute difference between the first-wave arrival times of two adjacent first test values is compared with the third preset value. If the absolute difference is greater than the third preset value, it is indicated that the peak amplitude of the target wave is between the two adjacent first test values, the upper limit of the first-wave detection threshold is obtained from the two adjacent first test values, for example, the average value is taken, and the test is ended. Otherwise, the first test preset value is increased again to obtain the next first test value, and the above steps are repeated.

[0144] Specifically, the lower limit of the first-wave detection threshold is obtained based on the current adjusted first-wave threshold, including:

[0145] The current adjusted first-wave threshold is taken as an initial value of the second test value.

[0146] The current second test value is obtained by decreasing the second test preset value from the current second test value.

[0147] The echo signal is detected based on the current adjusted second test value, and the first-wave arrival time corresponding to the current adjusted second test value is obtained.

[0148] When the absolute difference between the first-wave arrival time corresponding to the current adjusted second test value and the first-wave arrival time corresponding to the current second test value is greater than the fourth preset value, the lower limit of the first-wave detection threshold is obtained based on the first-wave arrival time corresponding to the current adjusted second test value and the first-wave arrival time corresponding to the current second test value; otherwise, the current adjusted second test value is taken as the latest second test value, and the step of obtaining the current adjusted second test value by decreasing the second test preset value from the current second test value is returned.

[0149] Explanatory, the current adjusted first wave threshold is taken as the initial value, and the second test preset value is gradually reduced. The first wave arrival time corresponding to each second test value is obtained respectively, and the absolute difference of the first wave arrival time of adjacent two second test values is compared with the fourth preset value. If the absolute difference of the first wave arrival time of adjacent two second test values is greater than the fourth preset value, it is indicated that the peak amplitude of the wave before the target wave is between the adjacent two second test values. The lower limit of the first wave detection threshold is obtained from the two adjacent second test values, such as taking the average value, and the test is ended. Otherwise, the second test preset value is reduced to obtain the next second test value, and the above steps are repeated.

[0150] Explanatory, the first test preset value and the second test preset value are both less than the preset increment, so that the peak amplitude range can be more accurately framed. The setting logic of the third preset value and the fourth preset value is consistent with the first preset value, and the three can be the same or different. Exemplarily, the third preset value and the fourth preset value are both set to half of the emission wave period.

[0151] Explanatory, the test steps corresponding to the initial value of the first test value and the initial value of the second test value of the current adjusted first wave threshold can be performed in any order, such as first performing the first test to obtain the upper limit of the first wave detection threshold and then performing the second test to obtain the lower limit of the first wave detection threshold, or first performing the second test to obtain the lower limit of the first wave detection threshold and then performing the first test to obtain the upper limit of the first wave detection threshold.

[0152] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or can be advantageous.

[0153] Next, please refer to Figure 3 , Figure 3 A structure schematic diagram of a first wave detection threshold setting system of an ultrasonic flowmeter provided by an embodiment of the present specification is shown.

[0154] As Figure 3 shown, a first wave detection threshold setting system 400 of an ultrasonic flowmeter includes an acquisition module 301, a first detection module 302, a threshold adjustment module 303, a second detection module 304, and a setting module 305.

[0155] The acquisition module 301 acquires a first wave threshold initial value and an emission wave period of an emission signal, and takes the first wave threshold initial value as a reference first wave threshold.

[0156] The first detection module 302 detects the echo signal based on the current reference first wave threshold value, and obtains a first wave arrival time corresponding to the current reference first wave threshold value;

[0157] The threshold adjustment module 303 adjusts the current reference first wave threshold value according to a preset increment to obtain a current adjusted first wave threshold value;

[0158] The second detection module 304 detects the echo signal based on the current adjusted first wave threshold value, and obtains a first wave arrival time corresponding to the current adjusted first wave threshold value;

[0159] The setting module 305 sets the first wave detection threshold based on the current adjusted first wave threshold value when an absolute time difference between the first wave arrival time corresponding to the current reference first wave threshold value and the first wave arrival time corresponding to the current adjusted first wave threshold value is less than or equal to a first preset value and an absolute difference of a transmission wave period is less than or equal to the first preset value.

[0160] The acquisition module 301 takes the current adjusted first wave threshold value as the latest reference first wave threshold value when an absolute time difference between the first wave arrival time corresponding to the current reference first wave threshold value and the first wave arrival time corresponding to the current adjusted first wave threshold value is greater than the first preset value and an absolute difference of a transmission wave period is greater than the first preset value.

[0161] Each of the embodiments in the specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the setting system embodiment, since it is basically similar to the setting method embodiment, the description is relatively simple, and the related parts can be referred to the part of the setting method embodiment.

[0162] Please refer to Figure 4 The structure schematic diagram of the ultrasonic flowmeter provided by the embodiment of the specification is shown.

[0163] As Figure 4 shown, the ultrasonic flowmeter 400 includes a first wave threshold value setting module 401 and a metering module 402.

[0164] The first wave threshold value setting module 401 sets the first wave detection threshold value by using the above-mentioned setting method of the first wave detection threshold value of the ultrasonic flowmeter.

[0165] The metering module 402 calculates the fluid flow rate based on the set first wave detection threshold value.

[0166] The embodiments of the present specification also provide a computer-readable storage medium, which stores instructions, when the instructions are executed on a computer or a processor, cause the computer or the processor to perform the steps of one or more of the above-mentioned setting method embodiments. When each component module of the above-mentioned electronic device is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0167] In the above embodiments, all or part of the embodiments can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of the embodiments can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in or transmitted by a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital versatile disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)) and the like.

[0168] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, which can be stored in a computer-readable storage medium. The program can include the processes of the above-mentioned embodiments when executed. The storage medium includes ROM, RAM, magnetic or optical discs and various program code storage media. In the case of no conflict, the technical features in the embodiments and the embodiments can be combined arbitrarily.

[0169] The above embodiments are only described as the preferred embodiment modes of the present specification, and do not limit the scope of the present specification. Without departing from the design spirit of the present specification, various modifications and improvements of the technical solutions of the present specification made by those of ordinary skill in the art shall fall within the protection scope determined by the claims of the present specification.

Claims

1. A method for setting the initial detection threshold of an ultrasonic flow meter, characterized in that, The method comprises the following steps: acquiring a first-wave threshold initial value and a transmission wave period of a transmission signal, and taking the first-wave threshold initial value as a reference first-wave threshold; detecting an echo signal based on the current reference first-wave threshold, and acquiring a first-wave arrival time corresponding to the current reference first-wave threshold; adjusting the current reference first-wave threshold according to a preset increment to obtain a current adjusted first-wave threshold; detecting the echo signal based on the current adjusted first-wave threshold, and acquiring a first-wave arrival time corresponding to the current adjusted first-wave threshold; when an absolute time difference between the first-wave arrival time corresponding to the current reference first-wave threshold and the first-wave arrival time corresponding to the current adjusted first-wave threshold and an absolute difference of the transmission wave period are greater than a first preset value, taking the current adjusted first-wave threshold as a latest reference first-wave threshold, and returning to the step of detecting the echo signal based on the current reference first-wave threshold to acquire the first-wave arrival time corresponding to the current reference first-wave threshold; when the absolute time difference between the first-wave arrival time corresponding to the current reference first-wave threshold and the first-wave arrival time corresponding to the current adjusted first-wave threshold and the absolute difference of the transmission wave period are less than or equal to the first preset value, setting a first-wave detection threshold based on the current adjusted first-wave threshold.

2. The method of claim 1, wherein the first wave detection threshold is set to a value of 0.5 times the amplitude of the first wave. After the step of setting the first-wave detection threshold based on the current adjusted first-wave threshold, the method further comprises the following steps: acquiring a first-wave propagation time corresponding to the current adjusted first-wave threshold based on the first-wave arrival time corresponding to the current adjusted first-wave threshold, and taking the first-wave propagation time as a target time; detecting the echo signal based on the first-wave detection threshold to acquire a first-wave propagation time corresponding to the first-wave detection threshold; when an absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold and the target time is greater than a second preset value, resetting the first-wave detection threshold.

3. The method of claim 2, wherein the threshold is set to a value that is a function of the average of the first few waveforms. When the absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold and the target time is greater than the second preset value, the step of resetting the first-wave detection threshold is specifically: when the absolute difference between the first-wave propagation time corresponding to the first-wave detection threshold and the target time is greater than the second preset value, resetting the first-wave detection threshold based on a size relationship between the first-wave propagation time corresponding to the first-wave detection threshold and the target time.

4. The method of claim 3, wherein the threshold is set to a value of 0.5 times the average of the first and second peak values. The step of resetting the first-wave detection threshold based on the size relationship between the first-wave propagation time corresponding to the first-wave detection threshold and the target time comprises the following steps: if the first-wave propagation time corresponding to the first-wave detection threshold is less than the target time: increasing the first-wave detection threshold by a first correction preset value to obtain a first correction value; detecting the echo signal based on the current first correction value to acquire a first-wave propagation time corresponding to the current first correction value; when an absolute difference between the first-wave propagation time corresponding to the current first correction value and the target time is less than or equal to the second preset value, taking the first-wave propagation time corresponding to the current first correction value as a new target time, and setting the first-wave detection threshold based on the current first correction value; when the absolute difference between the first-wave propagation time corresponding to the current first correction value and the target time is greater than the second preset value, increasing the current first correction value by the first correction preset value to obtain a latest first correction value, and returning to the step of detecting the echo signal based on the current first correction value to acquire the first-wave propagation time corresponding to the current first correction value; if the first-wave propagation time corresponding to the first-wave detection threshold is greater than the target time: decrease the first wave detection threshold by a second correction preset value to obtain a second correction value; detect the echo signal based on the current second correction value, and obtain a first wave propagation time corresponding to the current second correction value; when an absolute difference between the first wave propagation time corresponding to the current second correction value and a target time is less than or equal to a second preset value, take the first wave propagation time corresponding to the current second correction value as a new target time, and set the first wave detection threshold based on the current second correction value; when the absolute difference between the first wave propagation time corresponding to the current second correction value and the target time is greater than the second preset value, decrease the current second correction value by the second correction preset value to obtain a latest second correction value, and return to the step of detecting the echo signal based on the current second correction value and obtaining the first wave propagation time corresponding to the current second correction value.

5. The method for setting the first-wave detection threshold of an ultrasonic flowmeter according to claim 1, characterized in that, the adjusting the current reference first wave threshold according to the preset increment to obtain a current adjusted first wave threshold comprises: if a time absolute difference between a first wave arrival time corresponding to the current reference first wave threshold and a first wave arrival time corresponding to a last current reference first wave threshold is less than a transmission wave period, multiply the preset increment, and increase the current reference first wave threshold by the multiplied preset increment to obtain the current adjusted first wave threshold; if the time absolute difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is greater than the transmission wave period, divide the preset increment, and decrease the current reference first wave threshold by the divided preset increment to obtain the current adjusted first wave threshold.

6. The method of setting a threshold for detecting a first wave of an ultrasonic flow meter according to claim 5, wherein, the if the time absolute difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than the transmission wave period, the multiplying the preset increment, and the increasing the current reference first wave threshold by the multiplied preset increment to obtain the current adjusted first wave threshold comprises: if the time absolute difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than half of the transmission wave period, multiply the preset increment, and increase the current reference first wave threshold by the multiplied preset increment to obtain the current adjusted first wave threshold; if the time absolute difference between the first wave arrival time corresponding to the current reference first wave threshold and the first wave arrival time corresponding to the last current reference first wave threshold is less than the transmission wave period but greater than half of the transmission wave period, the preset increment remains unchanged, and the current reference first wave threshold is increased by the preset increment to obtain the current adjusted first wave threshold.

7. The method of setting a threshold for detecting a first wave of an ultrasonic flow meter according to claim 1, wherein the setting the first wave detection threshold based on the current adjusted first wave threshold comprises: obtaining an upper limit of the first wave detection threshold based on the current adjusted first wave threshold; obtaining a lower limit of the first wave detection threshold based on the current adjusted first wave threshold; setting the first wave detection threshold based on the upper limit of the first wave detection threshold and the lower limit of the first wave detection threshold.

8. The method of claim 7, wherein the first wave detection threshold is set to a value of 0.5 times the average of the maximum and minimum values of the first wave detection threshold. the obtaining the upper limit of the first wave detection threshold based on the current adjusted first wave threshold comprises: taking the current adjusted first wave threshold as an initial value of a first test value; increasing the current first test value by a first test preset value to obtain a current adjusted first test value; detect the echo signal based on the current adjusted first test value, and obtain a first-arrival time corresponding to the current adjusted first test value; when the absolute difference between the first-arrival time corresponding to the current adjusted first test value and the first-arrival time corresponding to the current first test value is greater than a third preset value, obtain an upper limit of the first-arrival detection threshold based on the first-arrival time corresponding to the current adjusted first test value and the first-arrival time corresponding to the current first test value; otherwise, take the current adjusted first test value as the latest first test value, and return to the step of obtaining the current adjusted first test value by increasing the first test preset value from the current first test value; the method of obtaining the lower limit of the first-arrival detection threshold based on the current adjusted first-arrival threshold comprises: taking the current adjusted first-arrival threshold as an initial value of a second test value; obtaining a current adjusted second test value by decreasing the second test preset value from the current second test value; detecting the echo signal based on the current adjusted second test value, and obtaining a first-arrival time corresponding to the current adjusted second test value; when the absolute difference between the first-arrival time corresponding to the current adjusted second test value and the first-arrival time corresponding to the current second test value is greater than a fourth preset value, obtaining a lower limit of the first-arrival detection threshold based on the first-arrival time corresponding to the current adjusted second test value and the first-arrival time corresponding to the current second test value; otherwise, taking the current adjusted second test value as the latest second test value, and returning to the step of obtaining the current adjusted second test value by decreasing the second test preset value from the current second test value; wherein the first test preset value and the second test preset value are both less than a preset increment.

9. A system for setting the initial detection threshold of an ultrasonic flow meter, characterized in that, comprises an obtaining module (301), a first detecting module (302), a threshold adjusting module (303), a second detecting module (304), and a setting module (305); the obtaining module (301) obtains an initial value of a first-arrival threshold and a transmission wave period of a transmission signal, and takes the initial value of the first-arrival threshold as a reference first-arrival threshold; the first detecting module (302) detects the echo signal based on the current reference first-arrival threshold, and obtains a first-arrival time corresponding to the current reference first-arrival threshold; the threshold adjusting module (303) adjusts the current reference first-arrival threshold according to a preset increment to obtain a current adjusted first-arrival threshold; the second detecting module (304) detects the echo signal based on the current adjusted first-arrival threshold, and obtains a first-arrival time corresponding to the current adjusted first-arrival threshold; the setting module (305) sets the first-arrival detection threshold based on the current adjusted first-arrival threshold when the absolute difference between the time corresponding to the current reference first-arrival threshold and the time corresponding to the current adjusted first-arrival threshold is less than or equal to a first preset value; the obtaining module (301) takes the current adjusted first-arrival threshold as the latest reference first-arrival threshold when the absolute difference between the time corresponding to the current reference first-arrival threshold and the time corresponding to the current adjusted first-arrival threshold is greater than the first preset value.

10. An ultrasonic flow meter characterized by: comprises a first-arrival threshold setting module (401) and a metering module (402); The first-wave threshold setting module (401) sets the first-wave detection threshold by using the method of setting the first-wave detection threshold of the ultrasonic flowmeter according to any one of claims 1-8. The metering module (402) calculates the fluid flow rate based on the set first-wave detection threshold.

Citation Information

Patent Citations

  • Head wave detection threshold setting method for ultrasonic flow metering device

    CN115993158A

  • Ultrasonic head wave positioning method and system

    CN117804557A