Ultrasonic transit time combined measurement method based on threshold method and cross correlation

By combining the threshold method and cross-correlation algorithm, the wave skipping problem in ultrasonic transit time measurement under high flow velocity conditions was solved, achieving high-precision and stable flow measurement, and reducing the power consumption and cost of the measurement equipment.

CN116735908BActive Publication Date: 2026-06-12CHINA COAL TECH & ENG GRP CHONGQING RES INST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA COAL TECH & ENG GRP CHONGQING RES INST CO LTD
Filing Date
2023-06-15
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing ultrasonic transit time measurement methods are prone to wave skipping under high flow velocity conditions, resulting in large flow measurement errors. Furthermore, the cross-correlation algorithm is not accurate when the ambient temperature changes.

Method used

By combining the threshold method and the cross-correlation algorithm, the initial value of the transit time is determined by the threshold method, and the cross-correlation algorithm is used for correction. The final transit time is obtained by combining the results of the two methods.

🎯Benefits of technology

It improves the accuracy and stability of flow measurement, with a measurement accuracy of ±1%, while reducing the power consumption and cost of the measurement architecture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116735908B_ABST
    Figure CN116735908B_ABST
Patent Text Reader

Abstract

The present application relates to the threshold method and the ultrasonic wave transit time combination measurement method based on cross correlation, belongs to the ultrasonic technical field. The measurement architecture is only composed of AD acquisition unit and algorithm processing unit. The AD acquisition unit is used for converting the ultrasonic wave analog signal into digital signal;Algorithm processing unit is used to complete threshold method and cross correlation calculation, and output the final ultrasonic wave transit time. The present application combines the advantages of threshold method and cross correlation algorithm, first determines the initial value of transit time through threshold method, then determines the correction value of transit time through cross correlation algorithm, finally combines the initial value and correction value to obtain the final value of transit time. The problem of "jump wave" of transit time in the process of forward and reverse flow in high flow rate process is solved, the flow measurement accuracy and measurement stability can be guaranteed, and the measurement accuracy can reach ±1%. The measurement architecture of the present application is simple, the measurement architecture is only composed of AD acquisition unit and algorithm processing unit, the power consumption and cost can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ultrasonic technology and relates to a method for measuring ultrasonic transit time based on a combination of threshold method and cross-correlation. Background Technology

[0002] Ultrasonic transit time refers to the time it takes for an ultrasonic signal to travel from emission to reception. By measuring the transit time of ultrasonic waves during both upstream and downstream flows in a fluid, the fluid velocity and flow rate can be calculated. Ultrasonic transit time affects the accuracy of flow velocity measurement. When the received ultrasonic waveform is affected by noise interference and flow field disturbances, the ultrasonic transit time is prone to shifting forward or backward by one cycle, a phenomenon known as wave skipping. When the gas velocity in the pipe is high, the received ultrasonic amplitude fluctuates due to the compressibility of the gas, making wave skipping more frequent and leading to larger flow measurement errors.

[0003] Common algorithms used for measuring ultrasonic transit time include the threshold method and the cross-correlation algorithm. The threshold method sets a comparison threshold; when the received ultrasonic amplitude exceeds this threshold, the valid waveform is considered reached, and this comparison moment is recorded as a characteristic moment. Subtracting a fixed delay yields the ultrasonic transit time. The cross-correlation algorithm compares the received waveform with a reference waveform for similarity; the moment with the highest similarity is considered the characteristic moment, and similarly, subtracting a fixed delay gives the transit time.

[0004] The threshold method is relatively simple, but when the gas flow rate is high and the received waveform jitters violently, the wave jumping phenomenon is difficult to avoid. The reference waveform of the cross-correlation algorithm is not easy to select. When the ambient temperature changes significantly, the ultrasonic received waveform is prone to change, which leads to a decrease in the correlation between the reference waveform and the actual received waveform, and ultimately outputs incorrect results. Summary of the Invention

