Performance Analysis of Point-to-Point LoRa End Device Communication

LoRa is an emerging communication technology that can be used in any field. Many types of research have analyzed LoRa network using a gateway and several end devices to many monitoring applications. However, the communication performance between LoRa end devices only has not been evaluated. This research tested a LoRa communication between two end devices in a point-to-point topology. From the experiment results with various payload lengths, the optimum payload is only 48 bytes with the default module configuration. Longer payload resulted in a decreased performance. Thus, this research implemented a waiting protocol that can increase the Packet Reception Ratio of 100-byte payload from 49.87% to 97.52%.


Introduction
LoRa is a new long-range communication technology in the field of the Internet of Things (IoT), among Radio Frequency Identification (RFID) [1] and WIFi [2][3].LoRa allows users to transmit data to a long-distance node with the compensation of a low data rate.Its specification describes that LoRa can transmit data with a maximum data rate of 37.5 kbps [4].
The configuration of LoRa's parameters such as spreading factor (SF), bandwidth (BW) and Code Rate (CR) determines the data rate (R b ) and coverage range.A higher spreading factor yields a longer range and slower data rate [5].The relation between these parameters and the data rate is shown in (1).
Because of the long-range specification for up to 10 km, LoRa is widely used in many monitoring applications.The module is designed in small size and it consumes low power, so it can be used in moderate mobility.Many types of research implement this LoRa technology in smart cities, such as for health [6][7], monitoring [8][9][10] or metering [11][12].
Normally, LoRa network consists of end devices, gateways, and a network server as shown in Figure 1.End devices send data to a network server through gateways [2,5,10,[13][14].End devices perform the physical layer process and gateways act as repeaters that can collect all data from different end devices.End devices and gateways are connected through wireless links with LoRa modulation, whereas gateways and network servers are usually connected through a wired link or 3G/4G link.The access, flow, and network control is provided by gateways and server.
In the market, the price of LoRa gateway is expensive, which is around 3.5 million rupiahs, while LoRa end device only costs 150 thousand rupiahs [15].Thus, we test a LoRa network that only consists of end devices without any gateway or server.With the elimination of gateways, the installation cost could be highly reduced.This paper analyzes the performance of LoRa end-device communication with various payload lengths.Many researches had analyzed the LoRa performance between the end device and gateway [5,[13][14]16].Nonetheless, the performance of LoRa communication between end devices has never been analyzed.Due to the gateway elimination, the link budget between the transmitter and receiver would be different.
The communication improvement in this research is the implementation of waiting time to compensate for the gateway absence in LoRa end device communication.The waiting time in this flow control procedure can maintain the communication performance because the protocol controls the data flow in the transmitter node according to the receiver process without excessive delay.
The state of the art of this study is the performance analysis of communication using LoRa end devices only without any gateway.The experiments measured the Packet Reception Ratio (PRR) in various distances and payload lengths.This preliminary study provides the basis to explore LoRa more deeply.A self-designed waiting protocol in LoRa end devices is also implemented to enhance LoRa end device communication.
The next sections in this paper are organized as follows.Section 2 describes the methods applied in this paper.Section 3 discusses the results obtained from various experiments.Section 4 concludes the paper.

Research Methods
This research used LoRa end devices from HopeRF-RFM9x LoRa Module which transmits at a frequency of 915 MHz.The module is the closest frequency module to the Radio Frequency band of the Non-cellular Low Power Wide Area in Indonesia that is from 920 MHz to 923 MHz [17].The test experiments were located in an indoor environment using a default helical antenna and without a gateway, so the distance range only covers inside the campus building (lower than 100 meters).
The end device module has 14 pins that can be connected to a microcontroller.In this research, each end device is connected to an Arduino Nano as shown in The flowchart of the LoRa simple protocol is shown in Figure 4.The transmitter node sends packets with fixed length and combined with the packet's recorded time.Figure 4a shows the transmission process that is conducted repeatedly until the node power is off.First, the transmitter forms a fixed-length packet and then records its time.It combines the recorded time at the end of the packet string.Then it initiates a packet beginning process, and prints the packet string into the LoRa end device module.After the transmitter finishes printing the packet, it ends the LoRa packet.This transmission procedure then returns to the packet forming process.Figure 4b shows the reception process.First, the microcontroller activates the LoRa begin process and then detects the received packets.If there is a received packet, the microcontroller initiates the reading process for all bytes in the received packet.If there is no received packet, the microcontroller continues the packet detection process again.This packet reception process is also conducted repeatedly until the receiver power is off.
To compensate for the gateway elimination, this research implemented a waiting time to control the data flow.The flowchart of the transmitter waiting protocol is shown in Figure 5.After the transmitter node sends one packet, it initiates the timer to 2000 milliseconds and counts the timer down while checking for a received packet.If the transmitter has received a packet under 2000 milliseconds, then the transmitter continues directly to send the next packet, without waiting for the timer to end.If until the waiting time runs out, the transmitter continues to send the next packet and considers the previous packet is lost.
This waiting protocol can maintain the reception process in the receiver node because the transmitter will not send the next packet until it receives the feedback from the receiver or the timer runs out.The waiting protocol is different from the previous simple one-way communication protocol.In the simple one way communication, the transmitter never waits for feedback from the receiver and it continues sending packets after finishing sending the previous packet.It does not take into consideration whether the receiver has received the packet or not.
The waiting time between each packet in the waiting protocol can be different.It depends on the process in the receiver node and the packet's round trip.When there is no loss in the wireless environment, the waiting time could reach a minimum value.However, when there is a packet loss, the waiting time will reach its maximum value, which is 2000 milliseconds.This flexible waiting time is the major advantage of the waiting protocol.The flowchart of the receiver node is shown in Figure 6.The waiting protocol requires the receiver to send a feedback packet directly right after it finishes receiving a packet.The feedback packet is built from the received packet combined with the recorded time.This feedback packet is used by the transmitter as a requirement before it sends another packet.
The reception and transmission process in each transmitter and receiver node confirms a twoway communication between LoRa end devices.Thus, a wireless communication network could be built with LoRa end devices solely, because each LoRa end device can send and receive a packet.

The Performance of Simple One-Way Communication
In this first experiment, the LoRa end-device performance is evaluated using a simple one-way communication protocol.The experiments were conducted several times for three minutes each using different packet lengths.The communication performance was analyzed especially by its PRR, which is calculated from the ratio of the number of received packets and the number of sent packets.The result of this simple one-way communication is shown in Table 1.The experiment also recorded the average Received Signal Strength Indicator (RSSI), Signal-to-Noise Ratio (SNR), and Time-on-Air (ToA) of the received packets in the receiver node.ToA indicates the duration time that is required for a packet to be transferred from the transmitter to the receiver.affects the RSSI value.The RSSI value is around -42 dBm for three-meter node distance, while the six-meter node distance decreases the RSSI value until around -54 dBm.
The different payload length has effects on the number of the sent packet and the transmission time.Longer payload resulted in fewer packet numbers that can be transmitted and the longer Time-on-Air.The minimum ToA is 49.24 ms to transmit a 10-byte packet with a 3-meter distance range.
From the experiment results, a unique pattern is shown in the PRR performance.For packets having a payload length less than or equal to 48 bytes, the PRR value is above 98%.On the other side, for the packets having the payload more than 48 bytes, the PRR is decreased by half.The degraded condition of longer payload is caused by the First In First Out (FIFO) size that is fixed to 64 bytes [4].Thus, the LoRa end device could not receive longer packets in continuous time.It needs extra time to wait for the shift register reads all bytes and store long packet string in the buffer.
The optimum payload length is 48 bytes according to the optimum PRR value that can be achieved.This condition is due to the long preamble and header that is always added on each packet.Every LoRa packet comprises three elements, which are a preamble, header, and the data payload.
By analyzing the PRR value for various payload lengths, the optimum data rate (R b ) can be evaluated from (2).N is the number of packets that can be transmitted, PL is the payload length and t is the time duration, which is three minutes or 180 seconds.
With the optimum payload length of 48 bytes, the achieved data rate is around 4 kbps.This experimental result provides the maximum payload length that should be noticed in planning IoT applications using only default LoRa end devices, while other researches only provide the communication performance between LoRa gateway and LoRa end devices [5,13].

The Performance of Waiting Protocol
In the second experiment, the waiting time was implemented in several conditions.The experiments were conducted in different rooms on the same floor of the campus building.The sketch of the experiment location is depicted in Figure 7.The distance of rooms ranges between 20 meters to 60 meters.Between Room 1 and Room 5, there are a student room, elevators, and stairs that make significant obstacles for wireless communication.The PRR comparison between the simple one-way communication and the waiting protocol implementation is shown in Figure 8.For this comparison experiment, the transmitter node was placed in Room 5 and the receiver was in Room 1.A significant difference is found in the experiment using 100-byte packets.The PRR value of the simple one-way communication is only 49.87%, while the PRR value using the waiting protocol can achieve 97.52%.This paper demonstrates that a simple waiting protocol could increase the PRR value for long packets, while other researches only provide communication performance for 20-byte and 40-byte packets [13].The significant improvement with the waiting protocol is due to the implementation of more idle time to wait for the receiver node to finish saving the long packet into its 64-byte FIFO.

Conclusion
This research has conducted several experiments to analyze the point-to-point communication performance using LoRa end device modules.In the simple one-way communication, the optimum payload length is 48 bytes to obtain PRR above 98%.The waiting protocol can compensate for the reception of a longer packet by implementing an idle time to wait for the receiver to finish reading all packet data.The waiting protocol can increase the PRR value for a 100-byte packet from 49.87% to 97.52%.This research has found that the maximum indoor distance with obstacles is 45 meters to achieve PRR above 97%.However, this maximum distance is only applied for point-to-point communication.A multipoint communication over LoRa end devices should be more explored to maximize the LoRa technology for IoT.

Figure 4 .
Figure 4. Flowchart of LoRa Simple One Way Communication Protocol; (a) Transmitter Node; (b) Receiver Node

Figure 5 .
Figure 5. Flowchart of Waiting Protocol in Transmitter Node

Figure 6 .
Figure 6.Flowchart of Waiting Protocol in Receiver Node

Figure 7 .
Figure 7. Floor Plan for the Experiments

Table 1 .
Performance of Simple One-Way CommunicationFrom the experiments, the average RSSI and SNR are similar for different payload lengths.The SNR value in one room environment stays roughly the same.However, the node distance