A method for automatically detecting a liquid level coupling wave of an oil and gas well

By embedding an automatic coupling detection algorithm into computer software, the problem of accuracy in calculating the fluid level depth of oil and gas wells is solved, and efficient and accurate automatic calculation of fluid level depth is achieved.

CN119352957BActive Publication Date: 2025-11-21GUIZHOU HANGTIAN KAISHAN PETROLEUM INSTR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411540225.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-11-21
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of calculating the fluid level depth in oil and gas wells is affected by the inconsistent sound velocity within the wellbore and the varying experience of manual operation, leading to inaccurate calculation results.

Method used

An automatic coupling detection algorithm is embedded in computer software. By automatically filtering and sorting liquid level data points, calculating the number of test points between adjacent couplings, selecting qualified coupling waveform data points, and filling in missing coupling points, a final coupling point array is formed, realizing the automatic selection of coupling positions and the automatic calculation of liquid level depth.

Benefits of technology

It improves the efficiency and accuracy of liquid surface data processing, avoids calculation distortion caused by manual operation, and ensures the accuracy of liquid surface depth calculation.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The application discloses an oil and gas well liquid level coupling wave automatic detection method, belongs to the technical field of computer data processing, solves the problem that the calculation is not accurate due to uneven work experience, and mainly comprises the following technical scheme: a computer software is implanted with a coupling automatic search algorithm, can automatically select the coupling position after loading a data file, and then automatically calculates the in-pipe sound velocity and liquid level depth.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to an oil and gas well liquid surface coupling wave automatic detection method, belonging to the technical field of computer data processing. BACKGROUND

[0002] Wellbore liquid level calculation is one of the most commonly used production management methods for measuring oil and gas well production status in oil and gas field production, and plays a very important role in oil and gas production. The numerical change of liquid level depth directly indicates the production efficiency and production value of the oil and gas well, therefore, whether the liquid level data can be accurately and efficiently obtained directly affects the judgment of the production situation of the oil and gas well.

[0003] The liquid level data is collected by the collection instrument at a fixed frequency, and the most commonly used method for calculating the liquid level data is the coupling calculation method, the principle of which is to obtain the propagation speed of sound in the wellbore by dividing the length of the coupling by the transmission time of sound between the couplings, and then to calculate the final liquid level depth by multiplying the sound speed by the time interval between the liquid level wave position and the wellhead wave position. Due to the complex and changeable factors such as pressure and mixed medium in the wellbore, the sound speed in the wellbore is not uniform and fixed, and the accuracy of the sound speed calculation directly affects the accuracy of the liquid level depth, therefore, the selection of the coupling wave form position becomes a key factor affecting the accuracy of the liquid level depth calculation.

[0004] The selection of the coupling wave is usually manually selected by artificial manual selection, but in the case of large amount of test data, heavy workload, artificial operation responsibility and uneven calculation and work experience, the calculation will not be accurate. SUMMARY

[0005] In order to solve the above technical problems, the present application provides an oil and gas well liquid surface coupling wave automatic detection method, which solves the problem of inaccurate calculation caused by uneven work experience.

[0006] The present application provides an oil and gas well liquid surface coupling wave automatic detection method, comprising the following steps:

[0007] S1: By traversing all liquid level data points, recording the position and waveform amplitude of all liquid level data points at the collection time to obtain a first waveform point array, and removing the front wellhead waveform range by experience value or algorithm to obtain the range of the remaining coupling wave; then sorting in descending order or in ascending order to form a second waveform point array, and the front part of the formed second waveform point array is the coupling waveform data point or the liquid level waveform point, thereby excluding small noise waveforms.

[0008] S2: According to the sampling frequency, the number of test points between adjacent joints is estimated, the number of test points between adjacent joints is calculated, and the number of test points between adjacent joints is taken as the maximum sampling point range Max_t and the minimum sampling point range Min_t. The time position of the adjacent point data of all values of the second waveform point array generated in the first step is subtracted, and the difference within the range of Max_t and Min_t is the qualified joint waveform data point. The qualified joint waveform data point is screened out and put into a new array as the joint point preliminary array pos_JGList1. The joint waveform data point outside the experience value range is determined as abnormal clutter or other waveform data between the joints.

