Method for generating electronic fence for unmanned aerial vehicle

By generating UAV electronic fences based on geographic information objects and airborne perception systems, the problems of cumbersome generation methods and inappropriate obstacle avoidance in existing technologies are solved, achieving efficient and safe electronic fence generation that can meet the mission requirements in complex environments.

WO2026007335A1PCT designated stage Publication Date: 2026-01-08CHENGDU JOUAV DA PENG TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/138443
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-05
Filing Date
2024-12-11
Publication Date
2026-01-08

Smart Images

  • Figure CN2024138443_08012026_PF_FP_ABST
    Figure CN2024138443_08012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of unmanned aerial vehicles, and discloses a method for generating an electronic fence for an unmanned aerial vehicle. The key points of the technical solution of the present application are: to provide a method for generating an electronic fence for an unmanned aerial vehicle on the basis of a geographic information object and a flight mission, wherein the method allows for efficient and intelligent generation of an accurate fence, is safe and convenient, and does not impose excessive restrictions, the electronic fence generated by the method has uniqueness and practical significance imparted by the geographic information object, and demonstrates a high degree of mission matching, for example, setting no-fly zones for densely populated areas such as schools, hospitals, and stations, and setting regular inspection zones for key facilities such as bridges, base stations, and factories; and to provide a method for generating an obstacle electronic fence online on the basis of a sensing system, wherein the method comprises rapidly and effectively using an onboard sensing system to present an obstacle risk in a flight mission in the form of an electronic fence, to provide a timely alert for an operator to adjust the flight route, thereby further enhancing the flight safety of regular operational flight routes.
Need to check novelty before this filing date? Find Prior Art

Description

An unmanned aerial vehicle electronic fence generation method

[0001] Cross-reference to Related Applications

[0002] This application claims priority to Chinese Patent Application No. 202410899687.0, filed on July 5, 2024, and entitled "An Unmanned Aerial Vehicle Electronic Fence Generation Method", which is incorporated by reference herein in its entirety. TECHNICAL FIELD

[0003] The present application relates to the technical field of unmanned aerial vehicles, and more particularly, to an unmanned aerial vehicle electronic fence generation method. BACKGROUND

[0004] An electronic fence is a functional area established by a user to perform a task within a certain range, and the unmanned aerial vehicle must perform the task within the area. For example, a plant protection machine sprays pesticides in the field, and a surveying machine surveys the area. For the electronic fence, the flight control must also be designed so that the unmanned aerial vehicle cannot escape the fence.

[0005] Currently, the electronic fence used by the unmanned aerial vehicle is manually connected and made by map coordinate points, which is a tedious process. The flight plan of the unmanned aerial vehicle is usually developed to perform a certain task or meet a certain operational requirement, and the task will be carried out at different times and in different areas. Therefore, the current electronic fence generation method is not convenient to use, cannot adapt to the flight plan based on task requirements, and has too many human operations, which is prone to vulnerabilities.

[0006] Patent CN111065983A discloses a flight restriction area generation method and device, a method and device for controlling the flight of an unmanned aerial vehicle, and a control method and device for an unmanned aerial vehicle; including: obtaining the risk level of an airport, which is related to the airport type and the traffic volume; generating the flight restriction level and range of the airport area according to the risk level of the airport, wherein the airport areas of the same type have different flight restriction levels and ranges in airports of different risk levels; and making the generated flight restriction level and range of the airport area into a data file. The flight restriction level and range of the airport area can be generated according to the risk level of the airport, fully considering the operation protection needs of the airport and the use needs of the user, to a certain extent, solving the conflict between protection and use. In addition, the unmanned aerial vehicle can obtain the right to enter the authorized area by real-time or advance release, improving the convenience of the user under the premise of reasonable warning to the user. However, the device is mainly generated for the airport scene, cannot be applied to the general environment, the generation method is not convenient to use, cannot adapt to the flight plan based on task requirements, and has too many human operations, which is prone to vulnerabilities.

