# An Energy Efficient Routing Approach for IoT Enabled Underwater WSNs in Smart Cities
## 3 Motivation for U-(ACH)\({}^{2}\): Underwater Implementation of (ACH)\({}^{2}\)
#### Network Model
According to ([PERSON] et al., 2018) and ([PERSON] et al., 2018), the range of distance is estimated in the range of 9 < Kopt < 11 when the base station is placed away from the field. Therefore, we have also considered, at most, 10 clusters at a time and, based on the Euclidean Distance measure, the CHs are selected. On average, 10m distance is considered for the selection of CHs to communicate in the desired network. Each sensor node will sense the environment, collect the information of interest, and will forward its data packet to its nearest low depth CH. After this process, the selected CHs transmit the collective data straight towards the sink node(s). Contrarily, if the computed span in sensor node and sink is minimum than the CH, and node lies above the minimum distance CH, then the node will directly send data to sink. In order to conduct the simulation, for each scenario, we have considered 1000 rounds and for each round, we have assumed the number of nodes 'N' as 225. We have computed the number of nodes that were participating in sending the 10 kb data to BS in each round from the list of 225 nodes. Each carrier node transmits the 10 kb data packet to the BS. At the base station, the attainment of 10 kb data packet is equal to the one data packet. Likewise, we divide the received kb data to the 10 kb which shows the received data packets. Secondly, the number of packets a node sends depends upon the residual energy a sensor node holds and a position where it is located. If a sensor node is located near to the CH or sink node then ultimately packet drop ratio will be less and more packets will be sent by a node to the BS. In an  
Figure 2: Flowchart of U-(ACH)\({}^{2}\). alternative case less number of packets, a node will transmit if its residual energy is less and it is located far away from the CH or sink node. WSNs are divided into two classes while considering energy, homogeneous, and heterogeneous [52]. We have considered four routing protocols in which two of them are homogenous, such as (LEACH, TEEN) and the rest of the two are heterogenous, which are (SEP, DEEC). The working principle of LEACH-(ACH)\({}^{2}\), TEEN-(ACH)\({}^{2}\), SEP-(ACH)\({}^{2}\), CH election, selection, and DEEC-(ACH)\({}^{2}\) is demonstrated in Algorithms 1-5, respectively. ```
1:procedure
2:\(\mathit{rmax}\leftarrow\) no. of rounds
3:\(N\leftarrow\) no. of nodes
4:for\(\mathit{r}=1:1:\mathit{rmax}\)do
5:for\(\mathit{i}=1:1:\mathit{N}\)do
6:if\(\mathit{S(i).E>0}\)then
7:\(\mathit{T\_Energy}=\mathit{T\_Energy}+\mathit{S(i).E}\)
8:\(\mathit{count}=\mathit{count}+1\)
9:endif
10:endfor
11: calculate E_avg
12: calculate k_opt
13: call CH_Election
14: call CH_Selection
15:for\(\mathit{i}=1:1:\mathit{N}\)do
16: calculate min_dis_sink
17: calculate min_dis_CH
18:if\(\mathit{min\_dis\_sink<min\_dis\_CH}\)then
19: send data directly to sink else
20: send data to CH
21:endif
22:endfor
23:endfor
24:endprocedure
```  
**Algorithm 1** LEACH-ACH\({}^{2}\). LEACH-ACH\({}^{2}\), as shown in Algorithm 1, is the simplest algorithm where no hard/soft threshold and advance energy is required. Initially the number of nodes and rounds are specified for simulation. Next, the energy of node is computed to identify whether it is alive or dead. After wards, total energy of the node is computed. The count is incremented from node 1 to node 2 and so on until no dead node is found. Afterwards, the E_avg and K_opt values are computed. A call is generated to the CH-Election function and then CH-selection function. The distance from sensor node to CH and sink node is computed. Sensor node will transmit data to the CH if its distance value is less when compared to sink node or vice versa. TEEN-ACH\({}^{2}\), as shown in Algorithm 2, is a two-level clustering scheme, where the CH broadcasts two thresholds to its associated members. The first is a hard threshold while the other is known as a soft threshold, which demonstrated the variation in the value of a sensed feature.