Unmanned aerial vehicle tunnel positioning obstacle avoidance method based on graph neural network

By constructing a graph neural network model, a confidence corridor and a compacted passable area are generated, which solves the problem of insufficient obstacle avoidance safety margin caused by positioning errors in tunnels and realizes safe flight control under uncertain conditions.

CN121720459AInactive Publication Date: 2026-03-24HUNAN UNIV OF SCI & ENG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In tunnel environments, existing technologies cannot avoid positioning errors and cumulative drift, leading to deviations in corridor boundary judgments, which in turn result in insufficient obstacle avoidance safety margins and the risk of collisions with walls. Furthermore, existing methods cannot achieve a balance between safety and passability.

Method used

A graph containing geometric adjacency edges and temporally continuous edges is constructed. The graph neural network is used to output the tunnel centerline and the four-way boundary parameters of the corridor. A confidence corridor is generated by four-way inconsistency scoring and conformal prediction. The compacted passable area is generated by combining anisotropic perturbation sets and Minkowski operations, and then input into the tubular robust model predictive controller for control.

Benefits of technology

It improves the safety and passability of obstacle avoidance in tunnel flight, reduces the risk of collision with the tunnel wall caused by positioning errors and drift, and enhances the environmental constraint stability and robustness under uncertain conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121720459A_ABST
    Figure CN121720459A_ABST
Patent Text Reader

Abstract

The invention discloses an unmanned aerial vehicle tunnel positioning and obstacle avoidance method based on a graph neural network, and aims to solve the problems of wall-attached collision and insufficient obstacle avoidance safety margin caused by boundary judgment errors due to positioning errors or drifting in a narrow space of a tunnel. The method comprises the following steps: acquiring sensor data, constructing a graph containing a geometric adjacency relation edge and a time sequence continuous relation edge, and inputting a graph neural network to output a tunnel center line and corridor four-direction boundary parameters; forming a four-direction non-consistency score based on distance residual errors of four-direction boundary observation and boundary parameters, and performing conformal prediction under the condition of observation quality context features to obtain a four-direction external expansion amount so as to generate a confidence corridor; an anisotropic disturbance set is further constructed based on the external expansion amount, Minkowski sum operation and Minkowski difference operation are executed in combination with an unmanned aerial vehicle body envelope to tighten a passable area, and finally tighten corridor constraint and disturbance constraint are input into a tubular robust model prediction controller to solve a control instruction. The technical effects of safe obstacle avoidance and robust flight control under the condition of uncertain positioning are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of autonomous navigation for unmanned aerial vehicles (UAVs), and more particularly to a method for UAV tunnel positioning and obstacle avoidance based on graph neural networks. Background Technology

[0002] When drones perform inspection, mapping, and emergency search and rescue missions in narrow and confined spaces such as tunnels, utility corridors, and underground passages, they typically need to complete autonomous flight under conditions of lack of satellite signals, drastic lighting changes, repetitive environmental textures, and sparse echoes. Current technologies often employ multi-sensor fusion, including lidar, cameras, and inertial measurement units, to achieve localization and mapping, and then perform path planning and obstacle avoidance control based on this. Obstacle avoidance methods include reactive algorithms based on local maps and constraint optimization methods based on model predictive control. In recent years, with the development of deep learning, research on using learned models to extract environmental structure information from point clouds or images to assist in corridor modeling and navigation has also gradually increased.

[0003] The existing technologies still have the following shortcomings: First, positioning errors and cumulative drift are difficult to avoid in tunnel environments. Planning and control often assume that the state estimation is reliable, which can easily lead to insufficient safety margins and the risk of collisions with the tunnel walls when boundary judgments deviate. Second, the construction of corridor boundaries or passable areas often relies on fixed rules or geometric fitting at a single scale, making it difficult to simultaneously characterize the spatial adjacency relationship and temporal continuity of point clouds, resulting in insufficient stability of corridor extraction under occlusion and sparse observation. Third, existing safety margins often use fixed expansion or empirical thresholds, lacking a directional uncertainty description that is adaptive to observation quality and has statistical confidence guarantees. Furthermore, the connection with constraint compaction in robust control is not tight, making it difficult to achieve a balance between safety and passability.

[0004] Therefore, a method for unmanned aerial vehicle (UAV) tunnel positioning and obstacle avoidance that can overcome the shortcomings of the existing technology is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a UAV tunnel positioning and obstacle avoidance method based on graph neural networks. Addressing the problem that existing technologies inevitably suffer from positioning errors or drift in the narrow space of tunnels, easily leading to deviations in corridor boundary judgments, resulting in insufficient obstacle avoidance safety margins and the risk of collisions against walls, the following technical solution is proposed: Acquire sensor data such as lidar, images, and inertial measurement units; construct a graph containing geometrically adjacent edges and temporally continuous edges, and characterize the observation quality using contextual features; input the graph into a graph neural network to output the tunnel centerline and the four-directional boundary parameters of the corridor; generate a four-directional inconsistency score based on the distance residuals between the four-directional boundary observations and the boundary parameters, and obtain four-directional expansion quantities during conformal prediction conditioned on contextual features to generate directional confidence corridors; construct an anisotropic perturbation set in the tunnel coordinate system based on the expansion quantities, and perform Minkowski sum and difference operations on the UAV body envelope to achieve compaction of the passable area constraints; finally, input the compacted corridor constraints and the anisotropic perturbation set into a tubular robust model predictive controller to solve for control commands. This invention provides a safe corridor and robust feasible region constraint that can still provide statistical confidence under conditions of changes in observation quality and positioning uncertainty, thereby improving the safety and passability of obstacle avoidance during tunnel flight.

[0006] This invention provides a method for unmanned aerial vehicle (UAV) tunnel positioning and obstacle avoidance based on graph neural networks, comprising:

[0007] S1. Acquire sensor data, extract tunnel wall features, obstacle features, and UAV motion state features, construct a graph containing geometric adjacency edges and temporally continuous edges, obtain node sets, edge sets, node features, and edge features, calculate context features representing observation quality based on sensor data, and obtain the current state estimate of the UAV; S2. Input the node sets, edge sets, node features, and edge features into a graph neural network, and output corridor parameters; S3. Obtain corridor four-way boundary observations based on the sensor data, calculate the distance residuals between the four-way boundary observations and the corridor four-way boundary parameters to obtain a four-way inconsistency score, input the four-way inconsistency score into a conformal prediction process conditioned on context features, and obtain the four-way outward expansion corresponding to the four-way boundary; S4. Based on the four-way outward expansion, calculate the corresponding values ​​of the corridor four-way boundary parameters. S5. Expand outwards along the normal directions of the boundaries to obtain the four-directional boundary parameters of the confidence corridor; S6. Establish a tunnel coordinate system based on the tunnel centerline parameters, and construct an anisotropic perturbation set in the tunnel coordinate system based on the four-directional expansion amount; S7. In the tunnel coordinate system, perform a Minkowski sum operation on the anisotropic perturbation set and the pre-determined UAV body envelope to obtain a synthetic occupied set, and perform a Minkowski difference operation on the passable area defined by the four-directional boundary parameters of the confidence corridor and the synthetic occupied set to obtain the passable area of ​​the compacted corridor, and extract the four-directional boundary parameters of the compacted corridor; S8. Use the current state estimate of the UAV as the initial state, use the four-directional boundary parameters of the compacted corridor as the feasible region constraint, and input the anisotropic perturbation set as the perturbation constraint into the tubular robust model predictive controller to solve for the UAV control command.

[0008] Optionally, S1 includes:

[0009] Acquire sensor data collected by the UAV during its flight inside the tunnel, the sensor data including at least lidar point cloud data, image data, and inertial measurement unit data;

[0010] The sensor data is time-aligned and coordinate-transformed to unify the sensor data to the UAV coordinate system or world coordinate system corresponding to the same moment.

[0011] Based on the lidar point cloud data, tunnel wall features and obstacle features are extracted, wherein the tunnel wall features include wall point sets or wall plane parameters, and the obstacle features include obstacle point sets or obstacle geometric envelope parameters.

