Politecnico di Milano Advanced Network Technologies Laboratory The Long Range Wide Area Network - LoraWAN https://www.lora-alliance.org/ 1
Lang Range Communication Technologies Wi-Fi HaLow 2
Cellular IoT Operators o Value proposition n Lowest TCO n Lowest Energy Consumption n Out of the box connectivity n Global Reach 3
LoraWAN Architecture A Technical Overview of LoRa and LoraWAN, LoraAlliance o o o o Association-less, cellular-like architecture End devices: field devices Gateways: receive and forward messages from end devices (and network server) Network server: where all the intelligence is n Remove duplicate messages, manages ACKs, manages radio link parameters, etc. 4
LoraWAN Protocol Stack Open source Proprietary By SemTech TM Region-specific Carrier frequency [MHz] 5
LoRa TM Modulation o Proprietary chirp-based spread spectrum o Signal is chipped at a higher data rate and modulated onto a chirp signal 6
Chip and bit Rates o The chip rate [chip/s] and the nominal bit rate [bit/s] are related by the following formulas R c = BW R b = SF 4 4+CR 2 SF BW [chips/s] [b/s] o Where BW is the reference bandwidth and SF is the adopted spreading factor 7
How to Choose? o Two contrasting objectives: n Rate: I want to go fast (low SF) n Reliability: I want to go safe (high SF) 8
How to Choose? o For a given emitted power level n Rate increases as SF decreases R b = SF 4 4+CR 2 SF BW [b/s] 9
How to Choose? o For a given emitted power level n Sensitivity decreases (reliability increases) as SF increases P min = 174 + 10log 10 BW + NF + SNR (SNR is inversely proportional to SF) M. Bor, et al., Do LoRa Low-Power Wide-Area Networks Scale?, Mswim 2016 10
LoraWAN End Devices o Class A: n Downlink slots following uplink transmissions n ALOHA-like access in the uplink o Class B: n extra downlink slots available in a scheduled fashion o Class C: n Almost continuous downlink slots DL Latency Class A Class B Class C Energy consumption 11
LoraWAN Class A Devices Uplink Transmission RX window 1 RX window 2 RX_delay_1 RX_delay_2 o In EU: RX_delay_1 = 1[s]; RX_delay_2= RX_delay_1 + 1[s] o If a preamble is detected during one of the receive windows, the radio receiver stays active until the downlink frame is demodulated o 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 12
LoraWAN Encapsulation Application message Frame Level MAC Level PHYLevel 13
PHY Message structure o Preamble o Physical HeaDeR (PHDR) o PHDR_CRC, CRC: fields used for integrity check o PHYPayload: PHY message content 14
MAC Message Header 1 byte 1-230 byte 4 byte 3 bit 3 bit 2 bit o Mtype: message type o RFU: reserved for future use o Major: tells the message format 15
MAC message payload 1 byte 1-230 byte 4 byte 7-22 byte 0-1 byte Message Integrity Check Frame Port indicating the upper layer protocol 4 byte 1 byte 2 byte 0..15 byte o o o o DevAddr: end device address FCtrl: frame control field to manage adaptive data rate, ACK and MAC commands FCnt: frame counter to count up each transmitted frame Fopts: frame options containing MAC commands 16
Frame Control Field 4 byte 1 byte 2 byte 0..15 byte DL UL 1 bit 1 bit 1 bit 1 bit 4 bits 1 bit 1 bit 1 bit 1 bit 4 bits o o o o ADR (adaptive data rate) and ADRACKReq are used to manage adaptively the uplink/downlink data rate ACK: is used as valid acknowledgement Fpending is used to signal (in DL) the presence of additional frame to be delivered to the device FOptsLen indicates the size (in bytes) of the FOpts 17
Frame Options, aka MAC Commands 18
LoraWAN Class A Uplink TX example o ALOHA-like procedure to handle channel access and retransmissions n n If a confirmed message is not acknowledged, the message is retransmitted after a random time-out (ACK_TIMEOUT) ACK_TIMEOUT is randomly drawn in the interval 1[s]-3[s] and starts at the end of Receive_window2 19
ALOHA Protocol o No channel feedback required, only the ACK o Time is continuous o Protocol: n The first packet in the transmission queue is transmitted as soon as ready n If the ACK does not come, the transmission is reattempted after a random number of slots X 20
ALOHA retransmissions Random delays Collision t Node A Node B 21
ALOHA performances S in TX buffer G collisioni canale S out G-S out o Assumptions: n Stationarity: S in =S out n Traffic G distributed according to Poisson process o Packet arrivals is a Poisson point process with parameter λ o Transmissions last T o G=T x λ T 22
ALOHA performances S in TX buffer G collisions channel S out G-S out o S in incoming traffic o S out outgoing traffic o G traffic on the channel: transmissions + retransmissions o S out <=G 23
ALOHA performances o The probability P s for a packet transmission to be successful is the probability that no other packet starts transmission either in is a conflict period of 2T t-t t t+t t P s = P (N(t T,t + T ) = 0) = e 2G o The throughput is: S = GP s = Ge 2G 24
LoraWAN Performance Evaluation o LoraWAN stations may have different SF -> transmission durations o Setting n N 1 stations, with arrival frequency λ 1 and transmission duration T 1 n N 2 stations, with arrival frequency λ 2 and transmission duration T 2 25
LoraWAN Performance Evaluation o The probability that a transmission of type i (1,2) collides, P i is: P 1 1 e (N 1 1)2T 1 e N 2 2(T 1 +T 2 ) P 2 1 e (N 2 2)2T 2 e N 1 1(T 1 +T 2 ) o The probability that a generic transmission collides is: 1N 1 2N 2 P = P 1 + P 1 1N 1 + 2 N 2 1N 1 + 2 N 2 26
LoraWAN Performance Evaluation o The previous expressions can be generalized in case of n different classes of stations with transmission duration T i, scale N i and arrival frequency λ i P i 1 P = nx ny k=1 P n i=1 i=1 e (N k k)(t i +T k ) in i in i P i 27
Example P 1 N 2 28