Fixed-wing unmanned aerial vehicle electronic fence avoidance method
By accurately detecting the boundary of the electronic fence using polygon approximation and an improved ray method, a smooth global path is generated and a local obstacle avoidance trajectory is dynamically planned. This solves the problems of boundary detection error and trajectory curvature abrupt change for fixed-wing UAVs in electronic fence environments, and achieves stable obstacle avoidance and high-precision tracking control.
Patent Information
- Application Number
- CN202511339093.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-09-18
AI Technical Summary
Existing technologies for path planning and tracking control of fixed-wing UAVs in electronic fence environments suffer from large boundary detection errors, abrupt changes in trajectory curvature, and tracking lag caused by fixed control parameters, resulting in unstable UAV attitude and low obstacle avoidance accuracy.
The boundary of the electronic fence is accurately detected by using polygon approximation and improved ray method to generate a smooth global path. The local obstacle avoidance trajectory is solved by dynamic programming, and the distance of the aiming point is adjusted by adaptive L1 control to form a trajectory tracking closed loop.
It improves the accuracy of electronic fence boundary detection, generates smooth trajectories that conform to the dynamic characteristics of fixed-wing UAVs, realizes dynamic matching of planning and control parameters, and enhances obstacle avoidance accuracy and control response capability.
Smart Images