[0012] Based on the data from the inertial measurement unit, state features are extracted to characterize the motion state of the UAV, and the state features include at least angular velocity features and acceleration features;

[0013] A node set is constructed using the tunnel wall features and the obstacle features, wherein each node corresponds to a segment of wall point set, a set of wall plane parameters, a segment of obstacle point set or a set of obstacle geometric envelope parameters, and a node feature is generated for each node, wherein the node feature includes at least the node's spatial position, geometric size and geometric orientation information;

[0014] A set of edges representing geometric adjacency is constructed based on a spatial distance threshold between nodes, and a set of edges representing temporal continuity is constructed based on the association between nodes at adjacent times. An edge feature is generated for each edge, and the edge feature includes at least the relative displacement and time interval between the nodes at both ends of the edge.

[0015] Contextual features are calculated based on the sensor data. These contextual features include at least point cloud density, image brightness, and a feature quantity index used to characterize the number of traceable features, in order to characterize the current observation quality.

[0016] Based on the inertial measurement unit data, the UAV state is inertially integrated and corrected by combining the sensor data to obtain the current state estimate of the UAV. The current state estimate of the UAV includes at least position, attitude and velocity.

[0017] Terminology definition:

[0018] The graph is a data structure composed of the set of nodes, the set of edges, and attribute information associated with the set of nodes and the set of edges, wherein the attribute information includes the node features and the edge features;

[0019] The spatial distance threshold is a preset upper limit of distance used to determine whether two nodes meet the adjacency condition in space and to establish an edge representing the geometric adjacency relationship accordingly.

[0020] The association between adjacent time nodes is a data association relationship used to characterize the matching relationship between nodes corresponding to the same physical wall segment or the same obstacle in different time frames;

[0021] The feature quantity index is an index or its normalized quantity used to characterize the number of features that can be stably detected and can be correlated or tracked in the image data and / or point cloud data at the current time;

[0022] The observation quality is used to characterize the reliability or sufficiency of the current sensor observations in constraining environmental structure extraction and / or UAV state estimation.

[0023] The inertial integral is an integral calculation process that advances the state of the UAV over time based on inertial measurement unit data;

[0024] The current state estimate of the UAV is an estimate of the UAV's position, attitude, and velocity in a unified coordinate system.

[0025] Optionally, S2 includes:

[0026] The node set, edge set, node features, and edge features are input into the graph neural network. First, the node features are encoded to obtain the initial node representation, and the edge features are encoded to obtain the initial edge representation.

[0027] Based on the set of edges, edge messages are calculated on an edge-by-edge basis, wherein the edge message is determined by the initial node representations of the nodes at both ends of the edge and the corresponding initial edge representations;

[0028] Based on the edge messages, neighborhood aggregation is performed on each node to obtain node aggregation information, and the node aggregation information is used to update the initial node representation to obtain the updated node representation;

[0029] The processes of edge message calculation, neighborhood aggregation, and node update representation generation are iteratively executed a preset number of times to obtain the final node representation;

[0030] The final node representation is read out to generate corridor parameters, which include at least the tunnel centerline parameters, the left boundary parameters of the corridor, the right boundary parameters of the corridor, the upper boundary parameters of the corridor, and the lower boundary parameters of the corridor.

[0031] Terminology definition:

[0032] The graph neural network is a neural network model that takes graph structure data as input, performs message passing along the edges, and updates the node representation. The graph neural network is used to generate corridor parameters that characterize the tunnel corridor structure based on the node set, the edge set, and the corresponding node features and edge features.

[0033] The encoding of node features is a process of converting node features into a fixed-dimensional latent vector representation through linear transformation, nonlinear mapping, and / or embedding networks;

[0034] The encoding of the edge features is a process of converting the edge features into a fixed-dimensional latent vector representation through linear transformation, nonlinear mapping and / or embedding network;

[0035] The initial representation of a node is a node latent vector representation obtained by encoding the node features;

[0036] The initial representation of the edge is a potential vector representation of the edge obtained by encoding the edge features;

[0037] The edge message is a vector generated for information transmission for each edge, wherein the edge message is determined by the node representations of the two ends of the edge and the edge representation of the edge through a preset message function;

[0038] The neighborhood aggregation is a computational process for a target node to aggregate the edge messages corresponding to the edges connected to it, wherein the aggregation includes summation, mean, maximization and / or attention-based weighted aggregation.

[0039] The node aggregation information is the aggregation result vector obtained after performing neighborhood aggregation on the neighborhood edge messages of the target node;

[0040] The node update is represented as a node representation update result obtained by using a preset update function based on the node aggregation information and the node representation of the target node.

[0041] The final node is represented as a node representation obtained by iteratively executing the edge message calculation, the neighborhood aggregation, and the node update representation generation process a preset number of times.

[0042] The readout operation is a process of converting the final node representation into corridor parameters, wherein the readout operation includes pooling and / or outputting parameters through a regression network;

[0043] The corridor parameters are a set of parameters used to characterize the geometry of the tunnel's passable corridor. The corridor parameters include at least the tunnel centerline parameters, as well as the corridor's left side boundary parameters, right side boundary parameters, upper side boundary parameters, and lower side boundary parameters.

[0044] The tunnel centerline parameter is a parameter used to describe the spatial position and orientation of the tunnel corridor centerline. The centerline is a spatial curve or segmented curve located inside the corridor and extending along the tunnel.

[0045] The corridor's four-way boundary parameters are parameters used to describe the geometric positions of the left, right, upper, and lower boundaries of the corridor, respectively. The four-way boundaries are parameterized representations of boundary curves, boundary surfaces, and / or half-space constraints that define the horizontal and vertical passable range of the corridor.

[0046] Optionally, S3 includes:

[0047] Boundary observations are extracted based on sensor data. The boundary observations include at least the left boundary observation corresponding to the left boundary of the corridor, the right boundary observation corresponding to the right boundary of the corridor, the upper boundary observation corresponding to the upper boundary of the corridor, and the lower boundary observation corresponding to the lower boundary of the corridor.

[0048] Based on the corridor parameters, calculate the left distance residual between the left boundary observation and the left boundary parameter of the corridor, the right distance residual between the right boundary observation and the right boundary parameter of the corridor, the upper distance residual between the upper boundary observation and the upper boundary parameter of the corridor, and the lower distance residual between the lower boundary observation and the lower boundary parameter of the corridor. Then, use the left distance residual, the right distance residual, the upper distance residual, and the lower distance residual as the corridor left boundary inconsistency score, the corridor right boundary inconsistency score, the corridor upper boundary inconsistency score, and the corridor lower boundary inconsistency score, respectively.

[0049] Based on contextual features, calibration samples corresponding to the contextual features are selected from the pre-established calibration samples, and quantiles at a pre-set confidence level are determined in the inconsistency scores corresponding to the calibration samples, to obtain the left-side expansion of the corridor, the right-side expansion of the corridor, the upper-side expansion of the corridor, and the lower-side expansion of the corridor.

[0050] Terminology definition:

[0051] The boundary observation is the observation result obtained by estimating the geometric position of the corridor boundary at the current moment based on the sensor data. The boundary observation is represented in the form of point set, curve, patch or parameterization.

[0052] The four-way boundary observation of the corridor consists of four sets of boundary observation results corresponding to the left, right, upper and lower boundaries of the corridor, respectively.

[0053] The distance residual is a distance metric that measures the degree of inconsistency between the boundary observation and the boundary characterized by the corresponding corridor boundary parameters. The distance metric is any one or a combination of Euclidean distance, signed distance along the boundary normal direction, and / or minimum distance.

[0054] The four-way non-consistent score is four non-negative scalar scores obtained by passing the distance residuals in each direction through a preset scoring function, wherein the scoring function includes any one or a combination of absolute value, norm, weighted norm and / or truncation function.

