LoRaWAN spreading factor allocation in a multiple-gateway environment

As this new trend of "Internet of Things" raise up, people and companies are proposing new protocols (at each ISO/OSI level) to manage the local/remote communication between an IoT device and the rest of the network. This is mainly because an "IoT-device" (such as a temperature sensor) may be off-grid (i.e. powered by batteries) and/or with limited resources.

For example, MQTT is proven to be very successful versus HTTP thanks to its specifications, which results in a lightweight implementation.

In this post I'll talk about a Physical/Datalink protocol, named LoRaWAN.

A brief introdution to LoRaWAN

LoRaWAN is a datalink protocol, used to manage access and transmissions over LoRa (LPWAN) physical links. LoRa is a Low Power Wide Area Network medium (wireless). LoRaWAN is a MAC, Media Access Control, for LoRa links. LoRaWAN defines roles and duties on a LoRaWAN network, such as a node (eg. a temperature sensor), a gateway (the "base station" which receives all trasmissions from nodes and replies back) and the role of network server.

Everyone can use LoRa transreceivers in the free spectrum band (~434 MHz in Europe). Another frequency band (~800 MHz in Europe) is licensed for business use instead.

LoRa has many parameters; the one which the research is focusing on is the Spreading Factor. The Spreading Factor is a set of parameters that specify transmit power, subfrequency and air time. LoRa define spreading factors numbered from 6 to 12, where LoRaWAN is using from 7 to 12. The lower is the spreading factor, the higher is the throughput, and the lower is the distance covered. Also, lower spreading factor means lower power consumption.

At SF7, the distance is minimal, and the throughput is high. At SF12 (or SF11, depending on bandwidth - at 125 kHz, SF11 and SF12 are swapped), the distance is the max distance covered by LoRa standard, and the data rate is the lowest.

The spreading factor also changes the Air Time (or Time On Air): at SF7, the Air Time is minimal. At each higher spreading factor, the value is nearly doubled.

In many implementations, spreading factors were assigned manually. Unfortunately, this limits the scalability of this protocol. So, many algorithms were implemented in order to automatically assign spreading factors among nodes (as LoRaWAN supports changing S.F. remotely by a gateway). Some of these algorithms are using the RSSI (Receiver Signal Strength Indicator) value.

ADR (Adaptive Data Rate)

The ADR algorithm was the first algorithm proposed, and simulated in a single-gateway scenario. It's straightforward: the spreading factor assigned to a node is the lowest s.f. possible (keep in mind that some nodes may have a lower bound for spreading factors due to the distance between the node and the nearest gateway).

[caption id="attachment_302" align="aligncenter" width="300"] A sample node disposition, with SF assigned by ADR[/caption]

The pros are clear: it's very simple and fast. The issue, however, is that when there are many nodes at the same spreading factor (because they're near the receiver), collisions and air time for that spreading factor are getting worst. This means that the efficiency of this algorithm, measured by using DER (Data Extraction Rate) is very low: in some scenarios, nearly the half of the data is lost.

EXPLoRa

A team of students and professors from CNIT studied the "spreading factor issue", and came up with a solution (it's not the only one, but I think that's the better one at the moment). Named "EXPLORA", the algorithm moves some nodes between spreading factors, balancing them by considering the Air Time. In other words, it moves the nodes in order to have the same air time for each spreading factor (on the considered gateway).

[caption id="attachment_301" align="aligncenter" width="300"] The same sample node disposition as ADR, but with SF assigned by EXPLORA instead[/caption]

This algorithm works well in a single-gateway environment, but it's not applicable to multiple gateway environments, where a moved node can increase the "stress" over a spreading factor into a close gateway.

AD-MAIORA: Adaptive Mitigation of Air Time in LoRaWAN

On October, 2017, during Network Infrastructures class, two colleagues and I began to work on LoRaWAN as class-project, specifically on the (possible) optimization of spreading factor allocation on multiple gateway environments.

By studing how ADR and EXPLORA works, we built an algorithm capable of changing the spreading factor on some nodes in a way that the "stress" is more fair distributed between all gateways. By keeping in mind that spreading factors cannot be lowered if we start from an ADR-like scenario (where a node has the minimum spreading factor possible), the algorithm move nodes (even if this means that a node may be heard by more gateways than before due to overlaps) in order to minimize the load on all possible spreading factors on all nodes.

The improvement that we were able to achieve by using own algorithm, as opposed as the ADR applied on a multi-gateway environment, is ~10% of average increase for DER.

We'll describe this algorithm in a paper, stay tuned :-)

[caption id="attachment_303" align="alignleft" width="300"] A sample 2-gateway topology, with node assigned by ADR[/caption]

[caption id="attachment_304" align="alignright" width="300"] The same 2-gateway topology, with SF assigned by AD-MAIORA[/caption]