An unmanned aerial vehicle end precise docking control method based on visual servoing

By constructing a closed loop on the image plane using a visual servo control method and combining contact force and field-of-view margin criteria, the problem of precise docking of UAV end effectors in hovering state is solved, enabling efficient and safe high-altitude operations.

CN123067552APending Publication Date: 2026-11-10ZHONGDIAN HUACHUANG ELECTRIC POWER TECH RES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611571442.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-12
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

When drones are hovering, they are limited by wind load and dynamic characteristics, making it difficult for the end effector to accurately dock with the target. Existing control solutions are difficult to adapt to continuous disturbances in windy environments and lack dynamic verification mechanisms, which can easily lead to collisional contact or docking failure, affecting the continuity and safety of operations.

Method used

A visual servo-based control method is adopted, which drives the steering joint of the self-growing mechanism through closed-loop feedback on the image plane. Combined with end contact force and field margin criteria, the precise docking of the end effector is achieved, avoiding separate observation and compensation of drift and simplifying the camera calibration and target reconstruction process.

Benefits of technology

Achieving a 0.5mm end-joint error under both gusty and steady wind conditions reduces the risk of manual high-altitude operations, improves the continuity and safety of inspection operations, and reduces the probability of rework.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067552A_ABST
    Figure CN123067552A_ABST
Patent Text Reader

Abstract

The application discloses a kind of unmanned aerial vehicle end precision docking control method based on visual servo, and the current characteristic quantity is obtained by the docking target image acquisition of the end camera of the self-growth mechanism mounted by the hovering unmanned aerial vehicle;The characteristic deviation between the current characteristic quantity and the expected characteristic quantity obtained by teaching is calculated, and the generalized inverse mapping of the preset constant image Jacobian matrix is adjusted to each steering joint rotation angle adjustment amount and is issued, and the module value of the characteristic deviation is less than the convergence threshold value for continuous multiple periods;Drive mechanism extends along the end optical axis, and stops when contact force enters the set interval and judges docking completion, and exits extension when the characteristic deviation is re-overrun;Field of view margin index is derived from image matrix, and hovering position fine adjustment is requested when falling into early warning interval, and extension speed is lowered, so that extension direction is deflected to the side where target is located.The application makes hovering drift as characteristic deviation component be closed loop absorbed, and improves the docking precision under the condition of moving platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of UAV end-of-life docking control technology, specifically to a visual servo-based UAV end-of-life precision docking control method. Background Technology

[0002] For a long time, grounding continuity testing of lightning arresters on wind turbine blades has relied on manual high-altitude operations, which are inefficient and pose risks of falls and electric shock. To reduce these risks, the industry has been exploring the use of industrial-grade drones equipped with extendable end effectors. These drones deliver the end effectors to the vicinity of the blades to complete surface treatment and wiring. The precise docking between the end effector and the lightning arrester is a crucial step in this operational method and a bottleneck restricting its engineering application.

[0003] Due to wind loads and their own dynamic characteristics, drones inevitably experience continuous position and attitude drift while hovering. This drift manifests as a continuous shift of the target relative to the center of the field of view in images captured by the end-effector camera. Existing image feature-based end-effector servo control schemes typically only focus on the convergence of the feature deviation itself, without addressing situations where drift causes the target to approach or even exceed the field of view boundary. Once the target exceeds the field of view, visual feedback is interrupted, and the servo closed loop fails. Existing solutions often require terminating the current operation, re-entering the hovering area, or relying on manual intervention to recover, making it difficult to adapt to continuous disturbances in windy environments, resulting in insufficient continuity and reliability of operations.

[0004] Furthermore, existing end-effector solutions typically use contact force or a similar single physical quantity as the criterion when transitioning from alignment to contact or extension phases. Once this criterion is met, the docking process is considered to have entered the contact phase, and this determination is irreversible. During the extension of the mechanism along the predetermined direction and its approach to the target, if the platform experiences significant positional changes due to sudden disturbances such as gusts of wind, existing solutions lack a mechanism for dynamic verification and timely reversal. They continue to execute the original extension commands, which can easily lead to collisional contact between the end-effector and the target, damage to the target surface, or docking failure, making it difficult to guarantee the safety and success rate of contact-based operations.

[0005] Meanwhile, most existing servo control methods that use image features as feedback treat the motion of the moving platform as a disturbance that needs to be identified and compensated separately. They require additional processing steps such as body motion modeling, predictive filtering, or feature loss recovery for explicit compensation. Such processing not only increases the computational burden within a single control cycle, but also results in insufficient compensation and decreased control accuracy when the drift amplitude exceeds the applicable range of the established model. It is difficult to simultaneously achieve both real-time control performance and robustness to dynamic disturbances. Summary of the Invention

[0006] To address the technical challenge of precise docking between the end effector and the target under dynamic platform conditions—specifically, the continuous position and attitude drift of hovering UAVs due to wind disturbances, leading to rapid mismatch in the pose inverse kinematics chain relying on camera intrinsic and extrinsic parameter calibration and kinematic calculation, while centimeter-level global positioning feedback falls two orders of magnitude short of the required docking accuracy—this invention provides a visual servo-based UAV end-effector precision docking control method. The approach abandons the open-loop chain of first measuring pose, then calculating, and finally executing, instead constructing a closed loop directly on the image plane. The image moments of the docking target in the end-effector camera image are used as feedback. The deviation between this feedback and the expected feature quantity obtained through teaching directly drives the steering joints of the self-growing mechanism. This eliminates hover drift as a disturbance requiring separate observation and feedforward compensation, instead automatically absorbing it as a component of the feature deviation within the same closed loop. Simultaneously, end-effector contact force and field-of-view margin are used as criteria to constrain the extension termination timing and the sustainability of the visual closed loop, respectively. This enables precise end-effector docking without a high-precision camera calibration model or target 3D reconstruction.

[0007] The method includes: Step S1: The end-effector camera of the self-growing mechanism mounted on the hovering UAV acquires an image of the docking target and obtains current feature quantities determined by image moments. These current feature quantities include the center coordinates of the target image and a component representing the area occupied by the target. The end-effector camera is mounted on the end effector of the self-growing mechanism and moves with it. Its optical axis is aligned with the extension direction of the mechanism. The acquired docking target image is a single-frame two-dimensional image, requiring no spatiotemporal registration with other sensors or reconstruction of the target's three-dimensional structure from multiple frames. The current feature quantities are quantities that can be directly calculated from a single frame image and are monotonically related to the relative pose of the end effector. The center coordinates of the target image reflect the lateral deviation of the end effector's optical axis relative to the target, and the component representing the area occupied by the target reflects the relative distance between the end effector and the target. These two components together constitute feedback quantities on the image plane, allowing lateral alignment and longitudinal approach to be described by the same set of feature quantities.

[0008] Step S2: Calculate the feature deviation between the current feature quantity and the expected feature quantity obtained through teaching. The expected feature quantity corresponds to the state where the end effector is aligned with the docking target and at the docking working distance. Once learned through teaching, this expected feature quantity remains unchanged throughout the docking process. The feature deviation is the vector formed by the differences between each component of the current feature quantity and the corresponding component of the expected feature quantity. Since both the current feature quantity and the expected feature quantity are defined within the same image plane of the same camera, their difference can be directly used for subsequent mapping without any coordinate system transformation, thus eliminating the need for camera intrinsic and extrinsic parameter calibration and hand-eye calibration procedures.

[0009] Step S3 involves mapping the feature deviation to the angle adjustment of each steering joint of the self-growing mechanism using the generalized inverse of a preset constant image Jacobian matrix, and then issuing and executing this mapping. This process is repeated until the magnitude of the feature deviation is less than the convergence threshold for multiple consecutive cycles. Specifically, the constant image Jacobian matrix describes the linear relationship between the minute rotation of each steering joint and the change in each component of the current feature quantity. Since the dimension of the feature quantity is usually greater than the number of joints, this mapping is implemented using the generalized inverse of the matrix, so that the calculated angle adjustment reduces the feature deviation in the least squares sense. The repeated execution refers to repeating steps S1 to S3 in each control cycle, i.e., re-acquiring the image, recalculating the feature deviation, recalculating and issuing the angle adjustment, thereby forming a closed loop with image feedback. The determination method of determining that the magnitude is less than the convergence threshold for multiple consecutive cycles avoids misjudgments caused by noise in a single frame image or instantaneous shaking.

