Absolute flight time calculation method, flow velocity calculation method and system

By using template valves to match signal waves when measuring absolute flight time, the peak of the matching valve is determined to calculate absolute flight time, the calculation error problems caused by device aging and discrete sampling are solved, and higher computing accuracy and dynamic adaptability are achieved.

CN119622346APending Publication Date: 2025-03-14HANG ZHOU NANO CORE CHIP ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411475822.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

When measuring absolute flight time, device aging leads to changes in the amplitude of the sound wave, errors occur in the positioning of valves with fixed sequence numbers of threshold methods, and discrete sampling leads to valve positioning errors, resulting in calculation errors.

Method used

By finding the maximum peak position of the signal wave, intercepting the maximum valve, reducing it to form a template valve, using the template valve to match the signal wave, and determining the peak value of the matching valve to calculate the absolute flight time.

Benefits of technology

The error of the calculation results of the amplitude changes of the amplitude of the environmental signal wave is eliminated, which improves the calculation accuracy, reduces the possibility of error detection of matching valves, and dynamically adapts to the amplitude changes of the current environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622346A_ABST
    Figure CN119622346A_ABST
Patent Text Reader

Abstract

The invention relates to an absolute flight time calculation method, a flow velocity calculation method and a flow velocity calculation system, and the absolute flight time calculation method comprises the following steps: searching a maximum peak position of a waveform of a signal wave; intercepting a maximum valve according to the maximum peak position; reducing the cut maximum valve by a preset proportion to form a template valve; starting from the initial position of the waveform of the signal wave, matching the waveform of the signal wave by using a template valve to obtain a first valve which exceeds a preset similarity threshold value as a matched valve; the absolute time of flight of the signal waves is calculated using the peaks of the matched valves. According to the method for determining the matched valve disclosed by the embodiment of the invention, the error of the signal wave amplitude change caused by the environment to the calculation result is eliminated. And the calculation is more accurate. And based on the absolute flight time calculation method, the flow velocity can be calculated more quickly and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of measurement, and in particular to an absolute flight time calculation method, a flow velocity calculation method and a system. Background Art

[0002] Absolute Time of Flight is the total time required for a signal wave to propagate from one sensor to another in a fluid.

[0003] Figure 1 It is a schematic diagram of time selection points in the process of measuring absolute flight time in the prior art. Figure 1 The figure shows the pulse signal used for sampling and the signal wave to be measured (the sound wave in the figure). Figure 1 As shown, the following method can be used to measure the absolute flight time: first, use the threshold method to locate the valve with a fixed number, and use the valve with the fixed number as the matching valve. Secondly, respectively record the fixed time period T1 from the pulse start emission point to the ADC start sampling point, the time period T2 from the ADC start sampling point to the valve peak less than the threshold (the peak value of the matching valve), and the time period T3 from the time point when the sound wave reaches the receiving end transducer to the peak value of the matching valve, and the absolute flight time ABS can be calculated. tOf =T1+T2-T3.

[0004] The valve with a fixed number is used as the matching valve, and the absolute flight time ABS is calculated using the peak value of this matching valve. tof The defects are:

[0005] (1) After the device ages, the overall amplitude of the sound wave changes, which will cause the threshold to be inapplicable. The threshold method will be wrong when locating the valve with a fixed serial number as the matching valve;

[0006] (2) Figure 2 FIG. 1 is a schematic diagram showing the principle of valve positioning error caused by discrete sampling in the prior art. Figure 2 As shown, if the positioning is correct, the valve positioning threshold is exactly at the peak value of the valve with a fixed number. However, due to the ADC discrete sampling, the positioning of the valve with a fixed number may be incorrect, resulting in a large distance between the valve positioning threshold and the peak value of the valve with a fixed number, resulting in huge errors in subsequent calculations. Summary of the invention

[0007] In view of the deficiencies in the prior art, the present invention discloses a method for calculating absolute flight time, a method for calculating flow velocity and a system.

