EXPERIMENTAL EVALUATION OF THE PERFORMANCE OF A WIRELESS SENSOR NETWORK IN AGRICULTURAL ENVIRONMENTS

The aim of this study was to perform an experimental study to evaluate the proper operation distance between the nodes of a wireless sensor network available on the market for different agricultural crops (maize, physic nut, eucalyptus). The experimental data of the network performance offers to farmers and researchers information that might be useful to the sizing and project of the wireless sensor networks in similar situations to those studied. The evaluation showed that the separation of the nodes depends on the type of culture and it is a critical factor to ensure the feasibility of using WSN. In the configuration used, sending packets every 2 seconds, the battery life was about four days. Therefore, the autonomy may be increased with a longer interval of time between sending packets.


INTRODUCTION
In the last decades, Brazil has become one of the world's major economies. One of the reasons for this success is the development of agriculture, which multiplied the production volumes to attend both domestic and the international market demand. This fact makes clear the need to apply in large scale the concepts of precision agriculture to make this a sustainable development. In this context, the introduction of wireless sensor networks in different agricultural scenarios has awake the interest of many researchers and several entrepreneurs in this sector. The Wireless Sensor Networks (WSN) (AKYILDIZ et al., 2002) found a wide range of applications in various fields of knowledge and technology. Among several examples of applications of WSNs, there are the applications in industrial production, in security or sensing of vital signs and in agricultural crops. WSNs are ad hoc networks composed of elements with few hardware resources and power consumption restraints. These networks are used in large scale and may be adapted to environments that are remote and difficult to access. By presenting themselves as fast and affordable solutions, it has had a considerable growth in their applications.
Moreover, the use of the ZigBee protocol is often seen in agriculture through the use of WSN, in order to monitor or control various parameters (LIU et al., 2008). HAIFENG et al., (2008) conducted a study in real time with the remote measurement of humidity, temperature and brightness of the ambient air, in addition to detect water pollution in irrigation, installing a ZigBee WSN in agricultural production. NADIMI et al., (2008) used a ZigBee network setting the sensor nodes on the cattle to determine the time of grazing of the animals based on packet loss and positioning of the gateway. TSIAKMAKIS et al., (2010) developed a WSN for measuring soil humidity using a ZigBee module manufactured by Texas Instruments®.
However, many are the challenges that arise when you want to get the best performance of the network installed in this wide variety of locations. Problems of propagation of radio waves, information packet loss, battery consumption, as well as aspects related to the sizing of networks: topology, number of nodes needed and defining the positions of these, among others, depend on most cases of the specificity of the problem being analyzed.
The WSNs are being very well accepted in the monitoring of agricultural crops, due to the mobility needs of sensor networks, the existence of limitations to the use of cables and wires and the need for extensive monitoring and remote regions. The criteria of quality and sustainability and domestic and foreign demand for production make technological resources increasingly present in crops. However, the project, the implantation and the exploration of a wireless sensor network in agricultural crops, since it requires the same adequate performance, face unique challenges that depend on the type of crop to be monitored.
Typically, the WSNs have a large number of nodes. This aspect from the point of view of experimental research provides an undesirable situation since it is not always possible to develop large scale experiments due to physical problems and high cost. Moreover, researches based on computer simulation do not always allow including scenarios with particularities, such as agricultural crops. Thus, the issue of implantation of WSNs in agriculture still has a long way to go and still need publications that describe particular experiences in different situations and scenarios.
The aim of this study was to develop an experimental metrics evaluation of a particular WSN in agricultural environments, being part of the study the assembly and performance of networks in the following fields of maize, physic nut and eucalyptus. The proposal is restricted to evaluate the performance of networks formed by two and three motes, which are sufficient to produce results that indicate the interference of agents in the scenario in exchanging information. The results were compared with an ideal situation, in open field, in which interference effects are minimized. We studied the maximum distance between the motes for which the parameters of network performance unacceptably deteriorate in each scenario. It was sought to identify and associate with the type of crop the proper distance for the installation of sensor nodes in order to facilitate, in a particular manner, satisfactory performance of WSNs.

