Next Article in Journal
Seamless Switching Control Strategy for a Power Conversion System in a Microgrid Based on Extended State Observer and Super-Twisting Algorithm
Previous Article in Journal
A Benchmark for UAV-View Natural Language-Guided Tracking
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Attitude Calculation Method of Drilling Tools Based on Cross-Correlation Extraction and ASRUKF

1
School of Electrical Engineering and Information, Southwest Petroleum University, Chengdu 610500, China
2
School of Mechatronic Engineering, Southwest Petroleum University, Chengdu 610500, China
*
Author to whom correspondence should be addressed.
Electronics 2024, 13(9), 1707; https://doi.org/10.3390/electronics13091707
Submission received: 15 March 2024 / Revised: 6 April 2024 / Accepted: 11 April 2024 / Published: 28 April 2024

Abstract

:
As a key component of the measurement while drilling technology, the accuracy of attitude calculation is directly related to the efficiency of resource exploration. To reduce the influence of vibration, rotation, and other disturbances on the attitude sensor during drilling, a method based on cross-correlation extraction and the adaptive square-root unscented Kalman filter (ASRUKF) is proposed to solve the attitude of the drilling tool in this paper. Firstly, the error of the signal collected by the attitude sensor is compensated, and the unscented Kalman filter (UKF) is used for filtering. Then, the effective gravitational acceleration signal is extracted by the cross-correlation method. Finally, an experimental platform for simulating the fully rotating attitude measurement system is established, and the application effects of the UKF and ASRUKF in the attitude calculation are compared. Compared with the UKF, the root mean square error of the inclination angle calculated by the ASRUKF is reduced by 12.9%, and the variance is reduced by 27.3%; the root mean square error of the azimuth angle is reduced by 29.5%, and the variance is reduced by 39.9%. The experimental results show that the attitude calculation method proposed in this paper can stably and effectively improve the accuracy of the attitude calculation of drilling tools.

1. Introduction

As an indispensable energy source, oil is not only closely related to production and life but is also a very important strategic material for the country. Drilling is a key component of oil and gas production. In order to improve the efficiency of oil production, it is necessary to master and control the trajectory of the drilling tool accurately in real time, and the premise of realizing the accurate control of the drilling tool trajectory is to obtain accurate attitude information about the drilling tool. Therefore, it is of great significance to study the calculation method of the drilling tool attitude [1].
In order to improve the accuracy of attitude calculation, it is necessary to obtain more accurate data. Ellipse fitting based on the least squares method is often used to correct the magnetometer data to improve the measurement accuracy [2,3]. Zhang et al. [4] effectively extracted the gravity acceleration signal using a correlation-based detection method, but how to accurately extract the z-axis gravity acceleration needs to be further studied. Liu et al. [5] designed a correction model to correct the accelerometer output values of a UAV navigation system by solving for the estimated non-gravitational acceleration and the external non-gravitational acceleration, but there is a lack of application cases in drilling tools. Noordin et al. [6] proposed a method of fusing high-frequency gyroscope signals and low-frequency accelerometer signals using complementary filtering algorithms to obtain a more accurate attitude angle. Han et al. [7] introduced the EKF method to filter the outputs of accelerometers and magnetometers and compared the effects of complementary filters; the results show that the EKF method is more effective in improving the accuracy of the attitude calculation, but it requires a large amount of calculation. Rong et al. [8] proposed a new gain-regulated EKF method based on the Eulerian method and tested the computational accuracy of the method in the presence of linear acceleration perturbations and magnetic disturbances, and the GREKF method proposed in this study is superior in terms of attitude computation compared with the traditional EKF method. Pang et al. [9] used the UKF method to correct the error of a magnetometer and reduced it by one order of magnitude. Xu et al. [10] realized the filtering of colored noise by updating the acceleration noise model of the observation equation based on the improved unscented Kalman filtering algorithm under the established colored noise model of the acceleration vibration of a drilling tool, but the study only considered the axial vibration of the drilling tool and did not consider the filtering problem when the vibration interference is complicated. Sui et al. [11] proposed an improved UKF method and verified that the method could effectively suppress the effect of colored noise on satellite attitude estimation. Han and Guo et al. [12,13] fused data from gyroscopes, accelerometers, and magnetometers to improve the accuracy of attitude calculation. Shen et al. [14] utilized a UKF fusion gyroscope and accelerometer to realize the resolution of the roll angle and pitch angle and then fused the magnetometer real-time calibration data and the gyroscope to correct the heading angle, which improved the accuracy of the UAV attitude and heading. Chen et al. [15] proposed a wavelet neural network EKF algorithm to provide a new idea for attitude calculation. Although the method of combining wavelet neural network with Kalman improves the accuracy and stability of attitude calculation, the training time of its neural network increased with the increase in the amount of test data. Gao et al. [16] proposed a stochastic weighted adaptive method to improve the attitude calculation accuracy of a rotary steering system and compared it with the EKF method, which proved the superiority of the proposed method in calculating the attitude of drilling tools. Although the above research has achieved certain results in drilling tool attitude calculation, improvements can still be made to further enhance the calculation accuracy.
Currently, most drilling attitude measurement systems mount sensors in the center of the non-magnetic drill collar, but this installation reduces the utilization of the internal space of the drilling tool. A fully rotating attitude measurement system with an accelerometer, gyroscope, and magnetometer mounted on the inner wall of the drill collar can enhance the flow path of the drilling fluid and optimize the space in the non-magnetic drill collar. However, there are few studies on fully rotating attitude measurement systems at present.
For these reasons, this paper presents a method of calculating drilling tool attitude based on cross-correlation extraction and the ASRUKF algorithm, and it is tested on a fully rotating attitude measurement system. Firstly, the attitude signals collected by the gyroscope, magnetometer, and accelerometer are compensated for error and filtered out for noise. Then, the effective gravitational acceleration signal is extracted by a cross-correlation method. Finally, the experimental platform of the fully rotating attitude measurement system is set up to obtain the attitude data of the drilling tool and to test the method proposed in this paper.

