Rotational speed measurement method, device, storage medium and measurement while drilling instrument

CN122591979APending Publication Date: 2026-08-18GUOYI PETROLEUM TECH (WUXI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610965340.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,相关技术的问题在于:1)使用陀螺仪需要增加额外芯片,增加成本并占用本就紧张的PCB空间;2)磁工具面解算并求导需要进行大量浮点运算与反三角运算,占用大量MCU的机器周期与算力,降低MCU的工作效率;3)井下环境温度通常高达 85℃ 至 150℃,这会导致磁传感器前端及运算放大器产生极大的直流偏置漂移,进而在严重的温漂下,地磁交流信号的整体基线会大幅偏离这个“固定阈值线”,导致过零点触发占空比严重失衡,致使测速系统出现误差

Benefits of technology

[0008]根据本发明实施例的基于地磁测量的转速测量方法,获取单轴磁传感器的采样数据,进而,在采样数据的采样点数量达到滑动采样评估窗口的窗口长度时,对当前零点阈值进行更新,以获取过零触发阈值,以及,根据采样数据、过零触发阈值和预设有效过零特征掩码,获取随钻测量仪器的转速信息。由此,通过周期性更新当前零点阈值以得到过零触发阈值,并结合有效过零特征掩码,实现随钻测量仪器的转速测量,从而,使用较少的硬件成本与计算周期,实现更稳定,抗干扰能力更强的随钻测量仪器的转速测量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122591979A_ABST
    Figure CN122591979A_ABST
Patent Text Reader

Abstract

The application discloses a rotating speed measurement method and device, a storage medium and a measurement-while-drilling instrument, wherein the method comprises the following steps: acquiring sampling data of a single-axis magnetic sensor, the single-axis magnetic sensor is fixed along the radial direction of the measurement-while-drilling instrument, in the rotating process of the measurement-while-drilling instrument, cutting a geomagnetic field signal to collect the radial geomagnetic field signal of the instrument and generate the sampling data; if the number of sampling points of the sampling data reaches the window length of a sliding sampling evaluation window, updating the current zero point threshold to obtain a zero-crossing trigger threshold; and acquiring the rotating speed information of the measurement-while-drilling instrument according to the sampling data, the zero-crossing trigger threshold and a preset effective zero-crossing feature mask. Thus, the current zero point threshold is periodically updated to obtain the zero-crossing trigger threshold, and the rotating speed measurement of the measurement-while-drilling instrument is realized in combination with the effective zero-crossing feature mask, so that the rotating speed measurement of the instrument is more stable and has stronger anti-interference capability by using less hardware cost and calculation period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of measurement while drilling (MSW) technology, and in particular to a method for measuring rotational speed based on geomagnetic measurement, a computer-readable storage medium, a device for measuring rotational speed based on geomagnetic measurement, and an MSW instrument. Background Technology

[0002] Currently, measurement while drilling (MWD) technologies typically employ high-temperature gyroscopes, multi-axis magnetic toolface calculation and differentiation, or zero-crossing detection using a fixed software threshold for magnetic sensors to calculate instrument rotational speed. However, these technologies have several drawbacks: 1) Using gyroscopes requires additional chips, increasing costs and occupying already limited PCB space; 2) Magnetic toolface calculation and differentiation require numerous floating-point and inverse trigonometric operations, consuming significant MCU machine cycles and computing power, thus reducing MCU efficiency; 3) Downhole ambient temperatures typically range from 85°C to 150°C, causing substantial DC bias drift in the magnetic sensor front-end and operational amplifier. This severe temperature drift leads to a significant deviation of the overall baseline of the geomagnetic AC signal from this "fixed threshold line," resulting in a severe imbalance in the zero-crossing trigger duty cycle and causing errors in the velocity measurement system. Summary of the Invention

[0003] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, the first objective of this invention is to propose a rotational speed measurement method based on geomagnetic measurements, which can achieve more stable and interference-resistant rotational speed measurements using a more robust measurement-while-drilling instrument with lower hardware costs and computational cycles.

[0004] A second objective of this invention is to provide a computer-readable storage medium.

[0005] The third objective of this invention is to provide a rotational speed measuring device based on geomagnetic measurement.

[0006] The fourth objective of this invention is to provide a measurement-while-drilling instrument.

[0007] To achieve the above objectives, the first aspect of the present invention proposes a rotational speed measurement method based on geomagnetic measurement, comprising: acquiring sampling data from a single-axis magnetic sensor, wherein the single-axis magnetic sensor is fixed radially along a measurement-while-drilling instrument; during the rotation of the measurement-while-drilling instrument, the magnetic field signal is cut to collect the radial magnetic field signal of the instrument and generate the sampling data; if the number of sampling points of the sampling data reaches the window length of the sliding sampling evaluation window, the current zero-point threshold is updated to obtain a zero-crossing trigger threshold; and the rotational speed information of the measurement-while-drilling instrument is obtained based on the sampling data, the zero-crossing trigger threshold, and a preset effective zero-crossing feature mask.

