## 5 The Proposed Protocol
### PDFH and SDFH Selection Utilizing the MPA
#### 5.2.3 Optimizing Data Fusion Regrouping (PDFH Reselection) Procedure  
Indeed, to guarantee that the PDFH selection process is not carried out in each round, in this paper, once the sink node selects PDFH of each DFG using the MPA at the initial round, the process of regrouping for the next round is decided locally by each PDFH that is currently in place (i.e., distributed-based). The proposed protocol requires PDFHs to compare their RE levels (\(RE_{PDFH}\)) to the energy threshold (\(E_{th}\)) in the subsequent round after the setup phase. Equation (30), which represents the \(E_{th}\), defines it as the average RE of all DFGMs, including PDFH. If the \(RE_{PDFH}\) is equal to or greater than the \(E_{th}\), PDFH can continue to communicate inside the DFG with DFGMs; if not, it must stop and send a disjoin message to the sink node and all SNs in the network to choose a new PDFH as per Equation (31). This message contains the current RE levels of DFGMs. \[E_{th}=AVG\_RE_{(DFGMs)}=\left(\sum_{j=1}^{N_{c}}RE(j)\Bigg{/}N_{c}\right). \tag{30}\]  
\[\text{PDFH reselection }=\left\{ \begin{array}{ll}\text{Seleect a newPDFH},&\text{if }E_{th}>RE_{PDFH}\\ \text{Keep the current PDFH},&\text{if }E_{th}<RE_{PDFH}\end{array} \right.. \tag{31}\]  
This technique reduces the number of control overhead during the setup phase (i.e., PDFH selection) by ensuring that the proposed protocol ensures that the PDFH selection procedure is not repeated for each round. Before PDFHs may be re-selected, the RE of the chosen PDFHs must drop to a certain level. When the subsequent eligible DFGM is selected to act as PDFH, the reselection process is considered satisfactory. As a result, PDFH can stay the same for several rounds until its RE drops below \(E_{th}\). That is why our protocol is considered batch-based. This condition is necessary to prevent PDFH from disconnecting the network and dying prematurely. An additional feature is suggested in the proposed protocol for setting a dynamic threshold for the RE, ensuring that SNs will stay qualified for PDFHs until the network has totally broken down. In other words, \(E_{th}\) is calculated each round, and its value changes based on the current RE of the DFGMs, as specified in Equation (30). As can be observed from the results presented in Section 6, this aspect significantly improves the network's longevity over traditional approaches. When RE\({}_{PDFH}\) drops below \(E_{th}\), they are degraded to DFGMs so that they may carry on with their sensing duties. A new PDFH is chosen to replace the existing one in light of the RMs values and the MPA. The network also removes dead SNs. Since PDFHs need to be awake all the time, this increases the amount of energy they need. SNs rotate PDFHs in order to maintain equilibrium in energy consumption. Algorithm 3 demonstrates the PDFH selection and reselection procedures for the proposed protocol. ```
0: In:\(N_{c}\) (Number of DFGMs in each DFG) In:\(C\) (Optimal number of DFGs) In:RMs (Routing metrics for each SN) In:\(Prey\) matrix (the initialization matrix for the MPA algorithm) In:\(N\) (Number of SNs in the network) In:\(Round\) (Number of rounds) Output:PDFH (Optimal PDFH for each DFG) Main: // PDFH selection at the setup phase of the first round
```
**Algorithm 3** PDFH selection and reselection procedures for the proposed protocol. Mastering Data Fusion Communications: Efficient Scheduling and Transmission over Intra- and Inter-DFG  
As was previously pointed out, SNs reply with information messages after receiving a request for information from the sink node. The arrival time of each message received by SNs is then recorded by the sink node for usage at an ulterior point and time. Consequently, the sink node divides the network area into identical hexagonal DFGs and begins the process of PDFH, FSDFH, and SSDFH selection by running the MPA between DFGMs in each DFG.