## 3 Preliminaries
### Setup Phase
#### 4.1.3 Routing Metric Calculation  
In the proposed protocol, we present a novel routing metric, FR. The FR value was calculated using the FR value of neighboring nodes and the local density around the node's transmission range. Initially, FCM clustering was used to divide the node's transmission range area into subareas depending on the neighborhood density. Subsequently, nodes from the smallest cluster were used in the FR calculation. As indicated in [3; 7], the nodes closest to the sink have a lower routing metric value, implying that they have better forwarding potential compared with other nodes with a higher value. This routing metric value also indicates the sender's waiting time in response to the duty cycle and link quality. Additionally, assigning a higher priority to nodes positioned in less-dense areas is conducive to achieving OR characteristics. Based on the aforementioned reasons, we propose using only nodes in less dense areas for the routing metric calculation, which will drive the routing path through a comparatively less dense area when the network has non-uniformly distributed sensor nodes. The routing metric FR was calculated as follows:  
\[FR_{i}=\frac{1}{\sum_{j=1}^{n_{ci}}{LQ_{ij}}}+\frac{\sum_{j=1}^{n_{ci}}{LQ_{ij} *FR_{ij}}}{\sum_{j=1}^{n_{ci}}{LQ_{ij}}}, \tag{5}\]  
\[FR_{i}=\frac{1}{\tau_{i}(n_{ci}+1)}+\frac{\sum_{j=1}^{n_{ci}}{FR_{j}}}{n_{ci}}, \tag{6}\]  
where \(FR_{i}\) denotes the FR value for node \(i\), and \(n_{ci}\) represents the number of nodes in the smallest cluster (after applying the FCM clustering algorithm) in the neighborhood of node \(i\). \(LQ_{ij}\) in (5) indicates the link quality between node \(i\) and neighboring node \(j\), which is directly collected from the radio layer. \(\tau_{i}\) in (6) corresponds to the residual energy parameter of node \(i\)[7]. These equations were derived from ORW [3] and ORR [7]. According to the calculation, the smaller the cluster, the smaller the FR value. The pseudocode for the routing metric calculation procedure is shown in Algorithm 1. ```
1:procedureFR-Calculation(\(N,C,RM,P\))
2:\(N\leftarrow\) number of neighbor nodes;
3:\(C\leftarrow\) number of clusters (using Equation (1)) \((c_{1},c_{2},c_{3},\ldots,C)\);
4:\(RM\leftarrow\) routing metric value of the neighbor nodes;
5:\(P\leftarrow\) positions of neighbor nodes;
6:\(RM_{\text{sink}}\gets 0\)
7:if\(N>\)Thresholdthen
8:Run FCM; (FCM cluster formation step \(1\) to 5)
9:for\(c_{1}\) to Cdo
10:ifcluster_size\((C)==\) minimum then
11: calculate \(FR\); (using Equation (5) or Equation (6) with the cluster members' \(RM\)). 12:endif
13:endfor
14:else
15: calculate \(FR\); (using Equation (5) or Equation (6) with existing neighbor nodes' \(RM\) without running FCM). 16:endif
17:endprocedure
```  
**Algorithm 1** Routing metric calculation algorithm  
Link quality (\(LQ_{ij}\)) is used as a weighting factor in Equation (5), providing more stable links a higher preference. Relative to energy-rich nodes, residual energy (\(\tau_{i}\)) modifies the FR in Equation (6). FCM-OR can function flexibly in settings with various constraints because of these two formulas. The simulation configuration determines which equation is used, and nodes use locally available metrics to calculate FR values, so no manual adjustment of these weights is required during runtime. The forwarder rank (FR) is computed using two runtime-updated weighting parameters: link quality (\(LQ_{ij}\)) and residual energy (\(\tau_{i}\)). In Equation (5), link quality is used to prioritize nodes with more stable connections to the sender, as this value is collected in real time from the radio layer. In Equation (6), residual energy is used to favor nodes with higher remaining energy, calculated as the ratio of current to initial energy, and continuously updated as nodes overhear packets in their neighborhood. These formulas allow FCM-OR to dynamically adapt to changing network conditions without manual tuning.