Fault-tolerant drilling rig hook height intelligent detection method and system

CN122982103APending Publication Date: 2026-10-27SICHUAN ZHONGMAN ELECTRICAL ENG & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611151024.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]针对上述问题,本发明提供了一种容错式钻机大钩高度智能检测方法及系统,其能够解决现有单一编码器方案因单点故障导致大钩高度测量功能完全丧失的问题

Benefits of technology

[0044]1.通过构建硬件编码器信号、软编码脉冲信号以及机械位置信号多路异构信号源,并结合传动链一致性校核与数据仲裁,在任何单一传感器失效时,进行精准区分与无扰切换,确保高度测量输出不中断,消除了单点故障。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122982103A_ABST
    Figure CN122982103A_ABST
Patent Text Reader

Abstract

The application discloses a kind of fault-tolerant drilling rig hook height intelligent detection method and system, belong to petroleum drilling field.The method gathers hardware encoder, soft encoder and mechanical position three-way heterogeneous signal to construct redundant signal source;With elevator contact drilling platform surface as absolute zero point, manually input initial winding state and combine steel wire rope triangle compact arrangement certainty geometric model, realize fast calibration and high-precision height solution;Through comparing mechanical and electrical speed check transmission chain, again cross-verification double-encoder signal and carry out fault arbitration and non-disturbance switching;Utilize derrick calibration switch periodic correction cumulative error.The system includes PLC, hardware encoder, drawworks frequency converter, mechanical sensing unit, calibration switch and non-volatile memory.The application solves single point failure problem, simplifies calibration process, improves the reliability and maintainability of system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil drilling, specifically to a fault-tolerant drilling rig hook height intelligent detection method and system. Background Technology

[0002] In oil drilling operations, real-time, accurate, and reliable detection of the hook height is the core foundation for ensuring drilling safety and achieving automation. The currently widely used single rotary encoder solution has two fundamental drawbacks: First, it has a high risk of single-point failure; damage to the encoder or wiring leads to the loss of the entire measurement function. Second, the calibration mode is rigid; every time the rope is changed or reversed, the model parameters must be recalibrated manually through a cumbersome and time-consuming process, and the root cause of the fault cannot be identified. Simple redundant encoder solutions of the same model are costly and subject to the risk of common-cause failures. Therefore, there is an urgent need for an innovative solution that can achieve true heterogeneous fault tolerance and provide a simple and reliable calibration method. Summary of the Invention

[0003] To address the aforementioned problems, this invention provides a fault-tolerant intelligent detection method and system for the hook height of drilling rigs, which can solve the problem that the existing single encoder solution completely loses the hook height measurement function due to a single point of failure.

[0004] The technical solution of this invention is:

[0005] A fault-tolerant intelligent detection method for the hook height of a drilling rig includes the following steps:

[0006] The hardware encoder signal of the drum rotation shaft, the soft-coded pulse signal fed back by the drive motor, and the mechanical position signal reflecting the actual position of the drum are periodically collected to construct a multi-channel heterogeneous signal source for the calculation of the hook height.

[0007] The physical position where the bottom of the hoist contacts the drill platform is taken as the absolute height zero point. At the same time, the angle reference of the multi-channel heterogeneous signal source is established in the zero point state, and the encoder cumulative value is initialized.

[0008] When manually inputting the initial winding state of the wire rope during zero-point calibration, the initial height reference value is calculated based on the initial winding state and the inherent drilling rig structural parameters through a deterministic geometric model.

[0009] Based on the soft-coded pulse signal and the mechanical position signal, the working state of the mechanical transmission chain is checked for consistency. If the check passes, cross-validation and data arbitration are performed. When the hardware encoder signal is arbitrated as abnormal, the main signal source used by the system for height measurement is smoothly switched to the soft encoder signal without disturbance to output continuous height values.

[0010] Based on the effective drum rotation amount confirmed by the data arbitration, combined with the inherent geometric parameters of the drilling rig and the initial reference height obtained through calibration, the absolute height of the hook is calculated and output in real time according to the triangular close arrangement model of the wire rope on the drum.

[0011] By using a calibration switch installed at a known height position on the derrick, the cumulative value of the encoder used for height calculation is forcibly corrected each time the hook passes by, so as to eliminate cumulative error.

[0012] Furthermore, the specific steps for verifying the consistency of the working state of the mechanical transmission chain include:

[0013] The reference mechanical rotational speed of the drum is calculated based on the mechanical position signal;

[0014] The reference electrical rotational speed on the drum side is calculated based on the motor feedback;

[0015] The reference mechanical speed and reference electrical speed are compared in real time. If the deviation between the two continues to exceed the preset threshold, the transmission chain is judged to be in an abnormal working state. Otherwise, the verification is passed and cross-verification and data arbitration steps are performed.

[0016] Furthermore, the specific steps of the cross-validation and data arbitration include:

[0017] Calculate the cumulative pulse deviation or instantaneous value deviation between the hardware encoder signal and the software encoder signal within a preset time window;

[0018] The deviation is compared with a dynamic threshold established based on historical statistical data;

[0019] If the deviation continues to exceed the dynamic threshold, the hardware encoder signal is determined to be abnormal, and subsequent switching steps are performed; otherwise, the signal source remains unchanged.

[0020] Furthermore, the mechanical position signal is converted into a reference mechanical speed using the following formula:

[0021] ω mech =(Δθ / 360) / Δt,

[0022] Where Δθ is the increment of the fixed rotation angle of the roller, in degrees; Δt is the time difference between two consecutive occurrences of the same reference mark, in minutes; ω mech Reference mechanical speed, unit RPM.

[0023] Furthermore, the wire rope triangular close-packed model L total_now The following formula is used for calculation:

[0024] ,

[0025] Among them, L total_now D represents the total length of the wire rope currently wound around the drum, in meters. drum d represents the pre-stored base circle diameter of the roller, in meters. rope L represents the pre-stored nominal diameter of the wire rope, in meters; Turns[k] represents the pre-stored design full-layer turn count of the k-th layer of the wire rope, dimensionless; now The number of winding layers in real time, calculated based on the effective rotation amount, is dimensionless; C now For the Lth now The real-time number of winding turns within a layer is dimensionless; √3 is a dimensionless geometric coefficient characterizing the radial increment between layers when the wire rope is arranged in a tight triangular pattern.

[0026] Furthermore, it also includes steps for preserving and restoring security in extreme scenarios:

[0027] When the system is in a fault-tolerant state that relies on the soft encoder signal for operation, key parameters, including the current height value, the cumulative value of the soft encoder, and the initial height reference value, are frozen and stored in non-volatile memory as a status packet.

