Well deviation calculation method and device for adaptive Kalman filtering, equipment and medium

By introducing an adaptive noise covariance matrix adjustment mechanism into the Kalman filtering algorithm, the problem of insufficient well inclination measurement accuracy during drilling is solved, and high-precision well inclination measurement is achieved in complex environments.

CN119829903APending Publication Date: 2025-04-15GUOYI QINGNENG TECH (CHONGQING) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510190818.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

During the oil and gas drilling process, it is difficult for the existing technology to accurately judge the well in complex environments such as vibration, temperature changes and equipment state changes, resulting in insufficient measurement accuracy.

Method used

Adaptive Kalman filtering algorithm is used to dynamically adjust the noise covariance matrix in Kalman filtering by determining prediction errors and sensor stability indicators, thereby improving measurement accuracy.

Benefits of technology

In complex drilling environments, high-precision well inclination measurement is achieved, effectively dealing with interference caused by factors such as vibration and temperature changes, and improving the measurement accuracy of well inclination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829903A_ABST
    Figure CN119829903A_ABST
Patent Text Reader

Abstract

The invention discloses a well deviation calculation method, device and equipment for adaptive Kalman filtering and a medium. The method comprises the following steps: determining a prediction error at a moment k and a stability index of a sensor; dynamically adjusting a noise covariance matrix in Kalman filtering according to the prediction error and / or the stability index; based on the adjusted noise covariance matrix, performing Kalman filtering on a measurement value of the sensor at the k + 1 moment to obtain a state estimation value at the k + 1 moment; the state estimation value comprises a well deviation angle and an azimuth angle. By adopting the method, the noise covariance matrix of Kalman filtering can be dynamically adjusted according to real-time data, so that the filtering precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method, device, equipment and medium for calculating well deviation using an adaptive Kalman filter. Background Art

[0002] In the process of oil and gas drilling, well inclination is one of the important steering parameters. Directional well inclination engineering often relies on the static inclination data of measurement while drilling (MWD), and uses the dynamic well inclination of the logging while drilling (LWD) instrument as a reference. However, the well inclination measurement method is limited by the measurement accuracy of the instrument and the interference such as vibration of the instrument during the drilling process, which makes it impossible to accurately judge during the directional and drilling process. Therefore, in the relevant technology, the Kalman filter algorithm is used to process the measurement data of the instrument to improve the measurement accuracy. However, during the drilling process, due to the continuous changes in environmental factors (such as vibration, temperature changes, pressure changes) and equipment status (such as sensor aging, wear, calibration errors, etc.), the traditional Kalman filter algorithm may be difficult to continuously provide the optimal measurement accuracy. Summary of the invention

[0003] Based on this, it is necessary to provide a well deviation calculation method, device, equipment and medium for adaptive Kalman filtering that can improve measurement accuracy in response to the above technical problems.

[0004] A method for calculating well deviation using an adaptive Kalman filter, comprising:

[0005] Determine the prediction error and sensor stability index at time k;

[0006] Dynamically adjust the noise covariance matrix in the Kalman filter according to the prediction error and / or the stability index;

[0007] Based on the adjusted noise covariance matrix, Kalman filtering is performed on the measurement value of the sensor at time k+1 to obtain a state estimation value at time k+1; the state estimation value includes a well inclination angle and an azimuth angle.

[0008] A well deviation calculation device using an adaptive Kalman filter, comprising:

[0009] A determination module, used to determine the prediction error at time k and the stability index of the sensor;

[0010] An adjustment module, used for dynamically adjusting the noise covariance matrix in the Kalman filter according to the prediction error and / or the stability index;

[0011] The filtering module is used to perform Kalman filtering on the measurement value of the sensor at time k+1 based on the adjusted noise covariance matrix to obtain the state estimation value at time k+1; the state estimation value includes the well inclination angle and azimuth angle.

