Time difference type gas ultrasonic flowmeter-oriented transit time measuring method and system based on frequency multiplication technology

By processing ultrasonic echo signals using frequency doubling technology and the FIGC algorithm, the accuracy and repeatability issues of traditional time-difference flowmeters in transit time measurement under noisy environments are solved, achieving high-precision and low-cost flow measurement.

CN121252913APending Publication Date: 2026-01-02ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511627218.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Traditional time-of-flight ultrasonic gas flow meters suffer from insufficient accuracy and repeatability in high-noise environments, especially in high-velocity and low-flow-rate scenarios where noise interference is significant, leading to large measurement errors.

Method used

Frequency doubling technology is used to double the frequency of the echo signal, thereby increasing the rise slope of the signal. Combined with fixed-interval guided clustering (FIGC) algorithm to remove outliers, the measurement accuracy and stability of transit time are improved.

Benefits of technology

It significantly enhances noise immunity, reduces the standard deviation of transit time measurement, especially in low-flow scenarios by 39.00%, while maintaining real-time performance and hardware compatibility, making it suitable for low-cost, low-power industrial scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121252913A_ABST
    Figure CN121252913A_ABST
Patent Text Reader

Abstract

The invention discloses a time difference type gas ultrasonic flowmeter-oriented transit time measuring method and system based on a frequency doubling technology. According to the system, by performing frequency multiplication processing on an ultrasonic echo signal, the slope of a signal rising edge is improved, and the time interval that comparator output is influenced by random noise is shortened, so that the transit time measurement precision is improved. The method comprises the steps that frequency doubling is conducted on echo signals through a frequency doubling circuit, frequency doubling signals are extracted through a band-pass filter, and then the transit time is measured through a threshold value method. Experimental results show that the technology enables the transition time measurement standard deviation to be averagely reduced by 28.73%. The relative error of flow measurement is controlled within + / -2%, the repeatability is superior to + / -0.2%, and the overall anti-noise performance is obviously superior to that of a traditional method. In order to solve the problem of cycle hopping in transit time measurement, abnormal value elimination is carried out by adopting a fixed spacing guide clustering algorithm, the calculation complexity is reduced, the real-time performance is improved, and the method has important theoretical value and wide engineering application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of flow measurement technology, specifically relating to a transit time measurement method and system based on frequency doubling technology for time-difference ultrasonic gas flow meters, which is suitable for high-precision flow measurement of ultrasonic gas flow meters. Background Technology

[0002] Ultrasonic gas flow meters are widely used in industrial flow monitoring due to their advantages such as no pressure loss, no moving parts, and easy installation. The time-of-flight method, as the mainstream measurement method, is based on calculating the transit time difference between the upstream and downstream propagation of ultrasonic waves to deduce the fluid velocity. The accuracy of the transit time measurement directly determines the accuracy of the flow calculation. When measuring with a time-of-flight ultrasonic gas flow meter, the downstream transducer A emits an ultrasonic signal, and the upstream transducer B receives the signal, measuring the propagation time of the ultrasonic wave in the pipe, i.e., the upstream transit time; the transducers are switched to receive and transmit to measure the downstream transit time; finally, the fluid flow rate is calculated using the difference between the upstream and downstream transit times, as shown in equation (1). In the formula Indicates fluid flow rate. Indicates the pipe diameter. This indicates the speed at which ultrasound propagates in a gaseous medium. Indicates sound path, This indicates the angle between the transducer installation and the pipe. The transit time, representing the flow meter's instrument coefficient, plays a decisive role in the accuracy of flow measurement. Existing transit time measurement methods mainly include cross-correlation method, threshold detection method, and model fitting method.

[0003] Cross-correlation methods calculate transit time by cross-correlation between signals, offering strong noise immunity but requiring sophisticated hardware and limiting resolution at low flow rates. Model fitting methods improve resolution for specific systems by fitting signals with mathematical models, but suffer from computational complexity and weak generalization ability. Threshold detection determines transit time by comparing the echo signal with a set threshold, offering advantages such as simple structure and strong real-time performance. However, timing accuracy is significantly affected by noise. Electromagnetic noise, thermal noise from circuits, and mechanical noise from pipeline vibrations in industrial environments can all cause fluctuations in echo signal amplitude, resulting in transit time fluctuations, i.e., random errors. This is especially pronounced in high-flow-rate scenarios where signal amplitude is weak.