[0028] When the system experiences a complete power outage and restarts, if it needs to recover from the fault-tolerant state, the system guides the operator to manually control the large hook to perform a verification displacement in order to trigger the calibration switch;

[0029] The system compares the known physical height of the trigger point with the theoretical height calculated based on the status packet, and performs a security check on the system status or requests a recalibration based on the comparison result.

[0030] Another aspect of the present invention provides a fault-tolerant intelligent detection system for the hook height of a drilling rig, comprising:

[0031] A programmable logic controller (PLC) configured to execute the software logic of the method according to any one of claims 1-6;

[0032] A drum hardware encoder is installed on the rotating shaft of the drilling rig drum, and its signal output terminal is connected to the PLC.

[0033] The winch frequency converter is connected to the PLC for communication and is used to provide the PLC with the motor speed feedback value;

[0034] The mechanical sensing unit includes a group of metal probes fixed to the end face of the drum and at least one proximity switch for detection axially fixed to the side of the drum by a bracket. The signal output terminal of the proximity switch is connected to the PLC.

[0035] The calibration reference unit includes a calibration proximity switch installed at a predetermined height position on the derrick, and its signal output terminal is connected to the PLC;

[0036] A non-volatile memory, connected to the PLC, is used to store system parameters, calibration data, and status packets.

[0037] Furthermore, in the mechanical sensing unit:

[0038] The metal probe group includes a reference probe mounted on a first circumferential radius and multiple ordinary probes mounted on a second circumferential radius different from the first circumferential radius; the at least one detection proximity switch consists of two, whose radial mounting positions are precisely aligned with the first circumferential radius and the second circumferential radius, respectively.

[0039] Furthermore, it also includes:

[0040] An uninterruptible power supply (UPS) is provided to independently power the PLC and all sensors;

[0041] The PLC is also configured to: when it detects that the UPS is supplying power and the drilling rig disc brake is in a holding state, immediately save the current soft encoder cumulative value as the brake position reference value in the non-volatile memory; and after the system is completely powered off and restarted, if it detects that the disc brake is still in a holding state, directly load the brake position reference value to quickly rebuild the system state.

[0042] Furthermore, all actions involving the drive winch and moving hook are guided by the human-machine interface and manually performed by the operator; the PLC does not directly output any motion control commands to the winch frequency converter or actuator.

[0043] The beneficial effects of this invention are:

[0044] 1. By constructing multiple heterogeneous signal sources including hardware encoder signals, soft encoder pulse signals, and mechanical position signals, and combining transmission chain consistency verification and data arbitration, accurate differentiation and seamless switching are performed when any single sensor fails, ensuring uninterrupted height measurement output and eliminating single-point faults.

[0045] 2. By setting the absolute zero point and manually inputting the initial state for calibration, the complex calibration that used to take several hours has been simplified into a human-machine dialogue operation that can be completed in a few minutes, greatly reducing the difficulty of operation and shortening the equipment maintenance downtime. Attached Figure Description

[0046] Figure 1 This is a block diagram of the overall hardware structure of the system of the present invention;

[0047] Figure 2 This is a flowchart of the method of the present invention.

[0048] Figure 3This is a flowchart of the steps for rotating chain consistency verification and data reliability arbitration.

[0049] Figure 4 It is a schematic diagram illustrating the principle steps of absolute zero calibration and angular reference establishment;

[0050] Figure 5 This is a flowchart illustrating the steps involved in preserving and restoring security in extreme scenarios.

[0051] Figure 6 This is a detailed schematic diagram of the installation and arrangement of the mechanical sensing unit in this invention;

[0052] Figure 7 This is a schematic diagram illustrating the principle of the deterministic geometric height calculation model of this invention. Detailed Implementation

[0053] The following will refer to the appendices in the embodiments of the present invention. Figure 1-7 The technical solutions in the embodiments of the present invention are clearly and completely described herein. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0054] Example 1

[0055] The implementation of this embodiment is based on Figure 1 The system shown includes: a programmable logic controller (PLC) configured to execute the software logic of any one of claims 1-6; a drum hardware encoder mounted on the rotating shaft of the drilling rig drum, the signal output of which is connected to the PLC; a winch frequency converter communicatively connected to the PLC for providing the PLC with motor speed feedback values; a mechanical sensing unit including a group of metal probes fixed to the end face of the drum and at least one detection proximity switch axially fixed to the side of the drum via a bracket, the signal output of which is connected to the PLC; a calibration reference unit including a calibration proximity switch mounted at a predetermined height position on the derrick, the signal output of which is connected to the PLC; and a non-volatile memory connected to the PLC for storing system parameters, calibration data, and status packets.

[0056] Based on the above system, this invention provides a fault-tolerant intelligent detection method for the hook height of drilling rigs. Through the collaborative operation of multiple heterogeneous signal sources and an intelligent arbitration mechanism, it achieves high-precision and high-reliability hook height measurement. The method includes the following steps:

[0057] The hardware encoder signal of the drum rotation shaft, the soft-coded pulse signal fed back by the drive motor, and the mechanical position signal reflecting the actual position of the drum are periodically collected to construct a multi-channel heterogeneous signal source for the calculation of the hook height.

[0058] Specifically, the programmable logic controller (PLC) synchronously acquires and processes three signals at a fixed period (e.g., 20ms). For the first signal, the PLC directly reads the A / B phase pulses output by the hardware encoder mounted on the drilling rig's rotating shaft via a high-speed counting module, converting them into a cumulative pulse value P representing the absolute rotation angle of the drum. hard The first signal is a high-resolution direct physical measurement; the second channel, the PLC reads the actual motor speed N from the winch frequency converter driving the drum in real time via the PROFIBUS-DP communication bus. motor (Unit: RPM), the filtered speed N is obtained after filtering the original motor speed. optimal Then, the calculated periodic pulse increment ΔP is substituted into the soft encoder generation algorithm. soft Accumulated into internal variables, this generates a virtual soft encoder cumulative value S that is completely consistent with the physical meaning and dimensions of the hardware encoder signal. soft The signal characterizes the expected drum position based on the electrical drive command; the third path involves the PLC continuously monitoring the signal from the mechanical sensing unit via a digital input module. This unit consists of a group of metal probes mounted on a specific radius circumference of the drum end face (including a reference probe P0 mounted on the circumference of radius R2, and four ordinary probes P1-P4 mounted on the circumference of radius R1) and two proximity switches mounted axially (switch A aligned with the circumference of R2, and switch B aligned with the circumference of R1). When the drum rotates, each time the reference probe P0 passes switch A, a signal is generated. A rising edge pulse is generated, and the PLC accurately records its trigger timestamp. This pulse strictly corresponds to the roller rotating a fixed angle of 360 degrees (△θ=360°), thus providing an absolute mechanical rotation position and event reference that does not depend on any electrical system. The three signal sources are the direct measurement signal from the shaft angle sensor, the integral calculation signal from the motor feedback, and the absolute reference signal from the pure mechanical structure. They are completely heterogeneous in terms of physical principles, information sources, and fault modes, and together they construct a redundant signal source system with inherent cross-verification capabilities that can cope with single-point failures.

