Waveform selection method, device, equipment and storage medium for ultrasonic measurement

By collecting and screening the peak deviations of the downstream and countercurrent echoes in ultrasonic metering technology, and selecting waveform features that meet preset requirements, the problem that the similarity of forward and reverse waveforms affects the measurement accuracy is solved, and higher measurement accuracy is achieved and efficiency.

CN118885787BActive Publication Date: 2024-12-20ZHEJIANG CHINT INSTR & METER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411338897.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-20
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

In ultrasonic metering technology, the similarity of the forward and reverse waveforms affects the measurement accuracy, resulting in large measurement errors and making it difficult to accurately calculate the instantaneous flow.

Method used

By collecting the downstream and countercurrent echoes at different times, calculating their peak deviation, selecting waveform features that meet the preset requirements, and using the correlation method to perform ultrasonic measurement, thereby improving the measurement accuracy.

Benefits of technology

By screening waveform features closer to the ideal situation, the accuracy and efficiency of ultrasonic metering are improved, the measurement error is reduced, and more accurate flow metering is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885787B_ABST
    Figure CN118885787B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of ultrasonic measurement technology, and in particular to a waveform selection method, device, equipment and storage medium for ultrasonic measurement. The method comprises: collecting downstream echoes and upstream echoes at different times; calculating the peak deviation of the downstream echoes and upstream echoes at different times, wherein the peak deviation is the difference in the number of waveforms between the first wave peak value and the highest peak value in the downstream echoes and upstream echoes; selecting the downstream echoes and upstream echoes that meet the preset requirements according to the peak deviation, and using the correlation method for ultrasonic measurement. In this embodiment, by acquiring the downstream echoes and upstream echoes at multiple times, the peak deviation of the downstream echoes and upstream echoes is calculated as a waveform feature, and the downstream echoes and upstream echoes are screened based on the waveform feature, thereby selecting a good waveform that is closer to the ideal situation for correlation method calculation, thereby improving the measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ultrasonic measurement, and in particular to a waveform selection method, device, equipment and storage medium for ultrasonic measurement. Background Art

[0002] Ultrasonic metering technology in the field of gas metering is a technology that uses the ultrasonic propagation and measurement principles to achieve gas flow measurement. Compared with the complex mechanical structure of diaphragm gas meters, fully electronic ultrasonic metering technology has the advantages of higher accuracy, wider measurement range, higher reliability and stability, and better pollution resistance. Therefore, ultrasonic metering technology has achieved rapid development in recent years. When calculating instantaneous flow, the correlation method is used, that is, the instantaneous flow is calculated by obtaining the time difference between the forward and reverse waveforms. From the principle of correlation calculation, it can be seen that the more similar the forward and reverse waveforms are, the higher the accuracy of the error. However, since the ultrasonic echo is affected by the characteristics and excitation of the transducer itself, the flow field and other factors, the echo waveform may change. When the oscilloscope is used to observe the similarity of the waveform, there is a large error, which further reduces the measurement accuracy when ultrasonic metering is used. Summary of the invention

[0003] In view of this, the present invention provides a waveform selection method, device, equipment and storage medium for ultrasonic measurement to solve the problem of using an oscilloscope to determine similar echoes for measurement and the measurement accuracy disclosure.

[0004] In a first aspect, the present invention provides a waveform selection method for ultrasonic measurement, the method comprising: collecting downstream echoes and upstream echoes at different times; calculating the peak deviation of the downstream echoes and upstream echoes at different times, the peak deviation being the difference in the number of waveforms between the first wave peak and the highest peak in the downstream echoes and upstream echoes; selecting the downstream echoes and upstream echoes that meet preset requirements according to the peak deviation, and performing ultrasonic measurement using a correlation method.

[0005] The waveform selection method for ultrasonic measurement provided by the embodiment of the present invention obtains downstream echoes and upstream echoes at multiple times, calculates the peak deviations of the downstream echoes and upstream echoes as waveform features, and screens the downstream echoes and upstream echoes based on the waveform features, thereby selecting a good waveform that is closer to the ideal situation for correlation method calculation, thereby improving the measurement accuracy.

[0006] In an optional embodiment, downstream echoes and upstream echoes that meet preset requirements are selected based on peak deviation, including: obtaining a peak deviation threshold; judging the relationship between the peak deviation of the downstream echo and the upstream echo and the peak deviation threshold; and taking the downstream echo and the upstream echo whose peak deviation is less than or equal to the peak deviation threshold as the downstream echo and the upstream echo that meet the preset requirements.

