A method and system for measuring a drilling attitude during a drilling process
Patent Information
- Application Number
- CN202610936664.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2046-06-26
AI Technical Summary
[0002]钻进过程随钻姿态测量是定向井、水平井及旋转导向钻井中获取井眼轨迹信息的重要环节,钻进过程中,容易受到钻具旋转、钻头破岩冲击、钻柱振动、井壁碰撞以及局部磁干扰等因素影响,使三轴陀螺仪、三轴加速度计和三轴磁力计输出中叠加时变噪声和异常量测,导致倾角、工具面角和方位角解算精度下降
[0031]与现有技术相比,本发明的有益效果是:本发明一种钻进过程随钻姿态测量方法及系统采集钻具坐标系下的角速度信息、加速度信息和磁场信息,并建立随钻姿态测量的非线性状态空间模型,随后通过逆威沙特分布和变分贝叶斯固定点迭代,对预测误差协方差和量测噪声协方差进行在线自适应估计,通过分数因子将一次量测更新分解为多个分数通道量测更新,并对各分数通道局部后验结果进行融合,得到钻具姿态的全局后验估计,在钻进过程存在振动冲击、旋转干扰、局部磁干扰以及噪声统计特性时变的条件下,提高随钻姿态测量的精度、鲁棒性和稳定性。
Smart Images

