An adaptive, balanced and energy efficient clustering mechanism for UAV networks İHA ağları için uyarlanabilir, dengeli ve enerji verimli bir kümeleme mekanizması

Öz Unmanned aerial vehicles (UAVs) are widely used in many fields, both civilian and military. Mostly mini UAVs are used in civilian applications which are preferred both in terms of affordability and availability. However, these vehicles are insufficient for some applications when they are used alone. This inadequacy is often observed in mini-UAVs having limited capacity in terms of energy storage and payloads. As a solution to this challenge, swarms of networked mini UAVs have been proposed. Thus, the UAVs in such networks are assigned with different tasks to accomplish the overall mission. While such UAV networks have many advantages, they also come with challenges. These challenges include limited on-board energy storage, low power and lossy wireless communication interface, and limited useful payload carrying capability. In this study, a new adaptive, balanced and energy efficient clustering mechanism has been proposed for such UAV networks. İnsansız hava araçları(İHA), hem sivil hem de askeri olmak üzere birçok alanda yaygın olarak kullanılmaktadır. Özellikle sivil uygulama alanlarında hem ekonomiklik hem de kolay temin edilebilirlikleri sayesinde küçük ölçekli İHA'lar tercih edilmektedir. Ancak bu araçlar bazı uygulamalarda tek başına kullanıldığında yetersiz kalmaktadır. Mini İHA’lardaki bu yetersizlik çoğu durumda kısıtlı enerji ve taşıma kapasitesi olarak karşımıza çıkmaktadır. Bu soruna çözüm olarak birden fazla İHA’ların birleşmesiyle oluşturulan sürü İHA ağları önerilmiştir. Böylelikle bu ağlarda bulunan İHA’lara farklı görevler verilerek bu yetersizliğe çözüm önerisi sunulmuştur. Bu ağların birçok avantajları olmasıyla birlikte zorlukları da bulunmaktadır. Bu zorluklar sırasıyla enerji kısıtı, düşük güçlü ve kayıplı kablosuz haberleşme arayüzü ve düşük faydalı yük taşıma kapasitesi olarak karşımıza çıkar. Bu çalışmada, insansız hava aracı sürüleri için uyarlanabilir, dengeli ve enerji verimli yeni bir kümeleme mekanizması önerilmiştir.


Introduction
Ad-hoc networks consist of mobile wireless nodes without a fixed infrastructure [1]. Furthermore, these networks are interconnected according to the application use cases [2]. Unmanned air vehicle (UAV) swarms are ad-hoc networks where nodes communicate with each other to coordinate and control the network and perform pre-determined tasks [3]. Recently, UAV swarms have found widespread applications in many areas ranging from military to search and rescue [4]. In particular, the defense industry actively carries out research to come up with novel applications involving UAV swarms [5], [6]. Furthermore, civilian UAV swarm applications such as search and rescue [7], surveillance [8] and disaster management [9] have recently become popular.
Large-scale UAVs require a very high budget and are not suitable for certain scenarios. Thanks to UAV swarms, specific tasks are easily accomplished. However, these UAVs can't be spread over a large area due to their limited communication coverage [10]. In addition, communication between the UAVs in a swarm tends to be intermittent since UAVs in such networks * Corresponding author/Yazışılan Yazar move instantaneously. Furthermore, UAVs in a swarm typically have a limited radio range and are constrained in terms of energy storage which renders such small UAVs with a limited air endurance [11]. Thus, the UAV swarm architectures should address these challenges to make them applicable to the highlighted applications.
In this study, a new adaptive, balanced and energy efficient clustering mechanism has been developed for UAV swarms. With the proposed mechanism, the network is divided into subnetworks where the main clustering parameter is the traffic density within the UAV swarm. Here, the UAV swarm is formed by the nodes with different roles within the network. The roles are central cluster head (CCH), and the sub cluster-heads (SCH) respectively. The CCH determines the sub-area borders in the UAV network and elects the SCHs. The SCHs enable the exchange of data between UAVs in the sub-area. In addition, the SCH can in some cases exchange data with both UAVs in other sub-areas and the control center. In this study a virtual center axis (VCA) based clustering approach is proposed for creating the cluster boundaries independent of UAV density. The coverage area of each cluster is shaped according to the density of data traffic between the sub-areas. Furthermore, the proposed mechanism selects SCHs by taking the geographical location of the nodes into account where nodes around the centre of the cluster are prioritized.
This article is structured as follows; Section 2 presents the relevant literature, Section 3 presents the details of the proposed clustering mechanism, Section 4 outlines the simulation results and discussions, Section 5 concludes the paper and proposes future works.

