An efﬁcient MAC protocol design for adaptive compressed sensing based underwater WSNs

Underwater wireless sensor networks (UWSNs) has become one of the most effective way for underwater exploitation and realtime sensing. Unfortunately, there are many challenges for the UWSNs to cope with, the energy limitation for the sensor nodes, the demand for short data latency and also the packets loss in wireless transmission. In order to solve the mentioned problems, the EMAC-ACS protocol, an adaptive compressive sensing based efﬁcient medium access control protocol is designed to maximise the bandwidth utilisation. First, a feedback compressive sensing structure is designed for sensor nodes to compress the sampling data. Second, a time divide multiplex access based superframe structure is designed to support the medium access control protocol. Third, considering the energy consumption minimisation, an optimisation problem is formulated to obtain the optimal time slots number and length. Fourth, considering the compression sensing method and packets loss, the slot allocation algorithm is designed to maximise the bandwidth utility. Finally, simulations show that the proposed method perform better than most of the state-of-art protocols and also a testbed is built up to shown that the battery life can be prolonged for 11%.


INTRODUCTION
Underwater wireless sensor networks (UWSNs) emerge as an effective way for underwater exploitation and realtime sensing with the rapid development of acoustic communication and signal processing technologies. Also, the development of high performance devices or computers make themselves have powerful computation ability and the devices is capable to be the coordinators [1]. These coordinators or edge computing devices cannot only do with the heavy computing burden but also work as the aggregator in a network to assemble the sampled data in a UWSN. In UWSNs, the limited energy consumption is a great challenge [2]. The data rates of some sensing nodes in a UWSN is very large compared with the bandwidth of the underwater network, which is bound to bring enormous pressure on the network if the original information are delivered without any compression. Therefore, data compression can greatly reduce the amount of data for transmission, it is possible to effectively address network congestion and save bandwidth. Such methods can significantly reduce the workload of the hydroacoustic transducers, thereby reducing the energy consumption On the other hand, considering the limited computing performance and storage capacity of the sensing node itself, the computation complexity of compression method must be low and energy-saving for the easy implementation on the sensor nodes. Moreover, the underwater communication will confront many complicated challenges, such as path loss, noise and multipath effect. The packet loss will occur frequently and will change dramatically. Compressive Sensing method is an effective way to deal with the problem [3]. First, compressive sensing can compress the structural sparse data with little computation burden, which is advantage for the miniature sensor nodes and large proportion of calculation process transfers to the coordinators or edge computing devices, which are powerful in both calculating and energy. Second, the sampling and compressing processes are executed at the same time with random procedure. If the packets loss occurs, which is common for UWSNs, the coordinators can control the sensor nodes to sample more data and solve the original data without any information loss. These two advantages makes compressive sensing a practicable method and widely used in UWSNs. Furthermore, the adaptive compressive sensing is more precise to control the recovery quality and proved to be a relatively more IET Commun. 2021; 1-10. wileyonlinelibrary.com/iet-com efficient way to promote the performance of data compression ratio and prolong the survival time.
After the sampled data are compressed, they are required to be transmitted to the coordinator through the underwater channel. In the UWSNs, there are some compressive sensing based sensor nodes (compressive sensor nodes, which include the high data rate sensors such as the underwater image sensors) and some other sensor nodes (non-compressive sensor nodes, which include the low data rate sensors such as the depth and water temperature sensors). All the sensor nodes have to transmit the sampled data to the coordinator in the same network. At present the structure of the UWSNs is statics and simple to reduce the energy consumption. Generally, a star type topology and the time divide multiplex access (TDMA) protocol are selected [4], which is because the star route topology is the most simple one and the TDMA meets less conflict compared with the carrier sense multiple access (CSMA) mechanism. In the TDMA structure, the medium access control (MAC) protocol is designed based on superframe. Superframe is an entity of the transmission protocol, which can synchronise the nodes in the network and allocate time slots to the sensor nodes. All the sensor nodes request and receive when and how long they can occupy the channel and switch to sleep mode if no transmission is needed. This structure is more effective way for saving energy.
Focusing on the energy efficient request in UWSNs, based on the compressive sensing method the EMAC-ACS (efficient MAC protocol design for adaptive compressed sensing) is proposed to meet the following goals: • In the feedback UWSN structure, based on the adaptive compressive sensing method a feedback structure is designed to collect data from both the compressive sensor nodes and non-compressive sensing nodes. • Superframe based MAC protocol is designed to minimise the energy consumption per bit according to the designed UWSN. An optimisation problem is setup to solve the parameters of the superframe to satisfy both data latency and recovery quality request. • Considering the compression sensing method and packets loss, the slot allocation algorithm is designed to maximise the bandwidth utility. Also a testbed is built up to verify the effectiveness of the protocol.
The rest of the paper is organised as follows. Section 2 describes related works and conclude our contributions. Section 3 describes the compressive sensing and the challenge to be solved. In Sections 4 and 5, the system model is introduced and the designed protocol is illustrated in detail. Section 6 is the performance simulations and testbed experiments. Finally, Section 7 concludes this paper.

