Understanding LoRa Physical Layer : PHY modulation in LoRaWAN network stack
Physical layer is the foundation of wireless communication, defining how data is transmitted over the air. It includes parameters such as frequency selection, modulation schemes, and power settings. Understanding these attributes is crucial for configuring LoRaWAN devices to operate effectively in different environments and under various regulatory constraints. In this page, we will explore LoRa physical layer, covering modulation schemes, spreading factors, frequency bands, and other key attributes used in LoRaWAN network stack at layer-1 of OSI.
Introduction :
As we know LoRaWAN is one of the LPWAN technologies.
It offes wide coverage and long range in addition to low power consumption.
There are different frequency bands allocated throughout the world by this wireless
system. It includes 902 to 928 MHz frequency band in US, 863-870 MHz/433-434 MHz
in Europe and 470-510 MHz/779-787 MHz in China.
The figure depicts protocol stack layers of LoRaWAN system. As shown LoRa physical layer lies between RF and MAC layer.
Following are the functions of LoRa PHY Layer :
➨It offers services to upper layers above it i.e. MAC layer and Application layer.
➨It passes physical layer frame to radio frequency layer for up conversion to
radio frequency as per region such as US, EU, China, Australia, INDIA and so on.
➨It uses Forward Error Correction to help in error correction.
➨It adds preamble to physical layer frame which is used in time/frequency synchronization at the receiver.
➨It uses CRC to help in error detection of the PHY frame carrying MAC payload.
➨It uses modulation such as GFSK to make analog signal suitable to be transmitted over the air.
LoRa Physical layer modulation
Before we delve into physical layer, let us understand terminologies of the LoRaWAN below.
Let us understand LoRa Physical Layer modules :
• Physical Layer constructs the frame in order to transmit payload from MAC layer
over RF link.
• It inserts PHDR, PHDR_CRC, preamble and CRC for the entire frame.
CRC field is available in uplink message only.
• LoRa uses wideband linear frequency modulated chirp pulses to encode information bits.
Chirp is called sweep signal which is a tone in which frequency increases with time (called
up-chirp) or decreases with time (called down-chirp). In up-chirp frequency increases in time and
in down-chirp frequency decreases in time. These chirp signals are used as
carrier signals where a message is encoded on. Following figure depicts encoding of message on chirp signals.
As shown starting part is preamble sequence followed by two down chirps and encoded payload. The figure depicts LoRa modulated message.
The chirps are cyclically shifted and it is frequency jumps which determines data encoding on chirps.
Let us understand use of spreading factor in Lora to encode message.
Example: Symbol consisting og 1011111 (representing decimal of 95).
Here number of raw bits to be encoded by one symbol is 7
Hence Spreading Factor = 7
The symbol has 2SF values. For SF= 7, we have range from 0 to 127.
The symbol value is encoded on sweep signal (up-chirp) i.e. sweep signal is divided in 27 = 128 chips.
This is shown in the figure below.
• PHY layer passes the modulated signal to RF transceiver for up conversion to higher frequencies as per country specific
LoRaWAN bands. Similarly down conversion is carried out at the other end before demodulation to raw information bits.
As mentioned above spreading factor defines two values:
• The number of raw bits which can be encoded by that symbol and
• Each symbol can hold 2SF chips.
Forward Error correction is applied to payload of the loRa packet. In this process, error correction bits are added to the transmitted data. This added redundant bits help to restore the data when they get corrupted by interference. More the redundant bits, more easier it helps to correct the corrupted data but at the cost of bandwidth and reduction in battery life.
LoRa uses different coding rate values such as 4/5, 4/6, 4/7 and 4/8.
CR = 4/(4+CR), Where CR = 1,2,3,4
Following LoRaWAN physical layer parameters are configured.
Bandwidth (BW) = 125 KHz to 500 KHz
Spreading Factor (SF) = 7 to 12
Coding Rate (CR) = 1 to 4
In LoRa, Bandwidth is used interchangeably with chip rate, hence
BW = Rc = Chip rate (Chips/sec)
Rc (symbols/sec) = BW/2SF = Rc/2SF
For example, if BW = 125 KHz and SF = 7
Rs = 125000/27 = 977 Symbols/sec.
Rb (bits/sec) = SF * (BW/2SF) * (4/(4+CR))
The figure depicts LoRaWAN physical layer MATLAB simulation model.
Reference: LoRaWAN specifications published by LoRa Alliance ( https://www.lora-alliance.org ).
Conclusion
Mastering the characteristics of the LoRa physical layer allows users to optimize their network for coverage, power consumption, and interference management. The flexibility of the physical layer parameters makes LoRaWAN an adaptable solution for a wide range of IoT applications. By fine tuning these settings, users can enhance the performance and efficiency of their LoRaWAN deployments.