Unmanned aerial vehicle electronic fence generation method
Through the electronic fence generation method based on geographical information objects and flight tasks, combined with Delaunay triangulation and polyline parallel line method, the existing technology problems of inconvenient UAV electronic fence generation and insufficient obstacle perception are solved, and efficient , Intelligent electronic fence generation improves flight safety and mission matching.
Patent Information
- Application Number
- CN202410899687.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-10-11
AI Technical Summary
Existing UAV electronic fence generation methods are inconvenient to adapt to mission requirements. There are too many manual operations and loopholes are prone to occur. It cannot effectively generate small-scale obstacle electronic fences in complex environments, and the sensing and obstacle avoidance performance is not enough to ensure flight safety.
A method of generating UAV electronic fences based on geographical information objects and flight tasks is adopted, by setting electronic fence focus points, filtering pre-selected point sets, applying Delaunay triangulation and polyline parallel line method to generate fence points, and using the airborne sensing system Generate obstacle electronic fences online and construct a three-dimensional electronic fence with obstacles through point cloud processing algorithms.
Efficient and intelligent electronic fence generation is achieved to ensure flight safety, convenience and without excessive restrictions, improve mission matching and flight safety, and can dynamically adjust obstacle electronic fences to adapt to flight mission needs.
Smart Images

