# Dynamic Control Architecture Based on Software Defined Networking for the Internet of Things
## 4 Results Analysis
The better behaviour of the MaxBattery and DRM approaches is shown; in particular, the battery saving achieved by these two alternatives positively affects the network life time. In Figure 3, it is also evident that the performance gap between DRM and MaxBattery keeps constant, while the other strategy gets worst with time. For instance, after 800 s, the gain between DRM and the MinHop strategy reaches a value nearly equal to 55%. In addition, it is important to evaluate the fairness of the proposed DRM strategy in uniforming the energy depletion of the nodes, since this property affects the network partitions. To this regard, the so-called Jain's Fairness Index is considered in our validation campaign, defined as [36]:  
\[J(\epsilon)\doteq\frac{\left(\sum_{i=1}^{N}\epsilon_{i}\right)^{2}}{N\sum_{i= 1}^{N}\epsilon_{i}^{2}} \tag{3}\]  
where \(N\) is the number of nodes and \(\epsilon_{i}\) denotes again the battery level of node \(i\). The Jain's Fairness Index approaches the unitary value when the residual battery level values of the \begin{table}
\begin{tabular}{p{42.7 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt}} \hline \hline
**Packet** & **Type** & **Sending Period (s)** & **Length (Bytes)** & **Description** \\ \hline Beacon & Control & 10 & 2 & It is sent by every nodes to inform its neighbours about the distance to the Sink node and its battery level. \\ \hline Report & Control & 20 & [3, 108] & It is sent to the Controller to report information about battery level, distance to the Sink node and the neighbours list associated with their link quality indicator. \\ \hline Data & Data & 50 & [1, 116] & It can be sent by every device including the Controller. Its size cannot exceed 116 Bytes. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Packet features. Figure 3: Average Residual Energy achieved by the proposed strategies MaxBattery, DRM and MinHop. nodes are extremely close. In Figure 4, this parameter is depicted as a function of time to compare the proposed different routing strategies in the case of bottleneck topology. As shown in Figure 4, the energy-based strategies, i.e., MaxBattery and DRM, both achieve Jain's Fairness Index values closest to the unit value; consequently, they are able to enhance the network lifetime by minimising the variance of battery consumption among nodes. Besides, the MaxBattery strategy shows an asymptotically better behaviour followed by the DRM strategy, while MinHop strategy presents a remarkable performance worsening, since it does not consider any energy consumption related information. Another relevant issue to be addressed is the SDN Controller WSN nodes management. Specifically, the overall latency needed to monitor, update, evaluate and notify the selection of the best path represents a key parameter to be evaluated. Moreover, the process efficiency results in a better energy utilisation and, consequently, in a greater network lifetime. To this end, in Figure 5, the average latency performance of the proposed strategies is shown, together with the related range of measured values. In more details, the average latency was evaluated considering \(N\) unicast communications between the Sink node and the farthest node from it. It is easy to point out that the MaxBattery approach presents a remarkably higher latency with respect to the other ones, since it only takes into account the battery nodes level, while DRM dynamically adapts its strategy by considering more the multi hop distance (in terms of \(w_{\tau}\)) as long as the battery level of the majority of nodes is not critical. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{2}{c}{**Microcontroller**} & \multicolumn{2}{c}{**Transceiver**} \\ \hline Active & 1.8 mA & RX & 19.7 mA \\ Idle & 20 uA & TX (0 dBm) & 17.4 mA \\ Sleep & 5 uA & TX (\(-\)5 dBm ) & 13.9 mA \\  & & TX (\(-\)10 dBm) & 11.2 mA \\  & & TX (\(-\)15 dBm) & 9.9 mA \\  & & TX (\(-\)25 dBm) & 8.5 mA \\ \hline \hline \end{tabular}
\end{table} 
Table 2: MICAz more current consumption.