What is LoRa?
LoRa (Long Range) is a patented digital communications technology developed by Cycleo in Grenoble, France, and acquired by Semtech in 2012. LoRa operates in unlicensed radio frequency bands, such as 169 MHz, 433 MHz, 868 MHz (Europe), and 915 MHz (North America). LoRa enables long-range transmissions (over 10 km in rural or open field areas) with low power consumption. The technology is presented in two parts - LoRa, referred to as the physical layer in English, and LoRaWAN (Long Range Wide Area Network), referred to as the upper layer in English. 1
Currently, the patent is owned by Semtech, HopeRF, and Microchip: 2 3
Semtech SX1272 Module | Microchip RN2483 Module | HopeRF RF96 Module |
---|---|---|
![]() |
![]() |
![]() |
Such a module mainly contains a microprocessor that ensures:
- serial UART communication, usually with another microprocessor;
- IO pins with digital or analog function;
- the real-time clock;
- communication using the I2C protocol – with the EPROM memory;
- SPI communication – with the radio part of the LoRa protocol;
- communication with the LoRaWAN protocol.
The block diagram of such a module (RN2483), along with the corresponding pins, is presented below:
RN2483 Block Diagram | Pins of the RN2483 Module | RN2483 SMD Board |
---|---|---|
![]() |
![]() |
![]() |
The physical layer protocol LoRa is proprietary (with closed source); therefore, there is no officially available documentation freely. However, curiosity and the thirst for knowledge have led several individuals to analyze the protocol.
Bidirectional communication is achieved through the modulation of the spread spectrum (CSS), which spreads the narrowband signal over a wider bandwidth of the channel. The resulting signal has low noise levels, allowing for high resistance to interference and making it difficult to detect or block.
LoRa uses six spreading factors (from SF7 to SF12) to adapt the data rate and transmission range. A higher spreading factor allows for a longer transmission range at the expense of a lower data rate, and vice versa. The LoRa data rate ranges from 250 bps to 50 kbps (FSK), depending on the spreading factor and the bandwidth of the channel. Furthermore, messages transmitted using different spreading factors can be simultaneously received by the LoRa base station.
Spread Spectrum Communications.
Shannon-Hartley Theorem
In theory, the Shannon-Hartley theorem establishes the maximum rate at which information can be transmitted over a communication channel with a specified bandwidth in the presence of noise.
The theorem establishes the Shannon channel capacity for communication and defines the maximum rate (of information) that can be transmitted over a specified bandwidth in the presence of interference (noise):
\[ C=B \cdot log_{2} \cdot \left ( 1 + \frac{S}{N} \right ) \]
where:
\(C\) – channel capacity \([bit/s]\);
\(B\) – bandwidth \([Hz]\);
\(S\) – average power of the received signal \([W]\);
\(N\) – power of the interference or noise signal \([W]\);
\(S/N\) – signal-to-noise ratio (SNR).
Rearranging the equation above from base 2 logarithm to natural logarithm, it becomes:
\[ \frac{C}{B} = 1.433 \cdot \frac{S}{N} \]
In wideband applications, the signal-to-noise ratio is low because the power of the signal is often below the noise threshold. Thus, if we assume a noise-to-signal ratio S/N << 1, the equation above becomes:
\[ \frac{C}{B} \approx \frac{S}{N} \]
or
\[ \frac{N}{S} \approx \frac{B}{C} \]
From the equation above, it can be observed that to transmit information without errors in a channel with a fixed noise-to-signal ratio, only the bandwidth of the transmitted signal needs to be increased.
Principles of Spread Spectrum
As mentioned above, by increasing the bandwidth of the signal, we can compensate for the degradation of transmission due to the signal-to-noise (or noise-to-signal) ratio of a radio channel.
In traditional Direct Sequence Spread Spectrum (DSSS) systems, the phase of the transmitter's carrier is modified according to a code sequence. This process is generally achieved by multiplying the desired data signal with a spreading code, also known as a chip sequence (chips – it is a binary sequence). The chip sequence occurs at a rate much higher than the data signal, thus spreading the bandwidth of the signal beyond the original bandwidth occupied solely by the original signal. It is important to note that the term chip is used to distinguish the (shorter) bits associated with encoding from the unencoded bits associated with the information signal.
Spread Spectrum Modulation |
---|
![]() |
At the receiver, after receiving the modulated signal, the data signal corresponding to the information is recovered by remodulating it with a locally generated replica of the chip sequence. This multiplication process at the receiver effectively compresses the spread signal back to its original unspread bandwidth, essentially performing demodulation, as illustrated below in the figure. It should be noted that the same sequence or chip code must be used in the receiver as in the transmitter to correctly recover the information.
Demodulation of the spread spectrum signal |
---|
![]() |
The amount of spreading, for the direct sequence, depends on the ratio of "chips per bit" - the ratio of the chip sequence to the desired data rate, referred to as processing gain (Gp), usually expressed in dB.
\[ G_{p} = 10 \cdot log_{10} \left ( \frac{R_{c}}{R_{b}} \right ) \left [ dB \right ] \]
where:
\(R_c\) – chip rate \([chips/s]\);
\(R_b\) – bit rate \([bit/s]\).
In addition to providing inherent processing gain for the desired transmission (which allows the receiver to correctly recover the data signal even when the channel's SNR is a negative value); interference signals are also reduced in the processing gain (Gp) at the receiver. DSSS is widely used in data communication applications. However, there are challenges in using devices in low-cost or low-power consumption networks.
Similarly, as in the case of GPS or the DSSS PHY of the IEEE 802.15.4k standard, the system will require a very precise and costly clock frequency reference.
Moreover, the longer the code or chip sequence, the greater the time required for the receiver to perform a correlation over the entire length of the signal with the code sequence, either by searching sequentially through code sequences or by implementing multiple correlations in parallel. This is a problem for devices with power constraints that cannot be 'always ON', and therefore synchronization must occur quickly (in a short time) repeatedly (always).
Chirp Spread Spectrum (CSS) Modulation
CSS was developed for radar applications in the 1940s. Traditionally used in a number of military and secure communication applications; over the last twenty years, this modulation technique has seen increased adoption in a range of data communication applications due to its relatively low transmission power requirements and inherent robustness to communication degradation mechanisms such as interference, fading, and the Doppler effect.
CSS has been adopted by IEEE for low-rate wireless personal area networks (LR-WPANs) under standard 802.15.4 for applications that require greater distance and higher reliability than what can be achieved with OQPSK modulation, DSSS.
LoRa Modulation with Spread Spectrum
LoRa modulation, from Semtech, addresses all the issues associated with DSSS systems to provide a low-cost, low-power, but especially robust alternative compared to traditional spread spectrum communications.
In LoRa modulation, spread spectrum is achieved by generating a chirp signal that continuously varies with frequency. One advantage of this method is that the frequency and synchronization offsets between the transmitter and receiver are equivalent, greatly reducing the complexity of implementing the receiver.
The bandwidth of this chirp signal is equivalent to the spectral bandwidth of the signal.
The desired data signal is sampled at a higher data rate and modulated onto the chirp signal.
The relationship between the desired data transfer rate, symbol rate, and chip rate for LoRa modulation can be expressed as follows:
We can define the modulation bit rate, \(R_b\), as:
\[ R_{b} = SF \cdot \frac{1}{\left ( \frac{2^{SF}}{BW} \right )} \left [ \frac{bit}{s} \right ] \]
where:
\(SF\) – spreading factor (7...12);
\(BW\) – bandwidth \([Hz]\)
We define the symbol period, \(T_S\), as:
\[ T_{s}=\frac{2^{SF}}{BW}\left [ s \right ] \]
and, the symbol rate \(R_s\), as the reciprocal of \(T_s\):
\[ R_{s} = \frac{1}{T_{s}}=\frac{BW}{2^{SF}} \left [ \frac{symbols}{s} \right ] \]
Finally, we can define the chip rate, R_{c}, as:
\[ R_{c} = R_{s} \cdot 2^{SF} \left [ \frac{chips}{s} \right ] \]
As we can see, this gives us the definition from the catalog sheet '... a chip is transmitted per second for each Hz of the band...
\[ R_{c} = R_{s} \cdot 2^{SF} = \frac{BW}{2^{SF}} \cdot 2^{SF} = BW \left [ \frac{chip}{s} \right ] \]
LoRa modulation also includes a variable error correction scheme that enhances the robustness of the transmitted signal.
Thus, we can define a nominal bit rate of the data signal as:
\[ R_{b} = SF \cdot \frac{\left ( \frac{4}{4+CR} \right )}{\left ( \frac{2^{SF}}{BW} \right )} \left [ \frac{bit}{s} \right ] \]
If we define the rate code, as:
\[ RateCode = \frac{4}{4+CR} \]
and substituting into the previous equation, we can rewrite the nominal bit rate, as:
\[ R_{b} = SF \cdot \frac{RateCode}{\left ( \frac{2^{SF}}{BW} \right )} \left [ \frac{bit}{s} \right ] \]
LoRa Modulation - time function on the left, frequency function on the right |
---|
![]() |
The main properties of LoRa modulation:
- Scalability of the bandwidth
- LoRa modulation exhibits scalability in both bandwidth and frequency;
- Unlike narrowband or wideband modulation schemes, LoRa can be easily adapted to any operating module with just a few simple changes to the register configurations.
- Constant envelope - low consumption
- Similar to FSK, LoRa is a constant envelope modulation scheme, which means that the same low-cost, low-power, high-efficiency PA stages can be reused without modifications;
- Additionally, due to the processing gain associated with LoRa, the output power of the transmitter can be reduced compared to a conventional FSK link, while still maintaining the necessary resource (link budget) or good.
- High robustness
- A LoRa signal is very resistant to interference mechanisms both in-band and out-of-band. Because the LoRa symbol period can be longer than the short duration of FHSS systems with fast hopping, it provides excellent immunity to pulsed interference mechanisms; a typical receiver has an out-of-band selectivity of 90dB and better rejection of 20dB in-band. In comparison to typical FSK modulation where we usually have 50dB for adjacent channel rejection and -6dB in-band.
- Resistance to interference/fading
- The chirp pulse is relatively wideband and, therefore, LoRa offers immunity to interference and fading, making it ideal for use in urban and suburban environments where both mechanisms prevail.
- Resistance to the Doppler effect
- Doppler shift causes a small frequency change in the LoRa pulse that introduces a relatively negligible change in the time axis of the base signal. This frequency offset tolerance mitigates the requirement for the reference clock resource;
- LoRa is ideal for mobile data communication links, such as tire pressure monitoring systems, drive-by applications like toll booths and mobile tag readers, and in railway communications for rail infrastructure.
- Long-distance communication
- For a fixed output power and a fixed output rate, the link resource of LoRa exceeds the corresponding value of conventional FSK modulation;
- When taken in combination with proven robustness to interference and fading mechanisms, this improvement in link resource can easily translate to 4 times and beyond compared to FSK.
- Improved network capacity
- LoRa modulation uses orthogonal spreading factors that allow the simultaneous transmission of multiple broadcast signals over the same channel without degrading RX sensitivity. Signals modulated at different spreading factors appear as noise to the target receiver and can be treated as such.
- Localization
- A property of LoRa is the ability to linearly differentiate between frequency and time errors;
- LoRa is the ideal modulation for radar applications and is therefore well-suited for various localization applications, such as real-time location services.
Current consumption in different operating modes
Transceiver | Sleep | Transmission | Reception |
---|---|---|---|
Semtech SX1272 | 0.1 µA (max. 1 µA) | Min.: 18 mA (7 dBm) Max.: 125 mA (20 dBm) | 10.5 – 11.2 mA |
Semtech SX1276 | 0.2 μA (max. 1 μA) | Min.: 20 mA (7 dBm) Max.: 120 mA (20 dBm) | 10.8 – 12.0 mA |
HopeRF RFM95/96/97/98 | 2 μA (min. 1.2 μA, max. 3 μA) | Min.: 20 mA (7 dBm) Max.: 120 mA (20 dBm) | 16 mA |
Microchip RN2483 | Up to 100-150 μA | Min.: 17.3 mA (−4.0 dBm) Max.: 38.9 mA (14.1 dBm) | 14.2 mA |
Link budget resource
It is a parameter that indicates the quality of a radio transmission channel.
Using a simple model, it can be calculated knowing: the transmission power Tx, the receiver sensitivity, the antenna gain, and the losses due to the transmission medium (FSPL).
The necessity of a connection
Losses due to communication distance
The loss through the transmission path (air) represents the amount of energy lost in free space at a certain distance between transmitter Tx and receiver Rx. The greater the distance between Tx and Rx, the lower the level of energy that reaches Rx. The transmission loss is defined as:
\[ FSPL = \left ( \frac{4\pi d}{\lambda } \right )^2 = \left ( \frac{4\pi d f}{c} \right )^2 \]
where:
\(\lambda\) - is the wavelength of the signal, in \([m]\);
\(d\) - the distance between the Tx and Rx antennas, in \([m]\);
\(f\) - the frequency of the transmitted signal, in \([Hz]\);
\(c\) - the speed of light, 299,792,458 \([m/s]\);
Expressed logarithmically in \([dB]\), the formula becomes:
\[ FSPL = 20 \cdot log_{10}\left (d \right )+20 \cdot log_{10}\left (f \right )-147.55 \left [ dB \right ] \]
Doubling the distance (d) results in an increase in losses through air of 6 \([dB]\).
The difference in FSPL between the frequency of 868MHz and 2.4GHz is approximately 9 \([dB]\).
The sensitivity of the receiver Rx, defined as the lowest power level of the signal that can be received by it, is calculated using the formula:
\[ Rx_{s} = -174+10 \cdot log_{10}\left ( BW \right )+NF+SNR \]
where:
\(BW\) – bandwidth, in \([Hz]\);
\(NF\) – noise figure, in \([dB]\);
\(SNR\) – signal-to-noise ratio (how many times the signal is stronger compared to the noise)
In the case of LoRa devices, their sensitivity is high.
The following equation indicates the resource required to establish a link, excluding the gain of antennas and losses through the transmission medium, as being:
\[ LB=maxRx_{s}\left [ dB \right ] - maxTx\left [ dB \right ] \]
where:
\(LB\) – the requirement for a radio link, (“link budget”), in \([dB]\);
\(Rx_s\) – the sensitivity of the receiver, in \([dB]\);
\(Tx\) – the transmission power of the transmitter, in \([dB]\).
An example of calculation for a connection with the following data:
\[ \begin{matrix} Tx=14\left [ dBm \right ]\\ BW=125\left [ kHz \right ]\Rightarrow 10 \cdot log_{10}125000=51\\ NF=6\left [ dB \right ]\\ SNR=-20\left [ dB \right ] \;for\; SF=12 \end{matrix}\]
the data above is introduced into the previous equation of \(Rx_s\), resulting in;
\[ Rx_{s} = -174+51+6-20=-137\left [ dB \right ] \]
and the resource required for the radio link \(LB\) is calculated using the last formula, resulting in:
\[ LB=-137\left [ dB \right ] -14\left [ dB \right ]=-151\left [ dB \right ] \]
To cover the losses, under optimal conditions, over a distance of 800 \([km]\), in the air, we need an LB of 150 \([dB]\). The current record for a LoRaWAN communication is 766 \([km]\).
In real conditions, these ideal values cannot be achieved. They depend on several factors that negatively influence, such as:
- In addition to the fact that doubling the distance between the Tx and Rx antennas will result in a transmission loss of 6 \([dB]\), it will also be influenced by reflections and refractions of the waves as they encounter different objects on their path between Tx and Rx;
- Losses caused by structures, that is, the absorption of radio signals when penetrating various obstacles, such as buildings, affect the reception of transmitted signals and can considerably shorten the range between Tx and Rx. For example, glass reduces the signal by only 2 \([dB]\). This affects the distance between Tx and Rx much less than a thick concrete wall of 30 \([cm]\). The figure below shows various materials and their typical effects on radio signals;
Graph of losses due to transit through a medium
Fresnel Zone
To effectively cover long distances and achieve the best possible link resource, it is also important to establish a direct line of sight transmission between the transmitter Tx and receiver Rx. In radio transmission, the area occupied by lines of direct visibility is called Fresnel zones. If there are objects in these zones, they can negatively influence the propagation of waves, even though there is generally a line of sight between the transmitting Tx and receiving Rx antennas. For each object located in the Fresnel zone, the signal level will be correspondingly reduced and the distance will be decreased. 4
First Fresnel zone
The general equation for calculating the Fresnel zone (radius) at any point P located between Tx and Rx is as follows:
\[ F_{n}=\sqrt{\frac{n \cdot \lambda \cdot d_1 \cdot d_2}{d_1+d_2}}, \; for \; d_1,d_2 \gg n \cdot \lambda \]
where:
\(F_n\) – radius of the Fresnel zone n;
\(d_1\) – distance between point P and Tx or Rx;
\(d_2\) – distance between point P and Rx or Tx;
λ – wavelength of the signal transmitted between Tx and Rx.
The radius of the cross-section of each Fresnel zone is maximum at the midpoint of the signal and decreases towards the ends (Tx or Rx). For practical applications, it is often necessary to know the radius of the first Fresnel zone.
Knowing that:
\[ \begin{matrix} n=1\\ d_1=d_2=\frac{D}{2}\\ \lambda=\frac{c}{f} \end{matrix}\]
and substituting into the equation above, we obtain:
\[ F_1=\frac{1}{2}\sqrt{\lambda \cdot D} =\frac{1}{2}\sqrt{\frac{c \cdot D}{f}} \]
where:
\(D\) – the distance between the two Tx/Rx antennas, in \([m]\);
\(f\) – the frequency of the transmitted signal, in \([Hz]\);
\(c\) – the speed of light, in \([m/s]\).
As an antenna type, omnidirectional antennas are generally used in such applications. In Europe, the transmission power for the ISM band of 868 MHz is 14 \([dBm]\). The maximum gain of the accepted antenna is 2.15 \([dBi]\) at transmission.
Scattering factor
A LoRaWAN network uses spreading factors SF to set a specific data rate relative to the distance that needs to be transmitted. In LoRaWAN networks, scattering factors range from SF7 to SF12. The SF scattering factors indicate how many 'chirps' are used in one second, defining the data rate, symbol power, and possible range. The slower the bit rate, the greater the power on the dataset, and the greater the distance.
What is LoRaWAN?
It represents the network protocol that is a low-power (LPWAN) network protocol designed to connect devices in regional, national, or global networks using the internet, ensuring bidirectional communication, security services, mobility, and localization.
Topology
The architecture of LoRaWAN networks is star-shaped, where gateways act as relay points for transmitting messages between devices (sensors) and the servers in the network.
Gateways are connected to the servers in the network via standard IP connections and convert radio communication, RF packets, into IP packets and vice versa.
Radio communication leverages the advantages of LoRa communication, allowing a direct link between the device and one or more gateways.
All communication modes are capable of being bidirectional.
The specifications define the technical implementation between the physical LoRa device and the LoRaWAN protocol to ensure perfect interoperability between manufacturers.
The specifications of LoRaWAN are developed by the LoRa Alliance, an open association of collaborating members.
LoRaWAN Topology
LoRaWAN has three different classes of devices to meet the various needs reflected in the wide range of applications: 5 6 7 8 9 10
Class A – bidirectional devices with the lowest power
This is the default class, which must be accepted by all LoRaWAN end devices. Class A communication is always initiated by the device (sensor) and is completely asynchronous. Each transmission (uplink) can be sent at any time and is followed by two short reception windows (downlink), providing the opportunity for bidirectional communication or network control commands if necessary. This is a type of ALOHA protocol.
The device can enter a low-power sleep mode as long as it is defined by its own application: there are no network requirements for periodic wake-up. This makes Class A the most energy-efficient operating mode, allowing for transmission (uplink) at any time.
Since the reception communication (downlink) must always be followed by a transmission (uplink) according to a defined schedule in the device, the reception (downlink) must wait in a buffer on the network server until the next transmission (uplink).
Class B - Bidirectional devices with a scheduled reception latency (downlink)
In addition to the necessary pause periods for reception as in Class A, Class B devices are synchronized with the network using beacons and can enter reception after a certain schedule. This allows the network to send reception communications with a known latency, but at the expense of some additional energy consumption of the device. The latency is programmable up to 128 seconds to suit various applications, and the additional energy consumption is low enough to remain feasible for battery-powered applications.
Class C – Bidirectional devices with low latency
In addition to the characteristics of Class A, the uplink transmission link is followed by two reception windows/periods (downlink), Class C further reduces the latency of a reception link by keeping the device's receiver in reception (downlink) mode at all times after it has performed an uplink transmission (half duplex).
Thus, the network server can initiate a downlink transmission at any time, assuming the device's receiver is open, so there is no latency. This advantage comes at the cost of increased power consumption, up to 50 \([mW]\), making Class C suitable for applications where power is available.
For battery-powered devices, a temporary transition from Class A to C is possible to perform, for example, updates of the program embedded in the device.
The communication sequence of the three classes A, B, and C
Adaptive Data Rate (ADR)
In addition to frequency hopping, all communication packets between devices and gateways also include a variable setting for the data rate (ADR).
The selection of the data rate (DR) allows for a dynamic change between the communication bandwidth and the message duration.
Additionally, due to spread spectrum modulation, communications with different ADRs do not interfere with each other and create a set of virtual channels with coding that increases the capacity of the concentrator (gateway).
ADR Mechanism
To maximize the battery life of devices and the overall capacity of the network, the LoRaWAN network server individually manages the data rate (DR) settings and RF output power for each device through an ADR (Adaptive Data Rate) scheme.
The spreading factor from SF7 to SF12
-
Rashmi Sharan Sinha, Yiqiao Wei, Seung-Hoon Hwang, KICS, 2017, A survey on LPWA technology: LoRa and NB-IoT ↩
-
Microchip, RN2483, Catalog data, Microchip, RN2483, Errata Catalog data ↩
-
Semtech, SX 1272/73 and 1276/77/78/79, Catalog data, Semtech, AN1200.22, LoRa Modulation Basics ↩
-
Fresnel zone – Wikipedia.html ↩
-
Johanna Nordlof, Petter Lagusson, Sweden 2017, A Study of Low-Power Wide-Area Networks and an In-Depth Study of the LoRaWAN Standard ↩
-
Aloÿs Augustin, Jiazi Yi, Thomas Clausen, and William Mark Townsley Dongkyun Kim, Academic Editor, A Study of LoRa_ Long Range & Low Power Networks for the Internet of Things ↩
-
https://smartmakers.io/en/home/ , LoRaWAN range, part 1_ The most important factors for a good LoRaWAN signal range – LPWAN LoRaWAN IoT ↩
-
Ukko-Pekka Peura, Information Technology, Oulu University of Applied Sciences, Spring 2018, LoRaWAN Optimization For a Battery Powered Sensor Networks ↩
-
Lluís Casals, Bernat Mir, Rafael Vidal, Carles Gomez, Department of Network Engineering, Universitat Politècnica de Catalunya, Modeling the Energy Performance of LoRaWAN ↩
-
https://lora-alliance.org/about-lorawan ↩