[0010] Step S4: Drive the self-growing mechanism to extend along the end optical axis towards the docking target. When the end contact force enters the set force range, the extension stops and docking is determined to be complete. If the feature deviation exceeds the convergence threshold again during the extension, the extension exits and returns to step S1. After the feature deviation converges, the movement of the mechanism switches from joint steering to translational extension along the optical axis. During the extension, the end camera still acquires images and calculates the feature deviation according to the control cycle, and the end force feedback sensor synchronously acquires the contact force. Using contact force instead of displacement stroke as the extension termination criterion ensures that the termination timing is not affected by the cumulative error of the mechanism's extension stroke and the uncertainty of the target surface position. Using the feature deviation exceeding the limit as the criterion for exiting the extension ensures that large-scale body drift caused by gusts is detected before causing a hard collision or docking misalignment. The mechanism returns to the joint steering stage, realigns, and then extends again, constituting a servo state switching under both force and vision criteria.

[0011] Step S5: Derive a field-of-view margin index, representing the distance from the target image center to the field-of-view boundary, from the image moments. When the field-of-view margin index falls into the warning range, the self-growing control unit requests a hovering position fine-tuning from the flight control unit via the fieldbus, and adjusts the extension speed of the self-growing mechanism according to the deficiency of the field-of-view margin index, causing its extension direction to deflect towards the side where the target is located. Specifically, the establishment of the visual servo closed loop is based on the premise that the docking target remains within the field of view. However, the reach of joint steering is limited. When hover drift accumulates to a large value, the target will approach the edge of the field of view. At this time, joint steering alone is insufficient to pull the target back to the center of the field of view. The field-of-view margin index is directly derived from the image moments calculated in step S1, without adding additional sensors or independent image processing channels; the deficit is the difference between the upper limit of the warning interval and the current value of the index, and it is always positive within the warning interval. The larger the deficit, the greater the reduction in extension speed and the greater the deflection of the extension direction toward the side where the target is located; the side where the target is located refers to the side where the center of the target image deviates from the center of the field of view, and the hovering position fine adjustment is also performed toward this side, so that the extension movement of the mechanism and the hovering position fine adjustment of the flight control unit work together in the same direction, thereby maintaining visual closed loop when the hovering drift exceeds the compensation capability of the joint steering.

[0012] Further, obtaining the current feature quantity in step S1 includes: sequentially performing grayscale conversion and filtering on the docking target image, extracting the target contour using an edge detection algorithm, calculating the image moments within the contour region, determining the target image center coordinates using the zero-order moment and the first-order moment, determining the component representing the area occupied by the target using the zero-order moment, and determining the target's principal axis direction using the second-order central moment; the edge detection and image moment calculation are performed only within the region of interest centered on the target image center of the previous cycle. Grayscale conversion and filtering are used to suppress the interference of uneven illumination and image noise on contour extraction during high-altitude operations. The zero-order moment is the total number of pixels within the contour region, the ratio of the first-order moment to the zero-order moment gives the target image center coordinates, and the zero-order moment is also a measure of the area occupied by the target in the image. The second-order central moment gives the target's principal axis direction, which is used to constrain the attitude of the end effector around the optical axis when the docking target is a non-circular object such as a long strip-shaped lightning arrester. Limiting the calculation region utilizes the fact that the target's displacement in the image is limited within adjacent control cycles, causing the image processing time per cycle to decrease with the area of ​​the region of interest.

[0013] Furthermore, the field-of-view margin index uses the normalized distance from the target image center to the field-of-view boundary, determined by the zeroth and first moments of the image moments, as the base quantity, and is weighted by the area occupied by the target, determined by the zeroth moment, to obtain a dimensionless field-of-view margin index. The field-of-view margin index is divided into a safe interval, a warning interval, and a danger interval according to its value from largest to smallest. The normalized distance is the ratio of the pixel distance from the target image center to the nearest field-of-view boundary to the half-width of the field of view in that direction, with a value between 0 and 1. Area weighting is introduced because the same normalized distance corresponds to different field-of-view risks depending on the area occupied by the target: the larger the area occupied by the target, the closer its outer edge is to the field-of-view boundary, and the more likely the outline is to be truncated by the field of view, leading to image moment distortion. Therefore, the normalized distance is weighted by the area determined by the zeroth moment, so that the index enters the warning interval earlier when the target approaches and occupies a large field of view. This index is dimensionless, and its interval division does not change with camera resolution or lens focal length.

[0014] Furthermore, the angle adjustment amount mentioned in step S3 is issued after being smoothed by a control law containing an integral term; when the field of view margin index falls into the safe zone, only the joint steering in step S3 is executed without issuing a hovering position fine-tuning request to the flight control unit; when the field of view margin index falls into the danger zone, the integral term is frozen, and the joint steering is restored after the flight control unit completes the hovering position repositioning. This forms a handling method based on the risk level of the field of view: drift within the safe zone is completely absorbed by the joint steering on the mechanism side, without interfering with the hovering maintenance of the flight control unit, avoiding mutual excitation caused by frequent interaction between the two control loops; in the danger zone, the target is close to being lost, and at this time the solution input of the joint steering is no longer reliable. Freezing the integral term can prevent the integral term from accumulating continuously during the period when the target is briefly lost or the outline is truncated. The joint steering is restored after the hovering position repositioning is completed and the target returns to the center of the field of view, so that the mechanism will not produce a large overshoot due to the accumulation of integral.

[0015] Furthermore, the warning interval includes a dead zone and a mutually exclusive timing sequence. During the hover position fine-tuning process, step S3 only calculates and sends the angle adjustment amount without performing convergence determination of the feature deviation magnitude. The convergence determination cycle count resumes after the flight control unit reports that the hover position fine-tuning is complete. The dead zone refers to the situation where hover position fine-tuning requests are not repeatedly issued when the field of view margin index fluctuates slightly near the boundary of the warning interval, in order to avoid frequent triggering of requests caused by the index repeatedly crossing the boundary. The mutually exclusive timing sequence separates the two motion sources that simultaneously change image features—body translation and joint steering—in the convergence determination: during hover position fine-tuning, some changes in image features come from body movement. If convergence determination is still performed at this time, it may be misjudged because the feature deviation momentarily falls into the threshold when the mechanism is not truly aligned. Therefore, during this period, only the calculation and sending of joint steering are maintained to keep tracking, and the convergence determination cycle count restarts after the fine-tuning is completed.

[0016] Furthermore, the characteristic deviation includes both the component caused by the hovering drift of the hovering UAV and the component caused by the attitude of the self-growing mechanism itself. These two components are not distinguished on the image plane, and the hovering drift is not observed or compensated for separately. The hovering accuracy of a multi-rotor UAV is limited by wind load and airframe dynamics, resulting in a physical upper limit. Therefore, the approach of improving flight control accuracy in exchange for end-of-line docking accuracy is unattainable. On the image plane, the effects of base drift and mechanism attitude deviation on the target imaging position are formally identical; their sum constitutes the characteristic deviation that needs to be eliminated. Therefore, it is not necessary to distinguish the source of the deviation, as it can be eliminated by the same closed loop. Consequently, there is no need to transmit high-bandwidth drift observations between the flight control unit and the self-growing control unit; instead, they only transmit low-frequency hovering position fine-tuning requests when the field-of-view margin falls into the warning range.

[0017] Furthermore, the constant image Jacobian matrix mentioned in step S3 is taken as an approximate matrix at the feature point corresponding to the desired feature quantity. Its elements are identified by an offline small-amplitude joint excitation test and are not updated during the cyclic execution of steps S1 to S3. The small-amplitude joint excitation test involves applying a small rotation angle to each steering joint one by one near the desired pose and recording the corresponding changes of each component of the current feature quantity. The elements of the matrix are determined by the ratio of the change to the excitation amount. This matrix is ​​not updated during the servo process, so that there is no need to perform target depth estimation and matrix recalculation in each control cycle. The single-cycle computation is fixed and does not contain iterations, which is the condition for keeping the single cycle cycle short and fixed. Since the closed loop eventually converges to the vicinity of the desired feature point, taking an approximate matrix at this point can ensure the correct convergence direction.

[0018] Furthermore, the angle adjustment amount mentioned in step S3 is smoothed by a control law composed of a proportional term and an integral term and then sent to the joint servo motor. The integral term has an anti-saturation limit, and the angle adjustment amount sent in a single cycle has an upper limit. The proportional term determines the response speed of the closed loop, the integral term is used to eliminate constant deviations such as static sag caused by the weight of the mechanism, and the anti-saturation limit cuts off the integral accumulation when the characteristic deviation does not decrease for a long time due to the mechanism being restricted or its extension being blocked, thus avoiding overshoot at the moment the obstruction is released; the upper limit of the angle adjustment amount in a single cycle prevents the end of the mechanism from swinging and causing the target to leave the field of view when a large deviation occurs.

