Document

TR013-1.0.0 CSMA

Issue link: https://read.uberflip.com/i/1507762

Contents of this Issue

Navigation

Page 6 of 17

Enabling CSMA for LoRaWAN TR013-1.0.0 ©2023 LoRa Alliance ® Page 7 of 18 The authors reserve the right to change specifications without notice. 4 CSMA Protocol for LoRaWAN 169 170 This section details the CSMA mechanism for LoRaWAN. The aim of the CSMA protocol is to 171 avoid collisions from neighboring end-devices, such that the best probability of reception at 172 the gateway is achieved with minimal energy overhead. The proposed protocol inherits the 173 rationale of LMAC-2, proposed by A. Gamage, et al., which first appeared in [MobiCom'20], 174 and was thereafter improved in [TOSN'22]. This section introduces the reader to the rationale 175 and the details of the proposed protocol with the help of state transition diagrams highlighting 176 all possible states. The reader is then presented with an example, where two nodes contend 177 for the same CH/SF combination. Finally, a table of recommended parameters is presented. 178 4.1 Rationale 179 180 A LoRaWAN collision occurs when two or more devices choose the same frequency channel 181 and spreading factor, and transmit frames that overlap in time. Therefore, in a less-congested 182 environment, an end-device can simply estimate which channel is clear and proceed to 183 transmission. This clear channel estimation is referred to as the Distributed Coordination 184 Function (DCF) Interframe Space (DIFS) phase. The purpose of the DIFS phase is to 185 ensure a clear channel. Once the CH and SF are configured, the DIFS phase is comprised 186 of performing two consecutive CADs. A successful DIFS phase occurs when both CADs 187 report a clear channel. If either CADs fail, a failed DIFS window is recognized, indicating that 188 the channel is not clear to send. In this case, the end-device should attempt the DIFS phase 189 again after configuring the radio to a different CH, while maintaining the same SF. 190 191 If the channels are known to be heavily contended, simply relying on the DIFS phase alone 192 may not be sufficient to ensure a good chance of collision avoidance. This is because, as the 193 numbers of end-devices increase, the possibility that two or more devices starting CSMA 194 process at the same time also increases, thereby increasing the possibility of collisions. The 195 addition of a random Back-Off (BO) phase after the DIFS phase can aid in reducing such 196 occurrences. Therefore, the CSMA protocol for the contended networks is comprised of two 197 parts, a DIFS phase followed by an optional BO phase. The BO phase further reduces 198 collisions by introducing a random number of few additional CADs. Doing so reduces the 199 possibility of two or more frames colliding should the end-devices start the DIFS processes 200 at approximately the same time. 201 202 If BACKOFF_MAX is set to 0, the BO phase is disabled and the variable NumBackoff is set 203 to 0. If BACKOFF_MAX > 0, then the BO phase is enabled. When the BO phase is enabled, 204 the end-device enters the BO phase immediately after completing a successful DIFS phase. 205 It first generates a random number between 1 and BACKOFF_MAX and assigns it to the 206 variable NumBackoff; this initial value of NumBackoff represents the number of BO slots 207 the end-device should complete prior to transmission. For each BO slot during the BO phase, 208 the end-device decrements NumBackoff by one for each CAD request reporting a clear 209 channel. When NumBackoff reaches zero, the frame is immediately transmitted. Since the 210 end-device continuously checks the availability of the channel during the BO phase, an 211 occupied channel will reset the CSMA state of the end-device back to DIFS phase, in which 212 case, the end-device needs to complete a successful DIFS phase again to resume 213 decrementing the remaining BO slots (NumBackoff). Note that NumBackoff is not set to 214 a new random value until the frame is transmitted. It should be noted that a busy channel 215 during a CAD operation within the DIFS or BO phase will render a failed DIFS or a BO slot, 216

Articles in this issue

view archives of Document - TR013-1.0.0 CSMA