# Dwarf Mongoose Optimization-Based Secure Clustering with Routing Technique in Internet of Drones
## 2 The Proposed Secure Clustering with Routing Protocol
### Design of DMOSC Technique  
In the presented DMOSC-MHRS technique, a new DMOSC technique is utilized to choose CHs and create clusters. The FF in this MOTAHO is used for choosing the topical CH derived. Now, the FF is expressed by the four dissimilar parameters namely number of hops, trust, distance, and residual energy (RE) [19].  
Trust: In CH selection, trust is regarded as a key parameter in the FF to improve security. The mutual trust made in a specific period is used for accomplishing the transmission.  
Direct trust (DT) is predicated on the approximate period of communication among \(i^{th}\) node and \(d^{th}\) destination \(n\). DT is measured as the gap on the list of actual and the projected period of \(i^{th}\) node for authenticating the public key expressed by the \(d^{th}\) destination. Hence, DT including \(i^{th}\) node and \(d^{th}\) the destination is given by,  
\[DT_{i}^{d}(\tau)=\frac{1}{3}\bigg{[}DT_{i}^{d}(\tau-1)-\bigg{(}\frac{\tau_{appx }-\tau_{est}}{\tau_{appx}}\bigg{)}+\omega\bigg{]} \tag{7}\]  
In Equation (7), \(\tau_{appx}\) defines the approximate period and \(\tau_{est}\) determines the estimated period to authenticate the public keys. In other words, \(\tau_{appx}\) and \(\tau_{est}\) are the expected period for sending and receiving the public keys via the destination and also the node. \(\omega\) implies the opinion parameter of this node.  
The node with the opinion parameter is plotted based on DT. However, the node without a witness parameter is authenticated by the indirect trust (IDT) as follows that is given by,  
\[IDT_{i}^{d}(\tau)=\frac{1}{r}\sum_{i=1}^{r}DT_{i}^{d}(d) \tag{8}\]  
In Equation (8), \(r\) denotes the total neighbors of node \(i\).  
Recent trust (RT) is measured by the DT and IDT along with the crucial validity and admits the destination or sink that is given in part of the moment.  
\[RT_{i}^{d}(\tau)=\alpha^{*}DT_{i}^{d}(\tau)+(1-\alpha)^{*}IDT_{i}^{d}(\tau) \tag{9}\]  
where \(\alpha=0.3\).  
\[g_{1}=DT_{i}^{d}(\tau)+IDT_{i}^{d}(\tau)+RT_{i}^{d}(\tau) \tag{10}\]  
Distance: It determines the distance (\(g_{2}\)) amongst the CH to the BS and the next-hop node. Since the energy usage of nodes is proportionate to the distance of the communication path. Consequently, it is essential to determine the communication path with a lesser distance for diminishing energy utilization.  
Residual energy: The candidate CH with higher RE (\(g_{3}\)) formulated in Equation (11) is greatly desirable at the time of CH selection. Since the CH has to perform different operations namely data transmission, collection, and aggregation.  
\[g_{3}=\sum_{i=1}^{a}E_{CH_{i}} \tag{11}\]  
In the above equation, \(E_{CH_{i}}\) illustrates the RE of \(CH\).  
Some hops: Some standard nodes belonging to the specific \(CH\) are described by some hops. The energy utilization of \(CH\) is lesser when it has a lesser number of hops. Therefore, the \(CH\) with lesser hops is regarded in the number of hops (\(g_{4}\)) and \(CH\) selection is formulated as follows.  
\[g_{4}=\sum_{i=1}^{a}I_{i} \tag{12}\]  
In Equation (12), the number of standard nodes for the specific \(CH\) can be represented as \(I_{i}\). The mentioned objective values were converted into one objective related to the weighted sum technique as presented below in Equation (13).  
\[f=\delta_{1}\times g_{1}+\delta_{2}\times g_{2}+\delta_{3}\times g_{3}+\delta_ {4}\times g_{4} \tag{13}\]  
where the \(\delta_{1}\), \(\delta_{2}\), \(\delta_{3}\), and \(\delta_{4}\) represents the weights allotted to every FF value. The devised FF was utilized from the DMOSC approach to choose an optimum \(CH\).