[0004] The core limitation of the traditional threshold method lies in the fact that when the rise slope of the echo signal at the threshold voltage is low, the same noise voltage can lead to a large transit time measurement error. Theoretically, increasing the probe's operating frequency, increasing the probe's excitation power, or adding a signal amplification stage in the receiving circuit can improve the rise slope of the echo signal, thereby reducing noise-induced measurement errors. However, simple signal amplification will amplify noise simultaneously, and increasing the transducer's transmission frequency will exacerbate the attenuation of ultrasound waves in pipes, thus limiting its application in large-diameter pipes. Therefore, there is an urgent need for a transit time measurement technique that can enhance signal noise immunity without affecting other performance characteristics. Summary of the Invention

[0005] This invention aims to provide a transit time measurement method and system based on frequency doubling technology for time-of-flight ultrasonic gas flow meters. By doubling the frequency of the echo signal, the rise edge slope of the signal is increased, and the time interval at which the comparator output is affected by random noise is shortened, thereby improving the measurement accuracy and repeatability of the transit time. This invention solves the problem of insufficient measurement accuracy and repeatability in traditional ultrasonic transit time measurement due to the flat rise edge of the echo signal and its susceptibility to random noise interference, achieving accurate transit time measurement. This invention provides a transit time measurement method and system based on frequency doubling technology for time-difference gas ultrasonic flow meters, the specific steps of which are as follows: 1) Excitement is applied to the ultrasonic transmitting transducer to emit ultrasonic signals. The signals are transmitted in the pipe and received by the receiving transducer. The ultrasonic echo signals are amplified and high-pass filtered to remove DC components and noise. 2) The preprocessed signal from step 1) is phase-shifted by ±45° using a phase-shifting circuit to generate two orthogonal signals; 3) An analog multiplier is used to perform nonlinear multiplication of two orthogonal signals to double the frequency; 4) A second-order bandpass filter is used to filter the output signal of the multiplier to obtain the frequency harmonic signal; 5) Compare the frequency multiplier signal with the preset threshold, and generate a square wave signal after passing through the comparator. The first rising edge of the square wave signal is used as the trigger signal to end the timing. 6) The transit time is measured by capturing the rising edge trigger signal using a high-precision time-to-digital converter; 7) Collect transit time data and store it in the form of a fixed-length array. Use a clustering algorithm guided by a fixed interval to remove outliers from the stored data and select the mean of the largest cluster dataset as the final transit time.

[0006] According to a preferred embodiment of the present invention, step 3) specifically involves: converting the two orthogonal signals... and The input is multiplied by an analog multiplier. By utilizing the frequency characteristics of quadrature signal multiplication, the frequency of the output signal is made twice that of the original ultrasonic echo signal. This frequency doubling process can significantly improve the rise slope of the signal and shorten the time interval of the comparator output affected by random noise, thus providing a basis for high-precision measurement of the transit time.

[0007] According to a preferred embodiment of the present invention, step 6) specifically includes: 61) Sort the collected transit time data in ascending order to obtain the sequence. For any three consecutive data points ,like Then mark the midpoint. Suspected noise, among which This is the maximum spacing within the class. 62) Find the longest continuous dense subsequence from the sorted data, where the distance between any two points in the continuous dense subsequence is... The median of the subsequence is used as the initial cluster center. ; 63) Based on fixed class spacing According to the formula To generate several candidate centers, among which For integers, by setting The range of values ​​is determined to ensure that candidate centers cover all transit time data ranges. 64) Calculate the transit time data for each transit. With all candidate centers distance If there exists a unique candidate center distance Smaller than the maximum spacing within the class The data is assigned to the cluster; if multiple candidate centers meet the criteria, the data is assigned to the candidate center with the smallest distance; if none of the candidate centers meet the criteria, the data is marked as an outlier. 65) Calculate the mean of the data within each cluster as the final cluster center; at the same time, verify whether the maximum intra-cluster distance and the inter-cluster center distance meet the preset conditions. If they do not meet the conditions, remove outliers or recalculate the centers; finally, count the number of data points in each cluster, retain the cluster with the most points as the target cluster, remove outliers and small clusters, and calculate the mean of the target cluster data as the final transit time.

