Cognitive Routing in Software-Deﬁned Underwater Acoustic Networks

: There are two different types of primary users (natural acoustic and artiﬁcial acoustic), and there is a long propagation delay for acoustic links in underwater cognitive acoustic networks (UCANs). Thus, the selection of a stable route is one of the key design factors for improving overall network stability, thereby reducing end-to-end delay. Software-deﬁned networking (SDN) is a novel approach that improves network intelligence. To this end, we propose a novel SDN-based routing protocol for UCANs in order to ﬁnd a stable route between source and destination. A main controller is placed in a surface buoy that is responsible for the global view of the network, whereas local controllers are placed in different autonomous underwater vehicles (AUVs) that are responsible for a localized view of the network. The AUVs have ﬁxed trajectories, and sensor nodes within transmission range of the AUVs serve as gateways to relay the gathered information to the controllers. This is an SDN-based underwater communications scheme whereby two nodes can only communicate when they have a consensus about a common idle channel. To evaluate our proposed scheme, we perform extensive simulations and improve network performance in terms of end-to-end delay, delivery ratio, and overhead.


Introduction
The underwater acoustic network (UAN) is a form of advanced technology that allows the communication among different acoustic users to deal with various applications that cover ranges from the depths of the ocean to its surface. Underwater communications systems have gained much attention due to increased demand by offshore industries for these applications. The communications systems include both natural acoustic systems (e.g., marine mammals) and artificial acoustic systems (e.g., sonar systems). Due to the high attenuation of radio/optical waves in water, the only reliable medium for communications in the ocean is acoustic waves [1]. Therefore, both natural and artificial acoustic systems rely on acoustic waves for communications. Moreover, the unique challenges of the underwater environment (e.g., severe path loss, limited bandwidth, long propagation delay) make it highly complicated for these networks to establish a stable route with an efficient routing scheme. In addition, among the unique challenges in the underwater environment, spectrum scarcity is a critical issue in this research area, and this needs to be addressed for safe and stable communications.
Due to the limited spectrum (between 1 and 40 KHz [2]), various acoustic users trigger high competition to utilize the spectrum resources efficiently. Therefore, safe and stable communications have become a great challenge in the underwater environment. To address these issues, a new technique is required that simultaneously considers spectrum sensing and routing for underwater networks. Cognitive acoustics (CA) was announced as a viable solution to resolve spectrum scarcity issues in underwater networks [3] because it can utilize the spectrum in an environmentally friendly manner (i.e., avoiding harmful interference with natural acoustic systems) and in an efficient manner (i.e., providing high spectrum utilization). For this purpose, a sensing technique is required to detect the presence/absence of the primary user (PU), thereby ensuring that PU activity is safeguarded. An acoustic link is only formed when two acoustic users reach a consensus about a common idle channel.
Several routing protocols have been proposed for underwater networks, but for cognitive underwater networks, the number of protocols that consider a cognitive capability with a routing technique is limited. Nevertheless, safe and stable communications issues for underwater cognitive acoustic networks (UCANs) are still under investigation in order to reach a robust and distinguished solution. Moreover, existing underwater networks are composed of thousands of nodes that are deployed to collect data in an area of interest in the ocean, thereby satisfying the requirements of a single application. Another issue in these networks is that due to application constraints and vendor dependency, it is difficult to use these nodes for other services in the same area [4]. To overcome the shortcomings with existing architectures in underwater networks, we intend to apply a new concept of software-defined networking (SDN) in this domain. SDN is an emerging technology that increases network intelligence by separating the control plane from the data plane [5]. SDN technology has been progressively diffused into different types of network systems, including UANs, in order to overcome the limitations in these networks [1,4,6]. It offers the flexibility to adapt and satisfy different applications.
Our main objective is to combine a cognitive capability with a routing technique in underwater networks by using the SDN approach. We intend to overcome the problems of spectrum scarcity and high latency in UCANs. Our goal is to select the best route between source and destination that maximizes the capacity and minimizes the duration among all the paths. Spectrum sensing is done with an orthogonal frequency division multiplexing (OFDM)-based energy detection scheme. The SDN controllers programmatically configure the traffic and have a global view of the network. Our proposed scheme has a single main controller (MC) and several local controllers (LCs). LCs are mobile autonomous underwater vehicles (AUVs) that have a localized view of the network. Sensor nodes send requests to LCs querying them for a route to the target node. The LC quickly responds to the request if it has a route to the destination; otherwise, it forwards the request to the MC.
The key contributions of this paper are as follows: i A novel technique, the cognitive acoustic software-defined underwater network (CA-SDUN), which ensures cognitive routing in underwater sensor networks based on a new concept for SDN, is proposed in order to find a stable route between source and destination. AUVs moving in fixed trajectories serve as local controllers. In this manner, the technique improves the spectrum opportunities and network stability for different users communicating with each other in the ocean. ii The SDN is applied for the first time using a combination of a cognitive capability and a routing technique in order to overcome the problems of limited services altogether due to application constraints, spectrum scarcity, and high latency.
The remainder of the paper is organized as follows. Related work is presented in Section 2. In Section 3, we propose a cognitive routing protocol for software-defined underwater acoustic networks. Section 4 discusses simulation performance results, while Section 5 concludes the paper.