[0059] It should be further explained that the algorithm for generating periodic pulse increments using a soft encoder is as follows:

[0060] ΔP soft =(N optimal ×PPR×T) / (60×i),

[0061] Where, N optimal The filtered speed is obtained after filtering the original motor speed; PPR is the nominal pulse count of the hardware encoder (e.g., 1024); T is the sampling period; i is the total transmission ratio from the motor to the drum.

[0062] The physical position where the bottom of the hoist contacts the drill platform is taken as the absolute height zero point. At the same time, an angle reference for multiple heterogeneous signal sources is established in the zero point state, and the encoder cumulative value is initialized.

[0063] Specifically, the driller first manually operates the winch control handle beside the drill rig, slowly lowering the large hook until visual confirmation that the bottom of the jack is in complete contact with the drill rig surface. This physical contact point is defined as the absolute height zero point (H=0). Then, the driller presses the "Zero Point Calibration" confirmation button via the human-machine interface installed in the driller's cabin. Upon receiving this instruction, the system synchronously performs initialization operations via the programmable logic controller: immediately recording the signal status of the mechanical sensing unit—that is, regardless of whether the reference probe in the metal probe group is triggered, the system records the real-time signal combination of all proximity switches to determine the mechanical reference angle position of the drum at the absolute zero point; simultaneously, it reads and records the real-time cumulative value of the hardware encoder and the software encoder. Next, the system performs a logical zeroing: storing the real-time cumulative values ​​of the hardware encoder and the software encoder as logical offsets for the hardware and software encoders, respectively. In all subsequent height calculations, the encoder logical value used by the system is the current physical reading value minus this offset, thus logically achieving the zeroing of the encoder cumulative value at the zero point. At this point, the system has completed the unification and initialization of the angle reference of multiple heterogeneous signal sources based on absolute physical position, laying a precise and unique starting reference system for subsequent height calculation based on relative displacement.

[0064] It should be noted that the formula for updating the cumulative value of the soft encoder is as follows:

[0065]

[0066] in, Represents the cumulative pulse value of the soft encoder in the current sampling period, dimensionless; Represents the cumulative pulse value of the soft encoder in the previous sampling period, dimensionless; This represents the dimensionless increment of the soft encoder pulse calculated based on the motor speed within the current sampling period.

[0067] in, The calculation formula is:

[0068]

[0069] in, The real-time motor speed after filtering (unit: RPM); This represents the nominal pulse count of the hardware encoder. Sampling period (unit: minutes); The total transmission ratio from the motor to the drum (dimensionless).

[0070] When manually inputting the initial winding state of the wire rope during zero-point calibration, the initial height reference value is calculated through a deterministic geometric model based on the initial winding state and the inherent drilling rig structural parameters.

[0071] Specifically, the driller manually inputs two key state parameters of the wire rope on the drum at the zero-point calibration time (i.e., when the hoist contacts the drill table) through a dedicated input window on the human-machine interface (HMI): the initial number of winding layers (Layer). Init With the initial number of turns within that layer Init The system receives and stores these two manually input values. Subsequently, the programmable logic controller (PLC) calls upon pre-stored geometric parameters characterizing the inherent structure of the drilling rig in its non-volatile memory, including: the drum base circle diameter D. drum 1. Nominal diameter d of wire rope rope The system uses a preset array of full-layer turns (Turns[k]) for each winding layer and the number of ropes (R) in the moving system. Based on the manually input initial winding layer number, the initial number of turns within that layer, and these inherent parameters, the system applies a deterministic geometric model that is completely consistent with the real-time height calculation. This model is a mathematical model of the wire ropes being arranged in a tight triangular pattern on the drum to calculate the reference height. The core of this model is that for each layer of wire rope winding, the increment of its winding diameter is: nominal wire rope diameter × √3. Based on the initial winding layer number and the initial number of turns within that layer, the system calculates the theoretical total length L of all the wire ropes already wound on the drum at time zero. base Its calculation principle is similar to the subsequent real-time calculation of L. total_now The states are the same, but the state is fixed at the initial moment. Finally, according to formula H... base =L base / R, the system calculates the theoretical initial lifting height corresponding to the length of the wound rope in the zero-point state, and sets this H base The values ​​are stored in non-volatile memory as a constant reference for all subsequent real-time height calculations. This process transforms the driller's intuitive on-site observations (number of layers and circles) into a precise mathematical model reference, realizing a deterministic transformation from subjective experience to objective data, and completely replacing the cumbersome physical measurements and trial-and-error calibration in traditional methods.

[0072] It should be noted that the calculation of the absolute height of the hook needs to take into account the complete geometric topology of the drilling rig system. Specifically, the absolute height H of the hook... absolute Total length L of the wire rope wound with the drum total The following relationship exists between them:

[0073] H absolute =(L total -L base ) / R+H offset

[0074] Among them, L base R represents the initial total length of the wire rope already wound on the drum at calibration; R represents the number of ropes in the traveling system (i.e., the number of working wire ropes between the crane and the traveling block); H represents the initial total length of the wire rope already wound on the drum at calibration. offset For a fixed geometric offset, it means that when the length of the rope wound on the drum is equal to L base At that time, the height component corresponding to the length of the wire rope path from the rope exit point of the drum to the fixed pulley of the gantry crane is determined by the drilling rig structure and specifically includes geometric parameters such as the spatial distance between the rope exit point of the drum and the fixed pulley of the gantry crane and the position of the dead rope end fixing point.

[0075] H offset The method for obtaining the value is as follows: during the initial system installation or when the derrick structure changes, a fixed bias value is stored in non-volatile memory through on-site measurement or pre-stored equipment factory parameters. In subsequent real-time height calculations, the system uses the current total rope length L... total_now Combined with the pre-stored L base R and H offset The absolute height of the hook is calculated using the formula described above.

[0076] By introducing a fixed geometric offset H offset This invention establishes a complete mapping relationship between the length of the rope wound on the roller and the absolute height of the hook, ensuring the accuracy of the height calculation.

[0077] Based on soft-coded pulse signals and mechanical position signals, the consistency of the working state of the mechanical transmission chain is checked. The specific steps for checking the consistency of the working state of the mechanical transmission chain include:

[0078] The reference mechanical speed of the roller is calculated based on the mechanical position signal; the reference electrical speed of the roller side is calculated based on the motor feedback; the reference mechanical speed and the reference electrical speed are compared in real time. If the deviation between the two continuously exceeds the preset threshold, the transmission chain is judged to be in an abnormal working state. Otherwise, the verification is passed and cross-validation and data arbitration steps are performed.