[0055] The conformal prediction process is a computational process based on calibration samples, which uses inconsistency scores to determine a threshold at a preset confidence level and outputs a prediction result with statistical coverage guarantee.

[0056] The conformal prediction process based on contextual features is a process of selecting all or part of the samples that match the current contextual features from the calibration samples to determine the threshold when performing the conformal prediction process.

[0057] The calibration sample is a pre-acquired and stored sample set, wherein each calibration sample includes at least a contextual feature and a non-consistency score corresponding to the contextual feature;

[0058] The confidence level is a preset probability level parameter used to characterize whether the output of the conformal prediction process meets the coverage requirements;

[0059] The quantile is a threshold value in the set of inconsistent scores corresponding to the calibration sample, such that the proportion of samples whose scores do not exceed the value reaches the proportion corresponding to the confidence level.

[0060] The four-way expansion amount consists of four expansion distance parameters obtained from the four-way inconsistency score at the confidence level during the conformal prediction process. The four-way expansion amount is used to extend the safety margin of the corridor's four-way boundary parameters in a directional manner.

[0061] Optionally, S4 includes:

[0062] The tunnel coordinate system containing the left boundary parameter, right boundary parameter, upper boundary parameter and lower boundary parameter of the corridor is determined by the corridor parameters, and the boundary normal direction corresponding to the left boundary parameter, the right boundary parameter, the upper boundary parameter and the lower boundary parameter of the corridor are obtained in the tunnel coordinate system.

[0063] The left-side boundary parameters of the corridor are expanded along the boundary normal direction of the left-side boundary parameters based on the left-side expansion amount of the corridor to generate the confidence corridor left-side boundary parameters.

[0064] The right-side boundary parameters of the corridor are extended along the boundary normal direction of the right-side boundary parameters based on the right-side extension of the corridor to generate the confidence right-side boundary parameters of the corridor.

[0065] Based on the outward expansion of the upper side of the corridor, the upper side boundary parameters of the corridor are expanded along the boundary normal direction of the upper side boundary parameters to generate the confidence upper side boundary parameters of the corridor.

[0066] The lower boundary parameters of the corridor are expanded along the boundary normal direction of the lower boundary parameters based on the expansion amount of the lower corridor to generate the confidence lower boundary parameters of the corridor.

[0067] Terminology definition:

[0068] The boundary normal direction is a unit direction vector in the tunnel coordinate system that is perpendicular to the corresponding corridor boundary and points outward from the corridor. The boundary normal direction is used to determine the direction of outward expansion of the corridor boundary parameters.

[0069] The expansion is a process of translating the corresponding corridor boundary parameter in space by a preset distance along the normal direction of the boundary, wherein the preset distance is the expansion amount corresponding to the boundary.

[0070] The four-way boundary parameters of the confidence corridor are a set of four-way boundary parameters obtained by expanding the left boundary parameter, right boundary parameter, upper boundary parameter and lower boundary parameter of the corridor outward by a corresponding amount along their boundary normal direction. The four-way boundary parameters of the confidence corridor are used to characterize the uncertainty range of the corridor boundary and limit the passable area of ​​the confidence corridor under a preset confidence level.

[0071] Optionally, S5 includes:

[0072] Based on the tunnel centerline parameters, a tunnel coordinate system is determined at the current position of the UAV. The tangential direction of the tunnel coordinate system is the tangential direction of the tunnel centerline at the current position of the UAV. The transverse direction of the tunnel coordinate system is a direction perpendicular to the tangential direction and pointing to the right boundary of the corridor. The vertical direction of the tunnel coordinate system is a direction perpendicular to both the tangential direction and the transverse direction.

[0073] Based on the outward expansion of the left side of the corridor, the outward expansion of the right side of the corridor, the outward expansion of the upper side of the corridor, and the outward expansion of the lower side of the corridor, an anisotropic disturbance set is determined in the tunnel coordinate system. The anisotropic disturbance set is a set of disturbance vectors. The components of the disturbance vectors in the horizontal direction satisfy that their negative amplitude is not greater than the outward expansion of the left side of the corridor and their positive amplitude is not greater than the outward expansion of the right side of the corridor. The components of the disturbance vectors in the vertical direction satisfy that their negative amplitude is not greater than the outward expansion of the lower side of the corridor and their positive amplitude is not greater than the outward expansion of the upper side of the corridor.

[0074] Terminology definition:

[0075] The tunnel coordinate system is a local coordinate system established with the tunnel centerline at the current position of the UAV as the reference. The tunnel coordinate system is used to uniformly represent the corridor boundary, outward expansion and disturbance in a coordinate frame aligned with the tunnel direction.

[0076] The tangential direction is the unit direction vector corresponding to the tangential direction of the tunnel centerline at the current position of the UAV.

[0077] The lateral direction is a unit direction vector in the tunnel coordinate system that is perpendicular to the tangential direction and points to the right boundary of the corridor;

[0078] The vertical direction is a unit direction vector perpendicular to the tangential direction and the horizontal direction in the tunnel coordinate system;

[0079] The anisotropic disturbance set is a disturbance set formed by describing the allowable range of values ​​of the disturbance vector corresponding to the UAV positioning error in the tunnel coordinate system in a set-based manner, wherein the disturbance set has different positive and negative boundaries in the horizontal and vertical directions, respectively.

[0080] The disturbance vector is a vector quantity used to characterize the deviation between the estimated state of the UAV and the actual state, wherein the disturbance vector includes at least components in the horizontal direction and the vertical direction.

[0081] Optionally, S6 includes:

[0082] The passable area of ​​the confidence corridor is determined based on the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the confidence corridor.

[0083] The anisotropic perturbation set and the pre-determined UAV body envelope are summed in the same tunnel coordinate system to obtain the synthetic occupancy set;

[0084] Perform a Minkowski difference operation on the passable region and the synthetic occupied set to subtract the synthetic occupied set from the passable region to obtain the passable region of the compacted corridor, and extract the left boundary parameter, right boundary parameter, upper boundary parameter and lower boundary parameter of the compacted corridor from the passable region of the compacted corridor.

[0085] Terminology definition:

[0086] The passable area is a set of spatial regions in the tunnel coordinate system that allow UAVs to fly, defined by corridor boundary parameters, wherein the set of spatial regions is used to characterize the range of locations where the UAV reference point can be located;

[0087] The passable area of ​​the confidence corridor is the passable area defined by the four-way boundary parameters of the confidence corridor;

[0088] The UAV body envelope is a set used to enclose the geometrically occupied area of ​​the UAV body in the tunnel coordinate system, wherein the set describes the set of spatial points that the UAV may occupy based on the UAV reference point;

[0089] The Minkowski sum operation is an operation that performs set summation on two sets, and the Minkowski sum operation satisfies: for set A and set B, A⊕B={a+b|a∈A, b∈B};

[0090] The synthetic occupancy set is the set obtained by performing the Minkowski sum operation on the anisotropic perturbation set and the UAV body envelope. The synthetic occupancy set is used to characterize the spatial range that the UAV may occupy under the combined effect of positioning perturbation and body geometric occupancy.

[0091] The Minkowski difference operation is an erosive set difference operation performed on sets, and the Minkowski difference operation satisfies: for set A and set B, A⊖B={x|x+B⊆A};

[0092] The passable area of ​​the compacted corridor is the passable area obtained by performing the Minkowski difference operation on the passable area of ​​the confidence corridor and the synthetic occupied set;

[0093] The compacted corridor's four-way boundary parameters are a set of parameters extracted from the passable area of ​​the compacted corridor and used to characterize its left, right, top, and bottom boundaries.

[0094] Optionally, the S7 includes:

[0095] Based on the UAV dynamics model and using the current state estimate of the UAV as the initial state, a nominal state trajectory and nominal control sequence in the prediction time domain are established.

[0096] The nominal state trajectory is constrained by the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the compacted corridor, so that the nominal state trajectory is within the passable area defined by the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the compacted corridor in the prediction time domain.