[0008] The technical solution adopted by the present invention is as follows:

[0009] A method for calculating absolute flight time comprises the following steps:

[0010] Find the maximum peak position of the signal waveform;

[0011] The largest valve was intercepted according to the maximum peak position;

[0012] The intercepted maximum valve is reduced by a predetermined ratio to form a template valve;

[0013] Starting from the initial position of the signal waveform, the template valve is used to match the signal waveform, and the first valve that exceeds a predetermined similarity threshold is used as the matching valve;

[0014] Using the peak values ​​of the matching valves, the absolute time of flight of the signal wave is calculated.

[0015] A further technical solution is that the predetermined ratio is a ratio that makes the template valve as close as possible to the first valve size of the signal waveform from an initial position.

[0016] A further technical solution is that the method of using the template valve to match the waveform of the signal wave is to start from the initial position of the signal and use the waveform of the template valve and the signal wave to perform shift cross-correlation calculation.

[0017] A further technical solution is that the calculation method of the shift cross-correlation is:

[0018]

[0019] -a≤m≤a; m∈Z

[0020] When n≤0 or n>N, f(n)=0, g(n)=0

[0021] In the above formula, R(m) is a discrete similarity sequence, f(n) is a signal waveform sequence, g(n) is a template valve sequence, m is a sequence phase offset, N is a sampled signal sequence length, and a is an offset boundary; whether R(m) exceeds a predetermined similarity threshold is examined.

[0022] A further technical solution is that the calculation method further includes a matching valve confirmation step; the confirmation step includes:

[0023] Calculate the peak-to-peak value D0 of the maximum valve of the signal waveform, reduce the peak-to-peak value D0 to obtain the first valve feature D1, and expand the peak-to-peak value D0 to obtain the second valve feature D2;

[0024] Taking the peak value of the matching valve as the maximum value, finding two valley values ​​adjacent to the peak value of the matching valve before and after as the minimum value, respectively calculating the difference between the maximum value and the two minimum values, and obtaining a first difference d1 and a second difference d2;

[0025] Calculating the matching degree between the first difference d1 and the first valve feature D1, and calculating the matching degree between the second difference d2 and the second valve feature D2;

[0026] If the degree of matching exceeds the predetermined threshold value, the obtained matching valve is determined to be the correct matching valve, and the peak value of the matching valve is used to calculate the absolute flight time of the signal wave; if the degree of matching does not exceed the predetermined threshold value, the template valve is continued to be used to match the signal wave waveform, and the next valve that exceeds the predetermined similarity threshold is used as the matching valve and is verified in the confirmation step.

[0027] A further technical solution is to multiply the peak-to-peak value D0 by the first weight value w1 to obtain the first valve feature D1 as the front peak-to-valley detection threshold, and multiply the peak-to-peak value D0 by the second weight value w2 to obtain the second valve feature D2 as the back peak-to-valley value detection threshold, wherein the first weight value w1 is less than the second weight value w2.

[0028] A further technical solution is that the matching degree is determined by the percentage of the amplitude difference, and the amplitude difference P is:

[0029]

[0030] d is the first difference d1, and D is the first valve characteristic D1, or d is the second difference d2, and D is the second valve characteristic D2.

[0031] A method for calculating flow velocity based on any of the above methods for calculating absolute flight time comprises the following steps:

[0032] Starting from the initial position of the signal waveform, the template valve is used to match the signal waveform, and the first valve that exceeds the predetermined similarity threshold is used as the matching valve; the peak value of the matching valve is used to calculate the first absolute flight time ABS TofAB ;

[0033] Calculate the first absolute flight time ABS TofAB and the second absolute flight time ABS TofBA The time difference D Tof ;

[0034] To search for position t = ABS TofAB +D Tof The search range is expanded with a predetermined radius value, and the starting position of the search range is used as the initial position. The signal waveform is matched using the template valve, and the first valve that exceeds the predetermined similarity threshold is used as the matching valve. The second absolute flight time ABS is calculated based on the peak value of the matching valve. TofBA ;

