Automatic adjustment method of first wave detection voltage threshold of ultrasonic flowmeter

By dynamically adjusting the first-wave trigger voltage threshold and fine-tuning mechanism of the ultrasonic flowmeter, the signal amplitude instability and noise interference problems caused by the fixed voltage threshold are solved, and high-precision flow velocity measurement and stability are achieved under complex working conditions.

CN119124319BActive Publication Date: 2025-10-10LUOMEITE (ZHEJIANG) INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411358482.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-10-10
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

When facing complex working conditions, the existing ultrasonic flowmeters suffer from signal amplitude instability and noise interference caused by the fixed voltage threshold method, resulting in large first-wave identification errors, affecting measurement accuracy and stability.

Method used

By dynamically monitoring the peak value of the ultrasonic receiving signal and adjusting the first-wave trigger voltage threshold, combined with the fine-tuning mechanism of the front and back wave jumping phenomenon, it ensures accurate identification of the first-wave signal under different working conditions and reduces false triggering and missed triggering.

Benefits of technology

The accuracy and anti-interference ability of flow rate measurement are improved, ensuring stable performance in complex environments and meeting high-precision measurement needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119124319B_ABST
    Figure CN119124319B_ABST
Patent Text Reader

Abstract

The application discloses an ultrasonic flowmeter first-wave detection voltage threshold automatic adjustment method and relates to the technical field of flow rate measurement. The method dynamically detects and adjusts the peak value size and wave jumping phenomenon of a received signal, ensures that the ultrasonic flowmeter accurately identifies the first wave and performs flow rate measurement under complex working conditions, and comprises the following steps: S101, initializing the peak value acquisition circuit, the adjustable potentiometer, the logic control circuit, the first-wave trigger and the zero-crossing control circuit of the system, and adjusting the amplifier gain. The application dynamically monitors the peak value of the ultrasonic wave received signal and adjusts the first-wave trigger voltage threshold, significantly improves the accuracy of flow rate measurement, reduces the false triggering and missed triggering caused by the fixed threshold, reduces the measurement error, improves the measurement accuracy, introduces the front and rear wave jumping fine adjustment mechanism to ensure the reliable identification of the first-wave signal, prevents measurement failure, enables the ultrasonic flowmeter to stably work in the dynamically changing industrial environment, and meets the high-precision measurement requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flow velocity measurement, and in particular to a method for automatically adjusting a first-wave detection voltage threshold of an ultrasonic flowmeter. Background Art

[0002] Ultrasonic flowmeters are widely used in gas and liquid metering, particularly in gas metering and water utilities. They are gaining increasing attention due to their unique advantages, such as wide rangeability, extremely low starting flow, lack of mechanical rotating parts, and minimal maintenance. With the advancement of low-power electronic technology, modern ultrasonic flowmeters are mostly battery-powered to meet the needs of city gas and water metering. Ultrasonic flowmeters primarily measure flow velocity by measuring the difference in the forward and reverse propagation time of an ultrasonic wave through a fluid medium. This measurement method, often referred to as the transit time method, is the basis for most ultrasonic flowmeters currently on the market. The operating principle of an ultrasonic flowmeter is that a transmitting transducer emits an ultrasonic signal, which travels through the medium (gas or liquid) and is received by a receiving transducer. The propagation time of the ultrasonic wave in both the forward and reverse directions is affected by the fluid's flow velocity, and this transit time difference serves as the basis for measuring flow velocity. In actual use, the zero-crossing detection method is used to identify the first wave of the received signal, that is, a fixed voltage threshold trigger circuit is used to judge the first wave, and the subsequent zero-crossing detection circuit is started by this trigger signal to calculate the duration of the ultrasonic wave in the forward and reverse directions, thereby measuring the flow rate of the fluid.

[0003] The existing technology has the following deficiencies:

[0004] Currently, most ultrasonic flowmeters use a fixed voltage threshold first wave detection method. That is, when the amplitude of the received signal exceeds or falls below the set voltage threshold, a comparator generates a trigger signal to identify the first wave. However, as environmental conditions change and the amplitude of the amplified signal becomes unstable, the fixed voltage threshold method will lead to two problems:

[0005] The received signal amplitude is too large or too small: When the signal amplitude is too large and the voltage threshold is too low, the device may be falsely triggered before the first wave is detected, resulting in wave skipping. Conversely, when the signal amplitude is too small and the voltage threshold is too high, the first wave may not be effectively identified, resulting in detection failure.

[0006] Differences in signal-to-noise ratio: When the signal-to-noise ratio is poor, interference from noise signals can increase first-wave identification errors, leading to inaccurate measurements or even malfunction. This is particularly evident in complex operating conditions, especially when faced with various turbulent flows, pipeline noise, and ambient electromagnetic radiation. Signal quality is poor, and fixed voltage threshold triggering methods struggle to cope with signal fluctuations and noise interference.

[0007] The above information disclosed in the background section is only for the purpose of enhancing the understanding of the background of the present disclosure and, therefore, it can include information that does not constitute the prior art known to those of ordinary skill in the art. SUMMARY