[0007] In this embodiment, the peak deviation threshold is first obtained, and then the downstream echo and upstream echo corresponding to the peak deviation less than or equal to the peak deviation threshold are taken as echoes that meet the preset requirements, thereby realizing the screening of good waveforms in the echo, thereby improving the measurement accuracy.

[0008] In an optional embodiment, obtaining a peak deviation threshold includes: obtaining a preset number of consecutive peak deviations in real time; calculating the proportion of each peak deviation in the multiple peak deviations; selecting peak deviations whose proportion is greater than or equal to a proportion threshold; and determining a peak deviation threshold based on a smaller peak deviation among the selected peak deviations.

[0009] In this embodiment, in order to avoid the situation where the preset peak deviation threshold is not able to be screened out, multiple peak deviations are obtained, and the peak deviation threshold is determined according to the proportion of the multiple peak deviations, so that the determined peak deviation threshold is more in line with the actual situation.

[0010] In an optional embodiment, a peak deviation threshold is determined based on a smaller peak deviation among the selected peak deviations, including: when the selected peak deviation includes multiple different peak deviations, the peak deviation threshold is determined based on the smaller peak deviation among the peak deviations; when the selected peak deviation includes a single peak deviation, and the single peak deviation is the maximum value among the multiple peak deviations obtained, the peak deviation threshold determined in the previous sampling period is used, and the peak deviation is re-acquired to determine the peak deviation threshold.

[0011] In this embodiment, when determining the peak deviation threshold, if there is only one peak deviation whose proportion is greater than the proportion threshold and it is the maximum value, it is not used as the peak deviation threshold, ensuring that the screening function of downstream echoes and upstream echoes can be realized according to the peak deviation threshold.

[0012] In an optional embodiment, downstream echoes and upstream echoes that meet preset requirements are selected according to the peak deviation, and ultrasonic measurement is performed using a correlation method, including: when the peak deviation is greater than the peak deviation threshold, re-collecting the downstream echoes and upstream echoes at the current moment; when the re-collected downstream echoes and upstream echoes do not meet the preset requirements, continuing to re-collect; when the number of re-collections is greater than the collection threshold and the re-collected downstream echoes and upstream echoes do not meet the preset requirements, ultrasonic measurement is performed based on the re-collected downstream echoes and upstream echoes using a correlation method.

[0013] In this embodiment, when the peak deviation is greater than the peak deviation threshold, echo collection is immediately performed again. If an echo that meets the preset requirements is not collected within the preset number of times, it means that there is a problem with the determined peak deviation threshold. Therefore, the collected echo is directly used for ultrasonic measurement to improve the measurement efficiency.

[0014] In an optional embodiment, collecting downstream echoes and upstream echoes at different times includes: obtaining an excitation frequency of an ultrasonic signal emitted in an ultrasonic metering device; determining a sampling frequency of the echo according to the excitation frequency; and collecting downstream echoes and upstream echoes at different times according to the sampling frequency.

[0015] In this embodiment, the sampling frequency is determined according to the excitation frequency to ensure that the shape of the collected echo can be identified, thereby finding each peak value of the echo.

[0016] In an optional embodiment, the flow rate obtained by ultrasonic measurement is expressed by the following formula:

[0017]

[0018] In the formula, is the cross-sectional area of ​​the flow channel, is the coefficient for converting linear velocity into surface velocity, is the speed of sound, For the sound path, is the angle between the gas flow direction and the ultrasonic propagation direction, It is the waveform calculation result obtained by using downstream echo and upstream echo that meet the preset requirements.

[0019] In this embodiment, the above formula is used to calculate and perform ultrasonic measurement, thereby achieving accurate measurement of the flow rate.

[0020] In a second aspect, the present invention provides a waveform selection device for ultrasonic measurement, the device comprising: an echo acquisition module, used to collect downstream echoes and upstream echoes at different times; a calculation module, used to calculate the peak deviation of the downstream echoes and upstream echoes at different times, the peak deviation being the difference in the number of waveforms between the first wave peak and the highest peak in the downstream echoes and upstream echoes; a measurement module, used to select downstream echoes and upstream echoes that meet preset requirements according to the peak deviation, and perform ultrasonic measurement using a correlation method.

[0021] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the waveform selection method for ultrasonic measurement according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0022] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the waveform selection method for ultrasonic metrology according to the first aspect or any corresponding embodiment thereof.

