A Cluster Sleep-Wake Scheduling Algorithm Based on 3D Topology Control in Underwater Sensor Networks

3D topology control in underwater sensor networks is of great significance to ensuring reliable and efficient operation of the network. In this paper, by analyzing the characteristics of an underwater sensor network, we take the cube as the basic unit to perform 3D partition of the monitoring area, define the 3D partition unit and basic cluster structure of the underwater sensor network, and arrange rotating temporary control nodes in the cluster. Then, a cluster sleep-wake scheduling algorithm is proposed that compares the remaining node energy. It selects the node with the largest remaining energy as the working node, and the remaining nodes complete the transition of dormancy and waiting states as long as they reach the preset dormancy time. The node state settings of this phase are completed by the temporary control node. Temporary control nodes selecting and sleep-wake scheduling are used in the algorithm through 3D topology control, which reduces energy consumption and guarantees maximum sensing coverage of the entire network and the connection rate of active nodes. Simulation results further verify the effectiveness of the proposed algorithm.


Introduction
With the development of modern science and technology, human beings are more and more fully aware of the use and development of the environment, and the ocean, due to its rich resource reserves and research value, has prompted us to continuously explore the underwater space. The sensor nodes suitable for the underwater environment are deployed in the underwater environment for resource exploration, disaster prevention, data collection and other works. The sensor node forms a highly flexible underwater wireless sensor network (UWSN) through underwater acoustic communication. UWSN can be classified according to different standards: one is divided into static, semi-static and dynamic networks according to node mobility; another common classification is divided into 2D and 3D topologies structures according to whether the depth of nodes is considered [1].
In the common 2D UWSN structure, nodes are usually placed on the seabed [2]. Due to the special underwater environment, sensor nodes are small in size [3]. Unlike radio wave transmission, underwater signals can only be transmitted through sound channels, which will affect the communication quality [4]. In the 3D structure, nodes are distributed at different depths in the water to conduct comprehensive monitoring of the water area [5]. The depth of the sensor nodes can be controlled by buoys fixed on a horizontal plane [6]. The 3D network structure can more intuitively reflect the

Related Work
Compared with traditional WSNs, UWSNs, which uses an underwater acoustic channel for transmission, consumes more energy [21]. If the node runs out of energy, it will immediately fail, which will cause network coverage vulnerability and greatly affect network performance. Ref. [22] designed a microbial battery for sensor to solve the problem of limited energy. However, this way of collecting energy is affected by the environment, although it increases the survival time of nodes, it increases the cost. Therefore, saving sensor energy by controlling the behavior of nodes in UWSN is still a convenient and efficient way.
The routing algorithm PER (power-efficient routing protocol) and SEANAR (energy-efficient and topology-aware routing protocol) were compared in [23]. Both algorithms add location information and residual energy information of underwater nodes when selecting the next hop. PER algorithm consumes less energy and reduces the number of repeated packets sent, but it is prone to communication blanks and reduce network coverage. Based on topology control, SENAR finds and selects the next forwarding node in two stages, but the node near the sink has high energy consumption and is prone to energy holes. Khasawneh [24] et al. proposed a reliable and energy-efficient pressure-based routing (RE-PBR) algorithm. Considering the link quality, depth and residual energy, the information acquisition and routing and forwarding algorithm are designed to balance the energy consumption and make the routing protocol more efficient and energy-efficient. Because the algorithm does not consider the location of nodes, it will lose advantages in the perception and coverage of regions.
Considering the complexity of underwater environment, network stability, anti-interference and end-to-end delay must also be considered in the study of UWSNs [25]. In [26], an adaptive disjoint path vector algorithm suitable for heterogeneous wireless sensor networks was proposed. The algorithm has the characteristics of energy perception and distributed fault tolerance, including initial and recovery stages. The scheme can maintain the connection between nodes, but the advantage of optimizing energy consumption of nodes is not obvious.
The CLTC (Cluster-Based Topology Control) framework has been improved in [27]. First, the nodes were divided into clusters by k-means algorithm, and then topology control between clusters was implemented by using relative neighborhood graph. The greatest advantage of this algorithm was that it could maximize the network life cycle, but it offered no clear advantage in reducing inter-node interference. A method to solve the energy optimization problem of wireless sensor network was proposed in [28]. This method also involves topology control and multicast technology based on network coding. Compared with using them separately, this method improved overall performance. The scheme reduced end-to-end delay and optimized network energy consumption, but was slightly insufficient in network connectivity and coverage.
In [29], a basic theoretical algorithm based on WSNs was proposed. Topology control techniques of planar network and layered network were discussed respectively, and algorithms was further classified according to the key parameters of state scheduling. However, this algorithm has many shortcomings and needs to be further research.
Considering the two factors of interference and delay in topology control, three optimization goals were proposed in [30], maximum interference, average interference, and average path interference. A centralized algorithm with a greedy strategy was proposed that satisfied the delay constraint while minimizing interference as much as possible. Then, a distributed algorithm was proposed to reduce average interference. To minimize average path interference, a local delay constraint Bellman-Ford algorithm was also put forward. Finally, the network topology consisted of these optimal paths. The topology control algorithm showed good performance in anti-jamming and could guarantee end-to-end delay; however, the algorithm was insufficient in improving network coverage and extending the network life cycle.
Our contributions are as follows: • In this paper, a cube is used as the partition unit, and a rule 3D space segmentation scheme is used for network partition. Based on the establishment of a 3D topological control model for UWSNs, the concepts of a UWSN unit and underwater cluster are proposed. The size of the partition unit and cluster scale are calculated according to the constraints of energy efficiency and quality-of-service awareness. • A sleep-wake scheduling algorithm for UWSN clusters is constructed, which can build initial randomly placed sensors into a 3D network and form a UWSN with higher coverage, higher connectivity, and lower energy consumption through the sleep-wake scheduling algorithm.