[0035] According to the first absolute flight time ABS TofAB , Second absolute flight time ABS TofBA The time difference D Tof , calculate the fluid velocity.

[0036] A method for calculating flow velocity based on any of the above methods for calculating absolute flight time comprises the following steps:

[0037] Starting from the initial position of the signal waveform, the template valve is used to match the signal waveform, and the first valve that exceeds the predetermined similarity threshold is used as the matching valve; the peak value of the matching valve is used to calculate the first absolute flight time ABS TofAB and the second absolute flight time ABS TofBA ;

[0038] Calculate the first absolute flight time ABS TofAB and the second absolute flight time ABS TofBA The time difference D Tof ;

[0039] According to the first absolute flight time ABS TofAB , Second absolute flight time ABS TofBA The time difference D Tof , calculate the fluid velocity.

[0040] A system for running any of the above-mentioned absolute flight time calculation methods, comprising a first transducer, a second transducer and an ADC sampling device, wherein the first transducer is installed on a first side of a fluid propagation channel; the second transducer is installed on a second side of the fluid propagation channel, and a connection line between the first transducer and the second transducer has an angle with the fluid propagation channel; the first transducer and the second transducer can both send out signal waves and receive signal waves; the ADC sampling device is used to sample the signal wave waveform; and further comprising a calculation module for running the calculation method, the calculation module comprising:

[0041] A maximum peak value determination module is used to find the maximum peak position of the signal waveform;

[0042] A maximum valve interception module, used for intercepting the maximum valve according to the maximum peak value;

[0043] A template valve generation module is used to reduce the maximum valve by a predetermined ratio to obtain a template valve;

[0044] The matching valve generation module starts from the initial position of the signal waveform and uses the template valve to match the waveform, and the first valve that exceeds a predetermined similarity threshold is used as the matching valve.

[0045] The beneficial effects of the embodiments of the present invention are as follows:

[0046] (1) The method for determining the matching valve shown in the embodiment of the present invention eliminates the error of the calculation result caused by the change of the signal wave amplitude caused by the environment, and the calculation is more accurate.

[0047] (2) In addition, in the process of determining the matching valve, the embodiment of the present invention uses a cross-correlation algorithm for matching, which can average the errors of individual sampling points into the overall correlation signal.

[0048] (3) The embodiment of the present invention uses a single valve cross-correlation matching algorithm to reduce false detection of matching valves.

[0049] (4) The template valve used in the embodiment of the present invention is as close as possible to the ratio of the size of the first valve of the signal waveform from the initial position, so as to select the first valve as the matching valve. Since the amplitude increment of the front and rear valves is extremely large and the difference is obvious during the start-up process of the transducer, the error in determining the matching valve can be further reduced in the process of determining the matching valve.

[0050] (5) In the embodiment of the present invention, since the template valve uses the maximum acoustic valve signal collected each time, it can dynamically adapt to the overall amplitude changes caused by the current environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of time selection points in the process of measuring absolute flight time in the prior art.

[0052] Figure 2 It is a schematic diagram of the principle of valve positioning error caused by discrete sampling in the prior art.

[0053] Figure 3 4 is a flow chart of a method for calculating absolute flight time in an embodiment of the present invention.

[0054] Figure 4 4 is another flow chart of the method for calculating the absolute flight time in an embodiment of the present invention.

[0055] Figure 5 yes Figure 4 A schematic diagram showing the principle of the calculation method in the embodiment shown.

[0056] Figure 6 4 is a flow chart of a method for calculating fluid velocity in an embodiment of the present invention.

[0057] Figure 7 4 is another flow chart of the method for calculating fluid velocity in an embodiment of the present invention.

[0058] Figure 8 yes Figure 7 The schematic diagram of the principle of accelerating the calculation speed in the embodiment shown is shown. DETAILED DESCRIPTION

[0059] The specific implementation of the present invention will be described below in conjunction with the accompanying drawings.