[0008] Another object of the present invention is to provide an ultrasonic transit time measurement system based on the method, comprising: The ultrasonic transducer assembly includes an ultrasonic transmitting transducer and a receiving transducer, which are installed on opposite sides of the pipe along its diameter, located upstream and downstream respectively, facing each other. The central axes of the upstream transmitting transducer and the downstream receiving transducer are completely aligned to ensure that the ultrasonic signal propagates in a straight line, and the direction of sound wave propagation is perpendicular to the horizontal axis of the pipe. horn; The signal conditioning module includes signal amplification and filtering circuits, used to amplify the ultrasonic echo signal and remove the DC component and noise from the ultrasonic echo signal; The frequency doubling processing module consists of an RC phase shifter circuit, an analog multiplier, an amplifier, and a bandpass filter. The RC phase shifter shifts the phase of the signal processed by the signal conditioning module by ±45° to generate two orthogonal signals. The analog multiplier performs nonlinear multiplication on the two orthogonal signals to double the frequency. The amplifier amplifies the amplitude of the frequency-doubled signal, and the bandpass filter filters the amplified output signal to obtain the frequency-doubled signal. The threshold comparison module uses a high-speed comparator to compare the output signal of the frequency multiplication processing module with a preset threshold. After the threshold is triggered, a zero-crossing comparison is performed. During the zero-crossing comparison, a high level is output when the signal is higher than 0V and a low level is output when it is lower than 0V, resulting in a square wave signal after the zero-crossing comparison. The timing module uses a high-precision time-to-digital converter to measure transit time by capturing the rising edge of a square wave signal. The main control unit collects transit time data, uses a fixed-interval guided clustering algorithm to remove outliers, and selects the mean of the largest cluster dataset as the final transit time.

[0009] The beneficial effects of this invention are as follows: (1) Significantly enhanced noise immunity: By doubling the frequency of the ultrasonic echo signal through frequency doubling, the rise time slope of the signal is greatly increased, which can significantly shorten the time interval during which the comparator output is affected by random noise under the same noise level. Experimental data show that in actual working conditions, the standard deviation (SD) of transit time measurement is reduced by an average of 28.73% compared with the traditional threshold method; especially in low flow scenarios, the standard deviation reduction rate can reach 39.00%. The FIGC clustering algorithm is used to remove outliers, showing excellent stability and real-time performance. Even in high-noise environments, it can effectively suppress measurement fluctuations caused by noise, which can solve the problem of accuracy degradation of the traditional threshold method in complex industrial noise.

[0010] (2) Excellent real-time performance and hardware compatibility: The frequency multiplication processing is implemented based on analog circuits (including RC phase shift circuits, multipliers, and bandpass filters), requiring no complex digital signal calculations. Furthermore, the overall time complexity of the FIGC algorithm is O(nlogn), eliminating the need for nested distance calculations and allowing direct collaboration with low-power microcontrollers and digital signal processors. The entire signal processing link latency is only in the millisecond range, fully meeting the real-time requirements of industrial flow measurement and avoiding the real-time inadequacy issues caused by the high computational complexity of other digital algorithms.

[0011] (3) Low engineering modification difficulty and controllable cost: The system structure is simple, and the core frequency doubling processing module can be integrated into the existing ultrasonic flow meter prototype as an independent unit without the need for major modifications to the core hardware such as the transducer and timing module. Compared with solutions that rely on high-speed ADCs or complex filtering algorithms, the additional hardware cost of this invention is only about 5%, and the power consumption increase is negligible, making it easy to apply in batches in low-cost, low-power industrial scenarios. Attached Figure Description