[0008] The purpose of the present application is to provide an ultrasonic flowmeter first wave detection voltage threshold automatic adjustment method, which significantly improves the accuracy of flow rate measurement by dynamically monitoring the peak value of the ultrasonic receiving signal and adjusting the first wave trigger voltage threshold. This mechanism can adapt to the changes of signal amplitude under different working conditions, reduce the false trigger and missed trigger caused by fixed threshold, thereby reducing the measurement error, improving the measurement accuracy, and reducing the disputes caused by inaccurate measurement. In addition, the system enhances the anti-interference ability and can effectively filter the influence of external noise, accurately identifies the first wave signal under low signal-to-noise ratio conditions, and ensures stable performance in complex environments. At the same time, the present application introduces a fine-tuning mechanism based on the phenomenon of front and back jump waves, further improving the adaptability to the changes of signal waveform. By detecting the jump wave condition and adjusting the trigger voltage in time, this mechanism ensures the reliable identification of the first wave signal and prevents measurement failure, so that the ultrasonic flowmeter can work stably in the dynamic industrial environment and meet the needs of high-precision measurement and real-time response to solve the problems in the background.

[0009] In order to achieve the above purpose, the present application provides the following technical scheme: an ultrasonic flowmeter first wave detection voltage threshold automatic adjustment method, which dynamically detects and adjusts the peak value of the received signal and the jump wave phenomenon to ensure that the ultrasonic flowmeter accurately identifies the first wave and measures the flow rate under complex working conditions. The method comprises the following steps:

[0010] S101, initializing the peak value acquisition circuit, adjustable potentiometer, logic control circuit, first wave trigger and zero crossing control circuit of the system, and adjusting the amplifier gain;

[0011] S102, amplifying the received signal by the amplifier and collecting the highest peak value, judging whether the peak value is within the preset range, and calculating the first wave trigger voltage threshold according to the peak value;

[0012] S103, adjusting the resistance value of the adjustable potentiometer to obtain the trigger voltage corresponding to the voltage threshold;

[0013] S104, detecting the waveform of the received signal by the comparator to identify whether the front jump wave or the back jump wave phenomenon occurs;

[0014] S105, according to the detected front jump wave or back jump wave condition, further fine-tuning the voltage threshold to ensure the minimization of the jump wave phenomenon, and obtaining the accurate first wave detection voltage threshold.

[0015] Preferably, the amplifier gain is adjusted, specifically:

[0016] The amplifier is an amplifier with automatic gain control function. The microprocessor adjusts the gain of the amplifier during initialization. If the amplifier gain is G1 and the amplitude of the amplified signal is V1, and the target amplitude is V0, the gain needs to be adjusted to: ,According to the calculated gain G, the microprocessor adjusts the amplifier with AGC function to amplify the signal.

[0017] Preferably, the received signal is amplified by an amplifier and its highest peak value is collected to determine whether the peak value is within a preset range. The specific steps are as follows:

[0018] The microprocessor compares the collected highest wave peak value with the preset signal amplitude range. If the peak value is within the range, the signal amplitude meets the requirements and the system enters the subsequent first-wave trigger voltage calculation and adjustment steps; if it is not within the signal amplitude range, the system will readjust the amplifier gain to ensure that the signal amplitude is within the set range, thereby ensuring the stability and reliability of the received signal.

[0019] Preferably, the first wave trigger voltage threshold is calculated according to the peak value, and the specific steps are as follows:

[0020] The first wave trigger voltage threshold Vth is calculated according to the peak value of the received signal using the formula: , where C is the proportional coefficient, which is a constant between 0.11 and 0.15. It is the peak value. The proportional coefficient is set according to the system hardware characteristics and the number of excitation waves to ensure that the trigger voltage is adjusted proportionally to the amplitude of the received signal, so that the trigger voltage can adapt to complex working conditions and reduce the impact of wave hopping on the measurement results.

[0021] Preferably, the resistance value of the adjustable potentiometer is adjusted to obtain a trigger voltage corresponding to the voltage threshold, and the specific steps are as follows:

[0022] The microprocessor adjusts the resistance value R2 of the adjustable potentiometer through a voltage divider circuit according to the calculated trigger voltage Vth. The voltage divider circuit consists of a reference voltage source Vref, a resistor R1, and an adjustable potentiometer. The calculation formula of the resistance value R2 is: ,According to this formula, the microprocessor adjusts the resistance value of the ,adjustable potentiometer so that the voltage output by the voltage divider ,circuit matches the calculated trigger voltage Vth, ensuring that the trigger voltage threshold ,accurately corresponds to the amplitude of the received signal, thereby achieving ,accurate triggering of the first wave;

[0023] The positive and negative input terminals of the comparator are connected to the received signal and the first-wave trigger voltage threshold Vth respectively. When the amplitude of the received signal exceeds the first-wave trigger voltage threshold, the comparator outputs a trigger signal and starts the first-wave trigger and zero-crossing detection circuit. The system then detects the zero point position of the received signal and outputs several square wave signals. The square wave signal is used to calculate the forward and reverse duration of the ultrasonic wave. By calculating the difference between the forward and reverse durations, the accurate fluid flow rate is obtained.