[0019] Furthermore, the desired feature quantity is obtained through a teaching method. Before the self-growing mechanism is installed, the end effector is positioned aligned with the docking target and at the docking working distance. A frame image is captured, and its image moments are calculated as the desired feature quantity. During the extension process in step S4, each steering joint is no longer driven by the closed-loop mechanism in step S3, but maintains the angle at the convergence point of the feature deviation and superimposes the extension direction deflection given in step S5. The teaching is conducted on the ground, and the obtained desired feature quantity is a set of values ​​rather than a calibration parameter set. No recalibration is required after on-site assembly and disassembly of the mechanism, reducing the preparation time from hours to minutes. During the extension process, the joints no longer engage closed-loop steering but maintain the angle at the convergence point, ensuring that the joint steering and translational extension movements are not superimposed at the same time. The change in feature deviation during extension directly reflects the body drift, thus serving as a criterion for exiting the extension. The superimposed extension direction deflection is given by step S5 based on the field of view margin.

[0020] This invention directly constructs an end-joint closed loop on the image plane using image moments as feedback, absorbing hover drift as a component of the feature deviation. In 200 field docking tests under gusty and steady wind conditions with hover drift of 0.2m to 0.4m, the statistical average end-joint docking error was 0.5mm. The constant image Jacobian matrix eliminates the need for depth estimation and matrix recalculation per cycle. Combined with edge detection and image moment calculation performed only within the region of interest, the single cycle period of steps S1 to S3 is no more than 200ms, which is sufficient to keep up with the drift caused by gusts. The system is optimized; the expected feature quantity is obtained from a single frame of ground teaching image, eliminating the need for recalibration after on-site assembly and disassembly, reducing single-machine preparation time from hours to minutes; using contact force entering a set force range as the extension termination criterion and feature deviation exceeding a convergence threshold as the exit extension criterion ensures stable contact in terms of force without causing hard collisions during significant body drift; the field of view margin index derived from image moments and its three-zone handling (safety, warning, and danger) maintains visual closure when hovering drift exceeds joint steering compensation capabilities, reducing the probability of target loss leading to servo interruption. All of these features enable automatic completion of high-altitude lightning arrester grounding continuity testing by a moving platform, replacing manual high-altitude climbing for wiring, eliminating the risk of falls and electric shock, reducing rework due to field of view loss and collisional contact, and improving the continuity of testing operations. Attached Figure Description

[0021] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0022] Figure 1 This is a flowchart of the visual servo-based UAV terminal precision docking control method of the present invention.

[0023] Figure 2 This is a schematic diagram of the composition of the operating system used in this invention.

[0024] Figure 3 This is a schematic diagram of the on-site deployment of the high-altitude lightning arrester docking operation of the present invention.

[0025] Figure 4 This is a cross-sectional view showing the component composition and coaxial relationship of the end effector of the present invention.

[0026] Figure 5 This is a time consumption diagram for a single cycle of the present invention. Detailed Implementation

[0027] To make the objectives and technical solutions of this invention clearer, the embodiments of this invention will be further described in detail below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of this invention and should not be construed as limiting the scope of protection of this invention.

[0028] Example 1: This embodiment uses the grounding continuity detection operation of the lightning arrester 60 on the blade 61 of a high-altitude wind turbine generator as the docking scenario to fully illustrate the visual servo-based UAV terminal precision docking control method of the present invention. The applied operating system is as follows: Figure 2 As shown, the hovering UAV 10 is an industrial-grade multi-rotor platform. A self-growing mechanism 20 is mounted on the underside of its fuselage via a quick-release mechanical interface 11. This interface has three layers of rubber shock-absorbing pads 12 to suppress the transmission of flight vibrations to the self-growing mechanism, preventing motion blur in the images captured by the end effector camera due to body vibration. The self-growing mechanism consists of a mechanism segment 21 that extends along its own axis and steering joints 22 located between the mechanism segments. The steering joints are three-degree-of-freedom structures with a steering range of ±90° and a steering error not exceeding 0.3°. The end effector 23 of the self-growing mechanism integrates an end effector camera 24, an end effector force feedback sensor 25, a grinding head 26, and a pneumatic gripper 27. The optical axis of the end effector is aligned with the extension direction of the self-growing mechanism. The end effector force feedback sensor is located on the force transmission path between the end effector and the end effector working surface. Each steering joint is driven by a joint servo motor 28. The self-growing control unit 30 is implemented by a programmable logic controller (PLC) and is connected to the UAV's flight control unit 40 via a fieldbus 50.

[0029] The deployment method at the work site is as follows: Figure 3 As shown, the lightning arrester 60 is mounted on the surface of the blade 61. The hovering UAV 10 flies to a position 1m to 2m above the lightning arrester and hovers at a safe distance of not less than 1m from the blade surface. The self-growth mechanism 20 extends from below the quick-release mechanical interface 11, folds towards the lightning arrester via the steering joint 22, and aligns the optical axis of the end effector 23's end camera 24 with the lightning arrester. The self-growth control unit 30 is connected to the flight control unit 40 inside the airframe via the fieldbus 50.

[0030] The components of the end effector are as follows Figure 4 As shown, the end-effector camera 24, end-effector force feedback sensor 25, grinding head 26 and pneumatic gripper 27 are arranged sequentially along the optical axis of the end-effector camera. The end-effector force feedback sensor is located on the force transmission path between the end-effector and the end-effector working surface. The optical axis direction of the end-effector camera is consistent with the extension direction of the self-growing mechanism. Figure 4 The 8mm mark between the front end of the mid-end actuator and the surface of the lightning arrester is the docking working distance taken during the teaching in step S2.

[0031] In this embodiment, the data flow between each unit is as follows: Figure 1 and Figure 2As shown, the target image acquired by the end-effector camera is sent to the self-growing control unit, which performs image moment calculation, feature deviation calculation, and angle adjustment calculation. The results are then sent to the servo motors of each steering joint. The contact force measured by the end-effector force feedback sensor is sent to the same unit as a criterion for extension termination. The field-of-view margin index derived from the same set of image moments is used in two ways: one to reduce the extension speed and deflect the extension direction toward the target, and the other to send a hovering position fine-tuning request to the flight control unit via the fieldbus when the target falls into the warning zone. The flight control unit completes the fine-tuning and reports back via the same bus. No drift observations or pose estimates are transmitted between the self-growing control unit and the flight control unit; their interaction is limited to low-frequency requests and reports.

[0032] Step S1: The end-effector camera mounted on the hovering UAV acquires images of the docking target and obtains the current feature quantities determined by the image moments. During operation, the UAV hovers above the target lightning arrester. The self-growth mechanism extends from this position towards the lightning arrester, and the end-effector camera moves with the end effector and acquires images according to the control cycle. In this embodiment, the acquisition frame rate is 12Hz. The acquired docking target image is a single-frame two-dimensional grayscale or color image. This image does not need to be spatiotemporally registered with other sensors such as lidar and inertial measurement units, nor does it need to reconstruct the three-dimensional structure of the target from multiple frames. Therefore, the acquisition process does not introduce registration errors or reconstruction delays.

[0033] The sub-steps for obtaining the current feature values ​​are as follows. First, the target image for docking is converted to grayscale by weighting each color channel. Then, a combination of median filtering and Gaussian filtering is applied to suppress the interference of uneven lighting, blade surface reflection, and image noise during high-altitude operations on subsequent contour extraction. Subsequently, an edge detection algorithm is used to extract the target contour. In this embodiment, dual-threshold edge detection is used. Morphological closing operations are performed on the detected edges to close the contour. Background interference contours are filtered out according to the area enclosed by the contour and the aspect ratio. The connected component with the largest area and the aspect ratio falling within the preset range is retained as the target contour for docking.

