Transducer head wave threshold calculation method based on direct-reading ultrasonic flowmeter

文档序号:1657479 发布日期:2019-12-27 浏览:2次 中文

阅读说明:本技术 一种基于直读超声波流量计的换能器首波阈值计算方法 (Transducer head wave threshold calculation method based on direct-reading ultrasonic flowmeter ) 是由 李建军 于 2019-10-28 设计创作,主要内容包括:本发明公开了一种基于直读超声波流量计的换能器首波阈值计算方法,包括以下步骤:S1、提取上换能器波形,共1100个点,并计算出前1024个点的平均值作为中间值;S2、找到波形中的最大值和最小值,两者之差为峰峰值;S3、峰峰值除以50作为查找波峰值的门限值,查找波峰值时,查找条件为:a、该值大于门限值和中间值之和;b、该值大于前4个点的值和后4个点的值;再查找4个单调递增的波峰值和波峰值位置,查找条件为:a、4个波峰值必须连续;b、单调递增。本发明首先通过计算机接收当前水质、温度条件下的上、下换能器波形,然后计算换能器首波阈值,再将阈值发送给直读流量计,阈值参与流量原始频率值的计算,从而达到准确计算流量值的目的。(The invention discloses a transducer head wave threshold calculation method based on a direct-reading ultrasonic flowmeter, which comprises the following steps: s1, extracting the waveform of the upper transducer, wherein the total number of the waveform is 1100, and calculating the average value of the front 1024 points as a middle value; s2, finding the maximum value and the minimum value in the waveform, wherein the difference between the maximum value and the minimum value is a peak value; s3, dividing the peak value by 50 to be used as a threshold value for searching the wave peak value, wherein when the wave peak value is searched, the searching condition is as follows: a. the value is greater than the sum of the threshold value and the median value; b. the value is greater than the value of the first 4 points and the value of the last 4 points; and then searching 4 monotonically increasing wave peak values and wave peak value positions, wherein the searching conditions are as follows: a. 4 wave peaks must be continuous; b. monotonically increasing. The invention firstly receives the waveforms of the upper and lower transducers under the current water quality and temperature conditions through the computer, then calculates the head wave threshold value of the transducer, and then sends the threshold value to the direct-reading flow meter, and the threshold value participates in the calculation of the original frequency value of the flow, thereby achieving the purpose of accurately calculating the flow value.)

1. A transducer head wave threshold calculation method based on a direct-reading ultrasonic flowmeter is characterized by comprising the following steps:

s1, extracting the waveform of the upper transducer, wherein the total number of the waveform is 1100, and calculating the average value of the front 1024 points as a middle value;

s2, finding the maximum value and the minimum value in the waveform, wherein the difference between the maximum value and the minimum value is a peak value;

s3, dividing the peak value by 50 to be used as a threshold value for searching the wave peak value, wherein when the wave peak value is searched, the searching condition is as follows: a. the value is greater than the sum of the threshold value and the median value; b. the value is greater than the value of the first 4 points and the value of the last 4 points; and then searching 4 monotonically increasing wave peak values and wave peak value positions, wherein the searching conditions are as follows: a. 4 wave peaks must be continuous; b. monotonically increasing;

s4, calculating 4 peak values, namely subtracting the intermediate value from the wave peak value;

s5, calculating a threshold value according to the peak value and the peak values of two adjacent points, wherein the number of the threshold values is 3, and the calculation formula is as follows: dividing the 2-time peak value by the sum of the peak values of two adjacent points;

s6, repeating the steps S1-S5, and calculating the threshold value, the waveform and the wave peak value of the lower transducer waveform;

and S7, solving a head wave threshold according to the threshold and the wave peak value position of the two paths of waveforms so as to achieve the purpose of optimal threshold matching.

2. The transducer head wave threshold calculation method based on the direct-reading ultrasonic flowmeter according to claim 1, characterized by comprising the following steps: when the head wave threshold value is obtained, the method comprises the following steps: a. comparing the position sizes of the wave crests 1 of the upper transducer and the lower transducer, and directly taking the threshold value of the transducer with the larger position as the head wave threshold value of the transducer; b. the threshold value closest to the position of another transducer wave crest 1 in the positions of 4 wave crests of the transducer with smaller positions is used as the threshold value of the head wave of the transducer; c. if the positions of the wave crests 1 of the upper transducer and the lower transducer are consistent, the threshold values of the wave crests 1 of the upper transducer and the lower transducer are directly the head wave threshold values of the upper transducer and the lower transducer.

3. The transducer head wave threshold calculation method based on the direct-reading ultrasonic flowmeter according to claim 2, characterized by comprising the following steps: if the positions of the wave crests 1 of the upper transducer and the lower transducer are consistent, the threshold value of the wave crest 1 is directly the head wave threshold value.