[0012] Figure 1 Schematic diagram of time-difference ultrasonic flow measurement principle; Figure 2 Comparison of time-domain threshold trigger time deviations between the original signal and the frequency-harmonic signal; Figure 3 Schematic diagram of the frequency multiplication module; Figure 4 Block diagram of an ultrasonic transit time measurement system based on frequency doubling technology; Figure 5 Time-domain comparison diagram of the original signal and its frequency harmonics; Figure 6 : Schematic diagram of the FIGC algorithm for removing outliers; Figure 7 Comparison chart of standard deviations for transit time measurements. Detailed Implementation

[0013] The system and invention of the present invention will be further described below with reference to the accompanying drawings.

[0014] like Figure 3 As shown, this invention provides a transit time measurement method based on frequency doubling technology for time-difference ultrasonic gas flow meters, which includes the following steps: 1) Excitement is applied to the ultrasonic transmitting transducer to emit ultrasonic signals. The signals are transmitted in the pipe and received by the receiving transducer. The ultrasonic echo signals are amplified and high-pass filtered to remove DC components and noise. 2) The preprocessed signal from step 1) is phase-shifted by ±45° using a phase-shifting circuit to generate two orthogonal signals; in this invention, the two orthogonal signals are generated by an RC phase-shifting circuit consisting of resistor R and capacitor C. 3) The two orthogonal signals are nonlinearly multiplied using an analog multiplier to double the frequency. This invention inputs two orthogonal signals into an analog multiplier for multiplication. Utilizing the frequency characteristics of orthogonal signal multiplication, the output signal frequency is doubled compared to the original ultrasonic echo signal. This frequency doubling process significantly improves the signal rise slope and shortens the time interval affected by random noise at the comparator output, thus providing a foundation for high-precision transit time measurement.

[0015] 4) A second-order bandpass filter is used to filter the output signal of the multiplier to obtain a frequency-doubled signal; the center frequency of the second-order bandpass filter is twice the frequency of the ultrasonic echo signal to ensure that the frequency-doubled signal is retained and noise and high-order harmonics are effectively filtered out.

[0016] 5) Compare the frequency multiplier signal with the preset threshold, and generate a square wave signal after passing through the comparator. The first rising edge of the square wave signal is used as the trigger signal to end the timing. 6) The transit time is measured by capturing the rising edge trigger signal using a high-precision time-to-digital converter; 7) Collect transit time data and store it in a fixed-length array. Use a clustering algorithm guided by a fixed interval to remove outliers from the stored data, and select the mean of the largest cluster as the final transit time. Specifically, step 7 includes: 71) Sort the collected transit time data in ascending order to obtain the sequence. For any three consecutive data points ,like Then mark the midpoint. Suspected noise, among which The maximum intra-class spacing is set to avoid interfering with the clustering results and reduce the computational load; 72) Find the longest continuous dense subsequence from the sorted data, where the distance between any two points in the continuous dense subsequence is... The median of the subsequence is used as the initial cluster center. ; 73) Based on fixed class spacing According to the formula To generate candidate centers, through calculation The range of values ​​for: , The integer value ensures that the candidate center covers the entire range of transit time data; 74) Calculate the transit time data for each transit. With all candidate centers distance If there exists a unique candidate center distance Smaller than the maximum spacing within the class The data is assigned to the cluster; if multiple candidate centers meet the criteria, the data is assigned to the candidate center with the smallest distance; if none of the candidate centers meet the criteria, the data is marked as an outlier. 75) Calculate the mean of the data within each cluster as the final cluster center; simultaneously verify that the maximum intra-cluster distance is ≤ Inter-class center distance and If the difference is within ±10%, remove the point farthest from the center within the same cluster and repeat the calculation until the constraint is met. If the distance between the centers of different clusters is not met, recalculate the center using the median within the cluster. Count the number of data points in each cluster, retain the cluster with the most points as the target cluster, remove outliers and small clusters, and calculate the mean of the target cluster data as the final transit time.

[0017] In step 71) of the present invention, suspected noise signals can be directly deleted. Preferably, if the number of data points is small, suspected noise signals can be temporarily retained and marked. The marked suspected noise signals do not participate in the dense cluster screening step in step 74). In the data point allocation verification stage in step 75), it is further determined whether they are valid data. If invalid, they are deleted. If valid, they are marked as normal signals.

