# Large-Area Saline-Alkali-Tolerant Rice Growth Environment Monitoring System Based on LoRa+UAV

Authors: Chunmei Mo; Zaimi Xie; Ji Wang
Journal: Advances in Materials Science and Engineering
 (2022)

---

## Abstract

A wireless sensor network (WSN) monitoring system for saline-alkali-tolerant rice based on long-range + unmanned aerial vehicle (LoRa + UAV) has been proposed in this paper to meet the requirements of difficult deployment, low scalability, and poor network reliability of traditional farmland environmental monitoring systems. The system automatically forms a double-layer star topology network through the terminal node and central node (intranet), central node, and UAV mobile node (extranet). Data transmission is carried out through LoRa technology, routing planning is carried out for UAV mobile receiving nodes at different flight altitudes, and an early warning mechanism for UAV energy is added. It effectively prevents the UAV from destroying the communication capability of the external network due to energy exhaustion during operation. The system transmits information remotely to the server of the management center through a 5G network, which analyzes and processes the data and publishes it on the Web. The system has been tested in the field, and the reliable communication range of the node is 1∼4 km under the saline-alkali-tolerant rice environment, and the service life of the terminal node can reach more than 3 months. During continuous operation, the maximum packet loss rate of the internal and external integrated networks is 1.45%. The system can stably and real-time monitor saline-alkali-tolerant rice environmental information, and the error rate is less than 10%, which can meet the performance requirements of the saline-alkali-tolerant rice environmental monitoring systems, such as low power consumption, wide coverage, stability, and reliability, and has a good engineering significance.


---

## Body

## 1. Introduction

Saline-alkali-tolerant rice is a rice variety that can grow in saline (alkaline) land with a salt (alkaline) concentration of 0.3% or more. China is rich in saline land resources, such as the semidesert interior of Inner Mongolia and Ningxia, the Yellow Triangle Agricultural Highlands, and the Northeast Songnen Plain, and other saline areas, which according to statistics, can reach 1.5 billion mu [1]. With the increasing scarcity of arable land resources, it is significant to promote the cultivation of saline-alkali-tolerant rice with high salinity tolerance. Smart agriculture is one of the important ways to solve the series of key problems of “saline-alkali tolerant rice” such as mass green cultivation, yield improvement, and pest control [2]. The special growth environment of saline-alkali-tolerant rice has many problems, such as a wide area of environmental monitoring, a strong corrosive environment, and difficult network deployment; conventional monitoring methods are difficult to realize. WSN technology can effectively solve these problems. WSN is a wireless sensor network composed of sensor nodes deployed in the monitoring area in a wireless self-organizing network, which can accurately implement the information of the monitored objects [3]. At present, the widely used communication technologies are mainly ZigBee and LoRa technologies. ZigBee communication technology [4] has the advantages of low power consumption and support for a variety of topologies, but there are problems such as limited node communication distance, low reliability, unstable network, and high overall network power consumption, which are not suitable for the design of wide coverage, stable, and low-power saline-alkali-tolerant rice environment system. LoRa technology is a typical representative of LPWAN technology, which has the advantages of low energy consumption, wide coverage, reliable connection, and easy deployment, and has become a hot research technology in the field of Internet of things (IoT) in recent years [5, 6]. LoRa communication technology is more suitable for field-wide sensor information collection and application in terms of node communication range, the number of nodes deployed, and environmental applicability. The comparison of the main parameters of ZigBee and LoRa communication technologies is shown in Table 1.Table 1
Comparison of main parameters of ZigBee and LoRa communication technology.
ParametersZigBeeLoRaStandardIEEE 802.15.4IEEE 802.15.4 gTransmission rate10∼250 KbpsTens to hundreds of kbpsTransmission distance100 m5 kmPower consumptionLowLowCostLowLowNetwork topologyP2P, tree, star, gridStarScholars in this field have done a lot of work on the application of LoRa communication technology in agriculture. A. Catini et al. [7] developed a LoRa data terminal node with low power consumption. The power consumption of the LoRa terminal node was reduced by optimizing the spread spectrum factor and transmission power of LoRa, using a magnetic latching relay to supply power to sensors on-demand, and comprehensively calculating the theoretical working time of the terminal node. It provides a theoretical basis for the LoRa terminal node design of the saline-alkali-tolerant rice environmental monitoring system in this paper. M. Swain et al. [8] proposed a LoRa+5G-based low-cost intelligent agricultural IoT system, using self-developed LoRa-IoT smart gateways to interconnect and interoperate all kinds of sensors and regional signal coverage by means of wireless self-organizing networks, and then connect LoRa base stations with 5G base stations to realize the up-and-down penetration of data. It can provide a reference for the construction of the LoRa+5G saline-alkali-tolerant rice environmental monitoring model in this paper. C. Gaia et al. [9] proposed an intelligent agricultural IoT architecture based on LoRaWAN and LoRaRarm platform, in which LoRaWAN realizes the collection and transmission of agricultural data, which are transmitted to the remote LoRaRarm platform through the base station. Finally, it realizes data processing and display, which provides a reference for the modular design of the internal and external network of the rice environment monitoring system in this paper. X. Feng et al. [10] comprehensively compared three wireless communication technologies, narrowband Internet of things (NB-IoT), LoRa, and ZigBee, and pointed out that ZigBee is a better choice for small- and medium-scale agricultural monitoring environments, while LoRa and NB-IoT are suitable for application in field large-scale agricultural monitoring environment.Traditional sensor nodes transmit data to the gateway nodes by single or multihop, and some nodes die prematurely due to high energy consumption causing network communication interruptions. Mobile collection nodes instead of traditional WSN static collection nodes to form mobile sink WSN (MSWSN) are gradually becoming a research hotspot [11, 12]. In MSWSN, unmanned aerial vehicle (UAV) is generally used as a mobile node to reduce the number of hops of data packets from the source node to the destination node and shorten the transmission distance between the source node and destination node, thus reducing the energy consumption and packet loss in the process of data transmission. Which can improve the communication quality and survival time of the whole system [13–15]. P. Dan et al. [16] proposed a three-tier WSN architecture that meets the information sampling and data service requirements of farmland environment in South China by using UAV combined with a low-power wireless sensor network and studied the optimization of system parameters such as UAV flight altitude and average communication time between UAV and relay nodes, but the system has high power consumption and weak traffic stability between WSN and UAV. B. Manlio et al. [17] designed the UAV ground-sensor network communication problem based on IEEE802.15.4 and pointed out that the actual transmission distance of IEEE802.15.4 limits the UAV flight range, which is not suitable for deployment in agricultural environments with a wide monitoring area. O. Fan et al. [18] divided the monitoring area into three independent plot areas, built a WSN network with subclustering, and used the mobile acquisition nodes on the UAV to communicate with UAV flight trajectory through the information interaction of independent subnetworks on the ground to transmit farmland information. The experimental results show the communication quality of UAV-WSN compared with that of static WSN; the average link consumption of plots 1, 2, and 3 is reduced by about 10%, 27%, and 14%, and the average packet loss rate is reduced by about 24%, 68%, and 29%, respectively. G. Just et al. [19] using the management concept of time slot and the thought of combining no-fly list, put forward a kind of effective detection and reconstruction algorithm of sensor node activation time, the path planning of unmanned aerial vehicle (UAV) to synchronize with the activation of each sensor node cycle, thereby reducing the UAV’s flight time, reducing the power consumption of the node, and shortening the UAV’s flight path. However, after the node timeslot of this model is reconfigured, the UAV routing needs to be reprogrammed, which increases the energy cost of the node and UAV.In summary, when LoRa nodes generally communicate directly with the gateway through a single hop, it is easy for some nodes to transmit too long a distance from the gateway, resulting in high node energy consumption and packet loss. In addition, the coverage of the network is limited by only relying on nodes to communicate directly with the gateway. Therefore, this paper considers UAV as a mobile collection node, which can not only repeat multiple times to perform many types of information collection tasks but also reach remote areas and expand the range of collection. By adjusting the communication distance between UAV and static LoRa terminal nodes, the communication capability is optimized to improve the accuracy of data transmission and communication efficiency. Therefore, this paper proposes a two-layer star topology wireless sensor network terminal monitoring system (UAV saline-alkali-tolerant rice environmental monitoring system, UAV-SREMS) based on LoRa + UAV to meet the demand of saline-alkali-tolerant rice environmental information acquisition according to the characteristics and requirements of saline-alkali-tolerant rice-growing environment. The system plans the routing of UAV acquisition nodes at different flight altitudes and incorporates a UAV energy warning mechanism to prevent the UAV from crashing due to energy depletion during operation. Considering the remote communication, this paper adopts a combination of “LoRa + UAV +5G″ technology to design the saline-alkali-tolerant rice environmental monitoring system.


