## 5 The Proposed Protocol
### PDFH and SDFH Selection Utilizing the MPA  
Because DFHs play a crucial role in routing and data collection, DFH selection is a vital phase in WSN-based IoT, with respect to their role in gathering data from DFGMs and transmitting them to the sink node. Selecting ideal DFHs becomes especially important in networks that are homogeneous, meaning that each SN has the same energy level. It is essential to have this option in order to guarantee that energy utilization is spread uniformly throughout the network [13]. Many strategies, such as GA [52; 53], PSO [35; 54], fuzzy logic system [55; 56], and Equilibrium Optimizer (EO) [31; 57], to mention a few, have been developed for CH selection. The proposed protocol impressively incorporates the MPA, an effective and state-of-the-art optimization technique, to identify the optimal PDFH, FSDFH, and SSDFH for each DFG by applying a well-defined DFF. However, the reason behind selecting FSDFH and SSDFH will be discussed in Section 5.6. The MPA is an innovative metaheuristic algorithm that has proven to be adaptable in solving a variety of real-world issues. One key advantage lies in its ability to mimic the behavior of marine predators, drawing inspiration from their foraging strategies and adaptive capabilities. By leveraging concepts from nature, MPA can effectively navigate complex search spaces, making it well-suited for addressing the PDFH selection problem [58]. Additionally, MPA incorporatesmechanisms for exploration and exploitation, allowing it to strike a balance between global exploration and local exploitation. Another advantage is its simplicity and ease of implementation, making it accessible to researchers and practitioners across different domains. Furthermore, MPA's memory retention mechanism enables it to remember successful solutions, facilitating continuous improvement over successive iterations [44]. The MPA has demonstrated its efficacy in selecting the most optimal PDFH, thereby enhancing energy conservation and prolonging the network's lifespan in the proposed protocol. In order to accomplish this goal, the communication distance between the sink node and DFGMs in a particular DFG, their RE, average distance between DFGMs, ASBO, and PDFH rotation times are the main RMs that the sink node evaluates to select the finest PDFH based on the DFFF. Figure 7 provides a thorough illustration of the selection process for PDFHs using the MPA.  
The data exchange starts with the sink node broadcasting a request information message to every SN. In response to the sink's message, SNs reply with an information message that carries their own distinct IDs, the coordinates of X and Y, and the current RE. The sink node consequently becomes comprehensive information on each SN. After that, the setup phase is initiated by the sink node, which divides the network sensory area into hexagonal DFGs and places SNs among them. To put it briefly, this study uses the well-known MPA as an optimization method to determine which DFGM is best suited to fulfill the role of a PDFH. As the ensuing subsections shall expound upon, the MPA comprises two phases: the initialization phase and the iteration phase.