A method and system for inertial integral positioning and downhole constraint correction based on miniature downhole sensors

By combining inertial integral positioning with downhole constraint correction methods, and using wellbore and fluid constraint models to correct the micro downhole sensor, the problems of multi-point distribution of downhole temperature and pressure monitoring and accumulation of inertial integral errors are solved, achieving high-precision downhole positioning.

CN122304713APending Publication Date: 2026-06-30YANGTZE UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANGTZE UNIVERSITY
Filing Date
2026-05-29
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing downhole temperature and pressure monitoring technologies struggle to obtain in-situ distribution information at multiple points and times within the wellbore, and pure inertial integral positioning errors accumulate rapidly over time, failing to meet the positioning requirements of miniature downhole sensors.

Method used

An inertial integral positioning method combined with downhole constraint correction is adopted. By constructing a wellbore spatial constraint model and a fluid property constraint model, the drift of the inertial measurement unit is corrected using known wellbore trajectory and downhole fluid property parameters. An error state Kalman filter framework is used for fusion correction.

Benefits of technology

High-precision three-dimensional motion trajectory estimation of miniature downhole sensors was achieved without external positioning signals, suppressing the accumulation of inertial integration errors and improving positioning accuracy and reliability. It is suitable for long-distance positioning in high-temperature downhole environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122304713A_ABST
    Figure CN122304713A_ABST
Patent Text Reader

Abstract

This application discloses an inertial integral positioning and downhole constraint correction method and system based on a miniature downhole sensor. The method includes: acquiring triaxial angular velocity and triaxial acceleration data from the miniature downhole sensor; recursively obtaining predicted position, predicted velocity, and predicted attitude based on quaternion attitude calculation and inertial integral algorithm; constructing a wellbore spatial constraint model based on known wellbore trajectory and wellbore diameter parameters, and constructing a fluid property constraint model based on downhole fluid property parameters; generating the two types of constraint correction quantities independently and without coupling; employing an error state Kalman filter framework to filter and update the two types of correction quantities as observation information, and injecting the error state into the nominal state to output a three-dimensional motion trajectory estimate. This method continuously corrects inertial positioning drift by introducing wellbore and fluid constraint information, achieving usable positioning results for the sensor even without external positioning signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of downhole measurement and positioning technology, specifically to an inertial integral positioning and downhole constraint correction method and system based on a miniature downhole sensor. Background Technology

[0002] In oil and gas drilling, downhole temperature and pressure fields are important parameters reflecting wellbore conditions, formation conditions, and drilling safety. Current downhole temperature and pressure monitoring mainly relies on measurement while drilling (MWD) technology, which has a limited number of measurement points and makes it difficult to obtain in-situ temperature and pressure distribution information at multiple points and times within the wellbore.

[0003] In recent years, miniaturized downhole sensors have gradually attracted attention. By encapsulating micro-sensors on the order of millimeters to centimeters and deploying them from the wellhead, they can move with the drilling fluid in the wellbore and annulus, enabling dynamic acquisition of downhole temperature and pressure parameters without affecting normal drilling circulation. However, because these micro-sensors are in a passive, flow-dependent state downhole, they cannot establish a definite reference relationship with the flow channel. Furthermore, external positioning methods such as satellite positioning, wireless base stations, or visual positioning cannot be used in the downhole environment, making it difficult to accurately correlate the temperature and pressure data acquired by the sensors with specific well depths or spatial locations.

[0004] An inertial measurement unit (IMU) can calculate the trajectory of a vehicle by integrating angular velocity and linear acceleration over time, providing independent positioning capability even without external positioning. However, pure inertial integration suffers from the problem of rapid error accumulation over time, especially when the motion is uncontrollable and attitude changes are complex. In such cases, positioning errors tend to diverge, making it difficult to meet the positioning requirements of downhole micro-sensors.

[0005] Therefore, there is an urgent need for a positioning method suitable for miniature downhole sensors that move freely with drilling fluid. Without relying on external positioning signals, this method should use known wellbore information as constraints to continuously correct IMU drift, thereby achieving accurate calculation of sensor trajectory and spatial correlation of downhole measurement data. Summary of the Invention

[0006] To address the technical problems in the prior art, this application provides an inertial integral positioning and downhole constraint correction method and system based on a miniature downhole sensor.

[0007] The inertial integral positioning and downhole constraint correction method and system based on miniature downhole sensors provided in this application adopt the following technical solution: An inertial integral positioning and downhole constraint correction method based on a miniature downhole sensor includes the following steps: S1. Inertial positioning steps: Collect the triaxial angular velocity and triaxial acceleration data of the miniature downhole sensor that moves with the fluid in the wellbore. Based on quaternion attitude calculation and inertial integration algorithm, recursively obtain the predicted position, predicted velocity and predicted attitude of the sensor in the downhole space. S2. Downhole constraint correction step: Construct a wellbore spatial constraint model based on the known wellbore trajectory and wellbore diameter parameters, and construct a fluid property constraint model based on the downhole fluid property parameters. Construct constraint correction quantities for the predicted state output by the inertial positioning step, wherein the wellbore spatial constraint model generates wellbore spatial constraint correction quantities, and the fluid property constraint model generates fluid property constraint correction quantities. The two types of constraint correction quantities are constructed independently and are not coupled to each other. S3. Fusion Correction Step: Using the error state Kalman filter framework, the predicted state output by the inertial positioning step is used as the nominal state, and the wellbore space constraint correction amount and fluid property constraint correction amount are used as observation information. Filtering and updating are performed in the error state space, the estimated error state is injected into the nominal state, and the constrained correction three-dimensional motion trajectory estimate is output.