[0005] In view of this, the object of the present invention is to provide a combined measurement method for ultrasonic transit time based on thresholding and cross-correlation. The measurement architecture consists only of an AD acquisition unit and an algorithm processing unit. The AD acquisition unit is used to convert the ultrasonic analog signal into a digital signal; the algorithm processing unit is used to perform thresholding and cross-correlation calculations, and output the final ultrasonic transit time.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] The ultrasonic transit time measurement method based on thresholding and cross-correlation includes the following steps:

[0008] S1: Threshold method to determine the initial value of transit time

[0009] The ultrasonic sampling sequence is denoted as AD(i), i = 1 to 8192;

[0010] First, two thresholds K1 and K2 are set and compared with the ultrasonic sampling sequence. When the ultrasonic sampling sequence is first greater than or equal to the thresholds K1 and K2, the current time t1 and t2 are recorded. Second, the time t when the ultrasonic sampling sequence first changes from a negative value to a positive value in the interval t1 and t2 is searched. Finally, the time t is the ultrasonic transit time toof, which is the time of two ultrasonic cycles minus time t. This gives the ultrasonic transit times toof_s and toof_n for the upstream and downstream processes.

[0011] S2: Cross-correlation algorithm determines transit time correction value

[0012] A characteristic waveform segment of the downstream process is selected as the reference waveform X(t). The start and end times of this waveform segment are t3 and t4. t3 and t4 are the same periodic start and end points of the ultrasonic sampling sequence when it first exceeds or equals the thresholds K1 and K2.

[0013] The sampled waveform of the countercurrent process is selected as the measured waveform Y(t). The cross-correlation between the reference waveform X(t) of the downstream process and the measured waveform Y(t) of the countercurrent process is calculated. The cross-correlation function is as follows:

[0014]

[0015] When t = τ, R xy The maximum value is taken, that is, when t = τ, the correlation between the reference waveform and the measured waveform is the best;

[0016] The transit time is corrected using the following method:

[0017] 1) If t1 < τ <t2

[0018] Then tof_s=tof_s, tof_n=tof_n+T;

[0019] 2) If τ <t1-T

[0020] Then tof_s=tof_s, tof_n=tof_n-T;

[0021] Where t1 and t2 are the recording times when the ultrasonic sampling sequence in the countercurrent process first exceeds or equals the thresholds K1 and K2; tof_s and tof_n are the initial values ​​of the transit time determined by the threshold method; T is the period of the ultrasonic signal, and when the ultrasonic frequency is 200kHz, the signal period is 5us.

[0022] The beneficial effects of this invention are as follows:

[0023] First, this invention combines the advantages of the threshold method and the cross-correlation algorithm. It first determines the initial transit time using the threshold method, then determines the correction value using the cross-correlation algorithm, and finally combines the initial and correction values ​​to obtain the final transit time value. This solves the transit time "jumping" problem that easily occurs in both upstream and downstream processes at high flow rates, ensuring the accuracy and stability of flow measurement, with a measurement accuracy of ±1%.

[0024] Secondly, the measurement architecture of this invention is simple, consisting only of an AD acquisition unit and an algorithm processing unit, which can significantly reduce power consumption and cost.

[0025] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0026] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0027] Figure 1 A schematic diagram illustrating the threshold method for determining transit time;

[0028] Figure 2 The flowchart for the threshold method software is shown below.

[0029] Figure 3 For downstream reference waveform;

[0030] Figure 4 This is a diagram illustrating cross-correlation matching;

[0031] Figure 5 This is a software flowchart illustrating the overall process of this invention. Detailed Implementation

[0032] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0033] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0034] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0035] The measurement architecture consists of only an AD acquisition unit and an algorithm processing unit. The AD acquisition unit is used to convert the ultrasonic analog signal into a digital signal; the algorithm processing unit is used to perform thresholding and cross-correlation calculations, and output the final ultrasonic transit time.

[0036] The measurement process consists of the following two steps:

[0037] (1) Threshold method to determine the initial value of transit time

[0038] like Figure 1 As shown, the ultrasonic sampling sequence is denoted as AD(i), i = 1 to 8192.

[0039] First, two threshold values ​​K1 and K2 are set and compared with the ultrasonic sampling sequence. When the ultrasonic sampling sequence first exceeds or equals the thresholds K1 and K2, the current times t1 and t2 are recorded. Second, the time t at which the ultrasonic sampling sequence first changes from a negative value to a positive value within the interval t1 and t2 is searched. Finally, the time t minus two ultrasonic cycles is recorded as the ultrasonic transit time toof. The software flow of this process is as follows: Figure 2 As shown.

