SALSA: A Scheduling Algorithm for LoRa to LEO Satellites

Satellites are going to revolutionize the Internet of Things (IoT) connectivity enabling the ubiquitous coverage targeted by 5G and upcoming 6G networks. While the potentials of satellite IoT are unquestionable, many challenges still remain unsolved. In the present work, we design a Long Range Wide Area Network (LoRaWAN) with mobile gateways (GWs) installed on Low Earth Orbit (LEO) satellites. We address synchronization issues due to intermittent link availability between the End Devices (EDs) and the GW, and we propose a Scheduling Algorithm for LoRa to LEO Satellites (SALSA). SALSA ensures reliable communication, avoiding packets drops and packet collisions, by using a Time Division Multiple Access (TDMA) approach, rather than classic ALOHA-based LoRa. The uplink transmissions of the EDs are scheduled considering the satellite availability period, the satellite footprint, and the specific visit time for each ED. Two different policies are proposed: a First Come First Served (FCFS), and a FAIR policy. Simulation results, obtained in real conditions (with real satellites), demonstrate the better performance achievable with SALSA (regardless of the policy) compared to standard LoRa. The FAIR policy outperforms the FCFS policy by giving all the EDs an equal chance to transmit, even to those that are visited last by the satellite. The performance of SALSA can be further improved considering larger constellations of LEO satellites.


I. INTRODUCTION
S ATELLITES are going to revolutionize Internet of Things (IoT) connectivity enabling the ubiquitous coverage targeted by 5G and Beyond 5G networks. Satellite for IoT is becoming more and more affordable, available, and accessible, thanks to the launch of several low-cost miniaturized Low Earth Orbit (LEO) satellites (CubeSats) [1]. Those LEO satellites are the most appealing ones for IoT applications, due to the shorter delay that they introduce ( 40 ms), compared to Geostationary Earth Orbit (GEO) satellites ( 500 ms). However, their intrinsic orbital properties imply limited visibility time. This issue can be overcome by using large constellations of LEO satellites, able to provide almost continuous coverage; and it will be further solved with relay networks from LEO to GEO satellites. While LEO satellite constellations can reduce latency to very low levels, compared to GEO satellites, it will still not be suitable to meet the needs of 5G Ultra Reliable Low Latency Communications (URLLC), such as Augmented Reality/Virtual Real-ity (AR/VR) applications, and Tactile Internet. However, the delay is more than adequate for many other services that do not require extremely low latency, like precision agriculture, maritime surveillance, environmental monitoring, etc.
Moreover, being closer to the Earth, LEO satellites can support direct communication with IoT devices on the ground. Over the last years, several satellite operators and IoT companies have recognized the potential innovation and consequent business opportunities in enabling direct IoT to satellite. Among different IoT technologies, the Long-Range Wide Area Network (LoRaWAN) technology [2] has played, and is still having a significant role in the real deployment of IoT. Companies like Lacuna Space [3] and Wyld [4] have already demonstrated how global IoT connectivity can be achieved by integrating a LoRaWAN gateway on a LEO satellite.
Satellite LoRaWAN has drawn the attention also of academia, and researchers. Several works have identified the open research challenges and proposed a preliminary net-work architecture [5]- [8]. In a recent survey [5], the authors have discussed the pros and cons of satellite access for IoT, current limitations, and ongoing initiatives for making it possible. Very few works have provided technical solutions, as enhancement of LoRa PHY modulation [9], and management of Doppler effect [10].
In this paper for the first time, we address reliability and scalability issues in LoRa to LEO satellites communication. We propose a scheduling algorithm that cancels packet drops and packet collisions and ensures fair access to all the nodes in the network. We have designed the algorithm considering the worst-case scenario (i.e., a single satellite available), while it is still applicable and extendable to constellations of LEO satellites.
The remainder of this paper is structured as follows. Section II introduces the system architecture and the background information about the LoRa PHY and LoRaWAN MAC protocols. In Section III, we describe the proposed SALSA algorithm in all the details, including the system assumptions and the scheduling policies. Section IV first presents the simulated environment and then, the performance achievable with SALSA, considering real conditions. Through simulation results, we show that SALSA cancels by design collisions due to random ALOHA MAC, and packet drops due to intermittent link availability. When using the FAIR policy and having a constellation of satellites, the end devices get an equal chance of transmitting several uplink packets. Finally, Sec. V draws the conclusion and future research direction.

