1 Introduction

Low Power Wide Area Network like LoRaWAN is one of the connectivity paradigms for IoT applications requiring low power with long-range communication requirements. LoRaWAN is a bidirectional communication protocol  [1] and one of the most widely used among LPWAN technologies like Sigfox [2], NB-IoT [3], and many more [4] for IoT applications.

One of the physical layer modulation parameters in LoRaWAN is Spreading Factors, which also plays a significant role in the modulation and demodulation process. LoRa modulation uses the Chirp Spread Spectrum (CSS) technology in which the number of chips per symbol is depend on the spreading factor. As spreading factor increases, the number of chips per symbol increases but decreases the data rate. In a LoRaWAN network, according to application requirements, an end node transmits the packet without sensing the channel (i.e., ALOHA). This way of accessing the channel may lead to interference with other end-devices transmissions, possibly causing a failure to demodulate at the gateway. In the LoRa network, the spreading factor can cause two types of interference: (1) intra-SF interference and (2) inter-SF interference. [5]. The Intra-SF interference may happen when more than one end-devices transmit with the same SF on the same radio resource (bandwidth and channel frequency) and overlap in time. In Intra-SF interference, a received signal can be demodulated properly if Capture effect [6] happens. Inter-SF interference happens due to the quasi-orthogonal [7] nature of spreading factors. The Inter-SF interference may occur when two end devices start the transmission with different SFs on the same channel. The signal suffering from Inter-SF interference can be demodulated if their Signal to Interference Noise Ratio is higher than the Inter-SF SINR threshold [8].

Table 1 SIR threshold value to demodulate a interfered transmission

According to a study in [9], signals with Intra-SF are difficult to demodulate as compared to Inter-SF interference. In the shown Table 1, each element \(\delta _{ij}\) [dB] is the required Signal-to-Interference (SIR) threshold to demodulate a packet sent with \(SF_i\) and has interference with exactly one other transmission with \(SF_j\) [9]. The diagonal elements show the intra-SF SIR value significantly higher than the non-diagonal elements (inter-SF SIR values).

LoRaWAN network suffers from scalability issues when providing service to massive number of end-users that access the channel in a Pure-Aloha manner. The scalability issue can reduce the throughput of the network. The spreading factors allocation schemes have a significant impact on the scalability of the LoRaWAN network. Adoption of the SF allocation scheme for the end devices all depends on the application requirement. We observed that no spreading factor allocation scheme exists suitable for all application scenarios. This work presents a comprehensive survey of the spreading factor allocation schemes to motivate researchers to develop a novel spreading factor allocation scheme.

The rest of the article is organized as follows: In Sect. 2, we motivate why a review study for SF allocation schemes is required and also present the key contribution of this work. Section 3, we provide an outline of the LoRaWAN protocol and its parameters. Based on the different SF allocation schemes in the literature, a classification of the schemes is proposed in Sect. 4. In Sect. 5, we provide some challenges of the spreading factor. In Sect. 6, we present literature work done for the SF allocation. Section 7 presents the performance metrics used to analyze the LoRaWAN network. Based on the various studies for SF allocation schemes in Sect. 6, we classify the reported works based on spatial distribution and adapted performance metrics. Section 9 presents a brief summary of the review studies for LoRaWAN. In Sect. 10, we conclude and discuss the research gap for SF allocation schemes.

2 Motivation and contribution

LoRaWAN is one of the flagship wireless communication protocols deployed to support IoT applications requiring long-range communication with low power consumption. More than one billion IoT devices are currently in use around the world. LoRaWAN is coming out as one of the promising communication protocols for many advanced IoT applications such as intelligent buildings (hospitals), smart cities, supply chain, smart agriculture, and many more [10].

A typical deployment of LoRaWAN systems has a high spatial density of end-devices, possibly limiting the usable range of LoRaWAN systems unless the configuration of its operating parameters (spreading factor, bandwidth, code rate, and others) is correct. One of the vital parameters of the LoRaWAN protocol that particularly affects the performance efficiency of the network is the Spreading Factor (SF). By improving the spreading factors allocation, we can improve the LoRaWAN performance in terms of scalability, throughput, coverage, and power consumption [8, 11,12,13]. To have an effective network performance and network deployment, it is beneficial for the system designer to be acquainted with various available SF allocation schemes and their relative advantages and disadvantages. Therefore, a systematic review study on SF allocation schemes is required.

As per our knowledge, this work is the first review paper dedicated to SF allocation schemes and provides extensive knowledge about Spreading Factor allocation. We summarize our key contributions in this review article as follows:

  1. 1.

    We summarize different spreading factor allocation schemes that exist in the literature.

  2. 2.

    We classify the reported work based on the spatial distribution of the end devices and the used performance metric.

  3. 3.

    To map the system designer’s requirement, we categorize the different existing spreading factor allocation schemes as shown in Fig. 5.

  4. 4.

    We present a comparison between different spreading factor allocation schemes based on defined parameters as shown in Table 3.

  5. 5.

    We summarize the different review studies based on the LoRaWAN in Table 6.

  6. 6.

    We use our previously developed simulator to study the performance of some of the SF allocation schemes.

3 LoRaWAN background

The LoRaWAN evaluation has started in 2009 [14], and its protocol was announced in 2015 by the LoRa Alliance. LoRaWAN architecture has star topology, as shown in Fig. 1. LoRaWAN architecture consists of mainly four components (1) End device, (2) Gateway, (3) Central Network Server (NS), and (4) Application Server.

Fig. 1
figure 1

LoRaWAN network topology

In the LoRaWAN network, more than one gateway can receive an end device’s transmission if the gateways lie in the range of the end device [15]. There is no link for direct communication between a pair of end devices. The end device generates the packets according to the application requirement. The gateways and network server communicate using the Ethernet/Wi-fi/3G and others as shown in Fig. 2 [16]. A gateway that receives a transmitted packet from an end user device processes it and then forwards it to the network server. The NS may receive multiple copies of the same packet from numerous gateways. Now, the NS is responsible for discarding the insignificant copy of the packet and sending the significant packet to the required application server. LoRaWAN network processes two kinds of messages depending on the service required (a) Unconfirmed (b) Confirmed. For unconfirmed messages, end node does not require any acknowledgment from the network server, while for the confirmed messages, end node requires an acknowledgment from the NS. LoRaWAN architecture has end-to-end data encryption (Advanced Encryption Standard) and data integrity. LoRaWAN 1.0 specifies the number of security keys (1) Network Session Key (Nwk-SKey) (2) Application Session Key (AppSKey), all of these keys have the AES-128 algorithm. NwkSKey is used to provide data integrity between the network and the end node. The upper layer payload encryption and decryption are done through AppSKey.

Before start, the communication in the LoRaWAN network, an end device should follow the activation process. There can be two ways to activate an end node in a LoRa network: (1) Over-The-Air-Activation (OTAA) (2) Activation-By-Personalisation (ABP). OTAA process is the preferred activation method because it permits end devices to secure network access with security credentials. ABP is the more straightforward but less secured process as ABP end devices use the fixed device address and session key. In ABP, end node sends messages directly to the network server, when it needs to communicate with the network server. The transmitted messages are encrypted and signed. The LoRaWAN 1.0.2 specification provides more detailed information about these processes.

Fig. 2
figure 2

Overview of LoRaWAN architecture with protocol stack source

LoRaWAN standard defines three different classes [15] of the LoRa end nodes to meet the different requirements of IoT applications (i) Class-A (ii) Class-B (iii) Class-C. The features of Class-A is supported by all the LoRa end devices. Class-A devices require the lowest power as compared to the other Classes of LoRa end devices. The communication in this class is asynchronous, and two short downlink windows follow each uplink frame. A Class-B end device is synchronized to the network using periodic beacons. Class-B devices are slightly different from Class-A as Class-B devices open the extra receive windows at the scheduled time. Class-C end devices require more power among all the classes because Class-C devices are continuously listening to the channel. Hence Class-C devices consume more power.