[0040] according to Figure 2 The software flow shown can obtain the ultrasonic transit times tof_s and tof_n for both the forward and reverse flow processes, respectively.

[0041] (2) Cross-correlation algorithm to determine transit time correction value

[0042] A characteristic waveform segment of the downstream process is selected as the reference waveform X(t), such as... Figure 3As shown. The start and end times of this waveform segment are t3 and t4 (t3 and t4 are the start and end points of the same period when the ultrasonic sampling sequence first exceeds or equals the thresholds K1 and K2).

[0043] The sampled waveform of the countercurrent process is selected as the measured waveform Y(t). The cross-correlation between the reference waveform X(t) of the downstream process and the measured waveform Y(t) of the countercurrent process is calculated. The cross-correlation function is as follows:

[0044]

[0045] From the cross-correlation function, we know that when t = τ, R xy The maximum value is taken, meaning the correlation between the reference waveform and the measured waveform is best when t = τ. For example... Figure 4 As shown.

[0046] The transit time is corrected using the following method:

[0047] 1) If t1 < τ <t2

[0048] Then tof_s=tof_s, tof_n=tof_n+T;

[0049] 2) If τ <t1-T

[0050] Then tof_s=tof_s, tof_n=tof_n-T;

[0051] Where t1 and t2 are the recording times when the ultrasonic sampling sequence in the countercurrent process first exceeds or equals the thresholds K1 and K2; tof_s and tof_n are the initial values ​​of the transit time determined by the threshold method; T is the period of the ultrasonic signal, such as 5us if the ultrasonic frequency is 200kHz.

[0052] The software flow of the entire process is as follows: Figure 5 As shown.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for measuring ultrasonic transit time based on a combination of threshold method and cross-correlation, characterized in that: The method includes the following steps: S1: The threshold method is used to determine the initial value of the transit time; The ultrasonic sampling sequence is denoted as AD(i), i=1~8192; First, set thresholds K1 and K2, where threshold K1 is less than threshold K2; compare the ultrasonic sampling sequence AD(i) with thresholds K1 and K2 respectively. When the value of the ultrasonic sampling sequence AD(i) is greater than or equal to threshold K1 for the first time, record the current time as t1; when the value of the ultrasonic sampling sequence AD(i) is greater than or equal to threshold K2 for the first time, record the current time as t2. Secondly, within the time interval [t1,t2], the moment when the value of the ultrasonic sampling sequence AD(i) first changes from a negative value to a positive value is searched and denoted as t; Finally, subtract the time of two ultrasonic signal cycles from the time t, and denote it as the ultrasonic transit time toof. Using this method, the initial values ​​of the ultrasonic transit time for the downstream and upstream processes are obtained, and denoted as toof_s and toof_n, respectively. S2: Cross-correlation algorithm determines transit time correction value; A characteristic waveform segment during the downstream process is selected as a reference waveform X(t). The start and end times of this reference waveform segment are t3 and t4, where t3 and t4 are the start and end times of the same signal period of the ultrasonic sampling sequence AD(i) during the downstream process when it is first greater than or equal to the threshold K1 and threshold K2, respectively. The sampled waveform of the reverse flow process is selected as the measured waveform Y(t); The reference waveform X(t) and the measured waveform Y(t) are cross-correlated, and the cross-correlation function is: when hour Take the maximum value, that is, when The correlation between the reference waveform and the measured waveform is the best. The initial value of the transit time is corrected using the following method: (1) If Then tof_s remains unchanged, and tof_n = tof_n + T; (2) If If tof_s remains unchanged, then tof_n = tof_n - T; Where T is the period of the ultrasonic signal; t1 is the moment when the ultrasonic sampling sequence AD(i) first becomes greater than or equal to the threshold K1 during the countercurrent process as described in S1; and t2 is the moment when the ultrasonic sampling sequence AD(i) first becomes greater than or equal to the threshold K2 during the countercurrent process as described in S1.