RELATED WORKS
The application of the adaptive compressive sensing method is a hot topic at present [5][6][7], especially in UWSNs [8][9][10]. [11] proposed a low-cost, battery-operated technology for acoustic communication to enable long-term monitoring applications base on compressive sensing framework. Some researchers designed a feedback structure for image signal sampling using compressive sensing method, which could satisfy both energy efficiency and recovery quality request when the frequency bandwidth is sampled finely enough [12]. Furthermore, an compressive sensing based algorithm that could process underwater video sequences detection and tracking using light absorbance in conjunction is proposed for high precision identification [13].
Other researchers [14] concerned more with compressive sensing with more complicated estimation methods, for example, the big sensor data preprocessing (BSDP) scheme, which was also a feasible way for data sparsity modelling in compressive sensing system. The author of this paper also researched on this area and published relative papers on this topic. [15] invented the close loop compressive sensing structure in UWSNs, which could reduce feedback load and enhance the sum throughput at low feedback rates. Furthermore, based on the feedback structure more precise model and recovery algorithm were designed to promote the effectiveness of the system and deal with some more tough conditions, e.g. bad wireless channel [16]. In this paper, the system structure is selected as a basic entity for the proposed MAC protocol. The energy efficiency based MAC protocol design is also widely researched by scholars all over the world, in which the TDMA based mechanism is one of the most popular topics. [17] developed a Bellman-Ford based non-slotted MAC protocol, which could calculate the statistical frame of the MAC protocol and seek formal validation of several relevant properties. [18] introduced a cluster-based MAC protocol for collision avoidance, which allowed nodes to transmit at the same time as long as their packets arrive during different times at the intended destinations. [19] designed a TDA-MAC protocol, which could closely match the throughput and packet delay performance without the need for centralised clock synchronisation. [4] developed a dynamic and flexible spatial reuse strategy and formulate the interference scenario as a dynamic interference-free graph according to the nodes' current position distribution and a preset interference-free threshold. [20] considered both protocol interference model and physical interference model by taking both propagation delay and underwater channel impairments into account. Also based on compressive sensing if packets are lost during transmission, the retransmission scheme and the recovery quality should be guaranteed first. In this paper, the successful transmission performance of the system is promoted.

Preliminaries
Compressive Sensing is an effective way for data compressing in UWSNs. If one sensor samples one dimensional vector X ∈ ℝ N , which can be represented by orthogonal basis matrix Ψ ∈ ℝ N ×N : The compressive sensing theory takes linear measurements of a K -sparse signal through randomised projections. The signal X can be compressed by: Then the signal X can be reconstructed from Y compressed measurements, where M = O(K logN ). Then the recovery of X with Y can be calculated from: The recovery can be achieved by iteration method or solving a convex optimisation problem. Using the compressive sensing method, only the length of Y compressed samples needs to be transmitted to the coordinator and the signal reconstruction will be accomplished there. The reconstruction is managed by solving the optimisation problem Equation (3). The computational complexity of the construction accounts for the largest proportion, while it is processed at the coordinator which is assumed to be more powerful and energy sufficient. The measurement matrix can be preloaded in both the coordinator and the sensor node before deployments. For UWSNs, some sensing signals are sparse in given domain [6], such as, image, sound and continuous signals. When we take advantage of CS method to compress such signals, the reconstruction accuracy can be guaranteed once the number of compressed measurements is sufficient.

