Hybrid Training With Binary Search Protocol for Wireless Sensor Networks

Locationing problem in Wireless Sensor Networks(WSNs) can be viewed as a general distributed sensor problem. It is with sensors that can discover other nodes or estimate ranges between nodes, that serve as position references. In this paper, we show that sensors acquire coarse-grain location awareness by the training protocol. The training protocol which hybrids the synchronization and training procedure. In this protocol, synchronization and training are combined into one scheme. The sink node sends two beacons in each slot instead of one. In the training, sensor searching for its location using a binary search scheme. Our simulation results shown less number of cycles needed for training.


Introduction
Determining the location of devices or objects is important in many applications.For outdoor environments, the most well-known positioning system is the Global Positioning System (GPS) [6,12], that uses 24 satellites set up by the US.Department of Defense to enable global three-dimensional positioning.GPS has two levels of accuracy: stand positioning service (SPS) and precise positioning service (PPS).The accuracy provided by GPS is around 20 to 50 m.GPS is not suitable for wireless sensor networks for several reasons.First, it is not available in an indoor environment because satellite signals cannot penetrate buildings.Second, sensor networks have stringent energy constraints, which require special design.
Much work has been devoted recently to positioning and location tracking in the area of wireless ad hoc and sensor networks.Location information can be used to improve the performance of wireless networks and to provide new types of services.For example, it can facilitate routing in a wireless ad hoc network to reduce routing overhead.This is known as geographic routing [9,12].Through location-aware network protocols, the number of control packets can be reduced.Service providers can also use location information to provide some novel location-aware or follow-me services.For example, the navigation system based on GPS.A user can tell the system his destination and the system will guide him there.Phone systems in an enterprise can exploit locations of people to provide follow-me services.
Other types of location-based services include geocast [8,10,12], by which a user can request to send a message to a specific area, and temporal geocast, by which a user can request to send a message to a specific area at specific time.In contrast to traditional multicast, such messages are not targeted at a fixed group of members, but rather at members located in a specific physical area.
However, the random deployment of sensors in wireless sensor networks implies that the sensors are initially unaware of their exact location.Further, due to limitations in form factor, cost per unit and energy budget, individual sensors are not expected to be GPS-enabled; moreover, many probable application environments limit satellite access.It follows that the sensors have to learn either their exact geographic location or else a coarse-grain approximation of their location.The former task is referred to as localization.Wadaa et al. [13,14] and Xu et al. [11] proposed to refer to the task of endowing individual sensors with coarse-grain location awareness as training.
In this paper, we show that sensors acquire coarse-grain location awareness by the training protocol that imposes a coordinate system onto the network.We propose a simple lightweight and self-organization training algorithm to train the sensors learn their coarse-grain location.The training protocol combined the synchronization and training procedure into one scheme.We provide in Section 2 on how the dynamic system is proposed and in Section 3 the background of our training protocol in which the sensors are in sleep-awake cycle before the training started.Section 4 discusses the details of the algorithm of hybrid training protocol.In Section 4.2 we invite the reader to focus on the examples of our training protocol.We proof our training protocol by the simulation results in Section 5. Concluding remarks in Section 6 complete this paper.

Dynamic coordinate system
The process of endowing individual sensor nodes with coarse-grain location awareness leads this paper naturally to the concept of dynamic coordinate system.The dynamic system is a variant of the well known polar coordinate system adapted to our needs.The dynamic coordinate system in polar forms is represented by the coronas for the range and the wedges for angles of coverage.This is illustrated by Fig. 1.
In Fig. 1, θ(x) is a polar angle corresponding to x and ρ(x) is a polar distance corresponding to x.Localization means determining for all x in the plane the ordered pair (θ(x), ρ(x)).
Discretize the space by considering k ranges for ρ, namely r 1 , r 2 , . . ., r k such that 0 < r 1 < r 2 < . . .< r k = R and angular ranges w 1 , w 2 , . . ., w m such that 0 < w 1 < w 2 < . . .< w m = 2π.Thus for a given x, determine an approximation of its exact location in the form of a circular sector (see Fig. 2).