[0007] In addition, patent CN111651649A discloses a virtual fence construction method and system for power transmission lines and towers, which can include: scanning the deployment information of the power transmission lines and towers in a specified space region, constructing a three-dimensional simulation model based on the deployment information of the power transmission lines and towers, obtaining the spatial state data of the unmanned aerial vehicle, and real-time transmitting the spatial state data of the unmanned aerial vehicle into the three-dimensional simulation model, and constructing a virtual fence for the unmanned aerial vehicle through the three-dimensional simulation model to divide a three-dimensional no-fly area for the unmanned aerial vehicle. Based on the scheme provided in the present application, the virtual fence can be operated and established on the virtual entity, the dynamic and refined setting of the no-fly area for the unmanned aerial vehicle is realized, and remote real-time accurate control is achieved. However, this method needs to construct a three-dimensional simulation model of the power lines and towers, which is complex to operate, cannot meet the use requirements of the small-scale electronic fence that needs to surround the obstacles for the unmanned aerial vehicle to fly in a complex environment, and although the unmanned aerial vehicle usually needs to have the ability of environmental perception and obstacle avoidance, the perception and obstacle avoidance performance is related to the current state of the unmanned aerial vehicle itself and the environment, and cannot guarantee that the same obstacle can be correctly avoided every time. Therefore, a method for automatically generating obstacles in a fixed scene into an obstacle electronic fence is needed to improve the work efficiency and flight safety. SUMMARY

[0008] The purpose of the present application is to solve the above problems, and to provide an unmanned aerial vehicle electronic fence generation method, including two ways of generating an unmanned aerial vehicle electronic fence based on geographic information objects and flight tasks, and generating an obstacle electronic fence online based on a perception system.

[0009] The above technical purpose of the present application is achieved by the following technical scheme: an unmanned aerial vehicle electronic fence generation method, which includes generating an unmanned aerial vehicle electronic fence based on geographic information objects and flight tasks, and generating an obstacle electronic fence online based on a perception system.

[0010] The present application is further provided as follows: the generation of the unmanned aerial vehicle electronic fence based on geographic information objects and flight tasks includes the following steps:

[0011] S1: setting an electronic fence focus point;

[0012] S2: adding the focus point in S1 to a pre-selected point set;

[0013] S3: setting an electronic fence airspace attribute;

[0014] S4: screening the pre-selected point set in S2 through different algorithms according to the electronic fence airspace attribute set in S3 to form a final fence point;

[0015] The present application is further provided as follows: the generation of the obstacle electronic fence online based on the perception system includes the following steps:

[0016] Sa: In the flight mission, the airborne perception system continuously perceives the environment around the unmanned aerial vehicle;

[0017] Sb: When the perception system detects an obstacle within a safe distance or an obstacle avoidance is triggered, the three-dimensional point cloud of the obstacle is converted to a navigation coordinate system (North East Ground NED, East North Sky ENU) according to the corresponding unmanned aerial vehicle position information when the obstacle is perceived;

[0018] Sc: The converted three-dimensional point cloud is processed by a point cloud processing algorithm to obtain an electronic fence of the obstacle;

[0019] Sd: The electronic fence points are converted to longitude and latitude and added to the electronic fence map of the obstacle.

[0020] The application further provides that the setting mode of the attention point in S1 includes automatic selection and manual selection, and the attention point includes buildings in ground information and mission planning waypoints.

[0021] The application further provides that the buildings in the geographic information are buildings (such as schools, hospitals, stations, factories, reservoirs and bridges) obtained from remote sensing maps or navigation maps; and the business data is business data (such as common fire points, traffic accident-prone areas, geological disaster risk points, power lines and tower) at the geographic location.

[0022] The application further provides that the airspace attribute of the electronic fence in S3 is any one of forbidden entry and forbidden exit.

[0023] The application further provides that the airspace attribute of the electronic fence in S3 is set to forbidden entry, and the algorithm in S4 includes the following steps:

[0024] S4-1: The unordered scattered points in the preselected point set are first clustered to obtain a plurality of preselected point subsets;

[0025] S4-2: Voronoi triangulation is used for each of the preselected point subsets, and the super-long sides of the outermost non-geographic information object boundary are removed to obtain a unique triangular mesh;

[0026] S4-3: The triangular mesh is inflated using the polyline parallel line method to obtain an electronic fence coverage area;

[0027] S4-4: The vertices of the electronic fence coverage area polygon are the final generated fence points.

[0028] The application further provides that the airspace attribute of the electronic fence in S3 is set to forbidden exit, and the algorithm in S4 includes the following steps:

[0029] S4-a: Set the fence concave-convex property;

[0030] S4-b: for the concave electronic fence, continue to execute the steps of S4-2~S4-4;

[0031] For the convex electronic fence, the following steps are continued to be executed:

[0032] S4-c: Delaunay triangulation is performed on the unordered scattered points in the preselected point set to obtain a unique triangulation network;

[0033] The principle of the Delaunay triangulation algorithm is as follows:

[0034] Input: vertex list

[0035] Output: determined triangle list

[0036] Initialize the vertex list

[0037] Determine the super triangle

[0038] Add the super triangle vertex to the end of the vertex list

[0039] Add the super triangle to the triangle list

[0040] Traverse the vertex list

[0041] Initialize the edge list

[0042] Traverse the triangle list

[0043] Calculate the circumcenter and radius of the circumcircle of the current triangle

[0044] If the current point is in the circumcircle of the current triangle

[0045] Add the current triangle to the edge list three times

[0046] Remove the current triangle from the triangle list

[0047] End if

[0048] End traversal

[0049] Remove all duplicate edges from the edge list

[0050] Add all triangles formed by the edges in the edge list and the current triangle to the triangle list

[0051] In

[0052] End traversal

[0053] Remove the triangles related to the super triangle vertices from the triangle list;

[0054] S4-d: use the polyline parallel line method to shrink the triangulation network to obtain the electronic fence coverage area;

[0055] S4-e: the vertex of the electronic fence coverage polygon, i.e. the finally generated fence point.

[0056] The application is further configured that the onboard perception system in the Sa is a device with three-dimensional space perception capability, including a depth camera, a stereo camera, a laser radar, a millimeter wave radar and an ultrasonic radar.

[0057] The application is further configured that the corresponding unmanned aerial vehicle position information when perceiving the obstacle in the Sb includes unmanned aerial vehicle pose and sensor calibration parameters.

[0058] The application is further configured that the processing of the converted three-dimensional point cloud by the point cloud processing algorithm in the Sc to obtain the obstacle electronic fence includes the following steps:

[0059] Sc-1: the point cloud obtained by the onboard perception system is down-sampled (uniformly or voxel filtering) to reduce the data amount, and then an outlier removal statistical filter is used;

[0060] Sc-2: the filtered sparse three-dimensional point cloud is projected to an unmanned aerial vehicle height plane (i.e. the height of the point cloud is set to the height of the unmanned aerial vehicle);

[0061] Sc-3: the unordered point cloud is Delaunay triangulated to obtain a unique triangular mesh, and is inflated according to the unmanned aerial vehicle attributes (including whether the unmanned aerial vehicle is loaded with a payload and the specifications of the payload) to finally obtain the obstacle electronic fence point.

[0062] In summary, the application has the following beneficial effects:

[0063] The application provides a UAV electronic fence generation method based on geographic information objects and flight tasks. By setting an electronic fence airspace attribute, entry or exit is selected; a concerned geographic information object is set for the electronic fence; a boundary point of the selected geographic information object is added to a preselected point set; if the set airspace attribute is an entry prohibited airspace, unordered scattered points in the preselected point set are first clustered to obtain a plurality of preselected point subsets; Delaunay triangulation is used for each preselected point subset, and the longest outer layer non-geographic information object boundary is removed to obtain a unique triangular mesh; if the set airspace attribute is an exit prohibited airspace, fence concave-convexity is further set; Delaunay triangulation is performed on unordered scattered points in the preselected point set, and whether the longest outer layer is removed is selected according to the fence concave-convexity; the concave electronic fence needs to be removed, and the convex electronic fence does not need to be removed; a unique triangular mesh is obtained; a polyline parallel line method is used to expand or shrink the triangular mesh to obtain an electronic fence coverage area; the vertices of the electronic fence coverage area polygon are the finally generated fence points; the UAV electronic fence generation method based on geographic information objects and flight tasks can efficiently and intelligently generate accurate fences, is safe and convenient, and does not excessively limit, the electronic fence generated by the method has uniqueness and actual significance given by the geographic information objects, and has high task matching degree, for example, a school, a hospital, a station, and a population dense area covered thereby are set as a no-fly zone, and a bridge, a base station, a factory, and important facilities covered thereby are set as a normal inspection area.

