Adaptive Control Method and System for Maintenance Unmanned Aerial Vehicles Considering Complex Electromagnetic Environments on Rooftops
By employing magnetic field gradient compensation, multi-source deep fusion, and adaptive control, the attitude drift and positioning instability issues of UAVs in complex electromagnetic environments on rooftops were resolved, achieving stable navigation and safe obstacle avoidance, and preventing collisions caused by insufficient braking distance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUADIAN HEBEI NEW ENERGY CO LTD
- Filing Date
- 2026-04-18
- Publication Date
- 2026-06-30
AI Technical Summary
In the complex electromagnetic environment of rooftops, drones are prone to collisions due to magnetic field interference causing attitude drift, GNSS signal attenuation leading to unstable positioning, visual sensor failure causing inaccurate obstacle recognition, and fixed braking distances being unable to adapt to load changes.
An airborne magnetoresistive sensor array is used for magnetic field gradient compensation. Combined with extended Kalman filter and multi-source deep fusion technology, an inertial adaptive braking model is constructed. Combined with B-spline curve planning and model reference adaptive controller, dynamic perception and obstacle avoidance are achieved.
Achieving stable attitude calculation and reliable navigation for UAVs in complex electromagnetic environments, dynamically adjusting braking distance to avoid collisions, and ensuring safe flight and operation.
Smart Images

