Machine learning based tunnel drone autonomous flight system

By combining multi-sensor fusion localization with an improved SLAM algorithm and deep reinforcement learning methods, the problems of low positioning accuracy and unstable flight strategy of UAVs in tunnels were solved, achieving high-precision map construction and stable flight control.

CN122151918APending Publication Date: 2026-06-05HEBEI JIESHUANG AIRLINES TECHNOLOGY CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEBEI JIESHUANG AIRLINES TECHNOLOGY CO LTD
Filing Date
2026-03-08
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing autonomous flight systems for unmanned aerial vehicles (UAVs) suffer from problems such as low positioning accuracy, poor map consistency, and unstable flight strategies in complex spaces such as tunnels, and perform poorly, especially under low light and signal obstruction conditions.

Method used

By employing multi-sensor fusion localization, an improved Hector SLAM algorithm, and an improved A3C deep reinforcement learning method, high-precision map construction and dynamic path decision-making are achieved through multi-sensor data preprocessing, visual incremental estimation, unscented Kalman filter fusion, and risk tensor construction.

Benefits of technology

It improved positioning accuracy and map building quality in tunnel environments, enhanced the stability and adaptability of flight control, and achieved efficient and intelligent autonomous flight.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122151918A_ABST
    Figure CN122151918A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on machine learning's tunnel unmanned plane autonomous flight system, comprising: multi-sensor data acquisition and pre-processing module, for collecting multi-source data and generating pre-processing data set;Improved Hector SLAM positioning module, for executing the introduction information entropy weight and the scanning matching of multi-source constraint, output two-dimensional map and horizontal pose estimation;Weak light vision incremental estimation module, for output light flow estimation visual incremental displacement;Unscented Kalman filter fusion module, for fusing multi-source information, output three-dimensional pose fusion result;Risk tensor construction module, for updating map and generating three-channel risk tensor;Improved A3C strategy control module, for fusing strategy output flight control instruction;Flight control and data acquisition module, for driving flight and generating inspection report.The application realizes the data fusion control effect of unmanned plane autonomous flight accurate navigation and efficient inspection in tunnel scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) flight technology, and in particular to an autonomous flight system for tunnel UAVs based on machine learning. Background Technology

[0002] In semi-enclosed, narrow spaces such as tunnels, cable wells, and underground passages, traditional manual inspection methods suffer from low efficiency, high risk, and data lag. In recent years, autonomous unmanned aerial vehicles (UAVs) designed for complex spatial scenarios have been gradually applied to inspection operations. By carrying various sensing devices such as LiDAR, visual sensors, and inertial measurement units, they achieve environmental perception, localization and mapping, and path navigation. SLAM algorithms based on LiDAR perform well in terms of 2D mapping accuracy, while the Hector SLAM algorithm is widely used in lightweight UAV platforms due to its advantage of achieving real-time mapping without loop closure detection. The A3C deep reinforcement learning algorithm is used for path decision-making, improving the continuity and robustness of action output by training an Actor-Critic network structure.

[0003] Existing autonomous flight systems for unmanned aerial vehicles (UAVs) still have significant shortcomings when facing challenges such as low light in tunnels, signal blockage, and inconsistencies in multi-source data. Hector SLAM, relying solely on laser point cloud data, is susceptible to structural orientation interference, leading to decreased scan matching accuracy, and lacks effective integration of IMU and UWB constraint information. Figure 1 The standard A3C policy network suffers from poor consistency; it is unstable during training in scenarios with high state uncertainty, making it difficult to efficiently utilize historical flight experience, resulting in slow and highly volatile flight policy convergence. The lack of fine-grained visual incremental displacement optimization methods also limits the system's tracking performance in low-light tunnels. Therefore, there is an urgent need to construct a UAV flight control system that integrates multi-source perception, improved SLAM, and deep reinforcement learning mechanisms to enhance positioning accuracy and policy stability, enabling efficient and intelligent autonomous flight in complex spaces such as tunnels. Summary of the Invention

[0004] One objective of this invention is to propose an autonomous flight system for tunnel drones based on machine learning. This invention employs multi-sensor fusion positioning, an improved Hector SLAM algorithm, and an improved A3C deep reinforcement learning method to achieve high-precision map construction and dynamic path decision-making in tunnel scenarios. It has the advantages of strong environmental adaptability, high navigation accuracy, and strong strategy stability.

[0005] An autonomous flight system for tunnel unmanned aerial vehicles based on machine learning, according to an embodiment of the present invention, includes:

[0006] The multi-sensor data acquisition and preprocessing module is used to acquire data from multiple sensors and perform preprocessing to generate a multi-sensor preprocessed data set.

[0007] An improved Hector SLAM localization module is used to input preprocessed data, perform scan matching with axial information entropy weights and multi-source constraints, and output a two-dimensional occupancy grid map and an initial estimate of horizontal pose.

[0008] The low-light visual increment estimation module is used to perform histogram equalization, adaptive thresholding and FAST-LK optical flow tracing on visual data and output visual increment displacement.

[0009] The unscented Kalman filter fusion module is used to fuse the initial horizontal pose estimation, visual incremental displacement, IMU and UWB measurements, and output the 3D pose fusion result in the extended state vector.

[0010] The risk tensor construction module is used to update the two-dimensional occupancy grid map, calculate the distance transformation map and reachability mask, and concatenate them to generate a three-channel risk tensor.

[0011] An improved A3C strategy control module was used to input the risk tensor and the fusion result of 3D pose, fuse the prior strategy and the main strategy, and output linear velocity and angular velocity control commands.

[0012] The flight control and data acquisition module is used to execute control commands to drive the UAV to fly, collect infrared images and environmental data, and combine them with three-dimensional pose to generate inspection reports.

[0013] Optionally, modules can be integrated using the following methods:

[0014] S1. Acquire multi-sensor data and perform preprocessing to generate a multi-sensor preprocessed data set; S2. Input the multi-sensor preprocessed data set into the improved Hector SLAM algorithm, introduce axial information entropy weights into the scan matching objective function, and superimpose inertial measurement unit angular velocity constraints and ultra-wideband distance constraints. Simultaneously, use distance thresholds and reflection intensity thresholds to jointly filter out noise points, outputting a two-dimensional occupancy grid map and an initial horizontal pose estimate; S3. Perform histogram equalization, adaptive thresholding, and FAST-LK optical flow tracing on the visual data to generate a low-light optimized visual incremental displacement; S4. Input the initial horizontal pose estimate, low-light optimized visual incremental displacement, inertial measurement unit data, and ultra-wideband distance data into an unscented Kalman filter, outputting a three-dimensional pose fusion result; S5. Based on the three-dimensional pose fusion... The results are combined to update the 2D occupancy grid map, calculate the distance transformation map and generate an accessibility mask, and stitch the 2D occupancy grid map, distance transformation map and accessibility mask together to construct a risk tensor; S6, the risk tensor and the 3D pose fusion result are input into an improved A3C deep reinforcement learning network, and the prior strategy is dynamically fused using an adaptive decay factor and continuous linear velocity command and angular velocity command are output through a nonlinear mapping from distance difference to angular velocity; S7, the UAV is driven to fly according to the continuous linear velocity command and angular velocity command, and infrared images, temperature and humidity data and gas concentration data are collected in real time and uploaded in a package with the 3D pose fusion result to generate a tunnel inspection report.

[0015] Optionally, the multi-sensor data in step S1 includes lidar data, visual data, inertial measurement unit data, and ultra-wideband data; the preprocessing includes time synchronization, noise reduction, and coordinate calibration.

[0016] Optionally, the improved Hector SLAM algorithm in step S2 includes the following operations:

[0017] The lidar scan frame is converted to polar coordinates, and the scan angular domain is divided into several local sectors at fixed angular intervals. The directional distribution frequency of the laser beam within each local sector is statistically analyzed, normalized, and the directional probability distribution is calculated. The directional distribution entropy is calculated for each local sector, which is the Shannon entropy of the directional probability distribution within that sector. The entropy value is normalized and used as the axial information entropy weight of the laser point in the current sector. The axial information entropy weight is used as the residual weighting factor for each laser point in the scanning matching objective function, and a laser matching main objective function based on the weighted residual sum of squares is constructed. The angular velocity data at the current moment is obtained from the inertial measurement unit, and the angular velocity residual term is constructed by combining it with the attitude change at the previous moment. The angular velocity residual term is then... The distance measurement data between the current frame and the reference anchor point is obtained from the ultra-wideband module and the relative displacement estimated by the laser frame is used to construct a distance residual term, which is then superimposed on the scan matching objective function. The laser point cloud is traversed, and the Euclidean distance between any laser point and its adjacent points is calculated. If the distance is greater than a set distance threshold, it is marked as a distance anomaly point. At the same time, the reflection intensity of the laser point is read. If the reflection intensity is lower than a set reflection intensity threshold, it is marked as a low confidence point. Laser points that meet any of the conditions are removed from the current frame. Gaussian-Newton optimization is performed on the retained laser points under the scan matching objective function to output the initial horizontal pose estimate of the current frame. The two-dimensional occupancy grid map is updated based on the initial horizontal pose estimate result.

[0018] Optionally, step S3 specifically includes:

[0019] The continuous image frames acquired by the vision sensor are converted into grayscale images, and histogram equalization is performed.

[0020] The local variance of the image pixels after histogram equalization is statistically analyzed. A global dynamic threshold is calculated based on the local variance. The image is then subjected to pixel-level binary processing using the global dynamic threshold. FAST feature points are extracted from the binary processed image.

[0021] An image pyramid is constructed, and the Lucas-Kanade optical flow method is used to perform step-by-step tracking between the pyramid levels of two consecutive frames of images to calculate the sub-pixel level coordinate offset of each FAST feature point.

[0022] The optical flow displacement vectors of all FAST feature points between the current frame and the previous frame are statistically analyzed. The spatial distribution weights are calculated based on the pixel coordinates of each feature point in the image plane. The displacement vectors are weighted and summed to construct an overall optical flow motion model of the feature points.

[0023] The average displacement of feature points in the current image frame relative to the previous frame is calculated based on the overall optical flow motion model to generate visual incremental displacement.

[0024] Perform reverse tracking verification on the feature point set, compare the residuals of the forward tracking displacement and the reverse tracking displacement, remove feature points whose residuals are greater than the preset consistency threshold, remove feature points located within the preset width range of the image edge, and recalculate the visual increment displacement.

[0025] The verified visual increment displacement is sent as the observation input to the unscented Kalman filter.

[0026] Optionally, step S4 specifically includes:

[0027] An extended state vector containing position, velocity, attitude Euler angles, acceleration bias, and angular velocity bias is constructed, and a nonlinear integral function based on the angular velocity and linear acceleration input of the inertial measurement unit is set as the state transition model.

[0028] Based on the current state estimate and state covariance matrix, a symmetric distribution sampling strategy is used to generate a set of σ points. The σ points are then input into the state transition model through unscented transformation and propagated to calculate the predicted state mean and predicted state covariance.

[0029] Extract the initial horizontal pose estimate and visual incremental displacement, combine them to construct a vision-laser joint observation, and set the observation function to map the position and attitude components in the extended state vector into relative displacement changes.

[0030] Obtain the distance measurement value output by the ultra-wideband module, and set the Euclidean distance equation between the current frame position coordinates and the preset anchor point coordinates as the ultra-wideband observation function;

[0031] Perform an unscented transformation on the observation pair at point σ to generate the observation mean, observation covariance, and cross covariance between the state and the observation;

[0032] The Kalman gain is calculated based on the predicted state covariance, observation covariance, and cross covariance. The Kalman gain is then used to correct and update the predicted state mean and predicted state covariance, and the updated extended state vector is output as the 3D pose fusion result.

[0033] Optionally, step S5 specifically includes:

[0034] Extract the planar position coordinates and heading angle from the 3D pose fusion result, and transform the 2D landing point set collected by the current frame of the lidar from the UAV body coordinate system to the global map coordinate system based on the 2D rigid body transformation matrix;

[0035] The converted laser landing point is mapped to a two-dimensional grid cell. The occupancy probability of the landing point grid is updated using the log-odds accumulation method. At the same time, the occupancy probability of the grid through which the line connecting the laser emission point and the landing point passes is reduced, and an updated two-dimensional occupancy grid map is generated.

[0036] Traverse the free grids in the two-dimensional occupied grid map, calculate the Euclidean distance between the center of each free grid and the center of the nearest occupied grid using a distance transformation algorithm, fill the distance values ​​into the corresponding grids, and construct a two-dimensional distance transformation map.

[0037] Based on the occupancy probability distribution of the two-dimensional occupancy grid map and the preset threshold judgment rules, passable connected areas are extracted, valid mask values ​​are assigned to the grids within the areas, and invalid mask values ​​are assigned to non-connected areas or areas with known obstacles, thereby generating an accessibility mask map.

[0038] Using a two-dimensional occupancy grid map as the first channel, a distance transformation map as the second channel, and an accessibility mask map as the third channel, a channel stitching operation is performed at the same grid space scale to generate a three-channel risk tensor.

[0039] Optionally, step S6 specifically includes:

[0040] Construct a state input vector containing a risk tensor, current position coordinates, heading angle, and historical action sequence, and input it into the shared feature extraction subnetwork;

[0041] In the shared feature extraction subnetwork, a convolutional structure is used to extract the spatial semantic features of the risk tensor, which are then concatenated with the 3D pose fusion result to form a fusion state feature. This feature is then input into a gated recurrent unit to model the temporal dependency of action decisions and outputs a policy embedding.

[0042] The policy is embedded and fed into several parallel Actor subnetworks and Critic subnetworks respectively. The Actor subnetworks output the probability distribution of candidate actions in the current state, and the Critic subnetworks output the value estimate of the corresponding state.

[0043] Based on policy stability and historical task experience, an independently trained prior policy network is constructed and its parameters are frozen. The current state is then input into the prior policy network to generate a static action distribution.

[0044] An adaptive decay factor based on dynamic adjustment of state uncertainty and action entropy is introduced between the action probability distribution output by the Actor sub-network and the output of the prior policy network to generate the final action policy distribution.

[0045] The optimal action number is selected from the fused action strategy distribution, decoded into the target linear velocity and target distance difference, and the distance difference is mapped into the target angular velocity through a set nonlinear mapping function to generate continuous linear velocity and angular velocity commands.

[0046] Continuous linear velocity and angular velocity commands are sent to the flight control interface to control the tunnel UAV to achieve continuous flight trajectory adjustment and path tracking.

[0047] Optionally, the construction of an independently trained prior policy network and freezing of parameters specifically includes:

[0048] Historical trajectory data of autonomous flight missions in tunnel environment are acquired, and risk tensor, three-dimensional pose fusion result and action command corresponding to each sampling moment are extracted. Based on the linear velocity change amplitude, angular velocity change amplitude and pose change amount of adjacent sampling moments, the screening criteria are set. After removing abnormal trajectories with abrupt change characteristics, state-action mapping sample pairs are constructed to form an offline behavior dataset.

[0049] The behavior cloning algorithm is used to supervise the training of the offline behavior dataset. The state-action mapping sample pairs are input into the feedforward neural network. The residual loss between the action probability distribution output by the feedforward neural network and the probability distribution corresponding to the sample action is calculated. The network weight parameters are updated through backpropagation to obtain an initial prior policy network with policy approximation capability.

[0050] During training, an action distribution smoothing loss term and an output entropy regularization term are introduced into the loss function. By constraining the change in network weight parameters during adjacent training iterations, the output distribution range of the prior policy network is controlled.

[0051] After training is completed, the neural network weight parameters of the prior policy network are locked, and the backpropagation update process is turned off in the deep reinforcement learning framework, retaining only the forward inference computation path;

