# An On-Demand Scheduling-Based MAC Protocol for UW-WiFi Networks
## 4 Design of SDDA MAC Protocol  
_Overview of SDDA MAC Protocol_  
Firstly, we give an overview of SDDA, which performs on-demand scheduling and guarantees collision-free transmissions of both control packets and data packets. This protocol merged the reservation mechanism and the scheduling to fulfill a collision-free on-demand assignment. The most significant challenges for our collision-free scheduling are: (1) How to work out propagation delays from BS to all terminal nodes without time synchronization? (2) How to achieve the on-demand assignment for each node? (3) How to make sure collision-free transmissions of control packets from static and dynamic terminals? (4) How to ensure the reliability of data as far as possible in the case of packet loss caused by acoustic channel instability? Then we will show how SDDA solves these issues. An example of packets transmission scheduling of SDDA MAC protocol is shown in Figure 2. It can be seen from Figure 2 that the processing flow is composed of three procedures: the initial reservation phase, the time sequence scheduling phase, and the data transmitting phase. In addition, there is a periodic regular reservation phase, described in the following. During the initial reservation phase, BS broadcasts a trigger (\(TR\)) packet at first; and after receiving the \(TR\) packet, those terminal nodes that have data to report send a request (\(RE\)) packet to BS. Then, in the time sequence scheduling phase, after receiving all \(RE\) packets, BS calculates the waiting time of each node before sending data packets on the basis of propagation delay and data transmission delay contained in the \(RE\) packet and broadcasts a transmitting-start (\(TS\)) packet, in which the scheduling information is embedded. Within the data transmitting phase, after receiving the \(TS\) packet, those terminal nodes with data to send will start transmitting data packets at an appropriate time in the light of the scheduling information obtained from the \(TS\) packet. Finally, at the end of data transmission, BS will broadcast an \(ACK\) and then, if any, forward data or command packets  
Figure 1: The UW-WiFi network scenario. to the related terminals. Beyond those, it should be noted that the difference between the initial reservation phase and the periodic regular reservation phase is the method of handling \(RE\) packet conflicts. Afterwards details about SDDA are as follows. _A. The Initial Reservation Phase._ This phase mainly solves how to obtain the amount of data to be sent by each node and how to avoid the \(RE\) packet collisions. During this phase, in the first place, BS records the current time (\(t_{send\_TR}\)) and broadcasts a \(TR\) packet, the format of which is shown in Figure 3 that reveals the meaning of each byte of \(TR\). For instance, _layer_id_ stands for the MAC layer ID, _hdr_len_ means the length of header information of a MAC layer packet, _src_addr_ denotes the source address, _dest_addr_ represents the destination address, _pkt_type_ expresses the type of the present packet, and the rest (\(nodeID\) and \(re\_tx\_waitTime\)) indicates the waiting time of each terminal node before transmitting an \(RE\) packet. Actually, \(re\_tx\_waitTime\) is the waiting duration (\(wd_{tx\_RE\_i}\), where \(i\) denotes the node ID) for each terminal node from receiving \(TR\) to sending \(RE\). In the case where the propagation delays between each node and BS are not known at present, so as to prevent \(RE\) packets from colliding, we adopt the maximum propagation delay (\(pd_{max}\)) in the UW-WiFi network and the transmission delay of \(RE\) packet (\(td_{RE}\)) to compute the above-mentioned waiting duration. The computational formula is as follows:  
\[wd_{tx\_RE\_i}=(i-1)\times(pd_{max}+td_{RE}). \tag{1}\]  
After receiving \(TR\), each terminal node extracts its own waiting duration information from \(TR\) in accordance with the node ID.