4. The transducer head wave threshold calculation method based on the direct-reading ultrasonic flowmeter according to claim 1, characterized by comprising the following steps: when calculating the flow rate frequency value of a single transducer, because of each sampling waveform of the single transducer, firstly calculating a middle value, a peak value, 4 continuous wave peak values and positions of the wave peak values according to the steps of S1-S3, then dividing the peak value by a head wave threshold value as a threshold value, starting from the 1 st wave peak value, using the difference value between the wave peak value and the middle value as larger than the threshold value, then using the position of the wave peak value as the head wave position, continuously searching for 8 point values from the head wave position, if the value of the point is smaller than or equal to the middle value and the value of the previous point is larger than the middle value, taking the position of the point as the starting position for calculating the flow rate frequency value, continuously taking the values of 256 points from the starting position, and transforming the values of the 256 points into the flow rate frequency value through Fourier transformation.

Technical Field

The invention relates to a transducer head wave threshold value calculation method based on a direct-reading ultrasonic flowmeter, and belongs to the technical field of flow testing of the direct-reading ultrasonic flowmeter of an oil field high-pressure water injection well.

Background

The direct-reading ultrasonic flowmeter for calculating the flow value by using an absolute time difference method is respectively provided with an upper ultrasonic transducer and a lower ultrasonic transducer, the upper ultrasonic transducer and the lower ultrasonic transducer simultaneously send ultrasonic waves to each other during testing, the forward flow time and the reverse flow time are respectively obtained when the ultrasonic waves propagate in the fluid for the same distance in the forward flow and the reverse flow, the time difference between the reverse flow and the forward flow is calculated, the flow velocity of the fluid is calculated, and the flow of the fluid is calculated according to the flow velocity. The forward flow time and the reverse flow time can be converted into the original flow frequency value through signal processing.

In different oil field areas, the water quality conditions (salt content and alkali content) of the water injection wells are different, and the well temperature difference is large at different depths of the same water injection well, so that the accuracy of the direct-reading ultrasonic flowmeter is not high.

When the original flow frequency value is calculated, an ultrasonic transducer head wave threshold value is needed, the ultrasonic transducer head wave threshold value is used for searching a threshold value of the vibration waveform of the transducer, and if the threshold value is unreasonably set, the original frequency value of the ultrasonic flowmeter is inaccurate. The sound velocity is influenced by water quality and temperature, so that the required head wave threshold values of the ultrasonic transducer are different under the conditions of different water quality and different temperatures, and therefore a calculation method for calculating the head wave threshold value needs to be found and applied to flow calculation of the ultrasonic flowmeter.

Disclosure of Invention

The invention aims to provide a transducer head wave threshold calculation method based on a direct-reading ultrasonic flowmeter, which solves the problem of flow test accuracy of the direct-reading ultrasonic flowmeter using an absolute time difference method under the conditions of different water qualities and different temperatures.

In order to achieve the purpose, the invention provides the following technical scheme: a transducer head wave threshold calculation method based on a direct-reading ultrasonic flowmeter comprises the following steps:

s1, extracting the waveform of the upper transducer, wherein the total number of the waveform is 1100, and calculating the average value of the front 1024 points as a middle value;

s2, finding the maximum value and the minimum value in the waveform, wherein the difference between the maximum value and the minimum value is a peak value;

s3, dividing the peak value by 50 to be used as a threshold value for searching the wave peak value, wherein when the wave peak value is searched, the searching condition is as follows: a. the value is greater than the sum of the threshold value and the median value; b. the value is greater than the value of the first 4 points and the value of the last 4 points; and then searching 4 monotonically increasing wave peak values and wave peak value positions, wherein the searching conditions are as follows: a. 4 wave peaks must be continuous; b. monotonically increasing;

s4, calculating 4 peak values, namely subtracting the intermediate value from the wave peak value;

s5, calculating a threshold value according to the peak value and the peak values of two adjacent points, wherein the number of the threshold values is 3, and the calculation formula is as follows: dividing the 2-time peak value by the sum of the peak values of two adjacent points;

s6, repeating the steps S1-S5, and calculating the threshold value, the waveform and the wave peak value of the lower transducer waveform;

and S7, solving a head wave threshold according to the threshold and the wave peak value position of the two paths of waveforms so as to achieve the purpose of optimal threshold matching.

In the method, when the head wave threshold value is obtained, the method comprises the following steps: a. comparing the position sizes of the wave crests 1 of the upper transducer and the lower transducer, and directly taking the threshold value of the transducer with the larger position as the head wave threshold value of the transducer; b. the threshold value closest to the position of another transducer wave crest 1 in the positions of 4 wave crests of the transducer with smaller positions is used as the threshold value of the head wave of the transducer; c. if the positions of the wave crests 1 of the upper transducer and the lower transducer are consistent, the threshold values of the wave crests 1 of the upper transducer and the lower transducer are directly the head wave threshold values of the upper transducer and the lower transducer.

In the method, if the positions of the wave crests 1 of the upper transducer and the lower transducer are consistent, the threshold of the wave crest 1 is directly the head wave threshold.