[0023] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the waveform selection method for ultrasonic metrology according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 is a flow chart of a waveform selection method for ultrasonic measurement according to an embodiment of the present invention;

[0026] Figure 2 and Figure 3 is a schematic diagram of a forward waveform and a reverse waveform collected at different times according to an embodiment of the present invention;

[0027] Figure 4 is a flow chart of another waveform selection method for ultrasonic measurement according to an embodiment of the present invention;

[0028] Figure 5 is a schematic diagram of a transducer transmitting an ultrasonic signal and receiving a waveform according to an embodiment of the present invention;

[0029] Figure 6 is a structural block diagram of a waveform selection device for ultrasonic measurement according to an embodiment of the present invention;

[0030] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0032] According to an embodiment of the present invention, an embodiment of a waveform selection method for ultrasonic metrology is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] In this embodiment, a waveform selection method for ultrasonic measurement is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 1 FIG. 1 is a flow chart of a waveform selection method for ultrasonic measurement according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0034] Step S101, collecting downstream echoes and upstream echoes at different times. Specifically, the waveform selection method of this embodiment can be used in equipment that uses the correlation method for ultrasonic measurement, and when using the correlation method, it is necessary to determine the time shift of the waveform according to the similarity of the downstream and upstream waveforms, and calculate the flow rate according to the time difference determined by the time shift. Among them, in the related art, when performing similarity analysis, the methods commonly used are covariance method, correlation coefficient method, slope method, and morphological feature method. The calculation is complex, and it is difficult to use it to realize waveform selection and distinction in embedded software, and it affects the measurement accuracy. Therefore, the waveform selection method provided in this embodiment does not need to undergo complex calculations, and waveform selection is performed through waveform characteristics, thereby improving the measurement accuracy.

[0035] Specifically, when collecting echoes, a transducer can be used. For example, in a certain device, an upstream transducer and a downstream transducer are included. The signal output by the upstream transducer is collected by the downstream transducer to obtain a downstream echo; the signal output by the downstream transducer is collected by the upstream transducer to obtain an upstream echo. When collecting, a certain sampling frequency can be used to obtain downstream echoes and upstream echoes at different times.

[0036] Step S102, calculate the peak deviation of the downstream echo and the upstream echo at different times, the peak deviation is the difference in the number of waveforms between the first wave peak and the highest peak in the downstream echo and the upstream echo. Specifically, the echo shape excited by the transducer presents a plurality of continuous sinusoidal waveforms with peak values ​​changing from low to high and then from high to low, and the period of each waveform is approximately equal. Figure 2 and Figure 3 As shown, the downstream echo and upstream echo collected at different times are shown. Figure 2 and Figure 3In the figure, the horizontal axis is the sampling time point, the vertical axis is the amplitude, and date1 and date2 are the eight peaks on both sides of the highest peak connected by a broken line to facilitate the observation of echo waveform changes. Ideally, the peak changes of the forward and reverse waveforms are consistent. After being disturbed, the first few waveforms are basically consistent, and the subsequent waveforms change significantly. When the flow rate is small, such as when the flow rate is 0, the peak values ​​of the forward and reverse waveforms should be consistent, but in practice, due to the influence of the transducer itself, the influence of the flow field, electromagnetic interference, etc., the waveform is distorted, and the position of the peak of the highest peak in the echo changes, that is, it is not at the corresponding position.

[0037] When the transducer excitation rule remains stable, the forward and reverse waveforms can be observed through an oscilloscope. Ideally, the number of waveforms appearing from the first wave peak to the highest peak is stable and a constant value. However, when the waveform is disturbed, the number of waveforms will change. Therefore, this embodiment uses the difference in the number of waveforms appearing from the first wave peak to the highest peak of the forward and reverse waveforms as the waveform feature. For example, Figure 2 In the example, the forward and reverse waveforms go through 10 and 12 cycles respectively, then Figure 2 The peak deviation shown is 12-10=2. Figure 3 In the example, the forward and reverse waveforms undergo 11 and 12 cycles respectively. Figure 3 The peak deviation shown is 12-11=1.

