# Topology Duration Optimization for UAV Swarm Network under the System Performance Constraint
## 4 The Proposed GTSC Method
### Topology Generation  
In this step, we need to generate the topology connection based on the previous steps. First of all, we should accomplish the topology connection for intra-cluster nodes. It can be seen that from the remaining energy ratio in Equation (11), we should consider the energy strategy from two aspects: (i) the residual energy, which has been considered in previous sections; (ii) the energy consumption of nodes. In consideration of energy balancing of cluster heads, we set an upper limit on the number of cluster members connected to single cluster head. The cluster head connection number upper limit is set as  
\[N_{con}\leq\partial*N_{Cluster} \tag{31}\]  
where \(\partial\) is the energy balancing parameter, and \(N_{Cluster}\) is the number of nodes in the cluster. Based on Equation (31), each cluster member is connected to the nearest cluster head according to the relative distance. For the connection of inter-cluster nodes, we establish a inter-cluster backbone topology which connect all of cluster heads under communication distance constraint, so as to ensure the stability of the swarm. The topology generation scheme is presented in Algorithm 3. ```
1:Cluster set \(\{Cluster_{1},Cluster_{2},\ldots,Cluster_{K}\}\), cluster head set \(\{S_{1},S_{2},\ldots,S_{K}\}\)
2:Network topology \(\mathbf{G}_{d}\)
3:for\(i=1\) to \(K\)do
4:for each node \(j\in Cluster_{i}\)do
5: calculate the distance between node \(j\) and cluster heads separately
6:if the cluster heads satisfy \(N_{con}\leq\partial*N_{Cluster_{i}}\)then
7: select the closer cluster head to connect
8:else
9: select another cluster head to connect
10:endif
11:endfor
12:connect all cluster heads that satisfy communication distance constraint
13:return network topology

## 5 Simulation Results

In the simulation, UAV swarm nodes are randomly deployed in 3D space whose size is positively correlated with the number of nodes. The mobility of nodes is initialized and updated according to the BOIDs model, which is widely used to describe the group mobility characteristics of the UAV swarm system [7; 38; 39]. Simulation parameters are presented in Table 2. To accurately evaluate performance, each simulation runs 1000 times. The number of UAVs is set from 32 to 512. The maximum communication range of UAV nodes is set to 80 m. The UAV node speed ranges from 20-30 m/s and the UAV node position update interval is 1s. Noting that, the distance scale in the simulation are relative and the exact size of the values does not affect the performance evaluation results. The experience parameter \(\omega_{1}\), \(\omega_{2}\) in Equation (23) is set as 0.7, 0.3. The weighted parameters \(\mu_{2}\), \(\mu_{3}\), \(\mu_{4}\), \(\mu_{5}\) in Equation (26) is set as 0.35, 0.15, 0.3, 0.2, respectively. The transmission packet size is set to 500-1000 bits. The packets are concurrently transmitted through randomly selected source and destination nodes, where the total number of packets is positively correlated with the number of nodes. The energy consumption of transmitting \(l\) bits data package in the free-space model is calculated as

\[E_{tx}(l,d)=lE_{elec}+l\varepsilon_{fs}d^{2} \tag{32}\]

where \(E_{elec}\) is the energy consumption of transmitting unit bit data, \(\varepsilon_{fs}\) is the energy consumption parameter of the power amplifier. In our simulations, we set \(E_{elec}=50 nJ/bit\), \(\varepsilon_{fs}=100 pJ/bit/m^{2}\). The energy consumption of receiving \(l\) bits data package is:

\[E_{re}(l)=lE_{elec} \tag{33}\]

Then the energy consumption for transmitting \(l\) bits data package is as follows:

\[E_{i}^{c}=E_{tx}(l,d)+E_{re}(l) \tag{34}\]

To evaluate and analyze the performance of the proposed GTSC method, the classic MST [40; 41], K-means [15], PSO-based [42; 43] and the state of the art IWLC [20], DCM [24] topology construction methods are employed in the simulations for comparison.