2. Basic Theory

2.1. Coordinate System

Attitude parameters from accelerometers, gyroscopes, and magnetometers are measured in real time while drilling to calculate the attitude angle. The attitude angle is shown in Figure 1, where the inclination angle (θ) indicates the inclination of the drilling tool relative to the horizontal plane; the azimuth angle (φ) indicates the offset direction of the drilling tool movement; and the tool face angle ( γ ) indicates the offset direction of the motion of the drilling tool.
As shown in the Figure 1, NEU is a geographic coordinate system for solving the attitude change behavior of a moving carrier, also called the N system, and XYZ is a carrier coordinate system, which generally refers to the follower coordinate system built on top of the carrier, also called the B system.

2.2. Principles of Attitude Calculation

Currently, the main methods for attitude calculation are the Euler angle, the direction cosine, and the quaternion method. The quaternion method can realize attitude information acquisition when the carrier moves in all directions in space, and the computation is relatively small, which is suitable for a system with high real-time requirements. Since the quaternion method is not affected by the universal lock problem and the calculation process is relatively simple, this paper chose to use the quaternion method for the attitude calculation. It is defined as follows:
Q ( q 0 , q 1 , q 2 , q 3 ) = q 0 + q 1 i + q 2 j + q 3 k = cos ( α 2 ) + u sin ( α 2 )
where q 0 , q 1 , q 2 , q 3 are real numbers, α is the equivalent rotation angle of the rigid body, u is the rotation axis, and i , j , k are mutually orthogonal unit vectors.
When the quaternion method is used to describe the rotation of the B system with respect to the N system, it can be expressed according to the quaternion multiplication law as follows:
C n b = q 0 2 + q 1 2 q 2 2 q 3 2 2 ( q 1 q 2 + q 0 q 3 ) 2 ( q 1 q 3 q 0 q 2 ) 2 ( q 1 q 2 q 0 q 3 ) q 0 2 q 1 2 + q 2 2 q 3 2 2 ( q 2 q 3 + q 0 q 1 ) 2 ( q 1 q 3 + q 0 q 2 ) 2 ( q 2 q 3 q 0 q 1 ) q 0 2 q 1 2 q 2 2 + q 3 2
And, the quaternion differential equations are as follows:
Q = 1 2 Q ω n b b = 1 2 M ( ω n b b ) Q
Among them is the following:
M ( ω n b b ) = 0 ω x ω x ω x ω x 0 ω z ω y ω y ω z 0 ω x ω z ω y ω x 0
where ω x , ω y , ω z is the measured values of the three-axis angular velocities of the gyroscope.
Therefore, the quaternionic differential equation can be written as follows:
Q = q 0 . q 1 . q 2 . q 3 . = 1 2 0 ω x ω x ω x ω x 0 ω z ω y ω y ω z 0 ω x ω z ω y ω x 0 q 0 q 1 q 2 q 3
In the attitude calculation process, the differential equations are first solved, and then the gyroscope measurements are used to update the quaternions, thus updating the attitude matrix, and finally, the real-time attitude is solved based on the attitude matrix.
When the fully rotating attitude measurement system rotates at a constant speed, the transformation of the gravitational acceleration from the N system to the B system satisfies the coordinate change relationship shown in Equation (6).
a g = a x a y a z = C n b 0 0 g = g cos θ sin γ g sin θ g cos θ cos γ
where a g = a x a y a z T is the triaxial component of the gravitational acceleration of the B system.
The inclination angle and tool face angle can be obtained by solving the above equations:
θ = arctan a y a x 2 + a z 2 1 / 2 γ = arctan a x a z
The quaternion of the attitude matrix is updated by using the angular velocity data of the drilling tool measured by the gyroscope:
q 0 = q 0 + ( q 1 ω x q 2 ω y q 3 ω z ) 0.5 T q 1 = q 1 + ( q 0 ω x + q 2 ω z q 3 ω y ) 0.5 T q 2 = q 2 + ( q 0 ω y q 1 ω z + q 3 ω x ) 0.5 T q 3 = q 3 + ( q 0 ω z + q 1 ω y q 2 ω x ) 0.5 T
Solving the three attitude angles gives the following:
φ = arctan ( 2 ( q 1 q 2 + q 0 q 3 ) q 0 2 q 1 2 + q 2 2 q 3 2 ) θ = arcsin ( 2 ( q 2 q 3 q 0 q 1 ) ) γ = arctan ( 2 ( q 1 q 3 + q 0 q 2 ) q 0 2 q 1 2 q 2 2 + q 3 2 )
The azimuth angle can be obtained from the horizontal component of the measured value of the magnetometer and can be expressed as:
φ = arctan g ( m z a x m x a z ) m y ( a x 2 + a z 2 ) a y ( m x a x + m z a z )
where m g = m x m y m z T is the triaxial magnetic induction intensity.