[0052] Before each navigation decision, the current state vector is input into the prior policy network with locked parameters, and forward propagation calculation is performed to generate a static action probability distribution.

[0053] Extract the policy entropy value of the current master policy network output action distribution, combine it with the position and heading angle components in the state covariance corresponding to the 3D pose fusion result, calculate the dynamic fusion weight, and apply the dynamic fusion weight to the static action probability distribution and the master policy distribution respectively to generate the final action policy distribution.

[0054] Optionally, the introduction of an adaptive decay factor based on dynamic adjustment of state uncertainty and action entropy specifically includes:

[0055] Based on the 3D pose fusion results, the state covariance matrix of the extended state vector is obtained, and the uncertainty components representing the planar position coordinates and heading angle are extracted from it to calculate the uncertainty index of the current state.

[0056] Calculate the policy entropy of the action probability distribution output by the Actor subnetwork to quantify the degree of divergence of the current action distribution;

[0057] An adaptive decay factor function is constructed, with the state uncertainty index and policy entropy as joint input variables. The decay factor is generated in the form of a nonlinear monotonic function, and the numerical range of the factor is limited to [0,1] to control the degree of retention of the main policy distribution.

[0058] The decay factor is numerically multiplied with the main policy distribution, and then fused with the complementary factor-weighted prior policy distribution to generate the final action policy distribution.

[0059] The beneficial effects of this invention are:

[0060] (1) Improve positioning accuracy and map building quality. By introducing axial information entropy weights into the improved scan matching objective function of Hector SLAM, and superimposing IMU angular velocity and UWB distance constraints, the stability and robustness of pose estimation in the narrow tunnel environment are enhanced. At the same time, the reflection intensity and distance threshold are combined to filter out noise points, thereby improving the accuracy of the two-dimensional occupancy grid map.

[0061] (2) Enhance the visual increment estimation capability under low light conditions. Adopt the feature extraction method based on histogram equalization and dynamic threshold, combined with FAST-LK optical flow tracing and consistency verification mechanism, construct feature point optical flow motion model, improve the image registration effect in low light environment such as tunnels, and ensure the continuity and accuracy of visual odometry.

[0062] (3) Improve the stability and adaptability of flight control strategy, construct an improved A3C structure that integrates the main strategy network and the frozen prior strategy network, introduce an adaptive decay mechanism based on attitude uncertainty and strategy entropy, dynamically balance historical experience and real-time strategy, output continuous control commands, and realize stable and efficient flight path planning and action generation. Attached Figure Description

[0063] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0064] Figure 1 This is a module connection diagram of a machine learning-based autonomous flight system for tunnel unmanned aerial vehicles proposed in this invention.

[0065] Figure 2 This is a schematic diagram of the scanning and matching objective function structure of the improved HectorSLAM algorithm for an autonomous flight system of a tunnel UAV based on machine learning, as proposed in this invention.

[0066] Figure 3 This is a flowchart of the three-dimensional pose fusion process of an unscented Kalman filter for an autonomous flight system of a tunnel UAV based on machine learning, as proposed in this invention.

[0067] Figure 4 This is a schematic diagram of an improved A3C control structure for an autonomous flight system of a tunnel UAV based on machine learning, as proposed in this invention. Detailed Implementation

[0068] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0069] refer to Figure 1-4 An autonomous flight system for tunnel unmanned aerial vehicles based on machine learning, comprising:

[0070] The multi-sensor data acquisition and preprocessing module is used to acquire data from multiple sensors and perform preprocessing to generate a multi-sensor preprocessed data set.

[0071] An improved Hector SLAM localization module is used to input preprocessed data, perform scan matching with axial information entropy weights and multi-source constraints, and output a two-dimensional occupancy grid map and an initial estimate of horizontal pose.

[0072] The low-light visual increment estimation module is used to perform histogram equalization, adaptive thresholding and FAST-LK optical flow tracing on visual data and output visual increment displacement.

[0073] The unscented Kalman filter fusion module is used to fuse the initial horizontal pose estimation, visual incremental displacement, IMU and UWB measurements, and output the 3D pose fusion result in the extended state vector.

[0074] The risk tensor construction module is used to update the two-dimensional occupancy grid map, calculate the distance transformation map and reachability mask, and concatenate them to generate a three-channel risk tensor.

[0075] An improved A3C strategy control module was used to input the risk tensor and the fusion result of 3D pose, fuse the prior strategy and the main strategy, and output linear velocity and angular velocity control commands.

[0076] The flight control and data acquisition module is used to execute control commands to drive the UAV to fly, collect infrared images and environmental data, and combine them with three-dimensional pose to generate inspection reports.

[0077] In this embodiment, the modules are interconnected using the following method:

[0078] S1. Acquire multi-sensor data and perform preprocessing to generate a multi-sensor preprocessed data set; S2. Input the multi-sensor preprocessed data set into the improved Hector SLAM algorithm, introduce axial information entropy weights into the scan matching objective function, and superimpose inertial measurement unit angular velocity constraints and ultra-wideband distance constraints. Simultaneously, use distance thresholds and reflection intensity thresholds to jointly filter out noise points, outputting a two-dimensional occupancy grid map and an initial horizontal pose estimate; S3. Perform histogram equalization, adaptive thresholding, and FAST-LK optical flow tracing on the visual data to generate a low-light optimized visual incremental displacement; S4. Input the initial horizontal pose estimate, low-light optimized visual incremental displacement, inertial measurement unit data, and ultra-wideband distance data into an unscented Kalman filter, outputting a three-dimensional pose fusion result; S5. Based on the three-dimensional pose fusion... The results are combined to update the 2D occupancy grid map, calculate the distance transformation map and generate an accessibility mask, and stitch the 2D occupancy grid map, distance transformation map and accessibility mask together to construct a risk tensor; S6, the risk tensor and the 3D pose fusion result are input into an improved A3C deep reinforcement learning network, and the prior strategy is dynamically fused using an adaptive decay factor and continuous linear velocity command and angular velocity command are output through a nonlinear mapping from distance difference to angular velocity; S7, the UAV is driven to fly according to the continuous linear velocity command and angular velocity command, and infrared images, temperature and humidity data and gas concentration data are collected in real time and uploaded in a package with the 3D pose fusion result to generate a tunnel inspection report.

[0079] In this embodiment, the multi-sensor data in step S1 includes lidar data, visual data, inertial measurement unit data, and ultra-wideband data; the preprocessing includes time synchronization, noise reduction, and coordinate calibration.

[0080] In this embodiment, the improved Hector SLAM algorithm in step S2 includes the following operations:

[0081] The lidar scan frame is converted to polar coordinates, and the scan angular domain is divided into several local sectors at fixed angular intervals. The directional distribution frequency of the laser beam within each local sector is statistically analyzed, normalized, and the directional probability distribution is calculated. The directional distribution entropy is calculated for each local sector; this entropy is the Shannon entropy of the directional probability distribution within that sector. The normalized entropy value is used as the axial information entropy weight for the laser point in the current sector. This axial information entropy weight is used as the residual weighting factor for each laser point in the scanning matching objective function, constructing a laser matching main objective function based on the weighted sum of squared residuals. The current data is obtained from the inertial measurement unit. The angular velocity data at each instant is used to construct an angular velocity residual term with the attitude change at the previous instant. This angular velocity residual term is then superimposed into the scan matching objective function. The distance measurement data between the current frame and the reference anchor point is obtained from the ultra-wideband module and used to construct a distance residual term with the relative displacement estimated from the laser frame. This distance residual term is then superimposed into the scan matching objective function. The laser point cloud is traversed, and the Euclidean distance between any laser point and its adjacent points before and after it is calculated. If the distance is greater than a set distance threshold, it is marked as a distance anomaly point. At the same time, the reflection intensity of the laser point is read. If the reflection intensity is lower than a set reflection intensity threshold, it is marked as a low confidence point. Laser points that meet any of these conditions are removed from the current frame.

