# Energy Consumption Model for Sensor Nodes Based on LoRa and LoRaWAN
## 6 Numerical Results and Discussions
### Modeling of LoRa/LoRaWAN
#### 6.2.2 LoRaWAN Communication Range  
Referring to Equation (30), Figure 11 presents the required output power as a function of the LoRaWAN communication range at different spreading factor \(SF\) (assuming a path-loss exponent equal to 3 for urban area). Using LoRaWAN protocol, the theoretical maximum range that can be achieved at determined power level is obtained with \(SF\) equal to 12. In fact, with \(SF\) = 12, the sensor node needs 10 dBm to transmit data for 5 km in urban area with little obstructions. However, the sensor needs 25 dBm to transmit the same data for the same distance with \(SF\) = 7.  
The maximum LoRaWAN range as a function of \(SF\) at different transmission powers is depicted in Figure 12 using Equation (30). As we can see, if the \(SF\) increases, the LoRaWAN range increases. For a constant \(SF\) value, the LoRaWAN range increases with increasing transmission power. In fact, to reach a communication range of 4 km with \(SF\) equal to 9, we can use both 17 and 20 dBm. However, for high communication ranges (greater than 10 km), the transmission power must be fixed 20 dBm with \(SF\) equals 12. These observations are very important for the conception of our energy model: by setting a LoRaWAN transmission distance and using results in Figures 11 and 12, we can have an idea about the optimal output power and spreading factor to use for our application, which help to minimize the energy consumption by the sensor node.  
Figure 11: Required output power vs. LoRaWAN range.  
Figure 10: Effect of \(CR\) on the consumed energy, \(SF=7\) and \(BW=500\) KHz.  
Using Equations (21) and (30), Figure 13 presents the energy per useful bit evolution as a function of maximum range at different payload sizes for both 7 dBm and 13 dBm. The maximum range is reached with \(SF\) equals to 12 for both cases (we can reach 4 km with 7 dBm in Figure 13a and 6.1 km with 13 dBm in Figure 13b). It can be noticed that, if the payload size increases, the energy per useful bit decreases for high \(SF\) values (for low \(SF\) values, the payload variation does not have important effect on energy per useful bit). To reach 3 km with payload size equal to 4 bytes, we must configure \(SF\) at 11 with transmission power 7 dBm which consumes 0.21 mJ/bit. However, using transmission power 13 dBm, we can use \(SF\) equals 9 to reach the same distance 3 km with energy consumption of only 0.08 mJ/bit.  
In summary, using results found in Figures 11-13, we note that there is a trade-off among the LoRaWAN communication range, the spreading factor and the transmission power. In this case, the increase of the transmission power is more interesting in terms of consumed energy than the increase of the spreading factor. Then, we can refer to these results to find the best LoRaWAN parameter values for our application and to optimize the energy consumption of the sensor node.  
Figure 12: Maximum LoRaWAN range vs. \(SF\).  
Figure 13: (**a**) \(E_{bit}\) vs. LoRaWAN range at different payloads (\(P_{Tr}\) = 7 dBm); and (**b**) \(E_{bit}\) vs. LoRaWAN range at different payloads (\(P_{Tr}\) = 13 dBm).