# Sigma Routing Metric for RPL Protocol
## 4 Proposed SIGMA-ETX Metric  
The ETX metric tries to choose the best wireless link for data transmission. However, because the sum of ETX values between each node along a route are used to choose the best route, the number of hops of a path are more important than the quality of transmission at the time of making the decision. In this way, the chosen route with a lower ETX summation tends to be the one with the fewer number of hops. The problem is more evident when the network is dense (the number of nodes increases); there exists the possibility for a better routing path to have more nodes, thus making its ETX value greater than that of a single, long hop. Those long hops will develop into bottlenecks for the whole network. The routing metric called SIGMA-ETX was created to solve the problem mentioned above. SIGMA-ETX is a combination of the minimum hop count metric and ETX, where the best route for the routing is calculated with the standard deviation of the ETX values between each node. In Figure 1, from source node 0 to destination node D, there are two accessible paths. The calculation of the ETX values for Route 1 (0-1-2-D) is as follows:  
\[ETX_{0D1}=ETX_{1}+ETX_{2}+ETX_{3}=3+3+3=9\]  
For the route 2 (0-3-4-5-D). \[ETX_{0D2}=ETX_{4}+ETX_{5}+ETX_{6}+ETX_{7}=2.3+2.1+2.5+2.6=9.5,\]  
According to the traditional _ETX_ metric, route 1 is the best path between node 0 and D, but it is probable that a bottleneck will occur, because the _ETX_ value is too large between node 0 and node 1 (or node D and node 1). Therefore, in most cases, this solution would not be the best routing path. PH-ETX compares [17] the routes, taking into account the average of _ETX_. For the presented network model, this would be the result:  
\[PH-ETX_{0D1}=\frac{ETX_{1}+ETX_{2}+ETX_{3}}{3}=3 \tag{1}\]  
Figure 1: Sample PH ETX. \[PH-ETX_{0D2}=\frac{ETX_{4}+ETX_{5}+ETX_{6}+ETX_{7}}{4}=2.37 \tag{2}\]  
Suppose there are two candidate paths in the network. Path 2 has \(n\) nodes, and all of them follow the Gaussian distribution. Path 1 has \(m\) nodes, where one of them has a long hop:  
\[\sum_{i=1}^{n}ETX_{i}>\sum_{j=1}^{m-1}ETX_{j}+ETX_{0}, \tag{3}\]  
\[n\overline{ETX}>(m-1)\overline{ETX}+ETX_{0} \tag{4}\]  
\[\frac{\sum_{j=1}^{m-1}ETX_{j}+ETX_{0}}{m}>\frac{\sum_{i=1}^{n}ETX_{i}}{n} \tag{5}\]  
The objective function will choose Route 2, based on the statistical principle. Therefore, the new metric could avoid the long hop problem. However, in deployed dense networks, the average calculation does not satisfy all possible situations in order to avoid long hops; consequently, some packets are lost. This is the case in situations where the average value of the \(ETX\) metric is close between possible paths. When this happens, the PH-ETX objective function applies the shortest path to choose the appropriate route, which brings us back to paths with longer hops. The following example shows a tie situation between \(ETX\) averages:  
To solve this problem, the minimum hop count metric and \(ETX\) are combined, creating a new routing metric called SIGMA-ETX, where the best route is calculated with the standard deviation of the \(ETX\) values between each node. To calculate SIGMA-ETX for the scenario in Figure 2, the standard deviation of each route is needed:  
\[\sum(R1-ETX)=2+3+2=7 \tag{6}\]  
\[\sum(R2-ETX)=1+5+1=7 \tag{7}\]  
The summation of both routes is a tie, so the objective function tries to use the number of hops but they are also the same. However, route 2 has a very long hop that can become a bottleneck. Since their \(ETX\) summations and number of hops the same, the average strategy does not distinguish the long hop due to both averages being equal:  
\[ETX_{0D2}=ETX_{4}+ETX_{5}+ETX_{6}+ETX_{7}=2.3+2.1+2.5+2.6=9.5,\]0  
\[ETX_{0D2}=ETX_{4}+ETX_{5}+ETX_{6}+ETX_{7}=2.3+2.1+2.5+2.6=9.5,\]1 Example of tie between \(ETX\) averages.