II. SYSTEM ARCHITECTURE
We consider a satellite LoRaWAN network, whose architecture is depicted in Fig.1. Several end-devices (EDs) deployed on the ground can communicate through wireless LoRa links with a LoRaWAN gateway (GW) installed on a LEO satellite. Only the EDs within the satellite footprint can reach the GW.
The footprint represents the area of the Earth covered by microwave radiation from a satellite dish (transponder). Thus, it corresponds to the coverage area. The size of the footprint depends on several factors: the location of the satellite along its orbit, the shape, and size of the beam produced by its transponder, and the distance from the earth. In particular, the footprint is impacted by the elevation angle θ e , which is the angle between the beam pointing direction, directly towards the satellite, and the local horizontal plane. As shown in Fig.2, the satellite footprint decreases with increasing θ e . In the example, the size of the footprint A is smaller than the size of footprint B, being θ eA > θ eB . The optimum value of θ e depends on the satellite orbit, the budget link, and the communication link design. To properly schedule uplink transmission from the EDs to the GW, it is of foremost importance to know the movement of the satellite and its relative position to the IoT devices. Only with such information, it is possible ensuring precise synchronization with a fixed θ e . FIGURE 2: Relation between the elevation angle and the satellite footprint. The footprint A is smaller than the footprint B in size being the elevation angle θ eA > θ eB .
While we describe the architecture with a single satellite and thus a single GW, the system can be extendible to multiple gateways installed on a constellation of LEO satellites.
Multiple GWs are connected to a central LoRaWAN Network Server (LNS) on the ground through a reliable satellite backhauling network (via a ground satellite gateway). The GW acts as a forwarding device. It is responsible only for re-dispatching raw data packets from EDs toward the LNS, encapsulating them in IP packets. The LNS manages the GWs and the entire end-to-end system; it is responsible for the LoRaWAN protocol configuration and execution in the network; it collects and decodes the received packets. In the present work, we focus on the first segment of the end-toend system, i.e., the intermittent link between the EDs and the LEO satellite(s). We assume there is a ground satellite gateway in the visibility of the satellite, and it ensures the reception of the packet at the LNS on the ground.

A. PHY LAYER
At the Physical (PHY) layer, the communication between EDs and GWs follows the Long Range (LoRa) technology [11] based on a spread spectrum modulation. The LoRa modulation is available with several Spreading Factors (SFs) to trade-off between the resulting bit rate, the transmission range, and the energy required to transmit. According to the standard, the SF can assume integer values between 7 and 12. A lower value of SF allows faster modulation, shorter Time-on-Air (ToA), and lower energy consumption.
On the other side, a signal with lower SF is more affected by noise, attenuation, and interference. Therefore, higher values of SF are more suitable for long-range communication. Recently, a new PHY layer, Long Range Frequency Hopping Spread Spectrum (LR-FHSS) [9] was proposed to address extremely long-range and large-scale communication scenarios such as direct IoT satellite. At the core of LR-FHSS, there is a fast frequency hopping technique that allows higher network capacity while offering the same radio link budget as LoRa. The LR-FHSS mechanism is one of the few concrete attempts to optimize the LoRa PHY protocol for direct communication with LEO satellites. Currently, the LR-FHSS is still under standardization process by Semtech and not available in Commercial off-the-shelf (COTS) devices. Therefore, in our work, aiming to provide a concrete and feasible solution, we assumed EDs communicate over LoRa with SF = 12. Network scalability of LoRa to LEO satellites could be further improved in future work, combining SALSA with LR-FHSS. In fact, by leveraging on random frequency hopping and dividing the channel into several sub-channels, LR-FHSS allows using several data rates at the same time (two in the USA FCC and four in the EU ETSI) [9]. Many more transmissions could be scheduled in parallel during the limited satellite visibility, on orthogonal channels, without having collisions.

B. MAC LAYER
At the Medium Access Control (MAC) layer, the network adopts the LoRaWAN protocol, based on pure ALOHA random access [12]. The standard [2] defines three main channel access strategies. Class A (Aloha) includes the basic set of features needed by any ED to join a LoRaWAN network. Class A EDs use ALOHA protocol for an uplink packet transmission, followed by two short downlink receive windows, RX 1 and RX 2 . Thus, the downlink communication is triggered by the ED. Each downlink frame needs to wait for the uplink communication. The LoRaWAN specification provides two enhancements to Class A: Class B (Beacon) and Class C (Continuous) to increase the downlink possibilities. These downlink protocol enhancements are paid with additional energy consumption. Class B EDs open additional receive windows at scheduled times. The GW transmits beacons to keep the synchronization with EDs and opens new downlink slots. Thus, the server can directly deliver frames to correspondent EDs without waiting for them to start an uplink communication. Class C EDs keep their radio modules always on in reception mode, and thus they are available all the time for listening to downlink traffic unless they are transmitting. In our work, we assumed EDs operate in Class A and generate uplink traffic, being this the operative mode supported by all the COTS devices. In the future, we aim to design scheduling algorithms for bidirectional communication, and thus, we will also consider Class B and Class C devices, better supporting downlink traffic.