[0079] Specifically, during normal system operation, the programmable logic controller (PLC) continuously performs real-time consistency checks on the working state of the mechanical transmission chain. The specific process is as follows: The controller first calculates the actual mechanical rotational speed of the roller based on the signals provided by the mechanical sensing unit. This calculation is based on reference points in the metal probe group (such as...). Figure 6The time interval between two consecutive triggers of the same proximity switch (P0) is used to directly obtain the actual mechanical speed in revolutions per minute (RPM) by dividing the fixed angle of the drum rotation (360 degrees) by the time interval. Simultaneously, the controller periodically reads the real-time speed feedback value of the motor from the winch frequency converter. After digitally filtering this raw value to smooth fluctuations, it is converted into the corresponding theoretical electrical speed on the drum side based on the total transmission ratio from the motor to the drum. The system then compares the real-time calculated actual mechanical speed with the theoretical electrical speed, calculating the absolute deviation between the two. If this deviation exceeds a preset alarm threshold (e.g., 5 RPM) for multiple consecutive calculation cycles, the system determines that the mechanical transmission chain is abnormal, potentially experiencing slippage, shaft breakage, or other faults, and immediately issues a clear "transmission chain abnormality" alarm through the human-machine interface. If the deviation remains within the threshold range, the verification passes, indicating that the mechanical power transmission path from the motor to the drum is working normally, and the system then proceeds to the subsequent cross-verification and data arbitration steps for the hardware encoder and software encoder signals. This verification mechanism constitutes the first level of protection for the system's intelligent diagnosis, ensuring that any mechanical transmission failure can be detected and alerted immediately.

[0080] It should be noted that the formula for converting the mechanical position signal into a reference mechanical speed is as follows:

[0081] ω mech =(Δθ / 360) / Δt,

[0082] Where Δθ is the increment of the fixed rotation angle of the roller, in degrees; Δt is the time difference between two consecutive occurrences of the same reference mark, in minutes; ω mech Reference mechanical speed, unit RPM.

[0083] If the verification passes, cross-validation and data arbitration are performed. The specific steps of cross-validation and data arbitration include: calculating the cumulative pulse deviation or instantaneous value deviation between the hardware encoder signal and the software encoder signal within a preset time window; comparing the deviation with a dynamic threshold established based on historical statistical data; if the deviation continues to exceed the dynamic threshold, the hardware encoder signal is determined to be abnormal and subsequent switching steps are performed; otherwise, the signal source remains unchanged.

[0084] Specifically, after the mechanical transmission chain consistency verification is passed, the system immediately enters the second-level intelligent diagnostic process, which involves cross-verification and data arbitration of the hardware encoder signal and the soft encoder signal. The specific implementation steps are as follows: Within a preset time window (e.g., the last 2 seconds), the programmable logic controller continuously calculates the absolute deviation between the real-time cumulative pulse value of the hardware encoder and the real-time cumulative pulse value of the soft encoder. Simultaneously, the system maintains a dynamic threshold based on long-term historical data statistics. This threshold is typically composed of the average of historical deviations plus several times the standard deviation, and can adapt to the normal fluctuation range of the system. The system compares the calculated real-time deviation with this dynamic threshold in real time. If this deviation value continuously exceeds the dynamic threshold for multiple consecutive judgment cycles, the system determines that the hardware encoder signal is abnormal, possibly indicating a disconnection, damage, or severe interference, and immediately generates a specific fault code (e.g., "Fault-102: Data Abnormality") to provide an alarm prompt on the human-machine interface, while simultaneously triggering the subsequent signal source switching process. If the real-time deviation remains within the dynamic threshold, the arbitration result is that the hardware encoder signal is normal and reliable. The system maintains its current state, and the main signal source for height measurement remains unchanged, still relying on the hardware encoder signal for subsequent calculations. This arbitration mechanism enables precise location of sensor malfunctions, providing a clear decision-making basis for seamless switching.