Figure CN122308433A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image data processing and UAV autonomous navigation technology, specifically to an adaptive control method and system for maintenance UAVs that takes into account the complex electromagnetic environment of rooftops. Background Technology
[0002] With the widespread application of distributed photovoltaic power generation on industrial and commercial rooftops, using drones for autonomous inspection and cleaning of key equipment such as inverters, transformers, and cable joints has become an important means of improving operation and maintenance efficiency. In these rooftop environments, the high-frequency switching noise generated by the inverter during pulse width modulation, the power frequency and harmonic magnetic fields from transformer leakage, and the multipath reflection of radio signals by numerous metal supports together constitute a complex electromagnetic coupling environment. When drones perform missions in this environment, the onboard MEMS gyroscope and magnetic compass are easily affected by magnetic field bias interference, leading to transient drift in attitude calculation; at the same time, GNSS signals often experience decimeter-level positioning jumps due to attenuation and multipath effects, seriously affecting the stability and operational accuracy of flight control.
[0003] Currently, drone control methods applied in power scenarios mainly rely on a single visual sensor or ultrasonic sensor for environmental perception and obstacle avoidance. However, visual recognition is highly susceptible to failure under conditions of strong light and shadow, dust obstruction, or localized strong magnetic interference, leading to missed or false obstacle detections. Furthermore, existing methods typically set a fixed safe braking distance. When a drone is equipped with cleaning equipment, its mass and moment of inertia change significantly, and the fixed distance cannot adapt to the altered braking performance. This can easily result in collisions when the drone approaches electrical equipment, potentially causing short circuits and power outages. Summary of the Invention
[0004] Based on this, the purpose of this invention is to provide an adaptive control method and system for maintenance drones that can resist electromagnetic coupling interference, maintain reliable sensing capabilities in harsh environments, and dynamically adjust the safe distance according to the drone's own inertial changes, taking into account the complex electromagnetic environment of rooftops.
[0005] The objective of this invention is achieved through the following solution:
[0006] In a first aspect, the present invention provides an adaptive control method for maintenance drones that takes into account the complex electromagnetic environment of rooftops, comprising the following steps:
[0007] S1: The space magnetic field gradient distribution data is acquired in real time through the airborne magnetoresistive sensor array. The space magnetic field gradient distribution data and the acquired IMU raw angular velocity data are subjected to recursive least square adaptive compensation to suppress the dynamic interference of electromagnetic coupling noise generated by the roof inverter and transformer on the gyroscope measurement accuracy and generate the corrected angular velocity after magnetic field gradient compensation.
[0008] S2: Based on the corrected angular velocity and the acquired IMU acceleration, the attitude calculation deviation introduced by electromagnetic interference is decoupled by the extended Kalman filter, and the position drift caused by GNSS signal interruption or attenuation is corrected by fusing GNSS positioning data, generating the flight state parameters of the UAV in the electromagnetic disturbance environment.
[0009] S3: Extract features from the acquired binocular visual image and millimeter-wave radar point cloud respectively. Construct a multi-source confidence weighting factor based on the extracted visual disparity confidence and radar echo signal-to-noise ratio. Perform pixel-level depth fusion of the binocular visual image and millimeter-wave radar point cloud according to the multi-source confidence weighting factor to generate a fused depth map.
[0010] S4: Backproject the fused depth map into a local 3D point cloud and cluster to identify obstacles. Based on the acquired current speed and current load mass, construct an inertial adaptive braking distance model, dynamically calculate the obstacle avoidance warning distance for each obstacle, and generate an obstacle spatial distribution map with warning distance markers.
[0011] S5: Using the obstacle spatial distribution map with warning distance markers and the current position of the UAV as constraints, a smooth obstacle avoidance path is planned in free space through B-spline curves. The acquired compensation attitude quaternion is input into the model reference adaptive controller to cancel electromagnetic residual torque disturbances in real time, and motor control commands are generated to drive the UAV to fly along the smooth obstacle avoidance path.
[0012] In one embodiment, S1 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0013] S11: The spatial magnetic field gradient distribution data is processed by differential operation through the spatial layout spacing of four pre-calibrated magnetoresistive sensors to extract the gradient change of the spatial magnetic field in each axis, and a magnetic field gradient tensor matrix containing nine independent components is constructed based on the gradient change to generate a magnetic field gradient tensor that reflects the non-uniform distribution characteristics of the magnetic field around the roof inverter and transformer.
[0014] S12: Establish a gyroscope measurement error model that includes a magnetic field gradient coupling term. Input the magnetic field gradient tensor matrix and the acquired IMU raw angular velocity data into the gyroscope measurement error model. Use a recursive least squares algorithm with a preset forgetting factor to recursively identify and iteratively correct the gyroscope zero bias in real time, and generate dynamically updated gyroscope zero bias estimates.
[0015] S13: The dynamically updated gyroscope bias estimate is stripped from the acquired IMU raw angular velocity data point by point in time. Simultaneously, the superposition interference component of the product term of the magnetic field gradient tensor and the preset coupling coefficient on the gyroscope output is deducted to generate the corrected angular velocity after magnetic field gradient compensation.
[0016] In one embodiment, S2 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0017] S21: The corrected angular velocity is processed by integrating the quaternion kinematic differential equation, and combined with the obtained IMU acceleration to perform strapdown inertial navigation mechanical arrangement calculations to predict the initial values of the UAV's attitude, velocity and position in the gravity reference frame, and generate navigation state prediction values based on inertial recursion.
[0018] S22: The position component in the navigation state prediction value based on inertial recursion and the GNSS positioning data are processed by residual calculation in the measurement update stage of the extended Kalman filter. The predicted state is weighted and corrected by the Kalman gain matrix to suppress the position jump error of the GNSS signal caused by multipath reflection of the roof metal support, and generate the position estimate and velocity estimate after fusion GNSS correction.
[0019] S23: The position estimate, velocity estimate, corrected angular velocity, and IMU acceleration are fused through closed-loop feedback. The uncertainty of the attitude calculation is evaluated in real time through the state covariance matrix of the extended Kalman filter. The attitude quaternion compensated for electromagnetic interference is output synchronously to generate flight state parameters containing the current position, current velocity, and compensated attitude quaternion.
[0020] In one embodiment, S3 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0021] S31: Perform semi-global stereo matching processing on the left and right views of the acquired binocular vision images. Calculate the matching cost pixel by pixel and aggregate the cost along multiple paths. Select the disparity value that minimizes the aggregation cost within the disparity search range to generate a dense disparity map. At the same time, calculate the disparity confidence of each pixel based on the ratio of the peak to the second peak of the matching cost curve to generate a visual depth map and its corresponding visual disparity confidence distribution map.
[0022] S32: The acquired millimeter-wave radar point cloud is projected onto the pixel coordinate system of the binocular vision image through the extrinsic parameter matrix. Each projection point is dynamically weighted according to its echo signal-to-noise ratio and radial distance change rate to generate a radar sparse depth map aligned with the image pixel position, and a radar confidence distribution map characterizing the reliability of each radar point is generated simultaneously.
[0023] S33: Extract the confidence scores of the same pixel position in the visual disparity confidence distribution map and the radar confidence distribution map. Use the extracted visual disparity confidence scores and radar confidence scores as weighting factors to perform convex combination fusion processing on the visual depth map and the radar sparse depth map. For pixel positions with only a single source of depth information, directly retain the depth value to generate a fused depth map.
[0024] In one embodiment, S4 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0025] S41: The depth value carried by each pixel in the fused depth map is mapped to a 3D spatial point in the UAV body coordinate system through the inverse transformation of camera projection, and the 3D spatial point is divided into spatial grids and downsampled according to the preset voxel filter size to generate a local 3D point cloud after noise reduction.
[0026] S42: Perform Euclidean distance clustering on spatial points in the local 3D point cloud using a preset clustering radius. Points with a distance less than the clustering radius are grouped into the same candidate obstacle cluster. Extract the center coordinates and circumscribed sphere radius of the 3D minimum bounding box for each candidate obstacle cluster. Combine the position difference of the same obstacle center between adjacent frames with the current velocity to calculate the speed of the obstacle relative to the UAV. Generate an obstacle set containing the geometric center, circumscribed radius and relative speed of each obstacle.
[0027] S43: Calculate the translational kinetic energy of the UAV based on the acquired current payload mass and current speed, calculate the rotational kinetic energy by combining the acquired current moment of inertia and angular velocity, determine the translational braking distance and rotational braking distance based on the maximum braking force and maximum control torque, respectively, sum the distance moved within the response time for each obstacle in the obstacle set according to its relative motion speed and the circumscribed radius, calculate the obstacle avoidance warning distance corresponding to each obstacle, and generate an obstacle spatial distribution map with warning distance markings.
[0028] In one embodiment, the calculation formula for the obstacle avoidance warning distance of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention is as follows:
[0029]
[0030] in, Let j be the obstacle avoidance warning distance for the j-th obstacle. Let m be the radius of the circumscribed sphere of the j-th obstacle, m be the current payload mass, and v be the current speed of the UAV. Where J is the maximum braking force, and J is the current total moment of inertia matrix. For the angular velocity of the drone, To achieve maximum control torque, Let be the radial velocity of the j-th obstacle relative to the drone. The system response time includes sensing latency, communication latency, and actuator response latency, plus the translational kinetic energy term. and rotational kinetic energy term These respectively characterize the kinetic energy stored in the translational and rotational states of the UAV. and These represent the maximum braking capabilities of the braking system and the attitude control system, respectively, and their ratio reflects the theoretical distance required from the current energy state to complete braking.
[0031] In one embodiment, S5 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0032] S51: Starting from the current position of the UAV and ending at the preset target waypoint, each obstacle in the obstacle spatial distribution map marked with warning distance is expanded into a circular restricted area according to its obstacle avoidance distance. The expanded circular restricted area is then processed by a gridded distance field calculation to generate a signed distance function field indicating the distance from each grid position to the nearest obstacle warning boundary.
[0033] S52: In the free space region of the symbolic distance function field, the wavefront is propagated from the starting point to the ending point using the fast travel method. The local passage cost is calculated based on the symbolic distance function value of each grid position, and the lowest cost propagation path is extracted along the gradient descent direction to generate the initial guiding path connecting the starting point and the ending point.
[0034] S53: Discretize the initial guidance path into an initial control point sequence and use it as the initial solution of a cubic uniform B-spline curve. The objective function is a weighted combination of minimizing the curve arc length, minimizing the curvature change, and maximizing the distance to the obstacle warning boundary. The spatial position of the control points is iteratively adjusted through a quasi-Newton optimizer until the objective function converges, generating a smooth obstacle avoidance waypoint sequence.
[0035] S54: Convert the acquired compensated attitude quaternion into Euler angles of the current attitude, solve the current target waypoint and the current position of the UAV in the smooth obstacle avoidance waypoint sequence into target attitude commands, use the preset second-order reference model as the desired dynamic system, design a model reference adaptive controller to compensate and correct the controller output by estimating the equivalent torque of electromagnetic interference online, and generate motor control commands to drive the UAV to fly along the smooth obstacle avoidance waypoint sequence.
[0036] Secondly, the present invention provides an adaptive control system for maintenance drones that takes into account the complex electromagnetic environment of rooftops. This system is configured with the following modules:
[0037] The magnetic field gradient compensation module is used to acquire spatial magnetic field gradient distribution data in real time through an airborne magnetoresistive sensor array, perform recursive least squares adaptive compensation on the spatial magnetic field gradient distribution data and the acquired IMU raw angular velocity data, suppress the dynamic interference of electromagnetic coupling noise generated by the roof inverter and transformer on the gyroscope measurement accuracy, and generate a corrected angular velocity after magnetic field gradient compensation.
[0038] The anti-disturbance state calculation module is used to decouple the attitude calculation deviation introduced by electromagnetic interference through an extended Kalman filter based on the corrected angular velocity and the acquired IMU acceleration, fuse GNSS positioning data to correct the position drift caused by GNSS signal interruption or attenuation, and generate the flight state parameters of the UAV in the electromagnetic disturbance environment.
[0039] The multi-source deep fusion module is used to extract features from the acquired binocular visual images and millimeter-wave radar point clouds respectively. Based on the extracted visual disparity confidence and radar echo signal-to-noise ratio, a multi-source confidence weighting factor is constructed. The binocular visual images and millimeter-wave radar point clouds are then fused at the pixel level according to the multi-source confidence weighting factor to generate a fused depth map.
[0040] The obstacle warning modeling module is used to backproject the fused depth map into a local 3D point cloud and cluster to identify obstacles. Based on the acquired current speed and current load mass, it constructs an inertial adaptive braking distance model, dynamically calculates the obstacle avoidance warning distance for each obstacle, and generates an obstacle spatial distribution map with warning distance markers.
[0041] The obstacle avoidance path control module is used to plan a smooth obstacle avoidance path in free space using B-spline curves, with the obstacle spatial distribution map marked with warning distance and the current position of the UAV as constraints. The module also inputs the acquired compensation attitude quaternion into the model reference adaptive controller to counteract electromagnetic residual torque disturbances in real time, and generates motor control commands to drive the UAV to fly along the smooth obstacle avoidance path.
[0042] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the above-mentioned adaptive control methods for maintenance drones considering the complex electromagnetic environment of rooftops.
[0043] Fourthly, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-mentioned adaptive control methods for maintenance drones considering the complex electromagnetic environment of rooftops.
[0044] In summary, the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided in this application can dynamically suppress electromagnetic coupling noise generated by rooftop inverters and transformers, thereby achieving real-time compensation for gyroscope measurement accuracy and significantly improving the attitude calculation stability of the drone in strong magnetic field environments. Based on extended Kalman filter and GNSS fusion correction, it can eliminate position drift caused by electromagnetic interference, thereby achieving continuous and reliable navigation in complex electromagnetic disturbance environments. Simultaneously, by constructing a weighted fusion mechanism of visual parallax confidence and radar echo signal-to-noise ratio, it can maintain highly robust environmental perception under conditions of strong light, shadow, or dust obstruction, enabling automatic weight switching when a single sensor fails and avoiding perception blind spots. Employing an inertial adaptive braking distance model, it can dynamically calculate obstacle avoidance distance based on the drone's current payload weight and speed, thereby achieving safe obstacle avoidance under different workloads and preventing collisions with electrical equipment due to insufficient braking distance. By further combining B-spline curve programming and model reference adaptive control, smooth obstacle avoidance and real-time cancellation of electromagnetic residual torque disturbances can be achieved, enabling UAVs to fly autonomously and safely around electrical equipment.
[0045] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0046] Figure 1 A flowchart illustrating an adaptive control method for an operation and maintenance drone considering a complex electromagnetic environment on a rooftop, provided as an embodiment of this application;
[0047] Figure 2 This is a schematic diagram of the structure of an adaptive control system for an operation and maintenance drone that takes into account the complex electromagnetic environment of a rooftop, provided as another embodiment of this application. Detailed Implementation
[0048] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0050] In one embodiment, such as Figure 1As shown, an adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops is provided. This embodiment illustrates the method by applying it to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0051] S1: The space magnetic field gradient distribution data is acquired in real time through an airborne magnetoresistive sensor array. The space magnetic field gradient distribution data and the acquired IMU raw angular velocity data are subjected to recursive least squares adaptive compensation to suppress the dynamic interference of electromagnetic coupling noise generated by the roof inverter and transformer on the gyroscope measurement accuracy and generate a corrected angular velocity after magnetic field gradient compensation.
[0052] Specifically, the system acquires real-time spatial magnetic field gradient distribution data via an onboard magnetoresistive sensor array. This data is generated by electromagnetic signals from the rooftop inverter and transformer. Simultaneously, the system acquires raw angular velocity data from the IMU (Integrated Mutual Regulator), collected by a gyroscope within the onboard IMU. The system performs recursive least squares adaptive compensation on the spatial magnetic field gradient distribution data and the raw IMU angular velocity data. The core of this recursive least squares adaptive compensation is to construct an angular velocity measurement error model, treating the magnetic field gradient data as an interference observation term. By iteratively updating the compensation coefficients, real-time cancellation of electromagnetic coupling noise is achieved. Electromagnetic coupling noise, generated by the high-frequency switching action of the rooftop inverter and the power frequency and harmonic magnetic fields of the transformer, dynamically interferes with the gyroscope's measurement accuracy. Recursive least squares adaptive compensation suppresses this dynamic interference. The system generates a corrected angular velocity after magnetic field gradient compensation, providing input data for subsequent attitude calculations. After completing the compensation process, the system transmits the corrected angular velocity to subsequent processing stages to ensure the accuracy of the subsequent attitude calculations. The entire process is completed automatically by the system without human intervention. Through the collaborative work of the sensor array and adaptive algorithm, the angular velocity data is accurately corrected, eliminating the adverse effects of electromagnetic coupling noise.
[0053] S2: Based on the corrected angular velocity and the acquired IMU acceleration, the attitude calculation deviation introduced by electromagnetic interference is decoupled by an extended Kalman filter, and the position drift caused by GNSS signal interruption or attenuation is corrected by fusing GNSS positioning data, generating the flight state parameters of the UAV in the electromagnetic disturbance environment.
[0054] Specifically, the system processes the corrected angular velocity and acquired IMU acceleration using an extended Kalman filter (EPF). The EPF decouples attitude calculation errors introduced by electromagnetic interference by constructing state and observation equations. The state equations include the UAV's attitude quaternions, position, velocity, and acceleration deviations, while the observation equations include the corrected angular velocity, filtered acceleration data, and GNSS positioning data. The system separates attitude errors caused by electromagnetic interference through a two-step prediction-update process using the EPF, outputting accurate attitude quaternions. Simultaneously, the system acquires GNSS positioning data, collected by an onboard GNSS module. In the complex electromagnetic environment of a rooftop, GNSS signals are prone to attenuation or interruption, leading to position drift. The system fuses the GNSS positioning data to correct for position drift, adjusting the fusion strategy according to different GNSS signal states to ensure positioning accuracy. Through the above calculation and correction process, the system generates flight state parameters of the UAV in an electromagnetic disturbance environment. The flight state parameters include attitude quaternions, position, velocity and acceleration, providing data support for subsequent path planning and control. The entire process is completed autonomously by the system, realizing real-time updating and calibration of flight state parameters.
[0055] S3: Feature extraction is performed on the acquired binocular visual image and millimeter-wave radar point cloud respectively. Based on the extracted visual disparity confidence and radar echo signal-to-noise ratio, a multi-source confidence weighting factor is constructed. The binocular visual image and millimeter-wave radar point cloud are then fused at the pixel level according to the multi-source confidence weighting factor to generate a fused depth map.
[0056] Specifically, the system performs feature extraction processing on the acquired binocular vision images and millimeter-wave radar point clouds. The binocular vision images are acquired by an airborne binocular camera. The system performs feature point detection, matching, and disparity calculation on the binocular vision images, extracting key feature points from the images. A visual disparity map is obtained through feature point matching, which in turn yields a visual depth map. Simultaneously, the system calculates the visual disparity confidence score, determined based on disparity consistency, reflecting the reliability of visual perception. The millimeter-wave radar point clouds are acquired by an airborne millimeter-wave radar. The system performs feature extraction and noise removal on the millimeter-wave radar point clouds, extracting planar features and point cluster features. Simultaneously, the system calculates the echo signal-to-noise ratio (SNR) for each radar point, reflecting the reliability of radar measurements. Based on the extracted visual disparity confidence score and the radar echo SNR, the system constructs a multi-source confidence weighting factor. This weighting factor dynamically allocates weights between the binocular vision and millimeter-wave radar based on the two confidence levels. The system performs pixel-level depth fusion of binocular visual images and millimeter-wave radar point clouds using multi-source confidence weighting factors. It then fuses the binocular visual depth map with the radar depth map to generate a fused depth map. This fused depth map integrates the advantages of both sensors, eliminating blind spots inherent in single sensors and providing accurate 3D depth information for subsequent obstacle recognition. The entire process of feature extraction, weighting factor construction, and fusion is completed automatically by the system.
[0057] S4: Backproject the fused depth map into a local 3D point cloud and cluster it to identify obstacles. Based on the acquired current speed and current load mass, construct an inertial adaptive braking distance model, dynamically calculate the obstacle avoidance warning distance for each obstacle, and generate an obstacle spatial distribution map with warning distance markers.
[0058] Specifically, the system backprojects the fused depth map into a local 3D point cloud. The backprojection process is based on the intrinsic and extrinsic parameters of the binocular camera, converting pixels in the fused depth map into 3D spatial coordinates. The system performs clustering processing on the local 3D point cloud, grouping points with similar spatial distances into one cluster using a clustering algorithm. Morphological analysis is performed on each cluster to remove invalid clusters and identify obstacles in the rooftop environment. The system acquires the UAV's current speed and current payload weight. The current speed is obtained from flight state parameters, and the current payload weight is collected by the onboard weight sensor. Based on the current speed and payload weight, the system constructs an inertial adaptive braking distance model. This model dynamically adjusts the braking distance according to changes in payload weight and flight speed, adapting to changes in the UAV's braking performance. The system dynamically calculates the obstacle avoidance warning distance for each obstacle. The obstacle avoidance warning distance consists of the braking distance and a safety redundancy distance, which is dynamically set according to the obstacle's volume. The system establishes a three-dimensional spatial coordinate system with the current position of the UAV as the origin, marks the identified obstacles and their warning distances in the coordinate system, and generates a spatial distribution map of obstacles with warning distance markings. The map clearly shows the position, size and warning range of obstacles around the UAV, providing constraints for subsequent path planning. The entire process is completed autonomously by the system, realizing accurate obstacle identification and dynamic calculation of warning distances.
[0059] S5: Using the obstacle spatial distribution map with warning distance markers and the current position of the UAV as constraints, a smooth obstacle avoidance path is planned in free space through B-spline curves. The acquired compensation attitude quaternion is input into the model reference adaptive controller to cancel electromagnetic residual torque disturbances in real time, and motor control commands are generated to drive the UAV to fly along the smooth obstacle avoidance path.
[0060] Specifically, the system uses an obstacle spatial distribution map with warning distance markers and the current position of the UAV as constraints. The current position is obtained from flight state parameters. The system plans a smooth obstacle avoidance path in free space using B-spline curves. Free space is an obstacle-free warning area. The system selects the current position of the UAV as the starting point and the target point as the ending point. Control points are selected in free space, and a smooth 3D obstacle avoidance path is generated using a B-spline interpolation algorithm. The path planning process must meet preset constraints to ensure that the path is smooth and does not enter the obstacle warning range. The system obtains the compensated attitude quaternion, which is calculated by S2. The system inputs the compensated attitude quaternion into the model reference adaptive controller. The model reference adaptive controller sets the ideal flight attitude model as the reference model, uses the compensated attitude quaternion as feedback input, compares it with the output of the reference model to obtain the attitude error, and adjusts the controller parameters in real time through an adaptive law to generate torque compensation to offset electromagnetic residual torque disturbances. The system uses a model reference adaptive controller and a PID control algorithm to send speed commands to the onboard motors. These speed commands are then transmitted to the motor driver via signals, which adjusts the motor speed and controls the attitude and speed of the UAV. This allows the UAV to fly along a planned smooth obstacle avoidance path and complete the maintenance work on the rooftop equipment. The entire process of path planning, disturbance cancellation, and command generation is completed automatically by the system.
[0061] In summary, the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided in this application can dynamically suppress electromagnetic coupling noise generated by rooftop inverters and transformers, thereby achieving real-time compensation for gyroscope measurement accuracy and significantly improving the attitude calculation stability of the drone in strong magnetic field environments. Based on extended Kalman filter and GNSS fusion correction, it can eliminate position drift caused by electromagnetic interference, thereby achieving continuous and reliable navigation in complex electromagnetic disturbance environments. Simultaneously, by constructing a weighted fusion mechanism of visual parallax confidence and radar echo signal-to-noise ratio, it can maintain highly robust environmental perception under conditions of strong light, shadow, or dust obstruction, enabling automatic weight switching when a single sensor fails and avoiding perception blind spots. Employing an inertial adaptive braking distance model, it can dynamically calculate obstacle avoidance distance based on the drone's current payload weight and speed, thereby achieving safe obstacle avoidance under different workloads and preventing collisions with electrical equipment due to insufficient braking distance. By further combining B-spline curve programming and model reference adaptive control, smooth obstacle avoidance and real-time cancellation of electromagnetic residual torque disturbances can be achieved, enabling UAVs to fly autonomously and safely around electrical equipment.
[0062] In one embodiment, S1 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0063] S11: The spatial magnetic field gradient distribution data is processed by differential operation through the spatial layout spacing of four pre-calibrated magnetoresistive sensors to extract the gradient change of the spatial magnetic field in each axis, and a magnetic field gradient tensor matrix containing nine independent components is constructed based on the gradient change to generate a magnetic field gradient tensor that reflects the non-uniform distribution characteristics of the magnetic field around the roof inverter and transformer.
[0064] Specifically, the system acquires the pre-calibrated spatial spacing of four magnetoresistive sensors. This spacing is used to perform differential operations on the acquired spatial magnetic field gradient distribution data. The system performs differential operations, extracting the gradient changes of the spatial magnetic field in each axis by combining the differences in spatial magnetic field gradient distribution data collected by adjacent magnetoresistive sensors with the pre-calibrated spatial spacing. The gradient changes of the spatial magnetic field reflect the changing trend of the spatial magnetic field in different directions. Based on the gradient changes in each axis, the system constructs a magnetic field gradient tensor matrix. This matrix contains nine independent components, corresponding to the gradient parameters formed by the interaction of the spatial magnetic field in the three axes. The expression for the magnetic field gradient tensor matrix is:
[0065]
[0066] In the formula, These represent the gradient changes of the magnetic field component in the x-direction along the x, y, and z axes, respectively. These represent the gradient changes of the magnetic field component in the y-direction along the x, y, and z axes, respectively. These represent the gradient variations of the magnetic field component in the z-direction along the x, y, and z axes, respectively. The system generates a magnetic field gradient tensor through the above process, which reflects the non-uniform distribution of the magnetic field around the rooftop inverter and transformer.
[0067] S12: Establish a gyroscope measurement error model that includes a magnetic field gradient coupling term. Input the magnetic field gradient tensor matrix and the acquired IMU raw angular velocity data into the gyroscope measurement error model. Use a recursive least squares algorithm with a preset forgetting factor to recursively identify and iteratively correct the gyroscope zero bias in real time, and generate dynamically updated gyroscope zero bias estimates.
[0068] Specifically, the system establishes a gyroscope measurement error model that includes a magnetic field gradient coupling term. This model describes the interference of the magnetic field gradient on the gyroscope measurement results, incorporating the magnetic field gradient coupling term into the error sources to achieve a comprehensive characterization of the gyroscope measurement error. The system inputs the magnetic field gradient tensor matrix and the acquired raw angular velocity data of the IMU into this gyroscope measurement error model. The expression of the gyroscope measurement error model is as follows:
[0069]
[0070] In the formula, This is the raw angular velocity data from the IMU. This represents the true angular velocity of the gyroscope. For zero bias of the gyroscope, This is the magnetic field gradient coupling coefficient matrix. This is the column vectorized form of the magnetic field gradient tensor matrix. The system employs a recursive least squares algorithm with a preset forgetting factor to recursively identify and iteratively correct the gyroscope's zero bias. The core recursive formula of the recursive least squares algorithm is:
[0071]
[0072] In the formula, The zero-bias estimate of the gyroscope at time k. This is the zero-bias estimate of the gyroscope at time k-1. Let k be the covariance matrix at time k-1. For the observation matrix, This is the raw angular velocity data of the IMU at time k.
[0073] S13: The dynamically updated gyroscope bias estimate is stripped from the acquired IMU raw angular velocity data point by point in time. Simultaneously, the superposition interference component of the product term of the magnetic field gradient tensor and the preset coupling coefficient on the gyroscope output is deducted to generate the corrected angular velocity after magnetic field gradient compensation.
[0074] Specifically, the system acquires dynamically updated gyroscope bias estimates and simultaneously reacquires raw IMU angular velocity data. The gyroscope bias estimates are then removed from the raw IMU angular velocity data point-by-point to eliminate the fixed interference of gyroscope bias on the angular velocity measurement results. Simultaneously, the system performs subtraction processing for superimposed interference components. These superimposed interference components are generated by the product of the magnetic field gradient tensor and a preset coupling coefficient, and are the main source of dynamic interference from the magnetic field gradient to the gyroscope output. The system calculates the product of the magnetic field gradient tensor and the preset coupling coefficient, and subtracts the corresponding superimposed interference component from the angular velocity data after removing the gyroscope bias. The formula for generating the corrected angular velocity is:
[0075]
[0076] In the formula, This is the corrected angular velocity after magnetic field gradient compensation. Here are the raw angular velocity data from the IMU, and $$\hat{b}$$ are dynamically updated gyroscope bias estimates. For the preset coupling coefficient matrix, This is the column vectorized form of the magnetic field gradient tensor matrix. Through the aforementioned stripping, elimination, and subtraction processes, the system eliminates the dual interference caused by gyroscope bias and magnetic field gradient coupling, generating a corrected angular velocity compensated for by the magnetic field gradient.
[0077] In one embodiment, S2 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0078] S21: The corrected angular velocity is processed by integrating the quaternion kinematic differential equation, and combined with the obtained IMU acceleration for strapdown inertial navigation mechanical arrangement calculation to predict the initial values of the UAV's attitude, velocity and position in the gravity reference frame, and generate navigation state prediction values based on inertial recursion.
[0079] Specifically, the system acquires the corrected angular velocity, inputs it into the quaternion kinematic differential equation for integration, and obtains the variation law of the UAV attitude quaternion through integration, realizing real-time recursion of attitude information. The expression of the quaternion kinematic differential equation is as follows:
[0080]
[0081] In the formula, The time derivative of the attitude quaternion. To correct the antisymmetric matrix corresponding to the angular velocity, For the attitude quaternion of the UAV, This is the corrected angular velocity after magnetic field gradient compensation. The system simultaneously acquires IMU acceleration, combines the attitude information obtained through integration with the IMU acceleration, and performs strapdown inertial navigation mechanical orchestration calculations. The strapdown inertial navigation mechanical orchestration calculation transforms the IMU acceleration from the carrier coordinate system to the gravity reference system using attitude quaternions, eliminating the influence of carrier attitude changes on acceleration measurement. Then, through integration calculations, the UAV's velocity and position information are obtained. Through the above process, the system predicts the initial values of the UAV's attitude, velocity, and position in the gravity reference system, integrates these initial values, and generates a navigation state prediction value based on inertial recursion. This navigation state prediction value provides the basis for subsequent correction by fusing GNSS data. The entire integration process, strapdown inertial navigation mechanical orchestration calculation, and prediction value generation process are all automatically completed by the system, achieving real-time prediction of the navigation state.
[0082] S22: The position component in the navigation state prediction value based on inertial recursion and the GNSS positioning data are processed by residual calculation in the measurement update stage of the extended Kalman filter. The predicted state is weighted and corrected by the Kalman gain matrix to suppress the position jump error caused by multipath reflection of the GNSS signal due to the roof metal support. The position estimate and velocity estimate after fusion GNSS correction are generated.
[0083] Specifically, the system acquires a navigation state prediction value based on inertial recursion, extracts the position component from this prediction value, and simultaneously acquires GNSS positioning data. The system inputs the position component and GNSS positioning data into an extended Kalman filter (EPF). During the EPF measurement update phase, residual calculation is performed on both. The residual calculation characterizes the degree of deviation between the inertial recursive position and the GNSS positioning position. The expression for the residual calculation is:
[0084]
[0085] In the formula, For residuals, For GNSS positioning data, The navigation state prediction is based on inertial recursion. The measurement equation is as follows. The system calculates the Kalman gain matrix using an extended Kalman filter. The Kalman gain matrix is used to adjust the weights of the predicted state and the measurement data, making the corrected state closer to the true value. The system uses the Kalman gain matrix to weight and correct the navigation state prediction value based on inertial recursion, focusing on suppressing the position jump error caused by multipath reflections from the roof metal support in the GNSS signal. Multipath reflections from the roof metal support can cause abnormal fluctuations in GNSS positioning data. The weighted correction process can reduce the impact of abnormal data on the navigation state and improve positioning stability.
[0086] S23: The position estimate, velocity estimate, corrected angular velocity, and IMU acceleration are fused through closed-loop feedback. The uncertainty of the attitude calculation is evaluated in real time through the state covariance matrix of the extended Kalman filter. The attitude quaternion compensated for electromagnetic interference is output synchronously to generate flight state parameters containing the current position, current velocity, and compensated attitude quaternion.
[0087] Specifically, the system acquires position and velocity estimates, along with corrected angular velocity and IMU acceleration. This data is then input into an extended Kalman filter for closed-loop feedback fusion processing. This closed-loop feedback fusion process continuously corrects the navigation state by comparing the position and velocity estimates with the corrected angular velocity and IMU acceleration in real time, thereby improving the accuracy and stability of the state estimation. The system uses the state covariance matrix of the extended Kalman filter to evaluate the uncertainty of the attitude calculation in real time. The diagonal elements of the state covariance matrix represent the estimation error of each navigation state parameter. This matrix allows for the assessment of the reliability of the attitude calculation results, providing a basis for subsequent control strategy adjustments. The update formula for the state covariance matrix is:
[0088]
[0089] In the formula, The updated state covariance matrix, It is the identity matrix. Here is the Kalman gain matrix. For the measurement matrix, This represents the state covariance matrix during the prediction phase. While performing closed-loop feedback fusion and uncertainty assessment, the system outputs an attitude quaternion compensated for electromagnetic interference (EMI), which eliminates attitude deviations caused by EMI. The system integrates the position estimate, velocity estimate, and EMI-compensated attitude quaternion to generate flight state parameters containing the current position, current velocity, and compensated attitude quaternion. This provides comprehensive and reliable input data for subsequent path planning and motor control. The entire closed-loop feedback fusion, uncertainty assessment, and parameter generation process is completed autonomously by the system.
[0090] In one embodiment, S3 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0091] S31: Perform semi-global stereo matching processing on the left and right views of the acquired binocular vision images. Calculate the matching cost pixel by pixel and aggregate the cost along multiple paths. Select the disparity value that minimizes the aggregation cost within the disparity search range to generate a dense disparity map. At the same time, calculate the disparity confidence of each pixel based on the ratio of the peak to the second peak of the matching cost curve to generate a visual depth map and its corresponding visual disparity confidence distribution map.
[0092] Specifically, the system acquires the left and right views of the binocular vision image and performs semi-global stereo matching processing on them. The core of this semi-global stereo matching processing is calculating the matching cost pixel-by-pixel. The matching cost characterizes the similarity between corresponding pixels in the left and right views. The system aggregates the calculated matching costs along multiple preset paths, reducing the impact of single-pixel matching errors and improving matching stability through aggregation. Within a preset disparity search range, the system iterates through and filters the aggregated costs of each pixel, selecting the disparity value that minimizes the aggregation cost. The optimal disparity values of all pixels are then integrated to generate a dense disparity map. This dense disparity map contains disparity information for each pixel in the image, providing a foundation for generating the visual depth map. Simultaneously, the system calculates the disparity confidence of each pixel based on the ratio of the peak to the second-highest peak of the matching cost curve. The formula for calculating the disparity confidence is:
[0093]
[0094] In the formula, For parallax confidence level, To match the peak value of the cost curve, To match the second peak of the cost curve, the system associates the disparity confidence of each pixel with the corresponding pixel position to generate a visual disparity confidence distribution map. At the same time, combining the correspondence between disparity and depth, the dense disparity map is converted into a visual depth map, and finally the visual depth map and its corresponding visual disparity confidence distribution map are obtained.
[0095] S32: The acquired millimeter-wave radar point cloud is projected onto the pixel coordinate system of the binocular vision image through the extrinsic parameter matrix. Each projection point is dynamically weighted according to its echo signal-to-noise ratio and radial distance change rate to generate a radar sparse depth map aligned with the image pixel position. Simultaneously, a radar confidence distribution map characterizing the reliability of each radar point is generated.
[0096] Specifically, the system acquires millimeter-wave radar point clouds and simultaneously obtains a pre-calibrated extrinsic parameter matrix. This matrix is used to transform the millimeter-wave radar coordinate system into the pixel coordinate system of the binocular vision image. The system projects the millimeter-wave radar point cloud onto the pixel coordinate system of the binocular vision image using the extrinsic parameter matrix, achieving initial alignment between the radar point cloud and image pixel positions. The system then performs dynamic weighting on each projected radar point. The dynamic weighting is based on the echo signal-to-noise ratio (SNR) and radial distance change rate of the radar point. The SNR reflects the clarity of the radar point signal, while the radial distance change rate reflects the target motion state corresponding to the radar point; both together determine the reliability of the radar point. The expression for dynamic weighting is:
[0097]
[0098] In the formula, For the dynamic weights of radar points, For weighting coefficients, For echo signal-to-noise ratio, The radial distance change rate is used. The system converts the radar point cloud into a sparse radar depth map aligned with the image pixel locations based on dynamic weights. This sparse depth map contains only the depth information corresponding to the projected locations of the radar points. Simultaneously, the system generates a radar confidence score characterizing the reliability of each radar point based on its echo signal-to-noise ratio and radial distance change rate. This radar confidence score is then correlated with the corresponding pixel location to generate a radar confidence score distribution map.
[0099] S33: Extract the confidence scores of the same pixel position in the visual disparity confidence distribution map and the radar confidence distribution map. Use the extracted visual disparity confidence scores and radar confidence scores as weighting factors to perform convex combination fusion processing on the visual depth map and the radar sparse depth map. For pixel positions with only a single source of depth information, directly retain the depth value to generate a fused depth map.
[0100] Specifically, the system acquires a visual disparity confidence distribution map and a radar confidence distribution map. It extracts the confidence scores corresponding to the same pixel location from both maps, ensuring that the extracted visual disparity confidence scores and radar confidence scores correspond to depth information at the same spatial location. The system uses the extracted visual disparity confidence scores and radar confidence scores as weighting factors to perform convex combination fusion processing on the visual depth map and the radar sparse depth map. This convex combination fusion processing fully combines the advantages of both depth information types, improving the accuracy and reliability of the fused depth map. The calculation formula for convex combination fusion is:
[0101]
[0102] In the formula, The pixel depth value after fusion. For visual parallax confidence, This represents the depth value of the corresponding pixel in the visual depth map. For radar confidence level, This represents the depth value of the corresponding pixel in the radar sparse depth map. During the fusion process, the system processes pixel locations with only a single source of depth information separately, directly retaining the single depth value of that pixel location to avoid depth information loss during fusion. Through the aforementioned confidence extraction, convex combination fusion, and single depth value retention processing, the system organically integrates visual depth information with radar depth information to generate a fused depth map. This fused depth map can compensate for the limitations of a single sensor's perception, providing accurate 3D depth information for subsequent obstacle recognition. The entire processing is completed autonomously by the system.
[0103] In one embodiment, S4 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0104] S41: The depth value carried by each pixel in the fused depth map is mapped to a 3D spatial point in the UAV body coordinate system through the inverse transformation of camera projection, and the 3D spatial point is divided into spatial grids and downsampled according to the preset voxel filter size to generate a noise-reduced local 3D point cloud.
[0105] Specifically, the system acquires a fused depth map, where each pixel carries a depth value corresponding to its spatial location. The system performs an inverse camera projection transform (IPT) on the depth value of each pixel. IPT maps the depth information in the pixel coordinate system to a 3D spatial point in the UAV's body coordinate system, converting 2D image information into 3D spatial information. The core relationship of IPT is that the 3D coordinates of a spatial point are related to the pixel coordinates and the depth value; the inverse transform operation accurately obtains the 3D spatial location corresponding to each pixel. After mapping, the system divides the generated 3D spatial points into a spatial grid according to a preset voxel filter size, dividing the 3D space into several uniform grids, each corresponding to a spatial region. The system downsamples the 3D spatial points within each grid, retaining representative spatial points while removing redundant and noise points, reducing data volume while preserving the overall distribution characteristics of the spatial points. Through the above IPT, spatial grid division, and downsampling processes, the system generates a denoised local 3D point cloud. This local 3D point cloud accurately reflects the 3D features of the UAV's surrounding spatial environment, removing noise interference.
[0106] S42: Perform Euclidean distance clustering on spatial points in the local 3D point cloud using a preset clustering radius. Points with a distance less than the clustering radius are grouped into the same candidate obstacle cluster. Extract the center coordinates and circumscribed sphere radius of the 3D minimum bounding box for each candidate obstacle cluster. Combine the position difference of the center of the same obstacle between adjacent frames with the current velocity to calculate the speed of the obstacle relative to the UAV. Generate an obstacle set containing the geometric center, circumscribed radius and relative speed of each obstacle.
[0107] Specifically, the system acquires the denoised local 3D point cloud generated by S41 and performs Euclidean distance clustering on the spatial points in the local 3D point cloud using a preset clustering radius. Euclidean distance clustering calculates the Euclidean distance between any two spatial points, grouping spatial points whose distance is less than the clustering radius into the same cluster, forming candidate obstacle clusters. The distance between spatial points in different clusters is greater than the clustering radius, achieving initial separation of different obstacles. The system extracts geometric features from each candidate obstacle cluster, extracting the 3D minimum bounding box of each cluster, determining the center coordinates of the 3D minimum bounding box, and simultaneously calculating the circumsphere radius of each candidate obstacle cluster. The center coordinates and circumsphere radius are used to characterize the spatial position and size of the obstacle. The system acquires local 3D point clouds from adjacent frames, extracts the center coordinates of the same obstacle cluster between adjacent frames, calculates the position difference between the two center coordinates, and simultaneously acquires the current velocity of the UAV. Combining the position difference and the current velocity, the system calculates the velocity of the obstacle relative to the UAV. The formula for calculating the relative velocity is:
[0108]
[0109] In the formula, Let be the speed of the j-th obstacle relative to the drone. This represents the position difference value of the j-th obstacle center between adjacent frames. The time interval between adjacent frames. This represents the drone's current speed. The system integrates the geometric center, circumscribed sphere radius, and relative velocity of each obstacle to generate a set of obstacles containing these parameters.
[0110] S43: Calculate the translational kinetic energy of the UAV based on the acquired current payload mass and current speed, calculate the rotational kinetic energy by combining the acquired current moment of inertia and angular velocity, determine the translational braking distance and rotational braking distance based on the maximum braking force and maximum control torque, respectively, sum the distance moved within the response time for each obstacle in the obstacle set according to its relative motion speed and the circumscribed radius, calculate the obstacle avoidance warning distance corresponding to each obstacle, and generate an obstacle spatial distribution map with warning distance markings.
[0111] Specifically, the system acquires the drone's current payload mass and current speed. Based on these, it calculates the drone's translational kinetic energy, which is obtained by multiplying the square of the payload mass and current speed by half. Simultaneously, the system acquires the drone's current moment of inertia and angular velocity, and calculates its rotational kinetic energy, which is also obtained by multiplying the square of the moment of inertia and angular velocity by half. The system acquires the maximum braking force and maximum control torque. Based on the maximum braking force, it determines the translational braking distance, reflecting the distance required for the drone to brake from its current speed to a standstill in translational mode. Based on the maximum control torque, it determines the rotational braking distance, reflecting the distance required for the drone to brake from its current angular velocity to a standstill in rotational mode. For each obstacle in the obstacle set, the system calculates the distance traveled by its relative velocity within the system response time. This distance is summed with the obstacle's circumscribed sphere radius. Combining the maximum values of the translational and rotational braking distances, the system calculates the obstacle avoidance warning distance for each obstacle using a preset formula. Preferably, the formula for calculating the obstacle avoidance warning distance in the adaptive control method for maintenance drones is as follows:
[0112]
[0113] in, Let j be the obstacle avoidance warning distance for the j-th obstacle. Let m be the radius of the circumscribed sphere of the j-th obstacle, m be the current payload mass, and v be the current speed of the UAV. Where J is the maximum braking force, and J is the current total moment of inertia matrix. For the angular velocity of the drone, To achieve maximum control torque, Let be the radial velocity of the j-th obstacle relative to the drone. The system response time includes sensing latency, communication latency, and actuator response latency, plus the translational kinetic energy term. and rotational kinetic energy term These respectively characterize the kinetic energy stored in the translational and rotational states of the UAV. and These represent the maximum braking capabilities of the braking system and the attitude control system, respectively, and their ratio reflects the theoretical distance required to achieve full braking from the current energy state. The system correlates the obstacle avoidance warning distance of each obstacle with its spatial location, generating an obstacle spatial distribution map with warning distance markers, clearly showing the spatial location, size, and warning range of each obstacle.
[0114] In one embodiment, S5 of the adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops provided by the present invention specifically includes the following steps:
[0115] S51: Starting from the current position of the UAV and ending at the preset target waypoint, each obstacle in the obstacle spatial distribution map marked with warning distance is expanded into a circular restricted area according to its obstacle avoidance distance. The expanded circular restricted area is then processed by rasterized distance field calculation to generate a signed distance function field indicating the distance from each grid position to the nearest obstacle warning boundary.
[0116] Specifically, the system acquires the UAV's current position and preset target waypoints, using the current position as the starting point of path planning and the preset target waypoints as the ending point, thus defining the start and end range of path planning. The system acquires an obstacle spatial distribution map generated by S43 with warning distance markers, extracts the obstacle avoidance warning distance and spatial position of each obstacle in the map, and expands the obstacles outwards along their spatial positions based on the obstacle avoidance warning distance of each obstacle, forming circular restricted areas. These circular restricted areas define the areas the UAV cannot enter, ensuring a safe distance between the UAV and obstacles during flight. The system performs rasterized distance field calculations on all expanded circular restricted areas, dividing the entire planning space into uniform grids, each grid corresponding to a spatial position. By calculating the distance from each grid position to the nearest obstacle warning boundary, a signed distance function field is generated. The expression for the signed distance function field is:
[0117]
[0118] In the formula, grid position The corresponding signed distance function value, Let J be the geometric center coordinates of the j-th obstacle. Let j be the obstacle avoidance warning distance for the j-th obstacle. This involves Euclidean distance calculation. A positive signified distance function value indicates that the grid position is in free space; a negative value indicates that the grid position is in a circular restricted area; and a value of zero indicates that the grid position is located at an obstacle warning boundary. Through the above dilation, rasterization, and distance calculation processes, the system generates a signified distance function field indicating the distance from each grid position to the nearest obstacle warning boundary.
[0119] S52: In the free space region of the symbolic distance function field, the wavefront is propagated from the starting point to the ending point using the fast travel method. The local passage cost is calculated based on the symbolic distance function value of each grid position, and the lowest cost propagation path is extracted along the gradient descent direction to generate the initial guiding path connecting the starting point and the ending point.
[0120] Specifically, the system acquires the symbolic distance function field generated by S51, extracts the free space region from the function field, and defines the free space region as the set of grid cells with a symbolic distance function value greater than zero, representing areas where the UAV can safely pass. Within this free space region, the system employs a fast-moving method, propagating a wavefront from a preset starting point to a destination. The propagation speed of the wavefront is related to the symbolic distance function value of the grid cell; the larger the symbolic distance function value, the faster the wavefront propagation speed, ensuring that the path prioritizes areas far from obstacles. The system calculates the local passage cost based on the symbolic distance function value of each grid cell. The local passage cost is inversely proportional to the symbolic distance function value; the smaller the symbolic distance function value, the greater the local passage cost, indicating that the location is close to an obstacle and has a higher passage risk. The system extracts the minimum cost propagation path along the gradient descent direction, which points in the direction of minimum local passage cost. By continuously searching for the minimum cost path, path guidance from the starting point to the destination is achieved. The formula for extracting the initial guidance path is:
[0121]
[0122] In the formula, Let be the grid position at time t. The grid position at time t+1 This is the step size coefficient. Let be the gradient of the signed distance function of the grid position at time t. Through the aforementioned wavefront propagation, passage cost calculation, and gradient descent search, the system generates an initial guiding path connecting the start and end points, which avoids all circular restricted areas.
[0123] S53: Discretize the initial guidance path into an initial control point sequence and use it as the initial solution of a cubic uniform B-spline curve. The objective function is a weighted combination of minimizing the curve arc length, minimizing the curvature change, and maximizing the distance to the obstacle warning boundary. The spatial position of the control points is iteratively adjusted through a quasi-Newton optimizer until the objective function converges, generating a smooth obstacle avoidance waypoint sequence.
[0124] Specifically, the system acquires an initial guiding path and discretizes it into an initial control point sequence. This sequence consists of several feature points along the path, each corresponding to a spatial coordinate. This sequence serves as the initial solution for a cubic uniform B-spline curve. The cubic uniform B-spline curve enables a smooth transition along the path, and its expression is:
[0125]
[0126] In the formula, For points on the B-spline curve, Let i be the i-th control point in the initial control point sequence. Let u be the cubic B-spline basis function. The system constructs an objective function, which is a weighted combination of minimizing the curve arc length, minimizing the curvature change, and maximizing the distance to the obstacle warning boundary. This objective function is used to optimize the smoothness, simplicity, and safety of the B-spline curve. The expression for the objective function is:
[0127]
[0128] In the formula, J is the objective function value. Here, L represents the weighting coefficients, and L is the arc length of the curve. For the curve in The curvature of a point Let be the minimum signed distance function value from the curve to the obstacle warning boundary. The system employs a quasi-Newton optimizer to iteratively adjust the spatial positions of the initial control point sequence. After each iteration, the objective function value is calculated until the objective function converges, yielding the optimized control point sequence. Based on the optimized control point sequence, the system generates a cubic uniform B-spline curve, discretizes the curve into several waypoints, and generates a smooth obstacle avoidance waypoint sequence. The path corresponding to this sequence is smooth and far from obstacles, satisfying the flight stability requirements of the UAV.
[0129] S54: Convert the acquired compensated attitude quaternion into Euler angles of the current attitude, solve the current target waypoint and the current position of the UAV in the smooth obstacle avoidance waypoint sequence into target attitude commands, use the preset second-order reference model as the desired dynamic system, design a model reference adaptive controller to compensate and correct the controller output by estimating the equivalent torque of electromagnetic interference online, and generate motor control commands to drive the UAV to fly along the smooth obstacle avoidance waypoint sequence.
[0130] Specifically, the system obtains the compensated attitude quaternion, converts it into Euler angles for the current attitude, and uses Euler angles to intuitively represent the attitude state of the UAV. The conversion formula is as follows:
[0131]
[0132] In the formula, For roll angle, The pitch angle, Yaw angle To compensate for the four components of the attitude quaternion, the system acquires the smooth obstacle avoidance waypoint sequence generated by S53, extracts the current target waypoint from the sequence, and, combined with the UAV's current position, calculates the target attitude command. This target attitude command guides the UAV towards the current target waypoint. The system sets a second-order reference model as the desired dynamic system, which describes the UAV's ideal attitude and velocity dynamic response. The system designs a model reference adaptive controller, comparing the UAV's actual attitude with the desired attitude of the second-order reference model to obtain the attitude error. By estimating the equivalent torque of electromagnetic interference online, the controller output is compensated and corrected to counteract the impact of electromagnetic interference on the UAV's attitude. The core formula for compensation and correction is:
[0133]
[0134] In the formula, To output torque to the controller, For control coefficients, For attitude error, The system estimates the equivalent torque of electromagnetic interference online. It then converts the controller's output torque into speed commands to drive the four onboard motors of the UAV, generating motor control commands to propel the UAV smoothly along a sequence of obstacle avoidance waypoints to complete rooftop maintenance tasks.
[0135] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0136] Based on the same inventive concept, this application also provides an adaptive control system for maintenance drones considering complex electromagnetic environments on rooftops, for implementing the aforementioned adaptive control method for maintenance drones considering complex electromagnetic environments on rooftops. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the adaptive control system for maintenance drones considering complex electromagnetic environments on rooftops provided below can be found in the limitations of the adaptive control method for maintenance drones considering complex electromagnetic environments on rooftops described above, and will not be repeated here.
[0137] Preferably, such as Figure 2 As shown, this invention provides an adaptive control system 600 for maintenance drones that takes into account the complex electromagnetic environment of rooftops. This system is configured with the following modules:
[0138] The magnetic field gradient compensation module 610 is used to acquire spatial magnetic field gradient distribution data in real time through an airborne magnetoresistive sensor array, perform recursive least squares adaptive compensation on the spatial magnetic field gradient distribution data and the acquired IMU raw angular velocity data, suppress the dynamic interference of electromagnetic coupling noise generated by the roof inverter and transformer on the gyroscope measurement accuracy, and generate a corrected angular velocity after magnetic field gradient compensation.
[0139] The disturbance rejection state calculation module 620 is used to decouple the attitude calculation deviation introduced by electromagnetic interference through an extended Kalman filter based on the corrected angular velocity and the acquired IMU acceleration, and to fuse GNSS positioning data to correct the position drift caused by GNSS signal interruption or attenuation, thereby generating the flight state parameters of the UAV in the electromagnetic disturbance environment.
[0140] The multi-source deep fusion module 630 is used to extract features from the acquired binocular visual image and millimeter-wave radar point cloud respectively, construct a multi-source confidence weighting factor based on the extracted visual disparity confidence and radar echo signal-to-noise ratio, and perform pixel-level deep fusion of the binocular visual image and millimeter-wave radar point cloud according to the multi-source confidence weighting factor to generate a fused depth map.
[0141] The obstacle warning modeling module 640 is used to backproject the fused depth map into a local 3D point cloud and cluster to identify obstacles. Based on the acquired current speed and current load mass, it constructs an inertial adaptive braking distance model, dynamically calculates the obstacle avoidance warning distance for each obstacle, and generates an obstacle spatial distribution map with warning distance markers.
[0142] The obstacle avoidance path control module 650 is used to plan a smooth obstacle avoidance path in free space using B-spline curves, with the obstacle spatial distribution map marked with warning distance and the current position of the UAV as constraints. The module also inputs the acquired compensation attitude quaternion into the model reference adaptive controller to cancel electromagnetic residual torque disturbances in real time, and generates motor control commands to drive the UAV to fly along the smooth obstacle avoidance path.
[0143] In one embodiment, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described adaptive control method for maintenance drones that takes into account the complex electromagnetic environment of rooftops.
[0144] In one embodiment, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops.
[0145] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0146] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0147] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An adaptive control method for maintenance drones considering the complex electromagnetic environment of rooftops, characterized in that, Includes the following steps: S1: The spatial magnetic field gradient distribution data is acquired in real time through an airborne magnetoresistive sensor array. The spatial magnetic field gradient distribution data and the acquired IMU raw angular velocity data are subjected to recursive least squares adaptive compensation to suppress the dynamic interference of electromagnetic coupling noise generated by the roof inverter and transformer on the gyroscope measurement accuracy and generate a corrected angular velocity after magnetic field gradient compensation. S2: Based on the corrected angular velocity and the acquired IMU acceleration, the attitude calculation deviation introduced by electromagnetic interference is decoupled by an extended Kalman filter, and the position drift caused by GNSS signal interruption or attenuation is corrected by fusing GNSS positioning data, thereby generating the flight state parameters of the UAV in the electromagnetic disturbance environment. S3: Perform feature extraction on the acquired binocular visual image and millimeter-wave radar point cloud respectively. Construct a multi-source confidence weighting factor based on the extracted visual disparity confidence and radar echo signal-to-noise ratio. Perform pixel-level depth fusion of the binocular visual image and the millimeter-wave radar point cloud according to the multi-source confidence weighting factor to generate a fused depth map. S4: Backproject the fused depth map into a local 3D point cloud and cluster to identify obstacles. Based on the acquired current speed and current load mass, construct an inertial adaptive braking distance model, dynamically calculate the obstacle avoidance warning distance for each obstacle, and generate an obstacle spatial distribution map with warning distance markers. S5: Using the obstacle spatial distribution map with warning distance markers and the current position of the UAV as constraints, a smooth obstacle avoidance path is planned in free space using B-spline curves. The acquired compensation attitude quaternion is then input into the model reference adaptive controller to counteract electromagnetic residual torque disturbances in real time, generating motor control commands to drive the UAV to fly along the smooth obstacle avoidance path.
2. The method according to claim 1, characterized in that, S1 includes: S11: The spatial magnetic field gradient distribution data is processed by differential operation through the spatial layout spacing of the four pre-calibrated magnetoresistive sensors to extract the gradient change of the spatial magnetic field in each axis, and a magnetic field gradient tensor matrix containing nine independent components is constructed based on the gradient change to generate a magnetic field gradient tensor that reflects the non-uniform distribution characteristics of the magnetic field around the roof inverter and transformer. S12: Establish a gyroscope measurement error model that includes a magnetic field gradient coupling term. Input the magnetic field gradient tensor matrix and the acquired IMU raw angular velocity data into the gyroscope measurement error model. Use a recursive least squares algorithm with a preset forgetting factor to recursively identify and iteratively correct the gyroscope zero bias in real time, and generate a dynamically updated gyroscope zero bias estimate. S13: The dynamically updated gyroscope zero bias estimate is stripped and removed from the acquired IMU raw angular velocity data point by point in time. Simultaneously, the superposition interference component of the product term of the magnetic field gradient tensor and the preset coupling coefficient on the gyroscope output is deducted to generate the corrected angular velocity after magnetic field gradient compensation.
3. The method according to claim 1, characterized in that, S2 includes: S21: The corrected angular velocity is processed by integrating the quaternion kinematic differential equation, and combined with the obtained IMU acceleration to perform strapdown inertial navigation mechanical arrangement calculation, predict the initial values of the attitude, velocity and position of the UAV in the gravity reference frame, and generate navigation state prediction values based on inertial recursion. S22: The position component in the navigation state prediction value based on inertial recursion and the GNSS positioning data are processed by residual calculation in the measurement update stage of the extended Kalman filter. The predicted state is weighted and corrected by the Kalman gain matrix to suppress the position jump error of the GNSS signal caused by multipath reflection of the roof metal support, and generate the position estimate and velocity estimate after fusion GNSS correction. S23: The position estimate, velocity estimate, corrected angular velocity, and IMU acceleration are fused through closed-loop feedback. The uncertainty of the attitude calculation is evaluated in real time through the state covariance matrix of the extended Kalman filter. The attitude quaternion compensated for electromagnetic interference is output synchronously to generate flight state parameters containing the current position, current velocity, and compensated attitude quaternion.
4. The method according to claim 1, characterized in that, S3 includes: S31: Perform semi-global stereo matching processing on the left and right views of the acquired binocular vision images. Calculate the matching cost pixel by pixel and aggregate the cost along multiple paths. Select the disparity value that minimizes the aggregation cost within the disparity search range to generate a dense disparity map. At the same time, calculate the disparity confidence of each pixel based on the ratio of the peak to the second peak of the matching cost curve to generate a visual depth map and its corresponding visual disparity confidence distribution map. S32: The acquired millimeter-wave radar point cloud is projected onto the pixel coordinate system of the binocular vision image through the extrinsic parameter matrix. Each projection point is dynamically weighted according to its echo signal-to-noise ratio and radial distance change rate to generate a radar sparse depth map aligned with the image pixel position. At the same time, a radar confidence distribution map characterizing the reliability of each radar point is generated. S33: Extract the confidence scores of the same pixel position in the visual disparity confidence distribution map and the radar confidence distribution map, and use the extracted visual disparity confidence scores and radar confidence scores as weighting factors to perform convex combination fusion processing on the visual depth map and the radar sparse depth map. For pixel positions with only a single source of depth information, directly retain the depth value to generate a fused depth map.
5. The method according to claim 1, characterized in that, S4 includes: S41: The depth value carried by each pixel in the fused depth map is mapped to a three-dimensional spatial point in the UAV body coordinate system through the inverse transformation of camera projection, and the three-dimensional spatial point is divided into spatial grids and downsampled according to the preset voxel filter size to generate a noise-reduced local three-dimensional point cloud. S42: Perform Euclidean distance clustering on the spatial points in the local 3D point cloud using a preset clustering radius, group points whose distance to each other is less than the clustering radius into the same candidate obstacle cluster, and extract the center coordinates and circumscribed sphere radius of the 3D minimum bounding box for each candidate obstacle cluster. Combine the position difference value of the same obstacle center between adjacent frames with the obtained current velocity to calculate the motion speed of the obstacle relative to the UAV, and generate an obstacle set containing the geometric center, circumscribed radius and relative motion speed of each obstacle. S43: Calculate the translational kinetic energy of the UAV based on the acquired current payload mass and current speed, calculate the rotational kinetic energy by combining the acquired current moment of inertia and angular velocity, determine the translational braking distance and rotational braking distance based on the maximum braking force and maximum control torque, respectively, sum the distance moved within the response time for each obstacle in the obstacle set according to its relative motion speed and the circumscribed radius, calculate the obstacle avoidance warning distance corresponding to each obstacle, and generate an obstacle spatial distribution map with warning distance markings.
6. The method according to claim 5, characterized in that, The formula for calculating the obstacle avoidance warning distance is: in, Let j be the obstacle avoidance warning distance for the j-th obstacle. Let m be the radius of the circumscribed sphere of the j-th obstacle, m be the current payload mass, and v be the current speed of the UAV. Where J is the maximum braking force, and J is the current total moment of inertia matrix. For the angular velocity of the drone, To achieve maximum control torque, Let be the radial velocity of the j-th obstacle relative to the drone. The system response time includes sensing latency, communication latency, and actuator response latency, plus the translational kinetic energy term. and rotational kinetic energy term These respectively characterize the kinetic energy stored in the translational and rotational states of the UAV. and These represent the maximum braking capabilities of the braking system and the attitude control system, respectively, and their ratio reflects the theoretical distance required from the current energy state to complete braking.
7. The method according to any one of claims 1-6, characterized in that, S5 includes: S51: Starting from the current position of the UAV and ending at the preset target waypoint, each obstacle in the obstacle spatial distribution map with warning distance markings is expanded into a circular restricted area according to its obstacle avoidance distance, and the expanded circular restricted area is processed by rasterized distance field calculation to generate a signed distance function field indicating the distance from each grid position to the nearest obstacle warning boundary. S52: In the free space region of the symbolic distance function field, the wavefront is propagated from the starting point to the ending point using the fast travel method. The local passage cost is calculated based on the symbolic distance function value of each grid position, and the lowest cost propagation path is extracted along the gradient descent direction to generate the initial guiding path connecting the starting point and the ending point. S53: Discretize the initial guidance path into an initial control point sequence and use it as the initial solution of a cubic uniform B-spline curve. Use the weighted combination of minimizing the curve arc length, minimizing the curvature change, and maximizing the distance to the obstacle warning boundary as the objective function. Iteratively adjust the spatial position of the control points through a quasi-Newton optimizer until the objective function converges to generate a smooth obstacle avoidance waypoint sequence. S54: Convert the acquired compensated attitude quaternion into the current attitude Euler angles, calculate the current target waypoint and the current position of the UAV in the smooth obstacle avoidance waypoint sequence into target attitude commands, use a preset second-order reference model as the desired dynamic system, design a model reference adaptive controller to compensate and correct the controller output by estimating the equivalent torque of electromagnetic interference online, and generate motor control commands to drive the UAV to fly along the smooth obstacle avoidance waypoint sequence.
8. An adaptive control system for maintenance drones considering the complex electromagnetic environment of rooftops, characterized in that, The system includes: The magnetic field gradient compensation module is used to acquire spatial magnetic field gradient distribution data in real time through an airborne magnetoresistive sensor array, perform recursive least squares adaptive compensation on the spatial magnetic field gradient distribution data and the acquired IMU raw angular velocity data, suppress the dynamic interference of electromagnetic coupling noise generated by the roof inverter and transformer on the gyroscope measurement accuracy, and generate a corrected angular velocity after magnetic field gradient compensation. The anti-disturbance state calculation module is used to decouple the attitude calculation deviation introduced by electromagnetic interference through an extended Kalman filter based on the corrected angular velocity and the acquired IMU acceleration, fuse GNSS positioning data to correct the position drift caused by GNSS signal interruption or attenuation, and generate the flight state parameters of the UAV in the electromagnetic disturbance environment. The multi-source deep fusion module is used to extract features from the acquired binocular visual image and millimeter-wave radar point cloud respectively, construct a multi-source confidence weighting factor based on the extracted visual disparity confidence and radar echo signal-to-noise ratio, and perform pixel-level deep fusion of the binocular visual image and the millimeter-wave radar point cloud according to the multi-source confidence weighting factor to generate a fused depth map. The obstacle warning modeling module is used to backproject the fused depth map into a local three-dimensional point cloud and cluster and identify obstacles. Based on the acquired current speed and current load mass, it constructs an inertial adaptive braking distance model, dynamically calculates the obstacle avoidance warning distance for each obstacle, and generates an obstacle spatial distribution map with warning distance markers. The obstacle avoidance path control module is used to plan a smooth obstacle avoidance path in free space using B-spline curves, based on the obstacle spatial distribution map with warning distance markers and the current position of the UAV as constraints. The module also inputs the acquired compensation attitude quaternion into the model reference adaptive controller to counteract electromagnetic residual torque disturbances in real time, and generates motor control commands to drive the UAV to fly along the smooth obstacle avoidance path.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.