Related Work
Routing in UCANs is challenging as compared to conventional routing protocols in UANs. Yan et al. [7] proposed depth-based routing (DBR) for underwater sensor networks to provide scalable and efficient services for dense networks. DBR is based on a greedy algorithm in which each sensor node makes a decision by comparing its own depth with the depth of the previous node.
The protocol achieved a 95% packet delivery ratio without considering recovery algorithms to bypass the connectivity voids. Pressure routing for underwater sensor networks [8] addressed the local maxima by maintaining a recovery route. In this algorithm, a route discovery method was provided that implements hop-limited two-dimensional (2D) flooding. To select a set of forwarding nodes that maximizes greedy progress and limits co-channel interference, an opportunistic routing mechanism and a dead-end recovery method were used. To bypass connectivity voids in a network, Noh et al. [9] proposed void-aware pressure routing (VAPR), a modified version of pressure routing, to ensure loop freedom for mobile networks. VAPR is a soft-state protocol that uses enhanced beaconing to propagate the data from sonobuoys to sensor nodes, and opportunistic directional data forwarding then builds a directional trail to the closest sonobuoy.
Pompili et al. [10] proposed two distributed geographic routing algorithms for delay-insensitive and delay-sensitive applications in underwater environments to investigate the problem of data gathering. They achieved high acoustic channel efficiency by limiting the error rate for each packet. The objective of these protocols was to minimize energy consumption by jointly selecting the best next hop, the optimal transmit power, and the best forward error correction (FEC) rate. The channel-aware routing protocol (CARP) [11] is another robust relay-selection mechanism to achieve high-throughput efficiency. The protocol exploits link quality information to route around connectivity voids and shadow zones. Yoon et al. [12] proposed an AUV-aided underwater routing protocol (AURP) to maximize the data delivery ratio and minimize the energy consumption of underwater sensor nodes. The scheme not only uses heterogeneous acoustic channels but also controls the mobility of the AUVs. This was the first protocol to employ multiple AUVs as relay nodes in a multi-hop underwater acoustic sensor network. Carlson et al. [13] designed a reactive, link-state mobile ad hoc network routing protocol-a form of location-aware source routing (LASR) that considers the characteristics of underwater acoustic networks. LASR uses the idea of dynamic source routing (DSR) for communications between AUVs. The protocol achieved greater reliability than both DSR and blind-flooding routing protocols.
The diagonal and vertical routing protocol (DVRP) [14] is another method proposed for underwater wireless sensor networks to improve throughput and to reduce network load by calculating a flooding zone. The protocol increases the reliability of the network by preventing flooding in the whole network. Coutinho et al. [15] proposed a geographic and opportunistic routing protocol with depth adjustment-based topology control for communication recovery (abbreviated as GEDAR) to improve the data packet delivery ratio in mobile underwater sensor networks. The protocol uses greedy opportunistic forwarding to route packets and to move void nodes to new depths in order to adjust the topology. Ilyas et al. [16] proposed an AUV-aided efficient data-gathering (AEDG) routing protocol for reliable data delivery in underwater sensor networks. AEDG employs an AUV for data collection from gateways; to associate sensor nodes with gateways, it uses a shortest path tree (SPT) algorithm. The protocol achieved better performance in terms of data gathering and energy consumption, even in harsh oceanic conditions. Rani and Talwar [17] proposed an energy-efficient chain-based routing protocol for data gathering in underwater sensor networks. The whole network topology is divided into subregions where a cluster head in each sub region is responsible for gathering and transmission of data to the next upper region. AUV-aided routing method integrated path planning (AA-RP) [18] integrated the AUV's dynamic path planning algorithms into the routing protocol. It utilized the cooperation of sensor nodes to reduce energy consumption by selecting gateway nodes (GNs) as agents of AUVs, which communicate with the AUVs when ordinary sensor nodes fail to make connections. The AUVs are mobile sink nodes that forward data from sensor nodes to the surface of the ocean.
None of these routing protocols for underwater sensor networks considered spectrum scarcity issues caused by limited communications frequencies. Proposing a cognitive routing protocol that takes the spectrum scarcity issue into account is essential in order to meet the increasing demands of underwater acoustic users. Luo et al. [19] proposed a novel medium access control (MAC) protocol, called dynamic control channel MAC (DCC-MAC), by investigating the congestion of control channel in a UCAN. The important feature of this protocol is that each node could adjust and extend the bandwidth of its control channel by flexibly selecting proper data channels. A receiver-initiated spectrum management (RISM) [20] system is another protocol proposed for UCANs. It allows acoustic users to efficiently and courteously utilize the spectrum with both natural acoustic systems and artificial acoustic systems. The system increases the overall data transmission rate by combining a collision avoidance mechanism with joint power and channel allocation. Its results showed better performance for both the tree topology and the partially connected mesh topology by integrating spectrum sensing at the physical layer with spectrum sharing at the medium access control layer. Li et al. [21] proposed a cognitive acoustic transmission scheme, called dolphin-aware data transmission (DAD-Tx) to achieve the optimal end-to-end throughput with dolphin awareness. The protocol achieved better performance by modeling the dolphins' activities and mathematically describing the dolphin-awareness as a probabilistic constraint. OFDM-based spectrum-aware routing (OSAR) [22] was proposed to combine cognitive capability with a routing technique in order to overcome the problems of spectrum scarcity and high latency in underwater cognitive networks.
Similarly, research in software-defined underwater networks is still very limited. SoftWater [23] was first introduced to facilitate such developments and to support a variety of applications for next-generation underwater sensor networks. With separation of the control and data planes, SoftWater provides a hardware infrastructure, software networking algorithms, heterogeneous underwater communications technologies, fault recovery schemes, and underwater mobility management. A software-defined network-based solution [4] was proposed to build an architecture for underwater networks in big data, which includes design of both the data plane and control plane. The study was supposed to maximize capacity, reduce management complexity, and provide technical support for underwater acoustic sensor networks. A new high data rate software-defined underwater acoustic networking platform, SEANet G2 (second generation) [24], was proposed to provide several benefits over existing underwater acoustic platforms. The study was designed to describe the hardware, software, and network architecture of the proposed platform. The design demonstrates data rates of 522 kbit/s achieved at sea over short horizontal links. Lal et al. [25] discussed and reviewed the state-of-the-art security threats for underwater networks along with their existing solutions. The study addressed main research challenges related to the cooperation of static and mobile nodes and presented future solutions based on software-defined cognitive networking with the support for cross-layering communications and context-aware networking. Consequently, combining cognitive principles with routing schemes to design an algorithm for cognitive acoustic software-defined underwater networks has not yet been considered. This is the first work implementing a cognitive routing protocol in an SDUN that simultaneously considers spectrum sensing and routing for underwater communications. A comparison of all schemes described in this section is given in Table 1. Table 1.