[0082] In this embodiment, to improve the stability and anti-drift capability of lidar pose estimation in tunnel scenarios, an improved Hector SLAM scan matching algorithm based on multi-source observation constraints and orientation entropy weighting is proposed. The algorithm optimizes the inter-frame matching relationship between the laser frame and the two-dimensional occupancy grid map by constructing a joint objective function that fuses orientation distribution information entropy weights, inertial measurement unit angular velocity constraints, and ultra-wideband distance constraints. Assuming the current laser frame contains... The effective laser points retained after threshold filtering are given, and the pose to be estimated in the current frame is... The scanning matching objective function constructed in this invention is expressed as follows:

[0083] ;

[0084] in, For the first The observation location of each laser point For the pose of this point Downmap to the matching location on the map, The weighting coefficients for axial information entropy. For the current frame's IMU angular velocity observation, , The heading angle between the current frame and the previous frame. The current frame's UWB ranging value. for position The corresponding spatial translation vector, The preset UWB anchor point location in the map, , This is the weighting coefficient for the angular velocity residual and the distance residual;

[0085] Axial information entropy weighting coefficient To enhance the influence of directional structural information in matching, the polar coordinate angular domain is divided into several fixed-angle sectors. The directional distribution frequency of laser points in each sector is statistically analyzed and normalized to form a directional probability distribution. Then calculate the Shannon entropy: Normalizing the entropy value yields the weighting factor for the final laser point: ;in, and Preset the lower and upper bounds of the directional entropy. To prevent division by zero errors, the angular velocity residual term and the distance residual term, and the IMU angular velocity constraint term are constructed as follows: The UWB distance constraint term is constructed as follows:

[0086] ;

[0087] The aforementioned residual terms are respectively added to the overall objective function to form the final optimization objective. Before executing the above optimization objective function, the system first performs the following double-threshold preprocessing on the laser point cloud, setting the distance threshold based on Euclidean distance. Laser points with abrupt changes in distance from previous and subsequent points are removed, and an intensity threshold is set based on the laser point reflection intensity. Low-intensity, low-confidence points are eliminated, and only laser points that have passed the double screening are retained to participate in the matching optimization. The retained laser points are subjected to Gaussian-Newton optimization under the scanning matching objective function to output the initial horizontal pose estimate of the current frame. The two-dimensional occupancy grid map is updated based on the initial horizontal pose estimate. Specifically, the residuals of all laser points and the residuals of external sensors are first unified into a total residual vector. The derivative of the vector with respect to the pose variable is taken to form a Jacobian matrix. Then, a normal equation system is constructed. In each iteration, the pose increment is solved and the current estimated pose is updated until the residual converges or the maximum number of iterations is reached, and the initial horizontal pose estimate of the current frame is output. The update of the two-dimensional occupancy grid map based on the initial horizontal pose estimate means that the filtered laser points are transformed into two-dimensional rigid bodies using the optimized current frame pose and mapped to the global map coordinate system. According to the grid position of each landing point in the map, the occupancy probability of the corresponding grid is updated. At the same time, the idle probability of the grids crossed on the laser beam path is updated. Finally, the updated two-dimensional occupancy grid map is generated as a reference map for laser frame matching, ensuring that the mapping process and pose estimation are coordinated and closed-loop.

[0088] In this embodiment, step S3 specifically includes:

[0089] The continuous image frames acquired by the vision sensor are converted into grayscale images, and histogram equalization is performed.

[0090] The local variance of the image pixels after histogram equalization is statistically analyzed. A global dynamic threshold is calculated based on the local variance. The image is then subjected to pixel-level binary processing using the global dynamic threshold. FAST feature points are extracted from the binary processed image.

[0091] In this invention, calculating the global dynamic threshold based on local variance refers to performing sliding window processing on the histogram-equalized grayscale image, setting a local window of a fixed size (e.g., ...). or In each local window, the variance of pixel grayscale values ​​is calculated. The mean and standard deviation of the variance values ​​across all local windows are then calculated for the entire image. The statistical results are used to construct an adaptive thresholding model for the entire image. Specifically, a global dynamic threshold is set. The calculation formula is ;in, This represents the average variance of all local windows. This represents the standard deviation of the variance of all local windows. This is an empirical weighting factor, typically taking values ​​within a certain range. Ultimately, this global dynamic threshold is used. Perform pixel-level binary processing on the image to enhance the image response capability of low-contrast edge areas in low-light environments.

[0092] An image pyramid is constructed, and the Lucas-Kanade optical flow method is used to perform step-by-step tracking between the pyramid levels of two consecutive frames of images to calculate the sub-pixel level coordinate offset of each FAST feature point.

[0093] Specifically, in this invention, two consecutive frames of images are first constructed into a multi-layer image pyramid structure by Gaussian blurring and downsampling, with each layer being half the size of the previous layer, typically three to four layers are constructed. On the top layer image, a coarse correspondence of FAST feature points is initialized with a large pixel interval. A sparse optical flow tracing method is used to iteratively calculate the gray-level difference by minimizing the local window along the image gradient direction for each feature point in the current layer, obtaining a pixel-level displacement vector. The tracking results are passed down layer by layer as a reference for the initial position of the next layer, refining the tracking process in higher-resolution images. Through continuous fine-tuning of each layer's image in spatial scale, sub-pixel-level coordinate offset results for each feature point are finally obtained in the original resolution image at the bottom layer, constructing a high-precision optical flow displacement estimate.

[0094] The optical flow displacement vectors of all FAST feature points between the current frame and the previous frame are statistically analyzed. The spatial distribution weights are calculated based on the pixel coordinates of each feature point in the image plane. The displacement vectors are weighted and summed to construct an overall optical flow motion model of the feature points.

[0095] The average displacement of feature points in the current image frame relative to the previous frame is calculated based on the overall optical flow motion model to generate visual incremental displacement.

[0096] Perform reverse tracking verification on the feature point set, compare the residuals of the forward tracking displacement and the reverse tracking displacement, remove feature points whose residuals are greater than the preset consistency threshold, remove feature points located within the preset width range of the image edge, and recalculate the visual increment displacement.

[0097] The verified visual increment displacement is sent as the observation input to the unscented Kalman filter.

[0098] In this embodiment, step S4 specifically includes:

[0099] An extended state vector containing position, velocity, attitude Euler angles, acceleration bias, and angular velocity bias is constructed, and a nonlinear integral function based on the angular velocity and linear acceleration input of the inertial measurement unit is set as the state transition model.

[0100] In this embodiment, the unscented Kalman filter constructs an extended state vector from the three-dimensional position, velocity, attitude, acceleration bias, and angular velocity bias. Based on the angular velocity and linear acceleration output by the inertial measurement unit in the current frame, the state is propagated forward through nonlinear integrals. Specifically, the angular velocity and acceleration are first biased and corrected. After the acceleration is transformed to the world coordinate system, first-order integrals are performed on the velocity and position, and Euler angle integrals are performed on the attitude to update it, thus constructing the evolution trajectory of the state over a continuous time period. At the same time, process noise diffusion modeling is introduced into the acceleration bias and angular velocity bias to form a complete state transition function. In each filtering cycle, the unscented Kalman filter uses a σ-point sampling strategy to propagate this function, generating the state prediction mean and covariance, providing a nonlinear prior for multi-source observation fusion.

[0101] Based on the current state estimate and state covariance matrix, a symmetric distribution sampling strategy is used to generate a set of σ points. The σ points are then input into the state transition model through unscented transformation and propagated to calculate the predicted state mean and predicted state covariance.

[0102] Extract the initial horizontal pose estimate and visual incremental displacement, combine them to construct a vision-laser joint observation, and set the observation function to map the position and attitude components in the extended state vector into relative displacement changes.

[0103] Obtain the distance measurement value output by the ultra-wideband module, and set the Euclidean distance equation between the current frame position coordinates and the preset anchor point coordinates as the ultra-wideband observation function;

