# A Biologically Inspired Self-Organizing Underwater Sensor Network
## 3 Problem Statement and Solution
From the conditions above, we can conclude that for the whole network, if no node speaks at the same time as any of its first-order neighbors or second-order neighbors, then no communication collision exists in the network. In the network, a node can detect two types of collisions as follows  
* Collision with its first-order neighbor. When a node speaks at the same time as its first-order neighbors, it is able to detect this collision. * Collision of multiple first-order neighbors. For a node, when multiple of its first-order neighbors speak at the same time, this node is able to detect this collision. However, if the speaking neighbors themselves are not first-order neighbors to each other (i.e., they are second-order neighbors to each other), then these speaking neighbors are unable to detect this collision. The collision situations are shown in Figure 3.  
For the sensor network, it is expected that messages can be sent from any node to its destination node (i.e., the base station) successfully and as fast as possible. It is best if no collision happens in the network. As nodes are randomly deployed and the number of nodes is large, the communication process should emerge in a self-organized way. To achieve this goal, we propose a communication coordinator in this paper. As shown in Figure 1, each node in the network is equipped with the same coordinator. The coordinator is developed under a fixed-length TDMA framework as illustrated in Figure 4. In the framework, time is divided into a sequence of communication frames, with each frame consisting of \(N\) communication slots, the same as the number of nodes in the network. Each slot is assigned an ID sequentially. Thus, for each node, there exists a slot whose ID is the same as the ID of this node. The slot is called the identical slot of the node. Figure 2: Illustration of neighbors of Node A. Dots in the figure denote sensor nodes, and the ring with the same color as a node indicates the communication range of the node. Nodes B, D, and E are the first-order neighbors of Node A because they are within the communication range of Node A. Node C is the second-order neighbor of A because it is the first-order neighbor of B while not a first-order neighbor of A. The TDMA framework is adopted because it can help extend the working environment of our method. The speed of an acoustic signal is affected by several factors, such as the water temperature, water pressure, and so on. Thus, in different environments the communication speed is not the same. Under the TDMA framework, the minimum time unit for communication is a communication slot. If we set the communication slot properly, i.e., within the duration of a slot, all nodes within the range can finish the receiving process (the time for signal traveling and data parsing) under the worst situation, and the method can always work under different conditions. In this paper, high-frequency communication devices are adopted, so the communication range is several hundred meters, and the communication speed is several Kbps (generally 1-2 Kbps). As information can be parsed fast, the time for communication is mainly spent on signal traveling. Considering the speed of an acoustic signal in water is around 1500 m/s, if the size of each message packet is set to 1-2 Kbit, setting a slot to be several seconds is enough for all nodes within the communication range of the sender node to receive the signal and parse the data. As the slots are set long enough, we can ignore the impact caused by the working conditions. Based on this framework, a communication coordinator is proposed. The coordinator consists of a slot distributor and a forwarding guide. Via interaction with neighbors, the slot distributor provides a list corresponding to the communication frame indicating the nodes occupied by the current slot. Details of the slot distributor will be introduced in Section 4, where we explain how a node occupies proper slots and the network can converge to the state without collision.