## 2. UAV-SREMS System Model

### 2.1. UAV-SREMS System Structure

The saline-alkali-tolerant rice environmental monitoring system consists of elements such as terminal sensor nodes, static central nodes, UAV mobile nodes, base stations, and remote terminals; the system structure is shown in Figure1.Figure 1
UAV-SREMS system structure.The system divides the farmland monitoring area into multiple subregions according to the node area division, and deploys multiple terminal nodes and a central node in each subregion. The terminal nodes in the subregion and the central node form a layer of star topology network (intranet) through LoRa communication technology to realize the real-time collection and transmission of the environmental information of saline-alkali-tolerant rice, and the central node is responsible for collecting and caching the information of the sensor nodes. The UAV mobile collection nodes and multiple subregional center nodes form a two-layer star topology network structure (extranet) to realize the collection of information collected by the UAV mobile nodes from the subregional center nodes and transmit it to the base station through LoRa communication technology. The base station transmits it to the remote data center through a 5G gateway, and the back-end management system supports users to access it through the web end and Android end to complete the real time of all monitoring data display, classification query, history query, and other functions.


### 2.2. UAV-SREMS Network Structure

For the convenience of research, the whole UAV-SREMS network model in this paper mainly consists of a sensor node data acquisition layer, UAV data transmission layer, and terminal data aggregation and processing layer, as shown in Figure2.Figure 2
UAV-SREMS network structure.


#### 2.2.1. Sensor Node Acquisition Layer