[0085] It should be noted that the programmable logic controller (PLC) synchronously reads the real-time cumulative pulse values ​​of the hardware encoder and the software encoder in each fixed control cycle, and performs two types of deviation calculations within a preset time window (e.g., 2 seconds). The first is the instantaneous value deviation calculation: directly calculating the absolute value of the difference between the cumulative values ​​of the two signals at the current moment, i.e., ΔP. inst =∣P hard -P soft | The second method is cumulative pulse deviation calculation: The system records the cumulative values ​​at the start and end times of the time window, and calculates the pulse increments of the hardware encoder and software encoder within the window period, then calculates the absolute value of the difference between these two increments. Cumulative pulse deviation calculation effectively smooths instantaneous noise and more fundamentally reflects whether there is a systematic deviation trend between the two signals. More specifically, within a preset time window, the pulse increments of the hardware encoder and software encoder are independently accumulated. The cumulative value P at the start time of the window is obtained from the buffer. hard_start P soft_start The cumulative value P at the end of the window period (i.e., the current time). hard_end P soft_end Calculate the incremental difference between the two within the window period: ΔP cum =∣(P hard_end -P hard_start )-(P soft_end -P soft_startThe system will use one or two of the above deviation calculation results as the basis for subsequent arbitration. The calculated historical deviation data (e.g., ΔP over the past 100 periods) will be used. inst or ΔP cum The data is stored in another statistical buffer. The statistical mean μ and standard deviation σ of the data in this buffer are calculated periodically (e.g., every second). The dynamic decision threshold TH is calculated using the formula TH = μ + k·σ, where k is a preset coefficient based on the system's fault tolerance level (typically 2 to 3). This threshold TH automatically adapts to the normal fluctuation range of the system under different operating conditions and wear stages. The system will then use the latest calculated deviation value ΔP. now A real-time comparison is performed with the currently active dynamic threshold TH. This comparison is performed by a state machine with a time-limited accumulation function: if ΔP now If ≤TH, the current period's data is considered normal, and a "continuous anomaly timer" is reset. If ΔP now If the value >TH, the system determines that the current period's data is abnormal, and starts or increments a "continuous abnormality timer." The system continuously monitors this timer. Only when the abnormal state accumulates to a preset stable threshold time (e.g., 1 second continuously) will the system ultimately determine that "the deviation continuously exceeds the dynamic threshold" and confirm that the hardware encoder signal is abnormal. This time accumulation judgment mechanism effectively avoids false alarms and false switching caused by instantaneous interference or noise.

[0086] When the hardware encoder signal is arbitrated as abnormal, the main signal source used by the system for height measurement is seamlessly and smoothly switched to the soft encoder signal to output continuous height values.

[0087] Specifically, in the programmable logic controller (PLC) program of the drilling rig, a data selector is set at the front end of the data used to calculate the hook height. The data selector has two inputs and one output. The two inputs are connected to the hardware encoder signal data and the soft encoder signal data, respectively. The switching of the data selector is determined by the arbitration logic. If the arbitration logic result is False, the data selector outputs the hardware encoder signal data; if the arbitration logic result is True, the data selector outputs the soft encoder signal data. When the arbitration logic determines that the hardware encoder signal is continuously abnormal, the system immediately triggers and executes the smooth, non-disruptive switching process of the height measurement main signal source. After the fault is determined, the system smoothly switches to the soft encoder channel within 20 milliseconds and displays the specific fault code on the HMI. To achieve truly smooth, non-disruptive switching and avoid jumps in the output height value due to inherent deviations between the two signals, this invention performs the following alignment and compensation operations at the moment of switching: When the arbitration logic determines that the hardware encoder signal is continuously abnormal and triggers the switching, the programmable logic controller (PLC) immediately captures the real-time cumulative pulse value of the hardware encoder at the current moment. Real-time cumulative pulse value of the soft encoder And calculate the deviation between the two:

[0088]

[0089] Subsequently, the system switches the main signal source from the hardware encoder to the software encoder, and in each subsequent sampling period, it accumulates the real-time value of the software encoder. Add this deviation The corrected cumulative value of the soft encoder is obtained:

[0090]

[0091] With the corrected soft encoder cumulative value This information serves as input for subsequent height calculations. Since the corrected soft encoder value at the moment of switching equals the current value of the hardware encoder, the output height value remains continuous without instantaneous jumps. Subsequently, the system continues to use the corrected soft encoder signal for height calculation until the fault is resolved or the system is recalibrated.

[0092] This compensation mechanism ensures the continuity of the output value during signal source switching, meeting the high-precision control requirements of oil drilling operations.

[0093] Based on the effective drum rotation amount confirmed by data arbitration, combined with the inherent geometric parameters of the drilling rig and the initial reference height obtained through calibration, the absolute height of the hook is calculated and output in real time according to the triangular close arrangement model of the wire rope on the drum.

[0094] Specifically, after the system completes signal arbitration and confirms the effective drum rotation amount used for height calculation, it executes the core step of "calculating and outputting the absolute height of the hook in real time based on the effective drum rotation amount confirmed by data arbitration, combined with the inherent geometric parameters of the drilling rig and the initial reference height obtained through calibration, according to the triangular close-packed model of the wire rope on the drum." The specific implementation process is as follows: The programmable logic controller first converts the valid signal (hardware or soft encoder pulse accumulation value) determined after arbitration into the total logical rotation number of the drum; then, based on this total number of rotations, the initial winding layer number and number of rotations stored during calibration, and the pre-stored design full-layer rotation number for each layer, the system dynamically calculates the current real-time winding layer number of the wire rope and the real-time winding rotation number within that layer. Next, the system calls the inherent geometric parameters stored in non-volatile memory—including the drum base circle diameter, the nominal diameter of the wire rope, the number of ropes in the traveling system, and the array of design full-layer rotation numbers for each layer—and substitutes them into the deterministic geometric model of the triangular close-packed wire rope for calculation. The core of this model is the assumption that for each tightly wound layer of wire rope, the increase in its winding diameter is √3 times the rope diameter. Based on the real-time number of layers and turns, the system uses a layer-by-layer accumulation formula to accurately calculate the theoretical total length of all wire rope currently wound on the drum. Dividing this total rope length by the number of ropes in the traveling system yields the theoretical total lifting height from the rope end. Finally, the system performs a crucial step: subtracting the initial reference height, calculated and stored during initial calibration, representing the rope length at the zero point, from this theoretical total lifting height. The difference obtained after subtraction is the real-time absolute height of the hook relative to the drill platform surface (absolute zero point). This height value is continuously output to the display instruments and drilling automation system, completing a precise, reliable, and deterministic mapping from rotational pulses to spatial position.

[0095] It should be noted that the wire rope triangular close-packed model L total_now The following formula is used for calculation:

[0096] ,

[0097] Among them, L total_now D represents the total length of the wire rope currently wound around the drum, in meters. drum d represents the pre-stored base circle diameter of the roller, in meters. rope L represents the pre-stored nominal diameter of the wire rope, in meters; Turns[k] represents the pre-stored design full-layer turn count of the k-th layer of the wire rope, dimensionless; now The number of winding layers in real time, calculated based on the effective rotation amount, is dimensionless; C now For the Lth now The real-time number of winding turns within a layer is dimensionless; √3 is a dimensionless geometric coefficient characterizing the radial increment between layers when the wire rope is arranged in a tight triangular pattern.

[0098] By using a calibration switch installed at a known height position on the derrick, the cumulative value of the encoder used for height calculation is forcibly corrected each time the hook passes by, in order to eliminate cumulative errors.

[0099] Specifically, based on the full lifecycle maintenance design of this invention, the step of "using a calibration switch installed at a known height position on the derrick to forcibly correct the cumulative encoder value used for height calculation each time the hook passes by, in order to eliminate cumulative errors" is implemented through the following specific process: A calibration proximity switch is installed on the main structure of the derrick at a known precise absolute height position (e.g., 0.5 meters from the drilling platform), and its signal is connected to the programmable logic controller (PLC). When the hook passes by and triggers the calibration switch for the first time during operation, the system treats this event as a "learning" opportunity: the controller records the main encoder logic cumulative value used for height calculation at the trigger moment (this value is based on an arbitrated valid signal source) and stores it as a reference code value in non-volatile memory. This value theoretically corresponds strictly to the known physical height. In all subsequent operations, each time the hook rises or falls and triggers the calibration switch, the system will perform a forced correction operation: the controller calculates the error between the current encoder logic cumulative value at the trigger moment and the stored reference code value, and instantly forces the logic encoder value used for all subsequent calculations to align to the reference recorded in the first learning operation by updating a global software offset. This operation is like applying an absolute physical caliper calibration point to the system's "software ruler," directly resetting the "zero drift" caused by encoder pulse accumulation errors and other reasons. This periodically eliminates the system's accumulated errors without interrupting the measurement, ensuring centimeter-level accuracy and reliability of height measurement during long-term operation.

[0100] Extreme scenario state preservation and safe recovery steps: When the system is in a fault-tolerant state that relies on the soft encoder signal, key parameters including the current height value, the cumulative value of the soft encoder and the initial height reference value are frozen and stored in non-volatile memory as a state packet;

[0101] Specifically, when the system confirms, through the intelligent diagnosis and arbitration process, that the hardware encoder signal has failed and has switched to a fault-tolerant state relying on the soft encoder signal, the system simultaneously activates the extreme scenario state preservation and safety recovery mechanism. This mechanism is implemented as follows: The programmable logic controller (PLC) periodically (or when triggered by a specific event) packages a set of key parameters used to completely reconstruct the current measurement state into a soft encoder state package. The core data of this state package includes: 1) the current absolute height value of the hook calculated and output by the system in real time; 2) the cumulative pulse value of the soft encoder internally upon which this height value is based; 3) the initial height reference value calculated and stored during system initialization calibration; and optional system status identifiers and timestamps. Subsequently, the controller writes this state package completely and once into a non-volatile memory (such as FRAM or RAM with battery backup) connected to the PLC through an atomic write operation, completing "freeze storage." This process ensures that even in the event of a sudden and complete power outage, the state package can be completely preserved, providing a unique and sufficient data basis for the system to attempt to reconstruct the accurate operating state before the power outage under known physical benchmark verification after power is restored.