[0097] An anisotropic perturbation set is used to impose perturbation constraints on the perturbations corresponding to the positioning error, and a feedback control quantity for suppressing the perturbations is generated while solving the nominal control sequence, so that the deviation of the actual state from the nominal state trajectory is limited by the tubular boundary defined by the anisotropic perturbation set.

[0098] Under the feasible domain constraint and the disturbance constraint, the nominal control sequence in the prediction time domain is obtained by optimizing the objective function, and the UAV control command is generated based on the nominal control sequence and the feedback control quantity. The first UAV control command in the prediction time domain is selected and sent to the UAV.

[0099] Terminology definition:

[0100] The tubular robust model predictive controller is a robust model predictive control algorithm that performs rolling optimization based on the UAV dynamics model in the prediction time domain and limits the disturbance effect to a preset set range through tubular boundaries, wherein the disturbance includes the positioning error disturbance defined by the anisotropic disturbance set.

[0101] The UAV dynamics model is a discrete-time state-space model or a discretized form of a continuous-time model used to describe the evolution of the UAV's state with control input.

[0102] The prediction time domain is a finite time interval or a finite number of steps in which the model prediction control makes rolling predictions into the future at each solution.

[0103] The nominal state trajectory is a state sequence predicted by the UAV dynamics model in the prediction time domain based on the nominal control sequence, without considering disturbances or assuming zero disturbances.

[0104] The nominal control sequence is the control input sequence to be optimized and solved in the prediction time domain;

[0105] The feasible region constraint is a state constraint condition applied to the nominal state trajectory. The feasible region constraint is used to ensure that the nominal state trajectory is within the traversable area of ​​the compacted corridor defined by the four-way boundary parameters of the compacted corridor.

[0106] The perturbation constraint is a constraint condition on the range of perturbation values, and the perturbation constraint is used to limit the perturbation to belong to the anisotropic perturbation set;

[0107] The feedback control quantity is a control compensation quantity calculated based on the deviation between the actual state and the nominal state to suppress the effects of disturbances.

[0108] The tubular boundary is an error envelope set defined around the nominal state trajectory, wherein the error envelope set is used to limit the deviation range of the actual state relative to the nominal state trajectory and corresponds to the anisotropic perturbation set;

[0109] The optimization objective function is the objective function used to evaluate the merits of candidate nominal control sequences during the model predictive control solution process, wherein the objective function includes a weighted penalty term for trajectory tracking error, control energy and / or constraint margin;

[0110] The UAV control command is a control input obtained by synthesizing the nominal control sequence and the feedback control quantity and sent to the UAV actuator. The control input includes at least attitude control command, angular velocity control command, thrust control command or a combination thereof.

[0111] Optionally, the process of selecting calibration samples corresponding to the context features from the pre-established calibration samples and determining quantiles based on context features includes: constructing a context similarity metric based on the context features, and selecting a subset of calibration samples whose similarity meets a preset threshold or selecting a preset number of calibration samples with the highest similarity as candidate calibration samples; assigning weights related to the context similarity to the candidate calibration samples, and determining weighted quantiles at a preset confidence level based on the weights in the inconsistency scores corresponding to the candidate calibration samples, so as to obtain the left-side expansion of the corridor, the right-side expansion of the corridor, the upper-side expansion of the corridor, and the lower-side expansion of the corridor.

[0112] Optionally, the process of extracting the four-way boundary parameters of the compacted corridor from the traversable area of ​​the compacted corridor includes: representing the traversable area of ​​the confidence corridor as a set of half-space constraints corresponding to the four-way boundary normals, and using the support function values ​​of the synthetic occupancy set in each boundary normal direction to shrink the half-space constraints, thereby obtaining the traversable area of ​​the compacted corridor and the four-way boundary parameters of the compacted corridor.

[0113] The beneficial effects of this invention are:

[0114] 1. Improve the reliability of obstacle avoidance safety margin in narrow tunnel environments: By conformal prediction based on contextual feature conditions, the distance residual between the four-way boundary observation and the corridor boundary parameters is transformed into a four-way outward expansion with a confidence level guarantee, forming a directional confidence corridor, thereby reducing the risk of wall collision caused by boundary misjudgment even when positioning errors or drift exist.

[0115] 2. Enhance the stability and adaptability of corridor extraction and navigation constraints: By constructing a graph that simultaneously contains geometric adjacency edges and temporally continuous edges, and using a graph neural network to output the tunnel centerline and four-way boundary parameters, the corridor structure can be extracted more robustly in typical tunnel scenarios such as sparse point clouds, occlusion, and texture repetition, providing continuous and consistent environmental constraints for subsequent control.

[0116] 3. Achieve tight coupling between uncertainty and robust control to improve feasibility and passability: Construct an anisotropic disturbance set based on four-way outward expansion, and perform Minkowski sum operation with the UAV body envelope to generate a synthetic occupied set. Then, perform Minkowski difference operation on the confidence corridor to obtain a compacted passable area. The uncertainty is accurately mapped into a constraint compaction quantity in the form of a set and input into the tubular robust model predictive controller, thereby reducing over-conservatism while ensuring safety and improving tunnel passability and control robustness. Attached Figure Description

[0117] 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:

[0118] Figure 1 This is a flowchart of a UAV tunnel positioning and obstacle avoidance method based on graph neural networks proposed in this invention;

[0119] Figure 2 This is a schematic flowchart illustrating the determination of the four-way expansion amount in the non-consistency scoring and conditional conformal prediction of this invention. Detailed Implementation

[0120] 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.

[0121] refer to Figure 1 A method for UAV tunnel localization and obstacle avoidance based on graph neural networks includes:

[0122] S1. Acquire sensor data, extract tunnel wall features, obstacle features, and UAV motion state features, construct a graph containing geometric adjacency edges and temporally continuous edges, obtain node sets, edge sets, node features, and edge features, calculate context features representing observation quality based on sensor data, and obtain the current state estimate of the UAV; S2. Input the node sets, edge sets, node features, and edge features into a graph neural network, and output corridor parameters; S3. Obtain corridor four-way boundary observations based on the sensor data, calculate the distance residuals between the four-way boundary observations and the corridor four-way boundary parameters to obtain a four-way inconsistency score, input the four-way inconsistency score into a conformal prediction process conditioned on context features, and obtain the four-way outward expansion corresponding to the four-way boundary; S4. Based on the four-way outward expansion, calculate the corresponding values ​​of the corridor four-way boundary parameters. S5. Expand outwards along the normal directions of the boundaries to obtain the four-directional boundary parameters of the confidence corridor; S6. Establish a tunnel coordinate system based on the tunnel centerline parameters, and construct an anisotropic perturbation set in the tunnel coordinate system based on the four-directional expansion amount; S7. In the tunnel coordinate system, perform a Minkowski sum operation on the anisotropic perturbation set and the pre-determined UAV body envelope to obtain a synthetic occupied set, and perform a Minkowski difference operation on the passable area defined by the four-directional boundary parameters of the confidence corridor and the synthetic occupied set to obtain the passable area of ​​the compacted corridor, and extract the four-directional boundary parameters of the compacted corridor; S8. Use the current state estimate of the UAV as the initial state, use the four-directional boundary parameters of the compacted corridor as the feasible region constraint, and input the anisotropic perturbation set as the perturbation constraint into the tubular robust model predictive controller to solve for the UAV control command.

[0123] In this specific embodiment, S1 includes:

[0124] During its flight within the tunnel, the UAV synchronously collects sensor data, which includes at least lidar point cloud data, image data, and inertial measurement unit data. The UAV performs time alignment and coordinate transformation on the sensor data to map the data from different sensors at the same time to the same UAV coordinate system or world coordinate system for subsequent joint processing.

[0125] Based on the lidar point cloud data, the tunnel environment is structurally extracted to obtain tunnel wall features and obstacle features. The tunnel wall features can be wall point sets or wall plane parameters, and the obstacle features can be obstacle point sets or obstacle geometric envelope parameters. Based on the inertial measurement unit data, state features for characterizing the UAV's motion state are extracted. The state features include at least angular velocity features and acceleration features.

