# Feasibility Analysis of a LoRa-Based WSN Using Public Transport
## 2 LoRa Technology  
LoRa is a proprietary wireless communication technology featuring long-range capabilities, with low-power consumption, although with low data rates. Developed by Cycleo and acquired by Semtech in 2012, it uses license-free sub-gigahertz radio frequency bands. Its characteristics make it suitable for IoT and Machine to Machine (M2M) communication over wide areas, requiring a modest amount of exchanged traffic. The LoRa modulation scheme derives from the Chirp Spread Spectrum (CSS) modulation technique, which encodes the information in chirps [30]. As the expression spread spectrum implies, this technique uses the entire allocated bandwidth to transmit the signal. For this reason, it exhibits robustness to noise and other channel degradation mechanisms such as multi-path fading (urban applications). It also mitigates the Doppler Effect (mobile applications).  
In particular, the Doppler aspect is very important for the present prototypal LPWAN. According to [31] the CSS modulation set for LoRa allows a frequency offset between the transmitter and the receiver up to 20%, which should be enough to avoid problems due to the velocity of the LoRa transceiver in our application. The results presented in [32] show that some communication problems may arise at around 40 km/h and that the number of lost packets increases according to the increasing speed, reaching up to 33% packet loss when the velocity of a car reaches 100 km/h. In any case, the speed limit inside urban centers (valid also for public transport) is between 30 km/h and 50 km/h in  
Figure 1: Example of tentative installations of gateways on the poles of bus stops for a portion of the city of Turin.  
most European cities. At those speeds, the success ratio for correctly transmitted and received packets is significantly higher. Hence, the LoRa technology is suitable for this kind of mobile application.  
There are limitations, such as the restrictions and regulations on the duty-cycle, the possibility to send only sparse datagrams, and the already mentioned limited data rate. These constraints do not negatively influence the use of LoRa for the proposed applications.  
LoRa is the physical (PHY) layer (the lowest layer in OSI communication stack) implementation and it works regardless of the technology operating on upper layers. In this respect, the LoRa Alliance(tm) has developed the open-source LoRaWAN specification [33]: an infrastructure consisting of media access control (MAC), network, and application layers built on top of LoRa. LoRaWAN is organized in a star-of-stars topology in which gateways relay messages between end-devices and a central network server; gateways are connected to the network server via standard IP connections, while end-nodes use single-hop LoRa communication to reach gateways.  
For our purposes, both LoRa and LoRaWAN technologies can be used, but only LoRa was preferred since it does not enforce the gateways (see next section) to be connected to the Internet, giving the possibility to create an entire ad-hoc network using plain LoRa communication. However, to provide basic medium access control (MAC) features, a carrier sense mechanism was implemented in software to reduce collisions as much as possible. It is possible to configure different LoRa in order to adapt the technology to the working scenario and needs of the network to be realized. These parameters are  
* the bandwidth, to be chosen from 125, 250, and 500 KHz, defines how wide the transmitted signal is;
* the spreading factor, a number in the range 6-12 which indicates how many bits are used to encode each symbol;
* the code rate, from 4/5 to 4/8, specifies the proportion of useful transmitted bits (non-redundant).  
According to the results presented in [34], a properly configured LoRa-based network allows one to reach a communication range of 15 km with an average successful packet delivery ratio of up to 97%. Of course, for the presented application, we need a shorter communication range.