[0038] Step S103, select the downstream echo and upstream echo that meet the preset requirements according to the peak deviation, and use the correlation method to perform ultrasonic measurement. Specifically, when selecting the downstream echo and upstream echo according to the peak deviation, that is, the waveform characteristics, the echo with a smaller peak deviation is selected to participate in the correlation method operation. Among them, the echo with a smaller peak deviation is closer to the waveform under stable flow conditions or ideal conditions. Therefore, using the echo with a smaller peak deviation to participate in the correlation method operation improves the accuracy of the operation, thereby further improving the accuracy of the operation. For example, Figure 2 and Figure 3 The corresponding peak deviations are 2 and 1 respectively, so we can choose Figure 3 The corresponding downstream echo and upstream echo are operated by correlation method. In addition, when the correlation method is used for ultrasonic measurement, it can be implemented by referring to the relevant technology, which will not be described in detail here.

[0039] The waveform selection method for ultrasonic measurement provided by the embodiment of the present invention obtains downstream echoes and upstream echoes at multiple times, calculates the peak deviations of the downstream echoes and upstream echoes as waveform features, and screens the downstream echoes and upstream echoes based on the waveform features, thereby selecting a good waveform that is closer to the ideal situation for correlation method calculation, thereby improving the measurement accuracy.

[0040] In this embodiment, a waveform selection method for ultrasonic measurement is provided, and the process includes the following steps:

[0041] Step S201, collecting downstream echoes and upstream echoes at different times.

[0042] Specifically, the above step S201 includes:

[0043] Step S2011, obtaining the excitation frequency of the ultrasonic signal emitted by the ultrasonic measurement device.

[0044] Step S2012, determining the sampling frequency of the echo according to the excitation frequency.

[0045] Step S2013, collecting downstream echoes and upstream echoes at different times according to the sampling frequency.

[0046] Specifically, when collecting echoes, the sampling frequency when collecting echoes can be determined according to the excitation frequency when the transducer emits the ultrasonic signal. When determining the sampling frequency, it is necessary to ensure that the sampling frequency is at least twice the excitation frequency of the transducer, so that the collected echo waveform can be identified and the peak values ​​of the echo can be determined. For example, when the excitation frequency of the transducer is 200k, the sampling frequency is 1M; when the excitation frequency of the transducer is 500k, the sampling frequency is 2M.

[0047] Step S202, calculate the peak deviation of the downstream echo and upstream echo at different times, the peak deviation is the difference in the number of waveforms between the first peak and the highest peak in the downstream echo and upstream echo. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0048] Step S203, selecting downstream echoes and upstream echoes that meet preset requirements according to the peak deviation, and performing ultrasonic measurement using a correlation method;

[0049] Specifically, the above step S203 includes:

[0050] Step S2031, obtaining a peak deviation threshold; specifically, the peak deviation threshold can be determined in advance, but in the case of unstable flow, it may not be possible to select downstream echoes and upstream echoes that meet the preset requirements according to the set peak deviation threshold. Therefore, in practical applications, the peak deviation threshold can be determined based on the peak deviations of the downstream echoes and upstream echoes obtained in real time.

[0051] In an optional implementation, the above step S2031 includes:

[0052] Step a1, obtaining multiple peak deviations of a preset number in a row in real time. Specifically, in order to determine the peak deviation threshold, multiple groups of downstream echoes and upstream echoes can be collected continuously according to the sampling frequency, and the peak deviation of each group of downstream echoes and upstream echoes can be calculated to obtain multiple peak deviations. For example, ten groups of downstream echoes and upstream echoes are obtained by continuous sampling, and ten peak deviations are calculated. For the multiple peak deviations of a preset number of continuous obtained values, such as ten peak deviations, they can be saved in a pre-set storage space. In addition, the preset number of peak deviations existing in the storage space can be updated according to the actual collection situation. For example, when the storage space stores the preset number of peak deviations, and a new peak deviation is collected, the first peak deviation stored in the storage space can be deleted, and the new peak deviation can be saved, so as to ensure that the preset number of peak deviations stored in the storage space is the latest preset number of peak deviations.

[0053] Step a2, calculates the proportion of each peak deviation in multiple peak deviations. Specifically, for multiple peak deviations stored in the storage space, calculate the proportion of each peak deviation. Moreover, the same peak deviation may exist in multiple peak deviations. When calculating the proportion, it is sufficient to calculate the proportion of different peak deviations. For example, the storage space includes ten peak deviations, and the ten peak deviations are 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, respectively. Then, the proportion of peak deviation 0 is 20%, the proportion of peak deviation 3 is 40%, and the proportion of peak deviation 4 is 40%.

[0054] Step a3, selecting the peak deviations whose proportion is greater than or equal to the proportion threshold. The proportion threshold can be determined according to the actual situation. For example, the proportion threshold can be set to 30%. Then, among the ten peak deviations in step a2, the peak deviations whose proportion is greater than the proportion threshold include peak deviation 3 and peak deviation 4.