Synchronous vs. asynchronous training
Due to the extreme power limitation and lack of means for changing or recharging batteries, energy conversation is the most important design requirement for the WSN.It is concluded that the idle listening is the major source of power waste [2].Leaving the radio transceiver on for long periods of time will be significantly reducing the longevity of the WSN.Hence, the sensor radios have to work on a low duty cycle, called a sensor cycle, in which the sensors will be awake only a short period of time (referred as awake interval) and sleep for the rest of the time.
Referring to Fig. 3, the sensor cycle is on length L (slots) [Note: slots are defined arbitrarily but a good practical value is 675 microsecond per slot]: the sensor is in sleep mode for L − d slots and is awake for w θ (x) .
. .d slots.We assume the value of L is fixed during the network lifetime.However, the value of d and the beginning of the awake interval can be varied in different protocols.
In order to train the sensors in the network, the sink broadcasts training beacons.Assuming that k coronas have to be established, the sink transmission cycle involves k broadcasts in each k-cycle.Thus, sleep awake sleep awake awake Fig. 3. Illustrating the sensor sleep-awake cycle.each k − cycle consists of k slots encountered as s 1 , s 2 , . . ., s k where slot s j ,(1 j k), is intended to train the sensors in corona k − j + 1.Indeed, the power level that the sink uses in slot j distinguishes between sensors in slots k + j − 1 and k − j.We assume the sink can transmit beacons at different power level.At the highest power level (P k ), the beacon can be received by the sensors in the outmost corona s k .At the lowest power level (P 1 ), the beacon can only be received by the sensors in the corona s 1 .The sink repeats the transmission cycle (referred as the sink cycle) in case that some sensors miss the previous training beacons.To distinguish between sink cycles and sensor cycles, we shall refer to sink cycles as k-cycles and to the sensor cycles as s-cycles.

Training period
Since the sensors are not aware of the beginning time of the training, a training protocol relies on the sink to synchronize the sensors.Recall the sensors wake up at random according to their internal clock and alternate between sleep and awake in each s-cycle.The sink broadcasts a beacon at the highest power level for L slots to synchronize the sensors.We can limit each sensor be only awake one slot per s-cycle to save energy.It guarantees that every sensor in the range receives the beacon at least one time in the synchronization period.After the synchronization period, the sink starts training the sensors.Figure 4 illustrates.The sink cycle in the protocol proposed by Wadaa et al. in [13] is referred as the synchronous training protocol and requires that the sensors know the training start time before training.
The sensors can be trained without a synchronization period.An asynchronous training protocol was proposed in [11].The sink cycle in the asynchronous training protocol is illustrated in Fig. 5.In this type of protocols, the values of k and L are critical for energy saving.The protocol requires that the sensors know the value of k in advance in order to minimize energy consumption.
The sensor determines that it belongs to corona s 1 by receiving a P 1 beacon.And the sensor determines that it belongs to corona s i (where i = 1) by: 1. Receiving a P s i beacon 2. Failing to receive a P s i−1 beacon The way the k-cycle is set up, in slot i(1 i k) the sink transmitting at a power level P s i , where