Model of Underwater Wireless Sensor Network
A 3D UWSN is used to detect and observe situations that cannot be fully observed through a submarine sensor node (i.e., for collaborative sampling work in a 3D marine environment). In a 3D underwater network, sensor nodes are suspended at different depths in the water for detection. In this structure, each sensor node is anchored to the bottom of the sea and equipped with buoys that can be inflated with pumps, as shown in Figure 1. The buoys can push sensors to the surface. The depth of a sensor can be adjusted by adjusting the length of the cord connecting the sensor and the anchor via an electric motor mounted on the sensor. Each sensor network has a surface receiver for collecting data and a surface base station for collecting, processing, integrating, and transmitting information. The sensor nodes in this paper use the 3D Boolean sensing model. Assuming that the coordinates of underwater sensor node n i in the 3D coordinate system of the monitoring area is (x i , y i , z i ), the sensing radius is r s . Therefore, the sensor node n i sensing model is a sphere with a spherical center (x i , y i , z i ) and a radius r s , labeled a sensing ball in Figure 2. For sensor node n i , when the target object is in the sensing ball of n i , then the target can be sensed by; if it is outside the sensing ball, n i cannot detect this target object. We set the coordinates of any point Q in the 3D coordinate system of the monitoring area as (x q , y q , z q ). The Euclidean distance from point Q to sensor node n i is d(n i , Q) = (x q − x i ) 2 + (y q − y i ) 2 + (z q − z i ) 2 ; therefore, the probability that the sensor node n i can perceive point Q is shown in Equation (1).
According to the sensor node composition, wireless sensor sensing modules that consume energy consist of the module, calculation module, and wireless communication module. The energy consumption of each part of the node is presented in Figure 3. The wireless communication module consumes most energy, whereas the sensor node's sensing module and calculation module consume less. Wireless communication modules are usually divided into four states: sending, receiving, idle, and sleep. Among them, energy consumed in the sending state is the highest of the four, energy consumed in the receiving state and the idle state is moderate, and energy consumed in the sleep state is minimal. When the node is idle, it must also monitor the channel constantly to determine whether data are being sent to itself; thus, it consumes energy. In the sleep state, the node turns off the sensing and communication modules, greatly reducing energy consumption. In this paper, the energy consumption model only considers energy consumption when sending data, receiving data, and when in an idle state.

Energy Consumption for Sending Data
WSNs adopt energy consumption models based on multipath transmission and free space. Energy consumed by a node when sending and receiving data packets is related to the transmission distance, data packet size, and communication environment. A UWSN uses underwater acoustic signals to communicate, which produces a qualitative change compared to radio signals. Therefore, the energy consumption of underwater transmission should be reconsidered.
Due to the uniqueness of the underwater environment, the problem of data transmission has been transformed into a problem of signal attenuation in underwater acoustic channels in many underwater acoustic communication studies. Energy is consumed when sending data is determined by the packet size, minimum transmission power, and power attenuation function of the data.
Assuming that the sensor node can normally receive 1 bit data, the minimum power is P min , and the power attenuation function with changing in transmission distance d is A(d).
Of these, the power attenuation function A(d) relates to attenuation coefficient α, transmission distance d, and the underwater acoustic channel transmission model is as follows: where k represents the energy diffusion factor of the underwater acoustic channel. When k = 1, the hydroacoustic channel adopts the cylindrical diffusion model; while k = 1.5, the underwater acoustic channel adopts the spherical diffusion model; when k = 2, the actual situation is indicated. Usually, the attenuation coefficient α is directly related to the absorption coefficient α( f ) as in the following relationship: wherein, the unit of absorption coefficient α( f ) is dB/m, which can be expressed as: where f is the unit k Hz, which represents the carrier frequency of the underwater acoustic signal. Therefore, the energy required to send n bit data to another node at a distance of d meters in a shallow water area is:

Energy Consumption for Receiving Data
The energy required to receive data is related to the packet size and energy consumed when receiving 1 bit data. In general, the constant E elec is used to represent energy consumed by the node when it receives 1 bit data. Therefore, energy consumption when receiving n bit data is:

Energy Consumption in Idle Time
When idle, the node listens to the channel all the time, and no data are sent or received; thus, the energy consumption of the node at this time is related to the waiting time. Assume that the energy consumed by the sensor node listening to the channel is a constant E m per unit time. Therefore, when the node is idle for t w seconds, the energy consumption of the sensor is

Coordinate System
When studying coverage problems, the location information of the node is an absolute coordinate, leading to disadvantages in unified node management. In this paper, a coordinate system is established in the monitoring area, and the origin coordinate is specified; accordingly, the sensor node can obtain corresponding relative coordinates, rendering completion of the algorithm highly convenient. This paper takes the vertex in the lower-left corner of the monitored 3D region as the origin and establishes the 3D coordinate system for the monitored region, as shown in Figure 4.

Topological Model of 3D Dense Network
The topology control problem of 3D dense networks assumes that there are a large number of redundant nodes in the network, and these nodes are evenly and densely placed in the 3D space area to be monitored. The topological model of a 3D dense network divides the entire 3D space into multiple identical virtual components, guaranteeing an active node in each virtual unit at any moment; see Figure 5. Because the position of the sensor node in the virtual component unit is not fixed and the sensor radius of the node itself is uncertain, the coverage rate can be controlled by these two parameters. This key issue is addressed in this paper.

Related Definitions
Definition 1 (Coverage rate C r ). The coverage rate of sensor networks refers to the ratio between the intersection of sensor nodes' sensing range and the volume of the monitoring area, namely Where V 1 , V 2 , ..., V n represents the sensing range of node 1 , node 2 , ..., node n . V A refers to the volume of monitoring area A.
The coverage rate of a sensor network is an important indicator in evaluating the coverage performance of nodes; it represents the network's sensing ability in the monitoring area but is not the only parameter by which to measure coverage performance. Therefore, coverage control for 3D UWSNs does not necessarily pursue a coverage rate of 1; rather, it should also consider the manufacturing and deployment costs of nodes and determine coverage requirements according to specific applications.

Definition 2 (Partition unit).
A special polyhedron that can closely fill a 3D space without overlap or vacancy. The target 3D region A can be divided into several identical polyhedral P u , as V A = ∑ V P u .
The partition unit defined here is the virtual component unit mentioned above; therefore, the topology control of an underwater 3D network seeks to ensure an active node in each division unit at any time while maintaining high coverage. Cubes, hexagonal prisms, rhombic dodecahedrons, and truncated octahedrons can be used as segmentation units. Considering the convenience of subsequent algorithms, a cube is used as the partition unit in this paper. A regular 3D spatial segmentation scheme was adopted to divide the network, and the model is denoted as CB d . Figure 6 depicts a cube consisting of eight partition units.  Definition 4 (Partition unit radius R). The radius of the partition unit refers to the radius of the circumscribed sphere of the partition cube, as shown in Figure 8. Definition 7 (Node number ID 0 ). Set the coordinates of the nodes in the 3D coordinate system of the monitoring area as (x, y, z). Where z represents the length of rope between the node and the anchor and is a fixed value known at the beginning of deployment. The coordinates are the relative coordinates of sensor nodes with respect to the origin of coordinates, which can be obtained by the localization algorithm. Therefore, this unique coordinate is used in this paper as the node number, denote as ID 0 = (x, y, z).
Definition 8 (Partition unit number ID 1 ). For the convenience of partition unit management. A unique identification number is set for each partition unit in this paper, that is, partition unit number ID 1 . Suppose the partition unit number ID 1 = (i, j, k), where i represents the number of rows in the partition unit, j represents the number of columns in the partition unit, and k represents the number of layers in the partition unit. Therefore, the coordinate range of each partition cube (i, j, k) can be obtained according to the partition unit number: Therefore, according to Equation (9), the node can get the number of the partition unit number through its number ID 0 : Definition 9 (Partition unit number ID 2 ). For the convenience of cluster management, we also set up a unique identity number for each cluster in this paper, that is, cluster number ID 2 . A detailed description will be given below. By the cluster definition, a cluster is comprised by 27 partition units. We have assumed that the cluster number ID 2 = (a, b, c). Then, the coordinate range of each cluster (a, b, c) can be obtained according to the cluster number: Therefore, according to Equation (11), node can get the cluster number by its own number ID 0 : Definition 10 (Communication radius r c ). The communication range of the sensor node is similar to the sensing range. It is assumed that the coordinates of the underwater sensor node n i in the 3D coordinate system of the monitoring area are (x i , y i , z i ), and the communication radius is r c . Therefore, the sensor model of sensor node n i is a sphere with (x i , y i , z i ) as the center of the sphere and r c as the radius, which can also be called a communication ball, as shown in Figure 9. Definition 11 (Node rank R ank ). From the topological model of the 3D dense network mentioned above, it can be seen that, we can control the coverage rate by the two variable parameters of node location and sensing radius. In this paper, the node level is divided according to the location information of the node in the partition unit, denoted as the node rank R ank . The specific division method and the corresponding sensing radius setting will be described in detail below.