[0064] The application also provides a method for generating an obstacle electronic fence online based on a perception system, in a flight task, an airborne perception system continuously perceives the environment around the unmanned aerial vehicle; the airborne perception system comprises a depth camera, a stereo camera, a laser radar, a millimeter wave radar, an ultrasonic radar and other devices with three-dimensional spatial perception capability; if the perception system detects an obstacle within a safe distance or an obstacle avoidance has been triggered, the obstacle electronic fence is constructed; the safe distance is usually consistent with the obstacle avoidance distance and can be dynamically adjusted; after confirming the construction of the obstacle electronic fence, the three-dimensional point cloud of the obstacle is converted to a navigation coordinate system according to the corresponding unmanned aerial vehicle pose, sensor calibration parameters and other information when the obstacle is perceived; the converted three-dimensional point cloud is processed through a point cloud processing algorithm; the point cloud processing algorithm comprises operations such as filtering the point cloud, projecting the point cloud to a plane, generating a unique triangular mesh through Delaunay triangulation, and combining the triangular mesh inflation of the unmanned aerial vehicle attributes to obtain the obstacle electronic fence; finally, the electronic fence points are converted to longitude, latitude and height and added to the obstacle electronic fence map; the obstacle electronic fence map will check and alarm the flight route in the next flight plan upload; the method quickly and effectively utilizes the airborne perception system to present the obstacle risk in the flight task in the form of an electronic fence, timely reminds the operator to adjust the flight route, and further improves the flight safety of the normalized operation flight route. BRIEF DESCRIPTION OF DRAWINGS

[0065] FIG. 1 is a flowchart of a method for generating an unmanned aerial vehicle electronic fence based on geographic information objects and flight tasks according to an embodiment of the application;

[0066] FIG. 2 is a selected boundary line and boundary point of a geographic information object according to an embodiment of the application;

[0067] FIG. 3 is a schematic diagram of generating an electronic fence through Delaunay triangulation according to an embodiment of the application;

[0068] FIG. 4 is a schematic diagram of inflating a triangular mesh through a broken line parallel line method according to an embodiment of the application;

[0069] FIG. 5 is a flowchart of a method for generating an obstacle electronic fence online based on a perception system according to an embodiment of the application;

[0070] FIG. 6 is a process in which an unmanned aerial vehicle obtains an obstacle point cloud through a perception system according to an embodiment of the application;

[0071] FIG. 7 is a schematic diagram of a process in which an obstacle point cloud generates an electronic fence according to an embodiment of the application;

[0072] FIG. 8 is a flowchart of a method for generating an electronic fence constrained by a boundary line according to an embodiment of the application. Detailed Implementation

[0073] To enable those skilled in the art to better understand the present application, the technical solution of the present application will be described in further detail below with reference to the embodiments and accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.

[0074] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present application will now be described in detail with reference to the embodiments.

[0075] Example 1:

[0076] As shown in Figures 1 to 3, a method for generating a drone electronic fence, which generates a drone electronic fence based on geographic information objects and flight missions, includes the following steps:

[0077] S1: Select the geographic information objects you are interested in and automatically set up electronic fence points of interest;

[0078] The methods for setting focus points include selecting geographic information objects, manually selecting focus points, and importing business data. Geographic information objects are objects contained in remote sensing maps and navigation maps (such as schools, hospitals, stations, factories, reservoirs, and bridges), and business data are business data of their geographical locations (such as common fire spots, traffic accident hotspots, geological disaster risk points, power grids, power lines, and towers).

[0079] S2: Add the points of interest to the pre-selected point set S;

[0080] S3: Set the electronic fence airspace attribute to "No Entry" or "No Exit";

[0081] S4: The final fence points are selected through algorithmic filtering;

[0082] If the electronic fence airspace attribute is set to "no entry" in S3, then the algorithm in S4 includes the following steps: S4-1: First, cluster the unordered scattered points in the pre-selected point set S to obtain multiple pre-selected point subsets;

[0083] S4-2: Apply Delaunay triangulation to each of the pre-selected point subsets and remove the excessively long edges of the outermost non-geographic information object boundaries to obtain a unique triangulation network.

[0084] S4-3: Expand the triangular mesh using the polyline parallel line method to obtain the electronic fence coverage area;

[0085] S4-4: the vertices of the electronic fence coverage polygon are the final generated fence points

[0086] If the electronic fence airspace attribute in S3 is set to forbidden exit, the algorithm in S4 includes the following steps:

[0087] S4-a: set the fence concave-convex property;

[0088] S4-b: for the concave electronic fence, continue to perform steps S4-2~S4-4;

[0089] For the convex electronic fence, the following steps are continued:

