# Energy Consumption Model for Sensor Nodes Based on LoRa and LoRaWAN
## 5 LoRa and LoRaWAN Technologies
### LoRa and LoRaWAN Overview  
The LoRa is a long range technology with low power consumption that uses the ISM band (the unlicensed radio spectrum in the industrial, scientific and medical radio band). The objectives of this technology is to increase sensor battery lifetime and reduce the device cost [23]. LoRa uses the CSS modulation (Chirp Spread Spectrum) to maintain low power characteristics for the benefit of increasing communication range [9]. The LoRaWAN is a wireless communication protocol developed by LoRa Alliance to serve for different challenges faced with long range communication in IoT applications [9].  
Figure 3a depicts the LoRaWAN network architecture. The End-devices (different sensor types) communicate to the gateway using LoRa/LoRaWAN RF interface. The gateway transmits frames to the server through a non-LoRaWAN network such as Ethernet, 3G/4G, Wi-Fi, etc. [24]. Figure 3b shows the LoRaWAN communication stack. As can be seen, the physical layer defines the ISM band (868 Mhz in Europe). In this paper, we focus on LoRa modulation without considering the Frequency Shift Keying (FSK) modulation because the LoRa modulation is more adapted to long range communication with low power consumption as indicated in [25]. The CSS modulation has been implemented by Semtech in the LoRa modulation layer. Then, the LoRa Alliance has defined the LoRaWAN communication protocol specifications in the protocol layer [26].  
Taking into account the application needs, The LoRaWAN specification defines three classes available for different power usage strategies [26]. These classes are illustrated in Figure 4 and can be briefly described as follows:  
1. Class A: In this case, sensor can initiate an uplink transmission based on their own needs. This class allows bi-directional communication, each uplink transmission is followed by two short downlink messages. Class A has the lowest power consumption [26; 27].
2. Class B: The gateway initiates the communication by transmitting downlink messages (ping slots), so the end-device can receive additional windows at scheduled fixed time-intervals. A periodic beacon from the gateway is required for synchronization. This class has the medium power consumption [27; 28].  
Class C: End-devices of this class have nearly continuously open receive windows, which can only be closed when transmitting. Class C end-devices use more power to operate than Class A or B but they offer the lowest latency for server to end-device communication [27].  
Table 1 summarizes the LoRaWAN class characteristics. As mentioned before, all transactions are started by the sensor in the case of Class A, whereas the network server can only transmit two downlink slots [17]. Then, the radio receiver stays active until the downlink frame is demodulated. If a frame was detected and subsequently demodulated during the first receive window and the frame was intended for this end-device after address and MIC (message integrity code) checks, the end-device does not open the second receive window. This class have the minimum impact on the battery lifetime of the sensor. For all of these reasons, LoRaWAN Class A will be studied in the rest of this paper.  
Figure 4: Different LoRaWAN classes.  
Figure 3: (a) LoRaWAN network architecture; and (b) LoRaWAN protocol stack.