# Modeling the Energy Performance of LoRaWAN
## 4 Modeling LoRaWAN End-Device Current Consumption
### Acknowledged Transmission  
We next model end-device average current consumption in the acknowledged transmission approach, based on the corresponding current consumption profile of the same hardware platform as in the previous subsection. In this approach, the end-device may behave in two different ways, since the acknowledgment may be transmitted in the first receive window or in the second one. In our model, we consider both options. We initially assume BER = 0, and we subsequently extend the model in order to consider a non-zero BER. Therefore, the average current consumption of an end-device in acknowledged mode, denoted \(I_{avg\_ACK}\), can be obtained as shown in the next equation:  
\[I_{avg\_ACK}=\ p_{1 win}\cdot I_{avg\_ACK\_1}+p_{2 win}\cdot I_{avg\_ACK\_2} \tag{18}\]  
where \(I_{avg\_ACK\_1}\) and \(I_{avg\_ACK\_2}\) denote the average current consumption of the end-device when the acknowledgment is received in the first and in the second receive window, respectively, and \(p_{1 win}\) and \(p_{2 win}\) represent their corresponding probabilities. The LoRaWAN specification offers freedom for network managers and implementers to apply the policy that best suits the requirements of a specific deployment. Therefore, since there is no specific priority by default for the two receive windows, we assume that an acknowledgment may be received by the end-device in the first or in the second receive window with the same probability (i.e., \(p_{1 win}=0.5\) and \(p_{2 win}=0.5\)). We next derive the models for obtaining \(I_{avg\_ACK\_1}\) and \(I_{avg\_ACK\_2}\). Figure 7 depicts the current consumption profile of an end-device that performs an acknowledged transmission in two different situations: in Figure 7a), the acknowledgment is received in the second window, while in Figure 7b), the acknowledgment is received in the first window. (Note: in our specific scenario, we observed that for DR0-DR3, all ACKs were received in the second window, while for DR4-DR5 all ACKs were received in the first window.) When the acknowledgment is received by the end-device in the first window, the number of states involved in acknowledged transmission decreases in comparison with unacknowledged transmission, since the end-device does not need to wait for a second receive window (Table 7). On the other hand, duration of the first receive window (\(T_{rx1w}\)) and radio off interval (\(T_{off}\)) increase since the acknowledgment needs to be received and subsequently processed. Therefore, \(I_{avg\_ACK\_1}\) can be derived by using the same equations used to compute \(I_{avg\_unACK}\) (i.e., Equations (1)-(11)), but considering only the states that exist when the acknowledgment is sent in the first receive window (which is equivalent to setting both \(T_{w2w}\) and \(T_{2w}\) to \(0\) in the equations), and the values in Table 7. \begin{table}
\begin{tabular}{l l l l l l} \hline \hline \multirow{2}{*}{**State Number**} & \multirow{2}{*}{**Description**} & \multicolumn{2}{l}{**Duration**} & \multicolumn{2}{l}{**Current Consumption**} \\ \cline{3-6}  & & **Variable** & **Value (ms)** & **Variable** & **Value (mA)** \\ \hline
1 & wake up & \(T_{wu}\) & 169.2 & \(I_{wu}\) & 22.1 \\
2 & radio preparation & \(T_{pre}\) & 80.4 & \(I_{pre}\) & 13.7 \\
3 & transmission & \(T_{tx}\) & (see Table 6) & \(I_{tx}\) & 82.8 \\
4 & wait 1 st window & \(T_{1w}\) & 988.4 & \(I_{rx1w}\) & 27.1 \\
5 & 1 st receive window & \(T_{rx1w}\) & (\(T_{tx}\) _min_ in Table 6) & \(I_{1w}\) & 31.8 \\
8 & radio off & \(T_{off}\) & 337.8 & \(I_{off}\) & 13.4 \\
9 & postprocessing & \(T_{post}\) & 272.5 & \(I_{post}\) & 20.9 \\
10 & turn off sequence & \(T_{seq}\) & 37.5 & \(I_{seq}\) & 13.4 \\
11 & sleep & \(T_{sleep}\) & Equation (2) & \(I_{sleep}\) & \(45\times 10^{-3}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 7: States, variables and their values for LoRaWAN acknowledged transmission when the acknowledgment is sent in the first receive window.