[0012] An electronic device comprises a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the well deviation calculation method of the adaptive Kalman filter is implemented.

[0013] A computer-readable storage medium stores a computer program, which implements the above-mentioned well deviation calculation method of the adaptive Kalman filter when executed by a processor.

[0014] The above-mentioned adaptive Kalman filter well inclination calculation method, device, equipment and medium make the Kalman filter algorithm have adaptive ability, and can automatically adjust the noise covariance matrix according to the prediction error and sensor stability index under different environmental conditions, and then perform Kalman filtering on the sensor measurement value based on the adjusted noise covariance matrix to obtain a high-precision state estimate value, so that the Kalman filter can effectively deal with the interference caused by factors such as vibration and temperature changes during drilling, and improve the measurement accuracy of well inclination. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A schematic diagram of a flow chart of a method for calculating well deviation using an adaptive Kalman filter in one embodiment;

[0016] Figure 2 A schematic diagram of a processing flow of Kalman filtering in one embodiment;

[0017] Figure 3 The figure is a structural block diagram of a well deviation calculation device of an adaptive Kalman filter in one embodiment. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0019] The implementation details of the technical solution of the embodiment of the present application are described in detail below.

[0020] In one embodiment, Figure 1 As shown, Figure 1 A flow chart of a method for calculating well deviation using an adaptive Kalman filter is shown, which may include the following steps:

[0021] Step S101, determining the prediction error and sensor stability index at time k.

[0022] The prediction error refers to the degree of deviation between the predicted value obtained by the Kalman filter at time k and the actual observed value at time k, which can reflect the estimation accuracy of the Kalman filter on the state at time k.

[0023] During the drilling process, sensor data will be affected by external factors such as vibration, temperature change, and oil and gas layer structure, causing the noise characteristics of the sensor to change, which in turn affects the stability of the sensor output. For example, when the sensor is in an environment with strong vibration, the noise fluctuation of the measured data will become larger, and vice versa. Therefore, it is necessary to determine the sensor stability index at time k. The sensor stability index is used to evaluate the reliability and stability of the sensor during the measurement process.

[0024] In one embodiment, the prediction error can be the observation residual at time k, that is, the difference between the predicted observation value and the actual observation value. The actual observation value is the data from the sensor, that is, the measurement value of the sensor at time k is the actual observation value. The predicted observation value is realized by the state prediction value and the observation matrix at time k. Based on this, the observation residual can be expressed as:

[0025]

[0026] Among them, y k is the observed residual, z k is the actual observation value, H is the observation matrix, is the state prediction value at time k, so is the predicted observed value.

[0027] In one embodiment, in order to evaluate the stability and reliability of the prediction error, the prediction error can also be the standard deviation of the observation residual at time k. Specifically, the corresponding observation residual is calculated at each time, and the standard deviation σ in the last N time steps is calculated. y , thus obtaining:

[0028]

[0029] In one embodiment, the prediction error can also be the variance of the observation residual at time k. Specifically, the corresponding observation residual is calculated at each time, and the mean value in the last N time steps is calculated. Then, the variance is calculated by the observed residual and mean corresponding to each moment. Thus we get:

[0030]

[0031] It should be noted that, when observing residuals, in order to improve the reliability of observed residuals, data smoothing can be introduced to reduce the impact of transient abnormal data on error calculation. For example, when calculating the standard deviation or variance of observed residuals, a sliding average filter or an exponentially weighted moving average method can be used to smooth the historical observed residuals, thereby reducing the impact of short-term fluctuations on the prediction error assessment.

[0032] In one embodiment, the stability index of the sensor at time k can be obtained by analyzing the fluctuation of actual data, wherein the output of the sensor can be monitored, and the stability index of the sensor can be reflected by the standard deviation or variance of the sensor data. In the process of measuring the well inclination, a fluxgate sensor and an acceleration sensor are used, and the corresponding standard deviation or variance is calculated using the measurement values ​​of the two sensors respectively.