Problems formulation
In UWSNs all the sensor nodes are required to transmit sampled data to the coordinator within the time limited threshold, especially the high sampling rate data. Furthermore, the situation will become more complicated if the compressive sensing method is used and the packet loss rate is taken into consideration. The compressive sensing leads to variable packet length because of the variation of data sparsity. The data are required to be retransmitted if packet loss occurs, which will make time latency more unpredictable.

Variable packet length
The sparsity of sensors differs dramatically. Also, the data sparsity will change according to different sensors and different time. As the adaptive Compressive Sensing method can adjust compression ratio according to the reconstruction error, the length of compression data and also the length of transmission packet varies significantly. It will impact the efficiency for the

Unpredictable time latency
Time latency is strictly limited in UWSNs because of the requirement for the realtime monitoring and exploration. In a feedback transmission structure, the packets loss can be detected and the retransmission of the packets will prolong the time latency and make the time latency unpredictable. What is worse, as the transmitting power is low in UWSNs, however, the interferences are powerful.

System structure
The UWSNs transmission system structure is as shown in Figure 1. The compressive sensor node, e.g. the image sensor, samples and compressed original data and transmits to the coordinator through the wireless channel. The non-compressive sensor node, e.g. temperature sensor, samples data and transmit directly, which is because the compression progress will cost more energy for the low data rate sensors. The coordinator receives the compressed data and recover the data with recovery module. The compressive sensor node contains the sparsity module and sample & compress module. The sparsity module works as Equation (1) and the sample & compress module works as Equation (2). After sampling and compressing the raw data, the compression sensor Node sends the compression data and control data (marker of the compression data and the seed for the generation of the compression matrix Φ). Also, some data for estimating the recovery error is transmitted along with the control data. The normal sensor node contains only the sample module. The coordinator contains recovery module and feedback module. The recovery module works as Equation (3). The feedback module work as Equation (4): where M is the dimension of sampling matrix Φ of the next X . M F is calculated by the feedback module. PLR is the packet loss rate. The coordinator can calculate the recovered data from the compressive sensor node and also can receive the original data from all the normal sensor nodes. After that, the coordinator estimates the recovery quality and wireless channel status to help adjust the sample rate for the compressive sensing node. The lengths of the data received from the compressive sensor node are different because of different sample rate. The lengths of the data received from one normal sensor node are the same.

Network model
Assume that a UWSN is consisted of A compressive sensor nodes, which introduce compressive sensing method to reduce the signal dimension (such as image etc.), B non-compressive sensor nodes and a coordinator. Define set G 1 and G 2 , if i use compressive sensing method, i ∈ G 1 , otherwise i ∈ G 2 . The coordinator device serves as a coordinate in the network system, it is powerful and have abundant energy reserves, so the energy consumption should be leveraged to as much as possible on the coordinator in order to reduce the energy cost of sensor nodes in charge of signal acquisition.

Superframe structure
The coordinator and sensor nodes constructs the network with a star topology, the beacon enabled frames are used to control and coordinate information exchange for all nodes. Frame structure is as shown in Figure 2. The coordinator transmits beacons periodically to notify all the sensor nodes that need to transfer data in the current round of the superframe. The beacons signify the beginning of a new superframe, which convey information of assigned time slots and the order number. The superframe designed in this paper is comprised of two phases: (1) Beacon phase: At the beginning of each superframe, the coordinator broadcasts a beacon, which carries information of allocated time slots to nodes. The beacon is used to coordinate communication between the coordinator and each node during data transmission period, while completing clock synchronisation. All nodes that require to transmit data must turn on tranducing module to receive beacon when a new superframe is coming. If the nodes do not need to transmit, they can keep sleeping. (2) Data transfer phase: This phase is made up of fixed length slots and is used for communication between the coordinator and nodes. In each time slot, only one sensor node is allowed to transmit in TDMA mode, wherein the communication includes the uplink data frame and downlink response frame. All nodes are informed of allocated slots and transmission order after reception of the beacon. In the specified transmission slots, the node sends data packet to the coordinator and receives response frame subsequently from the coordinator . The nodes turn off radios within the time outside the allocated slots.