The terminal nodes consist of various RS485 sensors and LoRa data collectors, which are evenly distributed in the saline-alkali-tolerant rice monitoring area and form a wireless ad-hoc network into a single-hop star topology with the central node. Various sensors can sense and collect information on the saline-alkali-tolerant rice growth environment such as soil temperature and humidity, pH value, salinity, and air temperature and humidity in real time, and transmit it to the LoRa data collector through 485 communications. Generally, the nodes are battery powered, so the nodes sleep for a long time to reduce energy consumption. The location of the central node is fixed, is responsible for collecting and caching terminal node information through the LoRa wireless receiving module, and waits for the wake-up of the UAV mobile node. Because of the high energy consumption of the central node, solar power is used.


#### 2.2.2. UAV Data Transmission Layer

The transmission layer uses UAV as a mobile receiver node and establishes a two-layer single-hop star topology network with multiple subregional central nodes through LoRa WAN technology, which is responsible for data collection and transmission from the central nodes, and as the UAV can be recycled it is battery powered. According to the coordinate information of the central node and flight altitude, determine the optimal position of the UAV, plan the flight path, and establish communication with the central node after reaching this position. After the UAV traverses all central nodes, it transmits data to the remote data center through LoRa and 5G communication gateway.


#### 2.2.3. Terminal Data Aggregation Processing Layer

Based on the system scheme design and key technology research, a saline-alkali-tolerant rice environment monitoring visualization system is developed. The system is designed and developed by Visual Studio 2010 development tool and C# language, using MySQL database to store the real-time data of each node, and the stored data are exported through JSON format packaging or back-end processing output to the front-end web page. The front-end web page is developed with HTML and CSS to provide an interactive interface for the user. Users access this website by logging in to the client browser to realize the functions of real-time data display, history query, data download, data analysis, and node control.


## 2.1. UAV-SREMS System Structure

The saline-alkali-tolerant rice environmental monitoring system consists of elements such as terminal sensor nodes, static central nodes, UAV mobile nodes, base stations, and remote terminals; the system structure is shown in Figure1.Figure 1
UAV-SREMS system structure.The system divides the farmland monitoring area into multiple subregions according to the node area division, and deploys multiple terminal nodes and a central node in each subregion. The terminal nodes in the subregion and the central node form a layer of star topology network (intranet) through LoRa communication technology to realize the real-time collection and transmission of the environmental information of saline-alkali-tolerant rice, and the central node is responsible for collecting and caching the information of the sensor nodes. The UAV mobile collection nodes and multiple subregional center nodes form a two-layer star topology network structure (extranet) to realize the collection of information collected by the UAV mobile nodes from the subregional center nodes and transmit it to the base station through LoRa communication technology. The base station transmits it to the remote data center through a 5G gateway, and the back-end management system supports users to access it through the web end and Android end to complete the real time of all monitoring data display, classification query, history query, and other functions.


## 2.2. UAV-SREMS Network Structure

For the convenience of research, the whole UAV-SREMS network model in this paper mainly consists of a sensor node data acquisition layer, UAV data transmission layer, and terminal data aggregation and processing layer, as shown in Figure2.Figure 2
UAV-SREMS network structure.


### 2.2.1. Sensor Node Acquisition Layer

The terminal nodes consist of various RS485 sensors and LoRa data collectors, which are evenly distributed in the saline-alkali-tolerant rice monitoring area and form a wireless ad-hoc network into a single-hop star topology with the central node. Various sensors can sense and collect information on the saline-alkali-tolerant rice growth environment such as soil temperature and humidity, pH value, salinity, and air temperature and humidity in real time, and transmit it to the LoRa data collector through 485 communications. Generally, the nodes are battery powered, so the nodes sleep for a long time to reduce energy consumption. The location of the central node is fixed, is responsible for collecting and caching terminal node information through the LoRa wireless receiving module, and waits for the wake-up of the UAV mobile node. Because of the high energy consumption of the central node, solar power is used.


### 2.2.2. UAV Data Transmission Layer

The transmission layer uses UAV as a mobile receiver node and establishes a two-layer single-hop star topology network with multiple subregional central nodes through LoRa WAN technology, which is responsible for data collection and transmission from the central nodes, and as the UAV can be recycled it is battery powered. According to the coordinate information of the central node and flight altitude, determine the optimal position of the UAV, plan the flight path, and establish communication with the central node after reaching this position. After the UAV traverses all central nodes, it transmits data to the remote data center through LoRa and 5G communication gateway.


### 2.2.3. Terminal Data Aggregation Processing Layer

Based on the system scheme design and key technology research, a saline-alkali-tolerant rice environment monitoring visualization system is developed. The system is designed and developed by Visual Studio 2010 development tool and C# language, using MySQL database to store the real-time data of each node, and the stored data are exported through JSON format packaging or back-end processing output to the front-end web page. The front-end web page is developed with HTML and CSS to provide an interactive interface for the user. Users access this website by logging in to the client browser to realize the functions of real-time data display, history query, data download, data analysis, and node control.


## 2.2.1. Sensor Node Acquisition Layer

The terminal nodes consist of various RS485 sensors and LoRa data collectors, which are evenly distributed in the saline-alkali-tolerant rice monitoring area and form a wireless ad-hoc network into a single-hop star topology with the central node. Various sensors can sense and collect information on the saline-alkali-tolerant rice growth environment such as soil temperature and humidity, pH value, salinity, and air temperature and humidity in real time, and transmit it to the LoRa data collector through 485 communications. Generally, the nodes are battery powered, so the nodes sleep for a long time to reduce energy consumption. The location of the central node is fixed, is responsible for collecting and caching terminal node information through the LoRa wireless receiving module, and waits for the wake-up of the UAV mobile node. Because of the high energy consumption of the central node, solar power is used.