LoRa end device operates in unlicensed spectra (Sub GHz). For example - it operates around 868 MHz in Europe, 915 MHz in North America, and 865 MHz to 867 MHz in India [17]. No third-party permission is required to deploy the LoRaWAN network as LoRaWAN follows the open LPWAN standard and operates in sub GHz.

LoRa is a PHY layer modulation based on Chirp Spread Spectrum (CSS) [18]. Up-chirps and down-chirps are used to modulate the LoRa packet frame. Up-chirp is a sinusoidal signal with increasing frequency, whereas down-chirp is a decreasing frequency sinusoidal signal. The LoRa transmitted signal can be expressed as \(S(t)= e^{j \phi (t)}\), where an increased rate of \(\phi (t)\) indicates up-chirp and decreasing rate indicates the down-chirp. \(\phi (t)\) can be expressed as [19]

$$\begin{aligned} \phi (t)=\frac{BW}{2T_s}t^2+\left( f(s)-\frac{BW}{2}\right) t, \quad 0 \le t < t_{fold} \end{aligned}$$
(1)
$$\begin{aligned} \phi (t)= \frac{BW}{2T_s}t^2+\left( f(s)-\frac{3BW}{2}\right) t, \quad t_{fold} \le t < T_{s} \end{aligned}$$
(2)

where, f(S) is the initial baseband frequency of a chirp, that depends on the symbol \(S \in \{0,1, \ldots , 2^{SF}-1\}\) and defined as \(f(S)=S\frac{BW}{2^{SF}} \) and \(t_{fold}=\frac{2^{SF}-S}{BW}\), BW is the channel bandwidth, and \(T_S\) is the symbol duration.

3.1 LoRaWAN transmission parameters

The main configurable parameters of LoRa communication are:

3.1.1 Spreading factor

Fig. 3
figure 3

Uplink modulated LoRa frame

Spreading Factor (SF) can be understood as the required number of bits to encode a LoRa symbol. LoRa devices are allowed to operate with spreading factor \(SF \in \{7, 8, 9, 10, 11, 12\}\). For example, in the shown Fig. 3 [19] the available bandwidth i.e. \(- \frac{BW}{2}\) to \(\frac{BW}{2}\) is divided into \(2^{SF}\) equal number of frequency bins (in the taken example of Fig. 3, \(SF=2\) corresponds four bins). The shown bins \(\{0, 1, 2, 3\}\) correspond to the starting frequencies for the input symbol bit patterns \(\{00, 01, 10, 11\}\) respectively. Three symbols \(\{00, 11, 01\}\) are being transmitted and each symbol using SF number of bits (i.e. 2 bits per symbols). The increment in SF by one step will double the time on-air (ToA) to transmit the same amount of data and correlate to about 2.5 dB extra link budget. One Symbol is transmitted using one complete cycle of \(2^{SF}\) chips. The symbol duration (\(T_s\)) [15] for LoRaWAN communication is defined as

$$\begin{aligned} T_s = \frac{2^{SF}}{BW}. \end{aligned}$$
(3)
Fig. 4
figure 4

LoRa packet structure

Table 2 SNR limit table

Figure 4 represents a LoRa frame. This frame structure starts with a preamble used for the synchronization between the end devices and the gateway. After the preamble, an optional header that carries information about payload size and LoRa configuration. After the header, a payload is sent that consists of actual data to be transmitted. Cyclic Redundancy Check (CRC) is attached at the end of the LoRa frame. The signal with higher SF can travel a longer distance and will have low SNR as compared to the lower SF but results in low data rate as shown in Table 2. Conversely, the signal with a lower SF will have a high data rate, but the transmitted packets are required to meet the high receive SNR threshold value to be successful at the gateway.

3.1.2 Bandwidth

The LoRa communication can operate in one of \(BW \in \{125, 250, 300\}\) kHz depending on the regional parameters [17]. A LoRa modulated signal comprises of \(2^{SF}\) chips that spread over the available bandwidth for the communication. A large value of channel bandwidth helps to achieve a high data rate but at the expense of more noise. For the uplink communication, the LoRa packet’s preamble is modulated by up-chirps while down-chirps modulate the payload, and vice versa for the downlink communication.

3.1.3 Code rate

Coding Rate (CR) is defined as the degree of redundancy that used to detect errors in every data transmission implemented by the forward error correction (FEC). This implementation is done by encoding 4-bit data with redundancies into \((4+n)\)-bits (\(n \in \{1, 2, 3, 4\}\)). Generally, code rate for LoRaWAN protocol is defined as \(\frac{4}{4+n}\). The parameters SF, CR, and BW are use to calculate the bit rate (\(R_b)\) [15] for LoRa modulation

$$\begin{aligned} R_b=SF*\frac{BW}{2^{SF}}*CR. \end{aligned}$$
(4)

3.1.4 Transmission power

Transmission Power (TP) is one of the controlling parameters for LoRaWAN communication. LoRa network can operate with transmission power from 2 dBm to 20 dBm [20]. Transmission power used by an end-device can affect the other end-devices transmissions in terms of interference.

4 Classification of spreading factor allocation schemes

We categorize the different existing SF allocation schemes as shown in Fig. 5 so that a network designer can map system requirements and identify the appropriate SF allocation category.

Fig. 5
figure 5

Classification of different spreading factor allocation schemes

The general LoRa network cell is shown in Fig. 6, where each zone \(z\in \{7,8,\ldots ,12\}\) (concentric ring around the gateway where end nodes share same spreading factor) is assigned a specific \(SF \in \{7,8, \ldots ,12\}\) with zone width \(d_z \in \{d_7, d_8 \ldots d_{12}\}\). The zone’s width and area \( A_z \in \{A_7,A_8 \ldots , A_{12}\}\) depend on Spreading Factors allocation schemes. The gateway is deployed at the center of circular cell of radius d (\(d=d_7+d_8+d_9+d_{10}+d_{11}+d_{12}\)).

4.1 Fixed spreading factors allocation

In Fixed SFs allocation scheme [12, 21] all the end devices in a cell are allocated with the same SF, i.e., only one zone in the network cell (assigned static SF). The article [21] performs the network analysis by considering the network model in which end devices are deployed in a disc shape cell with a radius of 6–100 m and consist of one, two, or four gateways. From the outcomes of [21], we observe that as the SF increases in the fixed SF allocation scheme, the packet delivery ratio (PDR) drops because with increment in SF, ToA (Time on Air) of each packet increases, and leads to more collision between the node’s transmission.

$$\begin{aligned} PDR_{\hbox {Fixed} \ \hbox {SF}_{7}}>PDR_{\hbox {Fixed} \ \hbox {SF}_{8}}>\cdots PDR_{\hbox {Fixed} \ \hbox {SF}_{12}}. \end{aligned}$$

4.2 Random spreading factor allocation

In the Random (RND) spreading factor allocation approach, each node is assigned a random spreading factor \(\in \{7,8,9,10,11,12\}\). Random SF allocation scheme has been discussed by [12, 21,22,23]. This approach is independent of the end devices distribution in the cell and its SNR (Signal to Noise Ratio) values. There are no zones for random SF allocation scheme in the LoRaWAN cell, unlike Fig. 6. Along with the Random SF allocation approach analysis, the authors in [22] proposed the capture effect-MAC (CE-MAC) protocol to enhance the throughput of the network. The authors have performed the network analysis by considering the system model in which end users are distributed randomly over a circular cell of radius 5 km, and a gateway is located at the center of the cell. The outcomes of the simulation show that the Random SF allocation scheme performs better than Equal-Interval-Based (EIB) SF allocation (described in Sect. 4.3) in terms of throughput rate and packet collision rate when the active number of end devices in the cell is small,

$$\begin{aligned} EAB> RND > EIB. \end{aligned}$$

Hence, we can conclude that adaptation of the RND SF allocation scheme will be preferable for IoT applications with a small-scale network.

