# Modeling the Energy Performance of LoRaWAN
## 4 Modeling LoRaWAN End-Device Current Consumption
### Unacknowledged Transmission
During the latter, the end-device radio is turned on for possible incoming data units, until the second receive window is closed due to absence of incoming data (state 7). Note that the shorter duration of the second receive window is due to use of the CAD mechanism (see Section 3.2.3), whereby the end-device stops preamble detection much earlier than in the first receive window if no incoming signal is detected. After that, the radio interface is turned off (state 8), a postprocessing interval follows (state 9), and the end-device executes a turn off sequence (state 10), prior to returning to the sleep state (state 11). One additional consideration is that we have not identified any specific state due to the internal communication, which takes place via Serial Peripheral Interface (SPI), between the main microcontroller and the radio interface of the mDot platform. This is consistent with the submillisecond latency of payload transmission from the microcontroller to the radio interface, for the range of payload sizes in LoRaWAN, that is typical of SPI. Figure 5: Experimental setup for current measurements of the MultiConnect mDot LoRaWAN end-device module (on the left) using an Agilent N6705A power analyzer. Let \(T_{Notif}\) be the time between two consecutive periodic message transmissions performed by the end-device, i.e., the notification period. Let \(T_{i}\) and \(I_{i}\) denote the duration and current consumption of state \(i\) in Table 5. \(I_{avg\_unACK}\) can thus be calculated as shown in Equation (1):  
\[I_{avg\_unACK}=\ \frac{1}{T_{Notif}}\sum_{i=1}^{N_{states}}T_{i}\cdot I_{i} \tag{1}\]  
where \(N_{states}\) is \(11\) in unacknowledged transmission. Note that \(T_{sleap}\) can be obtained as:  
\[T_{sleep}=T_{Notif}-T_{act} \tag{2}\]  
where \(T_{act}\) denotes the sum of the durations of all states related with transmission activities, i.e., all states except the sleep interval:  
\[T_{act}=T_{wu}+T_{pre}+T_{tx}+T_{w1w}+T_{rx1w}+T_{w2w}+T_{rx2w}+T_{off}+T_{ post}+T_{seq} \tag{3}\]  
Figure 6: Current consumption profile of a MultiConnect mDot LoRaWAN end-device performing an unacknowledged transmission with DR0. The data message transmitted has a FRM Payload size of 51 bytes (i.e., maximum possible size for DR0). \begin{table}
\begin{tabular}{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-5}  & & **Variable** & **Value (ms)** & **Variable** & **Value (mA)** \\ \hline
1 & wake up & \(T_{wu}\) & 168.2 & \(I_{wu}\) & 22.1 \\
2 & radio preparation & \(T_{pre}\) & 83.8 & \(I_{pre}\) & 13.3 \\
3 & Transmission & \(T_{tx}\) & (see Table 6) & \(I_{tx}\) & 83.0 \\
4 & wait 1 st window & \(T_{w1w}\) & 983.3 & \(I_{w1w}\) & 27.0 \\
5 & 1 st receive window & \(T_{rx1w}\) & (see Table 6) & \(I_{1w}\) & 38.1 \\
6 & wait 2 nd window & \(T_{w2w}\) & Equation (4) & \(I_{w2w}\) & 27.1 \\
7 & 2 nd receive window & \(T_{rx2w}\) & 33.0 & \(I_{2w}\) & 35.0 \\
8 & radio off & \(T_{off}\) & 147.4 & \(I_{off}\) & 13.2 \\
9 & Postprocessing & \(T_{post}\) & 268.0 & \(I_{post}\) & 21.0 \\
10 & turn off sequence & \(T_{seq}\) & 38.6 & \(I_{seq}\) & 13.3 \\
11 & Sleep & \(T_{sleep}\) & Equation (2) & \(I_{sleep}\) & \(45\times 10^{-3}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: States, variables and their values for LoRaWAN unacknowledged transmission. The durations \(T_{tx}\), \(T_{rx1w}\), and \(T_{w2w}\) are variable and depend on the DR in use. \(T_{w2w}\) actually depends on \(T_{rx1w}\), and can be obtained as:  
\[T_{w2w}=RECEIVE\_DELAY\_2-RECEIVE\_DELAY\_1-T_{rx1w} \tag{4}\]  
Although \(T_{rx2w}\) also depends on the DR, the end-device platform in our experiments uses a fixed setting for the second receive window (which corresponds to DR0), and thus the measured value for \(T_{rx2w}\) is also constant. We next provide the models to derive \(T_{tx}\), \(T_{rx1w}\) and \(T_{rx2w}\).