## 2.2.2. UAV Data Transmission Layer

The transmission layer uses UAV as a mobile receiver node and establishes a two-layer single-hop star topology network with multiple subregional central nodes through LoRa WAN technology, which is responsible for data collection and transmission from the central nodes, and as the UAV can be recycled it is battery powered. According to the coordinate information of the central node and flight altitude, determine the optimal position of the UAV, plan the flight path, and establish communication with the central node after reaching this position. After the UAV traverses all central nodes, it transmits data to the remote data center through LoRa and 5G communication gateway.


## 2.2.3. Terminal Data Aggregation Processing Layer

Based on the system scheme design and key technology research, a saline-alkali-tolerant rice environment monitoring visualization system is developed. The system is designed and developed by Visual Studio 2010 development tool and C# language, using MySQL database to store the real-time data of each node, and the stored data are exported through JSON format packaging or back-end processing output to the front-end web page. The front-end web page is developed with HTML and CSS to provide an interactive interface for the user. Users access this website by logging in to the client browser to realize the functions of real-time data display, history query, data download, data analysis, and node control.


## 3. Path Planning of UAV-SREMS

### 3.1. System Model

For a farmland environmental monitoring sensor network with multiple monitored environmental variables, node deployment in farmland needs to consider node spatial distribution in environmental variables and node communication performance. According to the node area division, the monitoring area is divided into subregions. Assume that the monitoring area isL×L, then the monitoring area is divided into N×N l×l small areas. The size of l is taken as the communication radius of the central node r. In order to ensure that all nodes in the small area are within the communication range of the central node, l should satisfy formula (1). After the farmland is divided into regions, a right-angle coordinate system is established.(1)l≤2r.A fixed central node is placed at the midpoint of each small region; there areN×N central nodes and the set of central node location points is X = {x (p, q)}, where(2)p=2i−12,q=2j−12,i,j=1,2,3,⋯,n.The central node is the bridge connecting the terminal node and the UAV mobile node for data transmission, with high energy consumption and solar powered. The nodes of each small area and the central node form a primary star topology network structure, and the central nodes of multiple small areas and UAV mobile nodes form a secondary star topology network structure.The multirotor UAV hovers at a suitable location point at an altitudeH and collects data from the center node. The set of locations of the UAV is denoted as lall = {l (m, n)} (m, n = 1, 2, 3, …, k). Where l (m, n) indicates that the UAV hovers at coordinates (m, n) and an altitude H. Since k≤N, the UAV at a single moving location can collect data from one or more central nodes.Considering the linear link between the UAV and the central node as a communication link, when the central nodex(p, q) transmits data to the UAV located at position l(m, n), the power acquired at the UAV is shown in formula (3):(3)S_UAV=Gsxp,q,lm,n2+H2,where G is the transmission power of the node and Sx(p,q),l(m,n) denotes the coordinates of the horizontal distance between the UAV located at l(m, n), and the central node x(p, q) coordinates are shown in Figure 3.Figure 3
Coordinates of the UAV.Here,R=sxp,q,lm,n2+H2 indicates the communication distance between them.LetE(p, q) denote the initial energy of the central node x(p, q). The remaining energy of node x(p, q) after transmitting b bits of data is as in formula (4):(4)Exp,qres=Exp,q−Exp,qb,Rxp,q,lm,n.WhenSx(p,q),l(m,n) = 0, it means that the UAV is directly above the node and the energy consumed Ex(p,q), (b, Rx(p,q),l(m,n)) is minimum. Therefore, 0≤Sx(p,q),l(m,n) ≤ Smaxx(p,q),l(m,n),Smaxx(p,q),l(m,n) denotes the maximum horizontal distance at which the node and the UAV can communicate.


### 3.2. Calculation of Optimal Location Points and Path Planning for UAV

