A noise cancellation method for MWD instrument monitoring data
By adaptively adjusting the polynomial order of the SG filter and combining it with the noise level and local characteristics of MWD instrument data, the imbalance between noise suppression and signal detail preservation caused by the fixed order of the SG filter is solved, achieving efficient noise reduction processing of MWD instrument data and improving the accuracy and reliability of the data.
Patent Information
- Application Number
- CN202510633737.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-05-16
AI Technical Summary
In existing technologies, the polynomial order of SG filters is fixed, which makes it impossible to adaptively balance noise suppression and signal detail preservation during denoising, affecting the accuracy and reliability of MWD instrument data.
By acquiring time-series data from MWD instruments, a window is constructed based on drill bit rotation speed and data change rate. Noise levels, local trends, and periodic indicators are calculated, the polynomial order is adaptively adjusted, and SG filters are used for noise reduction.
It improves the noise reduction effect of MWD instrument data, ensuring that data details are preserved while removing noise, thus improving the accuracy and reliability of the data.
Smart Images

Figure CN120541375B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a noise elimination method for MWD instrument monitoring data. BACKGROUND
[0002] MWD is an advanced technical means in directional drilling, which is used to measure information about borehole or drill bit in real time during drilling process by using MWD instrument, such as inclination angle, azimuth angle, tool face angle, etc., and to transmit the collected data to the ground system in real time for guiding well trajectory control. However, in the drilling process, the data collected by the MWD instrument is often affected by various noises and interferences, such as drill string vibration noise, downhole electronic noise, mud pulse interference, etc., and at the same time, the data will also be disturbed by various factors during transmission. The data received by the ground system may contain a large amount of noise, which seriously affects the accuracy and reliability of the data. Therefore, it is crucial to eliminate noise from the data before the ground system analyzes the received data.
[0003] When denoising the data, in order to obtain the most accurate data as much as possible, it is necessary to preserve signal details and peaks while denoising. Therefore, the SG filter is usually used for denoising in the traditional way. The SG filter is a filtering method based on local polynomial least squares fitting in time domain. By fitting a polynomial in a sliding window, the data is smoothed, so that the details and peaks of the data are preserved to the greatest extent while the noise is removed, effectively filtering out the noise and improving the noise elimination effect of the data collected by the MWD instrument.
[0004] However, the polynomial order in the SG filter is usually set to a fixed order according to experience value, and the polynomial order determines the complexity of the fitting curve. Higher order has a stronger smoothing effect on the signal, which can more effectively suppress high-frequency noise, but may cause excessive smoothing of the signal, loss of detail information, and even introduction of artifacts. Smaller order has a weaker smoothing effect on the signal, which can better preserve the details and characteristics (such as peaks, mutations, etc.) of the original signal, but has limited ability to suppress high-frequency noise, resulting in poor noise elimination effect and interference with subsequent related personnel monitoring data in directional drilling process.
[0005] Therefore, how to adaptively obtain the polynomial order in the SG filter to improve the noise elimination effect becomes a problem to be solved. SUMMARY
[0006] Therefore, the embodiments of the present application provide a noise elimination method for MWD instrument monitoring data to solve the problem of how to adaptively obtain the polynomial order in the SG filter to improve the noise elimination effect.
[0007] The embodiment of the present application provides a noise elimination method for MWD instrument monitoring data, and the method comprises the following steps:
[0008] In the directional drilling process, time sequence data of any drilling data received by the MWD instrument is acquired, and the time sequence data is denoted as a to-be-de-noised data sequence;
[0009] For any data in the to-be-de-noised data sequence, whether the position of the data meets a preset condition is judged according to the drilling bit rotating speed corresponding to the data in the to-be-de-noised data sequence, if the preset condition is met, a window centered on the data is constructed, the noise degree of the data is obtained according to the change rate of each data in the window;
[0010] The local trend index of the data is obtained according to the deviation degree of each data in the window from the overall trend of all data in the window, the size of the window is adjusted according to the drilling bit rotating speed, a new window is obtained, the local periodicity index of the data is obtained according to the autocorrelation function of all data in the new window, and the de-noising degree of the data is obtained by combining the noise degree, the local trend index and the local periodicity index of the data.
[0011] The adaptive polynomial order of the data is obtained according to the drilling pressure corresponding to the data and the de-noising degree, the de-noising processing is performed on the to-be-de-noised data sequence through an SG filter according to the adaptive polynomial order of each data in the to-be-de-noised data sequence, and a de-noised data sequence is obtained, which is used for real-time monitoring of a wellbore trajectory.
[0012] Preferably, whether the position of the data meets the preset condition is judged according to the drilling bit rotating speed corresponding to the data in the to-be-de-noised data sequence, and the method comprises the following steps.
[0013] The sampling number of the drilling bit per rotation is obtained according to the drilling bit rotating speed corresponding to the data and the sampling frequency of the MWD instrument, half of the sampling number of a first preset multiple is denoted as a first preset number, and the first preset multiple is an even number.
[0014] If the number of data before the data in the to-be-de-noised data sequence is greater than or equal to the first preset number, and the number of data after the data in the to-be-de-noised data sequence is greater than or equal to the first preset number, it is determined that the position of the data meets the preset condition.
[0015] If the number of data before the data in the to-be-de-noised data sequence is less than the first preset number, or the number of data after the data in the to-be-de-noised data sequence is less than the first preset number, it is determined that the position of the data does not meet the preset condition.
[0016] Preferably, the constructing the window centered on the any data comprises:
[0017] calculating a sum between the first preset multiple of the sampling number and the constant 1 to obtain a window size of the any data, and constructing the window centered on the any data in the data sequence to be denoised according to the window size of the any data.
[0018] Preferably, the obtaining the noise degree of the any data according to the change rate of each data in the window comprises:
[0019] regarding other data in the window except the any data as neighborhood data, for any neighborhood data, if the any neighborhood data is not the first data in the data sequence to be denoised and is not the last data in the data sequence to be denoised, then calculating a left slope between the any neighborhood data and a left-adjacent data of the any neighborhood data and a right slope between the any neighborhood data and a right-adjacent data of the any neighborhood data in the data sequence to be denoised respectively, calculating an average value between the left slope and the right slope to obtain the change rate of the any neighborhood data;
[0020] if the any neighborhood data is the first data in the data sequence to be denoised, then calculating the right slope between the any neighborhood data and the right-adjacent data of the any neighborhood data to obtain the change rate of the any neighborhood data;
[0021] if the any neighborhood data is the last data in the data sequence to be denoised, then calculating the left slope between the any neighborhood data and the left-adjacent data of the any neighborhood data to obtain the change rate of the any neighborhood data;
[0022] calculating an average value of the change rates of all the neighborhood data to obtain a neighborhood data change rate average, obtaining the change rate of the any data, calculating a proportion of the change rate of the any data in the neighborhood data change rate average to obtain a first mutation degree of the any data;
[0023] calculating a mean value of all the neighborhood data, calculating a proportion of the any data in the mean value of all the neighborhood data to obtain a second mutation degree of the any data;
[0024] calculating a product between the first mutation degree and the second mutation degree to obtain a pulse interference degree of the any data;
[0025] calculating an average value of the change rates of all the data in the window to obtain an overall change rate average, obtaining a number of peaks in all the data in the window, and calculating a product between the number and the overall change rate average to obtain a sustained interference degree of the any data;
[0026] The maximum value of the pulse interference degree and the continuous interference degree of any data point is recorded as the noise degree of the data.
[0027] Preferably, the local trend index of any data is obtained according to the deviation degree of each data in the window from the overall trend of all data in the window, comprising:
[0028] The data in the window is subjected to median filtering to obtain the filtered median of each data in the window, and the absolute value of the difference between each data in the window and the filtered median thereof is calculated, and the average value of all absolute values is recorded as the overall trend deviation degree of all data in the window.
[0029] The filtered median of each data in the window is composed of a filtered median sequence, the standard deviation of the first difference sequence of the filtered median sequence is calculated, and the reciprocal of the product between the overall trend deviation degree and the standard deviation is taken as the local trend index of any data.
[0030] Preferably, the size of the window is adjusted according to the drill bit speed to obtain a new window, comprising:
[0031] The sampling frequency of the MWD instrument is obtained, the sampling number of one revolution of the drill bit is obtained according to the drill bit speed corresponding to any data and the sampling frequency, the sum of the sampling number of a second preset multiple and a constant 1 is calculated to obtain the new window size of any data, and the second preset multiple is an even number.
[0032] In the sequence of data to be denoised, if the number of data before any data is greater than or equal to a second preset number, and the number of data after any data is greater than or equal to the second preset number, then in the sequence of data to be denoised, a new window centered on any data is constructed according to the new window size, and the second preset number is half of the upward rounding result of the second preset multiple.
[0033] If the number of data before any data is less than the second preset number, then in the sequence of data to be denoised, a new window corresponding to any data is constructed according to the new window size, all data before any data, and part of data after any data.
[0034] If the number of data after any data is less than the second preset number, then in the sequence of data to be denoised, a new window corresponding to any data is constructed according to the new window size, all data after any data, and part of data before any data.
[0035] Preferably, the local periodicity index of any data is obtained according to the autocorrelation function of all data in the new window, comprising:
[0036] obtaining an autocorrelation function of all data in the new window, the independent variable of the autocorrelation function being a lag order, and the dependent variable being an autocorrelation value;
[0037] obtaining a time required for one rotation of the drill bit according to the rotational speed of the drill bit corresponding to the any data, denoted as a drill bit rotation period, obtaining a lag order range according to the drill bit rotation period and a third preset multiple of the drill bit rotation period, denoting the reciprocal of the sampling frequency of the MWD instrument as a lag step, and obtaining at least two lag orders in the lag order range according to the lag step to form a lag order data sequence;
[0038] calculating the autocorrelation value of each lag order in the lag order data sequence according to the autocorrelation function, and selecting a maximum value among all autocorrelation values as a maximum autocorrelation value;
[0039] calculating an autocorrelation value when the lag order is zero according to the autocorrelation function, denoted as a zero-time-delay autocorrelation value, and calculating a ratio between the maximum autocorrelation value and the zero-time-delay autocorrelation value to obtain a local periodicity index of the any data.
[0040] Preferably, the denoising degree of the any data is obtained by combining the noise degree, the local trendiness index and the local periodicity index of the any data, and includes:
[0041] calculating the reciprocal of the product between the local trendiness index and the local periodicity index of the any data to obtain an effectiveness index of the any data;
[0042] linearly normalizing the product between the reciprocal of the effectiveness index and the noise degree to obtain the denoising degree of the any data.
[0043] Preferably, the adaptive polynomial order of the any data is obtained according to the WOB and the denoising degree corresponding to the any data, and includes:
[0044] calculating a difference between the preset maximum polynomial order and the preset minimum polynomial order to obtain a polynomial order range index, calculating the product between the denoising degree of the any data and the polynomial order range index, rounding the sum between the preset minimum polynomial order and the product to obtain a reference polynomial order;
[0045] obtaining a reference WOB and a WOB adjustment step in the directional drilling process, calculating the difference between the WOB corresponding to the any data and the reference WOB, calculating the ratio between the difference and the WOB adjustment step, rounding the product between a preset WOB correction term sensitivity coefficient and the ratio to obtain an initial polynomial order control coefficient.
[0046] If the initial polynomial order control coefficient is less than or equal to the polynomial order range index, the initial polynomial order control coefficient is taken as a final polynomial order control coefficient;
[0047] If the initial polynomial order control coefficient is greater than the polynomial order range index, the initial polynomial order range index is taken as a final polynomial order control coefficient;
[0048] A difference between the reference polynomial order and the final polynomial order control coefficient is calculated to obtain an adaptive polynomial order of the any data.
[0049] Preferably, after judging whether the position of the any data satisfies a preset condition, the method further comprises:
[0050] If the preset condition is not satisfied, a de-noising degree of the any data is set to zero.
[0051] Compared with the prior art, the embodiment of the present application has the beneficial effects that:
[0052] In the directional drilling process, the time sequence data of any drilling data received by the MWD instrument is obtained, which is denoted as a to-be-de-noised data sequence; for any data in the to-be-de-noised data sequence, whether the position of the data meets a preset condition is judged in the to-be-de-noised data sequence according to the rotary speed of the drill bit corresponding to the data, if the preset condition is met, a window centered on the data is constructed, the noise degree of the data is obtained according to the change rate of each data in the window, the local trend index of the data is obtained according to the deviation degree of each data in the window from the overall trend of all data in the window, the size of the window is adjusted according to the rotary speed of the drill bit, a new window is obtained, the local periodicity index of the data is obtained according to the autocorrelation function of all data in the new window, the de-noising degree of the data is obtained by combining the noise degree, the local trend index and the local periodicity index of the data, the adaptive polynomial order of the data is obtained according to the corresponding drilling pressure and the de-noising degree of the data, the to-be-de-noised data sequence is de-noised by an SG filter according to the adaptive polynomial order of each data in the to-be-de-noised data sequence, and a de-noised data sequence is obtained, which is used for real-time monitoring of the well trajectory. Wherein, the de-noising degree of each data is obtained according to the noise degree of each data point and the local change characteristics (local trend index and local periodicity index), since the drilling pressure will affect the bending degree of the drill string, and then affect the interference degree of the data by noise, therefore, the adaptive polynomial order of each data is obtained by combining the corresponding drilling pressure and the de-noising degree of each data, so as to reduce the noise influence caused by the drilling pressure, while effectively filtering out the noise, the data details are retained, and the accuracy and reliability of the data are effectively improved. BRIEF DESCRIPTION OF DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0054] Figure 1 It is a method flow chart of a noise elimination method for MWD instrument monitoring data provided by the first embodiment of the present application. DETAILED DESCRIPTION
[0055] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the drawings. The embodiments described below by referring to the drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.
[0056] It should be noted that the terms "first", "second", etc. in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0057] In order to illustrate the technical solutions of the present application, the following will be illustrated by specific embodiments.
[0058] Referring to Figure 1 , it is a method flow chart of a noise elimination method for MWD instrument monitoring data provided by an embodiment of the present application, as Figure 1 shown, the method can include:
[0059] Step S101, in the directional drilling process, the time series data of any one drilling data received by the MWD instrument is acquired, denoted as a to-be-de-noised data sequence.
[0060] MWD is a kind of advanced technical means in directional drilling, which is used to measure the information about the borehole or drill bit in real time, such as inclination angle, azimuth angle, tool face angle, etc., using MWD instrument in the drilling process, and the collected data is transmitted to the ground system in real time for guiding the well trajectory control. However, in the directional drilling process, the data collected by the MWD instrument is often affected by various noises and interferences, such as drill string vibration noise, downhole electronic noise, mud pulse interference, etc., at the same time, the data will also be disturbed by various factors in the transmission process, and the data received by the ground system may contain a large amount of noise, which seriously affects the accuracy and reliability of the data, therefore, before the ground system analyzes the received data, the received data needs to be de-noised.
[0061] In the embodiment of the present application, taking the inclination angle as an example, the time series data of the inclination angle received by the ground system and collected by the MWD instrument is denoted as a to-be-de-noised data sequence, which is convenient for de-noising analysis.
[0062] Step S102, for any data in the to-be-de-noised data sequence, according to the rotation speed of the drill bit corresponding to the data, it is judged whether the position of the data satisfies a preset condition in the to-be-de-noised data sequence, if the preset condition is satisfied, a window centered on the data is constructed, and the noise degree of the data is obtained according to the change rate of each data in the window.
[0063] In order to obtain the most accurate data as much as possible when de-noising the data sequence to be de-noised, it is necessary to preserve data details and peaks while de-noising, so the SG filter is usually used for de-noising in the traditional way, the SG filter is a filtering method based on local polynomial least squares fitting in time domain, the data is smoothed by fitting a polynomial in a sliding window, so that the data details and peaks are preserved to the greatest extent while the noise is removed, and the noise is effectively filtered out. However, the polynomial order in the SG filter is usually set to a fixed order according to the experience value, and the polynomial order determines the complexity of the fitting curve: a higher order has a stronger smoothing effect on the signal and can more effectively suppress high-frequency noise, but it may cause the signal to be excessively smoothed, lose detailed information, and even introduce artifacts; a smaller order has a weaker smoothing effect on the signal and can better preserve the details and characteristics (such as peaks, mutations, etc.) of the original signal, but the suppression ability of high-frequency noise is limited, resulting in poor noise removal effect.
[0064] Therefore, in the embodiment of the present application, the adaptive polynomial order of each data is obtained according to the local variation of each data in the data sequence to be de-noised, so as to improve the noise removal effect of the data sequence to be de-noised. Taking the i-th data in the data sequence to be de-noised as an example, the noise degree of the i-th data is obtained according to the fluctuation of the i-th data in its local range, which is used to represent the probability that the i-th data is noise, the greater the noise degree of the i-th data, the higher the adaptive polynomial order thereof, so as to better suppress the noise.
[0065] Since the data in the data sequence to be de-noised may appear periodically with the rotation of the drill bit, in the embodiment of the present application, the data in the local range of the i-th data is obtained periodically: first, the drill bit speed corresponding to the i-th data and the sampling frequency of the MWD instrument are obtained, and then the sampling number of the MWD instrument per revolution of the drill bit is obtained, that is wherein SPR represents the sampling number of the MWD instrument per revolution of the drill bit, RPM represents the drill bit speed (rev / min) corresponding to the i-th data, represents the sampling frequency of the MWD instrument (times / sec), and 60 represents the conversion coefficient from minutes to seconds, represents the upward rounding symbol. Then a window centered on the i-th data is constructed according to the sampling number of the first preset multiple, wherein the first preset multiple must be even, and in the embodiment of the present application, the first preset multiple is set to 2, which is not limited here, and the implementer can set it according to the specific scene, that is, the window size is 2xSPR+1, that is, the number of data contained in the window is 2xSPR+1.
[0066] Before constructing the window centered on the i th data, it is necessary to determine whether the i th data satisfies the following conditions: the number of data before the i th data in the sequence of data to be denoised is greater than or equal to , and the number of data after the i th data is greater than or equal to If the conditions are not satisfied, that is, the number of data before the i th data in the sequence of data to be denoised is less than , or the number of data after the i th data is less than , the window centered on the i th data cannot be constructed, and the denoising degree of the i th data is set to 0.
[0067] If the i th data satisfies the conditions, a window centered on the i th data is constructed according to the window size (2*SPR+1) to analyze the change rate of each data in the window, obtain the noise degree of the i th data, and then obtain the denoising degree of the i th data according to the noise degree.
[0068] Since the MWD instrument may be disturbed by two kinds of interference when collecting data, one is transient interference, which is a short pulse interference caused by sudden change of mud pump pressure or electromagnetic switch action, and the other is continuous interference caused by drill bit vibration noise, downhole electronic noise, etc. Because the two kinds of interference do not occur at the same time, the interference degree of the i th data under the two kinds of interference, that is, the pulse interference degree and the continuous interference degree, is calculated respectively in the embodiment of the present application, and the maximum value is taken as the noise degree of the i th data. The specific way of obtaining the pulse interference degree of the i th data is as follows:
[0069] The other data in the window except the i th data is recorded as neighborhood data. For any neighborhood data, if the any neighborhood data is not the first data in the sequence of data to be denoised and is not the last data in the sequence of data to be denoised, the left slope between the any neighborhood data and its left adjacent data and the right slope between the any neighborhood data and its right adjacent data are calculated in the sequence of data to be denoised, the average value between the left slope and the right slope is calculated to obtain the change rate of the any neighborhood data.
[0070] If the any neighborhood data is the first data in the sequence of data to be denoised, the right slope between the any neighborhood data and its right adjacent data is calculated to obtain the change rate of the any neighborhood data.
[0071] If the any neighborhood data is the last data in the sequence of data to be denoised, the left slope between the any neighborhood data and its left adjacent data is calculated to obtain the change rate of the any neighborhood data.
[0072] Calculate the average of the change rates of all neighborhood data to obtain the mean change rate of neighborhood data. Obtain the change rate of the i-th data and calculate the proportion of the change rate of the i-th data in the mean change rate of the neighborhood data to obtain the first mutation degree of the i-th data.
[0073] Calculate the mean of all neighborhood data, calculate the proportion of the i-th data in the mean of all neighborhood data, and obtain the second mutation degree of the i-th data;
[0074] Calculate the product between the first mutation degree and the second mutation degree to obtain the impulse interference degree of the i-th data.
[0075] In one embodiment, the formula for calculating the impulse interference level of the i-th data is:
[0076]
[0077] in, This indicates the pulse interference level of the i-th data point. This represents the rate of change of the i-th data point. This indicates the number of neighboring data within the window (in this embodiment of the invention, the number of neighboring data within the window is...). ), Indicates the first in the window The rate of change of neighborhood data This represents the value of the i-th data point. This represents the mean of all neighboring data within the window.
[0078] It should be noted that impulse interference is a transient interference, manifested as the i-th data point differing from its neighboring data, i.e., the i-th data point undergoes a sudden change. The larger the value, the greater the degree of mutation in the i-th data, and thus... The larger the value, the greater the probability that the i-th data point is noise caused by impulse interference; The larger the value, the greater the difference between the i-th data and its neighboring data, and thus... The larger the value, the greater the probability that the i-th data point is noise generated by impulse interference.
[0079] Furthermore, the degree of persistent interference for the i-th data point is obtained, specifically:
[0080] The average of the change rates of all data in the window is calculated to obtain an overall change rate average, the peak values in all data in the window are obtained by using the find_peaks() function in Python, the number of all peak values is counted, and the product between the number and the overall change rate average is calculated to obtain the continuous interference degree of the ith data. The find_peaks() function in Python is used to obtain the peak value, which is prior art, and will not be described here.
[0081] In an embodiment, the calculation formula of the continuous interference degree of the ith data is:
[0082]
[0083] wherein, represents the continuous interference degree of the ith data, represents the overall change rate average, represents the number of peak values in all data in the window of the ith data.
[0084] It should be noted that the continuous interference is reflected in the strong overall volatility of the data in the window, so the greater the overall change rate average, the greater the volatility intensity of the data in the window, and thus the greater the probability that the ith data is noise formed by continuous interference; The greater the number of data with mutations in the window, the greater the volatility intensity of the data in the window, and thus the greater the probability that the ith data is noise formed by continuous interference.
[0085] At this point, the pulse interference degree and the continuous interference degree of the ith data are obtained. Since the pulse interference and the continuous interference do not occur at the same time in the same period, the maximum value between the pulse interference degree and the continuous interference degree is selected as the noise degree of the ith data, denoted as .
[0086] In step S103, the local trend index of any data is obtained according to the deviation of each data in the window from the overall trend of all data in the window, the size of the window is adjusted according to the bit rotation speed to obtain a new window, the local periodicity index of any data is obtained according to the autocorrelation function of all data in the new window, and the noise degree of any data is obtained by combining the noise degree, the local trend index, and the local periodicity index of any data.
[0087] Since the data collected by the MWD instrument itself has a certain trend and periodicity, this trend and periodicity still exist when noise interference occurs. To remove noise while preserving data characteristics as much as possible, in this embodiment of the invention, a local trend index for the i-th data is obtained based on the data trend within the window of the i-th data. This index is used to determine the degree of consistency between the i-th data and the overall trend of all data within the window. A higher degree of consistency indicates that the i-th data is likely valid data collected by the MWD instrument, with less accompanying interference. In this case, the polynomial order of the i-th data should be appropriately reduced to preserve the detailed characteristics of the data. Conversely, a lower degree of consistency indicates that the i-th data is likely noise data generated by noise interference, with a lower probability of being accompanied by valid data. In this case, the polynomial order of the i-th data should be appropriately increased to better suppress noise. The specific method for obtaining the local trend index of the i-th data is as follows:
[0088] Median filtering is applied to the data within the window to represent the overall trend of the data within the window. The filtered median of each data point within the window is obtained. The absolute value of the difference between each data point within the window and its filtered median is calculated. The average of all the absolute values of the differences is recorded as the degree of deviation of the overall trend of all data within the window. Median filtering is an existing technology and will not be described in detail here.
[0089] The filtered median of each data point within the window is used to form a filtered median sequence. The standard deviation of the first-order difference sequence of the filtered median sequence is calculated. The reciprocal of the product between the overall trend deviation and the standard deviation is used as the local trend indicator of the i-th data point.
[0090] In one implementation, the formula for calculating the local trend indicator of the i-th data is:
[0091]
[0092] in, Let Y represent the local trend indicator for the i-th data point, and let Y represent the number of data points within the window containing the i-th data point. This represents the value of the y-th data item within the window. This represents the filtered median of the y-th data point within the window. This represents the standard deviation of the first-order difference sequence of the filtered median sequence. Represents the absolute value symbol.
[0093] It should be noted that, The smaller the value, the smaller the difference between the y-th data point within the window and its corresponding filtered median. The greater the value is, the smaller the deviation of each data in the window from the overall trend of all data in the window is, and the smaller the possibility of the ith data being noise data caused by noise interference is, and the greater the possibility of the ith data being accompanied by valid data is. The smaller the value is, the smaller the fluctuation of data in the filtered median sequence is, and the smaller the possibility of the ith data being noise data caused by noise interference is, and the greater the possibility of the ith data being accompanied by valid data is. The greater the value is, the more consistent the trend of each data in the window is, and the smaller the possibility of the ith data being noise data caused by noise interference is, and the greater the possibility of the ith data being accompanied by valid data is.
[0094] Considering that the data collected by the MWD instrument can be accompanied by periodic fluctuations caused by the rotation of the drill bit, after obtaining the local trend index of the ith data, the periodicity of the data in the window also needs to be analyzed to obtain the local periodicity index of the ith data. Since the content of the data in the window of the ith data is less, the periodicity is not obvious, so the window of the ith data needs to be adjusted first to obtain a new window, and the periodicity of the data in the new window is analyzed to obtain the local periodicity index of the ith data. The specific way to obtain the new window is as follows:
[0095] The sampling frequency of the MWD instrument is obtained, and the sampling number of one revolution of the drill bit is obtained according to the drill bit speed corresponding to the ith data and the sampling frequency, and is denoted as SPR. The sum of the sampling number of the second preset multiple and the constant 1 is calculated to obtain the new window size of the ith data, wherein the second preset multiple must be an even number and greater than the first preset multiple (in the embodiment of the present application, the first preset multiple is 2), so in the embodiment of the present application, the second preset multiple is set to 4, which is not limited here, and the implementer can set it according to the specific scene, that is, the new window size is 4×SPR+1.
[0096] In the sequence of data to be denoised, if the number of data before the ith data is greater than or equal to , and the number of data after the ith data is greater than or equal to , then a new window centered on the ith data is constructed in the sequence of data to be denoised according to the new window size.
[0097] If the number of data before the ith data is less than , then a new window corresponding to the ith data is constructed in the sequence of data to be denoised according to the new window size, all data before the ith data, and part of the data after the ith data.
[0098] If the number of data after the ith data is less than , then a new window corresponding to the ith data is constructed in the sequence of data to be denoised according to the new window size, all data after the ith data, and part of the data before the ith data.
[0099] After obtaining the new window of the ith data, the autocorrelation function of all data in the new window is obtained in Matlab using the xcorr() function, and the autocorrelation function is a prior art, which will not be described here. If the data in the new window presents periodic distribution, the autocorrelation function will appear peaks at integer multiples of the drill bit rotation period (the time required for the drill bit to rotate one circle), at this time, the ith data is likely to be valid data collected by the MWD instrument, and the degree of interference accompanying it is small, so in the embodiment of the present application, the local periodicity index of the ith data is obtained according to the autocorrelation function of all data in the new window of the ith data, to determine whether the data in the new window has significant periodicity. The more significant the periodicity, the more likely the ith data is valid data collected by the MWD instrument, and the degree of interference accompanying it is small, at this time, the polynomial order of the ith data should be appropriately reduced to retain the detailed characteristics of the data; on the contrary, the less significant the periodicity, the more likely the ith data is noise data generated by noise interference, and the less likely it is to accompany valid data, at this time, the polynomial order of the ith data should be appropriately increased to better suppress noise. The specific way to obtain the local periodicity index of the ith data is:
[0100] Obtain the autocorrelation function of all data in the new window, and the independent variable of the autocorrelation function is the lag order, and the dependent variable is the autocorrelation value;
[0101] According to the drill bit rotation speed corresponding to the ith data, i.e. RPM, the time required for the drill bit to rotate one circle, i.e. , is recorded as the drill bit rotation period, denoted by T, and the lag order range is obtained according to the drill bit rotation period and the third preset multiple of the drill bit rotation period, in the embodiment of the present application, the third preset multiple is set to 3, which is not limited here, and the implementer can set it according to the specific scene, i.e. the lag order range is [T, 3T], and the reciprocal of the sampling frequency of the MWD instrument is recorded as the lag step, and at least two lag orders in the lag order range are obtained according to the lag step to form a lag order data sequence;
[0102] According to the autocorrelation function, the autocorrelation value of each lag order in the lag order data sequence is calculated, and the maximum value among all autocorrelation values is selected and recorded as the maximum autocorrelation value;
[0103] According to the autocorrelation function, the autocorrelation value when the lag order is zero is calculated and recorded as the zero-time delay autocorrelation value, and the ratio between the maximum autocorrelation value and the zero-time delay autocorrelation value is calculated to obtain the local periodicity index of the ith data.
[0104] In an embodiment, the calculation formula of the local periodicity index of the ith data is:
[0105]
[0106] wherein, denotes the local periodicity indicator of the ith data, denotes the autocorrelation function of all data in the new window of the ith data, t denotes the tth lag order in the data sequence, denotes the maximum function.
[0107] It should be noted that, reflects the intensity of the periodic component in all data in the new window that best matches the drill bit rotation period, that is, the intensity of the peak appearing at an integer multiple of the drill bit rotation period (the time required for one rotation of the drill bit), The greater, the more significant the periodicity of the data in the new window, The zero-lag autocorrelation value represents the total energy of the data, which is used to normalize to the interval [0, 1], The closer to 1, the more periodic the data in the new window, that is, the more periodic the data in the local range of the ith data, and further The greater, the more likely that the ith data is valid data collected by the MWD instrument, and the less the degree of interference accompanying it.
[0108] So far, the local trend indicator and the local periodicity indicator of the ith data have been obtained. Further, in combination with the noise degree, the local trend indicator and the local periodicity indicator of the ith data, the denoising degree of the ith data is obtained to represent the possibility that the ith data is noise data caused by noise interference: the greater the denoising degree, the greater the possibility that the ith data is noise data caused by noise interference, and the smaller the possibility that it is accompanied by valid data, that is, the weaker the validity of the ith data, at which time the polynomial order of the ith data should be appropriately increased to better suppress noise; on the contrary, the smaller the denoising degree, the smaller the possibility that the ith data is noise data caused by noise interference, and the greater the possibility that it is accompanied by valid data, that is, the stronger the validity of the ith data, at which time the polynomial order of the ith data should be appropriately reduced to preserve the detailed characteristics of the data. Then, the specific way to obtain the denoising degree of the ith data is:
[0109] Calculate the reciprocal of the product of the local trend indicator and the local periodicity indicator of the ith data to obtain the validity indicator of the ith data;
[0110] Linearly normalize the product between the reciprocal of the validity indicator and the noise degree to obtain the denoising degree of the ith data, wherein linear normalization is a prior art and will not be described here.
[0111] In an embodiment, the calculation formula of the denoising degree of the ith data is:
[0112]
[0113] wherein, denotes the denoising degree of the ith data, denotes the noise degree of the ith data, denotes the local trend index of the ith data, denotes the local periodicity index of the ith data, denotes a linear normalization function.
[0114] It should be noted that, The smaller the value is, the smaller the probability that the ith data is noise caused by noise interference is, and thus The smaller the value is, the greater the possibility that the ith data is accompanied by valid data, i.e., the stronger the validity of the ith data is, and the smaller the denoising degree is; The greater the value is, the more consistent the data trend in the local range of the ith data is, and thus The smaller the value is, the smaller the possibility that the ith data is noise data caused by noise interference is, and the greater the possibility that the ith data is accompanied by valid data, i.e., the stronger the validity of the ith data is, and the smaller the denoising degree is; The greater the value is, the more periodic the data in the local range of the ith data is, and thus The smaller the value is, the more likely the ith data is valid data collected by the MWD instrument, and the smaller the interference degree is, i.e., the stronger the validity of the ith data is, and the smaller the denoising degree is.
[0115] In step S104, the adaptive polynomial order of any data is obtained according to the corresponding WOB and denoising degree of the data, and the SG filter is used to denoise the data sequence to be denoised according to the adaptive polynomial order of each data in the data sequence to be denoised, so as to obtain a denoised data sequence for real-time monitoring of the wellbore trajectory.
[0116] Considering that the MWD instrument is affected by the WOB during actual data collection, the increase of the WOB leads to the increase of the lateral vibration amplitude of the drill string, and thus leads to the increase of the degree of the overall data collected by the MWD instrument affected by noise. If the WOB is high and the polynomial order is not reduced, the vibration noise may be over-fitted, and part of the noise may be mistaken for valid data, so that the noise cannot be effectively removed. If the WOB is low and the polynomial order is not increased, the high-frequency signal may be excessively removed, and the valid high-frequency component may be excessively smoothed. Therefore, in the embodiment of the present application, the polynomial order of the ith data is obtained in combination with the corresponding WOB and denoising degree of the ith data, and specifically,
[0117] a difference between the preset maximum polynomial order and the preset minimum polynomial order to obtain a polynomial order range index, calculating a product between a denoising degree of the i th data and the polynomial order range index, rounding up a sum between the preset minimum polynomial order and the product to obtain a reference polynomial order;
[0118] obtaining a reference WOB and a WOB adjustment step in the directional drilling process, calculating a difference between a WOB corresponding to the i th data and the reference WOB, calculating a ratio between the difference and the WOB adjustment step, rounding up a product between a preset WOB correction term sensitivity coefficient and the ratio to obtain an initial polynomial order control coefficient;
[0119] if the initial polynomial order control coefficient is less than or equal to the polynomial order range index, taking the initial polynomial order control coefficient as a final polynomial order control coefficient;
[0120] if the initial polynomial order control coefficient is greater than the polynomial order range index, taking the initial polynomial order range index as a final polynomial order control coefficient;
[0121] calculating a difference between the reference polynomial order and the final polynomial order control coefficient to obtain an adaptive polynomial order of the i th data.
[0122] In an embodiment, a calculation formula of the adaptive polynomial order of the i th data is:
[0123]
[0124] wherein, denotes the adaptive polynomial order of the i th data, denotes the preset maximum polynomial order, denotes the denoising degree of the i th data, denotes the preset minimum polynomial order, denotes the preset WOB correction term sensitivity coefficient, denotes the WOB corresponding to the i th data, denotes the reference WOB, and S denotes the WOB adjustment step, denotes a rounding up function.
[0125] It should be noted that, since the highest frequency of the drilling data is generally not more than four times the base frequency (the lowest oscillation frequency of a free oscillation system), in the embodiments of the present application, the preset maximum polynomial order is set to be , in order to prevent overfitting of high-frequency noise, the preset minimum polynomial order is set to be which is not limited here, and the implementer can set it according to the specific scene; represents a preset WOB correction term sensitivity coefficient, S represents a WOB adjustment step size, the smaller S is, the larger S is, the greater the WOB correction degree is, and the smaller the overall data fluctuation affected by the WOB is, but an excessively large S may cause over-correction, thereby losing the details of the data itself, so in the embodiment of the present application, S is set to be less than 100, S = 50 kN, which is not limited here, and an implementer can set it according to a specific scene; is a reference WOB, and in the embodiment of the present application, S is set to be less than 100, which is not limited here, and an implementer can set it according to a specific scene. The larger S is, the greater the possibility that the ith data is noise data generated by noise interference is, and the smaller the possibility that the ith data is accompanied by valid data is, that is, the weaker the validity of the ith data is, so at this time, the polynomial order of the ith data should be appropriately increased to better suppress noise, thereby The larger S is, the greater the adaptive polynomial order of the ith data is; The larger S is, the greater the degree to which the polynomial order of the ith data is reduced is, to retain the details of the data, thereby The smaller S is, the smaller the adaptive polynomial order of the ith data is.
[0126] At this time, the adaptive polynomial order of the ith data in the to-be-de-noised data sequence is obtained, and the polynomial order of each data in the to-be-de-noised data sequence is obtained in the same way. According to the adaptive polynomial order of each data in the to-be-de-noised data sequence, the to-be-de-noised data sequence is de-noised by using an SG filter, to obtain a de-noised data sequence, wherein the SG filter is a prior art, which will not be described here. The de-noised data sequence is uploaded to a corresponding MWD instrument monitoring data analysis model, to analyze the current drilling data (in the embodiment of the present application, the inclination), to monitor the well trajectory in real time, and to notify relevant personnel to customize different processing schemes, to adjust the drilling equipment.
[0127] It is worth mentioning that the focus of the present application is to obtain the adaptive polynomial order of each data in the to-be-de-noised data sequence by adjusting the polynomial order in the SG filter, to effectively de-noise the data collected by the MWD instrument, and to analyze the de-noised data, which is a prior art, and will not be described here.
[0128] In summary, in the directional drilling process, the time series data of any drilling data received by the MWD instrument is obtained, which is recorded as a to-be-de-noised data sequence; for any data in the to-be-de-noised data sequence, according to the corresponding drill bit rotating speed of the any data, whether the position of the any data satisfies a preset condition in the to-be-de-noised data sequence is judged, if the preset condition is satisfied, a window centered on the any data is constructed, the noise degree of the any data is obtained according to the change rate of each data in the window; the local trend index of the any data is obtained according to the deviation degree of each data in the window from the overall trend of all data in the window, the size of the window is adjusted according to the drill bit rotating speed to obtain a new window, the local periodicity index of the any data is obtained according to the autocorrelation function of all data in the new window, the de-noising degree of the any data is obtained by combining the noise degree, the local trend index and the local periodicity index of the any data; the adaptive polynomial order of the any data is obtained according to the corresponding drilling pressure and the de-noising degree, the to-be-de-noised data sequence is de-noised by an SG filter according to the adaptive polynomial order of each data in the to-be-de-noised data sequence to obtain a de-noised data sequence, which is used for real-time monitoring of the wellbore trajectory. Wherein, the de-noising degree of each data is obtained according to the noise degree of each data point and the local change characteristics (local trend index and local periodicity index), since the drilling pressure can affect the bending degree of the drill string, and then affect the degree of interference of the data by noise, therefore, the adaptive polynomial order of each data is obtained by combining the corresponding drilling pressure and the de-noising degree of each data, so as to reduce the noise influence caused by the drilling pressure, while effectively filtering out the noise and retaining the data details, the accuracy and reliability of the data are effectively improved.
[0129] The above examples are only used to illustrate the technical solutions of the present application, but not limit it; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for noise cancellation of MWD instrument monitoring data, characterized in that, The method for noise elimination of MWD instrument monitoring data comprises the following steps: In the directional drilling process, the time series data of any drilling data collected by the MWD instrument is obtained, which is denoted as a to-be-de-noised data sequence; For any data in the to-be-de-noised data sequence, whether the position of the data meets a preset condition is determined according to the corresponding drill bit rotating speed, if the preset condition is met, a window centered on the data is constructed, and the noise degree of the data is obtained according to the change rate of each data in the window; According to the deviation of each data in the window from the overall trend of all data in the window, a local trend index of the data is obtained, the size of the window is adjusted according to the drill bit rotating speed to obtain a new window, and a local periodicity index of the data is obtained according to the autocorrelation function of all data in the new window, and the de-noising degree of the data is obtained by combining the noise degree, the local trend index and the local periodicity index of the data. According to the corresponding drilling pressure and the de-noising degree of the data, an adaptive polynomial order of the data is obtained, and the to-be-de-noised data sequence is de-noised by an SG filter according to the adaptive polynomial order of each data in the to-be-de-noised data sequence to obtain a de-noised data sequence for real-time monitoring of the well trajectory.
2. The method of claim 1, wherein, The method comprises the following steps: According to the corresponding drill bit rotating speed and the sampling frequency of the MWD instrument, the sampling number of one revolution of the drill bit is obtained, and half of the sampling number of a first preset multiple is denoted as a first preset number, wherein the first preset multiple is an even number; In the to-be-de-noised data sequence, if the number of data before the data is greater than or equal to the first preset number, and the number of data after the data is greater than or equal to the first preset number, it is determined that the position of the data meets the preset condition; If the number of data before the data is less than the first preset number, or the number of data after the data is less than the first preset number, it is determined that the position of the data does not meet the preset condition.
3. The method of claim 2, wherein, The method comprises the following steps: The sum of the sampling number of the first preset multiple and a constant 1 is calculated to obtain the window size of the data, and a window centered on the data is constructed in the to-be-de-noised data sequence according to the window size of the data.
4. The method of claim 1, wherein, The noise degree of the data is obtained according to the change rate of each data in the window. The data other than the any data in the window is recorded as neighborhood data, for any neighborhood data, if the any neighborhood data is not the first data in the to-be-de-noised data sequence and is not the last data in the to-be-de-noised data sequence, then in the to-be-de-noised data sequence, a left slope between the any neighborhood data and the data adjacent to the left of the any neighborhood data is calculated, and a right slope between the any neighborhood data and the data adjacent to the right of the any neighborhood data is calculated, an average value between the left slope and the right slope is calculated to obtain a change rate of the any neighborhood data; if the any neighborhood data is the first data in the to-be-de-noised data sequence, then a right slope between the any neighborhood data and the data adjacent to the right of the any neighborhood data is calculated to obtain a change rate of the any neighborhood data; if the any neighborhood data is the last data in the to-be-de-noised data sequence, then a left slope between the any neighborhood data and the data adjacent to the left of the any neighborhood data is calculated to obtain a change rate of the any neighborhood data; an average value of the change rates of all neighborhood data is calculated to obtain a neighborhood data change rate average value, a change rate of the any data is obtained, a proportion of the change rate of the any data in the neighborhood data change rate average value is calculated to obtain a first mutation degree of the any data; an average value of all neighborhood data is calculated, and a proportion of the any data in the average value of all neighborhood data is calculated to obtain a second mutation degree of the any data; a product between the first mutation degree and the second mutation degree is calculated to obtain a pulse interference degree of the any data; an average value of the change rates of all data in the window is calculated to obtain an overall change rate average value, a number of peak values in all data in the window is obtained, and a product between the number and the overall change rate average value is calculated to obtain a continuous interference degree of the any data; a maximum value between the pulse interference degree and the continuous interference degree of the any data point is recorded as a noise degree of the any data.
5. The method of claim 1, wherein, The local trend index of the any data is obtained according to a deviation degree of each data in the window from an overall trend of all data in the window, and the local trend index of the any data comprises: a median filter is performed on the data in the window to obtain a filtered median value of each data in the window, a difference absolute value between each data in the window and the filtered median value thereof is calculated, and an average value of all difference absolute values is recorded as an overall trend deviation degree of all data in the window; a filtered median value sequence is composed of the filtered median value of each data in the window, a standard deviation of a first difference sequence of the filtered median value sequence is calculated, and an inverse of a product between the overall trend deviation degree and the standard deviation is taken as the local trend index of the any data.
6. The method of claim 1, wherein, The size of the window is adjusted according to the drill bit rotating speed to obtain a new window, and the new window comprises: a sampling frequency of the MWD instrument is obtained, a sampling number of one revolution of the drill bit is obtained according to the drill bit rotating speed corresponding to the any data and the sampling frequency, a sum between a sampling number of a second preset multiple and a constant 1 is calculated to obtain a new window size of the any data, and the second preset multiple is an even number; If the number of data before the any data is greater than or equal to the second preset number, and the number of data after the any data is greater than or equal to the second preset number, a new window centered on the any data is constructed in the to-be-de-noised data sequence according to the new window size, and the second preset number is half of the second preset multiple. If the number of data before the any data is less than the second preset number, a new window corresponding to the any data is constructed in the to-be-de-noised data sequence according to the new window size, all data before the any data, and part of data after the any data. If the number of data after the any data is less than the second preset number, a new window corresponding to the any data is constructed in the to-be-de-noised data sequence according to the new window size, all data after the any data, and part of data before the any data.
7. The method of claim 1, wherein, The local periodicity index of the any data is obtained according to the autocorrelation function of all data in the new window, including: The autocorrelation function of all data in the new window is obtained, and the independent variable of the autocorrelation function is a lag order, and the dependent variable is an autocorrelation value. According to the drill bit rotation speed corresponding to the any data, the time required for one rotation of the drill bit is obtained, which is recorded as a drill bit rotation period, and a lag order range is obtained according to the drill bit rotation period and the drill bit rotation period of the third preset multiple. The reciprocal of the sampling frequency of the MWD instrument is recorded as a lag step, and at least two lag orders are obtained in the lag order range to form a lag order data sequence according to the lag step. According to the autocorrelation function, the autocorrelation value of each lag order in the lag order data sequence is calculated, and the maximum value among all autocorrelation values is selected and recorded as a maximum autocorrelation value. According to the autocorrelation function, the autocorrelation value when the lag order is zero is calculated and recorded as a zero-time-delay autocorrelation value, and the ratio between the maximum autocorrelation value and the zero-time-delay autocorrelation value is calculated to obtain the local periodicity index of the any data.
8. The method of claim 1, wherein, The de-noising degree of the any data is obtained by combining the noise degree, the local trend index, and the local periodicity index of the any data, including: The reciprocal of the product between the local trend index and the local periodicity index of the any data is calculated to obtain an effectiveness index of the any data. The product between the reciprocal of the effectiveness index and the noise degree is linearly normalized to obtain the de-noising degree of the any data.
9. The method of claim 1, wherein, The adaptive polynomial order of the any data is obtained according to the corresponding drill bit pressure and de-noising degree of the any data, including: The difference between the preset maximum polynomial order and the preset minimum polynomial order is calculated to obtain a polynomial order range index, the product between the de-noising degree of the any data and the polynomial order range index is calculated, and the sum between the preset minimum polynomial order and the product is rounded to obtain a reference polynomial order. The reference WOB and a WOB adjustment step size in a directional drilling process are acquired, a difference between the WOB corresponding to any data and the reference WOB is calculated, a ratio between the difference and the WOB adjustment step size is calculated, a product between a preset WOB correction term sensitivity coefficient and the ratio is rounded to obtain an initial polynomial order control coefficient; If the initial polynomial order control coefficient is less than or equal to the polynomial order range index, the initial polynomial order control coefficient is taken as a final polynomial order control coefficient; If the initial polynomial order control coefficient is greater than the polynomial order range index, the polynomial order range index is taken as the final polynomial order control coefficient; A difference between the reference polynomial order and the final polynomial order control coefficient is calculated to obtain an adaptive polynomial order of the any data.
10. The method of claim 1, wherein, The judgment of whether the position of the any data satisfies a preset condition further comprises: If the preset condition is not satisfied, the denoising degree of the any data is set to zero.
Citation Information
Patent Citations
Drilling tool precision monitoring method and system based on artificial intelligence
CN119036200A
MWD continuous wave measurement signal processing method and device
CN119337125A