III. SALSA SCHEDULING ALGORITHM A. RELATED WORKS
The use of a satellite gateway in the LoRaWAN network architecture increases the coverage range of the network. On the other side, it introduces several challenges due to the limited visibility time of the satellite. The probability of collision due to the random ALOHA-like access schemealready high in classical terrestrial LoRaWAN networks [13], [14] -can only get worst since many EDs will compete for the same resource and attempt an uplink transmission during the limited availability of the gateway. To address such a problem and ensure reliable communication, scheduling techniques are needed. Several ones have been proposed in literature for terrestrial LoRaWAN networks [15]- [22]. Zorbas et al. tackled the issue of a LoRaWAN mobile gateway, installed on a drone [23], [24]. To deal with the limited availability of the flying gateway, they have proposed to transmit a bulk of data and reduce the ToA for the grouped transmissions. A couple of recent works considered direct LoRa to satellite, but they did not enhance network performance with scheduling techniques. Ullah et al. [25] modeled the PHY channel between the EDs and the satellite gateway and assumed EDs transmit according to the ALOHA-like LoRa standard. Also, Tondo et al. [26] proposed a system model for direct IoT to satellite, with a constellation of LEO satellites. They evaluated throughput and packet loss rate as a function of the erasure probabilities at each satellite. As in our work, they demonstrated the network performance could improve with larger constellations. Besides that, they assumed the EDs transmit using slotted ALOHA.

B. ASSUMPTIONS AND ALGORITHM
In the present work, we propose SALSA, a Scheduling Algorithm for LoRa to LEO SAtellite. In the design of the algorithm, we assume that the LNS is aware of the location of the EDs and the availability time of the gateway (i.e., the visibility period of the satellite). The EDs may have been pre-registered in the network, using Over The Air (OTA) registration while the gateway was still on the ground. All the EDs operate in Class A. Moreover, we assume that the LNS sends in unicast (during the RX windows) the scheduling table to each ED in the network. To consider the deviation of the current orbit of the satellite from its initial orbit, periodic scheduling updates should be sent directly to each device using unicast messages. Note that the exchange of the configuration parameters and scheduling tables is out of the scope of the present work, the reason why we made such assumptions.
The LNS is in charge of scheduling the uplink transmissions for each ED and assigning priorities. To guarantee longrange transmission from the EDs to the satellite gateway, we assume that all the EDs transmit using SF = 12. Using a single value of the SF implies that only a transmission per time can be scheduled, without incurring a collision. According to the standard, a single uplink transmission keeps the channel busy for a Time on Air (ToA) period. We propose VOLUME 1, 2022 to add two Guard Time, T g , one before and one after the ToA for taking into account possible synchronization issues between the ED and the mobile gateway (see Figure 3). Thus, whenever the LNS schedules a transmission for an ED, it reserves the channel for that ED for a period of time equal to T r = T oA + 2 × T g . FIGURE 3: Time reserved T r for each ED for an uplink transmission. 2×T g have been introduced to mitigate uncertainties and inaccuracies of the synchronisation between the ED and the satellite gateway. The receive windows RX 1 and RX 2 are opened after the end of the uplink transmission, according to the standard.

C. FCFS POLICY
The LNS builds the scheduling tables for each of the EDs in the network based on their discovering time of the satellite. The latter depends on the satellite footprint, the satellite movement along its orbit, and the value of the elevation angle. As shown in Fig.4, while the satellite moves along its orbit, the satellite footprint also moves in time: therefore, different EDs will be progressively in the satellite visibility, one after the other, in different periods. To efficiently use the network resources and maximize the number of EDs that can communicate with the mobile gateway, the LNS gives priority to the EDs that are visited first by the satellite footprint. In the example in Fig.4, the ED i will transmit before the ED j being r i < r j , with r i relative distance of ED i from the satellite footprint.
Many nodes may be concentrated in the same area (i.e., dense area), one very close to another, and thus, while an ED is still transmitting, another one could enter the satellite footprint and attempt a transmission as well. To avoid such a scenario generating collisions, we introduce the concept of slide. We divide the satellite footprint into several slides. They can have variable time duration: in the simpler case, a slide is equal to the time needed for completing a single uplink transmission T r . It is the case when there is no overlap between concurrent transmissions from several EDs because the EDs are one far away from another. On the contrary, when there is an overlap (i.e., a dense area with many EDs concentrated together), and an ED cannot finish a transmission before another ED enters the satellite coverage, the LNS allocates a larger slide. The slide's duration is set to N s × T r , where N s is the number of neighbor nodes within the identified dense area. The LNS defines the starting time T Si of the ED i transmission. If the Start of the Satellite Visibility for that ED i , T SSVi overlaps with an ongoing transmission from another ED j , the ED i has to wait till T Ej (ending time of ED j transmission). Either wise, it can start transmitting as soon as it sees the satellite (see Algorithm 1). In the example in Figure 4, the ED 4 will not transmit as soon as it enters the satellite footprint, but after the ED 3 finishes its transmission. By doing so, SALSA with its TDMA approach and First Come First Served (FCFS) policy results to be a collisionfree scheduling algorithm. It intrinsically avoids collision, not allowing conflicting parallel overlapping transmissions.