Determine the Size of the Partition Unit and Cluster
Partition units and clusters have been defined, and their size determines network quality; thus, it is necessary to determine the size of partition units and clusters to achieve high coverage, high connectivity, and low energy consumption throughout the network.
This study examines a 3D underwater environment, which is more complicated than the 2D land environment. Therefore, to manage sensor nodes more conveniently, a distributed method is adopted. In a 2D environment, cluster control is used for distributed control. In this paper, we simulate the clustering model in a 2D environment and divide the large-scale 3D region into a small 3D region by clustering. Each cluster exists independently, and the sensor scheduling problem is handled by temporary control nodes in the cluster.
It can be known from the cluster division that the temporary control nodes in the cluster can exist anywhere in the cluster. Therefore, to achieve single-hop communication within the cluster, the cluster size must be strictly controlled. According to the definition, the length of the cluster is, and it is assumed that the sensor nodes are distributed anywhere in the central plane of the splitting unit, and the farthest distance of the sensor nodes in the cluster is √ 22l. If you want to make all the nodes in the cluster can communicate in a single hop, then you must guarantee r c = √ 22l, so the partition unit has a side length of l = r c

Determining Node Level and Sensing Radius
Suppose an active node can be placed anywhere in the center plane of the partition unit, and it must be able to monitor any point in the partition unit. Therefore, the farthest distance that the sensor node in each split unit can measure is 3 2 44 r c , that is, the perceived radius of the node can be set to r s = 0.32r c . However, according to the cluster size, the cluster side length is only L = 3×r c √ 22 = 0.64r c . If the sensing radius is set in this way, only a large amount of overlay overlap will be caused. At the same time, in the monitoring, when the sensing radius is larger, the filtering and signal processing methods need to be more complicated, so that the required credibility can be achieved, which will inevitably increase the energy consumption. Therefore, under the condition that the sensing radius can be set, different sensing radii can be set for different node levels to reduce the redundant coverage under the premise of ensuring high coverage, thereby optimizing the sensing energy. Since the length of the anchor chain, that is to say the vertical height of the node, can be determined, it can be guaranteed that the node is always at the center plane of the partition unit. Therefore, the 3D coverage can be converted into 2D coverage, the node level is determined according to the 2D coordinates of the node, and the sensing radius corresponding to the nodes of different levels is obtained under the premise of ensuring high coverage, as shown in Figure 10. (1) Primary nodes As indicated in Figure 10, when the node is in the horizontal line area of the center plane of the partition unit, the node is a primary node; that is R rank = 1. At this point, the coordinate range of the node is: When the sensor node's sensing radius is r s = √ 3 2 l = 1 6 r c , the coverage rate can reach up to 100%.
(2) Secondary nodes As shown in Figure 10, when the node is in the vertical line area of the center plane of the partition unit, the node is a secondary node; that is R rank = 2. At this point, the coordinate range of the node is: When the sensor node's sensing radius is r s = 1.078l = 0.23r c , the coverage rate can reach up to 100%.