In the method, when calculating the flow rate frequency value of a single transducer, because each time of waveform sampling of the single transducer, firstly, according to the steps of S1-S3, a middle value, a peak value, 4 continuous wave peak values and positions of the wave peak values are calculated, then, the peak value is divided by a head wave threshold value to be used as a threshold value, if a difference value between the wave peak value and the middle value is larger than the threshold value from the 1 st wave peak value, the position of the wave peak value is used as a head wave position, 8 point values are continuously searched from the head wave position, if the value of the point is smaller than or equal to the middle value and the value of the previous point of the point is larger than the middle value, the position of the point is used as the starting position for calculating the flow rate frequency value, the values of 256 points are continuously obtained from the starting position, and the values of the 256 points are transformed into the flow rate frequency value through fourier transform.

Compared with the prior art, the invention has the beneficial effects that: the invention firstly receives the waveforms of the upper and lower transducers under the current water quality and temperature conditions through the computer, then calculates the head wave threshold value of the transducer, and then sends the threshold value to the direct-reading flow meter, and the threshold value participates in the calculation of the original frequency value of the flow, thereby achieving the purpose of accurately calculating the flow value.

Drawings

FIG. 1 is a schematic diagram of a waveform and a peak of an upper transducer in an embodiment of the present invention;

FIG. 2 is a schematic diagram of a lower transducer waveform and peak in accordance with an embodiment of the present invention;

FIG. 3 is a schematic diagram of waveforms and peaks of upper and lower transducers in an embodiment of the present invention;

FIG. 4 is a table listing process data and results of transducer head wave threshold calculations in accordance with an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings and examples.

The embodiment of the invention comprises the following steps: referring to fig. 1 to 4, the method for calculating the head wave threshold of the transducer based on the direct-reading ultrasonic flowmeter comprises the following steps:

s1, extracting the waveform of the upper transducer, wherein the total number of the waveform is 1100, and calculating the average value of the front 1024 points as a middle value;

s2, finding the maximum value and the minimum value in the waveform, wherein the difference between the maximum value and the minimum value is a peak value;

s3, dividing the peak-to-peak value by 50 to obtain a threshold value for searching the peak value (for eliminating the clutter in front), where the searching condition is: a. the value is greater than the sum of the threshold value and the median value; b. the value is greater than the value of the first 4 points and the value of the last 4 points; and then searching 4 monotonically increasing wave peak values and wave peak value positions, wherein the searching conditions are as follows: a. 4 wave peaks must be continuous; b. monotonically increasing;

s4, calculating 4 peak values, namely subtracting the intermediate value from the wave peak value;

s5, calculating a threshold value according to the peak value and the peak values of two adjacent points, wherein the number of the threshold values is 3, and the calculation formula is as follows: dividing the 2-time peak value by the sum of the peak values of two adjacent points;

s6, repeating the steps S1-S5, and calculating the threshold value, the waveform and the wave peak value of the lower transducer waveform;

and S7, solving a head wave threshold according to the threshold and the wave peak value position of the two paths of waveforms so as to achieve the purpose of optimal threshold matching. When the head wave threshold value is obtained, the method comprises the following steps: a. comparing the position sizes of the wave crests 1 of the upper transducer and the lower transducer, and directly taking the threshold value of the transducer with the larger position as the head wave threshold value of the transducer; b. the threshold value closest to the position 1 of the other transducer wave crest in the 4 wave crest positions of the transducer with smaller position values is used as the head wave threshold value of the transducer; c. if the positions of the wave crests 1 of the upper transducer and the lower transducer are consistent, the threshold values of the wave crests 1 of the upper transducer and the lower transducer are directly the head wave threshold values of the upper transducer and the lower transducer.

When calculating the flow rate frequency value of a single transducer, because of each sampling waveform of the single transducer, firstly calculating a middle value, a peak value, 4 continuous wave peak values and positions of the wave peak values according to the steps of S1-S3, then dividing the peak value by a head wave threshold value as a threshold value, starting from the 1 st wave peak value, using the difference value between the wave peak value and the middle value as larger than the threshold value, then using the position of the wave peak value as the head wave position, continuously searching for 8 points (generally 7-8 points from the peak value to the trough) from the head wave position, if the value of the point is smaller than or equal to the middle value and the value of the previous point of the point is larger than the middle value, then taking the position of the point as the starting position for calculating the flow rate frequency value, starting from the starting position, continuously taking the values of 256 points, and transforming the values of the 256 points into the flow rate frequency value through Fourier transformation.

In summary, the invention firstly receives the waveforms of the upper and lower transducers under the current water quality and temperature conditions through the computer, then calculates the head wave threshold value of the transducer, and then sends the threshold value to the direct-reading flow meter, and the threshold value participates in the calculation of the original frequency value of the flow, thereby achieving the purpose of accurately calculating the flow value.

7页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:自动调节流量计采样频率的控制方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类