Noise elimination method for MWD instrument monitoring data

By adaptively adjusting the polynomial order of the SG filter, combining the noise level and local characteristics of the MWD instrument data, the data loss problem caused by the fixed order of the SG filter is solved, and efficient data denoising and detail retention is achieved during directional drilling, improving data accuracy and reliability.

CN120541375AActive Publication Date: 2025-08-26DONGYING BORUI TEDA PETROLEUM TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510633737.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-26
Estimated Expiration
2045-05-16

AI Technical Summary

Technical Problem

In the prior art, the polynomial order of the SG filter is fixed and cannot be adaptively adjusted, resulting in the loss of data details or the suppression of noise while denoising, which affects the accuracy and reliability of the monitoring data of the MWD instrument.

Method used

By obtaining the timing data of the MWD instrument monitoring data, a window is built based on the drill bit speed and data change rate, the noise degree and local trend and periodicity indicators are calculated, the polynomial order is adaptively adjusted, and the denoising processing is performed using an SG filter.

Benefits of technology

It effectively filters out noise while retaining data details, improving the accuracy and reliability of MWD instrument monitoring data, and adapts to noise interference during drilling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120541375A_ABST
    Figure CN120541375A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a noise elimination method for MWD instrument monitoring data, and the method comprises the steps: obtaining a to-be-denoised data sequence in a directional drilling process; for any data in the to-be-denoised data sequence, the noise degree of any data is obtained according to the change rate of each piece of data in the local range of any data, and the denoising degree of any data is obtained according to the trend consistency feature and the periodicity feature of the data in the local range of any data in combination with the noise degree of any data; according to the bit pressure and the denoising degree corresponding to any data, the adaptive polynomial order of any data is obtained, according to the adaptive polynomial order of each data in the to-be-denoised data sequence, denoising processing is carried out on the to-be-denoised data sequence through the SG filter, noise is effectively filtered, data details are reserved, and the denoising accuracy of the to-be-denoised data sequence is improved. And the accuracy and reliability of data are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a noise elimination method for monitoring data of an MWD instrument. Background Art

[0002] Measurement While Drilling (MWD), an advanced technology used in directional drilling, uses MWD instruments to measure borehole or drill bit information, such as well inclination, azimuth, and tool face angle, in real time during the drilling process. The collected data is then transmitted to the surface system in real time to guide wellbore trajectory control. However, during the drilling process, the data collected by the MWD instrument is often subject to various noise and interference factors, such as drill string vibration noise, downhole electronic noise, and mud pulse interference. Furthermore, the data is also subject to interference from various factors during transmission. The data received by the surface system is likely to contain a large amount of noise, which seriously affects the accuracy and reliability of the data. Therefore, before the surface system analyzes the received data, it is crucial to eliminate the noise.

[0003] When denoising data, in order to obtain the most accurate data as possible, it is necessary to retain signal details and peaks while denoising. Therefore, SG filters are usually used for denoising in the traditional way. SG filters are a filtering method based on local polynomial least squares fitting in the time domain. They smooth the data by fitting a polynomial within a sliding window, thereby removing noise while retaining the data details and peaks to the greatest extent, effectively filtering out noise and improving the noise elimination effect on data collected by MWD instruments.

[0004] However, the polynomial order in the SG filter is usually set to a fixed order based on empirical values, 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 may cause excessive smoothing of the signal, loss of detailed information, and even the introduction of artifacts; a smaller order has a weaker smoothing effect on the signal and can better preserve the details and characteristics of the original signal (such as spikes, mutations, etc.), but has limited ability to suppress high-frequency noise, resulting in poor noise elimination effect and interfering with subsequent monitoring of data during directional drilling by relevant personnel.

[0005] Therefore, how to adaptively obtain the polynomial order in the SG filter to improve the noise elimination effect becomes an urgent problem to be solved. Summary of the Invention

[0006] In view of this, an embodiment of the present invention provides 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] An embodiment of the present invention provides a method for eliminating noise from monitoring data of an MWD instrument, the method comprising the following steps: During the directional drilling process, the time series data of any drilling data collected by the MWD instrument is obtained and recorded as the data sequence to be denoised; For any data in the data sequence to be denoised, based on the drill bit speed corresponding to the data, determine whether the position of the data in the data sequence to be denoised meets a preset condition. If the preset condition is met, construct a window centered on the data, and obtain the noise level of the data based on the change rate of each data in the window. Obtaining a local trend index of any data according to the degree of deviation of each data in the window from the overall trend of all data in the window, adjusting the size of the window according to the drill bit speed to obtain a new window, obtaining a local periodicity index of any data according to the autocorrelation function of all data in the new window, and obtaining a denoising degree of any data by combining the noise level, local trend index, and local periodicity index of any data; The adaptive polynomial order of any data is obtained based on the drilling pressure and denoising degree corresponding to the any data. The denoised data sequence is denoised using an SG filter based on the adaptive polynomial order of each data in the denoised data sequence to obtain a denoised data sequence for real-time monitoring of the wellbore trajectory.

[0008] Preferably, judging whether the position of any data in the sequence of data to be denoised satisfies a preset condition based on the drill bit rotation speed corresponding to the any data includes: Obtaining the number of samples per revolution of the drill bit according to the drill bit speed corresponding to any one of the data and the sampling frequency of the MWD instrument, and recording half of the number of samples of a first preset multiple as a first preset number, where the first preset multiple is an even number; In the data sequence to be denoised, if the number of data before the any data is greater than or equal to the first preset number, and the number of data after the any data is greater than or equal to the first preset number, then it is determined that the position of the any data meets the preset condition; If the number of data before any data is less than the first preset number, or the number of data after any data is less than the first preset number, it is determined that the position of any data does not meet the preset condition.