[0008] An inertial integral positioning and downhole constraint correction system based on a miniature downhole sensor includes: The inertial positioning module includes a data acquisition unit, an attitude calculation unit, and an inertial integration unit. It is used to acquire three-axis angular velocity and three-axis acceleration data of the miniature downhole sensor. Based on quaternion attitude calculation and inertial integration algorithm, it recursively obtains the sensor's predicted state vector. The predicted state vector includes predicted position, predicted velocity, predicted attitude quaternion, accelerometer bias estimate, gyroscope bias estimate, and accelerometer scale factor error estimate. The wellbore spatial constraint correction unit is used to construct a wellbore spatial constraint model based on the known wellbore trajectory and wellbore diameter parameters. When the shortest distance from the sensor predicted position to the wellbore centerline in the inertial positioning result exceeds the wellbore radius, the wellbore spatial constraint correction amount containing the position correction residual and the velocity correction residual is generated through spatial orthogonal projection correction and velocity radial component soft constraint. The fluid property constraint correction unit is used to construct a fluid velocity field model and a sensor slip velocity model based on downhole fluid property parameters. By constructing the velocity residual between the inertial predicted velocity and the theoretical velocity of the fluid model, and the position residual between the inertial predicted position and the fluid predicted position, the fluid property constraint correction amount is generated. The fusion correction module employs an error state Kalman filter framework, using the predicted state output by the inertial positioning module as the nominal state. It concatenates the wellbore space constraint correction and fluid property constraint correction into a global observation vector for filtering and fusion. The estimated attitude error angle in the error state is injected into the attitude quaternion of the nominal state through quaternion multiplication to maintain the unit norm constraint. The position error and velocity error are injected into the corresponding components of the nominal state through addition. The estimated zero bias and scale factor errors are fed back to the inertial positioning module for inertial prediction compensation at the next moment. Finally, the module outputs the constrained and corrected three-dimensional motion trajectory estimate.

[0009] In summary, this application includes at least one of the following beneficial technical effects: 1. By introducing the wellbore spatial constraint model and fluid property constraint model into the inertial integration positioning process, the accumulated drift error of the inertial measurement unit is continuously corrected using the known wellbore trajectory, well diameter parameters and fluid property parameters. This enables the miniature downhole sensor to obtain usable three-dimensional motion trajectory estimates in downhole environments without external positioning signals such as satellite positioning or wireless base stations, thus solving the problem that the positioning results become unusable due to the rapid divergence of pure inertial integration error over time. 2. By designing the wellbore space constraint correction and fluid property constraint correction as independently constructed and uncoupled structures, the two types of constraints generate corrections based on the wellbore geometric boundary and fluid dynamic characteristics respectively, and then send them into the error state Kalman filter framework for fusion. This avoids the error propagation that may be introduced by the cross coupling between the two types of constraints. At the same time, it is convenient to independently adjust the weight parameters of each constraint or selectively enable a single constraint according to different well conditions. 3. By explicitly modeling the accelerometer bias, gyroscope bias, and accelerometer scale factor error in the predicted state vector, and feeding back the bias and scale factor errors obtained from filtering estimation in the fusion correction step to the inertial prediction model at the next moment to form a closed-loop correction circuit, online estimation and real-time compensation of sensor hardware parameter drift are realized, reducing the impact of sensor parameter changes caused by environmental factors such as high underground temperatures on positioning accuracy. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating the overall system architecture of the present invention. Figure 2 This is a schematic diagram of the structure of the miniature downhole sensor of the present invention; Figure 3 This is a schematic diagram illustrating the principle of orthogonal projection correction of wellbore space in this invention; Explanation of reference numerals in the attached diagram: 1-Spherical shell; 2-Circuit board; 3-Inertial measurement unit; 4-Battery; 5-Temperature and pressure sensor. Detailed Implementation

[0011] The technical solutions in the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. The described embodiments are only possible technical implementations of the present invention, but are not limited thereto. Other embodiments obtained by those skilled in the art in conjunction with the embodiments of the present invention without creative effort are also within the protection scope of the present invention.

[0012] This application mainly adopts the method of inertial integral positioning combined with downhole constraint correction, which achieves the effect of accurately calculating the motion trajectory of the miniature downhole sensor under the condition of no external positioning signal. The following is a further detailed description of this application.

[0013] Example 1 Please refer to Figures 1-3 The inertial integration positioning and downhole constraint correction method based on a micro downhole sensor provided in this application includes an inertial positioning step, a downhole constraint correction step, and a fusion correction step. The inertial positioning step obtains the sensor's predicted state; the downhole constraint correction step constructs correction values ​​based on wellbore and fluid constraints; and the fusion correction step uses these correction values ​​for filtering and updating, ultimately outputting a constraint-corrected three-dimensional motion trajectory estimate. This effectively suppresses the accumulation of pure inertial integration errors and achieves high-precision positioning. This is because introducing wellbore geometric boundary constraints and hydrodynamic constraints into the inertial positioning process continuously corrects IMU drift and avoids rapid error accumulation. The wellbore spatial constraint correction value generated by the wellbore spatial constraint model and the fluid property constraint correction value generated by the fluid property constraint model are constructed independently and are not coupled. This avoids error propagation that may be introduced by cross-coupling and facilitates flexible activation or adjustment of the weights of each constraint according to actual working conditions.

[0014] Please refer to Figure 2 Specifically, the inertial positioning process includes data acquisition, attitude calculation, and inertial integration.

[0015] The data acquisition section utilizes suitable data acquisition equipment, such as a specific model of sensor data acquisition card, which can accurately acquire the triaxial angular velocity and triaxial acceleration data of a miniature downhole sensor moving with the fluid within the wellbore. The miniature downhole sensor is encapsulated in a spherical shell 1, inside which is mounted a circuit board 2. The circuit board 2 integrates an inertial measurement unit 3 (IMU), which includes a triaxial accelerometer and a triaxial gyroscope for acquiring triaxial acceleration and angular velocity data. The spherical shell 1 also houses a battery 4 to power the entire sensor, and a temperature and pressure sensor 5 for synchronously acquiring downhole temperature and pressure data. The spherical design of the shell 1 ensures good isotropy of the sensor as it moves with the fluid within the wellbore, reducing the impact of fluid resistance on its motion. Alternatively, other devices with similar data acquisition capabilities, such as highly integrated multi-parameter data acquisition modules, can also be used.

