A drilling tool gravity acceleration extraction method based on complementary filtering

By using a combination of complementary filtering and fuzzy algorithms in the drilling tool measurement system, the problem of measurement errors caused by drilling tool vibration is solved, real-time gravity acceleration extraction and attitude calculation are realized on the microcontroller, and the accuracy of drilling is improved. and efficiency.

CN114676552BActive Publication Date: 2024-10-08XIDIAN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210103011.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2024-10-08
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

In the existing technology, measurement errors caused by vibration of drilling tools during the construction of underground coal mines cause the drilling to deviate from the designed direction. Moreover, the gravity acceleration extraction algorithm based on Kalman filter is computationally intensive and difficult to run in real time on a single-chip microcomputer.

Method used

A method based on complementary filtering is used to fuse gyroscope and accelerometer data, and the complementary filter parameters are dynamically adjusted through fuzzy algorithms to extract the gravity acceleration signal, improve the accuracy and stability of attitude calculation, and realize real-time calculation on the microcontroller.

Benefits of technology

It effectively improves the accuracy and stability of the drilling tool attitude angle, reduces the running time on the microcontroller, and has good engineering application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114676552B_ABST
    Figure CN114676552B_ABST
Patent Text Reader

Abstract

The present invention provides a method for extracting gravity acceleration of drilling tools based on complementary filtering. First, the recursive equation of gravity acceleration based on gyroscope is obtained through cosine matrix differential equation. Then, the complementary characteristics of gyroscope and accelerometer in frequency are used to fuse the gravity acceleration of drilling tools under the complementary filtering framework. At the same time, in order to improve the robustness of the system, non-gravity acceleration and drilling tool rotation speed are used as fuzzy algorithm inputs, and complementary filtering parameters are dynamically adjusted through the fuzzy algorithm. The gravity acceleration extraction method solves the problem that the high-speed rotation, severe vibration and impact of the drilling tool in the rotary steerable drilling process bring huge interference to the drilling attitude measurement.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The invention relates to a method for extracting gravity acceleration, in particular to a method for extracting gravity acceleration of a drilling tool based on complementary filtering. [Background technology]

[0002] During the underground drilling construction of coal mines, due to changes in the occurrence of coal and rock formations, construction technology and other reasons, the actual drilling will deviate from the original design direction, causing safety hazards. Measurement while drilling (MWD) continuously detects the attitude information of the drill bit during the drilling process to guide the drill bit to drill in the designed direction and realize real-time adjustment of the drilling tool trajectory. At present, the commonly used while drilling attitude measurement system generally adopts a combination of magnetometers and accelerometers. This method has a simple measurement principle, but the vibration of the drill tool will cause huge measurement errors. Usually, the drilling rig needs to be stopped before measurement. Using this measurement method not only affects the drilling efficiency, but also because the distance between adjacent measurement points is too large, the drill bit adjustment cycle becomes longer, which causes the wellbore trajectory to deviate from the designed trajectory. The wellbore trajectory between each measurement point can only be calculated by mathematical methods, so it is impossible to obtain an accurate wellbore trajectory.

[0003] In view of the fact that traditional measurement while drilling tools cannot overcome the problems of vibration and impact of bottom drilling tools during operation, the current mainstream research idea is to first extract gravity acceleration information from the accelerometer and then perform attitude solution. There are two main research ideas for extracting gravity acceleration information. One is to distinguish gravity acceleration information from non-gravity acceleration information caused by vibration, impact, etc. by using the characteristic differences in frequency domain and time domain. In this type of method, MushfiqulAlam et al. used the wavelet threshold method to reconstruct the gravity information in the accelerometer and proposed a variable bandwidth accelerometer adaptive filtering method. The sine-based gravity acceleration information band estimation method is used to continuously adjust the filter bandwidth and pre-filter the vibration signal noise outside the signal band. However, this method requires the separation of the vibration acceleration band and the gravity acceleration band, and the selection of wavelet basis functions is also difficult. Yang H and Luo T et al. proposed to use empirical mode decomposition to filter out the high-frequency components of the sensor based on wavelet denoising, and then reconstruct it using wavelets. Zhang Wenxiu et al. took advantage of the fact that gravity acceleration and vibration signals are uncorrelated in the time domain and proposed a gravity acceleration signal extraction method based on cross-correlation detection. However, this method needs to assume that vibration and impact acceleration are random signals, and the selection of reference signals is relatively difficult, and it is not adaptable to the working environment.