[0009] Preferably, the constructing of a window centered on any one of the data includes: The sum of the sampling times of the first preset multiple and the constant 1 is calculated to obtain the window size of any data, and in the data sequence to be denoised, a window centered on any data is constructed according to the window size of any data.

[0010] Preferably, obtaining the noise level of any data according to the change rate of each data in the window includes: Recording all data other than the any data in the window as neighborhood data, for any neighborhood data, if the any neighborhood data is neither the first data nor the last data in the data sequence to be denoised, then calculating 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 in the data sequence to be denoised, respectively, and calculating the average of the left slope and the right slope to obtain the rate of change of the any neighborhood data; If any of the neighborhood data is the first data in the data sequence to be denoised, then the right slope between the any of the neighborhood data and the data adjacent to it on the right is calculated to obtain the rate of change of the any of the neighborhood data; If any of the neighborhood data is the last data in the data sequence to be denoised, then the left slope between the any of the neighborhood data and its left adjacent data is calculated to obtain the rate of change of the any of the neighborhood data; Calculating the average of the change rates of all neighborhood data to obtain the mean of the neighborhood data change rates, obtaining the change rate of any data, calculating the proportion of the change rate of any data in the mean of the neighborhood data change rates, and obtaining the first mutation degree of any data; Calculating the mean of all neighborhood data, calculating the proportion of the any data in the mean of all neighborhood data, and obtaining the second mutation degree of the any data; Calculating the product of the first mutation degree and the second mutation degree to obtain the pulse interference degree of the any data; Calculating an average of the rates of change of all data in the window to obtain an overall rate of change mean, obtaining the number of peaks in all data in the window, and calculating the product of the number and the overall rate of change mean to obtain a degree of continuous interference of any data; The maximum value of the impulse interference degree and the continuous interference degree of any data point is recorded as the noise degree of any data point.

[0011] Preferably, obtaining the local trend indicator of any data according to the degree of deviation of each data in the window from the overall trend of all data in the window includes: Perform median filtering on the data in the window to obtain the filtered median of each data in the window, calculate the absolute value of the difference between each data in the window and its filtered median, and record the average of all the absolute values ​​of the differences as the overall trend deviation degree of all the data in the window; The filtered median of each data in the window is composed into a filtered median sequence, the standard deviation of the first-order difference sequence of the filtered median sequence is calculated, and the inverse of the product of the overall trend deviation degree and the standard deviation is used as the local trend indicator of any data.

[0012] Preferably, adjusting the size of the window according to the drill bit rotation speed to obtain a new window includes: Obtaining a sampling frequency of the MWD instrument, obtaining the number of samples per drill bit rotation based on the drill bit speed corresponding to the any data and the sampling frequency, calculating the sum of the number of samples of a second preset multiple and a constant 1 to obtain a new window size for the any data, where the second preset multiple is an even number; In the data sequence 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 data sequence to be denoised, constructing a new window centered on the any data according to the new window size, where the second preset number is half of a result of rounding up the second preset multiple; If the number of data before any data is less than the second preset number, then, in the data sequence to be denoised, constructing a new window corresponding to the any data according to the new window size, all data before the any data, and part of the data after the any data; If the number of data after any data is less than the second preset number, then in the data sequence to be denoised, a new window corresponding to any data is constructed based on the new window size, all data after any data, and part of the data before any data.

[0013] Preferably, obtaining the local periodicity index of any data according to the autocorrelation function of all data in the new window includes: Obtaining the autocorrelation function of all data in the new window, where the independent variable of the autocorrelation function is the lag order and the dependent variable is the autocorrelation value; According to the drill bit rotation speed corresponding to any one of the data, the time required for the drill bit to rotate one circle is obtained, which is recorded as the drill bit rotation period; according to the drill bit rotation period and a third preset multiple of the drill bit rotation period, a lag order range is obtained; the reciprocal of the sampling frequency of the MWD instrument is recorded as the lag step length; according to the lag step length, at least two lag orders are obtained within the lag order range to form a lag order data sequence; Calculating the autocorrelation value of each lag order in the lag order data sequence according to the autocorrelation function, and selecting the maximum value among all the autocorrelation values ​​as the maximum autocorrelation value; According to the autocorrelation function, the autocorrelation value when the lag order is zero is calculated, recorded as the zero-delay autocorrelation value, and the ratio between the maximum autocorrelation value and the zero-delay autocorrelation value is calculated to obtain the local periodicity index of any data.

[0014] Preferably, the combining the noise level, local trend index and local periodicity index of any data to obtain the denoising level of any data includes: Calculating the inverse of the product of the local trend index and the local periodicity index of any data to obtain the validity index of any data; The product of the reciprocal of the effectiveness index and the noise level is linearly normalized to obtain the denoising level of any data.

[0015] Preferably, obtaining the adaptive polynomial order of any data according to the bit weight and denoising degree corresponding to any data includes: Calculating a difference between a preset maximum polynomial order and a preset minimum polynomial order to obtain a polynomial order range index, calculating a product between a denoising degree of any data and the polynomial order range index, and rounding off a sum of the preset minimum polynomial order and the product to obtain a reference polynomial order; Obtaining a reference weight on bit and a weight on bit adjustment step size during directional drilling, calculating a difference between the weight on bit corresponding to any data and the reference weight on bit, calculating a ratio between the difference and the weight on bit adjustment step size, and rounding off the product of a preset weight on bit correction term sensitivity coefficient and the ratio 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 used as the final polynomial order control coefficient; If the initial polynomial order control coefficient is greater than the polynomial order range index, the initial polynomial order range index is used as the final polynomial order control coefficient; The difference between the reference polynomial order and the final polynomial order control coefficient is calculated to obtain the adaptive polynomial order of any data.

