1. Introduction
Precision agriculture is defined as an integrated information and production-based farming system that is designed to increase long-term, site-specific and whole-farm management. Precision agriculture, the future of farming, is a method of farm management that allows the grower to produce more efficiently and realize greater economic gains through controlled use of their input resources [
1,
2]. Black pepper cultivation is a special type of precision agriculture: the application of information technologies is used to maximize the production potential of the pepper. Peppercorns (dried black pepper) are, by monetary value, the most widely traded spice in the world. Pepper can be grown in soil that is neither too dry nor susceptible to flooding, moist, well-drained and rich in organic matter. New Wireless Sensor Network (WSN) technologies can be useful and efficient to provide remote and real-time monitoring for high quality production and processing systems. WSNs allow continuous, round the clock, welfare monitoring with greater robustness than would be achieved using human observation alone [
3,
4]. It is now feasible to monitor and capture measurements of the black pepper cultivation in tropical areas. The application of WSNs allows farmers to make more informed decisions on the efficient use of resources [
5].
In this research, we designed an energy-efficient solution for monitoring a black pepper cultivation in the Hainan province of China. We optimized the base station antenna height in order to facilitate reliable communication. The ESPIN protocol was utilized to solve the energy saving challenge. We added a new phase, called distance discovery, to find the distance of each sensor node in the network from the sink node in terms of hops, in order to save more energy. Whenever a sensor node receives packets from its neighbors, it checks the hop distances and sets the distance to the minimum. On making sure that the receiving node is nearer to the sink node in comparison with the node that has sent the data, the receiving nodes start to receive data. A compulsory transmission mechanism is also present in the ESPIN to avoid packet loss. Finally, we conducted an experiment assessing the lifetime of two different topologies for prolonging the performance of our system.
Following this introduction,
Section 2 gives an overview of related work.
Section 3 depicts the system architecture we developed and how to optimize base station antenna height.
Section 4 introduces routing protocols involving Sensor Protocol for Information via Negotiation (SPIN) and ESPIN and especially details the energy conservative method of ESPIN. Experiments of energy consumption and data transmission reliability on routing protocols and topologies are given in
Section 5 and the results show that the approach we present has a better performance. Finally, we conclude the paper in
Section 6.
2. Related Works
Several approaches to achieve energy efficiency based on SPIN protocol in WSNs have been proposed by the following researchers. A. H. Azni
et al. (2009) conduct a performance analysis of routing protocol [
6]. They illustrate the existing routing protocols for wireless sensor network using data centric approach and present performance analyses of these protocols. The paper focuses in the performance analysis of a specific protocol, namely directed diffusion and SPIN. This analysis reveals that the energy usage has important features which need to be taken into consideration when designing routing protocols for wireless sensor networks. Zeenat Rehena
et al. (2010) present the simulation result of SPIN [
7]. The challenge they solve is programming the SPIN with TinyOS and a new language, nesC. For implementing SPIN, they divide the protocol into three phases. These are initialization phase, data collection phase and the negotiation phase. From the simulation results it is concluded that SPIN becomes much more energy efficient with time. It also reduces the redundant data packet due to meta-data negotiation. However, this work still has some deficiencies. The comparisons between SPIN and other protocols have not been carried out. Luwei Jing and Feng Liu (2011) propose an energy saving routing algorithm based on SPIN protocol in WSN [
8]. To solve the problem of “blindly forward” and “data unaccessible” in SPIN, they propose a new routing algorithm called SPIN-I and simulate it from two aspects with NS2: the energy consumption of nodes and number of alive nodes. The simulation results show that not only the problems of blindly forwarding and data accessibility in SPIN have been solved, but also the whole network’s energy consumption is more uniform.
All we point out here is the vast majority of other energy conservative WSN solutions available in the literature are only evaluated by resorting to either simulation or mathematical analysis. Hence, it is difficult to assess the real feasibility of these solutions to real network scenarios, where many of the assumptions made during the analysis may no longer hold true. Even though much work has been done on the implementation of real-life testbeds for WSNs, to the best of our knowledge, very few papers have appeared on experimental studies of energy-saving precision agriculture monitoring solutions for WSNs. To this extent, one of the main contributions of the present paper is the implementation and evaluation in a practical testbed of the proposed novel protocol and topology which improve the performance of energy efficiency, network lifetime and quality of data transmission.
3. Solution Optimization
3.1. System Architecture
The task of the monitoring system is to monitor the soil water content, ambient temperature, humidity and solar radiation. Black pepper monitoring system is shown in
Figure 1; it is mainly made up of four parts: the sensor node, sink node, base station and client terminal. The system consists of 18 wireless sensor nodes which are distributed to ensure high precision and reliability of data acquisition. The collected data is transmitted to sink node by multi-hop. In addition, wireless sensor network can connect with base station and client terminal by Internet. The collected data is sent to client terminal through GPRS or other radio transmission, and then the terminal client can analyze data to make an informed decision.
Figure 1.
Black pepper monitoring system architecture.
Figure 1.
Black pepper monitoring system architecture.
3.2. Base Station Antenna Height Optimization
Link quality between transmitter and receiver plays a major role in the performance of any radio network [
9]. The radio performance may be different as crop growing as agricultural application is a dynamic environment. The crop canopy, earth reflection and other factors have an effect on radio wave propagation. We have conducted wireless communication experiments in the sowing stage (3 months), growing stage (3 months) and ripening stage (1 month) in order to ensure reliable transmission performance. Antenna height seems to be an important element for wireless sensor network connection.
Figure 2 shows radio range measurements over antenna height in three different crop growth stages. We can see that:
Figure 2.
Radio range over antenna height in three different crop stages.
Figure 2.
Radio range over antenna height in three different crop stages.
As the results above show, a suitable antenna height is extremely significant for cropland monitoring in all black pepper growth stages from sowing to ripening. In order to optimize the receiver strength, one needs to decrease the effect of the out of phase signals to the minimal by removing obstacles from the RF Line of Sight. The strongest signal is on the direct line between sender and receiver and always lies in the 1st Fresnel Zone [
10]. The Fresnel zone radius (FZR)
r can be expressed as:
where
d is the total distance between antennas in km,
f is the frequency in GHz. It can be tolerated generally that the maximum obstruction is less than 40% of the FZR. Then, antenna heights in cropland applications must satisfy
where
hc is the average of crop heights. Therefore,
The lowest antenna height for farmland applications can be decided according to Equation (3). For instance, a 2.4 GHz RF link with a path length of 100 m in the black pepper sowing stage (hc ≈ 0 m), results in antenna heights of 1.1 m. However, when the black pepper grows in the booting stage (hc ≈ 1.8 m) and jointing stage (hc ≈ 2.4 m), antenna height needs to be 2.9 m and 3.5 m respectively. Consequently, the antenna of each sensor node needs to be placed above at least 3.5 m if we plan to monitor the black pepper from seeding to harvest.
4. Routing Protocol
Traditional SPIN is a data-centric [
11] routing protocol for WSN. It disseminates all the information from each node to every other node in the network. It includes two aspects: Firstly, the sensor nodes negotiate with each other before transmitting the actual data. Meanwhile, the node confirms whether it has received the same information for the metadata. Second, each node in the network must monitor the consumption of energy. It is basically a three-way handshake protocol. This enables a user to query any node and get the required information immediately.
SPIN takes advantages of the three-way handshake mechanism to transmit the data information [
12]. As
Figure 3 shows, the grey nodes represent that they are under data transmission. There are three types of message structure in SPIN: ADV, REQ and DATA. The ADV message can broadcast the information and the size of ADV is much smaller than the actual data, if no neighbor nodes are interested in the data, probing with an ADV message costs less energy than sending data directly. When a sensor node has data to share, it will notice its neighbor via the ADV message first. A REQ message is used to request the transmission of data, if a sensor node is interested in the data after receiving ADV, it responds with a REQ to the sending node. DATA message is the packet involving the original sensing data. When the source node receives REQ, it starts to send DATA to the next node.
The depiction of SPIN is as follow.
- Step1:
The source, node A, broadcasts the ADV to all its neighbors while it collects new data information.
- Step2:
If its neighbor, node B, is interested in the data and it has not already received the same data, it responds with a REQ to node A.
- Step3:
After node A receives the REQ from node B, it starts to send the DATA to B.
- Step4:
Node B repeats node A’s procedure to transmit data to the next hop until the sink node receives the data.
It is possible that a data packet is transmitted in the opposite direction of sink node in SPIN, so a large amount of energy is wasted by some unnecessary multi-hop transmissions and it also increases the network transfer delay resulting from network congestion. If it is possible to control the number of transmissions and receipt of messages, a significant amount of energy can be saved. When an event occurs, it is always desirable that the data is sent through the nodes in the direction of the sink node rather than in the opposite direction. This saves energy for transmission of a piece of data from an event node to the sink node. However, such selective transmission is not supported in the existing SPIN protocols. Data will have to travel to more hops if they are sent via the nodes in the opposite direction. In addition, it is possible that a node refuses to receive the data because of low energy or no interest. As a result, the data fails to transmit to sink node. To overcome these problems, we propose an ESPIN protocol.
Figure 3.
The procedure of Sensor Protocol for Information via Negotiation (SPIN).
Figure 3.
The procedure of Sensor Protocol for Information via Negotiation (SPIN).
In our proposed protocol, we add a new phase called distance discovery to measure the distance of each sensor node in the network from the sink node in terms of hops. This means that nodes having a higher value of hop distance are further away from the sink node. What is more, we set compulsory advice (CA) when the sending node fails to receive a REQ message, in order to improve the data delivery success ratio. We divide ESPIN protocol in three parts: Distance discovery phase, negotiation phase and data transmission phase. On the basis of hop distance, negotiation is done for sending actual data. Therefore, use of hop value controls dissemination of data in the network. Finally, data is transmitted to the sink node.
4.1. Distance Discovery
- Step1:
The sink node broadcasts a packet named Startup in the network with the information including hop, type and nodeId. Here hop represents the value of hop distance between the sink node and receiving node and the initial value is set to 1. Type represents the type of messages and the nodeId means identity of the sending node.
- Step2:
When a sensor node receives the startup packet, it stores this hop value in memory as its own hop distance from the sink node. After that, the node sets the hop value as 1 and then re-broadcasts the startup packet to its neighbors with the modified hop value.
- Step3:
It is possible for a sensor node to receive multiple startup packets from different intermediate nodes. Whenever a node b receives startup packets from its neighbors
ai, 1 ≤
i ≤
n, it checks the hop distances and sets the distance to the minimum,
i.e.,
where h(ai,b) represents hop distances between the nodes ai and b and n is the number of neighbor nodes of node b from which it receives the startup packets.
- Step4:
This process is continued until all nodes in the network get the startup packets at least once within the steps above. The negotiation phase will be launched after successful completion of this phase.
4.2. Negotiation
The flow chart of the negotiation phase is shown in
Figure 4.
Figure 4.
The flow chart of negotiation phase.
Figure 4.
The flow chart of negotiation phase.
- Step1:
The source node sends an ADV message. Then each neighbor of the source node ascertains whether it has already received the advertised data.
- Step2:
If not, the receiver also assesses whether it is nearer to the sink node or not in comparison with the node that has sent the ADV message. This is the major difference between the negotiation phase of SPIN and that of ESPIN. If the hop distance of the receiving node (own_hop) is less than the hop distance received by it as part of the ADV message (rcev_hop), i.e., own_hop < rcev_hop, then the receiving nodes send the REQ message to the sending node for DATA message.
- Step3:
If the source node does not receive any REQ messages within a fixed time, it causes the problem that data cannot be sent to the destination, the COUNTER will be initiated and source node will randomly send the CA to its neighbor; becoming COUNTER minus one. Only if the residual energy of the receiving node is higher than the threshold, is the REQ message automatically sent to the source node and the DATA message begins to transmit. If not, the neighbor does not respond and Step 3 is repeated.
- Step4:
When the COUNTER is 0, it represents the energy of neighbor nodes has been exhausted and the networks almost collapse; the source node then stops to send ADV message.
4.3. Data Transmission
The data transmission phase is almost the same as the SPIN protocol. Data is sent to the requesting node immediately after request is received by the source node. If the requesting nodes are intermediate nodes instead of the sink node then the negotiation phase is repeated. Therefore, the intermediate sensor nodes broadcast ADV for the data with the modified hop distance value. The sending nodes correct the hop distance field with its own hop distance value and add that in packet format of the ADV message. The process continues until the data reaches the sink node.
5. Experiments and Results
5.1. Routing Protocol Test
Two WSN groups (each group has 18 nodes) with the same surroundings were classified to carry out the monitoring experiment simultaneously in black pepper farmland to test energy consumption of ESPIN and SPIN routing protocol. All the nodes in the network were programmed with default sampling interval (15 min). The sensor nodes transmit the data to sink node for forwarding. Then the data collected at the nodes is transmitted to the base station for further processing.
The main consideration is the energy usage of the network. In order to study the performance of network with respect to battery charge consumption with ESPIN protocols, The number of ADV packet transmitted and received and the battery value are also transmitted to base station along with sensor data and are logged in database.
Figure 5 shows the result of total number of ADV packets generated for an event at each hop level to reach the destination node while the network consists of 18 sensor nodes. In comparison with SPIN, ESPIN generates lower number of ADV messages, and thus saves the total energy of the WSN. In this way it can prolong the lifetime of the WSN.
Figure 5.
Number of ADV packets transferred to reach the sink node for an event.
Figure 5.
Number of ADV packets transferred to reach the sink node for an event.
The battery power of all nodes in the network was adjusted to 3.3 volt at the beginning of experiment.
Figure 6 shows the average battery charge gets exhausted gradually and it is obvious that the battery voltage of ESPIN group and SPIN group decrease to 1.2 V and 0.4 V respectively during one growth period of black pepper, it means energy consumption of ESPIN is 20% less than SPIN. Consequently, it is concluded that use of distance discovery of ESPIN actually increases the energy efficiency and network lifetime. This is because it discards packet transmission to the opposite direction of sink node.
Figure 7 shows the average packet loss rate of two groups. The reason that packet loss rate had a sharp increase from the 3rd month is black pepper came into the growing stage and ripening stage and intervene caused by the high density of the leaves has great influence to the signal propagation. We can see that ESPIN group drops about 1.2%, 4.5% and 8% packets in sowing stage, growing stage and ripening stage respectively, the SPIN group loses about 1.9%, 6% and 11% packets respectively. It is obvious that ESPIN outperforms SPIN in data transmission success ratio from
Figure 5 because ESPIN decreases the hops that data packets sending to sink node and adds the CA to enhance the fault-tolerant ability. Hence, ESPIN is also more reliable in terms of data transmission.
Figure 6.
Average power voltage.
Figure 6.
Average power voltage.
Figure 7.
Average packet loss rate.
Figure 7.
Average packet loss rate.
5.2. Topology Test
Chain-typed network has two categories: single-chain and multi-chain. In single-chain structure, if a node in sleeping or in failure status has a significant effect on data transmission of others. Multi-chain topology, just the simple replication of single-chain, has the same challenge of chain breaking. The sensor nodes can be classified into two classes under the double-chain topology, namely, the end node and the sink node. The double-chain topology helps to reduce cost on batteries on the end nodes because this type of nodes operates under sleep mode for most of the time. The end nodes acquire data and send them to the sink node and finally to the base station. As an example, a sensing network with 9 nodes is illustrated in
Figure 8. The sensing network is made up of eight end nodes and one sink node. In normal situation, the pathway of data collection is arranged as N1-N2-N3-N4-S or N5-N6-N7-N8-S. Concerned with possible failure of some node link due to unexpected reasons, an alternative pathway for each node is added, shown in dash lines in
Figure 8. For instance, if node 3 fails, node 2 will automatically transfer its data to node 7; meanwhile, node 2 receives the data from node 1 as well as ones from node 5. Based on the double-chain topology, a symmetrical double-chain topology is proposed in our study to enhance the lifetime and reliability of data transmission. Through the symmetrical double-chain topology, wireless data links in a sensing cluster can be enhanced greatly.
Figure 8.
The double-chain topology.
Figure 8.
The double-chain topology.
The topology of sensing cluster can be designed as star, tree, chain or other irregular styles. Start-typed network consisting of one core node and peripheral nodes has high reliable data links. But due to limit radio power in a single node, its network coverage is usually small so that more star-typed subnets are cascaded to extend network range. Tree and chain topology both are suitable for our situation, we take account the lifetime of different topologies by using ESPIN to further test. So we set another two monitoring groups with ESPIN in the same farmland to study the lifetime of symmetrical double-chain topology in comparison with tree topology.
Figure 9 and
Figure 10 show the topology of two groups in detail.
Figure 9.
Symmetrical double-chain topology.
Figure 9.
Symmetrical double-chain topology.
Figure 10.
Tree topology.
Figure 10.
Tree topology.
The practical test result is shown as
Figure 11 and we can see that the SDC topology can support the our monitoring system for more than 11 months continuously, which is about 2 months longer than tree topology. The energy consumption of each node with SDC topology is also a bit less than tree topology in general. The reason that the network of both two topology collapsed is the cells of N1 nodes which directly connected with sink node ran out early.
Figure 11.
The battery consumption.
Figure 11.
The battery consumption.
6. Conclusions
This paper proposed a system of wireless sensor networks to monitor black pepper fields. The optimal base station antenna height is put forward to improve the reliability and expansibility of the system. In addition, we proposed a novel ESPIN protocol using TinyOS and compared its performance with the traditional SPIN protocol. The implementation and evaluation in a practical testbed demonstrated that ESPIN was an energy conservative and fault-tolerant routing protocol. What is more, to further study the lifetime of different topologies, we test the SDC topology we designed in comparison with traditional tree topology and the result shows SDC has a longer lifetime for our system. Accordingly, the solution we present can effectively reduce the energy consumption and improve the success rate of data transmission in monitoring black pepper cultivation, which will greatly help turn the concept of precision agriculture into reality and hence improve black pepper productivity. However, a deficiency of our existing system is that some sensor nodes’ battery ran out earlier than others, which led to the whole network collapsing. How to balance the energy consumption of each sensor node to further improve the lifetime of WSN is our next goal to research.