[0060] The valve in this article refers to a signal peak whose shape of the waveform of the signal wave in a single cycle is similar to the shape of a valve.

[0061] Embodiment 1

[0062] Embodiment 1 discloses a method for calculating the absolute flight time, in which a new method for determining a matching valve is proposed, and the absolute flight time ABS is calculated based on the peak value of the matching valve. tof . Figure 3 FIG. 1 is a flow chart of a method for calculating the absolute flight time in an embodiment of the present invention. Figure 3 As shown, the calculation method includes:

[0063] Step 1-1, find the maximum peak position of the signal waveform. Specifically, sample the waveform, traverse the sampled data, and find the maximum peak.

[0064] Step 1-2, intercept the maximum valve according to the maximum peak value. That is, take the maximum peak value as the center to obtain a data sequence of a valve cycle. The signal may change in amplitude due to environmental changes. Using the maximum valve as the basis to obtain the template valve can avoid the calculation result being affected by the environment.

[0065] Step 1-3, reduce the maximum valve by a predetermined ratio to obtain a template valve. The predetermined ratio is a ratio that makes the maximum valve as close as possible to the size of the first valve of the signal waveform, which is an empirical value. Those skilled in the art can use this as a basis to obtain the best ratio value in a specific experimental process.

[0066] Step 1-4: Starting from the initial position of the signal waveform, the template valve is used to match the waveform, and the first valve that exceeds a predetermined similarity threshold is used as the matching valve.

[0067] Specifically, the matching process starts from the initial position of the signal and uses the waveform of the template valve and the signal wave to perform shift cross-correlation calculation. The calculation method of shift cross-correlation is:

[0068]

[0069] -a≤m≤a; m∈Z

[0070] When n≤0 or n>N, f(n)=0, g(n)=0

[0071] In the above formula, R(m) is a discrete similarity sequence, f(n) is a signal waveform sequence, g(n) is a template valve sequence, m is a sequence phase offset, N is a sampled signal sequence length, and a is an offset boundary; whether R(m) exceeds a predetermined similarity threshold is examined.

[0072] By performing cross-correlation calculation to examine the orthogonality of one signal sequence with another signal sequence, the larger the result value, the higher the similarity of the two signals. The predetermined similarity threshold can be determined according to actual conditions such as the accuracy of the calculation, for example, it can be set to 90%.

[0073] Step 1-5: Calculate the absolute flight time ABS using the peak time point of the matching valve tof .

[0074] According to the method for determining the matching valve shown in the first embodiment, the error of the calculation result caused by the change of the signal wave amplitude caused by the environment is eliminated, and the calculation is more accurate.

[0075] In addition, in the process of determining the matching valve, the cross-correlation algorithm is used for matching, which can average the errors of individual sampling points to the overall correlation signal. Using a single-valve cross-correlation matching algorithm can also reduce the false detection of matching valves. And because the amplitude increment of the front and rear valves is extremely large and the difference is obvious during the transducer's oscillation process, the error in matching valve determination can be further reduced in the process of determining the matching valve.

[0076] Furthermore, since the template valve uses the maximum acoustic valve signal collected each time, it can dynamically adapt to the overall amplitude changes caused by the current environment.

[0077] Embodiment 2

[0078] Based on the calculation method of the first embodiment, the second embodiment is further optimized and a step of further verifying the matching valve is added. Figure 4 4 is another flow chart of the method for calculating the absolute flight time in an embodiment of the present invention. Figure 5 yes Figure 4 The schematic diagram of the principle of the calculation method in the embodiment shown. Figure 3 to Figure 5 Specifically, after step 4, the following verification steps are also included:

[0079] Step 1-4-1, calculate the peak-to-peak value D0 of the maximum valve of the signal waveform, that is, the difference between the peak value and the valley value of the maximum valve. Scale the peak-to-peak value D0, specifically, multiply the peak-to-peak value D0 by the first weight value w1 to obtain the first valve feature D1 as the front peak-to-valley test threshold, and multiply the peak-to-peak value D0 by the second weight value w2 to obtain the second valve feature D2 as the rear peak-to-valley test threshold, wherein the first weight value w1 < the second weight value w2.