[0008] According to the geomagnetic measurement-based rotational speed measurement method of this invention, sampling data from a single-axis magnetic sensor is acquired. Then, when the number of sampling points reaches the window length of the sliding sampling evaluation window, the current zero-point threshold is updated to obtain a zero-crossing trigger threshold. Furthermore, based on the sampling data, the zero-crossing trigger threshold, and a preset effective zero-crossing feature mask, the rotational speed information of the measurement-while-drilling (MWD) instrument is obtained. Thus, by periodically updating the current zero-point threshold to obtain the zero-crossing trigger threshold and combining it with the effective zero-crossing feature mask, the rotational speed measurement of the MWD instrument is achieved. This results in a more stable and interference-resistant MWD instrument rotational speed measurement using less hardware cost and computation time.

[0009] In addition, the rotational speed measurement method based on geomagnetic measurement according to the above embodiments of the present invention may also have the following additional technical features: In some embodiments of the present invention, the preset valid zero-crossing feature mask is a binary sequence consisting of a series of first logic state bits and a series of second logic state bits.

[0010] In some embodiments of the present invention, updating the current zero-point threshold to obtain a zero-crossing trigger threshold includes: obtaining an AD code value sequence of the sampled data using an analog-to-digital converter at a preset sampling frequency; obtaining the maximum and minimum values ​​of all AD code values ​​within the sliding sampling evaluation window, and obtaining the AC amplitude of the sampled data based on the maximum and minimum values; obtaining the cumulative sum of all AD code values ​​within the sliding sampling evaluation window, and obtaining the dynamic zero-point baseline of the sampled data based on the cumulative sum and the window length; and obtaining the zero-crossing trigger threshold based on the dynamic zero-point baseline and the AC amplitude.

[0011] In some embodiments of the present invention, obtaining the zero-crossing trigger threshold based on the dynamic zero-point baseline and the AC amplitude includes: if the AC amplitude is greater than a preset effective signal dead zone threshold, then obtaining the zero-crossing trigger threshold based on the AC amplitude, the dynamic zero-point baseline, and a preset hysteresis coefficient.

[0012] In some embodiments of the present invention, obtaining the rotational speed information of the measurement-while-drilling instrument based on the sampled data, the zero-crossing trigger threshold, and the preset valid zero-crossing feature mask includes: comparing the AD code value with the zero-crossing trigger threshold as an integer value over a single instruction cycle to obtain a system status word of length N bits, where N is the total number of bits in the preset valid zero-crossing feature mask; performing bitwise logical matching between the system status word and the preset valid zero-crossing feature mask; determining that a valid positive zero-crossing event has occurred if and only if the system status word is completely equal to the preset valid zero-crossing feature mask; counting the positive zero-crossing events and recording the index of the current zero-crossing point in the sampled data sequence; and obtaining the rotational speed information of the measurement-while-drilling instrument based on the difference between the index of the preset sampling frequency and the index of the adjacent positive zero-crossing events.

[0013] In some embodiments of the present invention, the step of comparing the AD code value with the zero-crossing trigger threshold by an integer value over a single instruction cycle to obtain a system status word of length N includes: generating a logical status bit based on the comparison result between the current AD code value and the zero-crossing trigger threshold, wherein if the current AD code value is greater than the zero-crossing trigger threshold, a first logical status bit is generated, and if the current AD code value is less than the zero-crossing trigger threshold, a second logical status bit is generated; shifting the generated logical status bit into the least significant bit of a system status register of length N, and shifting out the most significant bit, thereby maintaining the system status word of length N in real time.

[0014] In some embodiments of the present invention, the method further includes: filtering the sampled data and averaging the rotational speed information.

[0015] To achieve the above objectives, a computer-readable storage medium is provided in a second aspect embodiment of the present invention, which stores a rotational speed measurement program based on geomagnetic measurement. When the rotational speed measurement program based on geomagnetic measurement is executed by a processor, it implements the rotational speed measurement method based on geomagnetic measurement of the present invention described above.

[0016] According to embodiments of the present invention, by executing a geomagnetic measurement-based rotational speed measurement program stored thereon, a more stable and interference-resistant measurement-while-drilling instrument rotational speed measurement can be achieved with less hardware cost and computation cycle.

[0017] To achieve the above objectives, a rotational speed measurement device based on geomagnetic measurement proposed in a third aspect embodiment of the present invention includes: a first acquisition module, used to acquire sampling data from a single-axis magnetic sensor, wherein the single-axis magnetic sensor is fixed radially along the measurement-while-drilling instrument, and during the rotation of the measurement-while-drilling instrument, it cuts the geomagnetic field signal to collect the radial geomagnetic field signal of the instrument and generates the sampling data; a second acquisition module, used to update the current zero-point threshold to obtain a zero-crossing trigger threshold if the number of sampling points of the sampling data reaches the window length of the sliding sampling evaluation window; and a rotational speed measurement module, used to acquire the rotational speed information of the measurement-while-drilling instrument based on the sampling data, the zero-crossing trigger threshold, and a preset effective zero-crossing feature mask.