[0016] Attitude calculation employs a quaternion update method based on quaternion unit norm constraints. The attitude update satisfies the differential equation. , here It is a posture quaternion. It is a pure quaternion composed of the angular velocities of the three axes. This refers to quaternion multiplication. In discrete-time conditions, it is represented as... ,in For quaternion exponent mapping, This update method automatically maintains the unit norm of quaternions within a given sampling period. In practical applications, these calculations can be performed using dedicated quaternion processing chips or software algorithms. Alternatively, other attitude calculation algorithms that guarantee the unit norm of quaternions can be employed, such as attitude calculation methods based on Euler angle transformation, but these may require additional normalization processing.

[0017] The above quaternion attitude calculation process is as follows: at each sampling time, the inertial measurement unit 3 collects the three-axis angular velocities. Constructed as a pure quaternion Then through quaternion exponential mapping Calculate the incremental rotation quaternion and then compare it with the attitude quaternion from the previous time step. Perform quaternion multiplication to obtain the attitude quaternion at the current time step. Due to the mathematical properties of quaternion exponential mappings, the updated quaternions automatically satisfy the unit norm constraint. No additional normalization step is required, thus avoiding the accumulation of normalization errors. Compared to Euler angle representation, quaternion representation does not have gimbal lock issues, making it particularly suitable for scenarios with complex attitude changes in downhole sensors.

[0018] Constructing a direction cosine matrix from the vehicle coordinate system to the geographic coordinate system based on attitude quaternions. Acceleration in the carrier coordinate system Convert to a geographic coordinate system, i.e. And perform gravity compensation to obtain the actual motion acceleration. ,in This is the gravitational acceleration vector. This process can be performed using matrix operations with the help of some high-precision mathematical libraries.

[0019] Based on real motion acceleration, velocity and position are recursively derived using the following formula: and By iterating through these formulas, the predicted position, velocity, and attitude of the sensor in the downhole space can be obtained.

[0020] The predicted state vector output by the inertial positioning step is ,in To predict the location, To predict speed, To predict attitude quaternions and satisfy For accelerometer zero bias estimation, For gyroscope zero bias estimation, For accelerometer scale factor error estimation, the initial value of the predicted state vector is set based on the known position, velocity, and attitude of the sensor at the time of deployment, while the initial values ​​of the zero bias and scale factor are set to the zero vector or based on the calibration results.

[0021] The above-mentioned inertial integration process is as follows: After the sensor is deployed from the wellhead, the inertial integration unit uses the known position, velocity, and attitude of the sensor at the time of deployment as the initial state, and performs inertial integration in each sampling period. First, the direction cosine matrix at the current moment is obtained through the attitude calculation unit. Then, the acceleration in the carrier coordinate system collected by the inertial measurement unit 3 Convert to a geographic coordinate system and subtract the gravitational component to obtain the true acceleration. Finally, the sensor's motion trajectory is calculated by gradually accumulating the velocity and position using recursive formulas. The technical advantage of this process is that by combining inertial measurement data with attitude information, the three-dimensional motion trajectory of the sensor can be independently calculated without external positioning signals, providing a basic predicted state for subsequent constraint corrections.

[0022] These data acquisition, attitude calculation, and inertial integration processes work together to obtain accurate attitude information from the collected raw data. Then, by combining the actual acceleration after gravity compensation, velocity and position are recursively calculated, ultimately yielding a complete predicted state vector, which provides a foundation for subsequent constraint corrections.

[0023] Please refer to Figure 3 Specifically, the downhole constraint correction steps include wellbore space constraint correction and fluid property constraint correction.

[0024] The construction and modification process of the wellbore spatial constraint model is as follows: Let the wellbore trajectory centerline be a parametric curve. , Given the well depth parameter, calculate the shortest distance from the sensor's predicted location to the wellbore centerline. ,in In order to make Find the minimum well depth parameter. This minimum problem can be solved using numerical optimization algorithms, such as gradient descent or Newton's method. When When the location solution is determined to violate the wellbore space constraints, where Where is the wellbore radius; when When the sensor is located on the wellbore centerline, constraint correction is not triggered. When the constraint is violated, the inertial calculation position is corrected to the wellbore boundary through orthogonal projection to obtain the constraint-corrected position. ,in The closest point on the center line of the wellbore. It is a radial unit vector.

[0025] The above-mentioned wellbore space constraint correction process is as follows: At each moment, the system first calculates the wellbore trajectory parameter curves based on the known curves. and wellbore parameters The sensor's predicted position is output by the inertial positioning step. Shortest distance to the centerline of the wellbore .if This indicates that the position drift of the inertial integral has caused the predicted position to exceed the physical boundary of the wellbore. At this point, orthogonal projection is used to pull the predicted position back to the wellbore boundary along the radial direction. The technical effect of this correction process is that by using the geometric boundary of the wellbore as a hard constraint, the position error of the inertial integral is limited to the wellbore space, effectively preventing the divergence of the position solution. Especially when the inertial integral error accumulates significantly after the sensor has been moving for a long time, this constraint can significantly improve the positioning accuracy.

[0026] The wellbore space constraint correction process also includes soft constraints on the radial velocity component. The degree of constraint violation is calculated. Soft constraint correction for radial velocity scalar ,in The radial velocity scalar before correction, i.e., the projection of the predicted velocity in the radial direction; This represents the adaptive coefficient for the radial velocity soft constraint. The complete velocity correction expression is: , in, For the tangential velocity component. The wellbore space constraint correction is defined as follows: ,in To correct the position residual, Correct the residual for velocity.