[0004] The other is based on the idea of ​​multi-sensor fusion. For example, Gabriele Ligorio et al. used the gravity acceleration recursion equation based on the gyroscope and the Gaussian Markov model of non-gravitational acceleration as the prediction equation, and used the accelerometer signal as the observation quantity, and obtained the gravity acceleration information by fusing it in the Kalman filter framework; Yang Y and Li F et al. proposed an adaptive attenuated square root unscented Kalman filter method, which introduced an attenuation factor in the UKF, adjusted the filter gain in real time, and effectively decoupled the vibration signal of the accelerometer. However, this algorithm has many restrictions and requires that the noise of the drilling tool meets the Gaussian distribution when working. Yang J et al. established the prediction equation of gravity acceleration based on the Coriolis equation. In order to further improve the robustness of the system, Yang Jinxian et al. selected the gravity acceleration recursion equation based on the gyroscope as the main filter, and the gravity acceleration based on the accelerometer and magnetometer observations as the sub-filter, and obtained the gravity acceleration information in the federated Kalman fusion framework. However, since the gravity acceleration extraction module is only a data preprocessing module in the measurement while drilling system, and due to the power limitation of electronic equipment underground, the microcontroller cannot provide sufficient computing power. The gravity acceleration extraction algorithm based on the Kalman filter framework has a large amount of calculation and is difficult to run on embedded devices. [Summary of the invention]

[0005] In order to solve the above problems, the present invention aims at the problem that the signal processing algorithm based on signal feature difference cannot effectively extract gravity acceleration, and the multi-sensor fusion algorithm based on Kalman filter is difficult to calculate in real time. A drilling tool gravity acceleration extraction method based on complementary filtering is provided. The complementary filter is used to fuse the data of the gyroscope and the accelerometer to filter out the vibration acceleration interference near the drill bit. At the same time, in order to improve the adaptability to different motion states of the drilling tool, a fuzzy algorithm is introduced to dynamically adjust the complementary filter parameters. The state of the drilling tool is comprehensively judged by the fuzzy algorithm, and the cutoff frequency of the complementary filter is dynamically adjusted. The gravity acceleration signal extracted by the method is used for attitude solution, which can effectively improve the accuracy and stability of the attitude angle. The running time on the single-chip microcomputer is only 0.8496ms, which is conducive to ensuring the real-time performance of the attitude solution and has good engineering application value.

[0006] The present invention is implemented by the following technical scheme, and provides a drilling tool gravity acceleration extraction method based on complementary filtering, comprising the following steps:

[0007] S1 builds a coordinate system;

[0008] S2 constructs the recursive equation of gravity acceleration;

[0009] S3 builds a complementary filtering model;

[0010] S4 calculates the adaptive coefficient based on the fuzzy algorithm;

[0011] S5 constructs a complementary filtering model based on S3 and the adaptive coefficient calculated by S4, and combines the gravity acceleration recursion equation of S2 to obtain the gravity acceleration.

[0012] In particular, the S1 is implemented according to the following scheme:

[0013] Select the right-hand rectangular coordinate system composed of the geographic coordinate system in the order of north and east as the navigation coordinate system, and use OX n Y n Z n Indicates that X n Pointing north, Y n Pointing east, Z n Point to the center of the earth; establish the drilling tool coordinate system with the three basic axes of the drilling tool, and use OX b Y b Z b Indicates that X b Coincident with the drilling tool axis, Y b and Z b They are perpendicular to each other and the plane they form is perpendicular to the axis of the drill bit; in the geographic coordinate system, the well inclination angle θ is the angle between the drilling axis Xb of the drill bit and the horizontal plane, which is positive downward and negative vice versa. The tool face angle γ is the angle from the high side of the borehole to Yb in the cross section of the borehole, where θ∈(-90°, 90°) and γ∈(-180°, 180°).

[0014] In particular, the S2 is implemented according to the following scheme:

[0015] S21 According to the coordinate system, the attitude rotation matrix from the n system to the b system is The rotation matrix changes with time, and its changing law is described by a differential equation. The differential equation of the rotation matrix is ​​as follows:

[0016]

[0017] In formula (1), b ω× is the angular velocity vector of the drilling tool coordinate system relative to the navigation coordinate system The antisymmetric matrix is ​​calculated as follows:

[0018]

[0019] S22 Assume [t k-1 ,t k ] The gyro output angle increment in the time period is Then the homogeneous linear solution of the differential equation of formula (1) is as follows:

[0020]

[0021] Multiply both sides of formula (3) by the gravitational acceleration in the navigation coordinate system n g=[00-g0] T , the recursive equation of gravitational acceleration under the load system is as follows:

[0022]

[0023] S23 introduces a single sample + the equivalent rotation vector of the previous cycle to compensate for the non-commutative error, and the recursive equation of gravity acceleration is obtained as follows:

[0024]

[0025] In formula (5), Φ k is the equivalent rotation vector, the angular increment ΔΘ k =ΔT·[ b ω k ×].

[0026] In particular, the S3 is implemented in accordance with the following scheme:

[0027] S31 builds the measurement model of the gyroscope and accelerometer:

[0028]

[0029] In formula (6), b y k is the gyroscope measurement, b ω t,k is the actual angular velocity of the gyroscope at time k, b ω b,k is the gyroscope bias, η g is the low-frequency noise of the gyroscope; b f k is the accelerometer measurement, b a k is the gravitational acceleration of the carrier, η a is the high frequency noise of the accelerometer;

[0030] S32 constructs a complementary filter {L(s) H(s)} by using low-pass and high-pass filters. High Pass Filter The accelerometer is filtered using a high-pass filter H(s), and the gyroscope is filtered using a low-pass filter L(s), thus obtaining a complementary filter model.

[0031] In particular, the complementary filter model is adjusted using a proportional-integral controller. where k p The size of the complementary filter determines the cutoff frequency. pThe smaller the k, the greater the effect of the gyroscope. p The larger the value, the greater the role of the accelerometer. i is the reciprocal of the integration time constant.

[0032] In particular, the S4 is implemented according to the following scheme:

[0033] S41 uses accelerometer to measure values b f k Subtracting the gravitational acceleration derived from the gyroscope measurement value through equation (5) yields the non-gravitational acceleration as follows:

[0034]

[0035] Define a non-gravitational acceleration sliding window of length n, and take the maximum value of the sliding window as the amplitude of the non-gravitational acceleration vib as follows:

[0036] vib k =max i∈[k,k-n-1] (f non_gravity,i ) (8);

[0037] S42 uses the angular velocity on the rotating shaft as the rotating angular velocity of the drilling tool after passing it through a low-pass filter. The rotating velocity rot is calculated according to the following formula:

[0038] Rot k =α b y x(k) +(1-α) b y x(k-1) (9);

[0039] S43 designs fuzzy algorithms.

[0040] In particular, the S43 is implemented according to the following scheme:

[0041] S431 Input Fuzzification:

[0042] Assume that the fuzzy subsets of the fuzzy quantities of non-gravitational acceleration vib and rotational velocity rot are all {S, M, L}, where S, M, and L represent small, medium, and large, respectively. p The fuzzy subset is set to {NM, NS, Z, PS, PM}, where NM, NS, Z, PS, and PM represent negative large, negative small, zero, positive small, and positive large, respectively. Through experiments, vib, rot, and Δk are obtained. p The corresponding fuzzy domain is:

[0043]

[0044] Select the membership function to fuzzify the input quantity, and obtain the input fuzzy quantity and the membership degree to which the fuzzy quantity belongs;

[0045] S432 establishes a fuzzy rule table and fuzzy reasoning, wherein the fuzzy rule table is set according to the following principles:

[0046] When vib is small, increase Δk p To increase confidence in the accelerometer, when both rot and vib are large, reduce Δk p To increase trust in the gyroscope;

[0047] The rules of the fuzzy reasoning are:

[0048] If(vib is Vib)and(rot is Rot)then(Δk p is Kp);

[0049] S433 Defuzzification

[0050] Use the centroid method to defuzzify the result after fuzzy inference and get the compensation value Δk of the complementary filter parameter. p , which is calculated as follows:

[0051]

[0052] In formula (11), Δkp i is the fuzzy quantity obtained through fuzzy reasoning, Δkp i ∈Kp,μ Kp is the membership function.

[0053] The present invention provides a method for extracting gravity acceleration of drilling tools based on complementary filtering, which uses the rotation speed of the drilling tools and the amplitude of non-gravitational acceleration as fuzzy algorithm inputs, comprehensively judges the state of the drilling tools through the fuzzy algorithm, and dynamically adjusts the cutoff frequency of the complementary filter. The problem that the accelerometer cannot measure the real gravity component of the drilling tools due to high-speed rotation and severe vibration during the dynamic attitude measurement of the drill bit downhole is solved. The attitude solution using the gravity acceleration signal extracted by the method can effectively improve the accuracy and stability of the attitude angle, and the method has good real-time performance, and the running time on the single-chip microcomputer is only 0.8496ms, which is conducive to ensuring the real-time performance of the attitude solution, and therefore has good engineering application value.

Brief Description of the Drawings

[0054] Figure 1 The sensor and coordinate system of the measurement while drilling system of the present invention;

[0055] Figure 2 is the triangular fuzzy membership function of the present invention;