[0126] A node set is constructed using the tunnel wall features and the obstacle features, such that each node corresponds to a segment of wall point set, a set of wall plane parameters, a segment of obstacle point set, or a set of obstacle geometric envelope parameters, and node features are generated for each node, wherein the node features include at least the node's spatial position, geometric dimensions, and geometric orientation information.

[0127] Subsequently, a graph-structured data is constructed to explicitly encode the tunnel geometry and cross-time continuity at the current time. Construction Graph:

[0128] ;

[0129] in This represents the time index of the current moment. This represents the graph constructed at the current moment. This represents the set of nodes composed of tunnel wall features and obstacle features. Denotes the set of edges. Represents a set of nodes The corresponding set of node features or node feature matrix, Represents the set of edges The corresponding set of edge features or edge feature matrix, Represents the set of edges with geometric adjacency relationships. This represents the set of edges representing temporal continuity, where geo represents the identifier for "geometric adjacency" and temp represents the identifier for "temporal continuity". This represents the union operation of sets; where the set of geometric adjacency edges is represented. It can be established based on the spatial distance threshold between nodes to characterize the spatial adjacency relationship of tunnel wall segments or obstacle segments, and the temporally continuous relationship edge set. It can be established based on the association between nodes at adjacent time points to characterize the node matching relationship corresponding to the same physical wall segment or the same obstacle in different time frames, and generate edge features for each side, wherein the edge features include at least the relative displacement and time interval between the nodes at both ends of the edge;

[0130] Furthermore, contextual features characterizing the observation quality are calculated based on the sensor data. These contextual features include at least point cloud density, image brightness, and a feature quantity index used to characterize the number of traceable features, so as to quantify the reliability of the current observation even when the tunnel echo is sparse, the illumination changes, or the texture is repetitive.

[0131] Simultaneously, the UAV state is inertially integrated based on the inertial measurement unit data to obtain the state propagation result, and the propagation result is corrected by combining the observation constraints formed by the lidar point cloud data and / or image data, thereby obtaining the current state estimate of the UAV. The current state estimate of the UAV includes at least position, attitude and velocity.

[0132] In this specific embodiment, S2 includes:

[0133] The diagram As input to the graph neural network, where The time index for the current moment. For a set of nodes, Let be the set of edges. It is a set of node features or a matrix of node features. It is either a set of edge features or an edge feature matrix;

[0134] First, the node features and edge features are encoded separately to obtain the initial node representation and the initial edge representation, that is, for any node... Node feature vectors via node encoding function Mapping to the initial representation of nodes and to either side edge feature vectors via edge encoding function Mapping to initial edge representation ,in and For node indexing, and A combination of linear transformations and nonlinear mappings can be used to unify different modal features into a fixed-dimensional latent vector representation;

[0135] Subsequently, based on the edge set Perform message passing and iteratively update the node representation, at the... In the next iteration, edge messages are computed along the edges, neighborhood aggregation is performed on each node, and then the node representation is updated:

[0136] ;

[0137] in To preset the number of iterations, For iterative index, For nodes In the Node representation at the next iteration For the edge In the The edge message vector at the next iteration For message functions, For nodes In the Node aggregation information at the next iteration This is a neighborhood aggregation operator, used for processing sets. From node The edge messages from the neighboring region are aggregated. For the update function, For nodes In the The node update representation at the next iteration. Let be the set of edges at the current moment. Indicates pointing to a node The edge, For the edge The edge represents a vector, with the symbol . The symbol represents "for any". Symbol indicating "belongs to" This indicates a set selection that meets certain conditions.

[0138] Finish After several iterations, the final set of node representations is obtained. Then, a readout operation is performed on the final node representation set to generate corridor parameters. Corridor parameters At least include tunnel centerline parameters and the parameters of the left boundary of the corridor Parameters of the right boundary of the corridor Corridor upper boundary parameters and the lower boundary parameters of the corridor The superscript cl indicates "centerline". The terms "left side", "right side", "top side" and "bottom side" are respectively used to represent the left side. The readout operation may include pooling and aggregating the final node representations and outputting the corridor parameters through a regression network to obtain a continuous and consistent tunnel corridor structure representation.

[0139] In this specific embodiment, S3 includes:

[0140] Based on sensor data at the current moment Extract the four-way boundary observations of the corridor. The four-way boundary observations of the corridor include at least the left boundary observation, the right boundary observation, the upper boundary observation, and the lower boundary observation. Preferably, the boundary point set or boundary parameterization representation corresponding to the outer contour of the wall or obstacle in each direction can be obtained by segmenting the lidar point cloud data and combining it with image data to filter the boundary validity. This will form an observation result that corresponds one-to-one with the four-way boundary parameters of the corridor.

[0141] Subsequently, based on the corridor parameters, the distance residuals between the boundary observations in each direction and the corresponding corridor boundary parameters are calculated, and the distance residuals are converted into a four-way inconsistency score to characterize the degree of "inconsistency between observations and model predictions". The distance residuals are preferably signed distances or minimum Euclidean distances along the normal direction of the corresponding boundary, and the inconsistency score is preferably a non-negative scalar obtained by taking the absolute value or norm of the distance residuals.

[0142] Furthermore, based on the contextual features characterizing the current observation quality, and using these contextual features as conditions, calibration samples corresponding to the current contextual features are selected from a pre-established calibration sample set. Then, quantiles at a pre-set confidence level are determined from the set of inconsistencies corresponding to the selected calibration samples, thereby obtaining the left-side corridor expansion, right-side corridor expansion, upper-side corridor expansion, and lower-side corridor expansion, respectively. The calculation of the four-way inconsistency scores and the four-way expansion is implemented in the following form:

[0143] ;

[0144] in This represents the time index of the current moment. Indicates the boundary direction index: L represents the left direction, R represents the right direction, U represents the top direction, and D represents the bottom direction. Indicates time direction Boundary observation, Indicates time direction Corridor boundary parameters, This represents the distance metric function used to calculate the distance residual between boundary observations and corridor boundary parameters. This represents a scoring function that maps distance residuals to inconsistent scores. Indicates time direction Inconsistent scoring Indicates time direction The expansion amount, This represents the quantile operator corresponding to the preset confidence level. This indicates the preset information level parameters. Indicates time Contextual features, Indicates based on contextual features The set of calibration sample indexes obtained by filtering the calibration samples. Indicates the calibration sample index. Indicates the first One calibration sample in the direction The inconsistency scores are pre-calculated and stored.

[0145] Through the above process, the uncertainty of the four-way boundary can be directionally quantified under different observation quality conditions, and output in the form of a four-way outward expansion quantity with statistical coverage meaning.

[0146] In this specific embodiment, S4 includes:

[0147] Based on corridor parameters at the current time Determine the tunnel coordinate system in which the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the corridor are located, and determine the boundary normal direction of the four boundaries in the tunnel coordinate system respectively. The boundary normal direction is preferably a unit vector that is perpendicular to the corresponding boundary geometric element and points to the outside of the corridor, so as to ensure that the outward expansion direction is consistent with the "outside of the corridor".

[0148] To facilitate external calculations, it is preferable to use each direction Corridor boundary parameters It is represented as a half-space constraint and explicitly includes the boundary normal direction and boundary offset, i.e. ,in For boundary direction indices, L represents the left direction, R represents the right direction, U represents the top direction, and D represents the bottom direction. Indicates time direction The unit vector in the boundary normal direction, Indicates time direction The boundary offset is used to characterize the boundary along the tunnel coordinate system. Location;

[0149] Based on the four-way expansion, the four-way boundaries are expanded along their respective boundary normal directions to generate the four-way boundary parameters of the confidence corridor, which satisfy the following form:

[0150] ;

[0151] in Indicates time direction Confidence corridor boundary parameters, Indicates time direction The expansion quantity, symbol Indicates the boundary normal direction With boundary offset Together they form the boundary parameters for this direction;

