Controlled Mobility Time Synchronization for WSNs

One of the important aspects in wireless sensor networks is time synchronization. Many applications such as military activity monitoring, environmental monitoring and forest fire monitoring require highly accurate time synchronization. Time synchronization assures that all the sensor nodes in wireless sensor network have the same clock time. It is not only essential for afore-mentioned applications but it is mandatory for TDMA scheduling and proper duty cycle coordination. Time synchronization is a challenging problem due to energy constraints. Most of the existing synchronization protocols use fixed nodes for synchronization, but in the proposed synchronization, algorithm mobile nodes are used to synchronize the stationary nodes in the sensing field. In this paper, we propose a new time synchronization algorithm, named controlled mobility time synchronization (CMTS) with the objective to achieve the higher accuracy while synchronizing the nodes. The proposed approach is used in this paper to synchronize the nodes externally by using the mobile nodes. Simulation results exhibit that proposed controlled mobility time synchronization increases the synchronization precision and reduces the energy consumption as well as synchronization error by reducing the collisions and retransmissions.


Introduction
Revolutionary technological changes in the field of microelectronics and wireless communications have resulted in the emergence of wireless sensor networks (WSN). The network is composed of numerous motes equipped with miniature sensors. The advantageous features of these motes are low cost, small size, multi-functionality and mobility. In modern era, wireless sensor networks have grown in popularity and are being used in various applications such as target Each node is aware of its neighbors with whom it has to communicate.

Wu et al. proposed average time synchronization (ATS) by pairwise message
exchange with packet delay [29]. Synchronization takes place by exchanging the time between two nodes with each other and then calculates the average time to set the nodes clock.
Thomas Schmid et al. proposed the temperature compensated time synchronization (TCTS) which exploits the temperature of the sensor to automatically calibrate the oscillation of the sensor nodes to eliminate the effect of the environmental temperature changes which leads to increase in the resynchronization period [30].
Long term and large scale time synchronization protocol (2LTSP) for WSNs has been proposed by Huang et al. with the objective to keep the large scale WSN synchronized for long time [31]. Here, the WSN is depicted as network graph where any two nodes are connected with an edge. This protocol uses a reference node to synchronize the network. The hardware clock of the reference node is the global clock of the node. 2LTSP protocol has no special topology structure, here, the node with lowest ID is elected as reference node and its hardware clock serves as global clock.

Ganeriwal et al. proposed timing-sync protocol for sensor networks (TPSN)
which uses the sender receiver synchronization approach to synchronize the clock of the sensor nodes. Here, the logical hierarchical structure of sensor nodes is established to communicate between sender and receiver. The nodes of the network are synchronized hierarchically to the root node's clock. This approach is not suitable for mobile nodes but suitable for the network with highly constrained computational energy and bandwidth.

Mobile Node Based Time Synchronization Model
There are various applications which require accurate time synchronization of the nodes in the WSNs. The existing protocols use the clock of the base station to synchronize the sensor nodes. Large size WSNs uses multi-hop communication for synchronization which reduces the time synchronization accuracy level and also consumes more energy. Therefore, to enhance the precision level of clock synchronization and to decrease the energy consumption, a new time synchronization scheme is proposed by exploiting the mobility of the nodes. By introducing the mobility to some of the nodes in WSNs, we can improve the clock synchronization accuracy level as well as reduce the energy consumption by reducing the communication range.
The proposed model consists of a set of stationary sensor nodes and a set of mobile nodes. These mobile nodes have a locomotion capability which allows them to move throughout a sensing region [32]  • Improved Performance; • Accurate Clock Synchronization; • Additional Channel Capacity.

Controlled Mobility Time Synchronization Model
The mobility pattern of the mobile nodes defines the movement of mobile nodes and their velocity, location and acceleration changes over a period of time. In In CMTS model, each mobile node (MN) moves on a specific path as shown in Figure 1. To ensure the complete coverage of all nodes along the path, each mobile node travels some distance and then waits for some time and then again moves to next destination. Mobile nodes have GPS so each node knows its initial location and selects a new location as a destination d. Mobile node starts moving to its destination with constant velocity, but before moving to its destination,

Assumptions
Following assumptions are made: • There is a unique ID for each node in the WSN; • During the initial synchronization phase, there is no fault in the mobile nodes and sensor nodes; • If any CH fails due to energy, then clustering algorithm immediately selects a new CH; • Each mobile node is equipped with GPS system and adequate energy; • The network is consists of N sensor nodes deployed in a square field with flat topology; • Sensor nodes can directly communicate (one hop communication) with mobile node; • Communication within the square field is not subjected to multipath fading.
The communication channel is symmetric; • Nodes are left unattended after deployment and battery re-charge is not possible.

Controlled Path Calculation
Calculation of the controlled path for the mobile nodes is based on the communication range of the nodes. The optimum number of controlled paths for the sensing field is defined by following equation: The path is defined in such a way that mobile nodes directly communicate with the sensor nodes. The number of paths in a row is calculated as m . The x-axis and y-axis values of the path are defined by the following equations: where X , Y are the dimensions of the sensing field and R is the communication range of each node. The path for Next Square in a row is defined by following equations: Similarly x-axis and y-axis values of the square in second row are defined by increasing the value of i.
Similarly x-axis and y-axis value of the square for next row can be obtained.   if (MN j receives (Syn_reply, t i , t i+1 , t i+2 ) from SNs) then  18. end while 19.