MATERIALS AND METHODS
The WSN used for the experimental development is manufactured by Crossbow Technology Inc (CROSSBOW, 2005). The set is composed by sensor nodes (XM2110), sensing plates (MDA300CA) and data acquisition boards (MIB520 and MIB600). The WSN is operated by a software suite that acts on the network protocol Xmesh. The programming of the nodes was performed using the software Moteconfig 2.0 and the monitoring of network performance by the applications XSniffer 1.0 and Moteview2.0. The results of the monitoring network were stored in a PostgreSQL 8.0 database. Eng. Agríc., Jaboticabal, v.32, n.6, p.1165-1175, nov./dez. 2012 The methodology base was, initially, to assess the metrics of lost packets and the received signal strength, RSSI (Received Signal Strength Indication), with distance and power consumption of WSN in an open field in order to define a standard comparison. Experimentally, the same metrics were evaluated in maize, physic nut and eucalyptus, and thus the comparisons were established by evaluating the influence of the planting in relation to the network performance.
This section presents the main details about the hardware and software of the system and procedures related to the work in the field to evaluate the performance of WSN.

Hardware
The sensor nodes used are the model XM2110 of the IRIS family motes, by the CrossbowTechnology Inc. They operate at a frequency of 2483.5 MHz, and are compatible with the IEEE802.15.4 standard, equipped with a radio frequency transceiver integrated with microcontroller ATMEGA1281V. The technology is compatible with a ZigBee platform (ZIGBEE, 2006). Each node is powered by two AA batteries. The micro controller ATMEGA1281V, operates at a frequency of 7.37 MHz, with words of eight bits, and has 32 general purpose registers (accumulators) connected directly to ALU (Arithmetic Logic Unit), it is based on the instruction set RISC (Reduced Instruction Set Computer), allowing operation in six modes of energy consumption, which is one fundamental characteristic for WSN.
The radio chip used by XM2110 is the Atmel AT86RF230 compatible with the IEEE 802.15.4 standard, designed for low power consumption and low voltage applications for WSN. This system uses radio modulation OQPSK (Offset Quadrature Phase Shift Keying), operates in the 2.4 GHz divided into 15 channels numbered from 11 to 26 every 5 MHz (2.405 GHz to 2.480 GHz), and may achieve transfer rates up to 250Kbps. The transmission power may be set between three dBm and -17.2 dBm by the programming in the embedded operational system TinyOS, using the interface software MoteConfig2.0.
The sensor plate (MDA300CA) used is a platform for general measurement attached to the XM2110 mote through the expansion connector of 51 pins and is powered by the same energy source of the mote. It allows low power wireless instrumentation measurement of climatic variables such as temperature and humidity. The data acquisition boards used were MIB520 and MIB60, which act as a gateway between the sensor network and the computer, the latter executes monitoring applications and network management.
The feed may be made via an external source of 5.0 V or via PoE (Power over Ethernet) using a crossover UTP network cable. Both MIB520 and MIB600 may be configured to work as a communication computer base station with the network of sensors. Both act as a channel, linking the wireless network with the computer and internet.

Software
The WSN is operated by a software that acts on the XMesh network protocol developed by Crossbow Technology Inc. It was used the program Moteconfig 2.0 for the programming of motes. As a graphical interface, to get an overview of the sensor network functioning, and implement the necessary management functions the applications XSniffer 1.0 and Moteview2.0 were used. With these applications the activities of the network, as well as the input or output of a node, sending and receiving messages to update routing, the exchange of management message through health packs, the measurement of time response between the nodes and the set of data packets sent by the nodes may be monitored and supervised.
Specifically the Moteview 2.0 allows monitoring data obtained by the sensor nodes and observe the behavior of the network in terms of packet loss, number of retransmissions, packet returned, amount of packets generated by network management, quality of the radio link of each node sensor and battery status.
The readings obtained by the sensor nodes are available through spreadsheets which may detect any abnormality in the network. All information displayed by Moteview 2.0 is stored in a PostgreSQL 8.0 database, facilitating the tasks of manipulation and interpretation of data from the monitored region.