Proposed Cognitive Acoustic Software-Defined Underwater Network
We propose a cognitive routing protocol for software-defined underwater acoustic networks. The objective of this novel routing protocol is to overcome major issues in existing underwater communications that lead to network deterioration. This work combines a cognitive capability with a routing technique in underwater networks by using SDN as a new candidate to improve network performance and communications reliability. Taking advantage of SDN, we propose that the sensor nodes within the considered network be used for various services in the same area. This means that the sensor nodes working for one application collect information from their surroundings and send the gathered data to the controller. This logically centralized controller then performs data scheduling and network management to collect information of interest for any other application in order to take full advantage of the whole network. Our aim is to find a stable route between source and destination by jointly selecting the channel and relay node in an efficient and reliable manner.
A cognitive acoustic software-defined underwater network is shown in Figure 1, where a source node in the deep ocean is looking for a stable route to a destination far away from it at a different depth in the ocean. The CA-SDUN considers C different communicating nodes. A surface buoy serving as a main controller keeps global updated information on the network. The mobile AUVs (i.e., LCs) improve network reliability by sharing the burden of the single main controller. LCs move on fixed trajectories where the track is maintained by the MC. The sensor nodes, G, within transmission range of the LCs' track, serve as gateways between conventional sensor nodes, N, and the AUVs, and send information to all neighboring nodes as an extended beacon message. The nodes receiving the messages keep a record of these gateways in their flow tables. This is a four-layered hierarchical network scheme where the first two layers (MC and LCs) communicate directly with each other while gateways (the third layer) are used between sensor nodes (the fourth layer) and the AUVs, as shown in Figure 1. These gateways collect data from all neighboring nodes and store this information until passing it over to the LCs. The double-layering of controllers (MC and LCs) improves network performance in terms of delay and overhead. Both natural acoustic systems (e.g., marine mammals) and artificial acoustic systems (e.g., sonar systems) play the role of primary users (PUs), as shown in Figure 1. All sensor nodes periodically update their current network state with each other and send the gathered information to LCs (either directly or via gateways). All LCs share their localized view of the network with the MC, such that the MC establishes a global network view. The protocol has two phases: beaconing and route estimation. The beaconing phase establishes the global and localized network states for the MC and LCs, respectively, and updates all the sensor nodes with the current network state. In the route estimation phase, a querying node sends a route request message to an LC. On receiving the message, the LC checks its flow table to determine if it has an updated route to the destination. It quickly responds to the source node without contacting the MC if it finds the updated route in its flow table. In the following subsections, we will discuss each phase in depth.
1. Beaconing Phase: In the beaconing phase, all sensor nodes (either gateways or conventional nodes) send a beacon message to their neighbors. The beacon message includes node ID, depth, channel state, and speed. Channel state is the presence or absence of the primary user (PU), which will be explained in the next subsection. The MC sends a request message to the LCs in order to maintain the global network state. Each LC forwards this message to all the nodes within transmission range. By doing so, gateway nodes exchange the gathered data with the LCs, which forward it to the MC. The gateway nodes identify themselves as a gateway (an extra entity) in the beacon message. At the conclusion of this phase, all the communicating nodes in the network are aware of the updated network state. In this way, any querying node, whenever it comes across link fragility, can ask the controller for an updated stable route to a destination without sending the packet back to the source node. 2. Route Estimation Phase: When a source node wants to communicate with the destination node, it sends a request message to the controller. The foremost part of this cognitive routing scheme that makes it efficient is the estimation of path duration between source and destination. This is a challenging task for any source node in an underwater environment when one kind of PU includes marine mammals. To make it possible, we apply the SDN technique so that the controllers are responsible for providing the best stable route between source and destination by jointly selecting both channel and relay. We all know that the unpredicted movement of marine mammals makes the underwater environment more challenging, which results in several fragile links. For that reason, the two layers of controllers help the sensor nodes with the provision of stable links by keeping an updated network state. There are two possibilities for the source node: either it is outside the transmission range of an LC, or it is within transmission range of an LC.

