# LoRa

## Summary


For the Internet of Things (IoT), many devices are likely to be constrained in terms of cost and power. For many use cases, devices require only a low data rate but long range. Cellular technologies, Wi-Fi or Bluetooth don't cater well to these use cases. This is where **LoRa (Long Range)** becomes relevant. 

LoRa devices are low power, long range devices. They transmit and receive data over unlicensed frequency spectrum. A typical use case is to transmit low-rate sensor data. There are plenty of LoRa deployments worldwide, offered as free or paid services.

LoRa is one particular technology in the domain of Low-Power Wide-Area Network (LPWAN). Alternatives to LoRa include Sigfox and NB-IoT.

## Discussion

### What led to the wider deployment of LoRa?

Cellular networks such as 2G and GPRS were used for machine-to-machine (M2M) data communication, particularly for sending data from remote locations. Such networks used relatively less power compared to 3G or LTE. But by the start of 2017, network operators such as AT&T (US) announced the termination of 2G and GPRS. 

3GPP's own alternatives for M2M communications were LTE-M and NB-IoT. However, these were not expected to be ready until early or mid-2018. This created a void following the sunsetting of 2G. There was a need for a protocol that catered to low power, long range and bi-directional communication devices. This led to the wider deployment of LoRa network. 

LoRa doesn't need costly spectrum licensing fees typical of cellular networks. By 2013, the fundamental technologies powering LoRa were patented and owned by Semtech. LoRa Alliance was formed in early 2015 to address the market need, while also standardizing and promoting LoRaWAN that was built on top of LoRa. 


### What are the advantages of LoRa?

LoRa has the following advantages:  

    + Long range: Many miles on line-of-sight links.
    + Low power: Can run on battery for years.
    + Low cost: LoRa modules are pocket-friendly. It uses constant envelope modulation that brings lower cost and higher efficiency to the power amplifier.
    + Universal: Uses unlicensed bands that are globally available.
    + Bi-directional: Can send and receive data.
    + Network scalability: Easy to scale as it supports millions of messages per station. A single gateway can support thousands of end devices.
    + Easy commissioning: Easy to deploy in an existing network.

### What are the typical use cases of LoRa?

LoRa is suitable for rural use due to its long range. In urban areas, where signals have to penetrate floors and walls, LoRa is suitable. Among its application areas are smart cities, smart homes and buildings, smart agriculture, smart metering, and smart supply chain and logistics. 

A typical use case is **smart metering**. For example, LoRa-enabled meters will increase efficiency and optimize processes. For water management, sensors will monitor water pressure, water level or detect leaks. 

In **smart buildings**, the typical use of LoRa is for smoke detection, asset and vehicle tracking, room usage and more. Asset tracking is possible because LoRa works well even when devices are in motion. 

Since LoRa is bidirectional, applications can benefit from **command-and-control** functionality. Uplink can be used for continuous monitoring and downlink can be used for controlling the device. 

LoRa when combined with Wi-Fi can optimize a number of IoT use cases. For example, asset tracking, location services and on-demand streaming can be improved. 


### Could you share some technical details of LoRa?

LoRa operates in different bands in different parts of the world. In the USA it operates at 902-928 MHz. In Europe, it operates at 863-870 MHz. In China, the spectrum is 470-510 MHz and 779-787 MHz. In India, it operates at 3 channels: 865.0625 MHz, 865.4025 MHz, 865.9850 MHz. In many Asian countries, the spectrum is 920-923 MHz or 923-925 MHz. Australia uses 915-928 MHz. Typically, downlink channels are higher than uplink. 

Data is spread with a chip sequence, thus spreading signal energy over a wider bandwidth. LoRa has six spreading factors, SF7-SF12. Larger the spreading, longer the range and smaller the bit rate. Spreading factors are orthogonal, which means that signals with different spreading factors can coexist. In North America, there are 64 125 kHz uplink channels, 8 500 kHz uplink channels, and 8 500 kHz downlink channels. For same SF, lower bandwidth implies better sensitivity. 

Semtech's SX1276/77/78/79 transceivers achieve 168 dB maximum link budget. Sensitivity is -148 dBm. Bit rate can be programmed to up to 300 kbps. They consume receive current of 9.9 mA and 200 nA for register retention. 


### What is the range of LoRa?

LoRa has a typical range of 2-8 km with the higher range achieved when the spreading factor (SF) is larger. Larger spreading factor also implies a lower bit rate. Moreover, this range can also vary based on the terrain. 

In an urban environment with an outdoor gateway 2-3 km is the typical range. In rural areas, this can be 5-7 km. 

