# SOUNET: Self-Organized Underwater Wireless Sensor Network
## 4 Construction and Operation of SOUNET
### Phase 2: Network Maintenance
#### 4.2.3 Isolation Recognition  
Link holes may cause isolation of the associated descendants. Suppose that node 2 is additionally lost in Figure 4b. Then the group of nodes from 4 to 7 becomes isolated because the node 1 is located beyond their transmission coverage. Without recognizing the isolation, the nodes inside isolated group may keep wasting energy in transmitting data. Thus, it is necessary to recognize the isolation and enter sleep mode shortly for saving energy. In SOUNET, a dead end recognizes isolation under one of the following conditions:  
* Receiving _ISO_ from the parent. * Receiving _DATA_ back from the parent who becomes a dead end. * \(n_{ack\_fail}\) reaches \(N_{MAX\_ACK\_FAIL}\). After recognizing the isolation, the isolated node immediately broadcasts an _ISO_ and enters sleep mode until it finds a valid parent. Figure 5 shows an example of isolation recognition where nodes from 2 to 4 have a common parent, node 1 (Figure 5a). In case node 1 is lost, the link hole creates the isolated group that includes nodes 2, 3, and 4 (Figure 5b). Assume that the link hole is recognized by the order of nodes 2, 3, and 4. Then, node 2 chooses node 3 as the new parent and becomes a dead end due to absence of an alternative parent. Node 3 figures out what happened in node 2 by receiving \(D\)_ATA\({}_{2/3/Y}\)_, where the subscript 2/3/Y represents the sender ID, receiver ID and sender's _DE_, respectively. After that, node 3 chooses node 4 as the new parent and becomes a dead end too. In the same way, node 4 figures out node 3's situation. Recognizing that no valid parent exists, node 4 broadcasts an \(ISO_{4/B/N}\), where the subscript 4/B/N denotes the sender ID, broadcasting mode and flag for loop existence (explained later), respectively (Figure 5c). On receiving the _ISO_ from node 4, node 3 recognizes that it is also isolated. In the same way, node 2 also recognizes the isolation (Figure 5d). Figure 5: _Cont._  
Meanwhile, if node 4 can reach node 2 in the previous example of Figure 5, the isolated group of nodes 2, 3, and 4 may form a loop, causing data to circulate infinitely. With the limited information contained in _DATA_ such as sender ID, receiver ID and sender's \(DE\), which are described as the subscripts in the previous example, the nodes of isolated group will not be able to recognize the loop. To solve this problem, some additional information needs to be contained in _DATA_ such as the source node ID at which the _DATA_ was originated (source ID), the number of relays the packet has been through (\(n_{relay}\)), and the node ID that detected the existence of a loop (_LDID_). A sensor node detects a closed loop under one of the following conditions:  
* Receiving a _DATA_ of which source ID is its own. * Receiving a _DATA_ of which \(n_{relay}\) value reaches the threshold, \(N_{MAX\_RELAY}\). Upon recognizing the loop, the sensor node called loop detector (\(LD\)) puts its own ID into the _LDID_ field and continues to relay the _DATA_. Then subsequent nodes on the loop recognize the loop by reading the _LDID_. Finally, the \(LD\) receives back the _DATA_ with its own _LDID_ and then broadcasts the _ISO_ containing the loop flag set to 'Y' and enters a sleep mode. After receiving the _ISO_, the remaining nodes on the loop sequentially follow what the \(LD\) did by broadcasting the _ISO_ and entering a sleep mode. Figure 6 shows an example to handle the loop of an isolated group. Assuming that node 4 is an \(LD\), it transmits \(DATA_{4/5/4/\mathrm{N}}\) where the subscript \(4/5/4/\mathrm{N}\) represents the sender ID, receiver ID, _LDID_ and sender's \(DE\), respectively (Figure 6a). Upon receiving back the _DATA_, node 4 broadcasts an _ISO_ and sleeps, and the remaining nodes sequentially follow the node 4 (Figure 6b). In case there is a failure in receiving _DATA_ due to collisions, which may occasionally happen, especially when the network is crowded, the loop detection is difficult. In the proposed SOUNET, the value of \(LV\) makes the detection of loop easier.