[0152] By applying corresponding methods to the four-directional boundaries of the corridor (left, right, top, and bottom), By expanding outwards, a set of four-way boundary parameters for a directional and asymmetric confidence corridor can be formed.

[0153] In this specific embodiment, S5 includes:

[0154] Based on tunnel centerline parameters A tunnel coordinate system is established at the current position of the UAV, with the tangential direction of the tunnel coordinate system aligned with the tangential direction of the tunnel centerline at the current position of the UAV. The horizontal direction of the tunnel coordinate system is perpendicular to the tangential direction and points to the right boundary of the corridor, and the vertical direction of the tunnel coordinate system is perpendicular to both the tangential and horizontal directions. This decomposes and constrains the positioning error within a coordinate framework aligned with the tunnel's orientation.

[0155] After obtaining the tunnel coordinate system, read the left-side outward expansion of the corridor. , right side of the corridor outward expansion , the outward expansion of the upper side of the corridor Outward expansion of the lower side of the corridor This is interpreted as the directional uncertainty limit of the UAV positioning error in the horizontal and vertical directions, where the negative horizontal amplitude is determined by... Limitation, horizontal positive amplitude is determined by Limitation, vertical negative amplitude is determined by Limitation, vertical positive amplitude is determined by The limitations are designed to reflect the asymmetry of risks in the tunnel environment, both horizontally and vertically.

[0156] Furthermore, an anisotropic perturbation set is constructed in the tunnel coordinate system. Defined as:

[0157] ;

[0158] in This represents the time index of the current moment. Indicates time Anisotropic perturbation set, Indicates time The perturbation vector. Represents a two-dimensional real vector space. Represents the perturbation vector The component in the transverse direction of the tunnel coordinate system, Represents the perturbation vector The vertical component of the tunnel coordinate system, Indicates the outward expansion on the left side of the corridor. Indicates the outward expansion on the right side of the corridor. Indicates the outward expansion of the upper side of the corridor. The symbols represent the outward expansion of the lower side of the corridor, with L indicating the left-side direction identifier, R indicating the right-side direction identifier, U indicating the upper-side direction identifier, and D indicating the lower-side direction identifier.

[0159] The anisotropic perturbation set obtained through the above method This is used to incorporate the positioning error as a set constraint into the Minkowski operation and the tubular robust model predictive control process in subsequent steps to achieve robust obstacle avoidance control.

[0160] In this specific embodiment, S6 includes:

[0161] Determining the passable area of ​​a confidence corridor in the same tunnel coordinate system based on its four-way boundary parameters. The four-way boundary parameters of the confidence corridor preferably include the left boundary parameter of the confidence corridor. Confidence corridor right boundary parameters Confidence corridor upper boundary parameters With confidence corridor lower boundary parameters And the passable area can be It is represented as a region jointly defined by the half-space constraints corresponding to the four-way boundary normal directions in order to perform set operations;

[0162] Anisotropic disturbance set taken in the tunnel coordinate system and enveloped by a pre-determined drone body. Performing the Minkowski sum operation yields the composite occupied set, which is the envelope of the UAV body. The composite occupancy set is a set that encloses the geometric occupancy range of the UAV body based on the UAV reference point. The composite occupancy set is used to characterize the spatial range that the UAV may occupy under the combined effect of positioning disturbance and body geometric occupancy.

[0163] Then, the traversable region of the confidence corridor is subjected to the Minkowski difference operation with the composite occupied set to obtain the traversable region of the compacted corridor, satisfying:

[0164] ;

[0165] in This represents the time index of the current moment. Indicates time The passable area of ​​the tight corridor, Indicates time The passable area of ​​the confidence corridor. Indicates time Anisotropic perturbation set, Represents the envelope of the drone's body, symbol The symbol represents the Minkowski sum operation and satisfies the meaning of set summation. This indicates that the Minkowski difference operation satisfies the meaning of subtracting the set erosion rule, and the parentheses (•) indicate the operation precedence;

[0166] From the accessible area of ​​the tightened corridor Extract the four-way boundary parameters of the compacted corridor, preferably by obtaining the parameters that can be circumscribed along the boundary normal direction of the four-way boundary of the confidence corridor. The tightest half-space offset is used to obtain the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the compacted corridor.

[0167] In this specific embodiment, S7 includes:

[0168] The current state estimate of the UAV is used as the initial state input of the tubular robust model predictive controller, and a nominal state trajectory and a nominal control sequence are established in the prediction time domain based on the UAV dynamics model, wherein the nominal state trajectory is used to describe the predicted state evolution under the condition of zero disturbance or neglect of disturbance.

[0169] The compacted corridor four-way boundary parameters are applied as feasible region constraints to the nominal state trajectory, so that the nominal state trajectory is always within the passable area defined by the compacted corridor in the prediction time domain, thereby introducing the "environmental geometric boundary" into the rolling optimization in the form of explicit constraints.

[0170] Anisotropic perturbation set As a disturbance constraint, the tubular robust model predictive control process is introduced, and a feedback control quantity for suppressing the effects of disturbances is generated while solving the nominal control sequence. This limits the deviation of the actual state from the nominal state trajectory to the constraint imposed by the disturbance constraint. The defined tubular boundary ensures that constraint satisfaction is maintained even when the directionality of the positioning error is uncertain.

[0171] Under the constraints of the feasible region and the disturbance, the nominal control sequence in the predicted time domain is obtained by optimizing the objective function. The first control quantity of the nominal control sequence and the feedback control quantity are then combined to form the UAV control command, satisfying the following:

[0172] ;

[0173] in This represents the time index of the current moment. Indicates time The drone control commands sent to the drone actuators Indicates at time The nominal control quantity obtained is the one corresponding to the "first time step" in the prediction time domain. Indicates at time The feedback control quantity is calculated based on the deviation of the actual state from the nominal state. The superscript nom indicates "nominal" and the superscript fb indicates "feedback". The + symbol indicates assignment or equality; it also indicates vector addition.

[0174] Select the UAV control command The first UAV control command within the prediction time domain is sent to the UAV to achieve rolling optimization control.

[0175] In this specific embodiment,

[0176] The process of "selecting calibration samples corresponding to the context features from the pre-established calibration samples and determining the quantiles based on the context features" can be implemented as follows;

[0177] A set of calibration samples is pre-built, ensuring that each calibration sample contains at least contextual features. and four-way non-consistency scoring ,in To calibrate the sample index, For boundary direction indices, L represents the left direction, R represents the right direction, U represents the top direction, and D represents the bottom direction;

[0178] At the present moment Obtain current context features Afterwards, based on Contextual features of each calibration sample Build a context similarity metric The similarity metric can be selected as cosine similarity, negative Mahalanobis distance, or kernel similarity based on normalized feature difference, to reflect the consistency of observation quality factors such as point cloud density, image brightness, and feature quantity indicators in different scenes.

[0179] Subsequently, candidate calibration samples are selected from the calibration samples based on the similarity metric, preferably using a "similarity threshold". "Sample subset" or "preset number of samples with the highest similarity" Each sample forms a candidate calibration sample index set. This means that quantile estimates are mainly contributed by historical samples with similar quality to current observations;

[0180] Furthermore, candidate calibration samples are assigned weights related to contextual similarity, and pre-set confidence levels are determined in the inconsistency scores corresponding to the candidate calibration samples. The weighted quantiles are used to obtain the four-way expansion, satisfying:

[0181] ;

[0182] in Indicates candidate calibration samples The weight, Represents an exponential function. This represents the weight sharpening coefficient and is used to adjust the strength of the impact of similarity differences on weight allocation. Indicates the current context features With calibration sample context features similarity, Represents the set of indexes for candidate calibration samples Inner index Summation, Indicates the candidate calibration sample index. Indicates time In direction The external expansion of the output, Indicates calibration sample In direction Inconsistent scoring on Indicates at confidence level Based on weight The weighted quantile operator is calculated. Represents the set of candidate calibration sample indices The set of ordered pairs consisting of the inconsistent scores and corresponding weights of each sample in the sample, with the symbol | representing the set selection criteria;