[0027] The working process of the aforementioned radial velocity component soft constraint is as follows: when the sensor predicts a position beyond the wellbore boundary, not only is the position corrected, but the velocity also needs to be corrected accordingly. The radial velocity component soft constraint is determined by the degree of constraint violation. The attenuation magnitude from adaptively adjusting the radial velocity: when the sensor's predicted position just exceeds the wellbore boundary, The radial velocity decay is also smaller; when the predicted location deviates significantly from the wellbore boundary, The radial velocity is significantly reduced due to its larger size. Simultaneously, the tangential velocity component... This soft constraint remains unchanged, ensuring that the sensor's movement along the wellbore direction is unaffected. The advantages of this soft constraint are: it avoids sudden velocity changes and filter instability that could be caused by hard constraints, and it allows for a smooth transition of the sensor's motion state through gradual velocity correction, thus improving the robustness of the positioning system.

[0028] The process of constructing and revising the fluid property constraint model includes: modeling the fluid velocity field, assuming the first... The fluid velocity at time is ,in The axial scalar velocity of the fluid. For the wellbore trajectory at the nearest point The tangential unit vector along the direction of increasing well depth is... Calculated. Slip velocity modeling, the slip velocity of the sensor relative to the fluid. Satisfying the dynamic equations Under steady-state conditions, i.e. At that time, the magnitude of the sliding velocity satisfies The direction of the sliding velocity is approximately determined by the direction of the effective gravity: ,in For sensor density, For fluid density, For sensor volume, For the cross-sectional area facing the airflow, The drag coefficient, For the additional quality coefficient, Let be the gravitational acceleration vector. Construct the velocity residual as... .

[0029] The working process of the above fluid property constraint model is as follows: the system uses known downhole fluid property parameters (including fluid density) to... Fluid dynamic viscosity axial scalar velocity of fluid (etc.) and the sensor's own physical parameters (including sensor density) ,volume Frontal cross-sectional area (etc.) First, a fluid velocity field model is established to determine the fluid velocity vector at the sensor's location. Then, a slip velocity model is established to calculate the slip velocity of the sensor relative to the fluid. Finally, the sum of the fluid velocity and the slip velocity is taken as the theoretical velocity of the sensor, and compared with the predicted velocity output by the inertial positioning step to construct the velocity residual. The technical effect of this constraint model is that it provides an independent reference benchmark for the sensor's motion velocity by utilizing the physical laws of fluid dynamics, so that even when the accumulated velocity error of the inertial integral is large, the velocity estimate can be brought back to a reasonable range through fluid constraints.

[0030] The fluid property constraint correction process also includes: adjusting the slip velocity vector Decomposed into axial slip components tangential to the wellbore centerline Radial settlement component perpendicular to the well axis :

[0031] Where the drag coefficient A function of the Reynolds number:

[0032] in For sensor feature dimensions, This refers to the fluid dynamic viscosity.

[0033] The velocity is corrected to obtain the velocity under fluid constraints:

[0034] in This represents the speed constraint weighting coefficient.

[0035] Position prediction based on fluid motion yields the predicted fluid position. :

[0036] Construction location residual The position after fluid constraint correction is obtained:

[0037] in These are the position constraint weighting coefficients.

[0038] The fluid property constraint correction is defined as:

[0039] in .

[0040] The complete working process of the above fluid property constraint correction is as follows: First, the slip velocity is decomposed into two components: axial and radial. The axial slip component reflects the velocity difference of the sensor relative to the fluid along the wellbore direction, while the radial settlement component reflects the tendency of the sensor to settle towards the bottom of the wellbore under gravity. (Drag coefficient) Based on dynamic calculations using the current Reynolds number, the slip velocity model is made adaptable to changes in fluid resistance under different flow velocity conditions. Then, velocity constraint weighting coefficients are used... The inertial predicted velocity is weighted and corrected, and position prediction is performed based on the corrected velocity. Then, position constraint weighting coefficients are applied. The inertial prediction position is weighted and corrected. The technical effect of this correction process is that by decomposing the slip velocity, the actual motion state of the sensor in the wellbore can be described more accurately, especially in horizontal and highly inclined well sections, where the radial settlement component has a significant impact on the sensor's trajectory. By adjusting the weighting coefficients, the correction force of fluid constraints on the inertial positioning results can be flexibly controlled, avoiding over-correction or under-correction.

[0041] The wellbore space constraint correction and fluid property constraint correction are independent of each other, and each is constructed based on different physical characteristics. This can avoid the error propagation that may be introduced by cross coupling, and at the same time, it is convenient to flexibly enable or adjust the weight of each constraint according to the actual working conditions.

[0042] Specifically, the fusion correction step employs an error-state Kalman filter framework.

[0043] (a) The error state vector is defined as:

[0044] in For positional error, For speed error, The attitude error angle is represented by a minimized parameterized representation. To reduce the zero bias error of the accelerometer, For gyroscope zero bias error, This is the accelerometer scale factor error.

[0045] (b) Constructing the spatially constrained observation residuals of the wellbore and fluid property constrained observation residuals The residuals from the two types of observations are concatenated to form a global observation vector. And construct the corresponding global observation matrix. and global observation noise covariance matrix .

[0046] (c) Calculate the Kalman gain:

[0047] in Let be the prior error state covariance matrix.

[0048] (d) Update error status:

[0049] in For prior error state estimation, it is usually initialized as a zero vector in error state Kalman filtering.

[0050] (e) Inject the error state into the nominal state, where the quaternion update is performed using quaternion multiplication. To maintain the unit norm constraint, position and velocity are updated additively. .

[0051] The fusion correction steps also include constructing the radially projected Jacobian observation matrix, covariance resetting, adaptive coefficient dynamic adjustment, and zero bias and scale factor feedback compensation. (Observation matrix with wellbore spatial constraints) The Jacobian matrix for radial projection:

[0052] Attitude sensitivity matrix in the observation matrix Through antisymmetric matrix Calculated, specifically ,in Representing vectors corresponding Antisymmetric matrix.

[0053] The observation noise covariance is:

[0054] in For wellbore boundary uncertainty parameters, This represents the radial additional noise figure.

