## 6 Simulation and Results
### Packet Size Adaption Performance  
The proposed packet size adaptation scheme is examined by comparing it with the random packet size, the fixed packet size and the EKF. Figure 15 shows the comparison results. It is the accumulative network energy efficiency. The network energy efficiency is characterized in terms of energy-per-bit (EPB) which denotes the ratio of the total energy consumption and the amount of data successfully sent. We observe that the MAB packet size adaptation scheme achieves the best energy efficiency across the whole duration of the simulation. The proposed packet size adaptation scheme keeps its energy-per-bit at the lowest level among all packet-sizing schemes. The blue horizontal line represents the MAB adaptive packet size. The EPB is 0.246 mJ/bit. The amount of data successfully sent is 122 Mb. The red line represents the fixed packet sizing scheme, whose energy-per-bit value first decreases, and then it keeps increasing as the packet size increases. The optimal packet size of the fixed scheme is 60 bytes. The energy-per-bit is 0.253 mJ/bit. The amount of data successfully sent is 119 Mb. The purple line represents the random packet sizing scheme, which is still worse than the adaptive packet size performance since the packet size adaptation scheme dynamically tracks the channel behavior. The MAB adaptive packet size is clearly better than the EKF scheme. The whole network has a cluster head and sensor nodes. The sensor nodes periodically send their sensing data to the cluster head. The sensor nodes are battery operated. The cluster heads usually supply power. As mentioned, the energy can be optimized due to the optimal packet size. Figure 16 shows the comparison of the energy consumption using in the MAB policy, the random packet size, the fixed packet size policy and the EKF policy. The blue horizontal line represents the MAB adaptive packet size. When the mobile node increases, the energy consumption almost does not increase. The red line represents the fixed packet sizing scheme. The energy consumption keeps increasing as the nodes increase. The purple line represents the random packet sizing scheme. The energy consumption is similar to that of the fixed packet sizing scheme. Due to the increasing number of mobile nodes, the  
Figure 15: The energy consumption comparison for the different packet size schemes. probability of conflict increases and the channel quality is poorer. Therefore, as the packet length increases, the energy consumption experiences a sharp rise. The green line represents the EKF scheme. The energy consumption increases slowly, and finally tends to be stable as the packet length increases. The MAB adaptive packet size is clearly better than the other three strategies as the number of mobile nodes increases. Figure 16: The energy consumption comparison of the different packet size schemes per number of mobile nodes. Figure 17: The comparison of the number of successfully transmitted data among different packet-sizing schemes as the packet size changing. Figure 17 demonstrates the comparison of the amount of transmitted data in the MAB policy, the random packet size and the fixed packet size policy as the packet size is changing. The blue line represents the MAB adaptive packet size. When the channel quality is changed, the packet size is adaptive. In the beginning, the transmitted data is at the jitter stage, since it is searching for the optimal arm according to the MAB strategy at the learning stage, then the amount of transmitted data tends to a constant value once the optimal arm is found. It can be seen that the transmitted data of the MAB policy is significantly better than that of the random, the fixed packet size scheme and the EKF scheme. The reasons for this improvement can be attributed to the adaptive property of the MAC. When the wireless network quality is bad, it reduces the packet size, and reduces the retransmission frequency. In this way errors are reduced and the channel capacity utilization is increased.