[0018] In one specific embodiment of the present invention, in order to implement the above method, the present invention provides an ultrasonic transit time measurement system, which includes an ultrasonic transducer group, a signal conditioning module, a frequency doubling processing module, a threshold comparison module, a timing module and a main control unit.

[0019] Among them, such as Figure 1 The diagram illustrates the measurement principle of a time-difference ultrasonic gas flow meter. The ultrasonic transducer assembly consists of two piezoelectric transducers, A and B, which serve as the ultrasonic transmitting transducer (located upstream) and the receiving transducer (located downstream), respectively. They are installed opposite each other on both sides of the pipe diameter, with their central axes completely aligned. The angle between the sound wave propagation direction and the horizontal axis of the pipe is... Pipe inner diameter After being excited, the transmitting transducer emits an ultrasonic signal into the pipe. The signal propagates through the gas in the pipe and is received by the receiving transducer. The echo signal enters the signal conditioning module for noise reduction and amplification. This module uses an operational amplifier to construct an amplification circuit and a bandpass filter. In this embodiment, its cutoff frequency is 198kHz.

[0020] The signal conditioning module of the present invention includes signal amplification and filtering circuits for amplifying ultrasonic echo signals and removing DC components and noise from ultrasonic echo signals.

[0021] This invention improves the rise time slope of the signal by doubling the frequency of the echo signal, thus shortening the time interval at which the comparator output is affected by random noise. Figure 2 As shown, this improves the accuracy and repeatability of transit time measurement. For example... Figure 3 As shown, the core circuit of the frequency doubling processing module consists of an RC phase shifter, an analog multiplier, an amplifier, and a bandpass filter. The RC phase shifter shifts the signal processed by the signal conditioning module by ±45° phase shift, generating two orthogonal signals. The analog multiplier performs nonlinear multiplication on the two orthogonal signals to double the frequency. The amplifier amplifies the amplitude of the frequency-doubled signal, and the bandpass filter filters the amplified output signal to obtain the frequency-doubled signal. The parameters of the frequency multiplication processing module are designed based on the following: (1) Filtering and isolation circuit: Capacitor C1 and resistor R2 form a passive high-pass filter to remove the DC component of the input signal; the voltage follower is used to isolate the circuits before and after the stage.

[0022] (2) RC Phase-Shifting Circuit: Capacitor C2 and resistor R3 constitute an RC phase-shifting circuit. The parameters of C2 and R3 are determined by equation (2), so that the input... The signal generates a +45° and -45° phase shift respectively, resulting in and . (3) Multiplier: A four-quadrant analog multiplier (operating bandwidth 0~1MHz, meeting the requirements of 400kHz signal processing) is selected. and Multiply the components and output the multiplied signal. (4) Bandpass filter: A second-order VCVS filter is constructed using a high-precision operational amplifier, and the filter is precisely matched with resistors. ) and capacitor The parameters, obtained from equations (3) and (4), are the center frequency of the second-order VCVS filter. Locked at 415.57kHz (actual measured original signal frequency 220kHz, frequency multiplied to 440kHz), passband bandwidth The frequency is 143.49kHz. Harmonic components are filtered out, and the harmonic signal is extracted. The threshold comparison module of this invention employs a high-speed comparator to compare the output signal of the frequency multiplication processing module with a preset threshold. After threshold triggering, a zero-crossing comparison is performed. During the zero-crossing comparison, a high level is output when the signal is above 0V, and a low level is output when it is below 0V, thereby generating and outputting the compared square wave signal. The timing module employs a high-precision time-to-digital converter to measure the transit time by capturing the rising edge of the square wave signal.

[0023] The main control unit collects transit time data, uses a fixed-interval guided clustering algorithm to remove outliers, and selects the mean of the largest cluster dataset as the final transit time.

[0024] The main control unit further includes: a data acquisition module, a parameter configuration module, a fast clustering execution module, a clustering result analysis module, and a mean filtering module.

[0025] The following further explains the function of each module within the main control unit.