Measurements
The WSN was configured to operate in Request/Reply (R/R) (TANENBAUM, 2003). We evaluated three performance metrics of WSN: a) number of lost packets, b) received signal strength versus distance, c) battery consumption.
According to the protocol Xmesh, the number of lost packets is determined by those who are retransmitted over eight times without success. The received signal strength is expressed in dBm. The WSN operates properly from a minimum of -91 dBm. The operating voltage of the modules of the WSN is 3.3 V. However, the modules operate satisfactorily up to 2.2 V, which is the threshold level used for measuring battery consumption.

Setting the performance standard for WSN
In all tests, the motes are configured in power mode HP (High Power) having a three-signal power dBm which is the maximum power available.
Initially, in order to establish a standard of the network performance that would allow comparisons between different agricultural environments, the study and implementation of the network were made in the open field, flat terrain without obstacles and with normal weather conditions, as outlined in Figure 1. The chosen environment with these characteristics was a soccer field. These conditions allowed the establishment of radio links of free space. The radius of the first Fresnel zone (DOLUKHANOV, 1974) of the link may be calculated by (1).
Where r n is the radius of the nth Fresnel zone of the linkage, λ is the wavelength corresponding to the central frequency of operation, d 1 and d 2 are the distances from the transmitter and receiver, respectively, until the point where is desired to calculate the radius of the first Fresnel zone.
Ideally, the imaginary ellipsoid that defines the first Fresnel zone (n = 1) is free of obstacles, including the terrestrial surface. This means that antennas should be positioned at a higher altitude. In practice it is sufficient that about 57.7% of the radius of the first zone is free from obstruction, and this condition is achieved for the antenna heights higher or equal to 0.577 r 1 . Taking the condition where d 1 =d 2 , being the point where the radius is greater than Fresnel by choosing a distance of 60m link to link, the heights of the antennas of both nodes result in 77.67cm for an operating frequency of 2.4835 GHz. In practice, the antennas were located at 80cm tall. Eng. Agríc., Jaboticabal, v.32, n.6, p.1165-1175, nov./dez. 2012 From these ideal conditions, the separation of nodes was varied, while keeping constant height of 80cm. Thus, it was guaranteed the condition of links by free space for all distances smaller than 60m and provided links by sight, though with possible reflections on the surface for distances greater than this value.
The behavior of the metrics that indicate the quality of communication was observed. The maximum distance of communication between a node and the base station (or between two neighboring nodes) was determined for different power levels. We used for this test two laptops running Microsoft Windows XP operating system. One was running the Moteview 2.0, the Moteconfig 2.0 and the PostgreSQL 8.0 database, and the other laptop running the XSniffer 1.0.
We also used three motes. The first mote, XM2110, was configured with a precompiled application XSniffer1.0, compiled for the platform IRIS M2110. This mote was installed via the 51pin connector on MIB520 and connected by USB connection to a laptop that was running XSniffer 1.0. The second mote, XM2110, was set up with a pre-compiled application to operate as a base station at the platform IRIS M2110. This mote was installed in another MIB600 and connected by Ethernet connection to another laptop that was running Moteview 2.0. The third mote, XM2110, connected to the sensor MDA300CA, was set up with a pre-compiled application to operate as a sensor node, measuring temperature and humidity.
The response time of the system to recognize a node, once connected, is viewed through XSniffer 1.0, which also affords real-time information about network performance, such as packet loss and received signal strength (RSSI) at predefined intervals of 2 minutes in Moteview 2.0. Considering the metrics of signal level (RSSI), packet loss and attempts to update routes, a sensor node was removed from the other straight, with total sight of 5 by 5m. The node moved remained in each new position for 2 minutes, which is the interval time required for Moteview 2.0 to refresh their management information from the network, based on health packet protocol XMesh.