[0080] Step 1-4-2, taking the peak value of the matching valve as the maximum value, finding the two valley values ​​adjacent to the peak value of the matching valve as the minimum value, calculating the difference between the maximum value and the two minimum values, and obtaining the first difference d1 and the second difference d2.

[0081] Step 1-4-3: Calculate the matching degree between the first difference d1 and the first valve feature D1, and calculate the matching degree between the second difference d2 and the second valve feature D2.

[0082] Furthermore, the matching degree can be determined by the percentage of the amplitude difference between the two to determine the amplitude match. The amplitude difference P is:

[0083]

[0084] d is the first difference d1, and D is the first valve characteristic D1, or d is the second difference d2, and D is the second valve characteristic D2.

[0085] Step 1-4-3: If the matching degree exceeds the predetermined threshold value, the obtained matching valve is determined to be the correct matching valve, and then proceed to step 1-5 to calculate the absolute flight time ABS based on the peak value of the matching valve. tof If the matching degree does not exceed the predetermined threshold value, the template valve is continued to be used to match the signal waveform, and the next valve that exceeds the predetermined similarity threshold is used as the matching valve and is verified in the confirmation step. The predetermined threshold value is an empirical value, and technicians in this field can set it according to actual needs in actual experiments.

[0086] Embodiment 2 adds a matching valve verification step based on embodiment 1, and uses the special characteristics of the valve to check the accuracy of the valve cross-correlation matching algorithm. If the accuracy does not meet the requirements, it continues to search for the next matching valve to increase the calculation accuracy. Figure 5 It can be seen that in this embodiment, the peak and valley values ​​of the obtained matching valve also conform to the range of the predetermined threshold value in the further verification step, and it is a correct matching valve.

[0087] Embodiment 3

[0088] Embodiment 3 discloses a flow rate calculation method based on the absolute flight time ABS calculated in any one of Embodiment 1 and Embodiment 2. tof , calculate the flow rate of the fluid.

[0089] The formula for calculating the flow rate of the fluid is:

[0090]

[0091] Where L is the surface distance between the first transducer and the second transducer, θ is the angle between the direction of signal wave emission and the direction of fluid flow, t AB is the flight time of the signal wave from the first transducer to the second transducer, t BA is the flight time of the signal wave from the second transducer to the first transducer, and v is the flow velocity of the fluid. The above formula can be obtained by those skilled in the art based on simple physical common sense and mathematical reasoning, and the specific reasoning process will not be repeated.

[0092] make:

[0093] ABS TofAB =t AB

[0094] ABS TofBA =t BA

[0095] D Tof =t BA -t AB

[0096] The calculation formula of the fluid flow rate is finally:

[0097]

[0098] It can be seen that the flow velocity v of the fluid is related to the first absolute flight time ABS TofAB , the second absolute flight time ABS TofBA , and the first absolute flight time ABS TofAB and the second absolute flight time ABS TofBA The difference between Tof Three parameters are relevant.

[0099] Know about ABS TofAB With ABS TofBA , it is necessary to measure the time difference of the signal wave from the first transducer to the second transducer, and the time difference of the signal wave from the second transducer to the first transducer. That is, it is necessary to use the first transducer A to transmit a signal wave, and the second transducer B to receive it, and use ADC to collect the waveform of the signal wave collected by the second transducer B and perform calculations. Then the two are swapped, and the second transducer B is used to transmit a signal wave, and the first transducer A receives it.

[0100] Embodiment 1 and Embodiment 2 propose to calculate ABS Tof And this method is more accurate. Figure 6 FIG. 1 is a flow chart of a method for calculating fluid velocity in an embodiment of the present invention. Figure 6 As shown, based on this, the fluid flow rate calculation method of the third embodiment can be:

[0101] Starting from the initial position of the signal waveform, the template valve is used to match the signal waveform, and the first valve that exceeds the predetermined similarity threshold is used as the matching valve; the peak value of the matching valve is used to calculate the first absolute flight time ABS TofAB , and then match the template valve to the signal waveform to obtain the second absolute flight time ABS TofBA ;

[0102] Calculate the first absolute flight time ABS TofAB and the second absolute flight time ABS TofBA The time difference D Tof ;

[0103] According to the first absolute flight time ABS TofAB , Second absolute flight time ABS TofBA The time difference D Tof , calculate the fluid velocity.

[0104] According to the formula above, we can know that the time difference D Tof Defined as D Tof =t BA -t AB , but in actual applications, due to the time difference D Tof The accuracy is extremely high, so it is preferred not to use D directly. Tof =t BA -t AB The basic idea is that since the two sound wave signals have the same excitation, the waveform difference between the signals is not large, and there is only a position deviation in the time dimension. The two sound wave signals are shifted in time phase, and cross-correlation is performed after each shift. The time deviation of the two signals with the same excitation source at the maximum similarity under the current ADC sampling rate accuracy can be obtained, that is, the time difference D Tof This calculation method is a prior art and will not be described in detail in this article.

[0105] Embodiment 4

[0106] Embodiment 4 further improves the method for calculating the fluid velocity of Embodiment 3, and proposes a method for calculating the fluid velocity v at a faster speed. Figure 7 FIG. 2 is another flow chart of the method for calculating fluid velocity in an embodiment of the present invention. Figure 7 As shown, the following steps are included:

[0107] Step 2-1: Calculate the first absolute flight time ABS TofAB ;

[0108] Step 2-2: Calculate the time difference DTof .

[0109] Step 2-3, search position t = ABS TofAB +D Tof As the center point, a search range is expanded with a predetermined radius value, and the position of the search range is used as the initial position. The waveform is matched using the template valve, and the first valve that exceeds the predetermined similarity threshold is used as the matching valve, and the second absolute flight time ABS is calculated. TofBA .

[0110] Step 2-4: According to the first absolute flight time ABS TofAB , Second absolute flight time ABS TofBA The time difference D Tof , calculate the fluid velocity.

[0111] Using the method in the first or second embodiment, the first absolute flight time ABS can be calculated. TofAB However, in the fourth embodiment, it is not necessary to repeat this method to recalculate the second absolute flight time ABS. TofBA Since the first absolute flight time ABS has been calculated TofAB The value of, and the time difference D can be calculated by other means Tof , then it can be estimated that the matching valve passes through the second absolute flight time ABS TofAB The approximate position after that only needs to be in ABS TofAB +D Tof It is sufficient to search for matching valves nearby, which can accelerate the search for matching valves, reduce the amount of calculation, and speed up the calculation.

[0112] Figure 8 yes Figure 7 The schematic diagram of the principle of accelerating the calculation speed in the embodiment shown is shown in FIG. Figure 8 As shown, the up waveform shows the calculation of the first absolute flight time ABS TofAB The pink waveform is the template valve. The template valve is searched for matching from the initial position of the signal wave until a matching valve is found. This is a large-scale sequence shift calculation process. The down waveform shows the calculation of the second absolute flight time ABS. TofBA In the embodiment of the present invention, the time difference D is calculated by other means. Tof , but the time difference D Tof In physical terms, Figure 7 T1-T2 (also known as the first absolute flight time ABS) TifAB and the second absolute flight time ABS TofBAThe difference between T1 and T2 is therefore located at T1+D. Tof Nearby areas, so can be in ABS TofAB +D Tof The search for matching valves nearby is a local sequence shift calculation related process, which can accelerate the search for the first valve.

[0113] Embodiment 5