Literature review
Recently, there is an increased interest toward topology modeling of UAV swarms. The main driving factor in this increase is the new and novel applications for these swarms. Such UAV swarms [12] have many challenges to be addressed for successful future application. In the study of [13], authors propose two different approaches to solve the challenge of high mobility, one of the most challenging aspects of UAV swarms. Here, authors make UAV networks more stable with the proposed methods. However, packet sharing of UAVs is not considered in this study. In addition, the battery levels of the UAVs tend to decrease rapidly as the topology of the fastmoving UAVs needs to be updated more frequently. In [14], authors propose a clustering mechanism to increase the stability of UAV swarms. In this mechanism, selection of the cluster heads is shaped according to the movements of the nodes. Each node also has information about two-hop neighboring nodes. Although this study provides solutions to important challenges of UAV swarms, traffic density of the networks is not considered where different parts of the UAV network may generate data packets at different rates. Authors in [15] propose a consensus-based mechanism that selects a cluster based on any failure in the network. However, this study is only recommended for homogeneous UAV swarms. In another study [16], authors propose dynamic angle adjustment and omnidirectional and directional communication schemes. The authors propose a solution that takes advantage of both unicast and geocast hash routing using location and trajectory information. The results show a higher packet delivery performance since the routes are kept stable for longer durations. However, this study does not also consider heterogeneous UAV traffic patterns. Furthermore, delay during the packet transmission is ignored. In [17] authors propose a clustering mechanism in which each cluster is made up of a fixed number of UAVs. Here, UAVs with the best local connectivity are selected to form a cluster. Thus, this proposed mechanism reduces communication costs and increases network performance. However, in this study, effect of wireless connectivity on UAV stability is ignored.
Several works have been proposed that create clusters based on meta-heuristic algorithms inspired by nature. Authors of [18] propose a mixed mechanism using nature-inspired krill herd (KH) and glowworm swarm optimization (GSO) algorithms. One of these algorithms is energy-aware clustering formation and cluster selection with GSO algorithm. Efficient cluster management is provided by KH algorithm. In this study, routing is created by using residual energy of nodes, neighbor numbers and distance between nodes. However, clusters are not updated according to the tendency of movements here. In another study [19], which uses yet another nature inspired algorithm, authors use the Bee Colony Algorithm, which is borrowed from the beehive working principle. However, serious delays in packet sharing may occur for the UAV swarms proposed in this study. Together with these nature-inspired studies, there are several other studies for the UAV network [20], [21]. However, in all these studies, authors ignore tasks of the UAVs and pay attention only to the network connection between UAVs [22].
Many authors have proposed algorithms specific to the UAV networks. In addition, several studies have integrated algorithms for Mobile Ad Hoc Network (MANET) and Vehicular Ad Hoc Network (VANET) into the UAV networks [23], [24]. However, almost all studies for MANET and VANET do not address challenges specific to UAV swarms.