In an experiment using a weather balloon, a range of 702 km was achieved. A LoRa device was attached to a helium-filled balloon that rose to an altitude of 38.772 km. Packet sent from the node was received by 148 different gateways connected to The Things Network. One of the gateways at a height of 30 meters was located in Wrocław, Poland. By that time, the balloon was flying over Osterwald, Germany. The distance was 702.676 km. Transmit power was 25mW (14dBm), which is about 40 times smaller than what a mobile phone uses. 


### Could you share some details about how LoRa works?

LoRa uses **Chirp Spread Spectrum (CSS)** that spreads the original signal to a larger bandwidth by continuously varying the frequency. Data signal is spread or chipped to a higher rate. This then modulates the chirp carrier signal. Due to this method, LoRa doesn't require a highly accurate reference clock, thus dropping the cost on receiver design. The signal also tolerates Doppler frequency shifts, making LoRa suitable for mobile devices. Due to spreading, processing gain is achieved, making LoRa resilient to multipath and fading. 

A LoRa PHY frame has repeated upchirps for the preamble, two downchirps for start of frame delimiter (SFD), and choppy upchirps of varying lengths that signify data. Instantaneous frequency changes are due to data being modulated onto the chirps. A LoRa receiver will identify the preamble and SFD. To extract symbols, it will de-chirp with locally generated signal and take FFT of de-chirped signals. FFT length corresponds to number of possible symbols, which is twice the spreading factor. 


### How is LoRa different from LoRaWAN?

LoRa is proprietary and patented by Semtech Corporation. LoRaWAN is built on top of LoRa and is standardized by LoRa Alliance. 

LoRa defines the PHY layer for low-cost, low-power, and long-range communication. LoRaWAN defines the MAC layer for bidirectional communication, mobility and localization services. LoRaWAN addresses the network architecture: how devices connect to gateways, how gateways process the packets, and how packets make their way to network servers and application servers. LoRaWAN also defines three different device types (class A/B/C) to suit different power needs. 

While it's typical to use LoRaWAN with LoRa, there are alternatives to LoRaWAN. For example, Link Labs' Symphony Link is an alternative. They claim that LoRaWAN is suitable for public networks but for private networks serving industrial applications Symphony Link is better. 


### Where has LoRa been deployed?

LoRa is widely deployed in Europe, the US and Asia. By mid-2018, LoRaWAN was deployed in 95 countries. 

Back in 2015, National Narrowband Network and Telstra did independent LoRa trials in Australia. In November 2015, KPN's LoRa network went live in Rotterdam and The Hague in the Netherlands. In July 2016, it achieved nationwide coverage, making Netherlands the first country in the world to have this capability. 

In the US, MachineQ, a Comcast company, is providing LoRaWAN-based access network for IoT applications. In May 2018, it connected 10 US cities to the network. 

In June 2019, Kerlink and Tata Communications Transformation Services announced a partnership to deploy LoRaWAN globally. In fact, they had already deployed LoRaWAN in 40 Indian communities and cities. The network was reliable across three monsoon seasons. In December 2019, SenRa announced LoRaWAN coverage in 60 Indian cities and plans to expand to 100 cities by end of 2020. 

Taiwanese company Kiwi Technologies has enabled LoRaWAN deployments in China, Taiwan, Indonesia, Thailand, and other countries. 


### Who supplies LoRa chipsets and modules?

The first LoRa commercial chipsets were manufactured by Semtech. These are SX12XX series chips. 

Now there are many semiconductor companies such as Microchip and Murata who are manufacturing the chips compatible with their microcontrollers. As an example, Murata's CMWX1ZZABZ LoRa module integrates Semtech's SX1276 transceiver with STM32L0 Series MCU from STMicroelectronics. ST's LoRaWAN SDK can be used to program the MCU. 

LoRa Alliance maintains a list of products that are certified for LoRaWAN. These products include system-in-packages, sensors, and modules. 


### What are some useful resources to learn about or use LoRa?

LoRa Alliance's Resource Hub is the place to download the LoRaWAN specification. There are also case studies, FAQ, presentations and white papers. 

LoRa Developer Portal from Semtech is a useful site to visit. It has useful case studies, technical documents, datasheets, user guides, and more. 

Bastille Research has open sourced gr-lora that's a GNU Radio out-of-tree (OOT) module implementing LoRa PHY. Although LoRa is proprietary, Matt Knight did blind signal analysis that led to gr-lora. 

There are many tools available online for operating LoRa-based networks. LoRatools provides tools such as Key generator, Thingpark import helper, Hex helper and Airtime calculator. For data visualisation, open source visualisers such as Kibana can be used.


