Anti-magnetic interference multi-sensor adaptive fusion drilling trajectory measurement method and system
Patent Information
- Application Number
- CN202611204969.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]为此,本发明所要解决的技术问题在于克服现有技术中在复杂磁干扰环境下钻孔轨迹测量精度与可靠性不足的问题
本发明所述的抗磁干扰的多传感器自适应融合钻孔轨迹测量方法,首先,通过实时检测磁场干扰状态并输出连续变化的环境可信度指标,能够精准量化当前磁场的可信程度,为后续姿态解算模式的切换提供可靠判据,避免了因固定阈值判定带来的误判或漏判问题。其次,在磁场正常时以加速度计和磁力计联合解算获得高精度绝对姿态基准,在干扰发生时则利用干扰前的基准姿态对陀螺仪进行姿态重置并锁定零偏,有效消除了历史累积误差和系统漂移,显著提升了纯惯性递推阶段的初始精度和持续工作能力。再次,当磁环境恢复后,通过将重新解算的基准姿态与当前递推姿态进行比对并修正累积误差,使系统能够及时校准并恢复至正常测量模式,确保了长期轨迹测量的稳定性。尤为关键的是,本发明基于所述环境可信度指标,在磁场数据解算姿态与角速度数据递推姿态之间实施连续权重调节,实现了两种解算模式的平滑无阶跃衔接,从根本上消除了传统硬切换方式带来的姿态跳变,保证了钻进全程姿态数据的连续性和平滑性。综合上述机制,本发明在不依赖高精度陀螺仪硬件的前提下,以低成本的多传感器融合策略有效克服了复杂磁干扰环境下钻孔轨迹测量精度与可靠性不足的技术缺陷,显著延长了纯惯性模式的有效工作时长,为煤矿瓦斯抽采、地质勘探等工程提供了高可靠、全程平滑的轨迹测量解决方案。
Smart Images