[0104] In this invention, the observation function refers to a nonlinear observation model that reflects the relative displacement between the current frame and the previous frame, constructed based on the estimated position and attitude values ​​in the current state vector. Specifically, the planar position component and heading angle component are extracted from the extended state vector, and their difference from the previous frame's state is calculated to form a three-dimensional observation, which is used to correspond to the visual incremental displacement and establish a matching relationship between position-attitude and inter-frame motion of the image. Based on this, the ultra-wideband observation function refers to a ranging observation model constructed based on the three-dimensional Euclidean distance between the current position component in the extended state vector and the coordinates of a preset ultra-wideband anchor point. The residual between the predicted state value and the UWB measurement value is calculated through the model to achieve constraint correction of the position state. Both observation functions participate in the observation prediction and Kalman gain calculation process by propagating an unscented transform through the σ point, ensuring consistency and accuracy improvement of multi-source observations in filtering fusion.

[0105] Perform an unscented transformation on the observation pair at point σ to generate the observation mean, observation covariance, and cross covariance between the state and the observation;

[0106] The Kalman gain is calculated based on the predicted state covariance, observation covariance, and cross covariance. The Kalman gain is then used to correct and update the predicted state mean and predicted state covariance, and the updated extended state vector is output as the 3D pose fusion result.

[0107] In this embodiment, the calculation of Kalman gain refers to the completion of... After the point propagates in the state space and observation space, the predicted state covariance, observation covariance, and state-observation cross-covariance are calculated respectively. The Kalman gain matrix is ​​obtained according to the unscented Kalman filter formula. Let the predicted state covariance be... The observed covariance is The cross-covariance between state and observation is The Kalman gain calculation formula is: The aforementioned correction and update refers to using Kalman gain to perform a linear weighted correction on the mean of the predicted state, while simultaneously updating the covariance of the predicted state; let the mean of the predicted state be... The actual observed value is The observed and predicted mean is The corrected state estimate and covariance are calculated as follows:

[0108] ;

[0109] ;

[0110] The correction results form an updated extended state vector and state covariance matrix, which serve as the optimal state estimate under the current filtering cycle. The output is used as the three-dimensional pose fusion result, providing a stable input for path planning and control. By fusing multi-source observation residual information, dynamic correction of position, velocity and attitude estimation is achieved, improving the navigation accuracy and robustness of the system in low-light and GNSS-free environments.

[0111] In this embodiment, step S5 specifically includes:

[0112] Extract the planar position coordinates and heading angle from the 3D pose fusion result, and transform the 2D landing point set collected by the current frame of the lidar from the UAV body coordinate system to the global map coordinate system based on the 2D rigid body transformation matrix;

[0113] The converted laser impact points are mapped to two-dimensional grid cells. The occupancy probability of the impact point grid is updated using a log-odds accumulation method, while simultaneously reducing the occupancy probability of the grid cells traversed by the line connecting the laser emission point and the impact point, generating an updated two-dimensional occupancy grid map. Specifically, for the grid cell where the laser beam impacts, its log-odds value is weighted and accumulated with a positive update amount to improve its occupancy confidence; while the idle grid cells traversed by the laser beam path are accumulated with a negative update amount to reduce their occupancy probability. This achieves incremental mapping updates of the grid state, avoiding the numerical underflow problem caused by direct probability value multiplication and enhancing the numerical stability and continuity of map updates.

[0114] The process involves traversing the free grid cells in a 2D occupancy grid map, calculating the Euclidean distance between the center of each free grid cell and the center of the nearest occupied grid cell using a distance transformation algorithm, and filling the distance values ​​into the corresponding grid cells to construct a 2D distance transformation map. During the generation of the distance transformation map, the Euclidean distance transformation algorithm is used to traverse each grid cell marked as free, calculate the minimum Euclidean distance between it and the nearest grid cell marked as "occupied," and fill this distance into the distance map as the current grid cell's value. The generated distance transformation map reflects the shortest safe distance from each point in space to obstacles, which helps to introduce spatial margin control and improve path smoothness and safety.

[0115] Based on the occupancy probability distribution of the two-dimensional occupancy grid map and the preset threshold judgment rules, passable connected areas are extracted, valid mask values ​​are assigned to the grids within the areas, and invalid mask values ​​are assigned to non-connected areas or areas with known obstacles, thereby generating an accessibility mask map.

[0116] Using a two-dimensional occupancy grid map as the first channel, a distance transformation map as the second channel, and an accessibility mask map as the third channel, a channel stitching operation is performed at the same grid space scale to generate a three-channel risk tensor.

[0117] In this embodiment, step S6 specifically includes:

[0118] Construct a state input vector containing a risk tensor, current position coordinates, heading angle, and historical action sequence, and input it into the shared feature extraction subnetwork;

[0119] In the shared feature extraction subnetwork, a convolutional structure is used to extract the spatial semantic features of the risk tensor, which are then concatenated with the 3D pose fusion result to form a fusion state feature. This feature is then input into a gated recurrent unit to model the temporal dependency of action decisions and outputs a policy embedding.

[0120] The policy is embedded and fed into several parallel Actor subnetworks and Critic subnetworks respectively. The Actor subnetworks output the probability distribution of candidate actions in the current state, and the Critic subnetworks output the value estimate of the corresponding state.

[0121] Based on policy stability and historical task experience, an independently trained prior policy network is constructed and its parameters are frozen. The current state is then input into the prior policy network to generate a static action distribution.

[0122] An adaptive decay factor based on dynamic adjustment of state uncertainty and action entropy is introduced between the action probability distribution output by the Actor sub-network and the output of the prior policy network to generate the final action policy distribution.

[0123] The optimal action number is selected from the fused action strategy distribution, decoded into the target linear velocity and target distance difference, and the distance difference is mapped into the target angular velocity through a set nonlinear mapping function to generate continuous linear velocity and angular velocity commands.

[0124] In this embodiment, to achieve accurate tracking of the navigation path by the UAV in a tunnel scenario, the present invention employs an angular velocity mapping mechanism based on a nonlinear function design. This mechanism converts the lateral distance difference between the current position and the target point into a continuous and smooth angular velocity control command. The nonlinear mapping method dynamically adjusts the angular velocity output amplitude according to the magnitude of the distance difference, and has the following characteristics:

[0125] When the distance difference between the current position of the drone and the target point is small, the angular velocity output by the system changes approximately linearly, allowing the drone to quickly complete small angle correction operations and improve the flexibility of edge-flying.

[0126] As the distance difference gradually increases, the system will gradually slow down the rate of increase in angular velocity and enter a buffer adjustment phase to prevent the angular velocity from increasing sharply due to excessive difference, thus avoiding violent deflection and attitude instability of the UAV.

[0127] When the distance difference reaches the set limit range, the system limits the angular velocity output to the preset upper limit to ensure the safety and stability of flight control and avoid the risk of collision caused by sudden sharp turns;

[0128] The nonlinear mapping function uses the distance difference as the input variable and controls the angular velocity output through an internal smoothing adjustment mechanism to achieve flexible tracking and continuous control of the navigation trajectory, thereby improving the control smoothness and safety redundancy in tunnel flight scenarios.

[0129] Continuous linear velocity and angular velocity commands are sent to the flight control interface to control the tunnel UAV to achieve continuous flight trajectory adjustment and path tracking.

[0130] In this embodiment, the step of constructing an independently trained prior policy network and freezing the parameters specifically includes:

[0131] Historical trajectory data of autonomous flight missions in tunnel environment are acquired, and risk tensor, three-dimensional pose fusion result and action command corresponding to each sampling moment are extracted. Based on the linear velocity change amplitude, angular velocity change amplitude and pose change amount of adjacent sampling moments, the screening criteria are set. After removing abnormal trajectories with abrupt change characteristics, state-action mapping sample pairs are constructed to form an offline behavior dataset.

