Robust TDA-MAC for practical underwater sensor network deployment: lessons from USMART sea trials

In this paper, we present the results of deploying the first test prototype of the USMART low cost underwater sensor network in sea trials in Fort William, United Kingdom, on 29 June 2018 and 3 July 2018. We demonstrate the first ever hardware implementation of the Transmit Delay Allocation MAC (TDA-MAC) protocol for data gathering in underwater acoustic sensor networks (UASNs). The results show a successful application of TDA-MAC to remote environmental monitoring, integrating a range of sensor nodes developed by the universities of Heriot-Watt, York, Newcastle and Edinburgh. We focus on the practical challenges and their mitigation strategies related to TDA-MAC to increase its robustness in real-world deployments, compared with theoretical and simulation-based studies. The lessons learned from the sea trials reported in this paper prompted several crucial modifications to TDA-MAC which form a solid foundation for further work on the development of TDA-MAC based UASNs.


INTRODUCTION
The use of wireless sensor networks (WSNs) for remotely monitoring the ocean environment is becoming an increasingly popular research subject due to modern developments in underwater acoustic modem technologies [2,8]. It is proposed as a solution to a range of underwater sensing tasks, such as water pollution measurements [10], fish tracking [3] and seismic monitoring [14]. The WSN approach to ocean monitoring provides significant advantages over the traditional deployment of data logging sensor nodes from dedicated ships, because WSNs allow flexible long term deployments and eliminate the need to retrieve the sensor nodes from the sea bed to collect the data. For example, Figure 1 shows a typical underwater WSN deployment scenario that is considered in this study. A buoy is used as the surface gateway node to gather the readings from sensor nodes deployed underwater via acoustic communications, and relay these sensor readings to an on-shore base station via a wireless radio link.
In contrast with terrestrial wireless communication systems, underwater radio propagation is severely limited in range due to high absorption of electromagnetic (EM) waves in seawater, while optical communications suffer from both high absorption and optical scattering [12]. Acoustic waves are the preferred practical medium of communication in the underwater environment; they exhibit significantly better propagation characteristics compared with EM waves. However, acoustic communications are fundamentally limited by the low sound propagation speed -approximately 1500 m/s in water -and low bandwidth with carrier frequencies typically limited to tens of kHz, or lower for long range transmissions [8,12].
The long propagation delays of acoustic signals present a significant challenge in medium access control (MAC), i.e. coordinating transmissions of multiple acoustic communication nodes potentially spaced kilometres apart. Much of the well-established research on MAC in underwater acoustic networks (UANs) focuses on schedule-based time division multiple access (TDMA) protocols. There, the nodes are scheduled to transmit their packets in particular time slots such that they arrive at the intended receivers without collisions, e.g. [6,11,13]. Schedule-based MAC schemes do not involve contention for communication resources, thus removing the need for control signalling, e.g. Request-to-Send (RTS) and Clear-to-Send (CTS), in order to establish collision-free links. Therefore, they are capable of achieving high throughput by efficiently scheduling transmissions in a way that results in a stream of data packets separated by guard intervals at the intended receivers. However, the drawback of the scheduling protocols is their need for clock synchronization across different nodes, which is a challenging task in UANs due to long propagation delays, noisy time-varying multipath channels, and the signaling overhead that is often not negligible compared with terrestrial radio systems [4,8].
In [15] we designed Transmit Delay Allocation MAC (TDA-MAC), a MAC protocol for scheduled data gathering in UANs which does not require clock synchonization across the sensor nodes. It focuses on UANs that consist of many low cost, low specification sensor nodes, that are currently being investigated in the EPSRC "Smart dust for large scale underwater wireless sensing (USMART)" project [1]. In particular, TDA-MAC has the following key features: • scalability to large networks (up to hundreds of nodes), • no requirement for clock synchronization, • little control signalling overhead, • low energy consumption, • low computation requirements.
Between 27 June 2018 and 3 July 2018 we completed a series of initial trials of the USMART sensor network test prototype, which implemented the TDA-MAC protocol for underwater acoustic data gathering, in Loch Linnhe, Fort William, UK. This was facilitated by the EPSRC ORCA Hub (Offshore Robotics for Certification of Assets) [7], and was a collaboration among the universities of Heriot-Watt, York, Newcastle and Edinburgh. As a result of these trials we learned crucial lessons and made several improvements to the TDA-MAC protocol to increase its robustness for future practical deployments. Therefore, the purpose of this paper is two-fold: (1) To present the results of deploying the initial prototype of the USMART sensor network in sea trials; (2) To discuss the key issues with TDA-MAC that we encountered in practice, compared with theory and simulations, and to list our improvements that made TDA-MAC more robust in real-world deployments. The rest of the paper is organized as follows: Section 2 introduces the TDA-MAC protocol and its application to data gathering in UANs; Section 3 gives the implementation details of the USMART sensor network prototype and the sea experiment setup; Section 4 presents the pressure and temperature sensing results from the sea trials; Section 5 discusses the practical considerations and improvements that we made to TDA-MAC based on the sea trials; finally, Section 6 concludes the paper and discusses further work.