[0024] Preferably, the specific steps of detecting the waveform of the received signal by a comparator and identifying the pre-hop or post-hop phenomenon are:

[0025] The received signal is amplified by the amplifier and then enters the comparator. The two input terminals of the comparator receive the amplified signal and the first wave trigger voltage threshold Vth respectively. When the instantaneous value of the received signal exceeds the threshold Vth for the first time, the comparator outputs a trigger signal, which starts the zero-crossing comparator (which can be a forward or reverse zero-crossing comparison) and marks the moment of the first zero-crossing point as , as the first wave zero-crossing trigger point;

[0026] The system continuously monitors the waveform of the received signal and records the trigger point After that, the system continues to track the first zero-crossing time after the highest peak of the received signal, and calculates the time difference between the highest waveform peak and the first wave zero-crossing trigger point. The time difference is the time required for the received signal to pass through zero from the first wave to the first zero point after the received wave reaches its maximum value. It is used to determine the wave jumping phenomenon. The calculation expression of the time difference is: ,in, It is the time point when the first zero crossing occurs after the highest peak. It is the time of the first wave zero-crossing trigger point;

[0027] The time difference within the predetermined reference threshold Compare (where It is related to the number of excitation waves and the hardware circuit), and determines whether the signal waveform has a wave jump phenomenon. If the time difference If it is too small, it means that the signal is triggered too early, that is, the pre-jump wave phenomenon occurs; if the time difference If it is too large, it means that the signal is triggered too late, and a post-jump wave phenomenon occurs, which is specifically expressed as: ,in, and The minimum and maximum values ​​of the predetermined reference threshold range are used to determine whether a wave hopping phenomenon exists.

[0028] Preferably, based on the detected pre-wave phenomenon, when a parasitic wave appears before the first wave of the received signal and the amplitude of the parasitic wave is close to or exceeds the first wave trigger voltage threshold Vth, the microprocessor increases the first wave trigger voltage threshold Vth by 1 / 4 each time according to the number of wave jumps. , The adjustment range is 20mV to 30mV. The fine-tuning mechanism gradually increases the voltage threshold to eliminate the pre-jump phenomenon, ensuring the accuracy of the measurement signal and the stability of the system.

[0029] Preferably, based on the detected post-wave jump phenomenon, when the amplitude of the first wave of the received signal is lower than the first wave trigger voltage threshold Vth and the first wave cannot be effectively triggered, the microprocessor reduces the first wave trigger voltage threshold Vth by 1% each time according to the number of wave jumps. , The adjustment range is 20mV to 30mV. By lowering the first-wave trigger voltage threshold, the system can ensure stable operation under low-amplitude signals.

[0030] Preferably, the adjustment process of the first-wave trigger voltage threshold Vth allows for up to two fine adjustments to reduce the consumption of system resources and improve efficiency. After two fine adjustments, if the wave jumping phenomenon still exists, the system will restart the signal amplifier gain adjustment process and re-adjust the amplitude of the received signal to ensure the reliability of subsequent measurements and low-power operation of the system.

[0031] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0032] This invention significantly improves the accuracy of flow rate measurement by real-time monitoring of the peak value of the ultrasonic received signal and dynamically adjusting the first-wave trigger voltage threshold. Under different operating conditions, the amplitude of the ultrasonic signal will vary due to changes in the medium, flow rate, temperature, and pressure. Dynamic adjustment of the trigger voltage ensures that the system responds promptly when the signal amplitude exceeds or falls below the set range. This adaptive mechanism effectively reduces false triggering and missed triggering caused by fixed thresholds, thereby reducing measurement errors, improving overall measurement accuracy, and ultimately reducing trade disputes caused by inaccurate measurement. This invention enhances the system's anti-interference capabilities, particularly in complex operating environments where external noise (such as electromagnetic interference and pipeline noise) often affects signal quality. Through dynamic adjustment based on the signal peak value, the system can effectively filter out the effects of noise, ensuring accurate identification of the first-wave signal even under low signal-to-noise ratio conditions. This feature enables ultrasonic flowmeters to maintain stable performance and reliable measurement results in unstable environments, meeting the needs of modern industry for high-precision measurement.

[0033] The present invention introduces a fine-tuning mechanism based on the front and back wave jump phenomenon, which significantly enhances the system's adaptability to changes in signal waveforms. By detecting the front and back wave jumps in the steps, the system can determine whether the currently set trigger voltage is reasonable, and make timely fine-tuning according to the wave jump situation. The flexible adjustment mechanism ensures that the trigger voltage can adapt quickly under a variety of complex signal conditions, thereby ensuring the reliable identification of the first wave signal. Even when the amplitude of the received signal fluctuates greatly, the system can still maintain accuracy and ensure the stability of the measurement. At the same time, this fine-tuning mechanism improves the overall stability and reliability of the ultrasonic flowmeter. By effectively eliminating the negative impact of the wave jump phenomenon, the system can ensure the accuracy of the first wave detection and prevent measurement failures caused by wave jumps. This feature makes the ultrasonic flowmeter more reliable in practical applications, and can work continuously and stably in a changing industrial environment, meeting the high requirements for measurement accuracy and real-time response. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction to the drawings required for use in the embodiments will be given below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0035] Figure 1 This is a flow chart of the method for automatically adjusting the voltage threshold for first-wave detection of an ultrasonic flowmeter according to the present invention.

