RM-ADR: Resource Management Adaptive Data Rate for Mobile Application in LoRaWAN

LoRaWAN is renowned and a mostly supported technology for the Internet of Things, using an energy-efficient Adaptive Data Rate (ADR) to allocate resources (e.g., Spreading Factor (SF)) and Transmit Power (TP) to a large number of End Devices (EDs). When these EDs are mobile, the fixed SF allocation is not efficient owing to the sudden changes caused in the link conditions between the ED and the gateway. As a result of this situation, significant packet loss occurs, increasing the retransmissions from EDs. Therefore, we propose a Resource Management ADR (RM-ADR) at both ED and Network Sides (NS) by considering the packet transmission information and received power to address this issue. Through simulation results, RM-ADR showed improved performance compared to the state-of-the-art ADR techniques. The findings indicate a faster convergence time by minimizing packet loss ratio and retransmission in a mobile LoRaWAN network environment.


Introduction
Internet of Things (IoT) technologies are mainly categorized into Low-Rate Wireless Personal Area Networks (LRWPAN), cellular IoT, and Low-Power Wide-Area Networks (LPWANs), as shown in Figure 1. LPWAN technologies, such as Long-Term Evolution for Machines (LTE-M), SigFox, Long-Range Wide-Area Network (LoRaWAN), and Narrow Band (NB)-IoT, have emerged as licensed and unlicensed in the market. Among LPWAN technologies, LoRaWAN is the most widely used for IoT due to long-range communication and low-cost solutions [1][2][3]. Therefore, it has been widely adopted for IoT applications, offering long-range and ultra-low energy consumption with cheap solutions [4].
Long-range (LoRa) describes the physical (PHY) layer characteristics (designed by the LoRa Alliance), while LoRaWAN is the Medium Access Control (MAC) layer. The basic LoRaWAN structure comprises end devices (EDs), a gateway (GW), a network server (NS), and an application server, as shown in Figure 2. The EDs involved in the communication always transmits an uplink (UL) to GW using the ALOHA mechanism by using spreading factors [SFs: 7 to 12]. Communication between ED and a GW can either be confirmed or unconfirmed. Confirmed mode is considered to be reliable, where ED anticipate a downlink (DL) acknowledgement (ACK) from NS after each uplink (UL), as shown in Figure 3. To receive ACK, ED opens a receive window 1 (RX1) after receive delay 1 (which is one second long) with the same SF and channel being used for UL packet. If the ED did not receive the ACK, it opens a second receive window (RX2) after receive delay 2 (which is two seconds long) with SF12 and a dedicated channel 869.525 MHz in EU-868 MHz frequency region. In the absence of ACK in both receive windows, ED retransmits the packet after a random time RETRANSMIT TI MEOUT (1-3 s). In contrast to confirmed mode, no ACK is required in the unconfirmed mode. For resource allocation [e.g., SF and Transmit Power (TP)] to EDs, LoRaWAN adopts an adaptive data rate (ADR) [5,6]. However, it fails to adapt itself when the underlying environment is mobile, resulting in massive packet loss. Thus, it is recommended for static applications, such as metering [7]. Therefore, this proposes a resource management ADR (RM-ADR) at both ED-and NS-sides by considering packet transmission information and received power to alleviate this considerable packet loss by reducing the retransmission. The contributions of the proposed work are summarized below.

1.
The proposed RM-ADR collects the packet transmission information and send it to the NS inside the LoRa frame header. Furthermore, the RM-ADR at the ED side allocates SF and TP based on the retransmission remaining, resulting in gaining connectivity with GW.

2.
RM-ADR at the NS side make use of the packet transmission information and use the received power to assign both SF and TP to mobile end devices, resulting in a low packet loss arriving under the sensitivity thresholds at the GW. 3.
RM-ADR at NS side greatly increases the efficiency of the Packet Delivery Ratio (PDR) by adapting itself to the varying conditions of the channels. Therefore, it enhances the convergence period when compared to state-of-the-art approaches.

4.
Additionally, the proposed RM-ADR at NS side can help lower the energy consumption by reducing the retransmissions.
The paper is design as: Section 2 convey the literature review. Section 3 describes detailed working of the proposed resource management ADR (RM-ADR). Section 4 highlights the experimental study and analysis of the proposed RM-ADR, while the endmost Section 5 wind up the paper.

Related Work
Many existing studies have resolved LoRaWAN issues, such as PDR enhancement, mitigating the impact of interference, ADR enhancement, and convergence period enhancement. Therefore, we divide the existing literature into four categories, as shown in Figure 4. These categories are presented in the remaining of this section.

