Figure 7.2: The delay factors for sending data packets.
Figure 7.3: The flow chart of the received time stamp.
Figure 7.4: Code flow chart of CPN.
Figure 7.5: Code flow chart of WSN.
Figure 7.6: WSN triggers the interrupt to record the local time.
To measure the synchronization errors, a fixed WSN is used to trigger the interrupts of the CPN and itself simultaneously after the end of the synchronization. Once the interrupts are triggered, the ISR of the CPN and the WSN will record their current local times. We use the difference between the recorded time of the CPN and that of the WSN as the synchronization error. Fig 7.6 shows how the WSN triggers both of them to record the time.
Table 7.2 shows the average absolute of synchronization errors for the three protocols under different maximum random access delays without using the regression scheme.
The maximum access delay of CSMA-CA can be set to uniform random between [0 , 0.32(2BE − 1)]ms in Zigbee with BE = 0, · · · , 3. The synchronization period is 0.5s, and the total number of experiments is 250.
We can see that the average synchronization errors of TPSN degrade greatly as the
Table 7.2: Synchronization error in µs without regression
Protocol BE=0 BE=1 BE=2 BE=3
TPSN 33.5 104.48 220.2 417.93
RRTE (1CPN and 3WSNs) 14.8 36.48 77.79 139.6
PBS 5.552 5.4 5.28 6.32
Table 7.3: Synchronization error after adding received delay in µs without regression
Protocol BE=0 BE=1 BE=2 BE=3
TPSN 73.52 122.26 231.64 430.6
RRTE (1CPN and 3WSNs) 115.26 130.8 170.1 238.8
PBS 137.58 136.8 136.12 135.14
variation of TS increases, and the RRTE protocol is a good compromise between the TPSN and the PBS. Besides, the synchronization errors of RRTE closely follow the rule:
δRRT E = 13δT P SN + 23δP BS of (3.1) and (5.9). We can see that the performance of PBS protocol for different BE are all good. It is because our experiment environment is simple. To simulate the more practical environment, we add a uniform random delay between (0, 320us) at the receiver before it making time stamp. Table 7.3 shows the synchronization error after adding the random received delay of the three protocols. We can notice that TPSN is better than PBS at BE=0 and 1. But when BE is more higher, PBS is still better than TPSN because the error performance of PBS is just relative to the received delay but not transmitted one.
To verify the proposed synchronization algorithm, we simulate the synchronization protocols of PBS, TPSN, and RRTE on the ”Simsync” simulator developed by Xu et al. [21]. The all delay factor are modeled by our measurement (See Fig. 7.2). Besides, to model the propagation delays between the SNs in a small BAN, the SNs are randomly allocated within a circle with a radius of 5 meters.
Table 7.4 summarizes the synchronization error between TPSN, RRTE and PBS
Table 7.4: Synchronization error in µs without regression via simsync
Protocol BE=0 BE=1 BE=2 BE=3
TPSN 37.658 103.5 222.148 421.491
RRTE (1CPN and 3WSNs) 15.595 38.813 75.59 146.611
PBS 5.805 5.35 5.42 5.65
Table 7.5: Synchronization error after adding received delay in µs without regression via simsync
Protocol BE=0 BE=1 BE=2 BE=3
TPSN 73.839 124.707 234.258 437.658 RRTE (1CPN and 3WSNs) 109.34 130.35 166.975 232.273
PBS 134.683 133.6 136.51 135.844
without regression, and Table 7.5 are that after adding the received delay. It can be seen that the error performance are all closed to our experiment result.
On the other hand, regression scheme is helpful for the huge delay variation envi-ronment. Table 7.6 represents the absolute synchronization error of using the recursive second order regression method proposed in Chapter 4 in the case of BE=3 and with received delay.
Furthermore, we use Simsync to simulate the relation between number of WSNs and synchronization error in our proposed RRTE protocol for BE=2 and with/without received delay (See Fig. 7.7, and Fig. 7.8). We can see that if the number of node become larger, the error performance will approach to that of PBS. On the other hand, the average synchronization error of regression case will approach to that without regression when the number of nodes are larger enough in Fig. 7.8. So we can know that the regression scheme is helpful when 1) the number of nodes are less than 4 in the case of without received delay and 2) the performance of PBS is bad due to received delay variation.
Fig. 7.10 presents three realizations of synchronization errors for SNs performing
Table 7.6: Synchronization error after adding received delay in µs with regression Protocol Absolute synchronization error
TPSN 269.42
RRTE (1CPN and 3WSNs) 177.48
PBS 118.5
Figure 7.7: Number of WSNs in RRTE v.s. absolute synchronization error with received delay.
synchronization with RRTE and regression as oppose to the realizations without using regression in Fig. 7.9. We can see that the synchronization errors jump rapidly in Fig.
7.9, while they are much more smooth in Fig. 7.10.
1 2 3 4 5 6 7 8 9 10
Absolute synchronization error (us) RRTE without regression
RRTE with regression TPSN without regression TPSN with regression PBS without regression PBS with regression
Figure 7.8: Number of WSNs in RRTE v.s. absolute synchronization error without received delay.
Figure 7.9: Error distribution of RRTE without regression.
0 20 40 60 80 100 120 140 160 180 200 -400
-200 0 200 400
Error of node 1
0 20 40 60 80 100 120 140 160 180 200
-500 0 500
Absolute synchronization error (us)
Error of node 2
0 20 40 60 80 100 120 140 160 180 200
-400 -200 0 200 400
Synchronization Cycle
Error of node 3
Figure 7.10: Error distribution of RRTE with regression.
Chapter 8 Conclusions
A Round-Robin Timing Exchange (RRTE) protocol was proposed for the distributed synchronization of wireless sensor network. Compared to the TPSN and the PBS pro-tocols, the power consumption for each sensor node of RRTE is much smaller than that of TPSN and is comparable to that of PBS. Furthermore, to improve the accuracy of synchronization, a recursive second-order regression method was also introduced to smooth the timing adjustment of each step. Implementation results also verified that the synchronization accuracy of RRTE falls within that of TPSN and PBS, and can be adjusted by controlling the number of SNs in one cycle of synchronization. This makes the synchronization protocol particularly useful for small scale wireless sensor networks.
Bibliography
[1] D. Estrin, R. Govindan, J. Heidemann, and S. Kumar, “Next century challenges:
Scalable coordination in sensor networks,” in Proc. ACM Mobicom Conference.
Seattle, WA, Aug. 1999.
[2] C. S. Raghavendra, K. M. Sivalingam, and T. F. Znati, Wireless Sensor Networks, Springer, 2nd edition, 2004.
[3] E. Jovanov, A. Milenkovic1, C. Otto1, and P. C de Groen, “A wireless body area network of intelligent motion sensors for computer assisted physical rehabilitation,”
Journal of NeuroEngineering and Rehabilitation, vol. 2, no. 1, pp. 6–16, Mar. 2005.
[4] B. Sundararaman, U. Buy, and A. D. Kshemklyani, “Clock synchronization in wireless sensor networks: a survey,” Ad hoc Networks, vol. 3, no. 3, pp. 281–323, 2005.
[5] M. Marotia, B. Kusy, G. Simon, and A. Ledeczi, “The flooding time synchronization protocol,” in Proc. 2nd International Conference on Embedded Networked Sensor Systems. Baltimore, U.S.A., Nov. 2004.
[6] M. L. Sichitiu and C. Veerarittiphan, “Simple, accurate time synchronization for wireless sensor networks,” in Proc. IEEE Wireless Communications and Networking Conference. New Orleans, LA, Mar. 2003.
[7] J. Elson and D. Estrin, “Time synchronization for wireless sensor networks,” in Proc. International Parallel and Distributed Processing Symposium, Workshop on Parallel and Distributed Computing Issues in Wireless Networks and Mobile Com-puting. San Francisco, CA, Apr. 2001.
[8] D. Cox, E. Jovanov, and A. Milenkovic, “Time synchronization for zigbee net-works,” in Proc. 37th SSST. Tuskegee, AL, Mar. 2005.
[9] J. V. Greunen and J. Rabaey, “Lightweight time synchronization for sensor net-works,” in Proc. 2nd ACM International Workshop on Wireless Sensor Networks and Applications. San Diego, CA, Sep. 2003.
[10] S. Yoon and M. L. Sichitiu, “Analysis and performance evaluation of a time synchro-nization protocol for wireless sensor networks,” in Proc. International Conference on Telecommunication Systems, Modeling and Analysis. Dallas, TX, Nov. 2005.
[11] H. Dai and R. Han, “Tsync: A lightweight bidirectional time synchronization service for wireless sensor networks,” Newsletters of ACM SIGMOBILE Mobile Computing and Communications Review, vol. 8, no. 1, pp. 125–139, Jan. 2004.
[12] S. Yoon, C. Veerarittiphan, and M. L. Sichitiu, “Tiny-sync: Tight time synchro-nization for wireless sensor networks,” ACM Transactions on Sensor Networks, vol.
3, no. 8, Jun. 2007.
[13] C. Xu, Lei. Zhao, Yongjun Xu, and Xiaowei Li, “Broadcast time synchroniza-tion algorithm for wireless sensor networks,” in Proc. Internasynchroniza-tional Conference on Sensing, Computing and Automation. ChongQing, China, May. 2006.
[14] K. Sohrabi, J. Gao, V. Ailawadhi, and G. Pottie, “Protocols for self-organization of a wireless sensor network,” IEEE Personal Communications Magazine, vol. 7, no. 5, pp. 16–27, Oct. 2000.
[15] C. Otto, A. Milenkovic, C. Sanders, and E. Jovanov, “System architecture of a wireless body area sensor network for ubiquitous health monitoring,” Journal of Mobile Multimedia, vol. 1, no. 4, pp. 307–326.
[16] J. Elson, L. Girod, and D. Estrin, “Fine-grained network time synchronization using reference broadcasts,” in Proc. 5th Symposium on Operation System Design and Implementation. Boston, MA, Dec. 2002.
[17] S. Ganeriwal, R. Kumar, and M. Srivastava, “Timing-sync protocol for sensor networks,” in Proc. 1st ACM Conference on Embedded Networked Sensor Systems.
Los Angeles, CA, Nov. 2003.
[18] K. L. Noh, E. Serpedin, and K. Qaraqe, “A new approach for time synchronization in wireless sensor networks: Pairwise broadcast synchronization,” IEEE Transac-tions on Wireless CommunicaTransac-tions, vol. 7, no. 9, pp. 3318–3322, Sep. 2008.
[19] F. Albu and C. Palelologu, “A recursive least square algorithm for active noise control based on the gauss-seidel method,” in Proc. IEEE International Conference on Electronics, Circuits and Systems (ICECS 2008). St. Julien’s, Malta, Aug. 2008.
[20] “Uniband electronic corp.,” http://www.ubec.com.tw.
[21] C. Xu, L. Zhao, Y. Xu, and X. Li, “Simsync: An effective time synchronization simulator for sensor networks,” in Proc. First International Workshop on Sensor Networks and Applications. Beijing, China, Oct. 2005.