## 4 Network Self-Organization
### Establishment of Cluster  
After the network topology discovery phase, nodes are set with different communication radii. Cluster heads near the sink undertake heavier forwarding tasks. Hence, they set smaller communication radii to reduce energy consumption during clustering. The following formula determines the node's communication radius \(R_{C}(N_{i})\):  
\[R_{C}(N_{i})=\left[1-c\frac{W-x_{i}}{W}\right]R_{max} \tag{10}\]  
Here, the parameter \(c\) controls the communication radius range. The network enables unequal clustering by setting different communication radii for nodes.  
The selection of cluster heads is a crucial step in the clustering process, directly affecting the network's energy consumption balance during subsequent work. At this stage, anchor nodes do not participate in clustering but serve as the medium for network coordination and management by the sink. We assume all sensor nodes have synchronized clocks. Before clustering begins, all nodes broadcast using their respective communication radii to discover neighboring nodes. The degree of a node is used to denote the number of neighboring nodes.  
\[N_{i}\cdot D=\left\{N_{j}|d(N_{i},N_{j})\leq R_{C}(N_{i})\right\} \tag{11}\]  
where \(d(N_{i},N_{j})\) represents the distance between nodes \(N_{i}\) and \(N_{j}\). When receiving broadcasts from other nodes, each node calculates the distances between them and determines whether they are neighbors based on their communication radius, updating its degree accordingly. As shown in Figure 7, node \(N_{0}\) broadcasts within its communication range and receives broadcasts from other nodes. Because the communication radius increases with distance from the sink, \(N_{0}\) only receives broadcasts from \(N_{1}\), \(N_{2}\), and \(N_{3}\). Node \(N_{0}\) then checks if the distances to these nodes are within its communication radius. From the figure, it can be observed that nodes \(N_{1}\) and \(N_{3}\) are neighbors of \(N_{0}\).  
Figure 6: Coordinates of node \(N_{i}\).  
We utilize a timing mechanism for clustering in the network, where each node has a timer whose duration \(T(N_{i})\) is determined by Formula (12). At the start of clustering, all nodes activate their timers and enter a reception state. When the node receives the broadcast from another node, it joins that cluster if this node is its neighbor. If no broadcasts declaring a cluster head are received before the timer expires, the node broadcasts to become a cluster head. The timing formula is  
\[T(N_{i})=kT_{max}\bigg{[}1-\bigg{(}\alpha\frac{E_{R}(N_{i})}{E_{0}}+\beta\frac{ N_{i}\cdot D}{n}\ +\gamma(1-\frac{1}{d_{sink}(N_{i})})\bigg{)}\bigg{]} \tag{12}\]  
where \(k\) is an adjustment factor ranging between \((0.9,1)\), and \(T_{max}\) is the maximum timing. \(E_{R}(N_{i})\) is the remaining energy of the node \(N_{i}\), \(d_{sink}(N_{i})\) is the distance from the node \(N_{i}\) to the sink, and \(\alpha\), \(\beta\), and \(\gamma\) are coefficients for energy, degree, and position of the node, respectively, satisfying \(\alpha+\beta+\gamma=1\).  
The formula shows that nodes with more remaining energy, higher degrees, and a farther distance from the sink are more likely to become cluster heads. The three coefficients determine how much these attributes influence a node's becoming a cluster head. The cluster head election directly impacts the network's energy balance in the current round. Therefore, in the subsequent experimental section, we obtain the optimal set of coefficients by comparison.