[0033] Specifically, taking the standard deviation as the stability indicator of the sensor as an example, for the fluxgate data m read from the fluxgate sensor k =[m x ,m y ,m z ], calculate its standard deviation σ in the last N time steps (i.e. within the set duration) m :

[0034]

[0035] in, is the mean of the fluxgate data.

[0036] Similarly, for the acceleration data a read from the acceleration sensor k =[a x ,a y ,a z ] Perform the same calculation to obtain the standard deviation σ of the acceleration data a Therefore, the standard deviation of fluxgate data is used to measure the stability of fluxgate sensor, and the standard deviation of acceleration data is used to measure the stability of acceleration sensor.

[0037] In practical applications, when evaluating sensor stability, not only can the standard deviation or variance of the sensor data be used, but also multi-sensor information can be combined for joint evaluation. For example, based on the calculation of the standard deviation of the fluxgate sensor and the acceleration sensor, their correlation indicators, such as the Pearson correlation coefficient, can be further calculated to analyze the consistency of the data fluctuations of the two. If the noise characteristics of the two sensors change significantly at the same time, it may indicate that the overall measurement environment has been disturbed, so that the noise covariance matrix adjustment strategy in the Kalman filter can be further optimized to improve the stability and accuracy of the well deviation calculation.

[0038] Step S102: dynamically adjust the noise covariance matrix in the Kalman filter according to the prediction error and / or the stability index.

[0039] In practical applications, the noise covariance matrix in Kalman filtering includes the process noise covariance matrix Q and the observation noise covariance matrix Q.

[0040] Among them, the process noise covariance matrix Q describes the uncertainty of the change of the system state from one time step to another, and represents the possible errors in the system during the prediction stage (that is, when there is no observation data). If the process noise covariance matrix Q is too large, the Kalman filter will tend to rely more on the observed values ​​and less on the predicted values, which may lead to excessive sensitivity to noise and be easily disturbed by abnormal data; if the process noise covariance matrix Q is too small, the Kalman filter will rely too much on the predicted values ​​and may not be able to respond to the dynamic changes of the system in time, resulting in the inability to accurately correct the state estimate.

[0041] The observation noise covariance matrix R describes the error and uncertainty of the observation data, reflects the quality of the observation data obtained from the sensor, and indicates the degree of deviation between the sensor measurement value and the true value during the observation phase, as well as the correlation of these deviations. In Kalman filtering, the size of the observation noise covariance matrix R directly affects the filter's trust in the observation value. A larger observation noise covariance matrix R indicates that the observation noise is larger, and the filter will have less trust in the observation value and rely more on the predicted value; while a smaller observation noise covariance matrix R indicates that the observation noise is smaller, and the filter will update the human observation data.

[0042] It should be noted that when dynamically adjusting the process noise covariance matrix Q and the observation noise covariance matrix R, the stability of the Kalman filter must also be considered to prevent the filter from diverging or the estimation result from being unstable due to excessive changes in the noise covariance matrix. Therefore, the upper and lower limits of the process noise covariance matrix Q and the observation noise covariance matrix R can be set to ensure that they are always within a reasonable range:

[0043] Q min ≤Q k+1 ≤Q max

[0044] R min ≤R k+1 ≤R max

[0045] Among them, Q min , Q max , R min and R maxThe setting can be made according to the statistical characteristics of the sensor measurement error to avoid over-adjustment or under-adjustment that affects the filtering effect. For example, in a drilling environment, if the measurement errors of the fluxgate sensor and the accelerometer usually fluctuate within a certain range, the range of the noise covariance matrix can be set according to historical data so that it does not exceed the reasonable range when dynamically adjusted.

[0046] In practical applications, during the initialization of the Kalman filter, the initial value of the noise covariance matrix can be set according to the initial stability value of the sensor and the known dynamic characteristics of the system, so as to perform Kalman filtering processing at the first time step k, and dynamically adjust the noise covariance matrix in the Kalman filter according to the prediction error and / or stability index at the second time step k.