[0016] Preferably, after determining whether the position of any data satisfies a preset condition, the method further includes: If the preset condition is not met, the denoising level of any data is set to zero.

[0017] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: In the directional drilling process, the present invention obtains time series data of any drilling data collected by the MWD instrument and records it as a data sequence to be denoised; for any data in the data sequence to be denoised, according to the drill bit speed corresponding to the any data, it is judged whether the position of the any data in the data sequence to be denoised meets a preset condition; if the preset condition is met, a window centered on the any data is constructed, and the noise level of the any data is obtained according to the change rate of each data in the window; the local trend of the any data is obtained according to the degree of deviation of each data in the window from the overall trend of all data in the window. The window size is adjusted based on the drill bit speed to obtain a new window. The local periodicity index of each data point is obtained based on the autocorrelation function of all data within the new window. The denoising degree of each data point is determined by combining the noise level, local trend index, and local periodicity index of each data point. The adaptive polynomial order of each data point is determined based on the corresponding WOB and the denoising degree. The denoising data sequence is denoised using an SG filter based on the adaptive polynomial order of each data point in the denoised data sequence to obtain a denoised data sequence for real-time wellbore trajectory monitoring. The denoising degree of each data point is determined based on the noise level of each data point and its local variation characteristics (local trend index and local periodicity index). Since WOB affects drill string curvature, which in turn affects the degree of noise interference in the data, the adaptive polynomial order of each data point is determined by combining the WOB and denoising degree. This reduces the impact of noise caused by WOB, effectively filtering out noise while preserving data details, and effectively improving data accuracy and reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 This is a flow chart of a method for eliminating noise from MWD instrument monitoring data provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0020] The embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present disclosure, but should not be understood as limiting the present disclosure.

[0021] It should be noted that the terms "first," "second," and the like in the specification of the present disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, 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. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.

[0022] In order to illustrate the technical solution of the present invention, specific embodiments are provided below.

[0023] See also Figure 1 , is a flow chart of a method for eliminating noise from MWD instrument monitoring data provided by the first embodiment of the present invention, such as Figure 1 As shown, the method may include: Step S101 : During the directional drilling process, time series data of any drilling data collected by an MWD instrument is obtained and recorded as a data sequence to be denoised.

[0024] Measurement While Drilling (MWD), an advanced technology used in directional drilling, uses MWD instruments to measure borehole or drill bit information, such as well inclination, azimuth, and tool face angle, in real time during the drilling process. The collected data is then transmitted to the surface system in real time to guide wellbore trajectory control. However, during directional drilling, the data collected by the MWD instrument is often subject to various noise and interference factors, such as drill string vibration noise, downhole electronic noise, and mud pulse interference. Furthermore, the data is also subject to interference from various factors during transmission. The data received by the surface system is likely to contain a large amount of noise, which seriously affects the accuracy and reliability of the data. Therefore, before the surface system can analyze the received data, it needs to be denoised.

[0025] In the embodiment of the present invention, taking the well inclination angle as an example, the time series data of the well inclination angle collected by the MWD instrument and received by the ground system is recorded as the data sequence to be denoised, so as to facilitate denoising analysis thereof.

[0026] Step S102: for any data in the data sequence to be denoised, based on the drill speed corresponding to the any data, determine whether the position of the any data in the data sequence to be denoised meets a preset condition. If the preset condition is met, construct a window centered on the any data, and obtain the noise level of the any data based on the change rate of each data in the window.

[0027] When denoising a data sequence, in order to obtain the most accurate data possible, it is necessary to preserve data details and peaks while denoising. Therefore, SG filters are traditionally used for denoising. SG filters are a filtering method based on local polynomial least squares fitting in the time domain. They smooth the data by fitting a polynomial within a sliding window, effectively filtering out noise while preserving data details and peaks to the greatest extent possible. However, the order of the polynomial in an SG filter is typically set to a fixed order based on empirical values, and the order of the polynomial determines the complexity of the fitting curve: higher orders have a stronger smoothing effect on the signal and can more effectively suppress high-frequency noise, but may cause over-smoothing of the signal, loss of detailed information, and even the introduction of artifacts. Lower orders have a weaker smoothing effect on the signal and can better preserve the details and features of the original signal (such as spikes and mutations), but have limited ability to suppress high-frequency noise, resulting in poor noise removal.

[0028] Therefore, in this embodiment of the present invention, the adaptive polynomial order of each data point is obtained based on the local variation of each data point in the data sequence to be denoised, thereby improving the noise removal effect on the data sequence to be denoised. Taking the i-th data point in the data sequence to be denoised as an example, the noise level of the i-th data point is obtained based on the fluctuation of the i-th data point within its local range. This is used to represent the probability that the i-th data point is noise. The greater the noise level of the i-th data point, the higher the order of the adaptive polynomial should be for better noise suppression.

[0029] Since the data in the data sequence to be denoised may appear periodically with the rotation of the drill bit, in the embodiment of the present invention, data within a local range of the i-th data is obtained according to the periodicity: first, the drill bit speed and the sampling frequency of the MWD instrument corresponding to the i-th data are obtained, and then the number of sampling times of the MWD instrument when the drill bit rotates one circle is obtained, that is, , where SPR represents the number of sampling times of the MWD instrument when the drill bit rotates one circle, and RPM represents the drill bit speed (revolutions per minute) corresponding to the i-th data. Indicates the sampling frequency of the MWD instrument (times / second), 60 represents the conversion factor from minutes to seconds, Indicates the rounding symbol. Then, a window centered on the i-th data is constructed based on the number of sampling times of the first preset multiple. The first preset multiple must be an even number. In the embodiment of the present invention, the first preset multiple is set to 2. This is not limited here and can be set by the implementer according to the specific scenario. That is, the window size is 2×SPR+1, that is, the number of data contained in the window is 2×SPR+1.