[0018] According to an embodiment of the geomagnetic measurement-based rotational speed measurement device of the present invention, a first acquisition module acquires sampling data from a single-axis magnetic sensor. Then, a second acquisition module updates the current zero-point threshold when the number of sampling points reaches the window length of the sliding sampling evaluation window to obtain a zero-crossing trigger threshold. Finally, a rotational speed measurement module acquires the rotational speed information of the measurement-while-drilling (MWD) instrument based on the sampling data, the zero-crossing trigger threshold, and a preset effective zero-crossing feature mask. Thus, by periodically updating the current zero-point threshold to obtain the zero-crossing trigger threshold and combining it with the effective zero-crossing feature mask, the rotational speed of the MWD instrument is measured. This achieves more stable and interference-resistant rotational speed measurement of the MWD instrument with lower hardware costs and computational cycles.

[0019] To achieve the above objectives, a fourth aspect of the present invention proposes a geomagnetic measurement-while-drilling instrument, wherein the measurement-while-drilling instrument includes: a microprocessor; a single-axis magnetic sensor fixed radially along the measurement-while-drilling instrument, used to cut the geomagnetic field signal during the rotation of the measurement-while-drilling instrument to collect the radial geomagnetic field signal of the instrument and generate sampling data; an analog-to-digital converter connected to the single-axis magnetic sensor, used to acquire the AD code value sequence of the sampling data according to a preset sampling frequency; and a memory storing a computer program, wherein when the computer program is executed by the microprocessor, the microprocessor implements the geomagnetic measurement-based rotational speed measurement method of the present invention described above.

[0020] The geomagnetic measurement-while-drilling instrument based on the embodiments of the present invention can achieve more stable and more interference-resistant rotational speed measurement with less hardware cost and computation cycle.

[0021] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0022] Figure 1This is a flowchart illustrating a rotational speed measurement method based on geomagnetic measurement according to an embodiment of the present invention; Figure 2 This is a schematic flowchart of a rotational speed measurement method based on geomagnetic measurement according to an embodiment of the present invention; Figure 3 This is a schematic flowchart of a rotational speed measurement method based on geomagnetic measurement according to an embodiment of the present invention; Figure 4 This is a schematic flowchart of a rotational speed measurement method based on geomagnetic measurement according to an embodiment of the present invention; Figure 5 This is a block diagram of a rotational speed measuring device based on geomagnetic measurement according to an embodiment of the present invention; Figure 6 This is a block diagram of a drilling measurement instrument based on geomagnetic measurement according to an embodiment of the present invention. Detailed Implementation

[0023] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0024] The following description, with reference to the accompanying drawings, describes an embodiment of the present invention including a geomagnetic measurement-based rotational speed measurement method, a computer-readable storage medium, a geomagnetic measurement-based rotational speed measurement device, and a measurement-while-drilling instrument.

[0025] Figure 1 This is a schematic flowchart of a rotational speed measurement method based on geomagnetic measurement according to an embodiment of the present invention.

[0026] Specifically, in some embodiments of the present invention, such as Figure 1 As shown, the rotational speed measurement method based on geomagnetic measurement includes: S101, acquire sampling data from a single-axis magnetic sensor. The single-axis magnetic sensor is fixed radially along the measurement-while-drilling instrument. During the rotation of the measurement-while-drilling instrument, it cuts the geomagnetic field signal to acquire the radial geomagnetic field signal of the instrument and generate sampling data.

[0027] It is understood that in this embodiment of the present invention, the uniaxial magnetic sensor is fixed in the radial direction of the measurement while drilling instrument, thereby enabling the uniaxial magnetic sensor to cut the geomagnetic field signal during the rotation of the measurement while drilling instrument to collect the radial geomagnetic field signal of the instrument and generate sampling data.

[0028] Optionally, in the above embodiments of the present invention, the sampling data can be an analog alternating signal.

[0029] S102, if the number of sampling points of the sampled data reaches the window length of the sliding sampling evaluation window, then the current zero-point threshold is updated to obtain the zero-crossing trigger threshold.

[0030] It is understood that in this embodiment of the present invention, whenever the number of sampling points of the sampling data reaches the window length K of the sliding sampling evaluation window, the current zero-point threshold is updated to obtain the zero-crossing trigger threshold, thereby adapting to the radial magnetic field strength caused by temperature or attitude by periodically updating the zero-point threshold.