[0036] Figure 2 This is a block diagram of the signal processing principle of the ultrasonic flowmeter of the present invention.

[0037] Figure 3 Schematic diagram of the waveform of the ultrasonic flowmeter of the present invention.

[0038] Figure 4 Schematic diagram of the pre-hop wave of the present invention.

[0039] Figure 5 Schematic diagram of post-wave hopping according to the present invention. DETAILED DESCRIPTION

[0040] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.

[0041] The present invention provides Figures 1 to 5The method for automatically adjusting the voltage threshold for first wave detection of an ultrasonic flowmeter described above ensures that the ultrasonic flowmeter accurately identifies the first wave and performs flow velocity measurement under complex working conditions by dynamically detecting and adjusting the peak value and wave skipping phenomenon of the received signal. The method includes the following steps:

[0042] S101, initialize the system's peak acquisition circuit, adjustable potentiometer, logic control circuit, first wave trigger and zero-crossing control circuit, and adjust the amplifier gain;

[0043] The amplifier is an amplifier with automatic gain control function. The microprocessor adjusts the gain of the amplifier during initialization. If the amplifier gain is G1 and the amplitude of the amplified signal is V1, and the target amplitude is V0, the gain needs to be adjusted to: According to the calculated gain G, the microprocessor adjusts the amplifier with AGC function to amplify the signal. Due to the influence of various factors, the amplitude of the amplified signal will generally deviate from the target value V0, but it will generally be within the peak range; if it exceeds, it needs to be adjusted again. In order to reduce power consumption, the number of adjustments is generally limited to within 3 times.

[0044] S102, amplifying the received signal through an amplifier and collecting its highest peak value, determining whether the peak value is within a preset range, and calculating the first wave trigger voltage threshold based on the peak value;

[0045] The microprocessor compares the highest peak value collected with a preset signal amplitude range (usually set at 900mV to 1100mV). If the peak value is within this range, the signal amplitude meets the requirements, and the system proceeds to the subsequent first-wave trigger voltage calculation and adjustment steps. If it is not within this signal amplitude range, the system readjusts the amplifier gain to ensure that the signal amplitude is within the set range, thereby ensuring the stability and reliability of the received signal.

[0046] The first wave trigger voltage threshold Vth is calculated according to the peak value of the received signal using the formula: , where C is the proportional coefficient, which is a constant between 0.11 and 0.15. It is the peak value. The proportional coefficient is set according to the system hardware characteristics and the number of excitation waves to ensure that the trigger voltage is adjusted proportionally to the amplitude of the received signal, so that the trigger voltage can adapt to complex working conditions and reduce the impact of wave hopping on the measurement results.

[0047] S103, adjusting the resistance value of the adjustable potentiometer to obtain a trigger voltage corresponding to the voltage threshold;

[0048] The microprocessor adjusts the resistance value R2 of the adjustable potentiometer through the voltage divider circuit according to the calculated trigger voltage Vth. The voltage divider circuit consists of a reference voltage source Vref, a resistor R1 and an adjustable potentiometer. The calculation formula of the resistance value R2 is: According to this formula, the microprocessor adjusts the resistance value of the adjustable potentiometer to match the voltage output by the voltage divider circuit with the calculated trigger voltage Vth, ensuring that the trigger voltage threshold accurately corresponds to the amplitude of the received signal, thereby achieving accurate triggering of the first wave.

[0049] The comparator's positive and negative inputs are connected to the received signal and the first-wave trigger voltage threshold, Vth, respectively. When the received signal's amplitude exceeds the first-wave trigger voltage threshold, the comparator outputs a trigger signal, activating the first-wave trigger and zero-crossing detection circuits. The system then detects the zero point of the received signal and outputs several square wave signals. These square wave signals are used to calculate the forward and reverse durations of the ultrasonic wave. By taking the difference between the forward and reverse durations, an accurate fluid flow rate is obtained.

[0050] S104, detecting the waveform of the received signal through a comparator to identify whether a pre-hop or post-hop phenomenon occurs;

[0051] The received signal is amplified by the amplifier and then enters the comparator. The two input terminals of the comparator receive the amplified signal and the first wave trigger voltage threshold Vth respectively. When the instantaneous value of the received signal exceeds the threshold Vth for the first time, the comparator outputs a trigger signal, which starts the zero-crossing comparator (which can be a forward or reverse zero-crossing comparison) and marks the moment of the first zero-crossing point as , as the first wave zero-crossing trigger point;

[0052] The system continuously monitors the waveform of the received signal and records the trigger point After that, the system continues to track the first zero-crossing time after the highest peak of the received signal, and calculates the time difference between the highest waveform peak and the first wave zero-crossing trigger point. The time difference is the time required for the received signal to pass through zero from the first wave to the first zero point after the received wave reaches its maximum value. It is used to determine the wave jumping phenomenon. The calculation expression of the time difference is: ,in, It is the time point when the first zero crossing occurs after the highest peak. It is the time of the first wave zero-crossing trigger point;