(3) Tertiary nodes
As illustrated in Figure 10, when the node is in the oblique area of the center plane of the partition unit, the node is a tertiary node; that is, R rank =3. The coordinate range of the node is: When the sensor node has a sensing radius of r s = Of these, m represents the height of the monitoring area. As shown in Figure 11. Definition 13 (Boundary node). All sensor nodes are located in the boundary area.
In an ocean monitoring network, due to the influence of tides, nodes deployed in the water must not be stationary. We must therefore consider the effect of the node's movement on coverage. Because node movement does not produce a change in relative position, the coverage does not shift considerably; for most nodes, it is unnecessary to consider the effect of node movement on coverage. However, nodes at the boundary, including those at the left boundary and the upper boundary, must consider the impact of node movement on coverage. A specific sensing radius must thus be designed. A high coverage rate can be achieved even if the node leaves the partition unit.
Assuming that the node is in a relatively stable ocean environment, the node will be thrust by the wave to the right, so the node only changes the coordinates on the x-axis and the z-axis during the motion. Since the nodes are pulled by the ropes, they do not move with the seawater to a distant distance position, but move within a certain range. As shown in Figure 12, it is the force of the node under water. According to this, the movement of the underwater node is a cyclical process. Therefore, the node moves along the curve from point A to point B, and then accelerates and then decelerates until the speed is zero. Randomly take a time T p in the time range [T min , T max ] to describe the time when the node remains stationary at point B. Then use point B as the starting point to do the above movement. This cycle is the process of the node moving underwater. Because of the border node moves, there are coverage holes in the border area of the monitoring area. To solve this problem, it is necessary to reset the sensing radius of the boundary node. It is assumed that the sensor node can obtain its own position coordinates according to the positioning algorithm under water. The coordinates of the node at the A position are (x 1 , y 1 , z 1 ), and the coordinates of the node at the B position are (x 2 , y 1 , z 2 ), as shown in Figure 12. Therefore, it can be known that when the moving speed of the node is zero, the horizontal distance (d 0 ) and the vertical distance (h 0 ) from the initial position are respectively.
Therefore, when the node is located in the partition unit of j = 1, the perceived radius of the node is set to: When the node is located in the partition unit of k = √ 22m r c , the perceived radius of the node is set to: where r c represents the communication radius of the sensor node and m represents the water depth of the monitored water. In addition, when j = 1 and k = √ 22m r c , compare the size of h 0 and d 0 , if h 0 > d 0 , the node sensing radius is set to: Conversely, the node's sensing radius is set to:

Set Information Table
As subsequent node states change dynamically, it is necessary to know the relevant information of the node itself and within the cluster in advance. It is inconvenient to transfer this information individually; thus, this article includes an information table for nodes to be easily managed and transmitted; see Table 1.

Node Placement
Because of the 3D deployment, the 2D placement is converted into a 3D placement by changing the length of the rope connected to the anchor. When laying out, the nodes are laid out layer by layer. First, the nodes are randomly placed at the bottom of the water, and then the sensor is pushed to the surface by the buoy. The first rope length l 0 = √ 22 44 r c , repeat the above action, the nth rope length is adjusted to l 0 = (2n−1)

Temporary Control Node Rotation
Definition 14 (Temporary control node). Each round of each cluster elects a temporary control node, which is equivalent to the cluster head node, responsible for controlling the dynamic changes of the nodes in the cluster, collecting the sensing information and sending it to the surface control node.
Because the temporary control node has to do a lot of work, its corresponding energy consumption will be greater, so if you always use a temporary control node will cause it to die prematurely due to energy exhaustion, which is likely to cause coverage holes. Therefore, the rotation of the temporary control node is necessary.
Because the temporary control node is not only controlling the nodes in the cluster, it is also responsible for forwarding messages from other clusters. Therefore, the higher the number of node forwarding, the faster the corresponding energy consumption. Therefore, the rotation conditions of the temporary control node are adjusted according to the number of layers.
Therefore, Currentenergy ≤ Residualenergy c+1 , which is E ≤ E residual c+1 , the node sends a temporary control node rotation message to the intra-cluster node, selects the next temporary control node, updates the remaining energy, and then enters the waiting state. If there is a temporary control node failure, the group broadcasts and a new temporary control node is elected.

Set Hibernation Time
In this paper, three states are set for sensor nodes: the working state, waiting state, and deep dormant state as listed in Table 2. The relationship between the three states is illustrated in Figure 14. The relationship between the three indicates that the transition from the deep dormant state to the waiting state is controlled by the pre-set dormancy time. The dormancy time is set by the node timer. As soon as the time is right, the node transits to a waiting state. The longer the dormancy time, the smaller the energy consumption, but this will lead to no awakening node in the network. Therefore, considering network quality, more energy conservation is a problem to consider when setting the dormancy time in this paper.
The number of neighbors and remaining energy are important indicators determining the node life cycle in a partition unit; therefore, dual control conditions are used in this paper to set the dormancy time. A longer dormancy time for nodes results in fewer neighbors and less residual energy. Because the nodes closer to the water surface need to consume more energy, the dormancy time should be extended accordingly. Therefore, the dormancy time is where t max is the longest dormancy time, which must be set according to the actual situation. Per the energy consumption model, assume that the energy consumed by the temporary control node per second is E per , such that E per = E R + E S .
From Equation (5), which represents the energy consumed by the temporary control node to send data per second.
λ indicates that sensor node can send λ bit data per second, which is the transmission rate. From Equation (7), which represents the energy consumed by the temporary control node receiving data per second.
ε indicates that the sensor node can receive ε bit data per second, denoting the receiving rate.
Here, P min represents the minimum power the sensor node can receive data normally; A(d) represents a power attenuation function with a communication distance of d. In this case, d refers to the communication radius r c ; E elec represents the energy consumed by receiving 1 bit data.
According to the temporary control node rotation conditions, when E ≤ E residual c+1 , the temporary control node will be re-selected. Given that E residual − t max · E per ≤ E residual c+1 , the maximum dormancy time can be set to

