Power Balance AODV Algorithm of WSN in Agriculture Monitoring

WSN (wireless sensor networks) is a kind of energy-constrained network, which has been widely used in precision agriculture environment monitoring. However, power balance is not taken into account in traditional routing algorithms. In this paper, a novel Power Balance Ad hoc On-Demand Distance Vector (PB-AODV) routing algorithm is proposed on cross-layer design to solve the problem of power balance. The main idea of our proposed algorithm is that, routing path is established by the received signal strength indication (RSSI) value in the route discovery process of PB-AODV. The optimal transmitting power which can be computed by RSSI value, power threshold and node’s surplus energy is encapsulated into route reply packet (RRP). Thus, the sender node can adaptively adjust its transmission power to save energy with the RRP. Simulation results show that the proposed algorithm is effective for load balancing, and increases the WSN’s lifetime about 14.3%.


Introduction
As one of important technologies of Internet of Things (IOT), Wireless Sensor Network (WSN) has been widely used in lots of industries and agricultures including in precision agriculture environment monitoring.
Sensor nodes are deployed in greenhouse awning, orchard or farmland, periodically collecting the information such as temperature, humidity, light intensity, carbon dioxide concentration etc, which is gathered into the sink node and sent to management node by 3G network. Managers view the crop's growth information and take the appropriate crops management measures to improve crops growth environment [1].
The application of WSN in agricultural environment monitoring is paid more attention due to low cost and convenient deployment of WSN. For example, WSN is applied into the vineyard environmental monitoring by Andrade-Sanchez [2], And WSN monitoring system in precision agriculture is designed in University of Science and Technology of China [3]. Facilities agricultural environment monitoring system base on WSN is developed by Zhejiang A&F University [4]. However, WSN is a kind of energy-constrained network which uses batteries for power supply. It is necessary to take some measures to extend the WSN network's service time in agricultural environment monitoring as long as possible. However traditional routing protocols in WSN, such as AODV [5], never thinks over the problem of power control. It is necessary to design a new power control routing algorithm [6].
In this paper, we put forward a novel Power-Balanced AODV (PB-AODV) routing algorithm based on cross-layer design. The idea of the algorithm is as following: routing table is established by the Received Signal Strength Instructions (RSSI) of the neighbor nodes during path-recovery process [7]. The optimal transmission power is computed and informed to neighbors by routing response package in order to achieve the effective use of energy and extend the life-time of the whole networks.
When one node becomes failure for its energy runs out, inherent routing maintenance mechanism of AODV will discover the problem in time and launch the routing discovery process.

Wireless Communication Model
Different communication models will directly influence energy performance and performance comparison should be done in the same communication model [8]. We suppose that each node uses one omnidirectional antenna. Let the signal transmission between nodes obey free space propagation model [9]. Power consumption is subject to formula (1).
The parameters' meaning in formula (1) is as followings. The WSN network used for monitoring environment in precision agriculture should have the following properties.
(1) All sensor nodes have the same structure and they are energy limited [10].
(2) All sensor nodes communicate with the sink node through multi-hops.
(3) Wireless transmitting power can be adjusted and the initial transmitting power in each node is consistent. (4) All nodes are random layout, and the sink node is located in the edge of the network.
The structure of WSN network in Precision Agriculture Environment Monitoring can be shown in in Figure 1.