[0056] Figure 3 It is a flowchart of the present invention;

[0057] Figure 4 To extract the comparison diagram of well inclination angle / tool ​​face angle before and after gravity;

[0058] Figure 5 This is a comparison chart of different gravity extraction algorithms in vibration experiments;

[0059] Figure 6 This is a diagram of the gravity signal attitude solution of different algorithms in the vibration experiment. [Specific implementation method]

[0060] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below.

[0061] See also Figure 1-Figure 6 The present invention provides a drilling tool gravity acceleration extraction method based on complementary filtering, which utilizes the complementary characteristics of the accelerometer and the gyroscope in the frequency domain, and uses a complementary filter to fuse the data of the two to filter out the vibration acceleration interference near the drill bit. At the same time, in order to improve the adaptability to different motion states of the drilling tool, a fuzzy algorithm is introduced to dynamically adjust the complementary filter parameters. Specifically, the following steps are included:

[0062] S1 builds the coordinate system

[0063] like Figure 1 , select the right-hand rectangular coordinate system composed of the geographic coordinate system in the order of "North East" as the navigation coordinate system (n system), which uses OX n Y n Z n Indicates that X n Pointing north, Y n Pointing east, Z n Point to the center of the earth; establish the drilling tool coordinate system (b system) with the three basic axes of the drilling tool, and use OX b Y b Z b Indicates that X b Coincident with the drilling tool axis, Y b and Z b They are perpendicular to each other and the plane they form is perpendicular to the axis of the drilling tool.

[0064] The three basic parameters in the measurement while drilling are the well inclination angle, azimuth angle and tool face angle, among which the well inclination angle θ (θ∈(-90°, 90°)) is the angle between the drilling axis Xb of the drill bit and the horizontal plane, which is defined as positive downward and negative vice versa; the tool face angle γ (γ∈(-180°, 180°)) is the angle from the high side of the borehole to Yb in the cross section of the borehole; the azimuth angle φ (φ∈(0°, 360°)) is the angle between the projection of the drill bit on the horizontal plane and the Xn axis of the navigation system; since the azimuth angle cannot be directly calculated by the gravitational acceleration, the present invention only focuses on the well inclination angle and the tool face angle.

[0065] S2 gravity acceleration extraction algorithm

[0066] Under the definition of S1 coordinate system, let the attitude rotation matrix from n system to b system be The rotation matrix changes with time, and its changing law is expressed by the following differential equation:

[0067] The differential equation for the rotation matrix is:

[0068]

[0069] in b ω× is the angular velocity vector of the drilling tool coordinate system relative to the navigation coordinate system The antisymmetric matrix formed is expressed by the following formula:

[0070]

[0071] Assume [t k-1 ,t k ] The gyro output angle increment in the time period is The homogeneous linear solution of the differential equation of formula (1) is:

[0072]

[0073] Multiply both sides of formula (3) by the gravitational acceleration in the navigation system (n system) n g=[00-g0] T , the recursive equation of gravitational acceleration under the load system is as follows:

[0074]

[0075] Since the rotation and vibration during drilling will put the drill in a highly dynamic environment, the drill does not satisfy the assumption of fixed axis rotation. If we directly assume that the angular increment ΔΘ k ≈ΔT·[ b ω k ×], and then discretize equation (4), which will introduce non-commutative errors and reduce the accuracy of gravity acceleration calculation. Therefore, a single sample + equivalent rotation vector of the previous cycle is introduced here to compensate for the non-commutative error, and the gravity acceleration recursive equation is obtained as follows:

[0076]

[0077] In formula (5), Φ k is the equivalent rotation vector, the angular increment ΔΘ k =ΔT·[ b ω k ×].

[0078] S3 builds Mahony complementary filter model

[0079] Substituting the gyroscope measurement value into formula (5), the gravity acceleration of the drill can be deduced. This method has good dynamic response characteristics, strong adaptability to external interference, and little impact from vibration, but the process requires continuous integration, which will amplify the low-frequency error of the gyroscope. The method of directly using the accelerometer to measure has a good static response, but when the carrier accelerates or decelerates, motion acceleration will be introduced. The dynamic characteristics correspond to high frequencies, and the static characteristics correspond to low frequencies. These two methods complement each other in frequency. The present invention uses a complementary filtering algorithm to integrate the measurement advantages of these two methods.

[0080] S31 builds the measurement model of the gyroscope and accelerometer:

[0081]