[0031] Optionally, the window length K of the sliding sampling evaluation window can be set according to the actual sampling requirements. For example, K can be 2000, that is, the current zero-point threshold is updated whenever the number of sampling points of the sampling data reaches 2000.

[0032] S103: Based on the sampled data, zero-crossing trigger threshold, and preset effective zero-crossing feature mask, obtain the rotational speed information of the measurement-while-drilling instrument.

[0033] It is understood that in this embodiment of the present invention, sampling data generated by a single-axis magnetic sensor cutting the geomagnetic field is used, combined with a dynamically updated zero-crossing trigger threshold and a preset effective zero-crossing feature mask, to achieve rotational speed measurement of the measurement-while-drilling instrument. Thus, with less hardware cost and computational cycle, a more stable and interference-resistant rotational speed measurement of the measurement-while-drilling instrument is achieved.

[0034] Furthermore, in some embodiments of the present invention, the preset effective zero-crossing feature mask is a binary sequence composed of a series of first logic state bits and a series of second logic state bits.

[0035] It is understood that, in this embodiment of the present invention, the preset valid zero-crossing feature mask is defined as a binary sequence consisting of a series of consecutive first logic state bits (e.g., "0" state) followed by a series of consecutive second logic state bits (e.g., "1" state) (e.g., the preset valid zero-crossing feature mask consists of 4 consecutive first logic state bits followed by 4 consecutive second logic state bits, i.e., 8-bit binary code 00001111), as the basis for judging a real, stable and valid positive zero-crossing event, thereby avoiding the phenomenon of repeated zero-crossing points caused by jitter.

[0036] Furthermore, in some embodiments of the present invention, such as Figure 2 As shown, the current zero-point threshold is updated to obtain the zero-crossing trigger threshold, including: S201, the AD code value sequence of the sampled data is obtained by the analog-to-digital converter according to the preset sampling frequency.

[0037] It is understood that, in this embodiment of the present invention, the sampling data collected by the single-axis magnetic sensor is converted into an AD code value sequence by an analog-to-digital converter (ADC) at a preset sampling frequency.

[0038] S202, obtain the maximum and minimum values ​​of all AD code values ​​within the sliding sampling evaluation window, and obtain the AC amplitude of the sampled data based on the maximum and minimum values.

[0039] It is understood that in this embodiment of the present invention, the maximum and minimum values ​​of all AD code values ​​within the sliding sampling evaluation window (window length K) are extracted, and the AC amplitude of the sampled data is calculated in the following manner: AC amplitude = (maximum value of AD code - minimum value of AD code) ÷ 2.

[0040] S203, obtain the sum of all AD code values ​​within the sliding sampling evaluation window, and obtain the dynamic zero-point baseline of the sampling data based on the sum and window length.

[0041] It is understood that in this embodiment of the present invention, the dynamic zero-point baseline of the sampled data is calculated by summing all AD code values ​​within the sliding sampling evaluation window (window length K) and by the following method: Dynamic zero-point baseline = sum of AD code values ​​÷ K.

[0042] S204, obtains the zero-crossing trigger threshold based on the dynamic zero-point baseline and AC amplitude.

[0043] It is understood that, in this embodiment of the present invention, a corresponding zero-crossing trigger threshold is automatically adapted based on the dynamic zero-point baseline and AC amplitude (i.e., the real-time signal characteristics of the sampled data) for subsequent zero-crossing detection, thereby solving the anti-interference problem of traditional fixed thresholds and avoiding zero-crossing misjudgments caused by zero-point drift.

[0044] It should be noted that in the above embodiments of the present invention, the dynamic zero-point baseline is used to characterize the signal center baseline of the magnetic field alternating signal in the current measurement cycle, and the AC amplitude is used to characterize the signal strength of the magnetic field alternating signal in the current measurement cycle.

[0045] Furthermore, in some embodiments of the present invention, obtaining the zero-crossing trigger threshold based on the dynamic zero-point baseline and the AC amplitude includes: if the AC amplitude is greater than a preset effective signal dead zone threshold, then obtaining the zero-crossing trigger threshold based on the AC amplitude, the dynamic zero-point baseline, and a preset hysteresis coefficient.

[0046] It is understood that, in this embodiment of the present invention, before updating the current zero-crossing threshold to obtain the zero-crossing trigger threshold, it is also necessary to determine whether the AC amplitude is greater than the preset effective signal dead zone threshold in order to eliminate invalid signal interference, avoid updating the zero-point threshold when the signal is too weak, and ensure the stability of speed measurement. Then, when the AC amplitude is greater than the preset effective signal dead zone threshold, the zero-crossing trigger threshold is obtained in the following way: zero-crossing trigger threshold = dynamic zero-point baseline + (AC amplitude × preset hysteresis coefficient a).