[0090] S4-c: Delaunay triangulation is performed on the unordered scattered points in the preselected point set to obtain a unique triangular mesh;

[0091] S4-d: the triangular mesh is internally shrunk using the polyline parallel line method to obtain the electronic fence coverage area;

[0092] S4-e: the vertices of the electronic fence coverage polygon are the final generated fence points.

[0093] This embodiment takes schools as the object of concern and generates an electronic fence, as follows:

[0094] S1: Select schools as the geographic information object of concern, as shown in FIG. 2, select schools, and automatically set the boundary points of the school geographic objects (primary schools, middle schools, universities, kindergartens, etc.) within the map range as electronic fence concern points;

[0095] S2: Add the electronic fence concern points to the preselected point set S;

[0096] S3: Set the electronic fence airspace attribute to forbidden entry;

[0097] S4: Use a clustering algorithm such as Kmeans to cluster the unordered scattered points in the preselected point set to obtain multiple preselected point subsets s. The clustering process regards schools that are clustered together as a single no-fly zone. As shown in FIG. 2, three schools in the map are close together and form a no-fly zone, obtaining a preselected point subset;

[0098] Delaunay triangulation is performed on the preselected point subset, and the excessively long edges of the outermost non-geographic information object boundary are removed (the boundary of the geographic information object itself is the basis for the electronic fence boundary and cannot be removed), obtaining a unique triangular mesh Δ, as shown in FIG. 3;

[0099] The principle of the Delaunay triangulation algorithm is as follows:

[0100] Input: vertex list

[0101] Output: determined triangle list

[0102] Initialize vertex list

[0103] Determine supertriangle

[0104] Add supertriangle vertices to end of vertex list

[0105] Add supertriangle to triangle list

[0106] Iterate through vertex list

[0107] Initialize edge list

[0108] Iterate through triangle list

[0109] Compute circumcenter and radius of current triangle's circumcircle

[0110] If current point is in current triangle's circumcircle

[0111] Add current triangle to edge list three times

[0112] Remove current triangle from triangle list

[0113] End if

[0114] End iteration

[0115] Remove all duplicate edges from edge list

[0116] Add all triangles formed by edges in edge list and current triangle to triangle list

[0117] End iteration

[0118] End iteration

[0119] Remove triangles associated with supertriangle vertices from triangle list

[0120] Finally, inflate the triangulation using the parallel line method to obtain the electronic fence coverage area.

[0121] As shown in FIG. 4, for each vertex P of the triangulation Δ, the inflated point Q is obtained, and the parallel line method formula is as follows:

[0122] where d is the inflation distance, is the vector from P to the parallel line of L1 through Q, is the vector from P to the parallel line of L2 through Q, is the vector from A to P, is the vector from B to P, is the modulus of the corresponding vector, P x , Q xx-axis coordinates of P, Q points y y-axis coordinates of P, Q points y

[0123] The vertices of the electronic fence coverage polygon are the final generated fence points, and the UAV is prohibited from crossing the area (dense teaching area) when flying in the area.

[0124] Embodiment 2

[0125] As shown in FIGS. 5 to 7, a UAV electronic fence generation method, which is different from embodiment 1, generates an obstacle electronic fence based on a perception system online, including the following steps:

[0126] Sa: In the flight task, the airborne perception system continuously perceives the environment around the UAV; the airborne perception system is a device with three-dimensional spatial perception capability, including a depth camera, a stereo camera, a laser radar, a millimeter wave radar, and an ultrasonic radar;

[0127] Sb: When the perception system detects an obstacle within a safe distance or has triggered obstacle avoidance, the safe distance and the obstacle avoidance distance are consistent, and can be dynamically adjusted, wherein the dynamic adjustment can be automatic adjustment in the preset safe distance or obstacle avoidance distance, or manual adjustment according to needs; according to the UAV position information corresponding to the perceived obstacle, including the UAV pose, the sensor calibration parameters, etc., the three-dimensional point cloud of the obstacle is converted to the navigation coordinate system (North East Ground NED, East North Sky ENU);

[0128] Obstacle point cloud p c Generally relative to the sensor coordinate system, the sensor extrinsic parameters and the current pose of the UAV are needed to convert the point cloud to the navigation coordinate system to obtain p n ;

[0129] Sc: Process the converted three-dimensional point cloud through a point cloud processing algorithm to obtain an obstacle electronic fence; including the following steps:

