## 3 Model Formulation and Scheme Design
### Improved Clustering Algorithm  
The clustering algorithms divide the nodes of a sensor network into different clusters, each cluster has only one cluster head node. Regarding the UAV data collection scenario in the paper, the cluster head gathers the data of sensor nodes in the cluster, and then sends the data saved to UAV when it arrives. The closer the cluster heads are to the UAV take-off point, the shorter the flight distance of UAV will be. The typical clustering algorithms are LEACH (Low Energy Adaptive Clustering Hierarchy) [35], TEEN (Threshold sensitive Energy Efficient sensor Network protocol) [36], PEGASIS (Power-Efficient Gathering in Sensor Information System) [37], etc. The TEEN algorithm uses the filtering method to reduce the amount of data transmission; however, the threshold setting prevents some data from being reported. The PEGASIS algorithm adopts a chain method, and node damage may lead to the failure of the chain. The above two algorithms are not suitable  
Figure 3: The flow chart of the optimization process. for the application scenario of the paper. In the process of selecting the cluster head in the LEACH algorithm, the nodes in the network act as the cluster head with equal probability. Specifically, each node randomly selects a value between \([0,1]\). If the selected value is less than a certain threshold, the node becomes the cluster head. Due to the randomness of cluster head selection and the fact that the residual energy of nodes is not considered, the rationality of the number of cluster heads and the uniformity of distribution in the network cannot be guaranteed. Therefore, we propose an improved cluster head selection algorithm based on LEACH (ILEACH), which is aware of the distance from the cluster heads to the UAV take-off point, while considering the factors of remaining energy, number of nodes covered, and average distance of neighbor nodes. The average distance factor of neighbor nodes is represented by \(dF_{i}\), which is expressed by \(dF_{i}=\frac{1}{d(i)}\), where \(d(i)\) is the average distance from all neighbor nodes of \(i\) within the radius \(R_{c}\) to \(i\). The smaller \(d(i)\) is, the shorter the average distance between the surrounding nodes and node \(i\) is. Then, when the surrounding nodes communicate with this node, the average energy consumption is smaller. \(NF_{i}\) represents the number of nodes covered factor, which is expressed by \(NF_{i}=1-\frac{1}{Nu(i)}\), where \(Nu(i)\) is the number of nodes contained in node \(i\) within the range of \(R_{c}\). The larger the \(Nu(i)\), the better coverage performance of the cluster headed by this node. \(EF_{i}\) represents the remaining energy factor, which is expressed by \(EF_{i}=e^{\frac{E_{R}}{E_{I}}}\), where \(E_{R}\) is the remaining energy, and \(E_{I}\) is the initial energy of the battery. \(DF_{i}\) represents the distance factor from the node to the UAV take-off point, which is expressed by \(DF_{i}=\frac{1}{D(i)}\), where \(D(i)\) is the distance from node \(i\) to the UAV take-off point. The specific steps of the improved algorithm are as follows:  
Each node calculates its own delay time \(t_{c}(i)\) by (1). If node i does not receive information from the cluster head within time \(t_{c}(i)\), it announces that it is the cluster head and broadcasts notifications to its neighbors. If the node receives the cluster head information, the node is selected as a member node and the timing is exited.