[0102] When the system experiences a complete power outage and restarts, if it needs to recover from the fault-tolerant state, the system guides the operator to manually control the hook to perform a verification displacement in order to trigger the calibration switch.

[0103] Specifically, when the system experiences a complete power outage and restarts due to extreme circumstances, if its self-test detects a valid "soft encoder status packet" in the non-volatile memory (indicating that the system was in a fault-tolerant state relying on the soft encoder before the power outage), and the rapid recovery conditions are not met, the system automatically enters the "guided verification recovery" process. In practice, after completing basic initialization, the programmable logic controller (PLC) immediately displays clear guidance information and operating instructions on the human-machine interface in the driller's cabin, such as: "The system has recovered from the power outage and detected that the last operating state was fault-tolerant. Please manually and slowly raise or lower the hook until the derrick calibration switch is triggered to verify and restore the height reference." Simultaneously, the system continuously monitors the signal from the calibration proximity switch installed at a known height position on the derrick. Following the interface guidance, the driller manually operates the winch control handle to move the hook in a low-speed, controlled manner. The system senses the coarse displacement of the hook by reading the soft encoder signal in real time (the only available rotation signal at this time), but does not use this displacement for precise height calculation or control. The purpose is to guide the hook's clamp or a specific part to physically pass over and trigger the calibration switch installed on the derrick. Once the signal from the triggered calibration switch is captured by the PLC, the verification displacement guidance operation is complete, and the system immediately enters the next safety confirmation logic. This step strictly follows the safety principle of "human-machine collaboration, driller-led," entrusting the critical physical positioning operation to the operator to ensure the controllability and safety of the recovery process.

[0104] The system compares the known physical height of the trigger point with the theoretical height calculated based on the status packet, and performs a security check on the system status or requests recalibration based on the comparison results.

[0105] Specifically, after the calibration switch is triggered, the system immediately executes the final safety verification and status decision logic. The specific implementation process is as follows: First, the system retrieves the known physical height value of the calibration switch's installation location from internal storage (e.g., 0.5 meters from the drill platform). Simultaneously, the system reads the previously frozen soft encoder status packet from non-volatile memory. Using the cumulative soft encoder value at the time the status packet was generated, the initial height reference value, and the pre-stored drilling rig geometric parameters and deterministic geometric model contained within, the system reverse-engineers the theoretical height the hook should be at the time the status packet was frozen. Subsequently, the system performs a core comparison: calculating the absolute deviation between the known physical height and the theoretical height calculated based on the status packet.

[0106] Example 2

[0107] This embodiment only describes the differences from Embodiment 1, and the similarities will not be repeated. Based on Embodiment 1, this embodiment provides a fault-tolerant intelligent detection system for the hook height of drilling rigs. This system serves the detection method described in Embodiment 1 and achieves high-precision and high-reliability intelligent detection of the hook height through the coordinated cooperation of hardware devices.

[0108] The core control unit of this detection system is a programmable logic controller (PLC). The PLC has built-in dedicated software logic programs to execute the complete detection methods detailed in Example 1, including the construction of multiple heterogeneous signal sources, absolute zero-point calibration, mechanical transmission chain consistency verification, cross-validation and data arbitration, and real-time calculation of the hook's absolute height. The PLC adopts an industrial-grade design, possessing strong anti-interference capabilities and high reliability, and can operate stably in harsh drilling site environments.

[0109] The drum hardware encoder is directly mounted on the rotating shaft of the drilling rig drum, coaxially with the drum's axis, ensuring that the encoder output signal strictly corresponds to the actual rotation angle of the drum. The encoder employs a high-resolution photoelectric or magnetoelectric design, providing accurate rotation angle information. The encoder's signal output is connected to the PLC's digital input port via a dedicated signal line, enabling real-time angle data transmission.

[0110] The winch frequency converter establishes a communication connection with the PLC, typically using industrial communication protocols such as Modbus, PROFIBUS, or Ethernet. The frequency converter not only controls the operation of the drive motor but also transmits the motor's real-time speed feedback value to the PLC. This speed feedback value, after being converted by the transmission ratio, provides the PLC with soft-coded pulse signals, serving as a backup verification source for the hardware encoder signals.

[0111] The mechanical sensing unit comprises two key components: a metal probe assembly and detection proximity switches. The metal probe assembly is fixedly mounted on the end face of the drum, including a reference probe mounted on a first circumferential radius and multiple ordinary probes mounted on a second circumferential radius different from the first. The reference probe provides a precise rotational reference signal, while the ordinary probes assist in verification and enhance signal reliability. Two detection proximity switches are axially fixed to the side of the drum via dedicated brackets, with their radial mounting positions precisely aligned with the first and second circumferential radii to ensure accurate detection of the corresponding probe passage. The proximity switches employ inductive or capacitive sensors, offering high precision and strong anti-interference capabilities. As the drum rotates, the metal probes sequentially pass through the detection range of the proximity switches, generating pulse signals that are output to the PLC, providing reliable mechanical position signals for mechanical transmission chain consistency verification.

[0112] It should be noted that the mechanical position signal provided by the mechanical sensing unit in this embodiment includes two independent pulse sequences: one triggered by a reference probe, generating one reference pulse for each rotation; the other triggered by multiple ordinary probes, generating multiple ordinary pulses equal to the number of ordinary probes for each rotation. The programmable logic controller receives these two pulse signals through two independent digital input channels and automatically identifies their type based on the pulse source.