[0026] The data acquisition module is configured to collect transit time data and store the data in the form of a fixed-length array, avoiding dynamic memory allocation operations by preset array capacity; The parameter configuration module is configured to receive and store the core parameters of the fixed-interval guided clustering algorithm, including the inter-class spacing and the maximum intra-class spacing. The inter-class spacing must be greater than twice the maximum intra-class spacing to avoid cluster overlap. The maximum intra-class spacing adapts to the gross error characteristics under different scenarios. The fast clustering execution module is configured to first sort the transit time data by size, and mark the midpoints with a first-to-last distance exceeding twice the maximum intra-cluster distance as suspected noise; then find the longest dense subsequence from the sorted data to determine the initial centers; subsequently, generate candidate centers covering all data based on the initial centers; then distribute the data according to the distance between the data and the candidate centers; finally, use the intra-cluster mean as the final center to verify the clustering distance, and if it does not meet the requirement, remove outliers or recalculate the centers. The clustering result analysis module is configured to count the number of data points contained in each cluster and filter out the target cluster with the most data points through comparison calculations. The mean filtering module is configured to perform mean calculation on the transit time data in the target cluster and output the filtered transit time value to suppress random noise.

[0027] In one specific embodiment, the block diagram of the ultrasonic flow measurement system is as follows: Figure 4As shown, the timing module uses a TDC-GP22 time-to-digital converter with a minimum measurement resolution of 45ps. It supports rising edge triggering timing and communicates with the main control unit MSP430F149 via an SPI interface to meet real-time requirements. The main control unit is also responsible for controlling the transducer drive circuit to emit a 200kHz square wave signal, switching between forward and reverse flow measurement modes, processing the data using the FIGC algorithm to obtain the transit time difference, and calculating the flow rate according to formula (1).

[0028] Method Implementation Examples (1) Signal transmission and reception: The main control unit MSP430F149 outputs a trigger signal through the IO port to control the TDC to send a 200kHz excitation signal. After being amplified by high voltage, the signal drives the transducer A to transmit a 200kHz ultrasonic pulse. After the ultrasonic wave passes through the gas medium in the pipe, the echo signal is received by the transducer B.

[0029] (2) Preprocessing: The echo signal is first amplified by a programmable amplifier circuit, and then amplified by a second-order bandpass filter and an in-phase amplifier circuit to obtain a clean ultrasonic echo signal.

[0030] (3) Frequency doubling: The pre-processed signal is phase-shifted by ±45° by the RC phase-shifting circuit, and the two signals are input to the analog multiplier for multiplication to achieve frequency doubling.

[0031] (4) Filtering and Extraction: After processing with a second-order bandpass filter, the harmonic signal is extracted to suppress higher harmonics and residual noise generated during multiplication. The harmonic signal is as follows: Figure 5 As shown.

[0032] (5) Threshold comparison: A high-speed comparator is used to compare the frequency multiplication signal with the preset threshold to generate a square wave signal. The first steep rising edge of the square wave signal is used as the trigger signal for the end of timing.

[0033] (6) Timing and calculation: The trigger signal time is recorded using TDC-GP22.

[0034] (7) After removing coarse values ​​in real time using the proposed FIGC algorithm, the transit time is obtained. The main control unit calculates the transit time difference between the forward and reverse flows, substitutes it into formula (1), and obtains the measured flow rate value, such as... Figure 6 As shown.

[0035] Experimental verification On a test platform with a pipe diameter of 100 mm, the range of 0-342.36 m was measured. 3 Nine types of traffic were tested, with 100 sets of data collected for each type of traffic. The results are shown in Table 1.

[0036] Table 1 Comparison of Standard Deviation Measurements of Transit Time Table 1 shows that frequency doubling technology can significantly reduce the standard deviation of transit time measurement, decreasing it by 38.19% in static conditions to 342.36 m. 3 The rate decreased by 13.31% per hour, with an average decrease of 28.73%. Figure 7 As shown, the transit time variation range of the frequency-harmonic signal is smaller than that of the original signal, as described in Table 1 above. Figure 7 The data clearly demonstrate that the signal frequency multiplication method can effectively enhance the noise interference resistance of the threshold measurement method.