[0034] Image moments are calculated within the obtained contour region. The zeroth moment is the total number of pixels within the contour region; the first moment is the sum of the pixel coordinates over the contour region; the ratio of the first moment to the zeroth moment gives the x and y coordinates of the target image center, respectively; the component representing the area occupied by the target in the image is determined by the zeroth moment, taken as the square root of the ratio of the current zeroth moment to the zeroth moment during teaching. This value is approximately inversely proportional to the distance from the end point to the target and equals 1 at the desired pose; the second central moment is the second sum of the pixel coordinates relative to the target image center, with the principal axis direction taken as half the arctangent of the difference between the mixed second central moment and the x and y second central moments in the four quadrants, with a value between -π / 2 and π / 2. The resulting current feature quantity is a four-dimensional vector, whose components are, in order, the x and y coordinates of the target image center, the component representing the area occupied by the target, and the principal axis direction. The target image center coordinates reflect the lateral deviation of the end effector's optical axis relative to the docking target. The component representing the area occupied by the target monotonically increases as the distance from the end effector to the target decreases, thus reflecting the relative distance. The principal axis direction is used to constrain the attitude of the end effector around the optical axis when the docking target is a non-circular object such as a strip-shaped lightning arrester. All four components can be directly calculated from a single frame image and are monotonically related to the relative pose of the end effector. Lateral alignment and longitudinal approach can therefore be described by the same set of feature quantities. To ensure comparability of each component in subsequent deviation calculations, the horizontal and vertical coordinates of the target image center are first subtracted from the field of view center coordinates, and then divided by the horizontal half-width and vertical half-width of the image, respectively. The area component is dimensionless when the above ratio is used. The principal axis direction is divided by pi, and the resulting current feature quantity is a four-dimensional dimensionless vector with equivalent magnitudes for each component. The magnitude of the feature deviation is taken as the square root of the sum of the squares of the four-dimensional feature deviation components.

[0035] The edge detection and image moment calculation are performed only within the region of interest centered on the center of the target image in the previous cycle. The side length of this region of interest is 2 to 3 times the distance from the center of the target image in the previous cycle to the farthest point of the contour. This limitation takes advantage of the fact that the target's displacement in the image is limited within adjacent control cycles: the displacement of the target image center between two adjacent frames is much smaller than the aforementioned side length, so this region is sufficient to cover the complete contour of the target. In the first cycle of servo startup and when contour extraction fails for two consecutive cycles, the search area is expanded to the full image. In actual testing, the processing time for a single cycle of image processing was reduced from 65ms during full-frame search to 22ms. As an alternative implementation, in addition to the components determined by the image moments, the current feature quantity can also be taken as the pixel coordinates of several corner points of the target contour or the center, major and minor axes, and tilt angle parameters of the contour fitting ellipse, as long as the feature quantity can be directly calculated from a single frame image and is monotonically related to the relative pose of the end.

[0036] Step S2: Calculate the feature deviation between the current feature quantity and the expected feature quantity obtained through teaching. The expected feature quantity is obtained through teaching: Before the self-growth mechanism is installed, the end effector is placed on the ground in a pose aligned with the docking target and at the docking working distance. In this embodiment, the docking working distance is 8mm. At this time, the end camera captures a frame image, and its image moments are calculated according to the same processing chain as in step S1. The resulting four-dimensional dimensionless vector is the expected feature quantity, which is stored in the non-volatile storage area of ​​the self-growth control unit. The entire teaching process does not measure the camera's intrinsic and extrinsic parameters, nor does it measure the pose relationship between the camera coordinate system and the end effector coordinate system. The obtained expected feature quantity is a set of values ​​rather than a set of calibration parameters. Therefore, recalibration is not required after the self-growth mechanism is installed and disassembled on-site, reducing the single-machine operation preparation time from hours to minutes. Re-teaching is only required when the model or size of the docking target is changed.

[0037] Once the desired feature quantity is obtained through teaching, it remains unchanged throughout the docking process. The feature deviation is a four-dimensional vector formed by the differences between the components of the current feature quantity and the corresponding components of the desired feature quantity. Since the current feature quantity and the desired feature quantity are both defined in the same image plane of the same camera and have been normalized according to the same set of references, their difference can be directly used for subsequent mapping without any coordinate system transformation. The camera intrinsic and extrinsic parameter calibration and hand-eye calibration procedures are thus completely eliminated.

[0038] The aforementioned feature deviation includes components caused by the hovering drift of the hovering UAV and components caused by the attitude of the self-growing mechanism itself. These two components are not distinguished on the image plane, and the hovering drift is not observed or compensated for separately. This is because the translation of the base and the rotation of the mechanism joints have the same formal effect on the target's imaging position and scale in the image; both manifest as a shift in the target image center and a change in the area occupied. The sum of these two effects is the feature deviation that needs to be eliminated. Therefore, it is possible to eliminate the deviation by using the same closed loop without distinguishing its source. This also eliminates the need to transmit high-bandwidth drift observations between the flight control unit and the self-growing control unit, avoiding the physical upper limit of the hovering accuracy of multi-rotor UAVs limited by wind load and airframe dynamics.

[0039] Step S3 involves mapping the feature deviation to the angle adjustment of each steering joint of the self-growing mechanism using the generalized inverse of a preset constant image Jacobian matrix, and then issuing and executing this mapping. This process is repeated until the magnitude of the feature deviation is less than the convergence threshold for multiple consecutive cycles. The constant image Jacobian matrix describes the linear relationship between the minute rotation of each steering joint and the change in each component of the current feature quantity. In this embodiment, the feature quantity is four-dimensional, and there are three steering joints, resulting in a four-row, three-column matrix. Its elements are identified through an offline small-amplitude joint excitation test: small-amplitude rotations of 1° to 3° are applied to each steering joint one by one near the desired pose, three times each in the forward and reverse directions. The corresponding changes in each component of the current feature quantity are recorded, and the average ratio of the change to the excitation amount is used to determine the matrix column corresponding to that joint. Once all three columns are identified, the entire matrix is ​​obtained. This test is completed in one step on the ground, and the resulting matrix is ​​stored in a non-volatile storage area along with the desired feature quantity. It is not updated during the cyclic execution of steps S1 to S3. After identification, check whether the matrix is ​​suitable for finding the generalized inverse: the product of the transpose of the matrix and itself is a three-row, three-column matrix. When its condition number is no greater than 1000, it is considered that the matrix has full column rank and stable values. If the condition number exceeds 1000, it usually indicates that the excitation of a certain steering joint has not produced a distinguishable change in the characteristic quantity. At this time, the excitation amplitude of the joint is increased to 3° and the column identification is repeated. If it still does not meet the requirements, a small amount of damping coefficient is added to the diagonal element of the above three-row, three-column matrix and then the inverse is found.

[0040] Since the dimension of the feature quantity is greater than the number of joints, the above mapping is implemented using the generalized inverse of the matrix, which reduces the feature bias in the least squares sense by the calculated rotation adjustment amount, i.e.: ; In the formula, This is a three-dimensional vector composed of the steering joint angle adjustments issued in this cycle, in degrees. Let be the constant image Jacobian matrix, which is a dimensionless matrix with four rows and three columns; Transpose it; The four-dimensional dimensionless feature deviation vector obtained in step S2; The servo gain is a dimensionless positive scalar value ranging from 0.3 to 0.8. A larger value results in faster convergence but also makes it easier to oscillate along the target main axis component. A smaller value results in tracking lag when hovering drift changes continuously. In this embodiment, the value is 0.55.

[0041] The calculated angle adjustment is smoothed by a control law composed of proportional and integral terms and then sent to the servo motors of each joint. The proportional term determines the closed-loop response speed, while the integral term is used to eliminate constant deviations such as static sag caused by the self-weight of the self-growing mechanism. The integral term has an anti-saturation limit to cut off the integral accumulation when the characteristic deviation does not decrease for a long time due to the mechanism being restricted or its extension is hindered, thus avoiding overshoot at the moment the obstruction is released. The joint angle adjustment amount sent in a single cycle also has an upper limit, which is 1.5° in this embodiment, to prevent the end of the mechanism from swinging and causing the target to leave the field of view when a large deviation occurs.