D. FAIR POLICY
The LEO satellite is available for a limited time, equal on average to 100s. The visibility time could be shorter than the total time needed for scheduling at least one uplink transmission from all the EDs within every single slide. In a dense area with hundred of EDs, several EDs that are visited last by the satellite may never get a chance to transmit. They will miss the satellite each time it is their turn to transmit, according to the FCFS policy. We propose the FAIR policy to overcome such shortcomings and ensure that all the EDs have an equal chance to transmit. The logic behind it is described by Algorithm 2. Let consider N EDs within a given slide of the satellite footprint. The LNS first checks if the ED i had already several transmission opportunities, n txi , higher than the other end devices ED j , within the same slide. In this case, with n txi > n txj , and j = i, the ED i will not be granted an uplink slot.   On the contrary, if it can transmit because it transmitted fewer times than its neighbours, the LNS has to define the starting time T Si of its transmission, according to the FCFS policy (see Algorithm 1).

E. OPTIMAL SCHEDULE
After scheduling the EDs' transmissions according to the FAIR policy, there might be still several slots available, depending on the satellite visibility and the density of the EDs in the coverage area. Due to (i) the short availability time of the satellite and (ii) the LoRa duty cycle limitations imposed by the LoRaWAN regional parameters, it is very unlucky that a given ED have a second chance of transmitting within a single satellite visit. For instance, the maximum T oA for {51 Bytes, EU868, SF12, 125KHz} [27] is equal to 2793.5ms while the duty cycle is 1% in the EU region. So the ED must wait for 279.35s before having a new uplink opportunity, while the availability time for a LEO satellite is shorter than 120s at 500Km height above 30 • elevation.
While running the SALSA algorithm the LNS also im-plements a check on the duty cycle limitations and further optimizes the use of the limited network resources. And whenever it identifies a gap (empty slot) in the schedule, it allocates it to another ED i , at the conditions that: (1) The new expected reserved time, T ri , does not create any conflict in the scheduling table with the already reserved slots for other EDs. (2) The ED i has visibility with the satellite in that expected time.

IV. PERFORMANCE EVALUATION
A. SIMULATED ENVIRONMENT FIGURE 6: Location of EDs over the country of Luxembourg, following a random uniform distribution. Visualization done with [28].
We have implemented the algorithm in a Matlab environment to evaluate the performance achievable with SALSA, VOLUME 1, 2022 FCFS, and FAIR policies. We consider network size variable in the range [50, 500]. The EDs are located according to a random and uniform distribution in a target area. In this work, we assume the target area coincides with the Luxembourg country (Fig.6). We derived the exact location of the EDs using random uniform distribution in the GEOPY [29] library of Python programming language. Besides the considered scenario, the algorithm is not limited to this selected geographical area and applies to any other one. We considered the Lacuna satellites, in particular Lacuna-Sat 3 and Lacuna-Sat 2B which have the approximate height of 500Km to 600Km from the earth. In the performance analysis, we adopted their real visibility over Luxembourg during October 2021. Moreover, we assumed an elevation angle Θ e = 30 • for both satellites.
We used SKYFIELD library [30] with the CelesTrak [31] online Two Line Element (TLE) sources for generating the real visibility time tables of the satellites per each ED. A TLE provides the satellite location along its orbit for a given pointing time (the time epoch), by encoding the orbital elements. The specific location of the EDs (uniformly distributed over the Country of Luxembourg), the satellites TLE, and the fixed elevation angle (Θ e = 30 • ) were given in input to the SKYFIELD. Finally, the obtained human-readable time outputs were translated into epoch timestamps and used in the Matlab algorithm, implementing SALSA.
We assume the Guard Time T g is equal to 10ms; and the ToA is the maximum allowed ToA in the EU868 region, with SF = 12 and the maximum payload of 51 bytes. It follows, the time reserved for each ED, for a single transmission is T r = 2 × T g + T oA = 2813.5ms.