Proposed clustering mechanism
Network topologies in UAV swarms change rapidly as compared to other types of mobile vehicle networks. In addition, UAV topologies do not generally have a dedicated central node where the nodes in the topology are distributed randomly [25]. In addition, UAVs in a swarm tend to have a limited capacity in terms of data processing and storage. Since these UAVs are battery powered, their flight times are generally limited. In view of these constraints and conditions, a new clustering mechanism has been proposed for UAV swarms consisting of many low power low cost UAVs. The proposed mechanism in this study aims to balance the data traffic in each cluster by dynamically changing the cluster size. In this case, data traffic intensity in a section of the UAV swarm dictates the size of the cluster where the cluster size of a high data intensity part of the network is kept small. In addition, since the altitude of mini-UAVs in the UAV network are not very high, it is assumed that UAVs are at the same or close altitude. We believe that this mechanism will be able to operate in 3D environments as we consider the obstacles in 3D for this study.
In this study, there are two types of cluster heads namely Central Cluster Head (CCH) and Sub-Cluster Head (SCH). The role of the CCH node is to maintain the virtual center axis position and define the borders between the sub-clusters. On the other hand, SCH nodes perform routing functions on behalf of the nodes within the cluster. Furthermore, boundaries of sub-areas from the virtual center are calculated. The central location of the network, through which the sub-area border lines are formed, is called the Virtual Central Axis (VCA). Due to rapid mobility of UAVs, boundaries will vary greatly. Therefore, it is preferred to create a fixed virtual axis that changes over time. Location of this axis will be explained in detail in the following subsections. An example view of this mechanism is shown in Figure 1.
The proposed clustering mechanism is composed of three distinct steps. In the first step, VCA and CCH selection is done. In the second step, selection of SCHs in the sub-areas is done. In the third step, angular values of the sub-areas are updated to provide a balanced data traffic density in these sub-areas. Cluster heads are selected by the CCH during the initial part of the solution. In this round, the network is divided into subareas with equal angles, while the first SCHs are selected from nodes that are close to the center of these sub-areas. After the initial partitioning, the sub-areas are updated in three steps. These steps are described separately in detail here.

VCA adjustment and CCH selection
Purpose of this first stage in the proposed clustering mechanism is to calculate the center of the topology and select the most suitable node as CCH. The center point of this topology needs to be updated constantly due to the high mobility of the UAV swarm. The CCH node should be close to the center of the topology since it will provide best possible connectivity within the network. In addition, SCH can with high reliability connect with CCH when the CCH is in the center of the topology. This in turn will enable a low latency communication between the nodes located in different sub clusters. Here, it needs to be pointed out that each node within the sub-cluster forwards its data to the SCH, and SCH node forwards the data to the CCH which then forwards it to the SCH where the destination node is located. Here, the CCH obtains the locations of the SCH nodes periodically ensuring a balanced and low delay topology.
The CCH manages initial steps of the mechanism and acquires SCH locations. Sub-area information packet obtained from each SCH is given in Figure 2. As shown in the figure, the data packet contains label of Sub-Area Sequence. This label is sequence numbers of each sub-area. The sequence of this sub-area starts with Sub-Area 1. Sub-Area Counter label is incremented if a new SCH is selected for the sub-cluster. Cluster Head Node ID field is the identity of sub-cluster node in the network, while Location field holds location information for that node. Total Amount of Data Sent field is the data that a SCH receives from the nodes in its sub-area per unit time. Finally, the Total Number of Nodes field indicates total number of nodes in the sub-area. The CCH uses information packets received from the SCHs to calculate the total data traffic in each SCH area. The CCH obtains variance value from the collected SCH data for each sub-area. If the calculated variance value is more than a threshold β specified as a configuration parameter, the VCA location will be moved to a new location with the aim of reducing the calculated variance. Centre point of sub-area with highest data traffic density is calculated so that the VCA direction is determined. Number of nodes in the selected sub-area and its neighboring areas determine the shift in VCA location. To calculate this shift value, the following formula is used.
The VCA location moves in the direction determined by the distance obtained from this equation. The in this equation represents maximum speed of UAVs per unit time in the network, while the value represents the number of nodes in the swarm. When the new location of the VCA is determined, existing CCH transmits new location information to all nodes in the network.
Having calculated the new location of the VCA, the new CCH is determined. At least one of the two of the following conditions must be met in order to select a new CCH node.
 Distance of the existing CCH from the calculated VCA is greater than the maximum distance threshold,  The existing CCH has exceeded the maximum time that it can remain as the CCH.