[0055] After updating the wellbore space constraints, the location covariance is reset to prevent overconfidence of the filter due to projection correction.

[0056] in denoted as the projection uncertainty coefficient.

[0057] Adaptive coefficients of radial velocity soft constraint Dynamically adjusted by the current Kalman gain:

[0058] in As the benchmark coefficient, This is the preset reference gain matrix.

[0059] The accelerometer zero bias obtained by filtering estimation gyroscope zero bias and accelerometer scale factor error The feedback is incorporated into the inertial prediction model for the next time step to achieve closed-loop correction. Velocity constraint weighting coefficients. Position constraint weight coefficient Projection uncertainty coefficient Each parameter is independent, controlling the correction intensity of different constraint links separately.

[0060] The complete working process of the above-mentioned fusion correction step is as follows: In each filtering cycle, the system first constructs the prior error state covariance matrix based on the predicted state output by the inertial positioning step as the nominal state. Then, the residuals of the wellbore space constraints observations were calculated separately. and fluid property constrained observation residuals The two are concatenated into a global observation vector. Then, based on the global observation matrix... and global observation noise covariance matrix Calculate Kalman gain The error state is updated and estimated using Kalman gain; finally, the estimated position error is... and speed error By injecting the corresponding components of the nominal state through addition, the attitude error angle is... The attitude quaternions of the nominal state are injected through quaternion multiplication to maintain the unit norm constraint, and the estimated zero bias and scale factor errors are fed back to the inertial positioning module for inertial prediction compensation in the next time step. The technical effects of this fusion correction process are as follows: through the error state Kalman filter framework, observation information from different physical constraints can be fused under a unified probabilistic framework to achieve optimal estimation and correction of inertial integral errors; through covariance reset and adaptive coefficient dynamic adjustment, the adaptability and robustness of the filter under different operating conditions are improved; through the closed-loop feedback of zero bias and scale factor, real-time online correction of sensor hardware drift is achieved, effectively suppressing error accumulation over long-term operation.

[0061] Using the error state Kalman filter framework, the wellbore space constraint correction and fluid property constraint correction are used as observation information to filter and update the error state space. The estimated error state is then injected into the nominal state, and finally, the constrained correction three-dimensional motion trajectory estimate is output.

[0062] The complete working process of the entire device is described below.

[0063] Please refer to Figures 1-3 The entire working process of the inertial integral positioning and downhole constraint correction system based on miniature downhole sensors is as follows: Step 1: Sensor Deployment and Initialization. The spherical casing 1, containing the inertial measurement unit 3, battery 4, and temperature and pressure sensor 5, is deployed from the wellhead into the wellbore. The sensor moves within the wellbore along with the drilling fluid. The system sets the initial value of the predicted state vector based on the sensor's known position, velocity, and attitude at the time of deployment. The initial values ​​of the zero bias and scale factor are set to the zero vector or based on calibration results. Simultaneously, the error state covariance matrix is ​​initialized.

[0064] Step Two: Inertial Data Acquisition and Prediction. During the sensor's movement with the fluid, the inertial measurement unit 3 operates at a fixed sampling period. The system continuously collects triaxial angular velocity and triaxial acceleration data. The attitude calculation unit uses a quaternion update method based on quaternion unit norm constraints to recursively update the attitude quaternions using triaxial angular velocity data. The inertial integral unit constructs the direction cosine matrix based on attitude quaternions. The acceleration in the carrier coordinate system is transformed to the geographic coordinate system and gravity compensation is performed. Then, the predicted velocity is calculated using a recursive formula for velocity and position. and predicted location Output the complete predicted state vector .

[0065] Step 3: Wellbore Space Constraint Correction. The wellbore space constraint correction unit receives the predicted position output by the inertial positioning module. Calculate its trajectory centerline to the known wellbore. shortest distance .like If the position solution violates the wellbore space constraints, the predicted position is corrected to the wellbore boundary through orthogonal projection. At the same time, soft constraint correction is applied to the radial velocity component to generate a residual containing the position correction. and velocity correction residual Wellbore space constraint correction amount .like If so, wellbore space constraint correction will not be triggered.

[0066] Step 4: Fluid Property Constraint Correction. The fluid property constraint correction unit establishes a fluid velocity field model and a sensor slip velocity model based on known downhole fluid property parameters, and calculates the fluid velocity at the sensor location. and slip velocity The slip velocity is decomposed into axial slip and radial settlement components, and the drag coefficient is dynamically calculated based on the Reynolds number. The velocity residual between the constructed inertial predicted velocity and the theoretical velocity of the fluid model. Through speed constraint weighting coefficient The velocity is corrected, and the position is predicted based on the corrected velocity to construct the position residual. Through position constraint weight coefficients The position is corrected to generate fluid property constraint correction amounts. Steps three and four are executed independently, and the two types of constraint corrections are not coupled.

[0067] Step 5: Fusion Correction and State Update. The fusion correction module will update the residuals of wellbore space-constrained observations. and fluid property constrained observation residuals Concatenate into a global observation vector Construct a global observation matrix and global observation noise covariance matrix Calculate Kalman gain Filtering and updating are performed in the error state space to estimate the error state vector. Then, the position and velocity errors are injected into the nominal state through addition, and the attitude error angle is injected into the attitude quaternion of the nominal state through quaternion multiplication. The constrained and corrected three-dimensional position, velocity, and attitude of the sensor are then output. Simultaneously, the position covariance is reset, and the adaptive coefficient of the radial velocity soft constraint is dynamically adjusted. .

[0068] Step Six: Closed-Loop Feedback and Iteration. The accelerometer zero bias obtained from the filtered estimation is then... gyroscope zero bias and accelerometer scale factor error The feedback is sent to the inertial positioning module for inertial prediction compensation in the next moment, achieving closed-loop correction. The system returns to step two to begin processing the next sampling cycle, and this process is repeated iteratively until the sensor's motion ends or it is retrieved.