[0047] Optionally, in the above embodiments of the present invention, the preset hysteresis coefficient α can be set according to the measurement accuracy requirements. For example, the preset hysteresis coefficient can be set to 0.25, that is, the zero-crossing trigger threshold is set at a position higher than the average baseline and a certain proportion away from the peak value, forming a one-sided fault-tolerant hysteresis interval.

[0048] Furthermore, in some embodiments of the present invention, such as Figure 3 As shown, based on the sampled data, zero-crossing trigger threshold, and preset valid zero-crossing feature mask, the rotational speed information of the measurement-while-drilling instrument is obtained, including: S301, compare the AD code value with the zero-crossing trigger threshold by integer size in a single instruction cycle to obtain a system status word of length N bits, where N is the total number of bits of the preset valid zero-crossing feature mask.

[0049] It is understood that in this embodiment of the present invention, by comparing the AD code value with the zero-crossing trigger threshold by an integer value over a single instruction cycle, the logical status bit of each AD code value is output, thereby obtaining a system status word of length N bits, where N is the total number of bits of the preset valid zero-crossing feature mask.

[0050] S302, perform bitwise logical matching between the system status word and the preset valid zero-crossing feature mask.

[0051] It is understood that, in this embodiment of the present invention, the number of positive zero-crossing events occurring in the sliding sampling evaluation window is determined by performing bitwise logical matching between the real-time system status word and the preset valid zero-crossing feature mask.

[0052] S303, if and only if the system status word is completely equal to the preset valid zero-crossing feature mask, determine that a valid positive zero-crossing event has occurred, count the positive zero-crossing events and record the index of the current zero-crossing point in the sampled data sequence.

[0053] It is understood that in this embodiment of the present invention, the sampling data is judged to have completed a real, stable and valid positive zero-crossing event if and only if the system status word is completely equal to the preset valid zero-crossing feature mask. Thus, the positive zero-crossing event is effectively determined, and the positive zero-crossing events are counted and the index of the current zero-crossing point in the sampling data sequence is recorded.

[0054] S304: Obtain the rotational speed information of the measurement-while-drilling instrument based on the index difference between the preset sampling frequency and the adjacent positive zero-crossing events.

[0055] It is understood that, in this embodiment of the present invention, the rotational speed information of the measurement-while-drilling instrument can be obtained in the following manner: ,in, This provides the rotational speed information (rotational speed per minute) for the measurement-while-drilling instrument. The index difference between adjacent positive zero-crossing events. This is the preset sampling frequency.

[0056] Furthermore, in some embodiments of the present invention, such as Figure 4 As shown, the AD code value is compared with the zero-crossing trigger threshold by an integer value over a single instruction cycle to obtain a system status word of length N, including: S401, Based on the comparison result between the current AD code value and the zero-crossing trigger threshold, generate a logic state bit, wherein if the current AD code value is greater than the zero-crossing trigger threshold, a first logic state bit is generated, and if the current AD code value is less than the zero-crossing trigger threshold, a second logic state bit is generated.

[0057] It is understood that in this embodiment of the present invention, the corresponding logic state bit is generated by comparing the current AD code value with the zero-crossing trigger threshold. For example, if the current AD code value is greater than the zero-crossing trigger threshold, the first logic state bit (e.g., "1") is output; otherwise, if the current AD code value is less than the zero-crossing trigger threshold, the second logic state bit (e.g., "0") is output.

[0058] S402 shifts the generated logic state into the least significant bit of the N-bit system status register and shifts the most significant bit out, maintaining the N-bit system status word in real time.

[0059] It is understood that in this embodiment of the present invention, a system status word of length N is maintained in real time by shifting the generated logical state into the least significant bit of a system status register of length N and shifting the most significant bit out.

[0060] Specifically, in the above embodiments of the present invention, assuming that the effective zero-crossing feature mask is a binary sequence "00001111" composed of a series of first logic state bits ("0") and a series of second logic state bits "1", then the system status word can be initialized to an N-bit (number of bits of the effective zero-crossing feature mask) binary sequence "00000000". At this time, if the current AD code value is greater than the zero-crossing trigger threshold, the logic state bit "1" is output, the logic state bit is shifted into the least significant bit of the N-bit system status register, and the highest significant bit is shifted out. The system status word is maintained from "00000000" to "10000000". Alternatively, if the current AD code value is less than the zero-crossing trigger threshold, the logic state bit "0" is output, the logic state bit is shifted into the least significant bit of the N-bit system status register, and the highest significant bit is shifted out. The system status word remains "00000000".

[0061] Then, the next AD code value is compared with the integer value of the zero-crossing trigger threshold. If the current AD code value is greater than the zero-crossing trigger threshold, the logic status bit "1" is output, the logic status bit is shifted into the least significant bit of the N-bit system status register, and the most significant bit is shifted out. The system status word is maintained from "10000000" to "11000000". Alternatively, if the current AD code value is less than the zero-crossing trigger threshold, the logic status bit "0" is output, the logic status bit is shifted into the least significant bit of the N-bit system status register, and the most significant bit is shifted out. The system status word is maintained from "10000000" to "01000000". This process is repeated to maintain a system status word of length N (e.g., N=8) in real time.