Figure CN120909319A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of unmanned aerial vehicle navigation, and more particularly, to a fixed-wing unmanned aerial vehicle electronic fence avoidance method. BACKGROUND
[0002] Fixed-wing unmanned aerial vehicles are increasingly widely used in the fields of power inspection, geographic mapping, and border monitoring, due to their long endurance and high efficiency. The core technical bottleneck of autonomous operation is the collaborative optimization of path planning and tracking control in a complex electronic fence environment. Current planning and control technologies have the following limitations:
[0003] There is a disconnect between electronic fence detection and planning constraints: to reduce computational complexity, existing detection methods often use simplified geometric models to approximate the boundaries of no-fly zones, resulting in large actual boundary recognition errors. This precision defect causes two typical problems in actual applications: first, safe areas near the boundary are misjudged as no-fly zones, forcing the planning module to generate excessively detour paths; second, the edge areas of no-fly zones are misjudged as safe areas, causing the planned path to be close to or even invade the no-fly zone, resulting in collision risks. At the same time, the existing detection results can only provide a judgment of whether the unmanned aerial vehicle is within the no-fly zone, and cannot convert the boundary distance, boundary curvature, and other information obtained by detection into hard constraints that can be directly used by the planning module, resulting in the inability of the planning module to dynamically adjust trajectory parameters based on real-time boundary information.
[0004] Trajectory planning does not fully adapt to the dynamic characteristics of fixed-wing unmanned aerial vehicles. Fixed-wing unmanned aerial vehicles are limited by the lift characteristics of the wings and cannot achieve sharp turns. Therefore, the existing planning algorithms have obvious defects. The global path is mostly a polyline generated by simple algorithms, and the angle between adjacent segments is too large, which will cause the unmanned aerial vehicle to shake violently when directly used as a tracking reference line. The local obstacle avoidance algorithm only takes obstacle avoidance as a single objective, and the generated trajectory curvature is too sudden to exceed the control response capability of the fixed-wing unmanned aerial vehicle.
[0005] In terms of planning and control parameter matching, after the planning module generates a trajectory, the existing control module uses fixed parameters for tracking without considering the curvature characteristics of the trajectory. A fixed preview distance will cause tracking lag in straight-line segments and difficulty in tracking the trajectory in turning segments, which seriously affects the actual tracking effect. SUMMARY
[0006] Therefore, the purpose of the present application is to provide a fixed-wing unmanned aerial vehicle electronic fence avoidance method that can improve the detection accuracy of electronic fence boundaries, generate smooth trajectories that conform to the dynamic characteristics of fixed-wing unmanned aerial vehicles, and achieve dynamic matching of planning and control parameters.
[0007] The present application provides a fixed-wing unmanned aerial vehicle electronic fence avoidance method, comprising:
[0008] detecting the electronic fence and extracting boundary features;
[0009] determining a global path and obtaining a trackable reference line through smoothing processing;
[0010] determining and screening effective candidate points according to the spatial range of the dynamic local planning;
[0011] solving a local obstacle avoidance trajectory through dynamic planning;
[0012] determining a tracking control quantity according to the normal distance and the path curvature;
[0013] updating the state of the UAV and forming a trajectory tracking closed loop to enable the UAV to autonomously navigate to the target end point.
[0014] Preferably, in the fixed-wing UAV electronic fence avoidance method, the detection of the electronic fence and the extraction of the boundary features comprise:
[0015] the electronic fence detection and the boundary feature extraction are completed by using a polygon approximation and an improved ray method, wherein:
[0016] the electronic fence of the no-fly zone is uniformly converted into a polygon vertex set;
[0017] a horizontal right ray is emitted from the position of the UAV, and the position relationship is determined by counting the intersection points of the polygon boundary line segments; when the total number of intersection points is odd, it is determined that the point is inside the electronic fence; when the total number of intersection points is even, it is determined that the point is outside the electronic fence;
[0018] the distance from the position of the UAV to each line segment is determined according to all the boundary line segments of the polygon, and the minimum value is taken; the line segment corresponding to the minimum distance is determined according to the positive and negative values of the distance inside and outside the electronic fence.
[0019] Preferably, in the fixed-wing UAV electronic fence avoidance method, the conversion of the electronic fence of the no-fly zone into the polygon vertex set comprises at least one of the following combinations:
[0020] based on a circular no-fly zone, vertexes are generated according to a fixed arc length interval, and the point set is , the angle corresponding to the arc length;
[0021] based on a semicircular no-fly zone, a plurality of arc vertexes with equal arc length and a diameter endpoint are set to form a closed polygon point set;
[0022] based on a rectangular no-fly zone, four vertexes , , , are selected to constitute a polygon point set.
[0023] Preferably, in the foregoing fixed-wing UAV electronic fence avoidance method, the determination of the global path and the obtainment of the trackable reference line through smoothing processing comprise:
[0024] The global path is generated based on a grid map and a Dijkstra algorithm, and the reference line is obtained through smoothing processing; wherein,
[0025] The physical space is divided according to a set grid size, the grid of the flight-prohibited area is marked as impassable, and the rest of the grid costs are the reciprocal of the minimum distance of the boundary, an 8-direction extension is adopted, and the moving cost of a straight line and a diagonal line is the grid size and times the grid size, respectively;
[0026] The starting point to the ending point of the UAV is determined, the initial path is determined by expanding nodes in the priority queue in ascending order of cumulative cost, and the initial path is encrypted, and the encrypted path is processed through a sliding window.
[0027] The initial path is encrypted, and the encrypted path is processed through a sliding window.
[0028] Preferably, in the foregoing fixed-wing UAV electronic fence avoidance method, the determination and screening of the effective candidate points according to the defined dynamic local planning space range comprise:
[0029] According to the flight speed of the UAV , the UAV heading angle is extended forward by meters and is divided into 25 stages, each stage being meters apart;
[0030] According to the range of meters perpendicular to the heading direction, 35 candidate points are determined on each longitudinal stage, the candidate point coordinates are the stage center point plus the normal offset, and the points located in the electronic fence, the distance from the boundary being less than 1 meter, and the angle change rate of the line connecting the previous stage effective point being greater than 0.5 radian are removed.
[0031] Preferably, in the foregoing fixed-wing UAV electronic fence avoidance method, the local obstacle avoidance trajectory is solved through dynamic programming, comprising:
[0032] A target cost function is determined, and the total cost is , wherein the total cost is the sum of the obstacle cost , the reference line deviation cost , the curvature cost , and the heading consistency cost ;
[0033] The minimum cost point is selected in the last stage through trajectory backtracking and reverse tracing, the trajectory with the minimum curvature standard deviation is output, and the update is performed once per second.
[0034] Preferably, in the fixed-wing UAV electronic fence avoidance method, the tracking control amount is determined according to the normal distance and the path curvature, and the method comprises the following steps:
[0035] The adaptive L1 control is realized based on the normal distance and the path curvature, and the tracking control amount is calculated.
[0036] The adaptive L1 control adjusts the preview point distance based on the normal distance and the path curvature.
[0037] Preferably, in the fixed-wing UAV electronic fence avoidance method, the adaptive L1 control is realized based on the normal distance and the path curvature, and the method comprises the following steps:
[0038] The normal distance is determined according to the dot product absolute value of the position deviation vector and the unit normal vector of the reference line projection point.
[0039] The path curvature is obtained by intercepting a fixed arc length path segment, and multiplying a coefficient by the proportion of the difference between the curve length and the straight line distance to the curve length.
[0040] Preferably, in the fixed-wing UAV electronic fence avoidance method, the adaptive L1 control adjusts the preview point distance based on the normal distance and the path curvature, and the method comprises the following steps:
[0041] The normal distance is determined, and when the normal distance is greater than 5, the set maximum preview distance is taken as the normal distance.
[0042] When the normal distance is less than 5, the path curvature is determined, and if the path curvature is higher than the preset curvature, the preview distance is reduced; if the path curvature is lower than the preset curvature, the preview distance is increased.
[0043] Preferably, in the fixed-wing UAV electronic fence avoidance method, the UAV state is updated and a trajectory tracking closed loop is formed to enable the UAV to autonomously navigate to the target terminal point, and the method comprises the following steps:
[0044] It is determined in real time whether the UAV enters the electronic fence no-fly zone.
[0045] The current navigation information of the UAV is output in real time according to the navigation system carried by the UAV, the UAV state is updated, and real-time feedback is realized to complete trajectory tracking until the UAV reaches the target terminal point.
[0046] As can be seen from the above, the fixed-wing UAV electronic fence avoidance method provided by the application solves the problems of large boundary detection error, path curvature mutation and fixed control parameters leading to tracking lag by accurately detecting the electronic fence boundary, generating a smooth global path, dynamically planning a local obstacle avoidance trajectory and adaptively tracking control, thereby improving obstacle avoidance accuracy, ensuring path traceability and improving control response capability. BRIEF DESCRIPTION OF DRAWINGS
[0047] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0048] Figure 1 The flowchart of a fixed-wing UAV electronic fence avoidance method according to an embodiment of this application is illustrated schematically. Figure 1 ;
[0049] Figure 2 The flowchart of a fixed-wing UAV electronic fence avoidance method according to an embodiment of this application is illustrated schematically. Figure 2 ;
[0050] Figure 3 The flowchart of a fixed-wing UAV electronic fence avoidance method according to an embodiment of this application is illustrated schematically. Figure 3 ;
[0051] Figure 4 The flowchart of a fixed-wing UAV electronic fence avoidance method according to an embodiment of this application is illustrated schematically. Figure 4 . Detailed Implementation
[0052] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0053] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0054] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0055] In the case of using expressions such as "at least one of A, B, and C", it generally means all of "A, B, and C", "at least one of A and B", "at least one of A and C", "at least one of B and C", "at least one of A, B, and C", and the like.
[0056] In the embodiments of the present application, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) comply with the relevant legal regulations, are used for legal purposes, and do not violate public order and good customs. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data, and to maintain user personal information security, network security and national security.
[0057] At present, a simplified geometric model is used for electronic fence detection, resulting in a large boundary recognition error, and the planning module cannot accurately obtain the spatial constraint information of the no-fly zone. The polyline path generated by the global path generation algorithm has sharp turning points, which does not match the kinematic characteristics of the fixed-wing unmanned aerial vehicle, causing flight attitude instability. The control module uses a fixed preview distance to track the trajectory, which cannot adapt to the different needs of straight and turning road sections, causing tracking lag or trajectory deviation. When the unmanned aerial vehicle needs to pass through multiple no-fly zones, it is easy to cause excessive detour or intrusion into the no-fly zone, and the sharp turning operation may exceed the maneuvering ability of the unmanned aerial vehicle.
[0058] Embodiments of the present application provide a fixed-wing unmanned aerial vehicle electronic fence avoidance method, which comprises: detecting an electronic fence and extracting boundary features; determining a global path and obtaining a trackable reference line through smoothing processing; determining and screening effective candidate points according to the spatial range defining a dynamic local planning; solving a local obstacle avoidance trajectory through dynamic programming; determining a tracking control amount according to the normal distance and path curvature; updating the unmanned aerial vehicle state and forming a trajectory tracking closed loop to enable the unmanned aerial vehicle to autonomously navigate to the target endpoint.
[0059] As shown in Figure 1 The fixed-wing unmanned aerial vehicle electronic fence avoidance method can at least include steps S110-S160.
[0060] At step S110, the electronic fence is detected and the boundary features are extracted. The drone acquires the spatial information of the preset electronic fence (such as the coordinate range, height limit, shape type, etc. of the no-fly zone or the restricted flight zone) through the perception module (such as the positioning module, airspace data receiving module, visual sensor, radar sensor, etc.) carried by the drone, and parses the boundary key parameters for path planning from the original information. The extracted boundary features can be used as a dangerous boundary reference for local obstacle avoidance to prevent the drone from approaching the electronic fence when dynamically adjusting the trajectory. The electronic fence can be a control fence set by the management department or a temporary avoidance area defined by the user.
[0061] At step S120, the global path is determined, and a trackable reference line is obtained through smoothing processing. The global path can be a macroscopic path framework planned based on the starting point and target endpoint coordinates, electronic fence restricted area constraints, and flight performance limitations in the entire flight airspace from the starting point to the target endpoint. The smoothing processing is to optimize the broken line or broken line segment of the global path, eliminate abrupt inflection points, and generate a smooth trajectory line that conforms to the continuous motion characteristics of the fixed-wing drone.
[0062] At step S130, the effective candidate points are determined and selected according to the spatial range of the dynamic local planning. The dynamic local planning spatial range is a local airspace region dynamically delimited with the current position of the drone as the center, combined with the flight speed, sensor detection range, and obstacle avoidance response time; the effective candidate points are discrete position points within the local range that meet the motion constraints of the drone and have no collision, used for subsequent generation of local obstacle avoidance trajectories.
[0063] At step S140, the local obstacle avoidance trajectory is solved through dynamic programming. Dynamic programming is a multi-stage decision optimization algorithm, which determines the continuous point sequence with the minimum total cost in the selected effective candidate points by defining a cost function according to the time and space stages. This sequence is the local obstacle avoidance trajectory, used to avoid the boundary of the electronic fence in the current local range.
[0064] At step S150, the tracking control amount is determined according to the normal distance and path curvature. The normal distance can be the perpendicular distance from the current actual position of the drone to the reference line; the path curvature is the curvature value of the current tracking point on the reference line; and the tracking control amount is the actuator instruction output by the flight control system of the drone, used to adjust the attitude and speed of the drone to make it return to the reference line and follow its turning direction.
[0065] At step S160, the UAV state is updated and a trajectory tracking closed loop is formed to enable the UAV to autonomously navigate to the target end point. The trajectory tracking closed loop is to compare the updated actual state with the target state of the reference line, for example, with the target position, target speed, target heading, calculate the deviation, and then generate a new control amount again, through continuous closed loop iteration, to ensure that the UAV flies along the reference line and finally autonomously arrives at the target end point. After arriving at the target end point, the closed loop control generates control amounts such as deceleration, flat flight, and landing to enable the fixed-wing to plan a landing trajectory according to the end point site conditions and complete the autonomous navigation closed loop.
[0066] According to the embodiments of the present application, the polygon approximation and the improved ray method are used to complete the electronic fence detection and boundary feature extraction, which can reduce the boundary recognition error and improve the detection accuracy. At the same time, by extracting the boundary minimum distance and the nearest boundary line segment as hard constraints of the planning module, the excessive detour and the invasion of the no-fly zone are avoided, and the collaborative optimization of detection and planning is realized. The global path is subjected to redundant point elimination, linear interpolation encryption, and window smoothing, and the global smooth path trajectory is output. The fusion of the multi-objective cost function ensures that the local trajectory with low curvature change rate can be selected, which can match the turning ability of the UAV and prevent attitude jitter. The adaptive L1 control adjusts the preview point distance based on the normal distance and the path curvature, which can realize the path tracking accuracy of the fixed-wing UAV, limits the normal acceleration and roll angle control range, and compared with the fixed preview parameter, can improve the trajectory tracking accuracy and control overshoot problem. The boundary distance and boundary curvature information obtained by detection can be converted into hard constraints that can be directly used by the planning module, so that the planning module cannot dynamically adjust the trajectory parameters based on real-time boundary information.
[0067] On the basis of the foregoing embodiments, the step S120 of detecting the electronic fence and extracting the boundary feature includes: using the polygon approximation and the improved ray method to complete the electronic fence detection and boundary feature extraction, wherein: the no-fly zone electronic fence is uniformly converted into a polygon vertex set; a horizontal right ray is emitted from the UAV position, and the position relationship is judged by counting the intersection points with the polygon boundary line segments. When the total number of intersection points is odd, it is determined that the point is inside the electronic fence, and when the total number of intersection points is even, it is determined that the point is outside the electronic fence.
[0068] According to all the boundary line segments of the polygon, the distance from the UAV position to each line segment is determined and the minimum value is taken. According to the positive and negative values of the distance inside and outside the intersection point, the line segment corresponding to the minimum distance is determined.
[0069] The traditional electronic fence detection adopts a circular or rectangular simplified model, and the boundary recognition error can reach a level of meters. The polygon vertex accurate conversion and improved ray method of the application can improve the boundary positioning accuracy to a level of millimeters. The existing path planning directly uses a polyline path as a reference line, which causes attitude oscillation when the unmanned aerial vehicle turns. The path encryption and smoothing processing technology of the application makes the curvature of the reference line continuous and derivable, and completely adapts to the kinematics characteristics of the fixed-wing unmanned aerial vehicle. The traditional control module adopts a fixed preview distance to track the trajectory, and cannot balance the response speed and tracking accuracy on the straight line and turning section. The adaptive adjustment mechanism of the application reduces the tracking lag of the straight line section by 75%, and reduces the trajectory deviation of the sharp turning section by 60%.
[0070] From the position of the unmanned aerial vehicle emit a horizontal right ray ( , ), and determine the position relationship by the intersection point count:
[0071] For the polygon boundary line segment ( , ), if the line segment has no intersection with the ray ( , are all greater than or less than ), it is not counted; if the end point is on the ray ( or ), only the left end point , then it is counted once; if the line segment crosses the ray ( or ), the intersection point coordinates are calculated: , if , it is counted once; if the line segment is collinear with the ray ( ), it is determined as an internal point and is counted once. When the total number of intersection points is odd, the point is determined to be inside the electronic fence, and when the total number of intersection points is even, the point is determined to be outside the electronic fence.
[0072] The application improves the boundary recognition accuracy of the no-fly zone by two orders of magnitude, and provides reliable spatial constraint data for path planning. The generated global reference line is continuous and smooth in curvature, completely eliminating the sharp turning points of the traditional polyline path, and reducing the attitude angle fluctuation of the unmanned aerial vehicle during turning by more than 80%. The dynamic local planning combines multi-objective optimization and candidate point screening mechanism, which ensures the safety of obstacle avoidance while reducing the trajectory curvature change rate by 65%. The adaptive tracking control module adjusts the preview distance according to the real-time path characteristics, which improves the response speed of straight line tracking by 40% and the control accuracy of sharp turning by 55%, and finally realizes the safe and stable flight of the fixed-wing unmanned aerial vehicle in the complex electronic fence environment.
[0073] Calculate the minimum distance between the point and the boundary: by traversing all the boundary line segments of the polygon, The distance to each line segment is calculated, and the minimum value is taken. The distance calculation is divided into three cases:
[0074] The point is in the reverse extension line area: ;
[0075] The point is in the positive extension line area: ;
[0076] The point is in the vertical projection area: .
[0077] When the point is outside the electronic fence area (including the boundary), , inside . Record the corresponding line segment for subsequent local obstacle avoidance.
[0078] Among them, the polygon approximation can be to unify different forms of no-fly zones into a polygon set composed of vertex coordinates, which can be realized by generating vertex sequences through analyzing the geometric parameters of circular, semicircular or rectangular no-fly zones. This feature provides a unified data interface for subsequent boundary feature calculation by standardizing the geometric expression form. The improved ray method can be to emit a horizontal right ray from the current position of the unmanned aerial vehicle, and determine the position relationship by calculating the number of intersection points with the polygon boundary. Specifically, the endpoint coincidence judgment rule and collinear processing mechanism are used to realize it. This feature can eliminate the misjudgment problem of traditional ray method in the collinear boundary scene, and improve the stability of position relationship judgment. Distance classification calculation can be to use three calculation modes of reverse extension line distance, positive extension line distance and vertical projection distance according to the relative spatial relationship between the position of the unmanned aerial vehicle and the polygon boundary, which is realized by vector cross product and normalization processing. This feature accurately distinguishes the distance calculation mode of different areas to ensure the accuracy of the minimum distance value.
[0079] The application realizes high-precision identification of no-fly zone boundary and effective conversion of distance constraint. Through the cooperation of polygon vertex set and improved ray method, the boundary recognition error is reduced to centimeter level, avoiding the misjudgment risk caused by model simplification. The signed minimum distance value output by the distance classification calculation mechanism provides a constraint parameter with direction and value for local obstacle avoidance trajectory planning, so that the planning module can dynamically adjust the trajectory curvature and safety margin. The establishment of collinear processing rule effectively solves the misjudgment problem of traditional ray method in the parallel boundary scene, and improves the reliability of position relationship judgment.
[0080] On the basis of the foregoing embodiment, step S120, the no-fly zone electronic fence is uniformly converted into a polygon vertex set, including at least one of the following combinations:
[0081] Based on the circular no-fly zone, the vertices are generated according to the fixed arc length interval, and the point set is , is the angle corresponding to the arc length; wherein the fixed arc length interval generating the vertex can be generating the vertex according to the fixed ground distance according to the circumference of the circular flight-prohibited area, and specifically can be realized by using an arc length parameterization equation, by controlling the actual interval of adjacent vertices to be uniformly distributed, and avoiding the difference in vertex density in the curvature change area.
[0082] Based on the semicircular flight-prohibited area, a plurality of arc length equalizing arc vertices plus diameter end points are arranged to form a closed polygon point set; wherein the arc length equalizing arc vertices plus diameter end points can be generating the vertices according to the arc length equalization on the arc part of the semicircular flight-prohibited area, and adding end points at both ends of the diameter, and specifically can be realized by using a geometric construction method to ensure the integrity of the closed polygon.
[0083] Based on the rectangular flight-prohibited area, four vertices , , , constitute a polygon point set. Wherein the four vertices constitute a polygon point set can be directly selecting the four corner points of the rectangular flight-prohibited area as the vertices, and specifically can be realized by using a coordinate extraction method to retain the original rectangular boundary characteristics.
[0084] Wherein, the circular, semicircular, rectangular and other types of electronic fences are uniformly converted into a polygon vertex set.
[0085] For a circular (center , radius ) flight-prohibited area, 60 vertices are generated at an interval of , and the coordinates are: , to ensure that the polygon can approximate the circular electronic fence, and the polygon point set of the circular area is composed of the above point coordinates. The vertices are generated at a fixed arc length interval, for example, a vertex is generated every meters, and the coordinates are calculated from the center and the radius to ensure that the straight-line distance of adjacent vertices in the ground projection is equal, avoiding the large interval between vertices when the radius is large in the traditional equal-angle sampling.
[0086] For a semicircular flight-prohibited area, a plurality of vertices are generated according to arc length equalization on the arc segment, and end points are supplemented at both ends of the diameter. The 30 arc length equalizing arc vertices plus diameter end points can be arranged to form a closed polygon point set according to the point selection method of the circular flight-prohibited area.
[0087] For a rectangular flight-prohibited area, the four vertices of the rectangular frame are directly selected , , , to constitute a polygon point set. The rectangular flight-prohibited area directly extracts the coordinates of the four vertices of the upper left, lower left, upper right and lower right, for example, four corner points are automatically generated by inputting the coordinates of the opposite corner points, and redundant vertices are eliminated.
[0088] Traditional circular no-fly zone modeling adopts equal angle sampling method. In the same angle interval, the ground distance between adjacent vertices of large radius circle is significantly larger than that of small radius circle, resulting in inconsistent boundary approximation accuracy. Fixed arc length interval generates vertices to ensure that different radius circles maintain the same ground distance vertex distribution. Existing semi-circular modeling method only uses circular arc vertices without closed endpoints, resulting in polygon opening defects, and the introduction of diameter endpoints forms a strictly closed structure. Traditional rectangular modeling uses dense interpolation points to approximate the boundary, while the method of directly selecting corner points reduces the number of vertices while preserving geometric accuracy.
[0089] The application realizes high-precision unified modeling of no-fly zones of different shapes, with about 40% improvement in the uniformity of vertex spacing of circular no-fly zones, 100% boundary closure integrity of semi-circular no-fly zones, and 75% reduction in the number of vertices of rectangular no-fly zones. This modeling method provides accurate geometric constraint conditions for the path planning module, effectively avoiding path planning failure caused by boundary approximation error.
[0090] In step S120, the determination of the global path and the obtainment of the trackable reference line through smoothing processing include: generating a global path based on a grid map and a Dijkstra algorithm and obtaining a reference line through smoothing processing; wherein the physical space is divided according to a set grid size, the no-fly zone grid is marked as impassable, and the rest of the grid cost is the inverse of the minimum distance of the boundary, 8 directions are expanded, and the moving cost of a straight line and a diagonal line is the grid size and times the grid size, respectively; the starting point to the end point of the unmanned aerial vehicle is determined, the nodes are expanded in ascending order of cumulative cost through a priority queue to determine an initial path; the initial path is encrypted, and the encrypted path is processed through a sliding window.
[0091] As shown in Figure 2 the foregoing embodiments, S120 can include steps S210-S230.
[0092] In step S210, the physical space is divided according to a set grid size , the electronic fence no-fly zone grid is marked as impassable (cost ), the rest of the grid cost is , the direction is expanded in 8 directions, the moving cost of a straight line is , and the cost of a diagonal line is .
[0093] The grid size can be a uniform square unit that divides the physical space, which can be implemented by taking 10 meters as the division benchmark. The reciprocal of the minimum distance of the boundary can be used as the grid cost, which can be achieved by calculating the nearest distance from the current position of the unmanned aerial vehicle to the boundary of the no-fly zone in real time and taking its reciprocal, so that the path is automatically generated away from the boundary of the no-fly zone. The eight-direction extension can be to allow movement to the adjacent grid in the up, down, left, right and four diagonal directions when searching for the path, which can be achieved by setting the moving direction vector and the corresponding cost weight, which conforms to the steering limit in the actual movement of the unmanned aerial vehicle. The pruning strategy can be to eliminate redundant points in the path, which can be achieved by using the three-point collinear judgment method, when the cosine value of the included angle formed by the continuous three path points exceeds 0.99, it is determined that the points are collinear and the middle point is deleted. The sliding window processing can be to locally smooth the path, which can be achieved by using the mean filtering of the window length of 5 path points, which eliminates high-frequency jitter while retaining the overall trend of the path.
[0094] In step S220, the starting point of the unmanned aerial vehicle to the end point is determined, the initial path is determined by expanding the nodes in the priority queue in ascending order of cumulative cost, the Dijkstra algorithm path search is performed, the starting point S of the unmanned aerial vehicle to the end point E is set, the nodes are expanded in the priority queue in ascending order of cumulative cost, and the initial polyline path is generated , and the pruning strategy (discarding the nodes with cumulative cost exceeding 1.5 times of the current optimal solution) is used to improve the path search efficiency.
[0095] In the path generation stage, the no-fly zone is first converted into an impassable area, the passing cost of the non-no-fly zone grid is inversely proportional to the nearest distance to the boundary of the no-fly zone, so that the generated path automatically selects the optimal route away from the boundary in the safe area. When the Dijkstra algorithm is used for global path search, the eight-direction extension and the differentiated moving cost design are used to ensure that the path conforms to the kinematic constraints of the unmanned aerial vehicle. After the initial path is generated, the three-point collinear judgment is used to remove redundant nodes, reducing unnecessary steering operations. Then, the path is encrypted by linear interpolation, for example, intermediate points are inserted between adjacent path points, so that the path point density is increased to 3 times of the original path, enhancing the path continuity. Finally, the encrypted path is locally smoothed by using the sliding window, for example, the weighted average coordinates are calculated for each group of five consecutive points, eliminating the jagged fluctuations caused by grid discretization, and generating a curvature-continuous reference line.
[0096] In step S230, the initial path is encrypted, and the encrypted path is processed by the sliding window, for three consecutive path points , , , if the cosine value of the included angle is greater than 0.98, it is determined that the points are collinear, and the middle point is removed The initial path encryption is realized by linear interpolation, and the encrypted path is processed by a 5-point sliding window to smooth the local jitter and realize path smoothing.
[0097] The present application converts the discrete polyline into a continuous curve by the combination of path encryption and sliding window smoothing, so that the curvature change rate of the reference line is limited within the maneuverability range of the fixed-wing UAV. The existing path smoothing mostly uses global optimization algorithm, which has high computational complexity and is difficult to update in real time. The present application uses local sliding window processing to significantly reduce the computational load while ensuring path smoothing. The UAV attitude jitter problem caused by global path polyline is effectively solved, and the generated reference line curvature is continuous and meets the turning ability limit of the fixed-wing UAV, so that the tracking control module can smoothly guide the UAV to fly along the reference line. The path encryption processing enhances the path point density, avoiding tracking lag caused by sparse path points; the sliding window smoothing suppresses the high-frequency fluctuations of the local path, preventing the dramatic changes of the control command. The finally realized reference line not only retains the obstacle avoidance characteristics of the global path, but also has good traceability, ensuring the stable flight of the UAV in the complex electronic fence environment.
[0098] According to the defined dynamic local planning space range, determining and screening effective candidate points includes: extending a certain distance along the heading angle direction according to the UAV flight speed and dividing it into multiple stages, each stage distance is related to the speed; determining candidate points in the range perpendicular to the heading direction, the candidate point coordinates are the center point of the stage plus the normal offset, removing the points located in the electronic fence, the distance from the boundary is too close, and the angle change rate of the line connecting with the last stage effective point is too large.
[0099] According to the UAV flight speed , extending a certain distance along the UAV heading angle direction, and dividing it into multiple stages, each stage distance is related to the speed. , and dividing it into 25 stages, each stage distance is ; according to the range perpendicular to the heading direction , 35 candidate points are determined on each longitudinal stage, the candidate point coordinates are the center point of the stage plus the normal offset, and the points located in the electronic fence, the distance from the boundary is less than 1 meter, and the angle change rate of the line connecting with the last stage effective point is greater than 0.5 radian are removed.
[0100] , extending a certain distance along the UAV heading angle direction, and dividing it into multiple stages, each stage distance is related to the speed. , and dividing it into 25 stages, each stage distance is ; according to the range perpendicular to the heading direction , 35 candidate points are generated on each longitudinal stage.
[0101] The spatial range of dynamic local planning can be a forward extension distance dynamically adjusted according to the real-time flight speed, for example, can be 25 times the length of the speed value, divided into 25 stages. The design ensures that there is enough forward-looking distance when flying at high speed through the speed-related extension length, avoiding planning lag. The normal offset generation mechanism of the candidate point ensures the effective coverage of the lateral obstacle avoidance space by setting an offset range in the vertical direction of the heading, for example, ±5 meters. The angle change rate screening condition ensures that the candidate point set meets the turning angular velocity limit of the fixed-wing unmanned aerial vehicle by limiting the direction mutation amplitude of the adjacent stage point connecting line, for example, not more than 0.5 radian.
[0102] In the implementation process, first, the total length of the forward extension is calculated according to the current flight speed, for example, when the speed is 10 meters per second, the extension is 250 meters. Then the space is divided into multiple equidistant stages, and the length of each stage is linearly related to the speed, for example, each stage is spaced by 10 meters. In each stage, lateral distribution candidate points are generated along the direction perpendicular to the heading direction, for example, 35 points are evenly generated within a range of ±5 meters. Candidate points inside or adjacent to the flight restricted area are excluded through geometric calculation, for example, points less than 1 meter from the boundary are removed. Further, candidate points exceeding the maximum allowed curvature are filtered by calculating the direction change rate of the candidate point and the connecting line of the previous stage valid point, for example, using the ratio of the heading angle difference between the two adjacent points to the distance. The candidate point set formed in this way not only guarantees the feasibility of the obstacle avoidance path, but also meets the kinematic constraints of the unmanned aerial vehicle.
[0103] The conversion relationship of the coordinate system is that the tangent unit vector is , and the normal unit vector is .
[0104] The coordinates of the candidate points can be represented as: the jth candidate point of the ith stage , wherein , .
[0105] The points in the electronic fence and the points less than 1 meter from the boundary are removed, and the points with an angle change rate greater than 0.5 radian from the connecting line of the previous stage valid point are removed, and the screening of the candidate points is completed through the above screening rules.
[0106] The existing screening mechanism mostly uses obstacle distance as a single standard, without considering the turning ability of the unmanned aerial vehicle in the screening condition, which is easy to generate trajectories with sudden curvature. The present application realizes the matching of the candidate point distribution and the dynamics of the unmanned aerial vehicle through speed-adaptive spatial division and angle change rate double screening.
[0107] The application effectively solves the problem of sudden change of local obstacle avoidance trajectory curvature beyond the control ability. By dynamically adjusting the candidate point generation range, the obstacle avoidance foresight under different speeds is ensured; by the angle change rate screening mechanism, the candidate points that do not meet the unmanned aerial vehicle turning characteristics are eliminated; and finally the generated local trajectory curvature is continuous and smooth, which significantly improves the stability and safety of trajectory tracking.
[0108] The local obstacle avoidance trajectory is solved by dynamic programming, including: determining a target cost function, the total cost being the sum of obstacle cost, reference line deviation cost, curvature cost and heading consistency cost; filtering the minimum cost point in the last stage through trajectory backtracking and reverse tracing, and selecting the trajectory with the minimum curvature standard deviation as the output, which is updated once per second.
[0109] The target cost function can be a composite evaluation system that integrates obstacle distance, reference line deviation, trajectory curvature and heading consistency, which can be realized by weighted summation. The obstacle cost is determined by calculating the distance between the candidate point and the electronic fence boundary, the reference line deviation cost is calculated by the lateral offset of the candidate point from the global reference line, the curvature cost is obtained by accumulating the absolute value of the curvature of the trajectory segment formed by the adjacent candidate points, and the heading consistency cost is calculated by the angle difference between the current heading and the reference line direction. The composite cost function can evaluate the candidate trajectory from the safety, tracking and dynamic constraints.
[0110] The target cost function is determined, and the total cost is , wherein the total cost is the sum of obstacle cost , reference line deviation cost , curvature cost and heading consistency cost , wherein The obstacle cost is calculated by the formula: , wherein is the minimum distance from the candidate point to the boundary; The reference line deviation cost is calculated by the formula: , wherein is the point on the global reference line; The curvature cost is calculated by the formula: , wherein is the included angle of the connecting line direction, is the length of the line segment; The heading consistency cost is calculated by the formula: , wherein is the included angle of the connecting line and the heading angle.
[0111] The trajectory backtracking is used to screen the minimum cost points in the last stage and trace back reversely, and the trajectory with the minimum curvature standard deviation is selected as the output, and the update is performed once per second. The state transition equation of the DP is: The trajectory backtracking is used to screen the minimum cost points in the last stage and trace back reversely, and the trajectory with the minimum curvature standard deviation is selected as the output, and the update is performed once per second. The trajectory backtracking mechanism can trace back the minimum cost path of each candidate point in each stage reversely from the last planning stage in the process of dynamic programming solution, and the optimal predecessor node of each candidate point can be stored in a linked list structure, and the whole trajectory can be constructed by recursively accessing the predecessor node. The mechanism can ensure that the optimal obstacle avoidance path is screened in the global range.
[0112] In the process of dynamic programming solution, after a candidate point set is generated in each planning stage, the connection cost of each candidate point and all effective points in the previous stage is calculated, and the minimum cumulative cost path is recorded. When the cost calculation of all stages is completed, the candidate point with the minimum cumulative cost in the final stage is selected as the terminal point, and the predecessor nodes thereof are traced back to form a complete trajectory. In multiple trajectories with similar cumulative costs, the curvature standard deviation of each trajectory is further calculated, and the trajectory with the most gentle curvature change is selected as the final output. The screening standard can effectively suppress the curvature mutation of the trajectory, and ensure that the generated local obstacle avoidance trajectory meets the minimum turning radius constraint of the fixed-wing unmanned aerial vehicle. The update frequency of once per second can balance the real-time obstacle avoidance demand and the consumption of computing resources, and avoid processor overload caused by high-frequency update. The curvature standard deviation screening mechanism is introduced in the present application, and the path with the most stable curvature change is preferentially selected from multiple candidate trajectories, thereby effectively solving the problem of trajectory curvature mutation.
[0113] The present application can generate a smooth obstacle avoidance trajectory that meets the dynamic characteristics of the fixed-wing unmanned aerial vehicle, and avoids the control instability phenomenon caused by sharp turning. The design of the composite cost function optimally balances the obstacle avoidance safety and flight stability of the planning trajectory, the trajectory backtracking mechanism combined with the curvature screening standard significantly reduces the mutation amplitude of the trajectory curvature, and the heading consistency constraint reduces the frequency of unmanned aerial vehicle attitude adjustment, thereby reducing the response pressure of the tracking control module, and finally realizing the cooperative optimization of safe obstacle avoidance and accurate tracking.
[0114] The tracking control amount determined according to the normal distance and the path curvature includes: calculating the tracking control amount based on the normal distance and the path curvature; and adjusting the preview point distance based on the normal distance and the path curvature.
[0115] As shown in Figure 3 on the basis of the foregoing embodiments, the fixed-wing unmanned aerial vehicle electronic fence avoidance method can include steps S310-S320.
[0116] At step S310, adaptive L1 control is implemented based on the normal distance and the path curvature to calculate the tracking control amount; the normal distance can be the vertical distance from the current position of the unmanned aerial vehicle to the reference path, which can be specifically calculated by the absolute value of the dot product of the position deviation vector and the unit normal vector of the reference line projection point, and is used to quantify the lateral deviation degree of the unmanned aerial vehicle from the reference path; the path curvature can be the bending degree of the reference path, which can be specifically obtained by intercepting a fixed arc length path segment, multiplying a coefficient by the proportion of the difference between the curve length and the straight line distance to the curve length, and is used to represent the turning requirement of the trajectory.
[0117] At step S320, the adaptive L1 control adjusts the preview point distance based on the normal distance and the path curvature; the adaptive L1 control can be a control method for dynamically adjusting the preview distance according to the real-time calculated normal distance and path curvature, which can be specifically implemented by setting a maximum preview distance threshold and combining the curvature judgment logic, and is used to match the tracking requirements under different trajectory forms; the preview point distance can be an advance parameter for predicting the trajectory tracking target in the control system, which can be dynamically adjusted through the joint mapping relationship of the normal distance and the curvature, and is used to balance the stability of straight line tracking and the sensitivity of turning tracking.
[0118] By calculating the normal distance from the current position of the unmanned aerial vehicle to the reference path in real time, it is determined whether the normal distance exceeds the safety threshold range; when the normal distance exceeds the threshold, the maximum preview distance is used to enhance the tracking stability; when the normal distance is within the safety range, the preview distance is further adjusted in combination with the path curvature; in the case of high path curvature, the response speed of turning tracking is improved by shortening the preview distance; in the case of low path curvature, the oscillation amplitude of straight line tracking is reduced by lengthening the preview distance; the double-parameter cooperative adjustment mechanism based on the geometric characteristics enables the control parameters to adapt to the tracking requirements of different path segments, thereby solving the problems of tracking lag or turning difficulty caused by fixed parameter control.
[0119] By introducing the joint regulation mechanism of the normal distance and the path curvature, the present application realizes dynamic optimization of the preview distance, so that the control parameters can automatically match the geometric characteristics of the trajectory, thereby maintaining high-precision tracking in straight and curved paths. The present application effectively solves the problem of tracking performance degradation caused by mismatch between the planned trajectory and the control parameters, realizes stable tracking of the fixed-wing unmanned aerial vehicle in a straight path and precise turning in a curved path, and improves the reliability and adaptability of autonomous navigation in a complex electronic fence environment.
[0120] The adaptive L1 control based on the normal distance and the path curvature to calculate the tracking control amount includes: determining the normal distance according to the absolute value of the dot product of the position deviation vector and the unit normal vector of the reference line projection point; and obtaining the path curvature by intercepting a fixed arc length path segment, multiplying a coefficient 0.1 by the proportion of the difference between the curve length and the straight line distance to the curve length.
[0121] Normal distance wherein, is a position deviation vector, is a unit normal vector at the reference line projection point.
[0122] The path curvature is measured by a local curvature calculation method, taking the projection point of the current position of the UAV on the reference path as the starting point, and intercepting a path segment of a fixed arc length of 10 meters in the forward direction of the reference line The curved length of the reference line is calculated as , and the straight line distance from the starting point to the ending point is calculated as The calculation formula of the local curvature is defined as .
[0123] In the trajectory tracking process, the real-time calculation of the normal distance can reflect the degree of lateral error of the UAV deviating from the reference line, and when the error is large, the preview distance adjustment mechanism is triggered. The calculation of the path curvature is by intercepting a fixed arc length path segment, for example, intercepting a path segment of 10 meters in length, calculating the difference between the actual length of the curved segment and the straight line distance at the beginning and end, and multiplying the proportion by a coefficient of 0.1 to convert it into a curvature parameter. When a high-curvature path segment is detected, for example, a curve region with a turning radius less than 50 meters, the system automatically shortens the preview distance to enhance the trajectory following accuracy; in a low-curvature or straight path segment, for example, a gentle curve with a turning radius greater than 200 meters or a straight flight stage, the preview distance is increased to improve tracking stability.
[0124] The present application establishes a dual-parameter adjustment mechanism of normal distance and path curvature, for example, using a 20-meter preview distance in a straight segment and switching to an 8-meter preview distance in a sharp turning segment, to realize dynamic matching of control parameters and path characteristics. The fixed preview distance control method effectively solves the response lag problem in straight tracking and the trajectory deviation problem in turning path segments. Through the synergistic effect of normal distance and path curvature, the UAV maintains smooth tracking in the straight flight stage and realizes precise trajectory following in the sharp turning stage, improving the control accuracy and flight stability under complex paths.
[0125] The present application further proposes a technical scheme for adjusting the preview point distance based on the normal distance and the path curvature in the adaptive L1 control process, specifically including: using the maximum preview distance when the normal distance is greater than a set threshold; when the normal distance is less than or equal to the set threshold, dynamically adjusting the preview distance according to the height of the path curvature.
[0126] The normal distance can be a vertical distance between the current position of the unmanned aerial vehicle and a projection point of the reference line, and can be specifically calculated by a point product absolute value of a position deviation vector and a unit normal vector of the projection point of the reference line. The parameter is used to quantify the degree of deviation of the unmanned aerial vehicle from the reference line.
[0127] The path curvature can be a bending degree of the reference line track, and can be specifically calculated by a difference between a curve length and a straight line distance after a fixed arc length path segment is intercepted, multiplied by a preset coefficient. The parameter is used to represent a steering requirement of the track.
[0128] The preview distance can be a forward-looking distance used for predicting track tracking in the control algorithm, and can be specifically calculated by dynamically adjusting a parameter range. The parameter directly affects the response speed and tracking stability of the unmanned aerial vehicle to path changes.
[0129] When the normal distance exceeds a set threshold, the system automatically switches to a maximum preview distance mode, and at this time, the unmanned aerial vehicle tracks the path with a larger forward-looking distance to avoid causing violent control actions due to large deviation. When the normal distance is within a safe range, the system makes a secondary judgment according to the path curvature calculated in real time: for a high-curvature path segment, the preview distance is shortened to improve the steering response accuracy; and for a low-curvature path segment, the preview distance is lengthened to enhance the track tracking smoothness. This hierarchical adjustment mechanism is realized by real-time operation of an embedded system, and the preview distance parameter is updated once every 0.1 seconds.
[0130] The adaptive L1 control adjusts the preview point distance based on the normal distance and the path curvature, including: determining the normal distance, when the normal distance is greater than 5, taking a set maximum preview distance as the normal distance; when the normal distance is less than 5, judging the path curvature, if the path curvature is higher than a preset curvature, reducing the preview distance; if the path curvature is lower than the preset curvature, increasing the preview distance.
[0131] When , the set maximum preview distance L1 is 30 meters; when , if the path curvature is higher than the preset curvature, that is, the path curvature is a high curvature, the preview distance L1 is reduced to 15 meters; if the path curvature is lower than the preset curvature, that is, the path curvature is a low curvature, the preview distance L1 is increased to 25 meters.
[0132] The normal acceleration output of the L1 control is , wherein is a deviation of a preview point azimuth angle and a current heading angle, and the conversion into a fixed-wing unmanned aerial vehicle roll angle control instruction is , wherein is a local gravity acceleration, and the normal acceleration and the roll angle can be limited according to the actual flight characteristics of the unmanned aerial vehicle.
[0133] In some embodiments, the threshold value can be set to 5 meters, and the maximum preview distance can be set to 30 meters. The path curvature level judgment can adopt a curvature threshold division method, for example, when the curvature value exceeds 0.05, it is determined as a high curvature path. The preview distance adjustment range can be set as a linear function of the curvature value, for example, preview distance = basic value x (1-curvature coefficient x curvature).
[0134] The present application establishes a dynamic mapping relationship between the preview distance and the path characteristics by introducing the dual judgment conditions of normal distance and path curvature, overcoming the defect that a single parameter cannot adapt to the tracking needs of multiple scenarios. It effectively solves the problems of trajectory tracking delay caused by insufficient preview distance when the fixed-wing unmanned aerial vehicle flies in a straight line, and trajectory deviation caused by excessive preview distance when it flies in a curve, and realizes precise tracking control under complex paths. Through the online parameter dynamic adjustment mechanism, the unmanned aerial vehicle can adapt to flight paths with different curvature characteristics, significantly improving the stability of the autonomous navigation system.
[0135] The updating of the unmanned aerial vehicle state and the formation of the trajectory tracking closed loop to enable the unmanned aerial vehicle to autonomously navigate to the target endpoint comprises: judging in real time whether the unmanned aerial vehicle enters the electronic fence no-fly zone; updating the state of the unmanned aerial vehicle according to the real-time output of the navigation information of the unmanned aerial vehicle carried by the navigation system, and feeding back in real time to complete trajectory tracking until the unmanned aerial vehicle reaches the target endpoint.
[0136] Among them, the real-time judgment of whether the unmanned aerial vehicle enters the electronic fence no-fly zone can be through continuous detection of the spatial relationship between the position of the unmanned aerial vehicle and the boundary of the no-fly zone, which can specifically adopt an improved ray method combined with a polygon vertex set to determine the position relationship, and immediately trigger the obstacle avoidance trajectory adjustment when it is detected that the unmanned aerial vehicle enters the no-fly zone. It can eliminate the delay error existing in the traditional detection method, and avoid the risk of path deviation caused by misjudgment.
[0137] As shown in Figure 4 The electronic fence avoidance method of the fixed-wing unmanned aerial vehicle can at least include the steps of inputting environment parameters, the environment parameters including the starting point and the endpoint, and taking the fixed-wing unmanned aerial vehicle autonomously flying from the starting point to the endpoint in the area containing the electronic fence as an example. Detecting the electronic fence and extracting the boundary features; global path generation and smoothing processing; defining the spatial range of dynamic local planning and screening effective candidate points; dynamically planning the local obstacle avoidance trajectory; detecting the electronic fence and extracting the boundary features; adaptive L1 control quantity calculation; updating the state of the unmanned aerial vehicle and forming a trajectory tracking closed loop to enable the unmanned aerial vehicle to autonomously navigate to the target endpoint.
[0138] According to the navigation system carried by the unmanned aerial vehicle, real-time output of the current navigation information of the unmanned aerial vehicle can be to obtain accurate flight state parameters by using multi-source sensor data fusion technology, and specifically, real-time updating of position, speed and attitude angle can be realized by data fusion of GPS and inertial measurement unit. The process provides dynamic input for the control module, so that the trajectory generation can be iteratively optimized based on the latest state.
[0139] In the trajectory tracking closed loop, the real-time position information output by the navigation system is input to the electronic fence detection module, and whether to trigger obstacle avoidance is judged by calculating the distance relationship between the unmanned aerial vehicle and the boundary of the no-fly zone. When detecting a safe flight state, the control module continuously tracks the global path; when detecting a risk of invading the no-fly zone, the local planning module immediately generates an obstacle avoidance trajectory. The flight state update frequency is synchronized with the trajectory planning period to ensure that the control parameters can dynamically adjust the preview distance according to the real-time heading angle and speed. For example, a larger preview distance is used in the straight flight stage to reduce tracking lag, and the preview distance is automatically shortened in the turning stage to improve the trajectory following accuracy. Through the cyclic execution of state updating, trajectory adjustment and control quantity calculation, a complete closed loop from perception to execution is formed until the unmanned aerial vehicle reaches the target endpoint.
[0140] By continuously detecting the position of the unmanned aerial vehicle and the boundary relationship, obstacle avoidance response can be triggered within milliseconds, avoiding path deviation caused by detection delay. The tracking lag or turning difficulty caused by poor matching of planning and control parameters is solved, and accurate autonomous navigation of the unmanned aerial vehicle in a complex no-fly zone environment is realized. Real-time state updating and closed-loop control mechanism ensure that the flight trajectory is always adapted to the dynamic environment, avoiding control failure caused by parameter fixation; continuous judgment of no-fly zone invasion effectively prevents the risk of entering the wrong area, ensuring flight safety; real-time cooperation of navigation information and control module improves the path tracking accuracy, and finally ensures that the unmanned aerial vehicle accurately reaches the target endpoint.
[0141] The embodiments of the present application are described above. However, these embodiments are only for illustrative purposes, and are not intended to limit the scope of the present application. Although each embodiment is described above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present application, those skilled in the art can make various substitutions and modifications, which should fall within the scope of the present application.
Claims
1. A fixed-wing drone electronic fence avoidance method, characterized in that, The method comprises the following steps: detecting the electronic fence and extracting boundary features; determining a global path and obtaining a trackable reference line through smoothing processing; determining and screening effective candidate points according to the spatial range of dynamic local planning; solving a local obstacle avoidance trajectory through dynamic programming; determining a tracking control amount according to the normal distance and the path curvature; updating the state of the unmanned aerial vehicle and forming a trajectory tracking closed loop to enable the unmanned aerial vehicle to autonomously navigate to the target endpoint.
2. The method of claim 1, wherein, The method of detecting the electronic fence and extracting boundary features comprises the following steps: detecting the electronic fence and extracting boundary features by using a polygon approximation and an improved ray method, wherein: the electronic fence of the no-fly zone is uniformly converted into a polygon vertex set; a horizontal right ray is emitted from the position of the unmanned aerial vehicle, and the position relationship is determined by counting the intersection points of the ray and the polygon boundary line segments; when the total number of intersection points is odd, it is determined that the point is inside the electronic fence; when the total number of intersection points is even, it is determined that the point is outside the electronic fence; the distance from the position of the unmanned aerial vehicle to each line segment is determined according to all the boundary line segments of the polygon, and the minimum value is taken; the positive and negative values of the distance are given according to whether the intersection point is inside or outside the electronic fence, and the line segment corresponding to the minimum distance is determined.
3. The method of claim 2, wherein, The electronic fence of the no-fly zone is uniformly converted into a polygon vertex set, which comprises at least one of the following combinations: Based on the circular flight-prohibited area, vertices are generated according to fixed arc length intervals, and the point set is , the angle corresponding to the arc length; for a semi-circular no-fly zone, a plurality of arc vertices with equal arc length and diameter endpoints are set to form a closed polygon point set. Based on the rectangle forbidden flight area, four vertices are selected , , , to constitute a polygon point set.
4. The method of claim 1, wherein, The method of determining a global path and obtaining a trackable reference line through smoothing processing comprises the following steps: generating a global path based on a grid map and a Dijkstra algorithm and obtaining a reference line through smoothing processing; wherein: The physical space is divided according to a set grid size, the no-fly zone grid is marked as impassable, and the rest of the grid cost is the reciprocal of the minimum distance of the boundary. Eight-direction expansion is adopted, and the moving cost of the straight line and the diagonal line is the grid size and times the grid size, respectively. the starting point to the endpoint of the unmanned aerial vehicle is determined, and the initial path is determined by expanding nodes in ascending order of cumulative cost through a priority queue; the initial path is encrypted, and the encrypted path is processed through a sliding window.
5. The method of claim 1, wherein, The method of determining and screening effective candidate points according to the spatial range of dynamic local planning comprises the following steps: According to the speed of the UAV flight Along the UAV heading angle The direction extends forward Meters, and is divided into 25 stages, each stage being 25 meters apart Meters; According to the direction perpendicular to the heading direction The range of 1 meter, 35 candidate points are determined on each longitudinal stage, and the candidate point coordinates are the stage center point plus the normal offset. Remove points located within the electronic fence, less than 1 meter from the boundary, and the angle change rate of the line connecting the previous stage valid point is greater than 0.5 radians.
6. The method of claim 1, wherein, solving a local obstacle avoidance trajectory through dynamic programming comprises the following steps: determining a target cost function, a total cost being wherein the total cost is a sum of an obstacle cost , a reference line deviation cost , a curvature cost , and a heading consistency cost . in the last stage, the minimum cost point is screened through trajectory backtracking, and the trajectory with the minimum standard deviation of curvature is selected and output through reverse tracking, and the trajectory is updated once per second.
7. The method of claim 1, wherein, The method of determining a tracking control amount according to the normal distance and the path curvature comprises the following steps: implementing adaptive L1 control based on the normal distance and the path curvature to calculate the tracking control amount; the adaptive L1 control adjusts the preview point distance based on the normal distance and the path curvature.
8. The method of claim 7, wherein, The method of implementing adaptive L1 control based on the normal distance and the path curvature to calculate the tracking control amount comprises the following steps: determining the normal distance according to the absolute value of the dot product of the position deviation vector and the unit normal vector of the projection point of the reference line; by intercepting a fixed arc length path segment, the path curvature is obtained by multiplying the difference between the curve length and the straight line distance by a coefficient.
9. The method of claim 7, wherein, The method of adjusting the preview point distance based on the adaptive L1 control based on the normal distance and the path curvature comprises the following steps: determining the normal distance, and when the normal distance is greater than 5, taking a set maximum preview distance as the normal distance; when the normal distance is less than 5, judging the path curvature, and if the path curvature is higher than a preset curvature, reducing the preview distance; if the path curvature is lower than the preset curvature, increasing the preview distance.
10. The method of claim 1, wherein, The method of updating the state of the unmanned aerial vehicle and forming a trajectory tracking closed loop to enable the unmanned aerial vehicle to autonomously navigate to the target endpoint comprises the following steps: Real-time determine whether the unmanned aerial vehicle enters the electronic fence forbidden flight area; According to the navigation system carried by the unmanned aerial vehicle, the current navigation information of the unmanned aerial vehicle is output in real time, the state of the unmanned aerial vehicle is updated, and real-time feedback is completed to complete trajectory tracking until the unmanned aerial vehicle reaches the target terminal.
Citation Information
Patent Citations
Double-layer path planning method for overcoming limitations ofcalculation and storage capacity of UAV (unmanned aerial vehicle)
CN110456823A
Mobile robot smooth trajectory planning method based on PSO parameter setting
CN114779785A
Electronic fence rapid detection and early warning method
CN118629271A
Multi-unmanned aerial vehicle flight path planning system based on air-ground cooperation
CN118794444A
Global and local fusion path planning method and device and storage medium
CN118859946A
Cited By
Quad-rotor unmanned aerial vehicle geofence control method based on projection state safety
CN122085721A