[0030] Before constructing a window centered on the i-th data, it is necessary to determine whether the i-th data meets the following conditions: In the data sequence to be denoised, the number of data before the i-th data is greater than or equal to , and the number of data after the i-th data is greater than or equal to , if it is not satisfied, that is, in the data sequence to be denoised, the number of data before the i-th data is less than , or the number of data after the i-th data is less than , it is impossible to construct a window centered on the i-th data, and the denoising level of the i-th data is set to 0.

[0031] If the i-th data meets 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 to obtain the noise level of the i-th data, and then the denoising level of the i-th data is obtained based on the noise level.

[0032] Since the MWD instrument may be subject to two types of interference when collecting data, one is instantaneous interference, which is a short-term pulse interference caused by a sudden change in mud pump pressure or electromagnetic switch action, and the other is continuous interference caused by drill bit vibration noise, downhole electronic noise, etc. Because these two types of interference do not occur at the same time, in the embodiment of the present invention, the interference degree of the i-th data under these two interference conditions is calculated respectively, that is, the pulse interference degree and the continuous interference degree, and the maximum value is taken as the noise degree of the i-th data. Among them, the specific method of obtaining the pulse interference degree of the i-th data is: Record all data except the i-th data in the window as neighborhood data. For any neighborhood data, if the any neighborhood data is neither the first data nor the last data in the data sequence to be denoised, then in the data sequence to be denoised, calculate 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, respectively, and calculate the average value of the left slope and the right slope to obtain the rate of change of the any neighborhood data. If any of the neighborhood data is the first data in the data sequence to be denoised, then the right slope between the any of the neighborhood data and the data adjacent to it on the right is calculated to obtain the rate of change of the any of the neighborhood data; If any of the neighborhood data is the last data in the data sequence to be denoised, then the left slope between the any of the neighborhood data and its left adjacent data is calculated to obtain the rate of change of the any of the neighborhood data; Calculate the average of the change rates of all neighborhood data to obtain the mean of the neighborhood data change rates, obtain the change rate of the i-th data, calculate the proportion of the change rate of the i-th data in the mean of the neighborhood data change rates, and obtain the first mutation degree of the i-th data; 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; The product of the first mutation degree and the second mutation degree is calculated to obtain the pulse interference degree of the i-th data.

[0033] In one embodiment, the calculation formula for the pulse interference degree of the i-th data is:

[0034] in, Indicates the pulse interference degree of the i-th data, represents the rate of change of the i-th data, Represents the number of all neighborhood data in the window (in the embodiment of the present invention, the number of all neighborhood data in the window is ), Indicates the first The rate of change of neighborhood data, Represents the value of the i-th data, Represents the mean of all neighborhood data within the window.

[0035] It should be noted that impulse interference is a kind of instantaneous interference, which is manifested in that the i-th data is different from its neighboring data, that is, the i-th data has a sudden change, so The larger the value, the greater the degree of mutation of the i-th data. The larger it is, the greater the probability that the i-th data is noise caused by pulse interference; The larger the value, the greater the difference between the i-th data and its neighboring data. The larger the value is, the greater the probability that the i-th data is noise caused by pulse interference.

[0036] Furthermore, the continuous interference degree of the i-th data is obtained, specifically: Calculate the average value of the rate of change of all data in the window to obtain the overall mean value of the change rate, use the find_peaks() function in Python to obtain the peak values ​​of all data in the window, count the number of all peak values, calculate the product of the number and the mean value of the overall change rate, and obtain the degree of continuous interference of the i-th data. Among them, using the find_peaks() function in Python to obtain the peak value is an existing technology and will not be repeated here.

[0037] In one embodiment, the calculation formula for the continuous interference degree of the i-th data is:

[0038] in, Indicates the degree of continuous interference of the i-th data, represents the overall mean rate of change, Indicates the number of peaks in all data within the window of the i-th data.

[0039] It should be noted that the continuous interference is manifested in the strong overall volatility of the data in the window, so the larger the mean of the overall change rate, the greater the volatility of the data in the window, and thus The larger it is, the greater the probability that the i-th data is noise caused by continuous interference; The larger the value, the more data mutations occur in the window, and the greater the fluctuation intensity of the data in the window. The larger , the greater the probability that the i-th data is noise caused by continuous interference.

[0040] So far, the impulse interference degree and continuous interference degree of the i-th data are obtained. Since the impulse interference and continuous interference will not appear at the same time in the same period, the maximum value of the impulse interference degree and the continuous interference degree is selected as the noise degree of the i-th data, which is recorded as .

[0041] Step S103: obtaining a local trend index of any data according to the degree of deviation between each data in the window and the overall trend of all data in the window, adjusting the size of the window according to the drill bit rotation speed to obtain a new window, obtaining a local periodicity index of any data according to the autocorrelation function of all data in the new window, and obtaining a denoising degree of any data by combining the noise level, local trend index and local periodicity index of any data.

[0042] Since the data collected by the MWD instrument itself has certain trends and periodicities, when noise interference occurs, its trends and periodicities still exist. In order to retain data features as much as possible while removing noise, in an embodiment of the present invention, based on the data trend in the window of the i-th data, a local trend index of the i-th data is obtained to judge the degree of consistency between the i-th data and the overall trend of all data in the window. The greater the degree of consistency, the more likely the i-th data is valid data collected by the MWD instrument and the less interference it is accompanied by. In this case, the polynomial order of the i-th data should be appropriately reduced to retain the detailed features of the data; conversely, the smaller the degree of consistency, the more likely the i-th data is noise data generated by noise interference and the less likely it is to be 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: Perform median filtering on the data in the window to represent the overall trend of the data in the window, obtain the filtered median of each data in the window, calculate the absolute value of the difference between each data in the window and its filtered median, and record the average of all the absolute values ​​of the differences as the overall trend deviation degree of all the data in the window. Median filtering is an existing technology and will not be described in detail here. The filtered median of each data in the window is composed into a filtered median sequence, the standard deviation of the first-order difference sequence of the filtered median sequence is calculated, and the inverse of the product of the overall trend deviation degree and the standard deviation is used as the local trend indicator of the i-th data.