[0082] In formula (6), b y k is the gyroscope measurement, b ω t,k is the actual angular velocity of the gyroscope at time k, b ω b,k is the gyroscope bias, η g is the low-frequency noise of the gyroscope; b f k is the accelerometer measurement, b a k is the gravitational acceleration of the carrier, η a is the high frequency noise of the accelerometer;

[0083] S32 constructs a complementary filter {L(s) H(s)} by using low-pass and high-pass filters. High Pass Filter The complementary filter model can be obtained by filtering the accelerometer with a high-pass filter H(s) and filtering the gyroscope with a low-pass filter L(s). In this model, the complementary filter is adjusted using a proportional-integral controller. where k p The size of the complementary filter determines the cutoff frequency. p The smaller the k, the greater the effect of the gyroscope. p The larger the k, the greater the role of the accelerometer; i It is the reciprocal of the integral time constant. The introduction of the integral link is to eliminate the zero bias in the gyroscope.

[0084] S4 adaptive coefficient based on fuzzy algorithm

[0085] Since the motion state of the drilling tool is relatively complex, the change of its motion state will affect the noise distribution of the sensor. a It includes the motion acceleration caused by vibration and rotation, and the change of the rotation speed of the drill bit will change the frequency distribution of the noise in the accelerometer, so a single preset parameter cannot make the filter estimation result optimal.

[0086] In actual work, the movement of the drill bit does not affect the zero bias of the gyroscope. b ω b,k Caused too much impact, so k i Preset to a constant, through k p The dynamic adjustment of the drill tool can realize the self-adaptation to the motion state of the drill tool. The rotation speed of the drill tool will affect the frequency of the non-gravity acceleration. The faster the rotation speed, the greater the frequency of the non-gravity acceleration. However, when the drill bit is unloaded, the vibration acceleration has little effect. Therefore, the amplitude of the non-gravity acceleration detected by the sensor is introduced to comprehensively judge the motion state of the drill tool. Based on this, in order to improve the adaptability of the algorithm to the motion state of the drill tool, the present invention continuously detects the amplitude of the non-gravity acceleration vib and the rotation speed rot of the drill tool through a fuzzy algorithm, and uses the fuzzy rule table to online adjust the k of the complementary filter. p The parameters are adjusted to define Δk p is the output of the fuzzy algorithm.

[0087] S41 Non-gravitational acceleration calculation

[0088] Using accelerometer measurements b f k Subtract the gravitational acceleration from the gyroscope measurement value obtained by equation (5) The non-gravitational acceleration is obtained as:

[0089]

[0090] Define a non-gravitational acceleration sliding window of length n, and take the maximum value of the sliding window as the amplitude of the non-gravitational acceleration:

[0091] vib k =max i∈[k,k-n-1] (f non_gravity,i ) (8).

[0092] S42 rotation speed calculation

[0093] The angular velocity on the rotating shaft is passed through a low-pass filter as the rotational angular velocity of the drilling tool:

[0094] Rot k =α b y x(k) +(1-α) b y x(k-1)(9).

[0095] S43 fuzzy algorithm design

[0096] (1) Fuzzification of input quantity

[0097] Assume that the fuzzy subsets of the fuzzy quantities of non-gravitational acceleration vib and rotation speed rot are all {S, M, L}, where S, M, and L represent small, medium, and large, respectively; the output Δk of the fuzzy algorithm is p The fuzzy subset is set to {NM, NS, Z, PS, PM}, where NM, NS, Z, PS, and PM represent negative large, negative small, zero, positive small, and positive large, respectively. The vib, rot, and Δk are determined by experiments. p The corresponding fuzzy domain is:

[0098]

[0099] Selection Figure 2 The triangular function shown is used as the membership function, using Figure 2 (a) and Figure 2 The membership function of (b) fuzzifies the input quantity, that is, obtains the fuzzy quantity of the input and the membership degree to which the fuzzy quantity belongs.

[0100] (2) Establishing fuzzy rules and fuzzy reasoning

[0101] The basic principle of setting the rule table is: when vib is small, increase Δk p To increase the trust in the accelerometer; when rot and vib are both large, reduce Δk p To increase the trust in the gyroscope; combined with experimental analysis, the fuzzy rules finally formulated are shown in Table 1.

[0102] Table 1 Fuzzy rules table

[0103]

[0104] In fuzzy reasoning, it is assumed that the weight of each rule in the fuzzy rule table is equal, and the rule with the smallest membership degree is selected as Δkp in the And calculation. i The membership degree of , the rule of fuzzy reasoning is:

[0105] If(vib is Vib)and(rot is Rot)then(Δk p is Kp)

[0106] (3) Defuzzification

[0107] Use the centroid method to defuzzify the result after fuzzy inference and get the compensation value Δk of the complementary filter parameter. p , as follows:

[0108]

[0109] In formula (11), Δkp i is the fuzzy quantity obtained through fuzzy reasoning, Δkp i ∈Kp,μ Kp correspond Figure 2 (c) The membership function of

[0110] In summary, the overall block diagram of the gravity acceleration extraction algorithm proposed in the present invention is as follows: Figure 3 As shown, is the recursive gravitational acceleration obtained by formula (5), Used with b f k Do the cross product to calculate the error vector b e g(k) , It is the filtered gravity acceleration vector obtained by recursively calculating the corrected gyroscope value through formula (5).

[0111] In order to verify the feasibility of the method described in the present invention, the accuracy of the method described in the present invention is tested by a rotation experiment, and the stability of the method described in the present invention is tested by a vibration experiment. During the experiment, the sensor module was placed on a rotation test bench and a vibration test bench respectively, and the MTI-3-8A7G6T module of XSENS was selected to record the original signals of the accelerometer and gyroscope in the sensor module. The sampling frequency of the sensor module was 100HZ. After that, the original signal of the sensor was imported into Matlab for analysis and experiment.

[0112] 1. Rotation Experiment

[0113] The rotation experiment uses the y-axis of the sensor module as the rotation axis, and fixes the sensor parallel to the rotating table. The rotation speed of the rotating table is adjusted to 163rpm / min, and the experimental time is 1 minute and 20 seconds. The output values ​​of the accelerometer and gyroscope are recorded, and the method algorithm provided by the present invention is run to extract the gravity acceleration signal. The extracted gravity acceleration is used to solve the well inclination angle and tool face angle. This experiment compares the use of extracted gravity acceleration and non-extracted gravity acceleration in combination with gyroscope signals to solve the well inclination angle and tool face angle. The attitude solution method uses the EKF algorithm based on the cosine matrix. The comparison results are shown as follows: Figure 4 shown.

[0114] Depend on Figure 4It can be seen from the well inclination angle in the upper figure that when the well inclination angle is always equal to 0° as the benchmark, the well inclination angle error without extracting gravity acceleration is about 3.5°, and the well inclination angle error after extracting gravity acceleration is within 1.0°, and the error is significantly reduced. It can be seen from the tool face angle in the lower figure that the tool face angle calculated before and after extracting gravity acceleration maintains a high degree of overlap in phase, and there is no data calculation lag due to the introduction of the gravity extraction algorithm. It can be seen that after the gravity acceleration signal is extracted by the present invention, the calculated well inclination angle has a significantly smaller fluctuation range than the well inclination angle calculated by the original acceleration signal, and is closer to the angle under actual test conditions.

[0115] 2. Vibration test

[0116] In the vibration experiment, the sensor's well inclination angle was controlled to -7.4°, and the tool face angle was controlled to 0°. The vibration amplitude was set to 5 times the gravity acceleration, and the vibration frequency of the vibration table was set to increase from 10 Hz to 200 Hz, and then decrease from 200 Hz to 10 Hz. The vibration time was 5 minutes and 32 seconds. The original signals of the accelerometer and gyroscope were recorded. On the vibration table, the gravity components of the three axes of the module were respectively a constant. The present invention and the comparison algorithm (gravity acceleration extraction algorithm of the Kalman framework) were run for each axis. The comparison results are shown as follows: Figure 5 As shown, the vibration frequency of the vibration table is 13HZ at this time.

[0117] Depend on Figure 5 It can be seen that although both the present invention and the gravity acceleration extraction algorithm based on Kalman can effectively extract gravity acceleration information from the original signal containing a large amount of vibration acceleration, compared with the gravity acceleration extraction algorithm based on Kalman, the gravity acceleration signal extracted by the present invention is more stable.

[0118] In order to further verify the stability of gravity acceleration extraction, the sensor module z-axis is kept upward, the well inclination angle is -7.4°, and the tool face angle is 0°. The well inclination angle and tool face angle are calculated using the original accelerometer signal, the gravity acceleration signal extracted by the invention, and the gravity acceleration signal extracted by Kalman filtering combined with the original gyroscope signal. The calculated attitude angle comparison results are shown in Figure 2. Figure 6 shown.

[0119] During the vibration process, the module's posture does not change, so the calculated module posture should always maintain a well inclination of -7.4° and a tool face angle of 0°. Figure 6It can be seen that within a period of 100 sampling points (1 second), the well inclination angle calculated using the original signal of the accelerometer drifted by 0.3°, the well inclination angle calculated using the gravity acceleration after Kalman filtering drifted by more than 0.05°, and the well inclination angle calculated using the gravity acceleration extracted by the present invention had basically no drift, which shows that the well inclination angle calculated by the present invention is more stable than that calculated by the Kalman algorithm. As for the tool face angle, the drift calculated using the original signal of the accelerometer drifted by 0.5°, which could not meet the requirements of engineering use, while the performance of the present invention and the Kalman algorithm was close, and the drift was controlled within 0.1°.