The best position is when the UAV is located directly abovel(m, n) as the center of the circle, and the distance between the central node and l(m, n) is less than Sx(p,q),l(m,n) can communicate with the UAV, while the communication radius between the terminal node and the central node is r. g is the ratio of the horizontal distance Sx(p,q),l(m,n) of the UAV and the distance from the central node to the best location point; the parameter g is expressed as in formula (5).(5)g=R2−H22/2l.Wheng≤R2−H2/2/2l<g+1, the best set of location points for the UAV is lall = {l (m, n)}, where k is calculated as follows:(6)m=g+12+g+1i−1i=1,2,...,k,n=g+12+g+1j−1j=1,2,...,k,k=Ng+1modNg+1=0,Ng+1+1modNg+1≠0.Then, the UAV can poll (g+1)2 central nodes at one time, and in fact, the range of flight altitude H of the drone at different values of parameters g is R2−1/2g+12l2<H≤R2−1/2g2l2 . The drone performs traversal based on the set of central node locations, and the algorithm for traversal is shown in Algorithm 1.Algorithm 1: Algorithm of UAV traversal.
Input:R, r, monitoring area L×L, divided into small areas l×l, determine the values of N×N, g, m, a nOutput: UAV traversal moves the set of nodesLarr sequentially(1)
Create the empty set Larr(2)
If([i/2] = 1)(3)
For(j = 1,j≤k,j + 1)(4)
(m, n)→Larr[] puts the current mobile node into the set Larr(5)
end(6)
If([i/2] = 0)(7)
For(j = k,j≥1,j-1)(8)
(m, n)→Larr[] puts the current mobile node into the set Larr(9)
end(10)
i + 1(11)
if(i > k)(12)
Break(13)
Repeat (2)∼(12)(14)
Output LarrAccording to the algorithm, the best set of location pointsLarr can be obtained, and the UAV traverses the data of the central node in order according to the order of the best set of location points Larr. The location points and acquisition paths of the UAV under different values of parameter g are shown in Figure 4.Figure 4
Path diagram of UAV with different parameters (g).
(a)(b)(c)After the central node determines the coordinate position, it assigns a unique ID and saves the coordinates of the nearest UAV mobile location point. To avoid data loss due to data collision, the communication mode between the central node and the UAV is set to interrogation mode, and the UAV mobile node issues interrogation commands according to the predefined time period. After receiving the command, the central node performs data and control operations, and the UAV can establish communication withc central nodes at a mobile location point. The time required for the UAV to communicate with a central node is tcom and the longest time that the UAV stays at a mobile location is ctcom(1c≤(g+1)2), and actually, the time that the UAV stays at a mobile location is longer than ctcom to ensure that all data transmission is completed. When the UAV has traversed all the current center nodes at a certain move location point, it will move to the next move location point to continue the acquisition; the time point of the next mobile location point is tnext = ctcom + tcur⟶next and tcur⟶next is the time taken to move the current position point to the next position point.The total energy required for the UAV to traverse all the location nodes and receive all the data transmissions from the central node is shown in formula .(7)Eall=DallEpV1+∑i=1N∗NEtxxp,qb,Rp,q,lm,n,where Ep—average energy required per meter per unit speed, Dall—length of the UAV acquisition path, and Etx(x(p, q))(b, Rx(p, q),l(m, n))—the energy required to transmit b bits of data from the central node x(p, q).The terminal LoRa nodes use a standard star network topology, and each terminal node records the central node ID in its region. The terminal node communication mode with the central node is set to autonomous sending mode based on an internally set timing. The terminal nodes send LoRa packets to the unique ID according to the predefined control logic. In the message interaction operation, the message content can be larger than the maximum length of the data container in the LoRa protocol [20]. The LoRa packet format of the end node uses a splice identifier to indicate the splicing of content in multiple data containers, and labels are assigned to different types of content within the interaction message as shown in Figure 5.Figure 5
LoRa node packet format.The central node agrees to the entry request of the terminal node and assigns the corresponding timing, and the terminal node can send data packets only in the assigned timing. One data reporting cycle of the terminal node is divided into four phases: sleep, data collection, data transmission, and reception, and the time of the four phases is accumulated, that is, the terminal works fortcycle = tsleep + tcot + ttx + trx hours at a time. The terminal can work continuously for the time calculated by the ratio of total battery power Ebatt and single power consumption Eonce in the following formula [21]:(8)tlife=tcycle×Ncycle=tcycle×EbattEonce.From this, the timing allocation of terminal nodes, central nodes, and UAV mobile nodes can be calculated, as shown in Figure6.Figure 6
Temporal allocation of terminal node, central node, and UAV.


### 3.3. UAV Safety Operations Based on Energy Warning

The energy of the UAV is constantly changing while the UAV is performing data acquisition operations. Compare the sum of the energy consumed by the acquisition path and the energy consumed by the data transfer with the remaining energy, if the remaining energy is less than the total energy required for an operation, the UAV refuses to take off and flies back to the data center to remind the user to replace the battery or recharge.UAV carries LoRa data collector, UAV’s flight and data transmission constantly consume energy in the data collection operation process, and power consumption is also changing, therefore, the safety operation condition of UAV is that the remaining UAV energy is greater than the power consumption of the last operation and return to the data center. According to the above safety condition, the decision to determine whether to carry out an energy warning is shown in the following formula :(9)EK>Er+DallEpV1+∑i=1N∗NEtxxp,qb,Rxp,q,lm,n起,EK≤Er+DallEpV1+∑i=1N∗NEtxxp,qb,Rxp,q,lm,n拒,where Ek—the energy remaining after the completion of K operations and Er—the energy required to return to the data center from the starting position. The flow of the UAV energy warning judgment is shown in Figure 7.Figure 7
UAV energy early warning decision flow chart.


## 3.1. System Model

