## 3 The Clustering Protocol
### Node Dormancy Mechanism  
In general, the node dormancy mechanism is mainly divided into two categories: (1) randomly select a certain proportion of nodes to be dormant based on their different locations and (2) select nodes of different proportions to be dormant based on their distance to the CHs. After the network enters the unstable period, the cluster member nodes in the large cluster area have low energy and long transmission distance, so it is extremely easy for them to exhaust their energy. The CH needs to receive and process a large amount of information, and once it dies, all of the information in the cluster cannot be transmitted to the BS, so that valuable information may be lost. Based on the residual energy of the cluster member nodes and their distances to the CHs, the node dormancy mechanism proposed in this paper causes the member nodes with low energy and long distances to the CH to become dormant, thus reducing the load on the CH and improving the network throughput. Its steps are as follows:  
First, set up dormancy factors \(S_{dor}\) for all of cluster member nodes, which is calculated as follows:  
\[S_{dor}\Big{(}S(i)\cdot E,d_{toBS}^{i}\Big{)}=\frac{S(i)\cdot E}{d_{toBS}^{i}} \tag{32}\]  
The smaller the \(S_{dor}\) of the node \(i\), the higher the mortality rate of the node \(i\) and the higher the dormancy probability. Next, the node dormancy ratio \(P\) is determined. \[P=\Big{(}C(j)\cdot NO-\frac{n}{k}\Big{)}/C(j)\cdot NO \tag{33}\]  
In Equation (33), \(C(j)\cdot NO\) represents the total number of nodes in cluster \(j\), \(n\) is the number of currently surviving nodes, and \(k\) is the number of clusters established. Finally, the dormancy factors of all of the cluster member nodes in the large cluster are sorted from small to large, then the nodes corresponding to the pre-\(P\) dormancy factors are dormant. The detail procedure is given by the pseudo-code in Algorithm 4. To understand the node dormancy mechanism more intuitively, look at Figure 7 (A simple example). As shown in Figure 8, first, after the CH is determined in (1), the node dormancy mechanism is implemented. Then the three dormant nodes are determined in (2). After several rounds of data iterations, we determined a new CH and a dormant node in (3). After several further rounds of data iterations, only two nodes survive in (4). After re-determining the CH and the last multiple rounds of data iterations, all of the nodes of the cluster die. ``` Inputs: (1) nodes of cluster \(C\) (2) size of cluster C: \(NO\) (3) number of surviving nodes: \(n\) (4) optimal number of clusters: \(k\) Result: dormant nodes of cluster \(C\)
1: for \(i=1\to NO\)
2: calculate the dormancy factor of node \(i\), \(S_{dor}^{i}\)
3: end for
4: calculate node dormancy ratio, \(P\)
5: sort the dormancy factor set from small to large
6: put the nodes corresponding to the previous \(P\) dormancy factors into dormancy

## 4 Simulation Results

In this section, we evaluate the proposed protocol by simulating using MATLAB 2016b (MathWorks, Natick, MA, USA) on a desktop PC (Lenovo, made in Beijing, China) with Intel(R) Core (TM) i3-4170 CPU @ 3.70 GHz, 4 GB RAM. When building the network model, this study assumed that all of the wireless sensor nodes are distributed in a circular area with a diameter of \(M\), and the BS is located at the center of the area (0, 0). Specific parameters in the simulation are shown in Table 1 (Note that J in this paper stands for Joule, which is a unit of energy). We mainly compared our proposed protocol to the original classic protocols from the two kinds of networks including the homogeneous and heterogeneous networks, and the four aspects including the death round of the first node, the lifetime of the network, the trend of the network energy consumption, and the trend of the network throughput with the rounds of iterations. ### Determination of the Optimal Routing Factor

Based on the CHs priority function mentioned in Section 3.4, we can select the nodes with better positions and more adequate residual energy as the CHs.