[0113] When calculating the reference mechanical speed, the system does not rely solely on the reference pulse. Specifically, the system dynamically selects the speed measurement mode based on the current operating conditions: when a high-precision speed reference is required, reference pulse speed measurement is used, that is, measuring the time interval Δt between two adjacent reference pulses. ref The drum rotation angle Δθ = 360°, and the rotational speed is calculated using the formula ω. mech =1 / Δt ref When it is necessary to improve the real-time performance of speed sampling, the system automatically switches to the normal pulse speed measurement mode, that is, it measures the time interval Δt between two adjacent normal pulses. ord And combined with the fixed angular interval Δθ between adjacent ordinary probe points ord (Equals 360° divided by the number of ordinary probes), the rotational speed is calculated using the formula ω. mech =(Δθ ord / 360°) / Δt ord In this mode, the roller rotates by one Δθ. ord The rotational speed can be updated once by adjusting the angle, and a high sampling frequency can still be guaranteed even under low-speed conditions.

[0114] The two pulse signals are physically acquired by proximity switches of different radii, and the signal channels are completely independent. Based on this, the programmable logic controller can automatically identify the pulse source and flexibly switch the speed measurement mode, thereby constructing an efficient and real-time speed monitoring logic.

[0115] The calibration reference unit includes a calibration proximity switch installed at a predetermined height on the derrick. The installation height of this switch is precisely measured and calibrated, serving as the absolute reference point for eliminating cumulative system errors. The calibration switch is typically installed at the standard operating height of the derrick, facilitating periodic triggering by the hook during normal operation. The signal output of the calibration switch is connected to the PLC. When the hook passes this position, the switch is triggered. Upon receiving the trigger signal, the PLC forcibly corrects the encoder's cumulative value according to the cumulative error elimination method described in Example 1.

[0116] The non-volatile memory is connected to the PLC and uses EEPROM, Flash memory, or other power-loss retained storage media. The memory stores key system operating parameters, including drilling rig structural parameters (drum base circle diameter, wire rope nominal diameter, designed full-layer coil count, etc.), calibration data (absolute zero point position, initial height reference value, calibration switch height, etc.), and status packets for fault-tolerant operation (current height value, soft encoder cumulative value, system operating status, etc.). This non-volatile storage of data ensures that the system can quickly recover to normal operating status after a power outage and restart.

[0117] During actual system operation, all actions involving the drive winch and moving hook are manually performed by the operator through a human-machine interface. The PLC focuses on signal acquisition, data processing, and height calculation, and does not directly output any motion control commands to the winch inverter or other actuators. This design ensures system safety, avoids potential safety risks associated with automatic control, and maintains complete operator control over equipment operation.

[0118] This detection system achieves accurate and reliable detection of the drilling rig hook height through a combination of multiple hardware redundancy designs and intelligent software algorithms. When the hardware encoder malfunctions, the system seamlessly switches to a software-encoded signal source, ensuring continuous detection. When an anomaly occurs in the transmission chain, the mechanical sensing unit can promptly detect and issue an alarm. When the system accumulates errors, the calibration reference unit can automatically correct them. The entire system possesses high fault tolerance and adaptability, providing reliable technical support for the safe and efficient operation of drilling.

[0119] Example 3

[0120] This embodiment provides a drilling rig height detection system, which can accurately monitor and safely control the height of the hook during drilling operations.

[0121] The system mainly includes a programmable logic controller (PLC), a soft encoder, a calibration switch, non-volatile memory, an uninterruptible power supply (UPS), a human-machine interface (HMI), and related sensor components. The PLC, as the core control unit, is responsible for receiving and processing various sensor signals, performing altitude calculations, and safety monitoring functions. The soft encoder is installed on the rotating parts of the drilling rig, enabling real-time detection of the rig's movement status and outputting corresponding pulse signals. The calibration switch is located at a specific position on the drilling rig to provide a known physical altitude reference point. The non-volatile memory stores critical system parameters and status information, ensuring data is not lost in the event of a power outage.

[0122] An uninterruptible power supply (UPS) provides independent power protection for the entire system, especially for the PLC and all sensors. When the main power supply fails, the UPS can immediately take over the power supply, ensuring continuous system operation. The PLC monitors the power supply status to identify whether it is currently powered by the UPS. Simultaneously, the PLC also monitors the operating status of the drilling rig's disc brakes, using relevant sensors to determine whether the disc brakes are in a holding state.

[0123] When the PLC detects that the system is powered by the UPS and the drilling rig's disc brake is in a holding state, it immediately performs a critical data saving operation. At this time, the PLC uses the current accumulated value of the soft encoder as the brake position reference value and writes it into non-volatile memory for permanent storage. This operation ensures that the last position information of the hook can be accurately recorded before the system is powered off. Saving the brake position reference value provides a reliable reference for restoring the system's state after a restart.

[0124] After the system is completely powered off and restarted, the PLC first checks the current status of the drilling rig's disc brake. If the disc brake is still engaged, it means the hook position did not change during the power outage. In this case, the PLC directly loads the previously saved brake position reference value from the non-volatile memory. In this way, the system can quickly reconstruct the accurate height status, avoiding a complex recalibration process and greatly shortening the system recovery time.

[0125] When the system is in a fault-tolerant state that relies on soft encoder signals, the PLC packages all key parameters, including the current height value, the cumulative soft encoder value, and the initial height reference value, into a complete state package and freezes it in non-volatile memory. These parameters constitute a complete snapshot of the system's operating state, providing comprehensive data support for subsequent state recovery.

[0126] When the system experiences a complete power outage and restart, if recovery from a fault-tolerant state is required, the system will initiate a dedicated recovery verification procedure. At this time, the system will provide guidance to the operator via a human-machine interface, instructing the operator to manually control the hook to perform a verification displacement operation. Following the interface prompts, the operator carefully moves the hook until the calibration switch is triggered.

[0127] Upon receiving the trigger signal from the calibration switch, the system immediately acquires the known physical height information of the trigger point. Simultaneously, based on previously saved status packet data, the PLC calculates the theoretical height of the current position using the accumulated value from the soft encoder and relevant parameters. The system then performs a precise comparison and analysis between the actual physical height of the trigger point and the theoretical height calculated based on the status packet.

[0128] Based on the comparison results, the system performs the corresponding safety verification or recalibration operation. If the deviation between the actual height and the theoretical height is within the allowable range, the system confirms successful recovery and continues normal operation. If the deviation exceeds the safety threshold, the system will request to execute a complete recalibration procedure to ensure the system's measurement accuracy and safety.

[0129] Regarding system operation and control, all actions involving the drive winch and moving hook are performed manually by the operator through a human-machine interface (HMI). The HMI provides clear operation instructions and status displays, allowing the operator to perform corresponding manual control operations based on the interface prompts. The PLC is solely responsible for monitoring and data processing throughout the process, and does not directly output any motion control commands to the winch inverter or other actuators. This design ensures operational safety, avoids potential safety risks associated with automatic control, and maintains complete operator control over the equipment.