[0183] Through the above similarity screening and weighted quantile determination process, the extrapolation can be adaptively changed according to the observation quality context, and within a preset confidence level... The following values ​​are obtained: the outward expansion of the left side of the corridor, the outward expansion of the right side of the corridor, the outward expansion of the upper side of the corridor, and the outward expansion of the lower side of the corridor.

[0184] In this specific embodiment,

[0185] The process of "extracting the four-way boundary parameters of the compacted corridor from the passable area of ​​the compacted corridor" can be implemented as follows;

[0186] The four-way boundary parameters of the confidence corridor are represented in the tunnel coordinate system as a set of half-space constraints corresponding to the normal directions of the four-way boundaries, thus expressing the passable area of ​​the confidence corridor as a half-space intersection.

[0187] Then based on the set corresponding to the synthetic occupancy set The support function values ​​in each boundary normal direction are used to shrink the above half-space constraints along the corresponding normal direction to achieve uniform compaction equivalent to Minkowski difference operation, and the compacted corridor four-way boundary parameters are directly obtained from the shrinked half-space offset.

[0188] The following method is used to represent the passable area and extract the four-way boundary parameters of the compacted corridor:

[0189] ;

[0190] in This represents the time index of the current moment. Indicates time The passable area of ​​the tight corridor, This represents the spatial location vector used to describe the passable area in the tunnel coordinate system. Indicates the boundary direction index: L represents the left direction, R represents the right direction, U represents the top direction, and D represents the bottom direction. Indicates time direction The unit vector in the boundary normal direction, symbol This indicates the transpose operation. Indicates time direction The offset of the corridor boundary. Indicates time direction The expansion amount, Represents a set In direction The support function value is used to characterize the most unfavorable projection distance of the synthetic occupied set along the normal. Indicates the set corresponding to the composite occupied set. Indicates time Anisotropic perturbation set, Represents the envelope of the drone's body, symbol Represents the Minkowski sum operation;

[0191] After obtaining the aforementioned contracted half-space constraints, the four-way boundary parameters of the compacted corridor can be directly taken as those for each direction. With the corresponding right-hand term after contraction The combination of these parameters yields the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the compacted corridor.

[0192] 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.

[0193] The combination of graph neural network corridor extraction, conditional conformal prediction confidence corridor, and tubular robust model predictive control employed in this invention allows the risk of "location error leading to boundary judgment deviation" to be absorbed step by step in the algorithm chain and transformed into a constrainable safety margin: First, by simultaneously encoding the graph structure of geometric adjacency relationships and temporal continuity relationships, the graph neural network outputs the tunnel centerline and four-way boundary parameters, providing a continuous and consistent corridor representation at the structural level; then, the distance residual between the four-way boundary observations and the boundary parameters is used as a non-consistency score, and conformal prediction is performed under the contextual features of observation quality to obtain a four-way boundary corridor that meets the preset confidence level. The outward expansion forms a directional confidence corridor. Further, based on the four-way outward expansion, an anisotropic perturbation set aligned with the tunnel coordinate system is constructed. Combined with the UAV body envelope, Minkowski sum and Minkowski difference operations are performed to compact the passable area constraints, so that positioning uncertainty and body geometric occupancy are uniformly mapped into feasible region constraints. Finally, the compacted corridor constraints and perturbation set are input into the tubular robust model predictive controller to generate control commands with both feedforward planning and feedback disturbance suppression capabilities. This ensures that obstacle avoidance safety margin is maintained even when positioning errors or drift exist, reduces the probability of wall collisions, and improves the passability in confined spaces.

[0194] To address the issues of strong error directionality, large fluctuations in observation quality, and susceptibility to chain failures in the narrow space of tunnels, this invention makes targeted improvements to the algorithm structure: First, it introduces conformal prediction based on contextual features, using similarity filtering and weighted quantiles to achieve adaptive expansion for different observation quality scenarios, avoiding failures or over-conservatism caused by fixed safety margins; Second, it decomposes the inconsistency score and expansion amount into four independent calculations (left, right, up, and down), and performs asymmetric expansion along the corresponding boundary normals to form directional confidence corridors, better reflecting the actual imbalance between lateral and vertical risks in tunnels; Third, it constructs an anisotropic perturbation set using the four-directional expansion amount, and strictly constrains the passable area through Minkowski difference, ensuring consistent coupling between the tubular boundary in robust control and environmental geometric constraints, thereby reducing unnecessary conservatism while ensuring safety, and better achieving stable, feasible, and safe autonomous flight in tunnels.

Claims

1. A method for UAV tunnel positioning and obstacle avoidance based on graph neural networks, characterized in that, include: S1. Acquire sensor data, extract tunnel wall features, obstacle features, and UAV motion state features, construct a graph containing geometric adjacency edges and temporally continuous edges, obtain node sets, edge sets, node features, and edge features, calculate context features representing observation quality based on sensor data, and obtain the current state estimate of the UAV; S2. Input the node sets, edge sets, node features, and edge features into a graph neural network, and output corridor parameters; S3. Obtain corridor four-way boundary observations based on the sensor data, calculate the distance residuals between the four-way boundary observations and the corridor four-way boundary parameters to obtain a four-way inconsistency score, input the four-way inconsistency score into a conformal prediction process conditioned on context features, and obtain the four-way outward expansion corresponding to the four-way boundary; S4. Based on the four-way outward expansion, calculate the corresponding values ​​of the corridor four-way boundary parameters. S5. Expand outwards along the normal directions of the boundaries to obtain the four-directional boundary parameters of the confidence corridor; S6. Establish a tunnel coordinate system based on the tunnel centerline parameters, and construct an anisotropic perturbation set in the tunnel coordinate system based on the four-directional expansion amount; S7. In the tunnel coordinate system, perform a Minkowski sum operation on the anisotropic perturbation set and the pre-determined UAV body envelope to obtain a synthetic occupied set, and perform a Minkowski difference operation on the passable area defined by the four-directional boundary parameters of the confidence corridor and the synthetic occupied set to obtain the passable area of ​​the compacted corridor, and extract the four-directional boundary parameters of the compacted corridor; S8. Use the current state estimate of the UAV as the initial state, use the four-directional boundary parameters of the compacted corridor as the feasible region constraint, and input the anisotropic perturbation set as the perturbation constraint into the tubular robust model predictive controller to solve for the UAV control command.

2. The UAV tunnel positioning and obstacle avoidance method based on graph neural networks according to claim 1, characterized in that, S1 includes: Acquire sensor data collected by the UAV during its flight inside the tunnel, the sensor data including at least lidar point cloud data, image data, and inertial measurement unit data; The sensor data is time-aligned and coordinate-transformed to unify the sensor data to the UAV coordinate system or world coordinate system corresponding to the same moment. Based on the lidar point cloud data, tunnel wall features and obstacle features are extracted, wherein the tunnel wall features include wall point sets or wall plane parameters, and the obstacle features include obstacle point sets or obstacle geometric envelope parameters. Based on the data from the inertial measurement unit, state features are extracted to characterize the motion state of the UAV, and the state features include at least angular velocity features and acceleration features; A node set is constructed using the tunnel wall features and the obstacle features, wherein each node corresponds to a segment of wall point set, a set of wall plane parameters, a segment of obstacle point set or a set of obstacle geometric envelope parameters, and a node feature is generated for each node, wherein the node feature includes at least the node's spatial position, geometric size and geometric orientation information; A set of edges representing geometric adjacency is constructed based on a spatial distance threshold between nodes, and a set of edges representing temporal continuity is constructed based on the association between nodes at adjacent times. An edge feature is generated for each edge, and the edge feature includes at least the relative displacement and time interval between the nodes at both ends of the edge. Contextual features are calculated based on the sensor data. These contextual features include at least point cloud density, image brightness, and a feature quantity index used to characterize the number of traceable features, in order to characterize the current observation quality. Based on the inertial measurement unit data, the UAV state is inertially integrated and corrected by combining the sensor data to obtain the current state estimate of the UAV. The current state estimate of the UAV includes at least position, attitude and velocity.