[0069] Through iterative steps one through six, the entire system continuously performs inertial positioning, constraint correction, and fusion correction throughout the sensor's movement with the fluid, constantly correcting the IMU's drift error and ultimately outputting the sensor's complete three-dimensional motion trajectory in the downhole space. Simultaneously, the temperature and pressure data synchronously acquired by the temperature and pressure sensor 5 can be precisely correlated with the constraint-corrected position information, achieving spatial correlation of downhole temperature and pressure parameters.

[0070] The implementation principle of this embodiment is as follows: This method effectively solves the positioning problem of miniature downhole sensors under conditions without external positioning signals by combining inertial positioning and downhole constraint correction. The inertial positioning step provides basic data for subsequent constraint correction. The downhole constraint correction step uses the physical properties of the wellbore and fluid to correct the inertial positioning results, suppressing the accumulation of pure inertial integral errors. The fusion correction step adopts an error state Kalman filter framework, further improving the positioning accuracy and reliability. At the same time, by explicitly modeling the accelerometer bias, gyroscope bias, and scale factor errors in the state vector, and feeding the filtered estimation results back to the inertial prediction model, closed-loop real-time correction of sensor hardware drift is achieved, which is particularly suitable for long-distance positioning in high-temperature downhole environments.

[0071] Example 2 Please refer to Figures 1-3 The inertial integration positioning and downhole constraint correction system based on a micro downhole sensor provided in this application includes an inertial positioning module, a wellbore space constraint correction unit, a fluid property constraint correction unit, and a fusion correction module. The inertial positioning module acquires the sensor's predicted state. The wellbore space constraint correction unit and the fluid property constraint correction unit respectively construct constraint correction values. The fusion correction module filters and fuses these correction values ​​to form a closed-loop correction circuit, achieving high-precision positioning. This is because the modules cooperate with each other, continuously correcting the inertial positioning error using the constraints of the wellbore and fluid, effectively suppressing the accumulation of pure inertial integration error.

[0072] Please refer to Figure 2 Specifically, the inertial positioning module includes a data acquisition unit, an attitude calculation unit, and an inertial integration unit.

[0073] The data acquisition unit uses high-precision sensors to collect triaxial angular velocity and triaxial acceleration data from the miniature downhole sensor, such as MEMS sensors, which have the advantages of small size and low power consumption. The miniature downhole sensor is encapsulated in a spherical shell 1, inside which a circuit board 2 is installed. The circuit board 2 integrates an inertial measurement unit 3, which includes a triaxial accelerometer and a triaxial gyroscope. A battery 4 and a temperature and pressure sensor 5 are also installed inside the spherical shell 1. Of course, high-precision sensors such as fiber optic gyroscopes can also be used to improve the accuracy of data acquisition.

[0074] The attitude calculation unit recursively obtains the sensor's predicted state vector based on quaternion attitude calculation and inertial integration algorithm. The predicted state vector includes predicted position, predicted velocity, predicted attitude quaternion, accelerometer bias estimate, gyroscope bias estimate, and accelerometer scale factor error estimate. The attitude calculation unit can be implemented efficiently using a dedicated attitude calculation chip, or it can be completed on a microcontroller using software algorithms.

[0075] The inertial integrator unit recursively calculates velocity and position based on the results obtained from the attitude calculation unit, and can also use a high-performance processor to improve calculation speed and accuracy.

[0076] The inertial positioning module works as follows: the data acquisition unit continuously acquires raw data of triaxial angular velocity and triaxial acceleration through the inertial measurement unit 3 at a fixed sampling period; the attitude calculation unit receives the triaxial angular velocity data, recursively updates the attitude quaternion based on the quaternion unit norm constraint quaternion update method, and constructs the direction cosine matrix; the inertial integration unit receives the triaxial acceleration data and the direction cosine matrix, transforms the acceleration in the carrier coordinate system to the geographic coordinate system and performs gravity compensation, and then calculates the predicted velocity and predicted position through the velocity and position recursive formulas, and finally outputs a complete predicted state vector containing the predicted position, predicted velocity, predicted attitude quaternion, accelerometer zero bias estimate, gyroscope zero bias estimate and accelerometer scale factor error estimate.

[0077] Please refer to Figure 3 The wellbore spatial constraint correction unit constructs a wellbore spatial constraint model based on known wellbore trajectory and caliber parameters. When the shortest distance from the sensor-predicted position in the inertial positioning results to the wellbore centerline exceeds the wellbore radius, a wellbore spatial constraint correction amount, including position correction residuals and velocity correction residuals, is generated through spatial orthogonal projection correction and soft constraint of the radial velocity component. This unit can use a database to store wellbore trajectory and caliber parameters for easy querying and use.

[0078] The working process of the wellbore space constraint correction unit is as follows: This unit receives the predicted position output by the inertial positioning module, calculates the shortest distance from the predicted position to the wellbore centerline through numerical optimization algorithm based on the stored wellbore trajectory parameter curve and wellbore diameter parameters; when the shortest distance exceeds the wellbore radius, it calculates the nearest point and radial unit vector on the wellbore centerline, corrects the predicted position to the wellbore boundary through orthogonal projection, and performs soft constraint correction on the radial velocity component according to the degree of constraint violation, while keeping the tangential velocity component unchanged; finally, it outputs the wellbore space constraint correction amount, which includes the position correction residual and the velocity correction residual.

[0079] The fluid property constraint correction unit constructs a fluid velocity field model and a sensor slip velocity model based on downhole fluid property parameters. By constructing the velocity residual between the inertial predicted velocity and the theoretical velocity of the fluid model, and the position residual between the inertial predicted position and the fluid predicted position, fluid property constraint correction quantities are generated. This unit can use numerical simulation software to construct the fluid model, improving the model's accuracy.