When at least one of these two conditions are met, the existing CCH broadcasts the packet shown in Figure 3 to nodes within specified range of VCA for initiating the selection of a new CCH and waits for a certain period. The CCH Sequence field in this packet is incremented by the node selected as the new CCH. With this value, other nodes realize that the new CCH is selected. This packet also contains identification information of the existing CCH and location information of VCA. Distance is the desired maximum range of the CCH to the VCA to be selected. Timestamp field indicates the instance of the broadcasted packet by the existing CCH. Candidate nodes are initially required to be within a quarter of the range of the VCH. The candidates then wait for a period inversely proportional to remaining energy in their batteries. The node whose timer expires first increases the CCH sequence field and broadcasts a CCH advertisement packet informing nearby nodes of the outcome of CCH process. If two or more center cluster candidates broadcast the advertisement packets declaring themself as the CCHs, then the nodes receiving these packets elects the node with the most remaining energy as the CCH for the UAV swarm. The rest of the central cluster head candidates revert to normal operations after receiving the CCH advertisement packet from the elected CCH node. Format of CCH information message is given in Figure 4.
This packet contains 6 fields. The CCH Sequence field represents the current CCH sequence value. CCH ID field contains new center cluster identity information. Remaining Battery field contains remaining battery percentage of this UAV. In addition, Location field contains location information of the broadcasting node. One-Hop Neighbor Nodes field contains information of its neighbors to which it can directly connect. If no suitable CCH can be found, the existing CCH increases the specified range so that a new CCH may be selected. This step is repeated until a suitable CCH is elected. When the CCH election process is finalised, the existing CCH continue its operation as a standard UAV swarm node.
The CCH selection process fails when the selection criteria are not met. In this case, existing CCH broadcasts packet shown in Figure 4 without updating CCH Sequence value. Algorithm for this stage is given in Algorithm 1.

SCH selection
The SCH nodes in each sub-area can act as relays in inter-area communication and can communicate directly with the control center on the ground if within range. This creates a hierarchical network topology which lends itself to energy efficient communication.
Prior to SCH selection, each node in the network first needs to learn in which sub-area it is currently located. Once location of new VCA is determined, CCH reports sub-areas to every node within the network. According to this reported location information and with angular values already present in nodes, nodes learn which sub-area they are in. The nodes are then ready for new SCH selection.
Nodes that learn their sub-areas first calculate their stability values (SV). The SV indicates the relative distance of the node to the center of the sub-area. In turn, a high SV also indicates a high probability of finding connections to other nodes. SCHs are preferred to be in areas near the center of the sub-area to maximize the probability successful communication. The SVs of these nodes are calculated with where Ci is the proximity of the node i to the center of its subarea. This factor ranges from 0 to 1. If this node is in the center of the sub-area, the value becomes 1. If the node is close to subarea boundary, this value approaches to 0. Ci factor is calculated by In this equation value indicates shortest distance to lower boundary of the sub-area where node is located, while value represents shortest distance to upper boundary of this subarea ( Figure 5). Here, nodes can easily calculate the closest distance to the border with their location because they know the axis of sub-area where they are located and angular values between the borders. Another important value in (2) is , which is the probability that node can find a connection with a neighboring node . In this equation, also represents nodes of the sub-area where node is located, while represents nodes neighbour to node . That is, after node receives location information from neighboring nodes, it calculates probability that if these neighboring nodes are in sub-area where they are located, they can find connections with each other. These calculated probabilities are summed and multiplied by the factor and SV of the node is calculated. The value of is calculated by the equation ( 0 , ) in [26]. During the SCH selection, UAV node checks whether SCH of the sub-area in which it resides moves to another sub-area after obtaining SV. If the SCH does not move to another sub-area, the UAV node first compares its SV with the SV of the SCH in the sub-area. The UAV node then checks whether the SV value of the SCH differs from its own SV more than a threshold value Ω. If this is the case, this UAV node declares itself Potential SCH node and waits for a random time. If there are other Potential SCH nodes in the sub-area, node that broadcasts information packet shown in Figure 6 earlier is chosen as the new SCH. Value in 'Sub-Cluster Head Sequence' label in this information packet is incremented by the UAV node that declares itself as the new SCH. In addition, this packet contains identity of subarea of the SCH, its identity and location information. At the same time, in order to find location of the SCH more easily this packet contains, this packet contains array labeled One-Hop Neighbor Nodes. Timestamp label is used to eliminate SCH selection collisions that occurs when there are two or more nodes declaring itself as the SCH. If SCH of a sub-area moves to another sub-area, all the suitable UAV nodes within the area declare themselves as Potential SCH nodes. These candidate UAVs then wait for a certain time inversely proportional to their SV and broadcast SCH information packet. The information packet is shown in Figure  6. If there are more than one UAV that declares itself as SCH, the UAV, which has a higher SV, is selected as SCH. The other UAV nodes revert to standard UAV after receiving the information packet with a high SV.
For UAVs to be SCH, they must be neighbors with at least two UAVs in their sub-area. One of important reasons for this is that although some UAVs are within boundary of a sub-area, all their neighboring nodes may be in another sub-area. UAVs with such a condition update their sub-area after receiving information of their neighbor UAVs. An example of such a condition is shown in Figure 7. As can be seen in this figure, UAV 1 is geographically located in Sub-area A initially. After discovering its neighbors, UAV 1 learns that it has only UAV 2 as its neighbor and it is in Sub-Area B. Thus, UAV 1 migrates to Sub-Area B. The pseudo code for SCH selection process is given in Algorithm 2.

