LoRa Communication Quality Optimization on Agriculture Based on the PHY Anti-Frame Loss Mechanism
Abstract
:1. Introduction
2. Materials and Methods
2.1. PHY Anti-Frame Loss Mechanism
2.1.1. PHY Frame Loss Detection Mechanism
- The internal CRC enables devices to detect the integrity of the transmission and reception of long data.
- Enhanced information security: By incorporating additional factors, such as function codes, device addresses, and destination addresses, the data frames contribute to improved information security. The absence of a decoding format for data frames prevents unauthorized access to the information within them. Furthermore, each packet cannot be individually decoded; only complete packets are subject to decoding.
- It facilitates tracing the origin of the received data, enabling the identification of malicious or unknown data sources.
- The CRC checksum can be privately designed, allowing for customization to further bolster its security and verification capabilities. This adaptability provides an additional layer of data integrity and security.
2.1.2. Anti-Frame Loss Mechanism
- (1)
- Before the node is ready to upload, the long data are segmented and encapsulated into multiple sub-packets for multiple transmissions (Dashed Figure 1).
- (2)
- The node sequentially sends the sub-packets, and upon receiving each data packet, the gateway parses the address. When a new address is encountered, the timer is launched or refreshed. The timer duration is set based on the number of times each device address needs to be reported. In the case of using Trx as the transmission information, any loss or miscalculation by the gateway could result in timing errors. In this study, the timer was set to 100 ms. The frame loss detection mechanism was activated (Dashed Figure 2).
- (3)
- The external CRC is self-verified by the gateway upon receiving the sub-packets. If the CRC is invalid, the packet is discarded. At this point, it is unknown which device address’s data packets were discarded. Additionally, if the external CRC of a packet is lost, it will still pass the external CRC verification, but the gateway cannot verify the integrity of its internal data frame. Hence, an internal CRC is needed to check for packets discarded by the gateway, complete packet loss, or incomplete data. The gateway remains in the continuous receive mode, receiving packets until the timer expires, parsing the contents of each device address, and concatenating them into new data packets.
- (4)
- After the timer expires, the internal CRC verification for each new data packet is initiated. If it fails, the gateway clears the cache for that device address. After all internal CRC verifications, the gateway switches to the transmit mode, sending acknowledgment frames for successful reception or retransmission to each device address. After sending, it switches back to the continuous receive mode, waiting for re-reception.
- (5)
- After the sending is complete, the node switches to the receive mode, initiating a timer (with a duration greater than three times the gateway timer). If there is no acknowledgment or a retransmission acknowledgment frame is received, the node retransmits the data packet. Due to the half-duplex nature of LoRa communication, the scenario of multiple nodes engaging in random transmission and reception was not considered. In such situations, where multiple nodes engage in random transmission, the gateway may remain in the continuous receive mode, preventing it from responding to the nodes.
- (6)
- Steps (1)–(5) are repeated until the node successfully receives acknowledgment frames, concluding the current round of transmission.
2.2. Theoretical Performance Calculation of LoRa
- SF: Experimental range from 6 to 12 (7 levels).
- TP: Considering communication range requirements of 500 m or more, TP ranges from 2 to 12 dBm (6 levels).
2.3. Multi-Node Parallel Packet Loss Rate Experiment under Strong and Weak Interferences
2.3.1. Packet Loss Rate: Experimental Materials and Methods
- (1)
- Validation of the PHY anti-frame loss mechanism’s impact on the reception rates under the maximum energy efficiency ratio parameters and assessing whether its actual performance meets real-world application needs: Premsankar et al. [21] conducted transmission experiments in a 500 m × 500 m urban area, showing an 8% improvement in reception rates compared to the existing technologies. The overall reception rates were mainly concentrated within the range of [80%, 90%], with the highest reception rate close to 93%. This study considered reception rates above 85% as a good communication quality and the distance with reception rates above 85% as the effective distance.
- (2)
- Determination of the optimal transmission and reception interval for different distances: The transmission and reception interval length determines the number of times the PHY frame loss prevention mechanism operates. One interval ensures the smooth transmission of one data packet. For example, in this experiment, a complete transmission and reception cycle took 150 ms (the gateway opened a timer for 100 ms after sending, and responding to the node took 50 ms). Therefore, with a 500 ms interval, there were a maximum of 4 opportunities for transmission and reception. Larger intervals mean more operations of the frame loss prevention mechanism.
- (3)
- Evaluation of the omnidirectional antenna gain effects and optimal selection of the omnidirectional antenna power: The antenna power is a direct factor influencing the link budget and power consumption. The experiment aimed to assess the gain effects of different omnidirectional antennas and determine the optimal choice for the omnidirectional antenna power.
- Eight LoRa pressure collection nodes with 1 dBi soft FPC omnidirectional antennas installed;
- A 1 × 3 dBi 470–510 MHz omnidirectional antenna; 1 × 6 dBi 470–510 MHz omnidirectional antenna; and 1 × 8 dBi 470–510 MHz omnidirectional antenna;
- One suction cup omnidirectional antenna base with a 3 m feed line;
- One PC with the SecureCRT software (Version 8.7.3);
- One long RJ45 twisted pair network cable of 1 m;
- A 3.7 V 18.5 Wh lithium battery pack (8);
- Mobile power supply with QC3.0 support and 12 V 1 A output;
- Two tripods;
- Other cables.
2.3.2. Strong Interference Packet Loss Rate: Experimental Location
2.3.3. Weak Interference Packet Loss Rate: Experimental Location
3. Results and Discussion
3.1. LoRa Performance Simulation Experiment
3.1.1. Time Performance
3.1.2. Energy Consumption Performance
3.1.3. RF Performance
3.1.4. Integrated Performance Analysis
3.2. Strong and Weak Interference Packet Loss Rate: Experimental Results and Discussion
3.2.1. Strong Interference Packet Loss Rate: Experimental Results and Discussion
3.2.2. Weak Interference Packet Loss Rate: Experimental Results and Discussion
3.2.3. Packet Loss Rate: Experimental Results and Discussion
4. Conclusions
- (1)
- The maximum energy consumption ratio parameter: The highest energy consumption ratio parameters and performance for SX1278 are SF = 6, TP = 2, and BW = 125 kHz, operating in the 470 MHz frequency band. These parameters, in conjunction with a send/receive range of [0, 400] m, a 3 dBi gateway omnidirectional antenna gain, a 1 dBi node omnidirectional antenna gain, and a send/receive interval of at least 1000 ms, can achieve an acceptance rate exceeding 90%.
- (2)
- PHY anti-frame loss mechanism and performance: After implementing the PHY anti-frame loss mechanism and using the maximum energy consumption ratio parameters, the primary factor influencing the reception rate is the send/receive interval. The antenna gain becomes the dominant factor in achieving reception rates greater than 90%. Strong interference environments benefit from a transceiver interval of 2000 ms, leading to a 37.8% increase in the reception rate at 250 m. Weak interference environments similarly benefit from a 2000 ms transceiver interval, resulting in a 53.4% improvement in the reception rate at 600 m.
- (3)
- Optimal communication distance: Realistic agricultural environments experience a link loss that falls between strong and weak interference scenarios. The a range of 400 m is deemed a more appropriate communication distance, with a recommended send/receive interval greater than 1000 ms. For nodes within 400 m, the 3 dBi low-gain omnidirectional antenna is ideal for low energy consumption.
5. Patents
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Conflicts of Interest
References
- Swain, M.; Zimon, D.; Singh, R.; Hashmi, M.F.; Rashid, M.; Hakak, S. LoRa-LBO: An Experimental Analysis of LoRa Link Budget Optimization in Custom Build IoT Test Bed for Agriculture 4.0. Agronomy 2021, 11, 820. [Google Scholar] [CrossRef]
- da Silveira, F.; Lermen, F.H.; Amaral, F.G. An overview of agriculture 4.0 development: Systematic review of descriptions, technologies, barriers, advantages, and disadvantages. Comput. Electron. Agric. 2021, 189, 106405. [Google Scholar] [CrossRef]
- Klaina, H.; Guembe, I.P.; Lopez-Iturri, P.; Campo-Bescós, M.Á.; Azpilicueta, L.; Aghzout, O.; Alejos, A.V.; Falcone, F. Analysis of low power wide area network wireless technologies in smart agriculture for large-scale farm monitoring and tractor communications. Measurement 2022, 187, 110231. [Google Scholar] [CrossRef]
- Mekki, K.; Bajic, E.; Chaxel, F.; Meyer, F. A comparative study of LPWAN technologies for large-scale IoT deployment. ICT Express 2019, 5, 1–7. [Google Scholar] [CrossRef]
- Tao, W.; Zhao, L.; Wang, G.; Liang, R. Review of the internet of things communication technologies in smart agriculture and challenges. Comput. Electron. Agric. 2021, 189, 106352. [Google Scholar] [CrossRef]
- Bonilla, V.; Campoverde, B.; Yoo, S.G. A Systematic Literature Review of LoRaWAN: Sensors and Applications. Sensors 2023, 23, 8440. [Google Scholar] [CrossRef] [PubMed]
- Yousuf, A.M.; Rochester, E.M.; Ousat, B.; Ghaderi, M. Throughput, coverage and scalability of LoRa LPWAN for internet of things. In Proceedings of the 2018 IEEE/ACM 26th International Symposium on Quality of Service (IWQoS), Banff, AB, Canada, 4–6 June 2018; pp. 1–10. [Google Scholar]
- Li, Q.; Liu, Z.; Xiao, J. A data collection collar for vital signs of cows on the grassland based on LoRa. In Proceedings of the 2018 IEEE 15th International Conference on e-Business Engineering (ICEBE), Xi’an, China, 12–14 October 2018; pp. 213–217. [Google Scholar]
- Deng, F.; Zuo, P.; Wen, K.; Wu, X. Novel soil environment monitoring system based on RFID sensor and LoRa. Comput. Electron. Agric. 2020, 169, 105169. [Google Scholar] [CrossRef]
- Bravo-Arrabal, J.; Fernandez-Lozano, J.; Serón, J.; Gomez-Ruiz, J.A.; García-Cerezo, A. Development and implementation of a hybrid wireless sensor network of low power and long range for urban environments. Sensors 2021, 21, 567. [Google Scholar] [CrossRef] [PubMed]
- Yazdani, N.; Kouvelas, N.; Prasad, R.V.; Lucani, D.E. Energy Efficient Data Recovery from Corrupted LoRa Frames. In Proceedings of the 2021 IEEE Global Communications Conference (GLOBECOM), Madrid, Spain, 7–11 December 2021; pp. 1–6. [Google Scholar]
- Sinha, R.S.; Wei, Y.; Hwang, S.-H. A survey on LPWA technology: LoRa and NB-IoT. ICT Express 2017, 3, 1–421. [Google Scholar] [CrossRef]
- Ruotsalainen, H.; Shen, G.; Zhang, J.; Fujdiak, R. LoRaWAN Physical Layer-Based Attacks and Countermeasures, A Review. Sensors 2022, 22, 3127. [Google Scholar] [CrossRef] [PubMed]
- Sanchez-Iborra, R.; Sanchez-Gomez, J.; Ballesta-Viñas, J.; Cano, M.-D.; Skarmeta, A.F. Performance evaluation of LoRa considering scenario conditions. Sensors 2018, 18, 772. [Google Scholar] [CrossRef]
- Szafranski, D.; Reinhardt, A. ELORA: Even Longer Range Sensor Networking Through Modulated Concurrent LoRa Transmissions. In Proceedings of the 2023 IEEE 24th International Symposium on a World of Wireless, Mobile and Multimedia Networks (WoWMoM), Boston, MA, USA, 12–15 June 2023; pp. 388–393. [Google Scholar]
- Song, Y.; Lin, J.; Tang, M.; Dong, S. An Internet of energy things based on wireless LPWAN. Engineering 2017, 3, 460–466. [Google Scholar] [CrossRef]
- Talavera, J.M.; Tobón, L.E.; Gómez, J.A.; Culman, M.A.; Aranda, J.M.; Parra, D.T.; Quiroz, L.A.; Hoyos, A.; Garreta, L.E. Review of IoT applications in agro-industrial and environmental fields. Comput. Electron. Agric. 2017, 142, 283–297. [Google Scholar] [CrossRef]
- Tagarakis, A.C.; Kateris, D.; Berruto, R.; Bochtis, D. Low-cost wireless sensing system for precision agriculture applications in orchards. Appl. Sci. 2021, 11, 5858. [Google Scholar] [CrossRef]
- Iqbal, M.; Abdullah, A.Y.M.; Shabnam, F. An application based comparative study of LPWAN technologies for IoT environment. In Proceedings of the 2020 IEEE Region 10 Symposium (TENSYMP), Dhaka, Bangladesh, 5–7 June 2020; pp. 1857–1860. [Google Scholar]
- Kochhar, A.; Kumar, N. Wireless sensor networks for greenhouses: An end-to-end review. Comput. Electron. Agric. 2019, 163, 104877. [Google Scholar] [CrossRef]
- Sudha, M.N.; Valarmathi, M.L.; Babu, A.S. Energy efficient data transmission in automatic irrigation system using wireless sensor networks. Comput. Electron. Agric. 2011, 78, 215–221. [Google Scholar] [CrossRef]
- Premsankar, G.; Ghaddar, B.; Slabicki, M.; Di Francesco, M. Optimal configuration of LoRa networks in smart cities. IEEE Trans. Ind. Inform. 2020, 16, 7243–7254. [Google Scholar] [CrossRef]
- Križanović, V.; Grgić, K.; Spišić, J.; Žagar, D. An Advanced Energy-Efficient Environmental Monitoring in Precision Agriculture Using LoRa-Based Wireless Sensor Networks. Sensors 2023, 23, 6332. [Google Scholar] [CrossRef] [PubMed]
- Narieda, S.; Fujii, T.; Umebayashi, K. Energy Constrained Optimization for Spreading Factor Allocation in LoRaWAN. Sensors 2020, 20, 4417. [Google Scholar] [CrossRef] [PubMed]
- Yim, D.; Chung, J.; Cho, Y.; Song, H.; Jin, D.; Kim, S.; Ko, S.; Smith, A.; Riegsecker, A. An experimental LoRa performance evaluation in tree farm. In Proceedings of the 2018 IEEE Sensors Applications Symposium (SAS), Seoul, Republic of Korea, 12–14 March 2018; IEEE: New York, NY, USA, 2018; pp. 1–6. [Google Scholar]
- Urabe, I.; Li, A.; Fujisawa, M.; Kim, S.-J.; Hasegawa, M. Combinatorial MAB-Based Joint Channel and Spreading Factor Selection for LoRa Devices. Sensors 2023, 23, 6687. [Google Scholar] [CrossRef] [PubMed]
- Gutiérrez-Gómez, A.; Rangel, V.; Edwards, R.M.; Davis, J.G.; Aquino, R.; López-De la Cruz, J.; Mendoza-Cano, O.; Lopez-Guerrero, M.; Geng, Y. A Propagation Study of LoRa P2P Links for IoT Applications: The Case of Near-Surface Measurements over Semitropical Rivers. Sensors 2021, 21, 6872. [Google Scholar] [CrossRef] [PubMed]
Payload | Length (Byte) | Transmitted Data Frame | Received Data Frame |
---|---|---|---|
Function code | 1 | √ | √ |
Device address | 2 | √ | √ |
Destination address | 2 | √ | √ |
Load bytes | 1 | √ | × |
Loaded data | 12 | √ | × |
CRC | 2 | √ | √ |
Channel | Communication Band/MHz | LoRa Nodes | LoRa Gateway |
---|---|---|---|
1 | 472.3 | transmission | reception |
2 | 472.5 | transmission | reception |
3 | 472.7 | transmission | reception |
4 | 472.9 | transmission | reception |
5 | 473.1 | transmission | reception |
6 | 473.3 | transmission | reception |
7 | 473.5 | transmission | reception |
8 | 473.7 | transmission | reception |
9 | 502.5 | reception | transmission |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Dai, Q.; Chen, Z.; Wu, G.; Li, Z.; Lv, S.; Huang, W. LoRa Communication Quality Optimization on Agriculture Based on the PHY Anti-Frame Loss Mechanism. Agriculture 2024, 14, 460. https://doi.org/10.3390/agriculture14030460
Dai Q, Chen Z, Wu G, Li Z, Lv S, Huang W. LoRa Communication Quality Optimization on Agriculture Based on the PHY Anti-Frame Loss Mechanism. Agriculture. 2024; 14(3):460. https://doi.org/10.3390/agriculture14030460
Chicago/Turabian StyleDai, Qiufang, Ziwei Chen, Guanfa Wu, Zhen Li, Shilei Lv, and Weicheng Huang. 2024. "LoRa Communication Quality Optimization on Agriculture Based on the PHY Anti-Frame Loss Mechanism" Agriculture 14, no. 3: 460. https://doi.org/10.3390/agriculture14030460
APA StyleDai, Q., Chen, Z., Wu, G., Li, Z., Lv, S., & Huang, W. (2024). LoRa Communication Quality Optimization on Agriculture Based on the PHY Anti-Frame Loss Mechanism. Agriculture, 14(3), 460. https://doi.org/10.3390/agriculture14030460