Description of the Algorithm
Step 1: Initial node placement.
Step 2: Select temporary control node. Each node broadcasts its own information table within the cluster and updates its information table based on the receiving message. Then, we select the partition unit within the cluster to make num NUM · ∑ num E residual ∑ NUM E residual largest. Finally, the largest node of E residual is found, making it the temporary control node of the cluster.
Step 3: Select working node. According to the node's remaining energy E residual , the temporary control node locates the node with largest E residual in each partition as the working node. Other sensors enter deep dormancy.
Step 4: State conversion. The node is not always in deep dormancy; it presets a dormancy time T s before dormancy. When it reaches the dormancy time, the sensor node automatically transitions from deep dormancy to a waiting state, awaiting the command from the temporary control node.
Step 5: Temporary control node rotation. When E ≤ c c+1 E residual , replace the temporary control nodes; then, return to Step 2.
Step 6: Repeat the above steps until the node energy in the WSN is zero. The detailed algorithm is shown in Algorithm 1.
In this paper, initial node placement in the cluster sleep-wake scheduling algorithm is random. Then, a UWSN with high coverage, high connectivity, and low energy consumption is formed through scheduling between nodes. In the simulation experiment, compared with the general random deployment algorithm, the network coverage rate, connection rate, and network life cycle are important network evaluation indicators.

Algorithm 1 Cluster sleep-wake scheduling algorithm
Input: ID 0 , E n ,E residual = E n , num = 0, NU M = 0, t max = 1 c+1 · E residual E per , remaining energy in the network E total = 0; Output: Coverage rate C r , energy consumption E c , algorithm working time T total ; 1: Calculate partition unit number ID 1 , to which it belongs from Equation (10); 2: Calculate cluster number ID 2 to which it belongs from Equation (12); 3: Calculate node rand R rank from Equations (13)- (15). Set the sensing radius accordingly; 4: while 1 do 5: Node in a waiting status, broadcasting message table in the cluster; 6: while not traversed all nodes in the cluster yet do 7: Find the same node of ID 1 , record the number of nodes; 8: num ← num;

9:
Find the same node of ID 2 , record the number of nodes; 10: NU M ← NU M; 11: end while 12: Select the partition unit with the largest num NUM · ∑ num E residual ∑ NUM E residual within the cluster; 13: Select the node with the largest E residual in the partition unit as the temporary control node; 14: Temporary control node finds node with largest E residual in each partition as a working node; 15: Other remaining sensors enter deep dormancy; 16: Calculate coverage rate C r and dormancy time T s ; 17: Output C r ; 18: while not traversed all dormancy node yet do 19: if t = T s then 20: Node changes to waiting state; 21: end if 22: if E ≤ c c+1 E residual then 23: Covert temporary control node to ordinary node; 24: Update E residual ← E residual , t max ← t max ; 25: end if 26: end while 27: while not traversed all nodes yet do 28: Calculate E total = E total + E; 29: end while 30: if E total = 0 then Output E c , T total ; 35: end while 36: Output T total .