[0047] In a complex drilling environment, the dynamic characteristics and environmental conditions of the system may change. Dynamically adjusting the process noise covariance matrix Q and the observation noise covariance matrix R according to the prediction error and / or the stability index of the sensor can enable the Kalman filter to better adapt to different working environments and system dynamics, and ensure the stability and accuracy of the Kalman filter.

[0048] In one embodiment, it is described in detail how to adjust the noise covariance matrix according to the prediction error.

[0049] Taking the standard deviation of the observed residual at time k as the prediction error, the dynamic adjustment of the process noise covariance matrix Q is taken as an example. Here, a first threshold σ is set thresh , through this first set threshold σ thresh , determine the noise level in the current environment. When the standard deviation σ y >First set threshold σ thresh When , this usually indicates that there is strong noise interference in the system (such as vibration, sensor error, etc.). At this time, the process noise covariance matrix Q can be increased to reduce the filter's dependence on the predicted value and rely more on the observed data, so as to better respond to changes in the observed data; when the standard deviation σ y <First set threshold σ thresh When , this indicates that the system state is relatively stable and the noise has little impact. The process noise covariance matrix Q can be reduced to make the filter more dependent on the predicted value, thereby improving the stability of the estimate.

[0050] Similarly, the prediction noise covariance matrix R is dynamically adjusted. If the standard deviation σ y >First set threshold σ thresh , then increase the noise covariance matrix R; if the standard deviation σ y <First set threshold σ thresh , then the prediction noise covariance matrix R is reduced.

[0051] It should be noted that if the variance of the observed residual at time k is used as the prediction error, it is necessary to compare the variance The square value of the first set threshold The size relationship between them is then used to dynamically adjust the noise covariance matrix based on this size relationship.

[0052] Based on this, the noise covariance matrix in the Kalman filter is adjusted in real time according to the prediction error, so that the noise covariance matrix can match the dynamic changes of the sensor noise, ensuring the stability and accuracy of the Kalman filter.

[0053] In one embodiment, a first adjustment coefficient α can be introduced to control the dynamic adjustment of the prediction error to the noise covariance matrix. The first adjustment coefficient α is a parameter used to control the dynamic adjustment amplitude of the noise covariance matrix, which is usually taken between 0 and 1, indicating the sensitivity to the current noise level when adjusting the noise covariance matrix. In practical applications, a larger first adjustment coefficient α makes the adjustment amplitude of the noise covariance matrix larger, and the filter is more sensitive to noise changes; a smaller first adjustment coefficient α makes the adjustment amplitude of the noise covariance matrix smaller, and the filter responds to noise changes more slowly. Based on this, the adjustment amplitude of the noise covariance matrix can be determined by the first adjustment coefficient, the first set threshold and the prediction error, so that the adjusted noise covariance matrix can be obtained based on the original noise covariance matrix and combined with the adjustment amplitude.

[0054] Taking the adjustment of the process noise covariance matrix Q according to the standard deviation of the observed residual at time k as an example, the increase or decrease strategy of the first adjustment coefficient α on the process noise covariance matrix Q is specifically:

[0055]

[0056] Among them, Q k+1 It represents the process noise covariance matrix Q when Kalman filtering is performed at the k+1th moment.

[0057] Similarly, assuming that the observation noise covariance matrix R is adjusted according to the variance of the observation residual at time k, the strategy of increasing or decreasing the observation noise covariance matrix R by the first adjustment coefficient α is specifically as follows:

[0058]

[0059] Among them, R k+q It represents the process noise covariance matrix R when Kalman filtering is performed at the k+1th moment.

