Oil and gas well liquid level coupling wave automatic detection method
By implanting a hoop in a computer software to automatically find algorithms, the oil and gas well liquid surface hoop position is automatically selected to solve the problem of inaccurate depth calculation caused by artificial selection, and improvement efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411540225.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-31
AI Technical Summary
In the prior art, the accuracy of the calculation of the fluid level depth of the oil and gas well is affected by the selection of the joint waveform position, and manual selection can easily lead to inaccurate calculations.
Through an automatic detection method of the oil -gas well liquid surface hoop wave wave, the computer software is used to implant the hoop to automatically find the algorithm, automatically selects the hoop position, and automatically calculates the internal sound speed and the depth of the liquid surface.
It greatly improves the efficiency and accuracy of the data processing, and avoids the phenomenon of incorrect selection errors and liquid data calculation distortion caused by artificial operation.
Abstract
Description
Technical Field
[0001] The invention relates to an automatic detection method for a collar wave of a liquid surface in an oil and gas well, belonging to the technical field of computer data processing. Background Art
[0002] As one of the most commonly used production management methods to measure the production status of oil and gas wells in oil and gas field production, wellbore liquid level calculation plays a very important role in the oil and gas production process. The numerical change of the 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 obtained accurately and efficiently directly affects the judgment of the production status of the oil and gas well.
[0003] Liquid level data is collected at a fixed frequency by the acquisition instrument. The most commonly used method for calculating liquid level data is the collar calculation method. The principle is to obtain the propagation speed of sound in the wellbore by dividing the known length of the collar distance by the transmission time of the sound between the collars, and then calculate the final liquid level depth by multiplying the sound speed by the time interval between the position of the liquid surface wave and the position of the wellhead wave. Due to the complex and changeable factors such as the pressure in the wellbore and the mixed medium, the sound speed in the wellbore is not uniform and fixed. The accuracy of the sound speed calculation directly affects the accuracy of the liquid level depth. Therefore, the selection of the collar waveform position becomes a key factor affecting the accuracy of the liquid level depth calculation.
[0004] The selection of the coupling wave is usually done manually, but usually the large amount of test data, heavy workload, and different manual operation responsibilities, calculations, and work experience will directly lead to inaccurate calculations. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides an automatic detection method for collar waves on the liquid surface of oil and gas wells, which solves the problem of inaccurate calculations caused by inconsistent working experience.
[0006] The present invention provides an automatic detection method for a collar wave of a liquid surface in an oil and gas well, comprising the following steps:
[0007] S1: By traversing all liquid surface data points, recording the positions and waveform amplitudes of all liquid surface data points at the time of acquisition to obtain the first waveform point array, removing the range of the front wellhead waveform by empirical value or algorithm, and obtaining the remaining part as the range of the collar wave; then sorting in order from large to small or from small to large to form a second waveform point array, the front part of the second waveform point array is the collar waveform data point or liquid surface waveform point, thereby excluding small clutter waveforms.
[0008] S2: Estimate the number of test points between adjacent collars according to the sampling frequency, calculate the number of test points between adjacent collars, and use this as the maximum sampling point range Max_t and the minimum sampling point range Min_t of adjacent collars. Subtract the time position of adjacent point data from all values of the second waveform point array generated in the first step. The qualified collar waveform data points are those with differences within the range of Max_t and Min_t. The qualified collar waveform data points are screened out and put into a new array as the preliminary array of collar points pos_JGList1; the collar waveform data points with differences outside the empirical value range are judged as abnormal clutter or other waveform data between collars.
[0009] S3: Sort the preliminary array of collar points pos_JGList1 obtained in S2 according to the time point sequence of each sampling point, so that the data points of the array are arranged in the order of sampling time from the earliest to the latest, and then calculate the difference of the arranged data according to the position of adjacent points, and record the minimum difference with the highest frequency as the time interval between adjacent collar points, which is temporarily named the standard interval Ts i, Then Ts i Value screening takes the minimum value Ts min .
[0010] S4: Check all the differences calculated in S3, if the difference is greater than the standard interval Ts min It is considered that there are missing collar points between the adjacent data due to waveform attenuation or other reasons, and the number of missing collars Lose_count is the multiple value - 1. To find the missing collar points, find the position interval of the adjacent data points in the original data array, intercept the data in this interval, sort them, take the first Lose_count values as the completed collar points, and insert them equally spaced between the collar points before and after the difference to form the final collar point array.
[0011] Furthermore, after the first waveform point array in S1 is removed by the algorithm, it is sorted in descending order, and the wave crest is used as the tie point; the sorting formula from large to small is:
[0012] MaxSort(x)x∈[Data0,Data n-jkcount ]
[0013] in:
[0014] MaxSort(x) sorts the original data from largest to smallest;
[0015] x: waveform amplitude of the original collected data point;
[0016] jkcount: the number of data points occupied by the wellhead waveform determined by the empirical value;
[0017] n: The number of all data points collected.
[0018] Furthermore, the algorithm formula used in S2 is:
[0019] Min_t=JG_length / Speed_min / FreqMax_t=JG_Count*(JG_length / Speed_max / Freq)
[0020] Where: Min_t: minimum number of data points between adjacent collars;
[0021] Speed_min: minimum sound speed in the oil casing, which is an empirical value;
[0022] Speed_max: Maximum sound speed 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. It needs to be multiplied by JG_Count in order to select only the number of collar waves used for calculation and exclude the following liquid surface and other waveforms;
[0025] JG_Count: The number of couplings to be selected.
[0026] Furthermore, 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] in:
[0030] MinSort(x) is the order of the collar positions from small to large;
[0031] pos_JGList1 0..m : JGList1 collects the time sequence point position;
[0032] pos_JGList2 0..m :pos_JGList1 0..m An array sorted from small to large in the order of acquisition time points;
[0033] MinSort(x) is the order of the collar positions from small to large;
[0034] Ts i : Standard time interval.
[0035] Furthermore, the algorithm formula in S4 is:
[0036] Lose_count=((ab) / Ts min )-1
[0037] a∈[pos_JGList21,pos_JGList2 m ]
[0038] b∈[pos_JGList20,pos_JGList2 m-1 ]
[0039] in:
[0040] Lost_count: The number of missing couplings between the calculated adjacent coupling data;
[0041] m: the actual number of selected couplings;
[0042] pos_JGList2 0..m :pos_JGList1 0..m An array sorted from small to large in the order of acquisition time points.
[0043] The above technical solution is adopted, and the advantages of the present invention are: the computer software can directly realize the automatic selection of the coupling position after loading the data file by implanting the automatic coupling search algorithm, and then automatically calculate the sound velocity and liquid level depth in the pipe. Compared with the operation method of manually selecting the coupling position, the data processing efficiency and accuracy are greatly improved, and the distortion of liquid level data calculation caused by the problems of wrong coupling selection and low coupling selection efficiency caused by manual operation is avoided. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0045] The terms "first", "second", etc. (if any) in the specification and claims of the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence. Even if "second" is used to distinguish before a certain technical feature, it does not necessarily indicate that "first" is present. It should be understood that in the present invention, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. It should be understood that in the present invention, "multiple" refers to two or more. "And / or" is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, X and / or Y can represent: X exists alone, X and Y exist at the same time, and Y exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "Containing X, Y and Z", "Containing X, Y, Z" means that X, Y, and Z are all included, "Containing X, Y or Z" means that one of X, Y, and Z is included, and "Containing X, Y and / or Z" means that any one, any two, or three of X, Y, and Z are included.
[0046] The present invention provides an automatic detection method for a liquid level collar wave of an oil and gas well, comprising the following steps:
[0047] S1: By traversing all liquid surface data points, recording the positions and waveform amplitudes of all liquid surface data points at the time of acquisition to obtain the first waveform point array, removing the range of the front wellhead waveform by empirical value or algorithm, and obtaining the remaining part as the range of the collar wave; then sorting in order from large to small or from small to large to form a second waveform point array, the front part of the second waveform point array is the collar waveform data point or liquid surface waveform point, thereby excluding small clutter waveforms.
[0048] S2: Estimate the number of test points between adjacent collars according to the sampling frequency, calculate the number of test points between adjacent collars, and use this as the maximum sampling point range Max_t and the minimum sampling point range Min_t of adjacent collars. Subtract the time position of adjacent point data from all values of the second waveform point array generated in the first step. The qualified collar waveform data points are those with differences within the range of Max_t and Min_t. The qualified collar waveform data points are screened out and put into a new array as the preliminary array of collar points pos_JGList1; the collar waveform data points with differences outside the empirical value range are judged as abnormal clutter or other waveform data between collars.
[0049] S3: Sort the preliminary array of collar points pos_JGList1 obtained in S2 according to the time point sequence of each sampling point, so that the data points of the array are arranged in the order of sampling time from the earliest to the latest, and then calculate the difference of the arranged data according to the position of adjacent points, and record the minimum difference with the highest frequency as the time interval between adjacent collar points, which is temporarily named the 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 It is considered that there are missing collar points between the adjacent data due to waveform attenuation or other reasons, and the number of missing collars Lose_count is the multiple value - 1. To find the missing collar points, find the position interval of the adjacent data points in the original data array, intercept the data in this interval, sort them, take the first Lose_count values as the completed collar points, and insert them equally spaced between the collar points before and after the difference to form the final collar point array.
[0051] The present invention is used for computer software that implants an automatic coupling search algorithm, and can directly realize automatic selection of coupling positions after loading data files, thereby automatically calculating the sound velocity and liquid level depth in the pipe. Compared with the operation mode of manually selecting coupling positions, the present invention greatly improves data processing efficiency and accuracy, and avoids the distortion of liquid level data calculation caused by problems such as wrong coupling selection and low coupling selection efficiency caused by manual operation.
[0052] Among them, after the first waveform point array in S1 is removed by the algorithm, it is sorted in descending order, and the wave crest is used as the tie point; the sorting formula from large to small is:
[0053] MaxSort(x)x∈[Data0,Data n-jkcount ]
[0054] in:
[0055] MaxSort(x) sorts the original data from largest to smallest;
[0056] x: waveform amplitude of the original collected data point;
[0057] jkcount: the number of data points occupied by the wellhead waveform determined by the empirical 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 the empirical value;
[0061] n: the number of all data points collected;
[0062] Data[jkcount..n].val: waveform amplitude of the original collected data point;
[0063] Arraty_data[0..n-jkcount]: Data[jkcount..n].val is arranged from large to small;
[0064] Array_PaiXu():The sequence group after sorting algorithm.
[0065] Among them, the algorithm formula used in S2 is:
[0066] Min_t=JG_length / Speed_min / FreqMax_t=JG_Count*(JG_length / Speed_max / Freq)
[0067] Where: Min_t: minimum number of data points between adjacent collars;
[0068] Speed_min: minimum sound speed in the oil casing, which is an empirical value;
[0069] Speed_max: Maximum sound speed 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. It needs to be multiplied by JG_Count in order to select only the number of collar waves used for calculation and exclude the following liquid surface and other waveforms;
[0072] JG_Count: The number of couplings to be selected.
[0073] 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: Minimum number of data points between adjacent collars
[0077] Speed_min: minimum sound speed in the oil casing, which is an empirical value
[0078] Speed_max: Maximum sound speed in the oil casing, which is an empirical value
[0079] Freq 采样 : Sampling frequency
[0080] Max_t: The maximum number of data points between adjacent collars. It needs to be multiplied by JG_Count in order to select only the collar waves used for calculation, excluding the subsequent liquid surface and other waveforms.
[0081] JG_Count: The number of couplings to be selected
[0082] m: The actual number of selected couplings
[0083] JGList1: preliminary array of collar points
[0084] Among them, 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] in:
[0088] pos_JGList1 0..m : JGList1 collects the time sequence point position;
[0089] pos_JGList2 0..m :pos_JGList1 0..m An array sorted from small to large in the order of acquisition time points;
[0090] MinSort(x) is the order of the collar positions from small to large;
[0091] Ts i : Standard time interval.
[0092] Specifically, the above formula is converted into 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: An array obtained by sorting JGList1 in ascending order of acquisition time points;
[0097] Ts: standard time interval.
[0098] Among them, the algorithm formula in S4 is:
[0099] Lose_count=((ab) / Ts min )-1
[0100] a∈[pos_JGList21,pos_JGList2 m ]
[0101] b∈[pos_JGList20,pos_JGList2 m-1 ]
[0102] in:
[0103] Lost_count: The number of missing couplings between the calculated adjacent coupling data;
[0104] m: the actual number of selected couplings;
[0105] pos_JGList2 0..m :pos_JGList1 0..m An array sorted from small to large in the order of acquisition time points.
[0106] Specifically, the above formula is converted into code as follows:
[0107] Lose_count=((JGList2[i+1].pos-JGList2[i].pos) / Ts)-1(i:0..m)
[0108] Lost_count: The calculated number of missing couplings between adjacent coupling data.
[0109] It is understandable that in order to improve the accuracy of sound speed calculation, all data in the coupling point array will not be referenced when performing sound speed calculation. The first part of the array data is very likely to be a coupling wave, but the subsequent data in the array may be echo repetitive waveforms, clutter, etc., not real coupling waves. Therefore, when actually calculating, we only use the first JG_Count coupling positions of the coupling point array for calculation to meet the accuracy requirements of sound speed calculation.
[0110] In addition to the above-mentioned preferred embodiments, the present invention also has other implementation modes. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work are within the scope of protection requested by the present invention.
Claims
1. A method for automatically detecting the collar wave of the liquid surface of an oil and gas well, characterized in that: The following steps are involved: S1: By traversing all liquid surface data points, recording the positions and waveform amplitudes of all liquid surface data points at the time of acquisition to obtain the first waveform point array, removing the range of the front wellhead waveform by empirical value or algorithm, and obtaining the remaining part as the range of the collar wave; then sorting in order from large to small or from small to large to form a second waveform point array, the front part of the second waveform point array is the collar waveform data point or liquid surface waveform point, thereby excluding small clutter waveforms. S2: Estimate the number of test points between adjacent collars according to the sampling frequency, calculate the number of test points between adjacent collars, and use this as the maximum sampling point range Max_t and the minimum sampling point range Min_t of adjacent collars. Subtract the time position of adjacent point data from all values of the second waveform point array generated in the first step. The qualified collar waveform data points are those with differences within the range of Max_t and Min_t. The qualified collar waveform data points are screened out and put into a new array as the preliminary array of collar points pos_JGList1; the collar waveform data points with differences outside the empirical value range are judged as abnormal clutter or other waveform data between collars. S3: Sort the preliminary array of collar points pos_JGList1 obtained in S2 according to the time point sequence of each sampling point, so that the data points of the array are arranged in the order of sampling time from the earliest to the latest, and then calculate the difference of the arranged data according to the position of adjacent points, and record the minimum difference with the highest frequency as the time interval between adjacent collar points, which is temporarily named the standard interval Ts i, Then Ts i Value screening takes the minimum value Ts min . S4: Check all the differences calculated in S3, if the difference is greater than the standard interval Ts min It is considered that there are missing collar points between the adjacent data due to waveform attenuation or other reasons, and the number of missing collars Lose_count is the multiple value - 1. To find the missing collar points, find the position interval of the adjacent data points in the original data array, intercept the data in this interval, sort them, take the first Lose_count values as the completed collar points, and insert them equally spaced between the collar points before and after the difference to form the final collar point array.
2. The method for automatically detecting the liquid level collar wave of an oil and gas well 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, and the wave crest is used as the tie point; the sorting formula from large to small is: MaxSort(x)x∈[Data0,Data n-jkcount ] in: MaxSort(x) sorts the original data from largest to smallest; x: waveform amplitude of the original collected data point; jkcount: the number of data points occupied by the wellhead waveform determined by the empirical value; n: The number of all data points collected.
3. The method for automatically detecting the liquid level collar wave of an oil and gas well according to claim 1, characterized in that: The algorithm formula used in S2 is: 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 collars; Speed_min: minimum sound speed in the oil casing, which is an empirical value; Speed_max: Maximum sound speed in the oil casing, which is an empirical value; Freq: sampling frequency; Max_t: The maximum number of data points between adjacent collars. It needs to be multiplied by JG_Count in order to select only the collar waves used for calculation and exclude the subsequent liquid surface and other waveforms; JG_Count: The number of couplings to be selected.
4. The method for automatically detecting the liquid level collar wave of an oil and gas well 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 collects the time sequence point position; pos_JGList2 0..m :pos_JGList1 0..m An array obtained by sorting the acquisition time points from small to large; MinSort(x) is the order of the collar positions from small to large; Ts i : Standard time interval.
5. The method for automatically detecting the liquid level collar wave of an oil and gas well 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 the calculated adjacent coupling data; m: the actual number of selected couplings; pos_JGList2 0..m :pos_JGList1 0..m An array sorted from small to large in the order of acquisition time points.
Citation Information
Patent Citations
Measurement and control pressure testing system of petroleum well control device
CN101017372A
HHT-based intelligent automatic waveform analysis method
CN113792628A
Visual positioning and measuring method for well drilling pipe column and coupling
CN118038009A