[0055] Step a4, determining the peak deviation threshold value based on the smaller peak deviation among the selected peak deviations. Specifically, in practical applications, the peak deviations greater than or equal to the ratio threshold value selected through the above steps may include two or more, or may be only one, so the peak deviation threshold value can be determined based on the peak deviation actually selected in step a3.

[0056] In an optional implementation, the above step a4 includes:

[0057] Step a41, when the selected peak deviation includes multiple different peak deviations, the peak deviation threshold is determined based on the smaller peak deviation among the peak deviations; specifically, when the peak deviations actually selected according to step a3 include two or more, the smaller peak deviation is selected from the selected peak deviations as the peak deviation threshold. For example, when the peak deviations selected according to step a3 include peak deviation 3 and peak deviation 4, the smaller peak deviation, i.e., peak deviation 3, is selected as the peak deviation threshold.

[0058] Step a42, when the selected peak deviation includes a single peak deviation, and the single peak deviation is the maximum value among the multiple peak deviations obtained, the peak deviation threshold determined in the previous sampling period is adopted, and the peak deviation is re-acquired to determine the peak deviation threshold. Specifically, when the peak deviation actually selected according to step a3 includes only one, for example, the ten peak deviations stored in the storage space include 0, 0, 3, 3, 4, 4, 4, 4, 4, 4, and the proportions of each peak deviation are respectively 20% for peak deviation 0, 20% for peak deviation 3, and 60% for peak deviation 4. The peak deviation greater than the proportion threshold of 30% only includes one peak deviation 4, but this peak deviation is the maximum value among the ten peak deviations. Using this peak deviation as the peak deviation threshold cannot play a screening role. At this time, the peak deviation threshold determined according to the ten peak deviations in the storage space can continue to be used, and new downstream echoes and upstream echoes can continue to be collected to calculate the peak deviation, and the peak deviation in the storage space is updated to determine whether to update the peak deviation threshold.

[0059] Step S2032, determining the relationship between the peak deviation and the peak deviation threshold of the downstream echo and the upstream echo; specifically, after determining the peak deviation threshold, the peak deviation and the peak deviation threshold of the downstream echo and the upstream echo currently sampled can be compared.

[0060] Step S2033: The downstream echo and upstream echo whose peak deviation is less than or equal to the peak deviation threshold are regarded as the downstream echo and upstream echo meeting the preset requirement. Specifically, when the peak deviation is less than or equal to the peak deviation threshold, it means that the currently sampled downstream echo and upstream echo meet the requirement and can participate in the calculation of the correlation method.

[0061] Step S2034, when the peak deviation is greater than the peak deviation threshold, re-collect the downstream echo and upstream echo at the current moment; when the re-collected downstream echo and upstream echo do not meet the preset requirements, continue to re-collect; when the number of re-collections is greater than the collection threshold and the re-collected downstream echo and upstream echo do not meet the preset requirements, ultrasonic measurement is performed based on the re-collected downstream echo and upstream echo using the correlation method.

[0062] Specifically, when the peak deviation is greater than the peak deviation threshold, the sampling frequency can be ignored, and resampling can be performed immediately. The above steps can be used to determine whether the downstream echo and upstream echo obtained by resampling meet the preset requirements. If they do not meet the preset requirements, resampling can be continued. When the preset requirements cannot be met after continuous sampling for a preset number of times, such as three times, the ultrasonic measurement result obtained in the previous sampling cycle can be used as the current ultrasonic measurement result output, and sampling can be continued. If the continued sampling results still do not meet the preset requirements, it means that there is a problem with the setting of the peak deviation threshold, and the downstream echo and upstream echo obtained by sampling can be directly used for ultrasonic measurement.

[0063] In an optional embodiment, the flow rate obtained by ultrasonic measurement is expressed by the following formula:

[0064]

[0065] In the formula, is the cross-sectional area of ​​the flow channel, is the coefficient for converting linear velocity into surface velocity, is the speed of sound, For the sound path, is the angle between the gas flow direction and the ultrasonic propagation direction, It is the waveform calculation result obtained by using the downstream echo and upstream echo that meet the preset requirements. When determining, the time shift of the waveform can be determined based on the similarity of the forward and reverse waveforms, and the time difference can be determined based on the time shift. .

