# A MAC Protocol to Support Monitoring of Underwater Spaces +
## 3 Description of the UWSO-TDMA Protocol
### Initialization Phase  
#### Clock Synchronization  
The clocks synchronization is of major importance in a TDMA MAC protocol [20; 23]. Although the nodes count with a real-time clock (RTC), these usually have drifts; therefore, a synchronization process is necessary. Underwater acoustic signals propagate at an average of 1.5 km/s. With this speed, nodes within transmission range (but distant enough) receive the signals at significantly different times. Moreover, usually the time slot is shorter than the propagation delay; thus, the same message may be listened to by one node at a certain instant and later by another one. Table 1 presents the propagation delay for different distances. If the transmission is set at 9600 b/s, which is a standard transmission rate for acoustic underwater transmissions, the time required for transmitting 256 bytes is 0.213 s. Therefore, nodes at more than 500 m receive the message after it has been completely sent at the source node, and a collision may take place without being noticed by the involved nodes. \begin{table}
\begin{tabular}{c c} \hline
**Distance (m)** & **Propagation Delay (s)** \\ \hline
50 & 0.0333 \\
100 & 0.0667 \\
200 & 0.1333 \\
500 & 0.3333 \\
1000 & 0.6666 \\ \hline \end{tabular}
\end{table} 
Table 1: Propagation delay. The synchronization protocol is hierarchical. First, the nodes within the transmission range of the SB are synchronized. Once all of them are synchronized, they begin synchronizing nodes within their transmission range, and so on. In what follows, a detailed explanation is provided for the set of nodes in direct contact with the SB. The process is repeated once the synchronization nodes for the different sub-frames are selected. In the case of underwater acoustic signals, the transmission range is not easy to determine, as it depends on the power of the transmitter, the sensibility of the receiver, the carrier frequency, the signal to noise ratio and several other factors, like water temperature, salinity, the depth of the sensors and currents. In fact, a node may discover nodes in its transmission range, but not the actual size of it. However, for the purpose of advancing in the analysis, we consider that in the design stage, it is possible to compute the communication range based on standard parameters of the zone in which the sensor network will operate. At startup time (initialization phase), the network uses a carrier sense multiple access (CSMA) protocol for the clock synchronization and slot selection. As more than one node may try to use the channel simultaneously, there may be collisions. Nodes are not aware of the presence of their neighbors and the SB (_synchronization node_); thus, they do not know when the synchronization message will arrive or the amount of answers it will receive. The SB (_synchronization node_) sends a _synch_ message. This has an identification field (ID) for the node and the time stamp obtained from the UTC system. Nodes within transmission range of the SB (_synchronization node_) would receive the _synch_ message at different instants depending on the delay, which is basically a function of the distance to the SB (_synchronization node_), as shown in Table 1. After the node receives the _synch_ message, it responds with an _asynch_ message. This message has an ID field for the node, the time at which the _synch_ message was received and the time at which the _asynch_ message was finally transmitted. Before transmitting, the node will sense the channel to detect activity; if it listens to some other node answering, it will wait and run a back-off algorithm. As the propagation delay is important, overlapped transmissions may be detected by the transmitting nodes or by the SB (_synchronization node_). If the node finds the channel free and transmits, the message may suffer a collision later without being noticed by the node. For this reason, all messages should be acknowledged by the destination node, in this case the SB (_synchronization node_).