[0053] The time difference within the predetermined reference threshold Compare (where It is related to the number of excitation waves and the hardware circuit), and determines whether the signal waveform has a wave jump phenomenon. If the time difference If it is too small, it means that the signal is triggered too early, that is, the pre-jump wave phenomenon occurs; if the time difference If it is too large, it means that the signal is triggered too late, and a post-jump wave phenomenon occurs, which is specifically expressed as: ,in, and The minimum and maximum values ​​of the predetermined reference threshold range are used to determine whether a wave hopping phenomenon exists.

[0054] S105, further fine-tuning the voltage threshold according to the detected pre-wave or post-wave jump to minimize the wave jump phenomenon and obtain an accurate first-wave detection voltage threshold;

[0055] Based on the detected pre-jump wave phenomenon, when a parasitic wave appears before the first wave of the received signal and the amplitude of the parasitic wave is close to or exceeds the first wave trigger voltage threshold Vth, the microprocessor increases the first wave trigger voltage threshold Vth by 100% each time according to the number of wave jumps. , The adjustment range is 20mV to 30mV. This fine-tuning mechanism gradually increases the voltage threshold to eliminate the pre-jump phenomenon, ensuring the accuracy of the measurement signal and the stability of the system.

[0056] Parasitic waves are undesirable waveforms or noise that appear alongside the primary signal in a signal waveform, typically occurring before the expected first wave. They are typically caused by external interference, equipment noise, or system oscillations, and their amplitude may approach or even exceed the system's set first wave trigger voltage threshold (Vth). If not distinguished, parasitic waves can easily be mistaken by the system for first wave signals, resulting in a pre-jump phenomenon—that is, premature first wave triggering. This erroneous triggering can affect the accuracy of the ultrasonic flowmeter and cause measurement errors. Therefore, when parasitic waves are detected, it is necessary to fine-tune the trigger voltage threshold (Vth) to avoid false triggering and ensure that the system can correctly identify the first wave and perform accurate measurements.

[0057] Based on the detected post-wave jump phenomenon, when the amplitude of the first wave of the received signal is lower than the first wave trigger voltage threshold Vth and the first wave cannot be effectively triggered, the microprocessor reduces the first wave trigger voltage threshold Vth by 1 / 4 of the first wave trigger voltage threshold Vth each time according to the number of wave jumps. , The adjustment range is 20mV to 30mV. By lowering the first-wave trigger voltage threshold, this method can effectively address the detection difficulties when the signal amplitude is small, ensuring the stable operation of the system under low-amplitude signals.

[0058] The first-wave trigger voltage threshold (Vth) is adjusted for up to two fine adjustments to reduce system resource consumption and improve efficiency. If signal hopping persists after two fine adjustments, the system restarts the signal amplifier gain adjustment process and recalibrates the received signal amplitude to ensure reliable subsequent measurements and low-power operation.

[0059] The specific implementation of the present invention is:

[0060] Before each test, the microprocessor initializes the peak acquisition circuit, adjustable potentiometer (digital or voltage control), logic control circuit, first wave trigger and zero-crossing control circuit, and enables the amplifier (PGA) and adjusts its gain; at the same time, after an appropriate delay, the microprocessor and logic control circuit control the enable comparator.

[0061] The received signal from the measurement channel's receiving transducer is amplified by a preset gain amplifier (PGA) to obtain the received signal. The received signal is then sampled by a peak acquisition circuit to obtain its highest signal peak. The microprocessor performs A / D conversion to read the peak value. If the peak value meets the required range, subsequent processing is performed. If it does not meet the requirements, the gain value is recalculated and the amplifier gain is adjusted until the received signal amplitude meets the required range. The upper and lower limits of the peak range of the received signal are set by software. The general signal amplitude range is 900mV to 1100mV, with a target value of V0 = 1000mV. The specific adjustment steps are as follows:

[0062] Assuming that the amplifier gain is G1 and the measured amplified signal amplitude is V1, and the target amplitude is required to be V0, the gain needs to be adjusted to: According to the calculated gain G, the microprocessor adjusts the amplifier with AGC function to amplify the signal. Due to the influence of various factors, the amplitude of the amplified signal will generally deviate from the target value V0, but it will generally be within the peak range; if it exceeds, it needs to be adjusted again. In order to reduce power consumption, the number of adjustments is generally limited to within 3 times.

[0063] After the peak value of the received signal meets the required range or is adjusted for the maximum number of times, the microprocessor obtains the first-wave trigger voltage threshold Vth according to the designed adjustment coefficient based on the size of the highest wave peak voltage obtained by AD sampling, and calculates the resistance value of the adjustable potentiometer and its corresponding control data or control voltage through the voltage divider network composed of the voltage source Vref (to ensure the stability of the trigger voltage, the voltage source Vref of the voltage divider circuit is provided by a voltage regulator chip LDO or a reference voltage chip with a small temperature coefficient), the resistor R1 and the resistance value R2 of the adjustable potentiometer, and controls the adjustable potentiometer to obtain the first-wave trigger voltage threshold Vth.

