## 4 A Transmission Strategy for Minimizing Energy Consumption
### Practical Considerations  
In a real environment, the random nature of the propagation channel will have some effects on the proposed strategy that should be overcome. In particular, both the transmission power and the packet transmission rate need to be modified in order to maintain the desired accuracy when real propagation conditions are considered. In the rest of this section, we explain how and why these two parameters of the transmission strategy have to be corrected. On one hand, the proposed strategy relies on the calculation of the transmission power that is necessary to reach the receiver with the optimum \(snr\). As commented previously, an estimation of the distance between the nodes is necessary for this calculation. In real deployments, the distance estimations calculated from TOA or RSS measurements are affected by errors (see Appendix A and B), so the transmission power that is used to reach the receiver with the desired \(snr\) may be different from the optimum (see Section 4.3 for an analysis of how this fact affects the consumed energy). For example, in the case of RSS-based localization, in which distances are estimated from the received signal strength of the _received_ packets, distances are usually underestimated. The reason is that the packets with low \(snr\) suffer from a higher loss probability and, thus, it is more probable to estimate the distance from higher-power packets, which will yield shorter distance estimations. If the transmission power corresponding to this underestimated distances is used, the packets will arrive at the receiver with a \(snr\) lower than \(snr^{*}\), and consequently, there will be more packet losses than desired. In order to avoid this effect, the transmission power has to be corrected. According to Equation (3), the \(SNR\) (in decibels) of the packets that arrive at the receiver follows a normal distribution with mean \(\overline{SNR}=P_{TX}+A-10\eta\log d/d_{0}-N_{RX}\) and standard deviation \(\sigma\). Therefore, in natural units, the \(snr\) of these packets will be a log-normal random variable with parameters \(\mu_{snr}=\overline{SNR}\cdot\ln 10/10=\ln 10^{\overline{SNR}/10}\) and \(\sigma_{snr}=\sigma\cdot\ln 10/10\). Among all the packets that reach the receiver, some are successfully received but some are not and the probability of a successful reception depends on the value of the \(snr\), according to Equation (1). Thus, the probability density function of the \(snr\) given that the packet has been received can be expressed by:  
\[ \begin{split} f_{snr/rx}(snr)&=\frac{f_{snr}(snr) \cdot PRP(snr)}{\int_{-\infty}^{+\infty}f_{snr}(snr)\cdot PRP(snr)\cdot dsnr }\\ &=\frac{\frac{1}{snr\cdot\sigma_{snr}\sqrt{2\pi}}\cdot e^{-\frac{ (\ln snr-\mu_{snr})^{2}}{2\sigma_{snr}^{2}}}\cdot\left(1-Q\left(\sqrt{2 snr \cdot\frac{W}{v_{b}}}\right)\right)^{\delta l}}{\int_{-\infty}^{+\infty}\frac {1}{snr\cdot\sigma_{snr}\sqrt{2\pi}}\cdot e^{-\frac{(\ln snr-\mu_{snr})^{2}} {2\sigma_{snr}^{2}}}\cdot\left(1-Q\left(\sqrt{2 snr\cdot\frac{W}{v_{b}}}\right) \right)^{\delta l}dsnr}\end{split}  \tag{12}\]  
If one of the received packets is used to estimate the distance, the difference between the transmission power necessary to reach the receiver with the desired \(snr^{*}\) calculated from it (\(\tilde{P}_{TX}\)) and the optimum transmission power (given by the true distance) (\(P_{TX}^{*}\)) can be expressed as:  
\[P_{TX}^{*}-\tilde{P}_{TX}=SNR-SNR^{*} \tag{13}\]  
where \(SNR\) refers here to the \(SNR\) of the successfully received packet, whose probability density function can be calculated from Equation (12), knowing that \(SNR=10\cdot\log snr\):  
\[f_{SNR/rx}(SNR)=\frac{f_{snr/rx}(SNR)}{\frac{\partial SNR}{\partial snr}}= \frac{\ln 10}{10}\cdot 10^{SNR/10}\cdot f_{snr/rx}(SNR) \tag{14}\]  
As a consequence, the estimated transmission power has to be corrected by adding a margin equal to the mean value of Equation (13).