[0037] The measured transit time difference is converted into the actual measured flow rate using formula (1), and compared with the reference flow rate to obtain the relative error of the measurement. At the same time, the repeatability of the measurement is calculated. The comparison results are shown in Table 2.

[0038] Table 2 Comparison of Flow Measurement Results The results in Table 2 show that, compared with the traditional threshold measurement method, the frequency doubling signal measurement method significantly reduces the relative error of flow measurement. Specifically, the relative error is less than ±2% in the low flow range and less than ±1% in the high flow range, and the measurement repeatability is less than 0.2%, which meets the requirements for relative error and repeatability of Class I precision gas ultrasonic flow meters in the national standard ultrasonic flow meter verification procedure.

[0039] The above-described embodiments are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. Those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.

Claims

1. A transit time measurement method based on frequency doubling technology for time-difference gas ultrasonic flow meters, characterized in that, Includes the following steps: 1) Excitement is applied to the ultrasonic transmitting transducer to emit ultrasonic signals. The signals are transmitted in the pipe and received by the receiving transducer. The ultrasonic echo signals are amplified and high-pass filtered to remove DC components and noise. 2) The preprocessed signal from step 1) is phase-shifted by ±45° using a phase-shifting circuit to generate two orthogonal signals; 3) An analog multiplier is used to perform nonlinear multiplication of two orthogonal signals to double the frequency; 4) A second-order bandpass filter is used to filter the output signal of the multiplier to obtain the frequency harmonic signal; 5) Compare the frequency multiplier signal with the preset threshold, and generate a square wave signal after passing through the comparator. The first rising edge of the square wave signal is used as the trigger signal to end the timing. 6) The transit time is measured by capturing the rising edge trigger signal using a high-precision time-to-digital converter; 7) Collect transit time data and store it in the form of a fixed-length array. Use a clustering algorithm guided by a fixed interval to remove outliers from the stored data and select the mean of the largest cluster dataset as the final transit time.

2. The method according to claim 1, characterized in that, In step 2), the two quadrature signals are generated by an RC phase-shifting circuit consisting of resistor R and capacitor C. Specifically, the preprocessed signal from step 1) is... Two orthogonal signals with phase leads and lags of 45° are obtained by phase shifting by ±45° respectively. and The resistance and capacitance parameters of the RC phase-shifting circuit are given by the formula. The determined ones, among which The center frequency of the echo signal. This represents the phase offset of the signal.

3. The method according to claim 2, characterized in that, Step 3) specifically involves: converting the two orthogonal signals... and The input is multiplied by an analog multiplier. By utilizing the frequency characteristics of quadrature signal multiplication, the frequency of the output signal is made twice that of the original ultrasonic echo signal. This frequency doubling process can significantly improve the rise slope of the signal and shorten the time interval of the comparator output affected by random noise, thus providing a basis for high-precision measurement of the transit time.

4. The method according to claim 1, characterized in that, In step 4), the center frequency of the second-order bandpass filter is twice the frequency of the ultrasonic echo signal, ensuring that the harmonic signal is preserved and noise and high-order harmonics are effectively filtered out.

5. The method according to claim 1, characterized in that, Step 7) specifically includes: 71) Sort the collected transit time data in ascending order to obtain the sequence. For any three consecutive data points ,like Then mark the midpoint. Suspected noise, among which This is the maximum spacing within the class. 72) Find the longest continuous dense subsequence from the sorted data, where the distance between any two points in the continuous dense subsequence is... The median of the subsequence is used as the initial cluster center. ; 73) Based on fixed class spacing According to the formula To generate several candidate centers, among which For integers, by setting The range of values ​​is determined to ensure that candidate centers cover all transit time data ranges. 74) Calculate the transit time data for each transit. With all candidate centers distance If there exists a unique candidate center distance Smaller than the maximum spacing within the class The data is assigned to the cluster; if multiple candidate centers meet the criteria, the data is assigned to the candidate center with the smallest distance; if none of the candidate centers meet the criteria, the data is marked as an outlier. 75) Calculate the mean of the data within each cluster as the final cluster center; at the same time, verify whether the maximum intra-cluster distance and the inter-cluster center distance meet the preset conditions. If they do not meet the conditions, remove outliers or recalculate the centers; finally, count the number of data points in each cluster, retain the cluster with the most points as the target cluster, remove outliers and small clusters, and calculate the mean of the target cluster data as the final transit time.