[0120] To further quantify the stability of the attitude angles calculated by the three methods, the mean and standard deviation of the errors of the three methods at a well inclination angle of -7.4° were calculated for a total of 31,954 sampling points within 5 minutes and 32 seconds.

[0121] Table 2 Error parameters of three methods for well inclination

[0122] method Mean Error Error standard deviation Gravitational acceleration not extracted 0.8269 0.6586 The present invention 0.0068 0.0379 Kalman filter algorithm 0.0902 0.0485

[0123] It can be seen from Table 2 that the gravity acceleration extracted by the present invention and the Kalman filter algorithm can improve the accuracy and stability of attitude angle calculation. Compared with the Kalman filter algorithm, the error mean of the well inclination angle calculated by the present invention is smaller.

[0124] The MATLAB software of the PC was used as the test platform to run the gravity extraction algorithm of the present invention and the one based on the Kalman framework respectively. The two algorithms were run 1000 times in a loop in MATLAB to calculate the single running time of the two methods. The stm32f103zet6 was used as the test platform, the frequency of the crystal oscillator was 8MHZ, the two algorithms were run respectively, and the single running time of the two methods was calculated. The running time comparison is shown in Table 3.

[0125] Table 3 Comparison of single running time

[0126]

[0127] As can be seen from Table 3, the test results of the PC show that the present invention reduces the single operation time of the gravity acceleration extraction algorithm based on the Kalman filter framework by 31.9%. It can be seen that after the gravity acceleration is extracted by the present invention, the accuracy of posture estimation is significantly improved. In the test environment of the stm32f103zet6 single-chip microcomputer, the algorithm in this paper reduces the single operation time of the gravity acceleration extraction algorithm based on the Kalman filter framework by 80.4%. In addition, since there are matrix multiplication and matrix inversion processes in the Kalman filter, and there is no floating-point operation unit in the stm32f103zet6 single-chip microcomputer, the gravity extraction algorithm based on the Kalman framework performs worse than the present invention in the test results of the single-chip microcomputer.

[0128] The experimental results show that the use of the gravity acceleration signal extracted by the present invention for attitude calculation can effectively improve the accuracy and stability of the attitude angle. At the same time, the present invention has good real-time performance. When the running time on the single-chip microcomputer is only 0.8496ms, it is conducive to ensuring the real-time performance of attitude calculation, and therefore has good engineering application value.

[0129] In summary, in order to solve the problem that the accelerometer cannot measure the real gravity component of the drill tool due to the high-speed rotation and severe vibration of the drill tool during the dynamic posture measurement near the drill bit downhole, the present invention provides a drill tool gravity acceleration extraction method based on complementary filtering. First, the recursive equation of gravity acceleration based on the gyroscope is obtained through the cosine matrix differential equation, and then the complementary characteristics of the gyroscope and the accelerometer in frequency are used to fuse the drill tool gravity acceleration under the complementary filtering framework; at the same time, in order to improve the robustness of the system, the non-gravitational acceleration and the rotation speed of the drill tool are used as the input of the fuzzy algorithm, and the complementary filtering parameters are dynamically adjusted through the fuzzy algorithm.

Claims