4.3 Distance based spreading factor allocation

In this approach, end devices are assigned with SFs based on their distance (distribution) from the gateway, i.e., end devices near the gateway are allocated with lower SF and vice versa. SNR values are lower for the end devices that are farther away from the gateway. Hence those end devices need higher SF for having proper communication with the gateway, as shown in Table 2. Distance based SF allocation scheme [9, 22, 23] can be further categorized as-

Fig. 6
figure 6

A single LoRaWAN cell

4.3.1 Equal-interval-based (EIB) SF allocation

In this scheme, the cell radius is divided into the available SF numbers of equal intervals. For instance, if the cell radius is d and the number of available \(SF \in \{7, 8, 9, 10, 11, 12\}\) is six, then the cell radius is divided into six equal intervals of length \(\frac{d}{6}\). The interval nearest to the gateway is assigned with the lowest available SF and so on. The issue with this scheme is that more end devices are allocated with higher SF that increase the ToA (Time on Air) and lead to more collision if the end devices are uniformly distributed over the cell. This scheme of SF allocation is also known as equal-width SF allocation. From Fig. 6, we can say for EIB scheme

$$\begin{aligned} d_7=d_8=d_9=d_{10}=d_{11}=d_{12}=\frac{d}{6} \end{aligned}$$
(5)

and,

$$\begin{aligned} A_7<A_8<A_9<A_{10}<A_{11}<A_{12}. \end{aligned}$$

4.3.2 Equal-area-based (EAB) SF allocation

In this approach of SF allocation, the whole area of the cell is divided into SF number of concentric rings of equal areas, as shown in Fig. 6.

$$\begin{aligned} A_7=A_8=A_9=A_{10}=A_{11}=A_{12} \end{aligned}$$
(6)

and

$$\begin{aligned} d_7>d_8>d_9>d_{10}>d_{11}>d_{12}. \end{aligned}$$

As the area of each zone is the same, an almost equal number of end devices get assigned to each available spreading factor if the end devices are uniformly distributed over the cell. EAB scheme is preferred over EIB to have unbiased (i.e., more end-devices allocated with high SF) SF allocation. It is observed that the EAB scheme allocates lower SF to comparatively more number of end devices than EIB scheme. Lower spreading factors assign to more end devices lead to less interference because they have less ToA. The SF allocation scheme EIB and EAB both depend on the network cell orientation.

The authors in [9] have considered a single cell of radius 9.86 km model with a gateway deployed at the center and end devices distribution follows Point Poisson Process (PPP). The authors have considered the impact of co-SF and inter-SF interference, showed that EIB provides a better success probability for a small distance (approx 7 km). EAB performance drops up to some distance, and then its performance improves due to the geometrical structure of EAB zones [9]. For system model [22], EAB performance is best, and as the number of end devices increases, both EIB and EAB performances converge. From the above observation, we can conclude that the choice of EIB and EAB depends on the system model and applications requirement. It is possible that for some system models, EIB performs better than EAB, and for another system model, EAB performs better.

4.4 PHY based spreading factor

The PHY based SFs allocation can be further classified as:

4.4.1 SNR based spreading factor allocation scheme

In SNR based SF allocation [9], end users are allocated with spreading factors based on their signal to noise ratio. The transmitted signal power from an end user placed far away from the centrally deployed gateway are received with less power due to path loss between the end user and the gateway. The gateway’s responsibility is to assign the lowest possible SF to each end device to meet the SNR threshold level to have successful communication with the gateway. The SNR threshold values corresponding to each SFs are shown in Table 2. The gateway modifies the end device’s assigned SF values when the end devices cannot meet the SNR threshold level. This kind of SF allocation scheme requires more signaling at the gateway. The networks that adapt SNR-based SF allocation have similar kinds of zones as shown in Fig. 6. The relation between \(\{d_7,d_8,d_9,d_{10},d_{11},d_{12}\} \) and \(\{A_7,A_8,A_9,A_{10},A_{11},A_{12}\}\) depends on the pathloss model. The end devices have lower SNR are assigned with higher SF and vice versa. The gateway requires a low Receive Signal Strength Indicator (RSSI) to demodulate higher SFs packets. The received power by the gateway is the function of transmitted power and path loss factor.

$$\begin{aligned} P_{Rx}(d)=P_{Tx}*g(d) \end{aligned}$$
(7)

where, g(d) is the function of path-loss attenuation, \(P_{Tx}\) denotes the transmitted signal power, and \(P_{Rx}\) denotes the received signal power at the gateway. The SNR-based SF allocation scheme is also known as Path-loss Based SF allocation (PLB). From [9], it is observed that PLB SF allocation improves the success probability for the subsequent zones as compared to EIB. The SNR-based SFs allocation scheme has more signal processing and complex receiver than RND and Distance-based SF allocation.

4.4.2 Adaptive data rate strategy

One of the LoRa communication protocol features is Adaptive Data Rate (ADR) [20, 24] that controls the transmission parameters (SF, BW, CR) for the uplink communication from the end device to the gateway. ADR scheme provides optimum data rate, ToA, and energy consumption. The data rate is highly dependent on SF and BW. An end device needs to be set ADR flag in the uplink packet format to enable the ADR functionality. Once the ADR is set, the Network Server (NS) can control and instruct the end device for transmission parameters. One of the major challenges for the ADR scheme is that LoRa specification does not explain how the NS should guide the end devices of the LoRaWAN network regarding rate adaptation [20]. The ADR scheme dynamically adapts the transmission parameters based on the previous performance history of each node to enhance the system throughput and capacity. For instance: Consider the same network topology as shown in Fig. 1. The NS (LoRa Main Server) collects m most recent uplink packets transmission data (like Data Rate and SNR) for an end device A. The NS takes the maximum received SNR and corresponding data rate value out of m received uplink packets’ SNR values. The maximum received SNR value is called \(\mathrm{SNR}_{{measured}}\). The NS calculates the margin as

$$\begin{aligned} \hbox {Margin}= \mathrm{SNR}_{{measured}}-\mathrm{SNR}_{{limit}}-\hbox {margin}_{{default}}, \end{aligned}$$
(8)

where, \(\mathrm{SNR}_{{limit}}\) and \(\mathrm{margin}_{{default}}\) are defined for each SF value. Based on the calculated Margin value, the NS suggests the optimum data rate and TP to the end device for the next transmission. More details of ADR scheme is provided by LoRaWAN specification 1.0.4 [25].

4.5 Machine learning algorithm based SF allocation

The latest and trending approach for suitable spreading factors allocation is Machine Learning (ML) Algorithm based SFs Allocation [26,27,28,29,30,31]. In this approach of SF allocation, researchers use different Machine Learning algorithms (like K-mean, tree-based, reinforcement, deep-reinforcement, long-short term memory neural networks, decision tree, and many more) to assign SFs to the end users optimally. The commonly used ML algorithms for optimal SFs distribution to the spatial end devices over the cell are :

  1. 1.

    K-mean clustering K- mean is unsupervised learning. To enhance the system performance, in reported work [26, 27, 31], the authors adopted the K- mean machine learning algorithm to allocate the suitable SFs to the end devices.

  2. 2.

    Reinforcement learning The reinforcement learning approach is preferable for SF allocation in a dynamic network (where the system parameters change rapidly). If the LoRaWAN network is equipped with Reinforcement learning, it takes the suitable action, i.e., suggests the end devices best possible SF depending on the other end devices actions. In [29], the authors used the reinforcement learning approach for SF allocation. To enhance the network throughput and optimum energy consumption, the authors in [30] have adopted deep reinforcement learning to get the suitable radio resource allocation.

  3. 3.

    Decision tree This ML algorithm is used to prefer for solving a classification problem. In the LoRaWAN network, this algorithm is used to create a training model that will predict the optimal SFs for the devices or classes of end devices using the same SF. In paper [28], the authors have discussed a tree-based algorithm to enhance the overall system performance by assigning optimal SFs allocation.

