## 5 The Proposed Protocol
### PDFH and SDFH Selection Utilizing the MPA
#### 5.2.3 Optimizing Data Fusion Regrouping (PDFH Reselection) Procedure
After determining PDFHs, FSDFHs, and SSDFHs, the sink node sends the sink's table message for all SNs in the network containing its ID, arrival time, its role (PDFH or DFGM), DFG number, PDFH ID, their TSs, and distance to the sink and to PDFH. After SNs receive the sink's table message, the steady-state phase starts. In simpler terms, SNs send their data to their PDFHs, which in turn send the data to the sink node, which maintains sufficient knowledge about all PDFH IDs and DFGMs that correspond with them, aside from DFG ID, RT, and the message arrival time for all SNs. Therefore, the sink is in charge of assigning TDMA TSs for SNs. In-depth explanations of the workings of this scheduling strategy will be covered shortly. In fact, the TDMA schedule that is suggested in [59] is enhanced by TDMA, which makes use of neighborhood data from the local area to efficiently arrange TSs and reduce the likelihood of collisions. The selected PDFH controls the data fusion and transmission process by acting as a control center inside its local region (i.e., DFG). In addition, the sink creates a TDMA schedule for the DFG's DFGMs, giving each one a specific TS for data transmission during the steady-state phase. With this scheduling technique, intra-DFG interference is evaded, and data collisions inside the DFG are avoided since SNs only send data during their assigned TS. Additionally, this technique makes it easier for DFGMs to adopt a sleep-wake cycle. In order to preserve energy during their sleep cycles, SNs must be active only during their allotted TDMA TSs throughout this cycle. SNs may run at a reduced rate of power during the sleep cycle to effectively conserve energy. PDFH gathers sensed data from all DFGMs within their allotted TSs at the completion of each round (i.e., steady-state phase), aggregates these data, and then sends the aggregated data back to the sink node via single-hop or multi-hop communication channels. No matter how many data packets are received in PDFHs, they aggregate the received data packets into a single packet, therefore lowering the volume of data and directly sending the fused data to the sink node. Indeed, the use of Direct Sequence Spread Spectrum (DSSS) for communication between the sink node and PDFH is crucial. Specifically, DSSS is employed to minimize inter-DFG interference. Each DFG is assigned a unique spreading code that differs from those used in adjacent DFGs. This distinct spreading code effectively prevents inter-DFG interference, ensuring that DFGs do not interfere with each other. To provide further light on how TDMA performs in the proposed protocol without routing, each DFGM within a DFG is given a ranking order by the sink node based on the information message's arrival time once the data fusion grouping procedure is complete. \"First reach, first assign\" is the mechanism used in ranking if the type of DFGM is Normal DFGM (\"NDFGM\"). This concept states that the first information transmission to reach PDFH is ranked 1, the second arrival is ranked 2, and so on. Until each NDFGM in the DFG is given its proper ranking order, this ranking process is completed. Conversely, because PDFH receives data from DFGMs, aggregates them with its own data, and then transmits the fused data to the sink node, it is given the highest rank in the DFG regardless of its arrival time. Due to this fact, the sink node now uses the TDMA scheduling approach to assign transmission TSs. The allocation criteria are based on the given rank, which is saved in the Turn of TDMA TS field. Additionally, the precise allocated TS is expressed by Equation (32), and the arrangement of intra- and inter-DFG TSs for a single DFG, such as DFG 6, is shown in Table 8.  
\[TS=\left\{ \begin{array}{cc}\frac{RT}{N_{c}+1},&\quad if\text{ {sin}}\text{ple}-\text{hop communication is employed,}\\ \frac{RT}{N_{c}+N_{PDFks}+1},&\quad if\text{ multi}-\text{hop communication is employed,}\end{array} \right. \tag{32}\]  
where \(N_{PDFks}\) refers to the number of PDFRs needed to reach the sink node.