B. ACHIEVABLE PERFORMANCE
We have compared the behaviour of the satellite LoRaWAN network in three different scenarios: • ALOHA: the EDs transmit following the LoRa standard, with random ALOHA access. They transmit periodically, every 30 minutes, without having any knowledge about the satellite visibility. Note that we introduced a random uniformly distributed offset in the start time of the first uplink per each ED. • SALSA w/ FCFS: the EDs that are visited first by the satellites transmit first, but only when the channel is not busy (no collision due to overlapping transmissions). • SALSA w/ FAIR: all the EDs get an equal chance to transmit thanks to the FAIR policy, in addition to FCFS. When (i) the EDs are not aware of the visibility time of the satellite(s), and (ii) no scheduling algorithm is implemented, the network faces a high number of packet drops and packet collisions. Packet drops are due to the lack of availability of the satellite gateway, while packet collisions are due to concurrent random transmissions. As shown in Fig.8, the adoption of a constellation of two satellites does not improve the network performance in the absence of a scheduling technique. As depicted in Fig.9, the performance in term of the number of collisions get even worst with two satellites: it is almost double with a large network size.
Contrary to random ALOHA-like access, when adopting SALSA the LNS schedules the transmissions while aware of the location of the EDs and the satellite availability time for each of them.
We compared the performance achievable with FCFS and FAIR policy in the worst-case scenario, with a single LEO satellite, and with a constellation of two satellites ( Figure  10). FCFS policy schedules the transmissions following only location-based priority. It follows that some devices (those visited last by the satellite) never get a chance of an uplink opportunity. Moreover, each device may get a different number of reserved slots (as confirmed by the large whiskers and the many outliers). This behaviour is more pronounced with two satellites. On the contrary, the FAIR policy guarantees all devices get the same chance, even in large networks, besides the size of the constellation. With two satellites, the network performance improves, and the average number of uplink transmissions per ED is almost duplicated compared to the scenario with a single LEO satellite. The obtained results confirm the reliability and scalability of the SALSA algorithm with the FAIR policy.

V. CONCLUSION
In the present work, we tackle the issue of a LoRaWAN mobile gateway installed on the LEO satellite. For the first time, we propose a TDMA scheduling technique, SALSA. It optimises the usage of the satellite bandwidth during limited satellite visibility. The proposed SALSA algorithm first avoids by design any collision, thanks to the TDMA approach; second, it avoids packet drop by considering the satellite availability; third, it ensures fair access for all the end devices in the network. With simulation results, we demonstrate in a realistic scenario that the SALSA algorithm can improve the network performance. The opportunities of uplink transmission per each ED decreases with increasing network size (more EDs are contending for the same channel). LEO constellations help overcome this issue. The transmission opportunities are almost duplicated when considering two satellites, and they could be further improved with larger constellations. In our future work, we will extend the SALSA algorithm to support both uplink and downlink traffic, with Class A and B devices.  M. AFHAMISIS (S'13, M'17) is a PhD candidate at Luxembourg Institute of Science and Technology (LIST) in the ERIN department working on optimizing LoRaWAN protocol for integration with satellite for smart agriculture applications. He studied his Bachelor in telecommunication engineering at the Semnan University of IRAN. Then he continued his study and research on Satellite Technology engineering in Master of Science in the Iran University of Science and Technology (IUST). His thesis was on optimizing the control of GEO satellites with large antennas and deployable solar cells. Also, He has six years of experience as a Senior radio communications specialist and managing different projects on radio communications and IoT monitoring topics in the Iranian railways headquarter office.
M.R. PALATTELLA (S'04, M'07, PhD'11) is a Senior Research and Technology Associate at LIST. She is leading the work on designing innovative network architectures and cross-layer protocols optimisation for Internet of Things applications for environmental monitoring, precision agriculture, and disaster management. She is investigating means of integrating satellite and terrestrial networks for future high-reliable end-toend communication systems. Dr Palattella sits on the Editorial Board of the Transactions on Emerging Telecommunications Technologies and the EAI Transactions on IoT. She is a member of IEEE, IEEE ComSoc WISE, IETF 6TiSCH WG, and secretary of the IEEE 5G Mobile Wireless Internet Technical Subcommittee.