Energy cost model
For the miniature sensor nodes with limited functionality, the introduction of compressive sensing method will increase its energy cost, which can be regarded as the energy consumption of compressive sensing block. The energy cost of computation in compressive sensing block is mainly caused by the calculation operations between measurement matrix and the original signal. The sparse transformation process of a N-dimensional signal is the product of multiplication between the input vector and the sparse matrix. The operations include read, write and N 2 times of addition and multiplication, the energy consumption of which is: where rd , pl , mu and wr are energy cost of read operation, addition calculation, multiplication calculation and write operation.
When the original signal is transformed by N -dimensional sparse basis, a sparse signal is obtained. The measurement matrix will project the sparse signal onto a low M-dimensional signal, The computation contains read, write and MN times of addition and multiplication, the energy consumption is: If the measurement matrix is a Bernoulli matrix and the elements are random number with value of only 1 or −1 [21], the calculation can be reduced to only MN additions, the energy consumption is reduced accordingly: As a consequence, the total energy cost of the compressive sensing block e cpt is: If the compression ratio is C , then the total energy consumption of the compressive sensing block in a sensor node is: Define u as the transmission rate , L b , L d , L h and L ack are bits of beacon frame, data payload, protocol overhead and acknowledgment packet respectively. Each superframe contains N s slots, T s is the length of a slot and T f is the superframe duration. Let f i be the sampling rate of node i, B i is quantisation resolution. Denote D i as the worst case delay constraint of node i.
As mentioned above, every sensor node judges whether to wake up and receive the beacon before every superframe. The factor a i is introduced: When a node yet fill a slot even if it has violated the delay constraint D i , i.e. L d < s i D i , node i will not be able to fully utilise a slot, so another factor b i is defined: According to the parameters described above, in a duration of t , the total energy consumption brought by compressive sensing block is: The lower bound of energy consumption by all the sensor nodes that receive beacon frames is: And the lower bound of the total energy consumption in the data transmission phase can be formulated as:

Optimisation formulation
The total energy consumption of the network system is calculated by: For each sensor node, the largest number of superframes that can be crossed when it stays in sleep state is: Based on the above descriptions, the following optimisation problem can be obtained with constraints of delay and throughput in which the valid data bits can be transmitted in a slot L d and compression ratio C i . The optimisation problem can be formulated as follows: T f = N s T s (8) The objective of this optimisation is to minimise the total energy consumption, which is the sum of calculation energy E cs , beacon transmission energy E b and data transmission energy E c . Equation (6) indicates that the network throughput must surpass the sum of all the data rate, otherwise it will lead to congestion and system instability. The value of N s is the bound for slot allocation. As analysed before, b i s i T f L d is the time slot requirement for each compressive sensor node and N s is the number of the time slots in one superframe, which is required to be optimised. Equation (7) indicates the composition of one time slot, which contains the data pack, head and acknowledgment pack (overhead data) and also the guard time. Equation (8) indicates the composition of the whole superframe, which contains N s time slot and the period of one time slot is T s , in which T s and N s define the length of T f . Equation (9) guarantees that all nodes can meet the worst case delay constraint. Equation (10) guarantees that the compressive sensor node can maintain the recovery quality of the original data.
Given a certain network structure, by solving the optimisation function (5), the optimised N s and T s can be calculated and then the length of the superframe T f can be obtained. When N s increases, the bandwidth utility decreases and the allocation scheme will be more flexible. When T s increases, the bandwidth utility increases and the time delay will increase. Both the two parameters will affect the structure of the superframe and change the energy efficiency. So the design of the superframe is obtained. This optimisation problem is a linear program, which can be solved by a linear program method. This optimisation problem is calculated offline and the optimised N s and T s can be obtained.