[0064] The positive and negative input terminals of the comparator are respectively input with the received signal and the first-wave trigger voltage threshold Vth. When the peak value of the leftmost signal (first wave) of the received signal is higher than the first-wave trigger voltage threshold Vth, the output signal level of the comparator changes (from high to low or from low to high). Thereafter, the first-wave trigger and zero-crossing control circuit quickly cuts the comparison potential of the reverse input terminal of the comparator to the AC zero potential. In this way, when the first waveform of the received signal is lower than the middle axis of the received signal (AC zero potential), the output level of the comparator is restored to the state before the first-wave trigger. That is, under the control of the first-wave trigger and zero-crossing control circuit and the logic control circuit, the comparator outputs a square wave signal. The square wave is used to control the first-wave trigger and zero-crossing control circuit to enable the comparator.

[0065] The positive and negative input terminals of the comparator are respectively connected to the received signal and the AC zero point. The first wave trigger and zero-crossing control circuit enables the comparator to perform zero-crossing comparison and output several square wave signals (see square wave signal) under the control of a square wave output by the comparator until the first wave trigger and zero-crossing control circuit turns off the comparator.

[0066] The timing circuit can obtain the forward and reverse duration of the ultrasonic wave and calculate the time difference by timing the time from the moment the excitation wave is emitted to the moment several rising edges or falling edges of the square wave signal are received, thereby realizing flow velocity measurement.

[0067] The processing method for adjusting the first wave trigger voltage threshold Vth based on the received signal amplitude is as follows:

[0068] The peak value acquisition circuit collects the received signal to obtain the highest peak voltage of the received signal (i.e. the highest signal amplitude, generally the 4th to 7th wave, which is related to the number of excitation waves). The highest peak voltage collected by the microprocessor AD is set as Vpp;

[0069] For the same circuit, since the first wave amplitude Vp1 of the received signal is substantially proportional to the peak value Vpp, the first wave trigger voltage threshold Vth is calculated using the following formula: , where C is the proportional coefficient, generally 0.11 to 0.15, which is related to the circuit and the number of excitation waves.

[0070] The first-wave trigger voltage is generated by a voltage divider circuit consisting of a voltage source Vref, a resistor R1, and an adjustable potentiometer. The microprocessor calculates the resistance value R2 of the adjustable potentiometer according to the voltage divider circuit and the first-wave trigger voltage threshold Vth as follows: .

[0071] The microprocessor controls the resistance value of the adjustable potentiometer to R2 according to the resistance value R2 and the characteristics of the adjustable potentiometer (which can be a digital potentiometer or a voltage-controlled potentiometer), so that the first wave trigger voltage threshold Vth of the inverting input terminal of the comparator can be obtained.

[0072] When the signal changes to a large amplitude and a small amplitude respectively, the first wave trigger voltage thresholds Vth1 and Vth2 are generated according to the above method, Vth1>Vth2 to meet the first wave triggering needs of the received signals with different amplitudes. Figure 2 and Figure 3 .

[0073] Analysis of the possible results if a fixed first wave trigger voltage threshold Vth is used:

[0074] When the amplitude of the received signal is large, there may be a parasitic wave with an amplitude slightly lower than the amplitude of the first wave before the first wave of the received signal. If the first wave trigger voltage threshold Vth is fixed and lower than the parasitic wave amplitude, a pre-jump wave will be generated. Figure 4 As shown;

[0075] When the amplitude of the received signal is too small, the amplitude of the first wave of the received signal is low. If the first wave trigger voltage threshold Vth is fixed and higher than the first wave amplitude, a post-jump wave will be generated. Figure 5 As shown;

[0076] The above wave jumps will lead to mismeasurement, huge measurement errors, and even failure to work normally.

[0077] The processing method of adjusting the first wave trigger voltage threshold Vth based on the number of previous and next jump waves:

[0078] Although the "processing method of adjusting the first-wave trigger voltage threshold Vth based on the received signal amplitude" can significantly reduce the probability of wave skipping, the possibility of pre- and post-wave skipping still exists. To further improve measurement reliability, the "processing method of fine-tuning the first-wave trigger voltage threshold Vth based on pre- and post-wave skipping" is further adopted. The specific steps are as follows:

[0079] If the medium conditions and working environment conditions are basically the same, the total forward and reverse transmission time of the ultrasonic wave in the same channel under different flow rates is basically unchanged. However, the medium conditions and working environment generally change slowly. By using this feature, it is possible to basically correctly judge whether a front jump or a back jump occurs during the detection process.

[0080] When it happens Figure 4 When the front jump wave is shown, it means that the received signal amplitude is still too high or the first wave trigger voltage threshold Vth is too low. The microprocessor increases Vth according to the number of jump waves. , but , where ΔVth=20mV~30mV, is the adjusted voltage threshold, which is related to the set signal peak range. If the pre-jump wave still exists after adjustment, increase ΔVth.

[0081] When it happens Figure 5When the back wave jumps as shown, it means that the received signal amplitude is still too low or the first wave trigger voltage threshold Vth is too high. The microprocessor adjusts Vth down by ΔVth according to the number of wave jumps. If after-jump waves still exist after adjustment, fine-tune ΔVth.