DATA GATHERING USING TDA-MAC
In [15], we proposed the TDA-MAC protocol for centralized scheduling of data transmissions from sensor nodes connected to the same gateway node, such as in the scenario depicted in Figure 1. Its main advantage over other MAC protocols found in the literature is that it can achieve network throughputs close to the maximum channel capacity for a large number of nodes, without clock synchronization or any other advanced functionality at the sensor nodes. It achieves it by reducing the amount of control signalling at the data gathering stage to a single packet per full set of sensor readings regardless of the network size. Therefore, it shows great potential as a practical solution for efficient data gathering in UANs. Figure 2 gives a simple example that shows the packet flow in TDA-MAC. The gateway node transmits a broadcast data request (REQ) packet that is received by every sensor node at a different time (due to long, variable propagation delays). Each sensor node then waits for a specific (individually assigned) time before transmitting their data packet back to the gateway node.
The gateway node assigns a transmit delay to every sensor node using the following iterative equation: (1) where τ p [n] is the estimated propagation delay from the gateway node to the n th sensor node, τ tx [n] is the transmit delay assigned to the n th sensor node, τ tx [1] = 0, i.e. the first node starts transmitting its data packet as soon as it receives the REQ packet from the gateway node, T dp [n] is the duration of the n th node's data packet and T g [n] is the guard interval after the n th node's data packet reception at the gateway node. The nodes in the τ tx = REQ tx [2] Figure 2: TDA-MAC packet flow example, where a single gateway node gathers data from three sensor nodes [16].
]) vectors are sorted from the shortest to longest propagation delay from the gateway node. Transmit delays calculated using (1) may be negative. In those cases they are set to zero before continuing to iterate over the rest of the nodes in τ tx .
The only prerequisite for implementing TDA-MAC is the knowledge of propagation delays between the gateway and sensor nodes, which is measured using a sequence of ping signals during the initial network deployment. Afterwards, during the normal operation of the network, the gateway node can continuously monitor the accuracy of the estimated propagation delays by measuring the error in the timing of the received data packets. For full details of the initialization process and operation of TDA-MAC, see [15].
The guard interval T g [n] is an important design parameter used to avoid packet collisions due to inaccuracies in propagation delay estimates, slow variations in node positions and the multipath spread. For example, a 100 ms guard interval can tolerate approximately up to 150 m changes in relative node positions before the transmit delays have to be adjusted by sending out updated transmit delay instructions (TDI) to the nodes in question.
One of the advantages of TDA-MAC compared with other schedulebased MAC protocols is the simplicity of implementation at the sensor nodes, which lends itself well to large scale, low cost sensor network deployments. Algorithm 1 shows the functionality required at the sensor nodes to enable TDA-MAC data gathering. It consists of three basic operations, responding to one of the three types of packet received from the gateway node.

USMART SENSOR NETWORK PROTOTYPE
In this section we give details of the initial USMART sensor network prototype built for the ORCA Hub sea trials that took place in Fort William, UK between 27 June 2018 and 3 July 2018. The network consisted of different sensor nodes and a gateway node gathering their data using TDA-MAC. Table 1 summarizes the key components used in the experiments discussed in this paper, while the rest of this section describes them in more detail. Figure 3 shows the miniature, low-cost, low-power łNanomodems" developed at Newcastle University which measure 42 mm diameter by 60 mm long. Operating in the acoustic frequency band 24-28 kHz, the modems utilise a simple but highly robust spread spectrum modulation scheme based on binary orthogonal keying using chirp