Object formulation
According to the optimised time slot length and superframe length, the coordinator needs to decide the orders and allocations of the time slots that is arranged to sensor nodes. Then the impacts of packet loss rate and the compressive sensing method is taken into consideration. Assume that the coordinator knows data arrival rate and delay constraint of all the sensor nodes. In the same superframe, if the number of slots allocated to a node is more than one, then assume that these time slots are consecutive, and the sensors can decide which data packet to be transmitted in each slot. Each sensor node can only send data that is generated before the its first allocated time slot.
Define T i,k as the number of superframe sequence when sensor node i obtains its k-th transmission opportunity. The following factor is introduced: where i (k, j ) = 1 indicates that the kth transmission of node i occurs in the j th superframe. Define t i (k) as the number of slots that node i has to wait before beginning its kth transmission, t i (0) = 0. Let L i,k (l ) be the order of allocated slots to node i.
Denote Ω i, j as the actual time that the node need to transmit data, N i,k as the number of allocated slots. Let i (k) represent the actual number of crossed superframes by node i. A markov model proposed by the IEEE UWSNs Task Group [22] for UWSNs has been shown to be effective in characterising UWSNs channel dynamics [23]. For simplicity, we use the Gilbert channel model, namely a link status can be only "good" or "bad" state, respectively represent transmission success or failure. Define p b and p w as the transition probabilities between the good and bad state, p b denotes the probability to transmit successfully in a slot from the failure of the previous slot, and vice versa for p w . So the Markov transition probability matrix A can be described as: Assume probability of the link status between the coordinator and the sensor node in the "good" state is p(0) at the begin-ning of the superframe, then the probability of the link state that is "good" after n slots can be calculated as Equation (13): (13) where P = p b + p w , p(0) = 1 means the primary link state is "good", and vice versa for p(0) = 0.
According to the above, to optimise the bandwidth utilisation, the following problem formulation can be obtained: The variables in this problem are i (k, j ), N i, j and L i,k , The objective function is to maximise the bandwidth utilisation of each slots, as shown in Equation (14), in which the numerator is the used time slot of the transmission period and the denominator is all the time slot. Equations (15) and (17) indicate the nodes that use CS method need to wait for enough time to produce enough original signal dimension N and Equation (16) is the transition for the Equation (17). Equation (18) represents the required time for transmission for all the time slot. Equation (19) represents the number of actually allocated slots to nodes, which is no less than the real needed time slot. Equation (20) is the limitation for the total slot time number, which is no more than the N s . This optimisation problem is not a linear program, which cannot be solved by a linear program method. An exhaustive method is designed to solve this problem online.

Protocol design
For the above problems, the exhaustive method can be used to cope with it, but the complexity will reach O(N !). Therefore, we present a heuristic algorithm in this paper to solve the problem of slot allocation. As a consequence, the nodes of "good" initial state should be arranged to transmit as soon as possible, meanwhile postpone the transmission of the nodes that have "bad" link conditions. In the light of the above descriptions, we propose the following heuristic algorithm, as shown in Algorithm 1.
Since the initial link condition of each node varies, the allocated slots to them will influence the probability of successful transmission. According to the variation disciplines of channel state, we should allocate slots in prophase of a superframe to the nodes that have a "good" primary state. Meanwhile, the nodes of "bad" states will be postponed to transmit by waiting for a possible better link condition. On the other hand, the data rate of each node will determine how much data be accumulated in the buffer before transmission. It is known that the later transmission of a node, the more data is accumulated. Thus, we expect the node with largest data rate to be the latest one to transmit in order to obtain the maximum valid data within a superframe. Algorithm 1 shows the details. First, ensuring that all nodes can meet the worst case delay constraints that can be crossed Δ i by each sensor node within T fm . Second, divide the nodes into two subsets based on the primary channel states at the beginning of a new superframe: subset S 1 of nodes with "good" initial link conditions and subset S 2 of nodes with "bad" conditions. All the nodes in S 1 should be arranged for transmission before the nodes in S 2 . Third, determine the transmission order of nodes L i,k in S 1 and S 2 based on the data arrival rate of each node, the node of the larger rate get the more backward opportunity of transmission, compute the number of slots N i, j required by nodes in each subset in accordance with this order. Finally, remove the nodes that does not reach the maximum number of crossed superframes Δ i in an ascending order according to the data rates if the calculated total number of slots exceeds the constrained maximum number of slots, then calculate again until the constraint is satisfied. Ultimately determine the transmission order and occupied slot number of the nodes that get the transmission opportunities.
It is known from the Algorithm 1 that for the proposed algorithm there are no complicated computation and the only operations are grouping and sorting by comparing with some thresholds, which is convenient and time-saving to run. How-  ever, the slots allocated to a node will change based on the transmission order. A possible case is that a node accumulating too much data will lead to an additionally allocated slot, which causes a lower slot utilisation.