[0132] The behavior cloning algorithm is used to supervise the training of the offline behavior dataset. The state-action mapping sample pairs are input into the feedforward neural network. The residual loss between the action probability distribution output by the feedforward neural network and the probability distribution corresponding to the sample action is calculated. The network weight parameters are updated through backpropagation to obtain an initial prior policy network with policy approximation capability.

[0133] During training, an action distribution smoothing loss term and an output entropy regularization term are introduced into the loss function. By constraining the change in network weight parameters during adjacent training iterations, the output distribution range of the prior policy network is controlled. Specifically, after each training iteration, the mean square change between all network weight parameters in the current iteration and the corresponding parameters in the previous iteration is calculated. If the mean square change exceeds a preset threshold, gradient pruning or dynamic adjustment of the learning rate is performed to control the weight update amplitude within a stable range. By limiting the weight update rate between adjacent training steps, the network output distribution is prevented from oscillating violently between consecutive samples, thereby enabling the prior policy network to have higher action distribution consistency and stability during the inference phase.

[0134] After training is completed, the neural network weight parameters of the prior policy network are locked, and the backpropagation update process is turned off in the deep reinforcement learning framework, retaining only the forward inference computation path;

[0135] Before each navigation decision, the current state vector is input into the prior policy network with locked parameters, and forward propagation calculation is performed to generate a static action probability distribution.

[0136] Extract the policy entropy value of the current master policy network output action distribution, combine it with the position and heading angle components in the state covariance corresponding to the 3D pose fusion result, calculate the dynamic fusion weight, and apply the dynamic fusion weight to the static action probability distribution and the master policy distribution respectively to generate the final action policy distribution.

[0137] In this embodiment, within each navigation decision cycle, the action probability distribution corresponding to the current state is first obtained from the output layer of the main strategy network. By statistically calculating the action probability distribution, the strategy entropy value, which reflects the dispersion of the strategy distribution, is obtained. The strategy entropy value is used to characterize the decision uncertainty of the current main strategy network in the current state. The covariance components corresponding to the planar position coordinates and heading angle are extracted from the state covariance matrix output by the unscented Kalman filter. The covariance components are used to quantify the spatial positioning uncertainty of the current three-dimensional pose fusion result.

[0138] The policy entropy value and pose covariance component are used as inputs, and dynamic fusion weights are calculated according to preset weight scheduling rules. When the policy entropy value or pose uncertainty is high, the participation ratio of the prior policy network in action decision-making is increased; when the policy entropy value and pose uncertainty are low, the dominant weight of the output of the main policy network is increased. Based on the dynamic fusion weights, the static action probability distribution generated by the frozen prior policy network and the action probability distribution generated by the main policy network are weighted and combined to form the normalized final action policy distribution.

[0139] In this embodiment, the introduction of an adaptive decay factor based on dynamic adjustment of state uncertainty and action entropy specifically includes:

[0140] Based on the 3D pose fusion results, the state covariance matrix of the extended state vector is obtained, and the uncertainty components representing the planar position coordinates and heading angle are extracted from it to calculate the uncertainty index of the current state.

[0141] Calculate the policy entropy of the action probability distribution output by the Actor subnetwork to quantify the degree of divergence of the current action distribution;

[0142] An adaptive decay factor function is constructed, with the state uncertainty index and policy entropy as joint input variables. The decay factor is generated in the form of a nonlinear monotonic function, and the numerical range of the factor is limited to [0,1] to control the degree of retention of the main policy distribution.

[0143] The decay factor is numerically multiplied with the main policy distribution, and then fused with the complementary factor-weighted prior policy distribution to generate the final action policy distribution.

[0144] In this embodiment, during the action policy fusion process, an adaptive decay factor mechanism is designed to control the proportion of the main policy distribution in order to achieve dynamic weight adjustment of the outputs of the main policy network and the prior policy network. Specifically, the fusion weight is calculated based on the uncertainty index of the current state and the policy entropy value, where the decay factor value is limited to the interval [0,1]. When the state uncertainty is high or the main policy distribution is highly divergent (i.e., the policy entropy value is large), the system will generate a smaller decay factor to reduce the weight of the main policy distribution in the fusion, enhance the dependence on the prior policy distribution, and improve the stability and safety of the navigation policy. When the state is relatively stable and the main policy output tends to converge, the system allocates a larger decay factor value to retain the dominant position of the main policy distribution and maintain the responsiveness and execution efficiency of the policy. In this way, the decay factor dynamically retains and adjusts the main policy distribution under different environmental states, constructing a balance mechanism between fusion stability and adaptability.

[0145] Example 1:

[0146] To verify the feasibility of this invention in practice, it was applied to a typical tunnel inspection scenario. This scenario is characterized by a long and narrow space, simple geometric structure, insufficient lighting, lack of external positioning signals, and significant changes in environmental parameters. For a long time, the situation has relied on manual inspection for condition assessment, which has problems such as low efficiency, high risk, and scattered information collection.

[0147] In practical applications, after the UAV enters the tunnel, it first initiates a multi-sensor data acquisition and preprocessing process, simultaneously acquiring lidar scanning data, visual image data, inertial measurement unit data, and ultra-wideband distance data. The acquired data undergoes time synchronization, noise suppression, and coordinate calibration processing to generate a multi-sensor preprocessed data set. This preprocessed data set is then input into an improved Hector SLAM positioning process. During the scanning and matching process, axial information entropy weights are introduced, and inertial measurement unit angular velocity constraints and ultra-wideband distance constraints are superimposed. Simultaneously, distance thresholds and reflection intensity thresholds are jointly applied to the laser points to suppress pseudo-matching problems caused by wall reflections and structural repetition in the tunnel environment, outputting a stable two-dimensional occupancy grid map and initial horizontal pose estimation results.

[0148] Under low-light conditions in tunnels, visual data is prone to problems such as insufficient contrast and texture degradation. In this embodiment, histogram equalization and adaptive thresholding are performed on the visual data. Based on this, FAST feature points are extracted, and Lucas-Kanade optical flow tracing is performed through a multi-layer image pyramid structure to construct an overall optical flow motion model of the feature points, generating low-light optimized visual incremental displacement. The visual incremental displacement, along with the initial horizontal pose estimation, inertial measurement unit data, and ultra-wideband distance data, are input into an unscented Kalman filter to construct an extended state vector containing position, velocity, attitude, and bias terms. Through unscented transformation and state update processes, a continuous and stable 3D pose fusion result is output.

[0149] Based on the 3D pose fusion results, the 2D occupancy grid map is continuously updated. The distance transformation map and reachability mask are calculated in the map space. The 2D occupancy grid map, distance transformation map, and reachability mask are stitched together at the same spatial scale to generate a risk tensor. The risk tensor and the 3D pose fusion results are used as state inputs and fed into the improved A3C deep reinforcement learning policy network. In the policy inference stage, the output of the main policy network and the frozen prior policy network output are dynamically fused through an adaptive decay factor. Combined with the nonlinear mapping relationship from distance difference to angular velocity, continuous linear velocity commands and angular velocity commands are output to control the autonomous flight of the UAV in the tunnel environment.

[0150] During flight, the UAV completes path tracking and attitude adjustment according to the control commands, while simultaneously collecting infrared image data, temperature and humidity data, and gas concentration data in real time. The inspection data is associated with and packaged with the corresponding three-dimensional pose fusion results and uploaded to form a structured tunnel inspection data record. By comparing the traditional single-sensor positioning method with the control method without introducing a strategy fusion mechanism, the improvements of this invention in positioning accuracy, flight stability, and inspection data integrity can be observed.