[0114] Based on the first embodiment, the fifth embodiment discloses a system for calculating the absolute flight time, which can be used to implement the absolute flight time calculation method, including a first transducer, a second transducer and an ADC sampling device, wherein the first transducer is installed on the first side of the fluid propagation channel. The second transducer is installed on the second side of the fluid propagation channel, and the connecting line between the first transducer and the second transducer has an angle with the fluid propagation channel. The first transducer and the second transducer can both send signal waves and receive signal waves. The ADC sampling device is used to sample the signal wave waveform. It also includes a calculation module for running the calculation method, and the calculation module includes:

[0115] The maximum peak value determination module is used to find the maximum peak position of the signal waveform.

[0116] The maximum valve interception module is used to intercept the maximum valve according to the maximum peak value.

[0117] The template valve generation module is used to reduce the maximum valve by a predetermined ratio to obtain a template valve.

[0118] The matching valve generation module starts from the initial position of the signal waveform and uses the template valve to match the waveform, and the first valve that exceeds a predetermined similarity threshold is used as the matching valve.

[0119] Furthermore, in order to perform the verification step in the second embodiment, the fifth embodiment may further include a verification module, and the verification module includes:

[0120] The peak-to-peak value calculation module is used to calculate the peak-to-peak value D0 of the maximum valve of the signal waveform, and scale the peak-to-peak value D0 to obtain the first valve feature D1 and the second valve feature D2.

[0121] The difference calculation module is used to calculate the peak value of the matching valve as the maximum value, find the two valley values ​​adjacent to the peak value of the matching valve as the minimum value, and calculate the difference between the maximum value and the two minimum values.

[0122] The matching degree determination module is used to calculate the matching degree between the first difference d1 and the first valve feature D1, and to calculate the matching degree between the second difference d2 and the second valve feature D2.

[0123] The judgment module determines that the obtained matching valve is the correct matching valve if the matching degree exceeds the predetermined threshold value, and returns the data to the calculation module to calculate the absolute flight time ABS based on the peak value of the matching valve. tof If the matching degree does not exceed the predetermined threshold value, the data is also returned to the calculation module, and the template valve is continued to be used to match the signal waveform. The next valve that exceeds the predetermined similarity threshold is used as the matching valve and is verified in the confirmation step.

[0124] The above description is an explanation of the present invention, not a limitation of the present invention. The scope of the present invention is defined in the claims. The present invention may be modified in any form without violating the basic structure of the present invention.

Claims

1. A method for calculating absolute flight time, characterized in that: The following steps are involved: Find the maximum peak position of the signal waveform; The largest valve was intercepted according to the maximum peak position; The intercepted maximum valve is reduced by a predetermined ratio to form a template valve; Starting from the initial position of the signal waveform, the template valve is used to match the signal waveform, and the first valve that exceeds a predetermined similarity threshold is used as the matching valve; Using the peak values ​​of the matching valves, the absolute time of flight of the signal wave is calculated.

2. The method for calculating the absolute flight time according to claim 1, characterized in that: The predetermined ratio is a ratio that makes the template valve as close as possible to the first valve size of the signal waveform from the initial position.

3. The method for calculating the absolute flight time according to claim 1, characterized in that: The method of using the template valve to match the waveform of the signal wave is to start from the initial position of the signal and perform shift cross-correlation calculation using the waveform of the template valve and the signal wave.

4. The method for calculating the absolute flight time according to claim 3, characterized in that: The calculation method of the shift cross-correlation is: -a≤m≤a; m∈Z When n≤0 or n>N, f(n)=0, g(n)=0 In the above formula, R(m) is a discrete similarity sequence, f(n) is a signal waveform sequence, g(n) is a template valve sequence, m is a sequence phase offset, N is a sampled signal sequence length, and a is an offset boundary; whether R(m) exceeds a predetermined similarity threshold is examined.