Simulation and Analysis
In this paper, the cluster sleep-wake scheduling algorithm is compared with the most common random deployment algorithm and the redundant node sleep algorithm based on sensing contribution. It is proved that the cluster sleep-wake scheduling algorithm can improve network coverage and save energy consumption. In the simulation, we set the size of the target water to 100 m × 100 m × 100 m. At the same time, because the cluster sleep-wake scheduling algorithm and the redundant node sleep algorithm are used to solve the problem of redundant nodes in the sensor network, it is necessary to increase the node redundancy in the network during the simulation. Therefore, we randomly placed 300 nodes in the target waters. The simulated environmental parameters are shown in Table 3.
Wherein, the node sensing radius of the cluster sleep-wake scheduling algorithm is related to the node level R ank . While R ank = 1, the sensing radius is set to r s = 14.43 m; while R ank = 2, the sensing radius is set to r s = 17.97 m; while R ank = 3, the sensing radius is set to r s = 20.41 m. The sensing radius of the random deployment algorithm and the redundant node sleep algorithm is set to r s = 20 m.
In Figure 15, the relationship between the number of working nodes and the coverage rate is shown under the same node communication radius and sensing radius. It can be clearly seen that the three algorithms are gradually increasing in network coverage as the number of working nodes increases. Although the network coverage of the redundant node dormancy algorithm will be higher when the number of working nodes is small, the network coverage of the cluster sleep-wake scheduling algorithm will be higher as the number of working nodes increases, and this trend will be keep going. This is because the cluster sleep-wake scheduling algorithm selects only one working node in each partition unit, which ensures that the nodes can be evenly distributed in the target waters, reducing node redundancy. The redundant node sleep algorithm selects the node with high perceived contribution as the working node, but there may be too many local nodes, which will increase the node redundancy. Therefore, the network coverage of the cluster sleep-wake scheduling algorithm is higher when the number of working nodes is the same.
As shown in Figure 16, it is the relationship between network coverage and time. At the beginning of the algorithm, 300 nodes are put into the network at the same time, all three algorithms can achieve high coverage. When entering the 30th round, the coverage of the random deployment algorithm is greatly reduced. Although the coverage change of the cluster sleep-wake scheduling algorithm and the redundant node sleep algorithm is small, it can be seen that the coverage of the cluster sleep-wake scheduling algorithm is higher. This is because the cluster sleep-wake scheduling algorithm adopts a node rotation strategy, and when the threshold is reached, the working node is replaced, so that the energy consumption can be balanced, and the working node exists in each partition unit as much as possible. The redundant node sleep algorithm selects to wake up the redundant node after the node energy is exhausted, and the sensing contribution of the redundant node is smaller than the perceived contribution of the working node, so the node perceptual contribution in the network increases with time. The degree is reduced and the node redundancy is increased. Therefore, the network sleep coverage of the cluster sleep-wake scheduling algorithm is higher when the runtime is the same.  As shown in Figure 17, the change in the number of working nodes in the network is shown over time. In the case of deploying 300 nodes as well, the random deployment algorithm is that all nodes work at the same time, so that there will be a large drop in the number of working nodes over time. At the same time, the existence of a large number of redundant nodes will consume a large amount of energy, making the lifetime cycle of the network very short, and the entire wireless network will die in the 60th round. Both the cluster sleep-wake scheduling algorithm and the redundant node sleep algorithm adopt the redundant node sleep wake-up method. Therefore, only about 200 nodes are needed at the beginning of the network operation to achieve full coverage. The cluster sleep-wake scheduling algorithm uses a dense network topology model to ensure that there is one working node in each split unit, which can reduce node redundancy and increase node use. Therefore, there will be fewer working nodes in the cluster sleep-wake scheduling algorithm in the first 25 rounds. In the last 25 rounds, the number of working nodes in the cluster sleep-wake scheduling algorithm will be more. This is because the cluster sleep-wake scheduling algorithm divides the nodes in a cluster manner, uses the temporary control nodes to perform inter-cluster communication, reduces the number of data packet forwarding, and sets the sensing radius according to the node level to avoid unnecessary energy consumption, so the energy consumption in the network is There will be fewer, more nodes will work. Therefore, in the last 25 rounds, when the running time is the same, the cluster sleep-wake scheduling algorithm has more working nodes. As shown in Figure 18, shows how the number of working nodes required changes when network coverage changes. Compared with the redundant node sleep algorithm, with the increase of network coverage, the growth trend of the number of working nodes required by the cluster sleep-wake scheduling algorithm is more gradual. At the same time, in order to achieve 98% network coverage, the random deployment algorithm may require about 260 working nodes, the redundant node sleep algorithm may need about 220 working nodes, and the cluster sleep-wake scheduling algorithm only needs about 180 working nodes. This is because the cluster sleep-wake scheduling algorithm uses the division of the splitting unit to ensure that the working nodes can be more evenly distributed in the sensor network and improve the use of the nodes. At the same time, when the node is awakened, the partition units with coverage holes are also selected, which can reduce node redundancy and greatly improve network coverage. Therefore, when the coverage ratio is the same, the cluster sleep-wake scheduling algorithm has fewer working nodes.
As shown in Figure 19, shows how the number of failed nodes changes over time. As you can see from the figure, the failed node starts to appear around 20 rounds. Compared with the random deployment algorithm and the redundant node dormancy algorithm, the cluster sleep-wake scheduling algorithm has a lower number of failed nodes and a slower growth trend. This is because the cluster sleep-wake scheduling algorithm uses a sleep-wake policy and a node rotation strategy to balance energy consumption and prevent a node from rapidly dying. At the same time, the method of dividing the cluster is used to reduce the number of times of forwarding of the data packet, and the method of dividing the node level is used to reduce the excess sensing energy consumption. The redundant node sleep algorithm only considers the sleep-wake strategy, and chooses to wake up the redundant node after the dead node appears. Therefore, in the case of the same runtime, the cluster sleep-wake scheduling algorithm has fewer failed nodes.
As shown in Figure 20, shows how the remaining energy in the network changes as the network runs longer. It can be seen from the figure that the network residual energy of the cluster sleep-wake scheduling algorithm is always higher than the other two algorithms during the network operation. This is because compared with the redundant node sleep algorithm, the cluster sleep-wake scheduling algorithm adds node rotation strategy, cluster partition mode and node classification mode to save energy consumption to reduce energy consumption. At the same time, since the perceived contribution of redundant nodes in the redundant node sleep algorithm is smaller than the perceived contribution of the working node, the more redundant nodes are awake, the greater the node redundancy in the network. Therefore, when the node fails, if you want to restore the network coverage, you need to wake up more redundant nodes, so there will be more working nodes in the network, so it will consume more energy. Therefore, when the network running time is the same, the cluster sleep-wake scheduling algorithm has more network residual energy.  The relationship between the delivery rate of UWSN network nodes and the number of experimental rounds is shown in Figure 21. In general, the delivery rates of the three algorithms tend to decrease with the increase of the number of rounds. This is due to the gradual death of nodes in the network, which affects the connectivity of the network. The random deployment algorithm and the redundant node sleep algorithm set a fixed sensing radius for the node, and the cluster sleep-wake scheduling algorithm sets the sensing radius of the node by the rank of the node. In addition, the algorithm ensures as much as possible that there are working nodes in each partition unit to keep the network connected. The different sensing radius settings of the nodes enable the network to maintain a higher connectivity in the same experimental environment. The rotation strategy of the control node of the cluster sleep-wake scheduling algorithm and the sleep wake-up method of the node reduce the energy consumption of the network and avoid premature death nodes, which provides a reliable condition for the network to maintain high connectivity. Therefore, under the same experimental conditions, the cluster sleep-wake scheduling algorithm has higher delivery rate than the random deployment algorithm and the redundant node sleep algorithm.  The relationship between the packet loss rate and the number of experimental rounds in the network is shown in Figure 22. It can be clearly seen that the packet loss rate of the three algorithms increases with the network operation. This is because the three algorithms use the same routing protocol (Vector-Based Forwarding Protocol (VBF)), so the packet loss situation increases. The trend is consistent. However, compared with the cluster sleep-wake scheduling algorithm, the random deployment algorithm and the redundant node sleep algorithm have higher packet loss rates when transmitting the same data packet (30 kpt/min). This is because the cluster sleep wake-up scheduling algorithm deploys the nodes, so that the underwater nodes are all within the communication range, ensuring reliable transmission of data. Further, they use the control node rotation strategy to prevent the control node from running out of energy and causing packet loss. All of the above methods can reduce the packet loss problem caused by the node itself in the process of data transmission during the cluster sleep-wake scheduling algorithm. Therefore, although the packet loss rate of the network increases with time, the cluster sleep-wake scheduling algorithm can still maintain a lower packet loss rate. Figure 22. Relationship between the packet loss rate and time.