[0082] The above fine-tuning can be performed twice in succession at most. If wave skipping still occurs, the amplitude is readjusted according to the processing method of adjusting the first wave trigger voltage threshold Vth based on the amplitude of the received signal.

[0083] This invention significantly improves the accuracy of flow rate measurement by real-time monitoring of the peak value of the ultrasonic received signal and dynamically adjusting the first-wave trigger voltage threshold. Under different operating conditions, the amplitude of the ultrasonic signal will vary due to changes in the medium, flow rate, temperature, and pressure. Dynamic adjustment of the trigger voltage ensures that the system responds promptly when the signal amplitude exceeds or falls below the set range. This adaptive mechanism effectively reduces false triggering and missed triggering caused by fixed thresholds, thereby reducing measurement errors, improving overall measurement accuracy, and ultimately reducing trade disputes caused by inaccurate measurement. This invention enhances the system's anti-interference capabilities, particularly in complex operating environments where external noise (such as electromagnetic interference and pipeline noise) often affects signal quality. Through dynamic adjustment based on the signal peak value, the system can effectively filter out the effects of noise, ensuring accurate identification of the first-wave signal even under low signal-to-noise ratio conditions. This feature enables ultrasonic flowmeters to maintain stable performance and reliable measurement results in unstable environments, meeting the needs of modern industry for high-precision measurement.

[0084] The present invention introduces a fine-tuning mechanism based on the front and back wave jump phenomenon, which significantly enhances the system's adaptability to changes in signal waveforms. By detecting the front and back wave jumps in the steps, the system can determine whether the currently set trigger voltage is reasonable, and make timely fine-tuning according to the wave jump situation. The flexible adjustment mechanism ensures that the trigger voltage can adapt quickly under a variety of complex signal conditions, thereby ensuring the reliable identification of the first wave signal. Even when the amplitude of the received signal fluctuates greatly, the system can still maintain accuracy and ensure the stability of the measurement. At the same time, this fine-tuning mechanism improves the overall stability and reliability of the ultrasonic flowmeter. By effectively eliminating the negative impact of the wave jump phenomenon, the system can ensure the accuracy of the first wave detection and prevent measurement failures caused by wave jumps. This feature makes the ultrasonic flowmeter more reliable in practical applications, and can work continuously and stably in a changing industrial environment, meeting the high requirements for measurement accuracy and real-time response.

[0085] The above description is merely illustrative of certain exemplary embodiments of the present invention. It goes without saying that those skilled in the art will be able to modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the scope of protection of the claims.

[0086] It should be noted that, in this document, if there are relational terms such as first and second, etc., they are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.

[0087] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0088] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0089] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

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

[0092] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0093] If the functions 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. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0094] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for automatically adjusting the voltage threshold of the first wave detection of an ultrasonic flowmeter, characterized in that: By dynamically detecting and adjusting the peak value and wave-hopping phenomenon of the received signal, the ultrasonic flowmeter is ensured to accurately identify the first wave and perform flow velocity measurement under complex working conditions. The method includes the following steps: S101, initialize the system's peak acquisition circuit, adjustable potentiometer, logic control circuit, first wave trigger and zero-crossing control circuit, and adjust the amplifier gain; S102, amplifying the received signal through an amplifier and collecting its highest peak value, determining whether the peak value is within a preset range, and calculating the first wave trigger voltage threshold based on the peak value; S103, adjusting the resistance value of the adjustable potentiometer to obtain a trigger voltage corresponding to the voltage threshold; S104, detecting the waveform of the received signal through a comparator to identify whether a pre-hop or post-hop phenomenon occurs; S105, further fine-tuning the voltage threshold according to the detected pre-wave or post-wave jump to minimize the wave jump phenomenon and obtain an accurate first-wave detection voltage threshold; Calculate the first wave trigger voltage threshold based on the peak value. The specific steps are as follows: The first wave trigger voltage threshold Vth is calculated according to the peak value of the received signal using the formula: , where C is the proportional coefficient, which is a constant between 0.11 and 0.

15. It is the peak value. The proportional coefficient is set according to the system hardware characteristics and the number of excitation waves to ensure that the trigger voltage is adjusted proportionally to the amplitude of the received signal, so that the trigger voltage can adapt to complex working conditions and reduce the impact of wave hopping on the measurement results.

2. The method for automatically adjusting the voltage threshold of the first wave detection of an ultrasonic flowmeter according to claim 1, characterized in that: Adjust the amplifier gain, specifically: The amplifier is an amplifier with automatic gain control function. The microprocessor adjusts the gain of the amplifier during initialization. If the amplifier gain is G1 and the amplitude of the amplified signal is V1, and the target amplitude is V0, the gain needs to be adjusted to: ,According to the calculated gain G, the microprocessor adjusts the amplifier with AGC function to amplify the signal.

3. The method for automatically adjusting the voltage threshold of the first wave detection of an ultrasonic flowmeter according to claim 1, characterized in that: The amplifier amplifies the received signal and collects its highest peak value to determine whether the peak value is within the preset range. The specific steps are as follows: The microprocessor compares the collected highest wave peak value with the preset signal amplitude range. If the peak value is within the range, the signal amplitude meets the requirements, and the system enters the subsequent first wave trigger voltage calculation and adjustment steps; If the signal amplitude is not within the range, the system will readjust the amplifier gain to ensure that the signal amplitude is within the set range, thereby ensuring the stability and reliability of the received signal.