Case 1: Source outside transmission range
The source node needs to find the best relay node to reach any gateway when it is outside the transmission range of any LC. The source sends a beacon message to all neighboring nodes and calculates the transmission delay for each node within transmission range. The source then selects the relay node that has the minimum transmission delay from among all the neighboring nodes. As in our previous work [22], the transmission delay (s) is calculated as follows: where i is the source node, j is any node among the N sensor nodes within transmission range of i, and ch shows a common idle channel from among M channels; L s is the packet size (bits); r ch ij is the data rate (bits/s) of link (i, j), defined as r ch is the capacity of the common idle channel between the two communicating nodes as assumed elsewhere [26], f h and f l are upper and lower frequencies of each channel, respectively, and S( f ) in dB re µ Pa is the power spectral density of the transmitted signal. If there is more than one common channel between two communicating nodes, then the querying node selects the one with highest data rate. GD ij is the propagation delay (s), defined as MC is the projection of distance D ij on the line connecting the source to the MC. One might think the MC is not the target of the source if an LC finds a route to the destination in its flow table. The reason for calculating this projection with respect to the MC is to minimize the transmission delay in reaching a controller in order to improve overall network performance. This will also reduce the number of hops by selecting the nodes farthest from the source/querying node. Another reason is the calculation of depth; it is more reasonable to identify surface depth than to estimate the depth of a moving AUV.
Among all the neighboring sensor nodes within transmission range of the source node, the source selects the one that has the minimum TD to reach any gateway. Therefore, the best relay node is calculated as: min(TD 1 , TD 2 , ..., TD N ) (2) where N is the total number of neighboring nodes within transmission range of the source node. In so doing, the source node selects the relay node hop-by-hop, and finally reaches the gateway. As this is a cognitive routing scheme, several gateways help the network to make stable links, thereby reducing the delay. Two nodes can only communicate if they have consensus about a common idle channel. Therefore, the gateway set increases the chances that there is a single gateway available to make a stable link. The gateway stores the information until it establishes a link with the AUV. If a relay node finds itself within transmission range of the AUV, it will send the packet directly to the AUV. Once a link is established with an LC, the LC checks its flow table for a route to the destination. If the LC does not find a route to the destination, it sends the request packet to the MC to find the best stable route to the destination.

