## 4 Mobility Model of the MS
### Optimization Method
Different solutions are proposed in the literature, among which we can cite the TDMA and RTS/CTS mechanisms which dealt with collision problems. The collision problem is also considered in this paper. While the MS is moving among clusters, a collision of packets may occur during the process of data collection phase or handover process phase. The collision problem is due to the simultaneous transmission of packets from two or more source nodes (CHs) to the same destination node (MS). This problem affects the performance of data collection, and it degrades the reception rate of packets. Therefore, to enhance the data collection process and reduce the probability of collisions, we propose a simple mechanism for this problem in which we set a random backoff delay or timer for each source node in order to avoid the simultaneous sent, where each source node has a different time of sending. ## 6 Simulations and Results

We test our proposed protocol CLR-MSPH and BMAC-H using the Simulator Omnet++/Castalia [32], which is a powerful and flexible simulator, and it supports the mobility of nodes. We simulate both protocols by taking into consideration the variation of speed because the velocity of the MS affects the transfer of data and the handover mechanism in each protocol. We also simulate CLR-MSPH and BMAC-H on different and random topologies. Table 1 shows the different parameters of the simulations. ### Scenario 1

In scenario 1, we test the network performances of both protocols CLR-MSPH and BMAC-H with varying the speed of the MS in a random topology of 60 sensor nodes with 10 clusters in addition to the MS. We compare the results of simulation in terms of packet reception rate (PRR), latency (end-to-end delay) and energy. #### 6.1.1 Packets Reception Rate

In this part, we discuss the packets reception rate (PRR). In order to study the control of the handover mechanism of each protocol, we also study the percentage of delivered packets using the handover mechanism in each protocol and the number of hops to route these packets to the MS. Figure 8 and Table 2 represent the total PRR of both protocols with varying the speed of the MS. In the other hand, Figure 9 and Table 3 illustrate the impact of the MS velocity on the handover mechanism for both CLR-MSPH and BMAC-H protocols. We notice that our proposed CLR-MSPH performs better than the BMAC-H protocol in terms of PRR in almost all the cases with varying the velocity of the MS from 5 m/s to 25 m/s. The CLR-MSPH gives the greatest PRR of 98.46% and the lowest PRR of 92.17%. On the other hand, BMAC-H protocol performs less than our proposed CLR-MSPH protocol, where the greatest PRR picks at 98.21% and significantly falls to the lowest PRR at 87.83% (Figure 8 and Table 2). We also see for the packets received at the MS using both protocols that CLR-MSPH has more control of the handover mechanism, where it shows the lowest percentage of packet delivered using handover thanks to the control mechanism of CLR-MSPH in Algorithm 5. This control of handover helps in reducing the packet loss probability, and that is confirmed in the results in terms of PRR in which CLR-MSPH has the highest PRR compared to BMAC-H in almost all cases with varying the speed of MS. The check of buffer size mechanism explained before in CLR-MSPH helps in controlling the handover and reducing the number of packets sent using handover to avoid packets loss. We also see that the handover mechanism used in CLR-MSPH performs in three hop routing compared to handover mechanism used in BMAC-H which performs in two hop routing. In the case where the speed of the MS is 5 m/s, the CLR-MSPH did not process the handover because the speed of MS is sufficient to deliver data from the CH to the MS without processing the handover with the help of the controlling handover mechanism in CLR-MSPH, while BMAC-H handovers 68.68% of data received at the MS in the simulation, which explains the lowest PRR of 87.83% (Figure 9 and Table 3).