Conclusions
In this paper, a cluster sleep-wake scheduling algorithm is designed for an underwater 3D environment. In the initial stage of the algorithm, many sensor nodes were randomly placed in a 3D environment, and then the sensor network was divided into partition units and clusters. Temporary control nodes could prepare for subsequent distributed scheduling. Given the emergence of redundant nodes in the network, operations such as waking up working nodes, sleeping useless nodes, and rotating temporary control nodes were performed to save network energy consumption and extend the network lifetime cycle. Finally, a UWSN with good coverage, connectivity, and network lifetime cycle was obtained. Simulation experiments revealed that compared with random deployment, the proposed algorithm performed better in connectivity, coverage, and network lifetime cycle. Compared with the depth adjustment algorithm in the same underwater 3D environment, the algorithm also had advantages in coverage.
In UWSN, excellent topology control ensures network coverage and connectivity. Due to the complex underwater environment, using a 3D coordinate system to study UWSNs is realistic and has research value. The scheduling algorithm designed in this paper, based on the network's 3D topology control, analyzes residual node energy and connectivity and sets the node's sleep and wake time.
Simulation results indicate that, under the same experimental conditions, the proposed algorithm has better coverage and connectivity than the random deployment algorithm. The sleep-wake mechanism of the working node in the algorithm can prolong the network life cycle. Simulation results also show that the cluster sleep-wake scheduling algorithm is more efficient compared with other similar topology control algorithms.
Author Contributions: W.Z. researched the literatures, conceived the study concepts, designed underwater wireless sensor network model, proposed the topology contro model and the cluster sleep-wake scheduling algorithm, carried out the simulation, analyzed the simulation results, and took charge of the entire manuscripts. J.W. and G.H. assisted with the integrity of the entire study, provided the crucial intellectual support, and revised the manuscript. X.Z. contributed to compute the size of partition unit and cluster. Y.F. contributed to polish the revised manuscript.

Conflicts of Interest:
The authors declare no conflict of interest.