Hybrid training with binary search protocol
In this section, we propose a hybrid training with binary search protocol.In this protocol, synchronization and training are combined into one scheme.The sink node sends two beacons in each slot instead of one.The first beacon (referred as synchronization beacon or SYNC for short, is sent with full power for sensor synchronization.It contains the total corona number (k) and the current corona number (s).The second beacon (referred as training beacon or TRAIN for short, is sent at successively lower power levels for sensor training.The sink cycle is illustrated in Fig. 6. We assume that a sensor is awake for one slot in every k-cycle.Before the training begins, sensors wake up at random until they receive a SYNC beacon.Thus, the probability of waking up in slot j is 1 k .By receiving the beacon in a given slot j, (1 j k), the sensor determines the following: -Slot boundaries -Synchronization to the k-cycles -The value of k -The beginning and end of the k-cycle Consider a sensor in corona i, (1 i k) that wakes up at random in slot j of some k-cycle, as showed in Fig. 7.
If the sensor receives the synchronization beacon but not the training beacon in slot j, the sensor also knows that its corona is in range of [s, k].If the sensor receives both the synchronization beacon and the training beacon, then it knows its corona is in range of [1, s − 1].In order to determine its corona number, the sensor can employ a binary search scheme on its corona number range.The procedure continues until its range boundaries are equal.The boundary gives the sensors corona number.The binary search scheme introduced here slightly differs from the traditional binary search algorithm.First, the scheme starts at an arbitrary position instead of the middle of the range.Second, the scheme ends when the searching range length reaches 1 instead of finding a particular value.
Note that in slot j the sink is transmitting to the intention of corona i, where i = k + 1 − j.As shown in Fig. 8, for case 1: if i < k + 1 − j the sensor receives the TRAIN beacon.It then goes to sleep and to wake up when the corona number (k+1−j)+1 2 is trained in the next k-cycle.Clearly, the slot being addressed in corona (k+1−j)+1 2 is: This corresponds to the intuition idea that the sensor proceeds by binary search in the range [j + 1, k].
On the other hand, for case 2: if i > k + 1 − j, then the sensor does not receive the TRAIN beacon.The sensor goes to sleep and will wake up again when the corona number k+(k+2−j) 2 is trained in the next k-cycle.It is easy to confirm that the slot number assigned to the corona k+(k+2−j) 2 is: (2)

Training with binary position search
Let A(i) be a random variables that counts the number of k-cycles needed on the average to train a sensor in a fixed corona i.For case 1, let A 1 (i) be the expected number of k-cycles needed and it receives the beacon in the first-cycle.Let P j be the probability that the sensor wakes up in slot j, we can write: Our evaluation of A 1 (i) relies on the following technical lemma.
Proof: For ∀n ∈ N we have: Thus, For case 2, let A 2 (i) be the expected number of k-cycles needed and the sensor does not receive the beacon in the first-cycle.Let P j be the probability that the sensor wakes up in slot j, we can write: Thus, we can write A(i) as: where and Let E[T ] be the random variable describing the number of k − cycles needed to train a sensor in the system, assuming that the total number of corona is k, the expected value E[T ] that we want to determine can be written as: ) Our evaluation of E[T ] relies on the following summations: Proof: Proof: Using the summation results, we have: Our final evaluation for E[T ] relies on the following theorems: Theorem 1.Let (a n ) be an arbitrary sequence of variables.For ∀n ∈ N, we have: Proof: This theorem is useful whenever the difference a i+1 − a i (1 i n − 1) is easy to evaluate.n i=1 Proof: Replacing in Theorem 1 (a n ) by log 2 α we have: With 2 P n < 2 P +1 for some P ∈ N. We have P log 2 n < P + 1 and consequently, The value of log 2 (α + 1) − log 2 α is either 0 or 1.The value is 1 whenever i = 2 q for some 1 q < log 2 n , and 0 everywhere else.Thus, The conclusion follows.
for some natural number α.
Case 1: k = 2 α Notice that the difference log 2 (i + 1) − log 2 i Is non-zero only if i = 2 β for some β α − 1.The value of the corresponding item is 2 2β = 4 β .Thus, the value of the sum is: As before, the term is 4 β .Thus the sum becomes: As claimed.
Proof: Using Theorem 1, we have: Consequently Eventually Note that: We have Applying Theorem 3 we have Now, we can evaluate the value of E[T ]:

Summary
We summaries the protocol performance with example as the following.
For k = 8, we assume that the sensor is awake in the first cycle when the sink is trained for the corona number 6, which is k + 1 − j = 6, then j = 3, and the actual corona number, s = 5.In this case, the sensor will not receives the beacon but it will learn to awake in the next k-cycle when the sink is training the corona number, k−j+2 2 = 3.The sensor also knows that its correct corona range is [k + 1 − j, 1] = [6,1].In cycle 2 as shown in Fig. 9, the sensor will awake at slot k − k−j+2 2 + 1 = 6.At this slot, the sensor does not receive the beacon because it needs more power compare to the sensors in corona number 3. The searching range for the sensor is changed to [6,3].The sensor continues learning to awake in cycle-3 when the sink is trained for the corona 6+3 2 = 4, which is in slot k − 4 + 1 = 5.The sensor does not receive the beacon.The searching range for the sensor is changed to [6,4].In cycle-4, the sensor will awake when the corona 6+4 2 = 5 is trained, which is in slot k − 5 + 1 = 4.In this slot, the sensor receives the beacon and the searching range is [5,4].Now, the boundaries are different by 1.The actual corona number will be the last slot when the sensor awakes and receives the beacon.It is in corona number 5.
In Example 2 as shown in Fig. 10 will do the same method of training for k = 8, j = 7 and s = 6.The expected of k-cycles needed as shown in the figure is 3.

Simulation
In our simulation, sensors are deployed uniformly at random in a field of size 700 m × 700 m.A sink node is placed in the middle of the field at (360, 360).The number k of coronas is 64 and each corona has a width of 10 meters.Hence, the length of a k-cycle is 64 time slots (a slot is 10 milliseconds).The sensors wake up at random to simulate the asynchronous effect.
For each sensor, the first wake-up time is generated uniformly at random in the interval (0, L), where L = 100.Hence, each sensor will wake up at a random time between that first and the 100-nd time slot. . . .shown in Fig. 12 is 144.
The difference may occurs depend on the number of sensor nodes deployed in the interest area and the number of corona being established during the training period.We prefer to use 64 coronas for < 500 sensor nodes.
In 13 we plotted the difference values of E[T ] in theoretical and simulation results.Our simulation results shown less number of cycles needed compare to theoretical results.The difference number of cycles shown is in the range of [0.1, 0.6].

Concluding remarks
In this work we have proposed a localization algorithm by training the sensors to impose a coordinate system onto the network.The algorithm is simple and self-organization to train the sensors to learn their coarse-grain location.This algorithm which hybrids the synchronization and training procedure to reduce the sink-cycle that has to be transmitted by the sink for 64 coronas.From these results, multiple-training can be implemented to this protocol which involves more than one sinks establish the same protocol.For this reason, the results of total training time can be varied and to be an exciting area for further work.

Figures 11 and 12
Figures 11 and 12  show the performance of the binary search scheme.We plotted the expected number of k-cycles needed to train the sensor node, E[T], for different k as shown in Fig.11.As anticipated, the total time slot number needed for training is T = L + k(log 2 k − 1) + 1 = 149, and our simulation