A real-time unmanned aerial vehicle re-planning method for image inspection
Patent Information
- Application Number
- CN202511599039.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2045-11-04
AI Technical Summary
此类方法虽然能够规划出宏观路径,但在无人机执行近距离、精细化观测任务时,未能充分考虑飞行器自身旋翼系统与周围环境产生的复杂气流交互作用
[0007]与现有技术相比,本发明的有益效果是:通过并行处理两类异构数据源:其一,通过对机载相机采集的实时图像进行内容分析,生成一个表征任务空间中各区域图像内容价值的三维视觉吸引力场;其二,通过实时获取表征无人机旋翼与环境气流交互的动力学参数,生成一个表征物理交互风险的三维气动排斥力场。构建将上述两个异构数据场进行深度融合的动态复合观测势场。在统一的三维空间坐标系中,以视觉吸引力场为基础,利用气动排斥力场对其进行体素级的动态风险加权。能够根据飞行情境自适应调整的非线性融合机制。由此生成的复合势场,是融合了图像内容价值与物理交互风险的增强型三维场景数据表达,使无人机能够在同一个数据结构下,权衡任务收益与飞行安全。
Smart Images

Figure CN121325940B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image analysis and processing technology, specifically to a UAV replanning method for real-time inspection image analysis. Background Technology
[0002] As UAV technology evolves towards higher levels of autonomy and intelligence, its application in complex environments such as power line inspection, bridge detection, and disaster search and rescue is becoming increasingly sophisticated. Currently, the core of improving UAV autonomous systems lies in enhancing their real-time perception, understanding, and decision-making capabilities regarding the three-dimensional environment. How to enable UAVs not only to "see" the environment but also to "understand" the mission value and physical risks inherent in that environment, and thereby generate safe and efficient flight control commands, has become a key technological direction driving the transformation of UAVs from automated tools to autonomous intelligent agents.
[0003] Despite the progress made in the field of visual navigation inspection for UAVs, the following core challenges remain when dealing with complex and dynamic near-field inspection tasks: 1. Current mainstream methods heavily rely on visual sensors for environmental perception and obstacle avoidance. However, simple image analysis carries the risk of perception failure for physical obstacles with inconspicuous visual features (including transparent media and thin cables) or under adverse imaging conditions (including backlighting and haze). This reliance on a single information source results in insufficient safety redundancy when facing visual "blind spots," making it difficult to meet the requirements of high-reliability operation.
[0004] 2. Traditional trajectory planning methods, such as the technical solution in Publication No. CN117876624B, focus on optimizing geometric paths based on static or quasi-static global map data, such as remote sensing imagery. While these methods can plan macroscopic paths, they fail to fully consider the complex airflow interactions between the aircraft's rotor system and the surrounding environment when UAVs perform close-range, detailed observation tasks. This separation of visual perception from flight physics results in a lack of quantitative assessment of near-field physical interaction risks in planning decisions, and the system's robustness needs further improvement when operating in confined or cluttered environments. The information disclosed in the background section above is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a UAV replanning method for real-time inspection image analysis to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A UAV replanning method based on real-time inspection image analysis, comprising the following steps: S1: Acquire image data collected by the onboard camera of the UAV during real-time inspection, and perform content analysis on the image data to generate three-dimensional visual attraction field data; wherein, the three-dimensional visual attraction field data is used to characterize the image content value of different areas in the inspection task space; S2: Obtain dynamic parameters characterizing the interaction between the UAV rotor system and the surrounding airflow, and generate three-dimensional aerodynamic repulsion field data based on the dynamic parameters, wherein the three-dimensional aerodynamic repulsion field data is used to characterize the physical interaction risk in the space corresponding to the image data; S3: In a unified three-dimensional spatial coordinate system, the three-dimensional visual attraction field data is used as the basic scene expression, and the three-dimensional aerodynamic repulsion field data is used to perform pixel-level or voxel-level risk weighting on the basic scene expression to construct a dynamic composite observation potential field; wherein, the dynamic composite observation potential field is an enhanced three-dimensional scene data expression that integrates image content value and physical interaction risk. S4: Perform gradient analysis on the dynamic composite observation potential field to identify the potential field gradient vector and the optimal observation position in the data field; S5: Based on the potential field gradient vector and the optimal observation position, generate trajectory control commands to drive the UAV flight.
[0007] Compared with existing technologies, the beneficial effects of this invention are as follows: By processing two types of heterogeneous data sources in parallel: First, by performing content analysis on real-time images acquired by airborne cameras, a three-dimensional visual attraction field is generated, representing the image content value of each region in the mission space; second, by acquiring dynamic parameters representing the interaction between the UAV rotor and the environmental airflow in real time, a three-dimensional aerodynamic repulsion field is generated, representing the physical interaction risk. A dynamic composite observation potential field is constructed that deeply fuses the above two heterogeneous data fields. In a unified three-dimensional spatial coordinate system, based on the visual attraction field, the aerodynamic repulsion field is used to dynamically weight the risk at the voxel level. A nonlinear fusion mechanism that can adaptively adjust according to the flight situation is employed. The resulting composite potential field is an enhanced three-dimensional scene data representation that integrates image content value and physical interaction risk, enabling the UAV to weigh mission benefits and flight safety within the same data structure.
[0008] By performing gradient analysis on the potential field, the system can instantly identify the potential field gradient vector driving the UAV's motion and the optimal observation position, which represents the optimal solution for the mission. Based on this, a dual-modal control strategy based on a spatial distance threshold is designed, and a virtual proportional-derivative (PD) controller derived from the potential field morphology is constructed for the near-range microscopic attitude stabilization mode. Specifically, a "velocity projection damping factor" is introduced as a differential term to actively suppress overshoot and oscillations of the UAV when approaching the target, deeply coupling the complex control theory with the potential field topology. Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the overall application process of the method of the present invention; Figure 2 This is a schematic diagram illustrating the execution logic of steps S1 to S3 of the present invention; Figure 3 This is a schematic diagram illustrating the execution logic of steps S4 to S5 of the present invention. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0011] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various elements, but unless otherwise stated, these elements are not limited by these terms. These terms are used only to distinguish one element from another.
[0012] Example 1: Please see Figures 1 to 3 The present invention provides a technical solution: A UAV replanning method based on real-time inspection image analysis, comprising the following steps: S1: Acquire image data collected by the onboard camera of the UAV during real-time inspection, and perform content analysis on the image data to generate three-dimensional visual attraction field data; wherein, the three-dimensional visual attraction field data is used to characterize the image content value of different areas in the inspection task space; S2: Obtain dynamic parameters characterizing the interaction between the UAV rotor system and the surrounding airflow, and generate three-dimensional aerodynamic repulsion force field data based on the dynamic parameters. The three-dimensional aerodynamic repulsion force field data is used to characterize the physical interaction risk in the space corresponding to the image data. S3: In a unified three-dimensional spatial coordinate system, three-dimensional visual attraction field data is used as the basic scene expression, and three-dimensional aerodynamic repulsion field data is used to perform pixel-level or voxel-level risk weighting on the basic scene expression to construct a dynamic composite observation potential field; among them, the dynamic composite observation potential field is an enhanced three-dimensional scene data expression that integrates the value of image content and the risk of physical interaction. S4: Perform gradient analysis on the dynamic composite observation potential field to identify the potential field gradient vector and the optimal observation position in the data field; S5: Based on the potential field gradient vector and the optimal observation position, generate trajectory control commands to drive the UAV flight.
[0013] for Figure 1 It should be noted that dual-domain perception and potential field construction cover S1 and S2: acquiring visual and aerodynamic data in parallel and constructing attractive and repulsive fields respectively; Multi-mode potential field fusion and weighting encompasses S3: voxel-level risk weighting of two heterogeneous fields to construct a composite potential field; Composite potential field gradient analysis covers S4: analyzing the fused data field to identify optimal locations and driving forces; Dual-modal control command generation covers S5: Based on the analysis results, it generates control commands that provide macroscopic guidance or microscopic stability.
[0014] To further explain, the steps for performing content analysis on image data are configured as follows: The visual saliency score of pixel regions in an image is calculated using a visual saliency detection algorithm. The information entropy evaluation algorithm is used to calculate the observation information entropy score, which represents the amount of new information that can be obtained from the observed pixel region. The information value distribution is obtained by weighting and combining the visual saliency score and the observation information entropy score. By using the 3D point cloud provided by the synchronous positioning and mapping system, the information value distribution is projected back into the 3D space to form 3D visual attraction field data.
[0015] To further explain, the dynamic parameters include motor load current timing data and body attitude angular velocity data; the step of generating three-dimensional aerodynamic repulsive force field data is configured as follows: The aerodynamic disturbance residuals between the actual values and the predicted baseline values of the dynamic parameters are calculated using a pre-trained time-series prediction model. The aerodynamic disturbance residuals are mapped to the repulsive force intensity of three-dimensional spatial points to form three-dimensional aerodynamic repulsive force field data.
[0016] To further explain, based on the time series of aerodynamic disturbance residuals, the scenario risk change rate is calculated, which is used to characterize the dynamic suddenness of physical interaction risk.
[0017] To further explain, the risk-weighted steps are configured as follows: Set up a context-aware logic gate, which classifies the current flight situation into one of several preset situations based on the value of the situation risk change rate; Based on the pre-defined scenarios, select and activate the corresponding nonlinear weighting units; By using an activated nonlinear weighter, three-dimensional visual attraction field data and three-dimensional aerodynamic repulsion field data are fused to construct a dynamic composite observation potential field.
[0018] To further clarify, the multiple preset scenarios include at least a "normal cruise" scenario, a "cautious approach" scenario, and an "emergency avoidance" scenario. In the "emergency avoidance" scenario, the corresponding nonlinear weighter is configured to: ignore the effect of the 3D visual attraction field data and amplify the effect of the 3D aerodynamic repulsion field data based on a risk penalty term proportional to the square of the UAV's flight speed. The following are specific implementation details: The core technical feature of this embodiment is that it generates a three-dimensional visual attraction field representing the value of mission information and a three-dimensional aerodynamic repulsion field representing the risk of physical interaction by processing visual image data and aircraft dynamics data in parallel. Furthermore, it designs a nonlinear, dynamically adaptive fusion mechanism based on flight context to weight the two heterogeneous data fields at the voxel level, constructing a dynamic composite observation potential field that accurately reflects the comprehensive decision-making priority in complex environments. The time derivative of the aerodynamic disturbance residual signal, i.e., the risk change rate, is used as a novel and crucial decision-making dimension. By introducing "context-aware logic gating," the system can distinguish between two distinct scenarios: "slowly approaching known static risks" and "encountering unknown sudden risks at high speeds." Based on this judgment, the system will activate different matching nonlinear fusion strategies, thereby maximizing the efficiency and opportunities of information acquisition while ensuring extreme safety. This improves the autonomous operation intelligence level of UAVs in unknown and complex environments. In the specific embodiments of this embodiment, the following key parameters are defined: Visual saliency score, whose parameter symbol is: This parameter quantifies the degree to which each pixel region of an image attracts human visual attention due to its color, texture, or high-level semantic features. It is obtained by inputting real-time RGB image data captured by an airborne camera into a deep learning saliency detection network model based on the U-Net architecture, pre-trained on the public dataset SALICON. The application goal of the U-Net-based deep learning saliency detection network model is to perform pixel-level predictions on any input inspection image without requiring specific target recognition, outputting a probability map, i.e., a saliency map, of the same size as the input image. Each pixel value in this probability map directly corresponds to the probability that the pixel in the original image can attract the "first glance" attention of a human observer; this probability value is the visual saliency score defined in this embodiment. The goal is to quickly and cost-effectively "focus" on potential anomalies or foreign object occlusions from complex visual backgrounds. This embodiment preferably uses the U-Net architecture as the basic framework for the model, with the specific hierarchical structure described below: The encoder's corresponding downsampling path consists of five consecutive convolutional blocks. Each convolutional block contains two 3×3 convolutional layers with ReLU activation, followed by a 2×2 max-pooling layer to reduce the resolution of the feature map. Starting from the first convolutional block, the number of feature channels is set sequentially to 64, 128, 256, 512, and 1024.
[0019] The decoder corresponds to an upsampling path, which also consists of five consecutive blocks. Each block first doubles the resolution of the feature map through a 2×2 deconvolutional layer, and then concatenates it with the feature map of the corresponding resolution in the encoder path to represent a skip connection operation. The concatenated feature map is then passed through two 3×3 convolutional layers with ReLU activation function. The number of feature channels is reduced from 1024 to 512, 256, 128, and 64 respectively.
[0020] The output layer is the 64-channel feature map output from the final layer of the decoder. Its dimension is reduced to 1 through a 1×1 convolutional layer, and finally, a sigmoid activation function is used to strictly map the output values to the [0,1] interval, forming the final saliency map. The computational model for this normalization process is as follows: statistically analyze the brightness values of all pixels in the grayscale image output by the saliency detection network and calculate its first percentile. and the 99th percentile These two values were determined through offline statistical analysis of saliency maps from a large number of actual inspection scene images, effectively filtering out the influence of noise points and saturated regions. Then, the brightness value of any pixel in the image was... L First, perform a truncation operation: if the brightness value is less than... Then set its value to If the brightness value is greater than Then set its value to Finally, a linear mapping is performed on the truncated value: subtract the truncated value from the linear mapping. Divide by and The difference is as follows. This method ensures that the vast majority of effective signals can be completely mapped to the [0,1] interval, improving the robustness of normalization. The training dataset consists of the following two parts: the base dataset: adopts the internationally publicly available large-scale saliency detection dataset SALICON (Salient-Objects-in-Context). This dataset contains 10,000 training images and 5,000 validation images, and its ground truth is a gaze density map generated by recording a large amount of eye movement data from human observers, which meets the application objectives of this embodiment.
[0021] Domain Augmentation Dataset: To improve performance on specific inspection tasks, this embodiment also constructs a domain augmentation dataset containing 5,000 images. This dataset was collected from publicly available images of typical inspection scenarios such as power transmission towers, bridge cables, and photovoltaic panels. Three senior industry engineers manually delineated abnormal or key regions in the images as ground truth values using a "cross-labeling and voting confirmation" method.
[0022] All images were uniformly scaled to 256×256 pixels and normalized before being input into the model. The total dataset (15,000 training images) was randomly divided into training, validation, and test sets in an 8:1:1 ratio. A binary cross-entropy loss function was used to measure the pixel-level difference between the model's predicted saliency map and the ground truth map. The Adam optimizer was used with an initial learning rate of 1e-4. The total number of training epochs was 50, and the batch size was 16. An early stopping mechanism was enabled during training; if the loss on the validation set did not improve after 5 consecutive epochs, training was terminated early to prevent overfitting. After training, the best-performing model weights were saved. In practical applications, the model was deployed on the onboard computing platform of a drone. Each frame captured by the onboard camera, after preprocessing, was fed into the U-Net model with its weights loaded for a forward propagation. The model's output is a two-dimensional array of the same size as the input image, containing single-precision floating-point numbers. The value of each element in this array is the visual saliency score, normalized to the [0,1] interval as defined in this embodiment. .
[0023] The entropy score of the observation information, whose parameter symbol is... This parameter quantifies the amount of new information that can be obtained from observing a spatial region from the current UAV perspective. A higher value indicates greater uncertainty or information loss in the existing environmental model for that region. The core basis for its acquisition method is the concept of information entropy proposed by Claude Shannon, the founder of information theory. Information entropy measures the degree of uncertainty of a random variable. Whether each grid cell in the 3D grid map constructed by the SLAM system is "truly occupied" is considered a random event. The closer a grid cell's occupancy probability is to 0.5, representing the greatest uncertainty, the higher its information entropy; conversely, the closer it is to 0 or 1, representing certainty as "empty" or "occupied," the lower its information entropy. Therefore, observing regions with high information entropy can bring the greatest information gain to the map model. This embodiment implements the above principle into a specific, step-by-step, language-based computational logic, with the following steps: Step 1: Obtain the grid occupancy probability. Step 2: Calculate the information content of occupancy events. Step 3: Calculate the information content of non-occupancy events. Step 4: Summate to obtain the total grid information entropy. Step 5: Perform normalization processing.
[0024] The input is the grid occupancy probability. This probability value comes directly from the 3D map maintained by the airborne SLAM system. After fusing each frame of image and IMU data, the SLAM system continuously updates the logarithmic occupancy probability of each grid cell in the map based on the Bayesian filtering principle. A standard logistic function is then used to convert this logarithmic value back to the grid occupancy probability in the [0,1] interval. Grid occupancy probability This represents the confidence level that the system determines, based on all observation data to date, that the grid is occupied by a physical entity. Indicates complete unknown. The observation information entropy score for any grid cell within the camera's current field of view. The calculation logic is detailed below: Obtain the grid occupancy probability. Query the current grid's occupancy probability from the SLAM map. .
[0025] Calculate the information content of the occupancy event. Obtain the grid occupancy probability obtained in the first step, calculate the logarithm of the value to base 2, and then multiply the calculation result by the grid occupancy probability itself to obtain an intermediate result, which is the information content component of the occupancy event.
[0026] Calculate the information content of the non-occupied event. Subtract the grid occupancy probability obtained in the first step from 1 to get the "non-occupied probability" of the grid. Then, calculate the base-2 logarithm of the "non-occupied probability" and multiply the result by the "non-occupied probability" itself to obtain another intermediate result, which is the information content component of the non-occupied event.
[0027] The total information entropy of the raster is obtained by summing the results. The two information components obtained above are then added together, and the sum is negative. This final result is the original information entropy value of the raster.
[0028] Normalization is performed. According to information theory, the calculated original information entropy value reaches its maximum value of 1 when the occupancy probability is 0.5, and its minimum value of 0 when the occupancy probability is 0 or 1. Therefore, the original information entropy value falls within the range [0,1], and can be directly used as the final observed information entropy score without additional scaling or translation operations. .
[0029] In this computational logic, the only constant is the base of the logarithmic operation. This embodiment uses base 2, making the unit of information entropy "bit". Choosing other bases will only produce a constant scaling on the entropy value calculated here, without affecting its relative size as a measure of uncertainty, and therefore will not affect the final technical effect of this embodiment.
[0030] In this embodiment, the SLAM map contains three grids: A, B, and C.
[0031] Grid A has never been observed; its grid occupancy probability is... The value is 0.5. Based on the above logic, its observation information entropy score is calculated as follows: It is 1.0.
[0032] Grid B has been observed multiple times, and the system is highly certain that it is idle. Its grid occupancy probability is... The value is 0.01. Based on the above logic, its observation information entropy score is calculated as follows: It is approximately equal to 0.08.
[0033] Grid C is observed multiple times, and the system is highly certain that it is occupied by an obstacle. Its grid occupancy probability is... The score is 0.99. Based on the above logic, its observation information entropy score is calculated as follows: It is also approximately equal to 0.08.
[0034] Therefore, the system will determine that the observed grid A can bring the greatest information gain, and its observation information entropy score is the highest.
[0035] The comprehensive information value, its parameter symbol is: This parameter is a comprehensive index representing the task value of each pixel's corresponding spatial point, obtained by fusing the two scores mentioned above on a two-dimensional image plane. Its calculation logic is as follows: a weighted sum of the visual saliency score and the observation information entropy score for the same pixel. The visual saliency weight is set. and information entropy weight This was determined through the following offline experimental calibration procedure: Construct an inspection scene calibration dataset containing at least 1000 images with a resolution of no less than 1920×1080 pixels, collected from different inspection tasks (including power tower inspection and bridge crack detection). For each image, three senior inspection engineers independently and manually annotated 1 to 3 target areas that should be given the highest priority, and generated an expert-annotated ground truth map in the form of a Gaussian heatmap.
[0036] An optimization objective function is defined, aiming to minimize the Wasserstein distance between the "Comprehensive Information Value Distribution Map" generated by undetermined weights and the "Expert-Annotated Truth Map." This distance effectively measures the difference between the two probability distributions. Particle Swarm Optimization (PSO) is used for parameter optimization. The particle swarm size is set to 50, the maximum number of iterations to 200, the inertia weight to 0.9, and the individual learning factor and social learning factor to 1.5. Each particle represents a set of... Candidate weight values. In each iteration, for each particle, the comprehensive information value distribution map of all images in the dataset is calculated using its represented weight, and the average Wasserstein distance between it and the ground truth map is calculated as the fitness value of that particle. According to the standard update rules of the particle swarm optimization algorithm, the velocity and position of each particle are updated until the maximum number of iterations or fitness value convergence is reached. Through the above calibration process, in this embodiment, for the balanced inspection task, a set of preferred weight coefficients is determined: visual saliency weight. The preferred value is 0.6, and the information entropy weight is... The preferred value is 0.4. In practical applications, the visual saliency weight... The reasonable range for the value is [0.5, 0.7], and the information entropy weight is... The reasonable range of values for is [0.3, 0.5], and the sum of the two is 1.
[0037] Aerodynamic disturbance residuals, whose parameter symbols are: This parameter is used to quantify the deviation between the actual dynamic state of the UAV and its predicted baseline under an ideal, undisturbed state. It is the direct source of sensing near-field physical interaction risks. Its determination method is as follows: an offline-trained Long Short-Term Memory (LSTM) network model is used. This model takes the UAV's flight control commands, including target attitude angle and throttle lift commands, as input, and outputs body attitude angular velocity data acquired from a six-axis IMU and motor load current timing data acquired from each rotor electronic speed controller (ESC). In actual flight, real-time flight control commands are input into the LSTM model to obtain the predicted baseline value. Then, the actual dynamic parameter values collected by the sensors in real-time are subtracted from the corresponding predicted baseline value to obtain a multi-dimensional temporal residual vector. The aerodynamic disturbance residual is the L2 norm of this residual vector, and the initial source of this calculation is the Euclidean distance calculation principle. Through the "clipping-linear mapping" combination operation, this norm value is normalized to the [0,1] interval. The "clipping-linear mapping" combination operation defines the upper threshold of the clipping. This value represents the maximum effective residual that the sensor may output or that is of interest. It is determined by applying the most severe disturbance to the drone in a simulated environment, specifically simulating strong gusts of wind or elastic collisions with obstacles, recording the peak residual value, and taking 1.5 times its statistical average as the clipping threshold. In this embodiment, the clipping threshold... The preferred value is 3.8. The calculation logic is as follows: for the input residual norm value, if it is greater than the clipping upper threshold... Then set its value to the clipping upper threshold. Then, divide the clipped value directly by the clipped threshold. The aerodynamic disturbance residuals are then obtained and normalized to the [0,1] interval.
[0038] The rate of change of situational risk, with parameter sign as follows: This parameter quantifies the severity of aerodynamic disturbance risk, specifically the time derivative of the aerodynamic disturbance residual. Its calculation logic is as follows: [The text abruptly shifts to a different topic] ...for the aerodynamic disturbance residual over a continuous time series... First-order difference calculation is performed, which involves subtracting the residual value from the previous time step from the current residual value and then dividing by the time interval between the two time steps to approximate the instantaneous rate of change. The residual data from the most recent few time steps are smoothed using a Kalman filter before the difference calculation. Finally, the absolute value of the rate of change is normalized to the [0,1] interval using a combination of clipping and linear mapping operations. In this embodiment, "several time steps" refers to within 50 milliseconds. The application process for a Kalman filter is defined as follows: The state vector of the Kalman filter is defined as a two-dimensional vector, where the first dimension is the estimated value of the aerodynamic disturbance residual itself, and the second dimension is the estimated value of its rate of change. The state transition model is set as a uniform model, assuming that the rate of change of the residual remains constant over extremely short time intervals. Two core parameters of the filter are defined: process noise covariance Q and measurement noise covariance R. Parameter Q represents the degree of confidence in the state transition model; a smaller value indicates greater confidence in the model's prediction. Parameter R represents the degree of confidence in the sensor measurements; a smaller value indicates greater confidence in the measurements. These two parameters are determined offline using the "autocorrelation minimization" method. The specific process is as follows: A large number of residual data sequences of UAVs under different flight states are collected. The data is filtered with different Q and R values, and the autocorrelation function of the filtered output sequence is calculated. The set of Q and R values that causes the autocorrelation of the output sequence to decay to zero the fastest is selected as the optimal parameters, representing the filter's maximum noise elimination. In this embodiment, the preferred values are: Q set to 0.01, and R set to 0.25.
[0039] At each time step, the current state is predicted based on the state transition model. Then, the Kalman gain is calculated by combining the new input residual measurement and parameter R, and finally, the estimated state vector is updated. The smoothed residual value is the first dimension of the updated state vector, which is then used for differencing to obtain the rate of change of situational risk.
[0040] In this embodiment, the complete calculation process of steps S1 to S3 is broken down as follows: 1.1) The initial inputs are: 1.11) RGB image data stream output in real time from the airborne camera; 1.12) Attitude and angular velocity data stream output in real time from the airborne IMU; 1.13) Load current data stream output in real time from each motor ESC; 1.14) Control command stream issued by the flight control system; 1.15) 3D grid map maintained by the SLAM system; 1.16) The UAV's own status information, including the current flight speed.
[0041] 1.2) The input RGB image data is fed into the visual saliency detection network and the information entropy evaluation module respectively to calculate the visual saliency score of each pixel. and observation information entropy score .
[0042] Based on the preset visual saliency weight and information entropy weight Visual salience score and observation information entropy score By performing weighted summation, the comprehensive information value of the two-dimensional image plane is generated. Distribution map.
[0043] Using the camera pose and 3D point cloud provided by the SLAM system, a back projection operation is performed to extract the comprehensive information value of each pixel in the 2D image. This data is then assigned to a corresponding grid or point in three-dimensional space, thereby constructing a three-dimensional visual attraction field. In this data field, the value of each spatial point represents the attraction intensity. .
[0044] The input flight control commands, IMU data, and motor current data are fed into the aerodynamic disturbance residual calculation module. By comparing the results with the prediction baseline of the pre-trained LSTM model, the normalized aerodynamic disturbance residual is calculated. .
[0045] The continuous aerodynamic disturbance residual Time-series data is fed into the scenario risk change rate calculation module, where normalized scenario risk change rate is calculated through filtering and first-order differencing. .
[0046] By mapping functions, the aerodynamic disturbance residuals are... The magnitude and direction characteristics are converted into the repulsive force intensity at each point in a three-dimensional space centered on the UAV, thus constructing a three-dimensional aerodynamic repulsive force field data. In this data field, the value at each spatial point is the repulsive force intensity. .
[0047] aerodynamic disturbance residual The magnitude and orientation features are converted into a mapping function of three-dimensional repulsive force intensity, which is achieved by a pre-trained small multilayer perceptron network (MLP).
[0048] The MLP network structure specifically consists of an input layer with 8 nodes, two hidden layers each with 16 nodes, and an output layer with 1 node. Each hidden layer uses ReLU as the activation function, and the output layer uses the Sigmoid activation function to ensure the output value is within the [0,1] range. The 8 nodes of the input layer receive: the normalized total aerodynamic disturbance residual, the normalized current residual of at least four independent motors (used to characterize direction), and the current flight speed and vertical speed of the UAV. In this embodiment, the number of independent motors depends on the number of axes of the UAV. The training dataset for the MLP is generated through a physical simulation environment. In this environment, a 3D scene containing obstacles of various shapes and sizes is constructed. By controlling a drone to approach these obstacles at different speeds and angles, 8-dimensional input vectors are recorded at different distances from the obstacles. The reciprocal of the distance between the drone and the nearest point on the obstacle surface is used as the ground truth label for that training sample, representing the repulsive force intensity. At least 50,000 training samples are generated in total.
[0049] The model was trained using the Adam optimizer with a learning rate of 0.001, a loss function of mean squared error (MSE), and a training epoch of 100.
[0050] 1.3) Calculate the rate of change of situational risk Input is sent to the "Context-Aware Logic Gating" unit. This unit has two thresholds: a low threshold and a low threshold. and high threshold .
[0051] If the change rate of situational risk Less than the low threshold If so, the system determines that the current situation is "normal cruise".
[0052] If the change rate of situational risk Between and If the value is between the endpoint values, the system determines that the current situation is a "cautious approach" scenario.
[0053] If the change rate of situational risk Greater than If so, the system determines that the current situation is an "emergency avoidance" scenario.
[0054] Low threshold of logic gate unit and high threshold This was determined through the following flight safety boundary experiments: establishing the situational risk change rate. The quantitative relationship between the numerical value and the actual safety status of the drone was established. The experiment was conducted in an indoor venue equipped with a high-precision motion capture system. Low threshold. The aim is to distinguish between normal flight maneuvers and non-commanded disturbances caused by the external environment that require attention. The UAV is operated to perform a series of standard maneuvers (including constant speed in a straight line, high-G maneuver turns, acceleration and deceleration), and the rate of change of situational risk during this process is recorded. The maximum background noise value was recorded. Then, the drone was slowly passed over the obstacle at a safe distance of more than 3 meters, and the rate of change in situational risk due to airflow ground effect or wall effect was recorded during this process. Typical values. Low threshold. The threshold value is set slightly higher than the aforementioned background noise value and is capable of stably detecting the far-field perturbations described later. In this embodiment, the low threshold... The preferred value is 0.2. Its reasonable value range is [0.15, 0.25].
[0055] High threshold The aim is to define a state in which a drone is about to enter an uncontrollable or high-collision-risk condition. The drone is operated to approach an obstacle head-on at different speeds from 0.5 m / s to 3 m / s, and the rate of change of situational risk is recorded 0.2 seconds before the underlying collision protection of the flight control system is triggered. The instantaneous value. Through statistical analysis of a large amount of such "critical collision" experimental data, the 10th percentile of its numerical distribution was selected as the high threshold. The goal is to ensure that the system can enter "emergency avoidance" mode in advance in the vast majority of dangerous situations. In this embodiment, a high threshold... The preferred value is 0.7. Its reasonable value range is [0.65, 0.80]. This embodiment also includes triggering the flight control system's underlying collision protection with "emergency takeover by a safety officer before an impending collision".
[0056] Based on the scenario determined by the above logic, a corresponding nonlinear fusion strategy is selected to determine the attraction intensity of each voxel in three-dimensional space. and repulsive strength We then perform weighting to obtain the combined value after fusion.
[0057] Perform a potential function integration operation on the comprehensive value field in the entire three-dimensional space to generate the final scalar potential field.
[0058] 1.4) The final output is a dynamic composite observation potential field. This is a three-dimensional scalar data field, where the value of each voxel represents the comprehensive "potential energy" of the UAV flying to that point. This data field will serve as the direct basis for navigation signal analysis in subsequent steps S4 and S5.
[0059] Furthermore, this embodiment employs a logic-gated, dynamically adaptive nonlinear weighted fusion method. This method was chosen because conventional linear weighted averaging methods cannot handle the challenges of complex dynamic environments. Fixed weights or weights that are only linearly related to speed cannot distinguish the nature of the risk. For example, at the same speed, the decisions to be made for "actively and slowly approaching a known power tower" and "being blown by a sudden gust of wind into an unknown forest" are drastically different. The former has manageable risk, allowing close approach to obtain high-value information; the latter carries significantly increased risk, requiring immediate execution of the highest-priority avoidance. The fusion mechanism designed in this embodiment introduces a situational risk change rate. As the basis for high-level logical judgment, it has achieved a leap from "reactive" integration to "cognitive" integration, thereby improving the level of intelligent decision-making.
[0060] attraction strength Characterizes the driving force for task rewards, with a numerical range of [0,1]. Repulsive force strength. Drag characterizes static physical risk, with a numerical range of [0,1]. Flight speed characterizes the system's kinetic energy state and affects the severity of the collision consequences.
[0061] Contextual risk change rate Characterizes the dynamic and sudden nature of risk, with a numerical range of [0,1].
[0062] In this embodiment, when the rate of change of situational risk is low, the amplification effect of flight speed on risk is weak, and the system should focus more on pursuing the benefits represented by the attraction intensity. Conversely, when the rate of change of situational risk is extremely high, it indicates that the system may be on the verge of going out of control or about to collide. At this time, the weight of risk should be amplified nonlinearly and overwhelmingly, and this amplification effect should be related to the square of the flight speed, while the weight of attraction intensity should be suppressed.
[0063] This embodiment designs a fusion system consisting of a "context-aware logic gate" and three parallel "nonlinear weighters".
[0064] Logic gating unit: based on the rate of change of situational risk With threshold and The comparison selects one of the following three weighters to activate. The specific calculation logic of the three selected nonlinear weighters is as follows: when Select and activate the regular cruise weighter; its calculation logic is as follows: set the basic risk coefficient. In this embodiment, the basic risk coefficient The value was determined to be 0.5 through experiments. Then, the repulsive force strength was used. Multiply by this base risk factor. Finally, use the attraction strength. Subtracting the result from the previous step, we obtain the comprehensive value of the spatial point.
[0065] when Select and activate the cautious approach weighter; its calculation logic is divided into two parts: return calculation and risk calculation.
[0066] Return calculation section: Define the return decay coefficient Its physical meaning is the degree to which the attractiveness of the task reward should be suppressed as the distance to the obstacle decreases; in this embodiment, it is set to 1.5. Then, the attenuation factor is calculated by subtracting the repulsive force intensity from 1. With the coefficient of return decay The product of these factors is used, ensuring the result is not less than 0. Finally, the attraction strength is used. Multiplying by this attenuation factor yields the risk-suppressed task reward.
[0067] Risk calculation section: Defining the speed sensitivity coefficient This is used to adjust the linear relationship between risk and speed, and is set to 2.0 in this embodiment. The risk amplification factor is calculated by adding 1 to the flight speed v (normalized to the [0,1] interval) and the speed sensitivity coefficient. The product of the repulsive forces. Finally, the repulsive force strength. Multiplying by this risk amplification factor yields the risk penalty amplified by velocity. Subtracting the risk calculation result from the return calculation result gives the overall value of this spatial point.
[0068] when Select and activate the emergency avoidance weighter; its calculation logic is as follows: set the emergency risk coefficient. The penalty effect used to amplify risk is set to 5.0 in this embodiment. Secondly, a positive bias value of 0.01 is set as an example. This is used to avoid generating gradients with zero values in risk-free regions. Then, the square of the flight velocity is calculated. The repulsive force strength is used. Multiply by the square of the speed, then multiply by the emergency risk factor. This yields the final risk penalty term. Finally, a positive bias value is used. Subtracting the risk penalty term yields the comprehensive value of the spatial point. In this calculation model, the attraction intensity... It was ignored.
[0069] When the repulsive force strength The rate of change of situational risk remains at zero. The value is also zero, and the system remains stable in "normal cruise" mode, its behavior degenerating into purely attraction intensity. Driven target tracking system.
[0070] When a drone hurtles towards an obstacle at high speed, the repulsive force intensity... Approaching 1, v is a high value, and the rate of change of situational risk Exceeding the high threshold The system activates the "emergency avoidance" mode. At this time, the fusion formula outputs a large negative value, forming a high "potential energy peak" in the potential field, driving the drone to avoid obstacles with maximum capability.
[0071] Further explanation: The generated track control commands include: Target heading vector used for macroscopic path guidance; and Attitude adjustment commands used for micro-attitude maintenance; Based on the target distance between the UAV's current position and the optimal observation position, selective output is made between the target heading vector and attitude adjustment commands.
[0072] Further explanation: The target heading vector is configured to be opposite in direction to the potential gradient vector calculated at the UAV's current position.
[0073] Further explanation: Attitude adjustment commands are generated through a virtual proportional-derivative controller, which is configured as follows: A restoring force vector is generated based on the potential field gradient vector as a proportional control term; and a damping force vector is generated based on the UAV's current real-time velocity vector and potential field gradient vector as a differential control term.
[0074] Further explanation: The step of generating the damping force vector is configured as follows: Calculate the projection of the current real-time velocity vector onto the direction of the potential field gradient vector to obtain the velocity projection damping factor; The damping force vector is generated based on the velocity projection damping factor and the direction of the potential field gradient vector. The following is a detailed implementation description of the above: The core technical features of this embodiment are: performing gradient analysis on potential field data to identify the potential field gradient vector driving the UAV's motion and the optimal observation position as the final mission objective; this embodiment reveals and applies a dual-modal control strategy based on a spatial distance threshold to generate trajectory control commands. This strategy includes a macroscopic path guidance mode for rapid long-distance approach and a microscopic attitude stabilization mode for precise short-distance maintenance. The improvement of this embodiment lies in constructing a virtual proportional-differential (PD) controller derived from the potential field morphology. The potential field gradient is used as the "proportional term" to provide the position recovery force; this embodiment introduces a "velocity projection damping factor" as the "differential term." This factor generates a velocity-related, precisely applied damping force by calculating the projection of the UAV's current real-time velocity vector onto the gradient direction. Its physical meaning is to actively suppress overshoot and oscillations when the UAV approaches the optimal observation position. By deeply coupling complex control theory with the potential field topology, the accuracy and stability of terminal control are improved without increasing additional sensors or computational complexity.
[0075] In a specific embodiment of this example, following the output of steps S1 to S3, steps S4 to S5 involve the definition of the following key parameters: The potential field gradient vector, whose parameter symbol is... This parameter is a three-dimensional vector, representing the direction and rate of the fastest increase in potential energy at the UAV's current position within the dynamic composite observation potential field; its initial source is the gradient definition in multivariable calculus. The gradient is a vector whose direction points to the direction of the fastest increase in the function value, and its magnitude is the rate of change in that direction. In this embodiment, the function is the "dynamic composite observation potential field".
[0076] This embodiment uses the three-dimensional central difference method to approximate the gradient at any grid point. The calculation logic steps are as follows: Step 1: Obtain the three-dimensional grid data array of the storage potential field, as well as the physical spacing of the grid in each coordinate axis direction. In this embodiment, the grid side length is 0.1 meters.
[0077] Step 2: Determine the index coordinates (ix, iy, iz) of the target grid point in the 3D array where the gradient needs to be calculated.
[0078] Step 3: Read the potential energy values of the target point's adjacent grid cells (indexed ix+1, iy, iz) in the positive X-axis direction from the array, and read the potential energy values of its adjacent grid cells (indexed ix-1, iy, iz) in the negative X-axis direction. Subtract the latter from the former to obtain the potential energy difference. Divide this difference by twice the grid spacing in the X-axis direction; the result is the X component of the gradient vector.
[0079] Step 4: Calculate the partial derivative components in the Y and Z directions: Repeat the operation in step 3 to calculate the partial derivative components in the Y-axis direction (using indices iy+1 and iy-1) and the Z-axis direction (using indices iz+1 and iz-1) respectively, to obtain the Y and Z components of the gradient vector.
[0080] Step 5: Combine the three components calculated in Step 3 and Step 4 into a three-dimensional vector according to the corresponding coordinate axes. This vector is the "potential gradient vector" at the target grid point.
[0081] The optimal observation location, whose parameter symbol is . This parameter is a three-dimensional spatial coordinate, representing the target point with the highest overall security and information value in the current potential field, physically corresponding to a local minimum point of the potential field. It is determined by using the gradient descent method from optimization theory as the initial source. This method is an iterative optimization algorithm used to find the local minimum of a function, and its determination steps are as follows: Use the current coordinates of the drone as the initial point for the search algorithm; start the iteration loop: At the current search point, calculate the "potential gradient vector"; Check the Euclidean magnitude of the current potential field gradient vector. If the magnitude is less than the preset "gradient convergence threshold", it is determined that a local minimum point has been found, the algorithm terminates, and the coordinates of the current search point are the "optimal observation position".
[0082] If the termination condition is not met, the position coordinates of the current search point are subtracted from the displacement vector obtained by multiplying the gradient vector by the "search step size" parameter. Specifically, the gradient vector is multiplied by the "search step size", and then the X, Y, and Z components of the resulting vector are subtracted from the X, Y, and Z coordinates of the current position to obtain the new search point coordinates; then the next iteration continues.
[0083] The "gradient convergence threshold" and "search step size" were determined through experimental calibration; this parameter combination achieves the fastest convergence speed while ensuring search accuracy. Specifically, 100 representative virtual potential field models were constructed, each containing local minima of different forms. The specific method for constructing the "100 representative virtual potential field models" is as follows: The test set is generated randomly through parameterization using two basic models. The first is a quadratic function potential well model, whose calculation logic is as follows: for any point in space, the squares of the differences between the coordinates of that point and the coordinates of the potential well center point on the X, Y, and Z axes are calculated respectively; then, these three squared values are multiplied by the curvature coefficients of the corresponding axes respectively; finally, the three products are added together to obtain the potential energy value of that point. By randomly sampling three curvature coefficients within a preset range, ellipsoidal potential wells with different steepness and shapes are generated; in this embodiment, the preset range is set to 0.5 to 5.0. The second method is the Gaussian mixture repulsion model, used to simulate obstacles. Its calculation logic is as follows: the potential energy value is composed of the superposition of multiple Gaussian function components. The calculation steps for each component are: calculate the square of the Euclidean distance between the target point and the center point of the Gaussian component; then, multiply this squared value by -1 / 2 and divide by the variance of the component; next, calculate the power of the natural exponential function e, with the exponent being the result of the previous step; finally, multiply the result by the amplitude coefficient of the component. By randomly setting the center point positions, variances, and amplitudes of three to five Gaussian components, a complex potential field with multiple repulsion peaks is generated.
[0084] Of the 100 models, 50 were quadratic function potential well models with different parameters, and the other 50 were quadratic function potential well models with Gaussian mixture repulsion models randomly superimposed on them. The selection criterion was to ensure that in the final test set, the minimum eigenvalue of the Hessian matrix at the deepest point of the potential well covered a range from 0.1 (gentle) to 10.0 (steep), thus guaranteeing the comprehensiveness of the test. For each virtual potential field, starting from multiple different initial points, different combinations of "gradient convergence thresholds" (ranging from...) were used. arrive Gradient descent search is performed using a "search step size" (ranging from 0.01 meters to 0.5 meters). The number of iterations representing the convergence rate and the error between the final found location and the true minimum location are recorded for each search.
[0085] A set of parameters is selected that minimizes the average number of iterations across all test samples, while ensuring the final position error is less than the required positioning accuracy. In this embodiment, the typical value obtained through the above experimental calibration is: the "gradient convergence threshold" is set to... The "search step size" is set to 0.05 meters. The positioning accuracy in this embodiment is set to 0.05 meters. Target distance, its parameter symbol is This represents the straight-line spatial distance between the current position of the UAV and the optimal observation position. Its calculation logic is initially derived from the Euclidean distance calculation principle in analytic geometry. By obtaining the three-dimensional coordinates of the current position of the UAV and the three-dimensional coordinates of the optimal observation position, the squares of the differences between the two coordinates on the X, Y, and Z axes are calculated respectively. After adding these three squared values, the arithmetic square root is taken to obtain the target distance.
[0086] The restoring force vector, whose parameter symbol is... This parameter is a three-dimensional vector, a virtual force used in microscopic attitude stabilization mode to "pull" the UAV from its current position to the optimal observation position. It is determined by obtaining the potential field gradient vector calculated at the UAV's current position. ; the gradient vector of the potential field Multiply by the negative proportional gain factor The result obtained is the restoring force vector. Proportional gain coefficient. The determination method is as follows: calibration is carried out through offline simulation experiments. The criterion is that the UAV can respond quickly and move toward the target point under simulated disturbances without producing violent divergence, and an appropriate positive value is selected.
[0087] Velocity projection damping factor, its parameter sign is This parameter is a key parameter in this embodiment, used to quantify the component of the UAV's velocity in the gradient direction, serving as the basis for generating the damping force. Its determination method is as follows: the initial source for the calculation is the calculation principle of vector dot product and projection in linear algebra; by obtaining the UAV's current real-time velocity vector... and the potential gradient vector at the current position Calculate the magnitudes of the two vectors separately; then, calculate the dot product of the two vectors; finally, divide the dot product result by the magnitude of the potential field gradient vector to obtain the velocity projection damping factor. The physical meaning of this velocity projection damping factor is the projection length of the current real-time velocity vector along the gradient direction; in this embodiment, the current real-time velocity vector... Output by the airborne navigation system via an extended Kalman filter (EKF); The damping force vector, whose parameter symbol is... This is a virtual force used in micro-attitude stabilization mode to suppress UAV motion and prevent overshoot and oscillation. It is determined by obtaining the velocity projection damping factor. and the potential field gradient vector at the current position The potential field gradient vector is normalized to obtain a unit gradient vector with the same direction as the gradient but a magnitude of 1. Then, this unit gradient vector is multiplied by the velocity projection damping factor. Finally, the result is multiplied by the negative differential gain coefficient. The final result is the damping force vector. Differential gain coefficient. The method for determining it is as follows: after determining the proportional gain coefficient Based on this, calibration was performed through offline simulation experiments, and the differential gain coefficient was gradually increased. The value is calculated until the drone's response curve shows the fastest response speed and no significant overshoot when approaching the target point, reaching the critical damping state. At this point, the differential gain coefficient... The value is the optimal selected value.
[0088] Differential gain coefficient and proportional gain coefficient The determination method is as follows: To determine an optimal set of gain coefficients for the "virtual proportional-differential (PD) controller" in order to achieve rapid, stable, and overshoot-free stabilization of the UAV at the optimal observation position in the "micro attitude stabilization mode".
[0089] In a high-fidelity UAV dynamics simulation environment, specifically based on the simulation platform of Gazebo and PX4-SITL, a virtual UAV model matching the physical parameters of the actual UAV, such as mass, inertia, and motor response, is established; a standard test potential field is constructed, which has a potential well of quadratic function shape at the origin.
[0090] In the "High-Fidelity UAV Dynamics Simulation Environment," the virtual UAV model not only includes mass and moment of inertia matrices matching those of the actual UAV, but also further includes: a first-order motor response model with a time constant set to 150 milliseconds; and a simplified air resistance model, the magnitude of which is proportional to the square of the UAV's speed with a scaling factor of 0.1. The IMU sensor model in the simulation is configured to superimpose zero-mean Gaussian white noise onto the true values, with the accelerometer noise having a standard deviation of 0.01 m / s² and the gyroscope noise having a standard deviation of 0.001 radians / second.
[0091] 2.0) The “standard test potential field” is an isotropic three-dimensional quadratic function potential well, centered at the origin. The logic for calculating the potential energy value at any point is as follows: calculate the squares of the X, Y, and Z coordinates of that point respectively; then, add these three squared values together; finally, multiply the sum by the potential well curvature coefficient, which is set to 0.5 in this experiment.
[0092] The virtual drone is placed at a starting point at a certain distance from the optimal observation position represented by the origin; in this embodiment, the certain distance is 5 meters. Initialize proportional gain coefficient The smaller value is 0.1, which is the differential gain coefficient. Set the value to 0. Start the simulation and let the drone fly towards the origin under the drive of the virtual PD controller. Record the response curve of the drone's position changing over time.
[0093] Maintain differential gain coefficient The initial value is 0, and the proportional gain coefficient is gradually increased. Repeat step 2.0 above to find the value of the proportional gain coefficient. Observe the response curve and find the proportional gain coefficient. The value allows the drone to approach the target at the fastest speed, but significant position overshoot and oscillations begin to appear. The proportional gain coefficient at this point... The value is multiplied by an empirical coefficient of 0.6, which is less than 1, to obtain the final proportional gain coefficient. This method originates from the Ziegler–Nichols tuning method in automatic control theory. The proportional gain coefficient The differential gain coefficient is fixed at the value determined in the previous step, and gradually increased starting from a smaller value of 0.05. Repeat step 2.0. Observe the response curve and find the differential gain coefficient. The value is chosen to minimize the drone's position overshoot, ideally to zero, and to minimize the time required for the drone to reach and stabilize within a 0.05-meter error radius of the target point from its starting point. This state is called the critical damping state, where the proportional gain coefficient is... The value is the final determined differential gain coefficient.
[0094] Through the standardized experimental procedure described above, a set of typical gain coefficients applicable to a specific UAV platform are obtained as follows: , .
[0095] In this embodiment, the complete calculation process of steps S4 to S5 is broken down as follows: 2.1) Input the dynamic composite observation potential field data generated in step S3; the real-time three-dimensional current position coordinates provided by the UAV navigation system; and the real-time three-dimensional current velocity vector provided by the UAV navigation system.
[0096] 2.2) In the input dynamic composite observation potential field, the potential field gradient vector at that point is calculated using the three-dimensional central difference method based on the current position of the UAV. .
[0097] Starting from the current position of the UAV, a gradient descent search algorithm is executed in the potential field until a point is found where the magnitude of the potential field gradient is less than the "gradient convergence threshold". The three-dimensional coordinates of this point are then determined as the optimal observation position. .
[0098] 2.3) Calculate the current position and optimal observation position of the UAV. target distance between .
[0099] Distance to target Distance threshold between preset mode switching Comparison; Mode switching distance threshold in this embodiment The standard measurement is 1.5 meters. Mode switching distance threshold The method for determining this is based on the maximum braking capacity of the UAV and the system response delay. The specific calculation logic is as follows: The maximum deceleration of the UAV is measured through physical experiments. After accelerating the drone to its maximum horizontal speed, a maximum braking command is executed, and the time and distance required for its speed to drop from maximum to zero are recorded to calculate the actual maximum deceleration. For the quadcopter inspection drone in this embodiment, this value is 3.5 m / s².
[0100] Total system response delay This value includes sensor data transmission latency, controller calculation latency, and actuator motor response latency. It is obtained through end-to-end measurement in a simulation environment or on actual hardware using a high-precision clock; in this embodiment, it is set to 0.2 seconds.
[0101] Based on kinematic principles, the theoretical minimum braking distance required for a UAV to decelerate from its maximum speed upon entering micro-mode to zero is calculated as follows: Calculate the square of the cruise speed, then divide by twice the maximum deceleration. In this embodiment, the maximum speed is the cruise speed in macro-mode, denoted as... meters per second; During the system response delay, the distance the drone will continue to fly at its cruising speed is calculated using the following logic: the cruising speed is multiplied by the total system response delay. Multiply the calculated theoretical minimum braking distance with the calculated delayed response distance, and then multiply the sum by a safety margin factor greater than 1. The result is the "mode switching distance threshold". In this embodiment, the safety margin factor is set to 1.2 to cope with uncertainties such as wind disturbance. In this embodiment, for the above parameters, the theoretical minimum braking distance is (2.0²) / (2×3.5)≈0.57 meters, and the delayed response distance is 2.0×0.2=0.4 meters. Therefore, the mode switching distance threshold... The distance is (0.57 + 0.4) × 1.2 ≈ 1.16 meters. In this embodiment, to retain a more sufficient margin, it is preferable to set the mode switching distance threshold. The standard is 1.5 meters.
[0102] If the target distance Greater than the mode switching distance threshold If so, the system enters the macro-path guidance mode and executes step 2.4). If the target distance is... Less than or equal to the mode switching distance threshold If the system then enters the micro-attitude stabilization mode, proceed to step 2.4.
[0103] 2.4) The potential field gradient vector calculated in step 2.2) Take the opposite direction to generate the target heading vector. Use this target heading vector as the final control command output.
[0104] 2.5) Based on the potential field gradient vector and proportional gain coefficient Calculate the restoring force vector .
[0105] Based on the drone's current real-time velocity vector Summation gradient vector Calculate the velocity projection damping factor .
[0106] Based on velocity projection damping factor Normalized potential gradient vector and differential gain coefficient Calculate the damping force vector .
[0107] Further explanation: The restoring force vector With damping force vector Perform vector addition to obtain the resultant force command vector; use this resultant force command vector as the final control command output.
[0108] 2.6) The final output of the process is the trajectory control command. This trajectory control command is a three-dimensional vector. In macroscopic mode, it represents the desired flight direction; in microscopic mode, it represents the desired virtual resultant force. This vector will be sent to the UAV's underlying attitude controller, which will calculate it into specific motor speed commands to drive the UAV to produce corresponding motion.
[0109] Furthermore, to ensure the versatility and adaptability of the technical solution in this embodiment, all parameters that need to be adjusted in specific applications adopt a logical configuration management mechanism to decouple the algorithm core from the specific configuration. In the specific implementation of this embodiment, all configurable operating parameters, such as "mode switching distance threshold," "proportional gain coefficient," and "derivative gain coefficient," are predefined and stored in a structured data carrier independent of the main program logic. During the initialization phase, the system's processing unit is configured to read all or part of the parameter values from this data carrier and load them into a dedicated parameter management module in the working memory for subsequent algorithm flows to call as needed.
[0110] In the data carrier, different mode switching distance thresholds are configured for different drone platforms or mission types. Including but not limited to: the mode switching distance threshold for small racing drones. The mode switching distance threshold for a medium-sized inspection machine is 0.8 meters. It is 1.5 meters; Before executing the logical judgment in step 2.3), the system first queries the configuration file of the currently running UAV platform and retrieves the "mode switching distance threshold" corresponding to that file from the parameter management module. This value is then compared with the "target distance" calculated in real time, thereby realizing adaptive switching of the control mode.
[0111] In the data carrier, multiple different sets of control gain "tuning sets" are preset to represent... To adapt to different operational requirements, including but not limited to: scenarios requiring rapid response. Used for aerial photography scenarios requiring smooth and stable flight. ; Before performing the calculation in step 2.5), the system loads the specified "tuning set" from the parameter management module based on the current task instructions, specifically the "rapid inspection" or "detailed shooting" instructions issued by the ground station. The restoring force and damping force calculation module will use the proportional gain coefficient from this tuning set. and differential gain coefficient The values are calculated to ensure that the terminal control behavior of the drone meets the preset mission requirements.
[0112] In step S5 of this embodiment, a hard switch is performed between two independent control models using simple distance-based logic gating. These two models, a macroscopic path guidance model and a microscopic attitude stabilization model, form a cascaded relationship: the flight mission is always initially dominated by the macroscopic model, and then the microscopic model takes over once the conditions are met, until the mission is completed. The former pursues efficiency and directional accuracy, while the latter pursues stability and zero error. No single control law can achieve optimal performance in both scenarios simultaneously. This embodiment achieves optimal control of the entire mission process through explicit mode division and a virtual PD control law specifically designed for near-field stabilization and imbued with physical meaning.
[0113] Potential field gradient vector It provides the magnitude and direction of the position error and is the source of the restoring force. The drone's current real-time velocity vector. Characterizing the dynamic properties of a system is the root cause of overshoot and oscillations, and further serves as the basis for calculating damping forces.
[0114] proportional gain coefficient This determines the strength of the system's response to position errors. Differential gain coefficient. This determines the strength of the system's suppression of velocity, i.e., the magnitude of the damping; this embodiment further reveals that the most effective damping force should be proportional to the velocity component "approaching / deviating from the target point", i.e., the projection of the velocity in the gradient direction.
[0115] Conventional UAV position controllers rely on the geometric error between externally set waypoints and the current position. Their parameters are fixed, making them ill-suited to the complex and ever-changing potential field environment generated in real-time by images and dynamics. Directly using the negative gradient as a force input is merely equivalent to a proportional controller and cannot suppress oscillations. The virtual PD controller designed in this embodiment is based on the fact that the proportional and differential terms, two key components of the control law, are directly derived endogenously from the geometry of the potential field itself and the dynamics of the UAV. The potential field gradient vector is... It is used directly as a measure of position error, multiplied by the proportional gain coefficient. Generate restoring force vector .
[0116] Calculate the gradient vector in the potential field velocity projection damping factor Significant damping force is generated only when the velocity direction is related to the gradient direction, i.e., when approaching or moving away from the target. For motion perpendicular to the gradient direction, such as lateral drift, the damping term has a smaller effect, allowing the UAV to adjust on equipotential surfaces. The final generated damping force vector Its direction of action is constrained to the direction axis of the potential field gradient, thereby suppressing overshoot in the most effective way.
[0117] When the drone is stationary at a local minimum point, its velocity is zero and its damping force is zero. The system is only subjected to restoring force and begins to accelerate toward the local minimum point.
[0118] When the drone flies at high speed toward a local minimum point, the real-time velocity vector is close to the direction of the negative gradient, and the velocity projection is negative. This causes the direction of the damping force to be opposite to the direction of the restoring force, which acts as a "brake" and effectively prevents overshoot.
[0119] When the drone crosses a local minimum point, the potential field gradient direction reverses, and the restoring force also reverses, "pulling" the drone back. At the same time, the velocity direction is consistent with the new potential field gradient direction, and the velocity projection is positive, causing the damping force to be in the opposite direction to the velocity direction, thus acting as a "brake" again and quickly suppressing oscillations.
[0120] The following are detailed implementation instructions for the above content: In this embodiment, the final output in the micro-attitude stabilization mode is a "resultant force command vector." This vector is a dynamic control quantity with a clear physical meaning. Its technical meaning is as follows: The vector direction of the resultant force command vector indicates the direction of the combined virtual force that needs to be applied to bring the UAV back to the optimal observation position and suppress the current motion trend.
[0121] The vector magnitude of the resultant force command vector quantifies the intensity of the required control action. When its magnitude approaches zero, it indicates that the system is in an ideal equilibrium state, that is, the UAV has hovered precisely at the optimal observation position without velocity disturbance, and no additional control force is required. Conversely, the larger the vector magnitude, the farther the UAV deviates from the target position, or the greater the threat that its speed poses to the system stability, and the stronger the control force is required for correction.
[0122] The resultant force command vector is synthesized from the "restoring force vector" and the "damping force vector," and its behavior is directly affected by the following key input parameters: Potential field gradient vector The magnitude of the restoring force vector is positively correlated with the value of the restoring force. When the UAV moves far from the optimal observation position, resulting in a larger potential field gradient magnitude, the generated restoring force also increases accordingly. The system's restoring force should be proportional to the error from the equilibrium point. This ensures that the UAV can achieve a larger return acceleration when it deviates significantly from the target, while the force decreases as it approaches the target, creating conditions for fine-tuning.
[0123] The drone's current real-time velocity vector The "velocity projection damping factor" has a decisive influence on the "damping force vector." Specifically, the magnitude of the "damping force vector" is positively correlated with the magnitude of the projection component of the "UAV's current velocity vector" along the direction of the "potential field gradient vector." In control theory, the purpose of damping force is to suppress motion. Conventional techniques apply a force opposite to the direction of the velocity vector, but this is not the most efficient method. In this embodiment, the velocity component along the gradient direction is the velocity directly approaching or moving away from the target. By applying damping only to this velocity component, the following "precise braking" is achieved: When the drone rushes toward the target, the damping force acts as a "brake" to prevent overshoot.
[0124] When the drone moves away from the target due to overshoot, the damping force also acts as a "brake" to suppress oscillations.
[0125] For lateral drift motion perpendicular to the gradient direction, the damping force approaches zero, avoiding unnecessary energy consumption and control coupling.
[0126] To quantitatively verify the significant advancements of the "virtual PD controller" in this embodiment compared to existing technologies, the following comparative experiment was designed and executed. The experiment was conducted in a dynamic environment to isolate and evaluate the core performance of the control algorithm itself.
[0127] The following table is designed as follows: This experiment aims to compare the "virtual PD controller" used in this embodiment with the "conventional P controller" that only uses gradient restoring force (i.e., the differential gain coefficient in this embodiment is used). The core control performance (in the degenerate form set to 0) is demonstrated under three typical challenging scenarios. The beneficial effects of this embodiment in suppressing oscillations, improving stability, and accelerating convergence speed are quantitatively shown in the table below by measuring key dynamic response metrics (peak overshoot, settling time).
[0128] Peak overshoot: This refers to the maximum distance the UAV travels past the target point after its initial approach. The smaller this value, the better the stability of the control system.
[0129] Settling time: This refers to the time required from the start of the experiment or the application of a disturbance until the UAV's position remains consistently within a stable region centered on the target point and with a radius of 0.1 meters. A smaller value indicates a faster convergence speed and stronger disturbance resistance.
[0130] In the most challenging scenario, "Scenario 2: High-Speed Overshoot," the conventional P controller produced a peak overshoot of 2.15 meters, approximately half of the initial error. However, the virtual PD controller in this embodiment, under identical initial conditions, exhibited a peak overshoot of only 0.08 meters. The peak overshoot of this embodiment is reduced by 96.3% compared to the conventional P controller. The calculation is based on (1 - 0.08 / 2.15) × 100% = 96.3%.
[0131] This data demonstrates the effectiveness of the "velocity projection damping" mechanism in this embodiment. It can provide precise and powerful "virtual braking force" when the UAV approaches the target at high speed, thereby approximately eliminating the dangerous overshoot phenomenon in high-precision tasks such as inspection and docking.
[0132] In the most basic "Scenario 1: Standard Approach" (i.e., a stationary start without initial speed), the advantages of this embodiment are equally clear. The settling time of a conventional P controller is 8.5 seconds, accompanied by a peak overshoot of 0.82 meters. The virtual PD controller in this embodiment not only suppresses the peak overshoot to 0.03 meters but also shortens the settling time to 3.2 seconds, a reduction of 62.4%. This data proves that the technical advantages of this embodiment are not limited to handling extreme situations such as high speeds or disturbances; even in the most routine work processes, it can still bring an efficiency improvement of over 60% and near-zero overshoot control, which has universal value for improving the overall work efficiency and safety of daily inspection tasks.
[0133] In "Scenario 3: Disturbance Recovery," when the UAV is subjected to a velocity pulse disturbance of 1.5 m / s near the target point, a conventional P controller requires 7.9 seconds to regain stability, accompanied by multiple oscillations. However, the virtual PD controller in this embodiment only requires 2.5 seconds to regain stability. The stabilization time of this embodiment is reduced by 68.4% compared to the conventional P controller. Calculation basis: (1-2.5 / 7.9)×100%=68.4%. This data strongly demonstrates that the controller in this embodiment is not only stable but also robust. When facing sudden external disturbances such as gusts, this embodiment can suppress the impact of disturbances more quickly, enabling the UAV to rapidly return to its mission state, greatly improving the reliability and efficiency of operations.
[0134] The "Peak Damping Force" data shows that in all three scenarios, the peak damping force of the conventional P controller is 0.0 Newtons, which is completely consistent with the definition of its control law, which does not contain a differential term. Correspondingly, the virtual PD controller in this embodiment generates peak damping forces of 1.2, 2.5, and 1.8 Newtons respectively, depending on the needs of different scenarios. A direct comparison of the "Peak Damping Force" and "Peak Overshoot" data clearly shows a strong negative correlation: when the peak damping force significantly increases from 0.0 Newtons to a non-zero value, the peak overshoot drops sharply to near zero. In scenario two, the introduction of a 2.5 Newton peak damping force directly corresponds to a reduction in overshoot from 2.15 meters to 0.08 meters. This demonstrates that the core mechanism by which this embodiment can dynamically generate "damping force" based on velocity and potential field gradient directly leads to a series of beneficial effects such as overshoot suppression and rapid stabilization. In order to transform the control state of this embodiment in the microscopic attitude stabilization mode into a clear logical state that can be used for decision-making by the upper-level task system, this embodiment defines the following three practical application intervals.
[0135] The classification criteria are based on a comprehensive assessment of the UAV's dynamic behavior, incorporating two core observations: "target distance" and the magnitude of the "resultant force command vector." This criterion was developed through statistical analysis of a large amount of response data from the second-step experiment, combined with the operational requirements of UAV inspection tasks. See the table below for details:
[0136] The computational logic involved in this application can be constructed using algorithms such as regression analysis in machine learning, establishing a mathematical model by analyzing the inherent trends and interrelationships of the collected parameters. This process can be implemented using professional computational tools (such as Python's Scikit-learn library or the R language environment). To ensure the effectiveness and accuracy of the model, techniques such as cross-validation will be used to evaluate model performance, and iterative optimization will be performed based on continuous feedback to ensure that the computational content truly reflects the inherent laws of objective data. In all computational processes, to eliminate the influence of different physical dimensions and ensure that data is compared and analyzed on the same scale, the input parameters in each formula are dimensionless. The dimensionless techniques used include, but are not limited to, min-max-normalization or Z-score standardization.
[0137] It should be emphasized that the foregoing embodiments are merely illustrative of preferred implementations of the present invention and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make various modifications, equivalent substitutions, or improvements based on the technical solutions, spirit, and principles disclosed in the present invention. Any such changes that do not depart from the scope of the technical solutions of the present invention should fall within the protection scope of the claims of the present invention. Furthermore, the technical features of the various embodiments in the specification can be arbitrarily combined without creating technical contradictions. All possible, non-contradictory combinations should be considered within the scope of this specification; this application also provides a computer-readable storage medium storing computer program instructions thereon.
Claims
1. A UAV replanning method based on real-time inspection image analysis, characterized in that, The specific steps include: S1: Acquire image data collected by the onboard camera of the UAV during real-time inspection, and perform content analysis on the image data to generate three-dimensional visual attraction field data; The step of performing content analysis on the image data is configured as follows: The visual saliency score of pixel regions in image data is calculated using a visual saliency detection algorithm. The information entropy evaluation algorithm is used to calculate the observation information entropy score of the amount of new information that can be obtained from the observed pixel region; The visual saliency score and the observation information entropy score are weighted and combined to obtain the information value distribution used to characterize the value of image content; The information value distribution is projected in reverse into three-dimensional space to form three-dimensional visual attraction field data for characterizing the image content value of different areas in the inspection task space. S2: Obtain dynamic parameters characterizing the interaction between the UAV rotor system and the surrounding airflow, and generate three-dimensional aerodynamic repulsion field data based on the dynamic parameters, wherein the three-dimensional aerodynamic repulsion field data is used to characterize the physical interaction risk in the space corresponding to the image data; S3: In a unified three-dimensional spatial coordinate system, the three-dimensional visual attraction field data is used as the basic scene expression, and the three-dimensional aerodynamic repulsion field data is used to perform risk weighting on the basic scene expression to construct a dynamic composite observation potential field; wherein, the dynamic composite observation potential field is an enhanced three-dimensional scene data expression that integrates image content value and physical interaction risk. S4: Perform gradient analysis on the dynamic composite observation potential field to identify the potential field gradient vector and the optimal observation position in the data field; S5: Based on the potential field gradient vector and the optimal observation position, generate trajectory control commands to drive the UAV flight.
2. The UAV replanning method for real-time inspection image analysis according to claim 1, characterized in that: The dynamic parameters include motor load current timing data and body attitude angular velocity data; the step of generating three-dimensional aerodynamic repulsive force field data is configured as follows: The aerodynamic disturbance residual between the actual value and the predicted baseline value of the dynamic parameter is calculated using a pre-trained time-series prediction model. The aerodynamic disturbance residual is mapped to the repulsive force intensity of a three-dimensional spatial point to form the three-dimensional aerodynamic repulsive force field data.
3. The UAV replanning method for real-time inspection image analysis according to claim 2, characterized in that: Based on the time series of the aerodynamic disturbance residuals, the situational risk change rate is calculated, which is used to characterize the dynamic suddenness of physical interaction risks.
4. The UAV replanning method for real-time inspection image analysis according to claim 3, characterized in that: The risk weighting step is configured as follows: A context-aware logic gate is set up, which classifies the current flight situation into one of multiple preset situations based on the value of the situation risk change rate. Based on the pre-defined scenarios, select and activate the corresponding nonlinear weighting units; The three-dimensional visual attraction field data and the three-dimensional aerodynamic repulsion field data are fused using an activated nonlinear weighter to construct a dynamic composite observation potential field.
5. The UAV replanning method for real-time inspection image analysis according to claim 4, characterized in that: The multiple preset scenarios include at least a "normal cruise" scenario, a "cautious approach" scenario, and an "emergency avoidance" scenario; wherein, in the "emergency avoidance" scenario, the corresponding nonlinear weighter is configured to: ignore the effect of the three-dimensional visual attraction field data, and amplify the effect of the three-dimensional aerodynamic repulsion field data according to a risk penalty term proportional to the square of the UAV's flight speed.
6. The UAV replanning method for real-time inspection image analysis according to claim 5, characterized in that: The generated track control commands include: The target heading vector is used for macroscopic path guidance; and the attitude adjustment commands are used for microscopic attitude maintenance. Based on the target distance between the UAV's current position and the optimal observation position, selective output is made between the target heading vector and the attitude adjustment command; The target heading vector is configured to be opposite in direction to the potential field gradient vector calculated at the current position of the UAV.
7. The UAV replanning method for real-time inspection image analysis according to claim 6, characterized in that: The attitude adjustment command is generated by a virtual proportional-derivative controller, which is configured as follows: A restoring force vector is generated based on the potential field gradient vector as a proportional control term; and a damping force vector is generated based on the UAV's current real-time velocity vector and the potential field gradient vector as a differential control term.
8. The UAV replanning method for real-time inspection image analysis according to claim 7, characterized in that: The steps for generating the damping force vector are configured as follows: Calculate the projection of the current real-time velocity vector onto the direction of the potential field gradient vector to obtain the velocity projection damping factor; The damping force vector is generated based on the velocity projection damping factor and the direction of the potential field gradient vector.
9. The UAV replanning method for real-time inspection image analysis according to claim 8, characterized in that: The restoring force vector and the damping force vector are vectored together to obtain the resultant force command vector; The vector direction of the resultant force command vector indicates the direction in which the combined virtual force needs to be applied to bring the UAV back to the optimal observation position and suppress the current motion trend. The vector magnitude of the resultant force command vector quantifies the intensity of the required control action; The larger the vector magnitude, the farther the UAV deviates from the target position, or the greater the threat that its speed poses to system stability, requiring stronger control to correct it.
Citation Information
Patent Citations
A method of trajectory planning in complex environments based on UAV remote sensing images
CN117876624B
AI visual special effect dynamic generation system fused with multi-modal perception
CN120318379A
Light field salient target detection method based on edge perception and hierarchical fusion
CN120707837A
