# A Novel Adaptive Cluster Based Routing Protocol for Energy-Harvesting Wireless Sensor Networks
## 2 Adaptive Hierarchical-Clustering-Based Routing Protocol for EH-WSNs
### HCEH-UC Routing Algorithm
The energy collected by the cluster head needs to support data delivery with the base station and data delivery with the nodes in the cluster, as well as information interaction with the successor cluster head. The proposed HCEH-UC can decrease energy consumption through the optimization of data-routing modes and prolong the MLC of the node network. However, when a certain number of nodes in the network are in a sleep-state, this network would be defined as the network in death and cannot continue to perform the target monitoring function [14]. In this paper, the EH technology is introduced in the proposed HCEH-UC, and an HCEH-UC algorithm is proposed for EH-WSNs to accomplish uninterruptible network node coverage. The energy harvesting mode of each node cluster would be adaptively generated. According to the data-delivery energy model and the cluster head selection mechanism, energy consumption would be optimized while ensuring the routine operation of the network. Assuming that each cluster head node needs to complete at least \(Z\) times the data transmission tasks within the base station during one cycle, the energy collection of the cluster head node \(s\) needs to be greater than the threshold \(E_{\Delta}\), as shown in (11). \[E_{\Delta}\geq Z*\left(E_{Bs}+\sum_{q=1}^{Q}E_{qs}\right),q\
eq s \tag{11}\]  
where \(E_{Bs}\) represents the energy consumption when the node \(s\) is adopted as the CH; \(E_{qs}\) represents the energy consumption when transmitting data to the successor cluster head as a non-cluster head node. Assume the required charging time of up to \(E_{\Delta}\) is \(\sigma_{E}\), and the time required to complete the information collection for one cluster is \(\Delta\)T. Under certain energy harvesting conditions and the working mode of the cluster head node, the network can run permanently if the network possesses sufficient numbers of sensor nodes. However, the redundancy problem would lead to additional energy consumption in the network. To ensure the routine operation of the network, the required condition can be shown as (12):  
\[\sigma_{E}\leq(30\%*Q)*(Z*\Delta\text{T}). \tag{12}\]  
According to (12), the minimum number \(Q\) of nodes required to maintain the routine operation of the network according to the node location, communication information, and energy collection efficiency, which could ensure the cluster head node in sleep mode, has enough time for the energy collection to sustain the operation of the WSNs. External energy supply includes solar energy, wind energy, etc., which will not be 100% converted into electric energy stored by the node. Simultaneously, the data transmission mechanism will also be adaptively adjusted according to the different charging scenarios. If energy supply methods are considered, the corresponding data routing will become a more complicated issue. Therefore, in this paper, the quantity of the electricity collection, instead of the collection efficiency, will be considered. Therefore, the proposed HCEH-UC routing algorithm can be specifically expressed by the pseudocode, as shown in Algorithm 1.