Figure CN118764822A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles, and more particularly to a method for generating an electronic fence for an unmanned aerial vehicle. Background Art
[0002] Electronic fences are functional areas that users set aside to perform tasks within a specific range. UAVs must perform tasks within this area, such as plant protection drones spraying pesticides in the field, surveying and mapping drones surveying and mapping areas, etc. For electronic fences, flight control must also be designed so that the drone cannot run out of the fence.
[0003] The electronic fences currently used by drones are made by manually connecting map coordinate points, which is a cumbersome process. The flight plan of a drone is usually formulated 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 inconvenient to use and cannot adapt to flight plans based on mission requirements. There are too many manual operations and loopholes are prone to occur.
[0004] Patent CN111065983A discloses a method and device for generating a restricted flight zone, 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, the risk level being related to the type of airport and the traffic volume; generating the restricted flight level and range of the area within the airport according to the risk level of the airport, wherein the areas within the same type of airport have different restricted flight levels and ranges at airports with different risk levels; and making the generated restricted flight level and range of the area within the airport into a data file. The restricted flight level and range of the area within the airport can be generated according to the risk level of the airport, which fully considers the operational protection requirements of the airport and the use requirements of the user, and solves the conflict between protection and use to a certain extent. In addition, the unmanned aerial vehicle can obtain the right to enter the authorized area by real-time or early lifting of the ban, which improves the convenience of the user under the premise of giving the user a reasonable warning. However, the device is mainly generated for airport scenes and cannot be applied to conventional environments. The generation method is inconvenient to use and cannot adapt to flight plans based on mission requirements. There are too many manual operations and loopholes are prone to occur.
[0005] In addition, patent CN111651649A discloses a method and system for constructing a virtual fence for transmission lines and towers, which may include: scanning the deployment information of transmission lines and towers in a specified spatial area, and constructing a three-dimensional simulation model based on the deployment information of transmission lines and towers; obtaining the spatial state data of the drone, and transmitting the spatial state data of the drone to the three-dimensional simulation model in real time; and constructing a virtual fence for the drone through the three-dimensional simulation model to divide the three-dimensional no-fly zone of the drone. Based on the solution provided by the present invention, a virtual fence can be operated and established on a virtual entity, and dynamic and refined settings of the no-fly zone of the drone can be realized, so as to achieve remote real-time and precise control. However, this method needs to construct a three-dimensional simulation model of wires and towers, which is complicated to operate and cannot meet the use requirements of small-scale electronic fences that surround obstacles when drones fly in complex environments. Although drones usually need to have the ability to perceive the environment and avoid obstacles, the perception and obstacle avoidance performance are related to the current state and environment of the drone itself, and it is impossible to ensure that each flight can correctly avoid the same obstacle. Therefore, a method is needed to automatically generate obstacles in a fixed scene into obstacle electronic fences to improve operation efficiency and flight safety. Summary of the invention
[0006] The purpose of the present invention is to solve the above problems and provide a method for generating an electronic fence for a drone, including generating an electronic fence for a drone based on geographic information objects and flight missions, and generating an electronic fence for obstacles online based on a perception system.
[0007] The above technical purpose of the present invention is achieved through the following technical solutions: a method for generating an unmanned aerial vehicle electronic fence, the method comprising generating an unmanned aerial vehicle electronic fence based on geographic information objects and flight missions, and generating an obstacle electronic fence online based on a perception system.
[0008] The present invention is further configured as follows: generating a drone electronic fence based on geographic information objects and flight missions comprises the following steps:
[0009] S1: Set the electronic fence focus point;
[0010] S2: Add the focus points in S1 to the pre-selected point set;
[0011] S3: Set the electronic fence airspace attributes;
[0012] S4: screening the pre-selected point set in S2 by using different algorithms according to the electronic fence airspace attributes set in S3 to form the final fence points;
[0013] The present invention is further configured as follows: the online generation of an obstacle electronic fence based on a perception system comprises the following steps:
[0014] Sa: During the flight mission, the onboard perception system continuously senses the drone’s surroundings;
[0015] Sb: When the perception system detects an obstacle within a safe distance or has triggered obstacle avoidance, the three-dimensional point cloud of the obstacle is converted into a navigation coordinate system (North East Earth NED, Northeast Sky ENU) according to the corresponding drone position information when the obstacle is perceived;
[0016] Sc: Process the converted 3D point cloud through the point cloud processing algorithm to obtain the obstacle electronic fence;
[0017] Sd: Convert the electronic fence point to longitude, latitude and height, and add it to the obstacle electronic fence map.
[0018] The present invention is further configured as follows: the setting method of the focus points in S1 includes automatic selection and manual selection, and the focus points include buildings in ground information and mission planning waypoints.
[0019] The present invention is further configured as follows: the buildings in the geographic information are buildings obtained from remote sensing maps or navigation maps (such as schools, hospitals, stations, factories, reservoirs and bridges); the business data are business data of their geographic locations (such as common fire points, areas prone to traffic accidents, geological disaster risk points, power grid wires and poles).
[0020] The present invention is further configured as follows: the airspace attribute of the electronic fence in S3 is either no entry or no exit.
[0021] The present invention is further configured as follows: the electronic fence airspace attribute in S3 is set to be prohibited from entering, and the algorithm in S4 includes the following steps:
[0022] S4-1: cluster the disordered scattered points in the pre-selected point set first to obtain multiple pre-selected point subsets;
[0023] S4-2: using Delaunay triangulation for each of the pre-selected point subsets, and removing the extra-long edges of the outermost non-geographic information object boundary to obtain a unique triangulated network;
[0024] S4-3: Expand the triangulated network using the polyline parallel line method to obtain the electronic fence coverage area;
[0025] S4-4: The vertices of the polygon of the electronic fence coverage area are the fence points finally generated.
[0026] The present invention is further configured as follows: the electronic fence airspace attribute in S3 is set to be prohibited from exiting, and the algorithm in S4 includes the following steps:
[0027] S4-a: Setting fence concavity;
[0028] S4-b: For the concave electronic fence, continue to execute the steps S4-2 to S4-4;
[0029] For a convex hull geo-fence, continue with the following steps:
[0030] S4-c: performing Delaunay triangulation on the disordered scattered points in the pre-selected point set to obtain a unique triangulated network;
[0031] The principle of Delaunay triangulation algorithm is as follows:
[0032] Input: Vertex list
[0033] Output: List of determined triangles
[0034] Initialize the vertex list
[0035] Determine the super triangle
[0036] Add the super triangle vertex to the end of the vertex list
[0037] Add the super triangle to the triangle list
[0038] Iterate over the vertex list
[0039] Initialize edge list
[0040] Iterate over the triangle list
[0041] Calculate the center and radius of the circumcircle of the current triangle
[0042] If the current point is in the circumcircle of the current triangle, add the current triangle to the edge list three times and remove the current triangle from the triangle list
[0043] End if
[0044] End traversal
[0045] Remove all duplicate edges from the edge list
[0046] Add all triangles consisting of the edges in the edge list and the current triangle to the triangle list
[0047] End the traversal and delete the triangles associated with the super triangle vertices from the triangle list;
[0048] S4-d: using the polyline parallel line method to shrink the triangulated network to obtain the electronic fence coverage area;
[0049] S4-e: The vertices of the polygon of the electronic fence coverage area are the fence points finally generated.
[0050] The present invention is further configured as follows: the airborne perception system in 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.
[0051] The present invention is further configured as follows: the drone position information corresponding to the obstacle sensed in Sb includes the drone posture and sensor calibration parameters.
[0052] The present invention is further configured as follows: the three-dimensional point cloud after conversion is processed by the point cloud processing algorithm in Sc to obtain the obstacle electronic fence, which comprises the following steps:
[0053] Sc-1: Downsample the point cloud obtained by the airborne perception system (uniform or voxel filtering) to reduce the amount of data, and then remove outliers through a statistical filter;
[0054] Sc-2: Project the filtered sparse 3D point cloud to the drone height plane (i.e. set the point cloud height to the drone height);
[0055] Sc-3: Delaunay triangulate the disordered point cloud to obtain a unique triangulated network, which is then expanded according to the drone attributes (including the specifications of the drone without and with payload), and finally the obstacle electronic fence points are obtained.
[0056] In summary, the present invention has the following beneficial effects:
[0057] The invention provides a method for generating an electronic fence of a drone based on a geographic information object and a flight mission. The method comprises the following steps: setting an airspace attribute of the electronic fence to select entry or exit prohibition; setting a geographic information object of interest for the electronic fence; adding boundary points of the selected geographic information object to a pre-selected point set; if the airspace attribute set is a prohibited entry airspace, first clustering the disordered scattered points in the pre-selected point set to obtain a plurality of pre-selected point subsets; using Delaunay triangulation for each pre-selected point subset, and removing the extra-long edges of the outermost non-geographic information object boundary to obtain a unique triangulation network; if the airspace attribute set is a prohibited exit airspace, further setting the fence concavity and convexity; performing Delaunay triangulation on the disordered scattered points in the pre-selected point set, and selecting whether to perform the outermost triangulation according to the fence concavity and convexity. The extra-long edges of the layer are removed, the concave hull electronic fence needs to be removed, and the convex hull electronic fence does not need to be removed; a unique triangulated network is obtained; the triangulated network is expanded or contracted using the broken line parallel line method to obtain the electronic fence coverage area; the vertices of the electronic fence coverage area polygon are the fence points finally generated; the method for generating electronic fences for drones based on geographic information objects and flight missions of the present invention can efficiently and intelligently generate accurate fences, which is safe, convenient and not overly restrictive. The electronic fences generated by this method are unique, have practical significance given by geographic information objects, and have a high degree of task matching. For example, no-fly zones are set for densely populated areas covering schools, hospitals, and stations, and regular inspection areas are set for important facilities such as bridges, base stations, and factories;
[0058] The present invention also provides a method for generating an obstacle electronic fence online based on a perception system. During a flight mission, the airborne perception system continuously perceives the surrounding environment of the drone. The airborne perception system includes devices with three-dimensional space perception capabilities such as a depth camera, a stereo camera, a laser radar, a millimeter-wave radar, and an ultrasonic radar. If the perception system detects that there is an obstacle within a safe distance, or has triggered obstacle avoidance, the obstacle electronic fence is constructed. The safe distance is usually consistent with the obstacle avoidance distance and can be adjusted dynamically. After confirming the construction of the obstacle electronic fence, the obstacle three-dimensional point cloud is converted to a navigation coordinate system according to the drone posture corresponding to the obstacle perception, sensor calibration parameters and other information; the converted three-dimensional point cloud is processed by a point cloud processing algorithm; the point cloud processing algorithm includes converting the point cloud into a navigation coordinate system. The obstacle electronic fence is obtained by filtering, projecting the point cloud to a plane, generating a unique triangulated network through Delaunay triangulation, and expanding the triangulated network in combination with the properties of the drone; finally, the electronic fence points are converted to longitude and latitude and added to the obstacle electronic fence map; the obstacle electronic fence map will check and warn the route when the next flight plan is uploaded; this method quickly and effectively utilizes the airborne perception system to present the obstacle risks in the flight mission in the form of an electronic fence, and promptly reminds the operator to adjust the route, further improving the flight safety of the normalized operation route; this method quickly and effectively utilizes the airborne perception system to present the obstacle risks in the flight mission in the form of an electronic fence, and promptly reminds the operator to adjust the route, further improving the flight safety of the normalized operation route. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a flow chart of a method for generating an electronic fence of a drone based on geographic information objects and flight missions in Embodiment 1 of the present invention;
[0060] Figure 2 are the boundary lines and boundary points of the geographic information object selected in Embodiment 1 of the present invention;
[0061] Figure 3 is a schematic diagram of generating an electronic fence through Delaunay triangulation in Example 1 of the present invention;
[0062] Figure 4 It is a schematic diagram of expanding a triangulated network using the broken line parallel line method in Example 1 of the present invention;
[0063] Figure 5 is a flow chart of a method for online generation of an obstacle electronic fence based on a perception system in Embodiment 2 of the present invention;
[0064] Figure 6 This is the process in which the drone in Embodiment 2 of the present invention obtains the obstacle point cloud through the perception system;
[0065] Figure 7Schematic diagram of the process of generating an electronic fence from an obstacle point cloud in Embodiment 2 of the present invention;
[0066] Figure 8 This is a flow chart of a method for generating an electronic fence constrained by a boundary line in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0067] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution of the present invention will be further described in detail below in conjunction with the embodiments of the present invention and the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0068] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below in conjunction with the embodiments.
[0069] Embodiment 1:
[0070] like Figures 1 to 3 As shown, a method for generating an electronic fence for a drone is provided. The method generates an electronic fence for a drone based on a geographic information object and a flight mission, and comprises the following steps:
[0071] S1: Select the geographic information object of interest and automatically set the electronic fence focus point;
[0072] The setting methods of the points of interest include selecting geographic information objects, manually selecting points of interest, 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 points, traffic accident-prone areas, geological disaster risk points, power grid wires, and poles and towers);
[0073] S2: adding the focus point to the pre-selected point set S;
[0074] S3: Set the geo-fence airspace attribute to no entry or no exit;
[0075] S4: The final fence points are formed through algorithm screening;
[0076] In S3, the airspace attribute of the electronic fence is set to be prohibited from entering, and the algorithm in S4 includes the following steps: S4-1: first clustering the unordered scattered points in the pre-selected point set S to obtain multiple pre-selected point subsets;
[0077] S4-2: using Delaunay triangulation for each of the pre-selected point subsets, and removing the extra-long edges of the outermost non-geographic information object boundary to obtain a unique triangulated network;
[0078] S4-3: Expand the triangulated network using the polyline parallel line method to obtain the electronic fence coverage area;
[0079] S4-4: The vertices of the polygon of the electronic fence coverage area are the fence points finally generated
[0080] In S3, the geo-fence airspace attribute is set to "no exit", and the algorithm in S4 includes the following steps:
[0081] S4-a: Setting fence concavity;
[0082] S4-b: For the concave electronic fence, continue to execute steps S4-2 to S4-4;
[0083] For a convex hull geo-fence, continue with the following steps:
[0084] S4-c: Delaunay triangulates the disordered scattered points in the pre-selected point set to obtain a unique triangulated network;
[0085] S4-d: using the polyline parallel line method to shrink the triangulated network to obtain the electronic fence coverage area;
[0086] S4-e: The vertices of the polygon of the electronic fence coverage area are the fence points finally generated.
[0087] This embodiment takes the school as the object of attention and generates an electronic fence, which is as follows
[0088] S1: Select school as the geographic information object of interest, such as Figure 2 As shown, select School, and automatically set the boundary points of the school geographical objects (primary school, middle school, university, kindergarten, etc.) within the map range as the electronic fence focus points;
[0089] S2: Add the electronic fence focus points to the pre-selected point set S;
[0090] S3: Set the geo-fence airspace attribute to no entry;
[0091] S4: Use a clustering algorithm such as Kmeans to cluster the disordered scattered points in the pre-selected point set to obtain multiple pre-selected point subsets s. The clustering process regards the schools that are clustered together as the same no-fly zone, such as Figure 2 As shown, the three schools in the map are close to each other, forming a no-fly zone, and a pre-selected point subset is obtained;
[0092] Delaunay triangulation is used on the pre-selected point subset, and the extra-long edges of the outermost non-geographic information object boundary are eliminated (the boundary of the geographic information object itself is used as the basic boundary of the electronic fence and cannot be eliminated), and a unique triangulated network △ is obtained, such as Figure 3 As shown;
[0093] The principle of Delaunay triangulation algorithm is as follows:
[0094] Input: Vertex list
[0095] Output: List of determined triangles
[0096] Initialize the vertex list
[0097] Determine the super triangle
[0098] Add the super triangle vertex to the end of the vertex list
[0099] Add the super triangle to the triangle list
[0100] Iterate over the vertex list
[0101] Initialize edge list
[0102] Iterate over the triangle list
[0103] Calculate the center and radius of the circumcircle of the current triangle
[0104] If the current point is in the circumcircle of the current triangle, add the current triangle to the edge list three times and remove the current triangle from the triangle list
[0105] End if
[0106] End traversal
[0107] Remove all duplicate edges from the edge list
[0108] Add all triangles consisting of the edges in the edge list and the current triangle to the triangle list
[0109] End traversal
[0110] Remove the triangle associated with the super triangle vertex from the triangle list
[0111] Finally, the triangulated network is expanded using the polyline parallel line method to obtain the coverage area of the electronic fence;
[0112] like Figure 4 As shown, for each vertex P of the triangulated network △, point Q is obtained by dilation. The formula of the broken line parallel method is as follows:
[0113]
[0114]
[0115] Where d is the expansion distance, is the vector of the line parallel to point P to the L1 line segment through point Q, is the vector of the line parallel to point P to the L2 line segment through point Q, is the vector from point A to point P, is the vector from point B to point P, is the modulus of its corresponding vector, P x , Q χ is the x-axis coordinate of point P and point Q, P y , Q y are the y-axis coordinates of points P and Q.
[0116] The vertices of the polygons in the electronic fence coverage area are the final generated fence points. The drone is prohibited from crossing this area (intensive teaching area) when flying in this area.
[0117] Example 2
[0118] like Figures 5 to 7 As shown, a method for generating an electronic fence for a drone is different from Example 1 in that the method generates an obstacle electronic fence online based on a perception system, and includes the following steps:
[0119] Sa: During the flight mission, the onboard perception system continuously perceives the drone's surrounding environment; the onboard perception system is a device with three-dimensional spatial perception capabilities, including depth cameras, stereo cameras, laser radars, millimeter-wave radars, and ultrasonic radars;
[0120] Sb: When the perception system detects an obstacle within the safety distance or has triggered obstacle avoidance, the safety distance is consistent with the obstacle avoidance distance and can be adjusted dynamically. The dynamic adjustment can be automatic adjustment within the preset safety distance or obstacle avoidance distance, or manual adjustment as needed. According to the corresponding drone position information when the obstacle is perceived, including drone posture, sensor calibration parameters, etc., the three-dimensional point cloud of the obstacle is converted to the navigation coordinate system (North East Earth NED, Northeast Sky ENU);
[0121] Obstacle point cloud c Usually relative to the sensor coordinate system, the sensor external parameters And the current position of the drone Convert the point cloud to the navigation coordinate system and get p n ;
[0122]
[0123] Sc: Processing the converted three-dimensional point cloud by a point cloud processing algorithm to obtain an obstacle electronic fence; including the following steps:
[0124] Sc-1: Downsample the point cloud obtained by the airborne perception system (uniform or voxel filtering) to reduce the amount of data, and then remove outliers through a statistical filter;
[0125] Sc-2: Project the filtered sparse 3D point cloud to the drone height plane (i.e. set the point cloud height to the drone height);
[0126] Sc-3: Delaunay triangulate the disordered point cloud to obtain a unique triangulated network, and then expand it according to the drone attributes (including the specifications of the drone without and with payloads), and finally obtain the obstacle electronic fence points;
[0127] The point cloud processing algorithm includes downsampling the point cloud (uniform or voxel filtering) to reduce the amount of data for subsequent processing, removing outliers through statistical filters, and then projecting the filtered sparse three-dimensional point cloud to the drone height plane (that is, setting the point cloud height to the drone height). After obtaining the processed point cloud, the obstacle electronic fence is obtained by Delaunay triangulation to generate a unique triangulated network, and triangulated network expansion combined with drone attributes;
[0128] Sd: Finally, convert the electronic fence point to longitude and latitude, and add it to the obstacle electronic fence map. The obstacle electronic fence map will check and warn the route when the next flight plan is uploaded.
[0129] The navigation coordinate system is converted to longitude, latitude and altitude using the following formula:
[0130] NED origin latitude and longitude Ori(O lat ,O lon ,O alt )
[0131] Fence point NED position P(x,y,z)
[0132] Earth's equatorial radius: E a =6378137
[0133] Earth's eccentricity e
[0134] Latitude coefficient: Rlat = E a (1-e 2 ) / (1-e 2 sin(O lat ) 2 ) 3 / 2 +O alt
[0135] Longitude coefficient: Rlon=(E a / (1-e 2 sin(O lat )2 ) 1 / 2 +O alt )*cos(O lat )
[0136] lat=x / Rlat+O lat
[0137] lon=y / Rlon+O lon
[0138] Embodiment 3:
[0139] A method for generating an electronic fence, the method comprising the following steps:
[0140] S1: Load preset boundary line data;
[0141] The boundary / border line data is directly obtained through remote sensing testing and other units, and consists of thousands of orderly boundary points;
[0142] S2: Meshing the boundary line data loaded in S1 to obtain a boundary mesh;
[0143] The boundary / border line data is divided into grids according to longitude and latitude, which makes it easier to search;
[0144] S3: A rectangular fence frame across the domain boundary is manually drawn on the map;
[0145] S4: Obtaining a corresponding boundary grid according to the longitude and latitude ranges of the vertices of the rectangular fence frame;
[0146] S5: extracting boundary data according to the number of intersections of the boundary grid obtained in S2 and the corresponding boundary grid obtained in S4 to obtain a target boundary line;
[0147] The intersection point is the set of boundary points in which the distance between the boundary line data in the corresponding boundary grid and the four sides of the rectangular fence box meets the distance threshold; the default initial value of the distance threshold is 1km. If there is no fence point within the range, it will be increased iteratively.
[0148] The number of set centers obtained by the clustering algorithm for the boundary point set is the number of intersection points;
[0149] The clustering algorithm uses kmeans + elbow method;
[0150] The intersection point is obtained by clustering the boundary points whose distances from the boundary / border line data in the corresponding boundary / border grid to the four sides of the rectangular fence frame are less than the distance threshold e; the formula for obtaining the boundary point cluster is as follows:
[0151] Horizontal side of rectangular fence frame:
[0152] |Lat边境点 -Lat 横边 | <e
[0153] Rectangular fence frame vertical side:
[0154] |Lon 边境点 -Lon 竖边 | <e
[0155] The distance threshold e is the longitude and latitude range.
[0156] like Figure 3 As shown, the dotted circles are multiple circular ranges formed with the boundary points closest to the four sides of the rectangular fence as the center and the distance threshold as the radius. Each circle contains multiple boundary points to form a boundary point set. The boundary point set can be obtained by a common clustering algorithm, such as elbow method + kmeans, and the number of point set centers is the number of intersection points.
[0157] Elbow method + kmeans, it obtains the optimal number of clusters k by calculating the trend of the sum of squared clustering errors (SSE) under different number of clusters k. The sum of squared clustering errors SSE refers to the sum of the squares of the distances from each data point to the center of the cluster to which it belongs. When the number of clusters k is small, SSE will gradually decrease; and when the number of clusters k continues to increase, the rate of decrease of SSE will gradually slow down until it finally stabilizes;
[0158] The algorithm for determining the intersection point using kmeans + elbow method is as follows:
[0159] Input: Point set
[0160] Output: number of intersections
[0161] Create k value sets
[0162] Creating cluster center sets
[0163] Initialize k value set
[0164] Set the maximum number of iterations
[0165] Traverse the K value set
[0166] The maximum number of iterations was not reached
[0167] Initialize the cluster center set
[0168] Traversing point sets
[0169] Traversing cluster centers
[0170] Calculate the Euclidean distance from the current point to the current cluster center and assign it to the nearest neighbor cluster according to the principle of minimum distance.
[0171] End traversal
[0172] Recalculate the cluster center based on the category mean
[0173] End traversal
[0174] End iteration
[0175] Calculate the degree of distortion for each category
[0176] End traversal
[0177] Select the distortion elbow point k value as the number of intersection points
[0178] In the above algorithm, the Euclidean distance calculation formula is as follows:
[0179]
[0180] Among them, D is the Euclidean distance between points, n is the dimension of the point set, and x i is the coordinate of a point in the current cluster point set, m i is the cluster center coordinate of the current cluster point set;
[0181] The degree of distortion is calculated using the sum of squared errors, as follows:
[0182]
[0183] Among them, SSE is the sum of squared errors, k is the number of clustering points, p is the coordinate of a point in the current clustering point set, and m is the i is the cluster center coordinate of the current cluster point set;
[0184] This method uses clustering to determine the number of intersections between the four sides of the rectangular fence and the boundary / border line data, avoiding the conventional method of using line-by-line intersection to find the intersection points, greatly reducing the consumption of computing resources;
[0185] S6: manually adding fence points near the target boundary line obtained in S5, and finally forming an electronic fence with boundary restrictions consisting of the target boundary line and the artificial fence points.
[0186] This embodiment aims to solve the difficulty of manually setting up electronic fences when dealing with border lines. In fact, after setting up a rectangular fence frame, this solution can automatically generate an electronic fence. However, in most cases, some fence points (non-border lines) of the electronic fence can be manually modified according to needs.
[0187] Working principle: First, load the preset boundary line or border line data from the remote sensing test company, which is composed of a large number of ordered boundary points; divide the boundary / border line data according to the latitude and longitude grid to obtain the boundary / border grid for easy search; then manually draw a rectangular fence frame across the domain boundary / border line on the map, and obtain the corresponding boundary / border grid according to the latitude and longitude range of the vertices of the rectangular fence frame; determine whether there is an intersection between the four sides of the rectangular fence frame and the boundary / border line data in the corresponding boundary / border grid; the intersection is obtained by clustering the boundary points whose distance between the boundary / border line data in the corresponding boundary / border grid and the four sides of the rectangular fence frame is less than the distance threshold e; through the elbow method + kmeans clustering method, the number of point set centers that can be obtained is the number of intersection points. The number of intersection points between the four sides of the rectangular fence frame and the boundary / border line data is determined by the clustering method, avoiding the conventional method of using line intersection to find the intersection point, greatly reducing the consumption of computing resources;
[0188] When the number of intersection points is greater than 2, it means that there is an enclave in the intersection area between the boundary / border and the rectangular fence frame, or all the vertices of the rectangular fence frame are outside the boundary / border, and 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 are extracted to obtain the target boundary / border; finally, fence points are manually added near the target boundary / border, and finally an electronic fence restricted by the boundary / border is formed by the target boundary / border and the artificial fence points; this method can automatically handle ultra-large-scale electronic fences restricted by borders, provincial and municipal administrative boundaries, etc., avoiding the tediousness and omissions caused by excessive reliance on manual production.
[0189] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.
Claims
1. A method for generating an electronic fence for a drone, characterized by: The method comprises generating an electronic fence of a drone based on geographic information objects and a flight mission, and generating an electronic fence of an obstacle online based on a perception system.
2. The method for generating an electronic fence for a drone according to claim 1, characterized in that: The generation of the UAV electronic fence based on the geographic information object and the flight mission comprises the following steps: S1: Set the electronic fence focus point; S2: Add the focus points in S1 to the pre-selected point set; S3: Set the electronic fence airspace attributes; S4: According to the electronic fence airspace attributes set in S3, the pre-selected point set in S2 is screened by different algorithms to form the final fence points.
3. The method for generating an electronic fence for a drone according to claim 1, wherein: The method of generating an obstacle electronic fence online based on a perception system comprises the following steps: Sa: During the flight mission, the onboard perception system continuously senses the drone’s surroundings; Sb: When the perception system detects an obstacle within a safe distance or has triggered obstacle avoidance, the three-dimensional point cloud of the obstacle is converted into a navigation coordinate system according to the corresponding drone position information when the obstacle is perceived; Sc: Process the converted 3D point cloud through the point cloud processing algorithm to obtain the obstacle electronic fence; Sd: Convert the obstacle electronic fence location information from the navigation coordinate system to longitude, latitude and height, and add it to the obstacle electronic fence map.
4. The method for generating an electronic fence for a drone according to claim 2, wherein: The setting method of the focus points in S1 includes automatic selection and manual selection, and the focus points include buildings in ground information and mission planning waypoints.
5. The method for generating an electronic fence for a drone according to claim 4, characterized in that: The buildings in the geographic information are buildings obtained from remote sensing maps or navigation maps.
6. The method for generating an electronic fence for a drone according to claim 2, wherein: The airspace attribute of the electronic fence in S3 is either no entry or no exit.
7. A method for generating an electronic fence for a drone according to claim 6, characterized in that: The electronic fence airspace attribute in S3 is set to be prohibited from entering, and the algorithm in S4 includes the following steps: S4-1: cluster the disordered scattered points in the pre-selected point set first to obtain multiple pre-selected point subsets; S4-2: using Delaunay triangulation for each of the pre-selected point subsets, and removing the extra-long edges of the outermost non-geographic information object boundary to obtain a unique triangulated network; S4-3: Expand the triangulated network using the polyline parallel line method to obtain the electronic fence coverage area; S4-4: The vertices of the polygon of the electronic fence coverage area are the fence points finally generated.
8. The method for generating an electronic fence for a drone according to claim 7, characterized in that: The electronic fence airspace attribute in S3 is set to be prohibited from exiting, and the algorithm in S4 includes the following steps: S4-a: Setting fence concavity; S4-b: For the concave electronic fence, continue to execute the steps S4-2 to S4-4; For a convex hull geo-fence, continue with the following steps: S4-c: performing Delaunay triangulation on the disordered scattered points in the pre-selected point set to obtain a unique triangulated network; S4-d: using the polyline parallel line method to shrink the triangulated network to obtain the electronic fence coverage area; S4-e: The vertices of the polygon of the electronic fence coverage area are the fence points finally generated.
9. The method for generating an electronic fence for a drone according to claim 3, characterized in that: The airborne perception system in Sa is a device with three-dimensional space perception capabilities, including a depth camera, a stereo camera, a lidar, a millimeter-wave radar, and an ultrasonic radar.
10. The method for generating an electronic fence for a drone according to claim 3, characterized in that: When an obstacle is sensed in Sb, the corresponding drone position information includes the drone posture and sensor calibration parameters.
11. The method for generating an electronic fence for a drone according to claim 3, characterized in that: The three-dimensional point cloud after conversion is processed by the point cloud processing algorithm in Sc to obtain the obstacle electronic fence, which includes the following steps: Sc-1: Downsample the point cloud obtained by the airborne perception system to reduce the amount of data, and then remove outliers through a statistical filter; Sc-2: Project the filtered sparse 3D point cloud to the drone height plane; Sc-3: Delaunay triangulate the disordered point cloud to obtain a unique triangulated network, which is then expanded according to the drone attributes to finally obtain the obstacle electronic fence points.
Citation Information
Patent Citations
Method and device for generating no-fly zone, and method and device for controlling flight of unmanned aerial vehicle
CN111065983A
Virtual fence construction method and system for power transmission line and tower
CN111651649A
Cited By
Method for generating electronic fence for unmanned aerial vehicle
WO2026007335A1