[0080] The working process of the fluid property constraint correction unit is as follows: Based on known fluid property parameters such as fluid density, fluid dynamic viscosity, and fluid axial scalar velocity, as well as sensor physical parameters such as sensor density, volume, and upstream cross-sectional area, this unit establishes a fluid velocity field model to calculate the fluid velocity vector and establishes a slip velocity model to calculate the sensor's slip velocity relative to the fluid, decomposing it into axial slip and radial settlement components. Then, it constructs the velocity residual between the inertial predicted velocity and the theoretical velocity of the fluid model, corrects the velocity using velocity constraint weighting coefficients, and predicts the position based on the corrected velocity, constructs the position residual, and corrects the position using position constraint weighting coefficients. Finally, it outputs the fluid property constraint correction amount, which includes both the position correction residual and the velocity correction residual. This unit operates independently of the wellbore space constraint correction unit, and the two types of constraint correction amounts are not coupled.

[0081] The fusion correction module employs an error-state Kalman filter framework. Using the predicted state output by the inertial positioning module as the nominal state, it concatenates the wellbore space constraint correction and fluid property constraint correction into a global observation vector for filtering and fusion. The attitude error angles from the estimated error state are injected into the attitude quaternions of the nominal state through quaternion multiplication to maintain the unit norm constraint. Position and velocity errors are injected into their corresponding components in the nominal state through addition. The estimated zero bias and scale factor errors are fed back to the inertial positioning module for inertial prediction compensation in the next time step, outputting a constraint-corrected 3D trajectory estimate. The fusion correction module can utilize a dedicated filtering chip to achieve efficient filtering calculations.

[0082] The fusion correction module works as follows: It receives constraint correction values ​​from the wellbore space constraint correction unit and the fluid property constraint correction unit, respectively, and concatenates the wellbore space constraint observation residuals and fluid property constraint observation residuals into a global observation vector. It constructs a global observation matrix containing the radial projection Jacobian matrix and a global observation noise covariance matrix containing wellbore boundary uncertainty parameters and radial additional noise coefficients. It calculates the Kalman gain, performs filtering updates in the error state space, and estimates the error state vector containing position error, velocity error, attitude error angle, accelerometer bias error, gyroscope bias error, and accelerometer scale factor error. It injects the position error and velocity error into the nominal state through addition, and injects the attitude error angle into the nominal state's attitude quaternion through quaternion multiplication. It resets the position covariance and dynamically adjusts the adaptive coefficient of the radial velocity soft constraint. It feeds back the estimated bias and scale factor errors to the inertial positioning module for inertial prediction compensation at the next moment, forming a closed-loop correction circuit. Finally, it outputs the constrained correction estimate of the sensor's three-dimensional motion trajectory.

[0083] The implementation principle of this embodiment is as follows: The system, through the coordinated work of its various modules, fully utilizes the constraints of the wellbore and fluid to correct and optimize the inertial positioning results. The inertial positioning module provides the basic predicted state, while the wellbore space constraint correction unit and the fluid property constraint correction unit correct the predicted state from different perspectives. The fusion correction module fuses these corrections to form a closed-loop correction circuit, thereby achieving high-precision trajectory estimation of the miniature downhole sensor under conditions without external positioning signals. Simultaneously, the system improves the stability and reliability of positioning through real-time correction of sensor hardware drift, making it suitable for complex downhole environments.

[0084] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Any other corresponding changes and modifications made based on the technical concept of this application should be included within the scope of protection of this application.

Claims

1. A method for inertial integration positioning and downhole constraint correction based on micro downhole sensors, characterized in that, Includes the following steps: S1. Inertial positioning steps: Collect the triaxial angular velocity and triaxial acceleration data of the miniature downhole sensor that moves with the fluid in the wellbore. Based on quaternion attitude calculation and inertial integration algorithm, recursively obtain the predicted position, predicted velocity and predicted attitude of the sensor in the downhole space. S2. Downhole constraint correction step: Construct a wellbore spatial constraint model based on the known wellbore trajectory and wellbore diameter parameters, and construct a fluid property constraint model based on the downhole fluid property parameters. Construct constraint correction quantities for the predicted state output by the inertial positioning step, wherein the wellbore spatial constraint model generates wellbore spatial constraint correction quantities, and the fluid property constraint model generates fluid property constraint correction quantities. The two types of constraint correction quantities are constructed independently and are not coupled to each other. S3. Fusion Correction Step: Using the error state Kalman filter framework, the predicted state output by the inertial positioning step is used as the nominal state, and the wellbore space constraint correction amount and fluid property constraint correction amount are used as observation information. Filtering and updating are performed in the error state space, the estimated error state is injected into the nominal state, and the constrained correction three-dimensional motion trajectory estimate is output.

2. The method of claim 1, wherein, In step S1, the attitude calculation adopts a quaternion update method based on quaternion unit norm constraints, specifically including: The attitude update satisfies the differential equation: wherein, is a pose quaternion, is a pure quaternion composed of three angular velocities, is a quaternion multiplication operation; Under discrete-time conditions, attitude update is expressed as: wherein is a quaternion exponential map, is a sampling period, this update automatically maintains the unit norm of the quaternion; construct a direction cosine matrix from the carrier coordinate system to the geographical coordinate system based on the attitude quaternion convert the acceleration in the carrier coordinate system to the geographical coordinate system: And by performing gravity compensation, the actual acceleration of motion is obtained: wherein is the gravitational acceleration vector; Based on the actual motion acceleration, velocity and position are recursively deduced: 。 3. The method of claim 1, wherein, The predicted state vector output by the inertial positioning step is: wherein is the predicted position, is the predicted velocity, is the predicted attitude quaternion and satisfies is the accelerometer bias estimate, is the gyroscope bias estimate, is the accelerometer scale factor error estimate; the initial values of the predicted state vector are set according to the known position, velocity and attitude at the time of sensor launch, and the initial values of the biases and scale factors are set to zero vectors or according to the calibration results.