Figure CN122812610A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of borehole trajectory measurement technology, and in particular to a multi-sensor adaptive fusion borehole trajectory measurement method and system that is resistant to magnetic interference. Background Technology
[0002] Directional drilling technology is a core supporting means for coal mine gas extraction, water exploration, and geological exploration projects. The accuracy of its trajectory measurement directly determines the quality and safety of the drilling project. Among related technologies, the mainstream measurement scheme is based on a combination of accelerometers and magnetometers. The accelerometer calculates the dip angle and tool face angle, while the magnetometer senses the geomagnetic vector to calculate the azimuth angle. A gyroscope is used as a supplement for attitude recursion, constructing a complete technical system covering data acquisition, attitude calculation, and trajectory synthesis. This scheme, with its advantages of low cost, small size, and mature technology, has been widely used in conventional drilling projects.
[0003] However, existing measurement methods rely directly on magnetometers to sense geomagnetic vectors, without fully considering the interference from complex downhole magnetic environments. Specifically, when the drill bit enters magnetic ore bodies, areas with dense steel casing, or complex formations with metal support structures, the geomagnetic vectors will be severely distorted, rendering the magnetometer data unusable and causing azimuth angle calculations to fail. While introducing high-precision gyroscopes can fundamentally solve the magnetic interference problem, they are costly and difficult to adapt to harsh downhole conditions. Although low-cost MEMS gyroscopes have advantages in size and price, their accuracy in recursive attitude estimation is far from meeting engineering requirements due to multiple factors such as zero-bias drift, scaling factor nonlinearity, and cross-coupling errors, thus affecting the reliability and continuity of borehole trajectory measurement in complex magnetic interference environments. Summary of the Invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the problem of insufficient accuracy and reliability of borehole trajectory measurement in complex magnetic interference environment in the prior art.
[0005] Acquire triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process; The current magnetic field interference status is detected in real time based on the triaxial magnetic field data, and an environmental reliability index characterizing the degree of magnetic field interference is output. When the magnetic field is under normal conditions, the drill bit attitude is calculated based on the triaxial acceleration data and the triaxial magnetic field data. When magnetic field interference is detected, the drill bit attitude is recursively deduced based on the triaxial angular velocity data. Under magnetic field interference, the reference attitude calculated last before the magnetic field interference occurred is used as the initial value of the recursive attitude, and the zero bias value is determined by the angular velocity data collected in the static state. The attitude is updated by integrating after compensating the subsequent angular velocity data with the zero bias value. When the magnetic field returns to normal, the attitude is recalculated based on the triaxial acceleration data and the triaxial magnetic field data, and the cumulative error of the recursive attitude is corrected using the calculation results. Based on the environmental reliability index, the output weight is continuously adjusted between the attitude calculated from the magnetic field data and the attitude derived from the angular velocity data according to the changes in the magnetic field interference state, so as to smoothly connect the two attitude calculation results. Drilling trajectory is generated based on smoothed attitude data.
[0006] Preferably, the acquisition of triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process includes: The nine-axis inertial measurement unit, which integrates a magnetometer, accelerometer, and gyroscope, simultaneously acquires three-axis magnetic field data, three-axis acceleration data, and three-axis angular velocity data. When magnetic field interference is detected, the gyroscope is powered on and starts to collect three-axis angular velocity data, and records a sequence of angular velocity data under static conditions to calculate the zero bias value.
[0007] Preferably, the step of real-time detection of the current environmental magnetic field interference state based on the triaxial magnetic field data and outputting an environmental reliability index characterizing the degree of magnetic field interference includes: In an environment free from magnetic field interference, acquire triaxial magnetic field reference data sequences of the measurement system in multiple spatial orientations; Statistical characteristic parameters of the magnetic field values are calculated for each axis, including mean parameters and standard deviation parameters. For each axis, an interference judgment threshold range is constructed with the mean parameter of that axis as the center and the product of the standard deviation parameter and the preset coefficient as the half width. The real-time three-axis magnetic field measurement values of the magnetometer are obtained. When the real-time measurement value of any axis exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is magnetic field interference.
[0008] Preferably, the step of recursively calculating the drill bit attitude based on the triaxial angular velocity data includes: When magnetic field interference is detected in the measurement environment, the gyroscope is triggered to collect three-axis angular velocity data, and the angular velocity data is recorded under stationary conditions to calculate the zero bias value, so that the system enters pure inertial navigation mode.
[0009] Preferably, using the reference attitude calculated last before the occurrence of magnetic field interference as the initial value of the recursive attitude includes: At the instant of switching to pure inertial mode, the last frame of valid data before the occurrence of magnetic field interference is acquired. The gravity vector is measured by the accelerometer and the geomagnetic vector is measured by the magnetometer. The current attitude angle of the drill is calculated and the set of attitude angles is used as the initial value of the current attitude of the gyroscope to complete the attitude reset.
[0010] Preferably, determining the zero bias value using angular velocity data acquired in a stationary state includes: After the attitude reset is completed, when the system is in a static or quasi-static state, the angular velocity output of each axis of the gyroscope is collected, and the collected values are used as the locked gyroscope zero bias value.
[0011] Preferably, the step of compensating subsequent angular velocity data with the zero bias value and then integrating to update the attitude includes: After subtracting the locked zero bias value from each frame of angular velocity data output by the gyroscope, the quaternion differential equation is used for integration and updating, and the attitude angle is output in real time.
[0012] Preferably, when the magnetic field returns to normal, the attitude is recalculated based on the triaxial acceleration data and the triaxial magnetic field data, and the accumulated error of the recursive attitude is corrected using the calculation results, including: When the magnetic field environment is detected to have returned to normal, the magnetometer and accelerometer are reactivated to jointly calculate the new reference attitude. The reference attitude is compared with the current attitude output by the pure inertial mode to obtain the error. The first part of the error is used to directly correct the current attitude angle, and the second part is used to update the gyroscope zero bias estimate.
[0013] Preferably, the step of continuously adjusting the output weights between attitude calculated from magnetic field data and attitude derived from angular velocity data based on the environmental reliability index and according to changes in the magnetic field interference state includes: Based on the degree to which the real-time magnetic field measurement deviates from the normal fluctuation range, the magnetic field interference state is divided into multiple levels; Within the confidence interval of the magnetic field data, the output weight of the attitude calculation based on the magnetic field data is set as the first weight value, and the output weight of the attitude calculation based on the angular velocity data is set as the second weight value. Within the mild interference range, the output weight of the attitude calculation based on the magnetic field data gradually decreases from the first weight value to the third weight value, while the output weight of the attitude calculation based on the angular velocity data gradually increases from the second weight value to the fourth weight value. Within the severely disturbed range, the output weight of the attitude calculated from the magnetic field data is set to the third weight value, and the output weight of the attitude calculated from the angular velocity data is set to the fourth weight value.
[0014] Preferably, generating the drilling trajectory based on the smoothed attitude data includes: Using the hole depth, apex angle, and azimuth angle of all measuring points as input data, and the hole depth as the independent variable, continuous cubic spline functions are established for the apex angle sequence and azimuth angle sequence of all measuring points respectively. Based on the interpolated continuous vertex angle function and azimuth function, the increment of the geographic coordinate system in each direction under unit hole depth is solved; Using the borehole's geographical coordinates as a reference, the entire increment is accumulated segment by segment to convert the attitude data in the borehole coordinate system into three-dimensional coordinates in the geographical coordinate system, generating a continuous and smooth borehole space curve.
[0015] Preferably, the present invention further includes: The trajectory data is marked, and the source of the calculation results of the trajectory coordinates or attitude data is recorded. The source includes the magnetometer calculation source and the gyroscope calculation source, and the corresponding magnetic field strength data is recorded. The smoothed data during the switching process between magnetometer calculation and gyroscope inertial calculation is marked separately.
[0016] This invention also provides a multi-sensor adaptive fusion borehole trajectory measurement system resistant to magnetic interference, comprising: The sensor data acquisition module is used to collect triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process; The working environment self-test module is used to detect the magnetic field interference status of the current environment in real time based on the triaxial magnetic field data, and output an environmental reliability index that characterizes the degree of magnetic field interference. The correction and compensation module is used to take the reference attitude calculated last before the magnetic field interference occurred as the initial value of the recursive attitude under magnetic field interference conditions, and use the angular velocity data collected in the static state to determine the zero bias value. After compensating the subsequent angular velocity data with the zero bias value, the attitude is updated by integration. When the magnetic field returns to normal, the attitude is recalculated with the triaxial acceleration data and the triaxial magnetic field data as the reference, and the cumulative error of the recursive attitude is corrected by the calculation results. The attitude smoothing scheduling module is used to receive the environmental reliability index and continuously adjust the output weight between attitude calculated from magnetic field data and attitude derived from angular velocity data according to the changes in magnetic field interference state, so as to smoothly connect the two attitude calculation results. The trajectory calculation module is used to generate drilling trajectories based on smoothed attitude data.
[0017] Preferably, the sensor data acquisition module includes a nine-axis inertial measurement unit integrating a magnetometer, accelerometer, and gyroscope, used for: Simultaneously acquire triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data; When the working environment self-test module detects magnetic field interference, the gyroscope is powered on and starts collecting three-axis angular velocity data.
[0018] Preferably, the working environment self-test module is used for: In an environment free from magnetic field interference, a triaxial magnetic field reference data sequence of the measurement system under multiple spatial orientations is acquired, and statistical characteristic parameters of the magnetic field values are calculated for each axis. The statistical characteristic parameters include mean parameters and standard deviation parameters. For each axis, an interference judgment threshold range is constructed with the mean parameter of that axis as the center and the product of the standard deviation parameter and the preset coefficient as the half width. The real-time three-axis magnetic field measurement values of the magnetometer are obtained. When the real-time measurement value of any axis exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is magnetic field interference.
[0019] Preferably, the correction and compensation module is used for: At the moment of switching to pure inertial mode, the last frame of valid data before the occurrence of magnetic field interference is acquired. The gravity vector is measured by the accelerometer and the geomagnetic vector is measured by the magnetometer. The current attitude angle of the drill is calculated and the set of attitude angles is used as the initial value of the current attitude of the gyroscope to complete the attitude reset. After the attitude reset is completed, while the system is in a static or quasi-static state, the angular velocity output of each axis of the gyroscope is collected, and the collected values are used as the locked gyroscope zero bias values. After subtracting the locked zero bias value from each frame of angular velocity data output by the gyroscope, the quaternion differential equation is used for integration and updating, and the attitude angle is output in real time.
[0020] Preferably, the attitude smoothing scheduling module is used for: Based on the degree to which the real-time magnetic field measurement deviates from the normal fluctuation range, the magnetic field interference state is divided into multiple levels; Within the confidence interval of the magnetic field data, the output weight of the attitude calculation based on the magnetic field data is set as the first weight value, and the output weight of the attitude calculation based on the angular velocity data is set as the second weight value. Within the mild interference range, the output weight of the attitude calculation based on the magnetic field data gradually decreases from the first weight value to the third weight value, while the output weight of the attitude calculation based on the angular velocity data gradually increases from the second weight value to the fourth weight value. Within the severely disturbed range, the output weight of the attitude calculated from the magnetic field data is set to the third weight value, and the output weight of the attitude calculated from the angular velocity data is set to the fourth weight value.
[0021] Preferably, the trajectory calculation module is used for: Using the hole depth, apex angle, and azimuth angle of all measuring points as input data, and the hole depth as the independent variable, continuous cubic spline functions are established for the apex angle sequence and azimuth angle sequence of all measuring points respectively. Based on the interpolated continuous vertex angle function and azimuth function, the increment of the geographic coordinate system in each direction under unit hole depth is solved; Using the borehole's geographical coordinates as a reference, the entire increment is accumulated segment by segment to convert the attitude data in the borehole coordinate system into three-dimensional coordinates in the geographical coordinate system, generating a continuous and smooth borehole space curve.
[0022] Preferably, it also includes a history marker module for: The source of the calculation results for the trajectory data or attitude data is marked, including the source of magnetometer calculation and the source of gyroscope calculation, and the corresponding magnetic field strength data is recorded; In addition, the smoothed data during the switching process between magnetometer calculation and gyroscope inertial calculation is marked separately.
[0023] The technical solution of the present invention has the following advantages compared with the prior art: The multi-sensor adaptive fusion borehole trajectory measurement method for resisting magnetic interference described in this invention firstly quantifies the reliability of the current magnetic field by real-time detection of magnetic field interference and outputting continuously changing environmental reliability indicators. This provides a reliable criterion for switching subsequent attitude calculation modes, avoiding misjudgments or omissions caused by fixed threshold judgments. Secondly, when the magnetic field is normal, a high-precision absolute attitude reference is obtained through joint calculation using accelerometers and magnetometers. When interference occurs, the gyroscope attitude is reset and zero bias is locked using the reference attitude before the interference, effectively eliminating historical accumulated errors and system drift, and significantly improving the initial accuracy and continuous working capability of the pure inertial recursion stage. Thirdly, when the magnetic environment recovers, the system can be promptly calibrated and restored to normal measurement mode by comparing the recalculated reference attitude with the current recursive attitude and correcting accumulated errors, ensuring the stability of long-term trajectory measurement. Crucially, based on the aforementioned environmental reliability index, this invention implements continuous weight adjustment between attitude calculation from magnetic field data and attitude recursion from angular velocity data. This achieves a smooth, stepless transition between the two calculation modes, fundamentally eliminating the attitude jumps caused by traditional hard switching methods and ensuring the continuity and smoothness of attitude data throughout the drilling process. Combining these mechanisms, this invention, without relying on high-precision gyroscope hardware, effectively overcomes the technical shortcomings of insufficient accuracy and reliability in borehole trajectory measurement under complex magnetic interference environments with a low-cost multi-sensor fusion strategy. It significantly extends the effective working time of pure inertial mode, providing a highly reliable, end-to-end smooth trajectory measurement solution for coal mine gas extraction, geological exploration, and other engineering projects. Attached Figure Description
[0024] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart illustrating the implementation of a multi-sensor adaptive fusion borehole trajectory measurement method with anti-magnetic interference provided by the present invention. Figure 2 This is a structural block diagram of a multi-sensor adaptive fusion borehole trajectory measurement system with anti-magnetic interference according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the interference determination process of the working environment self-test module in this embodiment of the invention; Figure 4 This is a schematic diagram of the weight transition of the attitude smoothing scheduling module in the range of reliable magnetometer data and slight interference in an embodiment of the present invention; Figure 5 This is a schematic diagram of the weight switching of the attitude smoothing scheduling module in the severely disturbed region in an embodiment of the present invention; Figure 6 This is a three-dimensional schematic diagram of the borehole space curve generated based on smoothed attitude data in an embodiment of the present invention; Figure 7 This is a schematic diagram of the horizontal projection of the borehole space curve in an embodiment of the present invention. Detailed Implementation
[0025] The core of this invention is to provide a multi-sensor adaptive fusion drilling trajectory measurement method, device, equipment, and computer storage medium that is resistant to magnetic interference, so as to effectively solve the problem of insufficient accuracy and reliability of existing technologies in drilling trajectory measurement under complex magnetic interference environments.
[0026] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely 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.
[0027] Please refer to Figure 1. Figure 1 The flowchart illustrates the implementation of a multi-sensor adaptive fusion borehole trajectory measurement method with magnetic interference resistance provided by this invention; the specific operation steps are as follows: S101: Acquire triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process; Acquire triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process. During drilling operations, multi-source raw sensor data for calculating the drill string's spatial attitude and trajectory must be acquired simultaneously. This step aims to establish the data perception foundation of the measurement system by using a sensor array positioned near the drill string to collect physical quantities characterizing the drill string's motion state and the characteristics of its environment in real time. Specifically, the collected data includes at least three types: first, triaxial magnetic field data reflecting the drill string's position relative to the gravitational and geomagnetic fields, used to calculate the absolute attitude reference of the drill string in a non-magnetic interference environment; second, triaxial acceleration data, used to sense the component of the gravitational acceleration experienced by the drill string in the carrier coordinate system to help determine the drill string's tilt state; and third, triaxial angular velocity data, used to characterize the rotational rate of the drill string around each axis, providing raw input for the inertial recursion of attitude. These three types of data must be acquired synchronously in time to ensure a consistent time base reference between the data sources during subsequent fusion calculations. During the data acquisition process, each sensor continuously outputs raw signals according to a preset sampling frequency. After necessary signal conditioning and digital conversion, a standardized data stream is formed that can be used by subsequent processing modules. As one implementation method, the three-axis magnetic field data, three-axis acceleration data, and three-axis angular velocity data can be simultaneously acquired by a nine-axis inertial measurement unit integrating a magnetometer, accelerometer, and gyroscope. The magnetometer outputs three components of magnetic field data, the accelerometer outputs three components of acceleration data, and the gyroscope outputs three components of angular velocity data. Each component corresponds to one of the three orthogonal axes in the carrier coordinate system. This step provides a complete and time-aligned multi-source data foundation for subsequent environmental condition determination, attitude calculation mode switching, and trajectory generation.
[0028] S102: Detect the current magnetic field interference status in real time based on the triaxial magnetic field data, and output an environmental reliability index that characterizes the degree of magnetic field interference. The system detects the magnetic field interference status of the current environment in real time based on the triaxial magnetic field data and outputs an environmental reliability index characterizing the degree of magnetic field interference. The key to ensuring the reliable operation of the borehole trajectory measurement system in complex downhole environments lies in continuously monitoring and judging the magnetic field environment sensed by the magnetometer, and determining whether the current measurement conditions are suitable for attitude calculation based on geomagnetic vectors. Specifically, the system compares the triaxial magnetic field measurement values output by the magnetometer with pre-calibrated normal magnetic field reference characteristics to determine whether the current magnetic field environment is normal. The normal magnetic field reference characteristics characterize the statistical distribution range of the magnetic field readings of each axis under conditions of no magnetic interference. These characteristics can be obtained by collecting multi-directional magnetic field data in a known interference-free environment and calculating the corresponding statistical parameters. During real-time monitoring, the system compares the current magnetic field measurement values of each axis with the reference characteristics. If the measurement values of each axis are all within the normal fluctuation range defined by the reference characteristics, the magnetic field environment is determined to be normal, and the corresponding environmental reliability index is output. If the measurement value of any axis deviates from this normal fluctuation range, magnetic field interference is determined to exist, and a corresponding reliability index is output based on the degree of deviation. This environmental reliability index is a continuously changing value, which can accurately depict the gradual process of magnetic field interference.
[0029] S103: When the magnetic field is in a normal state, the drill bit attitude is calculated based on the triaxial acceleration data and the triaxial magnetic field data. When magnetic field interference is detected, the drill bit attitude is recursively deduced based on the triaxial angular velocity data. Under magnetic field interference, the reference attitude calculated last before the magnetic field interference occurred is used as the initial value of the recursive attitude, and the zero bias value is determined by the angular velocity data collected in the static state. The attitude is updated by integrating after compensating the subsequent angular velocity data with the zero bias value. When the magnetic field is under normal conditions, the drill bit attitude is calculated based on the triaxial acceleration data and the triaxial magnetic field data. At this time, the system uses the gravity vector component measured by the accelerometer and the geomagnetic vector component measured by the magnetometer to jointly calculate the current attitude angles of the drill bit, including roll angle, pitch angle, and azimuth angle. This calculation method does not rely on angular velocity integration and does not have drift errors accumulated over time, providing a high-precision absolute attitude reference. As one implementation method, the system can collect triaxial magnetic field reference data sequences covering multiple spatial azimuths in an interference-free environment, calculate the mean μ and standard deviation σ of the magnetic field values for each axis, and construct an interference judgment threshold interval centered on the mean μ and with the product of the standard deviation σ and a preset coefficient as half-width. When the real-time measured value exceeds this interval, magnetic field interference is determined to exist.
[0030] When magnetic field interference is detected, the drill bit attitude is recursively deduced based on the triaxial angular velocity data. When magnetic field interference is determined to exist in the measurement environment, the gyroscope is triggered to acquire triaxial angular velocity data, and the angular velocity data is recorded under static conditions to calculate the zero bias value, allowing the system to enter pure inertial navigation mode. Through this step, the system can perceive abnormal changes in the magnetic field environment in real time, promptly identify and switch the attitude calculation strategy when magnetic interference occurs, avoiding the failure of azimuth calculation due to the use of interfered magnetometer data.
[0031] Under magnetic field interference, the reference attitude calculated last before the interference occurred is used as the initial value for the recursive attitude. Angular velocity data collected in a stationary state is used to determine the zero bias value. This zero bias value is then used to compensate for subsequent angular velocity data before integration to update the attitude. To ensure the accuracy and continuity of the attitude recursion, reliable initial conditions and error suppression benchmarks must be established for the pure inertial recursion process. Specifically, the last effective reference attitude frame calculated jointly from acceleration and magnetic field data before the interference occurs is directly assigned as the initial attitude value for the current inertial recursion. This eliminates historical errors accumulated by the gyroscope due to drift and other factors during previous operation, ensuring that the attitude at the start of the recursion is consistent with the true attitude. Simultaneously, angular velocity data collected when the system is stationary or quasi-stationary is used to determine the gyroscope's zero bias value under the current temperature and operating conditions. This zero bias value reflects the gyroscope's inherent output offset when there is no angular motion input. In the subsequent attitude recursion process, the zero bias value is subtracted from each frame of angular velocity data output by the gyroscope in real time to eliminate systematic deviations. Then, the compensated angular velocity data is integrated and updated to calculate the current attitude angle of the drill bit in real time. Through the synergistic effect of the attitude initial value reset and zero bias locking compensation, the error in the pure inertial recursion stage is zero at the beginning, and the accumulation of error caused by zero bias is effectively suppressed during the recursion process.
[0032] S104: When the magnetic field returns to normal, the attitude is recalculated based on the triaxial acceleration data and the triaxial magnetic field data, and the cumulative error of the recursive attitude is corrected using the calculation results. When the magnetic field returns to normal, the attitude is recalculated using the triaxial acceleration and magnetic field data as a reference, and the accumulated error of the recursive attitude is corrected using the calculation results. Once the magnetic field strength is continuously detected to have returned to the normal range, the magnetometer is reactivated, and a new reference attitude is calculated jointly with the accelerometer. This reference attitude is compared with the current attitude output from the pure inertial mode to obtain the error between the two. A portion of this error is used directly to correct the current attitude angle, and another portion is used to update the gyroscope's zero-bias estimate, preparing for potential future magnetic interference switching. After correction, the system reverts to the normal combined measurement mode based on the magnetometer and accelerometer.
[0033] S105: Based on the environmental reliability index, according to the change of magnetic field interference state, continuously adjust the output weight between the attitude calculated from magnetic field data and the attitude derived from angular velocity data to smoothly connect the two attitude calculation results. Based on the aforementioned environmental reliability index, the output weights are continuously adjusted between the magnetic field data-calculated attitude and the angular velocity data-derived attitude according to changes in the magnetic field interference state, to smoothly connect the two attitude calculation results. The weight ratio of the magnetic field data-calculated attitude and the angular velocity data-derived attitude in the final output attitude is dynamically determined based on the real-time detected magnetic field interference level, ensuring that the system output attitude continuously adjusts with changes in the interference state, rather than instantaneously switching between the two calculation modes. When the magnetic field data reliability is high, the weight of the magnetic field data-calculated attitude is increased, making the output attitude dominated by the magnetic field calculation result; as the magnetic field interference gradually intensifies, the weight of the magnetic field data-calculated attitude is correspondingly decreased, while the weight of the angular velocity data-derived attitude is increased, allowing the output attitude to smoothly transition to a state dominated by the inertial recursive result; when the magnetic field interference further intensifies, the output attitude is entirely determined by the angular velocity data-derived attitude. Conversely, when the magnetic field interference gradually weakens, the weights are continuously adjusted in the opposite direction, allowing the output attitude to smoothly return to a state dominated by the magnetic field data calculation result. The aforementioned continuous weight adjustment mechanism effectively eliminates the attitude step phenomenon caused by mode switching, ensuring the continuity and smoothness of attitude output throughout the drilling process.
[0034] S106: Generate drilling trajectory based on smoothed attitude data.
[0035] The drilling trajectory is generated based on the smoothed attitude data. The smoothed attitude data is combined with the corresponding hole depth information to calculate the drilling trajectory, generating a complete three-dimensional drilling trajectory. As one implementation method, the interference state can be divided into multiple levels, such as mild interference and severe interference, based on the degree to which the magnetic field measurement value deviates from the normal fluctuation range. Within the mild interference range, the weight of the attitude calculated from the magnetic field data decreases linearly with the degree of deviation, while the weight of the attitude derived from the angular velocity data increases linearly with the degree of deviation. This continues until the severe interference range, where the weight of the attitude calculated from the magnetic field data drops to zero, and the system outputs the attitude entirely based on the attitude derived from the angular velocity data.
[0036] This embodiment can accurately quantify the reliability of the current magnetic field by real-time detection of magnetic field interference and outputting a continuously changing environmental reliability index, providing a reliable criterion for switching subsequent attitude calculation modes. When the magnetic field is normal, a high-precision absolute attitude reference is obtained by joint calculation using accelerometers and magnetometers. When interference occurs, the attitude of the gyroscope is reset and zero bias is locked using the reference attitude before the interference, effectively eliminating historical accumulated errors and system drift. Based on the environmental reliability index, continuous weight adjustment is implemented between the two attitude calculation results, achieving a smooth and stepless connection, ensuring the continuity and smoothness of attitude data throughout the drilling process.
[0037] Based on the above embodiments, in some embodiments, acquiring triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process includes: The nine-axis inertial measurement unit, which integrates a magnetometer, accelerometer, and gyroscope, simultaneously acquires three-axis magnetic field data, three-axis acceleration data, and three-axis angular velocity data. When magnetic field interference is detected, the gyroscope is powered on and starts to collect three-axis angular velocity data, and records a sequence of angular velocity data under static conditions to calculate the zero bias value.
[0038] In this embodiment, the sensor data acquisition module uses a nine-axis inertial measurement unit (IMU) integrating a magnetometer, accelerometer, and gyroscope as the physical front end. This nine-axis IMU synchronously acquires three-axis magnetic field data, three-axis acceleration data, and three-axis angular velocity data at a fixed sampling frequency. Specifically, the magnetometer, accelerometer, and gyroscope share the same clock reference and output their respective three-component measurement values at the same sampling time, thus ensuring strict time alignment of the data sources during subsequent multi-sensor fusion calculations. In normal system measurement mode, the magnetometer and accelerometer remain constantly powered, continuously outputting magnetic field and acceleration data, while the gyroscope is in a low-power standby state and does not participate in attitude calculations. When the environmental self-test module determines that there is magnetic field interference in the current environment, it triggers the gyroscope to power on and start. After power-on, the gyroscope first enters a preheating and stabilization phase. Once the output data stabilizes, it begins acquiring three-axis angular velocity data at a fixed sampling frequency. Meanwhile, the system controls the drill bit to remain stationary or quasi-stationary, continuously recording a preset duration of angular velocity data. This data sequence reflects the zero-bias characteristics of each axis of the gyroscope under the current temperature conditions and operating conditions. Subsequently, the arithmetic mean of the angular velocity data sequence under the stationary state is calculated for each axis to obtain the zero-bias value for each axis, which serves as the basis for angular velocity compensation in the subsequent pure inertial recursive stage. After the gyroscope completes the zero-bias calculation and enters normal operating mode, the sensor data acquisition module continuously outputs three-axis angular velocity data for the correction and compensation module to use in attitude recursive calculation in pure inertial mode. Through the above method, the nine-axis inertial measurement unit uses magnetometers and accelerometers as the main data sources in normal mode, and switches to gyroscope data sources in magnetic interference environments, realizing the orderly connection and data complementarity of multiple sensors in the time dimension.
[0039] In one specific implementation of this embodiment, the sampling frequency of the nine-axis inertial measurement unit can be configured according to actual engineering requirements, for example, it can be set to 200Hz to balance data density and system power consumption. When magnetic field interference is detected, the gyroscope is powered on from standby mode, and its warm-up and stabilization time can be determined according to the characteristics of the gyroscope chip to ensure stable and reliable output data. The duration of the angular velocity data sequence recorded under stationary conditions can be determined according to actual accuracy requirements, for example, it can be set to several seconds of continuous data to ensure the statistical validity of zero bias calculation.
[0040] This embodiment ensures the consistency of multi-source sensor data over time through the synchronous acquisition mechanism of the nine-axis inertial measurement unit, providing a reliable data foundation for subsequent attitude fusion calculation. At the same time, the on-demand power-on operation mode of the gyroscope effectively reduces the overall power consumption of the system, while the real-time calculation of zero bias value in the stationary state provides accurate initial parameters for angular velocity compensation in the pure inertial recursion stage.
[0041] Based on the above embodiments, in some embodiments, the step of real-time detection of the current environmental magnetic field interference state based on the triaxial magnetic field data and outputting an environmental reliability index characterizing the degree of magnetic field interference includes: In an environment free from magnetic field interference, acquire triaxial magnetic field reference data sequences of the measurement system in multiple spatial orientations; Statistical characteristic parameters of the magnetic field values are calculated for each axis, including mean parameters and standard deviation parameters. For each axis, an interference judgment threshold range is constructed with the mean parameter of that axis as the center and the product of the standard deviation parameter and the preset coefficient as the half width. The real-time three-axis magnetic field measurement values of the magnetometer are obtained. When the real-time measurement value of any axis exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is magnetic field interference.
[0042] In this embodiment, the specific implementation method for real-time detection of the magnetic field interference state of the current environment based on triaxial magnetic field data is as follows. First, during the system initialization phase, the measurement system is placed in a known environment free from strong magnetic interference, such as an open area far away from large ferromagnetic drilling rig components and power cables. After starting the magnetometer, the measurement system is operated to slowly and uniformly rotate and flip along a preset trajectory, so that its three axes point sequentially to multiple different directions in space. During this process, a set of triaxial magnetic field reference data sequences is continuously acquired at a preset sampling frequency. This sequence covers various spatial attitudes that the measurement system may experience under interference-free conditions, providing a data basis for subsequent statistical feature extraction.
[0043] For the collected baseline data sequence, statistical characteristic parameters of the magnetic field values were calculated for the X, Y, and Z axes respectively. Taking the X-axis as an example, the formulas for calculating its mean and standard deviation are as follows:
[0044]
[0045] Where Bxi is the magnetic field measurement value of the X-axis at the i-th sampling time, and N is the total number of sampling points. Similarly, the mean and standard deviation of the Y-axis, and the mean and standard deviation of the Z-axis are calculated. This set of parameters (μ, σ) characterizes the normal fluctuation range of the magnetic field readings of each axis under the current interference-free environment, and serves as the benchmark for subsequent interference determination.
[0046] For each axis, an interference threshold range is constructed with the mean μ of that axis as the center and the product of the standard deviation σ and a preset coefficient as the half-width. The preset coefficient is a configurable empirical constant. Thus, the interference threshold range for the X-axis is [μx - k·σx, μx + k·σx], and the same applies to the Y-axis and Z-axis. This range defines the allowable fluctuation range of the magnetic field values of each axis under normal, interference-free operating conditions. In one specific implementation, the preset coefficient k can be between 3 and 5; as an example, k=4 is used in this embodiment.
[0047] During the formal operation of the borehole trajectory measurement system, the magnetometer outputs triaxial magnetic field measurements at a fixed frequency in real time. The processor of the working environment self-test module acquires these measurements in real time and compares the real-time measurement of each axis with the interference judgment threshold range corresponding to that axis. When the real-time measurement of any axis exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is magnetic field interference, and the corresponding environmental reliability index is output.
[0048] By employing the methods described above, this embodiment utilizes statistical characteristic parameters to construct a dynamic threshold range, which can accurately identify the occurrence of magnetic field interference and promptly trigger the gyroscope to handle attitude calculation when interference occurs. The beneficial effect of this implementation is that the threshold range based on statistical characteristics can adaptively reflect the normal fluctuation range of the magnetic field under different installation environments and temperature conditions, avoiding potential misjudgments or missed judgments that may occur with fixed thresholds under complex operating conditions, thereby improving the accuracy and robustness of magnetic field interference detection.
[0049] Based on the above embodiments, in some embodiments, the step of recursively calculating the drill bit attitude based on the triaxial angular velocity data includes: When magnetic field interference is detected in the measurement environment, the gyroscope is triggered to collect three-axis angular velocity data, and the angular velocity data is recorded under stationary conditions to calculate the zero bias value, so that the system enters pure inertial navigation mode.
[0050] In this embodiment, the working environment self-test module monitors in real time whether the measured magnetic field values of each axis exceed the corresponding interference judgment threshold range. When the measured magnetic field value of any axis of the magnetometer exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is strong magnetic interference in the measurement environment. At this time, the working environment self-test module sends a trigger signal to the sensor data acquisition module to power on and start the gyroscope. After the gyroscope is powered on, it begins to collect three-axis angular velocity data. At the same time, the system controls the drill bit to remain stationary or quasi-stationary. In this state, a segment of angular velocity data is recorded, and the arithmetic mean of this segment of data is calculated for each axis to obtain the zero bias value of each axis. Subsequently, the system enters the pure inertial navigation mode. The gyroscope uses the collected three-axis angular velocity data as a basis, subtracts the corresponding zero bias value, and then performs integration recursion to realize the pure inertial solution of the drill bit attitude.
[0051] In one specific implementation, the predetermined sampling frequency can be set according to system performance requirements, for example, it can be set to no less than 200Hz. The duration of the angular velocity data recorded under static conditions can be determined according to the characteristics and accuracy requirements of the gyroscope, for example, data can be continuously collected for several seconds to tens of seconds after the system is in a quasi-static state.
[0052] This embodiment ensures the system can quickly respond to changes in the magnetic environment and smoothly switch to pure inertial navigation mode by promptly powering on the gyroscope and calculating the zero bias value when magnetic field interference is detected, thereby guaranteeing the continuity of attitude calculation during magnetic interference.
[0053] Based on the above embodiments, in some embodiments, using the reference attitude calculated last before the occurrence of magnetic field interference as the initial value of the recursive attitude includes: At the instant of switching to pure inertial mode, the last frame of valid data before the occurrence of magnetic field interference is acquired. The gravity vector is measured by the accelerometer and the geomagnetic vector is measured by the magnetometer. The current attitude angle of the drill is calculated and the set of attitude angles is used as the initial value of the current attitude of the gyroscope to complete the attitude reset.
[0054] In this embodiment, when the working environment self-test module determines that there is interference in the current magnetic field environment and triggers the system to switch to pure inertial mode, the correction and compensation module first performs an attitude reset operation. Specifically, at the instant of switching to pure inertial mode, the correction and compensation module calls the last valid data frame before the magnetic interference occurred. This data frame is the last complete set of three-axis magnetic field data and three-axis acceleration data output by the sensor data acquisition module before the magnetic interference occurred. Using this data frame as input, the correction and compensation module determines the roll and pitch angles of the drill string by the gravity vector measured by the accelerometer and the azimuth angle of the drill string by the geomagnetic vector measured by the magnetometer, thereby calculating the reference attitude of the drill string at the current moment. This reference attitude includes three attitude angle components: roll angle, pitch angle, and azimuth angle. Subsequently, the correction and compensation module directly overwrites the current initial attitude value of the gyroscope with this set of attitude angles, completing the attitude reset operation. Through this attitude reset process, the historical errors accumulated by the gyroscope during normal operation due to factors such as zero bias drift and nonlinear scaling factor are cleared to zero in one go, so that the attitude recursion in pure inertial mode starts from an error-free initial state.
[0055] In one specific implementation, taking the drilling tool reaching a certain depth and entering a densely supported area with steel arches as an example, the spacing between the I-beams in this area is small, resulting in severe distortion of the magnetometer output. The total magnetic field strength deviation exceeds a preset threshold, and the correction and compensation module immediately triggers a mode switch. At the moment of switching, the module calls up the last valid frame of data before the magnetic interference occurred, calculates the current roll angle, pitch angle, and azimuth angle of the probe, and this set of attitude angles directly overwrites the gyroscope's current initial attitude value, completing the attitude reset.
[0056] This embodiment uses an attitude reset operation to clear all errors accumulated due to gyroscope drift in one go. The attitude recursion in pure inertial mode starts from a precise initial state, which significantly improves the initial accuracy of attitude calculation under magnetic interference environment.
[0057] Based on the above embodiments, in some embodiments, determining the zero bias value using angular velocity data collected in a stationary state includes: After the attitude reset is completed, when the system is in a static or quasi-static state, the angular velocity output of each axis of the gyroscope is collected, and the collected values are used as the locked gyroscope zero bias value.
[0058] In this embodiment, after attitude reset, the correction and compensation module enters the zero-bias locking stage. During this stage, the system requires the drill string to be in a relatively static or quasi-static state, meaning the drill string has no active rotation or translational motion. The correction and compensation module collects the angular velocity output of each axis of the gyroscope in the current static state. Since the drill string is stationary, the angular velocity values output by each axis of the gyroscope are the zero-bias values of the gyroscope under the current temperature and operating conditions. The correction and compensation module locks this set of zero-bias values as the compensation reference in the subsequent attitude recursion process. This zero-bias value reflects the inherent drift characteristics of the gyroscope under the current ambient temperature and operating conditions, and remains unchanged throughout the entire pure inertial mode after locking.
[0059] In one specific implementation, after the attitude reset is completed, the system keeps the drill bit stationary and continuously collects the angular velocity output of each axis of the gyroscope in this stationary state. The data is recorded for a preset duration, such as several seconds, and the average value of the angular velocity data of each axis during the time period is calculated. The obtained average value is used as the locked zero bias value.
[0060] This embodiment ensures the accuracy and timeliness of the angular velocity compensation reference during the pure inertial recursion process by acquiring and locking the zero bias value of the gyroscope in real time after the attitude reset is completed, and effectively suppresses the impact of gyroscope zero bias drift on the attitude calculation accuracy.
[0061] Based on the above embodiments, in some embodiments, the step of compensating subsequent angular velocity data with the zero bias value and then integrating to update the attitude includes: After subtracting the locked zero bias value from each frame of angular velocity data output by the gyroscope, the quaternion differential equation is used for integration and updating, and the attitude angle is output in real time.
[0062] In this embodiment, after zero-bias locking is completed, the gyroscope takes over all attitude calculation tasks. The gyroscope outputs three-axis angular velocity data at a predetermined frequency. The correction and compensation module subtracts the locked zero-bias value from each frame of angular velocity data to obtain the compensated angular velocity data. Subsequently, the correction and compensation module uses the compensated angular velocity data as input and performs integral updates using quaternion differential equations, outputting the current roll, pitch, and azimuth angles of the drill bit in real time. Since the zero-bias value has just been calibrated and the initial attitude value has been reset, the error at the starting point of integration is zero. During the pure inertial mode, the cumulative attitude error caused by the gyroscope's own drift is significantly suppressed, thereby ensuring the accuracy of attitude calculation in the magnetic interference section.
[0063] In one specific implementation, the gyroscope can output three-axis angular velocities at a frequency of 200Hz. After subtracting the locked zero bias from each frame of data, the data is updated by integration using quaternion differential equations, and the roll, pitch, and azimuth angles are output in real time. During the approximately 4-minute drilling time through, for example, a 15-meter steel arch area, the cumulative attitude error caused by the gyroscope's own drift can be controlled within the engineering measurement accuracy requirements, for example, not exceeding 0.3°.
[0064] This embodiment achieves accurate attitude recursion in pure inertial mode by subtracting the locked zero bias value from each frame of angular velocity data and updating it using quaternion differential equations, which significantly extends the effective working time of low-cost MEMS gyroscopes in magnetic interference environments.
[0065] Based on the above embodiments, in some embodiments, when the magnetic field returns to normal, the attitude is recalculated using the triaxial acceleration data and the triaxial magnetic field data as a reference, and the accumulated error of the recursive attitude is corrected using the calculation results, including: When the magnetic field environment is detected to have returned to normal, the magnetometer and accelerometer are reactivated to jointly calculate the new reference attitude. The reference attitude is compared with the current attitude output by the pure inertial mode to obtain the error. The first part of the error is used to directly correct the current attitude angle, and the second part is used to update the gyroscope zero bias estimate.
[0066] In this embodiment, after the drill string passes through a magnetic interference section, the correction and compensation module continuously monitors the deviation of the total magnetic field strength output by the magnetometer. When the deviation value continuously falls below a preset threshold, it is determined that the magnetic environment has returned to normal. At this time, the system reactivates the magnetometer, and the magnetometer and accelerometer respectively collect the current triaxial magnetic field data and triaxial acceleration data. The two are jointly calculated to determine the reference attitude angle of the drill string at the current moment. The reference attitude angle includes three components: roll angle, pitch angle, and azimuth angle. Specifically, the accelerometer measures the three-component projection of the gravity vector in the drill string coordinate system, and the magnetometer measures the three-component projection of the geomagnetic vector in the drill string coordinate system. The roll angle and pitch angle are determined based on the gravity vector, and the azimuth angle is determined based on the joint constraint of the geomagnetic vector and the gravity vector, thereby obtaining a complete set of reference attitude angles.
[0067] Subsequently, the correction and compensation module compares the reference attitude angle with the current attitude angle output by the pure inertial mode component by component, calculates the difference between the two, and obtains the error. This error reflects the attitude deviation introduced by factors such as gyroscope zero-bias drift, scaling factor error, and integral accumulation during the pure inertial recursion stage. The correction and compensation module allocates this error into two parts according to a preset ratio: one part is directly superimposed on the current attitude angle to correct it in real time, ensuring that the corrected attitude angle is consistent with the reference attitude calculated by the magnetometer / accelerometer; the other part is used to update the gyroscope's zero-bias estimate, that is, to incrementally adjust the locked zero-bias value according to the trend of the error, so that the updated zero-bias value is closer to the true zero-bias level under the current temperature and environmental conditions. The updated zero-bias value is stored and used as the initial zero-bias value when the subsequent pure inertial mode is started, preparing for the next possible magnetic interference switch.
[0068] After correction, the system reverts to the normal combined measurement mode based on the magnetometer and accelerometer. Magnetometer data is re-involved in attitude calculation, and the accuracy of subsequent drilling trajectory measurements remains stable. Through the aforementioned error allocation mechanism, the system not only eliminates the attitude error accumulated during the pure inertial phase after the magnetic environment recovers, but also simultaneously optimizes the gyroscope's zero-bias parameter. This results in a gradual improvement in the gyroscope's compensation accuracy after each magnetic interference event, enhancing the system's continuous adaptability when repeatedly traversing magnetic anomaly regions.
[0069] This embodiment achieves closed-loop calibration after magnetic environment recovery by proportionally distributing the error between the reference attitude and the recursive attitude to the attitude correction and zero-bias update stages. This not only eliminates the current attitude deviation in real time, but also provides a more accurate zero-bias reference for subsequent inertial recursion.
[0070] Based on the above embodiments, in some embodiments, the step of continuously adjusting the output weight between the attitude calculated from the magnetic field data and the attitude derived from the angular velocity data based on the environmental reliability index and according to the change in the magnetic field interference state includes: Based on the degree to which the real-time magnetic field measurement deviates from the normal fluctuation range, the magnetic field interference state is divided into multiple levels; Within the confidence interval of the magnetic field data, the output weight of the attitude calculation based on the magnetic field data is set as the first weight value, and the output weight of the attitude calculation based on the angular velocity data is set as the second weight value. Within the mild interference range, the output weight of the attitude calculation based on the magnetic field data gradually decreases from the first weight value to the third weight value, while the output weight of the attitude calculation based on the angular velocity data gradually increases from the second weight value to the fourth weight value. Within the severely disturbed range, the output weight of the attitude calculated from the magnetic field data is set to the third weight value, and the output weight of the attitude calculated from the angular velocity data is set to the fourth weight value.
[0071] In this embodiment, the attitude smoothing scheduling module continuously adjusts the weights of the magnetometer-calculated attitude and the gyroscope-derived attitude based on the environmental reliability index output by the working environment self-test module. Specifically, the working environment self-test module pre-collects a triaxial magnetic field reference data sequence in an interference-free environment, calculates the mean μ and standard deviation σ of the magnetic field values for each axis, and constructs an interference judgment threshold interval with the mean μ as the center and the product of the standard deviation σ and a preset coefficient as the half-width. On this basis, the attitude smoothing scheduling module further introduces a mild interference threshold coefficient and a severe interference threshold coefficient, thereby dividing the magnetic field measurement values into multiple reliability intervals, each corresponding to a different weighted output state.
[0072] In one specific implementation, a preset coefficient is k, a mild interference threshold coefficient is k1, and a severe interference threshold coefficient is k2, where k1 is less than k2 and neither is greater than k. When the real-time output value of a certain axis of the magnetometer falls within the interval [μ...], ... When the value falls within the range [k1·σ, μ+k1·σ], the magnetometer data is considered completely reliable. In this case, the magnetometer calculation weight is set to 1, and the gyroscope inertial calculation weight is set to 0. The system uses the attitude calculated jointly by the magnetometer and accelerometer as the final output attitude. As the magnetometer output value deviates more from the mean μ, it falls within the interval [μ...]. k·σ,μ When the value deviates further from [k1·σ] or [μ+k1·σ, μ+k·σ], the magnetometer data is considered to have slight interference. In this case, the magnetometer calculation weight decreases linearly from 1 to 0.5 with the degree of deviation, while the gyroscope inertial calculation weight increases linearly from 0 to 0.5. The final output attitude is obtained by weighted fusion of the two calculation results according to the current weights. When the magnetometer output value deviates further, exceeding the interval [μ... When k2·σ, μ+k2·σ], the magnetometer data is determined to be severely interfered with. The magnetometer calculation weight is directly set to 0, and the gyroscope inertial calculation weight is set to 1. The system is completely switched to pure inertial calculation mode, and the attitude is independently derived by the compensated gyroscope. Here, k1 is the mild interference threshold coefficient, and k2 is the severe interference threshold coefficient.
[0073] As an example, the preset coefficient k can be 4, the mild interference threshold coefficient k1 can be 2, and the severe interference threshold coefficient k2 can be 6. The above weight adjustment process takes the real-time magnetic field measurement as input, calculates the weight coefficient at the current moment through a piecewise linear mapping relationship, and then performs a weighted summation on the two attitude calculation results to output the smoothly connected attitude data.
[0074] This embodiment divides the degree of magnetic field interference into multiple levels by introducing a multi-level interference threshold coefficient and adopts a piecewise linear weighted transition strategy, so that the system can smoothly transition from the magnetometer calculation mode to the pure inertial mode during the gradual change of the magnetic environment, effectively eliminating attitude jumps during mode switching.
[0075] Based on the above embodiments, in some embodiments, generating the drilling trajectory based on the smoothed attitude data includes: Using the hole depth, apex angle, and azimuth angle of all measuring points as input data, and the hole depth as the independent variable, continuous cubic spline functions are established for the apex angle sequence and azimuth angle sequence of all measuring points respectively. Based on the interpolated continuous vertex angle function and azimuth function, the increment of the geographic coordinate system in each direction under unit hole depth is solved; Using the borehole's geographical coordinates as a reference, the entire increment is accumulated segment by segment to convert the attitude data in the borehole coordinate system into three-dimensional coordinates in the geographical coordinate system, generating a continuous and smooth borehole space curve.
[0076] In this embodiment, the specific implementation of generating the borehole trajectory based on the smoothed attitude data is as follows. The system first takes the borehole depth, apex angle, and azimuth angle of all measuring points as a complete set of input data, where the borehole depth is denoted as L, the apex angle as θ, the azimuth angle as φ, and the measuring point number as i (i=0, 1, 2...n). This discretizes the entire borehole into n adjacent measuring segments [Li, Li+1], with each segment having a length ΔL=Li+1. Li. Using the borehole depth L as the independent variable, continuous cubic spline functions are established for the apex angle and azimuth angle sequences of all measuring points. Specifically, a cubic spline polynomial function with respect to the borehole depth L is constructed for each measuring segment:
[0077] In the formula, a i b i c id i Let S be the coefficient of the i-th polynomial. i (L) is a continuous interpolation function of the apex angle or azimuth angle with respect to the hole depth. When solving for the polynomial coefficients of each segment, natural boundary conditions are used to constrain the second derivatives at the borehole start point (hole opening L=0) and borehole end point (hole bottom L=Lmax) to be 0:
[0078] Simultaneously constraining the continuity of functions, first derivatives, and second derivatives at the connection points of adjacent measurement sections, a three-moment equation system is constructed and all polynomial coefficients are solved, thereby ensuring that the attitude curve of the entire well is smooth and without inflection points.
[0079] After obtaining the interpolated apex angle function θ(L) and azimuth angle function φ(L), the system solves for the geographic coordinate system increment per unit hole depth using differentiation. Specifically, the vertical depth increment is:
[0080] The north-south coordinate increment is:
[0081] The east-west coordinate increment is:
[0082] Using the borehole geographic coordinates (N0, E0, Z0) as a reference, the increments in each direction are accumulated and integrated segment by segment along the borehole depth direction. This converts the attitude data in the borehole coordinate system into three-dimensional coordinates in the geographic coordinate system, ultimately generating a continuous and smooth borehole space curve.
[0083] The above implementation method uses a cubic spline interpolation algorithm to process the discrete measurement point attitude data into a continuous form, so that the apex angle and azimuth angle at any depth of the hole can be accurately obtained, avoiding the slope change problem caused by traditional piecewise linear interpolation at the connection of measurement segments; at the same time, the dual constraints of natural boundary conditions and continuity at the connection ensure the continuity of the first and second derivatives of the entire trajectory curve, thereby generating a smooth borehole space curve without inflection points.
[0084] Based on the above embodiments, in some embodiments, the method further includes: The trajectory data is marked, and the source of the calculation results of the trajectory coordinates or attitude data is recorded. The source includes the magnetometer calculation source and the gyroscope calculation source, and the corresponding magnetic field strength data is recorded. The smoothed data during the switching process between magnetometer calculation and gyroscope inertial calculation is marked separately.
[0085] In this embodiment, the historical record marking module and the attitude smoothing scheduling module work together to identify and record the source attributes and smoothing processing status of the trajectory data throughout the entire process. Specifically, when the system is in normal mode, the drill attitude is calculated jointly by the accelerometer and magnetometer. At this time, the historical record marking module marks the attitude data and corresponding trajectory coordinates of the current measuring point as the source of the magnetometer calculation, and records the three-axis magnetic field strength value output by the magnetometer at that moment. When the working environment self-test module determines that the magnetic field interference is aggravated and the system enters pure inertial mode, the attitude data is obtained by recursion from the gyroscope integral after zero bias compensation. The historical record marking module accordingly marks the attitude data and trajectory coordinates generated in that period as the source of the gyroscope calculation, and simultaneously records the real-time magnetic field strength value at the switching moment and during the pure inertial mode operation. During the transition period between modes, the attitude smoothing scheduling module performs a weighted fusion of the magnetometer-calculated attitude and the gyroscope-derived attitude based on environmental reliability indicators. The attitude data output during this period is neither purely the magnetometer calculation result nor purely the gyroscope recursive result, but a weighted combination of the two. The historical record marking module separately marks this part of the data to distinguish it from the data generated in normal mode and pure inertial mode, ensuring that the subsequent trajectory calculation module can accurately identify the generation method of the attitude data at each measurement point. The above marking information, along with the attitude data and magnetic field strength data, is stored in the system's data recording unit as the basis for trajectory data quality assessment and backtracking analysis.
[0086] Through the aforementioned marking mechanism, the system can clearly distinguish the source attributes of data from each measurement segment during subsequent trajectory calculation and data playback, providing complete traceability information for trajectory accuracy analysis and anomaly investigation. Simultaneously, the separate marking of data in the smooth transition interval ensures that the weighted fusion characteristics of this data are clearly recorded, avoiding trajectory calculation confusion caused by mixed data sources.
[0087] This embodiment establishes a complete mechanism for marking the source of trajectory data and separately marking smooth data, enabling the generation method of attitude data at each measurement point to be accurately traced during multi-mode switching in a magnetic interference environment, thus significantly improving the interpretability and reliability of trajectory data.
[0088] Based on the above embodiments, in this embodiment, the system also introduces a historical depth marking and feedforward threshold offset mechanism to achieve predictive early switching of known magnetic anomaly areas.
[0089] Specifically, during each drilling operation, the historical record marking module not only records the source markers of the trajectory data and the magnetic field strength data, but also stores the depth range of the magnetic anomaly area, the magnetic field anomaly characteristics (including the magnetic field strength variation curves of each axis, the duration of the anomaly, the maximum deviation, etc.), and the corresponding drilling parameters in the system's historical database or readable storage medium. When a new drilling operation is subsequently carried out in the same mining area or an adjacent area, the system reads the previous drilling records stored in the historical record marking module in real time during the drilling start-up phase or during the drilling process to obtain the known depth range and magnetic field anomaly characteristics of the magnetic anomaly area in that region.
[0090] As the drill string advances deeper, the system compares the current hole depth with the historical starting depth of the magnetic anomaly. When the hole depth approaches the upper boundary of the known magnetic anomaly region (e.g., there is still some margin from the starting depth of the anomaly region, such as several meters to tens of meters), the system initiates a feedforward control strategy in advance based on the historical depth markers. Specifically, the working environment self-checking module adjusts the interference judgment threshold range in advance based on the magnetic field anomaly characteristics of the region in the historical records. For example, it narrows the half-width of the threshold range or temporarily reduces the preset coefficient, so that the system can identify the magnetic field anomaly trend before the drill string has fully entered the magnetic anomaly region and when the magnetic field strength only fluctuates slightly, thus determining the decline in environmental reliability indicators earlier.
[0091] Meanwhile, the system pre-triggers the gyroscope's power-on startup, allowing it ample time to warm up, stabilize, and perform zero-bias calculations, thus completing attitude reset preparations before the drill string enters the magnetic anomaly region. When the drill string officially enters the magnetic anomaly region, the system is already in a pure inertial mode ready state and can immediately switch to pure inertial navigation mode without waiting for the magnetometer data to completely fail before triggering the switch.
[0092] Through the synergistic effect of the aforementioned historical depth markers and feedforward threshold offsets, the system can use prior knowledge to predictively switch to known magnetic anomaly areas in advance, avoiding response delays caused by sudden magnetic interference, further shortening the response time of mode switching, improving the timeliness and reliability of pure inertial mode switching, and effectively preventing temporary distortion of attitude calculation due to abnormal magnetometer data during the switching delay period.
[0093] In one specific implementation, the previous drilling records stored in the historical record marking module originate from previous drilling stages of the same borehole, adjacent boreholes in the same mining area, or historical measurement data under the same geological conditions. Based on multiple historical records, the system can continuously optimize the depth positioning accuracy and magnetic field characteristic model of the magnetic anomaly region, gradually optimizing the triggering timing and adjustment range of the feedforward threshold offset, further enhancing the system's continuous adaptability when repeatedly traversing magnetic anomaly regions.
[0094] like Figure 2The present invention also provides a multi-sensor adaptive fusion borehole trajectory measurement system with anti-magnetic interference, comprising: The sensor data acquisition module is used to collect triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process; The working environment self-test module is used to detect the magnetic field interference status of the current environment in real time based on the triaxial magnetic field data, and output an environmental reliability index that characterizes the degree of magnetic field interference. The correction and compensation module is used to take the reference attitude calculated last before the magnetic field interference occurred as the initial value of the recursive attitude under magnetic field interference conditions, and use the angular velocity data collected in the static state to determine the zero bias value. After compensating the subsequent angular velocity data with the zero bias value, the attitude is updated by integration. When the magnetic field returns to normal, the attitude is recalculated with the triaxial acceleration data and the triaxial magnetic field data as the reference, and the cumulative error of the recursive attitude is corrected by the calculation results. The attitude smoothing scheduling module is used to receive the environmental reliability index and continuously adjust the output weight between attitude calculated from magnetic field data and attitude derived from angular velocity data according to the changes in magnetic field interference state, so as to smoothly connect the two attitude calculation results. The trajectory calculation module is used to generate drilling trajectories based on smoothed attitude data.
[0095] The sensor data acquisition module is used to collect triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process. This module, as the physical front end of the system, includes a three-component magnetometer, a three-component accelerometer, and a gyroscope. The magnetometer collects triaxial magnetic field data, the accelerometer collects triaxial acceleration data, and the gyroscope collects triaxial angular velocity data. In one possible implementation, these three sensors are integrated into a nine-axis inertial measurement unit (IMU), synchronously acquiring triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data at a fixed sampling frequency. During system operation, when the environmental self-test module determines that the magnetic environment is normal, the magnetometer and accelerometer power on and operate normally; when the environmental self-test module determines that the magnetic environment is abnormal, the gyroscope powers on, starts, and collects triaxial angular velocity data.
[0096] The working environment self-test module is used to detect the current magnetic field interference status in real time based on the triaxial magnetic field data and output an environmental reliability index characterizing the degree of magnetic field interference. This module is used to generate a continuously changing environmental reliability index based on magnetometer data. During the system initialization phase, the measurement system is placed in a known environment without strong magnetic interference, and triaxial magnetic field reference data sequences covering multiple spatial orientations are collected by the sensor under interference-free conditions. Statistical characteristic parameters of the magnetic field values for each axis are calculated for each reference data sequence. During the formal operation of the borehole trajectory measurement system, the magnetometer outputs triaxial magnetic field measurement values in real time at a fixed frequency. The processor of the working environment self-test module acquires these measurement values in real time, and any reading exceeding the corresponding threshold range is considered an abnormal signal caused by external magnetic field interference.
[0097] The correction and compensation module is used to, under magnetic field interference conditions, take the last calculated reference attitude before the interference occurred as the initial value of the recursive attitude, and use the angular velocity data collected in a stationary state to determine the zero bias value. The attitude is then updated by integrating the subsequent angular velocity data after compensating with this zero bias value. When the magnetic field returns to normal, the attitude is recalculated using the triaxial acceleration data and the triaxial magnetic field data as references, and the accumulated error of the recursive attitude is corrected using the calculation results. This module is responsible for attitude reset, zero bias lock compensation, and reference recalibration after the magnetic environment recovers when switching between normal mode and pure inertial mode.
[0098] The attitude smoothing scheduling module receives the environmental reliability index and continuously adjusts the output weights between attitude calculated from magnetic field data and attitude derived from angular velocity data based on changes in magnetic field interference, thus smoothly connecting the two attitude calculation results. This module continuously adjusts the output weights between the magnetometer-calculated attitude and the gyroscope-derived attitude based on the environmental reliability index, driving the system to smoothly transition from normal mode to pure inertial mode, where the compensated gyroscope independently derives the attitude; when the index recovers, it smoothly transitions back to normal mode.
[0099] The trajectory calculation module is used to generate borehole trajectories based on smoothed attitude data. This module is used to convert discrete measurement point sequences obtained from downhole measurements while drilling into continuous and smooth borehole space curves.
[0100] This embodiment uses a self-test module to generate a continuously changing environmental reliability index based on magnetometer data. When the index exceeds an upper threshold, the system enters normal mode, calculating the drill bit attitude using the accelerometer and magnetometer as references. When the index decreases, the system continuously adjusts the output weights between the magnetometer-calculated attitude and the gyroscope-derived attitude, driving the system to smoothly transition from normal mode to pure inertial mode. When the index recovers, the system smoothly transitions back to normal mode. Without relying on high-end gyroscope hardware, this system eliminates attitude step transitions during mode switching through continuous weight adjustment and extends the effective working time of pure inertial mode through full parameter compensation. This achieves low-cost, high-reliability, and consistently smooth borehole trajectory measurement in complex magnetic interference environments.
[0101] Based on the above embodiments, in some embodiments, the sensor data acquisition module includes a nine-axis inertial measurement unit integrating a magnetometer, an accelerometer, and a gyroscope, used for: Simultaneously acquire triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data; When the working environment self-test module detects magnetic field interference, the gyroscope is powered on and starts collecting three-axis angular velocity data.
[0102] In this embodiment, the sensor data acquisition module includes a nine-axis inertial measurement unit integrating a magnetometer, accelerometer, and gyroscope. This nine-axis inertial measurement unit is used to simultaneously acquire three-axis magnetic field data, three-axis acceleration data, and three-axis angular velocity data. Specifically, the magnetometer, accelerometer, and gyroscope share the same clock reference and output their respective three-component measurement values at the same sampling time, thereby ensuring strict time alignment of the data sources during subsequent multi-sensor fusion calculations. In normal system measurement mode, the magnetometer and accelerometer remain constantly powered, continuously outputting magnetic field and acceleration data, while the gyroscope is in a low-power standby state. When the environmental self-test module detects magnetic field interference, the gyroscope powers on and acquires three-axis angular velocity data, recording a sequence of angular velocity data under stationary conditions for subsequent zero-bias calculation.
[0103] As one implementation method, the nine-axis inertial measurement unit (IMU) can preset the sampling frequency for data acquisition. When magnetic field interference is detected, the gyroscope is powered on from standby mode and starts acquiring data after warm-up and stabilization. In this way, the nine-axis IMU uses the magnetometer and accelerometer as the main data sources in normal mode, and switches to the gyroscope data source in magnetic interference environments, realizing the orderly connection and data complementarity of multiple sensors in the time dimension.
[0104] Based on the above embodiments, in some embodiments, the working environment self-test module is used for: In an environment free from magnetic field interference, a triaxial magnetic field reference data sequence of the measurement system under multiple spatial orientations is acquired, and statistical characteristic parameters of the magnetic field values are calculated for each axis. The statistical characteristic parameters include mean parameters and standard deviation parameters. For each axis, an interference judgment threshold range is constructed with the mean parameter of that axis as the center and the product of the standard deviation parameter and the preset coefficient as the half width. The real-time three-axis magnetic field measurement values of the magnetometer are obtained. When the real-time measurement value of any axis exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is magnetic field interference.
[0105] In this embodiment, the working environment self-test module acquires a triaxial magnetic field reference data sequence of the measurement system in multiple spatial orientations in an environment without magnetic field interference. Specifically, during the system initialization phase, the measurement system is placed in a known environment without strong magnetic interference. After the magnetometer is started, the measurement system is operated to slowly and uniformly rotate and flip along a preset trajectory, so that its three axes point sequentially to multiple different orientations in space, and a set of triaxial magnetic field reference data sequences is continuously acquired at a preset sampling frequency.
[0106] The operating environment self-test module calculates statistical characteristic parameters of the magnetic field values for each axis, including mean and standard deviation parameters. Taking the X-axis as an example, the formulas for calculating the mean and standard deviation are as follows:
[0107]
[0108] Similarly, the mean and standard deviation of the Y-axis and Z-axis can be calculated.
[0109] For each axis, an interference threshold range is constructed with the mean parameter of that axis as the center and the product of the standard deviation parameter and a preset coefficient as the half-width. The preset coefficient is a configurable empirical constant. In one specific implementation, the preset coefficient can be between 3 and 5.
[0110] The working environment self-test module acquires the real-time three-axis magnetic field measurement values of the magnetometer. When the real-time measurement value of any axis exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is magnetic field interference.
[0111] This embodiment constructs a dynamic threshold range through statistical feature parameters, which can adaptively reflect the normal fluctuation range of the magnetic field under different installation environments and temperature conditions, avoiding misjudgment or omission that may occur under complex working conditions with a fixed threshold.
[0112] like Figure 3As shown, the working environment self-test module first collects a reference data sequence in a non-magnetic interference environment, calculates the mean and standard deviation of each axis, and constructs a threshold interval; during real-time measurement, if any axis exceeds the interval, it is determined that there is interference.
[0113] Based on the above embodiments, in some embodiments, the correction and compensation module is used for: At the moment of switching to pure inertial mode, the last frame of valid data before the occurrence of magnetic field interference is acquired. The gravity vector is measured by the accelerometer and the geomagnetic vector is measured by the magnetometer. The current attitude angle of the drill is calculated and the set of attitude angles is used as the initial value of the current attitude of the gyroscope to complete the attitude reset. After the attitude reset is completed, while the system is in a static or quasi-static state, the angular velocity output of each axis of the gyroscope is collected, and the collected values are used as the locked gyroscope zero bias values. After subtracting the locked zero bias value from each frame of angular velocity data output by the gyroscope, the quaternion differential equation is used for integration and updating, and the attitude angle is output in real time.
[0114] In this embodiment, the correction and compensation module acquires the last frame of valid data before the occurrence of magnetic field interference the instant it switches to pure inertial mode. The accelerometer measures the gravity vector, and the magnetometer measures the geomagnetic vector, calculating the current attitude angles of the drill string. This set of attitude angles is used as the initial values of the gyroscope's current attitude, completing the attitude reset. Specifically, this frame of data is the last complete set of three-axis magnetic field data and three-axis acceleration data output by the sensor data acquisition module before the occurrence of magnetic interference. The roll and pitch angles of the drill string are determined by the gravity vector measured by the accelerometer, and the azimuth angle of the drill string is determined by the geomagnetic vector measured by the magnetometer.
[0115] After attitude reset, with the system in a static or quasi-static state, the angular velocity output of each axis of the gyroscope is collected, and the collected values are used as the locked gyroscope zero bias values. Since the drill bit is in a static state, the angular velocity values output by each axis of the gyroscope are the gyroscope zero bias values under the current temperature and current operating conditions.
[0116] Each frame of angular velocity data output by the gyroscope is subtracted from a locked zero bias value, and then updated by integration using quaternion differential equations to output the attitude angle in real time. In one specific implementation, the gyroscope can output three-axis angular velocities at a predetermined frequency, and each frame of data is updated by integration using quaternion differential equations after subtracting the locked zero bias value.
[0117] In one specific implementation, taking the drilling to a certain depth and entering a magnetic interference area as an example, the correction and compensation module immediately triggers a mode switch, calls the last valid data frame before the magnetic interference occurred to calculate the current attitude angle of the probe and overwrites the initial attitude value of the gyroscope, and completes the attitude reset; then, the zero bias value of the gyroscope is locked under static conditions; after that, the gyroscope outputs the three-axis angular velocity at a frequency of 200Hz, and after subtracting the locked zero bias value from each frame of data, the quaternion differential equation is used for integration and update, and the attitude angle is output in real time.
[0118] This embodiment achieves accurate initialization and continuous compensation of gyroscope attitude recursion under magnetic interference environment through a complete process of attitude reset, zero bias locking and compensation integration, effectively eliminating attitude jump at the moment of mode switching.
[0119] Based on the above embodiments, in some embodiments, the attitude smoothing scheduling module is used for: Based on the degree to which the real-time magnetic field measurement deviates from the normal fluctuation range, the magnetic field interference state is divided into multiple levels; Within the confidence interval of the magnetic field data, the output weight of the attitude calculation based on the magnetic field data is set as the first weight value, and the output weight of the attitude calculation based on the angular velocity data is set as the second weight value. Within the mild interference range, the output weight of the attitude calculation based on the magnetic field data gradually decreases from the first weight value to the third weight value, while the output weight of the attitude calculation based on the angular velocity data gradually increases from the second weight value to the fourth weight value. Within the severely disturbed range, the output weight of the attitude calculated from the magnetic field data is set to the third weight value, and the output weight of the attitude calculated from the angular velocity data is set to the fourth weight value.
[0120] In this embodiment, the attitude smoothing scheduling module classifies the magnetic field interference state into multiple levels based on the degree to which the real-time magnetic field measurement value deviates from the normal fluctuation range. Specifically, the attitude smoothing scheduling module determines the level to which the current magnetic field interference level belongs based on the environmental reliability index output by the working environment self-check module, and determines the output weights of the two attitude calculation results accordingly.
[0121] In one specific implementation, the attitude smoothing scheduling module adopts the following weight adjustment strategy: When the magnetometer output value falls within the range [μ When the magnetometer data is within the range of k1·σ, μ+k1·σ, the magnetometer calculation weight is set to 1, and the gyroscope inertial calculation weight is set to 0.
[0122] When the magnetometer output value falls within the range [μ k·σ,μ When [k1·σ] or [μ+k1·σ,μ+k·σ] is used, it is determined that there is a slight interference in the magnetometer data. The weight changes linearly with the degree of deviation. The magnetometer solution weight decreases linearly from 1 to 0.5, and the gyroscope inertial solution weight increases linearly from 0 to 0.5.
[0123] When the magnetometer output value exceeds the range [μ] When k2·σ, μ+k2·σ] is used, the magnetometer data is determined to be severely interfered with. The magnetometer calculation weight is set to 0, the gyroscope inertial calculation weight is set to 1, and the system is completely switched to pure inertial calculation mode.
[0124] Where μ and σ are the mean and standard deviation of the magnetic field values of each axis, respectively, k is a preset coefficient, k1 is the threshold coefficient for mild interference, and k2 is the threshold coefficient for severe interference.
[0125] As a specific example, the preset coefficient k can be 4, the mild interference threshold coefficient k1 can be 2, and the severe interference threshold coefficient k2 can be 6.
[0126] The above weight adjustment process takes real-time magnetic field measurement as input, calculates the weight coefficient at the current moment through piecewise linear mapping relationship, and then performs a weighted summation of the two attitude calculation results to output smoothly connected attitude data.
[0127] This embodiment achieves a smooth transition between the magnetometer calculation mode and the inertial recursion mode through a multi-level weight adjustment mechanism, avoiding data jumps caused by sudden changes in attitude reference during mode switching.
[0128] like Figure 4 As shown, when the magnetometer data is within the confidence interval, the magnetometer weight is 1; after entering the mild interference interval, the weight decreases linearly. Figure 5 As shown, when the deviation increases further into the severe interference range, the weight drops to 0, and the system switches completely to the gyroscope.
[0129] Based on the above embodiments, in some embodiments, the trajectory calculation module is used for: Using the hole depth, apex angle, and azimuth angle of all measuring points as input data, and the hole depth as the independent variable, continuous cubic spline functions are established for the apex angle sequence and azimuth angle sequence of all measuring points respectively. Based on the interpolated continuous vertex angle function and azimuth function, the increment of the geographic coordinate system in each direction under unit hole depth is solved; Using the borehole's geographical coordinates as a reference, the entire increment is accumulated segment by segment to convert the attitude data in the borehole coordinate system into three-dimensional coordinates in the geographical coordinate system, generating a continuous and smooth borehole space curve.
[0130] In this embodiment, the trajectory calculation module uses the borehole depth, apex angle, and azimuth angle of all measuring points as input data, and the borehole depth as the independent variable, to establish continuous cubic spline functions for the apex angle sequence and azimuth angle sequence of all measuring points. Specifically, the borehole depth is denoted as L, the apex angle as θ, and the azimuth angle as φ (i=0, 1, 2...n). The entire borehole is discretized into n adjacent measuring segments [Li, Li+1], and the length of each measuring segment is ΔL=Li+1. Li.
[0131] For each section, construct a cubic spline polynomial function with respect to the borehole depth L:
[0132] In the formula, a i b i c i d i Let S be the coefficient of the i-th polynomial. i (L) is a continuous interpolation function for the apex angle or azimuth angle with respect to the hole depth.
[0133] Using natural boundary conditions, the second derivative of the borehole start point (hole opening L=0) and borehole end point (hole bottom L=Lmax) is constrained to be 0:
[0134] Simultaneously constraining the continuity of functions, first derivatives, and second derivatives at the connection points of adjacent measurement sections, a three-moment equation system is constructed to solve all polynomial coefficients, ensuring that the attitude curve of the entire well is smooth and without inflection points.
[0135] Based on the interpolated continuous vertex angle θ(L) and azimuth angle φ(L), the increments in the geographic coordinate system per unit hole depth are solved differentially. The vertical depth increment is:
[0136] The north-south coordinate increment is:
[0137] The east-west coordinate increment is:
[0138] Using the borehole geographic coordinates (N0, E0, Z0) as a reference, the entire increment is accumulated segment by segment to convert the attitude data in the borehole coordinate system into three-dimensional coordinates in the geographic coordinate system, generating a continuous and smooth borehole space curve.
[0139] This embodiment uses a cubic spline interpolation algorithm to process the discrete measurement point attitude data into a continuous form, so that the apex angle and azimuth angle at any depth of the hole can be accurately obtained. The dual constraints of natural boundary conditions and continuity at the connection point ensure that the entire trajectory curve is smooth and without inflection points, effectively improving the accuracy and smoothness of trajectory calculation.
[0140] Through the above integral accumulation, a continuous and smooth borehole space curve is finally generated, and its three-dimensional view is as follows: Figure 6 As shown, the horizontal projection is as follows Figure 7 As shown.
[0141] Based on the above embodiments, in some embodiments, a history record marking module is further included for: The source of the calculation results for the trajectory data or attitude data is marked, including the source of magnetometer calculation and the source of gyroscope calculation, and the corresponding magnetic field strength data is recorded; In addition, the smoothed data during the switching process between magnetometer calculation and gyroscope inertial calculation is marked separately.
[0142] In this embodiment, the system further includes a historical record marking module. This module is used to mark the source of the calculation results for trajectory data or attitude data, including magnetometer calculation sources and gyroscope calculation sources, and to record the corresponding magnetic field strength data; and to separately mark the smoothed data during the switching process between magnetometer calculation and gyroscope inertial calculation.
[0143] Specifically, during system operation, each set of output attitude data and trajectory coordinates is accompanied by a data source identifier. The identifier field records whether the data was obtained through joint calculation by the magnetometer and accelerometer or through inertial recursion by the gyroscope, and also records the triaxial magnetic field strength measurement value at that moment. For data smoothed by the attitude smoothing scheduling module, the historical record marking module adds an additional smoothing processing identifier so that the original calculated data and smoothed transition data can be distinguished during subsequent data analysis. This marking information is stored together with the attitude data and trajectory coordinates, providing a complete traceability basis for the later quality assessment and anomaly backtracking of the borehole trajectory.
[0144] In one specific implementation, when the system is in normal mode, the drill attitude is calculated jointly by the accelerometer and magnetometer. At this time, the history record marking module marks the attitude data and corresponding trajectory coordinates of the current measuring point as the source of the magnetometer calculation. When the system enters pure inertial mode, the attitude data is obtained by recursion from the gyroscope integral after zero bias compensation. The history record marking module marks the attitude data and trajectory coordinates generated in this period as the source of the gyroscope calculation. In the transition interval of mode switching, the history record marking module marks this part of the data separately to distinguish it from the data generated in normal mode and pure inertial mode.
[0145] This embodiment establishes a complete mechanism for marking the source of trajectory data and separately marking smooth data, enabling the accurate traceability of the generation method of attitude data at each measurement point during multi-mode switching under magnetic interference environment. This significantly improves the interpretability and reliability of trajectory data, providing a reliable data foundation for subsequent trajectory accuracy evaluation and system performance optimization.
[0146] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0147] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0148] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0149] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0150] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A multi-sensor adaptive fusion borehole trajectory measurement method with anti-magnetic interference, characterized in that, include: Acquire triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process; The current magnetic field interference status is detected in real time based on the triaxial magnetic field data, and an environmental reliability index characterizing the degree of magnetic field interference is output. When the magnetic field is under normal conditions, the drill bit attitude is calculated based on the triaxial acceleration data and the triaxial magnetic field data. When magnetic field interference is detected, the drill bit attitude is recursively deduced based on the triaxial angular velocity data. Under magnetic field interference, the reference attitude calculated last before the magnetic field interference occurred is used as the initial value of the recursive attitude, and the zero bias value is determined by the angular velocity data collected in the static state. The attitude is updated by integrating after compensating the subsequent angular velocity data with the zero bias value. When the magnetic field returns to normal, the attitude is recalculated based on the triaxial acceleration data and the triaxial magnetic field data, and the cumulative error of the recursive attitude is corrected using the calculation results. Based on the environmental reliability index, the output weight is continuously adjusted between the attitude calculated from the magnetic field data and the attitude derived from the angular velocity data according to the changes in the magnetic field interference state, so as to smoothly connect the two attitude calculation results. Drilling trajectory is generated based on smoothed attitude data.
2. The method according to claim 1, characterized in that, The acquisition of triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process includes: The nine-axis inertial measurement unit, which integrates a magnetometer, accelerometer, and gyroscope, simultaneously acquires three-axis magnetic field data, three-axis acceleration data, and three-axis angular velocity data. When magnetic field interference is detected, the gyroscope is powered on and starts to collect three-axis angular velocity data, and records a sequence of angular velocity data under static conditions to calculate the zero bias value.
3. The method according to claim 1, characterized in that, The step of detecting the current magnetic field interference status in real time based on the triaxial magnetic field data and outputting an environmental reliability index characterizing the degree of magnetic field interference includes: In an environment free from magnetic field interference, acquire triaxial magnetic field reference data sequences of the measurement system in multiple spatial orientations; Statistical characteristic parameters of the magnetic field values are calculated for each axis, including mean parameters and standard deviation parameters. For each axis, an interference judgment threshold range is constructed with the mean parameter of that axis as the center and the product of the standard deviation parameter and the preset coefficient as the half width. The real-time three-axis magnetic field measurement values of the magnetometer are obtained. When the real-time measurement value of any axis exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is magnetic field interference.
4. The method according to claim 1, characterized in that, The method of recursively calculating the drill bit attitude based on the triaxial angular velocity data includes: When magnetic field interference is detected in the measurement environment, the gyroscope is triggered to collect three-axis angular velocity data, and the angular velocity data is recorded under stationary conditions to calculate the zero bias value, so that the system enters pure inertial navigation mode.
5. The method according to claim 1, characterized in that, The step of using the reference attitude calculated last before the occurrence of magnetic field interference as the initial value of the recursive attitude includes: At the instant of switching to pure inertial mode, the last frame of valid data before the occurrence of magnetic field interference is acquired. The gravity vector is measured by the accelerometer and the geomagnetic vector is measured by the magnetometer. The current attitude angle of the drill is calculated and the set of attitude angles is used as the initial value of the current attitude of the gyroscope to complete the attitude reset.
6. The method according to claim 1, characterized in that, The method of determining the zero bias value using angular velocity data collected in a static state includes: After the attitude reset is completed, when the system is in a static or quasi-static state, the angular velocity output of each axis of the gyroscope is collected, and the collected values are used as the locked gyroscope zero bias value.
7. The method according to claim 1, characterized in that, The process of compensating subsequent angular velocity data with the zero bias value and then integrating to update the attitude includes: After subtracting the locked zero bias value from each frame of angular velocity data output by the gyroscope, the quaternion differential equation is used for integration and updating, and the attitude angle is output in real time.
8. The method according to claim 1, characterized in that, When the magnetic field returns to normal, the attitude is recalculated based on the triaxial acceleration data and the triaxial magnetic field data, and the accumulated error of the recursive attitude is corrected using the calculation results, including: When the magnetic field environment is detected to have returned to normal, the magnetometer and accelerometer are reactivated to jointly calculate the new reference attitude. The reference attitude is compared with the current attitude output by the pure inertial mode to obtain the error. The first part of the error is used to directly correct the current attitude angle, and the second part is used to update the gyroscope zero bias estimate.
9. The method according to claim 1, characterized in that, The step of continuously adjusting the output weights between attitude calculated from magnetic field data and attitude derived from angular velocity data based on the environmental reliability index and according to changes in the magnetic field interference state includes: Based on the degree to which the real-time magnetic field measurement deviates from the normal fluctuation range, the magnetic field interference state is divided into multiple levels; Within the confidence interval of the magnetic field data, the output weight of the attitude calculation based on the magnetic field data is set as the first weight value, and the output weight of the attitude calculation based on the angular velocity data is set as the second weight value. Within the mild interference range, the output weight of the attitude calculation based on the magnetic field data gradually decreases from the first weight value to the third weight value, while the output weight of the attitude calculation based on the angular velocity data gradually increases from the second weight value to the fourth weight value. Within the severely disturbed range, the output weight of the attitude calculated from the magnetic field data is set to the third weight value, and the output weight of the attitude calculated from the angular velocity data is set to the fourth weight value.
10. The method according to claim 1, characterized in that, The generation of the drilling trajectory based on the smoothed attitude data includes: Using the hole depth, apex angle, and azimuth angle of all measuring points as input data, and the hole depth as the independent variable, continuous cubic spline functions are established for the apex angle sequence and azimuth angle sequence of all measuring points respectively. Based on the interpolated continuous vertex angle function and azimuth function, the increment of the geographic coordinate system in each direction under unit hole depth is solved; Using the borehole's geographical coordinates as a reference, the entire increment is accumulated segment by segment to convert the attitude data in the borehole coordinate system into three-dimensional coordinates in the geographical coordinate system, generating a continuous and smooth borehole space curve.
11. The method according to claim 1, characterized in that, Also includes: The trajectory data is marked, and the source of the calculation results of the trajectory coordinates or attitude data is recorded. The source includes the magnetometer calculation source and the gyroscope calculation source, and the corresponding magnetic field strength data is recorded. The smoothed data during the switching process between magnetometer calculation and gyroscope inertial calculation is marked separately.
12. A multi-sensor adaptive fusion borehole trajectory measurement system with anti-magnetic interference, characterized in that, include: The sensor data acquisition module is used to collect triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data during the drilling process; The working environment self-test module is used to detect the magnetic field interference status of the current environment in real time based on the triaxial magnetic field data, and output an environmental reliability index that characterizes the degree of magnetic field interference. The correction and compensation module is used to take the reference attitude calculated last before the magnetic field interference occurred as the initial value of the recursive attitude under magnetic field interference conditions, and use the angular velocity data collected in the static state to determine the zero bias value. After compensating the subsequent angular velocity data with the zero bias value, the attitude is updated by integration. When the magnetic field returns to normal, the attitude is recalculated with the triaxial acceleration data and the triaxial magnetic field data as the reference, and the cumulative error of the recursive attitude is corrected by the calculation results. The attitude smoothing scheduling module is used to receive the environmental reliability index and continuously adjust the output weight between attitude calculated from magnetic field data and attitude derived from angular velocity data according to the changes in magnetic field interference state, so as to smoothly connect the two attitude calculation results. The trajectory calculation module is used to generate drilling trajectories based on smoothed attitude data.
13. The system according to claim 12, characterized in that, The sensor data acquisition module includes a nine-axis inertial measurement unit integrating a magnetometer, accelerometer, and gyroscope, used for: Simultaneously acquire triaxial magnetic field data, triaxial acceleration data, and triaxial angular velocity data; When the working environment self-test module detects magnetic field interference, the gyroscope is powered on and starts collecting three-axis angular velocity data.
14. The system according to claim 12, characterized in that, The working environment self-test module is used for: In an environment free from magnetic field interference, a triaxial magnetic field reference data sequence of the measurement system under multiple spatial orientations is acquired, and statistical characteristic parameters of the magnetic field values are calculated for each axis. The statistical characteristic parameters include mean parameters and standard deviation parameters. For each axis, an interference judgment threshold range is constructed with the mean parameter of that axis as the center and the product of the standard deviation parameter and the preset coefficient as the half width. The real-time three-axis magnetic field measurement values of the magnetometer are obtained. When the real-time measurement value of any axis exceeds the interference judgment threshold range corresponding to that axis, it is determined that there is magnetic field interference.
15. The system according to claim 12, characterized in that, The correction and compensation module is used for: At the moment of switching to pure inertial mode, the last frame of valid data before the occurrence of magnetic field interference is acquired. The gravity vector is measured by the accelerometer and the geomagnetic vector is measured by the magnetometer. The current attitude angle of the drill is calculated and the set of attitude angles is used as the initial value of the current attitude of the gyroscope to complete the attitude reset. After the attitude reset is completed, while the system is in a static or quasi-static state, the angular velocity output of each axis of the gyroscope is collected, and the collected values are used as the locked gyroscope zero bias values. After subtracting the locked zero bias value from each frame of angular velocity data output by the gyroscope, the quaternion differential equation is used for integration and updating, and the attitude angle is output in real time.
16. The system according to claim 12, characterized in that, The attitude smoothing scheduling module is used for: Based on the degree to which the real-time magnetic field measurement deviates from the normal fluctuation range, the magnetic field interference state is divided into multiple levels; Within the confidence interval of the magnetic field data, the output weight of the attitude calculation based on the magnetic field data is set as the first weight value, and the output weight of the attitude calculation based on the angular velocity data is set as the second weight value. Within the mild interference range, the output weight of the attitude calculation based on the magnetic field data gradually decreases from the first weight value to the third weight value, while the output weight of the attitude calculation based on the angular velocity data gradually increases from the second weight value to the fourth weight value. Within the severely disturbed range, the output weight of the attitude calculated from the magnetic field data is set to the third weight value, and the output weight of the attitude calculated from the angular velocity data is set to the fourth weight value.
17. The system according to claim 12, characterized in that, The trajectory calculation module is used for: Using the hole depth, apex angle, and azimuth angle of all measuring points as input data, and the hole depth as the independent variable, continuous cubic spline functions are established for the apex angle sequence and azimuth angle sequence of all measuring points respectively. Based on the interpolated continuous vertex angle function and azimuth function, the increment of the geographic coordinate system in each direction under unit hole depth is solved; Using the borehole's geographical coordinates as a reference, the entire increment is accumulated segment by segment to convert the attitude data in the borehole coordinate system into three-dimensional coordinates in the geographical coordinate system, generating a continuous and smooth borehole space curve.
18. The system according to claim 12, characterized in that, It also includes a history tagging module for: The source of the calculation results for the trajectory data or attitude data is marked, including the source of magnetometer calculation and the source of gyroscope calculation, and the corresponding magnetic field strength data is recorded; In addition, the smoothed data during the switching process between magnetometer calculation and gyroscope inertial calculation is marked separately.