In [31], the authors have discussed K-mean, Long-Short term Memory Neural Networks, and decision tree to improve the LoRaWAN network performance. One of the challenges to having a Machine Learning based analysis study is the data collection.

4.6 Optimization based spreading factor allocation

The other scheme for SFs allocation is an optimization problem-based SF allocation scheme. In this approach set of system performance evaluation equations need to be optimized with considering some constraints. In [8, 32,33,34,35], this kind of approach has been followed to optimally allocate the SF to the distributed end devices in the network. In some of the works, the authors have proposed optimization based algorithm for the optimal assignment of SF for the active devices in the network. In [8], proposed ILP (Integrated Linear Program) framework for optimal SF allocation are:

$$\begin{aligned}&\mathrm{max}\sum _{i \in I} \sum _{f \in \{7,8, \ldots , 12\}} \omega _{i} y_{i}^{f}, \end{aligned}$$
(9)
$$\begin{aligned}&\sum _{f \in \{7,8, \ldots , 12\}} y_{i}^{f}<1, \end{aligned}$$
(10)
$$\begin{aligned}&H \ge \beta y_{i}^{f} \quad \forall i\in I, f\in \{7,8,\ldots ,12\},\nonumber \\&T^{f} \bigg (1+\sum _{j \ne i} C_i^{f}y_{i}^{f}+ \sum _{f' \ne f}\sum _{j \ne i} I_{ij}^{ff'}y_i^{f'} \bigg ) < - \end{aligned}$$
(11)
$$\begin{aligned}&\frac{\mathrm{log}(\gamma )}{2 \lambda }+M(1-y_i^{f}). \end{aligned}$$
(12)

\( \quad \forall i\in I, f\in \{7,8,\ldots ,12\}\) where, \(y_i^{f}\) is the binary variable, \(\omega _i\) is weight parameter to select device i, H is the probability that increases with SF and \(\omega _i=(1-H)\), I is the set of all nodes, \(\gamma \) is the threshold value, \(C_{ij}\) is indicating intra-SF interference and \(I_{ij}\) is indicating inter-SF interference between node i and j, and M is the constant. Equation (9) has an aim to maximize the scalability of the network by maximizing \(\sum _i \sum _f y_{i}^{f}\). Caillouet et al. [8] solved the optimization problem considering the above ILP i.e. Eqs. (9), (10), (11), and (12).

The optimization problem-based SF allocation approach provides the theoretical and mathematical framework that helps to develop a suitable Spreading Factor allocation model.

5 Analysis of spreading factor challenges

5.1 Imperfect orthogonality

In [32] work, the authors have proposed a spreading factor allocation scheme under consideration of imperfect orthogonality. In [7, 36], the authors have also considered imperfect orthogonality for the LoRaWAN analysis. The authors have performed the numerical and experimental analysis to prove that there is a collision even if packets are transmitted with different SFs. The imperfect orthogonality of spreading factors is also known as quasi-orthogonality. According to [36], the imperfect orthogonality reduces the network throughput or success probability as it leads to more collision in the network, defined as

$$\begin{aligned} P_{s}(SF_m)=\sum _{j=1}^{N}\left( \left( {\begin{array}{c}N\\ j\end{array}}\right) P_j(\mathrm{cap}_{rx}, \mathrm{cap}_{{coSF}}, \mathrm{cap}_{iSF}),\right. \end{aligned}$$

where \(P_j(\mathrm{cap}_{rx}, \mathrm{cap}_{{coSF}}, \mathrm{cap}_{iSF})\) is the joint probability for the reception conditions, co-SF and inter-SF capture when there are N number of devices and among them, there are j devices with \(SF_m\) (\(m\in \{7, 8, 9, 10, 11, 12\}\)). Developing the LoRaWAN network free from imperfect orthogonality is still an open challenge for researchers.

5.2 LoRa network capacity

Many researchers have explored the issues related to LoRaWAN scalability (the total number of end users connected to the single gateway). As the number of end devices increases, it will lead to more collision and less network throughput. In [37], the authors have developed the interference model. In the proposed interference model, by evaluating the impact of the interfering node on an ongoing transmission, the authors identify the intra interference between two physical end devices. From the simulation result of [37], we observe that as number of transmitter per gateway (scalability) increases, the throughput decreases because increase in scalability leads to more packet loss as shown in the Fig. 7,

Fig. 7
figure 7

Percentage of packets lost due to collisions and percentage of packets received with the wrong payload CRC per number of transmitters per gateway. Average throughput per device. Payload size 20 bytes, single channel, multiple SFs [37]

Some other researchers have also focused on improving the network’s scalability by optimal resource allocation (SF). So, assigning the best optimal SFs to the end devices to enhance the scalability is a challenge.

5.3 Communication range

LoRaWAN protocol is known for providing long-range communication. LoRa modulation uses CSS that makes transmission more interference resist. The industries are deploying the LoRaWAN network for applications such as smart hospitals, smart homes, schools etc. End users may be located at the outdoors, inside a building, etc. In such a diverse deployment environment, the propagation losses and the signal attenuation need to be countered in order to improve received signal strength that leads to improvement in communication range [38, 39]. To analyse the communication range, the authors [39] have proposed pathloss model as

$$\begin{aligned} \mathrm{PL}=10n \log (d)+\mathrm{PL}_0+n_wL_w+n_f^{\frac{n_f+2}{n_f+1}-b}L_f, \end{aligned}$$

where for indoor \(n=2.85\), \(\mathrm{PL}_0=120.84\) is the reference path loss, \(n_w\) and \(n_f\) indicate the number of walls and floors, \(b=0.47\), the loss factor of floors and walls are represented as \(L_f=10\) and \(L_w=1.4.1\). The gateway can detect the signal below the required threshold but is unable to decode them. So devising an algorithm to decode these signals can improve the communication range. In LoRaWAN, the transmission with \(\mathrm{SF}=12\) can provide the maximum range but with the expense of more collision compared to other SFs (as \(SF=12\) packets have high ToA).

5.4 Multiple access

LoRaWAN network aims to allow thousand of end devices to communicate simultaneously in the available limited spectrum. Depending on the application requirement, the end devices transmit the data concurrently. The optimal resource (SF, BW, CR, and TP) can improve the concurrent transmission. Provided channel access condition, the dynamic allocation of resource allocation improves the multiple access of the end devices, and scalability of the network [40].

6 Related work

Spreading Factors allocation schemes have been developed for various IoT-based applications by various researchers like Cuomo et al. [11] have proposed two SF allocation schemes titled (i) EXPLoRa-SF (ii) EXPLoRa-AT with an aim of effectively allocate SFs to enhance the scalability of the LoRaWAN networks. In EXPLoRa-SF, end devices that lie in the radio range of the gateway are allocated with the Spreading Factors based on their RSSI (Received Signal Strength Indicator) values and also consider the factor of total number of connected end users with the gateway. In contrast, the EXPLoRa-AT Spreading Factors allocation scheme provides fair Air Time allocation to balance the channel load distribution among the end devices by an approach of ordered water-filling. The simulation results of both proposed schemes, outperform the Adaptive Rate Scheme for DER and throughput.

Many works have been proposed for optimal spreading factor allocation by researchers like Reynder et al. [41] have developed a distributed scheme of spreading factor and transmission power allocation for each end device to significantly optimize the PER fairness and collision probability in the LoRaWAN network. The algorithm sorts the end devices in accordance with their distance from the gateway by estimating path loss. The sorted list of end devices is further divided into K (number of the available channel for transmission) groups. Each group’s nodes have the same path loss. Developed distributed algorithm assigns the SFs to the end-devices based on their path loss, ensuring interference fairness. The simulation results of the proposed algorithm show that PER goes down up to \(6 \%\) for the devices that are far away from the gateway.

In the extended work of [11], Cuomo et al. [26] have proposed two schemes EXPLoRa-KM and EXPLoRa TS, for the unbiased allocation of Spreading Factors among the end nodes of the network. The authors have designed both schemes to enhance the Data extraction Rate (DER) and network throughput by SFs allocation. The EXPLoRa-KM approach is characterised for the critical regions (defined in [26]). EXPLoRa-KM allocates suitable SFs computed by K-mean algorithm to the end devices of the critical region to significantly reduce the collisions. To maintain traffic load balance between various SFs channels, EXPLoRa-TS assigns SFs to end devices. EXPLoRa-TS was designed with the idea that each end device transmits a variable amount of payload according to its service or application requirement. The simulation results signify that the proposed algorithm improved the Data Extraction Rate (DER) of the LoRaWAN network.

In [35] Cesana et al. have proposed a mathematical framework to optimize SFs assignment, network layout (cost-effective), and the backhaul links at design time. The objective function of an optimized SFs allocation aims to maximize the minimum achievable data extraction rate (DER) in the network. The objective function for optimal SFs allocation has been developed by considering constraints that ensure that the network achieves the target data extraction rate. The authors have followed the approach of optimization and formed a cost objective function :

$$\begin{aligned} \mathrm{min} \sum _{j \in J, k \in B_j} c_{jk}y_{jk}. \end{aligned}$$
(13)

The objective function (13) has been developed to minimize the network deployment cost. \(c_{jk}\) is the cost function of installing a gateway at vendor site j equipped with technology k and \(B_j \in \{1, \ldots b_j\}\) indicates the available technology for candidate site j. \(J \in \{1, \ldots ,M\}\) indicates set of candidate sites where the LoRaWAN gateway can be deployed. \(y_{jk}\) is the decision variable, i.e., \(y_{jk}=1\) if k technology is available for candidate site j, \(y_{jk}=0\) otherwise. In this work, the proposed SFs allocation problem is an NP-hard problem. The proposed approach is suitable for the network where the communication coverage is more concerned.

In [13] Aasser et al. have proposed two resource allocation techniques, namely (1) SensitivitySF and (2) AssignmentSF to boost the overall network performance in terms of success rate and throughput. SensitivitySF assignment algorithm adjusts each SF zones’ width to have proper communication with the gateway by assigning a specific code rate to each subset of end devices to maximize the SF network throughput. AssignmentSf approach optimizes the overall generated load within an SF tier (defined in [13]). This approach shows a trade-off between the coverage distance gained by the CR and optimal load. The simulation result considers a system model where the end devices are randomly distributed over a single circular cell with a single centered gateway. The simulation results in Figs.4 and 6 [13] show the significant improvement in success rate and success probability, respectively, as compared to the traditional adaptive data rate approach.

Some authors like Caillouet et al. [8] have provided the theoretical framework to maximize the LoRaWAN network scalability by allocating suitable Spreading Factors to the end devices. The authors have developed the integer linear program (ILP) by considering the physical capture and imperfect orthogonality effect. Developed ILP guarantees that the given reception success probability is more than the target success probability of the frames at the centrally deployed gateway. The authors have evaluated ILP Spreading Factors allocation scheme by comparing it to the distance-based SF allocation scheme.

In [42] Sorensen et al. have introduced an SF allocation approach called equal load-based SF allocation to improve the network performance. In this SF allocation scheme, the end devices are allocated SFs such that the packet traffic load per SF is the same. Based on the different SF allocation schemes, the authors have estimated single LoRaWAN cell dimensions ( annuli radius, end device population per annuli). The authors have shown the analytical and MatLab simulation comparison for three SF allocation schemes (uniform, distance-based, and equal load-based). For equal load SF allocation scheme simulation, the authors considered a single LoRaWAN cell with uneven end devices distribution. According to the simulation, the coverage probability and network throughput for equal load-based SF allocation are higher than the distance-based SF allocation.

With the same objective as [8], Amichi et al. [32] have addressed an approach for optimal allocation of Spreading Factors with a target to enhance the network throughput under the consideration of co-SF and inter-SF interference. The researchers have maximized the minimum attainable average bit rate in LoRa Networks by proposing an SF allocation algorithm based on a many-to-one matching algorithm. The proposed work has the scope to extend the work by jointly controlling transmission power and SFs allocation scheme through a distributed algorithm. The simulation results indicate that the developed SF allocation approach perform better than the Random and Distance-based SF allocation schemes in terms of data rate and network throughput.

Many authors like Ta et al. [29] have framed Spreading Factors allocation as an optimization problem for the LoRaWAN network where the end users are non-uniformly distributed. The authors have formed the optimization problem of SF allocation intending to maximize the normalized network throughput. The proposed distributed learning-based approach uses the available local information at the LoRa end devices to minimize the collisions for the LoRaWAN network by allocating the best radio resource (SF) to the end devices. The proposed utility function which needs to be maximized is shown by Eq. (14)

$$\begin{aligned} U= \sum _{s=1}^{S} \mathrm{log}(G_s \mathrm{exp}(-2G_s)), \end{aligned}$$
(14)

where \(G_s\) is the normalized channel traffic on spreading factor s.

To estimate the best SF, the authors have acquired a computationally effective version of the EXP3 (Exponential Weights for Exploration and Exploitation) algorithm to estimate the best SF. Simulation results considered the presence of capture effect and inter-SF collision. Figure 6 [29] shows that the PRR (packet reception rate) of the network is quite enhanced by employing the proposed algorithm compared to the traditional SFs selection approach (fixed SF selection and random SF selection). In [43] (extension of the reference [29]), Ta et al. have presented an open-source simulator that uses a distributed learning-based algorithm (same as [29]) to investigate the resource allocation performance under the considering of capture effect and inter SF collisions.

There are some authors like Ullah et al. [27] have provided an approach for the Spreading Factors allocation to deal with the large number of end-nodes (approx 500) in the LoRaWAN network to utilize the different available data rates efficiently. The proposed SF allocation approach uses the machine learning algorithm called K-Mean clustering instead of using the concept of steps distance (distance-based approach) from the gateway to define the different spreading factor zones’ areas [44]. The developed algorithm allows a maximum range to SF regions to enhance the network coverage probability. The proposed algorithm finds the set of K centroids C that minimizes the distance between any end node and its nearest centroid in each iteration. The Eq. (15) evaluates the k-means of the end devices and returns the nearer centroids C.

$$\begin{aligned} C= \arg _{C_K \in C} \min \frac{1}{\Vert \text {ED}_{K}\Vert } \sum _{X_i \in \text {ED}_{k}} \text {dist} (C_K, X_i)^2, \end{aligned}$$
(15)

where \(\mathrm{ED}_{K}\) is the set of end devices at the Kth iteration of the algorithm, \(X_i\) is a LoRa end device in \(\mathrm{ED}_{K}\), and \(C_K\) is the closest centroid of \(X_i\). The authors considered the system model where the end devices are uniformly distributed over the circular cell for the simulation results. The simulation result shows the improvement in network coverage probability up to \(5 \%\).

A tree-based spreading factor clustering algorithm (TSCA) has been proposed by Guibing Zhu et al. [28] for SFs allocation to enhance the coverage and capacity of a multihop network. This approach off-loads the network traffic in many sub-networks as per the number of nodes, data rates, and network topology of each sub-network. Based on network clustering, these sub-networks linked to a sink node are assigned a specific SF. The specific SF assignment enables the network to perform parallel packet transmission with multiple available spreading factors. The proposed algorithm TSCA balances the Time on Air (ToA) between formed sub-networks. The proposed work considered the rectangular cell geometry with uniformly and randomly distributed end devices for the simulation-based results. The proposed algorithm’s simulation results show the reduction in ToA up to \(20\%\).

Li et al. [45] have found an optimal way to allocate resources to the end-devices of non-orthogonal multiple access (NOMA) LPWA network by formulating minimum transmission rate maximization problem to improve connectivity. The authors have considered intra-cluster (intra-SF) and inter-cluster (inter-SF) interference in estimating the optimal transmission rate. To enhance the scalability of the network, the authors have proposed an SF allocation (characterised by time) scheme to assure the interference impartiality of the inter-cluster interference. The proposed work developed the expression to find series of nodes that utilizing the same SF, ensuring interference fairness. The simulation findings show that the proposed algorithm in NOMA enabled the LPWAN network to support the massive connectivity of IoT applications.

A novel SF allocation scheme called Real-Time SF Upgrade (RTSFU) has been proposed by Cuomo et al. in [46] to have reliable communication over the wireless channel. The proposed approach allocates the SFs dynamically with considering several collisions per end device. In the proposed work, a new metric named Re-transmission Data Extraction Rate (REDER) has been introduced to measure the network performance. The authors have adapted the Spatial Point Process (SPP) to model the distribution of end devices over the LoRa network. The proposed SF allocation scheme and metric are both based on the REDER mechanism. RTSFU works in real-time, it suggests the optimal radio resource (SFs) to the end devices that already had SF allocation according to EXPLoRa-AT [11].

Cai et al. [34] establish a channel collision and link budget model in NS3 simulator to perform dynamic parameters (including SF, BW, CR, TP, and many others) selection algorithms. The proposed dynamic parameter selection algorithm is based on the Orthogonal Genetic Algorithm (OGA). To get an optimal resource allocation (\(S=\{\hbox {SF,BW,CR,TP}\}\)), N number of end-devices need to search in \(N^{6*4*3*13}\) space and GA (same approach as [33]) provides feasible solutions for these kinds of optimization problems. The paper’s simulation results signify \(30\%\) improvement in Packet Delivery Rate (PDR).

Zorbas et al. [47] proposed Optimal SF configuration Problem (OSFP) to assign optimal SFs to the uniformly distributed end-devices of the network. The OSFD has been proposed with an aim to maximize the overall average success probability with the minimum required data collection time (ODCT). OSFP defines the minimum SF per node as

$$\begin{aligned} \mathrm{max}_{\alpha _{7}}, \ldots , \alpha _{12} \left( \sum _{f=7}^{12}P_{{avg}}^{f} \alpha _f\right) , \end{aligned}$$
(16)

where, \(\alpha _f\) is the percentage of nodes configured with SF f such that \(\sum _{f=7}^{12} \alpha _f=1\) and \(P_{{avg}}^{f}\) is the average success probability for SF f. The authors have considered SF orthogonal transmission and capture effect. The calculated expression for overall average success rate per spreading factor depends on the proportion of nodes using each SF and transmission time. The paper’s simulation result shows that a hundred percent of overall success probability can be enhanced using the proposed optimal SF allocation.

The two SFs allocation schemes (i) Channel-Adaptive SF Recovery Algorithm (ii) Distance-Based SF Assignment Algorithm (ED sensitive) have been presented by Farhad et al. [12]. Both schemes have been proposed to enhance the packet success delivery ratio while reducing the impact of inter-SF and intra-SF interference. The proposed channel-adaptive SF scheme is triggered once the transmitted packet is lost (ACK failure). This scheme keeps tracking the successful and unsuccessful transmission with each SF through the counter (ACK_CNT and ReTx_Left_CNT). On this basis, it allocates the SF to the end devices of the network. The paper also presented the typical SFs allocation scheme [15]. In the second scheme, i.e., Distance-Based SF Assignment Algorithm, an end-device is assigned with the SF based on the distance between the end-user and the gateway (Euclidean distance) and received transmitted power at the gateway. This scheme is more suitable for static IoT applications.

The researchers like Narieda et al. [33] have proposed a Spreading Factors allocation scheme to improve throughput or packet reception probability (PRP) considering the constraint of overall energy consumption of all the end-devices in the LoRa network. The authors have formulated PRP expression by considering the SF imperfect orthogonality in LoRaWAN and observed that developed packet reception probability could be strongly improved by appropriate SFs allocation. A simple Energy Consumption Model is used in the proposed scheme to formulate the optimization problem (maximize the minimum PRP). The formulated optimization problem is a non-convex optimization problem that general convex optimization techniques can not solve. Hence to solve the optimization problem, the authors have used the approach of Distributed Genetic Algorithm (GA). The considered optimization problem in [33] is

$$\begin{aligned} s^{{OPT}}=\arg _{s \in \mathcal {S}} \mathrm{max} \{ \mathrm{min} {P_{{PRP},i}(s)}\}. \quad i=1, \ldots , N_{{ED}}, \end{aligned}$$

where \(s^{{OPT}}\) is the \(N_{{ED}}\) dimensional vector for the suitable spreading factor allocation \(s^{{OPT}}=\left[ s_1^{{OPT}}, \ldots , s_{N_{{ED}}}^{{OPT}} \right] \). The comparison between the proposed algorithm, SF-SIR (Signal to Interference Ratio), and SF-distance performance has been presented in the paper. The simulation result in Fig. 2 [33] shows that packet reception probability and average current consumption are improved when the system adopts the proposed algorithm.

A novel and tractable Integer Linear Program (ILP) model has been proposed by Premsankar et al. [48] to assign optimal transmission power (TP) and SFs to the end devices to have reliable communication with low power consumption. The optimal SFs allocation model consists of two ILP (i) OPT-MAX, (ii)OPT-DELTA. The main aim behind OPT-MAX is to minimize the maximum collision probability in each SF zones. While OPT-DELTA has a slightly different aim, it balances the collision probability per SFs, considering the factor of total end devices assigned to the same spreading factor. For an optimal TP (Transmission Power) assignment to the end nodes, an ILP model OPT-TP has been proposed. In this model, optimal power is assigned to the end device once the assignment of SFs through OPT-MAX or OPT-DELTA is known. The simulation results signify a rise in packet delivery ratio with minimal energy consumption.

Optimal SF allocation schemes have been extensively explored by many researchers like Xie et al. [49] have proposed a LoRa-FDF algorithm for suitable SFs allocation to the end devices of the network. LoRa-FDF spreading factor distribution consists of two parts (1) Spreading Factor Optimal Propositional Distribution (SFOPD), (2) Spreading Factor Suboptimal Proportion Distribution (SFSPD). The difference in data transmission success rate of the end devices using different SFs is less when deploying is done following SFOPD, leading to improved network performance. The SFSPD has a goal to optimize the SFs. The proposed algorithm LoRa-FDF exploits the boundary end devices by allocating optimal SFs. In simulation results, the proposed algorithm has been compared with other schemes like EXPLoRa [11], min-Distance, minAirTime [50] and show that LoRa-FDF scheme has better packet success probability and throughput.

Haxhibeqiri et al. [51] have presented multiple SFs allocation approaches for a multi-operator LoRaWAN deployment scenario.

  1. 1.

    First, the authors have proposed an optimal formulation for fair SFs assignment with an objective to maximize the logarithmic sum of the normalized throughput per SF for a multi-operator scenario.

  2. 2.

    Proposed a gradient ascent-based iterative algorithm to solve the above problem with partial inter-network cooperation maintained via secure aggregation.

  3. 3.

    The other approach for SF allocation is based on Game Theory. As the algorithm is proposed for multi-operator where the multi operators want to maximize their normalized throughput. The paper shows that the game theory approach converges to an efficient Nash equilibrium.

  4. 4.

    In the above approach to achieve nash equilibrium, all the operators should cooperate. The authors have proposed the learning-based approach, i.e., neural network, to know the success rate per spreading factor in the scenario where the operators are unlikely to cooperate.

The simulation of the above-proposed approaches significantly improves the total normalized throughput and packet delivery ratio.

A dynamic Spreading Factor allocation scheme has been proposed by Hamdi et al. [52] to enhance the overall performance of the LoRaWAN network in terms of symbol error ratio. The proposed SF algorithm dynamically allocates SFs to the LoRa end devices based on instantaneous channel realization. Such a new dynamic SFs allocation approach boosts the system performance based on the current channel utilization compared to the traditional SF allocation schemes. The simulation shows that using a dynamic SF allocation scheme rather than a static SF allocation scheme improves the system’s performance.

Mu et al. have proposed a run time SFs allocation approach in [53] intending to increase the data collection throughput rate. The proposed run time SFs allocation approach adopts the K-Nearest Neighbors (KNN) algorithm to estimate the suitable SFs based on the current link conditions to meet the network requirement. This proposed approach is the first work to investigate SFs allocation for the LoRa devices installed on the running vehicles. By adjusting the KNN algorithm parameter, the proposed SF algorithm can meet the performance requirement.

Some authors like Sallum et al. [54] have proposed a practical approach to improve the Quality of Service (QoS) of the LoRaWAN network by tuning specific radio resources (SF and carrier frequency). The proposed work uses mathematical optimization Mixed Integer Linear Programming (MILP) problem formulation to find the suitable setting for spreading factor and carrier frequency (CF). Suitable allocation of resources improves the overall network Data Extraction Rate (DER), reduces the collision probability and energy consumption. For optimal resource allocation, this work considered the perfect orthogonality between the available SFs. The main objective is to maximize the success probability (i.e., minimizing the collision probability) for each \(\{SF,CF\}\) set. To model MILP, the authors defined an array of tuples \(R_{i\in \{1, \ldots , n\}}=(sf_{i,SF},cf_{i,CF})\) for each end device where, CF is the list of available CFs and SF is the list of available SFs. The objective function (Eq. (17)) of the proposed work defined by MILP that need to be maximized :

$$\begin{aligned} \sum _{cfi \in CF} \sum _{sfj \in SF} (U_{cfi,sfj}-U_{cfl,sfk}).\\ cfl:cfl \in CF \wedge cfi \ne cfl;\nonumber \\ sfk:sfk \in SF \wedge sfj \ne sfk;\nonumber \end{aligned}$$
(17)

where, \(U_{sf}\) and \(U_{cf}\) indicate the utilization of each SF, CF pair. The above objective function results in the minimum load for each SF, CF pair. The simulation result of the proposed approach leads to \(6 \%\) in DER and number of collisions 13 times smaller as compared to traditional LoRa resource allocation policies.

Some researchers like Heusse et al. [55] optimized the SF boundaries, i.e., concentric ring cell around the gateway where the end devices share the same spreading factor. The optimization is based on the SNR of the end nodes available on the SF boundaries, and calculated SNR corresponds to probability H. Whenever probability H drops below \(H_{{target}}\) threshold, the proposed algorithm modifies the allocated SF for the boundaries. For the simulation, the authors considered three different scenarios (1) Small Cell (2.82 km) (2) Medium Cell (5.23 km) (3) Large Cell (7.36 km). The simulation results of the proposed approach for the considered scenarios show an improvement in Packet Delivery Rate (PDR) with the maximum number of nodes.

Kim et al. [56] have proposed Adaptive Spreading Factors selection (ASFS) to maximize the throughput with low network cost, using single channel cheap LoRa modules for the multi-hop networks. Proposed ASFS reduce the interference significantly, which leads to high network throughput and packet reception ratio. In the proposed work, two different LoRa modems (SX1272 and SX1301) were used by the authors. These modems are connected in a star topology, and mesh topology, and tree topology. The authors implemented the ASFS in a tree topology and mesh topology using the library on the SX1272. The simulation results in Figure 5 and Figure 6 of [56] signify that the proposed ASFS performs better than SX1272 (without ASFS) in terms of both packet reception rate and network throughput. ASFS scheme may provide satisfactory performance for those applications that require high throughput on a multi-hop network. In [57] the authors implemented SFs optimization using an adaptive algorithm by regulating the signal-to-noise ratio thresholds. The proposed algorithm has been developed with an aim to maximize the network throughput by considering the capture effect.

Table 3 Comparison between different spreading factor allocation schemes

Carvalho et al. [58] have proposed a reinforcement learning (RL) approach to optimize the traditional Adaptive Data Rate (ADR) mechanism. Depending on observed state \(s_t\) at t, the proposed RL-ADR takes an decision \(a_t\). According to the end device state changes to \(s_{t+1} \), the proposed RL-ADR receives an reward \(\gamma (s_t,a_t)\) (\(\gamma \) is the discount function). The objective function of the RL-ADR is to magnify the collected reward. The authors have presented a comparative review between the proposed RL-ADR and the classic ADR. The authors have used the LoRaWAN NS3 module to simulate the proposed RL-ADR scheme. In the simulation, the authors have considered three different scenarios based on the signal-to-noise variation. The simulation results indicate that the proposed RL-ADR can perform better than the traditional ADR when RL-ADR is trained for a sufficient duration.

Jiang et al. [59] have proposed an algorithm to improve the standard Adaptive Data Rate (ADR) performance. The standard ADR is not suitable for dynamic or mobile end devices. Due to the complexity of the harsh environment (like rain, snow, etc.), the standard ADR is unable to provide a suitable data rate to terminal equipment. Therefore, the authors have proposed an effective and modified ADR algorithm termed New Dynamic ADR (ND-ADR). The authors have also developed a modified OKUMURA-HATA model that introduced an additional noise element \(\beta \) to simulate the wireless channel losses in harsh environments. The proposed ND-ADR combines the calculated RSSI by the developed OKUMURA-HATA and recently received n packets average SNR as the adjustment index. The proposed ND-ADR has used class of dynamic selection algorithm to find the suitable value of n. According to the simulating results, the ND-ADR can reduce the network energy consumption by \(13 \%\), increase system throughput by \(15 \%\) approx, and reduce network delay up to \(18\%\).

A comparison between different reviewed SFs allocation schemes with various features is shown in Table 3. We observe that adaptation of an SF allocation scheme depends on the considered system model and applications requirement. This paper motivates us to develop a general SFs allocation scheme adaptable to any application scenario. The features on which basis a comparison between different SFs allocation schemes shown in Table 3 are defined as

  1. 1.

    Performance It indicates the overall system throughput.

  2. 2.

    System adaptation This feature indicates whether the SF allocation scheme in the network is capable of handling change in dynamic system parameters (\(\lambda _0\), and \(\eta \)). The adapted SF allocation scheme should be able to handle changes in system parameters to improve system performance.

  3. 3.

    Ease of implementation This feature indicates the amount of processing required at the gateway to decode a transmitted symbol from an end device, i.e., the gateway’s receiver complexity.

  4. 4.

    Application This feature handling depends on the development of the network area. For instance, mitigation from rural to urban scenarios will increase in many end devices as applications increase. Deletion and addition of the end devices are prevalent scenarios in the real network. The SFs allocation scheme, which can handle the dynamic scale of the network, is preferable.

Table 4 Different LoRaWAN network performance metrics
Table 5 Different spatial distribution of the end devices and the gateway

7 Brief description of performance metric used

This section of the paper presents some of the performance metrics used by different researchers to evaluate the LoRaWAN network performance.

7.1 Outage probability

The outage probability is defined as the distance from the end device at which the received SNR drops below the threshold value. For LoRaWAN network, instantaneous SNR [27] can be defined as \(SNR=\frac{P_1\Vert h_1\Vert ^2g(d_i)}{\mathcal {N}}\), where \(P_1\) is the transmit power, \(\mathcal {N}\) is the variance of the White Gaussian noise, \(h_1\) is the channel coefficient, and \(g(d_i)\) is the path loss attenuation function. LoRa communication between end devices and the gateway is possible when the received signal SNR is above the required reception threshold \(q_{SF}\). The outage probability [27] can be expressed as

$$\begin{aligned} H_1=\mathrm{exp}\left( \frac{\mathcal {N} q_{SF}}{P_1 g(d_1)}\right) , \end{aligned}$$
(18)

The distance between the end device of interest and the gateway is \(d_1\).

7.2 Coverage probability

The coverage probability for an end user device is defined as the probability that an end device can achieve some threshold signal-to-inference-plus-noise ratio (SINR) \(\beta \). The above-defined outage probability can be interpreted as the complementary of the coverage probability. The coverage probability \(P_c\) can be expressed as

$$\begin{aligned} P_c=P[SINR>\beta ]. \end{aligned}$$

7.3 Network throughput

LoRaWAN protocol is based on the ALOHA scheme. In our previous work [19] we have performed a detailed analysis of LoRaWAN network throughput. For the considered system model in [19], the uplink system throughput is defined as

$$\begin{aligned} \mathcal {G}=\sum _i r_i P_i^{{data}}, \end{aligned}$$

where, \(P_i^{{data}}= e^{-2r_i T_i^{{data}}}e^{-2r_i P_i^{{data}}T_i^{{ACK}1}} \), where first term \(e^{-2r_i T_i^{{data}}}\) is the collision probability of ith transmission with another uplink transmission over the same channel and \(e^{-2r_i P_i^{{data}}T_i^{{ACK}1}}\) indicates probability that an Ack1 transmission was already ongoing on channel i when an uplink transmission starts. \(T_i^{{data}}\), and \(T_i^{{ACK}}\) is the data and ACK transmission time on ith channel respectively. \(r_i\) is the arrival rate of packets.

7.4 Channel occupancy

Channel occupancy is the fraction amount of time in which channel is occupied. Channel Occupancy is the crucial information to evaluate system efficiency. This information can be used for optimal adaption of the available channel. Channel Occupancy analysis can be performed by prediction of Inter-arrival Time of packets transmitted from the same end devices. In the LoRaWAN network, channel occupancy is the sequence of free and occupied time in each SF channel [31].

Fig. 8
figure 8

Distribution of end devices for different spreading factor allocation schemes

7.5 Energy consumption

In [33], the authors have considered energy consumption performance metric for optimal SF allocation. Considered energy model in [33] has two modes (1) data transmission, (2) sleep mode. According to the considered energy model [33], the average current consumption W(s) mAh over an hour for all the end devices can be defined by Eq. (19)

$$\begin{aligned} W(s)=\frac{3600}{N_{{ED}}} \sum _{i=1}^{N_{{ED}}} \frac{T_{{si}}}{T_i}I_{{Tx}}+(1-\frac{T_{{si}}}{T_i})I_{{SLP}}, \end{aligned}$$
(19)

where \(I_{{Tx}}\) and \(I_{{SLP}}\) indicate the current for transmission and sleep mode. \(T_i\) is an average transmission interval for ith end device, \(T_{s_i}\) and \(N_{{ED}}\) are ToA of the packet with Spreading factor \(S_i\), and allocated SF end devices vector respectively. The current consumption will be doubled for devices with \(\mathrm{SF}+1\) compared to that of devices using SF. When the application data generation rate is negligible, the overall average current consumption does not vary significantly across devices using different SFs.

7.6 Packet success probability or data extraction rate

Data Extraction Rate (DER) [8] can be defined as ratio of the received packets to the transmitted packets over a time interval. For the LoRa network system, DER [8] can be expressed as

$$\begin{aligned} \mathrm{DER}= e^{(-2N_f. T^f. \lambda }), \end{aligned}$$

where \(N_f\) is the count of transmitted packets, \(T^f\) is the packet transmission time with \(\mathrm{SF}=f\), and \(\lambda \) is the packet transmission rate for each end device. DER is the most common performance metric to evaluate IoT networks.

8 Classification of reported works

According to our literature survey in Sect. 6, we classify reported work based on end devices’ and the gateway’s spatial distribution and also based on different performance metrics used to evaluate the network performance. These classifications may be helpful for those system designers looking for specific requirements for their system design.

8.1 Performance metric

After the literature survey on different spreading factors allocation work, we distinguish the above-reported work based on the performance metric used as shown in Table 4.

Fig. 9
figure 9

System performance of LoRaWAN network, a Fixed and Random based SF allocation. b EIB and EAB based SF allocation

8.2 Spatial distribution

This subsection presents the classification of reported work based on the LoRa end devices and the gateway’s spatial distributions. Table 5 summarizes the different spatial distributions adapted by reported work (Sect. 6).

In our previous work, we have developed a LoRaWAN PHY simulator which is open-source [60]. The developed simulator consists of multiple modular for different functionality, and by modifying these modular, we can adapt this simulator to have a simulation-based study for the LoRaWAN network. We are using the same simulator to have performance analysis for traditional SF allocation schemes (like Random, Fixed, EIB, and EAB). We provide SF allocation schemes simulation codes in [61].

In the performed simulation, the distribution of the end devices for the different SF allocation schemes is shown in Fig. 8 and consider a single LoRaWAN cell of radius 6 km having a centrally deployed gateway. In the considered single LoRaWAN cell, the packets generated by the end devices follow the geometric distribution. We study the system performance using performance metric (Packet Success Probability).

Table 6 The summary of the different LoRaWAN review Papers

We perform Fixed and Random SF allocation schemes simulation for all available \(SF \in \{7,8,9,10,11,12\}\). The simulation results in Fig. 9a. show that as the number of end devices increase, the packet success probability goes down. We observe that the Random SF allocation scheme performs better than the Fixed SF allocation scheme when the number of end devices increases. The reason for this is, in the Fixed SF allocation scheme, the end devices experience more intra-SF interference than the Random SF allocation scheme. The simulation results in Fig. 9b. show the performance analysis for EAB and EIB SF allocation schemes. We observed that EAB performance is better than EIB as EAB allocates higher SFs to less number of end devices relative to EIB. More allocation of higher SF leads to more collision due to high ToA.

9 Different review studies of LoRaWAN

In this section, we present a brief description of the different existing LoRaWAN review papers as shown in Table 6. After reviewing other review papers of the LoRaWAN, we feel there is a lack of a survey for spreading factor allocation schemes. Hence, we provide a systematic review of the SF allocation schemes.

10 Conclusion

Optimal radio resource \(\{SF, BW, CR, TP\}\) allocation in the LoRa network is still an arduous challenge for academia and industrial researchers. The selection of appropriate communication parameters can lead to better network performance. This article presents a concise overview of the traditional spreading factor allocation schemes and focuses on researchers’ literature work to improve the spreading factor allocation schemes. We have noticed that each proposed SF allocation scheme outperforms the other allocation schemes in a specific scenario. As per our knowledge, there is currently no general SF allocation scheme for the LoRa network that can provide satisfactory performance in all IoT application scenarios. Based on the literature survey, we have broadly classified these schemes into different categories, as shown in Fig. 5 and present a comparison between various spreading factor allocation schemes, shown in Table 3. All the proposed spreading factor allocation schemes aim to enhance network performance in terms of the packet success probability, throughput, scalability. To show the lack of review study on the SF allocation schemes, we have briefly summarized the different review studies of LoRaWAN. The novelty of this paper’s work consists of reviewing, comparing, and classifying the different Spreading Factor allocation schemes exist in the LoRaWAN literature.

11 Future directions

Apart from the many advantages of the LoRaWAN communication protocol, it also has a few associated challenges like imperfect orthogonality, scalability, communication range, multiple access, and others. To some limit, all these challenges can be reduced by optimal spreading factor allocation. From the study, we observe that by optimal resource allocation, LoRaWAN network performance can be significantly enhanced and provide the direction to explore the different network deployment perspectives. In this study, after reviewing and comparing the different spreading factor allocation schemes of the LoRaWAN protocol, we find that each SF allocation scheme has distinct pros and cons. The best SF allocation scheme may depend on the application requirements. Therefore, we motivate researchers to develop a novel spreading factor allocation scheme that can provide a satisfactory performance level in all IoT applications’ scenarios and investigate unexplored aspects of the SF allocation schemes.