# Joint Trajectory and Communication Design for Buffer-Aided Multi-UAV Relaying Networks
## 4 Numerical Results  
In this section, we provide simulation results to verify the effectiveness of the proposed algorithm for buffer aided multi-UAV relaying networks with joint relay selection, UAV transmit power, and UAV trajectory optimization. We assumed that the network had \(K=2\) UAVs and that the locations of \(S\) and \(D\) were \((-500,0,0)\) and \((500,0,0)\), respectively. The initial locations of UAVs were set as \((-300,0,100)\) and \((300,0,100)\), respectively. It was assumed that all UAVs flew at the fixed altitude \(H=100\) m and that the maximum speed of the UAV was \(V_{\max}=60\) m/s. The communication bandwidth was assumed to be \(B=10\) MHz, and the noise power was \(\sigma^{2}=-110\) dbm. The channel power gain at the reference distance \(d_{0}=1\) m was set as \(\beta=-70\) dbm. The transmit power of \(S\) and the maximum transmit power of UAVs were assumed to be \(p_{S}=0.1\) W and \(P_{max}=0.4\) W, respectively. In addition, the average power was \(P_{mean}=P_{\max}/4\). The initial transmit power of the UAVs was assumed to be equal to \(p_{S}\), i.e., \(p_{k}\left[n\right]=p_{S}\). Furthermore, we assumed the buffer size equipped with UAVs was infinite. Figure 2 shows the UAVs optimization trajectories by the proposed algorithm for flight period T = 60 s. The initial locations of UAVs and ground nodes are marked with purple \"\(\square\)\" and black \"\(\square\)\", respectively. In this figure, the asterisk indicates that the location of the UAV is sampled at every 0.5 s. The initial and final location of all UAVs satisfied a feasible constraint in (1), and all UAVs satisfied the minimum safety distance to avoid collision. From this figure, we can see the two UAVs tried to get close to their served ground nodes during every time slot under the flying constraints. Because the UAVs served the source or destination in different time slots, sometimes the trajectories of UAV1 and UAV2 may be a straight line from the source to the destination node. Then, in Figure 3, the flight security of the proposed algorithm is demonstrated for period time T = 60 s. It can be obviously observed that the distance between the two UAVs varied with time and always exceeded the minimum security distance. Therefore, the trajectories of the two UAVs satisfied the collision avoidance constraints in every time slot. Figure 4 illustrates the average system throughput versus the different flight periods T of the proposed joint optimization algorithm. For comparison, we also simulated the following benchmark schemes:  
* No optimization: According to the CSI and buffer state, the system decided which UAV stored the data from the source and which UAV served the destination. The transmit power of UAVs \(p_{k}\left[n\right]=p_{S}=0.1\) W. A circular flight trajectory with radius of \(r=300\) m and the center of the flight trajectory above the middle of \(S\) and \(D\) were considered. * Only the relay selection and transmit power optimized: For a given trajectory, we only optimized the relay selection and transmit power via the proposed algorithm. * Only the trajectory optimized: For given relay selection and transmit power, we only optimized the trajectories via the proposed algorithm. First, as expected, the average throughput could be increased by optimizing any variable (relay selection and transmit power and/or flight trajectory). Second, it is observed that the joint optimization algorithm we proposed could greatly increase the average throughput in comparison with optimizing  
Figure 3: The distance between the two UAVs versus time with T = 60 s.  
Figure 2: Trajectories of the UAVs when T = 60 s.  
a single variable. The results above further demonstrated that the trajectory optimization was more effective than optimizing relay selection and transmit power. Finally, it was found that the average throughput could be improved as the flight period increased with the joint optimization algorithm. In a word, the proposed algorithm could significantly improve the system performance in terms of throughput.