Border value calculation
Purpose of the border adjustment is to update cluster size of the network according to the traffic density of the UAV network. This stage is managed by CCH. SVs reported by SCH contain information about the traffic density of each cluster. This information is used by the CCH to update the boundaries of cluster areas.
In order to update border values in the third stage of the mechanism, SCHs first report to CCH SVs obtained in the second stage. CCH obtains variance ( ( )) values from SVs. If node densities between sub-clusters are very irregular, ( ) value becomes high.
( ) value is then compared to a predetermined α threshold value representing upper limit in irregularities in each sub-cluster. If ( ) value is greater than this upper limit, new boundary values are calculated. The changes in boundaries are inversely proportional to SVs of SCHs ( ( 1 , 2 , … −1 , )). However, these new boundaries are not directly applied as they will create very sharp changes in the topology.
As seen in the equation, the ℎ value is used to normalise the angular changes in the boundaries where ℎ prevents sharp changes of the boundaries. Then the new angular boundaries are calculated using These angular values obtained from the equation are broadcasted by the CCH to the SCHs. The SCHs then report these values to UAVs in their sub-areas. Thus, the partitioning adjustment is completed. After the new partition adjustment is carried out, UAVs do not update their own areas according to new angular values immediately. This update will be done when the boundary adjustment exchanges between the CCH and SCH is completed. Pseudo code of this process is given in Algorithm 3.

Results
In this section, the performance results of the UAV network are presented for different scenarios with several predetermined thresholds. The proposed clustering mechanism are tested and compared with 3 different previously proposed mechanisms. These tests are done in MATLAB based simulation environment. The random walking mobility model is currently one of preferred models for FANETs [14] and is used in the simulations carried out in this work. Parameters used in the simulation environment are given briefly in Table 1.  β threshold is used in the first stage of the mechanism. The threshold values here are set to send 1 packet per round of UAVs in the network. Each SCH acquires total amount of data they receive from normal UAVs in their own sub-area in a round. SCHs then transmit this data to the CCH. Finally, variance value is obtained from the transmitted data packets.
In Table 2, the test results are given for three different scenarios with increasing values of β. Initially, the range for the optimal β value is kept large. Consequently, after trying these range of values, the best range is determined to be between 0.01 and 0.1. These ranges are optimized for the data flow rates of the simulated UAV network. For other networks with different data flow rate requirements, we expect to find different β value ranges. Here, the average energy consumption values change slightly with changing values of β. On the other hand, significant changes are observed in the average dropped number of packets and the duration of remaining as CH. The best β threshold for the average dropped packet numbers is at 0.05. In this case, boundaries separating the sub-clusters in the UAV network do not change very often. If the chosen β value is high, the data traffic densities of the SCHs do not match the rapidly changing UAV network. As seen in the table, there is a high amount of packet loss in this case. If a lower β value is selected, the VCA will be constantly updated and UAVs will change their sub-areas very often. This leads to high packet losses. Tests are carried out for three different scenarios with changing Ω thresholds. Here, if the SV value of a UAV node is greater than the Ω threshold value of the SCH in a sub-area, this UAV is chosen as the new SCH candidate. Results indicates a significant increase in SCH duration with increasing Ω value as indicated in Table 3. The reason for this is that a large Ω value allows an UAV to stay as SCH even if there is a significant variation in SVs of SCHs. The α threshold in the third stage of the mechanism is the lowest angular limit specified for a new boundary adjustment.
Here, the CCH obtains the SVs from the SCHs. If the variance value obtained from SVs is more than α, a new angular value is calculated to adjust cluster borders. Performance results for different values of this threshold are given in Table 4. The results indicate that α has a very little impact on the analyzed performance metrics. The reason for this is that UAVs close to borders usually balance each other.  Table 5. Looking at these graphics, the most important changes were observed in the dropped packet amounts. It is seen that the most appropriate value of the dropped package amount is 4. In values greater than this value, there is a continuous increase in number of packets dropped. The reason for this is to decrease flexibility of angular values between borders and prevent more appropriate sub-area selection of UAVs. In addition, it was observed that in the condition where the variable h is 2, more packet drop compared to condition where it is 4. The reason for this is that sharp change of angular values between borders affects UAV's sub-area changes unbalanced.