[0042] The cyclic execution refers to repeating steps S1 to S3 within each control cycle, i.e., re-acquiring the image, recalculating the feature deviation, and recalculating and issuing the rotation adjustment amount, thus forming a closed loop with the image as feedback. Alignment is considered complete when the magnitude of the feature deviation is less than the convergence threshold for several consecutive cycles. In this embodiment, the number of consecutive cycles is 4, and the normalized convergence threshold is 0.03. This method of determining alignment over multiple consecutive cycles avoids misjudgments caused by noise in a single frame or momentary shaking. The time consumption of a single cycle in this embodiment is as follows: Figure 5 As shown: image acquisition and processing takes 22ms, feature deviation calculation and generalized inverse kinematics calculation take no more than 5ms, and fieldbus transmission and joint servo execution take no more than 120ms. The total of these three items is no more than 147ms. The margin is used for field margin index calculation and status determination. The actual measured cycle time is no more than 165ms, which meets the requirement of no more than 200ms. Figure 5The dashed and dotted lines represent the image data, respectively. If a full-frame search is performed without limiting the region of interest, the image acquisition and processing time increases to 65ms, and the total time for all three increases to no more than 190ms, approaching the 200ms upper limit. The constant image Jacobian matrix is ​​not updated during the servo process, eliminating the need for target depth estimation and matrix recalculation in each control cycle. The computational complexity of inverting a three-row, three-column matrix is ​​fixed and does not involve iteration, which is the condition for keeping the single-cycle time within the aforementioned range. Since the closed loop eventually converges to the vicinity of the desired feature point, taking an approximate matrix at that point ensures the correct convergence direction. At points far from the desired feature point, there is an amplitude deviation between the constant matrix and the true matrix. However, as long as the product of the generalized inverse of the constant matrix and the true matrix remains positive definite, the angle adjustment calculated per cycle still reduces the feature deviation; the deviation only affects the rate of descent. In this embodiment, the target is kept in the center of the field of view by the field margin index and hovering position fine-tuning, and each step of movement is constrained by a single-cycle upper limit of 1.5° to prevent the working point from moving far from the desired feature point. If the magnitude of the feature deviation does not decrease for 20 consecutive control cycles, it is determined that the working point exceeds the applicable range of the constant matrix. The growth control unit requests hovering position fine-tuning from the flight control unit to bring the target back to the center of the field of view before continuing servoing. As an alternative implementation, the constant matrix can also be replaced with a time-varying matrix identified online recursively to achieve faster convergence when the target scale changes significantly. The cost is an increase in the computational load of matrix recursion per cycle.

[0043] Step S4: Drive the self-growing mechanism to extend along the end optical axis towards the docking target. When the end contact force enters the set force range, the extension stops and docking is determined to be complete. If the feature deviation exceeds the convergence threshold again during the extension, exit the extension and return to step S1. After the feature deviation converges, the movement of the self-growing mechanism switches from joint steering to translational extension along the end optical axis. The self-growing mechanism extends at a relatively fast speed from the hovering position towards the lightning arrester. When the component representing the area occupied by the target reaches 60% of the expected value, it enters the fine docking segment. In this embodiment, the extension speed of the fine docking segment is 0.12 m / s. During the extension process, the end camera still acquires images and calculates feature deviations according to the control cycle. Each steering joint is no longer driven by the closed loop of step S3, but maintains the angle at the convergence time, only superimposed with the extension direction deflection given in step S5.

[0044] The end effector force feedback sensor synchronously acquires the contact force during the extension. Extension stops and docking is considered complete when the contact force enters a set force range of 1N to 1.5N. The lower limit of this force range ensures stable contact between the end effector and the lightning arrester surface, while the upper limit limits the contact force from causing significant elastic deformation of the self-growing mechanism or causing blade oscillation. Using contact force, rather than displacement stroke, as the extension termination criterion ensures that the termination timing is not affected by the cumulative error of the self-growing mechanism's extension stroke or the uncertainty of the target surface position, which is particularly important when there is slight wobbling on the blade surface. As an alternative implementation, this force criterion can also be replaced by an end effector proximity sensor criterion or an image scale threshold criterion indicating that the area occupied by the target reaches a desired value.

[0045] If the magnitude of the characteristic deviation exceeds the convergence threshold again during the extension process, it is determined that the aircraft has drifted beyond what the current joint angle can compensate for. At this point, the extension is immediately terminated, and the aircraft retracts 20mm to 50mm along the optical axis before returning to step S1 to re-align the joint. After alignment, the extension is resumed. This constitutes a servo state switching based on both force and vision criteria. The switching conditions between the joint steering and translational extension states are characteristic deviation convergence and characteristic deviation exceeding the limit, respectively. The exit condition for the translational extension state also includes the contact force entering the set force range. This switching method allows significant aircraft drift caused by gusts to be detected before it causes a hard collision or docking misalignment. After docking, the grinding head removes the oxide layer on the lightning arrester surface, and the pneumatic gripper then picks up the detection line connector and completes the wiring under the guidance of the same vision closed loop, entering the continuity resistance detection stage.

[0046] Step S5: Derive the field-of-view margin index, representing the distance from the target image center to the field-of-view boundary, from the image moments. When the field-of-view margin index falls into the warning range, the self-growing control unit requests a hovering position fine-tuning from the flight control unit via the fieldbus, and adjusts the extension speed of the self-growing mechanism according to the deficiency of the field-of-view margin index, causing its extension direction to deflect towards the side where the target is located. The establishment of the visual servo closed loop is based on the premise that the docking target remains within the field of view. However, the reach of joint steering is limited. When the hovering drift accumulates to more than 0.3m, the target will approach the edge of the field of view. At this time, joint steering alone is insufficient to pull the target back to the center of the field of view.

[0047] The field-of-view margin index uses the normalized distance from the target image center to the field-of-view boundary, determined by the zeroth and first moments, as the base quantity, and weights it with the area occupied by the target, determined by the zeroth moment, to obtain a dimensionless field-of-view margin index, namely: ; In the formula, This is a dimensionless index representing the field of view margin. The pixel distance from the center of the target image to the nearest field of view boundary; The field of view half-width in the direction of the nearest boundary, in units of 1 / 2. The two are the same, and the ratio of the two is the normalized distance, which takes a value between 0 and 1; The zeroth moment obtained in step S1 is the total number of pixels in the region within the target contour. This represents the total number of pixels in the entire image. The area weighting coefficient is dimensionless and ranges from 0.5 to 1.0; in this embodiment, it is 0.7. Area weighting is introduced because the field-of-view risk varies depending on the area occupied by the target at the same normalized distance: the larger the target area, the closer its outer edge is to the field-of-view boundary, making it more prone to outline truncation and image moment distortion. Therefore, the normalized distance is weighted by the area determined by the zero-order moment, allowing the indicator to enter the warning zone earlier when the target approaches and occupies a large field of view. This indicator is dimensionless, and its interval division does not change with camera resolution or lens focal length. This indicator is directly derived from the image moments calculated in step S1, without adding additional sensors or independent image processing channels.

[0048] The field-of-view margin index is divided into a safe range, a warning range, and a danger range according to its value from largest to smallest. In this embodiment, the safe range is greater than 0.5, the warning range is 0.2 to 0.5, and the danger range is less than 0.2. When the field-of-view margin index falls into the safe range, only the joint steering in step S3 is executed without sending a hovering position fine-tuning request to the flight control unit. The drift within this range is completely absorbed by the joint steering on the mechanism side, without interfering with the hovering maintenance of the flight control unit, thereby avoiding mutual excitation caused by frequent interaction between the two control loops on the mechanism side and the flight side.

[0049] When the field-of-view margin falls into the warning zone, the self-growing control unit sends a hovering position fine-tuning request to the flight control unit via the fieldbus. The request message carries the deviation direction of the target image center relative to the field-of-view center and the normalized deficit described below. Simultaneously, the extension speed is reduced according to the deficit of this index, and the extension direction is deflected towards the side where the target is located. The deficit is the difference between the upper limit of the warning zone and the current value of this index, and is always positive within the warning zone, with a value between 0 and the width of the warning zone. Dividing the deficit by the width of the warning zone yields the normalized deficit, which has a value between 0 and 1. In this embodiment, the width of the warning zone is 0.3. The side where the target is located refers to the side where the target image center deviates from the field-of-view center, represented by a unit direction vector composed of the lateral and longitudinal deviations of the target image center relative to the field-of-view center. This vector is defined within the image plane and requires no coordinate system transformation.

[0050] The extension speed is reduced linearly according to the normalized deficit. The reduced extension speed is equal to the difference between the rated speed of the precision docking segment multiplied by 1 and 0.6 times the normalized deficit. When the normalized deficit is 1, the speed is reduced to 40% of the rated speed. The deflection of the extension direction is achieved through each steering joint and is also calculated in the image plane: the above-mentioned unit direction vector is used as the two components corresponding to the horizontal and vertical coordinates of the target image center in the deviation vector, and the other components are set to zero to form the deflection guidance vector. After the generalized inverse mapping of the Jacobian matrix of the same constant image in step S3 and taking the negative sign, the rotation direction of each steering joint that makes the end optical axis rotate towards the side where the target is located is obtained. The rotation direction is normalized and multiplied by the deflection amount of the current period, and then superimposed on the rotation angle maintained by each steering joint. The deflection amount of the current period is equal to 0.5° multiplied by the normalized deficit, and the cumulative deflection amount does not exceed 5°. This allows the extension movement of the mechanism and the hovering position fine-tuning of the flight control unit to work together in the same direction, maintaining visual closed loop when hover drift exceeds the compensating ability of joint steering.