[0151] In multiple consecutive flight tests, the cumulative drift in the axial direction of the 2D occupancy grid map constructed based on multi-sensor fusion and an improved SLAM algorithm was significantly reduced. The 3D pose fusion result remained stable under long-distance flight conditions, and the smoothness of the flight path was effectively improved. The improved A3C strategy control mechanism was able to maintain stable action output even in the presence of path uncertainty and environmental disturbances, avoiding frequent speed changes and heading oscillations. Infrared imagery and environmental parameter data were continuously acquired throughout the flight, and the inspection data corresponded one-to-one with the spatial pose information. To verify the beneficial effects of this invention in implementation, the key performance indicators before and after the introduction of the technical solution of this invention were compared and analyzed. The relevant statistical results are shown in Table 1 below.

[0152] Table 1: Comparison of Autonomous Flight and Inspection Performance of Tunnel UAVs Comparison indicators Traditional methods Method of the present invention Planar positioning cumulative error The values ​​are large and show significant drift. The value decreased, and the drift was controlled. 3D pose continuity There is a jump phenomenon State Continuous Smooth Number of feature points under low light conditions Significantly reduced Maintain stability Flight path smoothness Frequent revisions exist Path continuous and stable Control command fluctuation range Large fluctuations Fluctuations decreased Autonomous flight success rate medium level Significant improvement Infrared image integrity There are discontinuities Continuous and complete Correlation between environmental data and pose Unstable association One-to-one correspondence Inspection data availability lower Significantly improved

[0153] In terms of positioning accuracy, this invention reduces the cumulative error of planar positioning and suppresses long-term drift by introducing an improved Hector SLAM algorithm and a multi-sensor data fusion mechanism. The state update in the 3D pose estimation process is continuous, avoiding the pose jump problem common in traditional methods, and providing a stable foundation for path planning and control command generation.

[0154] In terms of visual perception, by enhancing visual data in low light and tracing optical flow through a multi-layer pyramid, this invention can still extract a stable set of feature points in tunnel environments with insufficient lighting conditions, ensuring the availability and accuracy of visual displacement estimation and improving the robustness of the overall navigation system.

[0155] In terms of control performance, by combining the improved A3C deep reinforcement learning structure with the prior policy fusion mechanism, the fluctuation amplitude of flight control commands is reduced and the path smoothness is significantly enhanced; the speed and heading changes during flight are more continuous and stable, reducing flight energy consumption and improving control safety.

[0156] Regarding inspection data acquisition capabilities, the improved stability of the control system and the reliability of pose estimation enable continuous acquisition of infrared images and environmental sensor data without any gaps between data frames, ensuring the spatiotemporal integrity of data throughout the inspection process. Furthermore, the 3D pose output by the fusion results establishes a one-to-one correspondence with the acquired data, making data tracing and spatial analysis more efficient.

[0157] In summary, this invention comprehensively improves positioning accuracy, control stability, and information acquisition integrity in tunnel unmanned aerial vehicle (UAV) autonomous flight and intelligent inspection tasks, demonstrating good engineering application value.

[0158] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A machine learning-based autonomous flight system for tunnel unmanned aerial vehicles, characterized in that, include: The multi-sensor data acquisition and preprocessing module is used to acquire data from multiple sensors and perform preprocessing to generate a multi-sensor preprocessed data set. An improved Hector SLAM localization module is used to input preprocessed data, perform scan matching with axial information entropy weights and multi-source constraints, and output a two-dimensional occupancy grid map and an initial estimate of horizontal pose. The low-light visual increment estimation module is used to perform histogram equalization, adaptive thresholding and FAST-LK optical flow tracing on visual data and output visual increment displacement. The unscented Kalman filter fusion module is used to fuse the initial horizontal pose estimation, visual incremental displacement, IMU and UWB measurements, and output the 3D pose fusion result in the extended state vector. The risk tensor construction module is used to update the two-dimensional occupancy grid map, calculate the distance transformation map and reachability mask, and concatenate them to generate a three-channel risk tensor. An improved A3C strategy control module was used to input the risk tensor and the fusion result of 3D pose, fuse the prior strategy and the main strategy, and output linear velocity and angular velocity control commands. The flight control and data acquisition module is used to execute control commands to drive the UAV to fly, collect infrared images and environmental data, and combine them with three-dimensional pose to generate inspection reports.

2. The machine learning-based autonomous flight system for tunnel unmanned aerial vehicles according to claim 1, characterized in that, The modules are connected in the following way: S1. Collect multi-sensor data and perform preprocessing to generate a multi-sensor preprocessed data set; S2. Input the multi-sensor preprocessed data set into the improved Hector SLAM algorithm, introduce axial information entropy weights into the scan matching objective function, and superimpose inertial measurement unit angular velocity constraints and ultra-wideband distance constraints. At the same time, use distance thresholds and reflection intensity thresholds to jointly filter out noise points, and output a two-dimensional occupancy grid map and an initial estimate of horizontal pose; S3. Perform histogram equalization, adaptive thresholding, and FAST-LK optical flow tracing on the visual data to generate weak-light optimized visual incremental displacement; S4. Input the initial horizontal pose estimate, low-light optimized visual incremental displacement, inertial measurement unit data, and ultra-wideband distance data into the unscented Kalman filter, and output the three-dimensional pose fusion result; S5. Update the two-dimensional occupancy grid map based on the three-dimensional pose fusion result, calculate the distance transformation map and generate the reachability mask, and stitch the two-dimensional occupancy grid map, distance transformation map and reachability mask together to construct the risk tensor; S6. Input the risk tensor and the 3D pose fusion result into the improved A3C deep reinforcement learning network, use the adaptive decay factor to dynamically fuse the prior strategy and output continuous linear velocity command and angular velocity command through the nonlinear mapping from distance difference to angular velocity. S7. Drive the UAV to fly according to continuous linear velocity and angular velocity commands, collect infrared images, temperature and humidity data and gas concentration data in real time, and upload the three-dimensional pose fusion results to generate a tunnel inspection report.

3. The machine learning-based autonomous flight system for tunnel unmanned aerial vehicles according to claim 2, characterized in that, The multi-sensor data in step S1 includes lidar data, visual data, inertial measurement unit data, and ultra-wideband data; the preprocessing includes time synchronization, noise reduction, and coordinate calibration.

4. The machine learning-based autonomous flight system for tunnel unmanned aerial vehicles according to claim 3, characterized in that, The improved Hector SLAM algorithm in step S2 includes the following operations: The lidar scan frame is converted to polar coordinates, and the scan angular domain is divided into several local sectors at fixed angular intervals. The directional distribution frequency of the laser beam within each local sector is statistically analyzed, normalized, and the directional probability distribution is calculated. The directional distribution entropy is calculated for each local sector; this entropy is the Shannon entropy of the directional probability distribution within the sector. The normalized entropy value is used as the axial information entropy weight for the laser point in the current sector. This axial information entropy weight is used as the residual weighting factor for each laser point in the scanning matching objective function, constructing a laser matching main objective function based on the weighted sum of squared residuals. The current data is obtained from the inertial measurement unit. The angular velocity data at each instant is used to construct an angular velocity residual term with the attitude change at the previous instant. This angular velocity residual term is then superimposed into the scan matching objective function. The distance measurement data between the current frame and the reference anchor point is obtained from the ultra-wideband module and used to construct a distance residual term with the relative displacement estimated from the laser frame. This distance residual term is then superimposed into the scan matching objective function. The laser point cloud is traversed, and the Euclidean distance between any laser point and its adjacent points is calculated. If the distance is greater than a set distance threshold, it is marked as a distance anomaly point. At the same time, the reflection intensity of the laser point is read. If the reflection intensity is lower than a set reflection intensity threshold, it is marked as a low confidence point. Laser points that meet any of these conditions are removed from the current frame. Gaussian-Newton optimization is performed on the retained laser points under the scanning matching objective function to output the initial horizontal pose estimate of the current frame. The two-dimensional occupancy grid map is updated based on the initial horizontal pose estimate.