[0066] As a specific application example of the embodiment of the present invention, Figure 4 As shown, the waveform selection method for ultrasonic measurement is implemented by the following process:

[0067] 1. If Figure 5 As shown, the upstream transducer 510 and the downstream transducer 520 excite ultrasonic signals, which are received by each other after being transmitted in the flow channel 530 to form forward and reverse signals. The waveform at a certain moment is as follows Figure 2 As shown in the figure, the waveform is distorted. When collecting waveforms, the sampling frequency is set to be at least twice the excitation frequency of the transducer, such as a transducer with an excitation frequency of 200k using a sampling frequency of 1M; a transducer with an excitation frequency of 500k using a sampling frequency of 2M, to ensure that the echo shape can be identified, so that each peak of the echo signal can be found.

[0068] 2. Calculate the number of cycles between the highest peak and the first wave peak. The echo shape of the transducer excitation is a series of continuous sinusoidal waveforms with peak values ​​changing from low to high and then from high to low. The period of each waveform is approximately equal, such as Figure 2The forward and reverse waveforms shown in the figure go through 10 and 12 cycles respectively. Figure 3 The forward and reverse waveforms shown in the figure go through 11 cycles and 12 cycles respectively. Date1 and date2 are the eight peaks on both sides of the highest peak connected by a broken line to facilitate observation of echo waveform changes. Ideally, the peak changes of the forward and reverse waveforms are consistent. After being disturbed, the first few waveforms are basically consistent, and the subsequent waveforms change significantly.

[0069] 3. Calculate the cycle difference experienced, that is, the difference in the number of waveforms that appear from the peak of the first wave to the peak of the highest peak of the forward and reverse waveforms, and use it as the waveform characteristic peak deviation value, that is, the peak offset number. Figure 2 The peak deviation of the forward and reverse waveforms shown is 12-10=2; Figure 3 The peak deviation of the forward and reverse waveforms shown is 12-11=1.

[0070] 4. Under unstable flow, the peak deviation value of the waveform characteristic is a random variable. If there is a waveform peak deviation number that is less than the preset peak deviation threshold, the waveform is considered to be ideal and can participate in the calculation. However, if the preset peak deviation threshold is directly fixed to a certain value, it may be impossible to find a waveform that meets the requirements. For example, if the peak deviation threshold is 1, under unstable flow, the peak deviation is between 2 and 4 for a period of time, and it is impossible to find a waveform that meets the requirements to participate in the calculation, resulting in unmeasured phenomenon. Therefore, the peak deviation threshold can be set as follows:

[0071] 1) During the operation of the ultrasonic metering equipment, the peak deviations of the forward and reverse waveforms are recorded and stored in a storage space. The storage space stores 10 peak deviations of 10 groups of forward and reverse waveforms obtained by continuous sampling (the number can be optimized according to the final measurement situation). The recording interval is the sampling calculation cycle, for example, 2s. When the number of real-time records is greater than the storage space, the first record is discarded and the latest peak deviation is saved. This ensures that the stored peak deviations are the latest 10 consecutive peak deviations.

[0072] 2) Calculate the proportion of each deviation number of the 10 peak deviation numbers, and filter the target deviation number based on the proportion. The screening basis can be determined as: select the number with a proportion greater than 30%. And the number with the smallest deviation number is used as the target deviation number (the screening goal is to use the waveform as much as possible for calculation, but it cannot affect normal measurement). For example, the peak deviations stored in the storage space include 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, then the proportions greater than 30% are 3 and 4, and the smallest deviation number is 3, so the target deviation number is determined to be 3.

[0073] 3) According to the target deviation number, if the deviation number calculated by the current sampling is less than or equal to the target deviation number, it participates in the relevant operation. When the current deviation number is greater than the target deviation number, sampling is not performed according to the cycle, and sampling is performed immediately. When the peak deviation of the sampling result is still greater than the target deviation, sampling continues. When the sampling number reaches 3 times and is still greater than the target deviation, the result of the last relevant operation is filled into the buffer of the current operation result. When the sampling number reaches 4 times and is still greater than the target deviation, it means that the current target deviation number is unreasonable, and the waveform participates in the calculation, that is, the waveform is not screened, and the number of times greater than the target deviation number is cleared.

[0074] 4) Execute steps 1) and 2) in each sampling calculation cycle. If the target deviation number changes, calculate according to the latest target deviation number. When the target deviation number does not exist, such as 0, 0, 3, 3, 4, 4, 4, 4, 4, 4 (the proportion deviation number of 4 is greater than 30%, but it is the only one greater than 30% and it is the maximum value, so it does not meet the screening target), the current target deviation number is not updated, and the peak deviation buffer cache continues to be updated until a target deviation number that meets the screening criteria appears.