Case 2: Source within transmission range
When a source is within transmission range of an LC, it directly sends a request packet to the LC; otherwise, it finds a gateway from set G. The LC checks in its flow table for a route to the destination, and sends a reply message if it has the best route to the destination. If it does not find a match, it forwards the request packet to the MC. Once the message reaches the controller, the LC/MC estimates the best stable route to the destination in the following manner. Any controller first calculates the path duration (s) of all paths P between source and destination as follows: where p = 1, ..., P, TH is the total number of hops making up each path between source and destination, and LDP i,p (link duration prediction) (s) is calculated as: where ENC is the expected node connectivity, which can be measured from all the beacon messages a node receives from its neighboring nodes within transmission range in time t, i.e., 1 hello messages/t . This connectivity parameter helps the network to avoid sparse conditions for both channel and relay selection. Finally, the controller finds the best route, R, to the destination: The source node, after receiving the best route, starts transmitting data. As this is a cognitive routing scheme, minimizing the path duration enhances the stability of the network that has a high data rate with low delay. This is because the unique challenges of underwater environment along with mobile PUs increase the chances of link fragility. Therefore, selecting the route with high data rate and low delay sustains stability in underwater networks. If any intermediate node fails to sustain stability, it repeats the above procedure to reach a nearby LC without sending the request packet back to the source node. Consequently, the SDN approach reduces delay by reducing the number of control messages.