Performance comparisons for different threshold
In this section, the performance of the proposed mechanism is compared with 3 different previously proposed mechanisms.
The analyzed mechanisms are proposed in [27] (Lowest-ID), [28] (CONID) mechanisms for MANET and [14] (DGWS) for UAV networks. These mechanisms are evaluated using two different approaches. Firstly, the evaluated mechanisms are compared against each other taking average amount of energy consumption into account. Afterwards, these mechanisms are compared for packets drops. In addition, the performance results are given for 3 different traffic patterns as shown in Figure 8. As seen in Figure 8a, each UAV sends 1 packet in one round. In Figure 8b, the UAVs on the left side of the UAV network send 1.5 packets in one round, while the UAVs on the right send 0.5 packets. Finally, in Figure 8c, the UAVs send data with a random distribution, half send 0.5 packet per round and the other half in 1.5 packets in a round. In addition, these comparisons are made for 5 different node movement patterns.
First, energy consumption of the proposed clustering mechanism is compared against that of the previously proposed mechanisms. The energy consumption is obtained by summing the energy consumed by the data packet received from SCHs in one round. Here, if there is a direct connection between SCH and UAV node, packet sharing is provided without using any relay. If there is no direct connection, the UAV communicates by finding the best relay to the SCH.
In Table 6, the energy consumed by one UAV in one round for 4 different mechanisms is given in Joule (J). These calculations are obtained using equations in [29]. The energy consumption values of 5 different movements are averaged. The results indicate that the proposed clustering mechanism consumes less energy for all the analyzed scenarios as compared to previously proposed mechanisms. In addition, we see that with the proposed mechanism, UAV consumed almost the same average energy compared for 3 different packet sharing approaches. The reason for this is the fact that the sub-areas and VCA are dynamically shaped according to the density of packet sharing of UAVs. As a result, if the packet sharing is more intense in one area of the UAV network, the VCA shifts to that area. In addition, the SCHs are smaller in those areas than other areas.
In Table 7, the number of packet-drops in a round is given for the analyzed mechanisms. The results in this table are based on the sum of the dropped packets at each SCH in one round. The purpose here is to measure the impact of high intensity traffic on the UAV network. Thus, it is of interest to find out whether the packets received from the cluster heads are balanced. The average dropped packets for 5 different mobility models are given in Table 7. It is observed from the results that the number of dropped packets in the network to which the proposed mechanism is applied is less than that of previously proposed mechanisms. Furthermore, this result indicates that the network traffic is more balanced when the proposed mechanism is used.

Conclusion and future goals
In this article, a new clustering mechanism is proposed for UAV networks. Since the UAV network has a dynamic structure, this mechanism is repeated continuously and UAVs can access both their own and neighbor's locations with the packet sharing used in these mechanisms. The purpose of this mechanism is to provide energy efficiency, balance the network and minimize number of dropped packets. As a result of the detailed simulation studies, it has been observed that the proposed mechanism performs very well compared to the previously proposed mechanisms. In the future, heterogeneous packet sharing approaches will be analyzed. And the complexity analysis of the proposed system will be carried out. In addition, studies on security aspects of the proposed mechanism will be carried out.

Author contribution statements
In the scope of this study, Sedat Görmüş contributed to UAV formation, clustering mechanisms, routing approaches, literature review and editing of the paper; Harun Emre Kırans contributions include UAV formation, clustering mechanisms, algorithm development and implementation, literature review and editing of the paper.

Ethics committee approval and conflict of interest statement
There is no need to obtain permission from the ethics committee for the article prepared.
There is no conflict of interest with any person / institution in the article prepared.