4. The method for automatically adjusting the voltage threshold of the first wave detection of an ultrasonic flowmeter according to claim 1, characterized in that: Adjust the resistance value of the adjustable potentiometer to obtain the trigger voltage corresponding to the voltage threshold. The specific steps are as follows: The microprocessor adjusts the resistance value R2 of the adjustable potentiometer through a voltage divider circuit according to the calculated trigger voltage Vth. The voltage divider circuit consists of a reference voltage source Vref, a resistor R1, and an adjustable potentiometer. The calculation formula of the resistance value R2 is: ,According to this formula, the microprocessor adjusts the resistance value of the ,adjustable potentiometer so that the voltage output by the voltage divider ,circuit matches the calculated trigger voltage Vth, ensuring that the trigger voltage threshold ,accurately corresponds to the amplitude of the received signal, thereby achieving ,accurate triggering of the first wave; The positive and negative input terminals of the comparator are connected to the received signal and the first-wave trigger voltage threshold Vth respectively. When the amplitude of the received signal exceeds the first-wave trigger voltage threshold, the comparator outputs a trigger signal and starts the first-wave trigger and zero-crossing detection circuit. The system then detects the zero point position of the received signal and outputs several square wave signals. The square wave signal is used to calculate the forward and reverse duration of the ultrasonic wave. By calculating the difference between the forward and reverse durations, the accurate fluid flow rate is obtained.

5. The method for automatically adjusting the voltage threshold of the first wave detection of an ultrasonic flowmeter according to claim 1, characterized in that: The specific steps for detecting the waveform of the received signal through a comparator and identifying the pre-hop or post-hop phenomenon are as follows: The received signal is amplified by the amplifier and then enters the comparator. The two input terminals of the comparator receive the amplified signal and the first wave trigger voltage threshold Vth respectively. When the instantaneous value of the received signal exceeds the threshold Vth for the first time, the comparator outputs a trigger signal, which starts the zero-crossing comparator and marks the moment of the first zero-crossing point as , as the first wave zero-crossing trigger point; The system continuously monitors the waveform of the received signal and records the trigger point After that, the system continues to track the first zero-crossing time after the highest peak of the received signal, and calculates the time difference between the highest waveform peak and the first wave zero-crossing trigger point. The time difference is the time required for the received signal to pass through zero from the first wave to the first zero point after the received wave reaches its maximum value. It is used to determine the wave jumping phenomenon. The calculation expression of the time difference is: ,in, It is the time point when the first zero crossing occurs after the highest peak. It is the time of the first wave zero-crossing trigger point; The time difference within the predetermined reference threshold Compare and judge whether the signal waveform has wave jumping phenomenon. If the time difference If it is too small, it means that the signal is triggered too early, that is, the pre-jump wave phenomenon occurs; if the time difference If it is too large, it means that the signal is triggered too late, and a post-jump wave phenomenon occurs, which is specifically expressed as: ,in, and The minimum and maximum values ​​of the predetermined reference threshold range are used to determine whether a wave hopping phenomenon exists.

6. The method for automatically adjusting the voltage threshold of the first wave detection of an ultrasonic flowmeter according to claim 1, characterized in that: Based on the detected pre-jump wave phenomenon, when a parasitic wave appears before the first wave of the received signal and the amplitude of the parasitic wave is close to or exceeds the first wave trigger voltage threshold Vth, the microprocessor increases the first wave trigger voltage threshold Vth by 100% each time according to the number of wave jumps. , The adjustment range is 20mV to 30mV. The fine-tuning mechanism gradually increases the voltage threshold to eliminate the pre-jump phenomenon, ensuring the accuracy of the measurement signal and the stability of the system.

7. The method for automatically adjusting the voltage threshold of the first wave detection of an ultrasonic flowmeter according to claim 1, characterized in that: Based on the detected post-wave jump phenomenon, when the amplitude of the first wave of the received signal is lower than the first wave trigger voltage threshold Vth and the first wave cannot be effectively triggered, the microprocessor reduces the first wave trigger voltage threshold Vth by 1 / 4 of the first wave trigger voltage threshold Vth each time according to the number of wave jumps. , The adjustment range is 20mV to 30mV. By lowering the first-wave trigger voltage threshold, the system can ensure stable operation under low-amplitude signals.

8. The method for automatically adjusting the voltage threshold of the first wave detection of an ultrasonic flowmeter according to claim 1, characterized in that: The adjustment process of the first-wave trigger voltage threshold Vth allows up to two fine adjustments to reduce the consumption of system resources and improve efficiency. After two fine adjustments, if the wave hopping phenomenon still exists, the system will restart the signal amplifier gain adjustment process and re-adjust the amplitude of the received signal to ensure the reliability of subsequent measurements and low-power operation of the system.

Citation Information

Patent Citations

  • Automatic adjusting system and method for ultrasonic signal of gas ultrasonic flowmeter

    CN114295169A