A waveform envelope-based ultrasonic time-of-flight correction method
By correcting the threshold comparison time through the waveform envelope time, the time deviation problem caused by the characteristic wave recognition error of the ultrasonic flowmeter under working conditions is solved, and higher anti-interference ability and reliable measurement of gas flow are achieved.
Patent Information
- Application Number
- CN202410936028.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-07-12
AI Technical Summary
The existing ultrasonic time-of-flight measurement method based on threshold comparison is easily interfered with under working conditions, resulting in incorrect identification of characteristic waves and large time deviation, which affects the accuracy and reliability of the flow meter.
The threshold comparison time is corrected by using the waveform envelope time. The macroscopic stability of the waveform envelope time and the accuracy of the threshold comparison time are utilized. The threshold comparison time is corrected by calculating the relative relationship, abnormal data is eliminated, and the anti-interference ability is improved.
It significantly improves the anti-interference ability of ultrasonic flowmeters under complex working conditions, ensuring the reliability and accuracy of gas flow measurement.
Smart Images

Figure CN118882761B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of flow metering instruments, and in particular to an ultrasonic time-of-flight correction method based on waveform envelope. BACKGROUND
[0002] As people pay more and more attention to the environment, natural gas as a clean and environmentally friendly green energy has been more and more widely concerned and applied, and the natural gas industry will develop rapidly in a long time in the future. In order to meet the development needs of the natural gas industry, especially the development needs of gas companies for natural gas metering and pipe network transmission and distribution management, under the development background of information technology, ultrasonic gas flow meters have gradually played a greater role in natural gas metering and pipe network transmission and distribution management.
[0003] At present, the flow meters mainly used in natural gas metering and pipe network transmission and distribution management in China are Roots meters and turbine meters. Both of these two types of metering instruments belong to mechanical metering instruments, and it is difficult to overcome the inherent weaknesses of mechanical metering instruments, such as high requirement for the quality of natural gas, easy to be stuck, frequent maintenance and high maintenance cost. At the same time, with the increase of the diameter of natural gas transmission pipeline, the volume, weight and price of these two types of mechanical metering instruments will increase substantially, and these weaknesses seriously restrict the development of natural gas metering and pipe network transmission and distribution management in the direction of "accuracy, stability, intelligence and high efficiency".
[0004] In order to overcome the shortcomings of mechanical metering instruments, ultrasonic flow meters have appeared in the prior art, among which time difference method ultrasonic flow meters are the main representatives. For example, a time difference method ultrasonic flow meter accurate measurement method is disclosed in Chinese patent document CN104406642A. The key to the application of time difference method is to accurately measure the time of flight of ultrasonic waves, and among them, the time of flight measurement method based on threshold comparison has become an important algorithm basis with the characteristics of high precision, low power consumption and simple implementation.
[0005] However, the biggest problem of the time of flight measurement method based on threshold comparison is that when the ultrasonic wave is distorted by various disturbances under working conditions, the feature wave recognition will become unreliable, and once an error occurs, it will lead to a large time deviation.
[0006] Therefore, in addition to the traditional threshold comparison scheme based on TDC chip, a method for feature recognition and then ultrasonic time of flight calculation using digital signal processing is disclosed in Chinese patent document CN106404084A. This method is a digital improvement of the traditional threshold comparison method based on analog signals, which can improve the anti-interference ability of the threshold comparison method within a certain range, but in actual application, with the complication of application environment, there is still a problem of insufficient anti-interference ability. SUMMARY
[0007] The present invention provides an ultrasonic flight time correction method based on waveform envelope, which can utilize the macroscopic stability of waveform envelope time, the accuracy of threshold comparison time and the stability of the relative relationship between the two to realize the correction of threshold comparison time using envelope time, solve the problem of large deviation of threshold comparison time due to characteristic wave identification error, and help the flow meter system to achieve reliable measurement of gas flow.
[0008] An ultrasonic time-of-flight correction method based on waveform envelope comprises the following steps:
[0009] (1) Under the reference state, the ultrasonic flight time based on the threshold comparison is obtained as t t0 , the maximum error is Δt t0 ; Get the ultrasonic flight time based on the waveform envelope as t b0 , the maximum error is Δt b0 ;
[0010] (2) Calculate the ultrasonic flight time t based on the waveform envelope under the reference state b0 Compared with the ultrasonic flight time t based on the threshold t0 The relative deviation Δt between bt0 =t b0 -t t0 , then Δt bt0 The maximum error is Δt t0 +Δt b0 ;
[0011] (3) Under working conditions, the ultrasonic flight time based on threshold comparison is obtained as t t , the maximum error is Δt t ; Get the ultrasonic flight time based on the waveform envelope as t b , the maximum error is Δt b ;
[0012] (4) Calculate the ultrasonic flight time t based on the waveform envelope under working conditions b Compared with the ultrasonic flight time t based on the threshold t The relative deviation Δt between bt =t b -t t , then Δt bt The maximum error is Δt t +Δt b ;
[0013] (5) Obtain the deviation value Δt between the ultrasonic flight time of the two methods based on the waveform envelope and threshold comparison under working conditions btThe deviation Δt between the ultrasonic flight time of the two methods based on the waveform envelope and threshold is compared with the baseline state bt0 The relative deviation between e =Δt bt -Δt bt0 , and the maximum error of the relative deviation is Δt e ;
[0014] (6) Calculate Δt = Δt bt -Δt bt0 -t e , and the measured value t is calculated according to the following logic t To make a correction:
[0015] When Δt∈[-Δt t0 -Δt b0 -Δt t -Δt b -Δt e , Δt t0 +Δt b0 +Δt t +Δt b +Δt e ], the correct value t of the ultrasonic flight time based on the threshold comparison is the measured value t t , that is, t = t t ;
[0016] When Δt<n·T-Δt t0 -Δt b0 -Δt t -Δt b -Δt e , when n is a non-positive integer that makes the formula valid and has the largest absolute value, t=t t +(n-1)·T; T is the cycle time of the ultrasonic wave;
[0017] When Δt>m·T+Δt t0 +Δt b0 +Δt t +Δt b +Δt e , m is the largest non-negative integer that makes this formula valid, t=t t +(m+1)·T; T is the cycle time of the ultrasonic wave.
[0018] The present invention utilizes the macroscopic stability of waveform envelope time, the accuracy of threshold comparison time, and the stability of the relative relationship between the two to realize the correction of threshold comparison time using envelope time, solves the problem of large deviation of threshold comparison time due to characteristic wave recognition error, and can significantly improve the anti-interference ability of threshold comparison algorithms.
[0019] Furthermore, the threshold comparison includes single threshold comparison, multi-threshold comparison and a zero-crossing threshold comparison method derived from the threshold comparison.
[0020] The key steps for further threshold comparison are:
[0021] Based on one or several waves in the ultrasonic beam as identification features, the characteristic waves are identified and time calculation is performed based on these characteristic waves.
[0022] Furthermore, the waveform envelope is a curve obtained by curve fitting based on ultrasonic beam sampling data, which can reflect the relationship between the change of each amplitude value in the ultrasonic beam and time.
[0023] Furthermore, the sum of the maximum errors satisfies Δt t0 +Δt b0 +Δt t +Δt b +Δt e <T / 2,T为超声波的周期。
[0024] Furthermore, the reference state is a state in which the medium is stationary and the factors affecting the calculation of the flight time are all fixed values, and the factors include the motion state, temperature, and pressure of the medium.
[0025] Furthermore, the operating state is a state in which factors affecting the calculation of the flight time deviate from a reference state, and the factors include the medium motion state, temperature, and pressure.
[0026] Furthermore, in step (5), the relative deviation t e =Δt bt -Δt bt0 It is a function of variables including medium flow rate, temperature, pressure and flow channel structure; the parameters of this function are obtained by statistical experimental data and curve fitting, or by directly using typical statistical values.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] This invention leverages the macroscopic stability of waveform envelope time, the accuracy of threshold comparison time, and the stability of the relative relationship between the two to correct the threshold comparison time using envelope time. This approach addresses the problem of large deviations in threshold comparison time due to incorrect characteristic wave identification. This correction effectively eliminates abnormal data from ultrasonic time-of-flight data based on threshold algorithms, significantly improving the anti-interference capability of threshold comparison algorithms and helping ultrasonic flowmeter systems achieve reliable gas flow measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1Schematic diagram of threshold comparison, waveform envelope and related parameters;
[0030] Figure 2 This is a flow chart of an ultrasonic time-of-flight correction method based on waveform envelope of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be described in further detail below with reference to the accompanying drawings and examples. It should be noted that the following examples are intended to facilitate understanding of the present invention and do not have any limiting effect on the present invention.
[0032] As a theoretical foundation, the principle of ultrasonic gas flow measurement is briefly described below: The principle of ultrasonic gas flow measurement is the ultrasonic time difference method, which uses the acceleration (downstream) and deceleration (backstream) effects of the fluid on the ultrasonic signal. By measuring the propagation time of the ultrasonic wave in the downstream and backstream directions, the difference between the two is used to calculate the medium flow velocity, ultimately obtaining the medium flow rate. In other words, accurately identifying the ultrasonic signal and precisely calculating its flight time are key to accurate measurement.
[0033] Among ultrasonic time-of-flight measurement solutions based on threshold comparison, the TDC chip solution is the most typical. However, this solution is an analog signal solution, directly comparing the amplitude of the analog signal with a set threshold to calculate the ultrasonic flight time. The problem is that analog signals are easily affected by interference and the set threshold is fixed or relatively fixed, making this solution unsuitable for scenarios with complex working conditions.
[0034] For example, Chinese patent document CN106404084A discloses a method for using digital signal processing to perform feature recognition and then realize ultrasonic flight time calculation. This method is a digital improvement of the traditional threshold comparison method based on analog signals. It can improve the anti-interference ability of the threshold comparison method within a certain range. However, as the application environment becomes more complicated, it still has the problem of insufficient anti-interference ability in actual applications.
[0035] To address this issue, the present invention proposes a waveform envelope-based ultrasonic time-of-flight correction method. This method leverages the macroscopic stability of the waveform envelope time, the accuracy of the threshold comparison time, and the stability of the relative relationship between the two to achieve correction of the threshold comparison time using the envelope time. A detailed description is provided below.
[0036] like Figure 1 The figure shows a schematic diagram of threshold comparison, waveform envelope and related parameters. It should be noted that the legend is only a schematic diagram set for the convenience of explanation and is not a limitation of the actual situation.
[0037] When the characteristic wave amplitude of the characteristic waveform of the ultrasonic signal is adjusted to meet the set requirements, the ultrasonic flight time calculation based on the threshold comparison will be triggered. The ultrasonic flight time obtained based on the threshold comparison is recorded as t t , the maximum error is Δt t (The reference state is recorded as t t0 and Δt t0 ); At the same time, the ultrasonic signal is converted into digital form, and the waveform envelope curve is fitted based on digital signal processing technology. The ultrasonic flight time obtained based on the waveform envelope calculation is recorded as t b , the maximum error is Δt b (The reference state is recorded as t b0 and Δt b0 It should be noted that the threshold comparison algorithm is a flight time calculation based on the microscopic characteristics of ultrasound, which is characterized by relatively accurate timing (i.e., Δt t The algorithm has a weak anti-interference ability, that is, it is easy to misjudge the waves other than the target characteristic wave as the characteristic wave, thus causing the timing error. The waveform envelope algorithm is based on the flight time calculation of the macroscopic shape of the ultrasonic wave, which has the characteristics of strong anti-interference ability but large timing error (i.e. Δt t At the same time, the flight time t based on the threshold comparison t and the time of flight t based on the waveform envelope b There is a relatively fixed deviation between the two, recorded as Δt bt , the maximum error is Δt t +Δt b (The standard state time is Δt bt0 , the maximum error is Δt t0 +Δt b0 ).
[0038] In addition, when the ultrasonic beam shape is affected and changes, as long as it does not affect the identification of the characteristic wave, the corresponding ultrasonic flight time based on threshold comparison can be considered unaffected; however, the flight time based on the waveform envelope will be affected by the change in the waveform and the change in the waveform envelope. Here, the deviation Δt between the two flight times under the working condition is defined bt The deviation Δt between the two flight times and the reference state bt0 The deviation between e , that is, t e =Δt bt -t bt0 , the maximum error is Δt e . t eIt is a function of the medium's motion state, temperature, pressure, etc., and is related to the probe characteristics and flow channel structure characteristics. In practical applications, the statistical values of experimental data can be used as a typical substitute.
[0039] Based on the above, Figure 2 As shown in the figure, follow the steps below to calibrate the threshold comparison time using the waveform envelope time:
[0040] (1) Under the reference state, the ultrasonic flight time based on the threshold comparison is obtained as t t0 , the maximum error is Δt t0 ; Get the ultrasonic flight time based on the waveform envelope as t b0 , the maximum error is Δt b0 .
[0041] (2) Calculate the flight time t based on the waveform envelope under the reference state b0 Compared with the ultrasonic flight time t based on the threshold t0 The relative deviation Δt between bt0 =t b0 -t t0 , then Δt bt0 The maximum error is Δt t0 +Δt b0 .
[0042] (3) Under working conditions, the ultrasonic flight time based on threshold comparison is obtained as t t , the maximum error is Δt t ; Get the ultrasonic flight time based on the waveform envelope as t b , the maximum error is Δt b .
[0043] (4) Calculate the flight time t based on the waveform envelope under working conditions b Compared with the ultrasonic flight time t based on the threshold t The relative deviation Δt between bt =t b -t t , then Δt bt The maximum deviation is Δt t +Δt b .
[0044] (5) Obtain the deviation value Δt between the ultrasonic flight time of the two methods based on the waveform envelope and threshold comparison under working conditions bt The deviation Δt between the ultrasonic flight time of the two methods based on the waveform envelope and threshold is compared with the baseline state bt0 The relative deviation between e =Δt bt -Δt bt0, and the maximum error of the relative deviation is Δt e .
[0045] (6) Calculate Δt = Δt bt -Δt bt0 -t e , and the measured value t is calculated according to the following logic t To make a correction:
[0046] Condition 1: When Δt∈[-Δt t0 -Δt b0 -Δt t -Δt b -Δt e , Δt t0 +Δt b0 +Δt t +Δt b +Δt e ], the correct value t of the ultrasonic flight time based on the threshold comparison is the measured value t t , that is, t = t t ;
[0047] Condition 2: When Δt<n·T-Δt t0 -Δt b0 -Δt t -Δt b -Δt e (n is a non-positive integer that makes the above equation valid and has the largest absolute value), t=t t +(n-1)·T;
[0048] Condition 3: When Δt>m·T+Δt t0 +Δt b0 +Δt t +Δt b +Δt e When (m is the largest non-negative integer that makes the equation valid), t=t t +(m+1)·T; wherein T in the above formula is the cycle time of the ultrasonic wave.
[0049] Threshold comparison methods include single threshold comparison, multi-threshold comparison, and zero-crossing threshold comparison derived from threshold comparison. As long as the method is based on one or several waves in the ultrasonic beam as the identification feature and uses this characteristic wave as the basis for time calculation, and the ultrasonic flight time obtained under the premise that the target characteristic wave is correctly identified can be accurate enough to meet the accuracy requirements of the target application, it is included in this category.
[0050] The waveform envelope is a curve obtained by curve fitting based on the ultrasonic beam sampling data, which can reflect the relationship between the amplitude values of the ultrasonic characteristic waveform and time. As long as the deviation of the ultrasonic flight time obtained based on it can meet Δt t0 +Δt b0 +Δt t +Δt b +Δt e <T / 2(T为超声波的周期)即可。
[0051] The reference state is a state in which the medium is stationary and factors affecting the calculation of the flight time, such as the temperature and pressure of the medium, are all fixed values.
[0052] The operating state is a state in which factors affecting the calculation of the flight time, such as the medium movement state, temperature, and pressure, deviate from the reference state.
[0053] Since factors such as medium flow rate, temperature, and pressure will affect the ultrasonic beam shape, the ultrasonic flight time calculated based on the waveform envelope will be affected. Therefore, when the medium state is different, the flight time based on the waveform envelope will change to a certain extent, while the flight time based on the threshold comparison can be considered unchanged when the characteristic wave is correctly identified. Therefore, the relative deviation between the envelope time and the threshold comparison time under different medium states will also have certain differences. In an ultrasonic flight time correction method based on waveform envelope, the deviation value Δt between the flight time based on the threshold comparison and waveform envelope methods under the working state and the reference state is bt and Δt bt0 The relative deviation between e =Δt bt -Δt bt0 It is a function of variables such as medium flow rate, temperature, pressure and flow channel structure. The curve of this parameter can be obtained by statistical experimental data and curve fitting. It can also be directly replaced by typical statistical values without affecting the correction logic judgment.
[0054] The present invention mainly utilizes the macroscopic stability of the waveform envelope time, the accuracy of the threshold comparison time, and the stability of the relative relationship between the two to achieve the correction of the threshold comparison time using the envelope time. Therefore, for the error values of all the above parameters, the maximum sum of the errors is theoretically required to be less than T / 2, that is: Δt t0 +Δt b0 +Δt t +Δt b +Δt e<T / 2(T为超声波的周期)。实际应用中,一方面基于阈值比较的超声波飞行时间具有较高的准确度,另一方面由于基准状态下所有影响超声波形态的参数均为稳定状态以致基准状态下波形包络时间是相对稳定的。因此可认为Δt t0 , Δt b0 and Δt t are much smaller than the waveform envelope time under the working condition, then Δt t0 +Δt b0 +Δt t +Δt b +Δt e <T / 2可简化为Δt b +Δt e <T / 2。基于此,即作为优选,基于波形包络的超声波飞行时间的计算误差应小于T / 4,且越小越好。
[0055] To further improve the reliability of the calibration, the input data used in the calibration method can be pre-screened. For example, in a valid measurement, obtaining multiple sets of ultrasonic flight times based on threshold comparison and ultrasonic flight times based on waveform envelopes and selecting the median or mean as the input for the calibration method will help improve the calibration success rate.
[0056] Based on the above method, the threshold comparison time can be corrected using the waveform envelope time, solving the problem of large deviation in the threshold comparison time due to characteristic wave identification error when the threshold comparison time is used alone as the ultrasonic flight time. It can significantly improve the anti-interference ability of the threshold comparison timing scheme, and help the ultrasonic flowmeter system to achieve reliable measurement of gas flow in complex working conditions.
[0057] The embodiments described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An ultrasonic time-of-flight correction method based on waveform envelope, characterized in that: The following steps are involved: (1) Under the reference state, the ultrasonic flight time based on the threshold comparison is obtained as t t0 , the maximum error is Δt t0 ; Get the ultrasonic flight time based on the waveform envelope as t b0 , the maximum error is Δt b0 ; (2) Calculate the ultrasonic flight time t based on the waveform envelope under the reference state b0 Compared with the ultrasonic flight time t based on the threshold t0 The relative deviation Δt between bt0 =t b0 -t t0 , then Δt bt0 The maximum error is Δt t0 +Δt b0 ; (3) Under working conditions, the ultrasonic flight time based on threshold comparison is obtained as t t , the maximum error is Δt t ; Get the ultrasonic flight time based on the waveform envelope as t b , the maximum error is Δt b ; (4) Calculate the ultrasonic flight time t based on the waveform envelope under working conditions b Compared with the ultrasonic flight time t based on the threshold t The relative deviation Δt between bt =t b -t t , then Δt bt The maximum error is Δt t +Δt b ; (5) Obtain the deviation value Δt between the ultrasonic flight time of the two methods based on the waveform envelope and threshold comparison under working conditions bt The deviation Δt between the ultrasonic flight time of the two methods based on the waveform envelope and threshold is compared with the baseline state bt0 The relative deviation between e =Δt bt -Δt bt0 , and the maximum error of the relative deviation is Δt e ; (6) Calculate Δt = Δt bt -Δt bt0 -t e , and the measured value t is calculated according to the following logic t To make a correction: When Δt∈[-Δt t0 -Δt b0 -Δt t -Δt b -Δt e , Δt t0 +Δt b0 +Δt t +Δt b +Δt e ], the correct value t of the ultrasonic flight time based on the threshold comparison is the measured value t t , that is, t = t t ; When Δt<n·T-Δt t0 -Δt b0 -Δt t -Δt b -Δt e , when n is a non-positive integer that makes the formula valid and has the largest absolute value, t=t t +(n-1)·T; T is the cycle time of the ultrasonic wave; When Δt>m·T+Δt t0 +Δt b0 +Δt t +Δt b +Δt e , m is the largest non-negative integer that makes this formula valid, t=t t +(m+1)·T; T is the cycle time of the ultrasonic wave.
2. The ultrasonic time-of-flight correction method based on waveform envelope according to claim 1, characterized in that: The threshold comparison includes single threshold comparison, multi-threshold comparison and a zero-crossing threshold comparison method derived from the threshold comparison.
3. The ultrasonic time-of-flight correction method based on waveform envelope according to claim 1, characterized in that: The key steps based on threshold comparison are: Based on one or several waves in the ultrasonic beam as identification features, the characteristic waves are identified and time calculation is performed based on these characteristic waves.
4. The ultrasonic time-of-flight correction method based on waveform envelope according to claim 1, characterized in that: The waveform envelope is a curve obtained by curve fitting based on ultrasonic beam sampling data, which can reflect the relationship between the change of each amplitude value in the ultrasonic beam and time.
5. The ultrasonic time-of-flight correction method based on waveform envelope according to claim 1, characterized in that: The sum of the maximum errors satisfies Δt t0 +Δt b0 +Δt t +Δt b +Δt e < T / 2, where T is the period of the ultrasonic wave.
6. The ultrasonic time-of-flight correction method based on waveform envelope according to claim 1, characterized in that: The reference state is a state in which the medium is stationary and the factors affecting the calculation of the flight time are all fixed values, including the medium's motion state, temperature, and pressure.
7. The ultrasonic time-of-flight correction method based on waveform envelope according to claim 1, characterized in that: The operating state is a state in which factors affecting the calculation of the flight time deviate from a reference state, and the factors include the medium motion state, temperature, and pressure.
8. The ultrasonic time-of-flight correction method based on waveform envelope according to claim 1, characterized in that: In step (5), the relative deviation t e =Δt bt -Δt bt0 It is a function of variables including medium flow rate, temperature, pressure and flow channel structure; the parameters of this function are obtained by statistical experimental data and curve fitting, or by directly using typical statistical values.
Citation Information
Patent Citations
Time-difference method ultrasonic flowmeter accurate measurement method
CN104406642A
Method for measuring gas flow rate
CN106404084A
Envelope-line-based ultrasonic flight time measurement method
CN111307234A
Flow velocity metering method of time difference type ultrasonic gas flowmeter
CN113375737A