[0062] It should be noted that the aforementioned system status word and the effective zero-crossing feature mask are completely equal, that is, both the system status word and the effective zero-crossing feature mask are "00001111". At this time, it can be determined that a positive zero-crossing event has occurred in the sampled data (the signal changes from a continuous state "0" to a continuous state "1", and it is determined that the sampled data changes from continuously below the zero-crossing trigger threshold to continuously above the zero-crossing trigger threshold, and a zero-crossing phenomenon has occurred).

[0063] Furthermore, in some embodiments of the present invention, the method further includes: filtering the sampled data and averaging the rotational speed information.

[0064] It is understood that, in this embodiment of the present invention, the sampled data can be filtered by a low-pass filter to remove high-frequency interference, and the rotational speed information can be averaged to obtain more accurate rotational speed information.

[0065] In summary, the rotational speed measurement method based on geomagnetic measurement according to embodiments of the present invention acquires sampling data from a single-axis magnetic sensor. Then, when the number of sampling points reaches the window length of the sliding sampling evaluation window, the current zero-point threshold is updated to obtain a zero-crossing trigger threshold. Furthermore, based on the sampling data, the zero-crossing trigger threshold, and a preset effective zero-crossing feature mask, the rotational speed information of the measurement-while-drilling instrument is obtained. Thus, by periodically updating the current zero-point threshold to obtain the zero-crossing trigger threshold, and combining it with the effective zero-crossing feature mask, rotational speed measurement of the measurement-while-drilling instrument is achieved. This results in more stable and interference-resistant rotational speed measurement of the measurement-while-drilling instrument using less hardware cost and computational cycle.

[0066] Based on the aforementioned method for measuring rotational speed based on geomagnetic measurement according to the embodiments of the present invention, the present invention proposes a computer-readable storage medium storing a rotational speed measurement program based on geomagnetic measurement thereon. When the rotational speed measurement program based on geomagnetic measurement is executed by a processor, it implements the rotational speed measurement method based on geomagnetic measurement according to the embodiments of the present invention.

[0067] It should be understood that the specific implementation of the computer-readable storage medium in the embodiments of the present invention can be found in the specific implementation of the rotational speed measurement method based on geomagnetic measurement in the foregoing embodiments of the present invention, and will not be repeated here to reduce redundancy.

[0068] In summary, the computer-readable storage medium according to embodiments of the present invention, by executing the rotational speed measurement program based on geomagnetic measurement stored thereon, enables more stable and interference-resistant rotational speed measurement of the drilling measurement instrument with less hardware cost and computation cycle.

[0069] Figure 5 This is a block diagram of a rotational speed measuring device based on geomagnetic measurement according to an embodiment of the present invention.

[0070] Specifically, in some embodiments of the present invention, such as Figure 5 As shown, the rotational speed measuring device 100 based on geomagnetic measurement includes: a first acquisition module 10, a second acquisition module 20, and a rotational speed measuring module 30.

[0071] The first acquisition module 10 is used to acquire sampling data from a single-axis magnetic sensor. The single-axis magnetic sensor is fixed radially along the measurement-while-drilling instrument. During the rotation of the measurement-while-drilling instrument, it cuts the geomagnetic field signal to collect the radial geomagnetic field signal of the instrument and generate sampling data. The second acquisition module 20 is used to update the current zero-point threshold if the number of sampling points of the sampling data reaches the window length of the sliding sampling evaluation window, so as to obtain the zero-crossing trigger threshold. The rotational speed measurement module 30 is used to acquire the rotational speed information of the measurement-while-drilling instrument based on the sampling data, the zero-crossing trigger threshold and the preset effective zero-crossing feature mask.

[0072] Furthermore, in some embodiments of the present invention, the preset effective zero-crossing feature mask is a binary sequence composed of a series of first logic state bits and a series of second logic state bits.

[0073] Furthermore, in some embodiments of the present invention, the second acquisition module 20 is further configured to: acquire the AD code value sequence of the sampled data according to a preset sampling frequency using an analog-to-digital converter; acquire the maximum and minimum values ​​of all AD code values ​​within the sliding sampling evaluation window, and acquire the AC amplitude of the sampled data based on the maximum and minimum values; acquire the sum of all AD code values ​​within the sliding sampling evaluation window, and acquire the dynamic zero-point baseline of the sampled data based on the sum and window length; and acquire the zero-crossing trigger threshold based on the dynamic zero-point baseline and the AC amplitude.

[0074] Furthermore, in some embodiments of the present invention, the second acquisition module 20 is also used to acquire a zero-crossing trigger threshold, including: if the AC amplitude is greater than a preset effective signal dead zone threshold, then acquire the zero-crossing trigger threshold based on the AC amplitude, the dynamic zero-point baseline and the preset hysteresis coefficient.