3. Extraction of Gravitational Acceleration

3.1. Error Compensation

During the drilling process, the attitude parameters of accelerometers, gyroscopes, and magnetometers need to be measured in real time to calculate the attitude angle, but because the high-speed rotation and strong vibration will cause the accelerometer output data to be interfered with by vibrational and rotational noise, the direct use of the acceleration data for the calculation of the attitude may lead to inaccurate results. Therefore, extracting accurate gravity acceleration information becomes a major difficulty.
Because the magnetometer is subject to two different types of magnetic interference, hard magnetic distortion and soft magnetic distortion, the magnetic field components measured by the magnetometer are inaccurate, as shown in Figure 2. The elliptic least squares fitting algorithm can be used to compensate for the magnetic disturbance caused by the magnetometer.
Due to installation errors, the three sensitive axes of the accelerometer can be easily disturbed by centrifugal acceleration. In order to solve this problem, in the actual working drilling process, according to the actual type of drilling tools and the working environment, the drilling tools will be rotated at a rate of A to run around the center of its gyratory, the force condition of the accelerometer and its force situation is shown in Figure 3.
The output signal V x of the accelerometer in the X-axis can be expressed as follows:
V x = V a x + V r x = V g sin θ sin φ + V g R g d ω d t
The output signal V y of the accelerometer in the Y-axis can be expressed as follows:
V y = V a y + V r y = V g sin θ cos φ + V g R g ω 2
where V a x and V a y are the expected output signals of the inertial accelerometer in the X-axis and Y-axis, respectively, V r x is the tangential acceleration signal, and V r y is the centrifugal acceleration signal. Both V r x and V r y depend on the rotational speed of the drilling tool, so it is only necessary to obtain the rotational speed of the drilling tool, and the additional signal generated during the rotation can be eliminated by the rotational speed compensation formula. The three-axis accelerometer signals after the rotational speed compensation are shown in Equations (13) and (14).
V ˜ x 1 = V x V γ x = V x V g R g d ω d t
V ˜ y 1 = V y V γ y = V x V g R g ω 2
The strong vibrations caused by drilling are usually divided into transverse vibration, longitudinal vibration, and torsional vibration. The main form of vibration in near-bit drilling tools is transverse vibration, which can seriously affect the data obtained from accelerometers, gyroscopes, and magnetometers. These noises can adversely affect the dynamic measurement accuracy of the attitude sensor. The UKF algorithm can eliminate the sensor noise and realize continuous recursive operation effectively.

3.2. Cross-Correlation Extraction