Spectrum Sensing and the Channel Model
In this subsection, we explain how all communicating nodes in the ocean perform spectrum sensing to detect the presence of the PU signal in an underwater acoustic channel. One might think about how a sound signal from marine mammals is detected by CA users. Here, we briefly discuss the assumptions we make for sound signals produced by marine mammals. Various studies have been carried out to measure and detect different sound patterns produced by different marine mammals [27,28]. The methods marine scientists use to measure animal sounds are not part of this work. Our motive is to protect the signal produced by either marine mammals or sonar systems from interference by CA users. Basically, the sound patterns of marine animals like whales, dolphins, etc., have pauses of a few seconds, and multipath arrivals of sound with echoes are considered noise. Moreover, mammals can hear each other at up to 6 miles apart [28]; beyond that distance, the sound signal is also considered noise. Therefore, the spectrum can be utilized even when marine mammals are communicating with each other, either during pauses or when CA users are far enough from legitimate users to safeguard PU signals. For that reason, we model PU activity as an exponential on/off activity pattern. With SONAR systems as a PU, we assume that both transmitters and receivers are equipped with transducers. However, for natural acoustic systems, receivers only are equipped with transducers.
We consider an OFDM-based cognitive acoustic system in which the PU-OFDM system consists of S subcarriers. Spectrum sensing is done with an energy detection scheme to determine which subcarriers are free from PU activity. In an OFDM modulation scheme [29], the symbols of the PU first pass through a serial-to-parallel converter to generate parallel streams, and they then enter the S-point inverse fast Fourier transform (IFFT) block, which generates transmission samples. Then, multiplexing is done to generate serial streams of PU symbols, after which a cyclic prefix is added to the original samples. Finally, the OFDM-based PU samples are transmitted through an underwater acoustic channel. On the receiver side, CA users receive samples from the acoustic channel, remove the cyclic prefix, and allow these samples to pass through a serial-to-parallel converter to enter the S-point FFT block. The receiver detects the total number of subcarriers that can be used by CA users for communicating with each other. Therefore, the received signal after the FFT operation is defined as: y q,i (n) = s q,i (n) + w q,i (n) (6) where q = 1, . . . , S − 1 is the subcarrier index. To detect the presence or absence of a PU signal on the underwater acoustic channel, the received signal is then modeled as a binary hypothesis test, as follows: where i = 1, . . . , C, s q,i (n) is a complex PU signal at subcarrier q, and w q,i (n) is noise. The energy-based test statistic in a discrete domain is given as follows: where W is the time-bandwidth product, and y q,i [n] is the conjugate signal of y q,i [n]. The acoustic propagation speed in the underwater realm is the key parameter, which is assumed to be 1500 m/s in most of the literature. However, in acoustics theory, the propagation speed is mainly affected by depth (pressure), salinity, and temperature, and can be modeled in meters per second as follows [10]: where z is the depth in kilometers, s is the salinity in parts per trillion, and T = (temperature in • C)/10.
The dependence of path loss A(d, f ) (dB) on signal frequency f (kHz) is another peculiar property of an underwater acoustic channel. This path loss affects the received signal power while traveling over distance d (m), which in turn changes the signal-to-noise-ratio (SNR) (dB) for each user transmitting on f . Therefore, each sensor node experiences a different SNR, which is calculated as follows [30]: where P T is the transmitted power, f is the width of frequencies, and N( f ) is the noise power spectral density in dB re µ Pa, which is calculated as: The right-hand side of (11) refers to the superposition of four components: turbulence (t), shipping and other human activities (s), wind and waves (w), and thermal noise (th). These four components are calculated as follows [31]: where k is the path loss exponent that models the geometry (spherical and cylindrical) of propagation, and a( f ) (dB/km) is the absorption coefficient, which can be obtained by Thorp's formula [32]: (13) where A( f ) = 10log 10 a( f ). Acoustic communications in underwater systems present various challenges due to environmental conditions that are primarily related to accurate modeling of the channel behavior [33]. To propose an appropriate routing algorithm for software-defined cognitive underwater networks, an introductory requirement is to design a relatively accurate channel model. Guerra et al. [34] showed the significant difference in using a ray tracing tool over empirical propagation formulas. The empirical equations cannot model complex phenomena, such as sound speed profile, bathymetry, and sound propagation in bottom sediments, whereas a Bellhop ray tracing tool provides accurate emulation of sound propagation and a relatively accurate channel model. However, the authors also claimed that accuracy provided by a Bellhop simulator is only limited to channel attenuation. For modeling noise in an underwater channel environment, empirical equations are still used in simulations. Also, Qarabaqi and Stojanovic [35] claimed that ray theory seems to be a viable solution for providing an accurate picture of an underwater acoustic channel. We second them; therefore, like Toso et al. [36] and Bahrami et al. [37], in this study, we use beam tracing tools, such as the Bellhop [38], to compute channel attenuation to take into account ineluctable channel variations. Now, the term ch in (1) and (4) shows the common idle channel between two communicating acoustic nodes that is free from PU activity. We explain the summary of the proposed algorithm by considering an example scenario, as shown in Figure 1. Assume that the MC and all LCs have the global and the localized view of the network, respectively. Source S is looking for a stable route to reach destination D. The source reaches gateway G by making hop-to-hop links using (1). G forwards the request packet to an LC. The LC checks its flow table and does not find a match. It forwards the packet to the MC, which calculates a stable route using (4). The MC sends this packet to the LC, which sends it back to the source node. The source finally forwards the data packet to the destination via the prescribed route. The flow chart of the complete algorithm is shown in Figure 2.