Figure CN122467162B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of measurement while drilling and integrated navigation technology, specifically a method and system for measuring attitude while drilling. Background Technology
[0002] Drilling attitude measurement is a crucial step in obtaining wellbore trajectory information in directional, horizontal, and rotary steerable drilling. During drilling, the wellbore is easily affected by factors such as drill string rotation, drill bit rock breaking impact, drill string vibration, wellbore collision, and local magnetic interference. These factors cause time-varying noise and abnormal measurements to be superimposed on the outputs of the triaxial gyroscope, triaxial accelerometer, and triaxial magnetometer, resulting in a decrease in the accuracy of inclination angle, tool face angle, and azimuth angle calculations.
[0003] Existing technologies such as CN111878064B improve the observability of inertial instrument errors through multi-position precision alignment, but they do not adequately consider the time-varying nature of measurement noise and nonlinear update errors. CN112963093B uses dual magnetometers and photoelectric positioning to analytically solve the attitude problem, but it does not adequately address the covariance joint adaptive estimation problem based on Mag / INS. Existing methods have three shortcomings: first, it is difficult to describe the time-varying characteristics of noise using a fixed covariance; second, a complete measurement update is prone to amplifying errors when measurement anomalies occur; and third, it lacks the ability to collaboratively suppress noise changes and nonlinear update errors caused by vibration, rotation, and magnetic interference. Therefore, there is an urgent need for a drilling attitude measurement method and system that can adaptively estimate the prediction error covariance and measurement noise covariance online, adopt a fractional-order measurement update mechanism to suppress nonlinear update errors, and has the ability to collaboratively suppress multi-source disturbances such as vibration, rotation, and magnetic interference. Summary of the Invention
[0004] This invention provides a method and system for measuring drilling attitude during the drilling process to solve the problems mentioned in the background art.
[0005] According to an embodiment of the present invention, a method for measuring attitude during drilling is provided, comprising the following steps: Step S101: Acquiring angular velocity, acceleration and magnetic field information. During drilling, angular velocity information, acceleration information and magnetic field information in the drill coordinate system are acquired by a triaxial gyroscope, a triaxial accelerometer and a triaxial magnetometer respectively.
[0006] Step S102: Establish a coordinate system and construct a state space model of the attitude while drilling. Establish a navigation coordinate system and a drill string coordinate system. Use unit quaternions to describe the attitude rotation relationship from the navigation coordinate system to the drill string coordinate system. Construct a nonlinear state space model of attitude measurement while drilling based on attitude quaternions, three-axis gyroscope zero bias, three-axis magnetometer measurement, and three-axis accelerometer measurement.
[0007] Step S103: Time update is performed based on gyroscope measurements. Based on the posterior state mean and posterior covariance of the previous time step, capacitive Kalman filtering is used to predict the state at the current time step, resulting in a one-step predicted state mean and a one-step predicted covariance.
[0008] Step S104: Based on the inverse Wissaud prior and variational Bayesian estimation of covariance, both the prediction error covariance and the measurement noise covariance are modeled as inverse Wissaud distributions. Under the variational Bayesian framework, fixed-point iterations are performed on the state posterior, the prediction error covariance posterior, and the measurement noise covariance posterior to obtain the effective prediction error covariance and the effective measurement noise covariance.
[0009] Step S105: Update the fractional channel measurement and fuse the posterior results. Decompose a single measurement update into multiple fractional channel local measurement updates according to a preset fractional factor. In each fractional channel, calculate the local Kalman gain, local posterior state mean, and local posterior covariance based on the effective prediction error covariance and effective measurement noise covariance.
[0010] Step S106: Output the dip angle, tool face angle, and azimuth angle. Integrate the local posterior results of each fractional channel to obtain the global state posterior mean and posterior covariance. Normalize the quaternion components in the global state posterior and output the drill bit's dip angle, tool face angle, and azimuth angle.
[0011] As a further aspect of the present invention: in step S102, the specific process of constructing the nonlinear state-space model includes: constructing a model based on attitude quaternions. and three-axis gyroscope zero bias The state vector .
[0012] Triaxial magnetometer measurement and triaxial accelerometer measurement Combined into observation vector .
[0013] Based on the attitude quaternion propagation relationship and the gravity field vector and geomagnetic field vector in the drill string coordinate system Based on the projection relationship, construct a nonlinear state-space model: ; In the formula, It is a nonlinear state transition function. This is a nonlinear measurement function used to describe the mapping relationship between state variables and accelerometer and magnetometer measurements. This represents the process noise corresponding to the (k-1)th sampling time. The measurement noise corresponding to the k-th sampling time is... Indicates the current sampling time. This is the state vector at the (k-1)th sampling time, which is the state vector at the previous sampling time.
[0014] As a further aspect of the present invention: In step S104, the specific process of modeling the prediction error covariance as an inverse Wissaud distribution is as follows: Let the state dimension be n and the measurement dimension be m, construct an inverse Wissaud prior distribution for the prediction error covariance: ; ; In the formula, To predict covariance in one step, and These represent the degrees of freedom parameters and scaling matrix of the inverse Wissaud prior distribution of the prediction error covariance, respectively. To adjust the parameters, and The selection of [aspect name] ensures that the prior expectation is consistent with the one-step prediction covariance obtained in step S103.
[0015] An inverse Wissaud prior distribution is constructed for the measurement noise covariance, and a forgetting factor is used to perform a time-series recursion of the posterior parameters at the previous sampling time. ; ; In the formula, To measure the noise covariance, and These represent the degrees of freedom parameters and scale matrix of the inverse Wissaud prior distribution of the measurement noise covariance, respectively. It is a forgetting factor, and , and These are the degree-of-freedom parameters and scale matrix of the inverse Wissaud prior distribution of the measurement noise covariance at sampling time k-1, respectively.
[0016] As a further aspect of the present invention: in step S104, the fixed-point iteration includes: at the current sampling time, performing mean field decomposition on the joint posterior distribution of the state variable, the prediction error covariance, and the measurement noise covariance. .
[0017] The posterior factor of the state, the posterior factor of the prediction error covariance, and the posterior factor of the measurement noise covariance are expressed as follows: ; ; In the formula, in the formula, For the posterior factor of the state, To predict the posterior factor of the covariance of the error, To measure the posterior factor of the noise covariance, For the first The fixed-point iteration is 1, where 1 represents the number of fixed-point iterations. and The first The degrees of freedom parameters and scaling matrix of the prediction error covariance inverse Wissaud posterior distribution obtained by +1 fixed-point iterations. and Let be the degree-of-freedom parameters and scale matrix of the inverse Wissaud posterior distribution of the measurement noise covariance obtained in the (l+1)th fixed-point iteration. For the first The posterior covariance of the state obtained by +1 fixed-point iterations For the first The posterior mean of the state obtained by +1 fixed-point iterations.
[0018] The parameters of each factor are updated alternately through fixed-point iterations, and the effective covariance is obtained after each iteration using the expected relationship of the inverse Wissaud distribution. ; In the formula, To effectively predict error covariance, To effectively measure noise covariance.
[0019] As a further aspect of the present invention: in step S104, the parameters of the posterior covariance of the prediction error are updated according to the second-order statistic of the state prediction error, and the parameters of the posterior covariance of the measurement noise are updated according to the second-order statistic of the measurement residual, wherein the second-order statistic of the measurement residual is approximately obtained from the volume point measurement propagation result under the current state posterior.
[0020] As a further aspect of the present invention: In step S105, before updating the fractional channel measurements, a fractional factor is first set and the effective covariance of each fractional channel is constructed: ; In the formula, , Number of fractional channels To predict score factors, To measure fractional factors, satisfying , and The first The local effective prediction error covariance and the local effective measurement noise covariance for each fractional channel.
[0021] As a further aspect of the present invention: the first The local Kalman update results for each fractional channel are as follows: ; ; In the formula, For the first Local Kalman gain of fractional channels, The cross-variance between state and measurement. To predict measurement covariance, This is the current observation vector. For the first The mean of the predicted measurements for each fractional channel. and The first Local posterior mean and local posterior covariance of each fractional channel This is a one-step prediction of the state mean.
[0022] As a further aspect of the present invention: in step S106, information fusion involves multiplying the local posterior distributions of each fractional channel and then normalizing them to obtain the global state posterior covariance. and mean : ; In the formula, the posterior mean of the global state is... Includes attitude quaternion subvectors When that happens, it is then unitized.
[0023] As a further aspect of the present invention, the termination condition for the fixed-point iteration is: the change in the posterior mean of the state between two adjacent iterations is less than the state convergence threshold, or the change in the effective measurement noise covariance is less than the measurement noise covariance convergence threshold, or the maximum number of iterations is reached.
[0024] In addition, to achieve the above objectives, the present invention also proposes a drilling attitude measurement system during drilling, the system comprising: a data acquisition module connected to the output terminals of a three-axis gyroscope, a three-axis accelerometer and a three-axis magnetometer, for acquiring angular velocity information, acceleration information and magnetic field information in the drill coordinate system.
[0025] The state-space model construction module is connected to the output of the data acquisition module and is used to construct a nonlinear state-space model for drilling attitude measurement based on attitude quaternions, three-axis gyroscope zero bias, geomagnetic field vector, gravity field vector and direction cosine matrix.
[0026] The time update module, connected to the state space model construction module, is used to perform state prediction using capacitive Kalman filtering, obtaining the mean of the predicted state and the covariance of the predicted state in one step.
[0027] The adaptive covariance estimation module is used to model the prediction error covariance and measurement noise covariance as inverse Wissaud distributions, and obtain the effective prediction error covariance and effective measurement noise covariance based on variational Bayesian fixed-point iteration.
[0028] The fractional channel measurement update module, connected to the adaptive covariance estimation module, is used to perform local measurement updates for multiple fractional channels based on the fractional factors, and obtain the local posterior mean and local posterior covariance of each fractional channel.
[0029] The fractional posterior information fusion module, connected to the fractional channel measurement update module, is used to fuse the local posterior results of each fractional channel according to the information fusion principle to obtain the global state posterior mean and global state posterior covariance.
[0030] The attitude output module, connected to the fractional posterior information fusion module, is used to normalize the quaternion subvectors in the global state posterior mean and output the drill bit's inclination angle, tool face angle, and azimuth angle.
[0031] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention provides a method and system for measuring drilling attitude during the drilling process, which collects angular velocity, acceleration, and magnetic field information in the drill string coordinate system and establishes a nonlinear state-space model for drilling attitude measurement. Subsequently, through inverse Wissaud distribution and variational Bayesian fixed-point iteration, online adaptive estimation of prediction error covariance and measurement noise covariance is performed. A single measurement update is decomposed into multiple fractional channel measurement updates through fractional factors, and the local posterior results of each fractional channel are fused to obtain a global posterior estimate of the drill string attitude. Under the conditions of vibration and shock, rotational interference, local magnetic interference, and time-varying noise statistical characteristics during the drilling process, the accuracy, robustness, and stability of drilling attitude measurement are improved. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a flowchart illustrating a method for measuring drilling attitude during drilling, as provided in an embodiment of the present invention.
[0034] Figure 2 This is a schematic diagram of the adaptive fractional Kalman filter recursive process provided in an embodiment of the present invention.
[0035] Figure 3 This is a block diagram of a drilling attitude measurement system provided in an embodiment of the present invention. Detailed Implementation
[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] Please see Figure 1 A method for measuring attitude during drilling includes the following steps: Step S101: Acquire angular velocity, acceleration and magnetic field information. During drilling, angular velocity, acceleration and magnetic field information in the drill coordinate system are acquired by a triaxial gyroscope, a triaxial accelerometer and a triaxial magnetometer respectively.
[0038] Step S102: Establish a coordinate system and construct a state space model of the attitude while drilling. Establish a navigation coordinate system and a drill string coordinate system. Use unit quaternions to describe the attitude rotation relationship from the navigation coordinate system to the drill string coordinate system. Construct a nonlinear state space model of attitude measurement while drilling based on attitude quaternions, three-axis gyroscope zero bias, three-axis magnetometer measurement, and three-axis accelerometer measurement.
[0039] Step S103: Time update is performed based on gyroscope measurements. Based on the posterior state mean and posterior covariance of the previous time step, capacitive Kalman filtering is used to predict the state at the current time step, resulting in a one-step predicted state mean and a one-step predicted covariance.
[0040] Step S104: Based on the inverse Wissaud prior and variational Bayesian estimation of covariance, both the prediction error covariance and the measurement noise covariance are modeled as inverse Wissaud distributions. Under the variational Bayesian framework, fixed-point iterations are performed on the state posterior, the prediction error covariance posterior, and the measurement noise covariance posterior to obtain the effective prediction error covariance and the effective measurement noise covariance.
[0041] Step S105: Update the fractional channel measurement and fuse the posterior results. Decompose a single measurement update into multiple fractional channel local measurement updates according to a preset fractional factor. In each fractional channel, calculate the local Kalman gain, local posterior state mean, and local posterior covariance based on the effective prediction error covariance and effective measurement noise covariance.
[0042] Step S106: Output the dip angle, tool face angle, and azimuth angle. Integrate the local posterior results of each fractional channel to obtain the global state posterior mean and posterior covariance. Normalize the quaternion components in the global state posterior and output the drill bit's dip angle, tool face angle, and azimuth angle.
[0043] In one specific embodiment, the aforementioned triaxial gyroscope is used to output triaxial angular velocity in the drill string coordinate system, the triaxial accelerometer is used to output triaxial acceleration in the drill string coordinate system, and the triaxial magnetometer is used to output triaxial magnetic field information in the drill string coordinate system, denoted as […]. , and , The angular velocity information, representing the current sampling time, is used to drive the time propagation of the attitude quaternion. The acceleration and magnetic field information are used as observation information of the gravity field vector and geomagnetic field vector in the drill coordinate system, respectively, for subsequent filtering measurement updates. The navigation coordinate system is defined as the East-North-Up coordinate system, and the drill coordinate system is defined as the coordinate system consistent with the sensitive axes of the three-axis magnetometer, three-axis accelerometer, and three-axis gyroscope. In step S103, the posterior mean of the previous time step is... The posterior covariance is The mean of the predicted state obtained in one step is The covariance predicted in one step is .
[0044] In this embodiment, please refer to Figure 2 , Figure 2 The system model is based on a schematic diagram of the adaptive fractional Kalman filter recursive process.
[0045] Specifically, in step S102, the specific process of constructing the nonlinear state-space model includes: constructing a model based on attitude quaternions. and three-axis gyroscope zero bias The state vector .
[0046] Triaxial magnetometer measurement and triaxial accelerometer measurement Combined into observation vector .
[0047] Based on the attitude quaternion propagation relationship and the gravity field vector and geomagnetic field vector in the drill string coordinate system Based on the projection relationship, construct a nonlinear state-space model: ; In the formula, It is a nonlinear state transition function. This is a nonlinear measurement function used to describe the mapping relationship between state variables and accelerometer and magnetometer measurements. This represents the process noise corresponding to the (k-1)th sampling time. The measurement noise corresponds to the k-th sampling time. Indicates the current sampling time. This is the state vector at the (k-1)th sampling time, which is the state vector at the previous sampling time.
[0048] In one specific embodiment, the above state vector is: , For the first The state vector at each sampling time. and The first The attitude quaternion and three-axis gyroscope zero bias at each sampling time; the above observation vector is: , For the first The observation vector at each sampling time, and The first Triaxial magnetometry and triaxial accelerometer measurements at each sampling time.
[0049] Furthermore, time updates.
[0050] Specifically, let the state dimension n be... ,structure One volume point: ; In the formula, For the j-th standard volume point, For the posterior covariance matrix The square root factor, square root factor The transpose of the matrix, The j-th volume point is constructed for the (k-1)-th sampling time. Let be the posterior mean of the state at the (k-1)th sampling time. Let be the state dimension.
[0051] Substituting each volume point into the state equation, we obtain the predicted points: In the formula, For the j-th volume point The predicted volume point is obtained after propagation through the nonlinear state transition function.
[0052] Furthermore, the prediction error covariance Measurement noise covariance Modeling.
[0053] During drilling, disturbances such as vibration, impact, rotational interference, magnetic interference, and random noise affect the measurement noise covariance. and prediction error covariance All of these may change with drilling conditions, through The inverse Wiesbaden posterior update and effective covariance transformation enable the filter to adaptively adjust the measurement noise covariance based on the current measurement residual statistics; through The inverse Wiesah posterior update enables the filter to adaptively adjust the prediction error covariance based on the state prediction bias.
[0054] Specifically, in step S104, the process of modeling the prediction error covariance as an inverse Wissaud distribution is as follows: Since the state dimension is assumed to be... For prediction error covariance Take the one-step prediction covariance obtained in step three. As its a priori expectation, let: In the formula, and These represent the degrees of freedom parameters and scaling matrix of the inverse Wissaud prior distribution of the prediction error covariance, respectively. To adjust the parameters, and The selection of [aspect name] ensures that the prior expectation is consistent with the one-step prediction covariance obtained in step S103.
[0055] Measurement noise covariance Construct the inverse Wieshard prior distribution and use a forgetting factor to perform time-series recursion on the posterior parameters of the previous sampling time: set the number of measurement bits m as... Using the forgetting factor Propagate the posterior parameters from the previous time step, i.e.: In the formula, To measure the noise covariance, and These represent the degrees of freedom parameters and scale matrix of the inverse Wissaud prior distribution of the measurement noise covariance, respectively. It is a forgetting factor, and , and These are the degree-of-freedom parameters and scale matrix of the inverse Wissaud prior distribution of the measurement noise covariance at sampling time k-1, respectively.
[0056] Therefore, the prediction error covariance and measurement noise covariance are modeled as inverse Wissaud prior distributions: ; In the formula, This represents the historical measurement sequence from the first sampling time to the (k-1)th sampling time. The one-step prediction error covariance at the current sampling time. The measurement noise covariance at the current sampling time. Indicates the inverse distribution in Saudi Arabia. and These represent the degrees of freedom parameters and scaling matrix of the inverse Wissaud prior distribution of the prediction error covariance, respectively. and These represent the degrees of freedom parameters and scale matrix of the inverse Wissaud prior distribution of the measurement noise covariance, respectively. The dimension is consistent with the state covariance matrix. The dimension is consistent with the measurement noise covariance matrix.
[0057] Further, in step S104, the variational Bayesian (VB) fixed-point iteration includes: at the current sampling time, performing mean field decomposition on the joint posterior distribution of the state variable, the prediction error covariance, and the measurement noise covariance; .
[0058] The posterior factor of the state, the posterior factor of the prediction error covariance, and the posterior factor of the measurement noise covariance are expressed as follows: ; In the formula, in the formula, For the posterior factor of the state, To predict the posterior factor of the covariance of the error, To measure the posterior factor of the noise covariance, For the first The fixed-point iteration is 1, where 1 represents the number of fixed-point iterations. and The first The degrees of freedom parameters and scaling matrix of the prediction error covariance inverse Wissaud posterior distribution obtained by +1 fixed-point iterations. and Let be the degree-of-freedom parameters and scale matrix of the inverse Wissaud posterior distribution of the measurement noise covariance obtained in the (l+1)th fixed-point iteration. For the first The posterior covariance of the state obtained by +1 fixed-point iterations For the first The posterior mean of the state obtained by +1 fixed-point iterations.
[0059] via fixed point The parameters of each factor are updated iteratively, and the effective covariance is obtained after each iteration using the expected relationship of the inverse Wissaud distribution. In the formula, For the first The effective prediction error covariance obtained by +1 fixed-point iterations For the first The effective measurement noise covariance obtained by +1 fixed-point iterations The scaling matrix of the inverse Wissaud posterior distribution of the prediction error covariance. To determine the degrees of freedom parameters for predicting the inverse Wissaud posterior distribution of the error covariance. To measure the scaling matrix of the inverse Wissaud posterior distribution of the noise covariance. The degree-of-freedom parameters for the inverse Wissaud posterior distribution of the noise covariance are given, where n is the state dimension and m is the measurement dimension.
[0060] Further, in step S104, the parameters of the posterior covariance of the prediction error are updated according to the second-order statistic of the state prediction error, and the parameters of the posterior covariance of the measurement noise are updated according to the second-order statistic of the measurement residual, wherein the second-order statistic of the measurement residual is approximately obtained from the volume point measurement propagation result under the current state posterior.
[0061] In one specific embodiment, the initial value of the fixed-point iteration is taken as: , In the In the fixed-point iteration, the posterior of the current state is approximately a Gaussian distribution: .
[0062] Given this state in the posterior timescale and satisfying the Gaussian approximation, the second-order statistic of the prediction error is: .
[0063] Based on the inverse Wissaud distribution, the posterior parameter of the prediction error covariance is updated as follows: .
[0064] For the measurement noise covariance, due to the measurement function It is a nonlinear function, measuring the second-order statistic of the residuals. Since direct analytical solutions are not possible, a cubature approximation using cubature Kalman filtering is introduced under the posterior condition of the current state. The second-order residual statistic is then calculated by propagating through the constructed intermediate cubature point. Update the posterior parameter of measurement noise covariance: ; In the formula, the observed propagation point and the predicted average observation value are respectively... , , For the first The second-order statistic of the measurement residual under the next fixed-point iteration is used to update the inverse Wissaud posterior parameter of the measurement noise covariance. Let be the state dimension. The number of volume points, The weight of the j-th volume point is typically taken as in standard capacitive Kalman filtering. =1 / ( ), This is the actual measurement vector at the current sampling time. For the first The measurement propagation point obtained after the j-th volume point in the fixed-point iteration is propagated by the nonlinear measurement function h(·) is the measurement propagation point. Represents the transpose of a matrix or vector.
[0065] Based on the expectation relationship of the inverse Wieshard distribution, the effective covariance required for the current round of state update is calculated as follows: .
[0066] Furthermore, the score measurement is updated and the score state is integrated.
[0067] Specifically, in step S105, before updating the fractional channel measurements, the fractional factor is first set and the effective covariance of each fractional channel is constructed: In the formula, , Number of fractional channels To predict score factors, To measure fractional factors, satisfying , and The first The local effective prediction error covariance and the local effective measurement noise covariance for each fractional channel.
[0068] Furthermore, in the In each score channel, with and Construct cubature points for prior information and propagate them into the measurement space to obtain the predicted observation mean for that channel. Predicted observation covariance and state-measurement cross-covariance The first The local Kalman update result for the fractional channel is: The local capacitive Kalman filter gain for each fractional channel is: .
[0069] The corresponding local posterior mean and local posterior covariance are as follows: ; In the formula, For the first Local Kalman gain of fractional channels, The cross-variance between state and measurement. To predict measurement covariance, This is the current observation vector. For the first The mean of the predicted measurements for each fractional channel. and The first Local posterior mean and local posterior covariance of each fractional channel This is a one-step prediction of the state mean.
[0070] It should be noted that the fractional channel update is not a simple repetitive filtering of the same measurement, but rather changes the effective covariance in each channel by a fractional factor, so that the current measurement acts on the posterior state in a smoother manner, thereby reducing the nonlinear approximation error generated when the measurement is in the tail region of the prior distribution.
[0071] Furthermore, the attitude angles are normalized and solved.
[0072] Specifically, in step S106, information fusion involves multiplying the local posterior distributions of each score channel and then normalizing them to obtain the global state posterior covariance. and mean : ; In the formula, the posterior mean of the global state is... Includes attitude quaternion subvectors When that happens, it is then unitized.
[0073] Because the state vector contains quaternion components, further processing is still required after fusion. Quaternion subvectors The normalization process yields attitude quaternions that satisfy the unit norm constraint. The drill string inclination angle, tool face angle, and azimuth angle are then calculated from the normalized quaternions.
[0074] In one specific embodiment, the local posterior distributions of the above-mentioned fractional channels are multiplied and then normalized: .
[0075] Unitization: In the formula, For the first Local posterior distribution of each fractional channel, and Let be the global state posterior covariance and the global state posterior mean, respectively. This is the attitude quaternion subvector in the posterior mean of the global state. This represents the second norm of a quaternion vector, also known as the Euclidean norm.
[0076] Furthermore, the termination condition for the fixed-point iteration is: the change in the posterior mean of the state between two adjacent iterations is less than the state convergence threshold, or the change in the effective measurement noise covariance is less than the measurement noise covariance convergence threshold, or the maximum number of iterations is reached.
[0077] In one specific embodiment, the change in the mean posterior state between two consecutive iterations is less than the state convergence threshold: .
[0078] The effective measurement noise covariance change is less than the measurement noise covariance convergence threshold: In the formula, and These are the state convergence threshold and the measurement noise covariance convergence threshold, respectively. The F-norm is used; after the fixed-point iteration terminates, it enters the measurement update, fractional measurement update, fractional state fusion, normalization and solves the attitude angle and attitude output, and then enters the next time step. If it does not terminate, it returns to the variational Bayesian (VB) fixed-point iteration.
[0079] Please see Figure 3 The present invention also proposes a drilling attitude measurement system during drilling, the system comprising: a data acquisition module connected to the output terminals of a triaxial gyroscope 203, a triaxial accelerometer 204 and a triaxial magnetometer 205, for acquiring angular velocity information, acceleration information and magnetic field information in the drill coordinate system.
[0080] The state-space model construction module is connected to the output of the data acquisition module and is used to construct a nonlinear state-space model for drilling attitude measurement based on attitude quaternions, three-axis gyroscope zero bias, geomagnetic field vector, gravity field vector and direction cosine matrix.
[0081] The time update module, connected to the state space model construction module, is used to perform state prediction using capacitive Kalman filtering, obtaining the mean of the predicted state and the covariance of the predicted state in one step.
[0082] The adaptive covariance estimation module is used to model the prediction error covariance and measurement noise covariance as inverse Wissaud distributions, and obtain the effective prediction error covariance and effective measurement noise covariance based on variational Bayesian fixed-point iteration.
[0083] The fractional channel measurement update module, connected to the adaptive covariance estimation module, is used to perform local measurement updates for multiple fractional channels based on the fractional factors, and obtain the local posterior mean and local posterior covariance of each fractional channel.
[0084] The fractional posterior information fusion module, connected to the fractional channel measurement update module, is used to fuse the local posterior results of each fractional channel according to the information fusion principle to obtain the global state posterior mean and global state posterior covariance.
[0085] The attitude output module, connected to the fractional posterior information fusion module, is used to normalize the quaternion subvectors in the global state posterior mean and output the drill bit's inclination angle, tool face angle, and azimuth angle.
[0086] In one specific embodiment, the Mag / INS measurement-while-drilling unit, composed of the triaxial gyroscope 203, triaxial accelerometer 204, and triaxial magnetometer 205, is installed in the near-bit measurement sub 201. One side of the measurement sub 201 is connected to the drill string body 200, and the other side is connected to the drill bit 202. The sensitive axis directions of the triaxial gyroscope 203, triaxial accelerometer 204, and triaxial magnetometer 205 are aligned with the three coordinate axes of the drill string coordinate system. The data acquisition module, state space model construction module, time update module, adaptive covariance estimation module, fractional channel measurement update module, fractional posterior information fusion module, and attitude output module can all be deployed in the data processing unit 206 of the downhole measurement sub 201, or a downhole-surface collaborative deployment method can be adopted, with the downhole sub completing data acquisition and partial preprocessing, and the surface computer completing filtering and attitude calculation.
[0087] This invention discloses a method and system for measuring drilling attitude during the drilling process. During drilling, angular velocity, acceleration, and magnetic field information in the drill string coordinate system are collected, and a nonlinear state-space model for drilling attitude measurement is established. Subsequently, online adaptive estimation of the prediction error covariance and measurement noise covariance is performed through inverse Wissaud distribution and variational Bayesian fixed-point iteration. A single measurement update is decomposed into multiple fractional-channel measurement updates using fractional factors, and the local posterior results of each fractional channel are fused to obtain a global posterior estimate of the drill string attitude. This improves the accuracy, robustness, and stability of drilling attitude measurement under conditions of vibration and shock, rotational interference, local magnetic interference, and time-varying noise statistical characteristics during drilling.
[0088] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0089] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for measuring drilling attitude during drilling, characterized in that, Includes the following steps: Step S101: Collect angular velocity, acceleration and magnetic field information. During the drilling process, angular velocity, acceleration and magnetic field information in the drill coordinate system are collected by a triaxial gyroscope, a triaxial accelerometer and a triaxial magnetometer, respectively. Step S102: Establish a coordinate system and construct a state space model of the attitude while drilling. Establish a navigation coordinate system and a drill string coordinate system. Use unit quaternions to describe the attitude rotation relationship from the navigation coordinate system to the drill string coordinate system. Construct a nonlinear state space model of attitude measurement while drilling based on attitude quaternions, three-axis gyroscope zero bias, three-axis magnetometer measurement and three-axis accelerometer measurement. Step S103: Time update based on gyroscope measurement. According to the posterior state mean and posterior covariance of the previous time step, capacitive Kalman filtering is used to complete the state prediction of the current time step, and the one-step predicted state mean and one-step predicted covariance are obtained. Step S104: Based on the inverse Wissaud prior and variational Bayes estimation of covariance, both the prediction error covariance and the measurement noise covariance are modeled as inverse Wissaud distributions. Under the variational Bayes framework, fixed-point iterations are performed on the state posterior, the prediction error covariance posterior, and the measurement noise covariance posterior to obtain the effective prediction error covariance and the effective measurement noise covariance. Step S105: Update the fractional channel measurement and fuse the posterior results. Decompose a single measurement update into multiple fractional channel local measurement updates according to a preset fractional factor. Calculate the local Kalman gain, local posterior state mean, and local posterior covariance in each fractional channel based on the effective prediction error covariance and effective measurement noise covariance. Step S106: Output the dip angle, tool face angle and azimuth angle, fuse the local posterior results of each fractional channel to obtain the global state posterior mean and posterior covariance, normalize the quaternion components in the global state posterior, and output the dip angle, tool face angle and azimuth angle of the drill string. In step S104, the specific process of modeling the prediction error covariance as an inverse Wissaud distribution is as follows: Let the state dimension be n and the measurement dimension be m. Construct the inverse Wissaud prior distribution for the prediction error covariance: ; ; ; In the formula, To predict covariance in one step, and These represent the degrees of freedom parameters and scaling matrix of the inverse Wissaud prior distribution of the prediction error covariance, respectively. To adjust the parameters, and The selection ensures that the prior expectation is consistent with the one-step prediction covariance obtained in step S103; An inverse Wissaud prior distribution is constructed for the measurement noise covariance, and a forgetting factor is used to perform a time-series recursion of the posterior parameters at the previous sampling time. ; ; ; In the formula, To measure the noise covariance, and These represent the degrees of freedom parameters and scale matrix of the inverse Wissaud prior distribution of the measurement noise covariance, respectively. It is a forgetting factor, and , and These are the degree-of-freedom parameters and scale matrix of the inverse Wissaud prior distribution of the measurement noise covariance at sampling time k-1, respectively. In step S104, the fixed-point iteration includes: At the current sampling time, the joint posterior distribution of the state variable, prediction error covariance, and measurement noise covariance is decomposed into a mean field. ; The posterior factor of the state, the posterior factor of the prediction error covariance, and the posterior factor of the measurement noise covariance are expressed as follows: ; ; ; In the formula, For the posterior factor of the state, To predict the posterior factor of the covariance of the error, To measure the posterior factor of the noise covariance, For the first The fixed-point iteration is 1, where 1 represents the number of fixed-point iterations. and The first The degrees of freedom parameters and scaling matrix of the prediction error covariance inverse Wissaud posterior distribution obtained by +1 fixed-point iterations. and Let be the degree-of-freedom parameters and scale matrix of the inverse Wissaud posterior distribution of the measurement noise covariance obtained in the (l+1)th fixed-point iteration. Let be the posterior covariance of the state obtained in the (l+1)th fixed-point iteration. Let be the posterior mean of the state obtained in the (l+1)th fixed-point iteration. It is a state vector; The parameters of each factor are updated alternately through fixed-point iterations, and the effective covariance is obtained after each iteration using the expected relationship of the inverse Wissaud distribution. ; ; In the formula, To effectively predict error covariance, To effectively measure noise covariance; In step S105, before updating the fractional channel measurements, the fractional factor is set and the effective covariance of each fractional channel is constructed: ; ; In the formula, , Number of fractional channels To predict score factors, To measure fractional factors, satisfying , and The first The local effective prediction error covariance and the local effective measurement noise covariance for each fractional channel.
2. The drilling attitude measurement method according to claim 1, characterized in that, In step S102, the specific process of constructing the nonlinear state-space model includes: Constructing pose quaternions and three-axis gyroscope zero bias The state vector ; Triaxial magnetometer measurement and triaxial accelerometer measurement Combined into observation vector ; Based on the attitude quaternion propagation relationship and the gravity field vector and geomagnetic field vector in the drill string coordinate system Based on the projection relationship, construct a nonlinear state-space model: ; ; In the formula, It is a nonlinear state transition function. This is a nonlinear measurement function used to describe the mapping relationship between state variables and accelerometer and magnetometer measurements. This represents the process noise corresponding to the (k-1)th sampling time. The measurement noise corresponding to the k-th sampling time is... Indicates the current sampling time. This is the state vector at the (k-1)th sampling time, which is the state vector at the previous sampling time.
3. The drilling attitude measurement method according to claim 2, characterized in that, In step S104, the parameters of the posterior covariance of the prediction error are updated according to the second-order statistic of the state prediction error, and the parameters of the posterior covariance of the measurement noise are updated according to the second-order statistic of the measurement residual, wherein the second-order statistic of the measurement residual is approximately obtained from the volume point measurement propagation result under the current state posterior.
4. The drilling attitude measurement method according to claim 3, characterized in that, No. The local Kalman update results for each fractional channel are as follows: ; ; ; In the formula, For the first Local Kalman gain of fractional channels, The cross-variance between state and measurement. To predict measurement covariance, This is the current observation vector. For the first The mean of the predicted measurements for each fractional channel. and The first Local posterior mean and local posterior covariance for each fractional channel This is a one-step prediction of the state mean.
5. The drilling attitude measurement method according to claim 4, characterized in that, In step S106, information fusion involves multiplying the local posterior distributions of each score channel and then normalizing them to obtain the global state posterior covariance. and mean : ; ; In the formula, the posterior mean of the global state is... Includes attitude quaternion subvectors When that happens, it is then unitized.
6. The drilling attitude measurement method according to claim 5, characterized in that, The termination condition for the fixed-point iteration is: the change in the posterior mean of the state between two adjacent iterations is less than the state convergence threshold, or the change in the effective measurement noise covariance is less than the measurement noise covariance convergence threshold, or the maximum number of iterations is reached.
7. A drilling attitude measurement system for the drilling process, applied to the drilling attitude measurement method of claim 1, characterized in that, The system includes: The data acquisition module is connected to the output terminals of the three-axis gyroscope, three-axis accelerometer, and three-axis magnetometer to acquire angular velocity, acceleration, and magnetic field information in the drill coordinate system. The state space model construction module is connected to the output of the data acquisition module and is used to construct a nonlinear state space model for drilling attitude measurement based on attitude quaternions, three-axis gyroscope zero bias, geomagnetic field vector, gravity field vector and direction cosine matrix. The time update module, connected to the state space model construction module, is used to perform state prediction using capacitive Kalman filtering to obtain the mean of the one-step predicted state and the one-step predicted covariance. The adaptive covariance estimation module is used to model the prediction error covariance and measurement noise covariance as inverse Wissat distributions, and obtain the effective prediction error covariance and effective measurement noise covariance based on variational Bayesian fixed-point iteration. The fractional channel measurement update module, connected to the adaptive covariance estimation module, is used to perform local measurement updates for multiple fractional channels based on the fractional factors, and obtain the local posterior mean and local posterior covariance of each fractional channel. The score posterior information fusion module is connected to the score channel measurement update module. It is used to fuse the local posterior results of each score channel according to the information fusion principle to obtain the global state posterior mean and the global state posterior covariance. The attitude output module, connected to the fractional posterior information fusion module, is used to normalize the quaternion subvectors in the global state posterior mean and output the drill bit's inclination angle, tool face angle, and azimuth angle.
Citation Information
Patent Citations
A method for measuring posture
CN111878064B
A method for dynamic measurement and calculation of the attitude of a rotary steerable drilling tool
CN112963093B
Spacecraft attitude determination method based on central error entropy criterion volume Kalman filtering
CN113792412A
Underground sensor network target tracking method based on variational Bayesian learning
CN114662535A