5. The machine learning-based autonomous flight system for tunnel unmanned aerial vehicles according to claim 4, characterized in that, Step S3 specifically includes: The continuous image frames acquired by the vision sensor are converted into grayscale images, and histogram equalization is performed. The local variance of the image pixels after histogram equalization is statistically analyzed. A global dynamic threshold is calculated based on the local variance. The image is then subjected to pixel-level binary processing using the global dynamic threshold. FAST feature points are extracted from the binary processed image. An image pyramid is constructed, and the Lucas-Kanade optical flow method is used to perform step-by-step tracking between the pyramid levels of two consecutive frames of images to calculate the sub-pixel level coordinate offset of each FAST feature point. The optical flow displacement vectors of all FAST feature points between the current frame and the previous frame are statistically analyzed. The spatial distribution weights are calculated based on the pixel coordinates of each feature point in the image plane. The displacement vectors are weighted and summed to construct an overall optical flow motion model of the feature points. The average displacement of feature points in the current image frame relative to the previous frame is calculated based on the overall optical flow motion model to generate visual incremental displacement. Perform reverse tracking verification on the feature point set, compare the residuals of the forward tracking displacement and the reverse tracking displacement, remove feature points whose residuals are greater than the preset consistency threshold, remove feature points located within the preset width range of the image edge, and recalculate the visual increment displacement. The verified visual increment displacement is sent as the observation input to the unscented Kalman filter.

6. The tunnel unmanned aerial vehicle autonomous flight system based on machine learning according to claim 5, characterized in that, Step S4 specifically includes: An extended state vector containing position, velocity, attitude Euler angles, acceleration bias, and angular velocity bias is constructed, and a nonlinear integral function based on the angular velocity and linear acceleration input of the inertial measurement unit is set as the state transition model. Based on the current state estimate and state covariance matrix, a symmetric distribution sampling strategy is used to generate a set of σ points. The σ points are then input into the state transition model through unscented transformation and propagated to calculate the predicted state mean and predicted state covariance. Extract the initial horizontal pose estimate and visual incremental displacement, combine them to construct a vision-laser joint observation, and set the observation function to map the position and attitude components in the extended state vector into relative displacement changes. Obtain the distance measurement value output by the ultra-wideband module, and set the Euclidean distance equation between the current frame position coordinates and the preset anchor point coordinates as the ultra-wideband observation function; Perform an unscented transformation on the observation pair at point σ to generate the observation mean, observation covariance, and cross covariance between the state and the observation; The Kalman gain is calculated based on the predicted state covariance, observation covariance, and cross covariance. The Kalman gain is then used to correct and update the predicted state mean and predicted state covariance, and the updated extended state vector is output as the 3D pose fusion result.

7. The machine learning-based autonomous flight system for tunnel unmanned aerial vehicles according to claim 6, characterized in that, Step S5 specifically includes: Extract the planar position coordinates and heading angle from the 3D pose fusion result, and transform the 2D landing point set collected by the current frame of the lidar from the UAV body coordinate system to the global map coordinate system based on the 2D rigid body transformation matrix; The converted laser landing point is mapped to a two-dimensional grid cell. The occupancy probability of the landing point grid is updated using the log-odds accumulation method. At the same time, the occupancy probability of the grid through which the line connecting the laser emission point and the landing point passes is reduced, and an updated two-dimensional occupancy grid map is generated. Traverse the free grids in the two-dimensional occupied grid map, calculate the Euclidean distance between the center of each free grid and the center of the nearest occupied grid using a distance transformation algorithm, fill the distance values ​​into the corresponding grids, and construct a two-dimensional distance transformation map. Based on the occupancy probability distribution of the two-dimensional occupancy grid map and the preset threshold judgment rules, passable connected areas are extracted, valid mask values ​​are assigned to the grids within the areas, and invalid mask values ​​are assigned to non-connected areas or areas with known obstacles, thereby generating an accessibility mask map. Using a two-dimensional occupancy grid map as the first channel, a distance transformation map as the second channel, and an accessibility mask map as the third channel, a channel stitching operation is performed at the same grid space scale to generate a three-channel risk tensor.

8. The machine learning-based autonomous flight system for tunnel unmanned aerial vehicles according to claim 7, characterized in that, Step S6 specifically includes: Construct a state input vector containing a risk tensor, current position coordinates, heading angle, and historical action sequence, and input it into the shared feature extraction subnetwork; In the shared feature extraction subnetwork, a convolutional structure is used to extract the spatial semantic features of the risk tensor, which are then concatenated with the 3D pose fusion result to form a fusion state feature. This feature is then input into a gated recurrent unit to model the temporal dependency of action decisions and outputs a policy embedding. The policy is embedded and fed into several parallel Actor subnetworks and Critic subnetworks respectively. The Actor subnetworks output the probability distribution of candidate actions in the current state, and the Critic subnetworks output the value estimate of the corresponding state. Based on policy stability and historical task experience, an independently trained prior policy network is constructed and its parameters are frozen. The current state is then input into the prior policy network to generate a static action distribution. An adaptive decay factor based on dynamic adjustment of state uncertainty and action entropy is introduced between the action probability distribution output by the Actor sub-network and the output of the prior policy network to generate the final action policy distribution. The optimal action number is selected from the fused action strategy distribution, decoded into the target linear velocity and target distance difference, and the distance difference is mapped into the target angular velocity through a set nonlinear mapping function to generate continuous linear velocity and angular velocity commands. Continuous linear velocity and angular velocity commands are sent to the flight control interface to control the tunnel UAV to achieve continuous flight trajectory adjustment and path tracking.

9. The machine learning-based autonomous flight system for tunnel unmanned aerial vehicles according to claim 8, characterized in that, The construction of an independently trained prior policy network and freezing of parameters specifically includes: Historical trajectory data of autonomous flight missions in tunnel environment are acquired, and risk tensor, three-dimensional pose fusion result and action command corresponding to each sampling moment are extracted. Based on the linear velocity change amplitude, angular velocity change amplitude and pose change amount of adjacent sampling moments, the screening criteria are set. After removing abnormal trajectories with abrupt change characteristics, state-action mapping sample pairs are constructed to form an offline behavior dataset. The behavior cloning algorithm is used to supervise the training of the offline behavior dataset. The state-action mapping sample pairs are input into the feedforward neural network. The residual loss between the action probability distribution output by the feedforward neural network and the probability distribution corresponding to the sample action is calculated. The network weight parameters are updated through backpropagation to obtain an initial prior policy network with policy approximation capability. During training, an action distribution smoothing loss term and an output entropy regularization term are introduced into the loss function. By constraining the change in network weight parameters during adjacent training iterations, the output distribution range of the prior policy network is controlled. After training is completed, the neural network weight parameters of the prior policy network are locked, and the backpropagation update process is turned off in the deep reinforcement learning framework, retaining only the forward inference computation path; Before each navigation decision, the current state vector is input into the prior policy network with locked parameters, and forward propagation calculation is performed to generate a static action probability distribution. Extract the policy entropy value of the current master policy network output action distribution, combine it with the position and heading angle components in the state covariance corresponding to the 3D pose fusion result, calculate the dynamic fusion weight, and apply the dynamic fusion weight to the static action probability distribution and the master policy distribution respectively to generate the final action policy distribution.

10. The machine learning-based autonomous flight system for tunnel unmanned aerial vehicles according to claim 9, characterized in that, The introduction of an adaptive decay factor based on dynamic adjustment of state uncertainty and action entropy specifically includes: Based on the 3D pose fusion results, the state covariance matrix of the extended state vector is obtained, and the uncertainty components representing the planar position coordinates and heading angle are extracted from it to calculate the uncertainty index of the current state. Calculate the policy entropy of the action probability distribution output by the Actor subnetwork to quantify the degree of divergence of the current action distribution; An adaptive decay factor function is constructed, with the state uncertainty index and policy entropy as joint input variables. The decay factor is generated in the form of a nonlinear monotonic function, and the numerical range of the factor is limited to [0,1] to control the degree of retention of the main policy distribution. The decay factor is numerically multiplied with the main policy distribution, and then fused with the complementary factor-weighted prior policy distribution to generate the final action policy distribution.