6. The method according to claim 5, characterized in that, In step 73), The range of values ​​for satisfies: .

7. The method according to claim 5, characterized in that, In step 75), the verification process for the maximum intra-class spacing and the inter-class center distance includes: Verify if the maximum spacing within the class is ≤ If the condition is not met, the point furthest from the center within the class is removed, and the verification is repeated until the condition is met. Verify inter-class center distance and If the difference is within ±10%, the cluster center is recalculated using the intra-cluster median.

8. An ultrasonic transit time measurement system based on the method of any one of claims 1-7, characterized in that, include: The ultrasonic transducer assembly includes an ultrasonic transmitting transducer and a receiving transducer, which are installed on opposite sides of the pipe along its diameter, located upstream and downstream respectively, facing each other. The central axes of the upstream transmitting transducer and the downstream receiving transducer are completely aligned to ensure that the ultrasonic signal propagates in a straight line, and the direction of sound wave propagation is perpendicular to the horizontal axis of the pipe. horn; The signal conditioning module includes signal amplification and filtering circuits, used to amplify the ultrasonic echo signal and remove the DC component and noise from the ultrasonic echo signal; The frequency doubling processing module consists of an RC phase shifter circuit, an analog multiplier, an amplifier, and a bandpass filter. The RC phase shifter shifts the phase of the signal processed by the signal conditioning module by ±45° to generate two orthogonal signals. The analog multiplier performs nonlinear multiplication on the two orthogonal signals to double the frequency. The amplifier amplifies the amplitude of the frequency-doubled signal, and the bandpass filter filters the amplified output signal to obtain the frequency-doubled signal. The threshold comparison module uses a high-speed comparator to compare the output signal of the frequency multiplication processing module with a preset threshold. After the threshold is triggered, a zero-crossing comparison is performed. During the zero-crossing comparison, a high level is output when the signal is higher than 0V and a low level is output when it is lower than 0V, resulting in a square wave signal after the zero-crossing comparison. The timing module uses a high-precision time-to-digital converter to measure transit time by capturing the rising edge of a square wave signal. The main control unit collects transit time data, uses a fixed-interval guided clustering algorithm to remove outliers, and selects the mean of the largest cluster dataset as the final transit time.

9. The system according to claim 8, characterized in that, The main control unit includes: The data acquisition module is configured to acquire transit time data and store the data in the form of a fixed-length array, avoiding dynamic memory allocation operations by preset array capacity; The parameter configuration module is configured to receive and store the core parameters of the fixed-interval guided clustering algorithm, including the inter-class spacing and the maximum intra-class spacing. The inter-class spacing must be greater than twice the maximum intra-class spacing to avoid cluster overlap. The maximum intra-class spacing adapts to the gross error characteristics under different scenarios. The fast clustering execution module is configured to first sort the transit time data by size, and mark the midpoints with a first-to-last distance exceeding twice the maximum intra-cluster distance as suspected noise; then find the longest dense subsequence from the sorted data to determine the initial centers; subsequently, generate candidate centers covering all data based on the initial centers; then distribute the data according to the distance between the data and the candidate centers; finally, use the intra-cluster mean as the final center to verify the clustering distance, and if it does not meet the requirement, remove outliers or recalculate the centers. The clustering result analysis module is configured to count the number of data points contained in each cluster and filter out the target cluster with the most data points through comparison operations. The mean filtering module is configured to perform mean calculation on the transit time data in the target cluster and output the filtered transit time value to suppress random noise.

10. The system according to claim 9, characterized in that, In the parameter configuration module, the maximum intra-class spacing is set based on the inherent accuracy threshold of the transit time measurement system, and the inter-class spacing is dynamically adjusted according to the distribution density of the transit time data.