Ultrasonic flowmeter and method and system for setting head wave detection threshold value of ultrasonic flowmeter
By adjusting the first wave threshold in the ultrasonic flowmeter, using the comparison of the initial value of the first wave threshold and the transmitting wave period, the problem that the fixed first wave threshold cannot accurately detect the echo signal is solved, and the rapid setting of the adaptive first wave threshold is achieved Improvement of the accuracy of measuring fluid flow velocity.
Patent Information
- Application Number
- CN202411735600.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In ultrasonic flowmeters, due to factors such as water quality, component aging and temperature, the received wave intensity will fluctuate, resulting in the fixed first wave threshold not being able to accurately detect the first wave of the echo signal, which in turn leads to a larger fluid flow velocity meter. deviation.
By adjusting the first wave threshold, using the comparison of the initial value of the first wave threshold and the transmission wave period, a new first wave threshold is set when specific judgment conditions are met to ensure that the detected first wave is the target wave, thereby improving the measurement accuracy of the fluid flow rate .
The adaptive first wave threshold is quickly set, the measurement accuracy of the fluid flow rate is improved, and the measurement deviation caused by changes in the echo signal is reduced.
Smart Images

Figure CN119469299A_ABST
Abstract
Description
Technical Field
[0001] Multiple embodiments of the present specification relate to the technical field of ultrasonic flow measurement, and specifically to an ultrasonic flow meter and a method and system for setting a first wave detection threshold thereof. Background Art
[0002] In the field of ultrasonic flow measurement, the dual-threshold time difference method is the most commonly used method for calculating the fluid flow rate by measuring the time difference of the sound wave propagating in the fluid in the forward and reverse directions. The principle is to set two threshold voltages: the first threshold voltage is called the first wave (the first detectable wave) threshold, 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, which is used to detect the zero-crossing point of the echo signal as a mark to stop timing. Finally, the timing circuit calculates the propagation time of this ultrasonic signal based on the ultrasonic emission time.
[0003] In the prior art, a fixed first wave threshold is set for the flow meter. When the flow meter detects each echo signal, the first wave detected is assumed to be the target wave, and the fluid flow rate is calculated by the difference in arrival time of each detected first wave.
[0004] However, in actual applications, the intensity of the received wave may fluctuate to a certain extent due to factors such as water quality, component aging, and temperature. When the first wave judgment is performed using a constant first wave threshold, the first wave of the detected echo signal may not be the target wave, causing the obtained stop timing mark signal to shift forward or backward by one or more cycles, resulting in a large deviation in the measurement. Summary of the invention
[0005] The embodiments of this specification provide an ultrasonic flow meter and a method and system for setting its first wave detection threshold. The absolute time difference between the first wave arrival times before and after the first wave threshold is adjusted is compared with the transmission wave period. When the judgment condition is met, it means that the first wave detected by the adjusted first wave threshold is the target wave. The adjusted first wave threshold is set as the first wave detection threshold, and first wave detection is performed to achieve rapid setting of the adaptive first wave threshold, thereby improving the measurement accuracy of the fluid flow rate.
[0006] The technical solution is as follows: In a first aspect, an embodiment of the present specification provides a method for setting a first wave threshold of an ultrasonic flow meter, comprising: Obtaining an initial value of the first wave threshold and a transmission wave period of the transmission signal, and using the initial value of the first wave threshold as a reference first wave threshold; Detect the echo signal based on the current reference first wave threshold, and obtain the first wave arrival time corresponding to the current reference first wave threshold; Adjusting the current benchmark first-wave threshold according to a preset increment to obtain a current adjusted first-wave threshold; Detect the echo signal based on the current adjusted first wave threshold, and obtain the first wave arrival time corresponding to the current adjusted first wave threshold; 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 between the transmission wave period and the first wave arrival time are greater than the first preset value, the current adjusted first wave threshold is used as the latest reference first wave threshold, and the method returns to the step of detecting the echo signal based on the current reference first wave threshold and obtaining the first wave arrival time corresponding to the current reference first wave threshold; 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 between the transmission wave period and the first wave detection threshold are less than or equal to the first preset value, the first wave detection threshold is set based on the current adjusted first wave threshold.
[0007] As a preferred solution, the first wave detection threshold is set based on the current adjusted first wave threshold, and then further includes: Based on the first wave arrival time corresponding to the first wave threshold after the current adjustment, the first wave propagation time corresponding to the first wave threshold after the current adjustment is obtained, and used as the target time; Detecting the echo signal based on the first wave detection threshold, and obtaining the first wave propagation time corresponding to the first wave detection threshold; 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 reset.
[0008] As a preferred solution, 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 reset, 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 a second preset value, the first wave detection threshold is reset based on the magnitude relationship between the first wave propagation time corresponding to the first wave detection threshold and the target time.
[0009] As a preferred solution, the resetting of the first wave detection threshold based on the magnitude relationship between the first wave propagation time corresponding to the first wave detection threshold and the target time includes: 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; Detect the echo signal based on the current first correction value, and obtain the first wave propagation time corresponding to 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 less than or equal to the second preset value, the first wave propagation time corresponding to the current first correction value is used as the new target time, and the first wave detection threshold is set 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, 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; If the first wave propagation time corresponding to the first wave detection threshold is greater than the target time: The first wave detection threshold is reduced 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 the first wave propagation time corresponding to 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 less than or equal to the second preset value, the first wave propagation time corresponding to the current second correction value is used as the new target time, and the first wave detection threshold is set 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, the current second correction value is reduced by the second correction preset value to obtain the latest second correction value, and the step of detecting the echo signal based on the current second correction value to obtain the first wave propagation time corresponding to the current second correction value is returned.
[0010] As a preferred solution, the current reference first wave threshold is adjusted according to the preset increment to obtain the current adjusted first wave threshold, including: If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than the transmission 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 adjusted first wave threshold; If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is greater than the transmission wave period, the preset increment is multiplied, and the current benchmark first wave threshold is reduced by the multiplied preset increment to obtain the current adjusted first wave threshold.
[0011] As a preferred solution, if the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than the transmission wave period, the preset increment is doubled, and the current benchmark first wave threshold is increased by the doubled preset increment to obtain the current adjusted first wave threshold, including: If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than half of the transmission wave period, the preset increment is doubled, and the current benchmark first wave threshold is increased by the doubled preset increment to obtain the current adjusted first wave threshold; If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark 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 preset increment is increased by the current benchmark first wave threshold to obtain the current adjusted first wave threshold.
[0012] As a preferred solution, the first wave detection threshold is set based on the current adjusted first wave threshold, including: Obtain the upper limit of the first wave detection threshold based on the currently adjusted first wave threshold; Obtain the lower limit of the first wave detection threshold based on the current adjusted first wave threshold; The first wave detection threshold is set based on the first wave detection threshold upper limit and the first wave detection threshold lower limit.
[0013] As a preferred solution, the obtaining of the upper limit of the first wave detection threshold based on the currently adjusted first wave threshold includes: Using the current adjusted first wave threshold as the initial value of the first test value; Adding the first test preset value to the current first test value to obtain the current adjusted first test value; Detect the echo signal based on the current adjusted first test value, and obtain the first wave arrival time corresponding to the current adjusted first test value; 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 first wave detection threshold upper limit 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 adding the first test preset value is returned to; The step of obtaining the lower limit of the first wave detection threshold based on the currently adjusted first wave threshold includes: Using the current adjusted first wave threshold as the initial value of the second test value; Subtracting the second test preset value from the current second test value to obtain the current adjusted second test value; Detect the echo signal based on the current adjusted second test value, and obtain the first wave arrival time corresponding to the current adjusted second test value; 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, the first wave detection threshold lower limit 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 used as the latest second test value, and the step of obtaining the current adjusted second test value by subtracting the second test preset value from the current second test value is returned; Wherein, the first test preset value and the second test preset value are both smaller than the preset increment.
[0014] In a second aspect, an embodiment of this specification provides a system for setting a first wave threshold of an ultrasonic flowmeter, including an acquisition module, a first detection module, a threshold adjustment module, a second detection module, and a setting module; The acquisition module acquires the initial value of the first wave threshold and the transmission wave period of the transmission signal, and uses the initial value of the first wave threshold as the reference first wave threshold; The first detection module detects the echo signal based on the current reference first wave threshold value and obtains the first wave arrival time corresponding to the current reference first wave threshold value; The threshold adjustment module adjusts the current reference first wave threshold according to a preset increment to obtain the current adjusted first wave threshold; The second detection module detects the echo signal based on the current adjusted first wave threshold value, and obtains the first wave arrival time corresponding to the current adjusted first wave threshold value; The setting module sets the first wave detection threshold based on the current adjusted first wave threshold 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 between the transmission wave period and the first wave arrival time are less than or equal to the first preset value; The acquisition module uses the current adjusted first wave threshold as the latest reference first wave threshold 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 between the transmission wave period and the transmission wave period are greater than a first preset value.
[0015] In a third aspect, an embodiment of this specification provides an ultrasonic flow meter, including a first wave threshold setting module and a metering module; The first wave threshold setting module sets the first wave detection threshold using the setting method described in the first aspect above; The metering module calculates the fluid flow rate based on a set first wave detection threshold.
[0016] In a fourth aspect, an embodiment of this specification provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps described in the first aspect of the above embodiment.
[0017] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: 1. Taking the initial value of the first wave threshold as the starting point, the first wave threshold is continuously increased, and the absolute difference of the first wave arrival time corresponding to the current reference first wave threshold and the current adjusted first wave threshold is compared with the transmission wave period of the transmission signal. When the two are relatively close, the first wave detection threshold is set based on the current adjusted first wave threshold, and the first wave detection is performed to achieve the rapid setting of the adaptive first wave threshold, thereby improving the measurement accuracy of the fluid flow rate; 2. Taking the first wave propagation time corresponding to the currently adjusted first wave threshold as the target time, 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, correcting the first wave threshold based on the first wave detection threshold according to the first wave propagation time and the target time; 3. Since the preset increment cannot be set too large, the appropriate first wave detection threshold may be missed. Usually, the preset increment is set very small, but it will greatly increase the time to adjust the first wave threshold to obtain the first wave detection threshold. By setting conditions to double or reduce the preset increment, the speed of determining the first wave detection threshold is greatly accelerated; 4. Based on the first wave detection threshold, further test the peak amplitudes of the first wave and the wave before the first wave, take the interval of the two peak amplitudes as the first wave detection threshold selection interval, and then select the most appropriate first wave detection threshold based on the first wave detection threshold selection interval to minimize the frequency of wave jumping caused by echo signal changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 This is a schematic diagram of different first waves obtained by detecting the first wave threshold before and after the echo signal is attenuated; Figure 2 A schematic flow chart of a method for setting a first wave detection threshold of an ultrasonic flow meter provided in an embodiment of this specification; Figure 3 It is a structural schematic diagram of a system for setting a first wave detection threshold of an ultrasonic flow meter provided in an embodiment of this specification; Figure 4 It is a structural schematic diagram of an ultrasonic flow meter provided in an embodiment of this specification. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of this specification will be described clearly and completely below in conjunction with the drawings in the embodiments of this specification.
[0021] The terms "first", "second", "third", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0022] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present specification. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described with respect to some examples may be combined in other examples.
[0023] First, the principle of measuring fluid flow rate by the dual-threshold time difference method is briefly 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 mark to stop timing, that is, the arrival time. The time when the echo signal crosses the zero point each time is recorded. When the echo signal crosses the first wave threshold for the first time, the time when the echo signal crosses the zero point for the Nth time (usually the first time) before or after the echo signal first crosses the first wave threshold is used as the arrival time of the first wave. The timing circuit can derive the propagation time of the first wave based on the emission time of the echo signal and the arrival time of the first wave. Finally, the fluid flow rate is calculated based on the difference in the propagation time of the same first wave detected when the echo signal propagates in the fluid along and against the flow.
[0024] Reference Figure 1As shown in the figure, it is a schematic diagram of different first waves detected before and after the echo signal attenuation is detected by the first wave threshold. When the first wave threshold detects the initial waveform, the first wave detected is the third wave in the figure, but because the first wave threshold is close to the peak amplitude of the third wave, when the initial waveform decays to the attenuated waveform, the peak amplitude of the third wave becomes less than the first wave threshold, and the first wave detected by the first wave threshold will become the fourth wave in the figure, making the recorded first wave arrival time shifted backward by about one transmission wave cycle. At this time, the true flow rate of the fluid cannot be calculated, and the first wave threshold needs to be reset so that the adjusted first wave threshold still detects the third wave when detecting the attenuated waveform. Obviously, a fixed first wave threshold cannot solve this problem.
[0025] Therefore, the embodiments of the present specification provide an ultrasonic flow meter and a method and system for setting a first wave detection threshold thereof.
[0026] like Figure 2 As shown, Figure 2 A schematic flow chart of a method for setting a first wave detection threshold of an ultrasonic flow meter provided in one or more embodiments of the present specification.
[0027] A method for setting a first wave detection threshold of an ultrasonic flow meter, comprising: Step 202: Obtain an initial value of the first wave threshold and a transmission wave period of the transmission signal, and use the initial value of the first wave threshold as a reference first wave threshold; Step 204: Detect the echo signal based on the current reference first wave threshold value, and obtain the first wave arrival time corresponding to the current reference first wave threshold value; Step 206: adjusting the current reference first wave threshold according to the preset increment to obtain the current adjusted first wave threshold; Step 208: Detect the echo signal based on the currently adjusted first wave threshold value, and obtain the first wave arrival time corresponding to the currently adjusted first wave threshold value; Step 210A: 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 time difference of the transmission wave period are greater than the first preset value, the current adjusted first wave threshold is used as the latest reference first wave threshold, and the process returns to 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; 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 between the transmission wave period and the first wave arrival time are less than or equal to the first preset value, the first wave detection threshold is set based on the current adjusted first wave threshold.
[0028] Illustratively, the transducer transmits an ultrasonic signal with 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 waves that are gradually enhanced in the first few cycles of the echo signal. These waves are called startup waves. The startup waves usually have a faster rise time, but cannot reach the amplitude and frequency in a 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 startup wave gradually increases and approaches the transmission wave period.
[0029] Illustratively, a smaller initial value of the first wave threshold is adjusted successively according to a preset increment. In fact, in the process of continuously increasing the first wave threshold, the peak amplitude of each wave is located one by one. The peak amplitude of each wave in the echo signal gradually increases and eventually tends to be stable. The wave that meets the conditions is selected as the target wave and a matching first wave detection threshold is set. Since the period of the start wave of the echo signal gradually increases and approaches the period of the emission wave, in the process of increasing the first wave threshold value for the first several times, if the first wave detected by the current adjusted first wave threshold value is just the next wave after the first wave detected by the current reference first wave threshold value, the absolute time difference between the first wave arrival times of the two is the period of the first wave detected by the adjusted first wave threshold value. However, since the first wave threshold value is still relatively small at this time, the detected first wave is at the front position of the start wave, and these waves are less stable and are not suitable as target waves. The absolute time difference at this time will be much smaller than the emission wave period. By setting the first preset value, the first wave threshold corresponding to the absolute difference between the absolute time difference and the emission wave period is greater than the first preset value, and the current reference first wave threshold is adjusted according to the preset increment, and the adjustment is repeated for multiple times until the judgment condition is met, the first wave threshold is no longer adjusted, and the first wave detection threshold is set based on the current adjusted first wave threshold, and the first wave detection is performed during normal fluid flow rate measurement. Among them, the absolute difference is the absolute value of the difference between the two.
[0030] Explanatory, the maximum amplitude of the echo signal is adjusted within a certain range after passing through the amplifier circuit, and the initial value of the first wave threshold is set to be less than the lower limit of the range. Since the change in the first wave arrival time caused by the change in fluid velocity is much smaller than half of the transmission wave period, the first preset value can be set to half of the transmission wave period of the transmission signal or a value close thereto, so as to avoid the situation where the first wave detected by the current adjusted first wave threshold is the same as the first wave detected by the current reference first wave threshold, but the absolute time difference generated by the change in fluid wave velocity just triggers the set condition, and an improper first wave detection threshold is set.
[0031] Specifically, 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 between the transmission wave period are less than or equal to the first preset value, the first wave detected by the current adjusted first wave threshold and the first wave detected by the current reference first wave threshold are not the same wave, so the absolute difference between the two first wave arrival times is close to the transmission wave period, and the absolute difference between the absolute difference between the two first wave arrival times and the transmission wave period must be less than half of the transmission wave period. If the first wave detected by the current adjusted first wave threshold and the first wave detected by the current reference first wave threshold are the same wave, but the difference between the two first wave arrival times is caused by the change in wave speed, and the absolute difference between the two first wave arrival times is much less than half of the transmission wave period, the absolute difference between the absolute difference between the two first wave arrival times and the transmission wave period must be greater than half of the transmission wave period.
[0032] Based on the above method for setting the first wave detection threshold, the steps of the above method can be re-executed periodically or at each startup to set the first wave detection threshold, thereby realizing rapid setting of the adaptive first wave threshold.
[0033] 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 includes: Based on the first wave arrival time corresponding to the first wave threshold after the current adjustment, the first wave propagation time corresponding to the first wave threshold after the current adjustment is obtained, and used as the target time; Detecting the echo signal based on the first wave detection threshold, and obtaining the first wave propagation time corresponding to the first wave detection threshold; 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, resetting the first wave detection threshold; The second preset value is greater than or equal to half of the transmission wave period.
[0034] Illustratively, when the first wave detection threshold is set, the first wave propagation time corresponding to the currently adjusted first wave threshold is also used as the target time. When measuring the normal fluid flow rate, 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 reset.
[0035] Explanatory, 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 means that the echo signal has changed, resulting in the first wave detected by the first wave detection threshold no longer being the target wave. At this time, the first wave detection threshold needs to be reset.
[0036] Explanatory, the setting logic of the second preset value is consistent with the first preset value, and the two may be the same or different. Exemplarily, the second preset value is set to half of the transmission wave period.
[0037] 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 reset, 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 a second preset value, the first wave detection threshold is reset based on the magnitude relationship between the first wave propagation time corresponding to the first wave detection threshold and the target time.
[0038] Illustratively, the first wave detection threshold value may be reset by gradually increasing the first wave propagation time of the echo signal from the initial value of the first wave threshold value as in the steps of the aforementioned method, until the first wave propagation time substantially matches the target time. The first wave detection threshold value may also be reset by a more preferred solution, that is, the first wave detection threshold value may be reset based on the magnitude relationship between the first wave propagation time corresponding to the first wave detection threshold value and the target time, so that the first wave detection threshold value may be corrected quickly.
[0039] In one embodiment of the present specification, resetting the first wave detection threshold based on the magnitude relationship between the first wave propagation time corresponding to the first wave detection threshold and the target time includes: 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; Detect the echo signal based on the current first correction value, and obtain the first wave propagation time corresponding to 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 less than or equal to the second preset value, the first wave propagation time corresponding to the current first correction value is used as the new target time, and the first wave detection threshold is set 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, 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; If the first wave propagation time corresponding to the first wave detection threshold is greater than the target time: The first wave detection threshold is reduced 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 the first wave propagation time corresponding to 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 less than or equal to the second preset value, the first wave propagation time corresponding to the current second correction value is used as the new target time, and the first wave detection threshold is set 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, the current second correction value is reduced by the second correction preset value to obtain the latest second correction value, and the step of detecting the echo signal based on the current second correction value to obtain the first wave propagation time corresponding to the current second correction value is returned.
[0040] 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, first determine the size relationship between the first wave propagation time corresponding to the first wave detection threshold and the target time. If the first wave propagation time corresponding to the first wave detection threshold is less than the target time, it means that the echo signal is enhanced, and the first wave detected by the first wave detection threshold is the wave before the target wave; if the first wave propagation time corresponding to the first wave detection threshold is greater than the target time, it means that the echo signal is attenuated, and the first wave detected by the first wave detection threshold is the wave after the target wave. Then select the correction method according to different situations.
[0041] When the first wave propagation time corresponding to the first wave detection threshold is less than the target time, the first wave detection threshold is used as a reference, and the first correction preset values are sequentially increased, and the first wave propagation time corresponding to each of the first correction values is 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 first wave detection threshold is set with the last first correction value.
[0042] When the first wave propagation time corresponding to the first wave detection threshold is greater than the target time, the second correction preset value is reduced in sequence based on the first wave detection threshold, and the first wave propagation time corresponding to each of the first wave propagation times is obtained by using a series of second correction values. 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 first wave detection threshold is set with the last second correction value.
[0043] Explanatory, because the echo signal will not change very much, and it is highly likely that the first wave detected by the first wave detection threshold will only deviate from the target wave by one wave, it is not selected to detect the first wave propagation time of the echo signal by gradually increasing the initial value of the first wave threshold until the first wave propagation time basically coincides with the target time and then reset the first wave detection threshold. Instead, 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 propagation time corresponding to the first wave detection threshold at this time is used as the benchmark, and the benchmark is corrected according to the size relationship between the first wave propagation time and the target time, which greatly speeds up the time for resetting the first wave detection threshold and restores the normal metering fluid flow rate as soon as possible.
[0044] Illustratively, in general, the fluctuation of the echo signal is attenuated, and enhancement rarely occurs. The first correction preset value, the second correction preset value, and the preset increment may be equal or different, 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.
[0045] In one embodiment of the present specification, adjusting the current reference first wave threshold according to a preset increment to obtain the current adjusted first wave threshold includes: If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than the transmission 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 adjusted first wave threshold; If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is greater than the transmission wave period, the preset increment is multiplied, and the current benchmark first wave threshold is reduced by the multiplied preset increment to obtain the current adjusted first wave threshold.
[0046] Illustratively, whenever the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the current adjusted first wave threshold and the absolute time difference of the transmission wave period are greater than a first preset value, the current adjusted first wave threshold will be used as the latest benchmark first wave threshold, and the steps of detecting the echo signal based on the current benchmark first wave threshold and obtaining the first wave arrival time corresponding to the current benchmark first wave threshold will be re-executed, and then the current benchmark first wave threshold will be adjusted according to the preset increment to obtain the current adjusted first wave threshold.
[0047] Explanatory, before adjustment, first determine the relationship between the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold and the size of the transmission wave period.
[0048] When it is less than, it corresponds to the situation that the first waves detected by the two first wave thresholds before and after the previous adjustment are the same wave or adjacent waves. If the first waves are the same wave, it means that the effect of the previous adjustment is not obvious. If the first waves are adjacent waves but adjustment is still required at this time, it means that the first wave detected at this time is still in a relatively early starting wave and does not meet the set conditions. Therefore, this adjustment first doubles the preset increment, and adds the doubled preset increment to the current benchmark first wave threshold to obtain the current adjusted first wave threshold. Each subsequent time the above situation is met, the preset increment is further doubled, which can effectively reduce the invalid adjustment steps in the first few times when the initial preset increment is set very small.
[0049] When it is greater than, it corresponds to the previous over-adjustment, resulting in the first wave detected by the two first wave thresholds being at least one wave apart. Since the preset increment was doubled many times before, resulting in excessive adjustment, the preset increment is first doubled in this adjustment, and the doubled preset increment is reduced by the current benchmark first wave threshold to obtain the current adjusted first wave threshold. If the above situation is still met in the future, the preset increment is further doubled, and the preset increment that is too large after multiple doublings is gradually reduced, and the threshold part skipped due to the previous adjustment is supplemented for detection.
[0050] By coordinating the doubling and subtraction of the preset increment, the number of times the first wave threshold is adjusted is greatly reduced, and the first wave detection threshold that meets the conditions is obtained more quickly.
[0051] In one embodiment of the present specification, 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 previous current reference first wave threshold is less than the transmission 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, including: If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than half of the transmission wave period, the preset increment is doubled, and the current benchmark first wave threshold is increased by the doubled preset increment to obtain the current adjusted first wave threshold; If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark 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 preset increment is increased by the current benchmark first wave threshold to obtain the current adjusted first wave threshold.
[0052] Explanatory, for the specific two cases where the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than the transmission wave period, further distinction is made: The absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than half of the transmission wave period, corresponding to the situation where the two first waves are the same wave, indicating that the first wave before and after the adjustment has not changed, and the adjustment speed can be accelerated by doubling the preset increment.
[0053] The absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than the transmission wave period, but greater than half of the transmission wave period, corresponding to the situation where the two first waves are adjacent waves, indicating that the first waves before and after the adjustment have changed. It is judged that the preset increment is large enough, and the preset increment is no longer doubled, so as to avoid excessive adjustment next time.
[0054] In one embodiment of the present specification, setting the first wave detection threshold based on the current adjusted first wave threshold includes: Obtain the upper limit of the first wave detection threshold based on the currently adjusted first wave threshold; Obtain the lower limit of the first wave detection threshold based on the current adjusted first wave threshold; The first wave detection threshold is set based on the first wave detection threshold upper limit and the first wave detection threshold lower limit.
[0055] Explanatory, the method of setting the first wave detection threshold can be to directly set it to the current adjusted first wave threshold, but because the current adjusted first wave threshold corresponding to the set condition is obtained by adding a preset increment to the current baseline first wave threshold, the current adjusted first wave threshold is very close to the peak amplitude of the wave before the target wave, and it is easy to cause the detected first wave to be the wave before the target wave due to a small fluctuation of the echo signal, causing the measurement result of the fluid flow rate to deviate. The first wave detection threshold can be reset through a more preferred scheme, that is, after determining the current adjusted first wave threshold, further determine the approximate situation of the peak amplitude corresponding to the target wave and the wave before the target wave, and select the middle point of the peak amplitude of the two as the first wave detection threshold, then the echo signal needs a larger change to cause the detected first wave to change, that is, the wave jumping phenomenon, thereby avoiding the failure of the first wave detection threshold, and can also greatly reduce the frequency of resetting the first wave detection threshold.
[0056] Specifically, obtaining the upper limit of the first wave detection threshold based on the currently adjusted first wave threshold includes: Using the current adjusted first wave threshold as the initial value of the first test value; Adding the first test preset value to the current first test value to obtain the current adjusted first test value; Detect the echo signal based on the current adjusted first test value, and obtain the first wave arrival time corresponding to the current adjusted first test value; 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 adding the first test preset value is returned.
[0057] Explanatory, the current adjusted first wave threshold is used as the initial value, and the first test preset value is increased gradually. The first wave arrival time corresponding to each first test value is obtained respectively, and the absolute difference of the first wave arrival time of two adjacent first test values is compared with the third preset value. If the absolute difference of the first wave arrival time of two adjacent first test values is greater than the third preset value, it means 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 these two adjacent first test values, such as taking the average value, and ending the test. Otherwise, the first test preset value is increased again to obtain the next first test value and repeat the above steps.
[0058] Specifically, obtaining the lower limit of the first wave detection threshold based on the currently adjusted first wave threshold includes: Using the current adjusted first wave threshold as the initial value of the second test value; Subtracting the second test preset value from the current second test value to obtain the current adjusted second test value; Detect the echo signal based on the current adjusted second test value, and obtain the first wave arrival time corresponding to the current adjusted second test value; 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, the first wave detection threshold lower limit 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 used as the latest second test value, and the step of obtaining the current adjusted second test value by subtracting the second test preset value from the current second test value is returned; Explanatory, the current adjusted first wave threshold is used 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 two adjacent second test values is compared with the fourth preset value. If the absolute difference of the first wave arrival time of two adjacent second test values is greater than the fourth preset value, it means that the peak amplitude of the previous wave of the target wave is between the two adjacent second test values. The lower limit of the first wave detection threshold is obtained from these two adjacent second test values, and the average value is taken, and the test is terminated. Otherwise, the second test preset value is reduced again to obtain the next second test value and repeat the above steps.
[0059] Illustratively, the first test preset value and the second test preset value are both smaller 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 transmission wave period.
[0060] Illustratively, the test steps corresponding to taking the currently adjusted first-wave threshold as the initial value of the first test value and the test steps corresponding to taking the currently adjusted first-wave threshold as the initial value of the second test value 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.
[0061] The above is a description of a specific embodiment of the 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, multitasking and parallel processing are also possible or may be advantageous.
[0062] See next Figure 3 , Figure 3 A schematic diagram of the structure of a system for setting a first wave detection threshold of an ultrasonic flow meter provided in an embodiment of the present specification is shown.
[0063] like Figure 3 As shown, a system 400 for setting a first wave detection threshold of an ultrasonic flow meter 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; An acquisition module 301 acquires an initial value of a first wave threshold and a transmission wave period of a transmission signal, and uses the initial value of the first wave threshold as a reference first wave threshold; The first detection module 302 detects the echo signal based on the current reference first wave threshold value and obtains the first wave arrival time corresponding to the current reference first wave threshold value; The threshold adjustment module 303 adjusts the current reference first wave threshold according to a preset increment to obtain a current adjusted first wave threshold; The second detection module 304 detects the echo signal based on the current adjusted first wave threshold value, and obtains the first wave arrival time corresponding to the current adjusted first wave threshold value; The setting module 305 sets the first wave detection threshold based on the current adjusted first wave threshold 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 between the transmission wave period and the first wave arrival time are less than or equal to the first preset value; The acquisition module 301 uses the current adjusted first wave threshold as the latest reference first wave threshold 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 between the transmission wave period and the transmission wave period are greater than a first preset value.
[0064] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences 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 relevant parts can be referred to the partial description of the setting method embodiment.
[0065] See also Figure 4 A schematic diagram of the structure of an ultrasonic flow meter provided in an embodiment of this specification is shown.
[0066] like Figure 4 As shown, the ultrasonic flow meter 400 includes a first wave threshold setting module 401 and a metering module 402; The first wave threshold setting module 401 adopts the above-mentioned method for setting the first wave detection threshold of an ultrasonic flow meter to set the first wave detection threshold; The metering module 402 calculates the fluid flow rate based on the set first wave detection threshold.
[0067] The embodiments of this specification also provide a computer-readable storage medium, which stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps in the above-mentioned setting method embodiment. If the component modules of the above-mentioned electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
[0068] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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 the computer, the process or function according to the embodiment of this specification is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. Available media may be magnetic media (eg, floppy disks, hard disks, tapes), optical media (eg, digital versatile discs (DVD)), or semiconductor media (eg, solid state drives (SSD)).
[0069] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes. In the absence of conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.
[0070] The above embodiments are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Without departing from the design spirit of this specification, various modifications and improvements made to the technical solutions of this specification by ordinary technicians in this field should fall within the scope of protection determined by the claims of this specification.
Claims
1. A method for setting a first wave detection threshold of an ultrasonic flow meter, characterized in that: include: Obtaining an initial value of the first wave threshold and a transmission wave period of the transmission signal, and using the initial value of the first wave threshold as a reference first wave threshold; Detect the echo signal based on the current reference first wave threshold, and obtain the first wave arrival time corresponding to the current reference first wave threshold; Adjusting the current benchmark first-wave threshold according to a preset increment to obtain a current adjusted first-wave threshold; Detect the echo signal based on the currently adjusted first wave threshold, and obtain the first wave arrival time corresponding to the currently adjusted first wave threshold; 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 between the transmission wave period and the first wave arrival time are greater than the first preset value, the current adjusted first wave threshold is used as the latest reference first wave threshold, and the method returns to the step of detecting the echo signal based on the current reference first wave threshold and obtaining the first wave arrival time corresponding to the current reference first wave threshold; 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 between the transmission wave period and the first wave detection threshold are less than or equal to the first preset value, the first wave detection threshold is set based on the current adjusted first wave threshold.
2. The method for setting the first wave detection threshold of an ultrasonic flowmeter according to claim 1, characterized in that: The method further includes setting the first wave detection threshold based on the currently adjusted first wave threshold: Based on the first wave arrival time corresponding to the first wave threshold after the current adjustment, the first wave propagation time corresponding to the first wave threshold after the current adjustment is obtained, and used as the target time; Detecting the echo signal based on the first wave detection threshold, and obtaining the first wave propagation time corresponding to the first wave detection threshold; 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 reset.
3. The method for setting the first wave detection threshold of an ultrasonic flowmeter according to claim 2, characterized in that: 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 reset, 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 a second preset value, the first wave detection threshold is reset based on the magnitude relationship between the first wave propagation time corresponding to the first wave detection threshold and the target time.
4. The method for setting the first wave detection threshold of an ultrasonic flowmeter according to claim 3, characterized in that: The resetting of the first wave detection threshold based on the magnitude relationship between the first wave propagation time corresponding to the first wave detection threshold and the target time includes: 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; Detect the echo signal based on the current first correction value, and obtain the first wave propagation time corresponding to 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 less than or equal to the second preset value, the first wave propagation time corresponding to the current first correction value is used as the new target time, and the first wave detection threshold is set 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, 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; If the first wave propagation time corresponding to the first wave detection threshold is greater than the target time: The first wave detection threshold is reduced 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 the first wave propagation time corresponding to 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 less than or equal to the second preset value, the first wave propagation time corresponding to the current second correction value is used as the new target time, and the first wave detection threshold is set 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, the current second correction value is reduced by the second correction preset value to obtain the latest second correction value, and the step of detecting the echo signal based on the current second correction value to obtain the first wave propagation time corresponding to the current second correction value is returned.
5. The method for setting the first wave detection threshold of an ultrasonic flowmeter according to claim 1, characterized in that: The step of adjusting the current reference first-wave threshold according to the preset increment to obtain the current adjusted first-wave threshold includes: If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than the transmission 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 adjusted first wave threshold; If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is greater than the transmission wave period, the preset increment is multiplied, and the current benchmark first wave threshold is reduced by the multiplied preset increment to obtain the current adjusted first wave threshold.
6. The method for setting the first wave detection threshold of an ultrasonic flowmeter according to claim 5, characterized in that: If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than the transmission 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 adjusted first wave threshold, including: If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark first wave threshold is less than half of the transmission wave period, the preset increment is doubled, and the current benchmark first wave threshold is increased by the doubled preset increment to obtain the current adjusted first wave threshold; If the absolute time difference between the first wave arrival time corresponding to the current benchmark first wave threshold and the first wave arrival time corresponding to the previous current benchmark 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 preset increment is increased by the current benchmark first wave threshold to obtain the current adjusted first wave threshold.
7. The method for setting the first wave detection threshold of an ultrasonic flowmeter according to claim 1, characterized in that: The step of setting the first wave detection threshold based on the currently adjusted first wave threshold includes: Obtain the upper limit of the first wave detection threshold based on the currently adjusted first wave threshold; Obtain the lower limit of the first wave detection threshold based on the current adjusted first wave threshold; The first wave detection threshold is set based on the first wave detection threshold upper limit and the first wave detection threshold lower limit.
8. The method for setting the first wave detection threshold of an ultrasonic flowmeter according to claim 7, characterized in that: The obtaining of the upper limit of the first wave detection threshold based on the currently adjusted first wave threshold includes: Using the current adjusted first wave threshold as the initial value of the first test value; Adding the first test preset value to the current first test value to obtain the current adjusted first test value; Detect the echo signal based on the current adjusted first test value, and obtain the first wave arrival time corresponding to the current adjusted first test value; 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 first wave detection threshold upper limit 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 adding the first test preset value is returned to; The step of obtaining the lower limit of the first wave detection threshold based on the currently adjusted first wave threshold includes: Using the current adjusted first wave threshold as the initial value of the second test value; Subtracting the second test preset value from the current second test value to obtain the current adjusted second test value; Detect the echo signal based on the current adjusted second test value, and obtain the first wave arrival time corresponding to the current adjusted second test value; 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, the first wave detection threshold lower limit 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 used as the latest second test value, and the step of obtaining the current adjusted second test value by subtracting the second test preset value from the current second test value is returned; Wherein, the first test preset value and the second test preset value are both smaller than the preset increment.
9. A system for setting the first wave detection threshold of an ultrasonic flow meter, characterized in that: It 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); The acquisition module (301) acquires the initial value of the first wave threshold and the transmission wave period of the transmission signal, and uses the initial value of the first wave threshold as the reference first wave threshold; The first detection module (302) detects the echo signal based on the current reference first wave threshold value, and obtains the first wave arrival time corresponding to the current reference first wave threshold value; The threshold adjustment module (303) adjusts the current reference first wave threshold according to a preset increment to obtain a current adjusted first wave threshold; The second detection module (304) detects the echo signal based on the currently adjusted first wave threshold value, and obtains the first wave arrival time corresponding to the currently adjusted first wave threshold value; The setting module (305) sets the first wave detection threshold based on the current adjusted 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 time difference of the transmission wave period are less than or equal to a first preset value; The acquisition module (301) uses the current adjusted first wave threshold as the latest 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 time difference of the transmission wave period are greater than a first preset value.
10. An ultrasonic flow meter, characterized in that: It includes a first wave threshold setting module (401) and a metering module (402); The first wave threshold setting module (401) adopts the method for setting the first wave detection threshold of an ultrasonic flow meter according to any one of claims 1 to 8 to set the first wave detection threshold; The metering module (402) calculates the fluid flow rate based on a set first wave detection threshold.
Citation Information
Patent Citations
Acoustic-wave transmitting system for automatically controlling the deflection of acoustic beam by phase-shift method
CN1031283A
Method for calculating head wave threshold of transducers based on direct-reading ultrasonic flowmeter
CN110617859A
Head wave detection threshold setting method for ultrasonic flow metering device
CN115993158A
Ultrasonic head wave positioning method and system
CN117804557A
Ultrasonic flowmeter
JP2014048062A