When using a triaxial accelerometer to measure the acceleration of a drilling tool, the output signals include gravity, vibration, centrifugal, and shock acceleration. The centrifugal acceleration signal varies with the rotational speed, while the gravitational acceleration signal presents periodicity in the radial and tangential direction, so the cross-correlation method is used to extract the gravitational acceleration. This method extracts periodic signals from randomly generated noise signals by measuring the correlation of two time-domain signals at different moments.
Taking the X-axis gravitational acceleration as an example, the output of the accelerometer along the X-axis direction after filtering through the UKF algorithm is as follows:
g ¯ x ( k ) = A x cos ( ω k T s + φ ) + n x ( k ) = g x ( k ) + n x ( k )
The magnetometer X-axis output signal after UKF filtering is as follows:
m ¯ x ( k ) = cos ( ω k T s ) + n m ( k ) = m x ( k ) + n m ( k )
After UKF filtering, the correlation between g x and m x and the residual noise is low. Combining Equations (15) and (16) for the cross-correlation operation, the X-axis correlation signal can be calculated as follows:
R ( τ ) = 1 N K = 0 N 1 g ¯ x ( k + τ ) m ¯ x ( k ) = A x cos ( ω τ + φ ) 2
Then, the X-axis gravitational acceleration component extracted by cross-correlation is as follows:
g x ( t ) = A x cos ( ω τ + φ )
Similarly, the Y-axis gravitational acceleration component is as follows:
g y ( t ) = A y sin ( ω τ + φ )
Since the gravitational acceleration in the Z-axis direction coincides with the direction of the drill pipe, the rotation of the drilling tool does not affect the Z-axis output signal.

4. Attitude Calculation Method

4.1. System Modeling

The ASRUKF algorithm proposed in this paper uses an accelerometer and magnetometer to compensate for the gyroscope errors and adaptively adjusts the noise covariance matrix by external force acceleration and random magnetic field disturbance. In addition, the algorithm also filters the random noise input by the gyroscope, and the algorithm framework is shown in Figure 4.
Analyzing the sensor data, the system consisting of discrete-time state variables X and observed variables Z is described as follows:
X ( k + 1 ) = f X ( k ) + B u ( k ) + n ( k ) Z ( k ) = h ( X ( k ) ) + v ( k )
where f is the nonlinear state function, B is the input mapping matrix, u ( k ) is the input variable, n ( k ) is the system process noise, h is the nonlinear observation function, and v ( k ) is the systematic observation noise.
The ASRUKF state equation is obtained by updating the quaternions according to the Runge–Kutta method and combining the data fusion idea to extend the gyroscope random noise to the state variables as follows:
X ( k + 1 ) = f ( X ( k ) , u ( k + 1 ) ) + n ( k )
The system noise covariance matrix is expressed as follows:
Q u ( k ) = E n ( k ) n ( k ) T = Q q p ( k ) 0 4 × 3 0 4 × 3 Q r i ( k ) + Q r p ( k ) 7 × 7
where the matrix Q r i ( k ) is the gyroscope input random error noise covariance, and the matrix Q r p ( k ) is the gyroscope process noise covariance matrix.
According to the system equation of state, the observation model of the ASRUKF algorithm is expressed as follows:
Z k + 1 = h x k + 1 k + v k + 1
where h x k + 1 k denotes the system nonlinear observation transfer function, and v k + 1 denotes the system observation equation measurement noise.
The accelerometer noise and magnetometer noise are not correlated with each other, and the observation noise covariance matrix is expressed as follows:
R u ( k + 1 ) = E ν ( k + 1 ) v ( k + 1 ) T = R e a ( k + 1 ) + R a ( k + 1 ) 0 3 × 3 0 3 × 3 R e m ( k + 1 ) + R m ( k + 1 ) 6 × 6
where R ea ( k + 1 ) is the third-order external acceleration noise covariance matrix, R a ( k + 1 ) is the third-order accelerometer observation noise covariance matrix (except for gravitational acceleration), R e m ( k + 1 ) is the random magnetic disturbance covariance matrix, and R m ( k + 1 ) is the magnetometer noise covariance matrix.

4.2. Random Error Covariance Adaptive Design

Random errors arise due to random disturbances; therefore, a non-gravitational acceleration detection mechanism is established as follows:
| A f ( k ) g | = δ ( k )
where A f ( k ) denotes the norm of the accelerometer observations, and δ is the norm of external acceleration.
The existence of non-gravitational acceleration can be determined according to A f ( k ) . If δ ( k ) = 0 , then there is no non-gravitational acceleration, and R e a ( k ) = 0 . If δ ( k ) 0 , then there is non-gravitational acceleration of the accelerometer, and the following is obtained:
R e a ( k ) = ρ δ ( k ) I 3
where ρ is the scale factor of the external acceleration.
Similarly, the magnetic interference detection mechanism is as follows:
m f ( k ) 1 n i = 1 n m c x 2 ( i ) + m c y 2 ( i ) + m c z 2 ( i ) = φ ( k )
where m f ( k ) is the magnetometer norm at the current moment, m c x ( i ) , m c x ( i ) , m c z ( i ) isthe magnetometer calibration values, and φ is the norm of random magnetic disturbances; then, the following is obtained:
R e m k = τ φ k I 3
where τ is the scaling factor of the random magnetic disturbance. Thus, the observation noise covariance matrix is expressed as follows:
R u ( k + 1 ) = ρ δ ( k + 1 ) I 3 + R a ( k + 1 ) 0 3 × 3 0 3 × 3 τ φ ( k + 1 ) I 3 + R m ( k + 1 ) 6 × 6