[0051] The warning interval includes a dead zone and a mutually exclusive timing sequence. The dead zone refers to the absence of repeated hover position adjustment requests when the field-of-view margin index fluctuates slightly near the warning interval boundary. The dead zone width is 10% to 20% of the warning interval width to prevent frequent triggering of requests due to the index repeatedly crossing the boundary. The mutually exclusive timing sequence means that during hover position adjustment by the flight control unit, step S3 only calculates and sends the angle adjustment amount without performing convergence determination of the feature deviation magnitude. The convergence determination cycle count resumes after the flight control unit reports that the hover position adjustment is complete. This timing sequence separates the two motion sources that simultaneously change image features—body translation and joint steering—in the convergence determination: during hover position adjustment, some changes in image features come from body movement. If convergence determination is still performed at this time, it may lead to misjudgment of convergence due to the feature deviation momentarily falling into the threshold when the mechanism is not truly aligned. Therefore, only joint steering calculation and sending are maintained during this period to keep tracking.

[0052] When the field-of-view margin falls into the danger zone, the target is nearly lost, and the calculation input for joint steering is no longer reliable. At this time, the integral term of the control law in step S3 is frozen, the issuance of joint angle adjustment is paused, and each steering joint maintains its current angle. Simultaneously, a hover position repositioning request is sent to the flight control unit, and joint steering is restored after the flight control unit completes the hover position repositioning. Freezing the integral term prevents the continuous accumulation of the integral term during the period when the target is briefly lost or its outline is truncated by the field of view. Joint steering is restored only after the hover position repositioning is completed, the target returns to the center of the field of view, and the field-of-view margin rises above the upper limit of the warning zone. This prevents the self-growing mechanism from generating significant overshoot due to integral accumulation. The above-mentioned handling method based on field-of-view risk classification, together with the force and vision dual-criteria switching in step S4, constitutes the servo state switching logic of this embodiment.

[0053] The execution relationship between step S5 and steps S1 to S4 is as follows. The field-of-view margin index is calculated from the image moments of each control cycle, regardless of whether the mechanism is in joint steering or translational extension state. In joint steering state, the mechanism does not extend, and the reduction in extension speed and deflection of extension direction are not executed. Step S5 only issues a hovering position fine-tuning request or freezes the integral term according to the current interval. The joint angle adjustment is still given by the closed loop in step S3. In translational extension state, each steering joint maintains the angle at the convergence moment and adds the cumulative deflection given in step S5. The extension speed is reduced according to the deficit. When exiting extension and returning to step S1, the cumulative deflection is cleared to zero, and joint steering is again taken over by the closed loop in step S3. Within the same control cycle, each criterion is processed according to the following priority: The highest priority is when the contact force enters the set force range, at which point the extension is stopped and docking is deemed complete; the next highest priority is when the characteristic deviation magnitude exceeds the convergence threshold, at which point the extension is stopped; the next highest priority is when the field of view margin falls into the danger zone. If the mechanism is in a translational extension state at this time, the extension is stopped and the mechanism retracts along the optical axis, then handled according to the above-mentioned danger zone procedures; finally, the handling of the warning zone and the safe zone is considered. After the flight control unit reports that the hovering position has been fine-tuned, if the field of view margin is still in the warning zone and has left the dead zone, a new request is issued based on the new deficit.

[0054] The docking target in this embodiment is not limited to blade lightning arresters, but can also be other objects that need to be precisely docked at the end by the moving platform, such as tower flange bolts and transmission line fittings. In this case, it is only necessary to re-teach the expected characteristic quantities according to the new target and repeat the small-amplitude joint excitation test. The process of steps S1 to S5 and the value range of each threshold are not changed.

[0055] Example 2: In a preferred embodiment of the present invention, the cross-subsystem scheduling and handling method of the field of view margin index in step S5 is further refined, so that the index is not only used for interval division, but also directly drives the calculation of the magnitude and direction of the hovering position fine adjustment, and forms a cooperative mechanism with mutually exclusive timing with the convergence determination and integral processing of the joint steering loop in step S3. Specifically, in each control cycle, the self-growing control unit first obtains the current value of the field of view margin index according to the zero-order moment and the first-order moment calculated in step S1, and then compares the value with the pre-set safe interval, warning interval, and danger interval boundaries one by one to determine the current interval; then, different handling sub-processes are executed according to the interval. The three sub-processes are executed mutually exclusively in the same control cycle without superposition or conflict.

[0056] Preferably, when the field-of-view margin index falls within the safe range, the self-growing control unit completes the joint steering calculation and distribution only within its own mechanism, without issuing any requests to the flight control unit. At this time, the control law in step S3 accumulates normally according to the proportional and integral terms, and the period counting for convergence determination proceeds normally. When the field-of-view margin index falls within the warning range, the self-growing control unit first calculates the difference between the upper limit of the warning range and the current value of the index, i.e., the deficit, and divides it by the width of the warning range to obtain the normalized deficit. Then, it is converted into the direction and amplitude of hovering position fine-tuning according to the following relationship. The fine-tuning direction is taken as the projection direction of the unit direction vector of the target image center deviating from the center of the field of view in the horizontal plane of the body coordinate system. This projection is determined according to the nominal geometric relationship: the installation orientation of the quick-release mechanical interface is a known structural dimension, and the current rotation angle of each steering joint is read by the encoder of the joint servo motor. Based on this, the nominal pointing of the horizontal and vertical axes of the end camera image in the body coordinate system is obtained according to the nominal geometric relationship of the mechanism. This projection only requires a rough value for the direction, calculated based on nominal geometric relationships. Since the accuracy of fine-tuning is not determined by the precision of the machine's displacement, but rather by whether the field-of-view margin has risen above the upper limit of the warning range, directional errors only affect the number of requests required for recovery and not the docking accuracy. Therefore, this projection does not constitute calibration of camera extrinsic parameters or hand-eye relationship. The fine-tuning amplitude is taken as the product of 0.05m and 0.15m with the normalized deficit, i.e., between 0.05m and 0.2m, to avoid a single fine-tuning amplitude being too large, causing the target to cross the other side of the field of view boundary. Furthermore, this deficit is also used to adjust the extension speed downwards. The larger the deficit, the greater the reduction in extension speed. The reduced extension speed is no less than 40% of the original extension speed, ensuring that the mechanism maintains a limited extension progress rather than a complete stop during periods of tight field-of-view margin, avoiding control oscillations caused by frequent starts and stops.

[0057] Furthermore, a dead zone is established within the warning zone. When the field-of-view margin indicator fluctuates slightly near the boundary of the warning zone, as long as the fluctuation falls within the dead zone, the self-growth control unit will not repeatedly issue hover position fine-tuning requests until the indicator leaves the dead zone before recalculating the deficit and issuing a request. This suppresses request jitter when the indicator repeatedly crosses the boundary. Coordinated with this dead zone is a mutually exclusive timing sequence: from the time the flight control unit receives the fine-tuning request until it reports the completion of the fine-tuning, step S3 still re-acquires images, recalculates feature deviations, and calculates and issues joint angle adjustment amounts for execution in each control cycle. However, the convergence determination of the feature deviation magnitude is suspended, i.e., the accumulation of counts for multiple consecutive cycles below the convergence threshold is paused. Only after the flight control unit reports the completion of the fine-tuning does the self-growth control unit restart accumulating the convergence determination cycle count from zero. This timing arrangement ensures that image feature changes caused by aircraft translation are not mistakenly included in the criteria for joint steering alignment.

[0058] When the field-of-view margin falls into the danger zone, the self-growing control unit, while issuing a hover position fine-tuning request, freezes the accumulation of the integral term in the control law of step S3. The integral term retains the value of the previous cycle before the fine-tuning request was issued and is no longer updated. The joint angle adjustment is paused, and each steering joint maintains its current angle. Only after the flight control unit completes the hover position repositioning and the field-of-view margin rises above the warning zone is the integral term frozen and normal accumulation resumed. Within the danger zone, the target outline is almost truncated by the field of view, and the calculation accuracy of the image moments decreases. If the integral term is allowed to continue accumulating according to potentially distorted characteristic deviations at this time, overshoot is likely to occur after the target returns to the center of the field of view. Freezing the integral term avoids this situation.