[0009] S3: The joint point preliminary array pos_JGList1 obtained in S2 is sorted in the order of the time points of each collection point, so that the data points of the array are arranged in the order of sampling time from first to last. Then, the difference between adjacent points is calculated, and the minimum difference with the highest frequency is recorded as the point time interval between adjacent joints, which is temporarily named as standard interval Ts i, Then, the Ts i value is screened to get the minimum value Ts min .

[0010] S4: Check all the difference values calculated in S3. If the difference value is greater than the multiple of the standard interval Ts min , it is considered that there is a joint point missing between the adjacent data due to waveform attenuation or other reasons in the above calculation, and the number of missing joints Lose_count is the multiple value-1. To find the missing joint point, find the position interval of the adjacent data point in the original data array, and cut the data in this interval. Sort and take the first Lose_count values as the completed joint point to be inserted between the adjacent points before and after the difference value to form the final joint point array.

[0011] Further, the first waveform point array in S1 is sorted in descending order after algorithm removal, and the peak is taken as the joint point. The sorting formula for descending order is:

[0012] MaxSort(x)x∈[Data0,Data n-jkcount ]

[0013] Where:

[0014] MaxSort(x) is the original data sorted in descending order;

[0015] x: original collection data point waveform amplitude;

[0016] jkcount: the number of data points occupied by the wellhead waveform determined by experience value;

[0017] n: the number of all data points collected.

[0018] Further, the algorithm formula used in S2 is:

[0019] Min_t = JG_length / Speed_min / Freq Max_t = JG_Count * (JG_length / Speed_max / Freq)

[0020] Wherein: Min_t: the minimum number of data points between adjacent collars;

[0021] Speed_min: the minimum acoustic velocity in the oil casing, which is an empirical value;

[0022] Speed_max: the maximum acoustic velocity in the oil casing, which is an empirical value;

[0023] Freq: sampling frequency;

[0024] Max_t: the maximum number of data points between adjacent collars, which needs to be multiplied by JG_Count to select only the number of collar waves for calculation, excluding the liquid level and other waveforms;

[0025] JG_Count: the number of collars planned to be selected.

[0026] Further, the algorithm formula in S3 is:

[0027] pos_JGList2 = MinSort(x) x∈[pos_JGList10,pos_JGList1 m ]

[0028] Ts i = pos_JGList2 i - pos_JGList2 i i∈[0,m]

[0029] Wherein:

[0030] MinSort(x) is the collar position sorted in ascending order;

[0031] pos_JGList1 0..m : the point position of JGList1 collected in time sequence;

[0032] pos_JGList2 0..m : the array obtained by sorting pos_JGList1 0..m in ascending order according to the collection time point sequence;

[0033] MinSort(x) is the collar position sorted in ascending order;

[0034] Ts i : standard time interval.

[0035] Further, the algorithm formula in S4 is:

[0036] Lose_count = ((a-b) / Ts min )-1

[0037] a∈[pos_JGList21,pos_JGList2 m ]

[0038] b∈[pos_JGList20,pos_JGList2 m-1 ]

[0039] Wherein:

[0040] Lost_count: the number of missing collars between adjacent collars calculated;

[0041] m: the actual number of selected collars;

[0042] pos_JGList2 0..m : pos_JGList1 0..m The array sorted in ascending order according to the collection time point.

[0043] The above technical scheme is adopted, and the advantages of the present application are that the computer software can automatically find the collars by implanting the automatic collar finding algorithm, and the automatic selection of the collar position can be realized after the data file is loaded, and then the automatic calculation of the in-pipe sound velocity and liquid surface depth is performed, so that the operation mode of manually selecting the collar position is replaced, the data processing efficiency and precision are greatly improved, and the problems of the selection error of the collar, the low efficiency of the collar selection and the distortion of the liquid surface data calculation caused by the manual operation are avoided. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application is described clearly and completely below, and obviously, the described embodiments are only part of the embodiments of the present application, but not all the embodiments.