[0130] Sc-1: Downsample (uniform or voxel filtering) the point cloud obtained by the airborne perception system to reduce the data volume, and then remove outliers through a statistical filter;

[0131] Sc-2: Project the filtered sparse three-dimensional point cloud to the UAV height plane (i.e., set the point cloud height to the UAV height);

[0132] ​Sc-3: Delaunay triangulation is performed on the unordered point cloud to obtain a unique triangular mesh, and inflation is performed according to the attributes of the UAV (including whether the UAV carries a load and the specifications of the load carried), and finally the obstacle electronic fence points are obtained;

[0133] The point cloud processing algorithm includes downsampling (uniform or voxel filtering) of the point cloud to reduce the data amount for subsequent processing, removing outliers through a statistical filter, and projecting the filtered sparse three-dimensional point cloud to the UAV height plane (i.e., setting the point cloud height to the UAV height). After obtaining the processed point cloud, a unique triangular mesh is generated through Delaunay triangulation, and a triangular mesh inflation operation is performed in combination with the attributes of the UAV to obtain the obstacle electronic fence.

[0134] Sd: Finally, the electronic fence points are converted to latitude, longitude and height, and added to the obstacle electronic fence map. The obstacle electronic fence map will check and alert the flight route during the next flight plan upload.

[0135] Navigation coordinate system conversion to latitude, longitude and height, formula as follows:

[0136] NED origin latitude and longitude Ori (O lat ,O lon ,O alt )

[0137] Fence point NED position P (x, y, z)

[0138] Earth equatorial radius: E a = 6378137

[0139] Earth eccentricity e

[0140] Latitude coefficient: Rlat = E a (1-e 2 ) / (1-e 2 sin(O lat ) 2 ) 3 / 2 +O alt

[0141] Longitude coefficient: Rlon = (E a / (1-e 2 sin(O lat ) 2 ) 1 / 2 +O alt )*cos(O lat )

[0142] lat = x / Rlat + O lat

[0143] lon = y / Rlon + O lon

[0144] Embodiment 3

[0145] An electronic fence generation method, the method comprising the following steps:

[0146] S1: loading preset boundary line data;

[0147] The boundary line data is directly obtained by a remote sensing test unit and is composed of thousands of ordered boundary points;

[0148] S2: performing grid division on the boundary line data loaded in S1 to obtain boundary grids;

[0149] The boundary line data is divided into grids according to longitude and latitude, and this division method is more convenient for searching;

[0150] S3: manually drawing a rectangular fence frame across the boundary on a map;

[0151] S4: obtaining corresponding boundary grids according to the longitude and latitude range of the top vertex of the rectangular fence frame;

[0152] S5: extracting boundary data according to the intersection number of the boundary grids obtained in S2 and the corresponding boundary grids obtained in S4 to obtain target boundary lines;

[0153] The intersection is a boundary point set whose distance to the four edges of the rectangular fence frame meets a distance threshold value in the corresponding boundary grid; the distance threshold value is initially 1 km by default, and if there is no fence point in the range, the distance threshold value is increased iteratively.

[0154] The number of set centers obtained by the clustering algorithm is the number of intersections;

[0155] The clustering algorithm adopts a kmeans+elbow method;

[0156] The intersection is obtained by clustering a boundary point set whose distance to the four edges of the rectangular fence frame is less than a distance threshold value e in the corresponding boundary grid; the formula for obtaining the boundary point set cluster is as follows:

[0157] The horizontal edge of the rectangular fence frame: |Lat 边境点 -Lat 横边 |<e

[0158] The vertical edge of the rectangular fence frame: |Lon 边境点 -Lon 竖边 |<e

[0159] Wherein, the distance threshold value e is the longitude and latitude range.

[0160] As shown in FIG. 3, the dotted circles are a plurality of circular ranges formed with the boundary points closest to the four sides of the rectangular fence frame as the center and the threshold value as the radius, each of the circular ranges contains a plurality of boundary points, forming a boundary point set; the boundary point set can obtain the number of point set centers, i.e. the number of intersection points, through a common clustering algorithm, such as elbow method+kmeans;

[0161] The elbow method+kmeans is to obtain the optimal clustering number k by calculating the change trend of the clustering error sum of squares (SSE) under different clustering numbers k. The clustering error sum of squares SSE refers to the sum of squares of the distance of each data point to the cluster center to which it belongs. When the clustering number k is small, SSE gradually decreases; and when the clustering number k continues to increase, the decreasing speed of SSE gradually slows down until it finally stabilizes;