[0075] Furthermore, in some embodiments of the present invention, the rotational speed measurement module 30 is further configured to: compare the AD code value with the zero-crossing trigger threshold as an integer value over a single instruction cycle to obtain a system status word of length N bits, where N is the total number of bits in the preset valid zero-crossing feature mask; perform bitwise logical matching between the system status word and the preset valid zero-crossing feature mask; determine that a valid positive zero-crossing event has occurred if and only if the system status word and the preset valid zero-crossing feature mask are completely equal; count the positive zero-crossing events and record the index of the current zero-crossing point in the sampled data sequence; and obtain the rotational speed information of the measurement-while-drilling instrument based on the index difference between the preset sampling frequency and adjacent positive zero-crossing events.

[0076] Furthermore, in some embodiments of the present invention, the rotational speed measurement module 30 is also used to generate a logic state bit based on the comparison result between the current AD code value and the zero-crossing trigger threshold, wherein if the current AD code value is greater than the zero-crossing trigger threshold, a first logic state bit is generated, and if the current AD code value is less than the zero-crossing trigger threshold, a second logic state bit is generated; the generated logic state bit is shifted into the least significant bit of a system status register with a length of N bits, and the most significant bit is shifted out, thereby maintaining a system status word with a length of N bits in real time.

[0077] Furthermore, in some embodiments of the present invention, the first acquisition module 10 is further configured to filter the sampled data; the rotational speed measurement module 30 is further configured to average the rotational speed information.

[0078] It should be understood that the specific implementation of the speed measuring device 100 based on geomagnetic measurement in this embodiment of the invention corresponds one-to-one with the specific implementation of the speed measuring method based on geomagnetic measurement in the foregoing embodiments of the invention. To reduce redundancy, it will not be described again here.

[0079] In summary, the rotational speed measurement device based on geomagnetic measurement according to embodiments of the present invention acquires sampling data from a single-axis magnetic sensor through a first acquisition module. Then, when the number of sampling points in the sampling data reaches the window length of the sliding sampling evaluation window, the second acquisition module updates the current zero-point threshold to obtain a zero-crossing trigger threshold. Finally, the rotational speed measurement module acquires the rotational speed information of the measurement-while-drilling instrument based on the sampling data, the zero-crossing trigger threshold, and a preset effective zero-crossing feature mask. Thus, by periodically updating the current zero-point threshold to obtain the zero-crossing trigger threshold and combining it with the effective zero-crossing feature mask, rotational speed measurement of the measurement-while-drilling instrument is achieved. This results in more stable and interference-resistant rotational speed measurement of the measurement-while-drilling instrument using less hardware cost and computation time.

[0080] Figure 6 This is a block diagram of a drilling measurement instrument based on geomagnetic measurement according to an embodiment of the present invention.

[0081] Specifically, in some embodiments of the present invention, the geomagnetic measurement-while-drilling instrument 1000 includes: a microprocessor 101; a single-axis magnetic sensor 102, fixed radially along the measuring-while-drilling instrument 1000, used to cut the geomagnetic field signal during the rotation of the measuring-while-drilling instrument 1000 to collect the radial geomagnetic field signal of the instrument and generate sampling data; an analog-to-digital converter 103, connected to the single-axis magnetic sensor 102, used to acquire the AD code value sequence of the sampling data according to a preset sampling frequency; and a memory 104, on which a computer program is stored. When the computer program is executed by the microprocessor, the microprocessor implements the geomagnetic measurement-based rotational speed measurement method of the above embodiments of the present invention.

[0082] It should be understood that the specific implementation of the measurement while drilling instrument 1000 in the embodiments of the present invention can refer to the specific implementation of the rotational speed measurement method based on geomagnetic measurement in the foregoing embodiments of the present invention. To reduce redundancy, it will not be repeated here.

[0083] In summary, the geomagnetic measurement-while-drilling instrument based on the embodiments of the present invention can achieve more stable and more interference-resistant rotational speed measurement with less hardware cost and computation cycle.

[0084] 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, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0085] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0086] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0087] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0088] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0089] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0090] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

[0091] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for measuring rotational speed based on geomagnetic measurement, characterized in that, The method includes: The sampling data of a single-axis magnetic sensor is obtained. The single-axis magnetic sensor is fixed radially along the measurement while drilling instrument. During the rotation of the measurement while drilling instrument, the geomagnetic field signal is cut to collect the radial geomagnetic field signal of the instrument and generate the sampling data. If the number of sampling points of the sampled data reaches the window length of the sliding sampling evaluation window, the current zero-point threshold is updated to obtain the zero-crossing trigger threshold. Based on the sampled data, the zero-crossing trigger threshold, and the preset effective zero-crossing feature mask, the rotational speed information of the drilling measurement instrument is obtained.