### What are some criticisms of LoRa?

LoRa is not open source. The technology is patented by Semtech Corporation, who release the chipsets. Although the patents describes how LoRa works, independent analysis has shown that real-world implementation differs in many ways from what's disclosed in the patents. In particular, symbol gray indexing, data whitening and interleaving differ. 

The security of LoRa at PHY layer is probably not mature. It's possible to inject and mask malicious traffic that higher layers don't detect. Many of the exploits known to IEEE 802.15.4 can be used here. 

Accurate LoRa localization is hard to implement, at least with time difference of arrival (TDOA). Unless there's near line-of-sight, it's hard to detect the direct path. Since LoRa bandwidth is only 125 kHz, a receiver can separate different multipaths only if they differ by at least 2.4 km. 

It may be said that compared to NB-IoT, LoRa has lower data rate and higher latency. However, LoRa also gives longer battery life than NB-IoT. Therefore, this is more of a trade-off that may benefit many IoT applications. 

There are also limitations of LoRaWAN that are not discussed here. 


### Could you name some alternatives to LoRa?

LoRa has the following alternatives:  

    + **Sigfox**: Proprietary technology from a French company. Low cost and long range. Meant mainly for uplink. Downlink is limited. Many deployments in Europe but only few in the U.S. An indoor tracker with Sigfox can last for 5+ years on a single AA cell.
    + **Narrowband IoT (NB-IoT)**: Cellular-based technology optimised for low power and long range. Compared to LoRa, NB-IoT has the advantage of being an open standard in an already mature ecosystem for mobile networks with support from telecom equipment vendors. Operates in licensed spectrum. Related cellular standards for LPWAN include EC-GSM-IoT and LTE Cat-M1.
    + **Random Phase Multiple Access (RPMA)**: Proprietary technology developed by Ingenu, previously called On-Ramp Wireless. Superior uplink and downlink capacity. Better link budget than LoRa or Sigfox. Operates in 2.4 GHz.
    + **Weightless**: Open standard in sub-GHz unlicensed spectrum. Three variants: Weightless-W, Weightless-N and Weightless-P.


## Milestones

1899

Guglielmo Marconi experiments with frequency-selective reception in an attempt to reduce interference. 

1942

Actress Hedy Lamarr and composer George Antheil are awarded U.S. Patent 2292387 for frequency hopping. Their patent application is titled *Secret Communications System*. During World War II, U.S. military uses frequency hopping methods. Years later, this technology becomes important for commercial wireless communication. 

2008

First patent of LoRa is filed by French company Cycleo SAS. This uses a technology called **Chirp Modulation**. The U.S. Patent US7791415 is titled *Fractional-N Synthesized Chirp Generator*. The figure shows an example where down-chirp rate is twice the up-chirp rate. Output frequency \(f\_o(t)\) is determined by frequency ramp control word \(R(t)\) and frequency control word \(M(t)\). 

Mar  
2012

Semtech acquires Cycleo SAS for $5M. Semtech is a company involved in manufacturing of analog and mixed signal semiconductors for various industries. 

Feb  
2013

Second patent of LoRa is filed by Semtech. Patent EP2763321 titled *Low power long range transmitter* describes the use of chirp modulation to transmit low-power signals over long distances. A typical data frame has preamble and data. Preamble has unmodulated chirps (411), symbols for frame synchronization (412), symbols for frequency synchronization (413), silence (420) and further unmodulated symbols (414). Data has header (415) and payload (416). 

Jan  
2015

LoRa Alliance releases version 1.0 of **LoRaWAN™ Specification**. The authors are from Semtech, IBM and Actility. Version 1.1 of the specification comes out in October 2017. 

Mar  
2015

**LoRa Alliance** becomes formally operational. It's mandate is to standardize LPWAN around LoRaWAN specification, and oversee a certification and compliance program for better interoperability. By mid-2020, the alliance has more than 500 members. These include technology leaders (IBM, Cisco, HP, Foxconn, Semtech, Sagemcom), product companies (Schneider, Bosch, Diehl, Mueller), SMEs and startups. 

Jul  
2016

Netherlands becomes the first country in the world to have nationwide LoRaWAN coverage. 

May  
2018

Google Cloud joins LoRa Alliance. Given the recent growth of LoRa and LoRaWAN, Google Cloud hopes to "simplify the process of developing, deploying, and managing IoT solutions". 

Jun  
2018

Semtech Corporation demonstrates LoRa technology at Mobile World Congress Shanghai. It claims that LoRa deployments have reduced water leaks by 25% in commercial buildings, reduced energy costs by 30% in smart homes, and saved 20% costs in gas metering.