4. The method of claim 1, wherein, The process of constructing and revising the wellbore space constraint model includes: (a) Set the wellbore trajectory centerline as a parametric curve , is the well depth parameter, calculate the shortest distance from the sensor predicted position to the wellbore centerline: wherein In order to a well depth parameter taking a minimum value; (b) When When the location solution is determined to violate the wellbore space constraints, where Where is the wellbore radius; when At this time, the sensor is located on the centerline of the wellbore and does not trigger constraint correction; (c) When the constraint is violated, the inertial solution position is corrected to the wellbore boundary through orthogonal projection to obtain the constraint-corrected position: in The closest point on the center line of the wellbore. It is a radial unit vector.

5. The method according to claim 4, characterized in that, The wellbore space constraint correction process also includes soft constraints on the radial velocity component, specifically: Calculate the degree of constraint violation: Soft constraint correction for radial velocity scalar: in The radial velocity scalar before correction, i.e., the projection of the predicted velocity in the radial direction; For the adaptive coefficient of the radial velocity soft constraint; The complete velocity correction expression is: in The tangential velocity component; The wellbore space constraint correction is defined as: in To correct the position residual, Correct the residual for speed.

6. The method according to claim 1, characterized in that, The process of constructing and revising the fluid property constraint model includes: (a) Fluid velocity field modeling: Let the first fluid velocity field inside the wellbore be... The fluid velocity at time is ,in The axial scalar velocity of the fluid. For the wellbore trajectory at the nearest point The tangential unit vector along the direction of increasing well depth is... Calculated; (b) Slip velocity modeling: the slip velocity of the sensor relative to the fluid Satisfying the dynamic equations: Under steady-state conditions, i.e. At that time, the magnitude of the sliding velocity satisfies: The direction of the slip velocity is approximately determined by the direction of the effective gravity: in For sensor density, For fluid density, For sensor volume, For the cross-sectional area facing the airflow, The drag coefficient, For the additional quality coefficient, This is the vector of gravitational acceleration; (c) Construction velocity residual: 。 7. The method according to claim 6, characterized in that, The fluid property constraint correction process also includes: The slip velocity vector Decomposed into axial slip components tangential to the wellbore centerline Radial settlement component perpendicular to the well axis : Where the drag coefficient A function of the Reynolds number: in For sensor feature dimensions, For fluid dynamic viscosity; The velocity is corrected to obtain the velocity under fluid constraints: in For speed constraint weighting coefficients; Position prediction based on fluid motion yields the predicted fluid position. : Construction location residual The position after fluid constraint correction is obtained: in These are the position constraint weighting coefficients; The fluid property constraint correction is defined as: in .

8. The method according to claim 1, characterized in that, The fusion correction step specifically includes: (a) Define the error state vector: in The attitude error angle is represented by a minimized parameter. (b) Constructing the spatially constrained observation residuals of the wellbore and fluid property constrained observation residuals The two types of observation residuals are concatenated into a global observation vector. And construct the corresponding global observation matrix. and global observation noise covariance matrix ; (c) Calculate the Kalman gain: in The prior error state covariance matrix; (d) Update error status: in For prior error state estimation, it is usually initialized as a zero vector in error state Kalman filtering; (e) Inject the error state into the nominal state, where the quaternion update is performed using quaternion multiplication to maintain the unit norm constraint: Position and velocity are updated additively: .

9. The method according to claim 8, characterized in that, The fusion correction step also includes: Observation matrix of wellbore space constraints The Jacobian matrix for radial projection: in This is the sensitivity matrix of the position residual to the attitude error angle. ,in Representing vectors corresponding Antisymmetric matrix; The observation noise covariance is: in For wellbore boundary uncertainty parameters, Radial additional noise figure; After updating the wellbore space constraints, the location covariance is reset to prevent overconfidence of the filter due to projection correction. in Here is the projection uncertainty coefficient; The adaptive coefficient of the radial velocity soft constraint Dynamically adjusted by the current Kalman gain: in As the benchmark coefficient, This is a preset reference gain matrix; The accelerometer zero bias obtained by filtering estimation gyroscope zero bias and accelerometer scale factor error The feedback is fed back into the inertial prediction model at the next moment to achieve closed-loop correction.

10. An inertial integral positioning and downhole constraint correction system based on a miniature downhole sensor, characterized in that, include: The inertial positioning module includes a data acquisition unit, an attitude calculation unit, and an inertial integration unit. It is used to acquire three-axis angular velocity and three-axis acceleration data of the miniature downhole sensor. Based on quaternion attitude calculation and inertial integration algorithm, it recursively obtains the sensor's predicted state vector. The predicted state vector includes predicted position, predicted velocity, predicted attitude quaternion, accelerometer bias estimate, gyroscope bias estimate, and accelerometer scale factor error estimate. The wellbore spatial constraint correction unit is used to construct a wellbore spatial constraint model based on the known wellbore trajectory and wellbore diameter parameters. When the shortest distance from the sensor predicted position to the wellbore centerline in the inertial positioning result exceeds the wellbore radius, the wellbore spatial constraint correction amount containing the position correction residual and the velocity correction residual is generated through spatial orthogonal projection correction and velocity radial component soft constraint. The fluid property constraint correction unit is used to construct a fluid velocity field model and a sensor slip velocity model based on downhole fluid property parameters. By constructing the velocity residual between the inertial predicted velocity and the theoretical velocity of the fluid model, and the position residual between the inertial predicted position and the fluid predicted position, the fluid property constraint correction amount is generated. The fusion correction module employs an error state Kalman filter framework, using the predicted state output by the inertial positioning module as the nominal state. It concatenates the wellbore space constraint correction and fluid property constraint correction into a global observation vector for filtering and fusion. The estimated attitude error angle in the error state is injected into the attitude quaternion of the nominal state through quaternion multiplication to maintain the unit norm constraint. The position error and velocity error are injected into the corresponding components of the nominal state through addition. The estimated zero bias and scale factor errors are fed back to the inertial positioning module for inertial prediction compensation at the next moment. Finally, the module outputs the constrained and corrected three-dimensional motion trajectory estimate.