Packet delivery ratio enhancement
Mitigating the impact of interference ADR enhancement Convergence period enhancement

Packet Delivery Ratio (PDR) Enhancement
PDR can be enhanced by allocating the SFs using the sensitivities threshold related to GW [8,9]. The authors in [8] assigned a suitable SF to ED, concerning the received signal strength at the GW. Results showed enhanced PDR against the static SF assignment. However, the work in [8] was limited to only unconfirmed mode and completely ignored the confirmed mode of communication since it supports bidirectional communication and can influence the packet delivery ratio in the presence of ACK.
The work presented in [8,9] was enhanced [10] by analyzing both confirmed and unconfirmed communication modes. Apart from improving [8,9], authors in [10] also propose another approach for allocating SFs based on the ED sensitivity. Results of [10] compared with [8,9] showed improved performance in terms of PDR and lower end-to-end delay. Based on the simulation results presented in [10], it was recommended to use SF allocation to EDs based on the ED sensitivities due to the DL ACK message.
Another approach presented in [11] enhances the PDR using two methods: first, authors make groups of EDs based on their received signal strength indicators (RSSI) and assign a specific channel to each group. Secondly, the authors assign SFs to EDs in each group based on the RSSI. The proposed methods have decreased the collision by setting a suitable SF and a channel for a specific group.
The authors in [12] proposed two methods EXtending the performance of LoRa by suitable SF (EXploRa-SF) and EXtending the performance of LoRa by air-time (EXplora-AT) to enhances the PDR of LoRaWAN. EXploRa-SF was responsible for assigning SFs to the EDs in the network concerning the RSSI. In contrast, EXplora-AT tried to reduce the air-time by fairly allocating a lower SF based on an "ordered water-filling [13]" approach. When both the proposed methods were compared with the LoRaWAN-based typical ADR, the proposed method showed improved PDR results. This work [12] has been enhanced by [14] based on the K-means algorithm, which has increased the performance by 21% in terms of PDR.

Mitigating the Impact of Interference
An interference-aware SF assignment (I-ASF) [15] was proposed to eliminate intranetwork interference. I-ASF initially allocated SF with GW sensitivity thresholds during the deployment phase. However, in the case of interference during the ongoing communication, I-ASF has allocated a satisfactory SF to reduce the interference impact, which has increased the PDR.
The authors studied the interference impact of a GW in the LoRaWAN network environment caused due to the UL packets transmission under multiple co-existing EDs [16]. The authors claimed that the aggregate interference that occurred to a GW does not follow a Gaussian distribution. The authors in [16] considered Class A EDs, where path loss, shadowing, and fading influence these EDs. Their results showed enhanced PDR by lowering the impact of interference.
Another work presented in [17] studied the impact of inter-technology interference and optimized the LoRaWAN network parameters. The authors proposed an analytical model to mitigate the external and internal interference between the LoRaWAN and IEEE 802.15.4 g devices under the Wi-sun system. Based on both technologies' interference, the authors proposed two different optimization schemes to find the best possible SF and TP to meet the minimum reliability level [18,19]. Their methods showed improved performance in simulations. Therefore, they claimed that these methods could be used for planning interference-limited networks meeting the minimum required reliability.
The author in [20] evaluated the link quality LoRa-based wireless underground sensor networks (WUSNs) for the underground-to-aboveground (UG2AG) and aboveground-tounderground (AG2UG) communication. Using the in-situ data for the soil-air communications, the authors tested the channel model considering semiempirical path-loss models. The authors experimentally compared the impacts of the burial depths, the distances between EDs, and SF and TP parameters on the LoRa link quality. Their experimental results revealed that the channel is subtle to soil characteristics, underlying propagation environment, and SF and TP parameters. Furthermore, their experimental results revealed that received signal strength indicator (RSSI) and signal-to-noise ratio (SNR) are the best indicators for PDR.
The authors in [21] presented a feasibility study on the deployment of the LoRa for UWSNs. Their results revealed that the underwater-to-overwater (UW2OW) and overwater-to-underwater (OW2UW) channels are highly symmetric under different SF and TP parameters. Further their experimental results suggested that channel quality varies for the underwater-to-underwater (UW2UW) when the distance between the EDs is static.
The authors in [22] aimed to study the reliability of the LoRa and LoRaWAN of vehicles at a different speed. Their experimental results with a speed of 90 km/h revealed satisfactory performance. Therefore, the authors recommended using LoRaWAN for highspeed cars and trains with acceptable performance.
Ref. [23] studied the performance of the transmission parameters (i.e., SF and TP) for sailing monitoring systems. The experiments were conducted for different transmission parameters and distances. Based on the study, optimal SF and TP parameters were identified that can satisfy the application requirements.
In [24], the authors evaluated the performance of Smart Cities by using Vehicle-to-Cloud interface with OBD-II (On-Board Diagnostic) communication, 3G/4G connectivity, and LoRaWAN. First, the authors presented constraints regarding smart city use and further evaluated the probability that an ED can transmit data to their proposed architecture. Their experimental results revealed the feasibility of their proposed infrastructure for the smart city scenario.
The authors in [25] presented a CAN-BUS prototype considering a vehicle to grid (V2G) communication based on intra-vehicle data collection and interchange to aggregators.
The data were gathered using the CAN-BUS prototype, connected with EDs and GW by connecting web services in a cloud-based NS. In addition, the authors tested LoRaWAN using frequency EU-868 MHz. The analysis was carried out with the help of an in-house 3D Ray Launching (3D-RL) code to obtain optimal received power distribution, interference, and other time-domain parameters in a large and complex LoRaWAN environment. Their results show that the system is efficient for monitoring purposes at the bus stops or the complex infrastructure of the buildings.

