# Autonomous Load Regulation Based Energy Balanced Routing in Reshargeable Wireless Sensor Networks
## 5 Routing Algorithm Based on Autonomous Load Regulation Mechanism
### Link State Evaluation  
The state of communication link is closely related to the energy state of nodes in WSN. Combined with the charging scheme, we evaluated the link state based on the energy state of nodes and energy efficiency. Firstly, the autonomous load regulation mechanism is used to set up the available forward neighbor sets for each node. Taking node \(v_{i}\) as an example, its available forward neighbor set is as follows:  
\[\mathit{AFN}(i)=\left\{j\big{|}d_{js}<d_{is},d_{ij}<r_{j},j\in V\right\} \tag{12}\]where \(AFN(i)\) is the available forward neighbor set of node \(v_{i}\). Considering the relay radius of each forward neighbor, the set records all available next-hop options of node \(v_{i}\).  
Then we evaluated the energy state of the potential next hop. Energy storage level is a key factor in analyzing the energy state due to the limited battery capacity. Using residual energy and traffic load, the energy storage level can be calculated as follows:  
\[ESL_{ij}=\frac{E_{j}+E_{j}^{c}}{I_{i}+l_{j}}\ j\in AFN(i) \tag{13}\]  
where \(ESL_{ij}\) is the energy storage level of node \(v_{j}\) if it is the next hop of node \(v_{i}\), while \(E_{j}^{c}\) is the supplementary energy of node \(v_{j}\) in a round based on the charging scheme. This indicator is used to represent the energy surplus for the current load. Furthermore, the available next hop with a high energy and low load has the higher relay priority in order to balance the energy of its neighbors.  
In addition to the energy storage level, the energy efficiency of the source node is also important in evaluating the link state. The node should cause the packets to flow along the direction from the source node to the sink in order to avoid energy waste when uploading data. Taking node \(v_{j}\) as an example, the energy efficiency can be calculated as follows:  
\[EE_{ij}=\frac{e_{is}-e_{js}}{e_{ij}}\ j\in AFN(i) \tag{14}\]  
where \(e_{is}\) and \(e_{js}\) are the energy consumption of sending a data packet directly to sink by node \(v_{i}\) and by node \(v_{j}\), respectively, and \(e_{ij}\) is the energy consumption of sending a packet to node \(v_{j}\) by node \(v_{i}\). The difference between \(e_{is}\) and \(e_{js}\) represents the active energy consumption of sending a packet and \(e_{ij}\) represents the actual energy consumption of sending a packet. A greater \(EE_{ij}\) indicates higher energy efficiency.  
The energy storage level considers the energy states of available next hops, which can enhance the evasion ability of data packets to avoid low energy nodes when they flow to the sink. Energy efficiency can establish efficient routing and avoid energy waste. Combining these two factors, the link state can be evaluated as follows:  
\[LS_{ij}=\log\left(1+ESL_{ij}\right)^{EE_{ij}}\quad j\in AFN(i) \tag{15}\]  
where \(LS_{ij}\) is the link state of node \(v_{i}\) and node \(v_{j}\). In order to balance energy, this indicator helps each node choose the optimal next hop by considering residual energy, charging scheme, traffic load, and energy consumption. Data packets can bypass the overloaded node to reach the sink while considering energy efficiency by the link state.