Simulation setup
In this section, the following performance metrics are introduced: (1) Bandwidth utilisation: Bandwidth utilisation is defined as the ratio of the time required for transmission and the whole allocated time slots to the sensor. Bandwidth utilisation is an important metric to characterise network energy consumption. (2) Energy per bit (EPB): Energy per bit is the energy required to transmit one bit, which is obtained by computing the ratio of total energy consumption and all transmitted bits. The metric reflects the energy efficiency of the network system. (3) Data loss rate: Packet loss rate is defined as the ratio of transmission failures from nodes to the coordinator [24]. In this simulation, we consider the packet loss rate under the channel dynamics of a Markov model. Assume the network system contains six kinds of nodes, in which the image node uses compressive sensing method, the system parameters are shown in Tables 1 and 2. There are three protocols are selected to be compared with the proposed protocol. The computation oriented scheme directly divides the sensor nodes into high, middle and low priority and the allocation scheme is base on the priority. Delay oriented scheme is that the coordinator allocate the time slot to those whose data latency is ready to the upbound [25,26]. In low duty cycle scheme, all sensor nodes are requesting time slots in every superframe, which may have the minimal time latency of the system.

Simulation results
In the simulation results, the performance of the proposed algorithm is compared with the former three schemes. Figure 3 shows that the energy per bit of our algorithm is lower than the other schemes, which means the proposed protocol can send more data under the same circumstance with the same energy consumption. Furthermore, when the parameter N increases from 6 to 8, the EPB of the proposed method will decrease because more time slot will make the transmission scheduling much easier and the duty cycle of the superframe will be lower. The delay oriented has the second lowest EPB because it sleep for most time slot and the guard time will decrease the EPB while N increases.
In Figure 4, the proposed algorithm can make nodes more fully utilise the assigned slots, and with the increase of given number of slots, the slot utilisation is much better than the low duty cycle protocol. When the nodes number is low (6-7), which is because the algorithm cannot calculate an optimised result if there are not enough data for most of the time slot. When Time delay rate the number is more than 8, the time slot will be full and the bandwidth utilisation will be high.
On the other hand, Figure 5 shows the successful transmission probability improves, the data loss rate declines, since the nodes that have "good" link conditions are arranged to transmit during the beacon phase of the superframe. The proposed method can arrange the data loss rate because the model of wireless channel. Also, the delay oriented method can have good performance because it can retransmission before delay limitation. Figure 6 is the time latency simulations. As the proposed protocol focused on the energy efficiency and the duty cycle is relatively low. So the time latency is supposed to be larger than the other protocols. Furthermore, the image sensor nodes take large portion of the data and the whole time latency is not outstanding. Figure 7 shows the compressive sensor node for image sampling. The main processor of the sensor is a DSP microchip.

Testbed Built and Experiments
The sensor node can sample image data and compress and then transmit to the coordinator in its time slots. The coordinator is selected as an edge computing device, which can recover the image data and receive other underwater sensor data. The sparsity and sample and compress module are running on the sensor  node. The recovery and feedback module are running on the coordinator. The feedback module collect the recovery data and compute the sample rate for the next frame [27]. The sensor node is provided with a 200 mAh Li-on battery. After a 9-month experiments on the battery life, the results is shown as follows in Table 3. The experiments show that the proposed protocol can perform better than the other compared method. The average battery life can be prolonged for 11%. To be mentioned that when the packet loss rate becomes higher, the proposed method will not consume correspondingly more energy, which is because the retransmission scheme designed in EMAC-ACS.

CONCLUSION
In this paper an adaptive compressive sensing based MAC protocol is designed to optimise the energy efficiency and bandwidth utilisation. In the feedback UWSN structure, based on the adaptive compressive sensing method a TDMA mechanism is designed to collect data from both the compressive sensor nodes and non-compressive sensing nodes in the UWSN. Superframe based MAC protocol is designed to minimise the energy consumption per bit according to the designed UWSN. An optimisation problem is setup to solve the parameters of the superframe to satisfy both data latency and recovery quality request. Considering the compression sensing method and packets loss, the slot allocation algorithm is designed to maximise the bandwidth utility. Also a testbed is built up to verify the effectiveness of the protocol. As the slot length is optimised to be fixed in this paper, we will research the slot allocation scheme of variable length in the future work.