## 3 Problem Formulation
### Fundamental Concepts for Energy Consumption
#### 3.2.2 Energy Consumption due to Packet Retransmission  
We can extend the basic equations for energy consumption adding the energy costs for transmissions and receptions of 1-hop ACK messages when the communications links are free of errors. For simplicity and considering the use of contention-free MAC protocols, we assume that every transmitted packet in a link will be acknowledged by an ACK message. Such simplification facilitates the desired mathematical verifications, even though some MAC protocols employ ACK messages that  
Figure 2: Gilbert/Elliot Markov chain. can acknowledge more than one packet at once. As comparisons are required among different approaches using the same model, such simplification will not prejudice the desired analyses. Nevertheless, the presented theoretical formulation is reasonable due to the reduced complexity and because this approach is suitable for error-prone wireless links. If we define the size of ACK messages in bits as \(a\) and \(A_{ph}\) as the total amount of bits to be transmitted for acknowledgement from hop (\(h+1\)) to hop \(h\) in path \(p\), and \(A_{ph}=D_{p}\times a\), we achieve new equations for energy consumption, as presented in (5). We expect \(s>a\) in most cases. \[ \begin{split} Et_{ph}=T_{ph}\left(e_{e}+e_{t}\,d_{ph}^{2} \right)+A_{p(h-1)}\cdot\left(e_{e}+e_{t}\,d_{p(h-1)}^{2}\right)\\ Er_{ph}=e_{e}\cdot\left(T_{p(h-1)}+A_{ph}\right)\end{split}  \tag{5}\]  
The resulting energy consumption equation for path \(p\) is defined in Equation (6). That equation takes into account the energy consumption for transmission of data packets and the corresponding ACK messages for the entire path (excluding transmission cost of the sink). One should notice that in Equation (6), bit-errors in the wireless communication links were not considered. \[E_{p}=\sum_{h=1}^{H_{p}}\left(Et_{ph}+Er_{ph}\right)+T_{p0}\cdot\left(e_{e}+e_ {t}\,d_{p0}^{2}\right)+A_{p0}\cdot e_{e} \tag{6}\]  
As it was computed the average packet error rate for transmitted packets, we can also estimate the average number of packet retransmissions. We define \(Pa_{ph}\) as the packet error rate for ACK messages (\(n=a\)), and usually \(Pt_{ph}>Pa_{ph}\) since we expect \(s>a\). A packet must be retransmitted in some particular cases. The first case is when the packet is corrupted in transmission from hop \(h\) in path \(p\) with probability \(Pt_{ph}\), usually detected by computation of the CRC code of the packet. The other possibility of retransmission is when the packet is successfully received by the hop (\(h+1\)) but the correspondent ACK message is lost with probability (\((1-Pt_{ph})Pa_{ph}\)) [27]. Considering that the maximum number of retransmission attempts is \(r\), the average number of data packet transmissions in the steady-state (initial packet transmission \(+\) retransmission attempts) of a single packet in any hop \(h\) is defined in Equation (7). \[ \begin{split}&{Rt}_{ph}=1+\left(\left(1-Pt_{ph}\right)Pa_{ph}+Pt_{ ph}\right)+\left(\left(1-Pt_{ph}\right)Pa_{ph}+Pt_{ph}\right)^{2}+\\ &\cdots\\ &+\left(\left(1-Pt_{ph}\right)Pa_{ph}+Pt_{ph}\right)\end{split}  \tag{7}\]  
If is considered an unlimited number of retransmissions, we obtain a geometric series that can be simplified to Equation (8). \[{Rt}_{ph}=\frac{1}{1-\left(\left(1-Pt_{ph}\right)Pa_{ph}+Pt_{ph}\right)} \tag{8}\]  
The probability of sending exactly one ACK message is \((1-Pt_{ph})\), referring to the correct reception of a data packet. Moreover, errors in the packet transmission or in the ACK message, with subsequent retransmission, will also result in new transmissions of ACK messages. Following the same approach in Equation (7), the average number of ACK messages is computed to be transmitted by hop \(h\) in path p, as expressed in Equation (9). \[