ADR Enhancement
The authors in [26] proposes an ADR using the Standard Deviation of averaged SNR of P packets (i.e., P = 20). Their method shows improved performance in terms of packet delivery ratio by effectively determining the SF and TP. However, the authors in [26] failed to improve the convergence period of the ADR.
An improved ADR (IADR) was proposed in [27] to address the issues related to the initial SF 12 assignment during the deployment phase of the typical ADR. IADR assigned all SFs to EDs involved in the communication at the time when the network deployment based on the received signal strength. The performance results of the IADR showed enhanced PDR compared to ADR.
Recently, the authors proposed a retransmission-assisted ADR (RM-ADR) in [28] to improve the PDR by reducing the retransmission attempts of the ED in UL. Their results show improved performance in PDR, energy consumption, and convergence period compared to the existing state-of-the-art ADRs mechanisms.

Convergence Period Enhancement
The authors in [29] proposed ADR at ED-and NS side. Their ADR at the ED side is simple, which works by simply taking the ratio of the uplink and downlink of last 5 packets. Their ADR at the NS side is responsible to manage both SF and TP after the five packets. Their simulation outcomes reveal improved performance. However, their study considered a static environment.
Furthermore, the authors in [30] proposed two ADRs: Gaussian-ADR (G-ADR) and Exponential moving average-ADR (EMA-ADR). The primary purpose of their proposed methods was to reduce the convergence time and improve the PDR of the LoRaWAN network. Both their proposed ADRs significantly improved the PDR, convergence time, and energy consumption.

Working of the Proposed RM-ADR
The proposed RM-ADR manages the resources (i.e., SF and TP) at ED-and NS-sides. In the rest of this section, RM-ADR is presented.

RM-ADR at ED Side
To determine, an ED is mobile or static, we have used a method shown in [3]. The method described in [3] computes the distance (d o ) between the current (d 2 ) and previous (d 1 ) positions of the ED to determine the mobility using Euclidean distance method, as shown in Figure 5 [3]. In Figure 5, two types of ED are shown: static and mobile. The previous distance (i.e., d 1 ) between the GW and ED is represented with green arrow, while the current position (d 2 ) is represented with black arrow. When both d 1 and d 2 are determined, d o (represented with red arrow) is computed by taking difference of both. The resultant value can be negative or positive, showing that the ED has moved near to or far from GW. Finally, the d o is compared to a threshold (i.e., α = 20 m [3]). If the condition holds, the ED is determined as mobile. For a mobile ED, several UL transmissions are counted using a counter (Tx_CNT) when Fcnt cur (a sequence number associated with UL packet) equals to Fcnt prev . In this work, we have modified the LoRa frame header to accommodate Tx_CNT information, which contains 1 byte. In contrast to mobile ED, the proposed RM-ADR assigns SF and TP at the ED side when several retransmissions (Rtx_CNT) are equal to γ (it is a threshold, which is set to 2 [10,31]) . The choice of γ = 2 is chosen to prevent further retransmission from this ED and reduce the interference. Then, the ED (either mobile or static) obtains a random channel and transmits an uplink to GW (see Algorithm 1).

Algorithm 1:
The proposed RM-ADR at the ED side.

