## 3 Cluster Routing Protocol
### Cluster Formation  
Those nodes not selected as the CH are member nodes that calculate the fading loss for the distance between themselves and the CHs based on the notice sent out by the CH; then, they compare the total loss \(L_{i-all}\) of completely transmitting data to the BS; \(L_{i-all}=L_{i-CH_{n}}+L_{CH_{n}-BS}\), where \(L_{i-CH_{n}}\) is the power loss between a member node and the candidate CH \(n\) and \(L_{CH_{n}-BS}\) refers to the loss between candidate CH \(n\) and the BS. Through comparison, the CH with the minimum \(L_{i-all}\) value is selected as the final CH and joins in the cluster set \(G_{CH}\). If \(L_{i-BS}<L_{i-all}\), the node communicates with the BS directly, indicating that the network topology of the cluster structure in the network is formed.  
As indicated in Section 2, some nodes deployed on mechanical equipment move along with the moving equipment. Meanwhile, environmental changes have an impact on channel fading. These factors influence the loss arising from communication fading. After the new round of CHs is generated, nodes, excluding the CH node, calculate the loss of communication between nodes for messages, indicating the role of the CH. As in the PEAFC-CL protocol, the CH with the lowest communication loss is selected as the CH for the new round of communication. As a result, some nodes may leave their previous cluster and join other clusters. The pseudo-code for Algorithm 1 PEAFC-CL is as follows:According to the timer, initially, BS send a Beacon frame to the network during the \(T_{initialize}\) stage, the variable \(C_{i\_r}\) is reset to 0 by all nodes. All nodes participating in the followed round of transmission calculate the value \(L_{i\_loss}\) based on the _Beacon_ frame, and send a frame Probe_request_ to the BS (the Probe_request carry three variables: \(E_{i\_curr}\), \(C_{i-request}\) and \(L_{i\_loss}\)). After receiving the frame Probe_request, the BS calculates \(N_{active}\), \(M_{r\_{\_}\max}\), \(M_{r\_{\_}\max}\), \(r_{\_}\max\) and \(r_{\_}\_\_\_\_\_\) and then responds to the corresponding nodes in the form of a Probe request response frame using cross-layer scheduling. During the CH selection stage, BS broadcasts the start message \(START\_MSG\) (the \(START\_MSG\) contains six information: \(N_{active}\), \(M_{i\_curr}\), \(M_{r\_}\_aver}\), \(M_{r\_{\_}\max}\), \(E_{r\_}\max\) and \(E_{r\_}\_\_\_\_\_\) and \(E_{r\_}\_\_\_\_\_\); each node in the network randomly generates a random number \(W_{i\_r}\), \(W_{i\_r}\in\left[\begin{array}{cc}0,&W_{\_}r\end{array}\right]\). When \(W_{i\_r}<T_{i}(t)\), the node will be selected as the CH and join CH set \(G_{CH}\), otherwise the node will be member node and join non CH set \(\overline{G}_{CM}\). When the time is in \(T_{\_}{\text{Building cluster}}\), the cluster set will be constructed. The message \(CLUSTER\_HEAD\_MSG\) will be broadcast to the surrounding nodes by CHs, then the nodes from non CH set \(\overline{G}_{CM}\) calculate the fading loss \(L_{i-CH_{n}}\). Through comparison, the CH with the minimum \(L_{i-all}\) value is selected as the final CH for node \(i\). If \(L_{i-BS}<L_{i-all}\), the node does not select CH as router and communicates with the BS directly, the cluster in the network is formed.