1. A drilling tool gravity acceleration extraction method based on complementary filtering, characterized in that: The following steps are involved: S1 builds a coordinate system; S2 constructs the recursive equation of gravitational acceleration; S3 constructs a complementary filtering model; S3 is specifically implemented according to the following scheme: S31 builds the measurement model of the gyroscope and accelerometer: In formula (6), b y k is the gyroscope measurement, b ω t,k is the actual angular velocity of the gyroscope at time k, b ω b,k is the gyroscope bias, η g is the low-frequency noise of the gyroscope; b f k is the accelerometer measurement, b a k is the gravitational acceleration of the carrier, η a is the high frequency noise of the accelerometer; S32 constructs a complementary filter {L(s)H(s)} by using low-pass and high-pass filters. High Pass Filter The accelerometer is filtered using a high-pass filter H(s), and the gyroscope is filtered using a low-pass filter L(s), resulting in a complementary filter model; S4 calculates the adaptive coefficient based on the fuzzy algorithm; S4 is specifically implemented according to the following scheme: S41 uses accelerometer to measure values b f k Subtract the gravitational acceleration derived from the gyroscope measurement value through formula (5) to obtain the non-gravitational acceleration as follows: Define a non-gravitational acceleration sliding window of length n, and take the maximum value of the sliding window as the amplitude of the non-gravitational acceleration vib as follows: vib k =max i∈[k,k-n-1] (f non_gravity,i ) (8); S42 uses the angular velocity on the rotating shaft as the rotating angular velocity of the drilling tool after passing it through a low-pass filter. The rotating velocity rot is calculated according to the following formula: rot k =a b and x(k) +(1-α) b and x(k-1) (9); S43 designs a fuzzy algorithm; S43 is specifically implemented according to the following scheme: S431 Input Fuzzification: Assume that the fuzzy subsets of the fuzzy quantities of non-gravitational acceleration vib and rotational velocity rot are all {S, M, L}, where S, M, and L represent small, medium, and large, respectively. p The fuzzy subset is set to {NM, NS, Z, PS, PM}, where NM, NS, Z, PS, and PM represent negative large, negative small, zero, positive small, and positive large, respectively. Through experiments, vib, rot, and Δk are obtained. p The corresponding fuzzy domain is: Select the membership function to fuzzify the input quantity, and obtain the input fuzzy quantity and the membership degree to which the fuzzy quantity belongs; S432 establishes a fuzzy rule table and fuzzy reasoning, wherein the fuzzy rule table is set according to the following principles: When vib is small, increase Δk p To increase confidence in the accelerometer, when both rot and vib are large, reduce Δk p To increase trust in the gyroscope; The rules of the fuzzy reasoning are: If(vib is Vib)and(rot is Rot)then(Δk p is Kp); S433 Defuzzification Use the centroid method to defuzzify the result after fuzzy inference and get the compensation value Δk of the complementary filter parameter. p , which is calculated as follows: In formula (11), Δkp i is the fuzzy quantity obtained through fuzzy reasoning, Δkp i ∈Kp,μ Kp is the membership function; S5 constructs a complementary filter model based on S3, the adaptive coefficient calculated by S4, and combines the gravity acceleration recursion equation of S2 to obtain the gravity acceleration of the drilling tool.

2. The drilling tool gravity acceleration extraction method based on complementary filtering according to claim 1 is characterized in that: The S1 is specifically implemented according to the following scheme: Select the right-hand rectangular coordinate system composed of the geographic coordinate system in the order of north and east as the navigation coordinate system, and use OX n Y n Z n Indicates that X n Pointing north, Y n Pointing east, Z n Point to the center of the earth; establish the drilling tool coordinate system with the three basic axes of the drilling tool, and use OX b Y b Z b Indicates that X b Coincident with the drilling tool axis, Y b and Z b They are perpendicular to each other and the plane they form is perpendicular to the axis of the drill bit; in the geographic coordinate system, the well inclination angle θ is the angle between the drilling axis Xb of the drill bit and the horizontal plane, which is positive downward and negative vice versa. The tool face angle γ is the angle from the high side of the borehole to Yb in the cross section of the borehole, where θ∈(-90°, 90°) and γ∈(-180°, 180°).

3. The drilling tool gravity acceleration extraction method based on complementary filtering according to claim 2 is characterized in that: The S2 is specifically implemented according to the following scheme: S21 According to the coordinate system, the attitude rotation matrix from the n system to the b system is The rotation matrix changes with time, and its changing law is described by a differential equation. The differential equation of the rotation matrix is ​​as follows: In formula (1), b ω× is the angular velocity vector of the drilling tool coordinate system relative to the navigation coordinate system The antisymmetric matrix formed is calculated according to the following formula: S22 Assume [t k-1 ,t k ] The gyro output angle increment in the time period is Then the homogeneous linear solution of the differential equation of formula (1) is as follows: Multiply both sides of formula (3) by the gravitational acceleration in the navigation coordinate system n g=[00-g0] T , the recursive equation of gravitational acceleration under the load system is as follows: S23 introduces a single sample + the equivalent rotation vector of the previous cycle to compensate for the non-commutative error, and the recursive equation of gravity acceleration is obtained as follows: In formula (5), Φ k is the equivalent rotation vector, the angular increment ΔΘ k =ΔT·[ b ω k ×].

4. The drilling tool gravity acceleration extraction method based on complementary filtering according to claim 1 is characterized in that: The complementary filter model is adjusted by a proportional-integral controller. where k p The size of the complementary filter determines the cutoff frequency. p The smaller the k, the greater the effect of the gyroscope. p The larger the value, the greater the role of the accelerometer. i is the reciprocal of the integration time constant.