[0043] In one embodiment, the calculation formula of the local trend index of the i-th data is:

[0044] in, represents the local trend indicator of the i-th data, Y represents the number of all data in the window of the i-th data, Indicates the value of the y-th data in the window, Represents the filtered median of the y-th data in the window, represents the standard deviation of the first-order difference sequence of the filtered median sequence, Indicates the absolute value symbol.

[0045] It should be noted that The smaller it is, the smaller the difference between the yth data in the window and its corresponding filtered median is. The larger it is, the smaller the deviation between each data in the window and the overall trend of all data in the window is, the smaller the possibility that the i-th data is noise data generated by noise interference is, and the greater the possibility that it is accompanied by valid data; The smaller it is, the smaller the data fluctuation in the filtered median sequence is. The larger it is, the more consistent the trends of the data in the window are, the less likely the i-th data is to be noise data generated by noise interference, and the greater the possibility that it is accompanied by valid data.

[0046] Considering that the data collected by the MWD instrument may experience periodic fluctuations as the drill bit rotates, after obtaining the local trend index of the i-th data, it is necessary to analyze the periodicity of the data within the window to obtain the local periodicity index of the i-th data. Since the data content within the i-th data window is relatively small and the periodicity is not obvious, it is necessary to first adjust the i-th data window to obtain a new window. After analyzing the periodicity of the data within the new window, the local periodicity index of the i-th data is obtained. The specific method for obtaining the new window is: Get the sampling frequency of the MWD instrument, and according to the drill bit speed corresponding to the i-th data and the sampling frequency, get the number of samples per revolution of the drill bit, which is recorded as , calculate the sum of the number of sampling times of the second preset multiple and the constant 1 to obtain the new window size of the i-th data, where the second preset multiple must be an even number and greater than the first preset multiple (in the embodiment of the present invention, the first preset multiple is 2). Therefore, in the embodiment of the present invention, the second preset multiple is set to 4. There is no limitation here, and the implementer can set it according to the specific scenario, that is, the new window size is 4×SPR+1; In the data sequence to be denoised, if the number of data before the i-th data is greater than or equal to , and the number of data after the i-th data is greater than or equal to , then in the data sequence to be denoised, a new window centered on the i-th data is constructed according to the new window size; If the number of data before the i-th data is less than , then in the data sequence to be denoised, a new window corresponding to the i-th data is constructed according to the new window size, all the data before the i-th data, and part of the data after the i-th data; If the number of data after the i-th data is less than , then in the data sequence to be denoised, a new window corresponding to the i-th data is constructed according to the new window size, all data after the i-th data, and part of the data before the i-th data.

[0047] After obtaining a new window of the i-th data, the xcorr() function is used in Matlab to obtain the autocorrelation function of all the data in the new window. Obtaining the autocorrelation function is a prior art and will not be repeated here. If the data in the new window exhibits a periodic distribution, the autocorrelation function will peak at an integer multiple of the drill bit rotation period (the time required for the drill bit to rotate once). At this time, the i-th data is likely to be valid data collected by the MWD instrument and is associated with a low degree of interference. Therefore, in an embodiment of the present invention, a local periodicity index of the i-th data is obtained based on the autocorrelation function of all data within the i-th data new window to determine whether the data in the new window has significant periodicity. The more significant the periodicity, the more likely the i-th data is to be valid data collected by the MWD instrument and is associated with a low degree of interference. In this case, the polynomial order of the i-th data should be appropriately reduced to preserve the detailed features of the data. Conversely, the less significant the periodicity, the more likely the i-th data is to be noise data generated by noise interference and is less likely to be associated with valid data. In this case, the polynomial order of the i-th data should be appropriately increased to better suppress noise. The specific method of obtaining the local periodicity index of the i-th data is: Obtaining the autocorrelation function of all data in the new window, where the independent variable of the autocorrelation function is the lag order and the dependent variable is the autocorrelation value; According to the drill speed corresponding to the i-th data, that is, RPM, the time required for the drill to rotate one circle is obtained, that is, , denoted as the drill bit rotation period, represented by T, and the lag order range is obtained according to the drill bit rotation period and the drill bit rotation period of the third preset multiple. In the embodiment of the present invention, the third preset multiple is set to 3, which is not limited here. The implementer can set it according to the specific scenario, that is, the lag order range is [T, 3T]. The reciprocal of the sampling frequency of the MWD instrument is recorded as the lag step length. According to the lag step length, at least two lag orders are obtained within the lag order range to form a lag order data sequence; Calculating the autocorrelation value of each lag order in the lag order data sequence according to the autocorrelation function, and selecting the maximum value among all the autocorrelation values ​​as the maximum autocorrelation value; According to the autocorrelation function, the autocorrelation value when the lag order is zero is calculated, recorded as the zero-delay autocorrelation value, and the ratio between the maximum autocorrelation value and the zero-delay autocorrelation value is calculated to obtain the local periodicity index of the i-th data.

[0048] In one embodiment, the calculation formula for the local periodicity index of the i-th data is:

[0049] in, represents the local periodicity index of the i-th data, Represents the autocorrelation function of all data in the new window of the i-th data, t represents the t-th lag order in the lag order data sequence, Represents the maximum function.

