# Variational Autoencoders for Network Lifetime Enhancement in Wireless Sensors
## 3 Methodology
### Performance Analysis
It is achieved due to the better compression rate of VAE. Though the compression rate of AE is better than that of VAE, its poor decompression rate increases its total number of retransmissions, and that leads AE to perform lower than VAE in terms of residual energy. The performance of CS approach shows a steady energy drop from the beginning that leads to a complete network failure before 1200 s. The LTC indicates the poorest residual energy performance due to its poor compression rate. The poor compression rate makes the network to send huge amount of data and that allows the nodes to consume huge energy on its operation. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**VAE** & **AE** & **CS** & **LTC** \\ \hline
0.9902 & 0.9109 & 0.7552 & 0.4984 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Average reconstruction rate of different methods. Figure 6: Comparison of reconstructed data and error of different approaches. Figure 9 specifies the energy consumption by the nodes for transmitting 1 byte of data. It can be determined that the AE approach consumes the least energy of 0.00184 joules for transmitting 1 byte of data, whereas VAE consumes a slightly higher energy of 0.00003 joules than AE, due to its superior data compression ratio. Hence, the total amount of data retransmission becomes lesser in VAE, and that enhances the network lifetime. LTC consumes very large energy of 0.00320 joules, as its computational cost is very poor among the other methods. CS is observed with an energy consumption of 0.00267 joules for its operation. In general, the overall energy consumption of a WSN architecture tends to increase with the number of sensor nodes deployed. This is because more sensor nodes generate more data, which can lead to network congestion. Network congestion, in turn, can result in a higher drop rate and more retransmissions. Consequently, the energy consumption per byte of transmission can potentially increase due to these factors. The specific energy consumption per byte provided for the current set of 54 sensor nodes has been given in Figure 9 and may vary with the addition of more nodes. Figure 8: Comparison of residual energy over simulation time. Figure 7: Comparison of active nodes over simulation time. The average time taken for data transmission and the network lifetime of the proposed WSN architecture with various compression technique are shown in Figures 10 and 11 respectively. It can be found that AE provides a minimum delay of 0.105 milliseconds for transferring 1 byte from source to destination. The delay of AE model is comparatively better than the VAE, as the compression rate is lower in AE. However, the better compression rate of VAE gives an overall improvement in the network lifetime that can be seen in Figure 11. The VAE attains a maximum network lifetime of 1491 s; whereas, in AE the network life is 1267 s, that is 224 s better than that of the AE. The transmission delay of both CS and LTC are slightly higher than that of the VAE, and their network lifetime is also comparatively lesser than that of the VAE. Moreover, the LTC shows the least network lifetime of 678 s.  
Figure 10: Average time taken for transferring 1 byte of data. Figure 9: Energy consumption of different algorithms at per byte transmission.