[0075] 5) After obtaining the waveform calculation result Δt through correlation operation or filling the waveform calculation result Δt without operation, the flow calculation is performed according to the following flow calculation formula:

[0076]

[0077] In the formula, Figure 5 As shown, is the cross-sectional area of ​​the flow channel, is the coefficient for converting linear velocity into surface velocity, is the speed of sound, For the sound path, is the angle between the gas flow direction and the ultrasonic propagation direction. After the flow rate is calculated using the above formula, continue to execute from step 1, and repeat this cycle to obtain the flow rate.

[0078] In this embodiment, a waveform selection device for ultrasonic measurement is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0079] This embodiment provides a waveform selection device for ultrasonic measurement, such as Figure 6 As shown, including:

[0080] The echo acquisition module 61 is used to collect downstream echoes and upstream echoes at different times;

[0081] A calculation module 62, used to calculate the peak deviation of the downstream echo and the upstream echo at different times, the peak deviation being the difference in the number of waveforms between the first peak value and the highest peak value in the downstream echo and the upstream echo;

[0082] The measurement module 63 is used to select the downstream echo and upstream echo that meet the preset requirements according to the peak deviation, and perform ultrasonic measurement by using the correlation method.

[0083] In an optional embodiment, the metering module includes: a threshold acquisition module for acquiring a peak deviation threshold; a relationship judgment module for judging the relationship between the peak deviation of the downstream echo and the upstream echo and the peak deviation threshold; and a determination module for taking the downstream echo and the upstream echo whose peak deviation is less than or equal to the peak deviation threshold as the downstream echo and the upstream echo that meet the preset requirements.

[0084] In an optional embodiment, the threshold acquisition module includes: a deviation acquisition module, which is used to acquire a plurality of peak deviations of a preset number in real time; a proportion calculation module, which is used to calculate the proportion of each peak deviation in the multiple peak deviations; a selection module, which is used to select peak deviations whose proportion is greater than or equal to a proportion threshold; and a threshold determination module, which is used to determine the peak deviation threshold based on a smaller peak deviation among the selected peak deviations.

[0085] In an optional embodiment, the threshold determination module is specifically used to: when the selected peak deviation includes multiple different peak deviations, determine the peak deviation threshold based on the smaller peak deviation among the peak deviations; when the selected peak deviation includes a single peak deviation, and the single peak deviation is the maximum value among the multiple peak deviations obtained, use the peak deviation threshold determined in the previous sampling period, and re-acquire the peak deviation to determine the peak deviation threshold.

[0086] In an optional embodiment, the metering module is also used to: when the peak deviation is greater than the peak deviation threshold, re-collect the downstream echo and upstream echo at the current moment; when the re-collected downstream echo and upstream echo do not meet the preset requirements, continue to re-collect; when the number of re-collections is greater than the collection threshold and the re-collected downstream echo and upstream echo do not meet the preset requirements, use the correlation method based on the re-collected downstream echo and upstream echo to perform ultrasonic measurement.

[0087] In an optional embodiment, the echo acquisition module is specifically used to: obtain the excitation frequency of the ultrasonic signal emitted in the ultrasonic metering equipment; determine the sampling frequency of the echo according to the excitation frequency; and collect downstream echoes and upstream echoes at different times according to the sampling frequency.

[0088] In an optional embodiment, the flow rate obtained by ultrasonic measurement is expressed by the following formula:

[0089]

[0090] In the formula, is the cross-sectional area of ​​the flow channel, is the coefficient for converting linear velocity into surface velocity, is the speed of sound, For the sound path, is the angle between the gas flow direction and the ultrasonic propagation direction, It is the waveform calculation result obtained by using downstream echo and upstream echo that meet the preset requirements.

[0091] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0092] The embodiment of the present invention also provides a computer device having the above Figure 6 A waveform selection device for ultrasonic metrology is shown.

[0093] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 1000, memory 2000, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 1000 is taken as an example.

[0094] The processor 1000 may be a central processing unit, a network processor or a combination thereof. The processor 1000 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0095] The memory 2000 stores instructions executable by at least one processor 1000, so that at least one processor 1000 executes the method shown in the above embodiment.

