# End to End Delay and Energy Consumption in a Two Tier Cluster Hierarchical Wireless Sensor Networks
## 4 Communication
### Synchronization of the WSN  
Synchronization is a basic requirement of all TDMA schemes, so it is of capital importance in our WSN. Traditional protocols such as the Network Time Protocol (NTP) are designed for wired networks but for WSN scenarios other suitable algorithm has been deployed such as, the Reference Broadcast Synchronization (RBS) algorithm [25], the Timing-sync Protocol for Sensor Networks (TPSN) [26] and the Flooding Time Synchronization Protocol (FPSP) [27]. The RBS eliminates the uncertainty of the sender by removing the sender from the critical path and at the same time the receivers exchange information to achieve the synchronization. The TPSN is appropriated to a tree network topology. Each node is assigned to a level, and only one node, the root -in our case the sink-, resides on level zero. FPSP is another protocol similar to TPSN, but offers some improvements to the disadvantages to TPSN. Specifically FTSP is suitable in tree topologies and provides multi-hop synchronization. It is a master-slave architecture in which the root node, the sink, provides the global time and all other nodes synchronize their clocks to that of the sink. [28] offers a summary where several synchronization methods for WSN are compared. As in [10] the synchronization to account in our WSN scenario corresponds to a cluster-tree topology. This topology make time synchronization between nodes much simpler that in othertopologies such as the mesh topology. Compared with most other TDMA- based multihop networks, such as in [29] the implementation of a cluster-tree topology is of much lower complexity. In this topology, the sink, which is not power constrained, can broadcast a beacon signal to all the CHs at the begin of each Combi-Frame and, in a second step, each CH can send a beacon signal each time a CONT sub-frame starts. Technologies such as IEEE 802.15.4 offers the beacons signals for synchronization. This mode of operation is similar to that used in cellular systems. As a point of reference for our discussion, we refresh some aspects of the timing advance (TA) and the master-slave synchronization scheme implemented in the GSM-(900, 1800, 1900) system [30]. In GSM, a TDMA hierarchy (frame, multiframe, superframe and hiperframe) with 8 time-slots per frame is built. A total of 148 bits--a normal burst--plus the equivalent to 8.25 bits as guard period (GP) (including overheads, mainly GP and synchronization sequence), fill the time-slot of \(120/208\approx 0.5769\) ms, which means a total bit rate of 270.833 kbps. over a carrier of 200 KHz bandwidth. Also, taking into account the maximum radio of a GSM cell, 37.8 Km, the propagation delay from the base station (BS) to the edge of the cell becomes \(37.8\times 10^{3}/3\times 10^{8}=126\) us which means 34.125 bits \"in the air\" or \"on the fly\", i.e., the 21.84% of the time slot duration. This is why time advance (TA) is considered in GSM and in cellular system in general. The TA values adopted in GSM are in the range \([0,63]\), with each step representing an advance of one bit period, 3692 us, equivalent to the distance of, approximately 1180 m. For synchronization purposes, a multiframe is composed by 51 frames (\(FR\)), i.e., 408 time slots with a total duration of \(51\times 8\times 15/26=235.3846\) ms. approximately. We focus on the combination IV, a down-link signaling scheme which usually is mapped into time slot 0 (\(TS=0\)) of a specific carrier [31]. Then, in \((TS,FR)=(0,0)\) the BS (in our case it would be the sink) transmit the frequency correction burst (\(FB\)), used for frequency synchronization of the mobiles (CHs and sensors in our case). In the same time slot of the next frame, \((TS,FR)=(0,1)\), the BS transmit the synchronization burst (\(SB\)) used for time synchronization of the mobiles (CHs and sensors in our case).