Introduction to LoRa and LoRaWAN: What is LoRa and How Does It Work?

iot

ByOdunlade Emmanuel 0

Introduction to LoRa and LoRaWAN: What is LoRa and How does it Work?

Communication is one of the most important parts of any IoT project. The ability of a thing to communicate with other “things” (a device cloud/server) is what gives the “thing” the right to attach the “internet” to its name. While tons of communication protocols exist, each of them lacks one thing or the other which made them “not totally suitable” for IoT applications. The Major problems being power consumption, range/coverage and bandwidth.

Most communication radios like Zigbee, BLE, WiFi among others are of short range and others like, 3G and LTE, are power hungry and the span of their coverage areas cannot be guaranteed especially in developing countries. While these protocols and communication modes work for certain projects, it brings an extensive limitation like; difficulties in deploying IoT solutions in areas without cellular (GPRS, EDGE, 3G, LTE/4G) coverage and gross reduction in battery life of devices. Thus, envisaging the future of IoT and the connection of all kind of “things”, located in all kind of places, there was a need for a communication medium tailor-made for IoT which supports it’s requirements of specifically low power, significantly long range, cheap, secure, and easy to deploy. This is where LoRa comes in.

 

LoRa (which stands for Long Range) is a patented wireless communication technology which combines ultra-low power consumption with an effective long range. While range highly depends on the environment and possible obstructions (LOS or N-LOS), LoRa typically has a range between 13- 15Km, which means a single LoRa gateway can provide coverage for an entire city, and with a couple more, a whole country. The technology was developed by Cycleo in France and came to fore when the company was acquired by Semtech in 2012. We used LoRa modules with Arduino and with Raspberry Pi and they worked as expected.

Lora SX1278-Ra-02

 

Features of LoRa

A LoRa radio comprise of a few features which help it achieve long-range effective power and Low cost. Some of these features include;

  1. Modulation Technique
  2. Frequency
  3. Adaptive Data Rates
  4. Adaptive Power Levels

 

Modulation

Lora radios use the chirp spread spectrum modulation technique to achieve a significantly high communication range while maintaining low power characteristics that are similar to the FSK modulation physical layer based radios. While chirp spread spectrum modulation has been around for a while with applications in military and space communications, LoRa presents the first, low-cost commercial application of the modulation technique.

 

Frequency

While the LoRa technology is frequency agnostic, Communication between LoRa radios happen via the use of unlicensed sub-GHz radio frequency bands that are available around the world. These frequencies vary from region to region and often also differ between countries. For instance the 868MHz is commonly used for LoRa communications in Europe, while the 915MHz is used in North America. Irrespective of the frequency, LoRa can be used without any major variation in the technology.

Frequency Chart of LoRa

 

Frequency Bands for LoRa in Different Countries

Using Lower frequencies than those of the communication modules like WiFi based on the 2.4 or 5.8GHz ISM bands enable a much larger coverage area especially for NLOS situations.

It is important to note that permissions are still required in some countries before the unlicensed bands can be used.

 

Adaptive Data Rate

LoRa uses a combination of variable bandwidth and spreading factors (SF7-SF12) to adapt the data rate in a trade-off with the range of the transmission. Higher spreading factor allows longer range at the expense of lower data rate, and vice versa. The combination of bandwidth and spreading factor can be chosen according to the link conditions and the level of data to be transmitted. Thus, a higher spreading factor improves transmission performance and sensitivity for a given bandwidth, but it also increases transmission time as a result of lower data rates. These can vary from as few as 18bps up to 40Kbp

Data Communication Speed of LoRa

 

Adaptive Power Level

The power level used by LoRa radios is adaptive. It is dependent on factors like the data rate and link conditions among others. When a fast transmission is required, the transmitted power is pushed closer to the maximum and vice versa. Thus, battery life is maximized and network capacity maintained. Power consumption also depends on the class of devices among several other factors.

 

LoRaWAN

LoRaWAN is a high capacity, Long Range, open, Low Power Wide Area Network (LPWAN) standard designed for LoRa Powered IoT Solutions by the LoRa Alliance. It is a bi-directional protocol which takes full advantage of all the features of the LoRa technology to deliver services including reliable message delivery, end to end security, location and multicast capabilities. The standard ensures the interoperability of the various LoRaWAN networks world-wide.

 

There is usually a mix up when people try to define LoRa and LoRaWAN which is probably best solved by examining the OSI reference stack Model.

LoRa Network Layer

 

Simply put, based on the OSI stack Model, LoRaWAN corresponds to Media Access protocol for the communication network while LoRa corresponds to the Physical layer. Thus LoRaWAN defines the communication protocol and system architecture for the network, while LoRa architecture enables the long-range communication link. The two of them merged together to provide the functionality that determines battery life of a node, the network capacity, the quality of service, the security and other applications served by the network. While LoRaWAN is the most popular MAC layer for LoRa other proprietary layers which are also built on the LoRa technology exists. A good example is Symphony link by Link Labs which is specially developed for industrial applications.

 

The LoRaWAN Network Architecture

Opposed to the mesh network topology adopted by most networks, LoRaWAN uses the star network architecture, thus, rather than have each end-device in an almost always on state, repeating transmission from other devices to increase range, end-devices in the LoRaWAN network communicate directly with gateways and are only on when they need to communicate with the gateway since range is not a problem. This is a contributing factor to the Low power features and High battery life obtained in the LoRa end devices

LoRaWAN Network Architecture

 

The LoRa Network Architecture comprises of four major parts;

1. End Devices

2. Gateways

3. Network server

4. Application Server

 

1. End Devices