[0096] The memory 2000 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device according to the presentation of a small program landing page, etc. In addition, the memory 2000 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 2000 may optionally include a memory remotely arranged relative to the processor 1000, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0097] The memory 2000 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 2000 may also include a combination of the above types of memory.

[0098] The computer device also includes a communication interface 3000, which is used for the computer device to communicate with other devices or a communication network.

[0099] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0100] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0101] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A waveform selection method for ultrasonic measurement, characterized in that: The method comprises: Collect downstream echoes and upstream echoes at different times; Calculating the peak deviation of the downstream echo and the upstream echo at different times, wherein the peak deviation is the difference between the number of waveforms between the first wave peak and the highest peak in the downstream echo and the number of waveforms between the first wave peak and the highest peak in the upstream echo; Selecting downstream echoes and upstream echoes that meet preset requirements according to the peak deviation, and performing ultrasonic measurement using a correlation method; Selecting downstream echoes and upstream echoes that meet preset requirements according to the peak deviation includes: Get the peak deviation threshold; Determine the relationship between the peak deviation and the peak deviation threshold of the downstream echo and the upstream echo; The downstream echo and upstream echo whose peak deviation is less than or equal to the peak deviation threshold are regarded as the downstream echo and upstream echo meeting the preset requirement.

2. The method according to claim 1, characterized in that Get the peak deviation threshold, including: Acquire a preset number of peak deviations in real time; Calculate the proportion of each peak deviation in multiple peak deviations; Select the peak deviation whose proportion is greater than or equal to the proportion threshold; A peak deviation threshold is determined based on the smallest peak deviation among the selected peak deviations.

3. The method according to claim 2, characterized in that The peak deviation threshold is determined based on the minimum peak deviation among the selected peak deviations, including: When the selected peak deviation includes a plurality of different peak deviations, determining the peak deviation threshold based on the smallest peak deviation among the peak deviations; When the selected peak deviation includes a single peak deviation, and the single peak deviation is the maximum value of the multiple peak deviations obtained, the peak deviation threshold determined in the previous sampling period is adopted, and the peak deviation is re-obtained to determine the peak deviation threshold.

4. The method according to claim 1, characterized in that: According to the peak deviation, downstream echoes and upstream echoes that meet preset requirements are selected, and ultrasonic measurement is performed using a correlation method, including: When the peak deviation is greater than the peak deviation threshold, the downstream echo and upstream echo at the current moment are re-collected; When the re-collected downstream echo and upstream echo do not meet the preset requirements, continue to re-collect; When the number of re-collection times is greater than the collection threshold and the re-collected downstream echo and upstream echo do not meet the preset requirements, the ultrasonic measurement is performed using the correlation method based on the re-collected downstream echo and upstream echo.

5. The method according to claim 1, characterized in that Collect downstream and upstream echoes at different times, including: Acquire the excitation frequency of the ultrasonic signal emitted by the ultrasonic measurement device; Determining a sampling frequency of the echo according to the excitation frequency; The downstream echo and upstream echo at different times are collected according to the sampling frequency.

6. The method according to claim 1, characterized in that The flow rate obtained by ultrasonic measurement is expressed by the following formula: In the formula, is the cross-sectional area of ​​the flow channel, is the coefficient for converting linear velocity into surface velocity, is the speed of sound, For the sound path, is the angle between the gas flow direction and the ultrasonic propagation direction, It is the waveform calculation result obtained by using downstream echo and upstream echo that meet the preset requirements.

7. A waveform selection device for ultrasonic measurement, characterized in that: The device comprises: The echo acquisition module is used to collect downstream echoes and upstream echoes at different times; A calculation module, used to calculate the peak deviation of the downstream echo and the upstream echo at different times, wherein the peak deviation is the difference between the number of waveforms between the first wave peak and the highest peak in the downstream echo and the number of waveforms between the first wave peak and the highest peak in the upstream echo; A metering module, used for selecting downstream echoes and upstream echoes that meet preset requirements according to the peak deviation, and performing ultrasonic metering by using a correlation method; Selecting downstream echoes and upstream echoes that meet preset requirements according to the peak deviation includes: Get the peak deviation threshold; Determine the relationship between the peak deviation and the peak deviation threshold of the downstream echo and the upstream echo; The downstream echo and upstream echo whose peak deviation is less than or equal to the peak deviation threshold are regarded as the downstream echo and upstream echo meeting the preset requirement.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the waveform selection method for ultrasonic measurement according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the waveform selection method for ultrasonic measurement according to any one of claims 1 to 6.