[0059] The hovering position fine-tuning is performed at a gradual speed to ensure the relative stability of the mechanism's attitude and position during the fine-tuning process. Each fine-tuning request includes a missing value and direction information, which the flight control unit converts into a specific speed command. After completing the fine-tuning, the flight control unit reports the completion status via the fieldbus. This report information also serves as the trigger condition for the recovery convergence determination in the aforementioned mutually exclusive timing sequence. It should be noted that when the docking target surface has strong reflections or the target outline has insufficient contrast with the background, leading to an increased proportion of outline extraction failures, the calculation of the field of view margin index may experience short-term distortion. In this case, the determination boundary between the warning zone and the danger zone may exhibit a delayed response, which is the applicable boundary of this solution under extreme lighting conditions.

[0060] The field-of-view margin index scheduling mechanism described in this embodiment has the following beneficial effects. First, since the index is directly derived from the image moments calculated in step S1, there is no need to add additional sensors or independent image processing channels. This achieves coordinated constraints on both hovering position and mechanism extension motions without increasing hardware costs or computational burden. Second, the combination of three-interval division with dead zones and mutually exclusive timing ensures that the rapid closed loop of joint steering and the relatively slow adjustment loop of hovering position fine-tuning do not interfere with each other. The convergence determination of the joint steering loop will not be misjudged by instantaneous characteristic changes during the translation of the machine, thereby improving the overall stability of the docking process. Third, the freezing of integral terms in the danger zone avoids abnormal accumulation of control quantities during the brief loss of the target or contour truncation, reducing the possibility of large overshoot after the target re-enters the field of view. Fourth, continuously adjusting the direction and amplitude of hovering position fine-tuning according to the deficit and correspondingly lowering the extension speed makes this mechanism smoother than the on / off handling that only triggers thresholds, reducing the trigger frequency of hovering position fine-tuning requests.

[0061] The aforementioned beneficial effects arise from the fact that the sustainability of the visual servo closed loop presupposes that the target remains continuously within the field of view. However, the reachable angle range of joint steering is limited. When hover drift accumulates beyond the compensation capability of joint steering, the field of view margin index can provide an early warning before the target is truly lost. This is because the index combines the positional information of the target image center with the working distance information reflected by the area occupied by the target, allowing the same normalized distance to correspond to different levels of urgency at different working distances. Using the missing values ​​of this index, rather than just its interval assignment, to calculate the direction and amplitude of hover position fine-tuning is equivalent to transforming discrete interval criteria into continuous scheduling quantities. This allows the two control loops on the mechanism side and the flight control side to respond collaboratively according to the changing trend of the same physical quantity, rather than responding independently and then superimposing their responses. This reduces the overshoot or oscillation that might be introduced by the superposition of the responses of the two loops. The settings for dead zones and mutual exclusion timing are designed to address two specific causes: noise fluctuations near the interval boundaries of the index and the combined influence of two motion sources on the same image feature. This ensures that convergence determination, integral term accumulation, and fine-tuning request triggering are all based on physically meaningful conditions, rather than simply relying on a fixed number of cycles or a fixed threshold.

[0062] Example 3: In another embodiment of the present invention, as an optional alternative, the feature extraction and servo mapping of the images acquired by the end camera adopts a different technical path than in Embodiment 1: a pre-trained lightweight feature point detection network is used to replace image moment calculation, and a time-varying image Jacobian matrix estimated online is used to replace the constant image Jacobian matrix. The overall control framework involving force feedback termination criterion, feature deviation exceeding the limit exit extension criterion and field of view maintenance remains consistent with Embodiment 1.

[0063] Specifically, the feature point detection network takes a single-frame image captured by the end camera as input and outputs the pixel coordinates of a number of pre-selected feature points on the target surface in the image. The number of feature points is preferably 4 to 8, distributed at the edges and corners of the target contour. The input of the network is a single-channel grayscale image scaled to 256×256 pixels; the backbone consists of a standard convolutional layer and four cascaded stages, each stage consisting of depthwise separable convolutional blocks connected in series. Each stage halves the side length of the feature map and increases the number of channels at each stage; multi-scale fusion adopts a top-down stepwise addition. The output of the fourth stage is compressed by a 1×1 convolution and upsampled, and then added element-wise with the feature map after the output of the third stage is convolved by a 1×1 convolution, and then a 3×3 convolution is performed to obtain the fused feature map; the coordinate regression head consists of a convolutional layer, a global average pooling layer and two fully connected layers. Finally, the sigmoid function is used to obtain the normalized values ​​of the horizontal and vertical coordinates of each feature point relative to the width and height of the image, which are multiplied by the width and height of the original image to obtain the pixel coordinates. The training dataset consists of docking target images collected on-site under typical working distances, viewing angles, and lighting conditions such as front lighting, backlighting, and cloudy days. The pixel coordinates of feature points on each frame image were obtained by manual annotation, and data augmentation was applied by random perturbations of brightness and contrast, random slight rotation, and translation. The training uses an adaptive moment estimation optimizer and a cosine decay learning rate. The loss function is the mean square error of coordinate regression. The number of training rounds and the timing of early stopping are selected based on the average detection error of the pixel coordinates of each feature point on the validation set.

[0064] The feature point detection network has been adapted to the input images of this scenario: all training samples are collected from real images of the docking target within the typical working distance and field of view of the hovering UAV mounting mechanism, and data augmentation is applied according to the lighting and shaking conditions that the mechanism may actually experience, rather than directly using the network parameters trained from a general key point detection dataset, so that the detection results remain stable under on-site conditions such as target partial occlusion and edge reflection.

[0065] After feature extraction, the difference between the current pixel coordinates of the aforementioned feature points and the expected pixel coordinates obtained through teaching is used to construct a feature deviation vector. The solution method for this feature deviation vector is structurally similar to the feature deviation solution based on image moments in Embodiment 1, except that the dimension of the feature quantity is determined by both the number of feature points and the coordinate dimension. When mapping this feature deviation vector to the angle adjustment of each steering joint, this embodiment does not use a preset constant image Jacobian matrix that remains unchanged during the servo process. Instead, in each control cycle, the image Jacobian matrix is ​​modified using a rank-one recursive update based on the joint angle adjustment of the previous cycle and the corresponding feature deviation change, so that the matrix dynamically adjusts with the changes in feature point configuration and the relative posture of the target. Specifically, the predicted residual vector is obtained by subtracting the product of the previous cycle's matrix and the previous cycle's joint angle adjustment from the measured characteristic deviation change in the current cycle. The rank-one correction matrix is ​​then constructed by multiplying this predicted residual vector by the transpose of the previous cycle's joint angle adjustment. This correction matrix is ​​divided by the square of the previous cycle's joint angle adjustment magnitude, multiplied by the update step size, and added to the previous cycle's matrix to obtain the current cycle's matrix. The update step size is a constant between 0 and 1. The initial matrix value is the constant matrix identified by the small-amplitude joint excitation test described in Example 1 to ensure the correct mapping direction at servo start. If the magnitude of the previous cycle's joint angle adjustment is less than 0.05°, the update for this cycle is skipped to avoid noise amplification due to an excessively small denominator. Each update cycle contains only one vector cross product and one matrix addition, without iteration.

[0066] Compared with Embodiment 1, the technical differences of this alternative solution lie in two aspects: the feature representation method and the Jacobian matrix processing method. Embodiment 1 uses image moments, a quantity that can be directly analyzed and calculated from a single frame image, as features, and uses a constant image Jacobian matrix obtained from offline excitation experiments throughout the process. This embodiment uses the coordinates of several feature points obtained by neural network inference as features, and continuously updates the Jacobian matrix online during the servo process. The online updated Jacobian matrix can still provide effective feature representation and mapping relationships even when the geometric features of the target surface are unevenly distributed, the principal axis direction is not obvious, and the image moments are difficult to extract reliably, thereby expanding the applicable target types of the end-point fine docking control method described in this invention. At the same time, the overall handling logic of force feedback contact force entering the set range as the extension termination criterion, feature deviation exceeding the limit again as the exit extension criterion, and deriving the field of view margin index from the feature extraction results and requesting hovering position fine adjustment accordingly is also applicable in this embodiment, maintaining the same safety and field of view holding capability as Embodiment 1. It should be noted that when the proportion of samples under a certain viewpoint or lighting condition in the on-site training samples is too low, the detection stability of the feature point detection network under that condition may decrease, thereby affecting the convergence speed of the online Jacobian update. This is the boundary of the applicability of this alternative in the case of insufficient sample coverage.

