# Performance Evaluation of UAV-Enabled LoRa Networks for Disaster Management Applications
## 3 Proposed UAV Topology Control Algorithm
### Virtual Spring Force (VSF) Mobility  
UAV-enabled LoRa network takes advantage of a distributed mobility algorithm through which the direction of movement is determined at each time step by a VSF that can push or pull a UAV closer or further to other UAVs or GNs. In this way, UAVs are kept in the range of each other, possible collisions are avoided and the objective of covering the GNs is pursued. In its most simple form, the algorithm runs at fixed regular intervals \(\Delta T\). At each time step, each UAV generates a set of virtual springs, having one end attached to the UAV that generated them and the other end attached to either a GN (AtG springs) or another UAV (AtA springs). For each spring, the attractive or repulsive force \(F_{ij}\) between node \(i\) and node \(j\) is given by  
\[F_{ij}=K\cdot(LB_{ij}-LB_{req})x, \tag{1}\]  
where \(K\) is a constant that depends on the nature of the spring, \(LB_{ij}\) is the real or estimated link budget between node \(i\) and node \(j\) and \(LB_{req}\) is the required link budget. Choosing link budget measurements instead of physical distances is more meaningful for a communication system. The link  
Figure 4: System stack of base station (BS).  
budget gives a more direct indication of the quality of the link, e.g., \(LB_{req}\) based on application-specific QoS requirements. The total force \(F_{tot}^{i}\) applied to UAV \(i\) is given by  
\[F_{tot}^{i}=\sum_{j=0}^{N}F_{ij} \tag{2}\]  
where \(N\) is the number of springs originating from \(i\). AtG springs are established with all the GNs that at least sent one message containing their position in the last AtG seconds to \(i\)-th UAV. AtA springs are established with any one-hop neighboring UAV, whereby, the neighboring UAVs are selected based on the RSS levels of the connection between the UAVs. AtA and AtG springs are therefore only established with direct neighbors, thus, limiting the complexity of the interactions and the number of computations.  
The \(K\) parameter is fundamental to determine the weight, and therefore the priority, of each spring force which is updated as  
\[K_{AtA}=K_{p}(\frac{N_{neighs}^{\max}}{n_{neighs}}) \tag{3}\]  
where \(K_{p}\) is the scaling factor, \(N_{neighs}^{\max}\) is the maximum number of neighbors, and \(n_{neighs}\) represents the current number of neighboring UAVs. It is worth mentioning that the value of \(N_{neighs}^{\max}\) is chosen arbitrarily and must be optimized on a trial-and-error basis, yet a good value of \(N_{neighs}^{\max}\) resides mostly between 6 to 8 because the UAVs tend to arrange themselves in a hexagonal grid formation. However, for different UAV in the system, \(N_{neighs}^{\max}\) can be approximated with the total number of UAVs currently operating in the system. The above equation allows scaling the magnitude of the attractive/repulsive AtA forces based on the relative number of neighboring UAVs. In this way, a UAV with few neighbors will have a higher tendency to stick to the formation, while a UAV with many neighbors will exhibit the opposite behavior. This gives more importance to AtG springs when a UAV has a high number of neighboring UAVs.  
The \(K\) parameter takes a different value at each time step for each AtG spring connected to GN \(j\) according to the expression  
\[K_{AtG}=\frac{u_{\max}}{u_{j}} \tag{4}\]  
where \(u_{\max}\) is the highest number of neighboring UAVs covering one or more GNs that are also covered by the current UAV and \(u_{j}\) is the current number of UAVs covering GN \(j\). This relation allows giving more priority to the GNs that are covered by fewer UAVs. Drones are therefore expected to distribute themselves uniformly between the GNs that are in range. This is especially useful when a group of GNs splits and the covering UAVs must decide which GNs to follow.