Controlled Mobility Time Synchronization Algorithm
Repeat step from 2 to 19 in next synchronization phase As shown in Figure 2, MN broadcasts the time messages to the sensor nodes by sending a timestamp message t i which is received by the sensor node at time t i+1 and then sensor node sends a message t i+2 which is received by MN at t i+3 and then MN broadcast time message t s which is received by sensor nodes within its communication range. The sensor nodes which receive this message calculate delay ( ) 1 α and offset ( ) θ without mobility factor using following equations.
In the proposed algorithm, mobility of nodes is considered. Due to mobility, pair wise synchronization could not find out the precise time difference between two nodes due to varying distance between two nodes. In the proposed algorithm, mobile node (MN) moves with some known constant velocity V and sensor node exchanges the time stamp messages as shown in Figure 2. The MN moves towards the senor node or away from sensor nodes. Figure 2 shows that MN is moving away from the sensor node with known constant velocity. α is negative. The value of 2 α can be derived from distance formula as follows. .
Finally, the sensor node can set the time with mobility factor between MN and static node by using the following equation.
When the mobile node is synchronizing the sensor nodes using the synchronization time t s , then sensor nodes set their time using the following equation.
Number of halts required by a mobile node, while moving on controlled path depends on the value of d which can be derived as: After obtaining the value of d, it is easy to compute the number of times mobile node halts during one loop of the path by using the following equation:

Calculation of Time to Complete One Loop by Mobile Node around the Path
In proposed Controlled Mobility Time Synchronization Model, mobile nodes move along the fixed path and broadcast time synchronization message, which will be received by all the nodes within the communication range. This message contains the time, velocity, direction of the mobile node and acceleration.
Initially the mobile node will be in a state of rest, therefore, initial velocity will be zero and when the mobile node starts moving then it reaches to a perfect velocity j v . The time that mobile node takes to accelerate to a perfect velocity can be calculated using the following equation: Time . accelaration where i v and f v are the initial velocity and final velocity, respectively.
Time ap is the time taken to accelerate to perfect velocity. Mobile node after travelling distance d will have to halt for some time. Mobile node takes a time to decelerate to halt that is calculated using following equation: Since it is known that how much time a mobile node is taking to obtain the perfect velocity and also know the time to reach in halt stage. Now the time spent by the mobile node at constant velocity depends on the distance travelled by the mobile node from perfect velocity to zero velocity and can be calculated as follows.
Time .
where pv d is a distance travelled in perfect velocity and pv d can be derived by following equation: whereas t α is a halt time taken by a mobile node after reaching distance d and is considered as highest value of 2 α .
Halting of a mobile node increases the round trip time of the mobile node along the controlled path. If the size of the controlled path is long then there may be some sensor nodes keep on waiting for synchronization message from mobile nodes in initial phase of synchronization. Therefore, keeping in view the problem halting time after moving distance d may be removed and the mobile node moves without halt with a perfect velocity (i.e. constant velocity). Total time taken by a mobile node to take one round of the controlled path is given by following equation:

While implementing the proposed Controlled Mobility Time Synchronization
Algorithm, it is important to find out the optimum number of mobile nodes required to synchronize the entire sensing field. Range of the mobile node is used to find out the optimum number of nodes required to synchronize the total area of the wireless sensor network. Following equation provides the optimum number of mobile nodes.
where X and Y are the dimensions of the sensing region and R is the communication range of mobile node. This can be verified by using Figure 3.

Simulation and Results
The purpose of this section is to analyze the performance of the proposed Con-  Table 1.
Initially the performance of proposed algorithms has been compared with each other, and then compared with Tow-hop time synchronization (TTS) [27], Average Time Synchronization (ATS) [29] and Timing sync protocols for sensor networks (TPSN). The performance evaluation includes message exchange, energy consumption, skew error rate and synchronization delay.
Simulation results in Figure 4 show   In CMTS, the path is defined in such a way that each node has to communicate less than or equal to R. In CMTS, mobile nodes are moving within the controlled path in sensor field and communicating with the nodes and thereby reducing the communication range and conserve the energy.
The objective of this experiment is to compare synchronization accuracy of CMTS with other protocols in terms of number of hops. Simulation results in Figure 6 indicate that synchronization error remain constant for CMTS with increase in number of hops because controlled path is defined in such a way that mobile node has to communicate in one-hop distance. In Figure 6, the increase in synchronization error is below 1 μs over a distance of five-hops for CMTS and is 2.8 μs for ATS over the same number of hops. Whereas synchronization error for TPSN and TTS is much higher than CMTS. Mobility factor is responsible for reducing the synchronization error in CMTS. Mobile nodes are moving in the sensing field on a fixed path in CMTS and communicating with the sensor nodes within its range thereby reducing the collisions as well as message delay.
Therefore, CMTS performs better than other protocols. Whereas TTS and TPSN is synchronizing the nodes using the hierarchical structure where error is accumulated at each level of hierarchy.

Conclusion
Time synchronization in wireless sensor networks is challenging problem due to high delay variability and resource constraints of nodes. In critical applications, time synchronization is very important to know the exact time of the event. This paper proposes a mobile node based time synchronization algorithms named CMTS for wireless sensor networks. In CMTS, mobile nodes move on a fixed path with certain velocity. Synchronization process is initiated by mobile node and it synchronizes sensor nodes falling in its communication range. The objective of mobile nodes is to reduce the communication overhead for sensor nodes and to do synchronization with higher precision. Simulation results show that the proposed algorithm is able to save the energy, reduce synchronization time and improve synchronization accuracy.