RM-ADR at NS Side
Resource Management Adaptive Data Rate (RM-ADR) at the NS side is responsible for allocating resources to mobile EDs. At the start of the simulation, each ED is assigned an SF12, as suggested by the typical ADR method in [5]. Then, each ED enables ADRACKReq (MAC command, which allows the DL ACK from the NS in the confirmed mode of communication) in the FHDR and transmits a packet to GW containing Tx_CNT. The proposed RM-ADR at the NS side is initiated if ADRACKReq is being enabled, as shown in Algorithm 2.
The proposed RM-ADR extracted the Tx_CNT from the frame header (FHDR) and compared it to a packet transmission threshold (Tx threshold = 3). The choice of Tx threshold = 3 is to reduce the retransmission of packets from ED. When this condition is true, the proposed RM-ADR computes new communication parameters based on the GW sensitivity contained in Table 1.  Finally, the proposed ADR assigns the ED the lowest possible SF above the GW sensitivity. The advantage of this procedure is to reduce the chances of collisions by lowering the ToA.
As an example of this SF assignment method, consider the following scenario: a P rx of −137 dBm received at the GW. In this scenario, based on the GW sen sensitivity values contained in Table 1, SF9 can be considered too low; however, SF ∈ [10,11,12] would allow us to receive packets from EDs. We configured the EDs to use SF10 since we are interested in decreasing the ToA in general.
In contrast, the typical ADR [5] is initiated if the ED is static, as shown in Algorithm 2.

Integration of the RM-ADR LoRaWAN
The proposed RM-ADR at the ED side can easily be integrated at the ED using firmware update over the air process, as shown in Figure 6. In contrast, the NS side RM-ADR can be integrated in the NS as a routine maintenance.

Gateways
Network server End devices BIN Figure 6. Network server process of firmware update in LoRaWAN.

Experimental Analysis of the Proposed RM-ADR
In the current section , we evaluate the proposed RM-ADR compared to ADR [5] and Gaussian-ADR (G-ADR) [30]. The performance study comprises packet delivery ratio (PDR), packet loss ratio (PLR), convergence period, and energy consumption. The performance is evaluated using network simulator (ns)-3 [34].
In addition, this work considers both intra-and inter-SF interferences, similar to [8,10,15]. Based on Equation (1), when a packet is at the GW with SF (i,j) , it can be successfully received if the interference power is larger than the threshold β (i,j) . In contrast, a packet can be considered lost.

Simulation Environment
In this work, we consider Class A end devices due to their applicability in the pettracking application and energy efficiency [35]. These EDs are distributed randomly within 5-km range in a single GW environment. The EDs comply with log-distance and shadowing models along with the random-walk mobility model. The simulation parameters used in the paper, are mentioned in Table 2. Furthermore, a pet-tracking application with diverse requirements is considered in this work, as highlighted in Table 3 [7,28]. The packet size contains 9 bytes of PHY/MAC header size. Table 3. Pet-tracking application with various requirements [7,28].

Considered Application Proposed by Packet Interval/Day Payload Size [Bytes]
Pet-tracking Semtech [7] 144 (for a single ED) 30

Over All Network Performance
PDR of the proposed RM-ADR, ADR, and G-ADR is highlighted in Figure 7 for a different number of mobile end devices. In Figure 7, the PDR decreases when the end devices are increased owing to the increase in both UL and DL. As a result, interference occurs, and packets are lost. These lost packets are retransmitted with old SF and TP configuration, resulting in packets arriving under the sensitivity in ADR and G-ADR. However, G-ADR performance is much better than ADR because it configures the SF and TP after 5 UL packets are received at the NS. In contrast to ADR and G-ADR, the proposed RM-ADR performance is better owing to the SF and TP adjustment based on the number of transmissions performed by the ED. This method reduces the chances of retransmission, resulting in improved PDR. Figure 8 shows the probability of ratios of PDR and packet loss ratio (PLR) of the proposed RM-ADR, ADR, and G-ADR. For example, from Figure 8 it is clear that the probability of both PDR and PLR is 1.
In Figure 8, PLR-I represents the PLR caused due to the intra-and inter-SF interferences. The impact of PLR-I is significant in ADR owing to the retransmission of packets with high SF (e.g., SF 10,11,and 12). In contrast, the PLR-I of RM-ADR is recorded similar to that of G-ADR.
In Figure 8, PLR-R shows the PLR caused owing to reception paths being busy at the GW while demodulating the incoming packets. This work only uses the default three channels for UL (i.e., 868.1, 868.3, and 868.5 MHz) at the GW with 8 parallel reception paths to demodulate 8 different packets with either SF [28]. However, when these paths are busy, an incoming packet cannot be demodulated, resulting in PLR. The PLR-R impact is high in ADR and G-ADR due to a high number of retransmissions. Since the lost packets are retransmitted, which increase the uplink traffic. In contrast, the PLR-R impact for the proposed RM-ADR is low due to SF and TP adjustment based on the ED packet transmission information.
PLR-S in Figure 8 is defined as when the packets are lost at the GW owing to arriving under the required sensitivity threshold (these thresholds of all SFs are defined in Table 1). PLR-S is decreasing in both ADR and G-ADR, while it is almost constant in the proposed RM-ADR.
Finally, PLR-T in Figure 8 occurs when an ongoing packet is lost due to the ACK transmission from the GW. By default, the GW implements ACK priority mechanism at the GW. This impact is almost similar in all ADRs. For more in-depth analysis of these PLRs in a confirmed mode, refer to the papers in [28,30].   Figure 9 depicts the average energy consumption of the proposed RM-ADR and state-ofthe-art ADR schemes. In general, when the number of EDs increase, the energy consumption for all ADRs is increased. This is because, during the network deployment, all ADRs use SF = 12, which produces substantial interference owing to the high ToA.

