Ultrasonic fluid metering accuracy improvement method and related device thereof
By generating an excitation wave sequence combining the main wave and the self-extinguishing wave, dynamically adjusting the parameters of the self-extinguishing wave, and optimizing the signal-to-noise ratio, the problems of high hardware cost and low measurement accuracy of ultrasonic fluid metering devices are solved, and high-precision measurement is achieved in different transducers and environments.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HANGZHOU INNOVER TECH CO LTD
- Filing Date
- 2025-11-17
- Publication Date
- 2026-05-21
AI Technical Summary
Existing ultrasonic fluid metering devices suffer from high hardware costs, difficulty in adapting to different types of ultrasonic transducers, and low metering accuracy, especially prone to zero drift in low flow rate measurements.
By generating an excitation wave sequence combining a main wave and a self-extinguishing wave, adjusting the high and low level occupancy time of the self-extinguishing wave, optimizing the signal-to-noise ratio, and dynamically adjusting the excitation wave sequence to adapt to different transducers and environmental conditions, metering operations can be achieved.
Without increasing hardware costs, it significantly improves metering accuracy, overcomes aftershock differences caused by inconsistent parameters of different transducers, reduces zero drift, and improves the accuracy of small flow rate measurements.
Smart Images

Figure CN2025135554_21052026_PF_FP_ABST
Abstract
Description
Methods for improving the accuracy of ultrasonic fluid measurement and related equipment
[0001] This disclosure claims priority to Chinese Patent Application No. 202411645268.0, filed on November 18, 2024, the contents of which are incorporated herein by reference in their entirety. Technical Field
[0002] This disclosure relates to the field of ultrasonic instrument technology, and in particular to a method for improving the accuracy of ultrasonic fluid measurement and related equipment. Background Technology
[0003] Ultrasonic fluid metering devices (such as ultrasonic gas meters and ultrasonic water meters, which use ultrasonic waves to measure fluids (gas and liquids)) have been widely used in industry, energy, and environmental protection due to their advantages such as high precision and non-contact measurement. The time difference method (which calculates the flow velocity of a fluid by measuring the time difference between the propagation of ultrasonic waves in the downstream and upstream directions) is one of the most commonly used methods in ultrasonic fluid metering devices.
[0004] However, electromagnetic interference in the environment, power supply noise, and internal noise of the transducer and amplifier make the measured downstream flight time T... 12 and the time T for flying against the current 21 The deviation affects the accuracy of zero-crossing detection of the received waveform, which in turn causes the flow rate or flow value output by the ultrasonic fluid metering device to be non-zero when there is no fluid flow, i.e., zero drift.
[0005] In order to solve the zero drift phenomenon, the measurement method of ultrasonic fluid metering device provided by related technologies usually adds external devices to the receiving circuit, such as adding external filters to reduce high-frequency noise. However, this solution increases the hardware cost of the ultrasonic fluid metering device to perform the measurement operation. Moreover, due to the different models of ultrasonic transducers used in the ultrasonic fluid metering device, it is difficult to overcome the aftershock differences introduced by the inconsistency of transducer parameters by simply adding external filters, resulting in low measurement accuracy.
[0006] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention
[0007] The ultrasonic fluid metering accuracy improvement method and related equipment provided in this disclosure at least solve the problems of high hardware cost, difficulty in applying to different types of ultrasonic transducers, and low metering accuracy in the ultrasonic fluid metering devices provided by related technologies.
[0008] To address the aforementioned problems, one aspect of this disclosure provides a method for improving the accuracy of ultrasonic fluid measurement, comprising:
[0009] The first ultrasonic transducer is excited by an excitation wave sequence, and the second ultrasonic transducer is enabled to work. The received digital signal corresponding to the excitation wave sequence is acquired based on a preset sampling window, and the signal-to-noise ratio of the received digital signal within the preset sampling window is calculated. The excitation wave sequence is a combination of a main wave and a self-cancelling wave. The frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer, and the signal-to-noise ratio is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region.
[0010] Determine if the signal-to-noise ratio is greater than the signal-to-noise ratio threshold. If not, adjust the time occupied by the high and low levels of the self-cancelling wave in the excitation wave sequence to obtain the adjusted excitation wave sequence. Then, perform the excitation operation again based on the adjusted excitation wave sequence until the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold.
[0011] The excitation wave sequence corresponding to the actual signal-to-noise ratio being greater than the signal-to-noise ratio threshold is determined as the target excitation wave sequence. The first ultrasonic transducer is excited and the second ultrasonic transducer is enabled to work according to the target excitation wave sequence to perform the measurement operation.
[0012] In some embodiments, the method further includes a step of generating an excitation wave sequence:
[0013] Obtain the resonant frequency of the ultrasonic transducer, use the frequency value corresponding to the resonant frequency as the main wave frequency value corresponding to the main wave in the excitation wave sequence, and use the frequency value corresponding to the non-resonant frequency as the initial frequency value of the self-cancelling wave.
[0014] The main wave is generated based on the main wave frequency, the main wave preset duty cycle, and the main wave preset wave number. The self-extinguishing wave is generated based on the initial frequency corresponding to the self-extinguishing wave, the initial duty cycle of the self-extinguishing wave, and the self-extinguishing wave preset wave number. The main wave and the self-extinguishing wave are then combined to generate an excitation wave sequence.
[0015] In some embodiments, the steps of adjusting the high and low levels of the self-cancelling wave in the excitation wave sequence to obtain an adjusted excitation wave sequence, and then performing the excitation operation again based on the adjusted excitation wave sequence until the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold include:
[0016] Construct a level occupancy time array corresponding to the self-cancelling wave; where the values in the level occupancy time array represent the high and low level occupancy times of p self-cancelling waves, and p is the preset wave number of the self-cancelling wave;
[0017] When the signal-to-noise ratio (SNR) is not greater than the SNR threshold, the following loop operation is performed: determine the current value to be adjusted from the level occupancy time array one by one; perform multiple adjustments on the current value to be adjusted, calculate the actual SNR corresponding to each adjustment, and determine the adjustment value corresponding to the maximum SNR among the multiple actual SNR values, using the adjustment value as the target value of the current value to be adjusted; traverse all values in the level occupancy time array; and end the loop operation when the actual SNR is greater than the SNR threshold.
[0018] In some embodiments, the steps of performing multiple numerical adjustments on the current value to be adjusted, calculating the actual signal-to-noise ratio corresponding to each numerical adjustment, and determining the adjustment value corresponding to the maximum signal-to-noise ratio among the multiple actual signal-to-noise ratios further include:
[0019] For any adjustment to the current value to be adjusted, perform multiple excitation operations to sample multiple sets of received digital signals, and calculate the average signal-to-noise ratio corresponding to the multiple sets of received digital signals.
[0020] The maximum signal-to-noise ratio (SNR) value among the multiple SNR averages corresponding to multiple numerical adjustments is taken as the adjustment value.
[0021] In some embodiments, a preset adjustment time is set, and the method further includes:
[0022] If the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold, or the adjustment time is greater than the preset adjustment time, the excitation wave sequence including the current self-cancelling vibration wave is determined as the target excitation wave sequence.
[0023] In some embodiments, the self-cancelling wave includes p fixed waves with the same self-cancelling wave frequency; wherein, the p high-level occupancy times of the p fixed waves are the same, and the p low-level occupancy times are the same; the frequency value of the self-cancelling wave is outside the operating frequency range of the ultrasonic transducer.
[0024] In some embodiments, the self-cancelling waves include p increasing self-cancelling waves with increasing frequencies or p decreasing self-cancelling waves with decreasing frequencies; wherein,
[0025] In any incrementing wave, the high and low levels occupy the same amount of time, and in p incrementing waves, the high level occupies an increasing amount of time.
[0026] In any decreasing wave, the high and low levels occupy the same amount of time, and in p decreasing waves, the high level occupies a decreasing amount of time.
[0027] To address the aforementioned problems, one aspect of this disclosure provides an ultrasonic fluid metering device, comprising:
[0028] The signal-to-noise ratio (SNR) determination module is configured to excite the first ultrasonic transducer and enable the second ultrasonic transducer to operate by excitation wave sequence, acquire the received digital signal corresponding to the excitation wave sequence based on a preset sampling window, and calculate the SNR of the received digital signal within the preset sampling window; wherein, the excitation wave sequence is a combination of the main wave and the self-cancelling wave, the frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer, and the SNR is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region;
[0029] The adjustment module is set to determine whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold. If not, the time occupied by the high and low levels of the self-cancelling wave in the excitation wave sequence is adjusted to obtain the adjusted excitation wave sequence. The excitation operation is performed again according to the adjusted excitation wave sequence until the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold.
[0030] The metering module is configured to determine the excitation wave sequence corresponding to the actual signal-to-noise ratio being greater than the signal-to-noise ratio threshold as the target excitation wave sequence, and to excite the first ultrasonic transducer and enable the second ultrasonic transducer to work according to the target excitation wave sequence in order to perform the metering operation.
[0031] To address the aforementioned problems, one aspect of this disclosure provides an electronic device, including a processor and a memory storing a program, the program including instructions that, when executed by the processor, cause the processor to perform any of the above-described ultrasonic fluid measurement accuracy improvement methods.
[0032] To address the aforementioned problems, one aspect of this disclosure provides a non-transient machine-readable medium storing computer instructions configured to cause a computer to execute any of the above-described ultrasonic fluid measurement accuracy improvement methods.
[0033] The beneficial effects of this embodiment are as follows: By exciting the first ultrasonic transducer and enabling the second ultrasonic transducer to work through an excitation wave sequence, the received digital signal corresponding to the excitation wave sequence is acquired based on a preset sampling window, and the signal-to-noise ratio (SNR) of the received digital signal within the preset sampling window is calculated; wherein, the excitation wave sequence is a combination of a main wave and a self-cancelling wave, the frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer, and the SNR is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region; it is determined whether the SNR is greater than the SNR threshold; if not, the occupation time of the high and low levels of the self-cancelling wave in the excitation wave sequence is adjusted to obtain an adjusted excitation wave sequence, and the excitation operation is performed again according to the adjusted excitation wave sequence until the actual SNR is greater than the SNR threshold; the excitation wave sequence corresponding to the actual SNR being greater than the SNR threshold is determined as the target excitation wave sequence, and the first ultrasonic transducer is excited according to the target excitation wave sequence. This invention addresses the technical challenge of enabling a second ultrasonic transducer to perform metrological operations. It overcomes the limitations of related technologies where adding external components to reduce high-frequency noise increases the hardware cost of the ultrasonic fluid metrology device. Furthermore, it addresses the issue that different models of ultrasonic transducers in ultrasonic fluid metrology devices, even with external filters, cannot overcome the aftershock differences caused by inconsistent transducer parameters, leading to lower metrological accuracy. The invention utilizes an excitation wave sequence including a main wave and a self-cancelling wave to excite the ultrasonic transducer. The parameters of the self-cancelling wave are adjusted based on the signal-to-noise ratio of the sampled signal to determine the excitation wave sequence suitable for the current ultrasonic transducer. This significantly improves metrological accuracy without increasing hardware costs, overcomes aftershock differences caused by inconsistent ultrasonic transducer parameters, and expands the applicability of the method.
[0034] Details of one or more embodiments of this disclosure are set forth in the following drawings and description to make other features, objects and advantages of this disclosure more readily apparent. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0036] Figure 1 is a schematic diagram of the installation of an ultrasonic transducer in an ultrasonic fluid metering device in related technologies.
[0037] Figure 2 is a schematic diagram of the received signal waveform after the ultrasonic transducer is excited in the related technology.
[0038] Figure 3 is a flowchart illustrating an embodiment of the ultrasonic fluid metering accuracy improvement method of this disclosure.
[0039] Figure 4 is a schematic diagram of the signal waveform obtained by exciting an ultrasonic transducer based solely on the main wave, according to one embodiment of the present disclosure.
[0040] Figure 5 is a schematic diagram of the signal waveform acquired during the self-extinguishing vibration wave adjustment process of one embodiment of this disclosure.
[0041] Figure 6 is a schematic diagram of the signal waveform obtained by exciting an ultrasonic transducer based on a target excitation wave sequence according to an embodiment of the present disclosure.
[0042] Figure 7 is a schematic diagram of the frame of an ultrasonic fluid metering device according to an embodiment of the present disclosure.
[0043] Figure 8 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0044] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0045] The method of calculating fluid velocity by measuring the time difference of ultrasonic wave propagation in the downstream and upstream directions is one of the most commonly used methods in ultrasonic fluid measurement.
[0046] Currently, time-of-flight measurement chips on the market employ two principles: 1. Zero-crossing timing method: As shown in Figure 1, ultrasonic transducers are arranged on both sides of the fluid pipe. The fluid flows through the pipe at a velocity v. The distance between the two ultrasonic transducers is l, and the angle between the connecting line of the two ultrasonic transducers and the horizontal direction of the pipe is θ. Then, by timing the zero-crossing point of the received ultrasonic waveform, the hardware directly provides the downstream flight time T. 12 and the time T for flying against the current 21The fluid velocity V can then be calculated, but this method is sensitive to noise, easily affected by environmental interference, and prone to zero drift at low or zero flow rates. II. AD (Analog-to-Digital) sampling software timing method: This method converts the received ultrasonic waveform into a digital signal via AD conversion, and then calculates the transit time and time difference using software algorithms. The disadvantages of this method are high computational complexity, requiring a powerful processor, and zero drift also occurs at low or zero flow rates. Zero drift affects the measurement accuracy of ultrasonic fluid metering devices, especially for low flow rate measurements.
[0047] The ultrasonic transducer is the core component of an ultrasonic fluid metering device, responsible for converting electrical signals into ultrasonic signals or vice versa. Proper excitation of the ultrasonic transducer before metering operations ensures the quality and stability of the ultrasonic signal, thereby improving measurement accuracy. However, when designing the receiving excitation sequence waveform, the usage of the ultrasonic gas meter must be considered. Theoretically, there should be no signal before and after the main signal is received when the main signal is within the receiving window. In reality, because the ultrasonic transmitting and receiving transducers share a common ground, the aftershocks of the ultrasonic transmitting transducer after excitation interfere with the receiving circuit through the ground wire. There is a significantly attenuated signal before the receiving signal area, and the ultrasonic receiving transducer exhibits self-oscillation after receiving the signal, resulting in an attenuated signal after the receiving signal area. As shown in Figure 2, the received signal contains both leading and following noise, affecting metering accuracy.
[0048] In related technologies, external hardware is typically added to ultrasonic fluid metering devices. This includes using low-pass, high-pass, or band-pass filters to remove unwanted noise; adding analog filters before the ADC module to reduce high-frequency noise; using adaptive filters to dynamically adjust filter parameters and improve the signal-to-noise ratio; and using Kalman filters for state estimation to reduce noise impact. However, these solutions increase the hardware cost of the ultrasonic fluid metering device for performing metering operations. Furthermore, due to the different models of ultrasonic transducers used in ultrasonic fluid metering devices, simply adding external filters is insufficient to overcome the aftershock differences introduced by inconsistent transducer parameters, resulting in lower metering accuracy.
[0049] To address the aforementioned problems, this disclosure provides a method for improving the accuracy of ultrasonic fluid measurement, as shown in Figure 3. This method mainly includes:
[0050] Step S301: Excite the first ultrasonic transducer and enable the second ultrasonic transducer to work by excitation wave sequence; acquire the received digital signal corresponding to the excitation wave sequence based on the preset sampling window; and calculate the signal-to-noise ratio of the received digital signal within the preset sampling window; wherein, the excitation wave sequence is a combination of the main wave and the self-cancelling wave, the frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer, and the signal-to-noise ratio is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region.
[0051] In this embodiment, the activated first ultrasonic transducer is used to perform ultrasonic wave transmission; it can be either an ultrasonic transmitting transducer or an ultrasonic receiving transducer. The enabled second ultrasonic transducer is used to perform ultrasonic wave reception. It is understood that when the first ultrasonic transducer is an ultrasonic transmitting transducer, the second ultrasonic transducer is an ultrasonic receiving transducer; and when the first ultrasonic transducer is an ultrasonic receiving transducer, the second ultrasonic transducer is an ultrasonic transmitting transducer.
[0052] In this embodiment, the excitation wave sequence is formed by a combination of a main wave and a self-cancelling wave. Specifically, the main wave is used to generate a stable measurement waveform. Selecting the resonant frequency of the ultrasonic transducer as the main wave frequency ensures maximum energy transmission and optimal signal strength, while reducing signal distortion. The self-cancelling wave is used to change the transducer's natural vibration state, guiding its oscillation frequency to fall within the non-resonant frequency band, thus rapidly eliminating the transducer's natural vibration state after excitation and reducing the impact of aftershocks on the measurement results.
[0053] Through the above-described configuration, this embodiment of the present disclosure innovatively provides a scheme for excitation using an excitation wave sequence comprising a main wave and a self-cancelling wave. This excitation wave sequence ensures the generation of a stable measurement waveform and helps reduce the impact of aftershocks from the ultrasonic transducer on the measurement results. However, since even minor noise and self-vibration can significantly affect the measurement results in small flow rate measurements, this embodiment of the present disclosure also samples the received digital signal corresponding to the excitation wave sequence and calculates the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region, i.e., the signal-to-noise ratio (SNR). This allows for subsequent optimization and adjustment of the parameters of the self-cancelling wave based on the SNR, effectively reducing the self-vibration interference of the excitation transducer and further improving the measurement accuracy of the ultrasonic fluid metering device. This enables the method to overcome the aftershock differences introduced by inconsistent parameters of different ultrasonic transducers, thereby expanding the applicable scenarios of the method.
[0054] It should be noted that when the second ultrasonic transducer is working: after receiving the ultrasonic signal emitted by the first ultrasonic transducer, it converts the ultrasonic signal into an electrical signal. To obtain the received digital signal corresponding to the excitation wave sequence based on a preset sampling window, it is actually necessary to first perform a sampling operation on the electrical signal, then perform an AD (analog-to-digital) conversion process on the sampled electrical signal, and finally obtain the corresponding received digital signal.
[0055] Due to the propagation time of ultrasound in fluids and the response time of the transducer, a suitable time window (i.e., the aforementioned preset sampling window) needs to be selected to ensure that the main ultrasound signal can be received within this time. The received signal region in the received digital signal can be determined using a peak detection method, that is, within the preset sampling window, the received signal region is determined by detecting the peak value of the signal. Typically, the received signal region includes the maximum amplitude of the signal and several nearby sampling points.
[0056] Before the ultrasonic signal reaches the receiving transducer, the collected signal is mainly background noise. After the ultrasonic signal reaches the receiving transducer, the signal strength gradually decreases, and this part of the signal can also be considered as noise. Therefore, the received digital signal within the preset sampling window can be divided into a received signal area (including the main ultrasonic signal) and a noise area, and then the signal-to-noise ratio corresponding to the received digital signal can be calculated.
[0057] According to a specific embodiment of this disclosure, a 300μs time window (i.e., the time window corresponding to the preset sampling window) is selected. If the moment when the excitation wave sequence begins to be transmitted is taken as 0μs, and a delay of TL is applied to wait for the ultrasonic signal to propagate in the pipe, then the specific sampling window time interval corresponding to the preset sampling window is [TL+0μs, TL+300μs]. If the peak value of the signal is detected between TL+120μs and TL+240μs, [TL+120μs, TL+240μs] can be determined as the received signal region; then [TL+0, TL+120μs] and [TL+240μs, TL+300μs] are designated as the noise region.
[0058] According to another specific embodiment, the receiving signal area can also be determined based on the maximum peak value and the time interval of the preset receiving signal area. For example, if the maximum peak value is detected at TL+150μs, the receiving signal area can be obtained by ±50μs of "TL+150μs" as [TL+100μs, TL+200μs]. It should be noted that the above values are only examples and are not intended to limit the present disclosure.
[0059] According to embodiments of this disclosure, the excitation wave sequence can be generated by an excitation signal generation module disposed in the ultrasonic fluid metering device. This module generates a specific electrical signal (a waveform with a certain frequency and amplitude, such as a sine wave or square wave). The main wave frequency is set to match the resonant frequency of the ultrasonic transducer to ensure that the transducer can efficiently convert the electrical signal into an ultrasonic signal. Furthermore, the excitation signal can be amplified and transmitted to the first ultrasonic transducer via a drive circuit located within the ultrasonic fluid metering device to provide sufficient power to drive the transducer. The first ultrasonic transducer converts the received electrical signal into an ultrasonic signal, enabling the transducer to operate at its optimal state and generate a stable ultrasonic signal. Excitation reduces or eliminates the initial noise of the transducer, improving the signal-to-noise ratio. The excitation process helps the transducer quickly enter a stable operating state, ensuring consistent signal strength and waveform during each measurement. The ultrasonic signal propagates in the fluid, from the first ultrasonic transducer to the second ultrasonic transducer; the fluid flow velocity affects the propagation time of the ultrasonic signal. The second ultrasonic transducer then converts the received ultrasonic signal into an electrical signal. This electrical signal is amplified by an internal amplifier circuit to improve the signal-to-noise ratio (SNR). The amplified electrical signal is then sampled by the ADC (analog-to-digital converter) inside the ultrasonic fluid metering device, converting the analog signal into a digital signal. The sampled digital signal is then processed by an internal signal processing module to calculate the SNR. Based on the SNR quality, the control module determines whether the excitation wave parameters need adjustment, primarily the high and low level occupancy times in the self-cancelling wave. If adjustment is needed, the control module updates the parameter configuration of the excitation signal generation module and regenerates a new excitation signal. This excitation and acquisition process is repeated until the SNR reaches the expected level (meeting the preset adjustment time or SNR threshold).
[0060] In some embodiments, the above method further includes a step of generating an excitation wave sequence: obtaining the resonant frequency of the ultrasonic transducer, using the frequency value corresponding to the resonant frequency as the main wave frequency value corresponding to the main wave in the excitation wave sequence, and using the frequency value corresponding to the non-resonant frequency as the initial frequency value of the self-cancelling wave; generating a main wave based on the main wave frequency value, the main wave preset duty cycle, and the main wave preset wavenumber; generating a self-cancelling wave based on the initial frequency value corresponding to the self-cancelling wave, the initial duty cycle of the self-cancelling wave, and the self-cancelling wave preset wavenumber; and then combining the main wave and the self-cancelling wave to generate an excitation wave sequence.
[0061] Based on the above settings, the analysis shows that setting the frequency of the main wave to be consistent with the resonant frequency of the ultrasonic transducer helps to ensure the maximum transmission efficiency and strength of the signal. At the same time, by setting the main wave duty cycle and main wave number, a stable main wave can be generated, further reducing signal distortion.
[0062] According to a specific embodiment of this disclosure, the preset duty cycle of the main wave can be selected as 50% to ensure the symmetry and stability of the waveform, thereby effectively reducing signal distortion. The selection of the preset main wave number depends on the required signal stability and measurement accuracy. Generally, a larger main wave number can provide a more stable signal, but it will increase the measurement time. A suitable main wave number can be determined experimentally, or it can be determined by combining the required signal stability and the sampling time period of the waveform corresponding to the sampling window. The initial frequency value of the self-cancelling wave is selected in the non-resonant frequency band, which can effectively reduce the self-oscillation state of the transducer and reduce the influence of aftershocks on the measurement results. The initial duty cycle of the self-cancelling wave corresponds to the occupation time of the high and low levels. In this embodiment of the disclosure, the occupation time of the high and low levels is set to be adjustable. By adjusting the occupation time of the high and low levels, the shape of the self-cancelling wave can be changed, thereby changing the self-oscillation state of the transducer. The selection of the preset self-cancelling wave number depends on the required vibration damping effect. Generally, a larger self-cancelling wave number can provide a better vibration damping effect, but it will increase the measurement time.
[0063] In the initial excitation wave sequence provided in this embodiment, the main wave frequency is initially set to the resonant frequency of the ultrasonic transducer, and the wave number m and frequency of the main wave are fixed. The parameters of the self-cancelling wave can be set to initial default values. Subsequently, the parameters of the self-cancelling wave can be adjusted in conjunction with the signal-to-noise ratio to determine the target parameters of the self-cancelling wave suitable for the current type of ultrasonic transducer.
[0064] In some embodiments, the self-extinguishing wave includes p fixed waves with the same frequency; wherein the p high-level occupancy times and the p low-level occupancy times of the p fixed waves are the same; the frequency value of the self-extinguishing wave is outside the operating frequency range of the ultrasonic transducer.
[0065] According to a specific embodiment of this disclosure, taking the level occupancy time array T[2p] corresponding to the self-extinguishing wave as an example; where p is the wave number corresponding to the self-extinguishing wave P, and each value in the array T[2p] corresponds to the high and low level occupancy time of p waves in the self-extinguishing wave, for a total of 2*p values. The sequence of the self-extinguishing wave P, including p fixed waves with the same frequency, is as follows: the sequence of T[2p] is {h,l,h,l,h,l…}, where the high level time and the low level time are the same for all waves in T[2p]. Further, the frequency of the self-extinguishing wave can be set to a fixed frequency value other than the operating frequency of the ultrasonic transducer, and the high and low level occupancy times can be calculated based on this fixed frequency value. Based on the above-mentioned self-extinguishing wave including multiple fixed waves, since the frequency of the self-extinguishing wave is different from the operating frequency of the ultrasonic transducer, it can also change the natural vibration state of the ultrasonic transducer, guide its oscillation frequency to fall on the non-resonant frequency band, so that the natural vibration state of the ultrasonic transducer after excitation can be quickly extinguished, reducing the influence of aftershocks on the measurement results.
[0066] In some embodiments, the aforementioned self-cancelling wave includes p self-cancelling wave increments or p self-cancelling wave decrements; wherein, in any increment, the high and low levels occupy the same time, and the high level occupancy time in the p increments is increasing; in any decrement, the high and low levels occupy the same time, and the high level occupancy time in the p decrements is decreasing.
[0067] According to a specific embodiment of this disclosure, the high and low level occupancy time array corresponding to a self-cancelling wave including p self-cancelling wave frequency increments or p self-cancelling wave frequency decrements can be characterized as: the T[2p] array is
[0068] {x, x, x+c, x+c, x+2c, x+2c…}, where c is {+1, -1, +2, -2…}
[0069] Since the frequency of the self-extinguishing vibration wave increases or decreases, it will inevitably be far away from the operating frequency corresponding to the ultrasonic transducer. Therefore, it can also change the self-vibration state of the transducer and guide its oscillation frequency to fall on the non-resonant frequency band, so that the self-vibration state after the transducer is excited can be quickly extinguished, reducing the influence of aftershocks on the measurement results.
[0070] It is understood that the self-canceling vibration waves in the excitation wave sequence mentioned in step S301 above are considered to be irregular sequences because their initial state is not defined and subsequent adjustment operations are performed based on the signal-to-noise ratio. In contrast, the self-canceling vibration waves, which include multiple fixed waves, increasing waves, or decreasing waves, can be understood as regular sequences. That is, the self-canceling vibration waves in the excitation wave sequence provided in this embodiment can be either irregular or regular sequences, both of which can reduce noise interference and improve measurement accuracy. In specific applications, different types of self-canceling vibration waves can be selected according to the actual working conditions.
[0071] Step S302: Determine whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold. If not, adjust the time occupied by the high and low levels of the self-cancelling wave in the excitation wave sequence to obtain the adjusted excitation wave sequence. Then, perform the excitation operation again based on the adjusted excitation wave sequence until the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold.
[0072] Using the signal-to-noise ratio (SNR) as the basis for optimizing the self-cancelling wave in the excitation wave sequence, this method dynamically adjusts the high and low level occupancy times of the self-cancelling wave based on SNR changes, gradually optimizing the measurement results. Specifically, by dynamically adjusting the high and low level occupancy times of the self-cancelling wave, the self-oscillation state of the ultrasonic transducer can be effectively reduced, as well as aftershocks and background noise. The optimized self-cancelling wave can better guide the transducer's oscillation frequency to fall within the non-resonant frequency band, thereby improving the peak value of the received signal. Furthermore, by dynamically adjusting the parameters of the self-cancelling wave, adaptive optimization can be achieved. Under different transducer and environmental conditions, the parameters of the self-cancelling wave can be dynamically adjusted to achieve the optimal SNR. This method has good adaptability to inconsistencies in transducer parameters and environmental changes, and can effectively cope with various complex working conditions.
[0073] Furthermore, the method provided in this disclosure is mainly optimized through software algorithms, without requiring additional hardware costs, and can be easily integrated into existing ultrasonic fluid metering systems to improve the overall performance of the system.
[0074] In some embodiments, the steps of adjusting the high and low level occupancy times of the self-cancelling waves in the excitation wave sequence to obtain an adjusted excitation wave sequence, and then performing excitation again based on the adjusted excitation wave sequence until the actual signal-to-noise ratio (SNR) is greater than the SNR threshold include: constructing an array of level occupancy times corresponding to the self-cancelling waves; wherein the values in the level occupancy time array sequentially represent the high and low level occupancy times of p self-cancelling waves, where p is a preset wave number of the self-cancelling waves; when the SNR is not greater than the SNR threshold, performing the following loop operation: determining the current value to be adjusted from the level occupancy time array one by one; performing multiple value adjustments on the current value to be adjusted, calculating the actual SNR corresponding to each value adjustment, and determining the adjustment value corresponding to the maximum SNR among multiple actual SNR values, using the adjustment value as the target value of the current value to be adjusted; traversing all values in the level occupancy time array; and ending the loop operation when the actual SNR is greater than the SNR threshold.
[0075] The above steps provide a specific implementation method for optimizing parameters in self-cancelling waves based on signal-to-noise ratio (SNR). It describes in detail how to construct a level occupancy time array and adjust the values in the array one by one when the SNR is not greater than the SNR threshold until the actual SNR is greater than the SNR threshold.
[0076] By constructing an array of level occupancy times, where the values sequentially represent the high and low level occupancy times of p self-cancelling waves, and then dynamically adjusting the high and low level occupancy times of each self-cancelling wave, the transducer's self-oscillation state can be effectively reduced, as well as aftershocks and background noise. This is particularly effective in low-flow-rate measurements, significantly improving measurement accuracy and reducing zero drift. Furthermore, the adaptive adjustment of self-cancelling wave parameters adapts to different transducers and environmental conditions without requiring additional hardware costs.
[0077] In some embodiments, the steps of performing multiple numerical adjustments on the current value to be adjusted, calculating the actual signal-to-noise ratio corresponding to each numerical adjustment, and determining the adjustment value corresponding to the maximum signal-to-noise ratio among the multiple actual signal-to-noise ratios further include: for any adjustment of the current value to be adjusted, performing multiple excitation operations to sample multiple sets of received digital signals, calculating the average signal-to-noise ratio corresponding to the multiple sets of received digital signals; and taking the maximum signal-to-noise ratio among the multiple average signal-to-noise ratios corresponding to the multiple numerical adjustments as the adjustment value.
[0078] Based on the above settings, multiple excitation operations can reduce random errors in single measurements and improve the stability of the signal-to-noise ratio (SNR). Calculating the average SNR values corresponding to multiple sets of received digital signals can more accurately reflect the effect of the current adjustment value. Specifically, by determining the maximum SNR value among multiple SNR averages through multiple numerical adjustments, the optimal adjustment value can be precisely found. Furthermore, multiple numerical adjustments and SNR average calculations can avoid getting trapped in local optima, further ensuring that the found adjustment value is the globally optimal one.
[0079] In some embodiments, a preset adjustment time is set, and the method further includes: if the actual signal-to-noise ratio is greater than a signal-to-noise ratio threshold, or the adjustment time is greater than the preset adjustment time, determining the excitation wave sequence including the current self-cancelling vibration wave as the target excitation wave sequence. The preset adjustment time provided in this embodiment is a preset adjustment time used to limit the time of the optimization process.
[0080] In the process of optimizing self-cancelling waves to improve the accuracy of ultrasonic fluid measurement, the signal-to-noise ratio (SNR) is a crucial indicator for measuring measurement accuracy. Dynamically adjusting the parameters of the self-cancelling waves can effectively improve the SNR, thereby enhancing measurement accuracy and reliability. Furthermore, setting a preset adjustment time prevents the optimization process from running indefinitely, ensuring completion within a finite timeframe. This time constraint also allows for the rational allocation of computational resources, avoiding resource waste caused by prolonged optimization.
[0081] According to a specific embodiment of this disclosure, an optimization adjustment method for a self-cancelling vibration wave P is provided, the specific steps of which are as follows:
[0082] (1) Construct a time array T[2p] corresponding to the level occupancy of the self-cancelling wave, where p is the wave number corresponding to the self-cancelling wave P. Each value in array T[2p] corresponds to the time occupancy of the high and low levels of the p waves in the self-cancelling wave, for a total of 2*p values. Each time an adjustment is made, only one value in array T[2p] is adjusted, and n excitations and signal-to-noise ratio (SNR) calculations are performed (digital signals are sampled separately for each excitation, and the corresponding SNR is calculated). The average value of the n SNRs corresponding to each value adjustment is calculated to obtain the average SNR snr_avg (by performing multiple excitation operations, the random error of a single measurement can be reduced, and the stability of the SNR can be improved; calculating the average SNR corresponding to multiple sets of digital signals can more accurately reflect the effect of the current adjustment value).
[0083] (2) Change the value of the current position of array T[2p] one by one, calculate snr_avg according to the steps of (1), and take the maximum value of the multiple snr_avg corresponding to the current position value as the value of the adjusted value in the current array T[2p].
[0084] (3) Repeat the above steps to adjust all values of array T[2p].
[0085] (4) Repeat the steps (1)-(3) above to continuously update the extreme values of snr_avg and all values of T[2p].
[0086] (5) When the preset adjustment time is reached, or the maximum value of snr_avg is greater than the signal-to-noise ratio threshold, the loop is exited. At this time, the values in array T[2p] (i.e. the high and low level occupancy time of p self-cancelling waves) have achieved the optimal effect of self-cancellation.
[0087] Step S303: Determine the excitation wave sequence corresponding to the actual signal-to-noise ratio being greater than the signal-to-noise ratio threshold as the target excitation wave sequence, and excite the first ultrasonic transducer and enable the second ultrasonic transducer to work according to the target excitation wave sequence to perform the measurement operation.
[0088] The optimized self-canceling wave included in the target excitation wave sequence can effectively reduce the transducer's natural vibration state, reduce aftershocks and background noise, and improve signal clarity. The excitation wave sequence corresponding to an actual signal-to-noise ratio (SNR) greater than a threshold is determined as the target excitation wave sequence, ensuring that the excitation wave sequence used during metrology operations is optimal, thereby improving measurement reliability. Optimizing the SNR reduces random and systematic errors in measurement, improving the accuracy of measurement results.
[0089] The first ultrasonic transducer is excited by a target excitation wave sequence, which also enables the second ultrasonic transducer to operate (in ultrasonic fluid metering devices, a pair of transducers can act as both transmitter and receiver; that is, one transducer acts as the transmitter at one moment, and the other as the receiver, while at another moment, the roles of the two transducers are reversed). The propagation time of the ultrasonic wave in the fluid is then calculated, using methods including zero-crossing detection and correlation analysis. Based on the downstream propagation time T... 12 and the time of backflow propagation T 21 The difference ΔT can be used to calculate the fluid velocity and flow rate.
[0090] Ultrasonic fluid metering devices often encounter zero drift when measuring small or zero flow rates, mainly due to factors such as noise, signal distortion, hardware drift, mechanical vibration, and signal strength variations. To address these issues, this disclosure presents a novel algorithm for improving the accuracy of ultrasonic fluid metering. By processing the acquired data to determine the signal-to-noise ratio (SNR) of the current waveform, and then altering the high and low level occupancy times of the self-cancelling wave in the excitation wave sequence for repeated measurements, the algorithm ultimately reduces noise and improves the accuracy of small flow rate tests. It should be noted that the accuracy improvement algorithm can run directly on the MCU (Microcontroller Unit) within the ultrasonic fluid metering device; alternatively, the algorithm can run on a computer and be remotely upgraded to execute on the MCU.
[0091] The ultrasonic fluid measurement accuracy improvement method provided in this embodiment excites a first ultrasonic transducer and enables a second ultrasonic transducer to operate by using an excitation wave sequence. It acquires the received digital signal corresponding to the excitation wave sequence based on a preset sampling window and calculates the signal-to-noise ratio (SNR) of the received digital signal within the preset sampling window. The excitation wave sequence is a combination of a main wave and a self-cancelling wave. The frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer. The SNR is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region. The method determines whether the SNR is greater than a SNR threshold. If not, it adjusts the high and low level occupancy time of the self-cancelling wave in the excitation wave sequence to obtain an adjusted excitation wave sequence. Excitation is performed again based on the adjusted excitation wave sequence until the actual SNR is greater than the SNR threshold. The excitation wave sequence corresponding to the actual SNR being greater than the SNR threshold is determined as the target excitation wave sequence. The second ultrasonic transducer is then excited according to the target excitation wave sequence. This invention provides a technique for using an ultrasonic transducer to enable a second ultrasonic transducer to perform metrological operations. This technique overcomes the limitations of related technologies where adding external components to reduce high-frequency noise increases the hardware cost of the ultrasonic fluid metrology device. Furthermore, it addresses the issue that different models of ultrasonic transducers used in ultrasonic fluid metrology devices cannot overcome the aftershock differences caused by inconsistent transducer parameters, resulting in lower metrological accuracy, simply by adding external filters. The invention achieves this by exciting the ultrasonic transducer with an excitation wave sequence including a main wave and a self-cancelling wave, and adjusting the parameters of the self-cancelling wave according to the signal-to-noise ratio of the sampled signal. This determines the excitation wave sequence suitable for the current ultrasonic transducer, significantly improving metrological accuracy without increasing hardware costs. It also overcomes the aftershock differences caused by inconsistent ultrasonic transducer parameters, expanding the applicability of the method.
[0092] This disclosure also provides a specific implementation method for improving the accuracy of ultrasonic fluid metering:
[0093] Taking the FR6043 ultrasonic fluid metering device as an example, it uses an ultrasonic transducer with a resonant frequency of 210 kHz. Six waves are excited using a frequency sweep method from 200 kHz to 230 kHz, and the waveforms are shown in Figure 2. It can be seen that simply using the main wave for excitation results in leader noise and follow-up noise, which affects the metering accuracy of the ultrasonic fluid metering device.
[0094] In this specific implementation, an excitation wave sequence was constructed. The main wave sequence consisted of 6 waves, with a frequency set to the resonant frequency of the ultrasonic transducer (210 kHz). The self-cancelling wave P consisted of 8 waves. The ultrasonic transducer was excited based on this excitation wave sequence, and the sampled waveform is shown in Figure 4. Then, during subsequent excitation, the first 6 waves in the excitation wave sequence were kept unchanged (i.e., the main wave was kept fixed). Starting from the 7th wave, the high and low level occupancy times of the subsequent eight waves were adjusted one by one (i.e., the high and low level occupancy times of the 8 self-cancelling waves were adjusted one by one). Each adjustment was fed back by calculating the signal-to-noise ratio (SNR), gradually reducing noise in the waveform signal and improving the SNR. The waveform signal acquired during the adjustment process is shown in Figure 5. When the preset adjustment time is reached, or when the maximum value of snr_avg is greater than the signal-to-noise ratio threshold, the optimization adjustment operation for the self-cancelling vibration wave is exited, and the target excitation wave sequence is obtained. The first ultrasonic transducer is excited according to the target excitation wave sequence, and the second ultrasonic transducer is enabled to work to perform the metrology operation. The waveform diagram obtained by exciting and acquiring the ultrasonic transducer based on the target excitation wave sequence is shown in Figure 6. It can be seen that the noise interference is significantly reduced, which helps to improve the metrology accuracy.
[0095] The metrology method for ultrasonic transducers provided in this disclosure has at least the following technical advantages: 1. A fixed excitation main wave ensures the peak value of the effective signal, thereby enhancing the peak value of the effective signal compared to existing methods. 2. In this example, the noise received by the main wave changes from a significantly attenuated self-vibration signal to a flat straight line with only some minor local noise. This is particularly beneficial for using shorter flow channels for measurement, thus reducing the size of the ultrasonic gas meter. 3. Without increasing any hardware costs, this method adaptively optimizes and adjusts the self-cancelling wave based solely on the signal-to-noise ratio (SNR) defined in this method, effectively reducing noise interference in the received signal. 4. The irregular excitation wave sequence obtained using the algorithm in this method overcomes the aftershock differences introduced by inconsistent transducer parameters to the greatest extent, expanding the applicable scenarios of the method.
[0096] Based on the ultrasonic fluid metering accuracy improvement method provided in the embodiments of this disclosure, the embodiments of this disclosure also provide an ultrasonic fluid metering device, as shown in FIG7, the ultrasonic fluid metering device 700 includes:
[0097] The signal-to-noise ratio (SNR) determination module 701 is configured to excite the first ultrasonic transducer and enable the second ultrasonic transducer to work by excitation wave sequence, acquire the received digital signal corresponding to the excitation wave sequence based on a preset sampling window, and calculate the SNR of the received digital signal within the preset sampling window; wherein, the excitation wave sequence is a combination of the main wave and the self-cancelling wave, the frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer, and the SNR is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region.
[0098] Through the above-described configuration, this disclosure innovatively provides a device for excitation using an excitation wave sequence comprising a main wave and a self-cancelling wave. This excitation wave sequence ensures the generation of a stable measurement waveform and helps reduce the impact of aftershocks from the ultrasonic transducer on the measurement results. However, since even minor noise and self-vibration can significantly affect the measurement results in small flow rate measurements, this disclosure further samples the received digital signal corresponding to the excitation wave sequence and calculates the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region, i.e., the signal-to-noise ratio (SNR). This allows for subsequent optimization and adjustment of the parameters of the self-cancelling wave based on the SNR, effectively reducing the self-vibration interference of the excitation transducer and further improving the measurement accuracy of the ultrasonic fluid metering device. This enables the ultrasonic fluid metering device to overcome the aftershock differences introduced by inconsistent parameters of different ultrasonic transducers, thereby expanding the applicable scenarios of the device.
[0099] In some embodiments, the ultrasonic fluid metering device 700 further includes an excitation wave sequence generation module, configured to: acquire the resonant frequency of the ultrasonic transducer; use the frequency value corresponding to the resonant frequency as the main wave frequency value corresponding to the main wave in the excitation wave sequence; use the frequency value corresponding to the non-resonant frequency as the initial frequency value of the self-extinguishing wave; generate a main wave based on the main wave frequency value, the main wave preset duty cycle, and the main wave preset wavenumber; generate a self-extinguishing wave based on the initial frequency value corresponding to the self-extinguishing wave, the initial duty cycle of the self-extinguishing wave, and the self-extinguishing wave preset wavenumber; and then combine the main wave and the self-extinguishing wave to generate an excitation wave sequence.
[0100] Based on the above settings, the aforementioned analysis shows that setting the frequency of the main wave to match the resonant frequency of the ultrasonic transducer helps ensure maximum signal transmission efficiency and strength. Simultaneously, by using a preset main wave duty cycle and main wave number, a stable main wave can be generated, further reducing signal distortion. According to a specific embodiment of this disclosure, the preset main wave duty cycle can be selected as 50% to ensure waveform symmetry and stability, thereby effectively reducing signal distortion. The selection of the preset main wave number depends on the required signal stability and measurement accuracy. Generally, a larger main wave number provides a more stable signal but increases measurement time. A suitable main wave number can be determined experimentally or by combining the required signal stability and the waveform sampling time period corresponding to the sampling window.
[0101] In some embodiments, the self-extinguishing wave includes p fixed waves with the same frequency; wherein the p high-level occupancy times and the p low-level occupancy times of the p fixed waves are the same; the frequency value of the self-extinguishing wave is outside the operating frequency range of the ultrasonic transducer.
[0102] In some embodiments, the aforementioned self-cancelling wave includes p self-cancelling wave increments or p self-cancelling wave decrements; wherein, in any increment, the high and low levels occupy the same time, and the high level occupancy time in the p increments is increasing; in any decrement, the high and low levels occupy the same time, and the high level occupancy time in the p decrements is decreasing.
[0103] The adjustment module 702 is set to determine whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold. If not, the high and low level occupancy time of the self-cancelling wave in the excitation wave sequence is adjusted to obtain the adjusted excitation wave sequence. The excitation operation is performed again according to the adjusted excitation wave sequence until the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold.
[0104] By dynamically adjusting the high and low level occupancy times of the self-cancelling wave, the self-oscillation state of the ultrasonic transducer can be effectively reduced, as well as aftershocks and background noise. The optimized self-cancelling wave can better guide the transducer's oscillation frequency to fall within the non-resonant frequency band, thereby improving the peak value of the received signal. Furthermore, by dynamically adjusting the parameters of the self-cancelling wave, adaptive optimization can be achieved. Under different transducer and environmental conditions, the parameters of the self-cancelling wave can be dynamically adjusted to achieve the optimal signal-to-noise ratio. This method has good adaptability to inconsistencies in transducer parameters and environmental changes, and can effectively cope with various complex operating conditions.
[0105] In some embodiments, the adjustment module 702 is further configured to: construct a level occupancy time array corresponding to the self-cancelling wave; wherein, the values in the level occupancy time array sequentially represent the high and low level occupancy times of p self-cancelling waves, where p is a preset wave number of the self-cancelling wave; when the signal-to-noise ratio is not greater than the signal-to-noise ratio threshold, perform the following loop operation: determine the current value to be adjusted from the level occupancy time array one by one; perform multiple value adjustments for the current value to be adjusted, calculate the actual signal-to-noise ratio corresponding to each value adjustment, and determine the adjustment value corresponding to the maximum signal-to-noise ratio among multiple actual signal-to-noise ratios, and use the adjustment value as the target value of the current value to be adjusted; traverse all values in the level occupancy time array; and end the loop operation when the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold.
[0106] By constructing an array of level occupancy times, where the values sequentially represent the high and low level occupancy times of p self-cancelling waves, and then dynamically adjusting the high and low level occupancy times of each self-cancelling wave, the transducer's self-oscillation state can be effectively reduced, as well as aftershocks and background noise. This is particularly effective in low-flow-rate measurements, significantly improving measurement accuracy and reducing zero drift. Furthermore, the adaptive adjustment of self-cancelling wave parameters adapts to different transducers and environmental conditions without requiring additional hardware costs.
[0107] In some embodiments, the adjustment module 702 is further configured to: perform multiple excitation operations to sample multiple sets of received digital signals for any adjustment of the current value to be adjusted, calculate the average signal-to-noise ratio corresponding to the multiple sets of received digital signals, and take the maximum value of the signal-to-noise ratio among the multiple average values of the signal-to-noise ratio corresponding to the multiple value adjustments as the adjustment value.
[0108] Based on the above settings, multiple excitation operations can reduce random errors in single measurements and improve the stability of the signal-to-noise ratio (SNR). Calculating the average SNR values corresponding to multiple sets of received digital signals can more accurately reflect the effect of the current adjustment value. Specifically, by determining the maximum SNR value among multiple SNR averages through multiple numerical adjustments, the optimal adjustment value can be precisely found. Furthermore, multiple numerical adjustments and SNR average calculations can avoid getting trapped in local optima, further ensuring that the found adjustment value is the globally optimal one.
[0109] In some embodiments, a preset adjustment time is set, and the adjustment module 702 is further configured to: if the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold, or the adjustment time is greater than the preset adjustment time, determine the excitation wave sequence including the current self-cancelling vibration wave as the target excitation wave sequence.
[0110] In the optimization and adjustment process of self-cancelling vibration waves, the signal-to-noise ratio (SNR) is a crucial indicator for measuring measurement accuracy. Dynamically adjusting the parameters of the self-cancelling vibration wave can effectively improve the SNR, thereby enhancing measurement accuracy and reliability. Furthermore, setting a preset adjustment time prevents the optimization process from running indefinitely, ensuring completion within a finite timeframe. This time constraint also allows for the rational allocation of computational resources, avoiding resource waste caused by prolonged optimization.
[0111] The metering module 703 is configured to determine the excitation wave sequence corresponding to the actual signal-to-noise ratio being greater than the signal-to-noise ratio threshold as the target excitation wave sequence, and to excite the first ultrasonic transducer and enable the second ultrasonic transducer to work according to the target excitation wave sequence in order to perform the metering operation.
[0112] The optimized self-canceling wave included in the target excitation wave sequence can effectively reduce the transducer's natural vibration state, reduce aftershocks and background noise, and improve signal clarity. The excitation wave sequence corresponding to an actual signal-to-noise ratio (SNR) greater than a threshold is determined as the target excitation wave sequence, ensuring that the excitation wave sequence used during metrology operations is optimal, thereby improving measurement reliability. Optimizing the SNR reduces random and systematic errors in measurement, improving the accuracy of measurement results.
[0113] The ultrasonic fluid metering device provided in this embodiment includes a signal-to-noise ratio (SNR) determination module. This module is configured to excite a first ultrasonic transducer and enable a second ultrasonic transducer to operate using an excitation wave sequence. It acquires the received digital signal corresponding to the excitation wave sequence based on a preset sampling window and calculates the SNR of the received digital signal within the preset sampling window. The excitation wave sequence is a combination of a main wave and a self-cancelling wave. The frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer, and the SNR is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region. An adjustment module is configured to determine whether the SNR is greater than a SNR threshold. If not, it adjusts the high and low level occupancy time of the self-cancelling wave in the excitation wave sequence to obtain an adjusted excitation wave sequence. The excitation operation is then performed again based on the adjusted excitation wave sequence until the actual SNR is greater than the SNR threshold. A metering module is configured to determine the excitation wave sequence corresponding to the actual SNR being greater than the SNR threshold as the target excitation wave sequence. It then excites the first ultrasonic transducer and enables the second ultrasonic transducer to operate based on the target excitation wave sequence to perform the metering operation. This invention enables the excitation of an ultrasonic transducer using an excitation wave sequence that includes a main wave and a self-cancelling wave. The parameters of the self-cancelling wave are adjusted according to the signal-to-noise ratio of the sampled signal to determine the excitation wave sequence that is suitable for the current ultrasonic transducer. This significantly improves measurement accuracy without increasing any hardware costs and overcomes the aftershock differences caused by inconsistent parameters of different ultrasonic transducers, thus expanding the applicability of the device.
[0114] This disclosure also provides a non-transitory machine-readable medium storing a computer program, wherein the computer program, when executed by a computer's processor, is configured to cause the computer to perform a method according to an embodiment of this disclosure.
[0115] This disclosure also provides a computer program product, including a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform the methods of the embodiments of this disclosure. The computer program product should be understood as a software product that primarily implements the methods described above through a computer program.
[0116] This disclosure also provides an electronic device, including: at least one processor, and a memory storing a computer program executable by the at least one processor, the computer program including instructions that, when executed by the processor, cause the processor to perform any of the above-described ultrasonic fluid measurement accuracy improvement methods.
[0117] Referring to Figure 8, a structural block diagram of an electronic device that can serve as an embodiment of the present disclosure, representing an example of hardware devices applicable to various aspects of the present disclosure, is now described. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0118] As shown in Figure 8, the electronic device includes a processor unit 801, which can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Examples of processor units 801 include, but are not limited to, MCUs, CPUs, graphics processing units (GPUs), various special-purpose artificial intelligence (AI) computing units, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor unit 801 is used to perform the various methods and processes described above. For example, in some embodiments, the method embodiments of this disclosure can be implemented as a computer program tangibly contained in a machine-readable medium, such as external storage unit 807. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device via local storage unit 802 and / or communication unit 808. In some embodiments, the processor unit 801 can be configured to perform the methods described above by any other suitable means (e.g., by means of firmware).
[0119] Specifically, the processor unit 801 can perform various appropriate actions and processes based on computer programs stored in the local storage unit 802 (which can be a ROM storage unit or other storage-enabled devices) or computer programs loaded into the local storage unit 802 (such as random access memory RAM) from the external storage unit 807. The local storage unit 802 can also store various programs and data required for the operation of the electronic device. The processor unit 801 and the local storage unit 802 are interconnected via a bus 803. The input / output (I / O) interface 804 is also connected to the bus 803.
[0120] Multiple components in the electronic device are connected to I / O interface 804, including: input unit 805, output unit 806, external storage unit 807, and communication unit 808. Input unit 805 can be any type of device capable of inputting information into the electronic device. Input unit 805 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. Output unit 806 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. External storage unit 807 may include, but is not limited to, disks and optical discs. Communication unit 808 allows the electronic device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, and / or wireless communication transceivers, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0121] Computer programs for implementing the methods of embodiments of this disclosure may be written in any combination of one or more programming languages. These computer programs may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0122] In the context of embodiments of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, or infrared systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0123] It should be noted that the term "comprising" and its variations used in this disclosure are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; and the term "some embodiments" means "at least some embodiments". The modifications of "one" and "multiple" mentioned in this disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless explicitly indicated in the context, they should be understood as "one or more".
[0124] The information and data involved in the embodiments of this disclosure (including but not limited to data set for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0125] The steps described in the method embodiments provided in this disclosure can be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of protection of this disclosure is not limited in this respect.
[0126] The term "embodiment" in this specification refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this disclosure. The appearance of this phrase in various places throughout the specification does not necessarily imply the same embodiment, nor does it imply independence from or alternative to other embodiments. The various embodiments in this specification are described in a related manner, with reference made to the same or similar parts between the embodiments. In particular, for apparatus, device, and system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, and relevant details are referred to in the description of the method embodiments.
[0127] The embodiments described above are merely illustrative of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the appended claims.
Claims
1. An ultrasonic fluid meter accuracy enhancement method, wherein, The method includes: The first ultrasonic transducer is excited by an excitation wave sequence, and the second ultrasonic transducer is enabled to work. The received digital signal corresponding to the excitation wave sequence is acquired based on a preset sampling window, and the signal-to-noise ratio of the received digital signal within the preset sampling window is calculated. The excitation wave sequence is a combination of a main wave and a self-cancelling wave. The frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer. The signal-to-noise ratio is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region. Determine whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold. If not, adjust the time occupied by the high and low levels of the self-cancelling wave in the excitation wave sequence to obtain the adjusted excitation wave sequence. Perform the excitation operation again according to the adjusted excitation wave sequence until the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold. The excitation wave sequence corresponding to the actual signal-to-noise ratio being greater than the signal-to-noise ratio threshold is determined as the target excitation wave sequence. The first ultrasonic transducer is excited according to the target excitation wave sequence, and the second ultrasonic transducer is enabled to work to perform the measurement operation.
2. The method of claim 1, wherein, The method further includes a step of generating an excitation wave sequence: The resonant frequency of the ultrasonic transducer is obtained, and the frequency value corresponding to the resonant frequency is used as the main wave frequency value corresponding to the main wave in the excitation wave sequence, and the frequency value corresponding to the non-resonant frequency is used as the initial frequency value of the self-cancelling wave. A main wave is generated based on the main wave frequency value, the main wave preset duty cycle, and the main wave preset wave number. A self-extinguishing wave is generated based on the initial frequency value corresponding to the self-extinguishing wave, the initial duty cycle of the self-extinguishing wave, and the self-extinguishing wave preset wave number. The main wave and the self-extinguishing wave are then combined to generate the excitation wave sequence.
3. The method of claim 1, wherein, The step of adjusting the high and low level occupancy times of the self-cancelling wave in the excitation wave sequence to obtain an adjusted excitation wave sequence, and then performing excitation again based on the adjusted excitation wave sequence until the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold, includes: Construct a level occupancy time array corresponding to the self-cancelling wave; wherein, the values in the level occupancy time array sequentially represent the occupancy time of high and low levels in p self-cancelling waves, where p is the preset wave number of the self-cancelling wave; When the signal-to-noise ratio (SNR) is not greater than the SNR threshold, the following loop operation is performed: determine the current value to be adjusted from the level occupancy time array one by one; perform multiple adjustments on the current value to be adjusted, calculate the actual SNR corresponding to each adjustment, and determine the adjustment value corresponding to the maximum SNR among the multiple actual SNR values, using the adjustment value as the target value of the current value to be adjusted; traverse all values in the level occupancy time array; and end the loop operation when the actual SNR is greater than the SNR threshold.
4. The method of claim 3, wherein, The step of performing multiple numerical adjustments on the current value to be adjusted, calculating the actual signal-to-noise ratio corresponding to each numerical adjustment, and determining the adjustment value corresponding to the maximum signal-to-noise ratio among the multiple actual signal-to-noise ratios further includes: For any one of the current values to be adjusted, perform multiple excitation operations to sample multiple sets of received digital signals, and calculate the average signal-to-noise ratio corresponding to the multiple sets of received digital signals; The maximum signal-to-noise ratio (SNR) value among the multiple SNR averages corresponding to the multiple numerical adjustments is taken as the adjustment value.
5. The method of claim 1, wherein, The method further includes setting a preset adjustment time: If the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold, or the adjustment time is greater than the preset adjustment time, the excitation wave sequence including the current self-cancelling vibration wave is determined as the target excitation wave sequence.
6. The method of claim 1, wherein, The self-extinguishing vibration wave includes p fixed waves with the same frequency; wherein, the p high-level occupancy times and the p low-level occupancy times of the p fixed waves are the same; the frequency value of the self-extinguishing vibration wave is outside the operating frequency range of the ultrasonic transducer.
7. The method of claim 1, wherein, The self-extinguishing vibration waves include p increasing self-extinguishing vibration waves with increasing frequencies or p decreasing self-extinguishing vibration waves with decreasing frequencies; wherein, The high and low levels in any one of the incremental waves occupy the same amount of time, and the high level occupancy time in each of the p incremental waves increases in an increasing relationship. In any one of the decreasing waves, the high and low levels occupy the same amount of time, and in the p decreasing waves, the high level occupies a decreasing amount of time.
8. An ultrasonic fluid metering device, wherein, The device includes: The signal-to-noise ratio (SNR) determination module is configured to excite a first ultrasonic transducer and enable a second ultrasonic transducer to operate by an excitation wave sequence, acquire the received digital signal corresponding to the excitation wave sequence based on a preset sampling window, and calculate the SNR of the received digital signal within the preset sampling window; wherein, the excitation wave sequence is a combination of a main wave and a self-cancelling wave, the frequency of the main wave is consistent with the resonant frequency of the ultrasonic transducer, and the SNR is the ratio of the peak-to-peak value of the received signal region to the peak-to-peak value of the noise region; The adjustment module is configured to determine whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold. If not, the module adjusts the time occupied by the high and low levels of the self-cancelling wave in the excitation wave sequence to obtain the adjusted excitation wave sequence. The excitation operation is then performed again based on the adjusted excitation wave sequence until the actual signal-to-noise ratio is greater than the signal-to-noise ratio threshold. The metering module is configured to determine the excitation wave sequence corresponding to the actual signal-to-noise ratio being greater than the signal-to-noise ratio threshold as the target excitation wave sequence, and to excite the first ultrasonic transducer and enable the second ultrasonic transducer to work according to the target excitation wave sequence in order to perform the metering operation.
9. An electronic device comprising: A processor, and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1-7.
10. A non-transitory machine-readable medium having stored thereon computer instructions, wherein, The computer instructions are configured to cause the computer to perform the method according to any one of claims 1-7.