For a farmland environmental monitoring sensor network with multiple monitored environmental variables, node deployment in farmland needs to consider node spatial distribution in environmental variables and node communication performance. According to the node area division, the monitoring area is divided into subregions. Assume that the monitoring area isL×L, then the monitoring area is divided into N×N l×l small areas. The size of l is taken as the communication radius of the central node r. In order to ensure that all nodes in the small area are within the communication range of the central node, l should satisfy formula (1). After the farmland is divided into regions, a right-angle coordinate system is established.(1)l≤2r.A fixed central node is placed at the midpoint of each small region; there areN×N central nodes and the set of central node location points is X = {x (p, q)}, where(2)p=2i−12,q=2j−12,i,j=1,2,3,⋯,n.The central node is the bridge connecting the terminal node and the UAV mobile node for data transmission, with high energy consumption and solar powered. The nodes of each small area and the central node form a primary star topology network structure, and the central nodes of multiple small areas and UAV mobile nodes form a secondary star topology network structure.The multirotor UAV hovers at a suitable location point at an altitudeH and collects data from the center node. The set of locations of the UAV is denoted as lall = {l (m, n)} (m, n = 1, 2, 3, …, k). Where l (m, n) indicates that the UAV hovers at coordinates (m, n) and an altitude H. Since k≤N, the UAV at a single moving location can collect data from one or more central nodes.Considering the linear link between the UAV and the central node as a communication link, when the central nodex(p, q) transmits data to the UAV located at position l(m, n), the power acquired at the UAV is shown in formula (3):(3)S_UAV=Gsxp,q,lm,n2+H2,where G is the transmission power of the node and Sx(p,q),l(m,n) denotes the coordinates of the horizontal distance between the UAV located at l(m, n), and the central node x(p, q) coordinates are shown in Figure 3.Figure 3
Coordinates of the UAV.Here,R=sxp,q,lm,n2+H2 indicates the communication distance between them.LetE(p, q) denote the initial energy of the central node x(p, q). The remaining energy of node x(p, q) after transmitting b bits of data is as in formula (4):(4)Exp,qres=Exp,q−Exp,qb,Rxp,q,lm,n.WhenSx(p,q),l(m,n) = 0, it means that the UAV is directly above the node and the energy consumed Ex(p,q), (b, Rx(p,q),l(m,n)) is minimum. Therefore, 0≤Sx(p,q),l(m,n) ≤ Smaxx(p,q),l(m,n),Smaxx(p,q),l(m,n) denotes the maximum horizontal distance at which the node and the UAV can communicate.


## 3.2. Calculation of Optimal Location Points and Path Planning for UAV

The best position is when the UAV is located directly abovel(m, n) as the center of the circle, and the distance between the central node and l(m, n) is less than Sx(p,q),l(m,n) can communicate with the UAV, while the communication radius between the terminal node and the central node is r. g is the ratio of the horizontal distance Sx(p,q),l(m,n) of the UAV and the distance from the central node to the best location point; the parameter g is expressed as in formula (5).(5)g=R2−H22/2l.Wheng≤R2−H2/2/2l<g+1, the best set of location points for the UAV is lall = {l (m, n)}, where k is calculated as follows:(6)m=g+12+g+1i−1i=1,2,...,k,n=g+12+g+1j−1j=1,2,...,k,k=Ng+1modNg+1=0,Ng+1+1modNg+1≠0.Then, the UAV can poll (g+1)2 central nodes at one time, and in fact, the range of flight altitude H of the drone at different values of parameters g is R2−1/2g+12l2<H≤R2−1/2g2l2 . The drone performs traversal based on the set of central node locations, and the algorithm for traversal is shown in Algorithm 1.Algorithm 1: Algorithm of UAV traversal.
Input:R, r, monitoring area L×L, divided into small areas l×l, determine the values of N×N, g, m, a nOutput: UAV traversal moves the set of nodesLarr sequentially(1)
Create the empty set Larr(2)
If([i/2] = 1)(3)
For(j = 1,j≤k,j + 1)(4)
(m, n)→Larr[] puts the current mobile node into the set Larr(5)
end(6)
If([i/2] = 0)(7)
For(j = k,j≥1,j-1)(8)
(m, n)→Larr[] puts the current mobile node into the set Larr(9)
end(10)
i + 1(11)
if(i > k)(12)
Break(13)
Repeat (2)∼(12)(14)
Output LarrAccording to the algorithm, the best set of location pointsLarr can be obtained, and the UAV traverses the data of the central node in order according to the order of the best set of location points Larr. The location points and acquisition paths of the UAV under different values of parameter g are shown in Figure 4.Figure 4
Path diagram of UAV with different parameters (g).
(a)(b)(c)After the central node determines the coordinate position, it assigns a unique ID and saves the coordinates of the nearest UAV mobile location point. To avoid data loss due to data collision, the communication mode between the central node and the UAV is set to interrogation mode, and the UAV mobile node issues interrogation commands according to the predefined time period. After receiving the command, the central node performs data and control operations, and the UAV can establish communication withc central nodes at a mobile location point. The time required for the UAV to communicate with a central node is tcom and the longest time that the UAV stays at a mobile location is ctcom(1c≤(g+1)2), and actually, the time that the UAV stays at a mobile location is longer than ctcom to ensure that all data transmission is completed. When the UAV has traversed all the current center nodes at a certain move location point, it will move to the next move location point to continue the acquisition; the time point of the next mobile location point is tnext = ctcom + tcur⟶next and tcur⟶next is the time taken to move the current position point to the next position point.The total energy required for the UAV to traverse all the location nodes and receive all the data transmissions from the central node is shown in formula .(7)Eall=DallEpV1+∑i=1N∗NEtxxp,qb,Rp,q,lm,n,where Ep—average energy required per meter per unit speed, Dall—length of the UAV acquisition path, and Etx(x(p, q))(b, Rx(p, q),l(m, n))—the energy required to transmit b bits of data from the central node x(p, q).The terminal LoRa nodes use a standard star network topology, and each terminal node records the central node ID in its region. The terminal node communication mode with the central node is set to autonomous sending mode based on an internally set timing. The terminal nodes send LoRa packets to the unique ID according to the predefined control logic. In the message interaction operation, the message content can be larger than the maximum length of the data container in the LoRa protocol [20]. The LoRa packet format of the end node uses a splice identifier to indicate the splicing of content in multiple data containers, and labels are assigned to different types of content within the interaction message as shown in Figure 5.Figure 5
LoRa node packet format.The central node agrees to the entry request of the terminal node and assigns the corresponding timing, and the terminal node can send data packets only in the assigned timing. One data reporting cycle of the terminal node is divided into four phases: sleep, data collection, data transmission, and reception, and the time of the four phases is accumulated, that is, the terminal works fortcycle = tsleep + tcot + ttx + trx hours at a time. The terminal can work continuously for the time calculated by the ratio of total battery power Ebatt and single power consumption Eonce in the following formula [21]:(8)tlife=tcycle×Ncycle=tcycle×EbattEonce.From this, the timing allocation of terminal nodes, central nodes, and UAV mobile nodes can be calculated, as shown in Figure6.Figure 6
Temporal allocation of terminal node, central node, and UAV.