4.3. Attitude Calculation Process

The design flow of the ASRUKF attitude calculation is as follows:
Firstly, the Sigma dot matrix is generated using the unscented transform (UT) as follows:
ξ ( i ) ( k ) = X ( k ) X ( k ) + ( n + λ ) P ( k ) X ( k ) n + λ P ( k ) 7 × 15 i
where n = 7 is the number of state dimensions, i = 2 n + 1 is the number of Sigma points, and λ is the scaling factor.
Secondly, the square-root decomposition of the covariance matrix is obtained as follows:
P k + 1 k 7 × 7 = q r w c ( i ) X k + 1 k 2 : 2 n + 1 X ^ ( k + 1 k Q u k P k + 1 k 7 × 7 = c h o l u p d a t e P ( k + 1 k ) X ( 1 ) ( k + 1 k ) X ^ ( k + 1 k ) w c ( 1 )
where X ( k + 1 k ) is the a priori estimate of the state quantity, w c denotes the weight of the covariance, and P ( k + 1 k ) is the upper triangular matrix.
Thirdly, UT is performed again using the a priori estimate, and new Sigma points are obtained as follows:
ξ ^ ( k + 1 k ) = X ^ ( k + 1 k )             X ^ ( k + 1 k ) + ( n + λ ) P ( k + 1 k )             X ^ ( x + 1 k ) ( n + λ ) P ( k + 1 k )
Then, obtaining the covariance matrix decomposition of the observations is conducted as follows:
P z z k + 1 6 × 6 = q r w c ( i ) ξ ^ ( i ) ( k + 1 k ) 2 : 2 n + 1 Z ^ ( k + 1 k ) R u ( k + 1 ) P z z ( k + 1 ) 6 × 6 = c h o l u p d a t e P zz ( t + 1 ) ξ ^ ( i ) ( k + 1 k ) Z ^ k + 1 k w c ( 1 )
Finally, the Kalman gain is derived from the covariance matrix as follows:
K u k + 1 7 × 6 = P x z k + 1 / P z z k + 1 P z z T k + 1
Updating the system posterior estimates with the covariance matrix leads to the following:
X ( k + 1 ) = X ^ ( k + 1 k ) + K u ( k + 1 ) [ Z o b s e r Z ^ ( k + 1 k ) ]
where Z obser = a x a y a z m x m y m z T is the observation of the accelerometer and magnetometer.
Using the Cholesky decomposition to update the system covariance matrix leads to the following:
U 7 × 6 = K u k + 1 P zz k + 1 P k + 1 7 × 6 = c h o l u p d a t e P k + 1 k , U , 1
where U is the intermediate variable, and P ( k + 1 ) is the system covariance matrix.
It can be seen that the ASRUKF algorithm adaptively adjusts the observation noise covariance matrix by using the residual of the observation norm of the accelerometer and magnetometer so as to estimate the system optimally.

5. Experiment and Analysis

5.1. Construction of Experimental Platform

In order to verify the effectiveness of the ASRUKF algorithm in improving the accuracy of attitude calculation, this paper collected experimental data by building a rotating vibration experimental platform, which were used for the subsequent attitude calculation. The attitude sensor was mounted as shown in Figure 5, rotating together with the rotation of a drilling tool to simulate mounting on the inner wall of the drill collar. As shown in Figure 5, the system consisted of an adjustable base, stepping motor, vibration motor, accelerometer, gyroscope, magnetometer, and other components.
The MPU9250 device is a 9-axis motion-tracking device that integrates a 3-axis gyroscope, a 3-axis accelerometer, a 3-axis magnetometer, and a motion processor (DMP) in its 3 × 3 × 1 mm package. Through the IIC, it can directly output all 9-axis data. It was therefore the basis for the attitude calculations in this paper, so it was very important to be able to correctly acquire data from the MPU9250. Considering the influence of centrifugal force, we vertically installed two MPU9250 processors, denoted as A and B, to collect acceleration and angular velocity data, effectively simulating an accelerometer and a gyroscope. The MPU9250 processor C was used to measure the magnetic field strength and simulate a magnetometer. In order to prevent the stepper motor from affecting the measurement of the magnetic field strength, MPU9250 processor C was placed 1 m away from the stepper motor. The adjustable base was made of aluminum alloy and could be rotated at different angles using hinges and telescopic rod assemblies. The stepper motor was connected to the shaft through a coupling to simulate the rotation of the drilling tool during downhole drilling measurement. The vibrating motor was used to simulate the strong vibration conditions experienced in the drilling process of a downhole drilling rig.
This system was designed to collect the information of accelerometers, gyroscopes, and magnetometers by FPGA with a sampling frequency of 1 MHz. The MCU was used to complete the filtering and correction of the signals as well as the attitude calculation. Considering the large amount of data collected by the FPGA and the low frequency of the attitude angle change in actual downhole working conditions, the data were sampled according to a ratio of 10,000:1, and the new sampling rate was 100 Hz.

5.2. Verification of Cross-Correlation Extraction

Through the analysis of the magnetic field interference, a non-interference magnetic field signal should be a circle with a fixed radius around the origin of the coordinate. For the ellipse fitting of the magnetometer, the correction effect was judged by determining whether the corrected graph was a square circle, whether the center position was at the origin of the coordinate, and whether the radius was changed. The influence of the ellipse correction on the X-axis and Y-axis data of the magnetometer is shown in Figure 6.
Extracting the gravitational acceleration signal using the cross-correlation method is the key to improving the accuracy of the attitude calculation. Figure 7 shows the output signal of the accelerometer, which contains various noises. The results of the gravitational acceleration signal after error compensation and cross-correlation extraction are shown in Figure 8, and its three-axis average signal-to-noise ratio is 34.2654. It can be seen that the extracted X-axis and Y-axis gravitational acceleration signals were periodic and basically noiseless, and the Z-axis gravitational acceleration signal was relatively smooth, which proves that the proposed error compensation and mutual correlation extraction method is effective.

5.3. Results and Analysis

In the experiments, the inclination angle was set to 45°, the azimuth angle was set to 1°, and the rotation speed was set to 1.5 rps. These values were chosen because in practice, the inclination angle usually varies from 0° to 180°, the azimuth angle varies from 0° to 360°, and the rotational speed of drilling tools is usually in the range of 1–6 rps.
The UKF algorithm is a commonly employed method to enhance the accuracy of attitude calculation. In order to evaluate the effectiveness of the ASRUKF algorithm proposed in this paper, the calculation results of the ASRUKF algorithm were compared with those of the UKF algorithm, as shown in Figure 9 and Figure 10. The inclination angle fluctuation range is approximately ±0.5° for the ASRUKF algorithm and ±0.6° for the UKF algorithm. The azimuth angle fluctuation range is approximately ±1.5° for the ASRUKF algorithm and ±2° for the UKF algorithm.
From the calculation results, it can be seen that the ASRUKF algorithm proposed in this paper was more effective. In order to evaluate the effectiveness of the ASRUKF algorithm proposed in this paper more accurately, we compared the calculation results of the ASRUKF and UKF algorithms in terms of the root mean square error (RMSE) and variance, as shown in Table 1.
Table 1 shows the root mean square error (RMSE) and variance of the attitude calculation for the ASRUKF and UKF algorithms. From Table 1, it can be seen that compared with the UKF algorithm, the RMSE of the inclination angle calculated by the ASRUKF algorithm was reduced by 12.9%, and the variance was reduced by 27.3%; the RMSE of the azimuth angle was reduced by 29.5%, and the variance was reduced by 39.9%. It can be seen that compared with the UKF algorithm, the ASRUKF algorithm proposed in this paper had better results in the attitude calculation of drilling tools, and the ASRUKF algorithm improved the accuracy of azimuth calculation better than the well inclination angle. It also proved the effectiveness of the error compensation and mutual correlation extraction methods adopted in this paper. And, the information fusion could effectively reduce the influence of external uncertainty interference on the attitude calculation error, give full play to the importance of the advantages of each sensor, and realize the complementary advantages after data acquisition.
In order to further verify the accuracy and stability of the attitude calculation method proposed in this paper, the changes in the inclination angle and azimuth angle were used to simulate different measurement conditions to evaluate the performance of the method. The inclination angle was adjusted to 10°, 30°, 45°, and 60°, the azimuth angle was set to 0° and 135°, and the speed was 1 rps. Figure 9 and Figure 10 show the absolute errors of the method proposed in this paper for calculating the deviation angle and azimuth angle at different angles.
It can be seen from Figure 11 and Figure 12 that the absolute error of the calculation results of the proposed method was maintained at the same order of magnitude under different drilling tool attitudes, which indicates the stability of the method for drilling tool attitude calculation.

6. Conclusions

In this paper, a drilling tool attitude calculation method combining cross-correlation extraction and the ASRUKF algorithm is proposed. After error compensation of the drilling tool attitude sensor, the effective gravitational acceleration is obtained by cross-correlation extraction, and the drilling tool attitude is calculated by the ASRUKF algorithm. Through an experimental platform using a fully rotating attitude calculation system, the attitude data of the drilling tool were obtained, and an attitude calculation test of the drilling tool was carried out by using the method proposed in this paper and by comparing it with the UKF algorithm. The experimental results show that the proposed method is superior to the UKF algorithm and can steadily improve the accuracy of drilling tool attitude calculation.
However, there are still some shortcomings in this study. The current proposed attitude calculation method is not comprehensive enough to consider error factors, the developed attitude calculation system compensates for the error based on the experimental platform built independently, there is a gap between the considered error interference and the actual interference, and the actual interference has uncertainty and randomness. The model can be applied to actual working conditions in follow-up work to add more error sources to compensate the model and improve the system’s performance.

Author Contributions

Conceptualization, L.Q., M.S. and W.W.; writing, W.W.; methodology, M.S.; software, Y.L.; validation, W.W. and P.T. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Sichuan Science and Technology Program, grant number 2022YFQ0062 and the scientific research starting project of SWPU, grant number 2021QHZ011.

Data Availability Statement

The original data are not publicly available but can be used for scientific research. Researchers should email the corresponding author if needed.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Yang, Y.; Li, F.; Gao, Y.; Mao, Y. Multi-Sensor Combined Measurement While Drilling Based on the Improved Adaptive Fading Square Root Unscented Kalman Filter. Sensors 2020, 20, 1897. [Google Scholar] [CrossRef] [PubMed]
  2. Zhang, P.; Wang, W.; Gao, M.; Wang, Y. Research on error compensation in the process of geomagnetic sensor measurement. Int. J. Distrib. Sens. Netw. 2021, 17, 15501477211019911. [Google Scholar]
  3. Zhang, C.; Lin, G.; Chen, Z. Research on Attitude Calculation Based on MEMS Sensor. J. Phys. Conf. Ser. 2023, 2450, 012078. [Google Scholar] [CrossRef]
  4. Zhang, W.X.; Chen, W.X.; Di, Q.Y.; Sun, Y.T.; Yang, Y.Y.; Zheng, J. An investigation of the extraction method of gravitational acceleration signal for at-bit dynamic inclination measurement. Chin. J. Geophys. 2017, 60, 4174–4183. [Google Scholar]
  5. Liu, X.; Liu, X.; Zhang, W.; Yang, Y. UAV attitude calculation algorithm based on acceleration correction model. J. Northwest. Polytech. Univ. 2021, 39, 175–181. [Google Scholar] [CrossRef]
  6. Noordin, A.; Basri, M.A.M.; Mohamed, Z. Sensor Fusion Algorithm by Complementary Filter for Attitude Estimation of Quadrotor with Low-cost IMU. Telkomnika 2018, 16, 868–875. [Google Scholar] [CrossRef]
  7. Bin, H.; Zhongping, F.; Yilin, X.; Meng, W.; Yu, L.; Can, T.; Wei, W.; Hang, X. Attitude Calculation of Quadrotor UAV Based on Extended Kalman Filter and Complementary Filter. J. Phys. Conf. Ser. 2023, 2460, 012149. [Google Scholar] [CrossRef]
  8. Rong, H.; Peng, C.; Chen, Y.; Lv, J.; Zou, L. An EKF-Based Attitude Estimator for Eliminating the Effect of Magnetometer Measurements on Pitch and Roll Angles. IEEE Trans. Instrum. Meas. 2023, 72, 1–10. [Google Scholar] [CrossRef]
  9. Pang, H.; Pan, M.; Chen, D. Error calibration of three axis magnetometer based on UKF and equipment. Chin. J. Sci. Instrum. 2012, 33, 1800–1805. [Google Scholar]
  10. Xu, B.; Yang, Q.; Jiang, H. Improved unscented Kalman filtering method for colored noises of rotary steerable system. J. China Univ. Pet. 2015, 39, 157–163. [Google Scholar]
  11. Sui, L.; Mou, Z.; Gan, Y.; Huang, X. Unscented Kalman Filter Algorithm with Colored Noise and Its Application in Spacecraft Attitude Estimation. Int. Assoc. Geod. Symp. 2015, 140, 95–100. [Google Scholar]
  12. Han, D.; Sun, W.; Chen, L. An adaptive extraction algorithm of gravity acceleration in MWD. Chin. J. Sci. Instrum. 2022, 43, 17–25. [Google Scholar]
  13. Guo, Y.; Zhang, M.; Kang, F.; Yang, W.; Zhou, Y. Multi-sensor Data Fusion Using Adaptive Kalman Filter. Lect. Notes Electr. Eng. 2022, 571, 2314–2320. [Google Scholar]
  14. Shen, Y.; Sun, Z.; Shen, Y.; Zhang, D.; Qian, P.; Liu, H. UKF Two-stage Estimation Algorithm for Heading and Attitude of Linear Plant Protection UAV. Trans. Chin. Soc. Agric. Mach. 2022, 53, 151–159. [Google Scholar]
  15. Chen, G.; Fan, Z.; Wei, Z.; Li, W.; Zhang, L. An attitude calculation algorithm based on WNN-EKF. J. Meas. Sci. Instrum. 2022, 13, 138–146. [Google Scholar] [CrossRef]
  16. Gao, Y.; Li, F.; Chen, J. Random Weighting Adaptive Estimation of Model Errors on Attitude Measurement for Rotary Steerable System. IEEE Access 2022, 10, 80794–80803. [Google Scholar] [CrossRef]
Figure 1. Attitude angle diagram.
Figure 1. Attitude angle diagram.
Electronics 13 01707 g001
Figure 2. Magnetic field distortion curve. (a) Non-interference; (b) hard magnetic distortion; (c) soft magnetic distortion.
Figure 2. Magnetic field distortion curve. (a) Non-interference; (b) hard magnetic distortion; (c) soft magnetic distortion.
Electronics 13 01707 g002
Figure 3. Schematic diagram of accelerometer force during rotation.
Figure 3. Schematic diagram of accelerometer force during rotation.
Electronics 13 01707 g003
Figure 4. Diagram of ASRUKF attitude calculation algorithm.
Figure 4. Diagram of ASRUKF attitude calculation algorithm.
Electronics 13 01707 g004
Figure 5. Experiment platform.
Figure 5. Experiment platform.
Electronics 13 01707 g005
Figure 6. Calibration result.
Figure 6. Calibration result.
Electronics 13 01707 g006
Figure 7. Original output.
Figure 7. Original output.
Electronics 13 01707 g007
Figure 8. Extraction results of gravitational acceleration.
Figure 8. Extraction results of gravitational acceleration.
Electronics 13 01707 g008
Figure 9. Comparison of inclination angle calculation results.
Figure 9. Comparison of inclination angle calculation results.
Electronics 13 01707 g009
Figure 10. Comparison of azimuth angle calculation results.
Figure 10. Comparison of azimuth angle calculation results.
Electronics 13 01707 g010
Figure 11. Absolute error of inclination angle at 1 rps.
Figure 11. Absolute error of inclination angle at 1 rps.
Electronics 13 01707 g011
Figure 12. Absolute error of azimuth angle at 1 rps.
Figure 12. Absolute error of azimuth angle at 1 rps.
Electronics 13 01707 g012
Table 1. Comparison of RMSE and variance of UKF and ASRUKF algorithms.
Table 1. Comparison of RMSE and variance of UKF and ASRUKF algorithms.
Attitude Angle (/°)ASRUKFUKF
RMSEVarianceRMSEVariance
Inclination angle0.23370.03840.26840.0528
Azimuth angle0.59300.20380.84170.3392
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Qin, L.; Wang, W.; Shi, M.; Liang, Y.; Tan, P. Attitude Calculation Method of Drilling Tools Based on Cross-Correlation Extraction and ASRUKF. Electronics 2024, 13, 1707. https://doi.org/10.3390/electronics13091707

AMA Style

Qin L, Wang W, Shi M, Liang Y, Tan P. Attitude Calculation Method of Drilling Tools Based on Cross-Correlation Extraction and ASRUKF. Electronics. 2024; 13(9):1707. https://doi.org/10.3390/electronics13091707

Chicago/Turabian Style

Qin, Liansheng, Wenzhuo Wang, Mingjiang Shi, Yanbing Liang, and Peipei Tan. 2024. "Attitude Calculation Method of Drilling Tools Based on Cross-Correlation Extraction and ASRUKF" Electronics 13, no. 9: 1707. https://doi.org/10.3390/electronics13091707

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop