A method for early monitoring and early warning of well leakage risk
By combining Fourier time-frequency transform with moving average and deviation integral methods, early detection and warning of well leakage are achieved, solving the problems of delayed well leakage identification and false alarms in existing technologies, and improving the timeliness and accuracy of well leakage identification.
Patent Information
- Application Number
- CN202111422696.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2041-11-26
AI Technical Summary
Existing well leakage monitoring methods rely on manual judgment and threshold methods, which leads to delayed well leakage identification, frequent false alarms, and failure to detect complex well leakage situations in a timely manner, thus posing safety hazards.
Fourier time-frequency transform is used to determine the moving average time period of the drilling fluid outlet flow signal. The moving average and deviation integral methods are combined to form a comprehensive alarm method. By calculating the moving average and magnitude relationship of the signal and the deviation integral value, a threshold is automatically generated to realize early well leakage identification and alarm.
It improves the timeliness of well leakage identification, reduces false alarms, ensures timely identification and action in the early stages of well leakage, and reduces the risk of well leakage becoming more complex.
Smart Images

Figure CN116181319B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil drilling technology, and in particular to a method for early monitoring and warning of well leakage risk. Background Technology
[0002] Loss in wells (WSL) refers to a complex downhole situation where various working fluids directly enter the formation under differential pressure during downhole operations such as drilling, cementing, testing, or workover. WL is a common complex situation in drilling engineering, with most drilling processes experiencing some degree of leakage. Severe WL can lead to a drop in well pressure, affecting normal drilling, causing wellbore instability, and inducing formation fluid inrush and blowouts. If WL is identified promptly and risk control measures are taken, the amount of drilling fluid loss can be reduced, and complex events such as well kicks, wellbore instability, and stuck pipe caused by leakage can be prevented. Therefore, how to dynamically identify WL risk during drilling operations has always been a research hotspot.
[0003] Currently, there are two main methods for monitoring lost circulation (LOB) in wells: one is to monitor changes in the mud tank level at fixed intervals; if the mud tank level drops below a threshold, a LOB is considered to have occurred. The second method involves monitoring changes in the drilling fluid outlet flow rate using a drilling fluid outlet flow sensor on logging or drilling parameter instruments. If the outlet flow rate drops sharply and exceeds a threshold while the pumped drilling fluid flow rate remains constant, a LOB is considered to have occurred. In the field, both methods are usually combined, and a correct judgment can generally be made when a significant LOB occurs. However, certain problems exist. Most analysis and judgment still rely on manual work. Due to differences in individual knowledge, experience, and sense of responsibility, LOBs are often not detected in a timely manner, leading to more complex and worsening LOBs, or serious malfunctions such as overflows or stuck pipe. In reality, it is unrealistic to expect operators to be fully focused on observing changes in monitoring data and quickly determine the incident. Currently, some logging and drilling parameter instruments have LOB monitoring and alarm functions, but their main method is the threshold method, i.e., an alarm is triggered when the monitored parameter exceeds a subjectively set threshold. This method suffers from problems such as unscientific threshold settings, frequent false alarms, and significant lag. Summary of the Invention
[0004] In view of this, the present invention provides a method for early monitoring and warning of well leakage risk. This method can identify and alarm at the early stage of complex well leakage, thereby improving the timeliness of well leakage identification.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] A method for early monitoring and warning of well leakage risk, comprising the following steps:
[0007] S120. Calculate the moving average of the current drilling fluid outlet flow rate signal over multiple time periods.
[0008] S150. Determine the moving average value and magnitude relationship of the preceding multiple time periods to form the first alarm event B[i];
[0009] S230. Calculate the integral value of the deviation of the current drilling fluid outlet flow rate signal forward over a specified time period.
[0010] S240. A second alarm event C[i] is generated based on the deviation integral value;
[0011] S300. Calculate the comprehensive alarm events and denote them as array D[i]. The expression is:
[0012]
[0013] An alarm is triggered when D[i]=1; no alarm is triggered when D[i]=0.
[0014] Preferably, the method further includes, before step S120:
[0015] Step S110, determine the lengths a, b, and c of the moving average over the previous three time periods, including:
[0016] The existing drilling fluid outlet flow rate signal is subjected to time-frequency transformation using the Fourier transform method to determine the dominant frequency of the drilling fluid outlet flow rate. The calculation method for the moving average value of the preceding three time periods, a, b, and c, is as follows:
[0017] (1)
[0018] (2)
[0019] (3)
[0020] In the formula: a, b, c are the moving average time periods, in seconds; fw[i] is the outflow flow frequency, in Hz;
[0021] If the time-frequency conversion result of the outflow flow signal does not have a specific main frequency, set the default values of a, b, and c to a=60s, b=120s, and c=180s.
[0022] Preferably, step S120 includes:
[0023] The moving average and standard deviation of the drilling fluid outlet flow rate signal FLO[i] received at the current moment are calculated a, b, and c seconds in advance. The calculation method is as follows:
[0024] (4)
[0025] (5)
[0026] (6)
[0027] (7)
[0028] (8)
[0029] (9)
[0030] Where M1 is the moving average of segment a, M2 is the moving average of segment b, and M3 is the moving average of segment c; std1 is the standard deviation of segment a, std2 is the standard deviation of segment b, and std3 is the standard deviation of segment c.
[0031] Preferably, after step S120, the method further includes:
[0032] Step S130: Wild point removal and updating, including:
[0033] Outlier points are removed from the FLO signals of the outflow during time periods a, b, and c, and the average values M1, M2, and M3 are reassigned to the removed points. The process is as follows:
[0034] For time period a: compare each value of FLO(i-a+1:i) with |M1±3*std1|. If the result is less than, keep the original value unchanged; if the result is greater than, remove the value of that point and reassign it to M1.
[0035] For time interval b: compare each value of FLO(i-b+1:i) with |M2±3*std2|. If the result is less than, keep the original value unchanged; if the result is greater than, remove the value of that point and reassign it to M2.
[0036] For time interval c: compare each value of FLO(i-c+1:i) with |M3±3*std3|. If the result is less than, keep the original value unchanged; if the result is greater than, remove the value of that point and reassign it to M3.
[0037] Step S140: Moving average update, including:
[0038] For the updated outflow signal FLO, the moving average values M11, M21, and M31 are recalculated according to formulas (4), (5), and (6).
[0039] Preferably, after step S140, the method further includes:
[0040] Step S150: If the moving averages of the outlet flow rates M11, M21, and M31 calculated based on the current time point satisfy the relationship M11 < M21 < M31, assign the element A[i] in the array A the value of 1; otherwise, assign it the value of 0. The expression for the first alarm event B[i] is:
[0041]
[0042] In the formula: d is the specified time period length, with the unit of s;
[0043] Step S150: Continuously receive data and repeat steps S120 - S150.
[0044] Preferably, step S240 includes: If the current deviation integral value Integ[i] < threshold Y, assign the element C[i] in the array C the value of 1; otherwise, assign it the value of 0.
[0045] Preferably, before step S240, it further includes:
[0046] Step S210: Determine whether the received outlet flow rate measurement value FLO[i] is data for the previous e seconds, including:
[0047] For the received outlet flow rate measurement value FLO[i], according to the initial setting, determine whether it is data for the previous e seconds, that is, i ≤ e, where e is the specified time period length, with the unit of s; if so, set the value of the deviation integral Integ[i] to 0. If not, calculate the average value M of the outlet flow rate measurements for the previous e seconds and continue to execute step S220;
[0048] Step S220: Determine whether it is necessary to update the average value M and automatically generate a threshold, including:
[0049] When i / e is an integer, it is necessary to recalculate the average value M of the outlet flow rate within the time period [i - e + 1, i] and update it. At the same time, calculate the minimum value of the deviation integral Integ within this time period as the reference threshold Y; if it is not an integer, there is no need to calculate and update. The expression for the threshold Y is:
[0050] .
[0051] Preferably, step S230 includes: Calculate the deviation integral, and the deviation integral expression is:
[0052]
[0053] In the formula: Integ is the deviation integral, with the unit of %, n is the time step for collecting the outlet flow rate signal, with the unit of s.
[0054] Obtain the integrated deviation value of the outlet flow rate data within this period of time ( Figure 6 ), and the schematic diagram of the lost circulation risk alarm 2 based on the integrated deviation Figure 7 ; if the current integrated deviation value Integ[i] < Y, assign the element C[i] in the array C to 1, otherwise assign it to 0.
[0055] Preferably, after the step S240, it further includes:
[0056] Step S250, receive new data and repeat steps S210 - S240.
[0057] Preferably, after the step S300, it further includes: lost circulation risk assessment, including:
[0058] When D[i] = 1, the lost circulation alarm is triggered. At this time, continuously track the total volume V of the drilling fluid in the mud tank, and take corresponding measures according to the reduction amount △V of the total volume V of the drilling fluid in the mud tank within the duration △t.
[0059] As can be seen from the above technical solutions, the lost circulation risk early monitoring and warning method provided by the present invention first uses the Fourier time - frequency transformation method to obtain the time - period length for calculating the moving average value of the outlet flow rate signal, and then uses the statistical method to remove outliers from the outlet flow rate signal within this time - period length and replace it with the average value of the signal within this time - period; by calculating the moving average values and the magnitude relationships of the signals within three time - periods, an alarm method 1 is formed; by calculating the integrated deviation value of the signal within a specified time - period length of the signal, a threshold is automatically generated to form an alarm method 2; finally, a comprehensive alarm method is formed based on alarm method 1 and alarm method 2, realizing the monitoring and warning in the early stage of lost circulation occurrence.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] 1. The time - frequency variation method is used to determine the selection of the time - period for calculating the moving average value of the drilling fluid outlet flow rate, so that the main fluctuation characteristics of the signal are included within this time - period, which is more scientific;
[0062] 2. The comprehensive alarm method formed based on the moving average value method and the integrated deviation method ensures the sensitivity of the algorithm to the decreasing trend monitoring of the outlet displacement signal, and at the same time can eliminate the risk false alarms caused by the normal fluctuations of the data;
[0063] 3. Using the minimum value of the integrated deviation of the previous time - period to automatically generate the threshold reduces the error caused by artificially setting the threshold according to experience, and has a good recognition effect in the early stage of lost circulation occurrence. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 A flowchart for calculating the deviation integral provided in an embodiment of the present invention;
[0066] Figure 2 This is an embodiment of the invention showing the change in outlet flow rate of Well A over a certain period of time.
[0067] Figure 3 This is a time-frequency transformation diagram of the outlet flow rate of Well A provided in an embodiment of the present invention;
[0068] Figure 4 This is an example of the change in the moving average value of the outlet flow rate of Well A over a certain period of time, provided by an embodiment of the present invention.
[0069] Figure 5 This is a schematic diagram of alarm 1 for well A provided in an embodiment of the present invention;
[0070] Figure 6 This is an integral diagram showing the segmented deviation of the outlet flow rate of Well A provided in an embodiment of the present invention.
[0071] Figure 7 This is a schematic diagram of alarm 2 for well A provided in an embodiment of the present invention;
[0072] Figure 8 This is a schematic diagram of the integrated alarm system for well A provided in an embodiment of the present invention. Detailed Implementation
[0073] Drilling fluid outlet flow rate is one of the key data collected during drilling, and utilizing this data for real-time monitoring of well leakage is of great significance in drilling operations. Traditional well leakage monitoring and early warning methods often employ relatively simple threshold methods, which cannot effectively identify and alarm in the early stages of well leakage. To address these issues, this invention uses a time-frequency transformation method to obtain the interval for calculating the moving average of the signal, eliminates interference signals through signal filtering, and then integrates the moving average method and the deviation integral method to form a comprehensive early warning method for monitoring well leakage. This method can identify and alarm in the early stages of complex well leakage, improving the timeliness of complex well leakage identification. Addressing the current problems in well leakage risk early warning, this patent develops an early well leakage monitoring and early warning method.
[0074] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0075] The well leakage risk early monitoring and warning method provided in this embodiment of the invention includes:
[0076] Step 1: Calculation and Alarm of Moving Average Value of Drilling Fluid Outlet Flow Signal
[0077] ① Determine the lengths a, b, and c of the time period for calculating the moving average.
[0078] The existing drilling fluid outlet flow rate signal is subjected to time-frequency transformation using the Fourier transform method to determine the dominant frequencies fw1, fw2, fw3...fwn of the drilling fluid outlet flow rate. The calculation method for the moving average time period lengths a, b, and c is as follows:
[0079] (1)
[0080] (2)
[0081] (3)
[0082] In the formula: a, b, c are the moving average time periods, s; fw[i] is the main frequency of outflow traffic, Hz.
[0083] If the time-frequency conversion result of the outflow flow signal does not have a specific main frequency, set the default values of a, b, and c to a=60s, b=120s, and c=180s.
[0084] The purpose of this method is to determine the length of the time period for calculating the moving average and to ensure that the outflow signal within that time period contains all the fluctuation characteristics of the signal.
[0085] ② Calculate the moving average of the currently received signal over time intervals a, b, and c seconds.
[0086] The moving average and standard deviation of the drilling fluid outlet flow rate signal FLO[i] received at the current moment are calculated a, b, and c seconds in advance. The calculation method is as follows:
[0087] (4)
[0088] (5)
[0089] (6)
[0090] (7)
[0091] (8)
[0092] (9)
[0093] ③ Outlier rejection and update
[0094] Outlier rejection is performed on the outlet flow FLO signals during time periods a, b, and c respectively, and the average values M1, M2, and M3 are re-assigned to the rejected points. The specific process is as follows:
[0095] For time period a: Determine the magnitude relationship between each value of FLO(i - a + 1:i) and |M1 ± 3*std1|. If the result is less than, the original value remains unchanged; if the result is greater than, the value of that point is rejected and re-assigned as M1.
[0096] For time period b: Determine the magnitude relationship between each value of FLO(i - b + 1:i) and |M2 ± 3*std2|. If the result is less than, the original value remains unchanged; if the result is greater than, the value of that point is rejected and re-assigned as M2.
[0097] For time period c: Determine the magnitude relationship between each value of FLO(i - c + 1:i) and |M3 ± 3*std3|. If the result is less than, the original value remains unchanged; if the result is greater than, the value of that point is rejected and re-assigned as M3.
[0098] ④ Moving average update
[0099] [[ID=3,1]] For the updated outlet flow signal FLO, recalculate the moving average values M11, M21, and M31 according to formulas (4), (5), and (6).
[0100] ⑤ Trigger alarm 1
[0101] If the moving average values of the outlet flow M11, M21, and M31 calculated based on the current time point satisfy the relationship M11 < M21 < M31, assign the element A[i] in the array A as 1, otherwise assign it as 0; for convenience of explanation, the trigger alarm event is denoted as B[i], and its expression is:
[0102]
[0103] In the formula: d is the specified time period length, with the unit s.
[0104] If B[i] = 1, trigger alarm 1; if B[i] = 0, do not trigger alarm 1.
[0105] ⑥ Continuously receive data and repeat steps ② - ⑤.
[0106] Step 2: Calculation and alarm of the integral of the deviation of the drilling fluid outlet flow rate
[0107] ① Determine whether the received outlet flow rate measurement value FLO[i] is data from the previous e seconds
[0108] For the received outlet flow rate measurement value FLO[i], according to the initial setting, determine whether it is data from the previous e seconds, that is, i ≤ e, where e is the specified time period length, in seconds. If it is, set the value of the deviation integral Integ[i] to 0. If not, calculate the average value M of the outlet flow rate measurement values in the previous e seconds and continue to execute ②.
[0109] ② Determine whether to update the average value M and automatically generate a threshold
[0110] When i / e is an integer, it is necessary to recalculate the average value M of the outlet flow rate within the time period [i - e + 1, i] and update it. At the same time, calculate the minimum value of the deviation integral Integ within this time period as the reference threshold Y; if it is not an integer, there is no need to calculate and update. The expression for the threshold Y is:
[0111]
[0112] ③ Calculate the deviation integral
[0113] The expression for the deviation integral is:
[0114]
[0115] In the formula: Integ is the deviation integral, %, n is the time step for collecting the outlet flow rate signal, in seconds. Here n = 1s.
[0116] ④ Trigger alarm 2
[0117] If the current deviation integral value Integ[i] < Y, assign the element C[i] in the array C to 1, otherwise assign it to 0.
[0118] ⑤ Receive new data and repeat steps ① - ④ [[ID=�9]]
[0119] Step 3: Comprehensive alarm for the outlet flow rate
[0120] Record the comprehensive alarm event as the array D[i], and its expression is:
[0121]
[0122] When D[i] = 1, trigger the alarm; when D[i] = 0, do not trigger the alarm.
[0123] Step 4: Well leakage risk assessment
[0124] When D[i]=1, the well leakage alarm is triggered. At this time, the total volume V of drilling fluid in the mud tank should be continuously tracked, and corresponding measures should be taken according to the reduction ΔV of the total volume V of drilling fluid in the mud tank within the duration Δt.
[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0126] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for early monitoring and warning of well loss risk, characterized in that, The method comprises the steps of: S120, calculating the moving average value of the current drilling fluid outlet flow signal for a plurality of time periods in the future; S130, wild point elimination and updating; S140, moving average value updating; S150, judging the moving average value for a plurality of time periods in the future and the size relationship, forming a first alarm event B[i]; S210, judging whether the received outlet flow measurement value FLO[i] is the data of the previous e seconds; S220, judging whether the average value M needs to be updated, and automatically generating a threshold value; S230, calculating the moving average value of the current drilling fluid outlet flow signal for a specified time period in the future; S240, forming a second alarm event C[i] based on the moving average value; S300, calculating a comprehensive alarm event, which is recorded as an array D[i], and the expression is: When D[i]=1, the first alarm is triggered; When D[i]=0, the first alarm is not triggered; Before the step S120, the method further comprises the following steps: Step S110, determining the moving average value for a plurality of time periods a, b and c in the future, comprising: using the Fourier transform method to perform time-frequency transformation on the existing drilling fluid outlet flow signal to determine the main frequency of the drilling fluid outlet flow, and the calculation method of the moving average value for a plurality of time periods a, b and c in the future is: (1) (2) (3) In the formula, a, b and c are the time periods of the moving average value, and the unit is s; fw[i] is the main frequency of the outlet flow, and the unit is Hz; If the time-frequency transformation result of the outlet flow signal does not exist a specific main frequency, the default values of a, b and c are a=60 s, b=120 s and c=180 s; The step S120 comprises: calculating the moving average value and the standard deviation of the drilling fluid outlet flow signal FLO[i] received at the current time for a, b and c seconds in the future, and the calculation method is: (4) (5) (6) (7) (8) (9) In the formula, M1 is the moving average value of a, M2 is the moving average value of b, and M3 is the moving average value of c; std1 is the standard deviation of a, std2 is the standard deviation of b, and std3 is the standard deviation of c; The step S130 comprises: performing wild point elimination on the outlet flow FLO signal in the time periods a, b and c respectively, and reassigning the average values M1, M2 and M3 to the eliminated points, and the flow is: For the time period a: judging the size of each value of FLO(i-a+1:i) and |M1±3*std1|, the result is less than, the original value is kept unchanged; the result is greater than, the point value is eliminated, and the value is reassigned to M1; For the time period b: judging the size of each value of FLO(i-b+1:i) and |M2±3*std2|, the result is less than, the original value is kept unchanged; the result is greater than, the point value is eliminated, and the value is reassigned to M2; For the time period c: judging the size of each value of FLO(i-c+1:i) and |M3±3*std3|, the result is less than, the original value is kept unchanged; the result is greater than, the point value is eliminated, and the value is reassigned to M3; The step S140 comprises: recalculating the moving average values M11, M21 and M31 according to the formulas (4), (5) and (6) for the updated outlet flow signal FLO. The step S150 includes: if the moving average M11, M21, M31 of the outlet flow calculated based on the current time point satisfies the relationship M11 In the formula, d is the length of the specified time period, in seconds. The step S210 includes: for the received outlet flow measurement value FLO[i], according to the initial setting, it is judged whether it is the previous e seconds of data, i.e. i≤e, where e is the length of the specified time period, in seconds; if yes, the value of the deviation integral Integ[i] is set to 0; if no, the average M of the previous e seconds of outlet flow measurement values is calculated, and the step S220 is continued to be executed; The step S220 includes: when i / e is an integer, the outlet flow average M of the time period [i-e+1, i] needs to be recalculated and updated, and the minimum value of the deviation integral Integ of the time period is calculated as the reference threshold Y; if not, no calculation and update are needed; the expression of the threshold Y is: ; The step S230 includes: calculating the deviation integral, and the expression of the deviation integral is: In the formula, Integ is the deviation integral, in %; n is the time step of collecting the outlet flow signal, in seconds; The deviation integral value of the outlet flow data in the time period is obtained. The step S240 includes: if the current deviation integral value Integ[i] is less than the threshold Y, the element C[i] in the array C is assigned a value of 1, otherwise, it is assigned a value of 0.
2. The method of early monitoring and warning of loss circulation risk according to claim 1, characterized in that, After the step S150, it further includes: Step S160: continuously receiving data and repeating the steps S120-S150.
3. The method of early monitoring and warning of loss circulation risk according to claim 1, wherein, After the step S240, it further includes: Step S250: receiving new data and repeating the steps S210-S240.
4. The method of early monitoring and warning of loss circulation risk of claim 1, wherein, After the step S300, it further includes: well kick risk assessment, including: When D[i]=1, the well kick alarm is triggered, at this time the total volume V of the drilling fluid in the mud tank should be continuously tracked, and corresponding measures are taken according to the reduction amount AV of the total volume V of the drilling fluid in the mud tank in the continuous time at.
Citation Information
Patent Citations
Intelligent identification method for complex working conditions under drilling well
CN113062731A
Early warning method for overflow or leakage of drilling fluid
CN113153277A