[0045] The terms "first", "second", etc. (if any) in the description and claims of the present application are used to distinguish similar objects, rather than to describe a particular order or sequence, even if "second" is used in front of a certain technical feature to distinguish, it does not mean that there must be "first". It should be understood that in the present application, "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. It should be understood that in the present application, "a plurality of" means two or more. "And / or" is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, X and / or Y can represent the existence of X alone, the existence of X and Y at the same time, and the existence of Y alone. The character " / " generally represents that the front and rear associated objects are in an "or" relationship. "Including X, Y and Z", "including X, Y, Z" means that X, Y and Z are all included, "including X, Y or Z" means that one of X, Y and Z is included, and "including X, Y and / or Z" means that any one or any two or three of X, Y and Z is included.

[0046] The present application provides an oil and gas well liquid level coupling wave automatic detection method, comprising the following steps:

[0047] S1: By traversing all liquid level data points, recording the position and waveform amplitude of all liquid level data points at the collection time to obtain a first waveform point array, removing the front wellhead waveform range by an empirical value or algorithm, obtaining the remaining part as the coupling wave range; then sorting in descending order or in ascending order, forming a second waveform point array, and the front part of the second waveform point array is the coupling waveform data point or the liquid level waveform point, thereby excluding small noise waveforms.

[0048] S2: According to the sampling frequency, estimate the test point number between adjacent couplings, calculate the test point number between adjacent couplings, and take it as the maximum sampling point number range Max_t and the minimum sampling point number range Min_t. Subtract the time positions of adjacent point data from all values of the second waveform point array generated in the first step. The difference within the range of Max_t and Min_t is a qualified coupling waveform data point. The qualified coupling waveform data point is screened out and placed in a new array as a coupling point preliminary array pos_JGList1. The coupling waveform data point with a difference outside the empirical value range is determined as abnormal noise or other waveform data between couplings.

[0049] S3: Sort the coupling point preliminary array pos_JGList1 obtained in S2 according to the time point sequence of each collection point, arrange the data points of the array in the order of sampling time from first to last, and calculate the difference of adjacent point positions. The highest frequency of the minimum difference is recorded as the point time interval between adjacent couplings, which is temporarily named as standard interval Ts i, Then Tsi Value screening takes the minimum value Ts min .

[0050] S4: Check all the differences calculated in S3, if the difference is greater than the standard interval Ts min times, it is considered that there is a missing clamp point between the adjacent data due to waveform attenuation or other reasons, and the number of missing clamps Lose_count is the value of the multiple-1. To find the missing clamp point, find the position interval of the adjacent data point in the original data array, and cut the data in this interval, sort it, and take the first Lose_count number as the completed clamp point., evenly inserted between the clamp points before and after the difference, to form the final clamp point array.

[0051] The present application is used for computer software to automatically find the algorithm by implanting the clamp, which can directly realize the automatic selection of clamp position after loading the data file, and then automatically calculate the in-pipe sound speed and liquid level depth. Compared with the manual operation mode of selecting clamp position, the present application greatly improves the data processing efficiency and accuracy, avoids the distortion of liquid level data calculation caused by clamp selection errors and low clamp selection efficiency caused by manual operation.

[0052] Among them, the first waveform point array in S1 is sorted in descending order after algorithm removal, and the peak is taken as the clamp point; the sorting formula of descending order is:

[0053] MaxSort(x)x∈[Data0,Data n-jkcount ]

[0054] Among them:

[0055] MaxSort(x) is the original data sorted in descending order;

[0056] x: the waveform amplitude of the original data point;

[0057] jkcount: the number of data points occupied by the wellhead waveform determined by experience value;

[0058] n: the number of all data points collected.

[0059] Specifically, the above formula is converted into computer code: Array_data[0..n-jkcount]=Array_PaiXu(Max(Data[jkcount..n].val))

[0060] jkcount: the number of data points occupied by the wellhead waveform determined by experience value;

[0061] n: the number of all data points collected;

[0062] Data[jkcount..n].val: the original collected data point waveform amplitude;

[0063] Arraty_data[0..n-jkcount]: Data[jkcount..n].val is arranged from large to small;

[0064] Array_PaiXu(): the sequence group after the sorting algorithm sequence.

[0065] Among them, the algorithm formula used in S2 is:

[0066] Min_t = JG_length / Speed_min / Freq Max_t = JG_Count*(JG_length / Speed_max / Freq)

[0067] Where: Min_t: the minimum number of data points between adjacent collars;

[0068] Speed_min: the minimum acoustic velocity in the oil casing, which is an empirical value;

[0069] Speed_max: the maximum acoustic velocity in the oil casing, which is an empirical value;

[0070] Freq: sampling frequency;

[0071] Max_t: the maximum number of data points between adjacent collars, which needs to be multiplied by JG_Count to select only the collar wave number for calculation, excluding the liquid level and other waveforms;

[0072] JG_Count: the planned number of collars selected.

[0073] Among them, the above formula is converted into code as follows:

[0074] Min_t = JG_length / Speed_min / Freq 采样

[0075] Max_t = JG_Count*(JG_length / Speed_max / Freq 采样 )

[0076] JGList1.ADD(Min_t≤Arraty_data[0..n-jkcount]-JGList[0..m]≤Max_t)Min_t: the minimum number of data points between adjacent collars

[0077] Speed_min: the minimum acoustic velocity in the oil casing, which is an empirical value

[0078] Speed_max: Maximum acoustic speed in the tubing-casing annulus, an empirical value

[0079] Freq 采样 : Sampling frequency

[0080] Max_t: Maximum number of data points between adjacent collars, needs to be multiplied by JG_Count to select only the number of collar waves for calculation, excluding the subsequent liquid level and other waveforms

[0081] JG_Count: Planned number of collars to be selected

[0082] m: Actual number of collars selected

[0083] JGList1: Preliminary array of collar points

[0084] The algorithm formula in S3 is:

[0085] pos_JGList2 = MinSort(x) x∈[pos_JGList10, pos_JGList1 m ]

[0086] Ts i = pos_JGList2 i - pos_JGList2 i i∈[0, m]

[0087] Where:

[0088] pos_JGList1 0..m : JGList1 acquisition time sequence point position;

[0089] pos_JGList2 0..m : pos_JGList1 0..m array sorted in ascending order by acquisition time point;

[0090] MinSort(x) is the collar position sorted in ascending order;

[0091] Ts i : Standard time interval.

[0092] Specifically, the above formula is converted to code as follows:

[0093] JGList2[0..m] = Array_PaiXu(Min(JGList1[0..m].pos))

[0094] Ts = Min(JGList2[i+1].pos - JGList2[i].pos) (i:0..m)

[0095] JGList1[0..m].pos: JGList1 acquisition time sequence point position;

[0096] JGList2: JGList1 array sorted in ascending order by acquisition time point;

[0097] Ts: standard time interval.

[0098] Wherein, the algorithm formula in S4 is:

[0099] Lose_count = ((a - b) / Ts min )-1

[0100] a ∈ [pos_JGList21, pos_JGList2 m ]

[0101] b ∈ [pos_JGList20, pos_JGList2 m-1 ]

[0102] Wherein:

[0103] Lost_count: the number of missing couplings calculated between adjacent coupling data;

[0104] m: actual selected coupling number;

[0105] pos_JGList2 0..m : pos_JGList1 0..m array sorted in ascending order by acquisition time point.

[0106] Specifically, the above formula is converted to code as:

[0107] Lose_count = ((JGList2[i+1].pos - JGList2[i].pos) / Ts) -1 (i:0..m)

[0108] Lost_count: the number of missing couplings calculated between adjacent coupling data.

[0109] It can be understood that, in order to improve the accuracy of the sound velocity calculation, all data in the collar point array are not referenced when the sound velocity is calculated. The front part of the array data is extremely likely to be a collar wave, but the subsequent data of the array can be an echo repeated wave, clutter and the like, and is not a real collar wave. Therefore, when the real calculation is performed, only the first JG_Count collar positions of the collar point array are used for the calculation, so as to meet the accuracy requirement of the sound velocity calculation.

[0110] In addition to the preferred embodiments described above, the present application also has other embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

Claims

1. An automatic detection method for coupling waves at the fluid level in oil and gas wells, characterized in that: Includes the following steps: S1: By traversing all liquid surface data points, record the position and waveform amplitude of each liquid surface data point at the acquisition time to obtain the first waveform point array. Use empirical values ​​or algorithms to remove the range of the front wellhead waveform to obtain the remaining part as the range of the coupling wave. Then sort them in descending order or ascending order to form the second waveform point array. The first part of the second waveform point array is the coupling waveform data point or the liquid surface waveform point, thereby eliminating small clutter waveforms. S2: Estimate the number of test points between adjacent couplings based on the sampling frequency, calculate the number of test points between adjacent couplings, and use this as the maximum sampling point range Max_t and minimum sampling point range Min_t for adjacent couplings. Subtract the time positions of all values ​​in the second waveform point array generated in the first step from the data of adjacent points. The difference within the range of Max_t and Min_t is considered a qualified coupling waveform data point. Qualified coupling waveform data points are selected and placed into a new array as the initial coupling point array pos_JGList1. Coupling waveform data points with differences outside the empirical value range are judged as abnormal noise or other waveform data between couplings. S3: Sort the initial array of coupling points pos_JGList1 obtained from S2 according to the time order of each collection point, so that the data points in the array are arranged in the order of sampling time from first to last. Then, calculate the difference between adjacent points for the arranged data, and record the minimum difference with the highest frequency as the time interval between adjacent couplings, which is temporarily named the standard interval Ts. i, Then Ts i Value filtering to get the minimum value Ts min ; S4: Check all differences calculated in S3. If a difference is greater than the standard interval Ts... min The multiple of the above calculation means that due to waveform attenuation or other reasons, there are missing joints between adjacent data points in the above calculation, and the number of missing joints Lose_count is the multiple of this number minus 1. In order to find the missing joints, the position interval of the corresponding adjacent data points should be found in the original data array, and the data should be extracted from this interval, sorted, and the first Lose_count values ​​should be taken as the missing joints. They should be inserted at equal intervals between the joints before and after the difference to form the final joint array.

2. The automatic detection method for fluid level coupling wave in oil and gas wells according to claim 1, characterized in that: After the first waveform point array in S1 is removed by the algorithm, it is sorted in descending order, with the wave peak as the joining point; the sorting formula in descending order is as follows: MaxSort(x) x∈[Data0, Data n-jkcount ] in: MaxSort(x) sorts the original data in descending order; x: Waveform amplitude of the original acquired data point; jkcount: The number of data points occupied by the wellhead waveform as determined by empirical values; n: The total number of data points collected.

3. The automatic detection method for fluid level coupling wave in oil and gas wells according to claim 1, characterized in that: The algorithm formula used in S2 is as follows: Min_t=JG_length / Speed_min / Freq Max_t=JG_Count*(JG_length / Speed_max / Freq) Where: Min_t: Minimum number of data points between adjacent couplings; Speed_min: Minimum sound velocity inside the oil casing, an empirical value; Speed_max: The maximum speed of sound inside the oil casing, which is an empirical value; Freq: Sampling frequency; Max_t: The maximum number of data points between adjacent couplings. It needs to be multiplied by JG_Count in order to select only the number of coupling waves used for calculation and exclude the subsequent liquid surface waveforms. JG_Count: The planned number of couplings to be selected.

4. The automatic detection method for coupling waves at the fluid level in oil and gas wells according to claim 1, characterized in that: The algorithm formula in S3 is: pos_JGList2=MinSort(x)x∈[pos_JGList10, pos_JGList1 m ] Ts i = pos_JGList2 i - pos_JGList2 i i∈[0,m] in: pos_JGList1 0..m JGList1 captures the time sequence points and positions; pos_JGList2 0..m pos_JGList1 0..m An array sorted from smallest to largest according to the collection time point; MinSort(x) sorts the coupling positions in ascending order; Ts i Standard time interval.

5. The automatic detection method for fluid level coupling wave in oil and gas wells according to claim 1, characterized in that: The algorithm formula in S4 is: Lose_count=((a-b) / Ts min )-1 a∈[pos_JGList21,pos_JGList2 m ] b∈[pos_JGList20,pos_JGList2 m-1 ] in: Lost_count: The number of missing couplings between adjacent coupling data; m: The actual number of couplings selected; pos_JGList2 0..m pos_JGList1 0..m The array is sorted from smallest to largest according to the collection time point.

Citation Information

Patent Citations

  • Measurement and control pressure testing system of petroleum well control device

    CN101017372A

  • HHT-based intelligent automatic waveform analysis method

    CN113792628A