[0050] It should be noted that It reflects the intensity of the periodic component that best matches the drill bit rotation period in all the data in the new window, that is, the intensity of the peak that appears at an integer multiple of the drill bit rotation period (the time required for the drill bit to rotate one circle). The larger it is, the more significant the periodicity of the data in the new window is. is the zero-delay autocorrelation value, which represents the total energy of the data. Normalized to the interval [0, 1], The closer it is to 1, the more periodic the data in the new window is, that is, the more periodic the data in the local range of the i-th data is. The larger the value is, the more likely the i-th data is to be valid data collected by the MWD instrument, and the interference level is relatively small.

[0051] At this point, the local trend index and local periodicity index of the i-th data are obtained. Further, by combining the noise level, local trend index and local periodicity index of the i-th data, the denoising degree of the i-th data is obtained to characterize the possibility that the i-th data is noise data caused by noise interference: the greater the denoising degree, the greater the possibility that the i-th 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 i-th data, and the polynomial order of the i-th data should be appropriately increased to better suppress the noise; conversely, the smaller the denoising degree, the smaller the possibility that the i-th 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 i-th data, and the polynomial order of the i-th data should be appropriately reduced to retain the detailed characteristics of the data. The specific method of obtaining the denoising degree of the i-th data is: Calculate the inverse of the product of the local trend index and the local periodic index of the i-th data to obtain the validity index of the i-th data; The product of the reciprocal of the effectiveness index and the noise level is linearly normalized to obtain the denoising level of the i-th data, wherein the linear normalization is an existing technology and will not be described in detail here.

[0052] In one embodiment, the calculation formula for the denoising degree of the i-th data is:

[0053] in, Indicates the denoising degree of the i-th data, Indicates the noise level of the i-th data, Represents the local trend indicator of the i-th data, represents the local periodicity index of the i-th data, represents the linear normalization function.

[0054] It should be noted that The smaller it is, the smaller the probability that the i-th data is noise interference. The smaller it is, the greater the possibility that the i-th data is accompanied by valid data, that is, the stronger the validity of the i-th data is, and the smaller the degree of denoising is; The larger the value is, the more consistent the data trend is within the local range of the i-th data. The smaller it is, the less likely the i-th data is noise data generated by noise interference, and the greater the possibility that it is accompanied by valid data, that is, the validity of the i-th data is stronger and the degree of denoising is smaller; The larger the value is, the more periodic the data in the local range of the i-th data is. The smaller it is, the more likely the i-th data is valid data collected by the MWD instrument, and the degree of interference is smaller, that is, the i-th data is more effective and the degree of denoising is smaller.

[0055] Step S104: Obtain the adaptive polynomial order of any data according to the drilling pressure and denoising degree corresponding to any data; and perform denoising on the data sequence to be denoised using an SG filter according to the adaptive polynomial order of each data in the data sequence to be denoised, to obtain a denoised data sequence for real-time monitoring of the wellbore trajectory.

[0056] Considering that the MWD instrument is affected by the bit weight during the actual data acquisition process, an increase in the bit weight will lead to an increase in the lateral vibration amplitude of the drill string, which in turn causes the overall data collected by the MWD instrument to be more affected by noise. If the bit weight is high but the polynomial order is not reduced, the vibration noise may be overfitted, causing some noise to be mistaken for valid data, thereby failing to effectively remove the noise. If the bit weight is low but the polynomial order is not increased, high-frequency signals may be excessively removed, resulting in over-smoothing of the effective high-frequency components. Therefore, in this embodiment of the present invention, the polynomial order of the i-th data is obtained by combining the bit weight and the denoising level corresponding to the i-th data. Specifically: Calculating the difference between a preset maximum polynomial order and a preset minimum polynomial order to obtain a polynomial order range index, calculating the product between the denoising degree of the i-th data and the polynomial order range index, and rounding the sum of the preset minimum polynomial order and the product to obtain a reference polynomial order; Obtaining a baseline WOB and a WOB adjustment step size during directional drilling, calculating the difference between the WOB corresponding to the i-th data and the baseline WOB, calculating the ratio between the difference and the WOB adjustment step size, and rounding off the product of a preset WOB correction term sensitivity coefficient and the ratio 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 used as the final polynomial order control coefficient; If the initial polynomial order control coefficient is greater than the polynomial order range index, the initial polynomial order range index is used as the final polynomial order control coefficient; The difference between the reference polynomial order and the final polynomial order control coefficient is calculated to obtain the adaptive polynomial order of the i-th data.

[0057] In one embodiment, the calculation formula for the adaptive polynomial order of the i-th data is:

[0058] in, represents the adaptive polynomial order of the i-th data, Indicates the preset maximum polynomial order, Indicates the denoising degree of the i-th data, represents the preset minimum polynomial order, Shows the sensitivity coefficient of the preset bit weight correction item. Indicates the drilling pressure corresponding to the i-th data, Indicates the base drilling pressure, S indicates the drilling pressure adjustment step, Represents the rounding function.

[0059] It should be noted that, since the highest frequency of drilling data is generally no more than four times the fundamental frequency (the lowest oscillation frequency of the free oscillation system), in the embodiment of the present invention, , in order to prevent overfitting high frequency noise, set ,There is no restriction here, and the implementer can set it according to the specific scenario; Indicates the sensitivity coefficient of the preset drilling pressure correction item, S indicates the drilling pressure adjustment step size, the smaller S is, The larger the value, the greater the degree of drilling pressure correction, and the less the overall data fluctuation is affected by drilling pressure. Too large may lead to over-correction, thereby losing the details of the data itself, so in the embodiment of the present invention, set , S=50kN, there is no limit here, the implementer can set it according to the specific scenario; is the reference bit weight, in the embodiment of the present invention, There is no restriction here, and implementers can set it according to specific scenarios. The larger the value is, the more likely the i-th data is noise data generated by noise interference, and the smaller the possibility of it being accompanied by valid data, that is, the weaker the validity of the i-th data. At this time, the polynomial order of the i-th data should be appropriately increased to better suppress noise, and thus The larger it is, the greater the order of the adaptive polynomial of the i-th data; The larger the value is, the greater the degree of reduction of the polynomial order of the i-th data is, in order to retain the detailed characteristics of the data, and thus The smaller it is, the smaller the order of the adaptive polynomial for the i-th data.