Performance Evaluation
We evaluated the performance of CA-SDUN in ns-MIRACLE [39] connected with a Bellhop channel simulator [38] via the World Ocean Simulation System (WOSS) [34] interface. We distributed randomly placed sensor nodes in a target area of 700 m × 700 m × 700 m, each having a transmission range of 100 m. The spectrum band (10-40 KHz) was divided into M = 5, and each channel was able to be occupied by a licensed PU. The bandwidth of each channel was 6 KHz, with carrier frequencies of {13, 19, 25, 31, 37} KHz. This means that a band of frequencies is free for use by legitimate users in order to transmit data packets over a number of free subcarriers. The total number of subcarriers, S, was 128, and each had carrier spacing of 46.875 Hz. As we know that channel sensing is affected by sensing time in any cognitive radio network, we therefore used fewer subcarriers to make it reasonable for underwater cognitive acoustic networks. For the same reason, we used the length of cyclic prefix T CP at 12.4 ms, with symbol duration T s at 21.33 ms, which is greater than the typical value of the delay spread in underwater networks (i.e., approximately 11 ms [30]). The number of PUs moving randomly in the network was two. The number of AUVs used was two, each moving at a speed of 1.5 m/s and having a transmission range of 300 m. There was one MC placed at the surface of the ocean. The number of sensor nodes varied from 10 to 30. Packet size L s was assumed to be fixed (i.e., 64 bytes), and transmission power P T = 150 dB re µ Pa, which is within the range of the power value for acoustic signals of dolphins [27].
As argued in Section 2, there is no publicly known cognitive routing protocol for software-defined underwater networks that combines a cognitive capability with a routing technique by using the SDN approach. Therefore, we chose to compare CA-SDUN with two reference schemes (AA-RP [18] and DVRP [14]), each in combination with an energy detector-based spectrum sensing scheme [40] for underwater cognitive sensor networks. For simplicity, we denote these schemes as Cog-AA-RP and Cog-DVRP. AA-RP considers AUVs as mobile sinks that collect data from sensor nodes and forward the collected data to the surface. A gateway node (GN) is an agent of an AUV which communicates with the AUV when ordinary sensor nodes fail to make a connection. The GN stores information until it forwards it to the AUV. Cog-AA-RP modifies the AA-RP protocol such that each sensor node (including the GN and the AUV) first senses the spectrum and exchanges the local sensing results to find common idle channels. Finally, it implements the key idea of AA-RP to collect data to forward to the surface station. DVRP is a flood-based routing protocol for underwater sensor networks that forwards data packets (based on the flooding zone angle) from the sender nodes towards the surface of the ocean. It selects the next-hop node within the defined flooding zone. Like Cog-AA-RP, Cog-DVRP modifies the DVRP protocol such that each sensor node exchanges the spectrum sensing results within its defined zone in order to find a common idle channel. The two communicating nodes, having consensus about a common idle channel, then exchange data packets to establish a stable route between source and destination. Figure 3 shows the performance of average delay as a function of the number of sensor nodes with the number of channels as a parameter. Average delay is defined as the average time required by a packet sent from the source node to reach the destination. The average delay decreases with an increase in the number of sensor nodes. The pattern is the same for the three schemes, i.e., when increasing the number of sensor nodes and increasing the number of channels, delay decreases. This is because the connectivity in the network increases with an increase in sensor nodes, and in the latter case, the large number of channels in the network increases the chances for the sensor nodes to have even more common idle subcarriers. With fewer sensor nodes, the delay is high for all the schemes because a packet usually has to wait longer than normal to find the next hop node. Moreover, finding a common idle channel in cognitive communications scenarios is another reason for packet delay. As our goal is to maintain network stability by providing the best route between source and destination, we therefore applied the SDN approach where controllers know the route to the destination by keeping an updated network topology. In CA-SDUN, considering that the AUVs on fixed trajectories serve as LCs further reduces the delay. When these LCs know the route to the destination, they reply to the gateway/querying node with the updated route without communicating with the MC, and thereby reduce network delay. On the other hand, AUVs in Cog-AA-RP select nodes based on the distance and neighbor information of the first-hop node after finding a common idle channel between two communicating nodes. Hence, CA-SDUN outperforms Cog-AA-RP because it allows each querying node to directly make a connection with the controller to get a stable route. Also, both CA-SDUN and Cog-AA-RP outperform Cog-DVRP. This is because Cog-DVRP restricts the neighboring set for the querying node. The querying node is bound to select a relay node within the flooding zone. As this is a cognitive routing scheme, the elementary step of selecting a common idle channel between two communicating nodes further degrades the performance of this reference scheme. As a result, finding a relay node within the flooding zone decreases network performance by reducing the number of sensor nodes.   Figure 4 shows the performance of packet delivery ratio as a function of the number of sensor nodes with the number of channels as a parameter. Packet delivery ratio is defined as the ratio of the number of packets delivered to the destination to the number of packets generated by the source node. The delivery ratio increases with an increase in the number of sensor nodes. The SDN approach in CA-SDUN improves network performance in terms of delivery ratio because of the logically centralized controller that dictates the behavior of the network. In Cog-DVRP, a querying node has to select the next node for every hop until it reaches the surface of the ocean. By doing so, it may come across several fragile links due to greater delay, resulting in link failures and a low packet delivery ratio. However, Cog-AA-RP outperforms Cog-DVRP because the AUV is responsible for forwarding data from sensor nodes to the surface of the ocean. Nevertheless, the selection of a GN by the AUV with the restriction of a common idle channel lowers the delivery ratio in comparison with CA-SDUN. In our scheme, the MC keeps the global view of the network, which means the MC manages all the information about idle channels and relay nodes. Therefore, by calculating the path duration, the MC provides the best stable route between source and destination to each querying node. In the cognitive underwater environment, in addition to underwater environmental challenges, another factor that affects the packet delivery ratio is the selection of a common idle channel. We can see from Figure 4 that increasing the number of channels increases the chance for the sensor nodes to have even more common idle subcarriers. However, for CA-SDUN, the packet delivery ratio is higher for different numbers of channels in comparison with the other two reference schemes. The reason is the selection of the relay node based on minimum transmission delay. When there is only a single channel in the network, there is a smaller number of idle subcarriers; hence, CA users face difficulty in accessing subcarriers free from a PU. Increasing the number of channels allows CA users to access the common idle sub-bands, and increases the chances for more sensor nodes to participate in the network. Hence, in this regard, the delivery ratio under CA-SDUN is the highest, compared to other scenarios, when the number of channels is M = 5, as shown in Figure 4c. Figure 5 shows the overhead ratio of CA-SDUN, Cog-AA-RP, and Cog-DVRP as a function of the number of sensor nodes, with the number of channels as a parameter. Overhead ratio is defined as the ratio of the number of control packets to the total number of packets in the network. The routing overhead for the three schemes increases with an increasing number of sensor nodes in the network. We observed similarity in all the schemes in terms of an increase in overhead ratio when the number of sensor nodes increased and the number of channels decreased-the more sensor nodes, the higher the message update rate. However, CA-SDUN outperforms both reference schemes. This is because of the centralized controller, which reduces the number of control messages in the network. Each querying/gateway node in CA-SDUN communicates with the LCs whenever it encounters a packet mismatch or it requires a route update. When these LCs know the route to the destination, they reply to the querying nodes with the updated route without communicating with the MC, and thereby reduce the message rate. Moreover, in any case of an unstable link due to the unavailability of any sensor node or channel, the querying node directly asks the LC for a route update without sending the packet back to the source node. However, in the reference schemes, nodes send beacon messages to all neighboring nodes for each update on the network state. The overhead ratio for both Cog-AA-RP and Cog-DVRP is higher than for CA-SDUN. In Cog-AA-RP, the AUV sends hello messages to all the first-hop neighboring nodes to choose GNs in a timely manner, and these GNs exchange messages with sensor nodes to collect data; hence, a large overhead is incurred. On the other hand, in Cog-DVRP, calculating the flooding zone further reduces the chances of successful packet delivery. This is because sensor nodes may not find a common idle channel for communications, which therefore increases the overhead ratio. Figure 5 also shows that increasing the number of channels increases the free subcarriers in the network, and thereby decreases overhead by providing a larger number of unused subcarriers to all types of sensor node for stable communications. A complete analysis of our simulation results shows that the SDN-based scheme outperforms non-SDN-based schemes, and using AUVs in the network enhances network performance.    Figure 6 shows the data rate as a function of different frequencies with the bandwidth as a parameter. The data rate decreases dramatically with increasing frequencies because the path loss increases with an increase in frequency. However, increasing the bandwidth improves the data rate, but the operating region for majority of acoustic systems has limited bandwidth in underwater networks due to strong attenuation. Therefore, we achieve a low data rate for low bandwidth. Figure 7 shows the relationship between bit error rate and various SNR values. Bit error rate is used to determine the quality of transmitted signal in a channel. The lower the bit error rate, the better the quality of the received signal. It can be seen from the curve that the bit error rate improves with the increase in SNR and transmission power.

Conclusions
In this paper, we proposed a novel routing protocol for cognitive acoustic software-defined underwater networks. The idea of combining a cognitive capability with a routing scheme in software-defined underwater networks makes this protocol unique. The protocol has two phases: beaconing and route estimation. A main controller is responsible for network management, while AUVs serving as local controllers move on fixed trajectories to reduce the number of control messages and any network delay. The controllers are responsible for providing a stable route between source and destination for the querying node. A link is formed between two nodes if they have a consensus about a common idle channel, and a link with the minimum duration is selected to make a stable route. Both natural acoustic systems and artificial acoustic systems are considered to be PUs in this scheme. Therefore, spectrum sensing is performed with an OFDM-based energy detection scheme. Our results show better performance for average delay, packet delivery ratio, and routing overhead ratio.
For sensing channels and then selecting relay, a large amount of energy is required in the proposed scheme. Therefore, it is an urgent problem to consider a good trade-off among energy consumption, overhead, and delay for cognitive routing schemes based on traffic and energy balancing. Also, energy harvesting techniques, such as harvesting energy from acoustic links to recharge sensors/AUV batteries, should be considered to prolong the network lifetime. We have left these research issues for future work.