# Application-Aware SDN-Based Iterative Reconfigurable Routing Protocol for Internet of Things (IoT)
## 5 Proposal of SADFIR
### Network Settling Phase (NSP) of SADFIR  
The network settling phase primarily computes clustering reconfiguration of IoT devices given network topology and coordination of SDN controllers with SADFIR-Visor. The selected clustering arrangement delivers routing responsibility of sensed information. The heterogeneity-awareness is a significant consideration of the proposed SADFIR routing algorithm to utilize residual network resources efficiently. Application-awareness is the second most critical challenge for the proposed model to deliver maximum actual sensing signals instead of engaging network resources in redundant computational tasks. To achieve higher throughput of application-aware data, the proposed model deliberately delays the reconfiguration process up to 10 th rounds. Precisely, distributed SDN controllers collect the network heterogeneity and application-awareness details from network topology during the NTMP phase. The Network Settling Phase (NSP) utilizes the network topology view to compute the average energy of residual network resources of IoT devices by the following equation:  
Figure 6: Direct transmission of critical data in SADFIR routing protocol. \[\overline{RE_{i}(s)}=\frac{1}{N}\sum_{i=1}^{N}RE_{i}(s) \tag{2}\]  
where \(N\) represents the IoT devices and \(s\) represents the network resources, which accumulates \(\overline{RE_{i}(s)}\) and represents average energy of residual network resources, whereas individual IoT device contains \(RE_{i}(s)\) as residual energy. Different distributed SDN controllers correspond to different IoT devices for all the alive nodes of \((1\leq i\geq N)\), that is why all these SDN controllers share the database at BS after computation of ability to lead the potential cluster. Initially, SDN controllers set the basic criteria of a leading role for Cluster-Head (CH) to contain residual energy higher than the average energy of the network region, which is denoted as \((E_{i}\geq\overline{RE_{i}(s)})\). Those IoT devices which meets the criteria of \((E_{i}\geq\overline{RE_{i}(s)})\) are selected as Expected Forwarding Device CHs (EFDCHs). Furthermore, distributed SDN controllers extend the investigation to select better CH by calculating the mutual distance factor of EFDCHs \((1\leq j\geq EPDCHs)\) with neighbor nodes and BS. The following equation is utilized to calculate the minimum distance with BS:  
\[Min-dist_{toBS}=^{\sqrt{(X-x)^{2}+(Y-yj)^{2}}} \tag{3}\]  
where \(Min-dist_{toBS}\) represents the minimum distance between BS and \(jth\) EFDCHs, while \(xj\) and \(yj\) are location coordinates of \(jth\) EFDCHs and \(X\) and \(Y\) are the location coordinates of BS. SDN controllers utilize the graph theory [39] to maximize the centrality of EFDCHs in potential cluster formulation. The centrality computation defines the parameters of nodes value and centrality degree and optimizes the process by selecting the highest degree centrality. The nodes from EFDCHs develop the indexing rate of Clustering Centrality (CC) to achieve suitable positioned EFDCHs. Afterwards, CC is computed as an average ratio by which a source S neighboring non-FFDCHs needs to pass through a specific node EFDCH to reach the destination (D) which can be calculated as:  
\[CC_{EFDCH}=\sum_{S\
eq EFECH\
eq D}\frac{{}_{SD}(EFECH)}{{}_{SD}} \tag{4}\]  
where \({}_{SD}\) represents the possible number shortest path between two communicated IoT devices, meanwhile \({}_{SD}(EFECH)\) represents the shortest path which cross-sectioning the calculated EFDCHs. In this way, distributed SDN controllers derive the suitable Centrally Cluster EFDCHs \(CC_{EFDCHs}\), which is a highly influenced IoT device and accommodates all potential cluster members. \(CC_{EFDCHs}\) nodes with \((E_{j}\geq\overline{RE_{j}(s)})\) gets the higher ranking indexing at controller layer to be selected as CHs.