## 3 Optimal Energy Consumption Model in HWSNs
### Average Energy Consumption  
In a hierarchical structure, the CH just works as a relay node to help network member nodes shorten their transmission distance so as to save energy consumption. For the sake of avoid making the CHs die early and causing a cascade effect in the network, a new round should begin and a new cluster structure should be built in the whole network. Due to their performance of the additional functions of data integration and relaying messages, the CHs will consume more energy than ordinary nodes. In order to prevent the premature death of some nodes due to excessive energy overhead, all nodes of the cluster should become a CH in turn and the nodes with higher residual energy should have a greater chance. In homogeneous wireless sensor networks, the resolution will be rather simple so that all nodes have the same probability for CH election. Since CHs' selection is random, which does not take into account the residual energy of each node or need the support of BS, we observe that the improved model adds some helpful determinacy factors during CHs' selection that are beneficial to the cluster stabilization. In addition, in heterogeneous networks, considering that the initial energy of all nodes is not uniform and the nodes with more residual energy should have more advantages during the phrase of CH selection, we should assign different weighted probabilities to different nodes according to the initial energy so as to prolong the network lifetime. In order to derive a reasonable probability, we analyze quantitatively the energy consumption of the data aggregation and forwarding to the destination. A radio energy model for radio hardware energy dissipation was proposed by [PERSON] [9], where the transmitter dissipated energy to run the radio electronics and the power amplifier, and the receiver dissipated energy to run the radio electronics, are given as follows:  
\[E_{Tx}(l,d)=\left\{ \begin{array}{l}lE_{elce}+l\epsilon_{fs}d^{2},d<d_{0}\\ lE_{elce}+l\epsilon_{mp}d^{4},d\geq d_{0}\end{array} \right. \tag{2}\]  
\[E_{Rx}(l,d)=lE_{elce} \tag{3}\]  
where \(E_{Tx}\) denotes the amount of energy to transmit an 1 bit message over distance \(d\), \(E_{Rx}\) denotes the amount of energy to receive the message, \(\epsilon_{fs}\) is the free space model of transmitter amplifier, and \(\epsilon_{mp}\) is the multipath model of the transmitter amplifier. The electronics energy \(E_{elce}\) depends on factors such as the digital coding, modulation, filtering, and spreading of the signal. In this model, both the free space (\(d^{2}\) power loss) and the multipath fading (\(d^{4}\) power loss) channel models were used, which depend on the distance between the transmitter and receiver. Power control can be used to invert this loss by appropriately setting the power amplifier. For example, if the distance is less than a threshold \(d_{0}\), the free space model is used; otherwise, the multipath model is used. For the sake of convenience, we do not consider the energy consumption of CH during the process of data aggregation. Suppose \(E_{rec}\) is the energy consumed by CH for receiving all messages from its member nodes. \(E_{toCH}\) and \(E_{toBS}\) are the energy consumptions during a single-time data transmission by all nodes in the cluster and the CH respectively. Then, the total energy consumption of a cluster can be calculated as:  
\[E_{cluster-in}=E_{toCH}+E_{toBS}+E_{rec} \tag{4}\]  
According to first order radio model, \(E_{toCH}\) is given by:  
\[E_{toCH}=\int_{0}^{r_{i}}2\pi\sigma(lE_{elce}+l\epsilon_{fs}x^{2})xdx=l\pi \sigma(E_{elce}r_{i}^{2}+\frac{1}{2}\epsilon_{fs}r_{i}^{4}) \tag{5}\]  
where \(r_{i}\) is the radius of the cluster head node for the competition, and \(\sigma(\sigma=N/M^{2})\) is the node's density within the range. The energy consumed by CH that forwarding data to the base station is calculated as:  
\[E_{toBS}=lE_{elce}+l\epsilon_{mp}R_{i}^{4} \tag{6}\]  
where \(R_{i}\) represents the transmission radius from cluster head \(i\) to the base station.