3. The UAV tunnel positioning and obstacle avoidance method based on graph neural networks according to claim 1, characterized in that, S2 include: The node set, edge set, node features, and edge features are input into the graph neural network. First, the node features are encoded to obtain the initial node representation, and the edge features are encoded to obtain the initial edge representation. Based on the set of edges, edge messages are calculated on an edge-by-edge basis, wherein the edge message is determined by the initial node representations of the nodes at both ends of the edge and the corresponding initial edge representations; Based on the edge messages, neighborhood aggregation is performed on each node to obtain node aggregation information, and the node aggregation information is used to update the initial node representation to obtain the updated node representation; The processes of edge message calculation, neighborhood aggregation, and node update representation generation are iteratively executed a preset number of times to obtain the final node representation; The final node representation is read out to generate corridor parameters, which include at least the tunnel centerline parameters, the left boundary parameters of the corridor, the right boundary parameters of the corridor, the upper boundary parameters of the corridor, and the lower boundary parameters of the corridor.

4. The UAV tunnel positioning and obstacle avoidance method based on graph neural networks according to claim 1, characterized in that, S3 includes: Boundary observations are extracted based on sensor data. The boundary observations include at least the left boundary observation corresponding to the left boundary of the corridor, the right boundary observation corresponding to the right boundary of the corridor, the upper boundary observation corresponding to the upper boundary of the corridor, and the lower boundary observation corresponding to the lower boundary of the corridor. Based on the corridor parameters, calculate the left distance residual between the left boundary observation and the left boundary parameter of the corridor, the right distance residual between the right boundary observation and the right boundary parameter of the corridor, the upper distance residual between the upper boundary observation and the upper boundary parameter of the corridor, and the lower distance residual between the lower boundary observation and the lower boundary parameter of the corridor. Then, use the left distance residual, the right distance residual, the upper distance residual, and the lower distance residual as the corridor left boundary inconsistency score, the corridor right boundary inconsistency score, the corridor upper boundary inconsistency score, and the corridor lower boundary inconsistency score, respectively. Based on contextual features, calibration samples corresponding to the contextual features are selected from the pre-established calibration samples, and quantiles at a pre-set confidence level are determined in the inconsistency scores corresponding to the calibration samples, to obtain the left-side expansion of the corridor, the right-side expansion of the corridor, the upper-side expansion of the corridor, and the lower-side expansion of the corridor.

5. The UAV tunnel positioning and obstacle avoidance method based on graph neural networks according to claim 1, characterized in that, S4 include: The tunnel coordinate system containing the left boundary parameter, right boundary parameter, upper boundary parameter and lower boundary parameter of the corridor is determined by the corridor parameters, and the boundary normal direction corresponding to the left boundary parameter, the right boundary parameter, the upper boundary parameter and the lower boundary parameter of the corridor are obtained in the tunnel coordinate system. The left-side boundary parameters of the corridor are expanded along the boundary normal direction of the left-side boundary parameters based on the left-side expansion amount of the corridor to generate the confidence corridor left-side boundary parameters. The right-side boundary parameters of the corridor are extended along the boundary normal direction of the right-side boundary parameters based on the right-side extension of the corridor to generate the confidence right-side boundary parameters of the corridor. Based on the outward expansion of the upper side of the corridor, the upper side boundary parameters of the corridor are expanded along the boundary normal direction of the upper side boundary parameters to generate the confidence upper side boundary parameters of the corridor. The lower boundary parameters of the corridor are expanded along the boundary normal direction of the lower boundary parameters based on the expansion amount of the lower corridor to generate the confidence lower boundary parameters of the corridor.

6. The UAV tunnel positioning and obstacle avoidance method based on graph neural networks according to claim 1, characterized in that, S5 include: Based on the tunnel centerline parameters, a tunnel coordinate system is determined at the current position of the UAV. The tangential direction of the tunnel coordinate system is the tangential direction of the tunnel centerline at the current position of the UAV. The transverse direction of the tunnel coordinate system is a direction perpendicular to the tangential direction and pointing to the right boundary of the corridor. The vertical direction of the tunnel coordinate system is a direction perpendicular to both the tangential direction and the transverse direction. Based on the outward expansion of the left side of the corridor, the outward expansion of the right side of the corridor, the outward expansion of the upper side of the corridor, and the outward expansion of the lower side of the corridor, an anisotropic disturbance set is determined in the tunnel coordinate system. The anisotropic disturbance set is a set of disturbance vectors. The components of the disturbance vectors in the horizontal direction satisfy that their negative amplitude is not greater than the outward expansion of the left side of the corridor and their positive amplitude is not greater than the outward expansion of the right side of the corridor. The components of the disturbance vectors in the vertical direction satisfy that their negative amplitude is not greater than the outward expansion of the lower side of the corridor and their positive amplitude is not greater than the outward expansion of the upper side of the corridor.

7. The UAV tunnel positioning and obstacle avoidance method based on graph neural networks according to claim 1, characterized in that, S6 include: The passable area of ​​the confidence corridor is determined based on the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the confidence corridor. The anisotropic perturbation set and the pre-determined UAV body envelope are summed in the same tunnel coordinate system to obtain the synthetic occupancy set; Perform a Minkowski difference operation on the passable region and the synthetic occupied set to subtract the synthetic occupied set from the passable region to obtain the passable region of the compacted corridor, and extract the left boundary parameter, right boundary parameter, upper boundary parameter and lower boundary parameter of the compacted corridor from the passable region of the compacted corridor.

8. The UAV tunnel positioning and obstacle avoidance method based on graph neural networks according to claim 1, characterized in that, S7 includes: Based on the UAV dynamics model and using the current state estimate of the UAV as the initial state, a nominal state trajectory and nominal control sequence in the prediction time domain are established. The nominal state trajectory is constrained by the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the compacted corridor, so that the nominal state trajectory is within the passable area defined by the left boundary parameter, right boundary parameter, upper boundary parameter, and lower boundary parameter of the compacted corridor in the prediction time domain. An anisotropic perturbation set is used to impose perturbation constraints on the perturbations corresponding to the positioning error, and a feedback control quantity for suppressing the perturbations is generated while solving the nominal control sequence, so that the deviation of the actual state from the nominal state trajectory is limited by the tubular boundary defined by the anisotropic perturbation set. Under the feasible domain constraint and the disturbance constraint, the nominal control sequence in the prediction time domain is obtained by optimizing the objective function, and the UAV control command is generated based on the nominal control sequence and the feedback control quantity. The first UAV control command in the prediction time domain is selected and sent to the UAV.

9. The UAV tunnel positioning and obstacle avoidance method based on graph neural networks as described in claim 4, characterized in that, The process of selecting calibration samples corresponding to the context features from the pre-established calibration samples and determining the quantiles based on the context features includes: constructing a context similarity metric based on the context features, and selecting a subset of calibration samples whose similarity meets a preset threshold or selecting a preset number of calibration samples with the highest similarity as candidate calibration samples; assigning weights related to the context similarity to the candidate calibration samples, and determining the weighted quantiles at a preset confidence level in the inconsistency scores corresponding to the candidate calibration samples based on the weights, so as to obtain the left-side expansion of the corridor, the right-side expansion of the corridor, the upper-side expansion of the corridor, and the lower-side expansion of the corridor.

10. A method for UAV tunnel positioning and obstacle avoidance based on graph neural networks according to claim 7, characterized in that, The process of extracting the four-way boundary parameters of the compacted corridor from the passable area of ​​the compacted corridor includes: representing the passable area of ​​the confidence corridor as a set of half-space constraints corresponding to the four-way boundary normals, and using the support function values ​​of the synthetic occupancy set in each boundary normal direction to shrink the half-space constraints, thereby obtaining the passable area of ​​the compacted corridor and the four-way boundary parameters of the compacted corridor.