[0060] At this point, the adaptive polynomial order for the i-th data point in the denoised data sequence is obtained. Similarly, the polynomial order for each data point in the denoised data sequence is obtained. Based on the adaptive polynomial order for each data point in the denoised data sequence, the denoised data sequence is denoised using an SG filter to obtain a denoised data sequence. The SG filter is known from the prior art and will not be described in detail here. The denoised data sequence is then uploaded to the corresponding MWD instrument monitoring data analysis model, which analyzes the current drilling data (in this embodiment, the well inclination angle) to monitor the wellbore trajectory in real time. This model then notifies relevant personnel to customize different processing solutions to adjust the drilling equipment.

[0061] It is worth noting that the focus of the present invention is to obtain an adaptive polynomial order for each data in the sequence to be denoised by adjusting the polynomial order in the SG filter, so as to effectively denoise the received data collected by the MWD instrument. The analysis of the denoised data is a prior art and will not be repeated here.

[0062] In summary, in the directional drilling process, the present invention obtains the time series data of any drilling data collected by the MWD instrument and records it as the data sequence to be denoised; for any data in the data sequence to be denoised, according to the drill bit speed corresponding to the any data, it is judged whether the position of the any data meets the preset condition in the data sequence to be denoised; if the preset condition is met, a window centered on the any data is constructed, and the noise level of the any data is obtained according to the change rate of each data in the window; the local trend 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 local trend indicator is then adjusted based on the drill bit speed to obtain a new window. The local periodicity indicator of any data point is obtained based on the autocorrelation function of all data within the new window. The denoising degree of any data point is determined by combining the noise level, local trend indicator, and local periodicity indicator of the data point. The adaptive polynomial order of the data point is determined based on the corresponding WOB and the denoising degree. The denoising data sequence to be denoised is then denoised using an SG filter based on the adaptive polynomial order of each data point, resulting in a denoised data sequence for real-time monitoring of the wellbore trajectory. The denoising degree of each data point is determined based on the noise level of each data point and its local variation characteristics (local trend indicator and local periodicity indicator). Since WOB affects drill string curvature, which in turn affects the degree of noise interference in the data, the adaptive polynomial order of each data point is determined by combining the WOB and denoising degree. This reduces the impact of noise caused by WOB, effectively filtering out noise while preserving data details, and effectively improving data accuracy and reliability.

[0063] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A method for eliminating noise from MWD instrument monitoring data, characterized in that: The noise elimination method for MWD instrument monitoring data includes: During the directional drilling process, the time series data of any drilling data collected by the MWD instrument is obtained and recorded as the data sequence to be denoised; For any data in the data sequence to be denoised, based on the drill bit speed corresponding to the data, determine whether the position of the data in the data sequence to be denoised meets a preset condition. If the preset condition is met, construct a window centered on the data, and obtain the noise level of the data based on the change rate of each data in the window. Obtaining a local trend index of any data according to the degree of deviation of each data in the window from the overall trend of all data in the window, adjusting the size of the window according to the drill bit speed to obtain a new window, obtaining a local periodicity index of any data according to the autocorrelation function of all data in the new window, and obtaining a denoising degree of any data by combining the noise level, local trend index, and local periodicity index of any data; The adaptive polynomial order of any data is obtained based on the drilling pressure and denoising degree corresponding to the any data. The denoised data sequence is denoised using an SG filter based on the adaptive polynomial order of each data in the denoised data sequence to obtain a denoised data sequence for real-time monitoring of the wellbore trajectory.

2. A method for eliminating noise from MWD instrument monitoring data according to claim 1, characterized in that: The step of determining whether a position of any data satisfies a preset condition in the data sequence to be denoised based on the drill bit speed corresponding to the any data includes: Obtaining the number of samples per revolution of the drill bit according to the drill bit speed corresponding to any one of the data and the sampling frequency of the MWD instrument, and recording half of the number of samples of a first preset multiple as a first preset number, where the first preset multiple is an even number; In the data sequence to be denoised, if the number of data before the any data is greater than or equal to the first preset number, and the number of data after the any data is greater than or equal to the first preset number, then it is determined that the position of the any data meets the preset condition; If the number of data before any data is less than the first preset number, or the number of data after any data is less than the first preset number, it is determined that the position of any data does not meet the preset condition.

3. A method for eliminating noise from MWD instrument monitoring data according to claim 2, characterized in that: The step of constructing a window centered on any one of the data includes: The sum of the sampling times of the first preset multiple and the constant 1 is calculated to obtain the window size of any data, and in the data sequence to be denoised, a window centered on any data is constructed according to the window size of any data.