These are sensors or actuators at the network edge. End-devices serve different applications and have different requirements. In order to optimize a variety of end application profiles, LoRaWAN™ utilizes three different device classes to which end-devices can be configured as. The classes feature trade offs between downlink communication latency and battery life of the device.

The three major classes are;

1. Bi-Directional end-devices (Class A)

2. Bi-directional end-devices with scheduled receive slots (Class B)

3. Bi-directional end-devices with maximal receive slots (Class C)

 

Lora Device Classes

 

i. Class A End-Devices

These are devices that only require downlink communication from the server immediately after an Uplink. For example, they are devices that need to receive message delivery confirmation from the server after an uplink. For this class of devices, they must wait till an Uplink is sent to the server before any downlink can be received. As a result of this, communication is kept at the minimum and they thus have the lowest power operation and the highest battery life. A good example of class A devices is a LoRa based Smart Energy Meter

 

ii. Class B End-Devices

These devices are allocated extra downlink windows at scheduled intervals in addition to the downlink received when an uplink is sent (Class A + a scheduled extra downlink). The scheduled nature of this downlink ensures the operation is still low power since communication is only active at scheduled intervals but the extra power consumed during the scheduled downlink increases the power consumption beyond that of the Class A devices, as such, they have a lower battery life compared to class A end-devices.

 

iii. Class C End-Devices

These class of devices do not have a limitation on downlink. They are designed to be nearly always open to communications from the server. They consume more power than the other classes and have the lowest battery life. Good examples of class C devices are end devices used in fleet management or real traffic monitoring.

 

2.  Gateways

Gateways (also referred to as concentrators) are devices connected to the network server via standard IP connections that relay messages between the central network server backend and end-devices using single-hop wireless communication protocol. They are designed to support bi-directional communication and are equipped with multicast enabling the software to send mass distribution messages like over-the-air updates.

 

At the heart of every LoRa gateway is a multi-channel LoRa demodulator able to decode all LoRa modulation variants on several frequencies in parallel.

 

For a large-scale network operator, the key distinguishing factors should be the radio performance (sensitivity, sending power), the connection of the SX1301 chip to the gateway MCU (USB to SPI or SPI to SPI) and the support and distribution of PPS signal whose availability allows for precise time synchronization over the entire gateway population in a network

 

LoRa spreads communication between end-devices and gateways across multiple frequency channels and data rates. The spread spectrum technology uses data rates ranging from 0.3 kbps to 50 kbps to prevent communications from interfering with each other and creates a set of "virtual" channels that increase the capacity of the gateway.

 

To maximize both the battery life of the end-devices and the overall network capacity, the LoRa network server manages the data rate and RF output for each end-device individually through an adaptive data rate (ADR) scheme.

 

3. Network Server

Lora Network server is the interface between the Application server and the Gateways. It relays commands from the Application server to the gateway while ferrying data from the gateways to the application server. It perform functions including ensuring there are no duplicate packets, Scheduling acknowledgements and managing the data rate and RF output for each end-device individually using a adaptive data rate (ADR) scheme.

 

4. Application Server

The application server determines what the data from the end devices are used for. Data Visualization etc are probably done here.

 

LoRaWAN Security and Privacy

The importance of security and privacy in any IoT solution cannot be over emphasized. The LoRaWAN protocol specifies encryption to assure your data is secure, concretely

* Per-device AES128 keys

* Instant regeneration/revocation of device keys

* Per-packet payload encryption for data privacy

* Protection against replay attacks

* Protection against man-in-the-middle attacks

 

LoRa uses two keys; Network Session and Application Session keys both of which provide split, encrypted communication for network management and application communication.

The network session key, shared between the device and the network is responsible for authentication of the end node data while the application session key, shared between the application and the end node is responsible for guaranteeing the privacy of the device data.

LoRaWAN Security and Privacy

 

Key Features of LoRAWAN

* >160 dB link budget

* +20 dBm TX power

* Exceptional IIP3

* 10dB selectivity improvement over FSK

* Tolerant to in-channel burst interference

* Lowest RX current - 10mA

* Lowest sleep current

* Ultrafast wake-up (sleep to RX/TX)

 

Advantages of LoRa

Below are some of the advantages associated with LoRa;

1. Long Range and Coverage: With up to 15km LOS Range, its range can’t be compared with that of any other Communication protocol.

2. Low Power: LoRa offers hyper low power radios which makes them Ideal for devices that are required last for 10 years or more on a single battery charge.

3. Low cost hardware: Infrastructures for LoRaWAN are extremely low cost compared to other networks and cost of radios for end-devices are equally Low. More so, several open source versions of infrastructures like gateways are being developed which helps to further reduce costs.

4. High Capacity: Thousands of end devices could be connected to a single LoRa gateway

 

Disadvantages of LoRa

With a maximum data rate of around 50kb/s, LoRa has the lowest of data rates when compared with most of the other technology which makes it not ideal for certain applications where high data rates are required.

LoRa Compared with other Protocols

 

Applications of LoRa

The applications of LoRa are only Limited by imagination. It has been one of the major drivers of smart city in countries around the world with full-scale city wide LoRa Network already deployed in several cities. Applications of LoRaWAN cuts across all sorts of IoT Solution. A few are listed in the image below.

Applications of LoRa

Semtech recently announced the launch of new products which will reduce current power consumption level by 50% and they also indicated exploring partnerships with Imprint energy which makes ultra thin flexible batteries. With the ultra thin imprint batteries, which could practically fit in anything, powering device with a communication range of over 13Km, I believe the goals of a fully connected world would have been achieved.

Get Our Weekly Newsletter!

Subscribe below to receive most popular news, articles and DIY projects from Circuit Digest

Comments

Log in or register to post Comment