LoRa (Long Range) and LoRaWAN Josep Paradells josep.paradells@entel.upc.es WAN 1 LoRa • LoRa (Long Range) is physical interface • Organizations interested in LoRa are organized around LoRa Alliance industry consortium launched at MWC’15 with the following Sponsor Members: • The LoRa Alliance has defined the LoRaWAN comprising MAC and network stack around the LoRa modulation WAN 2 LoRa protocol architecture • Responsibilities and functions WAN 3 LoRa • Frequency bands: 433, 868, 915MHz,… • Channel Bandwidth (BW) 125kHz using Chirp Spread Spectrum (CSS) (can be also 250kHz and 500kHz) – The spreading factor can change adapted to the channel conditions • Range – Up to 15km in suburban areas – Up to 5km in urban areas • Technology proprietary: Semtech, but different companies producing chips: Semtech, HopeRF and Microchip WAN 4 LoRa • Chirp Spread Spectrum – Spreading factor (SF): Related to number of chips per symbol: 2SF where SF = 7, 8, 9, 10, 11 and 12 2!" π! = – Symbol duration: π΅π – Coding rate: Forward error correction protection • Additional bits to 4 bits (CR): 1, 2, 3 and 4 • Also called Coding rate to 4/5, 4/6, 4/7 and 4/8 – Bit rate 4 π # = SF 4 +!"πΆπ 2 π΅π WAN 5 LoRa • Chirp Spread Spectrum. Example SF=7 (128 values, 7 bits) – Chip = modulation bandwidth time cycle WAN 6 LoRa • Chirp Spread Spectrum – Examples WAN 7 Frame format • Depending bit rate the frame size can be shorter Preamble 8 symbols WAN 8 Spectrum • Example: channels EU863-870 Uplink: 1. 868.1 - SF7BW125 to SF12BW125 2. 868.3 - SF7BW125 to SF12BW125 and SF7BW250 3. 868.5 - SF7BW125 to SF12BW125 4. 867.1 - SF7BW125 to SF12BW125 5. 867.3 - SF7BW125 to SF12BW125 6. 867.5 - SF7BW125 to SF12BW125 7. 867.7 - SF7BW125 to SF12BW125 8. 867.9 - SF7BW125 to SF12BW125 9. 868.8 - FSK Downlink: Uplink channels 1-9 (RX1) 869.525 - SF9BW125 (RX2 downlink only) WAN 9 LoRa Channels and Spreading Factors (SFs) • Sub-GHz: ETSI ERC 70-03 g Sub-band 863 – 868 • LoRa Spreading Factors 14dBm @ 1% Freq. Range (MHz) Conditions (Pwr/DC) Spreading Factor (SF) Bit Rate 868 – 868.6 14 dBm @ 1% SF=12 250 bps g2 868.7 – 869.2 14 dBm @ 0.1% SF=11 440 bps g3 869.4 – 869.65 27 dBm @ 10% SF=10 980 bps g4 869.7 - 870 14 dBm @ 1% SF=9 1.7 Kbps SF=8 3.1 Kbps SF=7 5.4 Kbps for a duty cycle of 1% 10 channels of 125 KHz tx_time Range g1 tx_time*(100 – 1) WAN 10 LoRa SF and range • Sensitivity Range Examples WAN 11 Multi-Channel and MultiRate operation SF 12 Channel 1 SF 12 SF 9 Channel 2 SF 7 SF 7 SF 9 SF 7 Channel 3 SF 9 SF 12 Channel 1 Note: End devices may have a set of configured channels and will use the one available at any moment Channel 2 SF7 -SF8 -SF9 -SF10 SF11 -SF12 SF7 -SF8 -SF9 -SF10 SF11 S F12 SF7 -SF8 -SF9 -SF10 SF11 S F12 - 0s Channel 3 1s 2s 3s 4s Time WAN 12 LoRaWAN Network Architecture End Device End Device End Device End Device End Device End Device Gateway Gateway IP co nn ec tio n NetServer WAN Diversity IP n tio c e nn o c End Device 13 LoRaWAN examples https://console.cloud.thethings.network/ • Building a community network for IoT – TheThingsNetwork WAN 14 LoRaWAN examples: Helium (https://www.helium.com/) • Semi private network – Gateways (hostpots) provided by contributors • Frame forwarders • Validators (assures the coverage of frame forwarders) – Core provided by Helium – Users pay for traffic • Based on a cryptocurrency (HTN) for paying infrastructure providers • The cost per packet is $0.00001 USD (24 byte packets) – For example: Sigfox 140 mess/day • 140*30*12= 50,4kmess/year • Cost per message = 15€/50400= 0,00029 € (29 times more expensive than Helium) WAN 15 LoRaWAN Network Architecture NetServer End Device IP connection IP connection Gateway Authentication replay attack protection NwkSKey Encryption AppSKey FCntUp FCntDown Application Frame counters to be used against replication DevEUI - 64 bit end-device identifier, EUI-64 (unique) DevAddr - 32 bit device address (non-unique). 7 bits are fixed (prefix) AppEUI – 64 bit Identifier of the application AppKey – 128 bit key WAN Provided by the manufacturer 16 LoRaWAN elements • LoRa Gateway (base station) – – – – Maintains radio connectivity Acts as transparent bridge More than one gateway per end device is possible Enables seamless network upgrade • LoRa Network Server (central element at core network) – – – – – Maintains association with end node Configures data rates Removes duplicates Handles security and access control Interfaces with applications WAN 17 LoRaWAN procedures • ABP (Activation By Personalization) – NwkSKey and AppSKey are already available on the device – Dangerous in terms of security since if both keys are known all the communications can be in risk – DevAddr is hardcoded WAN 18 LoRaWAN procedures • OTAA (Over the Air Activation) – – – – Activates the connection when needed Uses DevEUI, AppEUI and AppKey NwkSKey and AppSKey are generated as a consequence of the join Some configuration can be done during the join procedure DevAddr WAN 19 Platform Example of Helium Device WAN 20 LoRaWAN Device Classes Gateway RECEIVE_DELAY_2 RECEIVE_DELAY_1 T X Class A RX1 RX2 SCHEDULED_PERIOD Class B R X T X R X R X RECEIVE_DELAY_1 Class C T X RX2 RX1 RX2 T X RECEIVE_DELAY_2 Class A devices are the most common ones WAN 21 LoRa capacity per channel • Uses pure Aloha: Up to 18,4% usage – If SF10 is used: max rate = 0,49messages/s – If SF7 is used: max rate = 3messages/s • Using orthogonality – Max rate = 0,49 + 1 + 1,78 + 3 mess/s = 6,27mess/s WAN 22 LoRa total capacity • Assuming 8 channels selected randomly – Max capacity = 6,27mess/s*8channels = 50,16mess/s = 180.576messages/hour • Assuming 36sec/hour (1% activity) with SF=10 we get 97 messages/terminal/hour – 1861,6 terminals per coverage area • Worts case (all terminals use high SF, such SF=10) – – – – SF10 for all terminal=>0,49 mess/s Message rate= 0,49*8channels = 3,92mess/s = 14.112 mess/hour Assuming 1% activity we have 97mess/hour 145,4 terminals per coverage area WAN 23 LoRaWAN • Advanced functionality – Adaptive Data Rate (ADR) • Allows to adjust the data rate (the spreading factor) according the link conditions. Can also adjust power • Between device and Network server • Not supported by all Network servers Example espects from LORIOT network server ADR: Adaptive Data Rate WAN 24 LoRa devices • Devices – Based on Semtech chip • Gateways WAN 25 Indoor LoRa gateway • The Things Indoor Gateway WAN 26 Bibliography • • • • • • • TTN web site: https://www.thethingsnetwork.org B. S. Chaudhari, M. Zennaro, “LPWAN Technologies for IoT and M2M Applications”, Academic Press, 2020 A. Augustin, J. Yi, T. Clausen and W. M. Townsley, “Study of LoRa: Long Range & Low Power Networks for the Internet of Things”, Sensors (Basel). 2016;16(9):1466. Published 2016 Sep 9. doi:10.3390/s16091466 “Getting Up and Running with LoRaWAN™ Long-Range Networking”, https://www.chipcad.hu/letoltes/19065_IoT4_FinalSlides.pdf LoRa documentation. https://loradevelopers.semtech.com/documentation/technical-documents/ “LoRa details”, wireless.ictp.it/school_2017/Slides/LoRaDetails.pdf Helium initiative. https://www.helium.com/ WAN 27