5. The method for calculating the absolute flight time according to claim 1, characterized in that: The calculation method further includes a confirmation step of matching the valve; the confirmation step includes: Calculate the peak-to-peak value D0 of the maximum valve of the signal waveform, reduce the peak-to-peak value D0 to obtain the first valve feature D1, and expand the peak-to-peak value D0 to obtain the second valve feature D2; Taking the peak value of the matching valve as the maximum value, finding two valley values ​​adjacent to the peak value of the matching valve before and after as the minimum value, respectively calculating the difference between the maximum value and the two minimum values, and obtaining a first difference d1 and a second difference d2; Calculating the matching degree between the first difference d1 and the first valve feature D1, and calculating the matching degree between the second difference d2 and the second valve feature D2; If the degree of matching exceeds the predetermined threshold value, the obtained matching valve is determined to be the correct matching valve, and the peak value of the matching valve is used to calculate the absolute flight time of the signal wave; if the degree of matching does not exceed the predetermined threshold value, the template valve is continued to be used to match the signal wave waveform, and the next valve that exceeds the predetermined similarity threshold is used as the matching valve and is verified in the confirmation step.

6. The method for calculating the absolute flight time according to claim 5, characterized in that: Multiply the peak-to-peak value D0 by the first weight value w1 to obtain the first valve feature D1 as the front peak-to-valley detection threshold, and multiply the peak-to-peak value D0 by the second weight value w2 to obtain the second valve feature D2 as the back peak-to-valley detection threshold, wherein the first weight value w1 < the second weight value w2.

7. The method for calculating the absolute flight time according to claim 5, characterized in that: The degree of matching is determined by the percentage of the amplitude difference, and the amplitude difference P is: d is the first difference d1, and D is the first valve characteristic D1, or d is the second difference d2, and D is the second valve characteristic D2.

8. A flow velocity calculation method based on the absolute flight time calculation method according to any one of claims 1 to 7, characterized in that: The following steps are involved: Starting from the initial position of the signal waveform, the template valve is used to match the signal waveform, and the first valve that exceeds the predetermined similarity threshold is used as the matching valve; the peak value of the matching valve is used to calculate the first absolute flight time ABS TofAB ; Calculate the first absolute flight time ABS TofAB and the second absolute flight time ABS TofBA The time difference D Tof ; To search for position t = ABS TofAB +D Tof The search range is expanded with a predetermined radius value, and the starting position of the search range is used as the initial position. The signal waveform is matched using the template valve, and the first valve that exceeds the predetermined similarity threshold is used as the matching valve. The second absolute flight time ABS is calculated based on the peak value of the matching valve. TofBA ; According to the first absolute flight time ABS TofAB , Second absolute flight time ABS TofBA The time difference D Tof , calculate the fluid velocity.

9. A flow velocity calculation method based on the absolute flight time calculation method according to any one of claims 1 to 7, characterized in that: Starting from the initial position of the signal waveform, the template valve is used to match the signal waveform, and the first valve that exceeds the predetermined similarity threshold is used as the matching valve; the peak value of the matching valve is used to calculate the first absolute flight time ABS TofAB and the second absolute flight time ABS TofBA ; Calculate the first absolute flight time ABS TofAB and the second absolute flight time ABS TofBA The time difference D Tof ; According to the first absolute flight time ABS TofAB , Second absolute flight time ABS TofBA The time difference D Tof , calculate the fluid velocity.

10. A system for executing the absolute flight time calculation method according to any one of claims 1 to 7, characterized in that: The invention comprises a first transducer, a second transducer and an ADC sampling device, wherein the first transducer is installed on a first side of a fluid propagation channel; the second transducer is installed on a second side of the fluid propagation channel, and a connection line between the first transducer and the second transducer and the fluid propagation channel has an angle; the first transducer and the second transducer can both send out signal waves and receive signal waves; The ADC sampling device is used to sample the signal waveform; it also includes a calculation module for running the calculation method, and the calculation module includes: A maximum peak value determination module is used to find the maximum peak position of the signal waveform; A maximum valve interception module, used for intercepting the maximum valve according to the maximum peak value; A template valve generation module is used to reduce the maximum valve by a predetermined ratio to obtain a template valve; The matching valve generation module starts from the initial position of the signal waveform and uses the template valve to match the waveform, and the first valve that exceeds a predetermined similarity threshold is used as the matching valve.