## 3 Performance Analysis
with a constant transmission range, as depicted in Figure 6. Figure 7 shows the benefits of the proposed system in terms of overall network lifetime. Specifically, it can be noticed an increasing gain w.r.t MQTT-SN and CoAP, approaching the maximum value of 8.4% and 11.6%. Since power consumption is mainly due to packet transmission and reception, Figure 8 represents the effect of different publishing rate on the overall network lifetime. Three different publishing rates (\(PR_{\text{max}}\), \(PR_{\text{int}}\), \(PR_{\text{min}}\)) have been considered, where \(PR_{\text{min}}=2\) Publish pkt/s, \(PR_{int}=2 PR_{\text{min}}\) and \(PR_{max}=2 PR_{int}\). We can note that the greater improvement is achieved with the lowest rate, whereas higher rates have a negligible impact on the recharging process due to the increased nodes battery consumption. The maximum achievable network lifetime gain is finally summarized in Table 2.  
Figure 6: Random Mesh nodes deployment, where clusters are highlighted in different colours. Figure 7: Normalised average residual battery level achieved by the CoAP, MQTT-SN and WPT-MQTT-SN protocols in a Balanced Random Mesh topology nodes deployment. Lastly, Figure 9 shows the residual energy of every CH, which represents the WSN nodes that perform more radio transmissions and, thus, consume more energy. The average improvement of the WPT is about 37.9%, with a maximum value of 54.2%. For the sake of comparison, Figure 10 shows the gain achieved by the proposed approach in terms of overall network lifetime, varying the recharging period of the RNs from 1 to 15 s. It can be noticed that, theWPT-MQTT-SN performance decreases at the increasing of publishing rates. However, the better result is obtained with the highest recharging period, even though this approach causes an increase of packet loss, since during the charging period, RNs cannot communicates with internal or external nodes. \begin{table}
\begin{tabular}{l c} \hline \hline
**Publishing Rate** & **Gain [\%]** \\ \hline Minimum & 9.5 \\ \hline Intermediate & 4.7 \\ \hline Maximum & 0.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Network lifetime gain in a Balanced Random Mesh topology for different publishing rates. Figure 8: Comparison of WPT for different Publishing rates in Balanced Random Mesh topology. Figure 9: Cluster Head Energy Comparison in Balanced Random Mesh topology. An alternative scenario that has been investigated consists in a Two-Tier star-based nodes deployment, in which the ES is located at the barycenter of the network surrounded by a first tier of CHs, where all the other nodes are one-hop distant from them, as represented in Figure 11.  
Simulation performed on this scenario have highlighted a reduction of the network lifetime, as depicted in Figure 12. This results depends mainly on the node spatial distribution, as nodes that represent bottleneck, i.e., CHs, are more stressed. As a matter of fact, the traffic from/to single cluster is entirely managed by its CH, without the possibility of offloading the workload according to the nodes battery level. In this case, the difference between the residual energy of the classic MQTT-SN without WPT and the proposed approach is 4.5%, while CoAP loses approximately 8.9%. Moreover, as the Random Mesh topology the performance of MQTT-SN-WPT degrades with the increasing of the publishing rate, as shown in Figure 13.  
For the sake of completeness, the proposed solution have been tested over an Unbalanced Random Mesh nodes deployment, as shown in Figure 14, where the nodes are arranged as in Random Mesh topology, but the ES is positioned at the edge of the network. Figure 11: Two-Tier star-based nodes deployment, where clusters are highlighted in different colours. Figure 10: Overall Network Lifetime Gain comparison with different publishing rate and recharging period. Figure 14: Unbalanced Random Mesh nodes deployment, where clusters are highlighted in different colours.