[0060] In one embodiment, how to adjust the noise covariance matrix according to the stability index is described in detail. Taking the standard deviation of sensor data as the stability index, the adjustment process noise covariance matrix Q is taken as an example. Here, a second set threshold σ is set stability-thresh , if the standard deviation of the sensor data is greater than the second set threshold σ stability-thresh , indicating that the noise in the current environment increases, the filter needs to rely more on the observed value, so the process noise covariance matrix Q needs to be increased; on the contrary, if the standard deviation of the sensor data is less than or equal to the second set threshold σ stability-thresh , the process noise covariance matrix Q can be reduced.

[0061] Similarly, the noise covariance matrix R is dynamically adjusted. If the standard deviation of the sensor data is greater than the second set threshold σ stability-thresh , then increase the noise covariance matrix R; if the standard deviation of the sensor data is less than the second set threshold σ stability-thresh , then the noise covariance matrix R is reduced.

[0062] It should be noted that if the sensor data variance is used as a stability indicator, it is necessary to compare the sensor data variance with the square value of the second set threshold. The size relationship between them is then used to dynamically adjust the process noise covariance matrix Q according to this size relationship.

[0063] In practical applications, the stability index of the sensor includes the stability index of the fluxgate sensor and the stability index of the acceleration sensor. Therefore, when comparing with the second set threshold, the stability index of the fluxgate sensor and the stability index of the acceleration sensor can be combined, for example, the sum of the standard deviation of the fluxgate sensor data and the standard deviation of the acceleration sensor data can be compared with the second set threshold.

[0064] In one embodiment, a second adjustment coefficient β can be introduced to control the dynamic adjustment of the prediction error to the noise covariance matrix. Among them, the second adjustment coefficient β is a parameter used to control the dynamic adjustment amplitude of the noise covariance matrix, usually between 0 and 1, indicating the sensitivity to the current noise level when adjusting the noise covariance matrix. In practical applications, the second adjustment coefficient β determines the size of the adjustment amplitude of the noise covariance matrix. A larger second adjustment coefficient β makes the adjustment amplitude of the noise covariance matrix larger, and the filter is more sensitive to noise changes; a smaller second adjustment coefficient β makes the adjustment amplitude of the noise covariance matrix smaller, and the filter responds to noise changes more slowly. Based on this, the adjustment amplitude of the noise covariance matrix can be determined by the second adjustment coefficient β, the second set threshold and the sensor stability index, so that the adjusted noise covariance matrix can be obtained based on the original noise covariance matrix and combined with the adjustment amplitude.

[0065] Taking the sensor stability index adjustment process noise covariance matrix Q as an example, the increase or decrease strategy of the second adjustment coefficient β on the process noise covariance matrix Q is as follows:

[0066]

[0067] Among them, Q k+1 It represents the process noise covariance matrix Q when Kalman filtering is performed at the k+1th moment. It should be noted that in the process of well inclination measurement, two different sensors need to be used, namely the fluxgate sensor and the acceleration sensor. Therefore, the stability index of the fluxgate sensor and the stability index of the acceleration sensor need to be considered here at the same time.

[0068] Similarly, the adjustment range of the process noise covariance matrix R can be determined by the second adjustment coefficient β, and the specific value of the process noise covariance matrix R can be adjusted.

[0069] It should be noted that when dynamically adjusting the noise covariance matrix, the threshold σ thresh and σ stability-thresh The setting of has an important influence on the filtering effect. If the threshold is too large, the filter may not be able to fully respond to the noise changes of the system, resulting in an increase in the estimation error; if the threshold is too small, it may cause the noise covariance matrix to be adjusted too frequently, making the filter convergence worse. Therefore, an adaptive threshold setting method can be used, such as dynamically updating the threshold based on the statistical characteristics of historical data (such as mean and variance), or using empirical formulas combined with drilling conditions to adaptively adjust the threshold.

[0070] Step S103: Perform Kalman filtering on the sensor measurement value at time k+1 based on the adjusted noise covariance matrix to obtain a state estimation value at time k+1.

