Design and Empirical Validation of a LoRaWAN IoT Smart Irrigation System †

: In some parts of the world, climate change has led to periods of drought that require managing efﬁciently the scarce water and energy resources. This paper proposes an IoT smart irrigation system speciﬁcally designed for urban areas where remote IoT devices have no direct access to the Internet or to the electrical grid, and where wireless communications are difﬁcult due to the existence of long distances and multiple obstacles. To tackle such issues, this paper proposes a LoRaWAN-based architecture that provides long distance and communications with reduced power consumption. Speciﬁcally, the proposed system consists of IoT nodes that collect sensor data and send them to local fog computing nodes or to a remote cloud, which determine an irrigation schedule that considers factors such as the weather forecast or the moist detected by nearby nodes. It is essential to deploy the IoT nodes in locations within the provided coverage range and that guarantee good speed rates and reduced energy consumption. Due to this reason, this paper describes the use of an in-house 3D-ray launching radio-planning tool to determine the best locations for IoT nodes on a real medium-scale scenario (a university campus) that was modeled with precision, including obstacles such as buildings, vegetation, or vehicles. The obtained simulation results were compared with empirical measurements to assess the operating conditions and the radio planning tool accuracy. Thus, it is possible to optimize the wireless network topology and the overall performance of the network in terms of coverage, cost, and energy consumption.


Introduction
The United Nations Convention to Combat Desertification (UNCCD) [1] claims that 1.8 billion people will experience absolute water scarcity and two-thirds of the world will be living under water-stressed conditions by 2025. Moreover, the demand for water is expected to increase by 50% with a projection of 68% of the world's population living in urban areas by 2050. As a result, drought is considered one of the most widespread natural disasters causing short-and long-term impacts on economy, sustainability and ecology. To mitigate these effects, three main pillars should be considered [1]: drought early warning and monitoring systems, vulnerability and risk assessment, and drought risk mitigation measures. This article focuses on the last pillar by proposing the development of sustainable irrigation schedules for urban environments.
IoT is gaining momentum as a key enabler technology in smart agriculture. For instance, in [2], the authors examined the main current trends in research and revealed that there are still numerous open issues. With the IoT adoption, the efficiency of irrigation methods is expected to increase mainly due to the incorporation of Decision Support Systems (DSSs) [3][4][5]. For instance, in [3], the authors presented a DSS that was evaluated on three sensor nodes, which communicated with a gateway either directly or through multi-hop communications. The used transceivers are based on the Xbee protocol and can reach a 500 m range, which is a relatively low coverage area in certain outdoor scenarios. In addition, the paper provides no further details on the communications architecture.
The use of wireless communications in the field of precision agriculture, especially in urban environments, presents several technical challenges (e.g., the need for long-range communications, long battery life, high network capacity, and cost-effectiveness) that can be in part overcome with Low-Power Wide Area Networks (LPWAN) technologies such as Sigfox, Ingenu, NB-IoT, DASH7, Weightless, or LoRaWAN (Long-Range Wide Area Network). Specifically, in the last years, the LoRaWAN standard has received attention both from industry and academia in the so-called smart scenarios [6].
LoRaWAN has already been used in smart irrigation systems. For example, Usmonov et al. [7] presented a LoRaWAN-based cost-effective wireless control system for drip irrigation. The proposed centralized solution focuses on the design of a simple protocol that eliminates the need for gateways and network servers by using a master station to relay packets between the control application and the deployed end-device nodes. Another interesting work was proposed by Gloria et al. [5], who presented a wireless sensor network controlled by a single gateway (broker) that is in constant communication with an online server that uses LoRa peer-to-peer connections. In such a work, Message Queuing Telemetry Transport (MQTT) via a WiFi connection is used for exchanging messages between the server and the nodes. It is also worth pointing the work in [8], which details the design and implementation of a LoRaWAN smart irrigation system in a typical urban environment of Beijing. The communications distance between the irrigation node and the gateway is up to 8 km, covering an area of up to 2 km 2 . In addition, the article provides energy-consumption results that consider different operating modes of the end nodes.
In contrast to the previously mentioned articles, which are mainly focused on DSS capabilities or on the system design, this paper presents an IoT LPWAN smart irrigation system with a fog computing-based architecture whose node and gateway locations can be optimized in urban areas thanks to the help of an in-house developed 3D-ray launching radio planning simulator. Figure 1 shows the communications architecture of the proposed system, which is composed by three main layers:

•
IoT Layer. It consists of smart irrigation IoT nodes that exchange information with local gateways of the fog computing layer. IoT nodes essentially send information obtained by their sensors and receive remote irrigation commands from either fog computing gateways or the cloud.
• Fog Computing Layer. Its fog computing gateways provide the deployed IoT nodes with fog and sensor fusion services, which are location-aware, reduce latency response, and decrease the cloud communications load [9]. • Remote Service Layer. It collects the data of the system through the cloud, which stores them in a database and processes them to be shown in a user-friendly way to remote users. In addition, the remote services of this layer can make use of third-party services such as weather forecasts when deciding irrigation schedules.

Remote Users
IoT Node Layer

Third-Party Services
Weather Forecast Figure 1. Communications architecture of the proposed system.

Campus Radio Channel Analysis
The characterization of the radio channel within different scenarios is the previous task to the optimized deployment of wireless nodes. For that purpose, empirical models are usually employed, which give rapid results but with high errors, since they are very site-specific. In this paper, measurements as well as simulations by means of an in-house developed 3D-Ray Launching (3D-RL) deterministic algorithm were performed in the 868 MHz band to characterize the radio channel within a university campus with the aim of optimizing the wireless network deployment. The implemented algorithm is based on geometrical optics (GO) and geometrical theory of diffraction (GTD). The code was programmed in Matlab and a deep description on the simulation process can be found in [10].
It is worth noting that the proposed smart irrigation system could present some limitations regarding its LoRaWAN node deployment. On the one hand, the position of the near-ground nodes depends on the access to the water supply and on the surface to irrigate. On the other hand, the deployment of the LoRaWAN gateway can be optimized, since it has to be deployed inside a building, but the location can be determined based on radio planning analysis. For such a purpose, the scenario was modeled in 3D for its simulation with the 3D-RL tool (see Figure 2, left). To obtain accurate RF power distribution estimations, the simulation scenario was created in as much detail as possible, thus including the most relevant elements that may influence electromagnetic propagation (e.g., buildings, roads, trees, and vehicles) and their specific material properties (permittivity and conductivity). Then, the input parameters of the 3D-RL tool were carefully selected, including the operation frequency, the transmitter and receiver radiation pattern, the number of permitted reflections and the ray angular/spatial resolution.
It is important to note that scenarios such as the one modeled for this paper are especially challenging in terms of radio propagation analysis by deterministic methods due to their large dimensions and the numerous obstacles that interact with the propagating wave. To obtain accurate simulation results in a limited amount of time, it is necessary to set correctly the number of reflections and the angular/spatial resolution parameters through a proper analysis [11]. The resulting parameters for the scenario under analysis are indicated in Table 1. The initially deployed near-ground LoRaWAN nodes are depicted in Figure 2 (left), represented as yellow circles. The simulations performed for each node provide the information required to optimize the LoRaWAN gateway location. Since the 3D-RL tool provides the RF power distribution of the whole scenario, it is possible to optimize the deployment considering all the elements of such a scenario. For example, Figure 2 (right) shows bi-dimensional planes of the RF power distribution estimations for node 7 at the ground level (simulating an irrigation node) and in the building on the fourth floor level (simulating a fog computing node or a gateway). Since the typical sensitivity of a LoRaWAN device goes from −130 to −148 dBm, a first approximation regarding the gateway optimum location can be easily extracted from the simulation results. To validate the simulation results, they were compared with the empirical results obtained during a previous measurement campaign [6]. As can be observed in Figure 3, the simulation and empirical results are really close, obtaining a mean error of 0.53 dB and a standard deviation of 3.39 dB.

Conclusions
This paper presents a LoRaWAN and fog computing-based architecture for deploying smart irrigation systems. The proposed system consists of IoT nodes that exchange data with local fog computing nodes and with a remote cloud in order to determine when to irrigate. To decide where to place the LoRaWAN IoT nodes and gateways, an in-house 3D-ray launching radio-planning tool was used in conjunction with an accurate 3D model of the simulated scenario (a university campus). The obtained simulation results were compared with empirical measurements, showing the good accuracy of the used radio planning tool.
As a consequence, the accuracy of the simulation tool was validated, whose results can provide useful guidelines for the network planning phases prior to the deployment of LoRaWAN nodes and gateways in similar urban deployments.