4. A method for eliminating noise from MWD instrument monitoring data according to claim 1, characterized in that: Obtaining the noise level of any data according to the change rate of each data in the window includes: Recording all data other than the any data in the window as neighborhood data, for any neighborhood data, if the any neighborhood data is neither the first data nor the last data in the data sequence to be denoised, then calculating 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 in the data sequence to be denoised, respectively, and calculating the average of the left slope and the right slope to obtain the rate of change of the any neighborhood data; If any of the neighborhood data is the first data in the data sequence to be denoised, then the right slope between the any of the neighborhood data and the data adjacent to it on the right is calculated to obtain the rate of change of the any of the neighborhood data; If any of the neighborhood data is the last data in the data sequence to be denoised, then the left slope between the any of the neighborhood data and its left adjacent data is calculated to obtain the rate of change of the any of the neighborhood data; Calculating the average of the change rates of all neighborhood data to obtain the mean of the neighborhood data change rates, obtaining the change rate of any data, calculating the proportion of the change rate of any data in the mean of the neighborhood data change rates, and obtaining the first mutation degree of any data; Calculating the mean of all neighborhood data, calculating the proportion of the any data in the mean of all neighborhood data, and obtaining the second mutation degree of the any data; Calculating the product of the first mutation degree and the second mutation degree to obtain the pulse interference degree of the any data; Calculating an average of the rates of change of all data in the window to obtain an overall rate of change mean, obtaining the number of peaks in all data in the window, and calculating the product of the number and the overall rate of change mean to obtain a degree of continuous interference of any data; The maximum value of the impulse interference degree and the continuous interference degree of any data point is recorded as the noise degree of any data point.

5. The method for eliminating noise from MWD instrument monitoring data according to claim 1, characterized in that: The local trend indicator of any data is obtained based on the degree of deviation of each data in the window from the overall trend of all data in the window, including: Perform median filtering on the data in the window to obtain the filtered median of each data in the window, calculate the absolute value of the difference between each data in the window and its filtered median, and record the average of all the absolute values ​​of the differences as the overall trend deviation degree of all the data in the window; The filtered median of each data in the window is composed into a filtered median sequence, the standard deviation of the first-order difference sequence of the filtered median sequence is calculated, and the inverse of the product of the overall trend deviation degree and the standard deviation is used as the local trend indicator of any data.

6. The method for eliminating noise from MWD instrument monitoring data according to claim 1, characterized in that: The step of adjusting the window size according to the drill bit rotation speed to obtain a new window includes: Obtaining a sampling frequency of the MWD instrument, obtaining the number of samples per drill bit rotation based on the drill bit speed corresponding to the any data and the sampling frequency, calculating the sum of the number of samples of a second preset multiple and a constant 1 to obtain a new window size for the any data, where the second preset multiple is an even number; In the data sequence 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 data sequence to be denoised, constructing a new window centered on the any data according to the new window size, where the second preset number is half of a result of rounding up the second preset multiple; If the number of data before any data is less than the second preset number, then, in the data sequence to be denoised, constructing a new window corresponding to the any data according to the new window size, all data before the any data, and part of the data after the any data; If the number of data after any data is less than the second preset number, then in the data sequence to be denoised, a new window corresponding to any data is constructed based on the new window size, all data after any data, and part of the data before any data.

7. The method for eliminating noise from MWD instrument monitoring data according to claim 1, characterized in that: The step of obtaining the local periodicity index of any data according to the autocorrelation function of all data in the new window includes: Obtaining the autocorrelation function of all data in the new window, where the independent variable of the autocorrelation function is the lag order and the dependent variable is the autocorrelation value; According to the drill bit rotation speed corresponding to any one of the data, the time required for the drill bit to rotate one circle is obtained, which is recorded as the drill bit rotation period; according to the drill bit rotation period and a third preset multiple of the drill bit rotation period, a lag order range is obtained; the reciprocal of the sampling frequency of the MWD instrument is recorded as the lag step length; according to the lag step length, at least two lag orders are obtained within the lag order range to form a lag order data sequence; Calculating the autocorrelation value of each lag order in the lag order data sequence according to the autocorrelation function, and selecting the maximum value among all the autocorrelation values ​​as the maximum autocorrelation value; According to the autocorrelation function, the autocorrelation value when the lag order is zero is calculated, recorded as the zero-delay autocorrelation value, and the ratio between the maximum autocorrelation value and the zero-delay autocorrelation value is calculated to obtain the local periodicity index of any data.

8. The method for eliminating noise from MWD instrument monitoring data according to claim 1, characterized in that: The combining of the noise level, local trend index and local periodicity index of any data to obtain the denoising level of any data includes: Calculating the inverse of the product of the local trend index and the local periodicity index of any data to obtain the validity index of any data; The product of the reciprocal of the effectiveness index and the noise level is linearly normalized to obtain the denoising level of any data.

9. The method for eliminating noise from MWD instrument monitoring data according to claim 1, characterized in that: Obtaining the adaptive polynomial order of any data according to the bit weight and denoising degree corresponding to any data includes: Calculating a difference between a preset maximum polynomial order and a preset minimum polynomial order to obtain a polynomial order range index, calculating a product between a denoising degree of any data and the polynomial order range index, and rounding off a sum of the preset minimum polynomial order and the product to obtain a reference polynomial order; Obtaining a reference weight on bit and a weight on bit adjustment step size during directional drilling, calculating a difference between the weight on bit corresponding to any data and the reference weight on bit, calculating a ratio between the difference and the weight on bit adjustment step size, and rounding off the product of a preset weight on bit correction term sensitivity coefficient and the ratio 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 used as the final polynomial order control coefficient; If the initial polynomial order control coefficient is greater than the polynomial order range index, the initial polynomial order range index is used as the final polynomial order control coefficient; The difference between the reference polynomial order and the final polynomial order control coefficient is calculated to obtain the adaptive polynomial order of any data.

10. The method for eliminating noise from MWD instrument monitoring data according to claim 1, characterized in that: After determining whether the position of any data satisfies a preset condition, the method further includes: If the preset condition is not met, the denoising level of 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

  • Denoising method for heat flow signal measurement of refrigerating device box body

    CN119939122A

  • Partial discharge pulse width simulation calculation method based on S-G smoothing filtering

    CN119962175A

  • Active Noise Cancellation In Electromagnetic Telemetry

    US20200012009A1