## 3 Cluster Routing Protocol
### Initialization Stage  
**Definition 1**.: _Residual energy ratio: \(E_{i\_curr}/E_{r\_max}\), where \(E_{i\_curr}\) refers to the current remaining energy of node \(i\), and \(E_{r\_max}\) is the maximum energy among the nodes joining in the cluster head competition._  
**Definition 2**.: _Channel efficiency ratio: \(M_{i\_curr}/M_{r\_max}\), \(M_{i\_curr}\) refers to the current channel efficiency of node \(i\), and \(M_{r\_max}\) is the maximum channel efficiency among the nodes joining in the cluster head competition._  
\[M_{i\_curr}=\left(1-\frac{L_{i\_loss}}{P_{L}(i)}\right)\frac{C_{\max}-C_{i\_ r}}{C_{\max}} \tag{6}\]  
Figure 3: Time axis diagram for the three stages of the clustering protocol.  
\(P_{L}(i)\) is the theoretical reference value in Equation (3), \(L_{i\_loss}\) is the actual loss, and \(L_{i\_loss}=P_{T}-RSSI\). In Equation (6), \(1-(L_{i\_loss}/P_{L}(i))\) reflects the channel fading condition among nodes from the physical layer, while \((C_{\max}-C_{i\_r}/C_{\max})\) reflects the link information on the MAC.  
\(C_{i\_r}\) is a variant of a maintainer in the MAC management information library, which is used to record the retransmission times of current node Probe request explorer frames [34]. As for the node that is going to be involved in the next round of cluster head selection after awakening each time, the variable \(C_{i\_r}\) in its MIB information library is reset to 0 and increases by 1 when the Probe request explorer frame retransmits once [35]. When the maximum value of the counter is reached, it gives up the transmission and discards the frame, with the counter reset to 0. Experiments prove that it is most ideal when the maximum value of \(C_{i\_r}\) is set to 6 [36; 37].  
To save energy, all nodes will enter into a short sleeping state after this round of data transmission and return to the active state at the beginning of the next round. Each round of transmission is uniformly triggered by a Sink node, and initialization includes three steps:  
Step 1. In the network initialization stage, a notice message is sent to the network via a Beacon frame at regular intervals, under the control of the BS, to awaken the nodes in the sleeping state and stop those still in the transmission state so that the data not transmitted will be continued in the next round;  
Step 2. Regarding the nodes that awaken in the network with data that will not transmitted again (node participating in the next round of transmission), the communication loss \(L_{i\_loss}\) will be calculated based on the transmitting power \(P_{T}\) in the Beacon frame received and the RSSI value measured; all nodes participating in the next round of transmission send a Probe request explorer frame to the BS and carry the node energy information \(E_{i\_curr}\), the variable \(C_{request}\) maintained by MAC and the \(L_{i\_loss}\) calculated and then transmit the three variables to the BS;  
Step 3. After receiving a Probe request explorer frame, the BS calculates \(N_{active}\), \(M_{r\_\max}\), \(M_{r\_\max}\) (the mean of the channel efficiency of all nodes in the current round), \(E_{r\_\_\max}\) and \(E_{r\_\_\_\mathit{user}}\) (the mean of the energy of all nodes in the current round) and then responds to the corresponding nodes in the form of a Probe request response frame using cross-layer scheduling.  
During initialization, a cross-layer data report is adopted to enable the interaction of the energy information and RSSI value of the physical layer and the frame retransmission number of the MAC layer via the frame and is then reported to the network layer, as shown in Figure 4.  
Figure 4: Schematic of information sharing via cross-layer.