2. The rotational speed measurement method based on geomagnetic measurement according to claim 1, characterized in that, The preset valid zero-crossing feature mask is a binary sequence consisting of a series of first logic state bits and a series of second logic state bits.

3. The rotational speed measurement method based on geomagnetic measurement according to claim 2, characterized in that, The step of updating the current zero-point threshold to obtain the zero-crossing trigger threshold includes: The AD code value sequence of the sampled data is obtained by an analog-to-digital converter at a preset sampling frequency; Obtain the maximum and minimum values ​​of all AD code values ​​within the sliding sampling evaluation window, and obtain the AC amplitude of the sampled data based on the maximum and minimum values; Obtain the sum of all AD code values ​​within the sliding sampling evaluation window, and obtain the dynamic zero-point baseline of the sampling data based on the sum and the window length; The zero-crossing trigger threshold is obtained based on the dynamic zero-point baseline and the AC amplitude.

4. The rotational speed measurement method based on geomagnetic measurement according to claim 3, characterized in that, The step of obtaining the zero-crossing trigger threshold based on the dynamic zero-point baseline and the AC amplitude includes: If the AC amplitude is greater than the preset effective signal dead zone threshold, then the zero-crossing trigger threshold is obtained based on the AC amplitude, the dynamic zero-point baseline, and the preset hysteresis coefficient.

5. The rotational speed measurement method based on geomagnetic measurement according to claim 3, characterized in that, The step of obtaining the rotational speed information of the measurement-while-drilling instrument based on the sampled data, the zero-crossing trigger threshold, and the preset valid zero-crossing feature mask includes: The AD code value sequence of the sampled data is compared with the zero-crossing trigger threshold by an integer value in a single instruction cycle to obtain a system status word of length N bits, where N is the total number of bits of the preset effective zero-crossing feature mask; Perform bitwise logical matching between the system status word and the preset valid zero-crossing feature mask; A valid positive zero-crossing event is determined to have occurred if and only if the system status word is exactly equal to the preset valid zero-crossing feature mask, the positive zero-crossing events are counted and the index of the current zero-crossing point in the sampled data sequence is recorded; The rotational speed information of the drilling measurement instrument is obtained based on the index difference between the preset sampling frequency and the adjacent positive zero-crossing events.

6. The rotational speed measurement method based on geomagnetic measurement according to claim 5, characterized in that, The step of comparing the AD code value sequence of the sampled data with the zero-crossing trigger threshold by an integer value over a single instruction cycle to obtain a system status word of length N bits includes: Based on the comparison result between the current AD code value and the zero-crossing trigger threshold, a logic state bit is generated, wherein if the current AD code value is greater than the zero-crossing trigger threshold, the first logic state bit is generated, and if the current AD code value is less than the zero-crossing trigger threshold, the second logic state bit is generated. The generated logical state is shifted into the least significant bit of a system state register of length N, and the most significant bit is shifted out, thus maintaining the system state word of length N in real time.

7. The rotational speed measurement method based on geomagnetic measurement according to claim 1, characterized in that, The method further includes: The sampled data is filtered and the rotational speed information is averaged.

8. A computer-readable storage medium, characterized in that, It stores a rotational speed measurement program based on geomagnetic measurement, which, when executed by a processor, implements the rotational speed measurement method based on geomagnetic measurement as described in any one of claims 1-7.

9. A rotational speed measuring device based on geomagnetic measurement, characterized in that, The device includes: The first acquisition module is used to acquire sampling data from a single-axis magnetic sensor. The single-axis magnetic sensor is fixed radially along the measurement-while-drilling instrument. During the rotation of the measurement-while-drilling instrument, it cuts the geomagnetic field signal to collect the radial geomagnetic field signal of the instrument and generate the sampling data. The second acquisition module is used to update the current zero-point threshold to obtain the zero-crossing trigger threshold if the number of sampling points of the sampling data reaches the window length of the sliding sampling evaluation window. The rotational speed measurement module is used to obtain the rotational speed information of the drilling measurement instrument based on the sampled data, the zero-crossing trigger threshold, and the preset effective zero-crossing feature mask.

10. A drilling measurement instrument based on geomagnetic measurement, characterized in that, The measurement-while-drilling instrument includes: microprocessor; A single-axis magnetic sensor is fixed radially along the measurement-while-drilling instrument and is used to cut the geomagnetic field signal during the rotation of the measurement-while-drilling instrument to acquire the radial geomagnetic field signal of the instrument and generate sampling data. An analog-to-digital converter, connected to the single-axis magnetic sensor, is used to acquire the AD code value sequence of the sampled data according to a preset sampling frequency; A memory having a computer program stored thereon, which, when executed by the microprocessor, implements the rotational speed measurement method based on geomagnetic measurement as described in any one of claims 1-7.