[0162] The algorithm for determining the intersection points by using kmeans+elbow method is as follows:

[0163] Input: point set

[0164] Output: number of intersection points

[0165] Create k value set

[0166] Create cluster center set

[0167] Initialize k value set

[0168] Set the maximum number of iterations

[0169] Traverse the K value set

[0170] The maximum number of iterations has not been reached

[0171] Initialize the cluster center set

[0172] Traverse the point set

[0173] Traverse the cluster center

[0174] Calculate the Euclidean distance of the current point to the current cluster center, and assign it to the nearest neighbor cluster according to the minimum distance principle

[0175] End of traversal

[0176] Recalculate the cluster center according to the category mean

[0177] End of traversal

[0178] End of iteration

[0179] Calculate the distortion degree of each category

[0180] End of traversal

[0181] Select the elbow point k value of the distortion degree as the number of intersection points

[0182] In the above algorithm, the Euclidean distance calculation formula is as follows:

[0183] Wherein, D is the Euclidean distance between points, n is the point set dimension, x i is the coordinate of a point in the current clustering point set, m i is the coordinate of the clustering center of the current clustering point set;

[0184] The distortion degree is calculated using the sum of squared errors, and the formula is as follows:

[0185] Wherein, SSE is the sum of squared errors, k is the number of clustering point sets, p is the coordinate of a point in the current clustering point set, m i is the coordinate of the clustering center of the current clustering point set;

[0186] The method determines the number of intersection points of the four sides of the rectangular fence frame and the boundary line data by clustering, avoids the method of using line-line intersection to find intersection points, and greatly reduces the consumption of computing resources;

[0187] S6: manually add fence points near the target boundary line obtained in S5 to finally form an electronic fence limited by the target boundary line and the manually added fence points.

[0188] The embodiment aims to solve the difficulty of manually setting an electronic fence when processing a border line. After setting a rectangular fence frame, the scheme can automatically generate an electronic fence. However, in most cases, the electronic fence can be manually modified according to requirements.

[0189] Working principle: first, load the boundary line or border line data composed of a large number of ordered boundary points from a remote sensing test company; and divide the boundary / line data according to the latitude and longitude grid to obtain the boundary / line grid for easy searching; then manually draw a rectangular fence frame across the boundary / line on the map, obtain the corresponding boundary / line grid according to the latitude and longitude range of the vertices of the rectangular fence frame; determine whether there is an intersection point between the four sides of the rectangular fence frame and the boundary / line data in the corresponding boundary / line grid; the intersection point is obtained by clustering the boundary point set whose distance between the boundary / line data in the corresponding boundary / line grid and the four sides of the rectangular fence frame is less than the distance threshold e; by the elbow method+kmeans clustering method, the number of point set centers can be obtained, that is, the number of intersection points, which is determined by the clustering method, the number of intersection points of the four sides of the rectangular fence frame and the boundary / line data, avoiding the method of using line-line intersection to find intersection points, greatly reducing the consumption of computing resources;

[0190] When the number of intersection points is greater than 2, it indicates that there is an enclave in the intersection area of the boundary / border line and the rectangular fence frame, or all the rectangular fence frame vertices are outside the boundary / border line, so that the electronic fence cannot be automatically generated; when the number of intersection points is equal to 2, the boundary / border point data between the intersection points is extracted to obtain the target boundary / border line; finally, fence points are added manually near the target boundary / border line to finally form an electronic fence limited by the target boundary / border line and the artificial fence points; the method can automatically process an ultra-large scale electronic fence limited by a boundary / border line such as a border line, a provincial and municipal administrative boundary and the like, and avoid the tediousness and omissions caused by excessive reliance on manual production.

[0191] The specific embodiments are only an explanation of the present application, and are not a limitation of the present application, and those skilled in the art can make modifications to the embodiments without creative contribution according to the needs after reading the present specification, but as long as the modifications are within the scope of the claims of the present application, they are protected by the patent law.

Claims

