LoRaWAN
What are LoRa and LoRaWAN?
LoRa is a proprietary wireless RF technology owned by Semtech, which is also one of the driving factors behind the LoRa Alliance, which develops the open LoRaWAN protocol and ecosystem.
LoRa and LoraWAN are Non-Cellular Low-Power Wide-Area Network (LPWAN) wireless communication network protocols that operate in the unlicensed spectrum with others like Sigfox, Ingenu, and others.
LoRa
LoRa is a non-cellular, low-power wireless modulation system based on Chirp Spread Spectrum (CSS) technology. It's a proprietary method developed by Semtech that uses chirp pulses to encode information on radio waves, similar to how dolphins and bats communicate.
LoRa modulated transmission is robust against disturbances and can be received across long distances. It's perfect for applications that send little data chunks at low bit rates. When compared to WiFi, Bluetooth, or ZigBee, data can be sent over a greater distance. These characteristics make LoRa an excellent choice for low-power sensors and actuators.
LoRaWAN
LoRaWAN is a Media Access Control (MAC) layer protocol built on top of LoRa modulation. It is a software layer which defines how devices use the LoRa hardware, for example when they transmit, and the format of messages. LoRaWAN is developed and maintained by the LoRa Alliance.
Comparing LPWAN Technology Options
In the IoT market, there is a lot of work comparing LPWAN possibilities from both a technical and a business model standpoint. The questions that should be answered to compare different LPWAN technologies are:
• Flexibility to target a large variety of applications
• Is the communication protocol secure?
• Technical aspects – range, capacity, two-way communication, robustness to interference
• Cost of network deployment, cost of end-node BOM, cost of battery (largest BOM contributor)
• Ecosystem of solutions providers for flexible business models
• Availability of end-products to ensure ROI of network deployment
• Strength of ecosystem to ensure quality and longevity of the solution
What is LoRaWAN® Specification?
The LoRaWAN® specification is an LPWA networking protocol that targets key Internet of Things (IoT) requirements like bi-directional communication, end-to-end security, mobility, and localization services, and is designed to wirelessly connect battery-powered ‘things' to the internet in regional, national, or global networks.
How LoRaWAN Works
Radio systems like LoRaWAN are straightforward at their most basic level. Star networks communicate in a similar fashion to a teacher and pupils in a classroom. The teacher (the gateway) communicates with the end nodes (the class), and vice versa.
Consider the following scenario: you have four gateways and one node. The node sends a blind transmission into the radio spectrum, and any gateway lucky enough to hear it can intercept it and send it up to the cloud. It’s possible that all four gateways might hear that message and send it.
There is no acknowledgement of receipt once a message has been delivered. Nodes in the LoRaWAN network, on the other hand, can request acknowledgements. If acknowledgement is needed and all four gateways receive the same message, the cloud selects one to react at a predetermined time, generally a few seconds later.
The issue is that when that gateway is transmitting back to the node, it ceases to listen to anything else. If your application requires a large number of acknowledgements, it will almost certainly spend more time transmitting acknowledgements than listening, resulting in a network failure.
The graphic above depicts how LoRaWAN works. The top bar displays whether or not the gateway is communicating. (It's transmitting if it's orange; it's not if it's blue.) The receiver channels are shown in the bottom bar. Almost all LPWAN systems, including LoRaWAN, offer multiple receiver channels, and most LoRaWAN systems may receive up to eight messages at the same time across any number of frequency channels.
Bandwidth vs. Range
LoRaWAN is well suited to sending small payloads (such as sensor data) over great distances. Compared to rival wireless data transmission systems, LoRa modulation enables a much higher communication range with reduced bandwidths. The diagram below depicts different wireless data transmission access technologies and their predicted transmission ranges vs. bandwidth.
Topology
Gateways transport communications between end-devices and a central network server in the LoRaWAN® network architecture, which is implemented in a star topology. The gateways connect to the network server via regular IP connections and function as a transparent bridge, transforming RF packets to IP packets and vice versa.
The wireless communication makes use of the LoRa physical layer's Long Range capabilities, allowing for a single-hop connection between the end-device and one or more gateways. All modes can communicate in both directions, and multicast addressing groups can be used to make optimal use of spectrum for tasks like Firmware Over-The-Air (FOTA) updates or other mass distribution messages.
Classes
LoRaWAN has three different classes of end-point devices to address the different needs reflected in the wide range of applications:
Class A – Lowest power, bi-directional end-devices:
Class A communication is always initiated by the end-device and is entirely asynchronous. It is the default class that must be supported by all LoRaWAN end-devices. Each uplink transmission can be delivered at any time and is followed by two short downlink windows, allowing for bi-directional communication and, if necessary, network control commands.
There is no network requirement for frequent wake-ups, thus the end-device can enter low-power sleep mode for as long as its own application specifies. This makes class A the most energy-efficient operating mode while yet allowing for uplink connectivity at any moment.
Class B – Bi-directional end-devices with deterministic downlink latency:
Class B devices are synchronized to the network using periodic beacons and open downlink "ping slots" at predetermined periods in addition to the class A initiated receive windows. This allows the network to send downlink messages with a deterministic latency, but it comes at the cost of increased power consumption in the end-device. The delay may be adjusted up to 128 seconds to suit different applications, and the increased power consumption is modest enough that battery-powered applications can still be used.
Class C – Lowest latency, bi-directional end-devices:
Class C minimizes downlink latency by having the receiver of the end-device open at all times when the device is not broadcasting, in addition to the class A structure of uplink followed by two downlink windows (half duplex). The network server can then launch a downlink transmission at any moment, if the end-device receiver is open and there is no latency. The receiver's power drain is the trade-off, hence class C is best for applications that have continuous power.
For battery powered devices, temporary mode switching between classes A & C is possible, and is useful for intermittent tasks such as firmware over-the-air updates.
Chirp Rate, Processing Gain, & Orthogonality
LoRa operates by shifting an RF tone around in a relatively linear manner over time. The chirps are represented in this graph as a reverse waterfall, with the most recent data at the top, referred to as a "up chirp". To encode a symbol, LoRa transmits a chirp, then breaks the chirps in different places in terms of time and frequency. The fact that LoRa broadcasts move from one location to another at a specific period could indicate that one bit string is superior to another. It's not just binary — you can send a lot of information with it.
Security
Security is a primary concern for any mass IoT deployment and the LoRaWAN® specification defines two layers of cryptography:
- A unique 128-bit Network Session Key shared between the end-device and network server
- A unique 128-bit Application Session Key (AppSKey) shared end-to-end at the application level
To ensure authentication and integrity of packets to the network server, as well as end-to-end encryption to the application server, AES algorithms are utilized. By providing these two tiers, ‘multi-tenant' shared networks can be implemented without the network operator having access to the users' payload data.
The keys can be Activated By Personalisation (ABP) on the production line or during commissioning, or they can be activated in the field via Over-The-Air Activation (OTAA). If necessary, OTAA permits devices to be re-keyed.
Barriers To Building Private Networks With LoRaWAN
LoRaWAN works well for some applications, but it’s not the best fit for customer-deployed (also known as private network) solutions. The main reasons for that are:
The coexistence of multiple gateways allows for interference.
All LoRaWAN gateways are tuned to the same frequencies, regardless of who owns or operates them. To avoid collision difficulties, it is preferable to have only one network running in a single area.
However, it is possible to work through the LoRa Alliance to have specific channels set aside for specific uses. Network operators can also limit the amount of downlink traffic in their networks from the server side to ensure that low-priority endpoints don't "clog" the network.
It does not guarantee message receipt.
Packet error rates (PER) of more than 50% are frequent in LoRaWAN. This is fine for some meter-reading applications, but 0 percent PER is required for industrial or business sensor networks or control systems.
It has a variable maximum transmission unit (MTU) payload size.
Another significant drawback of LoRaWAN is that the MTU payload size varies depending on the spreading factor assigned to the node by the network. In other words, the number of bytes you can broadcast is little if you're far away from the gateway, but it's significantly larger if you're close. As a result, changes in the payload side at the application layer must be accommodated by the node firmware or application, which is extremely difficult to do when designing firmware.
Why is LoRaWAN so awesome?
Ultra low power - LoRaWAN end devices are optimized to operate in low power mode and can last up to 10 years on a single coin cell battery.
Long range - LoRaWAN gateways can transmit and receive signals over a distance of over 10 kilometers in rural areas and up to 3 kilometers in dense urban areas.
Deep indoor penetration - LoRaWAN networks can provide deep indoor coverage, and easily cover multi floor buildings.
License free spectrum - You don’t have to pay expensive frequency spectrum license fees to deploy a LoRaWAN network.
Geolocation - A LoRaWAN network can determine the location of end devices using triangulation without the need for GPS. A LoRa end device can be located if at least three gateways pick up its signal.
High capacity - LoRaWAN Network Servers handle millions of messages from thousands of gateways.
Public and private deployments - It is easy to deploy public and private LoRaWAN networks using the same hardware (gateways, end devices, antennas) and software (UDP packet forwarders, Basic Station software, LoRaWAN stacks for end devices).
End-to-end security - LoRaWAN ensures secure communication between the end device and the application server using AES-128 encryption.
Firmware updates over the air - You can remotely update firmware (applications and the LoRaWAN stack) for a single end device or group of end devices.
Roaming - LoRaWAN end devices can perform seamless handovers from one network to another.
Low cost - Minimal infrastructure, low-cost end nodes and open source software.
Certification program - The LoRa Alliance certification program certifies end devices and provides end-users with confidence that the devices are reliable and compliant with the LoRaWAN specification.
Ecosystem - LoRaWAN has a very large ecosystem of device makers, gateway makers, antenna makers, network service providers, and application developers.
LoRaWAN use cases
Here are a few great LoRaWAN use cases provided by Semtech, to give you some insight into how LoRaWAN can be applied:
Vaccine cold chain monitoring - LoRaWAN sensors are used to ensure vaccines are kept at appropriate temperatures in transit.
- Animal conservation - Tracking sensors manage endangered species such as Black Rhinos and Amur Leopards.
- Smart farms- Real time insights into crop soil moisture and optimized irrigation schedule reduce water use up to 30%.
- Water conservation- Identification and faster repair of leaks in a city’s water network.
- Food safety- Temperature monitoring ensures food quality maintenance.
- Smart waste bins - Waste bin level alerts sent to staff optimize the pickup schedule.
- Airport tracking - GPS-free tracking monitors vehicles, personnel, and luggage.
- Efficient workspaces - Room occupancy, temperature, energy usage and parking availability monitoring.
- Cattle health - Sensors monitor cattle health, detect diseases and forecast calves delivery time.