1 Introduction

For dynamic guidance and control of steerable drilling tools, it is crucial to achieve precise real-time measurements of downhole attitude parameters, including well inclination angle, tool face angle, and azimuth angle, etc. The closer the sensors are to the drilling bit, the more accurate the measurements will be, which will bring strong vibrations and significant interference to the sensors at the same time, such as the cutting of rock, friction between the drilling pipe and the rock wall, and other related phenomena [1,2,3]. These vibrations directly deteriorate the measurement accuracy of the well inclination angle and tool face angle. In practical, the amplitude of near-bit vibration signals is typically around 5 g (g is the acceleration of gravity, 9.8 m/s2) and could reach a maximum of 30 g [4, 5]. However, the effective signals are triaxial components of gravity with amplitude smaller than g. Thus, the SNR of near-bit measurements could not exceed 0.2 [6]. Additionally, the sensors experience high-speed rotation, which will result in centrifugal acceleration noises. This dilemma further enhances the complexity of extracting the meaningful signals.

Measurement of downhole attitude parameters can usually be performed by using an inertial measurement unit (IMU) such as a triaxial acceleration sensor to get triaxial acceleration component signals and then the desired attitude parameters are resolved [7]. The triaxial signals are constituted by strong vibrations and high-speed rotation, resulting in the effective signal being buried and the SNR extremely low [8]. Therefore, it is crucial to propose downhole weak SNR signal extraction method and improve accuracy of attitude parameter.

A plenty of methods have emerged to solve the problem of extracting downhole effective signals. The elimination method of vibration acceleration in rotary steerable drilling system proposed in the literature [9] was a filtering algorithm based on the analysis of power spectral density of interference signal. The dynamic solving method of well inclination orientation of bottom rotary drill pipe in literature [10] effectively reduced the measurement error, but when the viscous slip effect of downhole drilling tools was not obvious, a large solving error would occur. Literature [11] presented an unscented Kalman filtering method to effectively filter out the interference noise of the attitude sensor. Literature [12] introduced a dynamic attitude measurement method of steerable drilling tools with anti-differential adaptive filtering, which solved the problem of inaccurate measurement of attitude parameters during dynamic measurement. The gravity acceleration signal extraction for dynamic measurement of near-bit well inclination offered in literature [13] could effectively extract the gravity acceleration signal, and finally get the well inclination and azimuth, but the measurement accuracy would be reduced with the increase of rotational speed. Literature [14] addressed a dynamic measurement method of drilling IMU well inclination with UKF and complementary filtering, which further improved the measurement accuracy, but it was limited by the selection of the noise covariance matrix, and improperly selected parameters might lead to a decline in the filtering performance instability. Literature [15] proposed a drilling tool attitude solution based on wavelet neural network modified adaptive filtering, which significantly improved the solution accuracy.

Owing to the complex downhole environment, the existing attitude signal extraction methods almost have certain limitations, such as the difficulty of mathematical model establishing and the dependence on a priori information. Practically, the mathematical model and priori information could not be obtained exactly [16, 17]. Empirical mode decomposition (EMD) has been widely used in fault detection, speech recognition, image processing and signal analysis [18, 19], because it does not rely on any a priori information and decomposes the signal from its own characteristics. However, it could not be applied to near-bit weak SNR signal extraction directly because of modal aliasing phenomenon, that is, multiple decomposed frequency bands could overlap with each other, resulting in non-uniqueness of the decomposed IMFs of each order [20]. This paper proposes a frequency selecting complementary ensemble empirical mode decomposition (FSCEEMD) algorithm for the extraction of weak SNR signals from downhole near-bit, and the main contributions are as follows:

  • Complementary noises are introduced to measurement signals by adding positive and negative pairwise random Gaussian white noise. The sum of pairs of added noises can be considered to be zero, and then upper and lower envelopes could be accurately obtained during the decomposition process, which ultimately guarantees the uniqueness of the IMFs of each order.

  • A hard decision of frequency threshold is designed. The decomposed IMF functions with different frequency are firstly ranked. And then according to the frequency magnitude, a hard threshold is designed to ignore high-frequency IMF functions and reconstruct the signals.

  • The proposed FSCEEMD algorithm utilizes the signal intrinsic characteristics without priori information. And it is adaptive and could be extended to non-smooth and nonlinear signals, because the time-scale characteristics of the data itself are used to decompose the signal with no need for any predefined basis functions. Furthermore, the presented method is for the field of drilling here, and yet could be subsequently applied to aerospace and other fields.