## 3.3. UAV Safety Operations Based on Energy Warning

The energy of the UAV is constantly changing while the UAV is performing data acquisition operations. Compare the sum of the energy consumed by the acquisition path and the energy consumed by the data transfer with the remaining energy, if the remaining energy is less than the total energy required for an operation, the UAV refuses to take off and flies back to the data center to remind the user to replace the battery or recharge.UAV carries LoRa data collector, UAV’s flight and data transmission constantly consume energy in the data collection operation process, and power consumption is also changing, therefore, the safety operation condition of UAV is that the remaining UAV energy is greater than the power consumption of the last operation and return to the data center. According to the above safety condition, the decision to determine whether to carry out an energy warning is shown in the following formula :(9)EK>Er+DallEpV1+∑i=1N∗NEtxxp,qb,Rxp,q,lm,n起,EK≤Er+DallEpV1+∑i=1N∗NEtxxp,qb,Rxp,q,lm,n拒,where Ek—the energy remaining after the completion of K operations and Er—the energy required to return to the data center from the starting position. The flow of the UAV energy warning judgment is shown in Figure 7.Figure 7
UAV energy early warning decision flow chart.


## 4. Experiment

The experiment was conducted in the experimental base of Hai Da Hong Sea Rice in Bu Chao Village, Jianxin Town, Suixi County, Zhanjiang City, Guangdong Province. 4800×4800 m2 sea rice planting test area was selected, and the experiment included LoRa signal coverage, system power consumption, transmission power consumption, and stability as well as other key performance indicators.The coverage range is the most critical technical parameter for data transmission between nodes and nodes using LoRa technology. Although the applicable distance of LoRa is 1–20 km, the coverage range should be determined based on the experimental results due to the interference of saline-alkali-tolerant rice plant height and climatic factors. Therefore, in the experimental base, four locations with different distances from nodes were selected to place terminal nodes. After testing, the communication success rate, signal strength, and signal-to-noise ratio of the obtained terminal nodes are shown in Table2.Table 2
LoRa terminal node communication performance test results.
Node numberDistance/mCommunication success rate/%Average signal Strength/dBmAverage signal-to-noise ratio/dBA500100−264.8B100097−683.4C150096−753.1D200089−902.4In order to ensure that the communication success rate between nodes is more than 95%, the communication distance between the terminal node and the central node is chosen asr ≤ 1000 m and the communication distance between the central node and the UAV mobile node is chosen as R ≤ 1500 m.It can be calculated thatl = 1200 m, the area of the small area is l×l = 1200∗1200 m2, the value of N is 4, there are 16 central nodes, the value of parameter g is 2, and each UAV moving location point can be connected with four central nodes. Then, the coordinate position distribution of the central nodes and the acquisition path of the UAV are shown in Figure 8.Figure 8
Physical location distribution of the central node and acquisition path of the UAV.The air node uses an eight-rotor UAV with a maximum load of 5 kg. The UAV carries a power supply, a LoRa communication module, and a data processing module, and the central node mainly consists of a solar power module and a LoRa data-forwarding module. The terminal nodes are composed of various sensors and LoRa data collectors, and the main sensor performance indicators are shown in Table3.Table 3
Related sensor performance indicators.
Relevant performance indicatorsAir temperature and humidity sensorsCO2 sensorsSoil temperature and humidity sensorsSoil temperature moisture conductivity transmitterSoil pH sensorsOperating voltage5V5V5V5V5VMeasurement range40 °C∼+60 °C,0%RH∼80%RH0–2000 ppmSoil moisture: 0–100%; soil temperature -40–80 °CElectrical conductivity:0–20000us/cm3-9PHMeasurement accuracyHumidity ±3%RH (60%RH, 25 °C); temperature ±0.5°C(25°C)±50 ppmSoil moisture: 0–50% ± 2%, 50–100% ± 3% (brown soil, 60%,25 °C); soil temperature±0.5 °C(25°C)0–10000us/cmc scope±3%; 10000–20000us/cm scope±5%±0.3PHResponse timeTemperature: 5s; relative humidity: 8s2s1s1s≤10sIt can be calculated that the flight altitudeH of a UAV is about 0–1.2 km, and the average communication time of each node for transmitting data is 10 seconds.The wireless channels in the saline-alkali-tolerant rice environment are complex, and there may be channel congestion or climate interference, which may lead to system packet loss. Therefore, during the experiment of this system, packet loss data information is counted by the gateway: the terminal nodes send a total of 10251 data, 149 packet loss data, and the packet loss rate is 1.45%, which prove the stability of continuous data transmission of the system.In this paper, according to the environmental monitoring needs of saline-alkali-tolerant rice, a set of data are forwarded for 15 minutes as a cycle, the sampling frequency of the sensor is 1 time/30 seconds, and its main parameters are set as shown in Figure9.Figure 9
Main parameter setting interface of the device.The power consumption parameters of LoRa terminal nodes in one cycle are shown in Table4.Table 4
Basic parameters of LoRa terminal nodes.
Node statusOperating voltage (V)Average current of the whole machine/mARunning time/sSensor data collection510.0030Enabling LoRa communication3.3120.0010MCU3.36.720.035 (low power consumption)FromE = UIT, the power consumption of the terminal node for one data upload is about Eonce = 8.1 J (powered by 12V, 2000mAh battery), and the working time is 117 d. Considering the tiny power consumption of the power supply buck module and the instantaneous power consumption of the relay switch, the total working time should be slightly less than 117 d.The collected data are uploaded to the remote server through the LoRa gateway integrated with 5G, and then the data are parsed, processed, and stored in the database, and part of saline-alkali-tolerant rice environmental information collected is shown in Figure10.Figure 10
Data visualization on the website.Data visualization, real-time viewing of remote data changes, and historical data queries are realized through Web pages, as shown in Table5.Table 5
Historical data queries.
Device addressnode0- temperaturenode3- humiditynode6-pHnode12- soil temperaturenode15- soil humiditynode18- salinityRecord time406519918.279.97.9520.188.70.302022-04-12 02 : 16406519917.181.37.8619.991.50.312022-04-12 04 : 16406519918.981.67.9920.392.50.292022-04-12 06 : 16406519922.389.58.0122.490.30.302022-04-12 08 : 16406519924.575.68.0122.982.10.302022-04-12 10 : 16406519926.370.28.0123.578.60.302022-04-12 12 : 16406519926.968.57.9624.769.80.302022-04-12 14 : 16406519928.650.07.9825.165.70.312022-04-12 16 : 16406519926.149.87.9924.958.60.302022-04-12 18 : 16406519924.353.67.9723.866.40.302022-04-12 20 : 16406519922.660.87.9823.174.60.312022-04-12 22 : 16406519919.365.78.0022.881.10.302022-04-12 24 : 16To verify the stability of the system, TNHY-11 handheld agricultural environmental monitoring instrument was used to calibrate the collected data, data logging was performed every 2 hours, and the values of the parameters obtained from the system were compared with the values tested; a part of the data are shown in Figure11. It can be seen from Figure 11 that the fitting degree of the data monitored by the system and the measured data is good, which can realize the requirements of real-time monitoring and stable transmission of saline-alkali-tolerant rice environmental data, and the system monitoring data have high accuracy.Figure 11
Comparison of parameters.The error rate between the measured parameter values and the system-acquired parameter values is calculated as shown in the following formula :(10)Errorrate=Systemdata−measureddatameasureddata×100%.The resulting error rate of each parameter is shown in Figure12. It can be seen from Figure 12 that there are errors between the collected data and the measured data of the handheld agricultural environmental monitoring instrument, but the error rate is less than 10% because the systematic error data are mainly caused by the network collection and transmission. The sensor instruments used in the experimental data collection are all high precision, and the system error data mainly come from the packaging and compression of the data in the process of the system channel transmission, the saline-alkali environment, and the low signal coverage of the base station. However, after the data processing of the system, the results are still relatively accurate.Figure 12
Parameters relative error.


