# Variants of the Low-Energy Adaptive Clustering Hierarchy Protocol: Survey, Issues and Challenges
## 2 Background and Overview of WSNs
### Residual Energy
The EMOD-LEACH protocol is effective for applications that the time is important in them, but the amount of transmitted data to a CH is less than that in LEACH. Furthermore, the distance problem persists in this protocol. Different from EMOD-LEACH, a new protocol that selects a CH in WSNs has been designed based on the idea of using energy harvested sensor nodes; this protocol is called energy-harvested-aware LEACH (EHA-LEACH) [88]. In this protocol, a node with a high capacity for energy harvesting has a high probability to be a CH. The following formula calculates the total energy harvested in a time interval [0, T] [88]. \[E_{h}(m,0\leq t\leq T)=\beta*\int_{0}^{T}P_{h}(m,t)dt-\int_{0}^{T}P_{leak}(m,t )dt \tag{8}\]  
where \(P_{h}(m\),\(t)\) indicates the harvesting rate of node \(m\) during time \(t\) and \(P_{leak}(m\),\(t)\) is the leakage power of node \(m\) during time \(t\). \(T\) is a positive time scale. The proposed function in this protocol to measure the energy harvesting of node \(m\) can be presented as [88]:  
\[F(m)=\frac{e^{\frac{(E(m,0)+E_{h}(m,0<t<T)-M)}{A}}}{1+e^{\frac{(E(m,0)+E_{h}(m,0<t<T)-M)}{A}}} \tag{9}\]  
where \(e\) is the base of the natural logarithm, \(A\) is the variance value of the energy of each node in the network and \(M\) is the mean value. To select a CH, each node follows the same procedure that is described before when explaining the LEACH protocol to create a random value. Afterwards, a node matches this value with a reference number; if it is less than the reference number, then this node becomes a CH. The reference number can be computed as follows:  
\[T(m)=\frac{F(m)}{\sum_{v\in L(m)}F(v)}\times p\times|L(m)| \tag{10}\]  
where \(p\) is the percentage of the CH nodes and \(L(m)\) is the set of the neighboring nodes of node \(m\). This protocol outperforms LEACH protocol based on the energy consumption factor, but the main drawbacks of it are the cost and overhead. Moreover, this protocol does not present a solution to the distance problem. The LEACH medium-access control routing scheme (LEACH-MAC) was presented in [89]. This protocol aims to prevent the problem of random selection of CHs in LEACH because this problem leads to decrease the network lifetime and in-crease energy consumption. This protocol resolves the previously mentioned drawback by limiting the CH advertisements in a network. When a CH selection begins, a new variable called _CHheard_[89] starts with 0 and increases when an advertisement message is received from a CH. The sending time of a CH, which is the time required for sending and receiving operations performed by it, is in the interval [0 to total advertisement time]. Each node selects a random number from this interval in the threshold function. If the time selected by a node is \(R_{t}\), then the advertisement sending time of the cluster head is calculated in Equation (11):  
\[t_{adv-CH}=\frac{R_{t}}{Current\ Energy} \tag{11}\]If a number of clusters is greater than the value of _CHheard_, then the node announces itself as a CH. Next, it will circulate an advertisement note to other nodes. The total energy consumed by a CH in receiving, collecting, and transmitting data (ECHMAC) is calculated as follows:  
\[E_{CHMAC}=lE_{elec}\frac{N}{A}+lE_{DA}\frac{N}{A}+l_{\in mp}d_{to\ BS}^{4} \tag{12}\]  
where \(A\) denotes CH advertisements, \(l\) is the length of data, \(E_{elec}\) is the consumed energy, and \(d\) represents the distance to the BS. The energy consumed by other nodes that are not CHs is found using the following equation:  
\[E_{Non-CHMAC}=lE_{elec}+l_{\in fs}\frac{1}{2\pi}\frac{M^{2}}{A} \tag{13}\]  
Similar to LEACH, this protocol increases network lifetime, but it possesses high complexity due to the calculations and overhead. A summary of these protocols based on energy efficiency in selecting a CH is presented in Table 5. The strengths and weaknesses of each protocol are also provided. Distance from a CH to the BS is a critical metric in designing routing protocols. A problem occurs when a CH is far from the BS.