The paper is organized as follows. Section 1 describes the backgrounds of steerable drilling and presents the problem of attitude parameter measurement. The formulas for attitude resolving are given in Section 3 proposes the specific details of FSCEEMD for downhole weak SNR signal extraction. Then Matlab simulation verification and actual experiments results are given in Sect. 4 to illustrate the utility and effectiveness of our extraction algorithm. Conclusions are contained in Sect. 5.

2 Attitude resolving

For downhole near-bit attitude measurements of the steerable drilling tool, triaxial accelerometers are used to measure the acceleration of the drilling tool in different directions. Then, the well inclination angle and tool face angle can be calculated by coordinate transformation and formula derivation [21]. The well inclination angle is the angle between the axis of the borehole trajectory and the gravity vector, which indicates the degree of horizontal inclination in the forward direction of the drilling tool. And the tool face angle is the angle between the high side of gravity and the high side of the drilling tool, which reflects the direction of inclination of the drilling tool for the next drilling.

In the measurement of actual downhole attitude parameters, the northwest sky geographic coordinate system (OWNS coordinate system) and the drilling tool coordinate system (OXYZ coordinate system) are established according to the actual installation direction of the triaxial accelerometer. The OXYZ coordinate system is obtained by a series of rotations from the OWNS coordinate system [22]. The schematic diagram of the coordinate system transformation is shown in Fig. 1.

Fig. 1
figure 1

Coordinate transformation diagram

In the geographic coordinate system, the acceleration of gravity g is generally defined as

$$G = \left[ {\begin{array}{*{20}c} 0 \\ 0 \\ { - g} \\ \end{array} } \right].$$
(1)

The projections of the gravitational acceleration on the \(x,y,z\) axes are \(G_{x}\),\(G_{y}\) and \(G_{z}\), respectively, with