Experiments conducted in different agricultural scenarios
The WSN was installed in three types of crops, maize, physic nut and eucalyptus, all located in Charqueada city, São Paulo (SP) state, Brazil, with coordinates 22°30'S and 47°46'O.

Maize Culture
The cultivation of maize (Zea mays L) of the variety AG-1051, object of the experiment, was planted in an area of 30 x 100m, with a maximum height of the plants of 2,5m in the stage near of the harvest. The plants were arranged in rows with spacing between 0.20m and 0.50m in the longitudinal direction and 0.70m in the transverse direction. Figure 2 illustrates the testing area and the sensor placed in a maize plant and Figure 3 shows the base station. The mote operating as base station was set on a stake at the height of 0.80m and the mote operating as a network sniffer, just below, in the same stake. Another mote performing monitoring operation was secured to a stake or a plant, also at a height of 0.80m. This mote was shifted diagonally from the ground, as shown in Figure 4, so that the plant density between the sensor node and base station was the largest possible. The displacement was 1.0m to 1.0m in relation to the base station and stayed for 2 minutes at each new position. This displacement of the sensor node was done until communication became very unstable or cut. FIGURE 4. Network topology for communication between nodes and base station through multipath. Displacement of the node S1 in relation to the base station EB (blue). Traffic data between S1, S2 and EB (orange).
After obtaining the maximum communication distance between a sensor node and the base station, other node (S2) was placed on the net, forming a triangle (base station, sensor S1 and sensor S2) as shown in Figure 4. Thus, the multi-path characteristic may be observed, and the node sensor (S1) data were sent to the sensor node (S2) and from this to the base station. The traffic information by three motes was monitored with the aim of evaluating the functionality of inserting an auxiliary node.
Xsniffer1.0 in software, the RSSI information is displayed in every packet that arrives at the base station. This metric is very important because it directly affects the network behavior in relation to other performance metrics.

Cultivation of Physic Nut
A cultivation of physic nut (Jatropha curcas) with a planted area of 200m x 200m, the plants had a mean height of 3.5m, all adults and already in production, arranged in rows spaced 2.0m to 2.0m in the longitudinal direction and 3.0m to 3.0m in transverse direction. The methodology and materials used were the same as described in the previous sections. Figure 5 shows an overview of the cultivation of physic nut.

Eucalyptus Culture
The planting of eucalyptus (Eucalyptus grandis) occupied an area of 60m x 100m. The plants had a height higher than 10m and over seven years of age and were arranged in rows spaced 2.0m to 2.0m in the longitudinal direction and 3.0m to 3.0m in transverse direction. The Figure 6 illustrates the eucalyptus plantation where the experiments were conducted. FIGURE 6. Eucalyptus Field.

Battery Consumption Tests
A very important aspect in any WSN is the battery consumption of the nodes. The test of battery consumption was conducted in the laboratory. For this, two XM2110 motes are configured to form a network. One was set up with an application of XMesh_base compiled for the platform IRIS M2110. This mote was installed via the 51-pin connector on MIB520 and connected by USB connection to the laptop that was running Moteview 2.0. The set operated as base station. A second mote XM2110 was connected to MDA300CA sensor and configured to operate as a sensor node, measuring temperature and humidity. This mote was powered by two AA alkaline batteries. The signal strength of this network was 3.0 dBm (maximum available power in motes). The power mode is HP (High Power), in which the sensors remain connected at all times. The feed mote was performed with a pair of AA batteries.
The network was placed on a workbench with a height of 0.80m, then properly configured and initialized. The Moteview2.0 software was used to monitor and record the data collected by the sensor node in a PostgreSQL 8.0 database for further analysis. The temperature observed in this test ranged between 15.26 and 35.12ºC and relative humidity between 14.7 and 83.3%. The sensor node was configured to send data in each 2 seconds. The WSN remained in operation until the voltage supplied by the battery became low enough to leave the network not working.  In the results shown in Figures 7 and 8 it is possible to note the consistency between the packet losses and the decrease of the power level of signals. The increase of the number of lost packets occurs at distances at which the strength of received signal is severely diminished. These metrics were strongly dependent on the type of crop in which the experiment was conducted.