1. A method for generating an electronic fence for a UAV, the method comprising generating an electronic fence for a UAV based on geographic information objects and a flight mission, and generating an electronic fence for obstacles based on a perception system. 2.The method of claim 1, wherein, The step of generating an electronic fence for a UAV based on geographic information objects and a flight mission comprises: S1: setting an electronic fence focus point; S2: adding the focus point in S1 to a preselected point set; S3: setting an electronic fence airspace attribute; S4: filtering the preselected point set in S2 according to the electronic fence airspace attribute set in S3 by different algorithms to form final fence points. 3.The method of claim 1, wherein, The step of generating an electronic fence for obstacles based on a perception system comprises: Sa: during a flight mission, a perception system on board a UAV continuously perceives the environment around the UAV; Sb: when the perception system detects an obstacle within a safe distance or has triggered an obstacle avoidance, the three-dimensional point cloud of the obstacle is converted to a navigation coordinate system according to the corresponding UAV position information when the obstacle is perceived; Sc: the converted three-dimensional point cloud is processed by a point cloud processing algorithm to obtain an electronic fence for obstacles; Sd: the position information of the electronic fence for obstacles is converted from the navigation coordinate system to latitude, longitude and altitude, and is added to an electronic fence map for obstacles.

4. The unmanned aerial vehicle electronic fence generation method of claim 2, wherein, The focus point in S1 can be set in an automatic or manual manner, and the focus point includes buildings in ground information and mission planning waypoints.

5. The method of claim 4, wherein, The buildings in the geographic information are obtained from remote sensing maps or navigation maps.

6. The unmanned aerial vehicle electronic fence generation method of claim 2, wherein, The airspace attribute of the electronic fence in S3 is either entry forbidden or exit forbidden.

7. The unmanned aerial vehicle electronic fence generation method of claim 6, wherein, When the electronic fence airspace attribute in S3 is set to entry forbidden, the algorithm in S4 comprises the following steps: S4-1: the unordered scattered points in the preselected point set are clustered to obtain a plurality of preselected point subsets; S4-2: Delaunay triangulation is used for each preselected point subset, and the excessively long sides of the outermost non-geographic information object boundary are removed to obtain a unique triangular mesh; S4-3: the triangular mesh is inflated using a polyline parallel line method to obtain an electronic fence coverage area; S4-4: the vertices of the electronic fence coverage area polygon are the final generated fence points.

8. The unmanned aerial vehicle electronic fence generation method of claim 7, wherein, When the electronic fence airspace attribute in S3 is set to exit forbidden, the algorithm in S4 comprises the following steps: S4-a: setting the concave-convex property of the electronic fence; S4-b: for a concave electronic fence, the steps S4-2 to S4-4 are continued to execute; for a convex electronic fence, the following steps are continued to execute: S4-c: Delaunay triangulation is performed on the unordered scattered points in the preselected point set to obtain a unique triangular mesh; S4-d: the triangular mesh is shrunk inward using a polyline parallel line method to obtain an electronic fence coverage area; S4-e: the vertices of the electronic fence coverage area polygon are the final generated fence points.

9. The unmanned electronic fence generation method of claim 3, wherein, The perception system on board in Sa is a device with three-dimensional spatial perception capability, including a depth camera, a stereo camera, a laser radar, a millimeter wave radar and an ultrasonic radar.

10. The unmanned electronic fence generation method of claim 3, wherein, The corresponding UAV position information when the obstacle is perceived in Sb includes a UAV pose and sensor calibration parameters.

11. The unmanned electronic fence generation method of claim 3, wherein, The converted three-dimensional point cloud is processed by a point cloud processing algorithm in the Sc to obtain an obstacle electronic fence, including the following steps: Sc-1: The point cloud obtained by the airborne perception system is down-sampled to reduce the data volume, and then a statistical filter is used to remove outliers; Sc-2: The filtered sparse three-dimensional point cloud is projected to the height plane of the unmanned aerial vehicle; Sc-3: The disordered point cloud is Delaunay triangulated to obtain a unique triangular mesh, and is inflated according to the properties of the unmanned aerial vehicle, and finally the obstacle electronic fence point is obtained.

Citation Information

Patent Citations

  • Unmanned aerial vehicle flight control method and device

    CN107783554A

  • Geo-fence algorithm for unmanned aerial vehicle capable of autonomous flight

    CN109557942A

  • Unmanned aerial vehicle laser radar imitation flight method based on geographic space data

    CN117406778A

  • Unmanned aerial vehicle electronic fence generation method

    CN118764822A

  • Automatic generation method and apparatus for electronic fence, and real-time detection method and apparatus

    WO2023125363A1