[0071] like Figure 2 As shown, Figure 2The processing flow diagram of the Kalman filter of this embodiment is shown. The processing data of the Kalman filter is mainly obtained from the fluxgate sensor and the acceleration sensor, wherein the fluxgate sensor is responsible for measuring the change of the geomagnetic field and providing information about the well inclination azimuth. The fluxgate sensor can sense the components of the geomagnetic field on three axes (x, y, z) and pass these data to the data acquisition module. The acceleration sensor is responsible for measuring acceleration, which is mainly used to calculate the well inclination angle. The acceleration sensor also provides acceleration components on three axes (x, y, z) and passes the data to the data acquisition module. For the relevant data collected by the fluxgate sensor and the acceleration sensor, the data acquisition module integrates them into a format that can be used for subsequent processing, ensures the accuracy and timeliness of the sensor data, and provides reliable input for the Kalman filter. Then, the data from different sensors are fused to improve the accuracy of state estimation. By combining the data of the fluxgate and accelerometer, the data fusion module can better estimate the well inclination angle and azimuth.

[0072] The data output by the data fusion module is processed by Kalman filtering. During the drilling process, due to the influence of drill bit vibration, the measurements of some sensors will fluctuate greatly, while other sensors may be relatively stable. Based on this, the Kalman filter here accepts the measurement data of the fluxgate sensor and the acceleration sensor. Through multi-sensor fusion, the advantages of each sensor can be used to compensate for its defects when used alone. Among them, the fluxgate sensor has higher accuracy when the well inclination angle is smaller, and the acceleration sensor can better adapt to vibration interference. Therefore, the Kalman filter outputs a more accurate and stable well inclination estimate by fusing and filtering the measurement data of these two sensors.

[0073] During drilling, the state of the system is expressed as the well inclination angle and azimuth angle:

[0074]

[0075] Among them, θ k+1 represents the well inclination angle (angle with the ground plane) at time k+1; φ k+1 It represents the well inclination azimuth (the deviation angle from geographic north) at time k+1.

[0076] In order to obtain this state information, fluxgate sensors and acceleration sensors are used to detect relevant data. Their observation values ​​are functions of the system state. The observation equations of fluxgate sensors and acceleration sensors are:

[0077] z k+1 =Hx k+1 +v k+1

[0078] Among them, zk+1 is the observed value at time k+1, including the output data of the fluxgate sensor and the acceleration sensor; H is the observation matrix, which describes the relationship between the state and the observed value; v k+q is the observation noise, which is assumed to be zero-mean Gaussian noise, describing the interference and errors in the observation data.

[0079] Specifically, the observed value z of the fluxgate sensor is m and the observed value z of the acceleration sensor a They can be expressed as:

[0080] Fluxgate observation equation:

[0081]

[0082] Among them, m k+1 is the azimuth angle φ of the magnetic field on the x, y, and z axes to calculate the well inclination k+1 .

[0083] Acceleration observation equation:

[0084]

[0085] Among them, a k+1 It is the component of the accelerometer on the x, y, and z axes, mainly used to calculate the well inclination angle θ k+1 .

[0086] After obtaining the observation values ​​of the fluxgate sensor and the acceleration sensor, the observation values ​​are processed using Kalman filtering. The core of Kalman filtering is to recursively update the system state estimate to minimize the error covariance.

[0087] In practical applications, Kalman filtering can be divided into two steps, including a prediction step and an update step. The data processing of these two steps is described in detail below.

[0088] In the prediction step, the state estimate at time k is used and the covariance matrix P k , the state prediction is performed through the state transfer matrix A and control parameters:

[0089]