Module Description
Acoustic Nanomodems Miniature, low-cost, low-power acoustic modems developed at Newcastle University, 24-28 kHz frequency range, 168 dB re 1µPa @ 1m source level ( Figure  Sensor node (PCB) with 9 exteroceptive sensors (temperature, pressure, humidity, optical, distance, sound, magnetic field, accelerometer and gyroscope), Nanomodem, 3.6V Li-Ion Battery, MAX3232 (RS-232 To TTL adapter), watertight case from BlueRobotics (Figure 4c) Gateway node Repurposed SNv1a (with Raspberry Pi), running gateway node software via SSH waveforms (chirp-BOK). This achieves data transmission at 40 bps over ranges up to 2 km transmitting a source level of 168 dB re 1µPa @ 1m ( 0.5 W), while the receiver power consumption is < 10 mW. The range between devices can be measured using ping packets to a resolution of 10 cm. Interfacing to a PC or other processor platform is via RS232 at 9600 baud. Implementation of a robust spread spectrum receiver with minimal energy and processor cost has been enabled by several innovations in sparse signal processing to reduce the computational load whilst maintaining high processing gain and immunity to the severe multipath distortions commonly found in the underwater channel. These devices were developed to provide a communication and positioning building block for large scale, cost effective WSNs to be constructed subsea.

Sensor Nodes
Throughout the preparations for the sea trials we developed four types of sensor nodes: • Sensor node v1a (SNv1a), shown in Figure 4a, comprises a Raspberry Pi 3B+, a 5V (10000 mAh) Li-Ion power supply, a GPS module for positioning, a DS18B20 temperature sensor, contained in a waterproof (IP67) enclosure. A Nanomodem

Limpet Node
The Limpet is a multi-sensing platform designed to be low-cost and highly manufacturable, which can be deployed in large collectives for monitoring offshore energy platforms [17]. It is designed to be one part of a heterogeneous collection of field robots (drones, UAVs, mobile legged robots etc.) that together comprise the ORCA Hub system for asset certification and management [7]. The Limpet is equipped with nine exteroceptive sensors: temperature, pressure, humidity, optical, distance, sound, magnetic field, accelerometer and gyroscope. The total cost of the electronic components used in the design of the Limpet is approx.   Figure 5 shows a screenshot of the GUI written in Python 2.7 to be used at the gateway node. It controls the acoustic Nanomodem via the serial port interface using a USB-RS232 adapter. The "Start sensing" button initiates the TDA-MAC protocol, which starts by pinging every sensor node sequentially and noting the measured propagation delays. It then proceeds to send the TDI packet to  Figure 6: Evologics SONOBOT -autonomous surface vehicle with the gateway node (repurposed SNv1a) attached to it every sensor node which contains the delay value that the given node has to wait before transmitting data as shown in Figure 2. When it receives a data packet from any sensor node, it displays its contents in the corresponding text panel. For example, in Figure 5 it is gathering data from three sensor nodes -one LSN and two SNv2. The first sensor node is cycling through the different sensor types available on the Limpet, while the other two nodes only have a temperature and pressure sensor available.

Gateway Node
This gateway node software was executed both directly on a PC/laptop for initial tests, and remotely on a repurposed Raspberry Pi based sensor node (SNv1a) mounted on the Evologics SONOBOT surface vehicle as shown in Figure 6. Since the SONOBOT vehicle was equipped with a Wi-Fi access point, it allowed us to connect to the Raspberry Pi computer using a Wi-FI repeater on the pier and run the gateway node software via SSH.

UASN EXPERIMENT RESULTS
In this section, we discuss the examples of successful deployment of the initial USMART sensor network prototype described in Section 3. Table 2 summarises the setup of the two experiments reported in this section.   Table 2 readings using a modified broadcast REQ packet structure, which included a sensor type field. This was due to the limited payload length of the current Nanomodem packet structure (7 bytes). In future versions of the USMART sensor nodes, many types of sensor readings will be integrated into a single data packet if needed. Both Nanomodems were submerged several metres underwater, while Node 2 sensor payload was attached to the pier above water and Node 1 was attached to a pulley for adjustable depth. This enabled us to test the sensors in a live TDA-MAC trial by submerging Node 1 approx. 2 m underwater to observe the changes in pressure and temperature above and below the surface. Despite some packet loss, in particular when Node 1 was submerged deeper and the acoustic Nanomodem was close to sea bottom, most of the sensor data was successfully delivered to the gateway node via TDA-MAC to monitor the changes in pressure and temperature in real-time. Figure 7b shows the results from Experiment #2 from Table 2, a similar experiment but with three sensor nodes. In this case the majority of the packets were also successfully delivered to the gateway node. The plot includes only 3 pressure and temperature sensor readings from Node 1, because this was the Limpet sensor node which cycled through all the different sensors it integrated in addition to temperature and pressure as described in Subsection 3.3. The live GUI output from this experiment is shown in Figure 5, where the gateway node was receiving many different types of sensor readings from Node 1, while the other two nodes were alternating between pressure and temperature. Table 3 summarizes the network performance at the MAC level in the two sea experiments discussed in the previous subsection. 20% of the sensor data packets were lost in Experiment #1, and 10% in Experiment #2. Packet loss occurred due to several factors such as:

Throughput and Packet Loss Performance
• obstructed signal paths and disturbance of the water column due to boat and ship traffic; • challenging multipath propagation with signal reflections from the harbour infrastructure and the sea bed; • collisions between data packets at the gateway node, and between data and REQ packets at sensor nodes due to errors in packet scheduling. However, 10/20% packet loss does not account for the overall loss in network throughput shown in Table 3. The raw bitrate of the Nanomodems is 40 bps as described in Subsection 3.1. Part of this channel capacity is occupied by the header and footer data, e.g. the synchronisation waveform, node address, CRC, etc. This leaves the channel capacity in terms of the data payload at approximately 27 bps, if the maximum packet length of 7 bytes is used.
The sensor network achieved the total throughput of 37% and 24% of the maximum 27 bps channel capacity, which is far lower than the near-optimal channel utilization of TDA-MAC achieved in simulation experiments in [15,16]. The factors that contributed to the throughput loss in the reported sea experiments, in addition to the packet loss, are the following (most to least significant): • The guard intervals between the scheduled packet slots were increased to 1 s in Experiment #1 and 3 s in Experiment #2 to accommodate for sporadic errors in packet timing; • The small number of nodes, compared with simulations, resulted in the increase in proportion of channel airtime used for control signalling, i.e. REQ packet for every 2/3 data transmissions, e.g. instead of 100 in simulations; • The data payload was 6 bytes which reduced the maximum channel capacity by ≈5%, compared with the 7-byte payload; The maximum achievable throughput of the TDA-MAC protocol was derived in [15]. For fixed length data packets and guard where γ max is the network throughput normalized by the channel capacity, T dp is the data packet duration, T rp is the REQ packet duration, τ p [n] is the propagation delay to the n th node, T g is the guard interval, and N is the number of sensor nodes. It shows that the increase in the guard interval T g and decrease in the number of nodes N have a direct negative impact on the maximum achievable network throughput of TDA-MAC. Although the high throughput capability of TDA-MAC was not fully exploited in the sea trials due to large guard intervals, these experiments provided valuable data that helped us identify practical considerations of the TDA-MAC protocol that needed to be addressed. In Section 5, we look more closely at the practical issues with TDA-MAC encountered in the sea trials and what actions we took to make the protocol more robust in real-world deployments.

PRACTICAL CONSIDERATIONS AND IMPROVEMENTS TO TDA-MAC
In addition to the two sea experiments reported in this paper, we tested our TDA-MAC protocol implementation in a large number of initial and intermediate experiments in the lab environment overair, in an anechoic water tank at Newcastle University, and in a large water tank and Loch Linnhe at the Underwater Centre in Fort William, UK. During these experiments we discovered several issues which provide additional challenges for TDA-MAC in practical deployments, compared with theory and simulations. Table 4 lists all of the practical considerations that came to light during these trials, strategies to overcome them and modifications we made to the original version of TDA-MAC proposed in [15] and described in Section 2. First, the network discovery and setup stage requires additional robustness features due to occasional loss of ping packets used for ranging and TDI control packets used to instruct the nodes about their individual transmit delays, the single parameter per sensor node which achieves TDA-MAC scheduling. The first simple modification we made to TDA-MAC was to introduce several attempts at a successful ping exchange with every sensor node to establish a connection and measure the link propagation delay (actions 1, 2 in Table 4). For example, if the gateway node did not receive a ping response from a sensor node, it waits for a timeout period, e.g. 3 seconds, and retransmits the ping packet. If it fails to receive a ping response after 5 successive attempts, it is highly unlikely that it has a usable link with this node; therefore the latter has to be connected via multi-hop links, if multi-hop networking functionality designed in [16] is available.
The original TDA-MAC design involves the gateway node transmitting TDI packets in the "packet train" manner to every sensor node to streamline the network setup stage and make the protocol insensitive to long propagation delays by avoiding bi-directional communication at this stage. However, in practice the loss of a TDI packet at the sensor node results in significant disruption in the subsequent data gathering stage. For example, in one of the initial experiments, one of the sensor nodes failed to receive the  [16].
TDI packet from the gateway node; as a result, when it received the subsequent REQ packets asking it to send its data, it did not know what its individually assigned transmit delay was, and instead transmitted its data with the default delay of zero, thus causing persistent packet collisions with other sensor nodes. This has prompted further modifications to TDA-MAC (3-6 in Table 4), which crucially incorporate TDI acknowledgement packets from the sensor nodes, and a link activation process whereby only the sensor nodes that received a valid TDI packet are allowed to transmit to the gateway node. These updates are depicted in Figure 8. Despite establishing a more robust TDA-MAC network discovery and setup stage, as described above, there are still many factors in Node 2 link: "active" Node 3 link: "inactive" Node 2 link: "inactive" Figure 8: A modified TDA-MAC network setup stage, robust to control packet loss, incorporates TDI ACK packets and link activation triggered by TDI packet reception a practical deployment that result in the errors in packet timing which, if greater than the guard interval between consecutive packet slots, cause collisions. In our TDA-MAC sea trials the following implementation issues gave rise to packet collisions: • Sensor reading delays: it can take up to 750 ms to get a reading from the DS18B20 sensor [9], whereas the MS5837-30BA sensor returns the readings near-instantly [5]. • Signal processing delays: in many cases, in particular on lower cost nodes, there will be a delay between the end of an acoustic reception and the moment when the packet is decoded and passed to the higher layer. • Software crashes, e.g. serial/UART port issues, resulted in inaccurate detection of the REQ packet arrival times, which in turn caused scheduling errors of the data packets. • Different sensor node hardware incurred different software execution time and delay function precision, e.g. the less powerful microcontroller based sensor node (SNv1b) consistently transmitted its readings approx. 1 second late, because its software execution time and the delay function precision of 1 second (as opposed to 1 microsecond on Raspberry Pi) were initially unaccounted for. • Packet collisions are also possible due to significant changes in node positions and an insufficient guard interval to compensate for them. In these cases, re-estimating the propagation delays and sending updated TDI packets is required. Store transmit delay, mark link as "active" 6: Send ACK to gateway node 7: end if 8: if REQ packet received from gateway node then 9: if link is marked "active" and REQ is addressed to this node then 10: Note precise time of REQ arrival 11: Take sensor readings, and note the sensor reading delay 12: Schedule packet transmission with allocated delay 13: end if 14: end if Accurate local timing of the received REQ packets and data transmissions at sensor nodes is crucial in avoiding scheduling errors due to practical factors such as those listed above. Some of these issues were alleviated by further modifications to the TDA-MAC protocol. For example, enforcing a minimum transmit delay, e.g. 1 s instead of zero, allows the sensor reading, signal processing and software execution delays to occur without a negative effect on scheduling. There is also scope for modifying the REQ packet structure to include useful content, e.g. addressing particular nodes rather than always broadcasting, and including corrections to TDIs for some of the nodes. Other issues we discussed above were specific to our implementation, and can be solved by a more precise, lower level implementation of the protocol, compared with the prototype presented in this paper, e.g. using GPIO interface and interrupt routines to accurately detect packet start and end times.
Algorithm 2 summarizes all the key changes to the TDA-MAC implementation at the sensor nodes discussed in this section. It highlights the new features designed to increase the robustness of TDA-MAC in practical deployments in blue italic text, and can be directly compared with the original TDA-MAC protocol implementation in Algorithm 1.

CONCLUSIONS AND FURTHER WORK
The sea trials discussed in this paper demonstrated the first ever implementation of the TDA-MAC protocol in practice, and the first test prototype of the USMART low cost underwater sensor network. We showed a successful application of TDA-MAC based underwater acoustic networking to remote environmental monitoring, integrating a range of different sensor nodes developed by the universities of Heriot-Watt, York, Newcastle and Edinburgh.
Furthermore, the experiments we performed during these sea trials have revealed a number of practical challenges that were not addressed during the development of the TDA-MAC protocol in theory and simulations. These practical issues prompted several crucial modifications to the TDA-MAC protocol to make it robust in real-world deployments. We presented the details of the updated network setup stage, and a list of modifications and troubleshooting actions required for successful TDA-MAC data gathering.
The initial USMART network prototype and the lessons learned from the sea trials reported in this paper form a solid foundation for further work on the development of TDA-MAC based UASNs, including larger networks with more sensor nodes, and the development of multi-hop functionality, such as that proposed in [16].