1. Introduction
Over the last decade, unmanned aerial vehicles (UAVs) have been utilized in a wide range of military and civilian applications, including surveillance [
1,
2], monitoring [
3,
4], imaging [
5,
6], and reconnaissance [
7]. UAVs boast many advantages, including remarkable flexibility, low energy consumption, high efficiency and the capacity for real-time monitoring. The increasing number of UAVs, however, has led to challenges related to solving the collision problem to ensure air traffic safety.
Traditionally, two categories of approaches have been employed for collision detection. The first category includes simple collision detection methods based mainly on sensing technologies, such as automatic dependent surveillance-broadcast (ADS-B) technology, visual sensors, optical flow, radar, and light detection and ranging (LiDAR), to alter the course of a flying vehicle toward another direction in the short term to avoid collisions. For example, Scherer et al. and Achtelik et al. employed laser scanners on UAVs to detect obstacles [
8,
9]. Bryson et al. presented the ongoing design and implementation of a robust inertial sensor-based simultaneous localization and mapping (SLAM) algorithm with bearing-only observations [
10]. Gronzka used a multilevel SLAM algorithm with estimates of aircraft motion and altitude for three-dimensional (3D) mapping, positioning, and navigation [
11]. Sabatini et al.’s research provided an obstacle detection solution especially suitable for low-altitude UAVs with the remarkable angular resolution and accuracy of LiDAR [
12]. Becker and Bouabdallah [
13] employed four ultrasound sensors for collision detection and a camera system based on above-ground optical flow computations for positioning. However, the abovementioned methods can be ineffective under poor lighting conditions, such as smoke and fog, and they are unable to detect certain objects composed of transparent or signal-absorbing materials. Moreover, it is challenging for these methods to develop a flight plan ahead of time.
The second category of collision detection approaches is based on global or relative positioning, i.e., the coordinates of UAVs and obstacles within the airspace. These positions are acquired either by global continuous positioning systems such as the Global Positioning System (GPS) and Beidou or by obtaining exact indoor location information with Wi-Fi [
14] or beacons (Bluetooth Low Energy, BLE) [
15]. Fiorini and Shiller presented a computationally efficient heuristic approach applicable to the online planning of UAVs [
16]. Nordlund et al. proposed a probabilistic method designed for noncooperative collision avoidance [
17]. Several optimization-based schemes focus on solving optimization problems either deterministically or in a probabilistic setting, often in a centralized way, as exemplified in [
18,
19]. Martin and Alan integrated a triaxial magnetometer aiding sensor into an extended Kalman filter (EKF)-based navigation and collision avoidance algorithm [
20]. However, coordinate-based conflict detection suffers from high computational complexity, especially in the context of a highly dynamic environment with a large data volume. In addition, resolving one conflict may introduce new conflicts into the trajectory, further increasing the computational requirements of conflict detection algorithms [
21].
Multidimensional grids provide another viewpoint for UAV conflict detection. Grid-based conflict detection algorithms have been proven to be more computationally efficient than existing algorithms because they eliminate the need for pairwise computations of interaircraft distances. In 2003, Jardin applied a three-dimensional grid (two horizontal spatial dimensions and one time dimension) to real-time conflict-free trajectory optimization [
22], and in 2005, Jardin extended the theory to four dimensions [
23,
24]. The grid concept was subsequently implemented as a data structure to enable conflict data integration and solution space visualization [
25]. Kushleyev et al. conducted an experiment with 16 microquadrotors operating autonomously with an external localization system possessing two-dimensional (2D) grids [
26]. Spatial grids were further employed for indoor UAV collective motion control experiments [
27,
28,
29].
Previous studies on UAV collision detection suffered from two main drawbacks. First, in most traditional studies, pairwise calculations must be performed on the spatial coordinates acquired from either airborne or satellite sensors. However, directly calculating the values of the equations of space curves using analytical expressions will constitute an enormous computational burden. Potential conflicts with air traffic need to be considered, and it is also important to consider other factors, such as terrain and weather, when performing collision detection. Second, the existing grid-based approaches were mostly restricted within a confined airspace, and the scenarios of their applications were relatively simple. When dealing with collision detection issues under complex and high-speed conditions with multiple spatial entities, the aforementioned grid-based approaches lacked a comprehensive and unified computation system. Moreover, the improved computational efficiency of grid-based methods is accompanied by a certain increase in the computer memory requirement. Therefore, with the sharp increase in the number of aircrafts and the expansion of the scope of their applications, it is highly important to develop an efficient UAV collision detection approach capable of adapting to complex scenes.
A number of recent studies on global grid systems have provided opportunities for geospatial data integration, retrieval, and reference [
30,
31]. Discrete global grid systems (DGGSs) are being increasingly utilized for the creation of such grid systems. DGGSs are a discretization of the Earth into hierarchical sets of highly regular grids, each of which represents a distinct region of the Earth to which data may be assigned [
30,
32]. In this research, we referred to geographical coordinate subdividing grid with one-dimension integer coding on a 2
n tree in three dimensions (GeoSOT-3D) theory to construct the basic spatial reference framework. GeoSOT-3D has been widely studied in various fields, including spatial data reintegration [
32,
33], database indexing [
34,
35], risk analysis for natural gas pipelines [
36], building information modeling (BIM) data visualization [
37], remote sensing data management [
38], and city component identification [
39]. The applications of GeoSOT-3D theory have demonstrated its importance and suitability for highly efficient and accurate spatial data processing and management endeavors.
Referring to the idea of DGGSs in this paper, we adopted the detection of UAV collisions as the optimal problem and adapted a GeoSOT-3D grid-based system to coordinate multi-UAV flights. In our approach, we first established a unified spatial grid subdivision system for the studied airspace and mapped the spatial and temporal information of the UAVs and other spatial entities onto different grids. Second, we applied GeoSOT-3D codes to multilevel spatiotemporal indexing to store spatial information in a spatial database. Finally, the multilevel massive data query engine was shown to support the implementation of multiple processes with high concurrency and massive amounts of data. The proposed method not only provides a powerful means for real-time UAV collision detection but also maximizes airspace utilization through effective management and control while ensuring security.
2. Materials and Methods
2.1. GeoSOT-3D Grid System
The GeoSOT-3D grid system proposed for this study is a universal and hierarchical three-dimensional geospatial reference system [
40]. By subdividing the Earth through three iterations (initially expanding the Earth (180° × 360°) into 512° × 512° grids, then expanding each 1° into 64′, and finally expanding each 1′ into 64″), two-dimensional quadtree subdivisions at the degree, minute, and second levels are obtained. GeoSOT-3D is congruent and aligned: the largest subdivision grid in the highest level (Level 0) can represent the entire Earth surface, while the smallest subdivision grid in the lowest level (Level 32) can represent the centimeter scale.
Based on our previous work, we extended the two-dimensional global subdivision framework into a third spatial dimension: the elevation dimension. The division of the elevation dimension is directly adopted through a dichotomy. The entire range over which the elevation dimension is divided spans from the geocentric position to 50,000 km above sea level. In this way, this GeoSOT-3D grid system not only possesses global multidimensional octree hierarchical characteristics but also maintains consistency with different types of applications. With an octree-like structure, the GeoSOT-3D coding exhibits three-dimensional components. The node index that branches out from the top level is determined by a formula that uses bits to characterize the longitude, latitude, and altitude within the former node’s space. The digit is either 0 or 1 at each level in one dimension; therefore, a digit ranging in value from 0 to 7 can be applied to represent one code at each level by occupying 3 bits. The next (lower) level inherits the digit from the former digit, and an identical formulation is repeated. In this research, if grid
A is spatially contained by grid
B, we claimed grid
A as the parent grid and grid
B as the child grid. The Level-2 GeoSOT-3D grid system is illustrated in
Figure 1. To better explain the grid code structure, we did not present the actual three-dimensional forms. There are 64 three-dimensional grids (2
3*2
3 = 64), and the corresponding codes are marked on the regular cubic faces, which are also shown on the four cross-section planes. The corresponding binary codes were listed for the front side, the right side, and the four layers for reference. The Z-order coding scheme maps multidimensional data into one dimension while preserving the locality of the original data. In each code, every bit belongs to a certain dimension and has dichotomous implications. To elaborate, we highlighted the binary bit with the same values in one group to demonstrate that the data of a certain side or layer are determined only by specific binary bits.
2.2. Multilevel Spatiotemporal Indexing
The studied airspace comprises different categories of information (e.g., other aircraft and weather conditions). Each spatial entity is represented by one or more GeoSOT-3D grids according to the occupied grids. The measurement errors of the positions of moving targets such as UAVs exist due to a large number of spatial perturbations (including the atmosphere, illumination, and gravity) and the control ability. When there is only absolute position information at the sampling time without considering measurement error, missing or mistaken selections may arise in the process of mapping the moving objects and computing their mutual relations. Therefore, the modeling of spatial objects should consider not only the spatial location of the object but also the small-scale space surrounding the object. Therefore, the basic partitioning unit under the three-dimensional framework is the subdivision grid; that is, all three-dimensional spatial objects are composed of one or more subdivision grids, as indicated in
Figure 2.
The spatiotemporal information of the object is recorded by spatiotemporal coding corresponding to a certain spatial region and time range. The primary keys of data tables are initialized according to the experimental airspace. Sorted spatial grid codes are associated with spatial grids with unique characteristics; therefore, they are adopted as the primary key of the spatial database. We reduce the sorting time by using the prebuilt fixed table structure. In the simplest case, when there is an object in one spatial grid, the record of the corresponding code is 1; otherwise, it is 0. Temporal information is also recorded in each row of the database with a start time stamp and an end time stamp, indicating which objects have been in the space within that time. Thus, we simplify complex pairwise calculation problems into a spatial database query problem. In our experiment, we chose nonrelational databases to store spatial data with multiple tables. Other than the temporal and spatial information, each row of data records various types of information, such as categories, data sources, and physical attributes of the original data. The overall table structure is stable, and the row size of the table does not change, which is suitable for the complex scenes of dynamic objects in space.
One of the great advantages of the GeoSOT-3D grid-based collision detection technique is the ability to filter out redundant calculations with multilevel queries. To meet the needs of a multilevel query, we designed the multitable strategy shown in
Figure 3. More than one data table is available to manage and record the UAVs’ information in a specific airspace. The primary key of the data table is a spatial code at a certain level that uniquely corresponds to a certain space in the actual three-dimensional grid system. Each table stores only the data corresponding to the encoding of a certain level. Each parent code retains a pointer to the data table in which the next level of the child code is located. In this way, after the parent code is queried, if a further detailed query is needed, it can directly link to the data table where the child code is located. At the same time, the sizes of the tables can be kept constant, which is suitable for distributed management; this approach maintains load balancing and efficiency when dealing with the requirements of immense data volumes and high concurrency.
Each spatial object, such as a UAV, corresponds to different spatial grid codes on different spatial scales. Generally, one data table stores only information on a certain scale. Tables with different levels may record one entity’s spatiotemporal information. This strategy reduces the burden on each data table because the spatiotemporal information is assigned to multiple tables; in addition, this strategy is suitable for high-concurrency multiprocess queries at the backend.
In this framework, a conflict may occur when the planned route of a UAV passes through a spatial grid that is occupied by another object (either a UAV or another obstacle). The GeoSOT-3D grids were coded in an octree structure, preserving the locality of the original spatial data. Thus, two spatially close grids have partially matching codes from the beginning. In contrast, two distant grids would have codes with different digits from the beginning. Objects that are unlikely to collide with each other are directly screened out because their corresponding spatial codes are not close, and thus, no further operations are required.
2.3. Multilevel Query Methods
In this framework, we conducted collision detection by using a multilevel query method. In previous studies, a conflict was detected when two entities (e.g., aircrafts) were in the same cell. We improved the previous coding systems into a hierarchical system, in which the query operation is not limited to one level. In the collision detection process, each code has the child code or father code, and codes at different levels are calculated. The new data, such as UAV trajectory data, and obstacle data should also be inserted after being transformed into GeoSOT-3D codes. In this way, the computational redundancy is reduced significantly. After a collision is detected, the new codes representing UAV trajectories or obstacles are inserted as new columns instead of new rows.
Collision detection for a single grid is shown in
Figure 4. We first assumed a grid is present with a code of Code
A at level N over a time interval of [T
A,T
A’]. The codes are stored in data tables relating to higher or equal levels from 0 to N. Then, the data level variable i starts to loop from 0 to N-1. At each level i, we need to obtain the parent code Fa(Code
A)i of Code
A and check the database to determine whether the corresponding row is null. If there are no data and no neighboring data, we can break the loop for the multilevel insert. If a data record already exists but is not included or adjacent to the time interval of [T
A,T
A’], the loop is also skipped, and the next step is composed of the multilevel insert. If the loop reaches level N, the method described above can be applied to determine the grid’s relationship: intersecting, neighboring, or disjoint.
If the grid contains an intersecting relationship, two objects will share the same space at the same time, which would probably lead to a collision. If the grid contains an adjacent relationship, there is a risk of collision to a certain degree. Finally, if the grid contains a disjoint relation, there is no risk of collision. The parallel insert operation consists of inserting the parent code of CodeA at levels from 0 to N-1 within the time interval [TA,TA’].
The spatiotemporal collision detection process for multiple grids is shown in
Figure 5. We assumed that several spatiotemporal grids are present; each grid corresponds to a spatial grid code Code
A and time interval [T
A,T
A’], and the lowest-level space code is set as N. The collection of the spatiotemporal grid is recorded as {Code
A, [T
A,T
A’]}. For each individual grid, we obtain the parent grid codes on levels from 0 to N-1, and the time records are also retained. Thus, several spatial grid codes can be stored at one level, and one spatial grid code may have several corresponding time interval records. The level variable i loops from level 0 to level N-1. For all spatial grid codes at level i with the corresponding time interval [T
A,T
A’], if it is null, the condition for the data insert operation is satisfied; otherwise, the collision conditions should be examined individually according to the previous formula, and the collision-free grids with their child grid codes should be removed. When the variable i reaches N, we should make one-to-one judgments with each existing grid code. If any of them intersect with Code
A, the result is a collision. If it is an adjacent relationship, there is a risk of collision. If it is a disjoint relationship, there is no risk. When the last subprocesses all satisfy the insert conditions, the multilevel data can be inserted into the multilevel data tables in parallel.
The spatiotemporal collision avoidance technique utilizing spatial subdivision grids has the following advantages:
1) The octree structure of the space reduces the number of comparisons, thereby filtering out many codes that need no further consideration and greatly improving the comparison efficiency;
2) Multiple operations are required to obtain the parent code at all levels in the operation flow, but the operations to obtain the parent code are simple and need only to be shifted;
3) Multilevel storage enables the parallel insertion of different large tables without the insertion of once table affecting that of another, which improves the insertion efficiency;
4) Temporal and spatial data are stored in a table with spatial codes, avoiding the requirement for multiple indexes and simplifying the detection procedure.
4. Discussion
It is feasible to employ the collision detection method based on GeoSOT-3D grids proposed in this study for better UAV management and monitoring, as the novel technique also benefits flight path planning, airspace control, and formation flight. The reduction in the time consumption compared with the traditional methods is approximately 50–80%. Furthermore, as the amount of data in the airspace increases, the approach proposed in this study becomes more advantageous. These improvements may arise for the following reasons:
1) Traditional methods require one-to-one calculations between different entities to determine their spatial relationship, but the proposed method with grid coding needs only to query within the database, and thus, the computation times are reduced.
2) Hierarchical coding schemes enable efficient filtering to remove a large number of redundant or unnecessary calculations.
3) Using nonrelational database storage along with a multitable strategy improves the multilevel operation efficiency and allows parallel computing.
As the size of the grid increases, the computations required for detection within each grid also increase. The position, flying direction, and speed of UAVs at each time can be acquired, and the flying direction and speed vary randomly within a small range. In addition, the UAVs can be categorized according to size and maximum speed; therefore, the optimal grid sizes are different. In general, to ensure a safe distance during flight and high computational efficiency, if the flying speed is low, a smaller grid size would be preferred; if the UAV is small, a smaller grid size would also be preferred. The simulations in this study are provided to demonstrate the grid size selection for one type of UAV. The calculation and comparison process can be applied to UAVs of other sizes and flying speeds. In this research, we did not carry out real tests, only simulation experiments. In future research, we intend to perform experiments on real UAVs to further verify the utility of the GeoSOT-3D grid-based model.
5. Conclusions
Collision detection in a highly dynamic and complex environment is key for a variety of UAV applications. Two traditional categories of approaches for collision detection were criticized for their computational complexity. The first category of methods utilizes different sensing technologies as the basis of collision detection, whereas the second category uses global or relative positioning systems to acquire the coordinates of UAVs and obstacles within an airspace. Two disadvantages of previous studies on UAV collision detection were discussed. First, pairwise calculations must be performed based on the spatial coordinates acquired by either airborne or satellite sensors; consequently, the computational burden increases exponentially with an increase in the number of spatial entities. Second, although multidimensional grids provide an alternative for UAV collision detection, the existing grid-based approaches are not suitable for complicated scenarios with large numbers of high-speed moving objects.
This study demonstrated an approach for detecting collisions among UAVs based on GeoSOT-3D grids. The proposed method is based on the GeoSOT-3D spatial subdivision theory, which has proven its applicability in various applications. All UAVs and other entities in a studied airspace should first be transformed into one or more GeoSOT-3D grids. The code for each grid should then be set as the primary key for the nonrelational database. The multitable strategy was adopted in the proposed method by considering the hierarchical advantages of GeoSOT-3D coding, and the collision detection calculation was transformed into a multilevel query. We described two algorithms for a single grid and multiple grids in detail. In the detection process, new data, such as UAV trajectory data and obstacle data, should be inserted after being transformed into GeoSOT-3D codes. In this way, the computational efficiency is significantly improved. After detecting collisions, the new codes are inserted as new columns instead of new rows. The proposed method involves not only potential collisions with traffic but also other categories of entities in the studied airspace.
To verify the suitability and efficiency of the proposed method, we designed and conducted four UAV formation flight simulation experiments. Accordingly, the feasibility of detecting the collisions of UAVs based on GeoSOT-3D grids in three-dimensional space was proven. We compared different grid sizes for collision detection, with the number of UAVs ranging from 100 to 1000, and the computation time of the 64 m GeoSOT-3D grids was the lowest. For different numbers of UAVs, the time required to achieve collision detection with different calculation methods was acquired. The efficiency of the grid method was much higher than that of the ordinary three-dimensional coordinate calculation method, and the computational efficiency was further improved with the proposed method. Calculations in different simulation scenarios all proved the advancement of the GeoSOT-3D grid-based method. For a UAV formation with fixed relative positions, the query process can be optimized; in our experiment, formation optimization reduced the time consumption by up to 25%.