## 5. Conclusion

In this paper, we analyze the existing traditional agricultural environmental system for the demand of rice environment monitoring applications and propose a low power consumption wireless sensor network based on LoRa + UAV for the rice growth environment monitoring system. The combination of LoRa communication technology and UAV realizes remote data acquisition and transmission with low power consumption, low time delay, and high reliability for a large area coverage of saline-alkali-tolerant rice, which can meet the actual monitoring demand of saline-alkali-tolerant rice growth environment. Due to the special characteristics of the saline-alkali-tolerant rice growth environment, the following work is needed in the future: ① long-term saline-alkali-tolerant rice growth environment tests, research on key technologies such as saline-alkali-tolerant rice growth environment channels, communication modes, and routing algorithms to improve the effectiveness and reliability of system communication; ② research on data fusion algorithms applicable to saline-alkali-tolerant rice environment monitoring at the gateway node, and adding big data analysis and cloud computing technology to the back-end server combined with relevant algorithms in the field of artificial intelligence to further improve the system intelligence; and ③ research on the routing algorithm of multiple UAVs as mobile collection nodes to assist the operation and improve transmission efficiency.In this paper, to meet the requirements of special and long-time wide-range monitoring of saline-alkali-tolerant rice growth environment, an IoT system for real-time collection, processing, and transmission of environmental factor information such as salinity, soil temperature humidity, air temperature, and humidity of saline-alkali-tolerant rice is realized, which provides a new technical means for saline-alkali-tolerant rice growth environment monitoring and has broad application prospects.



---

*Source: 9003753-2022-09-07.xml*