RESULTS AND DISCUSSIONS
A standard in the open field with which it was possible to evaluate the conditions of maximum performance of commercial WSN employed in the tests was used as reference. Accordingly, there is a maximum distance between the motes to ensure the integrity of communication between them, preserving savings in the sending of packets and acceptable power level of the received signal. In summary, it is recommended to consider as maximum communication distance between the motes: 90m to open field; 44m to Eucalyptus cultures; 25m to physic nut cultures and 16m to maize culture.
In Figure 8 random peaks of packet losses are observed when the receiving node occupies positions in the section contained between 45-55m and between 70-85m (for the blue curve, open field). The same applies to the black curve, corresponding to the eucalyptus cultivation at positions between 35-40m. This behavior is due to random arrival at the receiving node replica of the transmitted signal from the base station by the multiple paths. The multiple paths are the result of the reflections on the terrain and on objects in the surroundings of the receiving antenna. The strength of the received signal depends on the correlation between the amplitude and the phase of each replica, causing constructive and destructive interference. The random nature of this process depends on the position of the node relative to the objects of their surroundings. This effect is known in the literature as statistical site (LEE, 1997), which explains the random fading of received signals.
The peaks of packet loss may be assigned to an abrupt decrease and instantaneous received signal level, reaching values below the threshold of the receiver, causing loss of communication and consequently increasing the percentage of packets lost. Eng. Agríc., Jaboticabal, v.32, n.6, p.1165-1175, nov./dez. 2012 The three culture environments in which WSN was assembled showed particular characteristics and were chosen purposely to produce differences in the propagation path of the radio waves. The results show that the density of the foliage acts directly on packet loss and the power level of the received signal. The more foliage interpose the propagation path between the motes, the shorter should be the separation distance between the nodes of a culture in order to guarantee an acceptable standard of quality information exchange.
To TUIJL et al. (2008) the signal attenuation caused by the presence of vegetation is a problem that must be studied in horticulture. In the case of the WSN transmission frequency used, which is 2.4 GHz, the attenuation is accentuated by water rich materials such as plants. According to studies by GIACOMIN & VASCONCELOS (2006) signal attenuation has a linear relationship with the volume of vegetation. This may be overcome by increasing the height of the transmitting antennas of the sensor nodes and the proper arrangement of the nodes between the lines.
The results also show that the increase in the percentage of lost packets occurs abruptly. This fact is justified by the type of signal modulation used in WSN (OQPSK) (HAYKIN, 2001). As in any digital modulation type, communication is terminated from a quality threshold.
In experiments that included monitoring multi-path (Figure 4), the packets from the base station that had the target sensor node (S1) passed through the sensor node (S2), indicating that the data traffic seek an alternate route. It was also observed that in this condition there was a slight increase in power consumption of sensor node (S2), due to the additional activities of forwarding packets.
The results obtained in the tests of battery consumption may be viewed in Figure 9. Because the amount of data (around 240.000 records), the values were considered in 1 hour intervals. In the worst situation of operation, i.e., HP mode and requests every 2 seconds, battery life is approximately four days. It should be also considered that the operating condition of the network is suitable for battery voltages up to 2.1 V. Batteries with voltages below 2.1 V make the network inoperable.
Some research has already focused on the search for alternative sources available in the field to meet the needs of the network. MORAIS et al. (2008) used a WSN in vineyards, as an energy source using a combination of devices to capture solar energy, wind and even irrigation water.

CONCLUSIONS
Two factors are critical to ensure the viability of the use of a WSN in different agricultural scenarios: the separation and placement of the nodes. The installation of WSN operating in agricultural environments should be individualized. The experimental determination of appropriate distances between nodes has implications in all indicators of signal quality and operation, as well as to minimize the battery consumption. Regarding the positioning of the nodes, it is very important to avoid situate them at points where random signal fades occur. In general, not attend the limits regarding these factors produce an inadequate performance of the network in terms of packet loss and also an increase in battery consumption, since there will be an increased number of retransmissions.