Average Energy Consumption
However, energy consumption is significant in both ADR and G-ADR. Furthermore, the ADR's energy usage is greater relative to the G-ADR and RM-ADR due to the number of retransmissions. For example, if a packet is lost during communication, it is retransmitted 7 times with same SF and TP. In the case of ADR, this retransmission consumes a substantial amount of energy. As a result, we believe that the high SF, TP, ToA, and retransmission in ADR and G-ADR is high in energy consumption.
In contrast, the proposed RM-ADR energy consumption is observed lower when compared to both ADR and G-ADR because it assigns an appropriate SF and TP. Therefore, energy consumption is lower in the case of the proposed RM-ADR compared to ADR and G-ADR.

Convergence Period
The convergence period for proposed RM-ADR, ADR, and G-ADR is presented for N = 500 in Figure 10. In Figure 10, RM-ADR, G-ADR, and ADR suffer from convergence periods of 6, 8, and 14 h.
The ADR suffers from a long convergence time in Figure 10 because it is unable to adjust to the fluctuating channel condition produced by the ED movement [37].
On the other hand, the convergence of RM-ADR is 2, and 8 h lower than G-ADR and ADR, respectively. The proposed RM-ADR adjusts both SF and TP based on the transmission information shared by the ED with NS, which accounts for the short convergence time.  Figure 11 and Table 4 show the final SF use by the EDs with N = 500 for ADR, G-ADR, and the proposed RM-ADR. It can be seen that ADR and G-ADR use SF 12, the most used SF among the other SFs, resulting in high time-on-air. This high time-on-air causes significant intra-and inter-SF interferences. As a result, it is leading to high packet loss. In contrast, only 10.1% of the total N = 500 EDs use SF 12 in the case of the proposed RM-ADR. Therefore, the proposed RM-ADR uses the packet transmission information and received power and accurately determines better SF and TP compared to the existing ADR approaches. Figure 11 and Table 4 show the final SF use by the EDs with N = 500 for ADR, G-ADR, and the proposed RM-ADR. It can be seen that ADR and G-ADR use SF 12, the most used SF among the other SFs, resulting in high time-on-air. This high time-on-air causes significant intra-and inter-SF interferences. As a result, it is leading to high packet loss. In contrast, only 10.1% of the total N = 500 EDs use SF 12 in the case of the proposed RM-ADR. Therefore, the proposed RM-ADR uses the packet transmission information and received power and accurately determines better SF and TP compared to the existing ADR approaches. (c) Figure 11. End devices using final spreading factors (in percentage) with N = 500 in the case of mobile EDs.

Conclusions
In this study, we proposed ED-and NS side ADRs for spreading factor and transmit power management. RM-ADR implemented at the ED side counts the number of transmissions from each ED and sent to NS contained in LoRa frame header and assigned SF and TP to the ED based on retransmission information. On the other hand, the proposed RM-ADR at the NS side extracted the number of transmission information from the LoRa frame header, compared it to a packet transmission threshold, and assigned SF and TP parameters on the received power. Compared to state-of-the-art ADRs schemes, the proposed RM-ADR showed improved results in convergence time, PDR and energy consumption.

Conclusions
In this study, we proposed ED-and NS side ADRs for spreading factor and transmit power management. RM-ADR implemented at the ED side counts the number of transmissions from each ED and sent to NS contained in LoRa frame header and assigned SF and TP to the ED based on retransmission information. On the other hand, the proposed RM-ADR at the NS side extracted the number of transmission information from the LoRa frame header, compared it to a packet transmission threshold, and assigned SF and TP parameters on the received power. Compared to state-of-the-art ADRs schemes, the proposed RM-ADR showed improved results in convergence time, PDR and energy consumption.