[0130] This system achieves high reliability and safety in drilling rig height detection through multiple technical measures, including UPS power supply protection, intelligent status saving, rapid recovery mechanism, and manual operation control, providing a stable and reliable height monitoring solution for drilling operations.

[0131] The embodiments described above are merely illustrative of specific implementations of the present invention, and while the descriptions are detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.

Claims

1. A fault-tolerant intelligent detection method for the hook height of a drilling rig, characterized in that, Includes the following steps: A heterogeneous signal source for calculating the hook height is constructed by periodically acquiring hardware encoder signals from the drum's rotating shaft, soft-coded pulse signals fed back from the drive motor, and mechanical position signals reflecting the actual position of the drum. The physical position where the bottom of the hoist contacts the drill platform is taken as the absolute height zero point. At the same time, an angle reference for multiple heterogeneous signal sources is established in the zero point state, and the encoder cumulative value is initialized. When manually inputting the initial winding state of the wire rope during zero-point calibration, the initial height reference value is calculated based on the initial winding state and the inherent drilling rig structural parameters through a deterministic geometric model. Based on soft-coded pulse signals and mechanical position signals, the working state of the mechanical transmission chain is checked for consistency. If the check passes, cross-validation and data arbitration are performed. When the hardware encoder signal is arbitrated as abnormal, the main signal source used by the system for height measurement is seamlessly and smoothly switched to the soft encoder signal to output continuous height values. Based on the effective drum rotation amount confirmed by the data arbitration, combined with the inherent geometric parameters of the drilling rig and the initial reference height obtained through calibration, the absolute height of the hook is calculated and output in real time according to the triangular close arrangement model of the wire rope on the drum. By using a calibration switch installed at a known height position on the derrick, the cumulative value of the encoder used for height calculation is forcibly corrected each time the hook passes by, so as to eliminate cumulative error.

2. The method according to claim 1, characterized in that, The steps for verifying the consistency of the working state of the mechanical transmission chain include: The reference mechanical rotational speed of the drum is calculated based on the mechanical position signal; The reference electrical rotational speed on the drum side is calculated based on the motor feedback; The reference mechanical speed and reference electrical speed are compared in real time. If the deviation between the two continues to exceed the preset threshold, the transmission chain is judged to be in an abnormal working state. Otherwise, the verification is passed and cross-verification and data arbitration steps are performed.

3. The method according to claim 1, characterized in that, The specific steps of the cross-validation and data arbitration include: Calculate the cumulative pulse deviation or instantaneous value deviation between the hardware encoder signal and the software encoder signal within a preset time window; The deviation is compared with a dynamic threshold established based on historical statistical data; If the deviation continues to exceed the dynamic threshold, the hardware encoder signal is determined to be abnormal, and subsequent switching steps are performed; otherwise, the signal source remains unchanged.

4. The method according to claim 2, characterized in that, The mechanical position signal is converted into a reference mechanical speed using the following formula: oh mech =(Δθ / 360) / Δt, Where Δθ is the increment of the fixed rotation angle of the roller, in degrees; Δt is the time difference between two consecutive occurrences of the same reference mark, in minutes; ω mech Reference mechanical speed, unit RPM.

5. The method according to claim 1, characterized in that, The value L of the closely packed triangles of the steel wire rope total_now The following formula is used for calculation: , Among them, L total_now D represents the total length of the wire rope currently wound around the drum, in meters. drum d represents the pre-stored base circle diameter of the roller, in meters. rope L represents the pre-stored nominal diameter of the wire rope, in meters; Turns[k] represents the pre-stored design full-layer turn count of the k-th layer of the wire rope, dimensionless; now The number of winding layers in real time, calculated based on the effective rotation amount, is dimensionless; C now For the Lth now The real-time number of winding turns within a layer is dimensionless; √3 is a dimensionless geometric coefficient characterizing the radial increment between layers when the wire rope is arranged in a tight triangular pattern.

6. The method according to claim 1, characterized in that, It also includes steps for preserving and restoring security in extreme scenarios: When the system is in a fault-tolerant state that relies on the soft encoder signal for operation, key parameters, including the current height value, the cumulative value of the soft encoder, and the initial height reference value, are frozen and stored in non-volatile memory as a status packet. When the system experiences a complete power outage and restarts, if it needs to recover from the fault-tolerant state, the system guides the operator to manually control the large hook to perform a verification displacement in order to trigger the calibration switch; The system compares the known physical height of the trigger point with the theoretical height calculated based on the status packet, and performs a security check on the system status or requests a recalibration based on the comparison result.

7. A fault-tolerant intelligent detection system for the hook height of a drilling rig, using the method described in any one of claims 1-6, characterized in that, include: A programmable logic controller configured to perform the software logic of the method according to any one of claims 1-6; A drum hardware encoder is installed on the rotating shaft of the drilling rig drum, and its signal output terminal is connected to the programmable logic controller. The winch frequency converter is communicatively connected to the programmable logic controller (PLC) and is used to provide the PLC with motor speed feedback values. The mechanical sensing unit includes a group of metal probes fixed to the end face of the drum and at least one proximity switch for detection axially fixed to the side of the drum by a bracket. The signal output terminal of the proximity switch is connected to the programmable logic controller. The calibration reference unit includes a calibration proximity switch installed at a predetermined height position on the derrick, and its signal output terminal is connected to the programmable logic controller. A non-volatile memory, connected to the programmable logic controller, is used to store system parameters, calibration data, and status packets.

8. The system according to claim 7, characterized in that, In the mechanical sensing unit: The metal probe group includes a reference probe installed on a first circumferential radius and multiple ordinary probes installed on a second circumferential radius different from the first circumferential radius; the at least one detection proximity switch consists of two, whose radial installation positions are precisely aligned with the first circumferential radius and the second circumferential radius, respectively.

9. The system according to claim 6, characterized in that, Also includes: An uninterruptible power supply (UPS) is provided, with its output terminals electrically connected to the power ports of the programmable logic controller and all sensors, to maintain power supply when the external power supply is interrupted. The non-volatile memory also stores the brake position reference value; The programmable logic controller is equipped with a status monitoring unit and a status recovery unit. The status monitoring unit is used to monitor the power supply status and disc brake status. When the monitoring result is that the uninterruptible power supply is supplying power and the disc brake is in the holding state, the current soft encoder cumulative value is written into the non-volatile memory as the brake position reference value. The state recovery unit is used to read the brake position reference value from the non-volatile memory to reconstruct the system state after the system has been completely powered off and restarted, when it is detected that the disc brake is still in the holding state.

10. The system according to any one of claims 7, characterized in that, It also includes a human-machine interface, which is used to receive manual operation commands input by the operator and display operation guidance information; the equipment actions are completed by the operator through manual operation guided by the human-machine interface.