$$\left\{ \begin{gathered} G_{x} = - g\cos T\sin I \hfill \\ G_{y} = - g\sin T\sin I \hfill \\ G_{z} = - g\cos I \hfill \\ \end{gathered} \right..$$
(2)

It is deduced that

$$\left\{ \begin{gathered} T = \arctan \frac{{G_{y} }}{{G_{x} }} \hfill \\ I = - \arctan \frac{{\sqrt {G_{x}^{2} + G_{y}^{2} } }}{{G_{z} }} \hfill \\ \end{gathered} \right.,$$
(3)

where \(T\) and \(I\) denote the tool face angle and the well inclination angle, respectively.

The problem here is to accurately resolve \(T\) and \(I\) with \(G_{x}\), \(G_{y}\), \(G_{z}\) using Eq. (3). However, \(G_{x}\), \(G_{y}\), \(G_{z}\) are mixed with massive high frequency noises resulting from strong vibrations and centrifuged acceleration. Taking the \(x\)-axis output of acceleration sensor for example, its dynamic measurement can be described as

$$G_{x}^{{\text{m}}} = G_{x} + v_{x} + r_{x} ,$$
(4)

where m denotes measurement, \(G_{x}^{{\text{m}}}\) is measurement data, \(v_{x}\) is the vibration acceleration, and \(r_{x}\) is the centrifugal acceleration, along \(x\) axis respectively. An efficient extraction scheme of \(G_{x}\), \(G_{y}\), \(G_{z}\) is desired.

3 Method of downhole weak SNR signal extraction based on FSCEEMD

3.1 EMD

EMD is a data sequence adaptive decomposition method introduced by Huang [23]. They introduced the notion of IMF which should adhere to two conditions.

  1. 1.

    The discrepancy between the counts of zeros and poles could not exceed 1;

  2. 2.

    Both the upper and lower envelopes exhibit an average value of 0.

A given signal sequence would be decomposed into several IMFs and residual through EMD. The followings are the details for EMD.

Firstly, find the local maximum and local minimum of the original signal. Secondly, use the spline interpolation to connect all the local maximum and local minimum respectively forming the local maximum envelope and the local minimum envelope. Thirdly average the two envelops, and subtract the mean line from the original signal to obtain a new function. Then determine whether this function satisfies the IMF condition. If the function meets the condition, it is the element of IMF. Otherwise, repeat above steps replacing the original signal with the function until the IMF condition is satisfied. And subtract the sum of all IMFs from the original signal, and repeat above steps to finally find all IMFs until the residual function is monotonic.

The approach is adaptive and qualified for addressing non-linear and non-smooth signals since the decomposition is based on inherent signal traits. However, the EMD processing of downhole near-bit signals could confront with the problem of modal aliasing resulting in a large resolving error.

3.2 FSCEEMD

To overcome the phenomenon of modal aliasing existing in EMD, ensemble empirical mode decomposition (EEMD) is introduced assuming that the superposition of multiple white noises approximately equals to 0 and is negligible [24]. When the number of processing times is not large enough, the white noise often cannot be ignored. Nonzero white noise leads to the existence of residual noise, which is not suitable for extracting the downhole near-bit weak SNR signal.

In this paper, we propose a FSCEEMD algorithm. This method utilizes the addition of multiple complementary pairs of white noise, then operates an ensemble averaging of the results of each averaged pair after EMD, selects the appropriate frequency of the IMFs and ultimately obtains the weighted summation to restructure the useful signal. FSCEEMD eliminates the residual noise in EEMD and reducing the computational effort greatly at the same time. The followings are the detailed steps of our proposed scheme for the extraction of weak SNR signals.

Given

$$G_{x}^{{\text{m}}} = G_{x} + v_{x} + r_{x} ,$$
(5)

assuming \(\omega_{x} = v_{x} + r_{x}\), Eq. (4) becomes

$$G_{x}^{{\text{m}}} = G_{x} + \omega_{x} .$$
(6)

For simplicity, the time variable is omitted here.

Step 1 Design \(p\) pairs of complementary random white noise sequences

$$n_{i} = \left\{ {q_{i} \, - q_{i} } \right\},i \in [1,p],$$
(7)

where \(i\) denotes the \(i\)th pair, \(q_{i}\) is the positive noise of \(i\)th pair, \(- q_{i}\) is the negative noise of \(i\)th pair with \(q_{i} \sim N\left( {0,\sigma_{i}^{2} } \right)\), and \(\sigma_{i}\) is standard deviation which should be larger than the standard deviation of \(\omega_{x}\) [25].

Step 2 Add \(n_{i}\) to the measurement signal, and get

$$u_{i} = G_{x}^{{\text{m}}} + n_{i} ,\;i \in [1,p],$$
(8)

where \(u_{i}\) is signal after noise adding of pair \(i\), and \(n_{i}\) is added noise of pair \(i\). The addition of \(n_{i}\) could offset the original noise \(\omega_{i}\), and the local maximum and local minimum of \(u_{i}\) can be exactly obtained, which further provide accurate upper and lower envelops. This process could also eliminate the residual noise in the reconstructed signal after decomposition.

Step 3 Do EMD on each pair of signals with complementary noise added to obtain \({\text{IMF}}_{k,i}^{ + }\) and \({\text{IMF}}_{k,i}^{ - }\), where \({\text{IMF}}_{k,i}^{ + }\) (\(k = 1,2, \ldots\)) is the positive IMF of the \(k\)th order of the \(i\)th pair, \({\text{IMF}}_{k,i}^{ - }\) is the negative IMF of the \(k\)th order and the \(i\)th pair.

Step 4 Average the \({\text{IMF}}_{k,i}^{ + }\) and \({\text{IMF}}_{k,i}^{ - }\), and get

$$\overline{{{\text{IMF}}}}_{k,i} = \frac{{{\text{IMF}}_{{_{k,i} }}^{ + } + {\text{IMF}}_{{_{k,i} }}^{ - } }}{2}.$$
(9)

Step 5 Sum up all the \(\overline{{{\text{IMF}}}}_{k,i}\) to make an overall average, and yield

$${\text{IMF = }}\frac{{\sum\nolimits_{i = 1}^{p} {\overline{{{\text{IMF}}}}_{k,i} } }}{p}.$$
(10)

Step 6 Design hard frequency threshold, that is

$$\left\{ {\begin{array}{*{20}c} {w_{k} = 1,\quad f_{k} < f_{s} } \\ {w_{k} = 0,\quad f_{k} > f_{s} } \\ \end{array} } \right.,$$
(11)

where \(w_{k}\) is \(k\)th order weight of IMF, \(f_{k}\) is frequency of \(k\)th order of IMF, and \(f_{s}\) is frequency threshold. Since \(v_{x}\) and \(r_{x}\) have high frequency, take \(f_{s} = {\text{ceil}}(l/2)\) as the frequency threshold where l is the present total orders of IMFs. Set the weight \(w_{k} = 1\) when \(f_{k}\) is less than the frequency threshold. Otherwise, set \(w_{k} = 0\).

Step 7 Weighted sum of the IMF in the threshold range

$$\hat{G}_{x}^{{}} = \sum\limits_{k = 1}^{{}} {w_{k} \cdot {\text{IMF}}_{k} } ,$$
(12)

where \(\hat{G}_{x}^{{}}\) is the final reconstruction result.

Thus, we get the estimated useful signal and realize the downhole near-bit weak SNR signal extraction.

4 Experimental testing and analysis

4.1 4.1 Simulated signal verification and analysis

Assuming that initial well inclination angle is 61°, the drilling tool rotational speed is 40 r/min, and the sampling frequency is 50 Hz, individual simulation signals for three-axis acceleration are generated conducting 500 sampling points

$$\left\{ {\begin{array}{*{20}c} {G_{x}^{{\text{m}}} = b_{1} + A\cos (2\pi f_{1} t + \varphi_{1} ) + \omega_{1} } \\ {G_{y}^{{\text{m}}} = b_{2} + B\sin (2\pi f_{2} t + \varphi_{2} ) + \omega_{2} } \\ {G_{z}^{{\text{m}}} = b_{3} + C\sin (2\pi f_{3} t + \varphi_{3} ) + \omega_{3} } \\ \end{array} } \right.,$$
(13)

where \(b_{j}\) (\(j = 1,2, \ldots\)) is the bias position of each signal, \(A\),\(B\),\(C\) are the individual signal amplitudes, \(f_{j}\) is the frequency of the signal, \(\varphi_{j}\) is the initial phase, and \(\omega_{j}\) is the Gaussian white noise.

The \(x\)-axis acceleration simulation signal has an amplitude with 0.4, a frequency with 1 Hz, an initial phase with pi/3, and a bias with 7.97, the \(y\)-axis magnitude has an amplitude with 0.4, a frequency with 1 Hz, an initial phase with pi/3, a bias with − 2.9, and the \(z\)-axis has a amplitude with 0.2, a frequency with 0, an initial phase with 2 * pi/3, a bias with − 6.69. Add Gaussian white noise to three axes with SNR 0.2, 0.2, 0.3, respectively, since the SNR of near-bit measurements could not exceed 0.2 and the influence on \(z\)-axis is less significant than \(x\)-axis and \(y\)-axis.

To verify the effectiveness of the FSCEEMD, the filtering results for the three methods are given comparing with EMD, EEMD, and Unscented Kalman filtering (UKF). UKF method is widely used in many fields such as navigation, target tracking, and signal processing [26, 27]. Here the filtering plot of UKF is given through nonlinear Eq. (3) directly without linearization for three axes.

Figures 2, 3, and 4 show triaxial data filtering results of FSCEEMD, EMD and EEMD. We can see that the EMD-filtered signal fails to present the trajectory of the true signal, owing to the phenomenon of modal aliasing in the decomposition. Thus, the IMFs of each order have a certain degree of error, and the reconstruction of the signal could be unstable. The EEMD can roughly trace the waveform of the true signal, but there is still a large fluctuation at the peaks and valleys because of the existence of the residual auxiliary noise. The waveform of FSCEEMD plot is the smoothest with least error, which traces the original signal more completely, and outperforms EMD and EEMD.

Fig. 2
figure 2

Filtering plots of x-axis acceleration simulation signals

Fig. 3
figure 3

Filtering plots of y-axis acceleration simulation signals

Fig. 4
figure 4

Filtering plots of z-axis acceleration simulation signals

Utilizing Eq. (3), the well inclination angle and tool face angle are resolved. The outcomes obtained from the four methods are illustrated in Figs. 5 and 6, contrasting with the true signal. Additionally, Table 1 gives the root mean square error (RMSE) values for EMD, EEMD, UKF, FSCEEMD, respectively. Table 2 presents correlation coefficient for the four methods.

Fig. 5
figure 5

Comparison of the inclination angles resolved by the four filtering methods with the true well inclination angles

Fig. 6
figure 6

Comparison of the tool face angles resolved by the four filtering methods with the true tool face angles

Table 1 RMSE values for the four filtering methods
Table 2 Correlation coefficient for the four filtering methods

From Figs. 5 and 6, the curve of EMD has a larger gap with the true signal, EEMD could roughly trace the true signal tendency, but there is still a certain degree of fluctuation. While FSCEEMD curve is smoother and can keep up with the true signal. Then comparing with the existing UKF algorithm, it can be seen the FSCEEMD is closer to the true signal.

Meanwhile, it can be seen from Table 1 that for well inclination angle, the RMSE of FSCEEMD is 0.5136°, which is the smallest one. The second one is 0.6562° of UKF, the third one is 0.6646° of EEMD, and the worst one is of EMD reaching 0.8745°. The RMSE for tool face angle is 1.3529°, 1.4682°, 1.6726°, 2.2218° for FSCEEMD, UKF, EEMD and EMD, respectively. And Table 2 shows correlation coefficients between the signals filtered by the four filtering methods and the true signals, it can be seen that the correlation coefficient of FSCEEMD is closest to 1, which indicates that it has the best performance.

Thus, the filtering effect of FSCEEMD outperforms EMD, EEMD and UKF. EMD makes the filtering result have a large error due to the existence of the phenomenon of modal aliasing, which leads to the lower accuracy of the decomposition results. EEMD makes up this defect to a certain extent, but it is limited by the randomness of the white noise auxiliary signal, which makes the decomposition results still have certain errors. The filtering effect of UKF is limited by the establishment of the system model, relying on priori information, and computational difficulties, which lead to its accuracy being easily affected. And FSCEEMD powerfully improves the signal extraction accuracy, which verifies the effectiveness of our method.

4.2 Actual data validation and analysis

To verify the efficiency of FSCEEMD to extract the downhole weak SNR signal, the test and analysis are carried out under the real drilling conditions with a drilling depth of 1768 m, drilling pressure of 10 MPa, temperature of 40 °C, drilling tool rotational speed of 45 r/min, and a total drilling time of 75 h. The data are voltage signals measured by triaxial accelerometers as shown in Fig. 7.

Fig. 7
figure 7

Tri-axis accelerometer actual voltage signals

Figures 8 and 9 show the comparison of the well inclination angle and tool face angle from the four filtering methods, respectively. The exact efficient signals are unknown here since the actual downhole information is unavailable [28]. But it can still be seen that the waveforms of EMD、EEMD and UKF filtering fluctuate to a larger extent, the waveform with FSCEEMD filtering is relatively less float and therefor have a higher accuracy, which is consistent with that of simulation results.

Fig. 8
figure 8

Comparison of inclination angles solved by the four filtering methods

Fig. 9
figure 9

Comparison of tool face angles solved by the four filtering methods

By analyzing the test results of the simulated and actual signals, the FSCEEMD filtering method solves the modal aliasing problem of EMD, eliminates the residual error generated by EEMD, does not rely on mathematical model and greatly improves the computational efficiency through the addition of several pairs of white noise signals that are opposite to each other. The useful signal can be effectively extracted from the near-bit weak SNR measurements.

5 Conclusions

In this paper, FSCEEMD is proposed for the extraction of weak SNR signals from downhole near-bits. FSCEEMD utilizes the idea of introducing random interference to add a number of pairs of complementary auxiliary white noises to the signal. It reconstructs the signal according to the IMFs with different frequencies of the weights. The FSCEEMD method could reduce the influence of interference on the weak SNR signal decomposition low computation. The effectiveness of our method is verified with higher extraction accuracy for well inclination angle and tool face angle.