# Investigation of Energy Cost of Data Compression Algorithms in WSN for IoT Applications
## 4 Hybrid Model for Run Length Encoding with Adaptive Huffman Encoding
### Hybrid Algorithm
(**a**) Alive Nodes for Case Study 3-3, (**b**) Energy for Case Study 3-3, (**c**) PDR for Case Study 3-3, (**d**) Throughput for Case Study 3-3, (**e**) Packets sent to BS for Case Study 3-3.

without compression and H- RLEAHE techniques reduces by 87.86%, 52.48% and 25.20%, respectively, compared to RLE. ### Case Study 4: 10 \(\times\) 10, 650 Nodes, BS at Center

Figure 14 illustrates the findings of Case Study 4, which was conducted with a grid size of 10 \(\times\) 10 and 650 nodes. The network topology consisted of 100 grids, and the BS was situated in the center. The results of performance metrics show that the network remains alive for 111 (AHE), 478 (without compression), 722 (H-RLEAHE) and 967 (RLE) rounds,

Figure 5:1 Results of Case Study 3-4: 4 \(\times\) 4, 200 Nodes, BS at corner. (**a**) Alive Nodes for Case Study 3-4, (**b**) Energy for Case Study 3-4, (**c**) PDR for Case Study 3-4, (**d**) Throughput for Case Study 3-4, (**e**) Packets sent to BS for Case Study 3-4.

respectively, as shown in Figure 14a. Compared to RLE, the network lifetime reduces by 88.52%, 50.56% and 25.33%, respectively, for AHE, without compression and H-RLEAHE. The average energy in the network is depicted in Figure 14b for the RLE, H-RLEAHE, no compression and AHE technique, respectively. In Figure 14c, the simulation for PDR is demonstrated which shows trivial improvement as compared to previous case studies. Further, in Figure 14d,e RLE demonstrated the increase in residual energy and throughput of the network compared to AHE, no compression and H-RLEAHE. In case study 4 the performance of the system is still very similar to the performance of the network in the earlier case studies. ### Case Study 5: 10 \(\times\) 10, 1250 Nodes, BS at Center

The findings of Case Study 5 with 10 \(\times\) 10 grids and 1250 nodes are shown in Figure 5:2 The network topology consists of 100 grids, and the BS is located at the center. Here the network remains alive for 111 (AHE), 484 (without compression), 726 (H-RLEAHE) and

Figure 5:3 Results of Case Study 4: 10 \(\times\) 10, 650 nodes. (**a**) Alive Nodes for Case Study, (**b**) Energy for Case Study 4, (**c**) PDR for Case Study 4, (**d**) Throughput for Case Study 4, (**e**) Packets sent to BS for Case Study 4. 972 (RLE) rounds, respectively. Compared to RLE, the network lifetime reduces by 88.58%, 50.20% and 25.30%, respectively, for AHE, WC and H-RLEAHE. Case Study 6: Study of Data Compression with Elliptic Curve Cryptography (ECC) for 2 \(\times\) 4, 100 Nodes, BS at the Center

As mentioned earlier, the author also investigated network lifetime while including _Elliptic Curve Cryptography_ (ECC) that can be considered as an alternative for _public-key cryptography_. The detailed description of ECC is given by authors in [48; 49]. Adding ECC for 2 \(\times\) 4 and 100 nodes, with BS in the centre, will allow us to fully analyse the data compression technique. This case study illustrates how the compression method performs when the base station is situated on the edge of a 2 \(\times\) 4 configuration with 100 nodes. The RLE shows a significant increase in different performance indicators in this scenario. Figure 16a shows that the network remains alive for 111 (AHE), 477 (without compression), 719 (H-RLEAHE) and 967 (RLE) rounds, respectively. Compared to RLE, the network lifetime reduces by

Figure 5:4 Results of Case Study 5: 10 \(\times\) 10, 1250 nodes. (**a**) Alive Nodes for Case Study 5, (**b**) Energy for Case Study 5, (**c**) PDR for Case Study 5, (**d**) Throughput for Case Study 5, (**e**) Packets sent to BS for Case Study 5. 88.52%, 50.67% and 25.64%, respectively, for AHE, WC and H-RLEAHE. As shown in Figure 16b-e, RLE achieves an improvement in all the other performance metrics.