[0067] Example 4: This embodiment uses the end-point precision docking in the anomaly detection of transmission line fittings as an application case to demonstrate the implementation process and technical effects of the present invention under dynamic platform conditions. Fitting inspection operations require a hovering drone to hover near the crossarm of the tower and attach a self-growing mechanism to drive the temperature probe carried by the end effector to complete contact docking with the fitting surface. In this scenario, the drone's hovering is affected by local gusts of wind generated by the airflow around the tower, resulting in sudden hover drift with an amplitude exceeding 0.3m. Simultaneously, the fitting surface exhibits reflections and obstructions. Conventional servo methods relying on camera calibration and kinematic calculations are prone to docking interruptions due to calibration mismatch when drift occurs. Conventional methods struggle to maintain a stable docking success rate under gusty conditions.

[0068] During implementation, the probe end effector is first taught on the ground according to step S2 to obtain the desired characteristic quantities, and a small-amplitude joint excitation test is completed to identify the constant image Jacobian matrix. Both preparatory work is completed on the ground. After installation, the UAV flies to hover above the fitting, and the growth mechanism completes the joint turning alignment and translational extension along the optical axis according to steps S1 to S5. Once the contact force at the probe end enters the set force range, the docking is determined to be complete, and then the temperature measurement and reading process is initiated.

[0069] Test data consisted of 200 field docking tests, including 100 under stable wind conditions and 100 under gusty wind conditions. Under gusty wind conditions, the hovering drift amplitude remained between 0.2m and 0.4m throughout the tests. The hovering UAV was an industrial-grade multi-rotor platform, with its self-growing control unit implemented by an embedded programmable logic controller (PLC), meeting the real-time requirement of a single cycle time of less than 200ms. Evaluation metrics included docking success rate, average docking time, end-effector docking error, and field preparation time. A higher docking success rate was preferred, while the other three metrics were preferred to be as low as possible. Field preparation time refers to the time spent on-site preparation from installation to the start of docking; pre-completed ground teaching and small-scale joint excitation tests were not included. Docking error was measured by the positional deviation of the end effector relative to the predetermined contact point of the fitting after docking. During measurement, a cross mark was pre-engraved at the predetermined contact point of the fitting, and a developer was applied to the probe end face. After docking was completed and the UAV was withdrawn, the distance from the center of the probe indentation to the intersection of the cross mark was measured using a reading microscope. The control method selected was a pose servoing method based on camera calibration and kinematic calculation as the baseline of existing general methods. This method requires calibration of the hand-eye relationship between the camera and the external environment after installation, and conversion of feature deviations into end-effector pose deviations before calculating joint commands. Ablation control 1 removed the field-of-view margin determination and hovering position fine-tuning request in step S5 from the method of this invention, retaining only joint steering and extension control. Ablation control 2 removed the contact force criterion in step S4 from the method of this invention, replacing it with termination of extension according to a preset fixed stroke. The results for each group are statistical averages of 200 trials.

[0070] Table 1. Performance comparison of the method of the present invention with existing methods and ablation control groups:

[0071] As shown in Table 1, the existing calibration and attitude servo methods have significantly lower docking success rates and docking errors than the method of this invention. This is because the existing methods rely on the hand-eye calibration results involving both inside and outside the camera to convert image deviations into pose deviations. Hovering drift caused by gusts can lead to mismatches in the solution once it exceeds the effective range of the calibration model, and the on-site calibration process significantly increases preparation time. After removing the field-of-view margin criterion in Ablation Control 1, the docking success rate decreased significantly, indicating that the limited reach of joint steering alone is insufficient to handle situations where hovering drift accumulates to the edge of the field of view (this situation is concentrated under gusts of wind). The hovering position fine-tuning request has a direct effect on maintaining uninterrupted visual loop closure. After removing the contact force criterion in Ablation Control 2, the end-point docking error increased while the time consumption decreased slightly, indicating that when the fixed stroke terminates at an uncertain position on the target surface, under-contact or over-contact is likely to occur. The contact force criterion has a direct effect on ensuring stable contact accuracy. The above results show that the method of the present invention can still achieve a high docking success rate and a small docking error with a low on-site preparation cost under the condition of a moving platform with continuous hovering and drifting. This technical solution is also applicable to other operation scenarios that require the moving platform to complete the final precision docking, such as tower flange bolt tightening inspection.

[0072] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for precise docking control of a UAV terminal based on visual servoing, characterized in that, include: Step S1: The end camera of the self-growing mechanism mounted on the hovering UAV acquires the docking target image and obtains the current feature quantity determined by the image moments. The current feature quantity includes the center coordinates of the target image and the component representing the area occupied by the target. Step S2: Calculate the feature deviation between the current feature quantity and the expected feature quantity obtained from teaching; Step S3: The feature deviation is mapped to the angle adjustment amount of each steering joint of the self-growing mechanism through the generalized inverse of the preset constant image Jacobian matrix and then sent out for execution. The execution is repeated until the magnitude of the feature deviation is less than the convergence threshold for multiple consecutive cycles. Step S4: Drive the self-growing mechanism to extend along the end optical axis to approach the docking target. When the end contact force enters the set force range, stop the extension and determine that the docking is completed. When the feature deviation exceeds the convergence threshold again during the extension, exit the extension and return to step S1. Step S5: Derive the field of view margin index, which represents the distance from the center of the target image to the field of view boundary, from the image moments. When the field of view margin index falls into the warning range, the self-growing control unit requests a hovering position fine adjustment from the flight control unit via the fieldbus, and adjusts the extension speed of the self-growing mechanism according to the deficiency of the field of view margin index and deflects its extension direction toward the side where the target is located.

2. The visual servoing-based UAV terminal precision docking control method according to claim 1, characterized in that, Step S1, obtaining the current feature quantity, includes: sequentially performing grayscale conversion and filtering on the docking target image, extracting the target contour using an edge detection algorithm, calculating the image moments within the contour region, determining the center coordinates of the target image using the zeroth and first moments, determining the component representing the area occupied by the target using the zeroth moment, and determining the principal axis direction of the target using the second central moment; the edge detection and image moment calculation are performed only within the region of interest centered on the center of the target image of the previous cycle.

3. The visual servoing-based UAV terminal precision docking control method according to claim 1, characterized in that, The field of view margin index uses the normalized distance from the center of the target image to the boundary of the field of view, determined by the zeroth and first moments in the image moments, as the base quantity, and is weighted by the area occupied by the target, determined by the zeroth moment, to obtain a dimensionless field of view margin index; the field of view margin index is divided into a safe range, a warning range, and a danger range according to the value from large to small.

4. The visual servoing-based UAV terminal precision docking control method according to claim 3, characterized in that, The angle adjustment amount mentioned in step S3 is issued after being smoothed by the control law containing the integral term; when the field of view margin index falls into the safe range, only the joint steering in step S3 is executed without issuing a hover position fine-tuning request to the flight control unit; when the field of view margin index falls into the danger range, the integral term is frozen, and the joint steering is restored after the flight control unit completes the hover position repositioning.

5. The visual servoing-based UAV terminal precision docking control method according to claim 1, characterized in that, The warning interval is equipped with a dead zone and a mutually exclusive timing sequence. During the hover position fine-tuning of the flight control unit, step S3 only calculates and issues the angle adjustment amount without performing the convergence determination of the modulus of the characteristic deviation. The period counting of the convergence determination is resumed after the flight control unit reports that the hover position fine-tuning is completed.

6. The visual servoing-based UAV terminal precision docking control method according to claim 1, characterized in that, The characteristic deviation includes both the component caused by the hovering drift of the hovering UAV and the component caused by the attitude of the self-growing mechanism itself. The two are not distinguished on the image plane, and the hovering drift is not observed or fed forward compensated separately.

7. The visual servoing-based UAV terminal precision docking control method according to claim 1, characterized in that, The constant image Jacobian matrix mentioned in step S3 is taken as an approximate matrix at the feature point corresponding to the expected feature quantity. Its elements are identified by an offline small joint excitation test and are not updated during the cyclic execution of steps S1 to S3.

8. The visual servoing-based UAV terminal precision docking control method according to claim 1, characterized in that, In step S3, the angle adjustment amount is smoothed by the control law composed of the proportional term and the integral term and then sent to the joint servo motor. The integral term is equipped with anti-saturation limit, and the angle adjustment amount sent in a single cycle is equipped with an upper limit.

9. The visual servoing-based UAV terminal precision docking control method according to claim 1, characterized in that, The desired feature quantity is obtained by teaching, that is, before the self-growing mechanism is installed, the end effector is positioned to align with the docking target and at the docking working distance, a frame image is acquired and its image moment is calculated as the desired feature quantity; during the extension process of step S4, each steering joint is no longer driven by the closed loop of step S3, but maintains the rotation angle at the time of convergence of the feature deviation and superimposes the extension direction deflection amount given in step S5.