## 3 The Proposed Protocol
### Selection of the Key Node  
When the UAV is used as the key node, its function is limited to key management and storage. Therefore, when selecting critical nodes, we must consider three essential factors: the distance between nodes, the speed of the nodes and the residual energy. 1. The remaining energy  
When the UAV is used as the key node, its function is limited to key management and storage. Therefore, the key node will consume more energy than other normal nodes. The current energy of a drone node is defined as  
\[E_{res}=E_{0}-\sum_{i}e\cdot n_{i}\cdot t_{i} \tag{1}\]  
where \(E_{0}\) is the initial energy of the UAV, \(e\) is the average energy consumption of each neighboring node, \(n_{i}\) is the number of nodes in communication and \(t_{i}\) is the communication period. 2. Speed  
Due to the high speed of movement of the UAV, if the key node moves at high speed, it will lead to the whole communication being in an unstable state, resulting in frequent disconnections and connections of the communication link as well as frequent changes of the key nodes; the selection of fast-moving nodes should be avoided. The mobility of node \(i\) can be calculated as  
\[V_{i}=\sqrt{\left(x_{t+1}-x_{t}\right)^{2}+\left(y_{t+1}-y_{t}\right)^{2}+ \left(z_{t+1}-z_{t}\right)^{2}} \tag{2}\]where \((x_{t+1},y_{t+1},z_{t+1})\) is the position of the UAV at time \(t+1\), \((x_{t},y_{t},z_{t})\) is the position of the UAV at time \(t\). 3. Distance  
As the distance between drone nodes is always changing, when two UAVs are far away from each other, the communication link between them is unreliable or unstable, so the distance between the UAV nodes is one of the factors that should be taken into account. \[D_{i}=\frac{1}{n}{\sum_{i=1}^{n}\sqrt{(x_{i}-x_{0})^{2}+(y_{i}-y_{0})^{2}+(z_{ i}-z_{0})^{2}}} \tag{3}\]  
Figure 2: Authentication process of the proposed protocol. where \(n\) is the number of neighbors of the given UAV, \((x_{0},y_{0},z_{0})\) is the position of this UAV, and \((x_{i},y_{i},z_{i})(i=1,2,3\ldots\ldots)\) is the position of its neighbors. When all parameters have been determined, we use the fitness function based on the weighted characteristic formula to select the key node and use the Analytic Hierarchy Process (AHP) method to determine the weighting parameters, as shown in Figure 3.  
\[F_{i}(x)=\alpha E_{res_{i}}+\beta V_{i}+\gamma D \tag{4}\]  
where:  
* \(F_{i}(x)\) is the value of the fitness function of the node i. * \(\alpha,\ \beta\ and\ \gamma\) are the weight representing distance, speed, and the remaining energy, respectively, derived from the Analytic Hierarchy Process and satisfying the requirement that \(\alpha+\beta+\gamma=1\). * \(D_{i}\) is the average distance between the UAV and its neighbors. \(\alpha\), \(\beta\) and \(\gamma\) are weighting parameters between 0 and 1 determined through hierarchical analysis (AHP). First, the energy weight parameters should be greater than \(\beta\) and \(\gamma\). This is because when the node is identified as a critical node and its function is restricted to key management, the key node should have the maximum energy level. Then, for the monitoring of neighboring nodes, the speed of the UAV should be flat or uniform. Therefore, the weight parameter for speed should \(\beta\) should be greater than \(\gamma\). Based on this information and by applying the AHP method, we can elaborate the pairwise comparison matrix shown in Table 3, where \(A\) is the residual energy, \(B\) is the speed and \(C\) is the distance. Figure 3: Flow chart for selecting the key node. \(\lambda_{\text{max}}\) is the Eigen value and is obtained from the summation of products between each element of Eigen vector and the sum of columns of the reciprocal matrix.