[0090] in, represents the predicted state at time k+1, is the prediction covariance at time k+1, Q is the process noise covariance matrix at time k+1, and describes the uncertainty in the state prediction process. The state transfer matrix A represents the state change from time k to time k+1. Assuming that the system maintains linear changes in each time step, the state transfer matrix A is the unit matrix (if there are other dynamic models, it can be expanded). The control parameters include the control input matrix B and the control input u k+1 , the control input matrix B is usually used for control input (such as adjusting the drill angle, etc.). If the control input is not considered, it can be ignored; the control input u k+q It refers to the influence or control on the system state at time k+1, and is usually used to describe the impact of external control signals or inputs on system dynamics, such as the control parameters of drilling equipment.

[0091] Next, we proceed to the update step. In the update step, we use the observed value z k+1 Update the state estimate and correct the prediction error. Specifically:

[0092]

[0093]

[0094] Among them, K k+1 is the Kalman gain matrix, which determines the weights of predicted values ​​and observed values; is the updated state estimate, i.e. the well inclination angle and azimuth at the current moment; P k+1 is the updated error covariance matrix; R is the observation noise covariance matrix at time k+1, which describes the measurement error of the observation data.

[0095] The Kalman filtering process involves using the noise covariance matrix to perform correlation operations on sensor data. The noise covariance matrix in the Kalman filter can be dynamically adjusted according to real-time data, which can ensure the accuracy of the Kalman filter and obtain a high-precision well inclination estimate.

[0096] In practical applications, after completing the output of the state estimate at time k+1, Afterwards, the system will estimate the value of the state at time k+1 Feedback is used to adjust the noise covariance matrix in the Kalman filter, thereby improving the filtering accuracy.

[0097] In the above embodiment, when performing Kalman filtering to process sensor data, the noise covariance matrix in the Kalman filter is dynamically adjusted through the prediction error at time k and the stability index of the sensor, and then the measurement value of the sensor at time k+1 is Kalman filtered through the adjusted noise covariance matrix, so as to obtain an accurate state estimate at time k+1, thereby improving the filtering accuracy and enabling the Kalman filter to effectively cope with interference caused by factors such as vibration and temperature changes during drilling.

[0098] In one embodiment, a well deviation calculation device based on an adaptive Kalman filter is provided, referring to Figure 3 As shown, the well deviation calculation device 200 of the adaptive Kalman filter may include: a determination module 201 , an adjustment module 202 and a filtering module 203 .

[0099] Among them, the determination module 201 is used to determine the prediction error and the stability index of the sensor at time k; the adjustment module 202 is used to dynamically adjust the noise covariance matrix in the Kalman filter according to the prediction error and / or the stability index; the filtering module 203 is used to perform Kalman filtering on the measurement value of the sensor at time k+1 based on the adjusted noise covariance matrix to obtain the state estimation value at time k+1; the state estimation value includes the well inclination angle and the azimuth angle.

[0100] In one embodiment, the prediction error at time k is the observation residual at time k, or the standard deviation of the observation residual at time k, or the variance of the observation residual at time k.

[0101] In one embodiment, the adjustment module 202 is specifically configured to increase the noise covariance matrix if the prediction error is greater than a first set threshold; and decrease the noise covariance matrix if the prediction error is less than or equal to the first set threshold.

[0102] In one embodiment, the adjustment module 202 is specifically configured to determine an adjustment range of the noise covariance matrix according to the first adjustment coefficient, the first set threshold and the prediction error; and adjust the noise covariance matrix according to the adjustment range of the noise covariance matrix.

[0103] In one embodiment, the determination module 201 is specifically configured to calculate the standard deviation or variance of the sensor data according to the measurement values ​​of the sensor within a set time period.

[0104] In one embodiment, the adjustment module 202 is specifically configured to increase the noise covariance matrix if the stability index is greater than a second set threshold; and decrease the noise covariance matrix if the stability index is less than or equal to the second set threshold.

[0105] In one embodiment, the adjustment module 202 is specifically configured to determine an adjustment range of the noise covariance matrix according to the second adjustment coefficient, the second set threshold and the sensor stability index; and adjust the noise covariance matrix according to the adjustment range of the noise covariance matrix.

