Oil well dynamic liquid level position identification method based on interval least square smoothing filter
By performing interval least squares smoothing filtering on the oil well fluid surface echo signal, the problems of low efficiency and accuracy in oil well dynamic fluid surface monitoring are solved, and real-time and accurate monitoring of downhole dynamic fluid surface is realized.
Patent Information
- Application Number
- CN202310591763.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-22
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2043-05-22
AI Technical Summary
Existing methods for monitoring dynamic fluid levels in oil wells are inefficient, lack real-time performance, have poor test data stability, and are difficult to accurately determine the fluid level position in complex environments.
The oil well fluid surface echo signal is processed using a method based on interval least squares smoothing filtering, including low-frequency filtering, interval least squares smoothing filtering and interval energy processing, and the downhole dynamic fluid surface position is automatically calculated by combining the extreme value search method.
It achieves real-time and accurate monitoring of downhole dynamic fluid levels with errors kept at a low level, supporting a continuous online dynamic fluid level monitoring system.
Smart Images

Figure QLYQS_2 
Figure QLYQS_3 
Figure QLYQS_10
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of oil well liquid level detection, and particularly to an oil well dynamic liquid level position recognition method based on interval least square smoothing filtering. BACKGROUND
[0002] In the drilling and exploitation of oil wells, monitoring of the dynamic liquid level of the oil well is very important for safety assurance and operation efficiency improvement on site. How to timely and reliably monitor the downhole liquid level condition is a real problem to be solved.
[0003] The conventional measurement method for the dynamic liquid level is to use a non-projectile powder bullet or a nitrogen bottle sound bullet as a sound emitting medium, and to use a liquid level meter to perform testing operation by manual periodic collection, analysis and data entry. The currently used liquid level meter has low testing efficiency and certain safety risks, cannot be tested on site in extreme bad weather, has poor real-time performance, and in addition, in the dynamic liquid level testing process, the testing personnel often communicate the data to the oil well operation or monitoring personnel by intercom after measuring the liquid level data, which is extremely inconvenient in a noisy environment in the wild; at the same time, it must be faced that the dynamic liquid level condition of the oil well site is generally complex, and complex monitoring data that is difficult to directly determine the accurate liquid level position often occurs, and the waveform characteristics presented by the liquid level echoes received at different testing positions are also different, resulting in poor stable acquisition of the testing data. SUMMARY
[0004] In view of the deficiencies in the prior art, the purpose of the present application is to provide an oil well dynamic liquid level position recognition method based on interval least square smoothing filtering.
[0005] To achieve the above purpose, the present application provides the following technical scheme: an oil well dynamic liquid level position recognition method based on interval least square smoothing filtering, comprising the following steps:
[0006] (1) collecting an oil well liquid level echo signal by an oil well liquid level meter;
[0007] (2) processing the echo signal through a low-frequency filtering channel to obtain a liquid level echo signal;
[0008] (3) the initial segment of the liquid level echo signal has large interference, resulting in echo deformation of the initial segment of the liquid level echo signal, and the filtered liquid level echo signal is subjected to secondary filtering processing by using an interval least square smoothing filtering method to obtain a further processed echo signal;
[0009] (4) analyzing the echo signal by interval processing, and performing interval energy processing to obtain an echo signal;
[0010] (5) finally, the position of the downhole dynamic liquid level is accurately and automatically calculated by an extreme value finding method.
[0011] In some embodiments, according to step (3), the specific algorithm steps are as follows:
[0012] Step 1: A polynomial fitting model is established for the signal {x i , y i}, i = 1, 2, …, n
[0013]
[0014] where β i0 , β i1 , …, β id are the coefficients of x i , respectively; ε i is a random error term;
[0015] Step 2: For each x i , the distances of its surrounding points x j , (j = 1, 2, …, n) to it are calculated as
[0016] d ij = |x i - x j | (3)
[0017] Let h r be the rth smallest value in d ij , j = 1, 2, …, n.
[0018] Step 3: Given a weight function W(x), for each x k , k = 1, 2, …, n within the window width, the weight is calculated as
[0019]
[0020] Step 4: The estimation formula of the parameter β ik (i = 1, 2, …, n; k = 1, 2, …, d) is
[0021]
[0022]
[0023] The fitted value of y i is obtained as
[0024]
[0025] In some embodiments, according to step (4), the disturbed liquid surface echo is processed by intervalization through analyzing the processed echo signal.
[0026] In some embodiments, in order to optimize the display of the liquid surface echo, the interval energy method is used to process it, and the steps of the interval energy method are as follows:
[0027] Step 1: Add a rectangular window to the signal y(t), and the window function is as follows
[0028] W(t) = 1, t ∈ [0, d] (7)
[0029] Wherein, d is the width of the rectangular window.
[0030] Step 2: Energy accumulation is performed on the windowed signal, and the specific process is as follows
[0031]
[0032] Compared with the prior art, the beneficial effects of the present application are that the complex liquid surface echo can be optimized and processed to obtain clearer liquid surface echo characteristics. In this way, the error of the software automatic calculation of the downhole dynamic liquid level position can be stabilized at a relatively low level, and a continuous online downhole dynamic liquid level monitoring system can be built to realize real-time control of the downhole dynamic liquid level condition.
[0033] The details of one or more embodiments of the present application are presented in the following drawings and description to make the other features, purposes and advantages of the present application more clear, concise and easy to understand. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 It is the measured liquid surface echo waveform at the choke manifold after low-frequency filtering processing;
[0035] Figure 2 It is the signal waveform of the choke manifold echo after conventional low-frequency filtering;
[0036] Figure 3 It is the signal waveform of the least square smoothing filtered signal after interval selection;
[0037] Figure 4 It is the least square smoothing filtered signal waveform after interval selection;
[0038] Figure 5 It is the echo signal waveform after interval energy processing. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0040] The application provides a technical scheme: an oil well dynamic liquid level position recognition method based on interval least square smoothing filtering, which comprises the following steps:
[0041] (1) collecting an oil well liquid level echo signal through an oil well liquid level instrument;
[0042] (2) processing the echo signal through a low-frequency filtering channel to obtain a liquid level echo signal;
[0043] (3) the initial section of the liquid level echo signal has large interference, which causes the echo of the initial section of the liquid level echo signal to be deformed, and the interval least square smoothing filtering method is used to perform secondary filtering processing on the filtered liquid level echo signal to obtain a further processed echo signal;
[0044] (4) analyzing the echo signal through interval processing and performing interval energy processing to obtain an echo signal;
[0045] (5) finally, the position of the downhole dynamic liquid level is accurately and automatically calculated through an extreme value searching method.
[0046] According to step (3), the specific algorithm steps are as follows:
[0047] Step 1: a polynomial fitting model is established for signals {x i , y i}, i = 1, 2, …, n
[0048]
[0049]
[0050] In the formula, β i0 , β i1 , …, β id are coefficients of corresponding x i ; and ε i is a random error term.
[0051] Step 2: the distance of each x i to its surrounding points x j (j = 1, 2, …, n) is calculated as d
[0052] d ij = |x i -x j | (3)
[0053] It is set that h r is the rth smallest value in d ij j = 1, 2, …, n.
[0054] Step 3: Given a weight function W(x), calculate the weight for each x within the window width k , k = 1, 2,..., n
[0055]
[0056] Step 4: Parameter β ik (i = 1, 2,..., n; k = 1, 2,..., d) estimation formula is
[0057]
[0058] Get the fitting value of y i
[0059]
[0060] According to step (4), by analyzing the processed echo signal, the disturbed liquid surface echo is processed by intervalization;
[0061] In order to optimize the display of the liquid surface echo, the interval energy method is used to process it, and the steps of the interval energy method are as follows:
[0062] Step 1: Add a rectangular window to the signal y(t), and the window function is as follows
[0063] W(t) = 1, t ∈ [0, d] (7)
[0064] Where d is the width of the rectangular window.
[0065] Step 2: Energy accumulation is performed on the windowed signal, which is as follows
[0066]
[0067] Through the technical scheme, in actual operation, the core part of the composition of the online downhole liquid level monitoring system is the oil well liquid level instrument composed of the gun body, the main control box and the display control computer. The air compressor, the nitrogen making machine and the nitrogen booster in the oil well liquid level instrument are responsible for supplying air to the gun body. By connecting to the same local area network, the liquid level data monitored by the display control computer can be transmitted to the logging system in real time.
[0068] The oil well liquid level instrument calculates the oil well liquid level depth according to the liquid surface echo by echo measurement. Sound waves are emitted at the annulus between the wellhead casing and the oil pipe, and the reflection waves of the coupling and the liquid surface are measured. When the length of the coupling is known, the propagation speed of the sound wave in the annulus [8] v and the time t of the liquid surface reflection wave are calculated, so as to obtain the liquid surface depth s, that is
[0069] s = vt / 2 (1)
[0070] Generally, the liquid level meter processes the collected echo data in two ways: one enters the high-frequency filter channel, and then becomes a hoop wave signal to calculate the sound velocity data, and the other enters the low-frequency filter channel to become a liquid surface wave signal, and then is processed to locate the liquid surface position.
[0071] To realize the online monitoring of the downhole dynamic liquid level, a position with convenient installation and relatively stable waveform characteristics needs to be selected. According to long-term testing and verification, the choke manifold is selected as the position for fixed placement of the liquid level meter. The liquid surface echo data measured at this position is relatively stable and easy to analyze, and it is easier to realize unmanned remote real-time monitoring. An M20 adapter is installed between the installation interface and the gun body. The measured liquid surface echo at this position after low-frequency filtering has a waveform as shown in Figure 1 From the figure, it can be seen that although the initial segment has a large interference, the waveform of the latter clearly presents the periodic attenuation characteristics of the liquid surface echo. However, for such a dynamic liquid surface echo, the conventional extreme value detection method or autocorrelation method cannot well obtain the accurate liquid surface depth value.
[0072] If a conventional Butterworth low-pass filter is used to filter out signals above 15 Hz, the filtered signal can be as shown in Figure 2 It can be seen that the improvement is limited compared with Figure 1 ;
[0073] However, using least squares smoothing filtering to continue processing the low-frequency filtered signal can obtain an echo signal as shown in Figure 3 ;
[0074] The least squares smoothing filtering method used in this application is a locally weighted scatterplot smoothing algorithm (LOWESS). This algorithm combines traditional local weighted regression and local polynomial fitting, and has strong robustness. Its main principle is to first fit the local data by polynomial weighting, and then estimate the fitting result by least squares method. The algorithm steps are as follows:
[0075] Step 1: A polynomial fitting model is established for the signal {x i , y i}, i = 1, 2, …, n
[0076]
[0077] In the formula, β i0 , β i1 , …, β id are the coefficients of x i ; and ε i is a random error term.
[0078] Step 2 for each x i Calculate the x of its surrounding points j (j = 1, 2, ..., n)
[0079] The distance to it is
[0080] d ij =|x i -x j | (3)
[0081] Setting, h r For d ij The r-th smallest value among j = 1, 2, ..., n.
[0082] Step 3: Given a weight function W(x), for each x within the window width... k Calculate the weights for k = 1, 2, ..., n
[0083]
[0084] Step 4 Parameter β ik The estimation formula for (i = 1, 2, ..., n; k = 1, 2, ..., d) is:
[0085]
[0086] Get y i Fitted values
[0087]
[0088] pass Figure 3 As can be seen, the echo signal after least squares smoothing is much better than that of conventional Butterworth low-pass filtering. The echo signals are more obvious and easier to automatically and accurately read the downhole fluid level.
[0089] Based on simply using low-pass filtering plus least-squares smoothing filtering, from Figure 3 It can be seen that the processed signal still has two problems:
[0090] 1. Due to the addition of an M20 connector between the gun body and the mounting interface, the change in the diameter of the connector caused the microphone inside the gun body to be affected by the sudden pressure change. With 600 meters as the boundary, there is a significant difference in the echo signal on the left and right sides. The echo at closer distances is subject to more interference, and the position of the liquid surface is less obvious. Conversely, the echo of the liquid surface beyond 600 meters is more obvious and is subject to less interference.
[0091] 2. Even the echo signal from the liquid surface at a distance of 600 meters is not very ideal.
[0092] To solve the above two problems, two interval processing methods are used to further process the liquid surface echo in the implementation;
[0093] Based on the fact that the liquid surface echo at 600 meters is more obvious and less interfered, only the waveform from 600 meters to the end is analyzed. Meanwhile, according to the basic principle of echo ranging, the distance (liquid surface depth) can be calculated according to the time difference between any two echoes (echoes), so discarding the data of the first 600 meters does not affect the accurate calculation of the liquid surface depth. The least square smoothing filter after interval selection is shown in Figure 4 .
[0094] In order to optimize the display of the liquid surface echo, the interval energy method is used to process it, and the steps of the interval energy method are as follows:
[0095] Step 1: Add a rectangular window to the signal y(t), and the window function is as follows
[0096] W(t) = 1, t ∈ [0, d] (7)
[0097] Where d is the width of the rectangular window.
[0098] Step 2: Energy accumulation is performed on the windowed signal, which is as follows
[0099]
[0100] The echo signal after interval energy processing is shown in Figure 5 , it can be seen that the liquid surface echo signal after interval energy processing is very clear, and the position of the downhole dynamic liquid surface can be accurately and automatically calculated by the extreme value searching method;
[0101] Based on the method studied in this application, the algorithm for automatically calculating the downhole dynamic liquid surface in the upper computer software of the developed downhole liquid level detector is updated, and the software is measured in oil well projects. The measured oil wells are selected from multiple oil fields in Xinjiang, and the measured results of the software automatically calculating the liquid surface depth in one of the oil wells are shown in Table 1:
[0102] Table 1 Measurement result record table
[0103]
[0104] In the measurement, the annulus liquid level is changed by raising the drill pipe, and it can be seen that the overall automatic calculation error is controlled within 5%, which is a relatively low level, and also meets the stable and low error requirement of building a continuous online downhole dynamic liquid level monitoring system.
[0105] According to the actual application of multiple experiments and tests, the oil well dynamic liquid level monitoring equipment is fixedly installed at the choke manifold of the oil well, and a relatively stable echo signal can be obtained in the case of well shut-in. Based on the echo processing method of interval least square smoothing filtering, an algorithm for automatically identifying the downhole dynamic liquid level position of the oil well is designed, which can optimize the complex liquid level echo and obtain clearer liquid level echo characteristics.
[0106] Through the actual measurement in multiple oil wells, the automatic identification error of the downhole dynamic liquid level position of the online monitoring system using the algorithm is stable at a low level, and it is also seen that the system still needs to be verified by more well conditions and further improved in practice.
[0107] The above embodiments only express several embodiments of the application, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the application, a number of modifications and improvements can be made, which belong to the protection scope of the application. Therefore, the protection scope of the patent of the application should be subject to the appended claims.
[0108] Although the embodiments of the application have been shown and described, those skilled in the art can understand that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the application, and the scope of the application is defined by the appended claims and their equivalents.
Claims
1. An oil well fluid level position recognition method based on interval least square smoothing filtering, characterized in that: The steps are: (1) Collecting oil well liquid level echo signal through oil well liquid level instrument; (2) The echo signal is processed through a low-frequency filter channel to obtain a liquid level echo signal; (3) The initial segment of the liquid level echo signal has large interference, resulting in echo deformation of the initial segment of the liquid level echo signal, and the further processed echo signal is obtained by using interval least square smoothing filter method for secondary filtering processing on the filtered liquid level echo signal; (4) The echo signal is analyzed by interval processing, and the echo signal is obtained by interval energy processing; (5) Finally, the position of the downhole dynamic liquid level is accurately and automatically calculated by the extreme value finding method, According to step (3), the specific algorithm steps are: Step 1: Signal Establishing a polynomial fit model (2) wherein are the respective coefficients; is a random error term; Step 2: For each Calculate the distance of its surrounding points , to it (3) Set, To , In the Small value; Step 3: Given a weight function For each point within the window width , Compute the weight (4) Step 4: Parameters The estimation formula for is (5) obtained the fitted values (6) According to step (4), the liquid level echo subjected to interference is processed by interval processing through analysis of the processed echo signal, In order to optimize the display of the liquid level echo, the interval energy method is used to process it, and the steps of the interval energy method are as follows: Step 1: Apply signal Add a rectangular window, window function as follows (7) wherein is the width of the rectangular window; Step 2: Energy accumulation is performed on the windowed signal, which is specifically as follows E(t)= (8)
Citation Information
Patent Citations
Self-adaption ship body detection method and system used during ship draft measuring
CN105644730A