Power Balance AODV Routing Algorithm
AODV is developed by Charles E. Perkins and Elizabeth M [11]. The protocol has become RFC standard of routing protocol in ad hoc network by IETF MANET working group in 2003. Based on DSDV [12], AODV algorithm improves the on-demand routing mechanism in DSR [13][14][15]. So AODV is the combination of DSR and DSDV.
There are three kinds of basic message control frame in AODV. They are Route Request (RREQ), Route Reply (RREP) and Route Error (RERR). If the source node can not find an effective routing path to the destination node, routing discovery will be launched as following: the source node will broadcast a RREQ packet and AODV allows relay nodes to transmit the RREQ packet. When a relay node receiving RREQ packet has a "new enough" routing path to the destination node, the node will respond by RREP packet to the source node. The RREP packet goes back to the source node along the reverse path which has just been established. Thus the path from the source node to the destination, which is the sink node in WSN, has been set up. Once a relay node finds that the next hop along the routing path becomes un-reached or receives a data packet whose destination is unknown during data transmission. The relay node sends back a routing error message (RERR packet) to the source node. The source is aware that there exists routing error and restarts routing discovery. Figure 2 shows the routing establishment process of AODV. Figure 2. Routing establishment process of AODV As shown in Figure 2, when node D wants to transmit data to the sink node, a RREQ packet will be broadcast in the whole network. Relay node C receives the RREQ packet and forwards it. Both relay node A and B can reach the destination Sink node in one hop and both of them reply RREP packets to node D after they receive the RREQ from D. According to AODV routing mechanism, node D will choose the path which has the least hop, which is D→C→A or D→C→B, to transmit data. If the path D→C→A is selected, node C has to consume more power to send data to node A and node C will "die early" for it runs out of its energy. Otherwise, if the path D→C→B is selected, node B will "die early". Whether node C or B dies early will shorten the life-time of the whole WSN network. In order to prolong the network life cycle, we propose a power balance routing algorithm based on AODV routing protocol called Power Balance-AODV (PB-AODV) based on cross-layer design theory.
The basic idea of PB-AODV is as follows: both RSSI in MAC layer and power threshold in Physical layer are considered in routing discovery. The optimal transmitting power field, donated by symbol Best-P t , is added into RREP packet. When one sensor node receives several different RREQ packets from different neighbors during routing discovery, the receiver selects the node sending RREP with largest RSSI value as the upward neighbor. The reason is that all nodes send RREP with the same transmitting power and the largest RSSI in receiver should be sent by the nearest neighbor node, which should be the upward neighbor. Then the receiver judges whether the receiving RSSI value is larger than the power threshold P G , which means the optimal receiving power between the neighbors. If yes, receiving power is adjusted to equals to P G and reversely deduced the adjustment coefficient of the optimal transmitting power (δ). We suppose that Pr is the receiving power in the node receiving RREQ packet; P G is the minimum of P r ; P t is the transmitting power; P tg means the transmitting power when the receiving power is P G . In fact, Ptg is the optimal transmitting power between the two neighbor nodes. According to the channel model shown in formula (1), we can get the following the deducing process: We define the adjustment coefficient of the optimal transmitting power (δ) as formula (4).  (4) and (5), we can obtain formula (6)    t tg P P (6) The receiver writes the value of δ, which is calculated by formula (6), into the field Best-P t of RREP packet and transmits the RREP to its upward neighbor in reverse routing path. The upward neighbor receiving the RREP packet reads the value of δ from the RREP and takes P t *δ as the new transmitting power, which is the optimal transmitting power P tg between the two neighbors. The establishing process of PB-AODV is can be shown in Figure 3. During the routing setup process, if both node B and C transmit their RREQ to node A, node A will find that the RSSI from B is larger than that from C, that is, Node A is closer to node  Figure 2. Then node A writes the optimal transmitting power into the field Best-Pt of RREP packet and sends the packet to node B. Thus the routing between node B and A is setup. Similarly, node C and B is setup in the same way. The transmitting power of each node is adjusted into optimal transmitting power, which can make transmitting power in each node more balance and prolong the lifetime of the whole network. PB-AODV algorithm can be shown in Figure 4. When one node "dies" owing to its' exhausting battery, routing maintenance mechanism in AODV would discover in time and restart the routing discovery of PB-AODV.

Simulation Analysis
The simulation tool that we used is NS2 [16]. Simulation scenarios are rectangle area with the fixed size of 1000m × 50m. We deploy 100 sensor nodes among the rectangle area and the nodes belongs to Poisson distribution. The sink node has continual energy and its energy consumption is not considered in the simulation process. The other nodes' energy is set to 5 initially and some of them are selected randomly as source nodes, which will transmit data to the sink node by multi-hops. In order to test energy consumption of intermediate nodes, source nodes are selected uniformly.
We compare the residual energy of WSN between in AODV and PB-AODV, and the simulation results can be shown in Figure 5.
In Figure 5, the nodes with smaller sequence number are closer to the sink node. From Figure 5, we can see that WSN nodes running PB-AODV has 30% higher residual energy than that of running traditional AODV. And energy consumption of each node in PB-AODV is more uniform than that in AODV, which can effectively avoid the "premature" death of some nodes and extend the lifetime of the whole WSN in PB-AODV.
We compare the number of "living" nodes running PB-AODV with that running traditional AODV in the same WSN networks. The simulation results can be shown in Figure 6.
From Figure 6, we can see that the number of remaining nodes in PB-AODV is 15% higher than that in traditional AODV. ( 1 (7) The parameters in formula (7) are as following: D: the surplus energy variance. N: the total number of nodes in the WSN. En: the surplus energy of node n. The simulation result of surplus energy variance can be seen in Figure 7. We can see that the rest energy variance in PB-AODV is 8% lower than that in traditional AODV,.

Conclusion
In this paper,. a new power balance routing algorithm called PB-AODV is proposed to enhance the energy utilization of WSN. Comparing with traditional AODV algorithm, the proposed algorithm can adaptively adjust transmission power to save energy. Simulation results show that the proposed PB-AODV algorithm can effectively extend 14.3% more lifetime of the network. Furthermore, PB-AODV can keep the power balance of each node and reduce the cost of artificial maintenance, which has the important practical significance to long-term and realtime detection of WSN in precision agriculture.