[0106] The specific definition of the well inclination calculation device 200 of the adaptive Kalman filter can be found in the definition of the well inclination calculation method of the adaptive Kalman filter above, which will not be repeated here. Each module in the above-mentioned well inclination calculation device 200 of the adaptive Kalman filter can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0107] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, an adaptive Kalman filter well deviation calculation method is implemented.

[0108] In one embodiment, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, a method for calculating well deviation using an adaptive Kalman filter is implemented.

[0109] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0110] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0111] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0112] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0113] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for calculating well deviation using an adaptive Kalman filter, characterized in that: include: Determine the prediction error and sensor stability index at time k; Dynamically adjust the noise covariance matrix in the Kalman filter according to the prediction error and / or the stability index; Based on the adjusted noise covariance matrix, Kalman filtering is performed on the measurement value of the sensor at time k+1 to obtain a state estimation value at time k+1; the state estimation value includes a well inclination angle and an azimuth angle.

2. The method for calculating well deviation using adaptive Kalman filtering according to claim 1, characterized in that: The prediction error at time k is the observation residual at time k, or the standard deviation of the observation residual at time k, or the variance of the observation residual at time k.

3. The method for calculating well deviation using adaptive Kalman filtering according to claim 1 is characterized in that: According to the prediction error, the noise covariance matrix is ​​dynamically adjusted, including: If the prediction error is greater than a first set threshold, increasing the noise covariance matrix; If the prediction error is less than or equal to a first set threshold, the noise covariance matrix is ​​reduced.

4. The method for calculating well deviation using adaptive Kalman filtering according to claim 3, characterized in that: According to the prediction error, the noise covariance matrix is ​​dynamically adjusted, including: Determining an adjustment amplitude of the noise covariance matrix according to a first adjustment coefficient, the first set threshold and the prediction error; The noise covariance matrix is ​​adjusted according to the adjustment amplitude of the noise covariance matrix.

5. The method for calculating well deviation using adaptive Kalman filtering according to claim 1, characterized in that: The step of determining the stability index of the sensor comprises: Based on the sensor's measured values ​​within a set time period, the standard deviation or variance of the sensor data is calculated.

6. The method for calculating well deviation using adaptive Kalman filtering according to claim 1, characterized in that: According to the stability index, the noise covariance matrix is ​​dynamically adjusted, including: If the stability index is greater than a second set threshold, increasing the noise covariance matrix; If the stability index is less than or equal to a second set threshold, the noise covariance matrix is ​​reduced.

7. The method for calculating well deviation using adaptive Kalman filtering according to claim 6, characterized in that: According to the stability index, the noise covariance matrix is ​​dynamically adjusted, including: Determining an adjustment range of the noise covariance matrix according to a second adjustment coefficient, the second set threshold, and a sensor stability index; The noise covariance matrix is ​​adjusted according to the adjustment amplitude of the noise covariance matrix.

8. An adaptive Kalman filter well deviation calculation device, characterized in that: include: A determination module, used to determine the prediction error at time k and the stability index of the sensor; An adjustment module, used for dynamically adjusting the noise covariance matrix in the Kalman filter according to the prediction error and / or the stability index; The filtering module is used to perform Kalman filtering on the measurement value of the sensor at time k+1 based on the adjusted noise covariance matrix to obtain the state estimation value at time k+1; the state estimation value includes the well inclination angle and azimuth angle.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method for calculating well deviation using the adaptive Kalman filter described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for calculating well deviation using the adaptive Kalman filter described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Intelligent detection system for construction quality of side slope anchor rod drilling platform based on machine vision

    CN120525867A

  • Dam face inclination monitoring method and system based on Kalman filtering and medium

    CN120907509A

  • High-precision while-drilling dynamic measurement module real-time measurement system

    CN121675861A